erc_do_i.c File Reference

Intra (I) frame error concealment algorithms for decoder. More...

#include "global.h"
#include "erc_do.h"

Include dependency graph for erc_do_i.c:

Go to the source code of this file.

Functions

static void concealBlocks (ImageParameters *p_Img, int lastColumn, int lastRow, int comp, frame *recfr, int picSizeX, int *condition)
static void pixMeanInterpolateBlock (ImageParameters *p_Img, imgpel *src[], imgpel *block, int blockSize, int frameWidth)
int ercConcealIntraFrame (ImageParameters *p_Img, frame *recfr, int picSizeX, int picSizeY, ercVariables_t *errorVar)
void ercPixConcealIMB (ImageParameters *p_Img, imgpel *currFrame, int row, int column, int predBlocks[], int frameWidth, int mbWidthInBlocks)
int ercCollect8PredBlocks (int predBlocks[], int currRow, int currColumn, int *condition, int maxRow, int maxColumn, int step, byte fNoCornerNeigh)
int ercCollectColumnBlocks (int predBlocks[], int currRow, int currColumn, int *condition, int maxRow, int maxColumn, int step)


Detailed Description

Intra (I) frame error concealment algorithms for decoder.

erc_do_i.c

Author:

Definition in file erc_do_i.c.


Function Documentation

static void concealBlocks ( ImageParameters *  p_Img,
int  lastColumn,
int  lastRow,
int  comp,
frame recfr,
int  picSizeX,
int *  condition 
) [static]

Core for the Intra blocks concealment. It is called for each color component (Y,U,V) separately Finds the corrupted blocks and calls pixel interpolation functions to correct them, one block at a time. Scanning is done vertically and each corrupted column is corrected bi-directionally, i.e., first block, last block, first block+1, last block -1 ...

Parameters:
p_Img image encoding parameters for current picture
lastColumn Number of block columns in the frame
lastRow Number of block rows in the frame
comp color component
recfr Reconstructed frame buffer
picSizeX Width of the frame in pixels
condition The block condition (ok, lost) table

Definition at line 309 of file erc_do_i.c.

References ercCollect8PredBlocks(), ercCollectColumnBlocks(), and ercPixConcealIMB().

Referenced by ercConcealIntraFrame().

Here is the call graph for this function:

int ercCollect8PredBlocks ( int  predBlocks[],
int  currRow,
int  currColumn,
int *  condition,
int  maxRow,
int  maxColumn,
int  step,
byte  fNoCornerNeigh 
)

This function checks the neighbors of a Macroblock for usability in concealment. First the OK macroblocks are marked, and if there is not enough of them, then the CONCEALED ones as well. A "1" in the the output array means reliable, a "0" non reliable MB. The block order in "predBlocks": 1 4 0 5 x 7 2 6 3 i.e., corners first.

Returns:
Number of useable neighbor macroblocks for concealment.
Parameters:
predBlocks[] Array for indicating the valid neighbor blocks
currRow Current block row in the frame
currColumn Current block column in the frame
condition The block condition (ok, lost) table
maxRow Number of block rows in the frame
maxColumn Number of block columns in the frame
step Number of blocks belonging to a MB, when counting in vertical/horizontal direction. (Y:2 U,V:1)
fNoCornerNeigh No corner neighbors are considered

Definition at line 154 of file erc_do_i.c.

Referenced by concealBlocks(), and ercConcealInterFrame().

int ercCollectColumnBlocks ( int  predBlocks[],
int  currRow,
int  currColumn,
int *  condition,
int  maxRow,
int  maxColumn,
int  step 
)

collects prediction blocks only from the current column

Returns:
Number of usable neighbour Macroblocks for concealment.
Parameters:
predBlocks[] Array for indicating the valid neighbor blocks
currRow Current block row in the frame
currColumn Current block column in the frame
condition The block condition (ok, lost) table
maxRow Number of block rows in the frame
maxColumn Number of block columns in the frame
step Number of blocks belonging to a MB, when counting in vertical/horizontal direction. (Y:2 U,V:1)

Definition at line 263 of file erc_do_i.c.

Referenced by concealBlocks().

int ercConcealIntraFrame ( ImageParameters *  p_Img,
frame recfr,
int  picSizeX,
int  picSizeY,
ercVariables_t *  errorVar 
)

The main function for Intra frame concealment. Calls "concealBlocks" for each color component (Y,U,V) separately.

Returns:
0, if the concealment was not successful and simple concealment should be used 1, otherwise (even if none of the blocks were concealed)
Parameters:
p_Img image encoding parameters for current picture
recfr Reconstructed frame buffer
picSizeX Width of the frame in pixels
picSizeY Height of the frame in pixels
errorVar Variables for error concealment

Definition at line 44 of file erc_do_i.c.

References concealBlocks().

Referenced by exit_picture().

Here is the call graph for this function:

void ercPixConcealIMB ( ImageParameters *  p_Img,
imgpel *  currFrame,
int  row,
int  column,
int  predBlocks[],
int  frameWidth,
int  mbWidthInBlocks 
)

Conceals the MB at position (row, column) using pixels from predBlocks[] using pixMeanInterpolateBlock().

Parameters:
p_Img image encoding parameters for current picture
currFrame current frame
row y coordinate in blocks
column x coordinate in blocks
predBlocks[] list of neighboring source blocks (numbering 0 to 7, 1 means: use the neighbor)
frameWidth width of frame in pixels
mbWidthInBlocks 2 for Y, 1 for U/V components

Definition at line 94 of file erc_do_i.c.

References pixMeanInterpolateBlock().

Referenced by concealBlocks().

Here is the call graph for this function:

static void pixMeanInterpolateBlock ( ImageParameters *  p_Img,
imgpel *  src[],
imgpel *  block,
int  blockSize,
int  frameWidth 
) [static]

Does the actual pixel based interpolation for block[] using weighted average.

Parameters:
p_Img image encoding parameters for current picture
src[] pointers to neighboring source blocks
block destination block
blockSize 16 for Y, 8 for U/V components
frameWidth Width of the frame in pixels

Definition at line 497 of file erc_do_i.c.

Referenced by ercPixConcealIMB().


Documentation generated with DoxyGen