quant.c File Reference

Quantization functions. More...

#include "contributors.h"
#include "global.h"
#include "memalloc.h"
#include "block.h"
#include "image.h"
#include "mb_access.h"
#include "transform.h"
#include "quant.h"

Include dependency graph for quant.c:

Go to the source code of this file.

Functions

void init_qp_process (ImageParameters *img)
void free_qp_matrices (void)
void AssignQuantParam (pic_parameter_set_rbsp_t *pps, seq_parameter_set_rbsp_t *sps)
void CalculateQuantParam ()
void CalculateQuant8Param ()

Variables

const int dequant_coef8 [6][8][8]
const int dequant_coef [6][4][4]
const int quant_coef [6][4][4]
const int A [4][4]
int quant_intra_default [16]
int quant_inter_default [16]
int quant8_intra_default [64]
int quant8_inter_default [64]
int quant_org [16]
int quant8_org [64]
int * qp_per_matrix
int * qp_rem_matrix
int InvLevelScale4x4_Intra [3][6][4][4]
int InvLevelScale4x4_Inter [3][6][4][4]
int InvLevelScale8x8_Intra [3][6][8][8]
int InvLevelScale8x8_Inter [3][6][8][8]
int * qmatrix [12]


Detailed Description

Quantization functions.

quant.c

Author:
Main contributors (see contributors.h for copyright, address and affiliation details)

Definition in file quant.c.


Function Documentation

void AssignQuantParam ( pic_parameter_set_rbsp_t *  pps,
seq_parameter_set_rbsp_t *  sps 
)

For mapping the q-matrix to the active id and calculate quantisation values.

Parameters:
pps Picture parameter set
sps Sequence parameter set

Definition at line 277 of file quant.c.

References CalculateQuant8Param(), CalculateQuantParam(), and YUV444.

Referenced by read_new_slice().

Here is the call graph for this function:

void CalculateQuant8Param ( void   ) 

Calculate the quantisation and inverse quantisation parameters.

Definition at line 435 of file quant.c.

Referenced by AssignQuantParam().

void CalculateQuantParam ( void   ) 

For calculating the quantisation values at frame level.

Definition at line 405 of file quant.c.

References dequant_coef.

Referenced by AssignQuantParam().

void init_qp_process ( ImageParameters *  img  ) 

Initiate quantization process arrays.

Definition at line 234 of file quant.c.

References no_mem_exit().

Referenced by init_frext().

Here is the call graph for this function:


Variable Documentation

const int A[4][4]

Initial value:

 {
  { 16, 20, 16, 20},
  { 20, 25, 20, 25},
  { 16, 20, 16, 20},
  { 20, 25, 20, 25}
}

Definition at line 157 of file quant.c.

const int dequant_coef[6][4][4]

Dequantization coefficients.

Definition at line 91 of file quant.c.

Referenced by CalculateQuantParam(), and itrans_sp().

int quant8_inter_default[64]

Initial value:

 {
 9,13,15,17,19,21,22,24,
13,13,17,19,21,22,24,25,
15,17,19,21,22,24,25,27,
17,19,21,22,24,25,27,28,
19,21,22,24,25,27,28,30,
21,22,24,25,27,28,30,32,
22,24,25,27,28,30,32,33,
24,25,27,28,30,32,33,35
}

Definition at line 189 of file quant.c.

int quant8_intra_default[64]

Initial value:

 {
 6,10,13,16,18,23,25,27,
10,11,16,18,23,25,27,29,
13,16,18,23,25,27,29,31,
16,18,23,25,27,29,31,33,
18,23,25,27,29,31,33,36,
23,25,27,29,31,33,36,38,
25,27,29,31,33,36,38,40,
27,29,31,33,36,38,40,42
}

Definition at line 178 of file quant.c.

int quant8_org[64]

Initial value:

 { 
16,16,16,16,16,16,16,16,
16,16,16,16,16,16,16,16,
16,16,16,16,16,16,16,16,
16,16,16,16,16,16,16,16,
16,16,16,16,16,16,16,16,
16,16,16,16,16,16,16,16,
16,16,16,16,16,16,16,16,
16,16,16,16,16,16,16,16
}

Definition at line 207 of file quant.c.

int quant_inter_default[16]

Initial value:

 {
  10,14,20,24,
  14,20,24,27,
  20,24,27,30,
  24,27,30,34
}

Definition at line 171 of file quant.c.

int quant_intra_default[16]

Initial value:

 {
   6,13,20,28,
  13,20,28,32,
  20,28,32,37,
  28,32,37,42
}

Definition at line 164 of file quant.c.

int quant_org[16]

Initial value:

 { 
16,16,16,16,
16,16,16,16,
16,16,16,16,
16,16,16,16
}

Definition at line 200 of file quant.c.


Documentation generated with DoxyGen