[FFmpeg-devel] [PATCH][H264] Record extra fields for VA API support (take 2)

Michael Niedermayer michaelni
Sat Jan 31 01:52:16 CET 2009


On Fri, Jan 30, 2009 at 11:48:15PM +0100, Gwenol? Beauchesne wrote:
> Hi,
>
> Le 30 janv. 09 ? 17:20, Michael Niedermayer a ?crit :
>
>>> @@ -493,6 +496,9 @@ typedef struct H264Context{
>>>     SEI_PicStructType sei_pic_struct;
>>>
>>>     int is_complex;
>>> +
>>> +    int luma_weight_flag[2];   ///< 7.4.3.2 luma_weight_lX_flag
>>
>> unused
>
> Crap, missing hunks. Here is the correct patch. ;-)
>

> diff --git a/libavcodec/h264.c b/libavcodec/h264.c
> index 6885a6b..d9fc93e 100644
> --- a/libavcodec/h264.c
> +++ b/libavcodec/h264.c
> @@ -2996,11 +2996,11 @@ static int pred_weight_table(H264Context *h){
>      chroma_def = 1<<h->chroma_log2_weight_denom;
>  
>      for(list=0; list<2; list++){
> +        h->luma_weight_flag[list] = 0;
> +        h->chroma_weight_flag[list] = 0;
>          for(i=0; i<h->ref_count[list]; i++){
> -            int luma_weight_flag, chroma_weight_flag;
> -
> -            luma_weight_flag= get_bits1(&s->gb);
> -            if(luma_weight_flag){
> +            h->luma_weight_flag[list]= get_bits1(&s->gb);
> +            if(h->luma_weight_flag[list]){
>                  h->luma_weight[list][i]= get_se_golomb(&s->gb);
>                  h->luma_offset[list][i]= get_se_golomb(&s->gb);
>                  if(   h->luma_weight[list][i] != luma_def

what about setting these flags like use_weight, that is when the
actual weights are non default?

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

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- 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/20090131/18667bea/attachment.pgp>



More information about the ffmpeg-devel mailing list