summaryrefslogtreecommitdiff
path: root/libavfilter/drawutils.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-07-14 17:59:25 +0000
committerPaul B Mahol <onemda@gmail.com>2013-07-14 17:59:25 +0000
commitd5598c0963d8df3bbb5bbdec75049faaaf35eef0 (patch)
tree6273894167c88532c276b6e834992694ac9c9fd4 /libavfilter/drawutils.c
parented448efe619d142d5301d7b416a73873dd6562c1 (diff)
downloadffmpeg-d5598c0963d8df3bbb5bbdec75049faaaf35eef0.tar.gz
lavfi/drawutils: set subsampling for rgb too
Otherwise it is incorrectly set to 1. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/drawutils.c')
-rw-r--r--libavfilter/drawutils.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c
index 1952199dc9..a5064f8e7c 100644
--- a/libavfilter/drawutils.c
+++ b/libavfilter/drawutils.c
@@ -180,10 +180,8 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
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);