libavcodec/g722dec.c File Reference

G.722 ADPCM audio decoder. More...

#include "avcodec.h"
#include "get_bits.h"
#include "g722.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Defines

#define OFFSET(x)   offsetof(G722Context, x)
#define AD   AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM

Functions

static av_cold int g722_decode_init (AVCodecContext *avctx)
static int g722_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)

Variables

static const AVOption options []
static const AVClass g722_decoder_class
static const int16_t low_inv_quant5 [32]
static const int16_tlow_inv_quants [3]
AVCodec ff_adpcm_g722_decoder


Detailed Description

G.722 ADPCM audio decoder.

This G.722 decoder is a bit-exact implementation of the ITU G.722 specification for all three specified bitrates - 64000bps, 56000bps and 48000bps. It passes the ITU tests.

Note:
For the 56000bps and 48000bps bitrates, the lowest 1 or 2 bits respectively of each byte are ignored.

Definition in file g722dec.c.


Define Documentation

#define AD   AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM

Definition at line 43 of file g722dec.c.

#define OFFSET (  )     offsetof(G722Context, x)

Definition at line 42 of file g722dec.c.


Function Documentation

static int g722_decode_frame ( AVCodecContext avctx,
void *  data,
int *  got_frame_ptr,
AVPacket avpkt 
) [static]

Definition at line 87 of file g722dec.c.

static av_cold int g722_decode_init ( AVCodecContext avctx  )  [static]

Definition at line 56 of file g722dec.c.


Variable Documentation

Initial value:

 {
    .name           = "g722",
    .type           = AVMEDIA_TYPE_AUDIO,
    .id             = CODEC_ID_ADPCM_G722,
    .priv_data_size = sizeof(G722Context),
    .init           = g722_decode_init,
    .decode         = g722_decode_frame,
    .capabilities   = CODEC_CAP_DR1,
    .long_name      = NULL_IF_CONFIG_SMALL("G.722 ADPCM"),
    .priv_class     = &g722_decoder_class,
}

Definition at line 144 of file g722dec.c.

const AVClass g722_decoder_class [static]

Initial value:

 {
    .class_name = "g722 decoder",
    .item_name  = av_default_item_name,
    .option     = options,
    .version    = LIBAVUTIL_VERSION_INT,
}

Definition at line 49 of file g722dec.c.

const int16_t low_inv_quant5[32] [static]

Initial value:

 {
     -35,   -35, -2919, -2195, -1765, -1458, -1219, -1023,
    -858,  -714,  -587,  -473,  -370,  -276,  -190,  -110,
    2919,  2195,  1765,  1458,  1219,  1023,   858,   714,
     587,   473,   370,   276,   190,   110,    35,   -35
}

Definition at line 76 of file g722dec.c.

const int16_t* low_inv_quants[3] [static]

Initial value:

Definition at line 83 of file g722dec.c.

Referenced by g722_decode_frame().

const AVOption options[] [static]

Initial value:

 {
    { "bits_per_codeword", "Bits per G722 codeword", OFFSET(bits_per_codeword), AV_OPT_TYPE_FLAGS, { 8 }, 6, 8, AD },
    { NULL }
}

Definition at line 44 of file g722dec.c.


Generated on Fri Oct 26 02:43:47 2012 for FFmpeg by  doxygen 1.5.8