# Load Balancing Strategies for Slice-Based Parallel Versions of JEM Video Encoder
## 3 Parallel Approaches
### Asynchronous Algorithm: JEM-SP-ASync
These tables include different numbers of slices per frame setup for each video sequence, and show the relative computation time required by each slice at different compression rates (QPs). As can be observed, none of these schemes achieve correct load balancing, regardless of whether or not the volume of data assigned to each process is balanced. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & \multicolumn{8}{c}{**Number of Slices (and Threads)**} \\ \hline
**Number of CTUs** & **2** & **4** & **5** & **7** & **8** & **10** & **11** & **12** \\ \hline \multicolumn{8}{c}{**Diff. in Size of the Last Slice**} \\ \hline
135 & \(-1\) & \(-1\) & \(0\) & \(-5\) & \(-1\) & \(-5\) & \(-8\) & \(-9\) \\
60 & \(0\) & \(0\) & \(0\) & \(-3\) & \(-4\) & \(0\) & \(-6\) & \(0\) \\
28 & \(0\) & \(0\) & \(-2\) & \(0\) & \(-4\) & \(-2\) & \(-5\) & \(-8\) \\
8 & \(0\) & \(0\) & \(-2\) & \(-6\) & \(0\) & \(-2\) & -3 & \(-4\) \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Difference in size of the last slice (in CTUs). \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline  & \multicolumn{8}{c}{**Number of Slices (and Threads)**} \\
**N. CTUs** & **2** & **4** & **5** & **7** & **8** & **10** & **11** & **12** \\ \hline \multicolumn{8}{c}{Slice size (in CTUs)} \\ \hline
135 & 67.5 & 33.8 & 27.0 & 19.3 & 16.9 & 13.5 & 12.3 & 11.3 \\
60 & 30.0 & 15.0 & 12.0 & 8.6 & 7.5 & 6.0 & 5.5 & 5.0 \\
28 & 14.0 & 7.0 & 5.6 & 4.0 & 3.5 & 2.8 & 2.5 & 2.3 \\
8 & 4.0 & 2.0 & 1.6 & 1.1 & 1.0 & 0.8 & 0.7 & 0.7 \\ \hline \multicolumn{8}{c}{Slice size (in CTUs) rounded up} \\ \hline
135 & 68 & 34 & 27 & 20 & 17 & 14 & 13 & 12 \\
60 & 30 & 15 & 12 & 9 & 8 & 6 & 6 & 5 \\
28 & 14 & 7 & 6 & 4 & 4 & 3 & 3 & 3 \\
8 & 4 & 2 & 2 & 2 & 1 & 1 & 1 & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Number of CTUs per slice. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multicolumn{2}{c}{**Slice**} & & & & & \\ \hline size & QP & (0–68) & (68–135) & & & \\  & 22 & 53\% & 47\% & & & \\
68 & 27 & 53\% & 47\% & & & \\  & 32 & 53\% & 47\% & & & \\  & 37 & 53\% & 47\% & & & \\  & & (0–45) & (45–90) & (90–135) & & \\  & 22 & 37\% & 36\% & 28\% & & \\
45 & 27 & 37\% & 36\% & 28\% & & \\  & 32 & 37\% & 35\% & 27\% & & \\  & 37 & 37\% & 36\% & 27\% & & \\  & & (0–34) & (34–68) & (68–102) & (102–135) & \\  & 22 & 27\% & 27\% & 29\% & 18\% & \\
34 & 27 & 27\% & 26\% & 29\% & 17\% & \\  & 32 & 27\% & 26\% & 30\% & 16\% & \\  & 37 & 28\% & 25\% & 31\% & 16\% & \\  & & (0–27) & (27–54) & (54–81) & (81–108) & (108–135) & \\  & 22 & 22\% & 21\% & 22\% & 23\% & 13\% \\
27 & 27 & 22\% & 21\% & 22\% & 23\% & 12\% \\  & 32 & 22\% & 21\% & 22\% & 24\% & 11\% \\  & 37 & 23\% & 19\% & 23\% & 26\% & 10\% & \\  & (0–23) & (23–46) & (46–69) & (69–92) & (92–115) & (115–135) & \\  & 22 & 18\% & 20\% & 17\% & 19\% & 18\% & 7\% \\  & 27 & 17\% & 21\% & 17\% & 20\% & 19\% & 6\% \\
23 & 28 & 18\% & 21\% & 16\% & 21\% & 19\% & 6\% \\  & 37 & 18\% & 20\% & 16\% & 22\% & 19\% & 5\% \\  & (0–20) & (20–40) & (40–60) & (60–80) & (80–100) & (100–120) & (120–135) & \\  & 22 & 15\% & 17\% & 17\% & 15\% & 17\% & 16\% & 4\% \\
20 & 27 & 15\% & 17\% & 17\% & 15\% & 17\% & 15\% & 4\% \\  & 32 & 15\% & 17\% & 17\% & 15\% & 18\% & 15\% & 3\% \\  & 37 & 16\% & 17\% & 16\% & 16\% & 18\% & 14\% & 3\% \\  & (0-17) & (17–34) & (34–51) & (51–68) & (68–85) & (85–102) & (102–119) & (119–135) \\  & 22 & 14\% & 14\% & 13\% & 14\% & 14\% & 15\% & 13\% & 4\% \\
17 & 27 & 13\% & 14\% & 13\% & 14\% & 14\% & 16\% & 13\% & 4\% \\  & 32 & 14\% & 14\% & 12\% & 14\% & 14\% & 16\% & 12\% & 4\% \\  & 37 & 14\% & 14\% & 12\% & 13\% & 14\% & 17\% & 12\% & 3\% \\  & (0–15) & (15–30) & (30–45) & (45–60) & (60–75) & (75–90) & (90–105) & (105–120) & (120–135) \\  & 22 & 12\% & 13\% & 12\% & 12\% & 11\% & 12\% & 13\% & 11\% & 4\% \\
15 & 27 & 12\% & 13\% & 12\% & 12\% & 11\% & 12\% & 13\% & 11\% & 4\% \\  & 32 & 12\% & 13\% & 12\% & 12\% & 11\% & 13\% & 13\% & 10\% & 3\% \\  & 37 & 12\% & 14\% & 12\% & 11\% & 11\% & 13\% & 14\% & 10\% & 3\% \\ \hline \hline \end{tabular}
\end{table}