Patent ID: 8320470

Claim:
A method for performing spatial error concealment, comprising: (a) detecting a damaged macroblock with missing pixels; (b) obtaining coding information of a plurality of neighboring macroblocks of the damaged macroblock, wherein the plurality of neighboring macroblocks are a plurality of 4×4 blocks surrounding the damaged macroblock; (c) determining edge feature of the damaged macroblock based on the coding information, and the step (c) further comprising the following steps: (c1) calculating edge directions of all pixels within an inter-coded 4×4 block, wherein the inter-coded 4×4 block is one of the plurality of the 4×4 blocks and is coded via an inter prediction mode; (c2) calculating edge directions of specific pixels within an intra-coded 4×4 block, wherein the intra-coded 4×4 block is one of the plurality of the 4×4 blocks and is coded via an intra prediction mode; (c3) if the edge directions calculated in step (c2) are the same to a direction of the intra prediction mode, determining the edge feature of the damaged macroblock based on the edge directions calculated in both of the step (c1) and step (c2); and (c4) if the edge directions calculated in step (c2) are not the same to a direction of the intra prediction mode, calculating edge directions of remaining pixels within the intra-coded 4×4 block, and determining the edge feature of the damaged macroblock based on the edge directions of all pixels within the intra-coded 4×4 block and the edge directions calculated in the step (c1); (d) selecting one of a bilinear interpolation algorithm and a directional interpolation algorithm based on the edge feature to reconstruct the missing pixels of the damaged macroblock.