29 #define CONFIG_AC3ENC_FLOAT 1 37 #define AC3ENC_TYPE AC3ENC_TYPE_AC3 77 for (i = 0; i < n2; i++)
78 window[n-1-i] = window[i];
125 coord *= sqrtf(energy_ch / energy_cpl);
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
av_cold void ff_kbd_window_init(float *window, float alpha, int n)
Generate a Kaiser-Bessel Derived Window.
static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
int ff_ac3_float_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
void(* vector_clipf)(float *dst, const float *src, float min, float max, int len)
av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
Finalize encoding and free any memory allocated by the encoder.
av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s)
Initialize MDCT tables.
#define CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
AC3DSPContext ac3dsp
AC-3 optimized functions.
av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx)
static int normalize_samples(AC3EncodeContext *s)
static const AVClass ac3enc_class
const uint64_t ff_ac3_channel_layouts[19]
List of supported channel layouts.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int channels
total number of channels (nchans)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int cpl_on
coupling turned on for this frame
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
static void scale_coefficients(AC3EncodeContext *s)
FFTContext mdct
FFT context for MDCT calculation.
const SampleType * mdct_window
MDCT window function array.
AVSampleFormat
Audio Sample Formats.
main external API structure.
CoefType * mdct_coef_buffer
static void close(AVCodecParserContext *s)
Describe the class of an AVClass context structure.
static const AVCodecDefault ac3_defaults[]
AC-3 encoder private context.
int num_blocks
number of blocks per frame
av_cold void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int bit_exact)
Initialize a float DSP context.
static void clip_coefficients(AudioDSPContext *adsp, float *coef, unsigned int len)
AC-3 encoder float/fixed template.
common internal api header.
static const AVOption ac3_options[]
static av_cold int init(AVCodecParserContext *s)
AVCodecContext * avctx
parent AVCodecContext
AC-3 encoder & E-AC-3 encoder common header.
av_cold void ff_ac3_float_mdct_end(AC3EncodeContext *s)
Finalize MDCT and free allocated memory.
int32_t * fixed_coef_buffer
void(* float_to_fixed24)(int32_t *dst, const float *src, unsigned int len)
Convert an array of float in range [-1.0,1.0] to int32_t with range [-(1<<24),(1<<24)].
av_cold int ff_ac3_encode_init(AVCodecContext *avctx)