[FFmpeg-devel] [PATCH] Use pixdesc for avcodec_get_pix_fmt_name()

Stefano Sabatini stefano.sabatini-lala
Wed Nov 25 01:49:45 CET 2009


On date Monday 2009-11-09 15:41:02 +0100, Michael Niedermayer encoded:
> On Sat, Nov 07, 2009 at 05:28:05PM +0100, Stefano Sabatini wrote:
> > Hi,
> > 
> > this requires anyway the pixdesc.c compilation.
> > 
> > Also the names in pixdesc are defined consistently using the enum
> > name, while currently pix_fmt_info uses different names.
> > 
> > The differences are:
> > 
> > pix_fmt_info -> av_pix_fmt_descriptors
> > ======================================
> > monow        -> monowhite
> > monob        -> monoblack
> > xvmcmc       -> xvmc_mpeg2_mc
> > xvmcidct     -> xvmc_mpeg2_idct
> > 
> > I'm not very fond of arbitrary name contractions so I'd prefer to
> > keep the pixdesc variants and use some backward-compatible mechanism
> > and drop the old variant at the next major bump.
> 
> your patch breaks backward-compatibility

Updated (also I forgot gray -> gray8).

The test I attached for reference issues this:
pix_fmt_info name:gray != av_pix_fmt_descriptors name:gray8
pix_fmt_info name:monow != av_pix_fmt_descriptors name:monowhite
pix_fmt_info name:monob != av_pix_fmt_descriptors name:monoblack
pix_fmt_info name:xvmcmc != av_pix_fmt_descriptors name:xvmc_mpeg2_mc
pix_fmt_info name:xvmcidct != av_pix_fmt_descriptors name:xvmc_mpeg2_idct

I also suggest to deprecate avcodec_get_pix_fmt_name().

Regards.
-- 
FFmpeg = Fiendish and Freak Multipurpose Power Excellent Generator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-av-pix-desc-for-pixname.patch
Type: text/x-diff
Size: 1042 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091125/b37a59b0/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-pixdesc-test-name.patch
Type: text/x-diff
Size: 816 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091125/b37a59b0/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-name-from-pix-fmt-info.patch
Type: text/x-diff
Size: 14367 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091125/b37a59b0/attachment-0002.patch>



More information about the ffmpeg-devel mailing list