Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -35,7 +35,7 @@ typedef struct MaskFunContext { · 34 unmodified lines | ||
| 35 | 35 | int sum; |
| 36 | 36 | |
| 37 | 37 | int linesize[4]; |
| 38 | − int width[4], height[4]; | |
| 38 | + int planewidth[4], planeheight[4]; | |
| 39 | 39 | int nb_planes; |
| 40 | 40 | int depth; |
| 41 | 41 | int max; |
| @@ -101,7 +101,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) · 59 unmodified lines | ||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | ff_filter_execute(ctx, s->maskfun, frame, NULL, |
| 104 | − FFMIN(s->height[1], ff_filter_get_nb_threads(ctx))); | |
| 104 | + FFMIN(s->planeheight[1], ff_filter_get_nb_threads(ctx))); | |
| 105 | 105 | |
| 106 | 106 | return ff_filter_frame(outlink, frame); |
| 107 | 107 | } |
| @@ -115,8 +115,8 @@ static int getsum##name(AVFilterContext *ctx, AVFrame *out) \ · 7 unmodified lines | ||
| 115 | 115 | \ |
| 116 | 116 | for (p = 0; p < s->nb_planes; p++) { \ |
| 117 | 117 | const int linesize = out->linesize[p] / div; \ |
| 118 | − const int w = s->width[p]; \ | |
| 119 | − const int h = s->height[p]; \ | |
| 118 | + const int w = s->planewidth[p]; \ | |
| 119 | + const int h = s->planeheight[p]; \ | |
| 120 | 120 | type *dst = (type *)out->data[p]; \ |
| 121 | 121 | \ |
| 122 | 122 | if (!((1 << p) & s->planes)) \ |
| @@ -150,8 +150,8 @@ static int maskfun##name(AVFilterContext *ctx, void *arg, \ · 27 unmodified lines | ||
| 150 | 150 | \ |
| 151 | 151 | for (p = 0; p < s->nb_planes; p++) { \ |
| 152 | 152 | const int linesize = out->linesize[p] / div; \ |
| 153 | − const int w = s->width[p]; \ | |
| 154 | − const int h = s->height[p]; \ | |
| 153 | + const int w = s->planewidth[p]; \ | |
| 154 | + const int h = s->planeheight[p]; \ | |
| 155 | 155 | const int slice_start = (h * jobnr) / nb_jobs; \ |
| 156 | 156 | const int slice_end = (h * (jobnr+1)) / nb_jobs; \ |
| 157 | 157 | type *dst = (type *)out->data[p] + slice_start * linesize; \ |
| @@ -186,8 +186,8 @@ static void fill_frame(AVFilterContext *ctx) · 28 unmodified lines | ||
| 186 | 186 | for (int p = 0; p < s->nb_planes; p++) { |
| 187 | 187 | uint8_t *dst = s->empty->data[p]; |
| 188 | 188 | |
| 189 | − for (int y = 0; y < s->height[p]; y++) { | |
| 190 | − memset(dst, s->fill, s->width[p]); | |
| 189 | + for (int y = 0; y < s->planeheight[p]; y++) { | |
| 190 | + memset(dst, s->fill, s->planewidth[p]); | |
| 191 | 191 | dst += s->empty->linesize[p]; |
| 192 | 192 | } |
| 193 | 193 | } |
| @@ -195,8 +195,8 @@ static void fill_frame(AVFilterContext *ctx) · 1 unmodified line | ||
| 195 | 195 | for (int p = 0; p < s->nb_planes; p++) { |
| 196 | 196 | uint16_t *dst = (uint16_t *)s->empty->data[p]; |
| 197 | 197 | |
| 198 | − for (int y = 0; y < s->height[p]; y++) { | |
| 199 | − for (int x = 0; x < s->width[p]; x++) | |
| 198 | + for (int y = 0; y < s->planeheight[p]; y++) { | |
| 199 | + for (int x = 0; x < s->planewidth[p]; x++) | |
| 200 | 200 | dst[x] = s->fill; |
| 201 | 201 | dst += s->empty->linesize[p] / 2; |
| 202 | 202 | } |
| @@ -212,7 +212,7 @@ static void set_max_sum(AVFilterContext *ctx) · 9 unmodified lines | ||
| 212 | 212 | for (int p = 0; p < s->nb_planes; p++) { |
| 213 | 213 | if (!((1 << p) & s->planes)) |
| 214 | 214 | continue; |
| 215 | − s->max_sum += (uint64_t)s->sum * s->width[p] * s->height[p]; | |
| 215 | + s->max_sum += (uint64_t)s->sum * s->planewidth[p] * s->planeheight[p]; | |
| 216 | 216 | } |
| 217 | 217 | } |
| 218 | 218 | |
| @@ -230,10 +230,10 @@ static int config_input(AVFilterLink *inlink) · 11 unmodified lines | ||
| 230 | 230 | |
| 231 | 231 | hsub = desc->log2_chroma_w; |
| 232 | 232 | vsub = desc->log2_chroma_h; |
| 233 | − s->height[1] = s->height[2] = AV_CEIL_RSHIFT(inlink->h, vsub); | |
| 234 | − s->height[0] = s->height[3] = inlink->h; | |
| 235 | − s->width[1] = s->width[2] = AV_CEIL_RSHIFT(inlink->w, hsub); | |
| 236 | − s->width[0] = s->width[3] = inlink->w; | |
| 233 | + s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, vsub); | |
| 234 | + s->planeheight[0] = s->planeheight[3] = inlink->h; | |
| 235 | + s->planewidth[1] = s->planewidth[2] = AV_CEIL_RSHIFT(inlink->w, hsub); | |
| 236 | + s->planewidth[0] = s->planewidth[3] = inlink->w; | |
| 237 | 237 | |
| 238 | 238 | s->depth = desc->comp[0].depth; |
| 239 | 239 | s->max = (1 << s->depth) - 1; |