Go to the documentation of this file.
53 #define IMDCT_TYPE AV_TX_INT32_MDCT
59 50529027, 44278013, 39403370, 32292987, 27356480, 23729101, 20951060, 18755316
70 int temp, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
72 mul = (dynrng & 0x1f) + 0x20;
79 temp1 =
src[
i+1] * mul;
81 temp2 =
src[
i+2] * mul;
83 temp1 = temp1 +
round;
85 temp3 =
src[
i+3] * mul;
86 temp2 = temp2 +
round;
89 temp4 =
src[
i + 4] * mul;
90 temp3 = temp3 +
round;
93 temp5 =
src[
i+5] * mul;
94 temp4 = temp4 +
round;
96 temp6 =
src[
i+6] * mul;
99 temp5 = temp5 +
round;
100 temp7 =
src[
i+7] * mul;
101 temp6 = temp6 +
round;
103 dst[
i+5] = temp5 >>
shift;
104 temp7 = temp7 +
round;
105 dst[
i+6] = temp6 >>
shift;
106 dst[
i+7] = temp7 >>
shift;
114 dst[
i] =
src[
i ] * mul;
115 dst[
i+1] =
src[
i+1] * mul;
116 dst[
i+2] =
src[
i+2] * mul;
117 dst[
i+3] =
src[
i+3] * mul;
118 dst[
i+4] =
src[
i+4] * mul;
119 dst[
i+5] =
src[
i+5] * mul;
120 dst[
i+6] =
src[
i+6] * mul;
121 dst[
i+7] =
src[
i+7] * mul;
131 int out_ch,
int in_ch,
int len)
136 for (
i = 0;
i <
len;
i++) {
138 for (j = 0; j < in_ch; j++) {
145 }
else if (out_ch == 1) {
146 for (
i = 0;
i <
len;
i++) {
148 for (j = 0; j < in_ch; j++)
159 {
"cons_noisegen",
"enable consistent noise generation",
OFFSET(consistent_noise_generation),
AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1,
PAR },
160 {
"drc_scale",
"percentage of dynamic range compression to apply",
OFFSET(drc_scale),
AV_OPT_TYPE_FLOAT, {.dbl = 1.0}, 0.0, 6.0,
PAR },
161 {
"heavy_compr",
"enable heavy dynamic range compression",
OFFSET(heavy_compression),
AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1,
PAR },
174 .
p.
name =
"ac3_fixed",
179 .priv_data_size =
sizeof (AC3DecodeContext),
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
static const AVClass ac3_decoder_class
AVCodec p
The public AVCodec.
static int ac3_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
Decode a single AC-3 frame.
static void scale_coefs(int32_t *dst, const int32_t *src, int dynrng, int len)
#define FF_CODEC_DECODE_CB(func)
static av_cold int ac3_decode_init(AVCodecContext *avctx)
AVCodec initialization.
#define CODEC_LONG_NAME(str)
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * av_default_item_name(void *ptr)
Return the context name.
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
static int shift(int a, int b)
static const int end_freq_inv_tab[8]
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
#define i(width, name, range_min, range_max)
static av_always_inline av_const double round(double x)
AVSampleFormat
Audio sample formats.
static av_cold int ac3_decode_end(AVCodecContext *avctx)
Uninitialize the AC-3 decoder.
static const AVOption options[]
static void ac3_downmix_c_fixed16(int16_t **samples, int16_t **matrix, int out_ch, int in_ch, int len)
Downmix samples from original signal to stereo or mono (this is for 16-bit samples and fixed point de...
const char * name
Name of the codec implementation.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option keep it simple and lowercase description are in without and describe what they for example set the foo of the bar offset is the offset of the field in your see the OFFSET() macro
static av_const int sign_extend(int val, unsigned bits)
Filter the word “frame” indicates either a video frame or a group of audio samples
const FFCodec ff_ac3_fixed_decoder