29 #define AC3ENC_FLOAT 1 75 coord *= sqrtf(energy_ch / energy_cpl);
80 const float *coef0,
const float *coef1,
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
void(* mdct_end)(struct AC3EncodeContext *s)
av_cold void ff_kbd_window_init(float *window, float alpha, int n)
Generate a Kaiser-Bessel Derived Window.
#define LIBAVUTIL_VERSION_INT
static int allocate_sample_buffers(AC3EncodeContext *s)
const AVOption ff_ac3_enc_options[]
static av_cold int init(AVCodecContext *avctx)
const char * av_default_item_name(void *ptr)
Return the context name.
static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
int(* mdct_init)(struct AC3EncodeContext *s)
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)
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
av_cold int ff_ac3_encode_close(AVCodecContext *avctx)
Finalize encoding and free any memory allocated by the encoder.
void(* vector_clipf)(float *dst, const float *src, int len, float min, float max)
const AVCodecDefault ff_ac3_enc_defaults[]
AC3DSPContext ac3dsp
AC-3 optimized functions.
av_cold int ff_ac3_float_encode_init(AVCodecContext *avctx)
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.
av_cold AVFloatDSPContext * avpriv_float_dsp_alloc(int bit_exact)
Allocate a float DSP context.
static av_cold void ac3_float_mdct_end(AC3EncodeContext *s)
Finalize MDCT and free allocated memory.
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
int(* allocate_sample_buffers)(struct AC3EncodeContext *s)
Describe the class of an AVClass context structure.
AC-3 encoder private context.
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.
AVCodecContext * avctx
parent AVCodecContext
static av_cold int ac3_float_mdct_init(AC3EncodeContext *s)
Initialize MDCT tables.
AC-3 encoder & E-AC-3 encoder common header.
void(* sum_square_butterfly_float)(float sum[4], const float *coef0, const float *coef1, int len)
static enum AVSampleFormat sample_fmts[]
const int ff_ac3_sample_rate_tab[]
#define av_malloc_array(a, b)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later.That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another.Frame references ownership and permissions
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)