[FFmpeg-devel] [PATCH] Port VDPAU to AVHWAccel infrastructure
Gwenole Beauchesne
gbeauchesne
Mon Jan 4 11:28:47 CET 2010
Hi,
On Sun, 3 Jan 2010, Michael Niedermayer wrote:
> [...]
>> --- a/libavcodec/avcodec.h
>> +++ b/libavcodec/avcodec.h
>> @@ -613,10 +613,6 @@ typedef struct RcOverride{
>> */
>> #define CODEC_CAP_SMALL_LAST_FRAME 0x0040
>> /**
>> - * Codec can export data for HW decoding (VDPAU).
>> - */
>> -#define CODEC_CAP_HWACCEL_VDPAU 0x0080
>> -/**
>> * Codec can output multiple frames per AVPacket
>> */
>
> breaks API, this must be delayed until the next major bump with #if ...
Yes, but porting to hwaccel also breaks the API. Anyway, I dropped
this part from the patch.
> [...]
>> +static int vdpau_common_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
>> +{
>> + MpegEncContext * const s = avctx->priv_data;
>
>> + struct vdpau_render_state *render;
>> +
>> + render = (struct vdpau_render_state *)s->current_picture_ptr->data[3];
>
> can be merged
Done but this was the existing practise.
> [...]
>> - render->info.h264.is_reference = (s->current_picture_ptr->reference & 3) ? VDP_TRUE : VDP_FALSE;
>> + /* fill VdpPictureInfoH264 struct */
>> + render->info.h264.is_reference = h->nal_ref_idc != 0;
>
> why?
At the point AVHWAccel.start_frame() is called, CurrPic->reference is not
initialized yet so this information will be wrong.
> [...]
> also i assume this is tested and works?
This is tested with the usual clips I have. NVIDIA probably had more.
New patch attached, reduced by 100 lines.
Regards,
Gwenole.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.hwaccel.vdpau.2.patch
Type: text/x-diff
Size: 30505 bytes
Desc:
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100104/9a7efa6c/attachment.patch>
More information about the ffmpeg-devel
mailing list