[FFmpeg-devel] [PATCH] set pix_fmt to YUVJ420P for h264 full range
Baptiste Coudurier
baptiste.coudurier
Sat May 29 01:15:49 CEST 2010
On 05/28/2010 12:36 PM, Michael Niedermayer wrote:
> 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
Applied.
--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel
mailing list