[FFmpeg-devel] [PATCH][7/8] Add VA API accelerated H.264 decoding (take 4)

Gwenole Beauchesne gbeauchesne
Fri Feb 6 16:35:02 CET 2009


Hi,

On Thu, 5 Feb 2009, Stephen Warren wrote:

> I note you put the VA API call outside the big if block immediately below
> that patch, where the VDPAU call is. What's the reasoning behind that?

There is none, it was an error. Thanks.

>> +
>> +            /* VA API only supports Baseline, Main and High profiles */
>> +            if (err == 0 && IS_VAAPI_ENABLED(s))
>> +                av_log(h->s.avctx, AV_LOG_ERROR, "Invalid nal_unit_type for VA API acceleration\n");
>>              break;
>>          case NAL_DPB:
>>              init_get_bits(&hx->intra_gb, ptr, bit_length);
>
> Does it make sense to duplicate this check for DPB and DPC? I suppose there
> shouldn't be a DPB/DPC without a DPA first, but suppose it gets dropped due
> to bitstream/parse errors?

Yes, FFmpeg also assumes a DPA was seen if we reached a DPB or a DPB. i.e. 
the NAL_DPA case sets H264Context::data_partitioning to 1. But your point 
holds, we probably should move up the check into another switch() and 
error out with a more explicit message, e.g. "XXX does not support data 
partitioning"?

I will let FFmpeg maintainers comment on this, I have no specific opinion.

BTW, Here is a new patch. Changes include:
- Improve coding style wrt. existing code.
- Move down call to ff_vaapi_h264_decode_slice(). The decode_slice() path 
is now similar to both VDPAU and pure SW implementation.
- Drop CODEC_CAP_DRAW_HORIZ_BAND from VA API codec caps.

Regards,
Gwenole.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 107_vaapi_h264.patch
Type: text/x-diff
Size: 31628 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090206/932bfff3/attachment.patch>



More information about the ffmpeg-devel mailing list