# Patent

## Title
Method and apparatus for determining an encoding method based on a distortion value related to error concealment

## Abstract

Methods and apparatuses to encode multimedia data enabling, among others, for example, improved decoded video quality, improved error recovery capabilities and/or improved decoding efficiency are described. An encoder device determines one or more distortion values for one or more portions of multimedia data based at least in part on one or more concealment methods related to concealing the one or more portions if the one or more portions were received in error. The encoder device determines one or more encoding methods for the one or more portions based at least in part on the one or more estimated distortion values. In one aspect, determining the one or more encoding methods comprises determining the one or more encoding methods so as to refresh the one or more portions based at least in part on a comparison of the one or more estimated distortion values and one or more thresholds.

## Background
CROSS-REFERENCE TO RELATED APPLICATIONS
Claim of Priority Under 35 U.S.C. §119
This Application for Patent claims priority to Provisional Application Ser. No. 60/760,678 entitled “Method and Apparatus for Adaptive Intra Refresh Based on Prediction Hierarchy for Wireless Video Communications” filed Jan. 20, 2006, which is assigned to the assignee of this application and which is fully incorporated herein by reference for all purposes.


BACKGROUND
1. Field of the Application
This application is directed to multimedia signal processing and, more particularly, to video encoding.
2. Description of the Related Art
Multimedia processing systems, such as video encoders, may encode multimedia data using encoding methods based on international standards such as Moving Picture Experts Group (MPEG)-1, -2 and -4 standards, the International Telecommunication Union (ITU)-T H.263 standard, and the ITU-T H.264 standard and its counterpart, ISO/IEC MPEG-4, Part 10, i.e., Advanced Video Coding (AVC). Such encoding methods generally are directed to compressing the multimedia data for transmission and/or storage. Compression is broadly the process of removing redundancy from the data.
A video signal may be described in terms of a sequence of pictures, which include frames (an entire picture), or fields (e.g., an interlaced video stream comprises fields of alternating odd or even lines of a picture). As used herein, the term “frame” refers to a picture, a frame or a field. Video encoding methods compress video signals by using lossless or lossy compression algorithms to compress each frame. Intra-frame coding (herein referred to as intra-coding) refers to encoding a frame using only that frame. Inter-frame coding (herein referred to as inter-coding) refers to encoding a frame based on other, “reference,” frames. For example, video signals often exhibit temporal redundancy in which frames near each other in the temporal sequence of frames have at least portions that match or at least partially match each other.
Multimedia processors, such as video encoders, may encode a frame by partitioning it into blocks or “macroblocks” of, for example, 16×16 pixels. The encoder may further partition each macroblock into subblocks. Each subblock may further comprise additional subblocks. For example, subblocks of a macroblock may include 16×8 and 8×16 subblocks. Subblocks of the 8×16 subblocks may include 8×8 subblocks, and so forth. As used herein, the term “block” refers to either a macroblock or a subblock.
Encoders take advantage of this temporal redundancy using inter-coding motion compensation based algorithms. Motion compensation algorithms identify portions of a reference frame that at least partially match a block. The block may be shifted in the frame relative to the matching portion of the reference frame. This shift is characterized by a motion vector. Any differences between the block and partially matching portion of the reference frame may be characterized in terms of a residual. The encoder may encode a frame as data that comprises one or more of the motion vectors and residuals for a particular partitioning of the frame. A particular partition of blocks for encoding a frame may be selected by approximately minimizing a cost function that, for example, balances encoding size with distortion of the content resulting from an encoding.
Inter-coding enables more compression efficiency than intra-coding. However, inter-coding can create problems when reference data (e.g., reference frames or reference fields) are lost due to channel errors, etc. In these cases, decoding of inter-coded data may not be possible or may result in undesired errors and error propagation. Decoders may employ concealment schemes which attempt to conceal or cover-up erroneous data with data derived from neighboring blocks or from data in other frames. Improvement of concealment algorithms may provide some improvement in the quality of concealed portions of erroneous video data. However, there is a limit on how high a quality the concealed image will exhibit due to the heavy dependence of concealment algorithms on spatio-temporal information. The concealed data may not be of high quality and the viewing experience may be degraded. In addition, decoding of the signal may become impossible and resynchronization may be required. Error propagation may be limited, and resynchronization (or initial acquisition) may be enabled, by encoding methods that refresh the video. A refreshed video signal can be decoded without reference to or knowledge of other frames.
An independently decodable intra-coded frame is the most common form of frame that enables refreshing of the video signal. The MPEG-x and H.26x standards use what is known as a group of pictures (GOP) which comprises an intra-coded frame (also called an I-frame) and temporally predicted P-frames or bi-directionally predicted B frames that reference the I-frame and/or other P and/or B frames within the GOP. Longer GOP's are desirable for the increased compression, but shorter GOP's allow for quicker acquisition and resynchronization. Increasing the number of I-frames will refresh the video signal more frequently, thereby further limiting error propagation and providing quicker acquisition and resynchronization, but at the expense of lower compression. What is needed is a way to encode video data that limits error propagation of the video stream at the decoder while preserving compression efficiency.
SUMMARY
The system, method, and devices of the application each have several aspects, no single one of which is solely responsible for its desirable attributes. Without limiting the scope of this application as expressed by the claims which follow, its more prominent features will now be discussed briefly. After considering this discussion, and particularly after reading the section entitled “Detailed Description of Certain Embodiments” one will understand how the sample features of this application can provide some improvements that include, among others, for example, improved decoded video quality, improved error recovery and/or improved efficiency.
A method of encoding multimedia data is provided. The method includes estimating one or more distortion values for one or more portions of multimedia data based at least in part on one or more concealment methods related to concealing the one or more portions if the one or more portions were received in error, and determining at least one encoding method for the first portion based at least in part on the estimated one or more distortion values.
A multimedia data processor is provided. The processor is configured to estimate one or more distortion values for one or more portion of multimedia data based at least in part on one or more concealment methods related to concealing the one or more portions if the one or more portions were received in error, and determine at least one encoding method for the one or more portions based at least in part on the estimated one or more distortion values.
An apparatus for encoding multimedia data is provided. The apparatus includes an estimator to estimate one or more distortion values for one or more portion of multimedia data based at least in part on one or more concealment methods related to concealing the one or more portions if the one or more portions were received in error, and a determiner to determine at least one encoding method for the one or more portions based at least in part on the estimated distortion value.
A machine readable medium comprising instructions that upon execution cause a machine to encode multimedia data is provided. The instructions cause the machine to estimate one or more distortion values for one or more portions of multimedia data based at least in part on one or more concealment methods related to concealing the one or more portions if the one or more portions were received in error, and determine at least one encoding method for the first portion based at least in part on the estimated distortion value.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram illustrating a multimedia communications system according to one aspect.
FIG. 2 is a block diagram illustrating an embodiment of an encoder device that may be used in a system such as illustrated in FIG. 1.
FIG. 3 is a block diagram illustrating an embodiment of a decoder device that may be used in a system such as illustrated in FIG. 1.
FIG. 4A is a flowchart illustrating an example of a method of encoding a portion of a video stream in a system such as illustrated in FIG. 1.
FIG. 4B is a flowchart illustrating in more detail an example of a method of encoding a portion of a video stream in a system such as illustrated in FIG. 1.
FIG. 5 graphically illustrates a distortion map that may be generated by the methods of FIGS. 4A and 4B.
FIG. 6 graphically illustrates prediction regions used for estimating a portion of video such as used in motion compensated prediction methods.
FIG. 7 is a functional block diagram illustrating an embodiment of an encoder device that may be used in a system such as illustrated in FIG. 1.
FIG. 8 is a functional block diagram illustrating an embodiment of an encoder device that may be used in a system such as illustrated in FIG. 1.



DETAILED DESCRIPTION OF CERTAIN EMBODIMENTS
The following detailed description is directed to certain sample embodiments of the application. However, the application can be embodied in a multitude of different ways as defined and covered by the claims. In this description, reference is made to the drawings wherein like parts are designated with like numerals throughout.
Video signals may be characterized in terms of a series of pictures, frames, fields or slices. As used herein, the term “frame” is a broad term that may encompass either frames of a progressive video signal, fields of an interlaced video signal, or slices of either.
Embodiments include systems and methods of improving processing in an encoder in a multimedia transmission system. Multimedia data may include one or more of motion video, audio, still images, or any other suitable type of audio-visual data. Embodiments include an apparatus and method of encoding video data. For example, one aspect comprises a method of encoding video data that limits the effects of error propagation and improves the performance of error concealment during decoding. In particular, it has been found that by estimating a distortion value for a portion of multimedia data based on one or more concealment methods that may be used to conceal the portion of multimedia data if the portion was received in error, and determining an encoding method for the portion of multimedia data based on the estimated distortion value, the decoded video quality, error recovery capability and/or decoding efficiency might be improved.
FIG. 1 is a block diagram illustrating a multimedia communications system 100 according to one aspect. The system 100 includes an encoder device 110 in communication with a decoder device 150 via a network 140. In one example, the encoder device receives a multimedia signal from an external source 102 and encodes that signal for transmission on the network 140.
In this example, the encoder device 110 comprises a processor 112 coupled to a memory 114 and a transceiver 116. The processor 112 may include one or more of a general purpose processor and/or a digital signal processor. The memory 114 may include one or more of solid state and/or disk based storage. The processor 112 encodes data from the multimedia data source and provides it to the transceiver 116 for communication over the network 140.
In this example, the decoder device 150 comprises a processor 152 coupled to a memory 154 and a transceiver 156. The processor 152 may include one or more of a general purpose processor and/or a digital signal processor. The memory 154 may include one or more of solid state and/or disk based storage. The transceiver 156 is configured to receive multimedia data over the network 140 and provide it to the processor 152 for decoding. In one example, the transceiver 156 includes a wireless transceiver. The network 140 may comprise one or more of a wired or wireless communication system, including one or more of a Ethernet, telephone (e.g., POTS), cable, power-line, and fiber optic systems, and/or a wireless system comprising one or more of a code division multiple access (CDMA or CDMA2000) communication system, a frequency division multiple access (FDMA) system, an orthogonal frequency division multiple (OFDM) access system, a time division multiple access (TDMA) system such as GSM/GPRS (General Packet Radio Service)/EDGE (enhanced data GSM environment), a TETRA (Terrestrial Trunked Radio) mobile telephone system, a wideband code division multiple access (WCDMA) system, a high data rate (1×EV-DO or 1×EV-DO Gold Multicast) system, an IEEE 802.11 system, a MediaFLO system, a DMB system, or a DVB-H system.
FIG. 2 is a block diagram illustrating an embodiment of the encoder device 110 that may be used in a system such as the system 100 illustrated in FIG. 1. In this embodiment, the encoder 110 comprises a distortion value estimator element 202, an encoding method determiner 204, and a multimedia encoder element 206. The distortion value estimator 202 estimates a distortion value for portions of multimedia data that are being encoded. The distortion value is based in part on error propagation from other portions of video that the current portion is predicted from and the likelihood that the other portions are received in error. The distortion value also includes a distortion component due to errors introduced at the decoder while concealing the portion of video data if it were received in error. The distortion value estimator may consider multiple encoding methods and calculate distortion values for each of the encoding methods.
The encoding method determiner 204 determines an encoding method that will be used to encode the portion of video data based on the estimated distortion value. The encoding method determiner 204 and the distortion value estimator 202 may work together to calculate multiple distortion values for multiple encoding methods (for example multiple inter-coding methods) and pick the encoding method that results in the least distortion. The encoding method determiner may compare the distortion value to a threshold and, based on the comparison, determine that another encoding method is needed. The other encoding method may be an encoding method related to refreshing the video stream, such as intra-coding. The other encoding method may also be another form of inter-coding that results in a lower distortion value as estimated by the distortion value estimator 202. The encoding method determiner may also consider computational complexity along with distortion value in determining an encoding method that provides acceptable distortion and does not exceed a computational complexity level.
The multimedia encoder 206 performs the encoding method that was determined based on the distortion value. The encoding methods performed by the multimedia encoder 206 include inter-coding where portions of video are predicted temporally (e.g., using motion compensated prediction) in reference to other portions of video data located in other temporal frames. Other encoding methods include intra-coding, where portions of video are encoded such that they can be decoded independently without reference to other temporally located video data. In some embodiments, the intra-coding may use spatial prediction to take advantage of redundancy in the other video data located in the same temporal frame.
In some embodiments, one or more of the elements of the encoder 110 of FIG. 2 may be rearranged and/or combined. The elements may be implemented by hardware, software, firmware, middleware, microcode or any combination thereof. Details of the actions performed by the elements of the encoder 110 will be discussed in reference to the methods illustrated in FIG. 4 below.
FIG. 3 is a block diagram illustrating an embodiment of the decoder device 150 that may be used in a system such as the system 100 illustrated in FIG. 1. In this embodiment, the decoder device 150 includes a multimedia decoder element 302 and an error concealment element 304. The multimedia decoder 302 decodes an encoded multimedia bitstream such as was encoded using the encoder device 110 of FIG. 2. The multimedia decoder performs inverse operation corresponding to the encoding operations used to encode the data. The encoded data may be inter-coded (e.g., temporally predicted data) and/or intra-coded data.
The error concealment element 304 performs various forms of error concealment that are used to conceal or cover-up portions of video that are received in error or are otherwise not decodable (e.g., due to synchronization loss). The concealment methods may include spatial error concealment, temporal error concealment and other methods. The concealment methods used may be the same or similar to the error concealment methods modeled when estimating the distortion values in the distortion value estimator 202 of the encoder device 110 of FIG. 2. While the present aspect does not require the same or similar concealment methods, use of such same or similar concealment methods in the decoder device 150 as were modeled in the encoder device may result in improved decoded video quality. In addition to performing error concealment, the error concealment element 304 may perform error recovery functions. Error recovery may be performed on sections of data that are determined to be erroneous in an attempt to parse out useable (e.g., error free) portions. These parsed out portions may also be used in error concealment by the error concealment element 304.
In some embodiments, one or more of the elements of the decoder 150 of FIG. 3 may be rearranged and/or combined. The elements may be implemented by hardware, software, firmware, middleware, microcode or any combination thereof. Details of the actions performed by the elements of the decoder 150 are beyond the scope of this discussion.
FIG. 4A is a flowchart illustrating an example of a method of encoding a portion of a video stream in a system such as illustrated in FIG. 1. In this example, the method estimates a distortion value for a portion of video being encoded. The distortion value is based on a probability of the encoded portion being received in error at a decoder and the error caused by a concealment method that is used to conceal the erroneous portion. By basing the distortion value on a decoder concealment method, the encoded video bitstream may be more robust to the effects of error propagation at the decoder, which may improve the decoded video quality. The method in this example can also determine an encoding method based on the estimated distortion value. The encoding method may be determined to minimize the distortion value among a plurality of encoding methods. The encoding method may be determined based on improving recoverability of the portion of video at the decoder. The encoding method may be determined to refresh the video portion so as to limit error propagation at the decoder.
Referring to FIG. 4A, method 400 begins at block 402 where an encoding device estimates a distortion value for a portion of multimedia data. The portion of multimedia data may be a pixel (e.g., luma and chroma, or red, green and blue, etc.), a block of pixels or any shape and size region of one or more pixels. The distortion value is based at least in part on a distortion component related to an error concealment method that may be used to conceal the video portion if it is received in error. The distortion value may include components from multiple concealment methods. For example, one component may represent distortion introduced by a first concealment method used if only the portion being encoded is received in error. In other words, all other video data that a decoder device could use to predict a concealed portion (referred to as prediction data) is assumed to be received error free. Other components of the distortion value may include distortion introduced by a second or third concealment method, where these concealment methods may be used by a decoder if one or more prediction portions are received in error. The concealment methods may include spatial concealment, temporal concealment and other forms of concealment. Details of a method of estimating a distortion value including temporal concealment will be discussed below. The distortion value estimator 202 of the encoder device 110 in FIG. 2 may perform the actions at the block 402.
In some examples, a distortion value is calculated at block 402 for each block in a frame of data. The blocks may be macroblocks (e.g., 16×16 pixel macroblocks), or sub-macroblocks of any size. The distortion values for each block in a frame may be stored in a distortion map. FIG. 5 graphically illustrates a distortion map that may be generated at block 402. The distortion map 500 contains multiple distortion value variables 505 (labeled dv1-dv16), one for each block in a frame. The distortion map 500 of a previous frame may be used in calculating the distortion values in a new frame. In this way, cumulative distortion may be easily calculated. If any block is determined to be refreshed, e.g., intra-coded, the distortion value of that block may be set to zero, or to the distortion value due to quantization or some other factor.
At block 404, the encoder device determines an encoding method to be used for the portion of multimedia data based on the estimated distortion value. In some examples, distortion values are calculated at block 402 for multiple encoding methods as part of a rate distortion calculation that is used for choosing which encoding method of multiple methods is to be used. For example, the encoding method that results in the minimum distortion value may be determined (at block 404) to be used for encoding the portion of multimedia data. In other examples, the distortion values are calculated based on a first encoding method (either inter-coded or intra-coded), and the distortion values are used to determine blocks that should be intra-coded, such as done in Adaptive Intra-Refresh (AIR). For example, the distortion value corresponding to a portion may be computed after a rate distortion based decision has resulted in finding the optimal motion vector(s) and mode to encode the portion. If the distortion value so obtained is greater than a threshold, then it may be determined to intra-code the portion using one of the intra-coding modes, e.g., 4×4 pixel intra-coding or 16×16 pixel intra-coding. In this way, the portion of multimedia is refreshed. Apart from intra-coding modes, certain inter-coding modes (P8×8, P16×16, P16×8, P8×16, etc.) may also be determined based on the distortion value in some cases, although these may not result in a refreshed video. It should be noted that some of the blocks of the method 400 may be combined, omitted, rearranged or any combination thereof. Details of some embodiments of determining the encoding method at block 404 are discussed below in reference to FIG. 4B.
Details of an example algorithm for estimating the distortion value at block 402 will now be discussed. The distortion value in this example is related to a temporal concealment method that conceals an erroneous portion of multimedia using portions from two other frames, for example, a prior frame and a subsequent frame. However, other concealment methods may be represented using similar methods.
The example algorithm computes a recursive distortion value of the expected (i.e., statistical expectation) distortion value of unidirectionally predicted portions (such as in P Frames) of video. Other portions such as intra-coded portions and bidirectionally predicted portions may also be represented by similar algorithms. The algorithm is based in part on an assumed probability of the current MB being lost (defined as a probability “P”) and a probability that predictors used by a concealment method are lost (defined as a probability “Q”). As at least one of the assumed probabilities P and Q are increased, the algorithm tends more towards yielding good error resilience/concealment while trading off compression efficiency. The converse happens when one decreases at least one of the probabilities P and Q.
The algorithm computes an expected distortion value for a portion of multimedia data. The portion of multimedia data may be any number of pixels and any shape. The example will be discussed in reference to the portion being a 16×16 pixel Macroblock (MB), but it should be noted that other portions may be represented as well. In one embodiment, the algorithm is used to estimate an expected distortion value for each MB of a frame to form a distortion map as discussed above in reference to FIG. 5. The expected distortion value in this example is computed in a recursive and motion-adaptive fashion. Although this expected distortion map is not exactly the MSE or L1-norm distortion measure, it is expected to correlate reasonably well with these measures.
The following notation is used for the discussion of the distortion value algorithm:
Dti,j=Cumulative distortion value of the (i,j)th macroblock in the ‘t’ th frame
P=Probability that the current MB is lost
Q=Probability that a predictor used by the related concealment method is lost
Given these assumptions, the current MB is received without any error at a probability equal to (1−P). In unidirectional prediction, the current MB is encoded in reference to a MB sized portion of another frame, the previous frame in this example. A motion vector MV gives the relative positions, or locations, of the current MB and the MB sized reference portion. The reference portion will generally not be aligned with the borders of a MB, but will overlap up to four regions of four MB's. FIG. 6 graphically illustrates the prediction regions used for estimating a portion of video using motion compensated prediction methods. A motion vector 605 points to a MB sized prediction region 610 made up of four area portions labeled a1, a2, a3 and a4. The area portions a1-a4, lie within four MB's 615, 620, 625 and 630, respectively. The distortion values of the MB's 615-630 may be obtained from a stored version of the distortion map of the previous frame. In this example, the cumulative distortion values of the four area portions a1-a4 in the prediction region 610 are weight averaged (e.g., based on the number of pixels in each area portion) to calculate the distortion value of the current MB. Thus, the estimated expected distortion value of the current macroblock due to the cumulative error propagation is given by:




  
    
      
        
          (
          
            1
            -
            P
          
          )
        
        ⁢
        
          {
          
            
              
                
                  a
                  1
                
                ⁢
                
                  D
                  
                    t
                    -
                    1
                  
                  
                    i
                    ,
                    j
                  
                
              
              +
              
                
                  a
                  2
                
                ⁢
                
                  D
                  
                    t
                    -
                    1
                  
                  
                    
                      i
                      +
                      1
                    
                    ,
                    j
                  
                
              
              +
              
                
                  a
                  3
                
                ⁢
                
                  D
                  
                    t
                    -
                    1
                  
                  
                    i
                    ,
                    
                      j
                      +
                      1
                    
                  
                
              
              +
              
                
                  a
                  4
                
                ⁢
                
                  D
                  
                    t
                    -
                    1
                  
                  
                    
                      i
                      +
                      1
                    
                    ,
                    
                      j
                      +
                      1
                    
                  
                
              
            
            256
          
          }
        
      
    
    
      
        (
        1
        )
      
    
  




Where a1, a2, a3, a4 are the four area portions as illustrated in FIG. 6. Note that the distortion value given by formula (1) is normalized by dividing the weighted average of the 16×16 pixel region by 256.

In addition to the cumulative distortion from the prediction regions of the previous frame, the algorithm estimates distortion value components due to concealment of the current MB, if the current MB is received in error. As discussed above, it is assumed that the current MB is received in error with a probability of P. The distortion incurred by the current macroblock due to a concealment method may be approximated to be the sum of the concealment error (the error introduced by the concealment method and indicated by the term Conceal_Error) and the effects due to error propagation from the prediction regions used by the concealment method. As discussed above, it is assumed that the predictors (e.g., from the current and/or past frames) are available with a probability 1−Q. In this example, it is assumed that the concealment method(s) depends on availability of data in the current frame and a previous frame. The prediction region is assumed to be in the previous frame, as indicated by the cumulative distortion terms Dt-1i,j. However, this is only an example and the prediction regions may be in the current frame or any other frame that is available. Thus, the distortion incurred due to a temporal error concealment method using prediction regions from the previous frame, where the portion being concealed is erroneous at a probability of P, and that depends on the availability of prediction data in the current frame and the previous frame (both available at a probability of 1−Q) may be computed as:




  
    
      
        
          (
          P
          )
        
        ⁢
        
          (
          
            1
            -
            Q
          
          )
        
        ⁢
        
          (
          
            1
            -
            Q
          
          )
        
        ⁢
        
          {
          
            Conceal_Error
            +
            
              
                
                  
                    a
                    1
                    ′
                  
                  ⁢
                  
                    D
                    
                      t
                      -
                      1
                    
                    
                      
                        i
                        ⁢
                        
                          
                        
                        ⁢
                        1
                      
                      ,
                      
                        j
                        ⁢
                        
                          
                        
                        ⁢
                        1
                      
                    
                  
                
                +
                
                  
                    a
                    2
                    ′
                  
                  ⁢
                  
                    D
                    
                      t
                      -
                      1
                    
                    
                      
                        
                          i
                          ⁢
                          
                            
                          
                          ⁢
                          1
                        
                        +
                        1
                      
                      ,
                      
                        j
                        ⁢
                        
                          
                        
                        ⁢
                        1
                      
                    
                  
                
                +
                
                  
                    a
                    3
                    ′
                  
                  ⁢
                  
                    D
                    
                      t
                      -
                      1
                    
                    
                      
                        i
                        ⁢
                        
                          
                        
                        ⁢
                        1
                      
                      ,
                      
                        
                          j
                          ⁢
                          
                            
                          
                          ⁢
                          1
                        
                        +
                        1
                      
                    
                  
                
                +
                
                  
                    a
                    4
                    ′
                  
                  ⁢
                  
                    D
                    
                      t
                      -
                      1
                    
                    
                      
                        
                          i
                          ⁢
                          
                            
                          
                          ⁢
                          1
                        
                        +
                        1
                      
                      ,
                      
                        
                          j
                          ⁢
                          
                            
                          
                          ⁢
                          1
                        
                        +
                        1
                      
                    
                  
                
              
              256
            
          
          }
        
      
    
    
      
        (
        2
        )
      
    
  




Concealment error computations may be computationally complex. However, under some reasonable assumptions, they may be approximated as a difference in the following SAD (sum of accumulated differences in pixel values) values:

    
    
        SADopt: SAD obtained between the original image and the compressed image when the optimal MV and the optimal encoding mode are used.
        SADest: SAD obtained between the original image and the concealed image when the estimated MV is used (estimated by the temporal concealment algorithm)
    
    


This approximation may be written as follows:




  
    
      
        
          (
          P
          )
        
        ⁢
        
          (
          
            1
            -
            Q
          
          )
        
        ⁢
        
          (
          
            1
            -
            Q
          
          )
        
        ⁢
        
          {
          
            
              
              
                
                  SAD
                  est
                  1
                
                -
                
                  SAD
                  opt
                  1
                
              
              
            
            +
            
              
                
                  
                    a
                    1
                    ′
                  
                  ⁢
                  
                    D
                    
                      t
                      -
                      1
                    
                    
                      
                        i
                        ⁢
                        
                          
                        
                        ⁢
                        1
                      
                      ,
                      
                        j
                        ⁢
                        
                          
                        
                        ⁢
                        1
                      
                    
                  
                
                +
                
                  
                    a
                    2
                    ′
                  
                  ⁢
                  
                    D
                    
                      t
                      -
                      1
                    
                    
                      
                        
                          i
                          ⁢
                          
                            
                          
                          ⁢
                          1
                        
                        +
                        1
                      
                      ,
                      
                        j
                        ⁢
                        
                          
                        
                        ⁢
                        1
                      
                    
                  
                
                +
                
                  
                    a
                    3
                    ′
                  
                  ⁢
                  
                    D
                    
                      t
                      -
                      1
                    
                    
                      
                        i
                        ⁢
                        
                          
                        
                        ⁢
                        1
                      
                      ,
                      
                        
                          j
                          ⁢
                          
                            
                          
                          ⁢
                          1
                        
                        +
                        1
                      
                    
                  
                
                +
                
                  
                    a
                    4
                    ′
                  
                  ⁢
                  
                    D
                    
                      t
                      -
                      1
                    
                    
                      
                        
                          i
                          ⁢
                          
                            
                          
                          ⁢
                          1
                        
                        +
                        1
                      
                      ,
                      
                        
                          j
                          ⁢
                          
                            
                          
                          ⁢
                          1
                        
                        +
                        1
                      
                    
                  
                
              
              256
            
          
          }
        
      
    
    
      
        (
        3
        )
      
    
  




Where a1′, a2′, a3′, a4′ are four area portions in the previous frame (as illustrated in FIG. 6) that were used as the concealment portion prediction and are used to weight average the cumulative distortion. Note that the distortion value given by formula (3) is also normalized by dividing the weighted average of the 16×16 pixel region by 256.

Note that, when using formula (3), SADest may be found to be less than SADopt in some cases (due to motion compensation inaccuracies, for example), but the difference may be negligibly small and in those cases the Conceal_Error component may be approximated as zero.
Formula (3) represents a distortion value component that corresponds to the concealment method used when both the current frame and the previous frame are both available (where each occurs at a probability of 1−Q). However, different concealment errors may exist if some or all of the current frame and/or the past frame is received erroneously, where each occurs at a probability of Q. Distortion value components corresponding to four different concealment estimates may be considered, where the four concealment estimates correspond to four scenarios 1) current frame available and previous frame available, 2) current frame available but previous frame erroneous, 3) current frame erroneous but previous frame available and 4) both the current frame and the previous frame are erroneous. Details regarding the calculation of the four concealment estimates are not crucial to the understanding of the distortion value calculation, and will not be discussed herein. The cumulative distortion including the four distortion value components may be computed as:




  
    
      
        
          D
          t
          
            x
            ,
            y
          
        
        =
        
          
            
              (
              
                1
                -
                P
              
              )
            
            ⁢
            
              {
              
                
                  
                    
                      a
                      1
                    
                    ⁢
                    
                      D
                      
                        t
                        -
                        1
                      
                      
                        i
                        ,
                        j
                      
                    
                  
                  +
                  
                    
                      a
                      2
                    
                    ⁢
                    
                      D
                      
                        t
                        -
                        1
                      
                      
                        
                          i
                          +
                          1
                        
                        ,
                        j
                      
                    
                  
                  +
                  
                    
                      a
                      3
                    
                    ⁢
                    
                      D
                      
                        t
                        -
                        1
                      
                      
                        i
                        ,
                        
                          j
                          +
                          1
                        
                      
                    
                  
                  +
                  
                    
                      a
                      4
                    
                    ⁢
                    
                      D
                      
                        t
                        -
                        1
                      
                      
                        
                          i
                          +
                          1
                        
                        ,
                        
                          j
                          +
                          1
                        
                      
                    
                  
                
                256
              
              }
            
          
          +
          
            
              (
              P
              )
            
            ⁢
            
              (
              
                1
                -
                Q
              
              )
            
            ⁢
            
              (
              
                1
                -
                Q
              
              )
            
            ⁢
            
              {
              
                
                  
                  
                    
                      SAD
                      est
                      1
                    
                    -
                    
                      SAD
                      opt
                      1
                    
                  
                  
                
                +
                
                  
                    
                      
                        a
                        1
                        ′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            i
                            ⁢
                            
                              
                            
                            ⁢
                            1
                          
                          ,
                          
                            j
                            ⁢
                            
                              
                            
                            ⁢
                            1
                          
                        
                      
                    
                    +
                    
                      
                        a
                        2
                        ′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            
                              i
                              ⁢
                              
                                
                              
                              ⁢
                              1
                            
                            +
                            1
                          
                          ,
                          
                            j
                            ⁢
                            
                              
                            
                            ⁢
                            1
                          
                        
                      
                    
                    +
                    
                      
                        a
                        3
                        ′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            i
                            ⁢
                            
                              
                            
                            ⁢
                            1
                          
                          ,
                          
                            
                              j
                              ⁢
                              
                                
                              
                              ⁢
                              1
                            
                            +
                            1
                          
                        
                      
                    
                    +
                    
                      
                        a
                        4
                        ′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            
                              i
                              ⁢
                              
                                
                              
                              ⁢
                              1
                            
                            +
                            1
                          
                          ,
                          
                            
                              j
                              ⁢
                              
                                
                              
                              ⁢
                              1
                            
                            +
                            1
                          
                        
                      
                    
                  
                  256
                
              
              }
            
          
          +
          
            
              (
              P
              )
            
            ⁢
            
              (
              Q
              )
            
            ⁢
            
              (
              
                1
                -
                Q
              
              )
            
            ⁢
            
              {
              
                
                  
                  
                    
                      SAD
                      est
                      2
                    
                    -
                    
                      SAD
                      opt
                      2
                    
                  
                  
                
                +
                
                  
                    
                      
                        a
                        1
                        ′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            i
                            ⁢
                            
                              
                            
                            ⁢
                            2
                          
                          ,
                          
                            j
                            ⁢
                            
                              
                            
                            ⁢
                            2
                          
                        
                      
                    
                    +
                    
                      
                        a
                        2
                        ′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            
                              i
                              ⁢
                              
                                
                              
                              ⁢
                              2
                            
                            +
                            1
                          
                          ,
                          
                            j
                            ⁢
                            
                              
                            
                            ⁢
                            2
                          
                        
                      
                    
                    +
                    
                      
                        a
                        3
                        ′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            i
                            ⁢
                            
                              
                            
                            ⁢
                            2
                          
                          ,
                          
                            
                              j
                              ⁢
                              
                                
                              
                              ⁢
                              2
                            
                            +
                            1
                          
                        
                      
                    
                    +
                    
                      
                        a
                        4
                        ′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            
                              i
                              ⁢
                              
                                
                              
                              ⁢
                              2
                            
                            +
                            1
                          
                          ,
                          
                            
                              j
                              ⁢
                              
                                
                              
                              ⁢
                              2
                            
                            +
                            1
                          
                        
                      
                    
                  
                  256
                
              
              }
            
          
          +
          
            
              (
              P
              )
            
            ⁢
            
              (
              
                1
                -
                Q
              
              )
            
            ⁢
            
              (
              Q
              )
            
            ⁢
            
              {
              
                
                  
                  
                    
                      SAD
                      est
                      3
                    
                    -
                    
                      SAD
                      opt
                      3
                    
                  
                  
                
                +
                
                  
                    
                      
                        a
                        1
                        ′′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            i
                            ⁢
                            
                              
                            
                            ⁢
                            3
                          
                          ,
                          
                            j
                            ⁢
                            
                              
                            
                            ⁢
                            3
                          
                        
                      
                    
                    +
                    
                      
                        a
                        2
                        ′′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            
                              i
                              ⁢
                              
                                
                              
                              ⁢
                              3
                            
                            +
                            1
                          
                          ,
                          
                            j
                            ⁢
                            
                              
                            
                            ⁢
                            3
                          
                        
                      
                    
                    +
                    
                      
                        a
                        3
                        ′′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            i
                            ⁢
                            
                              
                            
                            ⁢
                            3
                          
                          ,
                          
                            
                              j
                              ⁢
                              
                                
                              
                              ⁢
                              3
                            
                            +
                            1
                          
                        
                      
                    
                    +
                    
                      
                        a
                        4
                        ′′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            
                              i
                              ⁢
                              
                                
                              
                              ⁢
                              3
                            
                            +
                            1
                          
                          ,
                          
                            
                              j
                              ⁢
                              
                                
                              
                              ⁢
                              3
                            
                            +
                            1
                          
                        
                      
                    
                  
                  256
                
              
              }
            
          
          +
          
            
              (
              P
              )
            
            ⁢
            
              (
              Q
              )
            
            ⁢
            
              (
              Q
              )
            
            ⁢
            
              {
              
                
                  
                  
                    
                      SAD
                      est
                      4
                    
                    -
                    
                      SAD
                      opt
                      4
                    
                  
                  
                
                +
                
                  
                    
                      
                        a
                        1
                        ′′′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            i
                            ⁢
                            
                              
                            
                            ⁢
                            4
                          
                          ,
                          
                            j
                            ⁢
                            
                              
                            
                            ⁢
                            4
                          
                        
                      
                    
                    +
                    
                      
                        a
                        2
                        ′′′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            
                              i
                              ⁢
                              
                                
                              
                              ⁢
                              4
                            
                            +
                            1
                          
                          ,
                          
                            j
                            ⁢
                            
                              
                            
                            ⁢
                            4
                          
                        
                      
                    
                    +
                    
                      
                        a
                        3
                        ′′′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            i
                            ⁢
                            
                              
                            
                            ⁢
                            4
                          
                          ,
                          
                            
                              j
                              ⁢
                              
                                
                              
                              ⁢
                              4
                            
                            +
                            1
                          
                        
                      
                    
                    +
                    
                      
                        a
                        4
                        ′′′′
                      
                      ⁢
                      
                        D
                        
                          t
                          -
                          1
                        
                        
                          
                            
                              i
                              ⁢
                              
                                
                              
                              ⁢
                              4
                            
                            +
                            1
                          
                          ,
                          
                            
                              j
                              ⁢
                              
                                
                              
                              ⁢
                              4
                            
                            +
                            1
                          
                        
                      
                    
                  
                  256
                
              
              }
            
          
        
      
    
    
      
        (
        4
        )
      
    
  




Where the first concealment estimate results in a distortion of |SADest1−SADopt1|, and the second concealment estimate results in a distortion of |SADest2−SADopt2|, and so on. In addition, the cumulative distortions are weight averaged based on the areas (a′, a′′, a′′′ and a′′′′) of the prediction regions used in each of the four concealment estimates. The concealment estimates may be based on different types of concealment methods such as spatial concealment, bidirectional concealment, etc. For example, a concealment algorithm may conceal temporally sometimes and spatially other times, depending on deterministic/probabilistic criteria. The encoder device performing the distortion value calculation and determining which encoding method to use based on the distortion value may model the same or similar concealment methods that are used in a decoder in order to improve the error recovery and/or error concealment performance when the decoder receives erroneous data.

Note that other concealment estimates may be considered and included in Equation (4) based on the probabilities that other prediction regions are not available. Equation (4) may be used for each MB in a frame in order to form the distortion map as illustrated in FIG. 5. Thus, the distortion values calculated using Equation (4) comprise a weighted sum of distortions incurred by choosing multiple options of concealment, where the weight is the probability of each concealment option being chosen.
FIG. 4B is a flowchart illustrating in more detail an example of a method of encoding a portion of a video stream in a system such as illustrated in FIG. 1. Method 420 includes the blocks 402 and 404 as discussed above in reference to FIG. 4A including various concealment methods that may be considered when estimating the distortion value at the block 402 and various methods of determining the encoding method at the block 404.
At block 402, the distortion value may be estimated using algorithms similar to those discussed above in reference to Equation (4). The exact distortion value equations used depend on the type of concealment method that is being represented. The concealment methods being represented may include spatial concealment methods where prediction portions located in the same frame are used to conceal a portion received in error. In the case of spatial concealment within a frame, the cumulative distortion values of MB's in the current frame are used instead of distortion values from the previous frame. Temporal concealment methods may include unidirectional prediction as discussed above and represented by Equation (4), and may also include bi-directional prediction where availability of a subsequent frame may also be considered.
One example of a temporal concealment method is motion vector scaling. Motion vector scaling is a method that interpolates and/or extrapolates motion vectors from other frames to derive a motion vector for a portion of erroneous multimedia data in a current frame. Another example of a temporal concealment method is frame rate conversion. Frame rate conversion may be similar to motion vector scaling, but involves construction of an entire frame based on, typically, two surrounding frames. Other examples of temporal error concealment methods may be based on optical flow methods. Other forms of concealment that may be represented by the distortion value estimated at the block 402 include spatial and frequency domain interpolation, maximally smooth recovery, and projection into convex sets. Skilled technologists will recognize other forms of error concealment that may be represented when estimating the distortion value at the block 402 of the method 400.
As discussed above, the encoder device determines, at the block 404, an encoding method based on the distortion value that was estimated at the block 402. In some embodiments, the estimated distortion value is compared to a threshold and the encoding method is determined based on the comparison. The threshold may be a single value for all portions of multimedia data. However, the threshold may also vary according to methods such as those listed in the block 404 of the method 420. These methods will be discussed in relation to determining an encoding method based on exceeding a threshold, where the encoding method chosen if the threshold is exceeded will generally serve to refresh the portion (or at least decrease the estimated distortion value of the portion). However, it should be noted that encoding methods may also be determined based on the distortion value being less than a threshold.
In some examples, the threshold is varied as a function of a texture of an area in which the multimedia portion being encoded is located. Areas with a widely varying texture (e.g., large variations from pixel to pixel) may not show errors as much as areas with a less varied texture, and may therefore be afforded a higher threshold over which the encoding method may be determined to refresh the portion (e.g., using intra-coding). Areas with smooth or slightly varied texture, however, may show errors more and may therefore be assigned a lower threshold.
In some examples, the threshold may be varied as a function of the position, or location, of the portion being encoded within a frame. For example, portions on the edges may be assigned a higher threshold than portions in the middle. In this way, the areas where a viewer more frequently looks (e.g., the center of the frame) may be refreshed more often than areas on the edge where a view may not watch as often.
In some examples, the threshold may be a function of the position of the current frame being encoded within a GOP (group of pictures) or a superframe of multiple frames. A GOP generally starts with an intra-coded frame or a set of frames that include substantially all of the MB's within a frame being intra-coded at least once (known as adaptive intra refresh or AIR), and where the other frames in the GOP (or superframe) do not reference frames outside of the GOP. In order to assure that the MB's have a higher chance of being intra-coded at the start of a GOP, the threshold in the frames near the beginning of the GOP may have a lower threshold than the MB's near the end of the GOP.
In some examples, the threshold may be a function of the distribution of distortion values, in the distortion map for example, within a frame. For example, the threshold may be set adaptively to ensure a percentage of MB's within the frame are intra-coded based on the distribution of distortion values. This may be used to limit the number of intra-coded MB's to limit the data rate necessary for transmission. Even though the quality may be degraded for some frames (due to a high distribution of distortion values), the data rate may be kept to a desired level.
In some examples, the threshold may be a function of motion activity in an area of the frame containing the portion being encoded. Errors that occur in areas of video that are characterized by higher motion activity tend to be less perceivable than errors that occur in areas characterized by little motion. The threshold may be set to higher values in areas experiencing higher motion activity than in areas experiencing lower motion activity. Motion activity may be measured in many ways. For example, motion vector amplitude may be used as a motion activity indicator where higher amplitude motion vectors indicate higher motion activity. Variation of motion vector direction can also be used as a motion activity indicator. If most of the motion vectors in an area are pointing in substantially the same direction, this may be an indication of low motion activity. If motion vectors in neighboring blocks of an area are pointing in different directions, this may be an indication of high motion activity. Similar motion activity measures may be obtained using other motion compensation techniques such as optical flow.
In some examples, the threshold may be a function of the encoding mode of the portion of video being encoded. For example, some portions of video are typically not used as a reference for other predicted portions of video. B frames, for example, are not used for reference frames in many systems. Thus, the distortion value of the B frames in this type of system could be allowed to be higher since no other video will reference it. Since no other video will reference the B frame, the errors will persist for only one frame duration (e.g., 1/30th of second in a 30 frame per second video sequence). Thus, the threshold could be higher for non-referenced portions of video than for portions of video that may be referenced by other predicted portions.
After the encoding method is determined, at the block 404, based on the distortion value estimated at the block 402, the process 420 continues at block 406, where the portion of multimedia data being encoded is encoded with the determined encoding method. The encoding methods at block 406 may include intra-coding with or without spatial prediction of neighbors. Intra-coding without spatial prediction of neighboring pixels may be chosen in order to reduce the distortion value calculated at the block 402. The encoding methods at block 406 may include unidirectional or bidirectional prediction using motion compensated prediction. Different forms of motion compensated prediction may be chosen over others in order to reduce the distortion value estimated at the block 402. Motion compensate prediction may include block matching, optical flow and other methods to calculate motion vectors as discussed above. It should be noted that some of the blocks of the method 420 may be combined, omitted, rearranged or any combination thereof.
FIG. 7 is a functional block diagram illustrating an example of an encoder device 110 that may be used in a system such as illustrated in FIG. 1. This aspect includes means for estimating a distortion value for a first portion of multimedia data based at least in part on one or more concealment methods related to concealing the first portion if the first portion were received in error, and means for determining an encoding method for the first portion based at least in part on the estimated distortion value. Some examples of this aspect include where the estimating means comprises a distortion value estimator 702, and where the determining means comprises an encoding method determiner 704.
FIG. 8 is a functional block diagram illustrating an example of an encoder device 110 that may be used in a system such as illustrated in FIG. 1. This aspect includes means for estimating a distortion value for a first portion of multimedia data based at least in part on one or more concealment methods related to concealing the first portion if the first portion were received in error, and means for determining an encoding method for the first portion based at least in part on the estimated distortion value. In some examples of this aspect, the estimating means comprises a module for estimating distortion value 802 and the determining means comprises a module for determining encoding method 804.
Those of ordinary skill in the art would understand that information and signals may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be referenced throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
Those of ordinary skill would further appreciate that the various illustrative logical blocks, modules, and algorithm steps described in connection with the examples disclosed herein may be implemented as electronic hardware, firmware, computer software, middleware, microcode, or combinations thereof. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed methods.
The various illustrative logical blocks, components, modules, and circuits described in connection with the examples disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core or ASIC core, or any other such configuration.
The steps of a method or algorithm described in connection with the examples disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, an optical storage medium, or any other form of storage medium known in the art. An example storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuit (ASIC). The ASIC may reside in a wireless modem. In the alternative, the processor and the storage medium may reside as discrete components in the wireless modem.
The previous description of the disclosed examples is provided to enable any person of ordinary skill in the art to make or use the disclosed methods and apparatus. Various modifications to these examples will be readily apparent to those skilled in the art, and the principles defined herein may be applied to other examples and additional elements may be added.
Thus, methods and apparatus to perform highly efficient encoding of multimedia data providing for efficient decoding quality and error concealment have been described.

## Claims

1. A method of encoding multimedia data comprising:
estimating a first distortion value for a first portion of multimedia data, wherein the first distortion value is estimated based at least in part on one or more concealment methods related to concealing the first portion if the first portion was received in error and further based at least in part on a probability of error of prediction data used by the one or more concealment methods;
determining an encoding method for the first portion based at least in part on the first estimated distortion value;
estimating one or more second distortion values for one or more second portions of the multimedia data; and
forming a distortion map containing the first estimated distortion value and the one or more second estimated distortion values.

2. The method of claim 1, further comprising encoding the first portion using the determined encoding method.

3. The method of claim 1, wherein determining the encoding method further comprises determining the encoding method so as to refresh the first portion based on a comparison of the first estimated distortion value and a threshold.

4. The method of claim 3, wherein the threshold varies as a function of one or more factors selected from a list of factors, the list of factors including:
a location of the first portion in a frame containing the first portion,
a texture of an area of the frame containing the first portion,
a position of the frame containing the first portion within a group of pictures containing the frame,
a distribution of distortion values in the frame containing the first portion,
a motion activity of the area of the frame containing the first portion, and
an encoding mode of the frame containing the first portion.

5. The method of claim 1, further comprising intra-coding the first portion so as to refresh the first portion based on a comparison of the first estimated distortion value and a threshold.

6. The method of claim 1, further comprising estimating the first distortion value for the first portion based at least in part on a difference in pixel values between a version of the first portion constructed by the one or more concealment methods and an error free version of the first portion.

7. The method of claim 1, wherein estimating the first distortion value for the first portion further comprises estimating distortion components of the first distortion value for each of the one or more concealment methods.

8. The method of claim 1, wherein estimating the first distortion value further comprises weight averaging cumulative distortion values from multiple prediction regions that would be used by the one or more concealment methods related to concealing the first portion if the first portion was received in error, wherein the weight averaging is based at least in part on the size of the prediction regions.

9. The method of claim 1, wherein determining the encoding method further comprises determining one or more encoding methods for the first and second portions based at least in part on the distortion map.

10. The method of claim 9, wherein determining the one or more encoding methods further comprises determining the one or more encoding methods so as to refresh the first and second portions based on a comparison of the distortion values in the distortion map and one or more thresholds.

11. The method of claim 10, wherein the one or more thresholds vary as a function of one or more factors selected from a list of factors, the list of factors including:
locations of the first and second portions in a frame,
textures of areas of the frame containing the first and second portions,
a position of the frame containing the first and second portions within a group of pictures containing the frame,
a distribution of distortion values in the distortion map for the frame containing the first and second portions,
motion activities of areas of the frame containing the first and second portions, and
an encoding mode of the frame containing the first and second portions.

12. A multimedia data processor being configured to:
estimate a first distortion value for a first portion of multimedia data, wherein the first distortion value is estimated based at least in part on one or more concealment methods related to concealing the first portion if the first portion was received in error and further based at least in part on a probability of error of prediction data used by the one or more concealment methods;
determine an encoding method for the first portion based at least in part on the first estimated distortion value;
estimate one or more second distortion values for one or more second portions of multimedia data; and
form a distortion map containing the first estimated distortion value and the one or more second estimated distortion values.

13. The multimedia data processor of claim 12, wherein the multimedia data processor is further configured to encode the first portion using the determined encoding method.

14. The multimedia data processor of claim 12, wherein the multimedia data processor is further configured to determine the encoding method so as to refresh the first portion based on a comparison of the first estimated distortion value and a threshold.

15. The multimedia data processor of claim 14, wherein the threshold varies as a function of one or more factors selected from a list of factors, the list of factors including:
a location of the first portion in a frame containing the first portion,
a texture of an area of a frame containing the first portion,
a position of the frame containing the first portion within a group of pictures containing the frame,
a distribution of distortion values in the frame containing the first portion,
a motion activity of the area of the frame containing the first portion, and
an encoding mode of the frame containing the first portion.

16. The multimedia data processor of claim 12, wherein the multimedia data processor is further configured to intra-code the first portion so as to refresh the first portion based on a comparison of the first estimated distortion value and a threshold.

17. The multimedia data processor of claim 12, wherein the multimedia data processor is further configured to estimate the first distortion value for the first portion based at least in part on a difference in pixel values between a version of the first portion constructed by the one or more concealment methods and an error free version of the first portion.

18. The multimedia data processor of claim 12, wherein the multimedia data processor is further configured to estimate distortion components of the first distortion value for each of the one or more concealment methods.

19. The multimedia data processor of claim 12, wherein the multimedia data processor is further configured to weight average cumulative distortion values from multiple prediction regions that would be used by the one or more concealment methods related to concealing the first portion if the first portion was received in error, wherein the weight averaging is based at least in part on the size of the prediction regions.

20. The multimedia data processor of claim 12, wherein the multimedia data processor is further configured to determine one or more encoding methods for the first and second portions based at least in part on the distortion map.

21. The multimedia data processor of claim 20, wherein the multimedia data processor is further configured to determine the one or more encoding methods so as to refresh the first and second portions based on a comparison of the distortion values in the distortion map and one or more thresholds.

22. The multimedia data processor of claim 21, wherein the one or more thresholds vary as a function of one or more factors selected from a list of factors, the list of factors including:
locations of the first and second portions in a frame,
textures of areas of the frame containing the first and second portions,
a position of the frame containing the first and second portions within a group of pictures containing the frame,
a distribution of distortion values in the distortion map for the frame containing the first and second portions,
motion activities of areas of the frame containing the first and second portions, and
an encoding mode of the frame containing the first and second portions.

23. An apparatus for encoding multimedia data comprising:
an estimator to estimate a first distortion value for a first portion of multimedia data, wherein the distortion value is estimated based at least in part on one or more concealment methods related to concealing the first portion if the first portion was received in error and further based at least in part on a probability of error of prediction data used by the one or more concealment methods;
a determiner to determine an encoding method for the first portion based at least in part on the first estimated distortion value;
wherein the estimator estimates one or more second distortion values for one or more second portions of multimedia data and forms a distortion map containing the first estimated distortion value and the one or more second estimated distortion values.

24. The apparatus of claim 23, further comprising an encoder to encode the first portion using the determined encoding method.

25. The apparatus of claim 23, wherein the determiner determines the encoding method so as to refresh the first portion based on a comparison of the first estimated distortion value and a threshold.

26. The apparatus of claim 25, wherein the threshold varies as a function of a texture of one or more factors selected from a list of factors, the list of factors including:
a location of the first portion in a frame containing the first portion,
a texture of an area of the frame containing the first portion,
a position of the frame containing the first portion within a group of pictures containing the frame,
a distribution of distortion values in the frame containing the first portion,
a motion activity of the area of the frame containing the first portion, and
an encoding mode of the frame containing the first portion.

27. The apparatus of claim 23, further comprising an encoder to intra-code the first portion so as to refresh the first portion based on a comparison of the first estimated distortion value and a threshold.

28. The apparatus of claim 23, wherein the estimator estimates the first distortion value for the first portion based at least in part on a difference in pixel values between a version of the first portion constructed by the one or more concealment methods and an error free version of the first portion.

29. The apparatus of claim 23, wherein the estimator estimates distortion components of the first distortion value for each of the one or more concealment methods.

30. The apparatus of claim 23, wherein the estimator estimates the first distortion value by weight averaging cumulative distortion values from multiple prediction regions that would be used by the one or more concealment methods related to concealing the first portion if the first portion was received in error, wherein the weight averaging is based at least in part on the size of the prediction regions.

31. The apparatus of claim 23, wherein the determiner determines one or more encoding methods for the first and second portions based at least in part on the distortion map.

32. The apparatus of claim 31, wherein the determiner determines the one or more encoding methods so as to refresh the first and second portions based on a comparison of the distortion values in the distortion map and one or more thresholds.

33. The apparatus of claim 32, wherein the one or more thresholds vary as a function of one or more factors selected from a list of factors, the list of factors including:
locations of the first and second portions in a frame,
textures of areas of the frame containing the first and second portions,
a position of the frame containing the first and second portions within a group of pictures containing the frame,
a distribution of distortion values in the distortion map for the frame containing the first and second portions,
motion activities of areas of the frame containing the first and second portions, and
an encoding mode of the frame containing the first and second portions.

34. An apparatus for encoding multimedia data comprising:
means for estimating a first distortion value for a first portion of multimedia, wherein the first distortion value is estimated data based at least in part on one or more concealment methods related to concealing the first portion if the first portion was received in error and further based at least in part on a probability of error of prediction data used by the one or more concealment methods;
means for determining an encoding method for the first portion based at least in part on the first estimated distortion value;
means for estimating one or more second distortion values for one or more second portions of multimedia data; and
means for forming a distortion map containing the first and second estimated distortion values for the first and second portions of multimedia data contained.

35. The apparatus of claim 34, further comprising means for encoding the first portion using the determined encoding method.

36. The apparatus of claim 34, wherein the determining means determines the encoding method so as to refresh the first portion based on a comparison of the first estimated distortion value and a threshold.

37. The apparatus of claim 36, wherein the threshold varies as a function of one or more factors selected from a list of factors, the list of factors including:
a location of the first portion in a frame containing the first portion,
a texture of an area of the frame containing the first portion,
a position of the frame containing the first portion within a group of pictures containing the frame,
a distribution of distortion values in the frame containing the first portion,
a motion activity of the area of the frame containing the first portion, and
an encoding mode of the frame containing the first portion.

38. The apparatus of claim 34, further comprising means for intra-coding the first portion so as to refresh the first portion based on a comparison of the first estimated distortion value and a threshold.

39. The apparatus of claim 34, wherein the estimating means estimates the first distortion value for the first portion based at least in part on a difference in pixel values between a version of the first portion constructed by the one or more concealment methods and an error free version of the first portion.

40. The apparatus of claim 34, wherein the estimating means estimates the first distortion value for the first portion by estimating distortion components of the first distortion value for each of the one or more concealment methods.

41. The apparatus of claim 34, wherein the estimating means estimates the first distortion value by weight averaging cumulative distortion values from multiple prediction regions that would be used by the one or more concealment methods related to concealing the first portion if the first portion was received in error, wherein the weight averaging is based at least in part on the size of the prediction regions.

42. The apparatus of claim 34, wherein the determining means determines one or more encoding methods for the first and second portions based at least in part on the distortion map.

43. The apparatus of claim 42, wherein the determining means determines the one or more encoding methods so as to refresh the first and second portions based on a comparison of the distortion values in the distortion map and one or more thresholds.

44. The apparatus of claim 43, wherein the one or more thresholds vary as a function of one or more factors selected from a list of factors, the list of factors including:
locations of the first and second portions in a frame,
textures of areas of the frame containing the first and second portions,
a position of the frame containing the first and second portions within a group of pictures containing the frame,
a distribution of distortion values in the distortion map for the frame containing the first and second portions,
motion activities of areas of the frame containing the first and second portions, and
an encoding mode of the frame containing the first and second portions.

45. A non-transitory, machine readable medium comprising instructions that upon execution cause a machine to:
estimate a first distortion value for a first portion of multimedia data, wherein the first distortion value is estimated based at least in part on one or more concealment methods related to concealing the first portion if the first portion was received in error and further based at least in part on a probability of error of prediction data used by the one or more concealment methods;
determine an encoding method for the first portion based at least in part on the first estimated distortion value;
estimate one or more second distortion values for one or more second portions of multimedia data; and
form a distortion map containing the first and second estimated distortion values for first and second portions of multimedia data.

46. The machine readable medium of claim 45, further comprising instructions that upon executing cause the machine to encode the first portion using the determined encoding method.

47. The machine readable medium of claim 45, further comprising instructions that upon executing cause the machine to determine the encoding method so as to refresh the first portion based on a comparison of the first estimated distortion value and a threshold.

48. The machine readable medium of claim 47, wherein the threshold varies as a function of one or more factors selected from a list of factors, the list of factors including:
a location of the first portion in a frame containing the first portion,
a texture of an area of the frame containing the first portion,
a position of the frame containing the first portion within a group of pictures containing the frame,
a distribution of distortion values in the frame containing the first portion,
a motion activity of the area of the frame containing the first portion, and
an encoding mode of the frame containing the first portion.

49. The machine readable medium of claim 45, further comprising instructions that upon executing cause the machine to intra-code the first portion so as to refresh the first portion based on a comparison of the first estimated distortion value and a threshold.

50. The machine readable medium of claim 45, further comprising instructions that upon executing cause the machine to estimate the first distortion value for the first portion based at least in part on a difference in pixel values between a version of the first portion constructed by the one or more concealment methods and an error free version of the first portion.

51. The machine readable medium of claim 45, further comprising instructions that upon executing cause the machine to estimate distortion components of the first distortion value for each of the one or more concealment methods.

52. The machine readable medium of claim 45, further comprising instructions that upon executing cause the machine to weight average cumulative distortion values from multiple prediction regions that would be used by the one or more concealment methods related to concealing the first portion if the first portion was received in error, wherein the weight averaging is based at least in part on the size of the prediction regions.

53. The machine readable medium of claim 45, further comprising instructions that upon executing cause the machine to determine one or more encoding methods for the first and second portions based at least in part on the distortion map.

54. The machine readable medium of claim 53, further comprising instructions that upon executing cause the machine to determine the one or more encoding methods so as to refresh the first and second portions based on a comparison of the distortion values in the distortion map and one or more thresholds.

55. The machine readable medium of claim 54, wherein the one or more thresholds vary as a function of one or more factors selected from a list of factors, the list of factors including:
locations of the first and second portions in a frame,
textures of areas of the frame containing the first and second portions,
a position of the frame containing the first and second portions within a group of pictures containing the frame,
a distribution of distortion values in the distortion map for the frame containing the first and second portions,
motion activities of areas of the frame containing the first and second portions, and
an encoding mode of the frame containing the first and second portions.