[FFmpeg-devel] [PATCH] HWAccel infrastructure (take 2)

Gwenole Beauchesne gbeauchesne
Wed Feb 18 11:30:56 CET 2009


Here is a new round. BTW, I finally changed my mind and created an 
avcodec_internal.h header instead. My initial rationale for an hwaccel.h 
was to also move the actual AVHWAccel definition into there. But this 
doesn't make sense so only a very few functions were moved instead. So, it 
turned out having implementations in hwaccel_*.c was not really meaningful 
since the actual data structures wouldn't be defined in the hwaccel.h.

On Tue, 17 Feb 2009, Michael Niedermayer wrote:

>> +        if (c->type == codec->type && c->id == codec->id)
>> +            pix_fmts[n_pix_fmts++] = c->pix_fmt;
>> +    }
>> +    if (n_pix_fmts == 0)
>> +        return NULL;
>> +    pix_fmts[n_pix_fmts] = PIX_FMT_NONE;
>> +
>> +    if ((pix_fmt = avctx->get_format(avctx, pix_fmts)) != PIX_FMT_NONE)
>> +        return av_find_hwaccel_codec_by_pix_fmt(pix_fmt);
> i dont see why a PIX_FMT_NONE check is needed here

Actually, I wanted ::get_format() to return PIX_FMT_NONE if no HW 
acceleration is wanted.

New patch attached, changes:
- Documentation improvements
- Rename AVHWAccelCodec to AVHWAccel
- Rename and privatize a few helper functions
- Drop assert()s from av_register_hwaccel()
- Fix indentation in mpeg12.c
- Move down AVHWaccel vtable

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.hwaccel.2.patch
Type: text/x-diff
Size: 25778 bytes
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090218/621a79d6/attachment.patch>

More information about the ffmpeg-devel mailing list