[FFmpeg-devel] [PATCH 2/2] Export fullrange flag and color information for h.264
David Conrad
lessen42
Tue Jan 5 02:34:39 CET 2010
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.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg-color.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100104/46dfae17/attachment.txt>
More information about the ffmpeg-devel
mailing list