aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2016-01-21 17:47:03 -0500
committerVittorio Giovara <vittorio.giovara@gmail.com>2016-01-25 12:02:44 -0500
commite80307140f736f593ee643affa015333d7c5e27f (patch)
tree7b7092aec45e03276b8414aaef64416d604b0a95 /libavformat
parent6695f178a5929eab91d3da7e9023999f1774bd0e (diff)
downloadffmpeg-e80307140f736f593ee643affa015333d7c5e27f.tar.gz
yuv4mpegenc: Use AV_CEIL_RSHIFT where needed
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/yuv4mpegenc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpegenc.c
index ef1e775341..83f79d2ce3 100644
--- a/libavformat/yuv4mpegenc.c
+++ b/libavformat/yuv4mpegenc.c
@@ -129,8 +129,8 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
av_pix_fmt_get_chroma_sub_sample(st->codec->pix_fmt, &h_chroma_shift,
&v_chroma_shift);
// Shift right, rounding up
- width = -(-width >> h_chroma_shift);
- height = -(-height >> v_chroma_shift);
+ width = AV_CEIL_RSHIFT(width, h_chroma_shift);
+ height = AV_CEIL_RSHIFT(height, v_chroma_shift);
ptr1 = frame->data[1];
ptr2 = frame->data[2];