#include "block.h"
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] |
Definition in file macroblock.h.
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().
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().
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().
void setup_slice_methods | ( | Slice * | currSlice | ) |
Set mode interpretation based on slice type.
Definition at line 717 of file macroblock.c.
References decode_one_component_b_slice(), decode_one_component_i_slice(), decode_one_component_p_slice(), interpret_mb_mode_B(), interpret_mb_mode_I(), interpret_mb_mode_P(), interpret_mb_mode_SI(), read_CBP_and_coeffs_from_NAL_CABAC(), read_CBP_and_coeffs_from_NAL_CAVLC(), read_motion_info_from_NAL_b_slice(), read_motion_info_from_NAL_p_slice(), read_one_macroblock_b_slice(), read_one_macroblock_i_slice(), read_one_macroblock_p_slice(), and slice::slice_type.
Referenced by decode_one_slice().
void start_macroblock | ( | Slice * | currSlice, | |
Macroblock ** | currMB | |||
) |
initializes the current macroblock
Definition at line 368 of file macroblock.c.
References CheckAvailabilityOfNeighbors(), slice::DFAlphaC0Offset, slice::DFBetaOffset, slice::DFDisableIdc, error(), macroblock::p_Img, macroblock::qp, storable_picture::slice_id, slice::slice_type, and update_qp().
Referenced by decode_one_slice().
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} }
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} }
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} }
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} }
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().
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} }
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} }
Definition at line 44 of file macroblock.h.
Referenced by readCompCoeff8x8_CABAC(), and readCompCoeff8x8MB_CAVLC().