Abstract:
A video frame loss recovery scheme essentially belongs to a loss packet in a low overhead and low complicated recovery scheme and serves to protect P-frames of a group of pictures (GOP). Namely, if a P-frame of the same group of pictures loses during the transmission, a compensation frame could be applied to serve and recovered as a lost P-frame, thereby promoting to a preferable video presenting performance of a receiver.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The present invention relates to a video frame loss recovery scheme. 
         [0003]    2. Description of the Related Art 
         [0004]    Following the development of digitization, the real-time streaming video has been a popular issue in the internet technology. However, it is common that the video incurs an unexpected interference during the image transmission, such as the varied bandwidth, and the image data would accordingly lose. Herein, the main means at present to solve the influence of a loss packet on a video recovery of a receiver are described below:
   1. A concealment of the lost image data by decoding: this technique is called Error Concealment. Namely, when the data is lost during the transmission of an image block through the network, a decoder could forecast according to the relationship between the neighboring blocks so as to conceal from the image block. Wherein, different degrees of image complications result in discrete concealment efficiencies.   2. A loss packet recovery by packet: there are three main means of this solution: Forward Error Correction (FEC), Auto Repeat Request (ARQ), and hybrid; wherein:   
 
         [0007]    Forward Error Correction, e.g. the application of the RS code, adds some redundancy data into the effect data to execute the complicated RS coding. Wherein, when part of the data is lost during the network transmission, the receiver would employ the redundancy data to execute the RS decoding with the received effect data so as to recover the lost data. However, some disadvantages exist in this means: (1) The lost data might be too many to be recovered. (2) The encoding and decoding operation is highly complicated. (3) This means needs the redundancy data to serve as a protector. 
         [0008]    Auto Repeat Request (ARQ) is like the Select Repeat Automatic Repeat Request. Namely, when a transmitter consecutively transmits multiple packets to a receiver, which may discover an error in one of the data packet, the receiver would inform the transmitter of the specific error packet. Therefore, the transmitter could simply transmit the said error packet. However, this means requires considerable memories in the transmitter and the receiver for saving the transmitted and non-transmitted data. Concurrently, if this means is applied to the congested network, it may incur large Round Trip Time delay between the transmitter and receiver for recovering the lost packets. At the same time, the retransmission would increase phenomenon of network congestion. 
         [0009]    The hybrid integrates the characteristics of the Forward Error Correction (FEC) and the Auto Repeat Request (ARQ). Wherein, a transmitter would transmit the effect data for being encoded by the FEC so as to continuously transmit multiple packets to a receiver. Whereby, when the receiver detects any error existing in any data, the FEC would be previously executed and decoded for trying to recover the lost data. If the lost data is unable to be recovered, the transmitter would be informed to retransmit the said lost data again. In this means, the FEC decoding could decrease times of round trip time for recovering the loss packets, and concurrently, if the lost packet can&#39;t be recovered by the FEC, the ARQ is applied to recover the lost packet. However, if the lost packets amount to a large number, the hybrid scheme would possess all of the deficiencies in the FEC and the ARQ. 
       SUMMARY OF THE INVENTION 
       [0010]    The object of the present invention is to provide a video frame loss recovery scheme comprising a transmitter and a receiver. Wherein, the transmitter transmits at least one group of pictures (GOP) through an image encoder, and the group of pictures includes at least one P-frame. Moreover, the image encoder couples to an XOR summation device, and the P-frame transmits into the XOR summation device to generate a compensation frame. Concurrently, the said group of pictures and the compensation frame are transmitted to the receiver together. While any one of the P-frames belong to the same group of pictures loses during the transmission, the compensation frame could be directly to recover the lost P-frame, i.e., the compensation frame and the received P-frame that has not been lost could be operated through an XOR decoding device to recover the lost P-frame. Thereby, an image presenting performance of the receiver could be promoted. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0011]      FIG. 1  is a schematic view showing the present invention; and 
           [0012]      FIG. 2  is a block diagram showing the present invention. 
       
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0013]    First, referring to  FIG. 1  showing a schematic view of the present invention comprises a transmitter A and a receiver B. Wherein, the transmitter A compresses a plurality of image data  10  into a serial of group of pictures (GOP)  20 . Here in this embodiment, we adopt one group of pictures  20  to describe as following. The group of pictures  20  includes an I-frame  21 , a plurality of P-frames  22 , and a plurality of B-frames  23 . The I-frame  21  is formed by self-compressing according to the image data  10  thereof, the P-frame  22  could be compressed according to the previous image data  10  or the previous P-frame  22 , and the B-frame  23  could be compressed according to the previous and the subsequent image data  10 . Concurrently, those P-frames  22  integrally form a compensation frame  30  through an XOR logic operation. The group of pictures  20  and the compensation frame  30  are transmitted to the receiver B with each other. Wherein, if merely one P-frame  22  in the same group of pictures  20  loses in time of transmission, the compensation frame  30  and the other P-frame  22  that has not been lost could be executed to the XOR logic operation so as to recover the lost P-frame  22 . Whereby, the receiver B could receive a complete group of pictures  20 . On the other hand, if there is only one P-frame  22  in the same group of pictures  20 , the compensation frame  30  could be directly served as the lost P-frame  22 . 
         [0014]    The video frame loss recovery scheme is accomplished by showing the following respective algorithms of the transmitter and the receiver calculated as: 
       The Image Transmitter: 
       [0015]    
       
         
           
             
               R 
               e 
             
             = 
             
               max_length 
                
               
                 { 
                 
                   
                     P 
                     1 
                   
                   , 
                   
                     P 
                     2 
                   
                   , 
                   
                     P 
                     3 
                   
                   , 
                   
                     … 
                      
                     
                         
                     
                      
                     
                       P 
                       
                         k 
                         - 
                         n 
                         - 
                         1 
                       
                     
                   
                 
                 } 
               
             
           
         
       
       
         
           
             
               
                 Δ 
                  
                 
                     
                 
                  
                 
                   R 
                   i 
                 
               
               = 
               
                 
                   R 
                   e 
                 
                 - 
                 
                   f 
                    
                   
                     ( 
                     
                       P 
                       i 
                     
                     ) 
                   
                 
               
             
             , 
             
               i 
               = 
               
                 { 
                 
                   1 
                   , 
                   2 
                   , 
                   3 
                   , 
                   … 
                    
                   
                       
                   
                   , 
                   
                     k 
                     - 
                     n 
                     - 
                     1 
                   
                 
                 } 
               
             
           
         
       
       
         
           
             
               
                 P 
                 i 
               
               = 
               
                 
                   P 
                   i 
                 
                 * 
                 
                   2 
                   
                     Δ 
                      
                     
                         
                     
                      
                     
                       R 
                       i 
                     
                   
                 
               
             
             , 
             
               i 
               = 
               
                 { 
                 
                   1 
                   , 
                   2 
                   , 
                   3 
                   , 
                   … 
                    
                   
                       
                   
                   , 
                   
                     k 
                     - 
                     n 
                     - 
                     1 
                   
                 
                 } 
               
             
           
         
       
       
         
           
             
               P 
               xor 
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   1 
                 
                 
                   k 
                   - 
                   n 
                   - 
                   1 
                 
               
                
               
                   
               
                
               
                 P 
                 i 
               
             
           
         
       
     
       The Image Receiver: 
       [0016]    
       
         
           
             
               R 
               d 
             
             = 
             
               f 
                
               
                 ( 
                 
                   P 
                   xor 
                 
                 ) 
               
             
           
         
       
       
         
           
             
               
                 Δ 
                  
                 
                     
                 
                  
                 
                   R 
                   i 
                 
               
               = 
               
                 
                   R 
                   d 
                 
                 - 
                 
                   f 
                    
                   
                     ( 
                     
                       P 
                       i 
                     
                     ) 
                   
                 
               
             
             , 
             
               i 
               = 
               
                 
                   { 
                   
                     1 
                     , 
                     2 
                     , 
                     3 
                     , 
                     … 
                      
                     
                         
                     
                     , 
                     
                       k 
                       - 
                       n 
                       - 
                       1 
                     
                   
                   } 
                 
                 - 
                 j 
               
             
           
         
       
       
         
           
             
               
                 P 
                 i 
               
               = 
               
                 
                   P 
                   i 
                 
                 * 
                 
                   2 
                   
                     Δ 
                      
                     
                         
                     
                      
                     
                       R 
                       i 
                     
                   
                 
               
             
             , 
             
               i 
               = 
               
                 
                   { 
                   
                     1 
                     , 
                     2 
                     , 
                     3 
                     , 
                     … 
                      
                     
                         
                     
                     , 
                     
                       k 
                       - 
                       n 
                       - 
                       1 
                     
                   
                   } 
                 
                 - 
                 j 
               
             
           
         
       
       
         
           
             
               P 
               j 
             
             = 
             
               
                 ∑ 
                 
                   i 
                   = 
                   
                     
                       { 
                       
                         1 
                         , 
                         2 
                         , 
                         3 
                         , 
                         … 
                          
                         
                             
                         
                         , 
                         
                           k 
                           - 
                           n 
                           - 
                           1 
                         
                         , 
                         xor 
                       
                       } 
                     
                     - 
                     j 
                   
                 
               
                
               
                   
               
                
               
                 P 
                 i 
               
             
           
         
       
     
         [0017]    As to the transmitter A, the algorithm thereof would decide the longest data length of the P-frames  22 , which is presented by R e , and wherein the P-frames  22  would be presented by P 1 , P 2 , P 3 , . . . Pk−n−1. K is directed to the frame number in the group of pictures  20 , n is directed to the number of the B-frames  23 . Moreover, the longest data length R e  among the P-frame  22  in the group of pictures  20  is applied to minus a function f(P i ), and the function f(P i ) includes the P-frames  22  presented by P i . Moreover, i is directed to the sequence numbers of the P-frames  22  in the group of pictures  20 , and the function f(P i ) could acquire the data lengths of the respective P-frames  22 . Accordingly, the length differences between the longest data length among the P-frames  22  and data length of each P-frame  22  could be worked out and presented by ΔR i . After that, the data lengths of the P-frames  22  should be compensated to the identical value. Further, the P-frames  22  would collectively employ the XOR logic operation to acquire the compensation frame  30 , which is presented by P xor . 
         [0018]    As to the image receiver B, the algorithm thereof would previously decide the data length of the compensation frame  30 , which is presented by R d . Concurrently, the data length of the compensation frame  30  minus the data length of each P-frame  22  achieves the differences between the data lengths of the respective P-frames  22  and the compensation frame  30 , which is presented by ΔR i . Wherein, K is directed to the frame number in the group of pictures  20 , n is directed to the frame number of the B-frames  23 , j is directed to the sequence number of the lost P-frame  22 , and i is directed to the sequence number of the non-lost P-frame  22 . After that, the data lengths of the P-frames  22  should be compensated to the identical value. Accordingly, the non-lost P-frame  22  and the compensation frame  30  can be mutually calculated by the XOR logic operation to achieve the lost P-frame  22 , which is presented by P i . 
         [0019]    Referring to  FIG. 2  shows the block diagram of the present invention. The transmitter A includes an image capture device A 1 , an image encoder A 2 , an XOR summation device A 3 , and a video transmitter A 4 . Wherein, the image capture device A 1  couples to the image encoder A 2 , and the image encoder A 2  further couples to the XOR summation device A 3  and the video transmitter A 4 , respectively. The XOR summation device A 3  further couples to the video transmitter A 4 . In addition, the receiver B includes a video receiver B 1 , an XOR decoding device B 2 , an image decoder B 3 , and an video displayer B 4 . Wherein, the video receiver B 1  respectively couples to the XOR decoding device B 2  and the image decoder B 3 , the XOR decoding device B 2  further couples to the image decoder B 3 , and the image decoder B 3  further couples to the video displayer B 4 . The abovementioned devices are operated as follows: The image capture device A 1  could capture the image data  10  that has not been encoded, so that the image data  10  could transmit into the image encoder A 2  to generate the group of pictures  20 . Namely, the image encoder A 2  receives the non-encoded image data  10  through the image capture device A 1  to execute the code MPEG4 compression to the non-encoded image data  10  according to the related encoding parameters (such as the dimension of the group of pictures  20 ), so that the I-frame  21 , the P-frames  22 , and the B-frames  23  could be correspondingly generated. The image encoder A 2  in this preferred embodiment could alternatively adopt other compressing codes, such as MPEG2, H.263, H.264, and etc. Moreover, the group of pictures  20  further transmits the coupling into the video transmitter A 4 , and the image encoder A 2  merely transmits the P-frames  22  into the XOR decoding device A 3 . Additionally, the XOR summation device A 3  could correspondingly generate the compensation frame  30  through the XOR logic operation for the compensation frame  30  to further transmit into the video transmitter A 4 . Whereby, the video transmitter A 4  would package the I-frame  21 , the P-frames  22 , the B-frames  23 , and the compensation frame  30  into a network packet for being streamingly transmitted to the video receiver B 1  by a network C, and thence the video receiver B 1  would transmit the group of pictures  20  into the video decoder B 3 . The video receiver B 1  further transmits the P-frame  22  and the compensation frame  30  into the XOR decoding device B 2  for the video receiver B 1  to judge if the P-frames  22  are lost. Wherein, when only one P-frame  22  loses and the compensation frame  30  successfully receives, the XOR decoding device B 2  would be employed to recover the lost P-frame  22  from the calculating of the compensation frame  30  and the non-lost P-frame  22  through the XOR logic operation. Thereby, the said lost P-frame  22  could be transmitted into the image decoder B 3  to execute decoding, and the image decoder B 3  would transmit the group of pictures  20  to the video displayer B 4  for a preferable image presenting performance.