[FFmpeg-devel] [PATCH] WMA Voice decoder

Reimar Döffinger Reimar.Doeffinger
Thu Feb 11 20:23:03 CET 2010


On Wed, Feb 10, 2010 at 10:34:16PM -0500, Ronald S. Bultje wrote:
> +static const struct frame_type_desc {
> +    unsigned int n_blocks:4;     ///< amount of blocks per frame (each block
> +                                 ///< (contains 160/#n_blocks samples)
> +    unsigned int log_n_blocks:2; ///< log2(#n_blocks)
> +    unsigned int acb_type:2;     ///< Adaptive codebook type (ACB_TYPE_*)
> +    unsigned int fcb_type:4;     ///< Fixed codebook type (FCB_TYPE_*)
> +    unsigned int dbl_pulses:4;   ///< how many pulse vectors have pulse pairs
> +                                 ///< (rather than just one single pulse)
> +                                 ///< only if #fcb_type == #FCB_TYPE_EXC_PULSES
> +    uint16_t frame_size;         ///< the amount of bits that make up the block
> +                                 ///< data (per frame)

Just FYI this will take up 8 bytes, 4 bytes for the bit field and another
two for padding for alignment.
So to actually gain something you would have to use uint16_t for the
bitfield.



More information about the ffmpeg-devel mailing list