44 s->ac3dsp.float_to_fixed24(
s->fixed_coef_buffer + (chan_size * !cpl),
45 s->mdct_coef_buffer + (chan_size * !cpl),
46 chan_size * (
s->channels + cpl));
67 coord *=
sqrtf(energy_ch / energy_cpl);
72 const float *coef0,
const float *coef1,
75 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 AVClass ff_ac3enc_class
const AVChannelLayout ff_ac3_ch_layouts[19]
List of supported channel layouts.
const FFCodecDefault ff_ac3_enc_defaults[]
int ff_ac3_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
AC-3 encoder & E-AC-3 encoder common header.
int ff_ac3_float_encode_init(AVCodecContext *avctx)
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.
const FFCodec ff_ac3_encoder
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.
const int ff_ac3_sample_rate_tab[]
#define CODEC_SAMPLERATES_ARRAY(array)
#define FF_CODEC_ENCODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
#define CODEC_SAMPLEFMTS(...)
#define CODEC_CH_LAYOUTS_ARRAY(array)
static __device__ float sqrtf(float a)
int(* init)(AVBSFContext *ctx)
static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame, AVPacket *pkt)
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AV_CODEC_CAP_SMALL_LAST_FRAME
Codec can be fed a final frame with a smaller size.
@ AV_SAMPLE_FMT_FLTP
float, planar
static void scale(int *out, const int *in, const int w, const int h, const int shift)
av_cold void ff_kbd_window_init(float *window, float alpha, int n)
Generate a Kaiser-Bessel Derived Window.
av_cold AVFloatDSPContext * avpriv_float_dsp_alloc(int bit_exact)
Allocate a float DSP context.
AC-3 encoder private context.
main external API structure.
int flags
AV_CODEC_FLAG_*.
void(* vector_clipf)(float *dst, const float *src, int len, float min, float max)
av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type, int inv, int len, const void *scale, uint64_t flags)
Initialize a transform context with the given configuration (i)MDCTs with an odd length are currently...
@ AV_TX_FLOAT_MDCT
Standard MDCT with a sample data type of float, double or int32_t, respectively.