27 #define CONFIG_AC3ENC_FLOAT 1 33 #define AC3ENC_TYPE AC3ENC_TYPE_EAC3 55 for (i = 0; i < 32; i++) {
76 for (ch = !s->
cpl_on; ch <= s->fbw_channels; ch++) {
100 first_cpl_coords[ch] = 1;
105 if (first_cpl_coords[ch]) {
107 first_cpl_coords[ch] = 0;
110 first_cpl_coords[ch] = 1;
221 for (ch = !s->
cpl_on; ch <= s->fbw_channels; ch++)
252 #if CONFIG_EAC3_ENCODER uint8_t exp_strategy[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]
exponent strategies
struct AC3EncodeContext AC3EncodeContext
AC-3 encoder private context.
Encoding Options used by AVOption.
int dolby_surround_ex_mode
static av_cold int init(AVCodecContext *avctx)
static const AVClass eac3enc_class
void ff_eac3_set_cpl_states(AC3EncodeContext *s)
Set coupling states.
PutBitContext pb
bitstream writer context
AC3BitAllocParameters bit_alloc
bit allocation parameters
int ff_ac3_float_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
int new_cpl_leak
send new coupling leak info
void ff_eac3_get_frame_exp_strategy(AC3EncodeContext *s)
Determine frame exponent strategy use and indices.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
int channel_mode
channel mode (acmod)
int fbw_channels
number of full-bandwidth channels (nfchans)
uint8_t new_cpl_coords[AC3_MAX_CHANNELS]
send new coupling coordinates (cplcoe)
av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
Finalize encoding and free any memory allocated by the encoder.
int loro_center_mix_level
Lo/Ro center mix level code.
int lfe_channel
channel index of the LFE channel
static int8_t eac3_frame_expstr_index_tab[3][4][4][4][4][4]
LUT for finding a matching frame exponent strategy index from a set of exponent strategies for a sing...
int loro_surround_mix_level
Lo/Ro surround mix level code.
uint8_t channel_in_cpl[AC3_MAX_CHANNELS]
channel in coupling (chincpl)
int num_blks_code
number of blocks code (numblkscod)
const uint64_t ff_ac3_channel_layouts[19]
List of supported channel layouts.
AC3EncOptions options
encoding options
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
#define AC3_MAX_CHANNELS
maximum number of channels, including coupling channel
int cpl_on
coupling turned on for this frame
const char * name
Name of the codec implementation.
int ltrt_surround_mix_level
Lt/Rt surround mix level code.
int new_cpl_strategy
send new coupling strategy
static void put_bits(J2kEncoderContext *s, int val, int n)
put n times val bit
int cpl_in_use
coupling in use for this block (cplinu)
Data for a single audio block.
int bitstream_mode
bitstream mode (bsmod)
int has_surround
indicates if there are one or more surround channels
uint8_t frame_exp_strategy[AC3_MAX_CHANNELS]
frame exp strategy index
void ff_eac3_exponent_init(void)
Initialize E-AC-3 exponent tables.
int coarse_snr_offset
coarse SNR offsets (csnroffst)
void ff_eac3_output_frame_header(AC3EncodeContext *s)
Write the E-AC-3 frame header to the output bitstream.
int audio_production_info
static void close(AVCodecParserContext *s)
int has_center
indicates if there is a center channel
Describe the class of an AVClass context structure.
synthesis window for stochastic i
int ltrt_center_mix_level
Lt/Rt center mix level code.
static const AVCodecDefault ac3_defaults[]
AC-3 encoder private context.
AC3Block blocks[AC3_MAX_BLOCKS]
per-block info
int preferred_stereo_downmix
int num_blocks
number of blocks per frame
int frame_size
current frame size in bytes
const uint8_t ff_eac3_frm_expstr[32][6]
Table E2.14 Frame Exponent Strategy Combinations.
AVSampleFormat
Audio Sample Formats.
static const AVOption ac3_options[]
int bitstream_id
bitstream id (bsid)
AVCodecContext * avctx
parent AVCodecContext
AC-3 encoder & E-AC-3 encoder common header.
static enum AVSampleFormat sample_fmts[]
int frame_number
Frame counter, set by libavcodec.
int use_frame_exp_strategy
indicates use of frame exp strategy
int lfe_on
indicates if there is an LFE channel (lfeon)
int fine_snr_offset[AC3_MAX_CHANNELS]
fine SNR offsets (fsnroffst)
av_cold int ff_ac3_encode_init(AVCodecContext *avctx)