---
libavcodec/ac3enc.c | 56 +++++++++++++++++++++++++++-----------------------
1 files changed, 30 insertions(+), 26 deletions(-)
diff --git libavcodec/ac3enc.c libavcodec/ac3enc.c
index d923f7e..707af8f 100644
--- libavcodec/ac3enc.c
+++ libavcodec/ac3enc.c
@@ -35,42 +35,46 @@
#include "audioconvert.h"
typedef struct AC3EncodeContext {
- AVCodecContext *avctx;
- PutBitContext pb;
+ AVCodecContext *avctx; ///< parent context
+ PutBitContext pb; ///< bitstream writer
- int bitstream_id;
- int bitstream_mode;
+ int bitstream_id; ///< bitstream id (bsid)
+ int bitstream_mode; ///< bitstream mode (bsmod)
- int bit_rate;
- int sample_rate;
+ int bit_rate; ///< target bit rate, in bits-per-second
+ int sample_rate; ///< sampling frequency, in Hz
- int frame_size_min; /* minimum frame size in case rounding is necessary */
- int frame_size; /* current frame size in words */
- int frame_size_code;
- int bits_written;
- int samples_written;
+ int frame_size_min; ///< minimum frame size in case rounding is necessary
+ int frame_size; ///< current frame size in words
+ int frame_size_code; ///< frame size code (frmsizecod)
+ int bits_written; ///< total bits written (used to avg. bitrate)
+ int samples_written; ///< total samples written (used to avg. bitrate)
- int fbw_channels;
- int channels;
- int lfe_on;
- int lfe_ch;
- int channel_mode;
- const uint8_t *channel_map;
+ int fbw_channels; ///< number of full-bandwidth channels (nfchans)
+ int channels; ///< total number of channels (nchans)
+ int lfe_on; ///< indicates that there is an LFE channel (lfeon)
+ int lfe_ch; ///< channel index of the LFE channel
+ int channel_mode; ///< channel mode (acmod)
+ const uint8_t *channel_map; ///< channel map to reorder channels
- int bandwidth_code[AC3_MAX_CHANNELS];
- int nb_coefs[AC3_MAX_CHANNELS];
+ int bandwidth_code[AC3_MAX_CHANNELS]; ///< bandwidth code (0 to 60) (chbwcod)
+ int nb_coefs[AC3_MAX_CHANNELS]; ///< number of frequency coefficients
/* bitrate allocation control */
- int slow_gain_code, slow_decay_code, fast_decay_code, db_per_bit_code, floor_code;
- AC3BitAllocParameters bit_alloc;
- int coarse_snr_offset;
- int fast_gain_code[AC3_MAX_CHANNELS];
- int fine_snr_offset[AC3_MAX_CHANNELS];
+ int slow_gain_code; ///< slow gain code (sgaincod)
+ int slow_decay_code; ///< slow decay code (sdcycod)
+ int fast_decay_code; ///< fast decay code (fdcycod)
+ int db_per_bit_code; ///< dB/bit code (dpbpcod)
+ int floor_code; ///< floor code (floorcod)
+ AC3BitAllocParameters bit_alloc; ///< bit allocation parameters
+ int coarse_snr_offset; ///< coarse signal-to-noise ratio offset (csnroffst)
+ int fine_snr_offset[AC3_MAX_CHANNELS]; ///< fine signal-to-noise ratio offsets (fsnroffst)
+ int fast_gain_code[AC3_MAX_CHANNELS]; ///< fast gain codes (signal-to-mask ratio) (fgaincod)
/* mantissa encoding */
- int mant1_cnt, mant2_cnt, mant4_cnt;
+ int mant1_cnt, mant2_cnt, mant4_cnt; ///< matissa counts for bap=1,2,4
- int16_t last_samples[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE];
+ int16_t last_samples[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< last 256 samples from previous frame
} AC3EncodeContext;
static int16_t costab[64];
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc