29 #define AC3ENC_FLOAT 1
52 s->ac3dsp.float_to_fixed24(
s->fixed_coef_buffer + (chan_size * !cpl),
53 s->mdct_coef_buffer + (chan_size * !cpl),
54 chan_size * (
s->channels + cpl));
75 coord *= sqrtf(energy_ch / energy_cpl);
80 const float *coef0,
const float *coef1,
83 s->ac3dsp.sum_square_butterfly_float(sum, coef0, coef1,
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_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_float_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
static void clip_coefficients(AudioDSPContext *adsp, float *coef, unsigned int len)
av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx)
static av_cold int ac3_float_mdct_init(AC3EncodeContext *s)
Initialize MDCT tables.
static av_cold void ac3_float_mdct_end(AC3EncodeContext *s)
Finalize MDCT and free allocated memory.
static const AVClass ac3enc_class
static void scale_coefficients(AC3EncodeContext *s)
static void sum_square_butterfly(AC3EncodeContext *s, float sum[4], const float *coef0, const float *coef1, int len)
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)
static SDL_Window * window
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
const char * av_default_item_name(void *ptr)
Return the context name.
AVSampleFormat
Audio sample formats.
@ AV_SAMPLE_FMT_FLTP
float, 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...
av_cold AVFloatDSPContext * avpriv_float_dsp_alloc(int bit_exact)
Allocate a float 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.
int flags
AV_CODEC_FLAG_*.
const char * name
Name of the codec implementation.
void(* vector_clipf)(float *dst, const float *src, int len, float min, float max)
#define av_malloc_array(a, b)