libavcodec/g726.c File Reference

#include <limits.h>
#include "libavutil/avassert.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
#include "get_bits.h"
#include "put_bits.h"

Go to the source code of this file.

Data Structures

struct  Float11
 G.726 11bit float. More...
struct  G726Tables
struct  G726Context

Functions

static Float11i2f (int i, Float11 *f)
static int16_t mult (Float11 *f1, Float11 *f2)
static int sgn (int value)
static uint8_t quant (G726Context *c, int d)
 Para 4.2.2 page 18: Adaptive quantizer.
static int16_t inverse_quant (G726Context *c, int i)
 Para 4.2.3 page 22: Inverse adaptive quantizer.
static int16_t g726_decode (G726Context *c, int I)
static av_cold int g726_reset (G726Context *c)

Variables

static const int quant_tbl16 []
 16kbit/s 2bits per sample
static const int16_t iquant_tbl16 []
static const int16_t W_tbl16 []
static const uint8_t F_tbl16 []
static const int quant_tbl24 []
 24kbit/s 3bits per sample
static const int16_t iquant_tbl24 []
static const int16_t W_tbl24 []
static const uint8_t F_tbl24 []
static const int quant_tbl32 []
 32kbit/s 4bits per sample
static const int16_t iquant_tbl32 []
static const int16_t W_tbl32 []
static const uint8_t F_tbl32 []
static const int quant_tbl40 []
 40kbit/s 5bits per sample
static const int16_t iquant_tbl40 []
static const int16_t W_tbl40 []
static const uint8_t F_tbl40 []
static const G726Tables G726Tables_pool []


Function Documentation

static int16_t g726_decode ( G726Context c,
int  I 
) [static]

Definition at line 192 of file g726.c.

static av_cold int g726_reset ( G726Context c  )  [static]

Definition at line 274 of file g726.c.

static Float11* i2f ( int  i,
Float11 f 
) [inline, static]

Definition at line 44 of file g726.c.

Referenced by g726_decode().

static int16_t inverse_quant ( G726Context c,
int  i 
) [inline, static]

Para 4.2.3 page 22: Inverse adaptive quantizer.

Definition at line 182 of file g726.c.

static int16_t mult ( Float11 f1,
Float11 f2 
) [inline, static]

Definition at line 54 of file g726.c.

Referenced by encode_block(), encode_frame(), g726_decode(), select_palette(), and wma_decode_block().

static uint8_t quant ( G726Context c,
int  d 
) [inline, static]

Para 4.2.2 page 18: Adaptive quantizer.

Definition at line 156 of file g726.c.

static int sgn ( int  value  )  [inline, static]

Definition at line 64 of file g726.c.

Referenced by g726_decode().


Variable Documentation

const uint8_t F_tbl16[] [static]

Initial value:

           { 0, 7, 7, 0 }

Definition at line 106 of file g726.c.

const uint8_t F_tbl24[] [static]

Initial value:

           { 0, 1, 2, 7, 7, 2, 1, 0 }

Definition at line 115 of file g726.c.

const uint8_t F_tbl32[] [static]

Initial value:

           { 0, 0, 0, 1, 1, 1, 3, 7, 7, 3, 1, 1, 1, 0, 0, 0 }

Definition at line 126 of file g726.c.

const uint8_t F_tbl40[] [static]

Initial value:

           { 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 6,
             6, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }

Definition at line 142 of file g726.c.

const G726Tables G726Tables_pool[] [static]

const int16_t iquant_tbl16[] [static]

Initial value:

           { 116, 365, 365, 116 }

Definition at line 102 of file g726.c.

const int16_t iquant_tbl24[] [static]

Initial value:

           { INT16_MIN, 135, 273, 373, 373, 273, 135, INT16_MIN }

Definition at line 111 of file g726.c.

const int16_t iquant_tbl32[] [static]

Initial value:

         { INT16_MIN,   4, 135, 213, 273, 323, 373, 425,
                 425, 373, 323, 273, 213, 135,   4, INT16_MIN }

Definition at line 120 of file g726.c.

const int16_t iquant_tbl40[] [static]

Initial value:

         { INT16_MIN, -66,  28, 104, 169, 224, 274, 318,
                 358, 395, 429, 459, 488, 514, 539, 566,
                 566, 539, 514, 488, 459, 429, 395, 358,
                 318, 274, 224, 169, 104,  28, -66, INT16_MIN }

Definition at line 132 of file g726.c.

const int quant_tbl16[] [static]

Initial value:

           { 260, INT_MAX }
16kbit/s 2bits per sample

Definition at line 100 of file g726.c.

const int quant_tbl24[] [static]

Initial value:

           {  7, 217, 330, INT_MAX }
24kbit/s 3bits per sample

Definition at line 109 of file g726.c.

const int quant_tbl32[] [static]

Initial value:

           { -125,  79, 177, 245, 299, 348, 399, INT_MAX }
32kbit/s 4bits per sample

Definition at line 118 of file g726.c.

const int quant_tbl40[] [static]

Initial value:

           { -122, -16,  67, 138, 197, 249, 297, 338,
              377, 412, 444, 474, 501, 527, 552, INT_MAX }
40kbit/s 5bits per sample

Definition at line 129 of file g726.c.

const int16_t W_tbl16[] [static]

Initial value:

           { -22, 439, 439, -22 }

Definition at line 104 of file g726.c.

const int16_t W_tbl24[] [static]

Initial value:

           { -4,  30, 137, 582, 582, 137,  30, -4 }

Definition at line 113 of file g726.c.

const int16_t W_tbl32[] [static]

Initial value:

           { -12,  18,  41,  64, 112, 198, 355, 1122,
            1122, 355, 198, 112,  64,  41,  18, -12}

Definition at line 123 of file g726.c.

const int16_t W_tbl40[] [static]

Initial value:

           {   14,  14,  24,  39,  40,  41,   58,  100,
              141, 179, 219, 280, 358, 440,  529,  696,
              696, 529, 440, 358, 280, 219,  179,  141,
              100,  58,  41,  40,  39,  24,   14,   14 }

Definition at line 137 of file g726.c.


Generated on Fri Oct 26 02:50:05 2012 for FFmpeg by  doxygen 1.5.8