FFmpeg
Classes | Macros | Typedefs | Enumerations | Variables
wmavoice.c File Reference

Windows Media Audio Voice compatible decoder. More...

#include <math.h>
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "libavutil/mem.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "internal.h"
#include "get_bits.h"
#include "put_bits.h"
#include "wmavoice_data.h"
#include "celp_filters.h"
#include "acelp_vectors.h"
#include "acelp_filters.h"
#include "lsp.h"
#include "dct.h"
#include "rdft.h"
#include "sinewin.h"

Classes

struct  frame_type_desc
 Description of frame types.
 
struct  WMAVoiceContext
 WMA Voice decoding context. More...
 

Macros

#define MAX_BLOCKS   8
 maximum number of blocks per frame
 
#define MAX_LSPS   16
 maximum filter order
 
#define MAX_LSPS_ALIGN16   16
 same as MAX_LSPS; needs to be multiple More...
 
#define MAX_FRAMES   3
 maximum number of frames per superframe
 
#define MAX_FRAMESIZE   160
 maximum number of samples per frame
 
#define MAX_SIGNAL_HISTORY   416
 maximum excitation signal history
 
#define MAX_SFRAMESIZE   (MAX_FRAMESIZE * MAX_FRAMES)
 maximum number of samples per superframe
 
#define SFRAME_CACHE_MAXSIZE   256
 maximum cache size for frame data that More...
 
#define VLC_NBITS   6
 number of bits to read per VLC iteration
 
#define log_range(var, assign)
 

Typedefs

typedef struct WMAVoiceContext WMAVoiceContext
 WMA Voice decoding context.
 

Enumerations

enum  { ACB_TYPE_NONE = 0, ACB_TYPE_ASYMMETRIC = 1, ACB_TYPE_HAMMING = 2 }
 Adaptive codebook types. More...
 
enum  { FCB_TYPE_SILENCE = 0, FCB_TYPE_HARDCODED = 1, FCB_TYPE_AW_PULSES = 2, FCB_TYPE_EXC_PULSES = 3 }
 Fixed codebook types. More...
 

Variables

AVCodec ff_wmavoice_decoder
 

Detailed Description

Windows Media Audio Voice compatible decoder.

Author
Ronald S. Bultje rsbul.nosp@m.tje@.nosp@m.gmail.nosp@m..com

Macro Definition Documentation

§ log_range

#define log_range (   var,
  assign 
)
Value:
do { \
float tmp = log10f(assign); var = tmp; \
max = FFMAX(max, tmp); min = FFMIN(min, tmp); \
} while (0)

§ MAX_LSPS_ALIGN16

#define MAX_LSPS_ALIGN16   16

same as MAX_LSPS; needs to be multiple

of 16 for ASM input buffer alignment

§ SFRAME_CACHE_MAXSIZE

#define SFRAME_CACHE_MAXSIZE   256

maximum cache size for frame data that

was split over two packets

Enumeration Type Documentation

§ anonymous enum

anonymous enum

Adaptive codebook types.

Enumerator
ACB_TYPE_NONE 

no adaptive codebook (only hardcoded fixed)

ACB_TYPE_ASYMMETRIC 

adaptive codebook with per-frame pitch, which we interpolate to get a per-sample pitch.

Signal is generated using an asymmetric sinc window function

Note
see #wmavoice_ipol1_coeffs
ACB_TYPE_HAMMING 

Per-block pitch with signal generation using a Hamming sinc window function.

Note
see #wmavoice_ipol2_coeffs

§ anonymous enum

anonymous enum

Fixed codebook types.

Enumerator
FCB_TYPE_SILENCE 

comfort noise during silence generated from a hardcoded (fixed) codebook with per-frame (low) gain values

FCB_TYPE_HARDCODED 

hardcoded (fixed) codebook with per-block gain values

FCB_TYPE_AW_PULSES 

Pitch-adaptive window (AW) pulse signals, used in particular for low-bitrate streams.

FCB_TYPE_EXC_PULSES 

Innovation (fixed) codebook pulse sets in combinations of either single pulses or pulse pairs.

Variable Documentation

§ ff_wmavoice_decoder

AVCodec ff_wmavoice_decoder
Initial value:
= {
.name = "wmavoice",
.long_name = NULL_IF_CONFIG_SMALL("Windows Media Audio Voice"),
.type = AVMEDIA_TYPE_AUDIO,
.id = AV_CODEC_ID_WMAVOICE,
.priv_data_size = sizeof(WMAVoiceContext),
.init = wmavoice_decode_init,
.close = wmavoice_decode_end,
.decode = wmavoice_decode_packet,
.flush = wmavoice_flush,
}
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: avcodec.h:984
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AV_CODEC_CAP_SUBFRAMES
Codec can output multiple frames per AVPacket Normally demuxers return one frame at a time...
Definition: avcodec.h:1002
struct WMAVoiceContext WMAVoiceContext
WMA Voice decoding context.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959