27 #define AC3ENC_FLOAT 1 35 #define AC3ENC_TYPE AC3ENC_TYPE_EAC3 57 for (i = 0; i < 32; i++) {
78 for (ch = !s->
cpl_on; ch <= s->fbw_channels; ch++) {
102 first_cpl_coords[ch] = 1;
107 if (first_cpl_coords[ch]) {
109 first_cpl_coords[ch] = 0;
112 first_cpl_coords[ch] = 1;
223 for (ch = !s->
cpl_on; ch <= s->fbw_channels; ch++)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
uint8_t exp_strategy[AC3_MAX_CHANNELS][AC3_MAX_BLOCKS]
exponent strategies
Encoding Options used by AVOption.
static void put_bits(Jpeg2000EncoderContext *s, int val, int n)
put n times val bit
int dolby_surround_ex_mode
#define LIBAVUTIL_VERSION_INT
static av_cold int init(AVCodecContext *avctx)
const char * av_default_item_name(void *ptr)
Return the context name.
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
Macro definitions for various function/variable attributes.
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.
int ff_ac3_float_encode_init(AVCodecContext *avctx)
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)
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
The exact code depends on how similar the blocks are and how related they are to the block
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
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
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
AVSampleFormat
Audio sample formats.
int has_center
indicates if there is a center channel
Describe the class of an AVClass context structure.
int ltrt_center_mix_level
Lt/Rt center mix level code.
static const AVCodecDefault ac3_defaults[]
av_cold void ff_eac3_exponent_init(void)
Initialize E-AC-3 exponent tables.
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.
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.
const int ff_ac3_sample_rate_tab[]
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)