macroblock.c File Reference

Decode a Macroblock. More...

#include "contributors.h"
#include <math.h>
#include "global.h"
#include "mbuffer.h"
#include "elements.h"
#include "errorconcealment.h"
#include "macroblock.h"
#include "fmo.h"
#include "cabac.h"
#include "vlc.h"
#include "image.h"
#include "mb_access.h"
#include "biaridecod.h"
#include "block.h"
#include "transform8x8.h"
#include "transform.h"
#include "mc_prediction.h"
#include "quant.h"
#include "intra4x4_pred.h"
#include "intra8x8_pred.h"
#include "intra16x16_pred.h"

Include dependency graph for macroblock.c:

Go to the source code of this file.

Defines

#define TRACE_STRING(s)
#define TRACE_DECBITS(i)
#define TRACE_PRINTF(s)
#define TRACE_STRING_P(s)
#define ZERO_P8x8   (mbmode==5)
#define MODE_IS_P8x8   (mbmode==4 || mbmode==5)
#define MODE_IS_I4x4   (mbmode==6)
#define I16OFFSET   (mbmode-7)
#define MODE_IS_IPCM   (mbmode==31)

Functions

void dectracebitcnt (int count)
static void readMotionInfoFromNAL (ImageParameters *img, Slice *currSlice, Macroblock *currMB)
static void read_ipred_modes (ImageParameters *img, Slice *currSlice, Macroblock *currMB)
static void readCBPandCoeffsFromNAL (ImageParameters *img, Slice *currSlice, Macroblock *currMB)
static void readIPCMcoeffsFromNAL (ImageParameters *img, struct datapartition *dP)
int BType2CtxRef (int btype)
static char readRefPictureIdx_VLC (SyntaxElement *currSE, DataPartition *dP, char b8mode, int list)
static char readRefPictureIdx_FLC (SyntaxElement *currSE, DataPartition *dP, char b8mode, int list)
static char readRefPictureIdx_Null (SyntaxElement *currSE, DataPartition *dP, char b8mode, int list)
static void prepareListforRefIdx (SyntaxElement *currSE, DataPartition *dP, int num_ref_idx_active, int refidx_present)
void set_chroma_qp (ImageParameters *img, Macroblock *currMB)
void update_qp (ImageParameters *img, Macroblock *currMB, int qp)
static void read_delta_quant (SyntaxElement *currSE, DataPartition *dP, Slice *currSlice, ImageParameters *img, Macroblock *currMB, byte *partMap, int type)
static void readMBRefPictureIdx (SyntaxElement *currSE, DataPartition *dP, Macroblock *currMB, ImageParameters *img, char **cur_ref_idx, int list, int step_v0, int step_h0)
static void readMBMotionVectors (SyntaxElement *currSE, DataPartition *dP, Macroblock *currMB, ImageParameters *img, int list, int step_h0, int step_v0)
void invScaleCoeff (ImageParameters *img, Macroblock *currMB, int level, int run, int qp_per, int i, int j, int i0, int j0, int coef_ctr, const byte(*pos_scan4x4)[2], int(*InvLevelScale4x4)[4])
void start_macroblock (ImageParameters *img, Macroblock **currMB)
Boolean exit_macroblock (ImageParameters *img, int eos_bit)
static void interpret_mb_mode_P (Macroblock *currMB)
static void interpret_mb_mode_I (Macroblock *currMB)
static void interpret_mb_mode_B (Macroblock *currMB)
static void interpret_mb_mode_SI (Macroblock *currMB)
void set_interpret_mb_mode (int slice_type)
static void init_macroblock (ImageParameters *img)
void SetB8Mode (ImageParameters *img, Macroblock *currMB, int value, int i)
void reset_coeffs (void)
void field_flag_inference (Macroblock *currMB)
void skip_macroblock (ImageParameters *img, Macroblock *currMB)
static void concealIPCMcoeffs (ImageParameters *img)
void read_one_macroblock (ImageParameters *img, Slice *currSlice, Macroblock *currMB)
static void init_decoding_engine_IPCM (ImageParameters *img)
void get_neighbors (Macroblock *currMB, PixelPos *block_a, PixelPos *block_b, PixelPos *block_c, PixelPos *block_d, int mb_x, int mb_y, int blockshape_x)
void GetMotionVectorPredictor (Macroblock *currMB, PixelPos *block_a, PixelPos *block_b, PixelPos *block_c, short pmv[2], char ref_frame, char **refPic, short ***tmp_mv, int mb_x, int mb_y, int blockshape_x, int blockshape_y)
int predict_nnz (Macroblock *currMB, int block_type, ImageParameters *img, int i, int j)
int predict_nnz_chroma (Macroblock *currMB, ImageParameters *img, int i, int j)
static void readCoeff4x4_CAVLC (Slice *currSlice, Macroblock *currMB, ImageParameters *img, int block_type, int i, int j, int levarr[16], int runarr[16], int *number_coefficients)
static void readCompCoeff4x4SMB_CABAC (ImageParameters *img, Slice *currSlice, Macroblock *currMB, SyntaxElement *currSE, ColorPlane pl, int block_y, int block_x, int start_scan, int64 *cbp_blk)
static void readCompCoeff4x4MB_CABAC (ImageParameters *img, Slice *currSlice, Macroblock *currMB, SyntaxElement *currSE, ColorPlane pl, int intra, int(*InvLevelScale4x4)[4], int qp_per, int cbp)
static void readCompCoeff8x8_CABAC (ImageParameters *img, Slice *currSlice, Macroblock *currMB, SyntaxElement *currSE, ColorPlane pl, int b8)
static void readCompCoeff8x8MB_CABAC (ImageParameters *img, Slice *currSlice, Macroblock *currMB, SyntaxElement *currSE, ColorPlane pl)
static void readCompCoeff4x4MB_CAVLC (ImageParameters *img, Slice *currSlice, Macroblock *currMB, ColorPlane pl, int(*InvLevelScale4x4)[4], int qp_per, int cbp, byte **nzcoeff)
static void readCompCoeff8x8MB_CAVLC (ImageParameters *img, Slice *currSlice, Macroblock *currMB, ColorPlane pl, int(*InvLevelScale8x8)[8], int qp_per, int cbp, byte **nzcoeff)
static void check_dp_neighbors (Macroblock *currMB)
void decode_ipcm_mb (ImageParameters *img, Macroblock *currMB)
int decode_one_component (ImageParameters *img, ColorPlane curr_plane, imgpel **currImg, Macroblock *currMB, StorablePicture *dec_picture, MotionParams *colocated, int list_offset)
int decode_one_macroblock (ImageParameters *img, Macroblock *currMB, StorablePicture *dec_picture)
void change_plane_JV (int nplane)
void make_frame_picture_JV ()

Variables

static const byte SNGL_SCAN [16][2]
static const byte FIELD_SCAN [16][2]
static const int BLOCK_STEP [8][2]
const byte QP_SCALE_CR [52]
const byte SNGL_SCAN8x8 [64][2]
const byte FIELD_SCAN8x8 [64][2]
static const byte SCAN_YUV422 [8][2]
static unsigned char cbp_blk_chroma [8][4]
const unsigned char subblk_offset_x [3][8][4]
const unsigned char subblk_offset_y [3][8][4]
const unsigned char cofuv_blk_x [3][8][4]
static const unsigned char cofuv_blk_y [3][8][4]
int last_dquant
ColocatedParams * Co_located
ColocatedParams * Co_located_JV [MAX_PLANE]
static void(* interpret_mb_mode )(Macroblock *currMB)
static char(* readRefPictureIdx )(SyntaxElement *currSE, DataPartition *dP, char b8mode, int list)


Detailed Description

Decode a Macroblock.

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

Definition in file macroblock.c.


Function Documentation

int BType2CtxRef ( int  btype  ) 

Set context for reference frames.

Definition at line 269 of file macroblock.c.

Referenced by readRefPictureIdx_FLC(), and readRefPictureIdx_VLC().

void change_plane_JV ( int  nplane  ) 

change target plane for 4:4:4 Independent mode

Definition at line 4722 of file macroblock.c.

References dec_picture_JV.

Referenced by decode_one_slice(), and exit_picture().

static void check_dp_neighbors ( Macroblock *  currMB  )  [static]

Data partitioning: Check if neighboring macroblock is needed for CAVLC context decoding, and disable current MB if data partition is missing.

Definition at line 3297 of file macroblock.c.

References macroblock::dpl_flag.

Referenced by readCBPandCoeffsFromNAL().

void decode_ipcm_mb ( ImageParameters *  img,
Macroblock *  currMB 
)

Copy IPCM coefficients to decoded picture buffer and set parameters for this MB (for IPCM CABAC and IPCM CAVLC 28/11/2003).

Author:
Dong Wang <Dong.Wang@bristol.ac.uk>

Definition at line 4154 of file macroblock.c.

References macroblock::cbp_blk, storable_picture::chroma_format_idc, storable_picture::imgUV, storable_picture::imgY, macroblock::skip_flag, update_qp(), and YUV400.

Referenced by decode_one_macroblock().

Here is the call graph for this function:

int decode_one_component ( ImageParameters *  img,
ColorPlane  curr_plane,
imgpel **  currImg,
Macroblock *  currMB,
StorablePicture *  dec_picture,
MotionParams *  colocated,
int  list_offset 
)

int decode_one_macroblock ( ImageParameters *  img,
Macroblock *  currMB,
StorablePicture *  dec_picture 
)

Boolean exit_macroblock ( ImageParameters *  img,
int  eos_bit 
)

set coordinates of the next macroblock check end_of_slice condition

The if() statement below resembles the original code, which tested

img->current_mb_nr == img->PicSizeInMbs. Both is, of course, nonsense In an error prone environment, one can only be sure to have a new picture by checking the tr of the next slice header!

Definition at line 630 of file macroblock.c.

References FmoGetNextMBNr().

Referenced by decode_one_slice().

Here is the call graph for this function:

void get_neighbors ( Macroblock *  currMB,
PixelPos *  block_a,
PixelPos *  block_b,
PixelPos *  block_c,
PixelPos *  block_d,
int  mb_x,
int  mb_y,
int  blockshape_x 
)

Get current block spatial neighbors.

Definition at line 1740 of file macroblock.c.

References get4x4Neighbour().

Referenced by readMBMotionVectors().

Here is the call graph for this function:

void GetMotionVectorPredictor ( Macroblock *  currMB,
PixelPos *  block_a,
PixelPos *  block_b,
PixelPos *  block_c,
short  pmv[2],
char  ref_frame,
char **  refPic,
short ***  tmp_mv,
int  mb_x,
int  mb_y,
int  blockshape_x,
int  blockshape_y 
)

Get motion vector predictor.

Definition at line 1790 of file macroblock.c.

References macroblock::mb_field.

Referenced by readMBMotionVectors().

static void init_decoding_engine_IPCM ( ImageParameters *  img  )  [static]

Initialize decoding engine after decoding an IPCM macroblock (for IPCM CABAC 28/11/2003).

Author:
Dong Wang <Dong.Wang@bristol.ac.uk>

Definition at line 1505 of file macroblock.c.

References arideco_start_decoding(), datapartition::bitstream, datapartition::de_cabac, Slice::dp_mode, PAR_DP_1, PAR_DP_3, Slice::partArr, Bitstream::read_len, and Bitstream::streamBuffer.

Referenced by readIPCMcoeffsFromNAL().

Here is the call graph for this function:

static void init_macroblock ( ImageParameters *  img  )  [static]

static void interpret_mb_mode_B ( Macroblock *  currMB  )  [static]

Interpret the mb mode for B-Frames.

Definition at line 762 of file macroblock.c.

References macroblock::b8mode, macroblock::b8pdir, macroblock::cbp, macroblock::i16mode, and macroblock::mb_type.

Referenced by set_interpret_mb_mode().

static void interpret_mb_mode_I ( Macroblock *  currMB  )  [static]

Interpret the mb mode for I-Frames.

Definition at line 726 of file macroblock.c.

References macroblock::b8mode, macroblock::b8pdir, macroblock::cbp, macroblock::i16mode, and macroblock::mb_type.

Referenced by set_interpret_mb_mode().

static void interpret_mb_mode_P ( Macroblock *  currMB  )  [static]

Interpret the mb mode for P-Frames.

Definition at line 673 of file macroblock.c.

References macroblock::b8mode, macroblock::b8pdir, macroblock::cbp, macroblock::i16mode, and macroblock::mb_type.

Referenced by set_interpret_mb_mode().

static void interpret_mb_mode_SI ( Macroblock *  currMB  )  [static]

Interpret the mb mode for SI-Frames.

Definition at line 843 of file macroblock.c.

References macroblock::b8mode, macroblock::b8pdir, macroblock::cbp, macroblock::i16mode, and macroblock::mb_type.

Referenced by set_interpret_mb_mode().

void make_frame_picture_JV ( void   ) 

make frame picture from each plane data for 4:4:4 Independent mode

Definition at line 4737 of file macroblock.c.

References dec_picture_JV, free_storable_picture(), storable_picture::imgUV, storable_picture::imgY, storable_picture::JVmotion, and storable_picture::motion.

Referenced by exit_picture().

Here is the call graph for this function:

int predict_nnz ( Macroblock *  currMB,
int  block_type,
ImageParameters *  img,
int  i,
int  j 
)

Get the Prediction from the Neighboring Blocks for Number of Nonzero Coefficients.

Luma Blocks

Definition at line 2226 of file macroblock.c.

References error(), get4x4Neighbour(), and PAR_DP_3.

Referenced by readCoeff4x4_CAVLC().

Here is the call graph for this function:

int predict_nnz_chroma ( Macroblock *  currMB,
ImageParameters *  img,
int  i,
int  j 
)

Get the Prediction from the Neighboring Blocks for Number of Nonzero Coefficients.

Chroma Blocks

Definition at line 2316 of file macroblock.c.

References storable_picture::chroma_format_idc, get4x4Neighbour(), PAR_DP_3, and YUV444.

Referenced by readCoeff4x4_CAVLC().

Here is the call graph for this function:

static void prepareListforRefIdx ( SyntaxElement *  currSE,
DataPartition *  dP,
int  num_ref_idx_active,
int  refidx_present 
) [inline, static]

Function to prepare reference picture indice function pointer.

Definition at line 340 of file macroblock.c.

References datapartition::bitstream, Bitstream::ei_flag, linfo_ue(), syntaxelement::mapping, syntaxelement::reading, readRefFrame_CABAC(), readRefPictureIdx, readRefPictureIdx_FLC(), readRefPictureIdx_Null(), and readRefPictureIdx_VLC().

Referenced by readMotionInfoFromNAL().

Here is the call graph for this function:

static void read_ipred_modes ( ImageParameters *  img,
Slice *  currSlice,
Macroblock *  currMB 
) [static]

void read_one_macroblock ( ImageParameters *  img,
Slice *  currSlice,
Macroblock *  currMB 
)

static void readCBPandCoeffsFromNAL ( ImageParameters *  img,
Slice *  currSlice,
Macroblock *  currMB 
) [static]

static void readCoeff4x4_CAVLC ( Slice *  currSlice,
Macroblock *  currMB,
ImageParameters *  img,
int  block_type,
int  i,
int  j,
int  levarr[16],
int  runarr[16],
int *  number_coefficients 
) [static]

static void readCompCoeff4x4MB_CABAC ( ImageParameters *  img,
Slice *  currSlice,
Macroblock *  currMB,
SyntaxElement *  currSE,
ColorPlane  pl,
int  intra,
int(*)  InvLevelScale4x4[4],
int  qp_per,
int  cbp 
) [static]

Get coefficients (run/level) of all 4x4 blocks in a MB from the NAL (CABAC Mode).

Definition at line 2769 of file macroblock.c.

References macroblock::cbp_blk, syntaxelement::context, macroblock::is_lossless, and readCompCoeff4x4SMB_CABAC().

Referenced by readCBPandCoeffsFromNAL().

Here is the call graph for this function:

static void readCompCoeff4x4MB_CAVLC ( ImageParameters *  img,
Slice *  currSlice,
Macroblock *  currMB,
ColorPlane  pl,
int(*)  InvLevelScale4x4[4],
int  qp_per,
int  cbp,
byte **  nzcoeff 
) [static]

Get coefficients (run/level) of 4x4 blocks in a MB from the NAL (CABAC Mode).

Definition at line 3023 of file macroblock.c.

References macroblock::cbp_blk, FIELD_SCAN, macroblock::is_lossless, macroblock::mb_field, readCoeff4x4_CAVLC(), and SNGL_SCAN.

Referenced by readCBPandCoeffsFromNAL().

Here is the call graph for this function:

static void readCompCoeff4x4SMB_CABAC ( ImageParameters *  img,
Slice *  currSlice,
Macroblock *  currMB,
SyntaxElement *  currSE,
ColorPlane  pl,
int  block_y,
int  block_x,
int  start_scan,
int64 *  cbp_blk 
) [static]

static void readCompCoeff8x8_CABAC ( ImageParameters *  img,
Slice *  currSlice,
Macroblock *  currMB,
SyntaxElement *  currSE,
ColorPlane  pl,
int  b8 
) [static]

static void readCompCoeff8x8MB_CABAC ( ImageParameters *  img,
Slice *  currSlice,
Macroblock *  currMB,
SyntaxElement *  currSE,
ColorPlane  pl 
) [static]

Get coefficients (run/level) of 8x8 blocks in a MB from the NAL (CABAC Mode).

Definition at line 3007 of file macroblock.c.

References readCompCoeff8x8_CABAC().

Referenced by readCBPandCoeffsFromNAL().

Here is the call graph for this function:

static void readCompCoeff8x8MB_CAVLC ( ImageParameters *  img,
Slice *  currSlice,
Macroblock *  currMB,
ColorPlane  pl,
int(*)  InvLevelScale8x8[8],
int  qp_per,
int  cbp,
byte **  nzcoeff 
) [static]

Get coefficients (run/level) of 4x4 blocks in a MB from the NAL (CABAC Mode).

Definition at line 3155 of file macroblock.c.

References macroblock::cbp_blk, FIELD_SCAN8x8, macroblock::is_lossless, macroblock::mb_field, readCoeff4x4_CAVLC(), and SNGL_SCAN8x8.

Referenced by readCBPandCoeffsFromNAL().

Here is the call graph for this function:

static void readIPCMcoeffsFromNAL ( ImageParameters *  img,
struct datapartition *  dP 
) [static]

Read IPCM pcm_alignment_zero_bit and pcm_byte[i] from stream to img->cof (for IPCM CABAC and IPCM CAVLC).

Author:
Dong Wang <Dong.Wang@bristol.ac.uk>

Definition at line 1546 of file macroblock.c.

References datapartition::bitstream, storable_picture::chroma_format_idc, Bitstream::frame_bitoffset, init_decoding_engine_IPCM(), syntaxelement::len, readIPCM_CABAC(), readSyntaxElement_FLC(), syntaxelement::value1, and YUV400.

Referenced by read_one_macroblock().

Here is the call graph for this function:

static void readMBMotionVectors ( SyntaxElement *  currSE,
DataPartition *  dP,
Macroblock *  currMB,
ImageParameters *  img,
int  list,
int  step_h0,
int  step_v0 
) [inline, static]

static void readMBRefPictureIdx ( SyntaxElement *  currSE,
DataPartition *  dP,
Macroblock *  currMB,
ImageParameters *  img,
char **  cur_ref_idx,
int  list,
int  step_v0,
int  step_h0 
) [inline, static]

Function to read reference picture indice values.

Definition at line 421 of file macroblock.c.

References macroblock::b8mode, macroblock::b8pdir, and readRefPictureIdx.

Referenced by readMotionInfoFromNAL().

static void readMotionInfoFromNAL ( ImageParameters *  img,
Slice *  currSlice,
Macroblock *  currMB 
) [static]

static char readRefPictureIdx_FLC ( SyntaxElement *  currSE,
DataPartition *  dP,
char  b8mode,
int  list 
) [static]

Function for reading the reference picture indices using FLC.

Definition at line 307 of file macroblock.c.

References datapartition::bitstream, BType2CtxRef(), syntaxelement::context, syntaxelement::len, readSyntaxElement_FLC(), and syntaxelement::value1.

Referenced by prepareListforRefIdx().

Here is the call graph for this function:

static char readRefPictureIdx_Null ( SyntaxElement *  currSE,
DataPartition *  dP,
char  b8mode,
int  list 
) [static]

Dummy Function for reading the reference picture indices.

Definition at line 329 of file macroblock.c.

Referenced by prepareListforRefIdx().

static char readRefPictureIdx_VLC ( SyntaxElement *  currSE,
DataPartition *  dP,
char  b8mode,
int  list 
) [static]

Function for reading the reference picture indices using VLC.

Definition at line 288 of file macroblock.c.

References BType2CtxRef(), syntaxelement::context, img, datapartition::readSyntaxElement, syntaxelement::value1, and syntaxelement::value2.

Referenced by prepareListforRefIdx().

Here is the call graph for this function:

void set_interpret_mb_mode ( int  slice_type  ) 

Set mode interpretation based on slice type.

Definition at line 886 of file macroblock.c.

References interpret_mb_mode_B(), interpret_mb_mode_I(), interpret_mb_mode_P(), and interpret_mb_mode_SI().

Referenced by decode_one_slice().

Here is the call graph for this function:

void SetB8Mode ( ImageParameters *  img,
Macroblock *  currMB,
int  value,
int  i 
)

Sets mode for 8x8 block.

Definition at line 950 of file macroblock.c.

References macroblock::b8mode, and macroblock::b8pdir.

Referenced by read_one_macroblock().

void start_macroblock ( ImageParameters *  img,
Macroblock **  currMB 
)

initializes the current macroblock

Definition at line 552 of file macroblock.c.

References CheckAvailabilityOfNeighbors(), error(), storable_picture::max_slice_id, macroblock::mbAddrX, macroblock::qp, storable_picture::slice_id, and update_qp().

Referenced by decode_one_slice().

Here is the call graph for this function:

void update_qp ( ImageParameters *  img,
Macroblock *  currMB,
int  qp 
)

updates chroma QP according to luma QP and bit depth

Definition at line 382 of file macroblock.c.

References macroblock::is_lossless, macroblock::qp, and macroblock::qp_scaled.

Referenced by decode_ipcm_mb(), read_one_macroblock(), readCBPandCoeffsFromNAL(), and start_macroblock().


Variable Documentation

const int BLOCK_STEP[8][2] [static]

Initial value:

{
  {0,0},{4,4},{4,2},{2,4},{2,2},{2,1},{1,2},{1,1}
}
used to control block sizes : Not used/16x16/16x8/8x16/8x8/8x4/4x8/4x4

Definition at line 79 of file macroblock.c.

Referenced by readMBMotionVectors(), and readMotionInfoFromNAL().

unsigned char cbp_blk_chroma[8][4] [static]

Initial value:

{ {16, 17, 18, 19},
  {20, 21, 22, 23},
  {24, 25, 26, 27},
  {28, 29, 30, 31},
  {32, 33, 34, 35},
  {36, 37, 38, 39},
  {40, 41, 42, 43},
  {44, 45, 46, 47} }

Definition at line 119 of file macroblock.c.

Co_located to be used during 4:4:4 independent mode decoding.

Definition at line 50 of file mbuffer.c.

const unsigned char cofuv_blk_x[3][8][4]

Initial value:

{ { {0, 1, 0, 1},
    {0, 1, 0, 1},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0} },

  { {0, 1, 0, 1},
    {0, 1, 0, 1},
    {0, 1, 0, 1},
    {0, 1, 0, 1},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0} },

  { {0, 1, 0, 1},
    {2, 3, 2, 3},
    {0, 1, 0, 1},
    {2, 3, 2, 3},
    {0, 1, 0, 1},
    {2, 3, 2, 3},
    {0, 1, 0, 1},
    {2, 3, 2, 3} }
}

Definition at line 189 of file macroblock.c.

const unsigned char cofuv_blk_y[3][8][4] [static]

Initial value:

{
  { { 0, 0, 1, 1},
    { 0, 0, 1, 1},
    { 0, 0, 0, 0},
    { 0, 0, 0, 0},
    { 0, 0, 0, 0},
    { 0, 0, 0, 0},
    { 0, 0, 0, 0},
    { 0, 0, 0, 0} },

  { { 0, 0, 1, 1},
    { 2, 2, 3, 3},
    { 0, 0, 1, 1},
    { 2, 2, 3, 3},
    { 0, 0, 0, 0},
    { 0, 0, 0, 0},
    { 0, 0, 0, 0},
    { 0, 0, 0, 0} },

  { { 0, 0, 1, 1},
    { 0, 0, 1, 1},
    { 2, 2, 3, 3},
    { 2, 2, 3, 3},
    { 0, 0, 1, 1},
    { 0, 0, 1, 1},
    { 2, 2, 3, 3},
    { 2, 2, 3, 3}}
}

Definition at line 218 of file macroblock.c.

const byte FIELD_SCAN[16][2] [static]

Initial value:

{
  {0,0},{0,1},{1,0},{0,2},
  {0,3},{1,1},{1,2},{1,3},
  {2,0},{2,1},{2,2},{2,3},
  {3,0},{3,1},{3,2},{3,3}
}
field scan pattern

Definition at line 70 of file macroblock.c.

Referenced by readCBPandCoeffsFromNAL(), readCompCoeff4x4MB_CAVLC(), and readCompCoeff4x4SMB_CABAC().

const byte FIELD_SCAN8x8[64][2]

Initial value:

 {   
  {0,0}, {0,1}, {0,2}, {1,0}, {1,1}, {0,3}, {0,4}, {1,2}, {2,0}, {1,3}, {0,5}, {0,6}, {0,7}, {1,4}, {2,1}, {3,0},
  {2,2}, {1,5}, {1,6}, {1,7}, {2,3}, {3,1}, {4,0}, {3,2}, {2,4}, {2,5}, {2,6}, {2,7}, {3,3}, {4,1}, {5,0}, {4,2},
  {3,4}, {3,5}, {3,6}, {3,7}, {4,3}, {5,1}, {6,0}, {5,2}, {4,4}, {4,5}, {4,6}, {4,7}, {5,3}, {6,1}, {6,2}, {5,4},
  {5,5}, {5,6}, {5,7}, {6,3}, {7,0}, {7,1}, {6,4}, {6,5}, {6,6}, {6,7}, {7,2}, {7,3}, {7,4}, {7,5}, {7,6}, {7,7}
}
field scan pattern

Definition at line 103 of file macroblock.c.

Referenced by readCompCoeff8x8_CABAC(), and readCompCoeff8x8MB_CAVLC().

const byte QP_SCALE_CR[52]

Initial value:

{
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,
   12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,
   28,29,29,30,31,32,32,33,34,34,35,35,36,36,37,37,
   37,38,38,38,39,39,39,39

}

Definition at line 84 of file macroblock.c.

char(* readRefPictureIdx)(SyntaxElement *currSE, DataPartition *dP, char b8mode, int list) [static]

Function pointer for reading the reference picture indices.

Referenced by prepareListforRefIdx(), and readMBRefPictureIdx().

const byte SCAN_YUV422[8][2] [static]

Initial value:

{
  {0,0},{0,1},
  {1,0},{0,2},
  {0,3},{1,1},
  {1,2},{1,3}
}
single scan pattern

Definition at line 111 of file macroblock.c.

Referenced by readCBPandCoeffsFromNAL().

const byte SNGL_SCAN[16][2] [static]

Initial value:

{
  {0,0},{1,0},{0,1},{0,2},
  {1,1},{2,0},{3,0},{2,1},
  {1,2},{0,3},{1,3},{2,2},
  {3,1},{3,2},{2,3},{3,3}
}
single scan pattern

Definition at line 61 of file macroblock.c.

Referenced by readCBPandCoeffsFromNAL(), readCompCoeff4x4MB_CAVLC(), and readCompCoeff4x4SMB_CABAC().

const byte SNGL_SCAN8x8[64][2]

Initial value:

 {
  {0,0}, {1,0}, {0,1}, {0,2}, {1,1}, {2,0}, {3,0}, {2,1}, {1,2}, {0,3}, {0,4}, {1,3}, {2,2}, {3,1}, {4,0}, {5,0},
  {4,1}, {3,2}, {2,3}, {1,4}, {0,5}, {0,6}, {1,5}, {2,4}, {3,3}, {4,2}, {5,1}, {6,0}, {7,0}, {6,1}, {5,2}, {4,3},
  {3,4}, {2,5}, {1,6}, {0,7}, {1,7}, {2,6}, {3,5}, {4,4}, {5,3}, {6,2}, {7,1}, {7,2}, {6,3}, {5,4}, {4,5}, {3,6},
  {2,7}, {3,7}, {4,6}, {5,5}, {6,4}, {7,3}, {7,4}, {6,5}, {5,6}, {4,7}, {5,7}, {6,6}, {7,5}, {7,6}, {6,7}, {7,7}
}
single scan pattern

Definition at line 94 of file macroblock.c.

Referenced by readCompCoeff8x8_CABAC(), and readCompCoeff8x8MB_CAVLC().

const unsigned char subblk_offset_x[3][8][4]

Initial value:

{
  { {0, 4, 0, 4},
    {0, 4, 0, 4},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0}, },

  { {0, 4, 0, 4},
    {0, 4, 0, 4},
    {0, 4, 0, 4},
    {0, 4, 0, 4},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0}, },

  { {0, 4, 0, 4},
    {8,12, 8,12},
    {0, 4, 0, 4},
    {8,12, 8,12},
    {0, 4, 0, 4},
    {8,12, 8,12},
    {0, 4, 0, 4},
    {8,12, 8,12}  }
}
look up tables for FRExt_chroma support

Definition at line 130 of file macroblock.c.

Referenced by buildPredblockRegionYUV(), buildPredRegionYUV(), intrapred_chroma(), and readCBPandCoeffsFromNAL().

const unsigned char subblk_offset_y[3][8][4]

Initial value:

{ { {0, 0, 4, 4},
    {0, 0, 4, 4},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0}, },

  { {0, 0, 4, 4},
    {8, 8,12,12},
    {0, 0, 4, 4},
    {8, 8,12,12},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0},
    {0, 0, 0, 0}  },

  { {0, 0, 4, 4},
    {0, 0, 4, 4},
    {8, 8,12,12},
    {8, 8,12,12},
    {0, 0, 4, 4},
    {0, 0, 4, 4},
    {8, 8,12,12},
    {8, 8,12,12} }
}

Definition at line 160 of file macroblock.c.


Documentation generated with DoxyGen