[FFmpeg-devel] [PATCH] deprecate SAMPLE_FMT_S24
Michael Niedermayer
michaelni
Sun Aug 17 05:18:15 CEST 2008
On Sun, Aug 17, 2008 at 12:47:20PM +1000, Peter Ross wrote:
> This patch flags SAMPLE_FMT_S24 as deprecated. Ideally I'd like to go a step
> further and:
>
> * remove the enum completely. However this creates a gap in the SAMPLE_FMT_xxx enum
> continuum, and will involve revising the format string & enum lookup code to
> consider the void; OR,
>
> * replace the enum value with another format (SAMPLE_FMT_DBL perhaps...), and then
> optionally use a macro to redirect SAMPLE_FMT_S24 to SAMPLE_FMT_S32.
>
> -- Peter
> (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
> Index: libavcodec/avcodec.h
> ===================================================================
> --- libavcodec/avcodec.h (revision 14785)
> +++ libavcodec/avcodec.h (working copy)
> @@ -345,7 +345,7 @@
> SAMPLE_FMT_NONE = -1,
> SAMPLE_FMT_U8, ///< unsigned 8 bits
> SAMPLE_FMT_S16, ///< signed 16 bits
> - SAMPLE_FMT_S24, ///< signed 24 bits
> + SAMPLE_FMT_S24, ///< signed 24 bits @deprecated Deprecated in favor of SAMPLE_FMT_S32
> SAMPLE_FMT_S32, ///< signed 32 bits
> SAMPLE_FMT_FLT, ///< float
> SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if dynamically linking to libavcodec
ok
> @@ -1415,6 +1415,7 @@
> /**
> * bits per sample/pixel from the demuxer (needed for huffyuv).
> * - encoding: Set by libavcodec.
> + * For audio codecs, set by user when sample_fmt is SAMPLE_FMT_S32.
> * - decoding: Set by user.
> */
> int bits_per_sample;
iam too tired but my gut feeling says this is not so good as it somehow
messes up input vs output semantics. (that is IIRC this field really describes
the coded bitstream not the decoded output or inpt in case of a encoder.
also set by libavcodec and set by user is a recipe for problems
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080817/52450546/attachment.pgp>
More information about the ffmpeg-devel
mailing list