FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Fields
AC3EncodeContext Struct Reference

AC-3 encoder private context. More...

#include <ac3enc.h>

Data Fields

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

Field Documentation

AVClass* AC3EncodeContext::av_class

AVClass used for AVOption.

Definition at line 163 of file ac3enc.h.

AC3EncOptions AC3EncodeContext::options
AVCodecContext* AC3EncodeContext::avctx
PutBitContext AC3EncodeContext::pb

bitstream writer context

Definition at line 166 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().

AudioDSPContext AC3EncodeContext::adsp

Definition at line 167 of file ac3enc.h.

Referenced by apply_channel_coupling(), encode_frame(), and ff_ac3_encode_init().

AVFloatDSPContext* AC3EncodeContext::fdsp

Definition at line 168 of file ac3enc.h.

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

MECmpContext AC3EncodeContext::mecc

Definition at line 169 of file ac3enc.h.

Referenced by compute_exp_strategy(), and ff_ac3_encode_init().

AC3DSPContext AC3EncodeContext::ac3dsp
FFTContext AC3EncodeContext::mdct

FFT context for MDCT calculation.

Definition at line 171 of file ac3enc.h.

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

const SampleType* AC3EncodeContext::mdct_window

MDCT window function array.

Definition at line 172 of file ac3enc.h.

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

AC3Block AC3EncodeContext::blocks[AC3_MAX_BLOCKS]
int AC3EncodeContext::fixed_point

indicates if fixed-point encoder is being used

Definition at line 176 of file ac3enc.h.

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

int AC3EncodeContext::eac3
int AC3EncodeContext::bitstream_id
int AC3EncodeContext::bitstream_mode

bitstream mode (bsmod)

Definition at line 179 of file ac3enc.h.

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

int AC3EncodeContext::bit_rate

target bit rate, in bits-per-second

Definition at line 181 of file ac3enc.h.

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

int AC3EncodeContext::sample_rate

sampling frequency, in Hz

Definition at line 182 of file ac3enc.h.

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

int AC3EncodeContext::num_blks_code

number of blocks code (numblkscod)

Definition at line 184 of file ac3enc.h.

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

int AC3EncodeContext::num_blocks
int AC3EncodeContext::frame_size_min

minimum frame size in case rounding is necessary

Definition at line 186 of file ac3enc.h.

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

int AC3EncodeContext::frame_size
int AC3EncodeContext::frame_size_code

frame size code (frmsizecod)

Definition at line 188 of file ac3enc.h.

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

uint16_t AC3EncodeContext::crc_inv[2]

Definition at line 189 of file ac3enc.h.

Referenced by ff_ac3_encode_init(), and output_frame_end().

int64_t AC3EncodeContext::bits_written

bit count (used to avg. bitrate)

Definition at line 190 of file ac3enc.h.

Referenced by ff_ac3_adjust_frame_size(), and ff_ac3_encode_init().

int64_t AC3EncodeContext::samples_written

sample count (used to avg. bitrate)

Definition at line 191 of file ac3enc.h.

Referenced by ff_ac3_adjust_frame_size(), and ff_ac3_encode_init().

int AC3EncodeContext::fbw_channels
int AC3EncodeContext::channels
int AC3EncodeContext::lfe_on
int AC3EncodeContext::lfe_channel

channel index of the LFE channel

Definition at line 196 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().

int AC3EncodeContext::has_center

indicates if there is a center channel

Definition at line 197 of file ac3enc.h.

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

int AC3EncodeContext::has_surround

indicates if there are one or more surround channels

Definition at line 198 of file ac3enc.h.

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

int AC3EncodeContext::channel_mode
const uint8_t* AC3EncodeContext::channel_map

channel map used to reorder channels

Definition at line 200 of file ac3enc.h.

Referenced by copy_input_samples(), and set_channel_info().

int AC3EncodeContext::center_mix_level

center mix level code

Definition at line 202 of file ac3enc.h.

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

int AC3EncodeContext::surround_mix_level

surround mix level code

Definition at line 203 of file ac3enc.h.

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

int AC3EncodeContext::ltrt_center_mix_level

Lt/Rt center mix level code.

Definition at line 204 of file ac3enc.h.

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

int AC3EncodeContext::ltrt_surround_mix_level

Lt/Rt surround mix level code.

Definition at line 205 of file ac3enc.h.

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

int AC3EncodeContext::loro_center_mix_level

Lo/Ro center mix level code.

Definition at line 206 of file ac3enc.h.

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

int AC3EncodeContext::loro_surround_mix_level

Lo/Ro surround mix level code.

Definition at line 207 of file ac3enc.h.

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

int AC3EncodeContext::cutoff

user-specified cutoff frequency, in Hz

Definition at line 209 of file ac3enc.h.

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

int AC3EncodeContext::bandwidth_code

bandwidth code (0 to 60) (chbwcod)

Definition at line 210 of file ac3enc.h.

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

int AC3EncodeContext::start_freq[AC3_MAX_CHANNELS]
int AC3EncodeContext::cpl_end_freq

coupling channel end frequency bin

Definition at line 212 of file ac3enc.h.

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

int AC3EncodeContext::cpl_on
int AC3EncodeContext::cpl_enabled

coupling enabled for all frames

Definition at line 215 of file ac3enc.h.

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

int AC3EncodeContext::num_cpl_subbands

number of coupling subbands (ncplsubnd)

Definition at line 216 of file ac3enc.h.

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

int AC3EncodeContext::num_cpl_bands

number of coupling bands (ncplbnd)

Definition at line 217 of file ac3enc.h.

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

uint8_t AC3EncodeContext::cpl_band_sizes[AC3_MAX_CPL_BANDS]

number of coeffs in each coupling band

Definition at line 218 of file ac3enc.h.

Referenced by apply_channel_coupling(), and set_bandwidth().

int AC3EncodeContext::rematrixing_enabled

stereo rematrixing enabled

Definition at line 220 of file ac3enc.h.

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

int AC3EncodeContext::slow_gain_code

slow gain code (sgaincod)

Definition at line 223 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

int AC3EncodeContext::slow_decay_code

slow decay code (sdcycod)

Definition at line 224 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

int AC3EncodeContext::fast_decay_code

fast decay code (fdcycod)

Definition at line 225 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

int AC3EncodeContext::db_per_bit_code

dB/bit code (dbpbcod)

Definition at line 226 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

int AC3EncodeContext::floor_code

floor code (floorcod)

Definition at line 227 of file ac3enc.h.

Referenced by bit_alloc_init(), and output_audio_block().

AC3BitAllocParameters AC3EncodeContext::bit_alloc
int AC3EncodeContext::coarse_snr_offset

coarse SNR offsets (csnroffst)

Definition at line 229 of file ac3enc.h.

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

int AC3EncodeContext::fast_gain_code[AC3_MAX_CHANNELS]

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

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

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

int AC3EncodeContext::frame_bits_fixed

number of non-coefficient bits for fixed parameters

Definition at line 232 of file ac3enc.h.

Referenced by count_frame_bits(), and count_frame_bits_fixed().

int AC3EncodeContext::frame_bits

all frame bits except exponents and mantissas

Definition at line 233 of file ac3enc.h.

Referenced by cbr_bit_allocation(), and count_frame_bits().

int AC3EncodeContext::exponent_bits

number of bits used for exponents

Definition at line 234 of file ac3enc.h.

Referenced by cbr_bit_allocation(), and ff_ac3_compute_bit_allocation().

SampleType* AC3EncodeContext::windowed_samples

Definition at line 236 of file ac3enc.h.

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

SampleType** AC3EncodeContext::planar_samples

Definition at line 237 of file ac3enc.h.

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

uint8_t* AC3EncodeContext::bap_buffer
uint8_t* AC3EncodeContext::bap1_buffer

Definition at line 239 of file ac3enc.h.

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

CoefType* AC3EncodeContext::mdct_coef_buffer

Definition at line 240 of file ac3enc.h.

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

int32_t* AC3EncodeContext::fixed_coef_buffer

Definition at line 241 of file ac3enc.h.

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

uint8_t* AC3EncodeContext::exp_buffer

Definition at line 242 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

uint8_t* AC3EncodeContext::grouped_exp_buffer

Definition at line 243 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

int16_t* AC3EncodeContext::psd_buffer

Definition at line 244 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

int16_t* AC3EncodeContext::band_psd_buffer

Definition at line 245 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

int16_t* AC3EncodeContext::mask_buffer

Definition at line 246 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

int16_t* AC3EncodeContext::qmant_buffer

Definition at line 247 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

uint8_t* AC3EncodeContext::cpl_coord_exp_buffer

Definition at line 248 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

uint8_t* AC3EncodeContext::cpl_coord_mant_buffer

Definition at line 249 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_close().

uint8_t AC3EncodeContext::exp_strategy[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]
uint8_t AC3EncodeContext::frame_exp_strategy[AC3_MAX_CHANNELS]

frame exp strategy index

Definition at line 252 of file ac3enc.h.

Referenced by ff_eac3_get_frame_exp_strategy(), and ff_eac3_output_frame_header().

int AC3EncodeContext::use_frame_exp_strategy

indicates use of frame exp strategy

Definition at line 253 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().

uint8_t AC3EncodeContext::exp_ref_block[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]

reference blocks for EXP_REUSE

Definition at line 254 of file ac3enc.h.

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

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

bit allocation pointers (bap)

Definition at line 255 of file ac3enc.h.

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

int AC3EncodeContext::ref_bap_set

indicates if ref_bap pointers have been set

Definition at line 256 of file ac3enc.h.

Referenced by encode_exponents(), and reset_block_bap().

void(* AC3EncodeContext::mdct_end)(struct AC3EncodeContext *s)

Definition at line 259 of file ac3enc.h.

Referenced by ff_ac3_encode_close(), and ff_ac3_encode_init().

int(* AC3EncodeContext::mdct_init)(struct AC3EncodeContext *s)

Definition at line 260 of file ac3enc.h.

Referenced by ff_ac3_encode_init().

int(* AC3EncodeContext::allocate_sample_buffers)(struct AC3EncodeContext *s)

Definition at line 263 of file ac3enc.h.

Referenced by allocate_buffers(), and ff_ac3_encode_init().

void(* AC3EncodeContext::output_frame_header)(struct AC3EncodeContext *s)

Definition at line 266 of file ac3enc.h.

Referenced by ff_ac3_encode_init(), and ff_ac3_output_frame().


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