29 #define AC3ENC_FLOAT 0
31 #define FFT_FIXED_32 1
49 s->ac3dsp.sum_square_butterfly_int32(sum, coef0, coef1,
len);
70 uint64_t coord = energy_ch / (energy_cpl >> 24);
71 uint32_t coord32 =
FFMIN(coord, 1073741824);
72 coord32 =
ff_sqrt(coord32) << 9;
107 iwin[
i] =
lrintf(fwin[
i] * (1 << 22));
109 s->mdct_window = iwin;
av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
Finalize encoding and free any memory allocated by the encoder.
av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
const AVCodecDefault ff_ac3_enc_defaults[]
const AVOption ff_ac3_enc_options[]
const uint64_t ff_ac3_channel_layouts[19]
List of supported channel layouts.
AC-3 encoder & E-AC-3 encoder common header.
int ff_ac3_fixed_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
static av_cold void ac3_fixed_mdct_end(AC3EncodeContext *s)
Finalize MDCT and free allocated memory.
AVCodec ff_ac3_fixed_encoder
static const AVClass ac3enc_class
static void clip_coefficients(AudioDSPContext *adsp, int32_t *coef, unsigned int len)
static void sum_square_butterfly(AC3EncodeContext *s, int64_t sum[4], const int32_t *coef0, const int32_t *coef1, int len)
static av_cold int ac3_fixed_mdct_init(AC3EncodeContext *s)
Initialize MDCT tables.
static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
AC-3 encoder float/fixed template.
static int allocate_sample_buffers(AC3EncodeContext *s)
const int ff_ac3_sample_rate_tab[]
static enum AVSampleFormat sample_fmts[]
static av_cold int init(AVCodecContext *avctx)
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
const char * av_default_item_name(void *ptr)
Return the context name.
AVSampleFormat
Audio sample formats.
@ AV_SAMPLE_FMT_S32P
signed 32 bits, planar
#define LIBAVUTIL_VERSION_INT
av_cold void ff_kbd_window_init(float *window, float alpha, int n)
Generate a Kaiser-Bessel Derived Window.
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
AVFixedDSPContext * avpriv_alloc_fixed_dsp(int bit_exact)
Allocate and initialize a fixed DSP context.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
AC-3 encoder private context.
Describe the class of an AVClass context structure.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
main external API structure.
const char * name
Name of the codec implementation.
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.
#define av_malloc_array(a, b)