draw->format = format;
draw->nb_planes = nb_planes;
memcpy(draw->pixelstep, pixelstep, sizeof(draw->pixelstep));
- if (nb_planes >= 3 && !(desc->flags & AV_PIX_FMT_FLAG_RGB)) {
- draw->hsub[1] = draw->hsub[2] = draw->hsub_max = desc->log2_chroma_w;
- draw->vsub[1] = draw->vsub[2] = draw->vsub_max = desc->log2_chroma_h;
- }
+ draw->hsub[1] = draw->hsub[2] = draw->hsub_max = desc->log2_chroma_w;
+ draw->vsub[1] = draw->vsub[2] = draw->vsub_max = desc->log2_chroma_h;
for (i = 0; i < ((desc->nb_components - 1) | 1); i++)
draw->comp_mask[desc->comp[i].plane] |=
1 << (desc->comp[i].offset_plus1 - 1);