Go to the documentation of this file.
57 50529027, 44278013, 39403370, 32292987, 27356480, 23729101, 20951060, 18755316
68 int temp, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
70 mul = (dynrng & 0x1f) + 0x20;
81 temp1 = temp1 +
round;
84 temp2 = temp2 +
round;
88 temp3 = temp3 +
round;
92 temp4 = temp4 +
round;
97 temp5 = temp5 +
round;
99 temp6 = temp6 +
round;
101 dst[
i+5] = temp5 >>
shift;
102 temp7 = temp7 +
round;
103 dst[
i+6] = temp6 >>
shift;
104 dst[
i+7] = temp7 >>
shift;
129 int out_ch,
int in_ch,
int len)
134 for (
i = 0;
i <
len;
i++) {
136 for (j = 0; j < in_ch; j++) {
143 }
else if (out_ch == 1) {
144 for (
i = 0;
i <
len;
i++) {
146 for (j = 0; j < in_ch; j++)
157 {
"cons_noisegen",
"enable consistent noise generation",
OFFSET(consistent_noise_generation),
AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1,
PAR },
158 {
"drc_scale",
"percentage of dynamic range compression to apply",
OFFSET(drc_scale),
AV_OPT_TYPE_FLOAT, {.dbl = 1.0}, 0.0, 6.0,
PAR },
159 {
"heavy_compr",
"enable heavy dynamic range compression",
OFFSET(heavy_compression),
AV_OPT_TYPE_BOOL, {.i64 = 0 }, 0, 1,
PAR },
174 .priv_data_size =
sizeof (AC3DecodeContext),
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
static const AVClass ac3_decoder_class
static void scale_coefs(int32_t *dst, const int32_t *src, int dynrng, int len)
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
static av_cold int ac3_decode_init(AVCodecContext *avctx)
AVCodec initialization.
static float mul(float src0, float src1)
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
const char * av_default_item_name(void *ptr)
Return the context name.
const AVCodec ff_ac3_fixed_decoder
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
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)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
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
static int shift(int a, int b)
static int ac3_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Decode a single AC-3 frame.