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.
AC3MDCTContextmdct
 MDCT context.
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 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_t * psd_buffer
int16_t * band_psd_buffer
int16_t * mask_buffer
uint16_t * qmant_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 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 )(AC3MDCTContext *mdct)
int(* mdct_init )(AVCodecContext *avctx, AC3MDCTContext *mdct, int nbits)
void(* apply_window )(DSPContext *dsp, SampleType *output, const SampleType *input, const SampleType *window, unsigned int len)
int(* normalize_samples )(struct AC3EncodeContext *s)
void(* scale_coefficients )(struct AC3EncodeContext *s)
int(* allocate_sample_buffers )(struct AC3EncodeContext *s)
void(* deinterleave_input_samples )(struct AC3EncodeContext *s, const SampleType *samples)
void(* apply_mdct )(struct AC3EncodeContext *s)
void(* apply_channel_coupling )(struct AC3EncodeContext *s)
void(* compute_rematrixing_strategy )(struct AC3EncodeContext *s)
void(* output_frame_header )(struct AC3EncodeContext *s)


Detailed Description

AC-3 encoder private context.

Definition at line 135 of file ac3enc.h.


Field Documentation

void(* AC3EncodeContext::apply_window)(DSPContext *dsp, SampleType *output, const SampleType *input, const SampleType *window, unsigned int len)

Referenced by ff_ac3_encode_init().

AVClass used for AVOption.

Definition at line 136 of file ac3enc.h.

parent AVCodecContext

Definition at line 138 of file ac3enc.h.

Referenced by ff_ac3_encode_init().

Definition at line 213 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

bandwidth code (0 to 60) (chbwcod)

Definition at line 178 of file ac3enc.h.

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

Definition at line 207 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 151 of file ac3enc.h.

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

bit count (used to avg. bitrate)

Definition at line 158 of file ac3enc.h.

Referenced by adjust_frame_size(), and ff_ac3_encode_init().

bitstream mode (bsmod)

Definition at line 149 of file ac3enc.h.

Referenced by ac3_output_frame_header(), and ff_ac3_encode_init().

center mix level code

Definition at line 170 of file ac3enc.h.

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

channel map used to reorder channels

Definition at line 168 of file ac3enc.h.

Referenced by set_channel_info().

coarse SNR offsets (csnroffst)

Definition at line 197 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 186 of file ac3enc.h.

Referenced by set_bandwidth().

Definition at line 216 of file ac3enc.h.

Referenced by allocate_buffers().

Definition at line 217 of file ac3enc.h.

Referenced by allocate_buffers().

coupling enabled for all frames

Definition at line 183 of file ac3enc.h.

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

coupling channel end frequency bin

Definition at line 180 of file ac3enc.h.

Referenced by output_audio_block(), and set_bandwidth().

Definition at line 157 of file ac3enc.h.

Referenced by ff_ac3_encode_init(), and output_frame_end().

user-specified cutoff frequency, in Hz

Definition at line 177 of file ac3enc.h.

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

dB/bit code (dbpbcod)

Definition at line 194 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

Definition at line 140 of file ac3enc.h.

Referenced by compute_exp_strategy(), and ff_ac3_encode_init().

Definition at line 210 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 220 of file ac3enc.h.

Referenced by encode_exponents(), 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 202 of file ac3enc.h.

Referenced by cbr_bit_allocation(), and group_exponents().

fast decay code (fdcycod)

Definition at line 193 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 198 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 199 of file ac3enc.h.

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

indicates if fixed-point encoder is being used

Definition at line 146 of file ac3enc.h.

Referenced by ac3_fixed_encode_init(), allocate_buffers(), ff_ac3_encode_init(), and validate_options().

floor code (floorcod)

Definition at line 195 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

all frame bits except exponents and mantissas

Definition at line 201 of file ac3enc.h.

Referenced by cbr_bit_allocation(), and count_frame_bits().

number of non-coefficient bits for fixed parameters

Definition at line 200 of file ac3enc.h.

Referenced by count_frame_bits(), and count_frame_bits_fixed().

frame size code (frmsizecod)

Definition at line 156 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 154 of file ac3enc.h.

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

Definition at line 211 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

indicates if there is a center channel

Definition at line 165 of file ac3enc.h.

Referenced by dprint_options(), set_channel_info(), and validate_metadata().

indicates if there are one or more surround channels

Definition at line 166 of file ac3enc.h.

Referenced by dprint_options(), set_channel_info(), and validate_metadata().

channel index of the LFE channel

Definition at line 164 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 174 of file ac3enc.h.

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

Lo/Ro surround mix level code.

Definition at line 175 of file ac3enc.h.

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

Lt/Rt center mix level code.

Definition at line 172 of file ac3enc.h.

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

Lt/Rt surround mix level code.

Definition at line 173 of file ac3enc.h.

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

Definition at line 214 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

MDCT context.

Definition at line 142 of file ac3enc.h.

Referenced by ff_ac3_encode_close(), and ff_ac3_encode_init().

Referenced by ff_ac3_encode_init().

Referenced by ff_ac3_encode_init().

number of coupling bands (ncplbnd)

Definition at line 185 of file ac3enc.h.

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

number of coupling subbands (ncplsubnd)

Definition at line 184 of file ac3enc.h.

Referenced by count_frame_bits(), and set_bandwidth().

Referenced by ff_ac3_encode_init(), and output_frame().

bitstream writer context

Definition at line 139 of file ac3enc.h.

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

Definition at line 205 of file ac3enc.h.

Referenced by ff_ac3_encode_close().

Definition at line 212 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

Definition at line 215 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 221 of file ac3enc.h.

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

indicates if ref_bap pointers have been set

Definition at line 222 of file ac3enc.h.

Referenced by encode_exponents(), and reset_block_bap().

stereo rematrixing enabled

Definition at line 188 of file ac3enc.h.

Referenced by apply_rematrixing(), and validate_options().

sampling frequency, in Hz

Definition at line 152 of file ac3enc.h.

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

sample count (used to avg. bitrate)

Definition at line 159 of file ac3enc.h.

Referenced by adjust_frame_size(), and ff_ac3_encode_init().

slow decay code (sdcycod)

Definition at line 192 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

slow gain code (sgaincod)

Definition at line 191 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 171 of file ac3enc.h.

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

Definition at line 204 of file ac3enc.h.

Referenced by ff_ac3_encode_close().


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

Generated on Fri Oct 26 02:38:22 2012 for FFmpeg by  doxygen 1.5.8