macroblock.h File Reference

Arrays for macroblock encoding. More...

#include "block.h"

Include dependency graph for macroblock.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void setup_slice_methods (Slice *currSlice)
void get_neighbors (Macroblock *currMB, PixelPos *block, int mb_x, int mb_y, int blockshape_x)
void start_macroblock (Slice *currSlice, Macroblock **currMB)
int decode_one_macroblock (Macroblock *currMB, StorablePicture *dec_picture)
Boolean exit_macroblock (Slice *currSlice, int eos_bit)

Variables

static const byte SNGL_SCAN [16][2]
static const byte FIELD_SCAN [16][2]
static const int BLOCK_STEP [8][2]
static const byte SNGL_SCAN8x8 [64][2]
static const byte FIELD_SCAN8x8 [64][2]
static const byte SCAN_YUV422 [8][2]
static const unsigned char cbp_blk_chroma [8][4]
static const unsigned char cofuv_blk_x [3][8][4]
static const unsigned char cofuv_blk_y [3][8][4]


Detailed Description

Arrays for macroblock encoding.

Author:
Inge Lille-Langoy <inge.lille-langoy@telenor.com> Copyright (C) 1999 Telenor Satellite Services, Norway

Definition in file macroblock.h.


Function Documentation

int decode_one_macroblock ( Macroblock currMB,
StorablePicture dec_picture 
)

decode one macroblock

Definition at line 5481 of file macroblock.c.

References decode_ipcm_mb(), storable_picture::imgUV, storable_picture::imgY, macroblock::mbAddrX, macroblock::p_Img, macroblock::p_Slice, and YUV444.

Referenced by decode_one_slice().

Here is the call graph for this function:

Boolean exit_macroblock ( Slice currSlice,
int  eos_bit 
)

set coordinates of the next macroblock check end_of_slice condition

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

p_Img->current_mb_nr == p_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 456 of file macroblock.c.

References FmoGetNextMBNr(), and slice::slice_type.

Referenced by decode_one_slice().

Here is the call graph for this function:

void get_neighbors ( Macroblock currMB,
PixelPos *  block,
int  mb_x,
int  mb_y,
int  blockshape_x 
)

Get current block spatial neighbors.

Definition at line 2069 of file macroblock.c.

References get4x4Neighbour(), and macroblock::p_Img.

Referenced by readMBMotionVectors().

Here is the call graph for this function:

void setup_slice_methods ( Slice currSlice  ) 

void start_macroblock ( Slice currSlice,
Macroblock **  currMB 
)


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 38 of file macroblock.h.

Referenced by read_motion_info_from_NAL_b_slice(), read_motion_info_from_NAL_p_slice(), and readMBMotionVectors().

const 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 69 of file macroblock.h.

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

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 80 of file macroblock.h.

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 109 of file macroblock.h.

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 29 of file macroblock.h.

Referenced by read_CBP_and_coeffs_from_NAL_CABAC(), read_CBP_and_coeffs_from_NAL_CAVLC(), readCompCoeff4x4MB_CAVLC(), and readCompCoeff4x4SMB_CABAC().

const byte FIELD_SCAN8x8[64][2] [static]

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 53 of file macroblock.h.

Referenced by readCompCoeff8x8_CABAC(), and readCompCoeff8x8MB_CAVLC().

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 61 of file macroblock.h.

Referenced by read_CBP_and_coeffs_from_NAL_CABAC(), and read_CBP_and_coeffs_from_NAL_CAVLC().

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 20 of file macroblock.h.

Referenced by read_CBP_and_coeffs_from_NAL_CABAC(), read_CBP_and_coeffs_from_NAL_CAVLC(), readCompCoeff4x4MB_CAVLC(), and readCompCoeff4x4SMB_CABAC().

const byte SNGL_SCAN8x8[64][2] [static]

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 44 of file macroblock.h.

Referenced by readCompCoeff8x8_CABAC(), and readCompCoeff8x8MB_CAVLC().


Documentation generated with DoxyGen