Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -191,11 +191,14 @@ static int do_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) · 190 unmodified lines | |||
| 191 | const int slice_start = (s->planeheight[plane] * jobnr) / nb_jobs; | 191 | const int slice_start = (s->planeheight[plane] * jobnr) / nb_jobs; |
| 192 | const int slice_end = (s->planeheight[plane] * (jobnr+1)) / nb_jobs; | 192 | const int slice_end = (s->planeheight[plane] * (jobnr+1)) / nb_jobs; |
| 193 | const uint8_t *p = frame->data[plane] + slice_start * frame->linesize[plane]; | 193 | const uint8_t *p = frame->data[plane] + slice_start * frame->linesize[plane]; |
| 194 | const ptrdiff_t linesize = frame->linesize[plane]; | ||
| 195 | const int planewidth = s->planewidth[plane]; | ||
| 196 | int *hhist = hist + 256 * plane; | ||
| 194 | 197 | ||
| 195 | for (int j = slice_start; j < slice_end; j++) { | 198 | for (int j = slice_start; j < slice_end; j++) { |
| 196 | for (int i = 0; i < s->planewidth[plane]; i++) | 199 | for (int i = 0; i < planewidth; i++) |
| 197 | hist[256*plane + p[i]]++; | 200 | hhist[p[i]]++; |
| 198 | p += frame->linesize[plane]; | 201 | p += linesize; |
| 199 | } | 202 | } |
| 200 | } | 203 | } |
| 201 | break; | 204 | break; |