FFmpeg  4.4.4
Macros | Functions | Variables
eac3enc.c File Reference

E-AC-3 encoder. More...

#include "libavutil/attributes.h"
#include "ac3enc.h"
#include "eac3enc.h"
#include "eac3_data.h"

Go to the source code of this file.

Macros

#define AC3ENC_FLOAT   1
 

Functions

av_cold void ff_eac3_exponent_init (void)
 Initialize E-AC-3 exponent tables. More...
 
void ff_eac3_get_frame_exp_strategy (AC3EncodeContext *s)
 Determine frame exponent strategy use and indices. More...
 
void ff_eac3_set_cpl_states (AC3EncodeContext *s)
 Set coupling states. More...
 
void ff_eac3_output_frame_header (AC3EncodeContext *s)
 Write the E-AC-3 frame header to the output bitstream. More...
 

Variables

static const AVClass eac3enc_class
 
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 single channel across all 6 blocks. More...
 
AVCodec ff_eac3_encoder
 

Detailed Description

E-AC-3 encoder.

Definition in file eac3enc.c.

Macro Definition Documentation

◆ AC3ENC_FLOAT

#define AC3ENC_FLOAT   1

Definition at line 27 of file eac3enc.c.

Function Documentation

◆ ff_eac3_exponent_init()

av_cold void ff_eac3_exponent_init ( void  )

Initialize E-AC-3 exponent tables.

Definition at line 49 of file eac3enc.c.

Referenced by ff_ac3_encode_init().

◆ ff_eac3_get_frame_exp_strategy()

void ff_eac3_get_frame_exp_strategy ( AC3EncodeContext s)

Determine frame exponent strategy use and indices.

Definition at line 65 of file eac3enc.c.

Referenced by compute_exp_strategy().

◆ ff_eac3_set_cpl_states()

void ff_eac3_set_cpl_states ( AC3EncodeContext s)

Set coupling states.

This determines whether certain flags must be written to the bitstream or whether they will be implicitly already known by the decoder.

Definition at line 92 of file eac3enc.c.

Referenced by apply_channel_coupling().

◆ ff_eac3_output_frame_header()

void ff_eac3_output_frame_header ( AC3EncodeContext s)

Write the E-AC-3 frame header to the output bitstream.

Definition at line 125 of file eac3enc.c.

Referenced by ff_ac3_encode_init().

Variable Documentation

◆ eac3enc_class

const AVClass eac3enc_class
static
Initial value:
= {
.class_name = "E-AC-3 Encoder",
.item_name = av_default_item_name,
.option = &ff_ac3_enc_options[2],
}
const AVOption ff_ac3_enc_options[]
Definition: ac3enc.c:77
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85

Definition at line 35 of file eac3enc.c.

◆ eac3_frame_expstr_index_tab

int8_t eac3_frame_expstr_index_tab[3][4][4][4][4][4]
static

LUT for finding a matching frame exponent strategy index from a set of exponent strategies for a single channel across all 6 blocks.

Definition at line 46 of file eac3enc.c.

Referenced by ff_eac3_exponent_init(), and ff_eac3_get_frame_exp_strategy().

◆ ff_eac3_encoder

AVCodec ff_eac3_encoder
Initial value:
= {
.name = "eac3",
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 E-AC-3"),
.priv_data_size = sizeof(AC3EncodeContext),
.priv_class = &eac3enc_class,
.supported_samplerates = ff_ac3_sample_rate_tab,
.channel_layouts = ff_ac3_channel_layouts,
.defaults = ff_ac3_enc_defaults,
}
av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
Finalize encoding and free any memory allocated by the encoder.
Definition: ac3enc.c:2113
const AVCodecDefault ff_ac3_enc_defaults[]
Definition: ac3enc.c:127
const uint64_t ff_ac3_channel_layouts[19]
List of supported channel layouts.
Definition: ac3enc.c:142
int ff_ac3_float_encode_init(AVCodecContext *avctx)
Definition: ac3enc_float.c:122
int ff_ac3_float_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
const int ff_ac3_sample_rate_tab[]
Definition: ac3tab.c:111
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:925
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
static const AVClass eac3enc_class
Definition: eac3enc.c:35
@ AV_CODEC_ID_EAC3
Definition: codec_id.h:464
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:69
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:41
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:49
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AC-3 encoder private context.
Definition: ac3enc.h:154

Definition at line 251 of file eac3enc.c.