[FFmpeg-devel] [PATCH 2/2] Export fullrange flag and color information for h.264

David Conrad lessen42
Mon Jan 11 01:36:41 CET 2010


On Jan 4, 2010, at 8:47 PM, Michael Niedermayer wrote:

> On Mon, Jan 04, 2010 at 08:34:39PM -0500, David Conrad wrote:
>> On Jan 4, 2010, at 7:52 PM, Michael Niedermayer wrote:
>> 
>>> On Mon, Jan 04, 2010 at 07:12:10PM -0500, David Conrad wrote:
>>>> ---
>>>> libavcodec/h264.c |    8 ++++----
>>>> 1 files changed, 4 insertions(+), 4 deletions(-)
>>>> 
>>>> diff --git a/libavcodec/h264.c b/libavcodec/h264.c
>>>> index 898c176..5f2311c 100644
>>>> --- a/libavcodec/h264.c
>>>> +++ b/libavcodec/h264.c
>>>> @@ -7069,11 +7069,11 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps){
>>>> 
>>>>    if(get_bits1(&s->gb)){      /* video_signal_type_present_flag */
>>>>        get_bits(&s->gb, 3);    /* video_format */
>>>> -        get_bits1(&s->gb);      /* video_full_range_flag */
>>>> +        s->color_range = get_bits1(&s->gb)+1; /* video_full_range_flag */
>>>>        if(get_bits1(&s->gb)){  /* colour_description_present_flag */
>>>> -            get_bits(&s->gb, 8); /* colour_primaries */
>>>> -            get_bits(&s->gb, 8); /* transfer_characteristics */
>>>> -            get_bits(&s->gb, 8); /* matrix_coefficients */
>>>> +            s->avctx->color_primaries = get_bits(&s->gb, 8); /* colour_primaries */
>>>> +            s->avctx->color_trc = get_bits(&s->gb, 8); /* transfer_characteristics */
>>>> +            s->avctx->colorspace = get_bits(&s->gb, 8); /* matrix_coefficients */
>>>>        }
>>> 
>>> missing validity checks, vertical alignment and i think this uses them from
>>> an arbitrary sps while it should use the actually used sps
>> 
>> Should all be fixed now.
>> 
> 
>> commit c17a16f66ac6a07d41f65c66ef7560b669c5e391
>> Author: David Conrad <lessen42 at gmail.com>
>> Date:   Mon Jan 4 18:46:02 2010 -0500
>> 
>>    Export fullrange flag and color information for h.264
>> 
>> diff --git a/libavcodec/h264.c b/libavcodec/h264.c
>> index 898c176..6e3ef15 100644
>> --- a/libavcodec/h264.c
>> +++ b/libavcodec/h264.c
> 
> ok

Applied



More information about the ffmpeg-devel mailing list