AC3EncodeContext Struct Reference

AC-3 encoder private context. More...

#include <ac3enc.h>


Data Fields

AVClassav_class
 AVClass used for AVOption.
AC3EncOptions options
 encoding options
AVCodecContextavctx
 parent AVCodecContext
PutBitContext pb
 bitstream writer context
DSPContext dsp
AC3DSPContext ac3dsp
 AC-3 optimized functions.
FFTContext mdct
 FFT context for MDCT calculation.
const SampleTypemdct_window
 MDCT window function array.
AC3Block blocks [AC3_MAX_BLOCKS]
 per-block info
int fixed_point
 indicates if fixed-point encoder is being used
int eac3
 indicates if this is E-AC-3 vs. AC-3
int bitstream_id
 bitstream id (bsid)
int bitstream_mode
 bitstream mode (bsmod)
int bit_rate
 target bit rate, in bits-per-second
int sample_rate
 sampling frequency, in Hz
int num_blks_code
 number of blocks code (numblkscod)
int num_blocks
 number of blocks per frame
int frame_size_min
 minimum frame size in case rounding is necessary
int frame_size
 current frame size in bytes
int frame_size_code
 frame size code (frmsizecod)
uint16_t crc_inv [2]
int64_t bits_written
 bit count (used to avg. bitrate)
int64_t samples_written
 sample count (used to avg. bitrate)
int fbw_channels
 number of full-bandwidth channels (nfchans)
int channels
 total number of channels (nchans)
int lfe_on
 indicates if there is an LFE channel (lfeon)
int lfe_channel
 channel index of the LFE channel
int has_center
 indicates if there is a center channel
int has_surround
 indicates if there are one or more surround channels
int channel_mode
 channel mode (acmod)
const uint8_t * channel_map
 channel map used to reorder channels
int center_mix_level
 center mix level code
int surround_mix_level
 surround mix level code
int ltrt_center_mix_level
 Lt/Rt center mix level code.
int ltrt_surround_mix_level
 Lt/Rt surround mix level code.
int loro_center_mix_level
 Lo/Ro center mix level code.
int loro_surround_mix_level
 Lo/Ro surround mix level code.
int cutoff
 user-specified cutoff frequency, in Hz
int bandwidth_code
 bandwidth code (0 to 60) (chbwcod)
int start_freq [AC3_MAX_CHANNELS]
 start frequency bin (strtmant)
int cpl_end_freq
 coupling channel end frequency bin
int cpl_on
 coupling turned on for this frame
int cpl_enabled
 coupling enabled for all frames
int num_cpl_subbands
 number of coupling subbands (ncplsubnd)
int num_cpl_bands
 number of coupling bands (ncplbnd)
uint8_t cpl_band_sizes [AC3_MAX_CPL_BANDS]
 number of coeffs in each coupling band
int rematrixing_enabled
 stereo rematrixing enabled
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 (dbpbcod)
int floor_code
 floor code (floorcod)
AC3BitAllocParameters bit_alloc
 bit allocation parameters
int coarse_snr_offset
 coarse SNR offsets (csnroffst)
int fast_gain_code [AC3_MAX_CHANNELS]
 fast gain codes (signal-to-mask ratio) (fgaincod)
int fine_snr_offset [AC3_MAX_CHANNELS]
 fine SNR offsets (fsnroffst)
int frame_bits_fixed
 number of non-coefficient bits for fixed parameters
int frame_bits
 all frame bits except exponents and mantissas
int exponent_bits
 number of bits used for exponents
SampleTypewindowed_samples
SampleType ** planar_samples
uint8_t * bap_buffer
uint8_t * bap1_buffer
CoefTypemdct_coef_buffer
int32_t * fixed_coef_buffer
uint8_t * exp_buffer
uint8_t * grouped_exp_buffer
int16_tpsd_buffer
int16_tband_psd_buffer
int16_tmask_buffer
int16_tqmant_buffer
uint8_t * cpl_coord_exp_buffer
uint8_t * cpl_coord_mant_buffer
uint8_t exp_strategy [AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]
 exponent strategies
uint8_t frame_exp_strategy [AC3_MAX_CHANNELS]
 frame exp strategy index
int use_frame_exp_strategy
 indicates use of frame exp strategy
uint8_t exp_ref_block [AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]
 reference blocks for EXP_REUSE
uint8_t * ref_bap [AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]
 bit allocation pointers (bap)
int ref_bap_set
 indicates if ref_bap pointers have been set
void(* mdct_end )(struct AC3EncodeContext *s)
int(* mdct_init )(struct AC3EncodeContext *s)
int(* allocate_sample_buffers )(struct AC3EncodeContext *s)
void(* output_frame_header )(struct AC3EncodeContext *s)


Detailed Description

AC-3 encoder private context.

Definition at line 155 of file ac3enc.h.


Field Documentation

AVClass used for AVOption.

Definition at line 156 of file ac3enc.h.

Definition at line 236 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

bandwidth code (0 to 60) (chbwcod)

Definition at line 201 of file ac3enc.h.

Referenced by count_mantissa_bits(), ff_ac3_compute_coupling_strategy(), output_audio_block(), and set_bandwidth().

Definition at line 230 of file ac3enc.h.

Referenced by allocate_buffers(), cbr_bit_allocation(), and ff_ac3_encode_close().

target bit rate, in bits-per-second

Definition at line 172 of file ac3enc.h.

Referenced by dprint_options(), ff_ac3_adjust_frame_size(), and validate_options().

bit count (used to avg. bitrate)

Definition at line 181 of file ac3enc.h.

Referenced by ff_ac3_adjust_frame_size(), and ff_ac3_encode_init().

bitstream mode (bsmod)

Definition at line 170 of file ac3enc.h.

Referenced by ac3_output_frame_header(), ff_ac3_encode_init(), and ff_eac3_output_frame_header().

center mix level code

Definition at line 193 of file ac3enc.h.

Referenced by ac3_output_frame_header(), dprint_options(), and ff_ac3_validate_metadata().

channel map used to reorder channels

Definition at line 191 of file ac3enc.h.

Referenced by deinterleave_input_samples(), and set_channel_info().

coarse SNR offsets (csnroffst)

Definition at line 220 of file ac3enc.h.

Referenced by bit_alloc_init(), cbr_bit_allocation(), ff_eac3_output_frame_header(), and output_audio_block().

uint8_t AC3EncodeContext::cpl_band_sizes[AC3_MAX_CPL_BANDS]

number of coeffs in each coupling band

Definition at line 209 of file ac3enc.h.

Referenced by apply_channel_coupling(), and set_bandwidth().

Definition at line 239 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

Definition at line 240 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

coupling enabled for all frames

Definition at line 206 of file ac3enc.h.

Referenced by allocate_buffers(), count_mantissa_bits(), encode_frame(), set_bandwidth(), and validate_options().

coupling channel end frequency bin

Definition at line 203 of file ac3enc.h.

Referenced by apply_channel_coupling(), output_audio_block(), and set_bandwidth().

Definition at line 180 of file ac3enc.h.

Referenced by ff_ac3_encode_init(), and output_frame_end().

user-specified cutoff frequency, in Hz

Definition at line 200 of file ac3enc.h.

Referenced by dprint_options(), set_bandwidth(), and validate_options().

dB/bit code (dbpbcod)

Definition at line 217 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

Definition at line 233 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

uint8_t AC3EncodeContext::exp_ref_block[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]

reference blocks for EXP_REUSE

Definition at line 245 of file ac3enc.h.

Referenced by encode_exponents(), ff_ac3_quantize_mantissas(), and reset_block_bap().

uint8_t AC3EncodeContext::exp_strategy[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]

number of bits used for exponents

Definition at line 225 of file ac3enc.h.

Referenced by cbr_bit_allocation(), and ff_ac3_compute_bit_allocation().

fast decay code (fdcycod)

Definition at line 216 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

int AC3EncodeContext::fast_gain_code[AC3_MAX_CHANNELS]

fast gain codes (signal-to-mask ratio) (fgaincod)

Definition at line 221 of file ac3enc.h.

Referenced by bit_alloc_init(), bit_alloc_masking(), and output_audio_block().

int AC3EncodeContext::fine_snr_offset[AC3_MAX_CHANNELS]

fine SNR offsets (fsnroffst)

Definition at line 222 of file ac3enc.h.

Referenced by cbr_bit_allocation(), ff_eac3_output_frame_header(), and output_audio_block().

Definition at line 232 of file ac3enc.h.

Referenced by allocate_buffers(), ff_ac3_encode_close(), and scale_coefficients().

indicates if fixed-point encoder is being used

Definition at line 167 of file ac3enc.h.

Referenced by ac3_fixed_encode_init(), allocate_buffers(), apply_mdct(), encode_frame(), and ff_ac3_encode_init().

floor code (floorcod)

Definition at line 218 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

all frame bits except exponents and mantissas

Definition at line 224 of file ac3enc.h.

Referenced by cbr_bit_allocation(), and count_frame_bits().

number of non-coefficient bits for fixed parameters

Definition at line 223 of file ac3enc.h.

Referenced by count_frame_bits(), and count_frame_bits_fixed().

uint8_t AC3EncodeContext::frame_exp_strategy[AC3_MAX_CHANNELS]

frame exp strategy index

Definition at line 243 of file ac3enc.h.

Referenced by ff_eac3_get_frame_exp_strategy(), and ff_eac3_output_frame_header().

frame size code (frmsizecod)

Definition at line 179 of file ac3enc.h.

Referenced by ac3_output_frame_header(), set_bandwidth(), and validate_options().

minimum frame size in case rounding is necessary

Definition at line 177 of file ac3enc.h.

Referenced by ac3_output_frame_header(), ff_ac3_adjust_frame_size(), output_frame_end(), and validate_options().

Definition at line 234 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

indicates if there is a center channel

Definition at line 188 of file ac3enc.h.

Referenced by count_frame_bits(), dprint_options(), ff_ac3_validate_metadata(), ff_eac3_output_frame_header(), and set_channel_info().

indicates if there are one or more surround channels

Definition at line 189 of file ac3enc.h.

Referenced by count_frame_bits(), dprint_options(), ff_ac3_validate_metadata(), ff_eac3_output_frame_header(), and set_channel_info().

channel index of the LFE channel

Definition at line 187 of file ac3enc.h.

Referenced by bit_alloc_masking(), compute_exp_strategy(), ff_eac3_output_frame_header(), output_audio_block(), set_bandwidth(), and set_channel_info().

Lo/Ro center mix level code.

Definition at line 197 of file ac3enc.h.

Referenced by ac3_output_frame_header(), dprint_options(), ff_ac3_validate_metadata(), and ff_eac3_output_frame_header().

Lo/Ro surround mix level code.

Definition at line 198 of file ac3enc.h.

Referenced by ac3_output_frame_header(), dprint_options(), ff_ac3_validate_metadata(), and ff_eac3_output_frame_header().

Lt/Rt center mix level code.

Definition at line 195 of file ac3enc.h.

Referenced by ac3_output_frame_header(), dprint_options(), ff_ac3_validate_metadata(), and ff_eac3_output_frame_header().

Lt/Rt surround mix level code.

Definition at line 196 of file ac3enc.h.

Referenced by ac3_output_frame_header(), dprint_options(), ff_ac3_validate_metadata(), and ff_eac3_output_frame_header().

Definition at line 237 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

FFT context for MDCT calculation.

Definition at line 162 of file ac3enc.h.

Referenced by apply_mdct(), ff_ac3_float_mdct_end(), and ff_ac3_float_mdct_init().

Definition at line 231 of file ac3enc.h.

Referenced by allocate_buffers(), ff_ac3_encode_close(), and scale_coefficients().

Referenced by ff_ac3_encode_init().

MDCT window function array.

Definition at line 163 of file ac3enc.h.

Referenced by apply_mdct(), ff_ac3_float_mdct_end(), and ff_ac3_float_mdct_init().

number of blocks code (numblkscod)

Definition at line 175 of file ac3enc.h.

Referenced by compute_exp_strategy(), count_frame_bits_fixed(), dprint_options(), ff_eac3_output_frame_header(), and validate_options().

number of coupling bands (ncplbnd)

Definition at line 208 of file ac3enc.h.

Referenced by apply_channel_coupling(), count_frame_bits(), output_audio_block(), and set_bandwidth().

number of coupling subbands (ncplsubnd)

Definition at line 207 of file ac3enc.h.

Referenced by apply_channel_coupling(), count_frame_bits(), and set_bandwidth().

bitstream writer context

Definition at line 159 of file ac3enc.h.

Referenced by ac3_output_frame_header(), ff_ac3_output_frame(), ff_eac3_output_frame_header(), output_audio_block(), and output_frame_end().

Definition at line 228 of file ac3enc.h.

Referenced by apply_mdct(), deinterleave_input_samples(), and ff_ac3_encode_close().

Definition at line 235 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

Definition at line 238 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

uint8_t* AC3EncodeContext::ref_bap[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]

bit allocation pointers (bap)

Definition at line 246 of file ac3enc.h.

Referenced by bit_alloc(), count_mantissa_bits_update_ch(), ff_ac3_quantize_mantissas(), output_audio_block(), and reset_block_bap().

indicates if ref_bap pointers have been set

Definition at line 247 of file ac3enc.h.

Referenced by encode_exponents(), and reset_block_bap().

stereo rematrixing enabled

Definition at line 211 of file ac3enc.h.

Referenced by compute_rematrixing_strategy(), ff_ac3_apply_rematrixing(), and validate_options().

sampling frequency, in Hz

Definition at line 173 of file ac3enc.h.

Referenced by dprint_options(), ff_ac3_adjust_frame_size(), set_bandwidth(), and validate_options().

sample count (used to avg. bitrate)

Definition at line 182 of file ac3enc.h.

Referenced by ff_ac3_adjust_frame_size(), and ff_ac3_encode_init().

slow decay code (sdcycod)

Definition at line 215 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

slow gain code (sgaincod)

Definition at line 214 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

int AC3EncodeContext::start_freq[AC3_MAX_CHANNELS]

surround mix level code

Definition at line 194 of file ac3enc.h.

Referenced by ac3_output_frame_header(), dprint_options(), and ff_ac3_validate_metadata().

indicates use of frame exp strategy

Definition at line 244 of file ac3enc.h.

Referenced by count_frame_bits(), count_frame_bits_fixed(), ff_eac3_get_frame_exp_strategy(), and ff_eac3_output_frame_header().

Definition at line 227 of file ac3enc.h.

Referenced by apply_mdct(), ff_ac3_encode_close(), and normalize_samples().


The documentation for this struct was generated from the following file:

Generated on Fri Oct 26 02:43:55 2012 for FFmpeg by  doxygen 1.5.8