29 #define CONFIG_AC3ENC_FLOAT 1
37 #define AC3ENC_TYPE AC3ENC_TYPE_AC3
81 for (i = 0; i < n2; i++)
82 window[n-1-i] = window[i];
112 const float *coef0,
const float *coef1,
135 coord *= sqrtf(energy_ch / energy_cpl);
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 void ff_kbd_window_init(float *window, float alpha, int n)
Generate a Kaiser-Bessel Derived Window.
#define LIBAVUTIL_VERSION_INT
static av_cold int init(AVCodecContext *avctx)
void(* sum_square_butterfly_float)(float sum[4], const float *coef0, const float *coef1, int len)
static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
int ff_ac3_float_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
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 sum_square_butterfly(AC3EncodeContext *s, float sum[4], const float *coef0, const float *coef1, 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.
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 flags
AV_CODEC_FLAG_*.
int cpl_on
coupling turned on for this frame
const char * name
Name of the codec implementation.
static SDL_Window * window
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
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
Describe the class of an AVClass context structure.
static const AVCodecDefault ac3_defaults[]
AC-3 encoder private context.
av_cold AVFloatDSPContext * avpriv_float_dsp_alloc(int bit_exact)
Allocate a float DSP context.
void(* vector_clipf)(float *dst, const float *src, int len, float min, float max)
int num_blocks
number of blocks per frame
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[]
AVCodecContext * avctx
parent AVCodecContext
AC-3 encoder & E-AC-3 encoder common header.
static enum AVSampleFormat sample_fmts[]
#define av_malloc_array(a, b)
av_cold void ff_ac3_float_mdct_end(AC3EncodeContext *s)
Finalize MDCT and free allocated memory.
int32_t * fixed_coef_buffer
av_cold int ff_ac3_encode_init(AVCodecContext *avctx)