40 s->ac3dsp.sum_square_butterfly_int32(sum, coef0, coef1,
len);
61 uint64_t coord = energy_ch / (energy_cpl >> 24);
62 uint32_t coord32 =
FFMIN(coord, 1073741824);
63 coord32 =
ff_sqrt(coord32) << 9;
79 const float scale = -1.0f;
81 int32_t *iwin =
s->mdct_window_fixed;
85 iwin[
i] =
lrintf(fwin[
i] * (1 << 22));
113 .p.name =
"ac3_fixed",
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.
static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
const FFCodec ff_ac3_fixed_encoder
static av_cold int ac3_fixed_mdct_init(AVCodecContext *avctx, AC3EncodeContext *s)
Initialize MDCT tables.
static void clip_coefficients(AudioDSPContext *adsp, int32_t *coef, unsigned int len)
static void sum_square_butterfly(AC3EncodeContext *s, int64_t sum[4], const int32_t *coef0, const int32_t *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 i(width, name, range_min, range_max)
#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)
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_S32P
signed 32 bits, 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.
AVFixedDSPContext * avpriv_alloc_fixed_dsp(int bit_exact)
Allocate and initialize a fixed DSP context.
AC-3 encoder private context.
main external API structure.
int flags
AV_CODEC_FLAG_*.
void(* vector_clip_int32)(int32_t *dst, const int32_t *src, int32_t min, int32_t max, unsigned int len)
Clip each element in an array of int32_t to a given minimum and maximum value.
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...