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

Baptiste Coudurier baptiste.coudurier
Fri May 28 21:27:03 CEST 2010


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264_full_range.patch
Type: text/x-patch
Size: 1628 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100528/161a3765/attachment.bin>



More information about the ffmpeg-devel mailing list