erc_api.c File Reference

External (still inside video decoder) interface for error concealment module. More...

#include "global.h"
#include "memalloc.h"
#include "erc_api.h"

Include dependency graph for erc_api.c:

Go to the source code of this file.

Functions

void ercInit (ImageParameters *p_Img, int pic_sizex, int pic_sizey, int flag)
ercVariables_t * ercOpen (void)
void ercReset (ercVariables_t *errorVar, int nOfMBs, int numOfSegments, int picSizeX)
void ercClose (ImageParameters *p_Img, ercVariables_t *errorVar)
void ercSetErrorConcealment (ercVariables_t *errorVar, int value)
void ercStartSegment (int currMBNum, int segment, unsigned int bitPos, ercVariables_t *errorVar)
void ercStopSegment (int currMBNum, int segment, unsigned int bitPos, ercVariables_t *errorVar)
void ercMarkCurrSegmentLost (int picSizeX, ercVariables_t *errorVar)
void ercMarkCurrSegmentOK (int picSizeX, ercVariables_t *errorVar)
void ercMarkCurrMBConcealed (int currMBNum, int comp, int picSizeX, ercVariables_t *errorVar)


Detailed Description

External (still inside video decoder) interface for error concealment module.

Author:

Definition in file erc_api.c.


Function Documentation

void ercClose ( ImageParameters *  p_Img,
ercVariables_t *  errorVar 
)

Resets the variables used in error detection. Should be called always when starting to decode a new frame.

Parameters:
p_Img ImageParameters variable
errorVar Variables for error concealment

Definition at line 171 of file erc_api.c.

Referenced by ercInit(), and main().

void ercInit ( ImageParameters *  p_Img,
int  pic_sizex,
int  pic_sizey,
int  flag 
)

Initinize the error concealment module.

Definition at line 28 of file erc_api.c.

References ercClose(), ercOpen(), ercSetErrorConcealment(), and no_mem_exit().

Referenced by activate_sps().

Here is the call graph for this function:

void ercMarkCurrMBConcealed ( int  currMBNum,
int  comp,
int  picSizeX,
ercVariables_t *  errorVar 
)

Marks the Blocks of the given component (YUV) of the current MB as concealed.

Parameters:
currMBNum Selects the segment where this MB number is in.
comp Component to mark (0:Y, 1:U, 2:V, <0:All)
picSizeX Width of the frame in pixels.
errorVar Variables for error detector

Definition at line 348 of file erc_api.c.

Referenced by ercConcealInterFrame().

void ercMarkCurrSegmentLost ( int  picSizeX,
ercVariables_t *  errorVar 
)

Marks the current segment (the one which has the "currMBNum" MB in it) as lost: all the blocks of the MBs in the segment as corrupted.

Parameters:
picSizeX Width of the frame in pixels.
errorVar Variables for error detector

Definition at line 274 of file erc_api.c.

Referenced by exit_picture().

void ercMarkCurrSegmentOK ( int  picSizeX,
ercVariables_t *  errorVar 
)

Marks the current segment (the one which has the "currMBNum" MB in it) as OK: all the blocks of the MBs in the segment as OK.

Parameters:
picSizeX Width of the frame in pixels.
errorVar Variables for error detector

Definition at line 312 of file erc_api.c.

Referenced by exit_picture().

ercVariables_t* ercOpen ( void   ) 

Allocates data structures used in error concealment.

Returns:
The allocated ercVariables_t is returned.

Definition at line 49 of file erc_api.c.

References no_mem_exit().

Referenced by ercInit().

Here is the call graph for this function:

void ercReset ( ercVariables_t *  errorVar,
int  nOfMBs,
int  numOfSegments,
int  picSizeX 
)

Resets the variables used in error detection. Should be called always when starting to decode a new frame.

Parameters:
errorVar Variables for error concealment
nOfMBs Number of macroblocks in a frame
numOfSegments Estimated number of segments (memory reserved)
picSizeX Width of the frame in pixels.

mark segments as corrupted

Definition at line 84 of file erc_api.c.

References no_mem_exit().

Referenced by init_picture().

Here is the call graph for this function:

void ercSetErrorConcealment ( ercVariables_t *  errorVar,
int  value 
)

Sets error concealment ON/OFF. Can be invoked only between frames, not during a frame.

Parameters:
errorVar Variables for error concealment
value New value

Definition at line 204 of file erc_api.c.

Referenced by ercInit().

void ercStartSegment ( int  currMBNum,
int  segment,
unsigned int  bitPos,
ercVariables_t *  errorVar 
)

Creates a new segment in the segment-list, and marks the start MB and bit position. If the end of the previous segment was not explicitly marked by "ercStopSegment", also marks the end of the previous segment. If needed, it reallocates the segment-list for a larger storage place.

Parameters:
currMBNum The MB number where the new slice/segment starts
segment Segment/Slice No. counted by the caller
bitPos Bitstream pointer: number of bits read from the buffer.
errorVar Variables for error detector

Definition at line 227 of file erc_api.c.

Referenced by exit_picture().

void ercStopSegment ( int  currMBNum,
int  segment,
unsigned int  bitPos,
ercVariables_t *  errorVar 
)

Marks the end position of a segment.

Parameters:
currMBNum The last MB number of the previous segment
segment Segment/Slice No. counted by the caller If (segment<0) the internal segment counter is used.
bitPos Bitstream pointer: number of bits read from the buffer.
errorVar Variables for error detector

Changed TO 12.11.2001

Definition at line 254 of file erc_api.c.

Referenced by exit_picture().


Documentation generated with DoxyGen