FFmpeg
Functions | Variables
dolby_e.c File Reference
#include "libavutil/float_dsp.h"
#include "libavutil/thread.h"
#include "libavutil/mem.h"
#include "internal.h"
#include "get_bits.h"
#include "put_bits.h"
#include "dolby_e.h"
#include "fft.h"

Go to the source code of this file.

Functions

static int skip_input (DBEContext *s, int nb_words)
 
static int parse_key (DBEContext *s)
 
static int convert_input (DBEContext *s, int nb_words, int key)
 
static int parse_metadata (DBEContext *s)
 
static int parse_metadata_ext (DBEContext *s)
 
static void unbias_exponents (DBEContext *s, DBEChannel *c, DBEGroup *g)
 
static int parse_exponents (DBEContext *s, DBEChannel *c)
 
static int log_add (int a, int b)
 
static void calc_lowcomp (int *msk_val)
 
static void bit_allocate (int nb_exponent, int nb_code, int fr_code, int *exp, int *bap, int fg_spc, int fg_ofs, int msk_mod, int snr_ofs)
 
static int parse_bit_alloc (DBEContext *s, DBEChannel *c)
 
static int parse_indices (DBEContext *s, DBEChannel *c)
 
static int parse_mantissas (DBEContext *s, DBEChannel *c)
 
static int parse_channel (DBEContext *s, int ch, int seg_id)
 
static int parse_audio (DBEContext *s, int start, int end, int seg_id)
 
static int parse_meter (DBEContext *s)
 
static void imdct_calc (DBEContext *s, DBEGroup *g, float *result, float *values)
 
static void transform (DBEContext *s, DBEChannel *c, float *history, float *output)
 
static void apply_gain (DBEContext *s, int begin, int end, float *output)
 
static int filter_frame (DBEContext *s, AVFrame *frame)
 
static int dolby_e_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 
static av_cold void dolby_e_flush (AVCodecContext *avctx)
 
static av_cold int dolby_e_close (AVCodecContext *avctx)
 
static av_cold void init_tables (void)
 
static av_cold int dolby_e_init (AVCodecContext *avctx)
 

Variables

AVCodec ff_dolby_e_decoder
 

Function Documentation

◆ skip_input()

static int skip_input ( DBEContext s,
int  nb_words 
)
static

Definition at line 31 of file dolby_e.c.

Referenced by parse_audio(), parse_key(), parse_metadata(), parse_metadata_ext(), and parse_meter().

◆ parse_key()

static int parse_key ( DBEContext s)
static

Definition at line 43 of file dolby_e.c.

Referenced by amf_tag_contents(), amf_tag_skip(), parse_audio(), and parse_metadata().

◆ convert_input()

static int convert_input ( DBEContext s,
int  nb_words,
int  key 
)
static

Definition at line 55 of file dolby_e.c.

Referenced by parse_audio(), and parse_metadata().

◆ parse_metadata()

static int parse_metadata ( DBEContext s)
static

Definition at line 91 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

◆ parse_metadata_ext()

static int parse_metadata_ext ( DBEContext s)
static

Definition at line 150 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

◆ unbias_exponents()

static void unbias_exponents ( DBEContext s,
DBEChannel c,
DBEGroup g 
)
static

Definition at line 157 of file dolby_e.c.

Referenced by parse_exponents().

◆ parse_exponents()

static int parse_exponents ( DBEContext s,
DBEChannel c 
)
static

Definition at line 174 of file dolby_e.c.

Referenced by encode_block(), and parse_channel().

◆ log_add()

static int log_add ( int  a,
int  b 
)
inlinestatic

Definition at line 193 of file dolby_e.c.

Referenced by bit_allocate(), and calc_lowcomp().

◆ calc_lowcomp()

static void calc_lowcomp ( int msk_val)
static

Definition at line 199 of file dolby_e.c.

Referenced by bit_allocate().

◆ bit_allocate()

static void bit_allocate ( int  nb_exponent,
int  nb_code,
int  fr_code,
int exp,
int bap,
int  fg_spc,
int  fg_ofs,
int  msk_mod,
int  snr_ofs 
)
static

Definition at line 232 of file dolby_e.c.

Referenced by parse_bit_alloc().

◆ parse_bit_alloc()

static int parse_bit_alloc ( DBEContext s,
DBEChannel c 
)
static

Definition at line 281 of file dolby_e.c.

Referenced by parse_channel().

◆ parse_indices()

static int parse_indices ( DBEContext s,
DBEChannel c 
)
static

Definition at line 327 of file dolby_e.c.

Referenced by parse_channel().

◆ parse_mantissas()

static int parse_mantissas ( DBEContext s,
DBEChannel c 
)
static

Definition at line 358 of file dolby_e.c.

Referenced by parse_channel().

◆ parse_channel()

static int parse_channel ( DBEContext s,
int  ch,
int  seg_id 
)
static

Definition at line 414 of file dolby_e.c.

Referenced by parse_audio().

◆ parse_audio()

static int parse_audio ( DBEContext s,
int  start,
int  end,
int  seg_id 
)
static

Definition at line 464 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

◆ parse_meter()

static int parse_meter ( DBEContext s)
static

Definition at line 490 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

◆ imdct_calc()

static void imdct_calc ( DBEContext s,
DBEGroup g,
float *  result,
float *  values 
)
static

Definition at line 497 of file dolby_e.c.

Referenced by transform().

◆ transform()

static void transform ( DBEContext s,
DBEChannel c,
float *  history,
float *  output 
)
static

Definition at line 523 of file dolby_e.c.

Referenced by filter_frame().

◆ apply_gain()

static void apply_gain ( DBEContext s,
int  begin,
int  end,
float *  output 
)
static

Definition at line 548 of file dolby_e.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( DBEContext s,
AVFrame frame 
)
static

Definition at line 565 of file dolby_e.c.

Referenced by dolby_e_decode_frame(), ff_filter_frame(), and ff_filter_frame_framed().

◆ dolby_e_decode_frame()

static int dolby_e_decode_frame ( AVCodecContext avctx,
void *  data,
int got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 593 of file dolby_e.c.

◆ dolby_e_flush()

static av_cold void dolby_e_flush ( AVCodecContext avctx)
static

Definition at line 665 of file dolby_e.c.

◆ dolby_e_close()

static av_cold int dolby_e_close ( AVCodecContext avctx)
static

Definition at line 672 of file dolby_e.c.

◆ init_tables()

static av_cold void init_tables ( void  )
static

Definition at line 685 of file dolby_e.c.

Referenced by dolby_e_init().

◆ dolby_e_init()

static av_cold int dolby_e_init ( AVCodecContext avctx)
static

Definition at line 771 of file dolby_e.c.

Variable Documentation

◆ ff_dolby_e_decoder

AVCodec ff_dolby_e_decoder
Initial value:
= {
.name = "dolby_e",
.long_name = NULL_IF_CONFIG_SMALL("Dolby E"),
.priv_data_size = sizeof(DBEContext),
.close = dolby_e_close,
}

Definition at line 792 of file dolby_e.c.

AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:69
FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:40
dolby_e_close
static av_cold int dolby_e_close(AVCodecContext *avctx)
Definition: dolby_e.c:672
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
dolby_e_init
static av_cold int dolby_e_init(AVCodecContext *avctx)
Definition: dolby_e.c:771
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:716
DBEContext
Definition: dolby_e.h:77
decode
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
dolby_e_flush
static av_cold void dolby_e_flush(AVCodecContext *avctx)
Definition: dolby_e.c:665
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
AV_CODEC_ID_DOLBY_E
@ AV_CODEC_ID_DOLBY_E
Definition: codec_id.h:495
flush
static void flush(AVCodecContext *avctx)
Definition: aacdec_template.c:500
dolby_e_decode_frame
static int dolby_e_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: dolby_e.c:593
AV_CODEC_CAP_CHANNEL_CONF
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: codec.h:102
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:50
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:48
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58