[FFmpeg-devel] [PATCH] Implement AVPixFmtDescriptor.name

Stefano Sabatini stefano.sabatini-lala
Wed Mar 18 20:13:30 CET 2009


On date Wednesday 2009-03-18 06:26:28 +0100, Michael Niedermayer encoded:
> On Tue, Mar 17, 2009 at 08:12:24PM +0100, Stefano Sabatini wrote:
> > On date Sunday 2009-03-15 20:30:37 +0100, Michael Niedermayer encoded:
> > > On Sun, Mar 15, 2009 at 08:10:02PM +0100, Stefano Sabatini wrote:
> > > > On date Sunday 2009-03-15 19:28:16 +0100, Michael Niedermayer encoded:
> > > > > On Sun, Mar 15, 2009 at 11:53:05AM +0100, Stefano Sabatini wrote:
> > > > > > On date Sunday 2009-03-15 02:04:26 +0100, Michael Niedermayer encoded:
> > > > > > > On Sun, Mar 15, 2009 at 12:50:15AM +0100, Stefano Sabatini wrote:
> > > > > > > > Hi,
> > > > > > > > 
> > > > > > > > as in subject.
> > > > > > > [...]
> > > > > > > > Index: ffmpeg/libavcodec/pixdesc.h
> > > > > > > > ===================================================================
> > > > > > > > --- ffmpeg.orig/libavcodec/pixdesc.h	2009-03-15 00:43:36.000000000 +0100
> > > > > > > > +++ ffmpeg/libavcodec/pixdesc.h	2009-03-15 00:43:53.000000000 +0100
> > > > > > > > @@ -41,6 +41,7 @@
> > > > > > > >   *       are stored not what these values represent.
> > > > > > > >   */
> > > > > > > >  typedef struct AVPixFmtDescriptor{
> > > > > > > > +    const char *name;
> > > > > > > 
> > > > > > > const char name[10];
> > > > > > 
> > > > > > I feel uncomfortable with just 10 chars, what about to raise that size
> > > > > > to 16 or more?
> > > > > 
> > > > > with 16 we can just keep the pointer
> > > > > 
> > > > > 
> > > > > > 
> > > > > > Then we won't need bump in case of some overly long pixfmts, and we
> > > > > > have *already* pixfmt names which can't be contained in 10 chars
> > > > > > ("vaapi_moco").
> > > > > 
> > > > > rename to vapi_mc
> > > > 
> > > > That way I fear we're going to have randomly abbreviated names,
> > > > without a clear correspondence with the PIX_FMT macro names.
> > > 
> > > shorten the PIX_FMT similarly ...
> > > and MC is well known abbreviation for motion compensation
> > 
> > OK, so what about:
> > 
> > 123456789
> > XVMC_MPEG2_MC
> > XVMC_MPEG2_IDCT
> > VDPAU_MPEG2
> > VDPAU_WMV3
> > VAAPI_IDCT
> > 
> > That would lead to even more obscure names, that would be way worse
> > than the few more bytes required by a complete name.
> 
> then lets keep const char *

Thanks.

Check the patch, regards.
-- 
FFmpeg = Faboulous & Fundamental Miracolous Peaceless Exploitable Gem
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixdescs-name.patch
Type: text/x-diff
Size: 3713 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090318/684398fe/attachment.patch>



More information about the ffmpeg-devel mailing list