summaryrefslogtreecommitdiff
path: root/libavformat/yuv4mpegenc.c
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-02-16 16:57:32 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-02-16 16:57:32 +0000
commit56475e885ba748e984fb46030f44850348c83fff (patch)
treec2bc06ad239da9be808bf59efb300615a5422e63 /libavformat/yuv4mpegenc.c
parent73bd20c4d238026937ff07713c035d3cfe66b151 (diff)
parente80307140f736f593ee643affa015333d7c5e27f (diff)
downloadffmpeg-56475e885ba748e984fb46030f44850348c83fff.tar.gz
Merge commit 'e80307140f736f593ee643affa015333d7c5e27f'
* commit 'e80307140f736f593ee643affa015333d7c5e27f': yuv4mpegenc: Use AV_CEIL_RSHIFT where needed Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/yuv4mpegenc.c')
-rw-r--r--libavformat/yuv4mpegenc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/yuv4mpegenc.c b/libavformat/yuv4mpegenc.c
index 6120c7e520..23d2eda45c 100644
--- a/libavformat/yuv4mpegenc.c
+++ b/libavformat/yuv4mpegenc.c
@@ -209,6 +209,7 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
// Adjust for smaller Cb and Cr planes
av_pix_fmt_get_chroma_sub_sample(st->codec->pix_fmt, &h_chroma_shift,
&v_chroma_shift);
+ // Shift right, rounding up
width = AV_CEIL_RSHIFT(width, h_chroma_shift);
height = AV_CEIL_RSHIFT(height, v_chroma_shift);