Video error concealment with spatial and temporal error concealment

A temporal error concealment is described. A video stream comprises a current frame comprising a lost image region, and a reference frame. The method comprises forming a list of motion vector candidates, the list of motion vector candidates including a set of one or more motion vectors from the current frame and a set of one or more motion vectors from the reference frame; testing each of the motion vector candidates using a matching error measure; selecting a replacement motion vector from the list based on the matching error measures; and using the selected replacement motion vector to conceal the lost image region. A mode selection method is also described. A motion vector is used to identify a motion compensated reference image region in the reference frame. A motion compensated temporal activity of an image region in the current frame is calculated based on a comparison between the image region in the current frame and the motion compensated reference image region in the reference frame. A spatial or temporal error concealment mode is then selected based on the calculated temporal activity.

FIELD OF THE INVENTION

The present invention relates to a method of concealing an error in a video stream.

BACKGROUND OF THE INVENTION

Transmission/streaming of video over error prone networks is associated with packet erasures when channel conditions are not favourable. To avoid a large drop in video quality at the receiver due to intra- and inter-frame propagation of such errors, error resilience at the encoder and use of error concealment at the decoder are necessary. Error concealment methods described in [Y. Wang, S. Wenger, J. Wen, and A. K. Katsaggelos, “Error Resilient Video Coding Techniques-Real time video communications over unreliable networks,” IEEE Signal Processing Magazine, vol. 17, pp. 61-82, 2000] and [Y. Wang and Q.-F. Zhu, “Error Control and Concealment for Video Communication: A Review,” Proceedings of the IEEE, vol. 86, pp. 974-997, 1998] estimate lost information by employing the correlation that exists between a missing macroblock (MB) and the temporally and spatially adjacent ones. They can be classified in two categories. Temporal concealment methods estimate lost motion vectors and then use these for motion compensated temporal replacement of the lost MBs. Spatial concealment methods rely on spatially adjacent macroblocks for estimating missing pixels usually through an interpolation process.

Although not normative, the H.264 joint model (1M) decoder implements both spatial and temporal error concealment for missing intra and inter coded macroblocks—see [Y.-K. Wang, M. M. Hannuksela, V. Varsa, A. Hourunranta, and M. Gabbouj, “The error concealment feature in the H.26L test model,”, ICIP, USA, 2002]. Temporal concealment (employed solely for lost MBs in P or B frames), is implemented based on the boundary matching algorithm (BMA) described in [W.-M. Lam and A. R. Reibman, “Recovery of lost or erroneously received motion vectors,” ICASSP, USA, 1993] which predicts the motion vector (MV) of one missing macroblock out of a list of candidate MVs coming from 4-neighboring MBs (or 8×8 blocks of these) and including the zero MY. The MY that results in the smallest boundary matching error (BME) is then used for motion compensated replacement of the missing pixels from a previously decoded frame. Spatial concealment is employed for intra coded frames.

SUMMARY OF THE INVENTION

A first aspect of the invention provides a method of concealing an error in a video stream, the video stream comprising a current frame comprising a lost image region, and a reference frame, the method comprising using a motion vector to identify a reference image region in the reference frame; calculating a motion compensated temporal activity of an image region in the current frame based on a comparison between the image region in the current frame and the reference image region in the reference frame; selecting a spatial or temporal error concealment mode based on the calculated temporal activity; and concealing the lost image region using the selected error concealment mode.

In the preferred embodiment described below, the lost image region is a macroblock of video pixels, but the lost image region may also be a block or slice of video pixels. In general any spatial or temporal error concealment mode may be used, but in a preferred embodiment a temporal error concealment mode according to the second aspect of the invention is used.

A second aspect of the invention provides a method of concealing an error in a video stream, the video stream comprising a current frame comprising a lost image region, and a reference frame, the method comprising forming a list of motion vector candidates, the list of motion vector candidates including a set of one or more motion vectors from the current frame and a set of one or more motion vectors from the reference frame; testing each of the motion vector candidates using a matching error measure; selecting a replacement motion vector from the list based on the matching error measures; and using the selected replacement motion vector to conceal the lost image region.

In the preferred embodiment described below, the lost image region is a macroblock of video pixels, but the lost image region may also be a block or slice of video pixels.

DETAILED DESCRIPTION OF EMBODIMENT(S)

FIG. 1shows a typical video communication scenario, including a video stream101, and a selection of devices102such as Personal Computers (PCs), Personal Digital Assistants (PDAs) and Digital TV Set Top Boxes for receiving the video stream. Each device102includes a video decoder which may be implemented in software (for instance in a Digital Signal Processor (DSP)) or in hardware (for instance in a Field Programmable Gate Array (FPGA) or an Application Specific Integrated Circuit (ASIC)). The decoder is configured to decode the video stream and conceal an error in the video stream by the method described below.

FIG. 2shows an error concealment method as applied to each lost macroblock (MB) of a decoded video picture or frame. The method consists of a temporal concealment (TEC) module202, a mode selection algorithm203and a spatial concealment (SEC) module204. TEC is applied first in order to conceal a lost MB via motion compensated replacement. The mode selection module203examines the suitability of the TEC method for concealing the lost MB by evaluating the levels of motion compensated activity in the neighborhood of that MB and switching to spatial concealment accordingly.

In step201, after decoding one video picture (intra coded picture—I—or predicted picture—P or B—) the lost macroblocks are fed one at a time to the error concealment module which treats each lost MB separately.

TEC is applied first by TEC module202, resulting in a replacement motion vector and replacement pixels for the lost MB.

The mode selection module203uses this estimated replacement MV to decide on the suitability of TEC for concealing the lost MB. The decision can be either to take no further action i.e. to use the replacement pixels provided by the TEC module for concealing the lost MB, or to use SEC instead.

SEC module204is used only if the mode selection algorithms decides so. Any SEC method can be used.

FIG. 3shows the temporal concealment module202in detail. The first step301of the TEC module is to form a list of motion vector candidates in order to find a replacement for the missing MV(s) of the lost MB. The list of MV candidates includes:the zero MV;a set of motion vectors from the current frame: namely the MY(s) associated with the 8 MBs which neighbor the lost MB;a set of motion vectors from a previous reference frame: namely the MV of a collocated MB in the reference frame, and the MV(s) associated with the 8 MBs on the reference frame which neighbor that collocated MB.

This combination of temporal concealment features was formulated based on an extensive study of temporal concealment of lost inter and intra coded macroblocks.

The symbols I, P next to each candidate MV indicate which type of pictures the motion vector candidate is employed for: I—the candidate is used with intra coded pictures, P—the candidate is used with predicted pictures.

The second step302of the TEC module is to test each candidate MV in the previously formulated list using a matching error measure. The motion vector that minimises this matching error measure is selected as replacement for the missing MV(s) of the lost macroblock. The matching error measure employed is the external boundary matching error (EBME). EBME is defined as the sum of absolute differences between the pixel boundary of MBs adjacent to the missing one in the current frame and the same boundary of MBs adjacent to the replacement MB (pointed at by the candidate MV) in the reference frame. The pixel boundary preferably is more than one pixel wide: typically two pixels or eight pixels wide. The two-pixel wide version is preferred due to the smaller complexity.

The third and final step303of the TEC module applies enhancements to the initial estimation of the replacement motion vector or replacement pixels of the lost MB. The enhancements include the use of overlapped block motion compensation (OBMC)305for the replacement of the missing pixels of the lost MBs in P frames and use of motion refinement304of the previously estimated (winning) replacement MV in I frames.

Motion refinement304uses the selected MV as the starting point for a motion estimation process that searches for better MV replacements, within a specified search region centred on that MV using EBME as the matching measure.

OBMC is performed in step305using the method described in [T.-Y. Kuo and S.-C. Tsao, “Error concealment based on overlapping”, in VCIP, San Jose, Calif., USA, 2002]. OBMC, as applied for concealment, uses more than one reference MB (and hence more than one estimated MV) for the replacement of damaged pixels. For OBMC, the damaged MB is divided into four 8×8 pixel blocks for each of which four replacement signals are formed using the MV selected in step302(referred to below as “the winning MV”), and the MV of the adjacent 8×8 pixel blocks of the 3 neighboring MBs. The four motion compensated replacement signals are then blended according to a raised cosine weighting matrix that favours the MV pointed to by the winning MV for replacing pixels close to the centre of the missing MB.

FIG. 4shows the mode selection module in detail including the temporal and spatial activity calculation elements, and the actual decision element that determines whether SEC will be employed for concealing the lost MB.

The mode selection process203that takes place after TEC first calculates two activity measures in the neighborhood of the lost MB. These are the motion compensated temporal activity402and the spatial activity403.

The motion compensated temporal activity (TA)402is measured as the mean squared error between the MBs surrounding the lost macroblock in the current frame and those surrounding the replacement MB in the reference frame (that is, the MB in the reference frame which is identified by the MV selected by the TEC module202). More formally: TA=E[(x−x*)2] where x are the pixels in the neighborhood of the missing MB and x* are the pixels in the neighborhood of the replacement MB in the reference frame as shown inFIG. 5.

Spatial activity (SA)403is measured as the variance of the MBs surrounding the lost macroblock in the current frame. More formally: SA=E[(x−μ)2] where x are the pixels in the neighborhood of the missing MB and μ is the mean value (luminance) of these pixels.

In step404the mode decision algorithm uses the two activity measures in the following way for choosing between TEC and SEC as the method for concealing the lost MB:

IF (TA<SA) OR (TA<threshold) apply TEC ELSE apply SEC

SEC is employed in step405only if the spatial activity is smaller than the temporal activity and the latter is above a specific threshold.

Otherwise the algorithm proceeds to step406in which no further action is taken and the result of the TEC module remains unaltered.