Otherwise it is incorrectly set to 1.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
... | ... |
@@ -180,10 +180,8 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags) |
180 | 180 |
draw->format = format; |
181 | 181 |
draw->nb_planes = nb_planes; |
182 | 182 |
memcpy(draw->pixelstep, pixelstep, sizeof(draw->pixelstep)); |
183 |
- if (nb_planes >= 3 && !(desc->flags & AV_PIX_FMT_FLAG_RGB)) { |
|
184 |
- draw->hsub[1] = draw->hsub[2] = draw->hsub_max = desc->log2_chroma_w; |
|
185 |
- draw->vsub[1] = draw->vsub[2] = draw->vsub_max = desc->log2_chroma_h; |
|
186 |
- } |
|
183 |
+ 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; |
|
187 | 185 |
for (i = 0; i < ((desc->nb_components - 1) | 1); i++) |
188 | 186 |
draw->comp_mask[desc->comp[i].plane] |= |
189 | 187 |
1 << (desc->comp[i].offset_plus1 - 1); |