Patent Abstract:
Techniques for improving the accuracy of prediction in intra-frame coding. A prediction mode can specify a pixel along a direction independently of other pixels along the same direction. In an embodiment, an encoder selects a prediction mode to best represent the image block. In an alternative embodiment, a decoder reconstructs each pixel in the image block by weighting neighboring pixels according to a weight matrix specified by the prediction mode.

Full Description:
CLAIM OF PRIORITY 
       [0001]    This patent application is based on and claims priority to U.S. patent application Ser. No. 60/912,364, filed Apr. 17, 2007, and is a co-pending application of Attorney Docket No. 071347U1, [filed concurrently] entitled Directional Transforms For Intra-Coding, and Attorney Docket No. 071347U3, [filed concurrently] entitled Mode Uniformity Signaling For Intra-Coding, all of which can be assigned to the assignee of the present invention, the contents of which are hereby expressly incorporated by reference herein. 
     
    
     TECHNICAL FIELD 
       [0002]    The disclosure relates to digital video processing and, more particularly, to techniques for intra-frame video encoding and decoding. 
       BACKGROUND 
       [0003]    In video encoding, a frame of a video sequence may be partitioned into rectangular regions or blocks. A video block may be encoded in Intra-mode (I-mode) or Inter-mode (P-mode). 
         [0004]      FIG. 1  shows a diagram of a prior art video encoder for the I-mode. In  FIG. 1 , a spatial predictor  102  forms a predicted block  103  from video block  100  using pixels from neighboring blocks in the same frame. The neighboring blocks used for prediction may be specified by a prediction mode  101 . A summer  104  computes the prediction error  106 , i.e., the difference between the image block  100  and the predicted block  103 . Transform module  108  projects the prediction error  106  onto a set of basis or transform functions. In typical implementations, the transform functions can be derived from the discrete cosine transform (DCT), Karhunen-Loeve Transform (KLT), or any other functions. 
         [0005]    The transform module  108  outputs a set of transform coefficients  110  corresponding to the weights assigned to each of the transform functions. For example, a set of coefficients {c 0 , c 1 , c 2 , . . . , c N } may be computed, corresponding to the set of transform functions {f 0 , f 1 , f 2 , . . . , f N }. The transform coefficients  110  are subsequently quantized by quantizer  112  to produce quantized transform coefficients  114 . The quantized coefficients  114  and prediction mode  101  may be transmitted to the decoder. 
         [0006]      FIG. 1A  depicts a video decoder for the I-mode. In  FIG. 1A , quantized coefficients  1000  are provided by the encoder to the decoder, and supplied to the inverse transform module  1004 . The inverse transform module  1004  reconstructs the prediction error  1003  based on the coefficients  1000  and the fixed set of transform functions, e.g., {f 0 , f 1 , f 2 , . . . , f N }. The prediction mode  1002  is supplied to the inverse spatial prediction module  1006 , which generates a predicted block  1007  based on pixel values of already decoded neighboring blocks. The predicted block  1007  is combined with the prediction error  1003  to generate the reconstructed block  1010 . The difference between the reconstructed block  1010  and the original block  100  in  FIG. 1  is known as the reconstruction error. 
         [0007]    An example of a spatial predictor  102  in  FIG. 1  is herein described with reference to section 8.3.1 of ITU-T Recommendation H.264, published by ITU—Telecommunication Standardization Sector in March 2005, hereinafter referred to as H.264-2005. In H.264-2005, a coder offers 9 prediction modes for prediction of 4×4 blocks, including DC prediction (Mode  2 ) and 8 directional modes, labeled  0  through  8 , as shown in  FIG. 2 . Each prediction mode specifies a set of neighboring pixels for encoding each pixel, as illustrated in  FIG. 3 . In  FIG. 3 , the pixels from a to p are to be encoded, and neighboring pixels A to L and X are used for predicting the pixels a to p. 
         [0008]    To describe the spatial prediction, a nomenclature may be specified as follows. Let s denote a vector containing pixel values from neighboring blocks (e.g., values of pixels A to X in  FIG. 3  form a 1×12 vector s), and s A  denote the element of vector s corresponding to pixel A, etc. Let p denote a vector containing the pixel values for the block to be predicted (e.g., values of pixels a to p in  FIG. 3  form a 1×16 vector p), and p a  denote the element of vector p corresponding to pixel a, etc. Further let w d  denote a matrix of weights to be multiplied to the vector s to obtain the vector p when a prediction mode d is specified. w d  may be expressed as follows (Equation 1): 
         [0000]    
       
         
           
             
               w 
               d 
             
             = 
             
               [ 
               
                 
                   
                     
                       w 
                       
                         a 
                         , 
                         A 
                       
                       d 
                     
                   
                   
                     
                       w 
                       
                         a 
                         , 
                         B 
                       
                       d 
                     
                   
                   
                     … 
                   
                   
                     
                       w 
                       
                         a 
                         , 
                         X 
                       
                       d 
                     
                   
                 
                 
                   
                     
                       w 
                       
                         b 
                         , 
                         A 
                       
                       d 
                     
                   
                   
                     
                         
                     
                   
                   
                     
                         
                     
                   
                   
                     
                         
                     
                   
                 
                 
                   
                     ⋮ 
                   
                   
                     
                         
                     
                   
                   
                     ⋰ 
                   
                   
                     
                         
                     
                   
                 
                 
                   
                     
                       w 
                       
                         p 
                         , 
                         A 
                       
                       d 
                     
                   
                   
                     
                         
                     
                   
                   
                     
                         
                     
                   
                   
                     
                       w 
                       
                         p 
                         , 
                         X 
                       
                       d 
                     
                   
                 
               
               ] 
             
           
         
       
     
         [0000]    The vector of predicted pixels p may then be expressed as follows (Equation 2): 
         [0000]    
       
         
           
             p 
             = 
             
               
                 
                   w 
                   d 
                 
                 · 
                 
                   s 
                    
                   
                     
 
                   
                   [ 
                   
                     
                       
                         
                           p 
                           a 
                         
                       
                     
                     
                       
                         
                           p 
                           b 
                         
                       
                     
                     
                       
                         ⋮ 
                       
                     
                     
                       
                         
                           p 
                           p 
                         
                       
                     
                   
                   ] 
                 
               
               = 
               
                 
                   [ 
                   
                     
                       
                         
                           w 
                           
                             a 
                             , 
                             A 
                           
                           d 
                         
                       
                       
                         
                           w 
                           
                             a 
                             , 
                             B 
                           
                           d 
                         
                       
                       
                         … 
                       
                       
                         
                           w 
                           
                             a 
                             , 
                             X 
                           
                           d 
                         
                       
                     
                     
                       
                         
                           w 
                           
                             b 
                             , 
                             A 
                           
                           d 
                         
                       
                       
                         
                             
                         
                       
                       
                         
                             
                         
                       
                       
                         
                             
                         
                       
                     
                     
                       
                         ⋮ 
                       
                       
                         
                             
                         
                       
                       
                         ⋰ 
                       
                       
                         
                             
                         
                       
                     
                     
                       
                         
                           w 
                           
                             p 
                             , 
                             A 
                           
                           d 
                         
                       
                       
                         
                             
                         
                       
                       
                         
                             
                         
                       
                       
                         
                           w 
                           
                             p 
                             , 
                             X 
                           
                           d 
                         
                       
                     
                   
                   ] 
                 
                  
                 
                   [ 
                   
                     
                       
                         
                           s 
                           A 
                         
                       
                     
                     
                       
                         
                           s 
                           B 
                         
                       
                     
                     
                       
                         ⋮ 
                       
                     
                     
                       
                         
                           s 
                           X 
                         
                       
                     
                   
                   ] 
                 
               
             
           
         
       
     
         [0009]    According to H.264-2005, if, for example, Mode  0  is selected, then pixels a, e, i and m are predicted by setting them equal to pixel A, and pixels b, f, j and n are predicted by setting them equal to pixel B, etc. Each set of pixels in Mode  0  corresponds to pixels lying along a single vertical direction, as shown in  FIGS. 2 and 3 . The relationships of the predicted to neighboring pixels for Mode  0  may be represented as follows (Equations 3): 
         [0000]      w 0   a,A =w 0   e,A =w 0   i,A =w 0   m,A =1; 
         [0000]      w 0   b,B =w 0   f,B =w 0   j,B =w 0   n,B =1; 
         [0000]      w 0   c,C =w 0   g,C =w 0   k,C =w 0   o,C =1; 
         [0000]      w 0   d,D =w 0   h,D =w 0   l,D =w 0   p,B =1; 
         [0010]    and all other w 0 =0. 
         [0011]    On the other hand, if Mode  1  is selected, pixels a, b, c and d are predicted by setting them equal to pixel I, and pixels e, f, g and h are predicted by setting them equal to pixel J, etc. In this case, each set of pixels corresponds to pixels lying along a single horizontal direction, also as shown in  FIGS. 2 and 3 . The relationships for Mode  1  may be represented as follows (Equations 4): 
         [0000]      w 1   a,I =w 1   b,I =w 1   c,I =w 1   d,I =1; 
         [0000]      w 1   e,J =w 1   f,J =w 1   g,J =w 1   h,J =1; 
         [0000]      w 1   i,K =w 1   j,K =w 1   k,K =w 1   l,K =1; 
         [0000]      w 1   m,L =w 1   n,L =w 1   o,L =w 1   p,L =1; 
         [0012]    and all other w 1 =0. 
         [0013]    Note that the modes given in H.264-2005 all specify setting the pixels along a single direction (e.g., the vertical direction in Mode  0 , and the horizontal direction in Mode  1 ) equal to each other, and to a single neighboring pixel. While this is straightforward to implement and specify, in some cases it may be advantageous to set pixels along a single direction to values that are different from each other, and/or a combination of more than one neighboring pixel. 
       SUMMARY 
       [0014]    An aspect of the present disclosure provides a method for encoding an image block, the image block comprising a set of pixel values, the method comprising selecting a prediction mode for predicting pixels in the image block based on neighboring pixels, the prediction mode specifying the predicted value of at least one pixel in the image block as a combination of at least two neighboring pixels. 
         [0015]    Another aspect of the present disclosure provides a method for predicting an image block, the image block comprising a set of pixel values, the method comprising receiving a prediction mode for predicting pixels in the image block based on neighboring pixels; and generating a predicted block based on the neighboring pixels and the prediction mode, the generating comprising combining at least two neighboring pixels to predict at least one pixel in the image block. 
         [0016]    Yet another aspect of the present disclosure provides an apparatus for encoding an image block, the image block comprising a set of pixel values, the apparatus comprising a spatial predictor for selecting a prediction mode for predicting pixels in the image block based on neighboring pixels, the prediction mode specifying the predicted value of at least one pixel in the image block as a combination of at least two neighboring pixels. 
         [0017]    Yet another aspect of the present disclosure provides an apparatus for predicting an image block, the image block comprising a set of pixel values, the apparatus comprising an inverse spatial prediction block, the block receiving a prediction mode for predicting pixels in the image block based on neighboring pixels, the block combining at least two neighboring pixels to predict at least one pixel in the image block. 
         [0018]    Yet another aspect of the present disclosure provides a computer program product for predicting an image block, the image block comprising a set of pixel values, the product comprising computer-readable medium comprising code for causing a computer to receive a prediction mode for predicting pixels in the image block based on neighboring pixels; and code for causing a computer to generate a predicted block based on the neighboring pixels and the prediction mode, the code causing the computer to combine at least two neighboring pixels to predict at least one pixel in the image block. 
     
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         [0019]      FIG. 1  shows a diagram of a prior art video encoder for the I-mode. 
           [0020]      FIG. 1A  depicts a video decoder for the I-mode. 
           [0021]      FIG. 2  shows prediction modes described in H.264-2005. 
           [0022]      FIG. 3  illustrates pixel prediction using prediction modes. 
           [0023]      FIGS. 4A-4D  show a pictorial representation of the elements of matrix w 0  for the pixels a, e, i, and m. 
       
    
    
     DETAILED DESCRIPTION 
       [0024]    Disclosed herein are techniques to set pixels along a single direction to values that are different from each other, and/or a combination of more than one neighboring pixel. 
         [0025]    In one aspect, for a prediction mode, each pixel along a single direction may be specified independently of other pixels along the same direction. For example, for Mode  0 , the elements of the matrix w 0  may be modified as follows (Equations 5): 
         [0000]      w 0   a,A =1; 
         [0000]      w 0   e,A =0.9; 
         [0000]      w 0   i,A =0.8; 
         [0000]      w 0   m,A =0.7; 
         [0000]    and other elements of w 0  preserved as according to Equations 1. As shown in Equations 5, each of the pixels a, e, i, and m is predicted based on the neighboring pixel A, but each pixel has a different weight as compared to the other pixels. 
         [0026]    Note that the specification of the matrix w d  is provided to both encoder and decoder, so that the decoder has a priori knowledge of w d  for each prediction mode. Thus, no additional signaling between encoder and decoder is required beyond that shown in the embodiments of  FIGS. 1 and 1A . Note also that Equations 5 are provided only to illustrate specifying each pixel independently of others, and are not meant to limit the disclosure to any specific values shown for the matrix w 0 . 
         [0027]    The decoder, receiving the prediction mode d, and having a priori knowledge of the matrix w d  may decode the encoded block as shown in  FIG. 1A . 
         [0028]    In conjunction with or alternatively to the aspect described above, another aspect provides that, for a prediction mode, each pixel along a single direction may be specified as a combination of two or more neighboring pixels. For example, for Mode  0 , the elements of the matrix w 0  for Mode  0  may be modified as follows (Equations 6): 
         [0000]      w 0   a,A =0.5; 
         [0000]      w 0   a,B =0.5; 
         [0000]    while other elements of w 0  are unchanged from Equations 3. The predicted value (p a ) corresponding to the pixel a in  FIG. 3  may then be expressed as follows (Equation 7): 
         [0000]    
       
         
           
             
               p 
               a 
             
             = 
             
               
                 
                   [ 
                   
                     
                       
                         
                           w 
                           
                             a 
                             , 
                             A 
                           
                           0 
                         
                       
                       
                         
                           w 
                           
                             a 
                             , 
                             B 
                           
                           0 
                         
                       
                       
                         … 
                       
                       
                         
                           w 
                           
                             a 
                             , 
                             X 
                           
                           0 
                         
                       
                     
                   
                   ] 
                 
                  
                 
                     
                 
                 [ 
                 
                   
                     
                       
                         s 
                         A 
                       
                     
                   
                   
                     
                       
                         s 
                         B 
                       
                     
                   
                   
                     
                       ⋮ 
                     
                   
                   
                     
                       
                         s 
                         X 
                       
                     
                   
                 
                 ] 
               
               = 
               
                 
                   0.5 
                    
                   
                       
                   
                    
                   
                     s 
                     A 
                   
                 
                 + 
                 
                   0.5 
                    
                   
                       
                   
                    
                   
                     s 
                     B 
                   
                 
               
             
           
         
       
     
         [0000]    Note the values for w 0  in Equations 6 are provided only as an illustration, and should not be interpreted to limit the disclosure to the values provided. 
         [0029]    In an embodiment, the above two aspects can be combined. For example, weights can be assigned such that pixels to be encoded along the same direction are weighted progressively less in favor of one or more originating encoding pixels, as the distance from the originating pixel increases. Similarly, progressively more weight may be assigned to the encoding pixels surrounding the pixels to be encoded as the distance from the originating pixel increases. 
         [0030]    To illustrate this embodiment,  FIGS. 4A-4D  show a pictorial representation of the elements of matrix w 0  for the pixels a, e, i, and m.  FIG. 4A  shows a pictorial representation of the elements of matrix w 0  for pixel a (p a ). In  FIG. 4A , neighboring pixel A is considered the originating encoding pixel. As shown, for pixel a, only weight w 0   a,A  is assigned a non-zero weight of 1.  FIG. 4B  shows weight assignments for pixel e. As shown, pixel e is assigned a different set of weights from pixel a, i.e., w 0   a,A =0.9, and w 0   a,f =0.1.  FIG. 4C  shows weight assignments for pixel i. For pixel i, w 0   a,A =0.8, w 0   a,J =0.05, w 0   a,K =0.1, and w 0   a,L =0.05.  FIG. 4D  shows weight assignments for pixel m. For pixel m, w 0   a,A =0.5, w 0   a,K =0.2, and w 0   a,L =0.3. 
         [0031]    Note that the weight assignments in  FIGS. 4A-4D  are intended to serve only as illustrations, and are not meant to limit the scope of the present disclosure to any particular values of weights shown. 
         [0032]    In an embodiment, the sum of all weights used to encode a single pixel can be set to 1, as shown in  FIGS. 4A-4D . 
         [0033]    Based on the teachings described herein, it should be apparent that an aspect disclosed herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. The techniques described herein may be implemented in hardware, software, firmware, or any combination thereof. If implemented in hardware, the techniques may be realized using digital hardware, analog hardware or a combination thereof. If implemented in software, the techniques may be realized at least in part by a computer-program product that includes a computer readable medium on which one or more instructions or code is stored. 
         [0034]    By way of example, and not limitation, such computer-readable media can comprise RAM, such as synchronous dynamic random access memory (SDRAM), read-only memory (ROM), non-volatile random access memory (NVRAM), ROM, electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), FLASH memory, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other tangible medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. 
         [0035]    The instructions or code associated with a computer-readable medium of the computer program product may be executed by a computer, e.g., by one or more processors, such as one or more digital signal processors (DSPs), general purpose microprocessors, ASICs, FPGAs, or other equivalent integrated or discrete logic circuitry. 
         [0036]    A number of aspects and examples have been described. However, various modifications to these examples are possible, and the principles presented herein may be applied to other aspects as well. These and other aspects are within the scope of the following claims.

Technology Classification (CPC): 7