libmpcdec: src/requant.c File Reference

Main Page | Class List | Directories | File List | Class Members | File Members | Related Pages

# requant.c File Reference

`#include <mpcdec/mpcdec.h>`
`#include <mpcdec/internal.h>`

Go to the source code of this file.

## Defines
#define | _(X) MAKE_MPC_SAMPLE_EX(X,14)
#define | SET_SCF(N, X) d->SCF[N] = MAKE_MPC_SAMPLE_EX(X,d->SCF_shift[N] = (unsigned char)find_shift(X));
## Functions
void | mpc_decoder_scale_output (mpc_decoder *d, double factor)
void | mpc_decoder_initialisiere_quantisierungstabellen (mpc_decoder *d, double scale_factor)
## Variables
const mpc_uint32_t | Res_bit [18]
const MPC_SAMPLE_FORMAT | __Cc [1+18]
const mpc_int32_t | __Dc [1+18]

## Detailed Description

Requantization function implementations.

Todo:
  document me

Definition in file requant.c.

## Function Documentation

void mpc_decoder_scale_output | ( | mpc_decoder * | d,
|  | double | scale_factor
| ) |

  | Sets decoder sample scaling factor. All decoded samples will be multiplied by this factor. Parameters:
  | scale_factor | multiplicative scaling factor
Definition at line 89 of file requant.c. References MPC_FIXED_POINT_SHIFT, and SET_SCF. Referenced by mpc_decoder_initialisiere_quantisierungstabellen().

## Variable Documentation

const MPC_SAMPLE_FORMAT __Cc[1+18]

| Initial value:
     {
          _(111.285962475327f),
        _(65536.000000000000f), _(21845.333333333332f), _(13107.200000000001f), _(9362.285714285713f),
        _(7281.777777777777f),  _(4369.066666666666f),  _(2114.064516129032f), _(1040.253968253968f),
         _(516.031496062992f),  _(257.003921568627f),   _(128.250489236790f),   _(64.062561094819f),
           _(32.015632633121f),    _(16.003907203907f),     _(8.000976681723f),    _(4.000244155527f),
            _(2.000061037018f),     _(1.000015259021f)
    }
Definition at line 53 of file requant.c.

const mpc_int32_t __Dc[1+18]

| Initial value:
     {
          2,
          0,     1,     2,     3,     4,     7,    15,    31,    63,
        127,   255,   511,  1023,  2047,  4095,  8191, 16383, 32767
    }
Definition at line 66 of file requant.c.

const mpc_uint32_t Res_bit[18]

| Initial value:
     {
        0,  0,  0,  0,  0,  0,  0,  0,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16
    }
Definition at line 44 of file requant.c. Referenced by mpc_decoder_read_bitstream_sv6(), and mpc_decoder_read_bitstream_sv7().