#include "global.h"
#include "memalloc.h"
#include "erc_api.h"
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) |
Definition in file erc_api.c.
void ercClose | ( | ImageParameters * | p_Img, | |
ercVariables_t * | errorVar | |||
) |
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().
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.
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.
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.
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.
Definition at line 49 of file erc_api.c.
References no_mem_exit().
Referenced by ercInit().
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.
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().
void ercSetErrorConcealment | ( | ercVariables_t * | errorVar, | |
int | value | |||
) |
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.
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.
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().