[FFmpeg-devel] [PATCH] Set generic yuv420 sampling in yuv4mpeg by default
Michael Niedermayer
michaelni
Sun May 10 05:06:12 CEST 2009
On Sat, May 09, 2009 at 08:05:34PM -0400, David Conrad wrote:
> On May 9, 2009, at 6:35 AM, Michael Niedermayer wrote:
>
>> On Sat, May 09, 2009 at 05:54:54AM -0400, David Conrad wrote:
>>> On May 8, 2009, at 9:49 AM, Michael Niedermayer wrote:
>>>
>>>> anyway Thusneldas dump_psnr is broken if it does care about these
>>>> values.
>>>> One cannot compare 2 raw images if chroma sample locations dont match
>>>> i guess theres no play that is too foul for xiphs propaganda machinery
>>>>
>>>> the patch is fine but its not completly setting that field correctly
>>>> either
>>>
>>> I'd rather set the values as correctly as possible and leave dump_psnr to
>>> be fixed to not automatically munge chroma silently.
>>
>> [...]
>>
>>> commit cecdc96d42fbc97d0b3f76b9a3ade04004b63fd6
>>> Author: David Conrad <lessen42 at gmail.com>
>>> Date: Sat May 9 05:51:01 2009 -0400
>>>
>>> Use chroma_sample_location in reading/writing yuv4mpeg
>>>
>>> diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
>>> index 3fd7927..6b563fc 100644
>>> --- a/libavformat/yuv4mpeg.c
>>> +++ b/libavformat/yuv4mpeg.c
>>> @@ -62,7 +62,9 @@ static int yuv4_generate_header(AVFormatContext *s,
>>> char* buf)
>>> colorspace = " C411 XYSCSS=411";
>>> break;
>>> case PIX_FMT_YUV420P:
>>> - colorspace = (st->codec->codec_id == CODEC_ID_DVVIDEO)?"
>>> C420paldv XYSCSS=420PALDV":" C420mpeg2 XYSCSS=420MPEG2";
>>> + colorspace = (st->codec->chroma_sample_location == 3)?"
>>> C420paldv XYSCSS=420PALDV":
>>> + (st->codec->chroma_sample_location == 1)?"
>>> C420mpeg2 XYSCSS=420MPEG2":
>>> + " C420jpeg XYSCSS=420JPEG";
>>
>> i think an enum would be nicer than these litteral numbers
>
>
> Fixed in the previous patch as well.
>
> commit 76b168260e90c42d4e7359c865a13889821d28a3
> Author: David Conrad <lessen42 at gmail.com>
> Date: Sat May 9 19:57:25 2009 -0400
>
> Use chroma_sample_location in reading/writing yuv4mpeg
ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090510/0b5db2d5/attachment.pgp>
More information about the ffmpeg-devel
mailing list