Merge commit 'e80307140f736f593ee643affa015333d7c5e27f'
* commit 'e80307140f736f593ee643affa015333d7c5e27f': yuv4mpegenc: Use AV_CEIL_RSHIFT where needed Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
commit
56475e885b
@ -209,6 +209,7 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
// Adjust for smaller Cb and Cr planes
|
// Adjust for smaller Cb and Cr planes
|
||||||
av_pix_fmt_get_chroma_sub_sample(st->codec->pix_fmt, &h_chroma_shift,
|
av_pix_fmt_get_chroma_sub_sample(st->codec->pix_fmt, &h_chroma_shift,
|
||||||
&v_chroma_shift);
|
&v_chroma_shift);
|
||||||
|
// Shift right, rounding up
|
||||||
width = AV_CEIL_RSHIFT(width, h_chroma_shift);
|
width = AV_CEIL_RSHIFT(width, h_chroma_shift);
|
||||||
height = AV_CEIL_RSHIFT(height, v_chroma_shift);
|
height = AV_CEIL_RSHIFT(height, v_chroma_shift);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user