mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-04 05:43:16 +00:00
yuv4mpeg: correctly handle chroma for odd luma sizes.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
parent
1029822a91
commit
cea8a0077f
@ -217,8 +217,8 @@ 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);
|
||||
width >>= h_chroma_shift;
|
||||
height >>= v_chroma_shift;
|
||||
width = FF_CEIL_RSHIFT(width, h_chroma_shift);
|
||||
height = FF_CEIL_RSHIFT(height, v_chroma_shift);
|
||||
|
||||
ptr1 = picture->data[1];
|
||||
ptr2 = picture->data[2];
|
||||
|
Loading…
Reference in New Issue
Block a user