Go to the documentation of this file.
50 #include "config_components.h"
54 #define IMDCT_TYPE AV_TX_INT32_MDCT
60 50529027, 44278013, 39403370, 32292987, 27356480, 23729101, 20951060, 18755316
71 int temp, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
73 mul = (dynrng & 0x1f) + 0x20;
80 temp1 =
src[
i+1] * mul;
82 temp2 =
src[
i+2] * mul;
84 temp1 = temp1 +
round;
86 temp3 =
src[
i+3] * mul;
87 temp2 = temp2 +
round;
90 temp4 =
src[
i + 4] * mul;
91 temp3 = temp3 +
round;
94 temp5 =
src[
i+5] * mul;
95 temp4 = temp4 +
round;
97 temp6 =
src[
i+6] * mul;
100 temp5 = temp5 +
round;
101 temp7 =
src[
i+7] * mul;
102 temp6 = temp6 +
round;
105 temp7 = temp7 +
round;
132 int out_ch,
int in_ch,
int len)
137 for (
i = 0;
i <
len;
i++) {
139 for (j = 0; j < in_ch; j++) {
146 }
else if (out_ch == 1) {
147 for (
i = 0;
i <
len;
i++) {
149 for (j = 0; j < in_ch; j++)
156 #if CONFIG_EAC3_DECODER
162 {
"cons_noisegen",
"enable consistent noise generation",
OFFSET(consistent_noise_generation),
AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1,
PAR },
163 {
"drc_scale",
"percentage of dynamic range compression to apply",
OFFSET(drc_scale),
AV_OPT_TYPE_FLOAT, {.dbl = 1.0}, 0.0, 6.0,
PAR },
164 {
"heavy_compr",
"enable heavy dynamic range compression",
OFFSET(heavy_compression),
AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1,
PAR },
177 .
p.
name =
"ac3_fixed",
182 .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.
@ AV_OPT_TYPE_CHLAYOUT
Underlying C type is AVChannelLayout.
#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)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static const int end_freq_inv_tab[8]
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
#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
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
const FFCodec ff_ac3_fixed_decoder