[FFmpeg-devel] [PATCH] set pix_fmt to YUVJ420P for h264 full range

Michael Niedermayer michaelni
Fri May 28 21:36:26 CEST 2010


On Fri, May 28, 2010 at 12:27:03PM -0700, Baptiste Coudurier wrote:
> Hi Laurent,
>
> On 05/28/2010 06:51 AM, Laurent Aimar wrote:
>> Hi,
>>
>> On Thu, May 27, 2010 at 07:05:10PM -0700, Baptiste Coudurier wrote:
>>> Index: libavcodec/h264.c
>>> ===================================================================
>>> --- libavcodec/h264.c	(revision 23288)
>>> +++ libavcodec/h264.c	(working copy)
>>> @@ -1834,6 +1834,10 @@
>>>           s->avctx->pix_fmt = s->avctx->get_format(s->avctx, 
>>> s->avctx->codec->pix_fmts);
>>>           s->avctx->hwaccel = ff_find_hwaccel(s->avctx->codec->id, 
>>> s->avctx->pix_fmt);
>>>
>>> +        if (s->avctx->pix_fmt == PIX_FMT_YUV420P&&
>>> +            s->avctx->color_range == AVCOL_RANGE_JPEG)
>>> +            s->avctx->pix_fmt = PIX_FMT_YUVJ420P;
>>> +
>>   As an avcodec user, I don't think it is ok to ignore what
>> avctx->get_format() have selected.
>> I think it might be better to changes the array given to
>> avctx->get_format() instead.
>
> I understand. Another approach taken.
>
> -- 
> Baptiste COUDURIER
> Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
> FFmpeg maintainer                                  http://www.ffmpeg.org

>  h264.c |   13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 6f5947e7daa997ade1cf41866ee7fe0e1ff1f63f  h264_full_range.patch

ok

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is not what we do, but why we do it that matters.
-------------- 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/20100528/f581c45c/attachment.pgp>



More information about the ffmpeg-devel mailing list