[FFmpeg-devel] [PATCH] set bits_per_raw_sample when transcoding into wide colorspace

Michael Niedermayer michaelni
Tue Oct 6 01:14:06 CEST 2009


On Thu, Sep 10, 2009 at 10:04:59PM +0200, Lars T?uber wrote:
[...]
> Index: libavcodec/avcodec.h
> ===================================================================
> --- libavcodec/avcodec.h	(revision 19791)
> +++ libavcodec/avcodec.h	(working copy)
> @@ -2927,6 +2927,20 @@
>  void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
>  
>  /**
> + * Get the count of bits actually used in raw samples.
> + * The return value could be between n*8 and (n+1)*8.

what is n ?


> + *
> + * This value doesn't say anything about the kind the bits are packed together.
> + * Also it is possible that not all components have the same bit depth. In this
> + * cases the value returned by this function may be less than the bit depth used
> + * for one or more components. (e.g. RGB565)
> + *
> + * @param pix_fmt the given picture format
> + * @return count of bits used in raw samples
> + */
> +uint8_t avcodec_get_sample_depth(enum PixelFormat pix_fmt);

we have 
av_get_bits_per_sample_format()
and
av_get_bits_per_pixel()
so
int av_get_bits_per_pixel_component(enum PixelFormat pix_fmt, int component)
or something like that seems more consistent

but after thinking a little i think it would be beter to make
av_pix_fmt_descriptors public, ideally someone (not me as i wrote it) should
review this table and structs before its made public so we dont end up
with a abi/api breaking problem if theres som issue and the struct needs
changing

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

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20091006/8a76fc9c/attachment.pgp>



More information about the ffmpeg-devel mailing list