[FFmpeg-devel] [PATCH v2] yuv4mpeg: correctly handle chroma for odd luma sizes.
Michael Niedermayer
michaelni at gmx.at
Tue Jun 25 01:24:08 CEST 2013
On Mon, Jun 24, 2013 at 07:15:33PM -0400, Derek Buitenhuis wrote:
> From: "Ronald S. Bultje" <rsbultje at gmail.com>
>
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
> libavformat/yuv4mpeg.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
> index bf48230..a6d8346 100644
> --- a/libavformat/yuv4mpeg.c
> +++ b/libavformat/yuv4mpeg.c
> @@ -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);
ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130625/3d1a23f0/attachment.asc>
More information about the ffmpeg-devel
mailing list