FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 int dolby_e_init (AVCodecContext *avctx)
 

Variables

AVCodec ff_dolby_e_decoder
 

Function Documentation

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().

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().

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().

static int parse_metadata ( DBEContext s)
static

Definition at line 91 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

static int parse_metadata_ext ( DBEContext s)
static

Definition at line 150 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

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

Definition at line 157 of file dolby_e.c.

Referenced by 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().

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().

static void calc_lowcomp ( int msk_val)
static

Definition at line 199 of file dolby_e.c.

Referenced by 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().

static int parse_bit_alloc ( DBEContext s,
DBEChannel c 
)
static

Definition at line 281 of file dolby_e.c.

Referenced by parse_channel().

static int parse_indices ( DBEContext s,
DBEChannel c 
)
static

Definition at line 327 of file dolby_e.c.

Referenced by parse_channel().

static int parse_mantissas ( DBEContext s,
DBEChannel c 
)
static

Definition at line 358 of file dolby_e.c.

Referenced by 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().

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().

static int parse_meter ( DBEContext s)
static

Definition at line 490 of file dolby_e.c.

Referenced by dolby_e_decode_frame().

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().

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().

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().

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().

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.

static av_cold void dolby_e_flush ( AVCodecContext avctx)
static

Definition at line 665 of file dolby_e.c.

static av_cold int dolby_e_close ( AVCodecContext avctx)
static

Definition at line 672 of file dolby_e.c.

static av_cold int dolby_e_init ( AVCodecContext avctx)
static

Definition at line 684 of file dolby_e.c.

Variable Documentation

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,
}
#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
float, planar
Definition: samplefmt.h:69
static void flush(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
Definition: avcodec.h:1061
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:42
#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
static int dolby_e_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: dolby_e.c:593
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static av_cold int dolby_e_init(AVCodecContext *avctx)
Definition: dolby_e.c:684
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
static av_cold void dolby_e_flush(AVCodecContext *avctx)
Definition: dolby_e.c:665
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:701
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:1002
static av_cold int dolby_e_close(AVCodecContext *avctx)
Definition: dolby_e.c:672

Definition at line 705 of file dolby_e.c.