diff options
author | Clément Bœsch <ubitux@gmail.com> | 2013-05-09 17:59:38 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2013-05-10 17:20:06 +0200 |
commit | 50e66726a237e07f6557eaca1da2e9eb18ee7fda (patch) | |
tree | eb080502558818b6e623309776e254d4be88beed /libavfilter/vf_blend.c | |
parent | d751a2526f9be0e8aa72cb2ebf9b8686c8888e89 (diff) | |
download | ffmpeg-streaming-50e66726a237e07f6557eaca1da2e9eb18ee7fda.zip ffmpeg-streaming-50e66726a237e07f6557eaca1da2e9eb18ee7fda.tar.gz |
lavfi: use ceil right shift for chroma width/height.
This should fix several issues with odd dimensions inputs.
lut, vflip, pad and crop video filters also need to be checked for such
issues. It's possible sws is also affected.
Diffstat (limited to 'libavfilter/vf_blend.c')
-rw-r--r-- | libavfilter/vf_blend.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c index b4c62ba..a0022cd 100644 --- a/libavfilter/vf_blend.c +++ b/libavfilter/vf_blend.c @@ -372,8 +372,8 @@ static void blend_frame(AVFilterContext *ctx, for (plane = 0; plane < b->nb_planes; plane++) { int hsub = plane == 1 || plane == 2 ? b->hsub : 0; int vsub = plane == 1 || plane == 2 ? b->vsub : 0; - int outw = dst_buf->width >> hsub; - int outh = dst_buf->height >> vsub; + int outw = FF_CEIL_RSHIFT(dst_buf->width, hsub); + int outh = FF_CEIL_RSHIFT(dst_buf->height, vsub); uint8_t *dst = dst_buf->data[plane]; uint8_t *top = top_buf->data[plane]; uint8_t *bottom = bottom_buf->data[plane]; |