[FFmpeg-devel] [PATCH] Bit depth for SampleFormat

Michael Niedermayer michaelni
Fri Aug 10 12:09:01 CEST 2007


Hi

On Thu, Aug 09, 2007 at 09:55:30PM -0400, David Conrad wrote:
> Hi,
>
> The attached adds a convenience function to get the bit depth of a given 
> SampleFormat.

[...]
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index 80eb3e3..87c9da1 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -2706,6 +2706,14 @@ char av_get_pict_type_char(int pict_type);
>   */
>  int av_get_bits_per_sample(enum CodecID codec_id);
>  
> +/**
> + * Returns sample format bits per sample.
> + *
> + * @param[in] sample_fmt the sample format
> + * @return Number of bits per sample or zero if unknown for the given sample format.
> + */
> +int av_get_bits_per_sample_format(enum SampleFormat sample_fmt);
> +
>  /* frame parsing */
>  typedef struct AVCodecParserContext {
>      void *priv_data;

LIBAVCODEC_VERSION minor version bump missing

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- 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/20070810/33a7df68/attachment.pgp>



More information about the ffmpeg-devel mailing list