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

Michael Niedermayer michaelni
Tue Jan 5 02:47:02 CET 2010


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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- 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/20100105/2e08a536/attachment.pgp>



More information about the ffmpeg-devel mailing list