[FFmpeg-devel] [RFC] Pixel format descriptors and hw-accelerated pixel formats

Stefano Sabatini stefano.sabatini-lala
Sun Oct 25 18:41:42 CET 2009


On date Sunday 2009-05-24 02:56:05 +0200, Michael Niedermayer encoded:
> On Sun, May 24, 2009 at 01:23:48AM +0200, Stefano Sabatini wrote:
> > On date Saturday 2009-04-25 20:32:22 +0200, Stefano Sabatini encoded:
> > > Hi,
> > > 
> > > now that we have all the pixdescs for the non HW-accelerated pixdescs
> > > I think it's time to think about the HW-accelerated ones, then we can
> > > get rid of the PixFmtInfo stuff.
> > > 
> > > I have no idea what's the better way to deal with them, even if having
> > > a pixdesc for them is a good idea at all, so suggestions are welcome.
> > 
> > Ping.
> 
> Neither do i have an idea.
> 
> Maybe if you describe a problem one could think of a solution the other
> way around is hard.
> Or if there is no problem maybe it does not need a solution and we could
> spend our time on actual problems?

I'm trying to understand what the HW-stuff is about.

Now I see for example I can select in a filterchain:
-vfilters "format=xvmcmc"

For example I got this:
./ffplay in.avi -loglevel debug -vfilters "format=xvmcmc"
[...]
[format @ 0x8da9610]auto-inserting filter 'scale'q=    0B    
[ffplay_output @ 0x8d9b2a0]auto-inserting filter 'scale'
swScaler: xvmc_mpeg2_mc is not supported as output pixel format

This doesn't seem to make much sense, as well as it doesn't look to
make much sense to have in an hwaccel all the informations about plane,
step, offset, shift.

So my question is:
1) does it makes sense to fill the pixdesc plane, step, chroma_w/h,
and components of an AVPixFmtDescriptor of an HW accelerated pixfmt?

I see in imgconvert the x/y chroma are used at least for VAAPI
formats.

So my idea is to add another flag and use that in the definition of
the HW pixfmts descriptions, see the attached patch with only the XVMC
definitions filled.

Apart from this, what is still missing pixdesc to be enabled in SVN?

BTW I also wonder if it would make more sense into moving that to
libavutil, for example lavfi now depends on lavc
(avcodec_get_pix_fmt_name, avcodec_get_chroma_sub_sample), having the
same functionality in lavu would drop that dependancy.

Regards.
-- 
FFmpeg = Faboulous and Fundamentalist Mind-dumbing Peaceless Enlightening Goblin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixdesc-hwaccel.patch
Type: text/x-diff
Size: 1143 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091025/d84ff655/attachment.patch>



More information about the ffmpeg-devel mailing list