[FFmpeg-soc] [soc]: r4026 - wmapro/wma3.h
faust3
subversion at mplayerhq.hu
Sun Feb 8 20:44:31 CET 2009
Author: faust3
Date: Sun Feb 8 20:44:30 2009
New Revision: 4026
Log:
align comments
Modified:
wmapro/wma3.h
Modified: wmapro/wma3.h
==============================================================================
--- wmapro/wma3.h Sun Feb 8 20:20:04 2009 (r4025)
+++ wmapro/wma3.h Sun Feb 8 20:44:30 2009 (r4026)
@@ -31,39 +31,40 @@
#include "wma3data.h"
#include "dsputil.h"
-#define MAX_CHANNELS 8 //< max number of handled channels
-#define MAX_SUBFRAMES 32 //< max number of subframes per channel
-#define MAX_BANDS 29 //< max number of scale factor bands
+/* current decoder limitations */
+#define MAX_CHANNELS 8 //< max number of handled channels
+#define MAX_SUBFRAMES 32 //< max number of subframes per channel
+#define MAX_BANDS 29 //< max number of scale factor bands
/* size of block defines taken from wma.h */
-#define BLOCK_MIN_BITS 7
-#define BLOCK_MAX_BITS 12
-#define BLOCK_MAX_SIZE (1 << BLOCK_MAX_BITS)
-#define BLOCK_NB_SIZES (BLOCK_MAX_BITS - BLOCK_MIN_BITS + 1)
+#define BLOCK_MIN_BITS 7 //< log2 of min block size
+#define BLOCK_MAX_BITS 12 //< log2 of max block size
+#define BLOCK_MAX_SIZE (1 << BLOCK_MAX_BITS) //< maximum block size
+#define BLOCK_NB_SIZES (BLOCK_MAX_BITS - BLOCK_MIN_BITS + 1) //< possible block sizes
/**
* @brief decoder context for a single channel
*/
typedef struct {
- int prev_block_len; //< length of the previous block
- uint8_t transmit_coefs; //< transmit coefficients
- uint8_t num_subframes; //< number of subframes
- uint16_t subframe_len[MAX_SUBFRAMES]; //< subframe length in samples
- uint16_t subframe_offset[MAX_SUBFRAMES]; //< subframe position
- uint8_t cur_subframe; //< subframe index
- uint16_t channel_len; //< channel length in samples
- uint16_t decoded_samples; //< already processed samples
- uint8_t grouped; //< channel is part of a group
+ int prev_block_len; //< length of the previous block
+ uint8_t transmit_coefs; //< transmit coefficients
+ uint8_t num_subframes; //< number of subframes
+ uint16_t subframe_len[MAX_SUBFRAMES]; //< subframe length in samples
+ uint16_t subframe_offset[MAX_SUBFRAMES]; //< subframe position
+ uint8_t cur_subframe; //< subframe index
+ uint16_t channel_len; //< channel length in samples
+ uint16_t decoded_samples; //< already processed samples
+ uint8_t grouped; //< channel is part of a group
int quant_step_modifier;
- int transmit_sf; //< transmit scale factors
- int reuse_sf; //< share sfs between subframes
- int scale_factor_step; //< scaling step
- int max_scale_factor; //< maximum scale factor
- int scale_factors[MAX_BANDS]; //< scale factor values
- int resampled_scale_factors[MAX_BANDS]; //< scale factors from a previous block
- int scale_factor_block_len; //< sf reference block length
- float* coeffs; //< pointer to the decode buffer
- DECLARE_ALIGNED_16(float, out[2*BLOCK_MAX_SIZE]); //< output buffer
+ int transmit_sf; //< transmit scale factors
+ int reuse_sf; //< share sfs between subframes
+ int scale_factor_step; //< scaling step
+ int max_scale_factor; //< maximum scale factor
+ int scale_factors[MAX_BANDS]; //< scale factor values
+ int resampled_scale_factors[MAX_BANDS]; //< scale factors from a previous block
+ int scale_factor_block_len; //< sf reference block length
+ float* coeffs; //< pointer to the decode buffer
+ DECLARE_ALIGNED_16(float, out[2*BLOCK_MAX_SIZE]); //< output buffer
} WMA3ChannelCtx;
/**
@@ -71,11 +72,11 @@ typedef struct {
*/
typedef struct {
int nb_channels;
- int no_rotation; //< controls the type of the transform
- int transform; //< also controls the type of the transform
- char transform_band[MAX_BANDS]; //< controls if the transform is enabled for a certain band
+ int no_rotation; //< controls the type of the transform
+ int transform; //< also controls the type of the transform
+ char transform_band[MAX_BANDS]; //< controls if the transform is enabled for a certain band
char rotation_offset[MAX_CHANNELS * MAX_CHANNELS];
- char positive[MAX_CHANNELS * MAX_CHANNELS]; //< FIXME: What are these numbers used for?
+ char positive[MAX_CHANNELS * MAX_CHANNELS]; //< FIXME: What are these numbers used for?
float decorrelation_matrix[MAX_CHANNELS*MAX_CHANNELS];
char use_channel[MAX_CHANNELS];
} WMA3ChannelGroup;
@@ -85,74 +86,74 @@ typedef struct {
*/
typedef struct WMA3DecodeContext {
/** generic decoder variables */
- AVCodecContext* avctx; //< codec context for av_log
+ AVCodecContext* avctx; //< codec context for av_log
DSPContext dsp;
- MDCTContext mdct_ctx[BLOCK_NB_SIZES]; //< MDCT context per block size
+ MDCTContext mdct_ctx[BLOCK_NB_SIZES]; //< MDCT context per block size
DECLARE_ALIGNED_16(float, tmp[BLOCK_MAX_SIZE]); //< imdct working buffer
- float* windows[BLOCK_NB_SIZES]; //< window per block size
- VLC sf_vlc; //< scale factor DPCM vlc
- VLC sf_rl_vlc; //< scale factor run length vlc
- VLC vec4_vlc; //< 4 coefficients per symbol
- VLC vec2_vlc; //< 2 coefficients per symbol
- VLC vec1_vlc; //< 1 coefficient per symbol
- VLC coef_vlc[2]; //< coefficient run length vlc codes
- int coef_max[2]; //< max length of vlc codes
+ float* windows[BLOCK_NB_SIZES]; //< window per block size
+ VLC sf_vlc; //< scale factor DPCM vlc
+ VLC sf_rl_vlc; //< scale factor run length vlc
+ VLC vec4_vlc; //< 4 coefficients per symbol
+ VLC vec2_vlc; //< 2 coefficients per symbol
+ VLC vec1_vlc; //< 1 coefficient per symbol
+ VLC coef_vlc[2]; //< coefficient run length vlc codes
+ int coef_max[2]; //< max length of vlc codes
/** frame size dependent frame information (set during initialization) */
- uint8_t lossless; //< lossless mode
- unsigned int decode_flags; //< used compression features
- uint8_t len_prefix; //< frame is prefixed with its length
- uint8_t dynamic_range_compression;//< frame contains DRC data
- uint8_t sample_bit_depth; //< bits per sample
- uint16_t samples_per_frame; //< number of samples to output
- uint16_t log2_frame_size; //< frame size
- int8_t nb_channels; //< number of channels
- int8_t lfe_channel; //< lfe channel index
- const float*** def_decorrelation_mat; //< default decorrelation matrix
- uint8_t allow_subframes; //< frames may contain subframes
- uint8_t max_num_subframes; //< maximum number of subframes
- int8_t num_possible_block_sizes; //< nb of supported block sizes
- uint16_t min_samples_per_subframe; //< minimum samples per subframe
- int* num_sfb; //< scale factor bands per block size
- int* sfb_offsets; //< scale factor band offsets
- int* sf_offsets; //< scale factor resample matrix
- int* subwoofer_cutoffs; //< subwoofer cutoff values
+ uint8_t lossless; //< lossless mode
+ unsigned int decode_flags; //< used compression features
+ uint8_t len_prefix; //< frame is prefixed with its length
+ uint8_t dynamic_range_compression; //< frame contains DRC data
+ uint8_t sample_bit_depth; //< bits per sample
+ uint16_t samples_per_frame; //< number of samples to output
+ uint16_t log2_frame_size; //< frame size
+ int8_t nb_channels; //< number of channels
+ int8_t lfe_channel; //< lfe channel index
+ const float*** def_decorrelation_mat; //< default decorrelation matrix
+ uint8_t allow_subframes; //< frames may contain subframes
+ uint8_t max_num_subframes; //< maximum number of subframes
+ int8_t num_possible_block_sizes; //< nb of supported block sizes
+ uint16_t min_samples_per_subframe; //< minimum samples per subframe
+ int* num_sfb; //< scale factor bands per block size
+ int* sfb_offsets; //< scale factor band offsets
+ int* sf_offsets; //< scale factor resample matrix
+ int* subwoofer_cutoffs; //< subwoofer cutoff values
/** packet decode state */
- uint8_t packet_sequence_number; //< current packet number
- int prev_packet_bit_size; //< saved number of bits
- uint8_t* prev_packet_data; //< prev frame data
- uint8_t bit5; //< padding bit? (CBR files)
+ uint8_t packet_sequence_number; //< current packet number
+ int prev_packet_bit_size; //< saved number of bits
+ uint8_t* prev_packet_data; //< prev frame data
+ uint8_t bit5; //< padding bit? (CBR files)
uint8_t bit6;
- uint8_t packet_loss; //< set in case of bitstream error
- uint8_t negative_quantstep; //< packet loss due to negative quant step
+ uint8_t packet_loss; //< set in case of bitstream error
+ uint8_t negative_quantstep; //< packet loss due to negative quant step
/** frame decode state */
- unsigned int frame_num; //< current frame number
+ unsigned int frame_num; //< current frame number
GetBitContext* getbit;
- GetBitContext gb; //< getbitcontext for the packet
- int buf_bit_size; //< buffer size in bits
- int16_t* samples; //< current samplebuffer pointer
- int16_t* samples_end; //< maximum samplebuffer pointer
- uint8_t drc_gain; //< gain for the DRC tool
- uint8_t no_tiling; //< frames contain subframes
- int skip_frame; //< skip output step
- int parsed_all_subframes; //< all subframes decoded?
+ GetBitContext gb; //< getbitcontext for the packet
+ int buf_bit_size; //< buffer size in bits
+ int16_t* samples; //< current samplebuffer pointer
+ int16_t* samples_end; //< maximum samplebuffer pointer
+ uint8_t drc_gain; //< gain for the DRC tool
+ uint8_t no_tiling; //< frames contain subframes
+ int skip_frame; //< skip output step
+ int parsed_all_subframes; //< all subframes decoded?
/** subframe/block decode state */
- int subframe_len; //< current subframe length
+ int subframe_len; //< current subframe length
int channels_for_cur_subframe;
int channel_indexes_for_cur_subframe[MAX_CHANNELS];
- int cur_subwoofer_cutoff; //< subwoofer cutoff value
- int num_bands; //< number of scale factor bands
- int* cur_sfb_offsets; //< sfb offsets for the current block
+ int cur_subwoofer_cutoff; //< subwoofer cutoff value
+ int num_bands; //< number of scale factor bands
+ int* cur_sfb_offsets; //< sfb offsets for the current block
int quant_step;
int esc_len;
- uint8_t nb_chgroups; //< number of channel groups
- WMA3ChannelGroup chgroup[MAX_CHANNELS]; //< channel group information
+ uint8_t nb_chgroups; //< number of channel groups
+ WMA3ChannelGroup chgroup[MAX_CHANNELS]; //< channel group information
- WMA3ChannelCtx channel[MAX_CHANNELS]; //< per channel data
+ WMA3ChannelCtx channel[MAX_CHANNELS]; //< per channel data
} WMA3DecodeContext;
#endif /* AVCODEC_WMA3_H */
More information about the FFmpeg-soc
mailing list