Go to the documentation of this file.
30 #undef CONFIG_AC3ENC_FLOAT
36 #define AC3ENC_TYPE AC3ENC_TYPE_AC3_FIXED
70 for (ch = 1; ch <=
s->channels; ch++) {
72 block->coeff_shift[ch]);
81 s->ac3dsp.sum_square_butterfly_int32(sum, coef0, coef1,
len);
102 uint64_t coord = energy_ch / (energy_cpl >> 24);
103 uint32_t coord32 =
FFMIN(coord, 1073741824);
104 coord32 =
ff_sqrt(coord32) << 9;
static av_cold int init(AVCodecContext *avctx)
static enum AVSampleFormat sample_fmts[]
void(* vector_clip_int32)(int32_t *dst, const int32_t *src, int32_t min, int32_t max, unsigned int len)
Clip each element in an array of int32_t to a given minimum and maximum value.
static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
const uint64_t ff_ac3_channel_layouts[19]
List of supported channel layouts.
av_cold int ff_ac3_fixed_mdct_init(AC3EncodeContext *s)
Initialize MDCT tables.
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * av_default_item_name(void *ptr)
Return the context name.
AC-3 encoder private context.
Data for a single audio block.
av_cold void ff_ac3_fixed_mdct_end(AC3EncodeContext *s)
Finalize MDCT and free allocated memory.
static void clip_coefficients(AudioDSPContext *adsp, int32_t *coef, unsigned int len)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
const int ff_ac3_sample_rate_tab[]
int ff_ac3_fixed_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
static const AVClass ac3enc_class
AVSampleFormat
Audio sample formats.
const char * name
Name of the codec implementation.
static void sum_square_butterfly(AC3EncodeContext *s, int64_t sum[4], const int32_t *coef0, const int32_t *coef1, int len)
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static void scale_coefficients(AC3EncodeContext *s)
main external API structure.
static const AVCodecDefault ac3_defaults[]
av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
AVCodecContext * avctx
parent AVCodecContext
av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
Finalize encoding and free any memory allocated by the encoder.
The exact code depends on how similar the blocks are and how related they are to the block
static int normalize_samples(AC3EncodeContext *s)
static const AVOption ac3_options[]
const int16_t ff_ac3_window[AC3_WINDOW_SIZE/2]
AVCodec ff_ac3_fixed_encoder