[FFmpeg-devel] [PATCH][VAAPI][6/6] Add H.264 bitstream decoding (take 7)

Gwenole Beauchesne gbeauchesne
Fri Apr 17 10:05:30 CEST 2009


On Fri, 17 Apr 2009, Michael Niedermayer wrote:

>>>> +    pic_param->bit_depth_luma_minus8                            =
>>>> h->sps.bit_depth_luma   >= 8 ? h->sps.bit_depth_luma   - 8 : 0;
>>>> +    pic_param->bit_depth_chroma_minus8                          =
>>>> h->sps.bit_depth_chroma >= 8 ? h->sps.bit_depth_chroma - 8 : 0;
>>>
>>> it cant be smaller 8 (not counting overflows on broken streams)
>>
>> Mmmm, I think I had a case where it was needed, I will check again with my
>> samples tomorrow.

It works so far, so let's just stick to this newer patch.

>> +    assert(dpb->size < dpb->max_size);
>> +    vaapi_h264_fill_picture(&dpb->pics[dpb->size++], ff_pic, 0);
>
> i think this assert should be a hard check as its failure looks
> bad

OK, changed that function return value to int and propagated it to 
vaapi_h264_fill_ReferenceFrames().

>> +        *p_luma_weight_flag   = h->luma_weight_flag[list];
>> +        *p_chroma_weight_flag = h->chroma_weight_flag[list];
>
> and whats the sense of this double indirection?!

For code simplification but it seems to be a failure. ;-) So, I have now 
written a specific function, as in the new attachment. WDYT?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.hwaccel.vaapi.h264.7.patch
Type: text/x-diff
Size: 17023 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090417/0448e5e5/attachment.patch>



More information about the ffmpeg-devel mailing list