Otherwise it is incorrectly set to 1.
Showing the changes to libavfilter/drawutils.c (1 of 1 file). Show all
Unified · Split
| @@ -180,10 +180,8 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags) · 179 unmodified lines | |||
| 180 | draw->format = format; | 180 | draw->format = format; |
| 181 | draw->nb_planes = nb_planes; | 181 | draw->nb_planes = nb_planes; |
| 182 | memcpy(draw->pixelstep, pixelstep, sizeof(draw->pixelstep)); | 182 | memcpy(draw->pixelstep, pixelstep, sizeof(draw->pixelstep)); |
| 183 | if (nb_planes >= 3 && !(desc->flags & AV_PIX_FMT_FLAG_RGB)) { | 183 | draw->hsub[1] = draw->hsub[2] = draw->hsub_max = desc->log2_chroma_w; |
| 184 | draw->hsub[1] = draw->hsub[2] = draw->hsub_max = desc->log2_chroma_w; | 184 | draw->vsub[1] = draw->vsub[2] = draw->vsub_max = desc->log2_chroma_h; |
| 185 | draw->vsub[1] = draw->vsub[2] = draw->vsub_max = desc->log2_chroma_h; | ||
| 186 | } | ||
| 187 | for (i = 0; i < ((desc->nb_components - 1) | 1); i++) | 185 | for (i = 0; i < ((desc->nb_components - 1) | 1); i++) |
| 188 | draw->comp_mask[desc->comp[i].plane] |= | 186 | draw->comp_mask[desc->comp[i].plane] |= |
| 189 | 1 << (desc->comp[i].offset_plus1 - 1); | 187 | 1 << (desc->comp[i].offset_plus1 - 1); |