[FFmpeg-devel] [PATCH] Convert XvMC to hwaccel v2

Ivan Kalvachev ikalvachev at gmail.com
Thu Dec 19 12:06:31 CET 2013

On 12/19/13, Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> On 19.12.2013, at 03:11, Ivan Kalvachev <ikalvachev at gmail.com> wrote:
>> In addition to the changes in the previous patch:
>> - this one doesn't use the define CONFIG_MPEG_XVMC_DECODER, as the
>> decoder is no longer needed and will be removed. The change involves
>> makefile too.
>> - leave FF_API_XVMC around the CODEC_CAP_HWACCEL, it is not really
>> needed/used.
>> - move the newly introduces  decode_mb() to the end of AVHWAccel struct .
>> - write some explanation for pack_pblock variable.
>> Now, this is the last chance for you to review the changes before they
>> hit main repository and paint FATE in red. ;)
> I don't mind (and didn't get around to actually try to review), but I am
> kind of wondering why you did it.
> I don't think the hwaccel API is really significantly better an any way,
> just keeping the old code would have worked from my side...

Indeed, this was the first thing I did, removed some of the
FF_API_XVMC, checked if it works without the mpeg12_xvmc codec.

However I wanted to minimize the duplicate code and special cases for
XvMC in the code.
This included removing "avctx->xvmc_acceleration" (instead of just
reintroducing it at the end of avctx after the api change).
At first I did replace all the xvmc_accelerator checks with
avctx->pix_fmt == AV_PIX_FMT_XVMC, but I didn't like it. There were
still few places where xvmc and hwaccel code were next to each other,
doing the same thing on their own.
So I tried to see how much effort would converting to hwaccel would be
and it took just 15 minutes.

And yes, you are correct, hwaccel is nothing more than bare-bone skeleton.

Best Regards

More information about the ffmpeg-devel mailing list