Abstract:
Disclosed is a data transmission system that transmits data by using a relay. 
     The relay selects a transmission terminal from among a plurality of terminals accessing a base station. A base station transmits base station data to the relay during a first time slot, and the transmission terminal transmits terminal data to the relay. The relay transmits terminal data to the base station during a second time slot, and transmits base station data to the transmission terminal.

Description:
TECHNICAL FIELD 
       [0001]    The present invention relates to a technology for coding/decoding an image. 
       BACKGROUND ART 
       [0002]    Generally, a motion image coding method is classified into an intra-coding that performs coding of intra-image, such as an intra (I) frame, and an inter-coding that performs coding between images, such as a predictive (P) frame or a bidirectional (B) frame. 
         [0003]    According to an image compression standard, such as H.263, MPEG-4 Part 2, H.264/MPEG-4 AVC, and the like, a motion estimation is performed based on a block unit. That is, the motion estimation may be performed based on a macroblock unit or based on a sub-block unit that is obtained by dividing the macroblock unit into two or four. The motion estimation may be performed to reduce a bit rate by eliminating a temporal redundancy occurring when a motion image is coded. Particularly, H.264/MPEG-4 AVC uses various size of variable block-based motion estimation, thereby having a high coding efficiency. 
         [0004]    A prediction of a motion vector may be performed with reference to either a past image based on a time axis or both the past image and a future image. An image used as a reference when performing coding or decoding of a current frame may be referred to as a reference image. The H.264/MPEG-4 AVC supports a multiple reference frames, and thus, H.264/MPEG-4 AVC selects a block of a frame having a highest redundancy with the current block as the reference image, thereby having a greater coding efficiency than when a previous frame is only used as the reference image. Also, the H.264/MPEG-4 AVC uses a rate-distortion optimization technology to select an optimum mode from among every possible coding mode used for the motion estimation, such as the variable block mode, a space prediction mode (Intra 16×16, Intra 8×8, Intra 4×4), a SKIP mode (P_SKIP mode and B_SKIP mode), a DIRECT mode, and the like, thereby further improving the coding efficiency of the H.264/MPEG-4 AVC. 
         [0005]    According to the H.264/MPEG-4 AVC used for encoding and decoding motion image data, a transform is used as a method of increasing a compression rate of energy and decreasing a spatial correlation of a residual signal in a block after inter/intra image prediction is performed, and quantization is used for decreasing an energy of a transformed coefficient after the transform is performed and for increasing the compression rate. 
       DETAILED DESCRIPTION OF INVENTION 
       [0006]    An aspect of the present invention provides a method of increasing a compression rate of an image block when a quantized transform coefficient is generated, through a transform and quantization after performing prediction of inter/intra image with respect to a predetermined sized of block (macroblock). 
         [0007]    According to an aspect of an exemplary embodiment, there is provided an apparatus of coding an image, including a first transforming unit to transform a target image into a first transform coefficient based on a discrete cosine transform (DCT) scheme, a second transforming unit to transform the target image into a second transform coefficient based on a discrete sine transform (DST) scheme, and a transform scheme determining unit to select one of the first transform coefficient and the second coefficient as a transform coefficient of the target image. 
         [0008]    According to another aspect of an exemplary embodiment, there is provided an apparatus of decoding an image, including a transform scheme decision unit to decide a transform scheme with respect to a transform coefficient, a first inverse transforming unit to generate a decoded image with respect to the transform coefficient by using a discrete cosine inverse transform scheme, when the transform scheme is a DCT, and a second inverse transforming unit to generate the decoded image with respect to the transform coefficient by using a discrete sine inverse transform scheme, when the transform scheme is a DST. 
         [0009]    According to another aspect of an exemplary embodiment, there is provided an apparatus of coding an image, including a first transforming unit to generate a first transform coefficient by performing a DCT with respect to a target image, a second transforming unit to generate a second transform coefficient by performing a DST with respect to the target image, and a transform scheme determining unit to select one of the first transform coefficient and the second transform coefficient as a transform coefficient with respect to the target image. 
         [0010]    According to the present invention, a compression rate of an image block increases when a quantized transform coefficient is generated, through a transform and quantization after performing prediction of inter/intra image with respect to a predetermined sized of block (macroblock). 
     
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         [0011]      FIG. 1  is a block diagram illustrating an exemplary embodiment of an image coding apparatus where the present invention is applied; 
           [0012]      FIG. 2  is a block diagram illustrating a configuration of an image coding apparatus according to an exemplary embodiment of the present invention; 
           [0013]      FIG. 3  is a diagram illustrating a concept of an integer sine transform according to an exemplary embodiment of the present invention; 
           [0014]      FIG. 4  is a diagram illustrating a value of a multiplication factor in a quantizing process with respect to a 4×4 blocksized image; 
           [0015]      FIG. 5  is a diagram illustrating a value of a multiplication factor in a quantizing process with respect to an 8×8 blocksized image; 
           [0016]      FIG. 6  is a diagram illustrating a value of a scaling factor in an inverse-quantizing process with respect to a 4×4 sized image; 
           [0017]      FIG. 7  is a diagram illustrating a value of a scaling factor in an inverse-quantizing process with respect to an 8×8 sized image; 
           [0018]      FIG. 8  is a diagram illustrating a concept of integer sine inverse transform according to an exemplary embodiment of the present invention; 
           [0019]      FIG. 9  is a diagram illustrating a concept of a coefficient threshold operation according to an exemplary embodiment of the present invention; 
           [0020]      FIG. 10  is a diagram illustrating an exemplary embodiment of storing transform scheme information based on coded block pattern (CBP) according to an exemplary embodiment of the present invention; 
           [0021]      FIG. 11  is a diagram illustrating an exemplary embodiment of storing information about a transform scheme in a macro block header; 
           [0022]      FIG. 12  is a diagram illustrating an exemplary embodiment of the present invention of storing, in a slice header, information about whether the present invention is applied; 
           [0023]      FIG. 13  is a block diagram illustrating a configuration of a image decoding apparatus according to the present invention; and 
           [0024]      FIG. 14  is a block diagram illustrating a configuration of an image coding apparatus according to another exemplary embodiment of the present invention. 
       
    
    
     BEST MODE FOR CARRYING OUT THE INVENTION 
       [0025]    Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below in order to explain the present invention by referring to the figures. 
         [0026]      FIG. 1  is a block diagram illustrating an exemplary embodiment of an image coding apparatus where the present invention is applied. 
         [0027]    The image coding apparatus includes a transforming and quantizing unit  110 , an entropy coding unit  120 , a coding controlling unit  130 , an inverse-quantizing and inverse-transforming unit  140 , a loop filter  150 , a reference image storage unit  160 , a motion estimation/compensation unit  170 , and intra prediction/compensation unit  180 . 
         [0028]    Generally, a coding apparatus may include an encoding process and a decoding process, and a decoding apparatus includes a decoding process. The decoding process of the decoding apparatus is the same as a decoding process of the coding apparatus. Accordingly, hereinafter, the coding apparatus will be mainly described. 
         [0029]    The motion estimation/compensation unit  170  and the intra prediction/compensation unit  180  may generate a prediction image with respect to an input image. The motion estimation/compensation unit  170  and the intra prediction/compensation unit  180  may generate the prediction image with respect to the input image based on a reference image with respect to the input image. The reference image storage unit  160  may store the reference image with respect to the input image. A difference between the input image and the prediction image is a residual image. According to an exemplary embodiment of the present invention, the image coding apparatus may improve a coding efficiency higher compared to when the input image is coded by coding the residual image. That is, the residual image may be used as a target image of the image coding apparatus. 
         [0030]    The target image may be inputted to the transforming and quantizing unit  110 . The transforming and quantizing unit  110  may generate a first transform coefficient by performing a discrete cosine transform (DCT), quantization, and coefficient threshold operation on the target image. Also, the transforming and quantizing unit  110  may generate a second transform coefficient by performing a discrete sine transform (DST), quantization, and the coefficient threshold operation on the target image. The entropy coding unit  120  may generate a bit stream by entropy coding with respect to the discrete cosine transformed first transform coefficient or the discrete sine transformed second transform coefficient. In this instance, the coding controlling unit  130  performs an inverse-quantization and a discrete cosine inverse transform on the first transform coefficient, and performs an inverse-quantization and a discrete sine inverse transform on the second transform coefficient, thereby determining an optimum transform scheme. The coding controlling unit  130  may transmit the determined transform scheme to the transforming and quantizing unit  110 . 
         [0031]    Referring to the decoding process  190 , the inverse quantizing and inverse transforming unit  140  may perform inverse quantizing and a discrete cosine inverse transform on the first transform coefficient to generate a decoded image with respect to the first transform coefficient, and may perform inverse quantizing and a discrete sine inverse transform on the second transform coefficient to generate a decoded image with respect to the second transform coefficient. The loop filter  150  may perform low pass filtering with respect to each decoded image and may smooth a block boundary. The reference image storage unit  160  may store the decoded image in which the block boundary is smoothed, as the reference image. 
         [0032]    In a case of an inter mode, the motion compensation unit  170  may compensate for a motion by comparing the stored reference image with the input image. In a case of an intra mode, the intra prediction/compensation unit  180  may perform intra compensation without passing through the loop filter  150  and the reference image storage unit  160 . 
         [0033]      FIG. 2  is a block diagram illustrating a configuration of an image coding apparatus according to an exemplary embodiment of the present invention. 
         [0034]    An image predicting unit  210  may generate a prediction image with respect to an input image based on a reference image with respect to the input image. The image predicting unit  210  may calculate a difference between the input image and the prediction image, as a target image. 
         [0035]    A first transforming unit  220  may transform the target image into a first transform coefficient based on a DCT scheme. The first transforming unit  220  may include a discrete cosine transforming unit  221  and a quantizing unit  222 . 
         [0036]    The discrete cosine transforming unit  221  may perform a DCT on the target image to generate a first image coefficient. The quantizing unit  222  may quantize the first image coefficient to generate the first transform coefficient. 
         [0037]    A second transforming unit  230  may transform the target image into a second transform coefficient based on a DST. The second transforming unit  230  may include the discrete sine transforming unit  231  and a quantizing unit  232 . 
         [0038]    Operations of the discrete cosine transforming unit  221  and the quantizing unit  222  included in the first transforming unit  220  are similar to operations of the discrete sine transforming unit  231  and the quantizing unit  232  included in the second transforming unit  230 , and thus, hereinafter, the operation of the second transforming unit  230  will be described in detail. 
         [0039]    The discrete sine transforming unit  231  may generate a second image coefficient by performing the DST on the target image. The quantizing unit  232  may quantize the second image coefficient to generate a second transform coefficient. 
         [0040]    According to an exemplary embodiment, the discrete sine transforming unit  231  may perform the DST on the target image based on Equation 1 as below. 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       Y 
                        
                       
                         ( 
                         k 
                         ) 
                       
                     
                     = 
                     
                       
                         
                           2 
                           
                             N 
                             + 
                             1 
                           
                         
                       
                        
                       
                         
                           ∑ 
                           
                             n 
                             = 
                             0 
                           
                           
                             N 
                             - 
                             1 
                           
                         
                          
                         
                             
                         
                          
                         
                           
                             X 
                              
                             
                               ( 
                               n 
                               ) 
                             
                           
                            
                           sin 
                            
                           
                             
                               
                                 π 
                                  
                                 
                                   ( 
                                   
                                     k 
                                     + 
                                     1 
                                   
                                   ) 
                                 
                               
                                
                               
                                 ( 
                                 
                                   n 
                                   + 
                                   1 
                                 
                                 ) 
                               
                             
                             
                               N 
                               + 
                               1 
                             
                           
                         
                       
                     
                   
                   , 
                   
                     
 
                   
                    
                   
                     0 
                     ≤ 
                     k 
                     ≤ 
                     
                       N 
                       - 
                       1 
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     1 
                   
                   ] 
                 
               
             
           
         
       
     
         [0041]    Here, X indicates the target image to be discrete sine transformed, and Y indicates the second image coefficient that is discrete sine transformed. Also, N is a unit size of the DST. 
         [0042]    When the target image is a 4×4 sized image, the DST of Equation 1 may be expressed as a matrix of Equation 2 below. 
         [0000]    
       
         
           
             
               
                 
                   Y 
                   = 
                   
                     SXS 
                     = 
                     
                       ( 
                       
                         
                           
                             [ 
                             
                               
                                 
                                   a 
                                 
                                 
                                   b 
                                 
                                 
                                   b 
                                 
                                 
                                   a 
                                 
                               
                               
                                 
                                   b 
                                 
                                 
                                   a 
                                 
                                 
                                   
                                     - 
                                     a 
                                   
                                 
                                 
                                   
                                     - 
                                     b 
                                   
                                 
                               
                               
                                 
                                   b 
                                 
                                 
                                   
                                     - 
                                     a 
                                   
                                 
                                 
                                   
                                     - 
                                     a 
                                   
                                 
                                 
                                   b 
                                 
                               
                               
                                 
                                   a 
                                 
                                 
                                   
                                     - 
                                     b 
                                   
                                 
                                 
                                   b 
                                 
                                 
                                   
                                     - 
                                     a 
                                   
                                 
                               
                             
                             ] 
                           
                            
                           
                             [ 
                             X 
                             ] 
                           
                         
                          
                         
                           [ 
                           
                             
                               
                                 a 
                               
                               
                                 b 
                               
                               
                                 b 
                               
                               
                                 a 
                               
                             
                             
                               
                                 b 
                               
                               
                                 a 
                               
                               
                                 
                                   - 
                                   a 
                                 
                               
                               
                                 
                                   - 
                                   b 
                                 
                               
                             
                             
                               
                                 b 
                               
                               
                                 
                                   - 
                                   a 
                                 
                               
                               
                                 
                                   - 
                                   a 
                                 
                               
                               
                                 b 
                               
                             
                             
                               
                                 a 
                               
                               
                                 
                                   - 
                                   b 
                                 
                               
                               
                                 b 
                               
                               
                                 
                                   - 
                                   a 
                                 
                               
                             
                           
                           ] 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     2 
                   
                   ] 
                 
               
             
           
         
       
     
         [0043]    S indicates a DST matrix with respect to each row of X, X indicates the target image, and Y indicates the inverse-quantized second image coefficient. Also, elements a and b in the matrix indicate constants 
         [0000]    
       
         
           
             
               
                 
                   2 
                   5 
                 
               
                
               
                 sin 
                  
                 
                   ( 
                   
                     π 
                     5 
                   
                   ) 
                 
               
                
               
                   
               
                
               and 
                
               
                   
               
                
               
                 
                   2 
                   5 
                 
               
                
               
                 sin 
                  
                 
                   ( 
                   
                     
                       2 
                       5 
                     
                      
                     π 
                   
                   ) 
                 
               
             
             , 
           
         
       
     
         [0000]    respectively. 
         [0044]    The elements a and b in the matrix are not integers, and thus, a calculation process is extremely complex when a calculation is actually performed. According to an exemplary embodiment, the discrete sine transforming unit  231  may perform an integer sine transform on the target image based on an integer sine transform matrix obtained from the DST matrix. The integer sine transform may be expressed as given in Equation 3 below. 
         [0000]    
       
         
           
             
               
                 
                   Y 
                   - 
                   
                     
                       S 
                       f 
                     
                      
                     
                       XS 
                       f 
                       T 
                     
                   
                   - 
                   
                     ( 
                     
                       
                         
                           ⌈ 
                           
                             
                               
                                 1 
                               
                               
                                 2 
                               
                               
                                 2 
                               
                               
                                 1 
                               
                             
                             
                               
                                 1 
                               
                               
                                 1 
                               
                               
                                 
                                   - 
                                   1 
                                 
                               
                               
                                 
                                   - 
                                   1 
                                 
                               
                             
                             
                               
                                 2 
                               
                               
                                 
                                   - 
                                   1 
                                 
                               
                               
                                 
                                   - 
                                   1 
                                 
                               
                               
                                 2 
                               
                             
                             
                               
                                 1 
                               
                               
                                 1 
                               
                               
                                 1 
                               
                               
                                 1 
                               
                             
                           
                           ⌉ 
                         
                          
                         
                           [ 
                           X 
                           ] 
                         
                       
                        
                       
                         ⌈ 
                         
                           
                             
                               1 
                             
                             
                               1 
                             
                             
                               2 
                             
                             
                               1 
                             
                           
                           
                             
                               2 
                             
                             
                               1 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               
                                 - 
                                 1 
                               
                             
                           
                           
                             
                               2 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               1 
                             
                           
                           
                             
                               1 
                             
                             
                               1 
                             
                             
                               2 
                             
                             
                               1 
                             
                           
                         
                         ⌉ 
                       
                     
                     ) 
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     3 
                   
                   ] 
                 
               
             
           
         
       
     
         [0045]      FIG. 3  is a diagram illustrating a concept of an integer sine transform according to an exemplary embodiment of the present invention. 
         [0046]    When a target image is in a size of 4×4, the integer sine transform of Equation 3 may be easily performed according to the exemplary embodiment of  FIG. 3 . 
         [0047]    When the target image is in a size of 8×8, the DST of Equation 1 may be expressed as given in Equation 4 below. 
         [0000]    
       
         
           
             
               
                 
                   Y 
                   = 
                   
                     
                       
                         S 
                         f 
                       
                        
                       
                         XS 
                         f 
                         T 
                       
                     
                     - 
                     
                       
                         ⌊ 
                         
                           
                             
                               0.375 
                             
                             
                               0.75 
                             
                             
                               1.25 
                             
                             
                               1.5 
                             
                             
                               1.5 
                             
                             
                               1.25 
                             
                             
                               0.75 
                             
                             
                               0.375 
                             
                           
                           
                             
                               0.5 
                             
                             
                               1 
                             
                             
                               1 
                             
                             
                               0.5 
                             
                             
                               
                                 - 
                                 0.5 
                               
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               
                                 - 
                                 0.5 
                               
                             
                           
                           
                             
                               0.75 
                             
                             
                               1.5 
                             
                             
                               0.375 
                             
                             
                               
                                 - 
                                 1.25 
                               
                             
                             
                               
                                 - 
                                 1.25 
                               
                             
                             
                               0.375 
                             
                             
                               1.5 
                             
                             
                               0.75 
                             
                           
                           
                             
                               1 
                             
                             
                               1 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               1 
                             
                             
                               1 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               
                                 - 
                                 1 
                               
                             
                           
                           
                             
                               1.25 
                             
                             
                               0.375 
                             
                             
                               
                                 - 
                                 1.5 
                               
                             
                             
                               0.75 
                             
                             
                               0.75 
                             
                             
                               
                                 - 
                                 1.5 
                               
                             
                             
                               0.375 
                             
                             
                               1.25 
                             
                           
                           
                             
                               1 
                             
                             
                               
                                 - 
                                 0.5 
                               
                             
                             
                               
                                 - 
                                 0.5 
                               
                             
                             
                               1 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               0.5 
                             
                             
                               0.5 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                           
                           
                             
                               1.5 
                             
                             
                               
                                 - 
                                 1.25 
                               
                             
                             
                               0.75 
                             
                             
                               
                                 - 
                                 0.375 
                               
                             
                             
                               
                                 - 
                                 0.375 
                               
                             
                             
                               0.75 
                             
                             
                               
                                 - 
                                 1.25 
                               
                             
                             
                               1.5 
                             
                           
                           
                             
                               1 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               1 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               1 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               1 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                           
                         
                         ⌋ 
                       
                       · 
                       
                           
                         
                           
                             [ 
                             X 
                             ] 
                           
                            
                           
                               
                           
                            
                           
                               
                             
                               [ 
                               
                                 
                                   
                                     0.375 
                                   
                                   
                                     0.5 
                                   
                                   
                                     0.75 
                                   
                                   
                                     1 
                                   
                                   
                                     1.25 
                                   
                                   
                                     1 
                                   
                                   
                                     1.5 
                                   
                                   
                                     1 
                                   
                                 
                                 
                                   
                                     0.75 
                                   
                                   
                                     1 
                                   
                                   
                                     1.5 
                                   
                                   
                                     1 
                                   
                                   
                                     0.375 
                                   
                                   
                                     
                                       - 
                                       0.5 
                                     
                                   
                                   
                                     
                                       - 
                                       1.25 
                                     
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                 
                                 
                                   
                                     1.25 
                                   
                                   
                                     1 
                                   
                                   
                                     0.375 
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                   
                                     
                                       - 
                                       1.5 
                                     
                                   
                                   
                                     
                                       - 
                                       0.5 
                                     
                                   
                                   
                                     0.75 
                                   
                                   
                                     1 
                                   
                                 
                                 
                                   
                                     1.5 
                                   
                                   
                                     0.5 
                                   
                                   
                                     
                                       - 
                                       1.25 
                                     
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                   
                                     0.75 
                                   
                                   
                                     1 
                                   
                                   
                                     
                                       - 
                                       0.375 
                                     
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                 
                                 
                                   
                                     1.5 
                                   
                                   
                                     
                                       - 
                                       0.5 
                                     
                                   
                                   
                                     
                                       - 
                                       1.25 
                                     
                                   
                                   
                                     1 
                                   
                                   
                                     0.75 
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                   
                                     
                                       - 
                                       0.375 
                                     
                                   
                                   
                                     1 
                                   
                                 
                                 
                                   
                                     1.25 
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                   
                                     0.375 
                                   
                                   
                                     1 
                                   
                                   
                                     
                                       - 
                                       1.5 
                                     
                                   
                                   
                                     0.5 
                                   
                                   
                                     0.75 
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                 
                                 
                                   
                                     0.75 
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                   
                                     1.5 
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                   
                                     0.375 
                                   
                                   
                                     0.5 
                                   
                                   
                                     
                                       - 
                                       1.25 
                                     
                                   
                                   
                                     1 
                                   
                                 
                                 
                                   
                                     0.375 
                                   
                                   
                                     
                                       - 
                                       0.5 
                                     
                                   
                                   
                                     0.75 
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                   
                                     1.25 
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                   
                                     1.5 
                                   
                                   
                                     
                                       - 
                                       1 
                                     
                                   
                                 
                               
                               ] 
                             
                           
                         
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     4 
                   
                   ] 
                 
               
             
           
         
       
     
         [0048]    The quantizing unit  232  may generate a second transform coefficient by quantizing a second image coefficient. According to an exemplary embodiment, when the target image is in the size of 4×4, the quantizing unit  232  may quantize the second image coefficient based on Equation 5 or Equation 6 as below. 
         [0000]    
       
         
           
             
               
                 
                   
                       
                   
                    
                   
                     
                       Z 
                       
                         ( 
                         
                           i 
                           , 
                           j 
                         
                         ) 
                       
                     
                     = 
                     
                       round 
                        
                       
                           
                       
                        
                       
                         ( 
                         
                           
                             Y 
                             
                               ( 
                               
                                 i 
                                 , 
                                 j 
                               
                               ) 
                             
                           
                           QStep 
                         
                         ) 
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     5 
                   
                   ] 
                 
               
             
             
               
                 
                   
                     
                       
                         Z 
                         
                           ( 
                           
                             i 
                             , 
                             j 
                           
                           ) 
                         
                       
                       = 
                       
                         
                           sgn 
                            
                           
                             ( 
                             
                               Y 
                               
                                 ( 
                                 
                                   i 
                                   , 
                                   j 
                                 
                                 ) 
                               
                             
                             ) 
                           
                         
                         · 
                         
                           ( 
                           
                             
                               
                                  
                                 
                                   Y 
                                   
                                     ( 
                                     
                                       i 
                                       , 
                                       j 
                                     
                                     ) 
                                   
                                 
                                  
                               
                               · 
                               
                                 MF 
                                 
                                   ( 
                                   
                                     i 
                                     , 
                                     j 
                                   
                                   ) 
                                 
                               
                             
                             + 
                             DZ 
                           
                           ) 
                         
                       
                     
                     &gt;&gt; 
                     
                         
                     
                      
                     
                       ( 
                       
                         15 
                         + 
                         
                           Q 
                           D 
                         
                       
                     
                   
                   ) 
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     6 
                   
                   ] 
                 
               
             
           
         
       
     
         [0049]    Y (i,j)  indicates a second image coefficient that is integer sine transformed at (i,j) of the 4×4 matrix, and Z (i,j)  is a second transform coefficient that is generated by quantizing a second transform coefficient at the (i,j) of the 4×4 matrix. Q D  indicates a value of 
         [0000]    
       
         
           
             
               ⌊ 
               
                 QP 
                 6 
               
               ⌋ 
             
             , 
           
         
       
     
         [0000]    and QP indicates a quantization parameter. MF (i,j)  indicates a multiplication factor. QStep indicates a step size of a quantizing unit, and round( ) indicates a rounding-off function. DZ performs a function of adjusting a dead zone during a quantizing process and a value of which is selected between 0 and ½. sgn(·) is a sign function. 
         [0050]      FIG. 4  is a diagram illustrating a value of a multiplication factor in a quantizing process with respect to a 4×4 sized image. 
         [0051]    According to an exemplary embodiment, when a target image is in a size of 8×8, the quantizing unit  232  may quantize a second image coefficient based on Equation 7 to generate a second transform coefficient. 
         [0000]        Z   (i,j) )=sgn( Y   (i,j) )·(| Y   (i,j)   |·MF   (i,j)   +DZ )&gt;&gt;(16 +Q   D )  [Equation 7]
 
         [0052]      FIG. 5  is a diagram illustrating a value of a multiplication factor in a quantizing process with respect to an 8×8 sized image. 
         [0053]    The transform scheme determining unit  260  may select one of a first transform coefficient and a second transform coefficient as a transform coefficient with respect to a target image. 
         [0054]    According to an exemplary embodiment, the first transforming unit  220  may generate a first decoded image with respect to the target image based on the first transform coefficient, and the second transforming unit  230  may generate a second decoded image with respect to the target image based on the second transform coefficient. The transform scheme determining unit  260  may select a transform image with respect to the target image by comparing the target image, the first decoded image, and the second decoded image. 
         [0055]    According to another exemplary embodiment, the transform scheme determining unit  260  may select the transform image with respect to the target image further based on a number of bits of the first decoded image, a bit rate of the first decoded image, a number of bits of the second decoded image, and a bit rate of the second decoded image. That is, the transform scheme determining unit may select, as the transform coefficient with respect to the target image, a transform coefficient corresponding to a decoded image having a smaller number of bits or a smaller bit rate from among the first decoded image and the second decoded image. 
         [0056]    Also, according to another exemplary embodiment, the transform scheme determining unit  260  may select the transform image with respect to the target image further based on a distortion of the first decoded image and a distortion of the second decoded image. As an example, the transform scheme determining unit  260  may select the transform coefficient with respect to the target image based on the distortion of the decoded image together with the bit rate of the decoded image. 
         [0057]    The first transforming unit  220  may include a DCT coefficient threshold unit  223 , an inverse quantizing unit  224 , a discrete cosine inverse transforming unit  225  to generate the first decoded image. 
         [0058]    The DCT coefficient threshold unit  223  may perform a coefficient threshold operation on the first transform coefficient. The inverse quantizing unit  224  may perform an inverse-quantization on the coefficient threshold-operated first transform coefficient, and the discrete cosine inverse transforming unit  224  may generate the first decoded image with respect to the target image by performing the discrete cosine inverse transform on the inverse-quantized first transform coefficient. The transform scheme determining unit  260  may select the transform coefficient based on the first decoded image. 
         [0059]    The second transforming unit  230  may include the DST coefficient threshold unit  233 , the inverse quantizing unit  234 , and the discrete sine inverse transforming unit  225 . 
         [0060]    Operations of the DCT coefficient threshold unit  223 , the inverse quantizing unit  224 , and a discrete cosine inverse transforming unit  225  included in the first transforming unit  220  are similar to operations of the DST coefficient threshold unit  233 , the inverse quantizing unit  234 , and the discrete sine inverse transforming unit  225  included in the second transforming unit  230 , and thus, hereinafter, the operation of the second transforming unit  230  will be described in detail. 
         [0061]    The DST coefficient threshold unit  233  may perform a coefficient threshold operation on the quantized second transform coefficient. 
         [0062]    A coefficient threshold operation of the DST coefficient threshold unit  233  will be described in detail with reference to  FIG. 9 . 
         [0063]    The quantized second transform coefficient may calculate costs (a value represented as 3, 2, 1, and 0 in a left side of  FIG. 4 ) with respect to coefficients occurring in each of a 4×4 frequency domain through a coefficient threshold operation of  FIG. 9 , may calculate a sum of all costs in a 8×8 block unit, may substitute “0” for all the transformed coefficient of the corresponding 8×8 block when the sum of the costs is less than a predetermined threshold, and may determine a CBP with respect to the corresponding block as zero. The sum of the costs may be applicable when an absolute value of the transform coefficient in the corresponding frequency domain is “1”. 
         [0064]    In this instance, when an absolute value of a coefficient in a frequency domain is greater than “1”, an arbitrary high number may be used as a cost with respect to the corresponding transform coefficient so that all transform coefficients are prevented from being zero in a corresponding 4×4 block unit, an 8×8 block unit, and a macroblock unit. 
         [0065]    Also, when a total sum of costs based on a macroblock unit including four 8×8 block is less than a predetermined threshold, all coefficients of the corresponding macroblock are replaced with zero, and a CBP with respect to each of the 8×8 block may be determined as zero. 
         [0066]    According to a joint model (JM) that is an H.264/AVC reference model, and an ITU-T VCEG KTA reference model, a fixed constant, 4, is used as a threshold in an 8×8 block unit and a fixed constant, 5, is used as a threshold in a macroblock unit. 
         [0067]    In  FIG. 9  ( a ), the total sum of all costs of transform coefficients of the 8×8 block is 5, and thus, the all coefficients are not replaced with zero. In  FIG. 9  ( b ), the total sum of all costs of transform coefficients of the 8×8 block is zero, and thus, the all coefficients are replaced with zero. 
         [0068]    The inverse quantizing unit  234  may perform inverse quantization on the coefficient threshold-operated second transform coefficient. According to an exemplary embodiment, when the target image is a 4×4 block, the inverse quantizing unit  234  may perform inverse quantization on the second transform coefficient based on Equation 8. 
         [0000]        Y′   (i,j)   =Z   (i,j)   ·Q Step  [Equation 8]
 
         [0069]    Y′ (i,j)  is an inverse quantized second transform coefficient, and SF (i,j)  is a scaling factor. 
         [0070]      FIG. 6  is a diagram illustrating a value of a scaling factor SF (i,j)  in an inverse-quantizing process with respect to a 4×4 sized image 
         [0071]    According to exemplary embodiment, when the target image is in a size of 8×8, the inverse quantizing unit  234  may perform inverse quantization on the coefficient threshold-operated second transform coefficient based on Equation 9 as below. 
         [0000]        Y′   (i,j) =( Z   (i,j)   ·SF   (i,j) )&lt;&lt; Q   D   [Equation 9]
 
         [0072]      FIG. 7  is a diagram illustrating a value of a scaling factor SF (i,j)  in an inverse-quantizing process with respect to an 8×8 sized image. 
         [0073]    The discrete since inverse transforming unit  235  may perform discrete sine inverse transform on the inverse-quantized second transform coefficient and may generate a second decoded image with respect to the target image. According to an exemplary embodiment, the discrete sine inverse transforming unit  235  may generate the second decoded image based on Equation 10 as below. 
         [0000]    
       
         
           
             
               
                 
                   
                     X 
                     ′ 
                   
                   = 
                   
                     SYS 
                     = 
                     
                       ( 
                       
                         
                           
                             [ 
                             
                               
                                 
                                   a 
                                 
                                 
                                   b 
                                 
                                 
                                   b 
                                 
                                 
                                   a 
                                 
                               
                               
                                 
                                   b 
                                 
                                 
                                   a 
                                 
                                 
                                   
                                     - 
                                     a 
                                   
                                 
                                 
                                   
                                     - 
                                     b 
                                   
                                 
                               
                               
                                 
                                   b 
                                 
                                 
                                   
                                     - 
                                     a 
                                   
                                 
                                 
                                   
                                     - 
                                     a 
                                   
                                 
                                 
                                   b 
                                 
                               
                               
                                 
                                   a 
                                 
                                 
                                   
                                     - 
                                     b 
                                   
                                 
                                 
                                   b 
                                 
                                 
                                   
                                     - 
                                     a 
                                   
                                 
                               
                             
                             ] 
                           
                            
                           
                             [ 
                             
                               Y 
                               ′ 
                             
                             ] 
                           
                         
                          
                         
                           [ 
                           
                             
                               
                                 a 
                               
                               
                                 b 
                               
                               
                                 b 
                               
                               
                                 a 
                               
                             
                             
                               
                                 b 
                               
                               
                                 a 
                               
                               
                                 
                                   - 
                                   a 
                                 
                               
                               
                                 
                                   - 
                                   b 
                                 
                               
                             
                             
                               
                                 b 
                               
                               
                                 
                                   - 
                                   a 
                                 
                               
                               
                                 
                                   - 
                                   a 
                                 
                               
                               
                                 b 
                               
                             
                             
                               
                                 a 
                               
                               
                                 
                                   - 
                                   b 
                                 
                               
                               
                                 b 
                               
                               
                                 
                                   - 
                                   a 
                                 
                               
                             
                           
                           ] 
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     10 
                   
                   ] 
                 
               
             
           
         
       
     
         [0074]    S indicates a discrete sine inverse transform matrix with respect to each row of X, X′ indicates a target object, and Y′ indicates a inverse-quantized transform coefficient. Also, elements a and b in the matrix indicate constants 
         [0000]    
       
         
           
             
               
                 2 
                 5 
               
             
              
             
               sin 
                
               
                 ( 
                 
                   π 
                   5 
                 
                 ) 
               
             
           
         
       
       
         
           and 
         
       
       
         
           
             
               
                 
                   2 
                   5 
                 
               
                
               
                 sin 
                  
                 
                   ( 
                   
                     
                       2 
                       5 
                     
                      
                     π 
                   
                   ) 
                 
               
             
             , 
           
         
       
     
         [0000]    respectively. 
         [0075]    The elements a and b in the matrix are not integer, and thus, a calculation process is extremely complex when calculation is actually executed. According to an exemplary embodiment, the discrete sine inverse transforming unit  235  may perform a integer sine inverse transform on the second decoded image based on a integer sine inverse transform matrix obtained from the integer sine inverse transform matrix. The integer sine inverse transform may be expressed as given in Equation 11 below. 
         [0000]    
       
         
           
             
               
                 
                   
                     X 
                     ′ 
                   
                   = 
                   
                     
                       
                         S 
                         i 
                         T 
                       
                        
                       
                         Y 
                         ′ 
                       
                        
                       
                         S 
                         i 
                       
                     
                     = 
                     
                       
                         
                           [ 
                           
                             
                               
                                 
                                   1 
                                   2 
                                 
                               
                               
                                 1 
                               
                               
                                 1 
                               
                               
                                 1 
                               
                             
                             
                               
                                 1 
                               
                               
                                 1 
                               
                               
                                 
                                   - 
                                   
                                     1 
                                     2 
                                   
                                 
                               
                               
                                 
                                   - 
                                   1 
                                 
                               
                             
                             
                               
                                 1 
                               
                               
                                 
                                   - 
                                   1 
                                 
                               
                               
                                 
                                   - 
                                   
                                     1 
                                     2 
                                   
                                 
                               
                               
                                 1 
                               
                             
                             
                               
                                 
                                   1 
                                   2 
                                 
                               
                               
                                 
                                   - 
                                   1 
                                 
                               
                               
                                 1 
                               
                               
                                 
                                   - 
                                   1 
                                 
                               
                             
                           
                           ] 
                         
                          
                         
                           [ 
                           
                             Y 
                             ′ 
                           
                           ] 
                         
                       
                        
                       
                         [ 
                         
                           
                             
                               
                                 1 
                                 2 
                               
                             
                             
                               1 
                             
                             
                               1 
                             
                             
                               
                                 1 
                                 2 
                               
                             
                           
                           
                             
                               1 
                             
                             
                               1 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               
                                 - 
                                 1 
                               
                             
                           
                           
                             
                               1 
                             
                             
                               
                                 - 
                                 
                                   1 
                                   2 
                                 
                               
                             
                             
                               
                                 - 
                                 
                                   1 
                                   2 
                                 
                               
                             
                             
                               1 
                             
                           
                           
                             
                               1 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                             
                               1 
                             
                             
                               
                                 - 
                                 1 
                               
                             
                           
                         
                         ] 
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     11 
                   
                   ] 
                 
               
             
           
         
       
     
         [0076]      FIG. 8  is a diagram illustrating a concept of integer sine transform according to an exemplary embodiment of the present invention. 
         [0077]    When a target image is in a size of 4×4, an integer sine inverse transform of Equation 11 may be performed based on the exemplary embodiment of  FIG. 8 . 
         [0078]    A second decoded image X′ generated by a discrete sine inverse transform may be rounded off based on Equation 12 and may be expressed as X″ (i,j) . 
         [0000]        X″   (i,j) =round( X′   (i,j) )  [Equation 12]
 
         [0079]    Also, a second decoded image X″ restored by the integer sine inverse transform may be passed through a post-scaling process based on Equation 13 and may be expressed as X″ (i,j) . 
         [0000]    
       
         
           
             
               
                 
                   
                     X 
                     
                       ( 
                       
                         i 
                         , 
                         j 
                       
                       ) 
                     
                     ″ 
                   
                   = 
                   
                     round 
                      
                     
                       ( 
                       
                         
                           X 
                           
                             ( 
                             
                               i 
                               , 
                               j 
                             
                             ) 
                           
                           ′ 
                         
                         64 
                       
                       ) 
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     13 
                   
                   ] 
                 
               
             
           
         
       
     
         [0080]    A Lagrange multiplier calculator  240  may calculate a Lagrange multiplier of each of a first decoded image and a second decoded image, and a distortion rate measuring unit  250  measures a distortion rate of the first decoded image and a distortion rate of the second decoded image based on each calculated Lagrange multiplier. 
         [0081]    According to an exemplary embodiment, in a case of an I-frame or a P-frame, the Lagrange multiplier calculator  240  may calculate a Lagrange multiplier based on Equation 14 as below. 
         [0000]      λ MODE,I,P   =C× 2 (QP-12)/3   [Equation 14]
 
         [0082]    C may be determined through an experiment with respect to various images, or may be adaptively determined based on a size of the target image. 
         [0083]    According to another exemplary embodiment, in a case of a B-frame, the Lagrange multiplier calculator  240  may calculate a Lagrange multiplier based on Equation 15 as below. 
         [0000]    
       
         
           
             
               
                 
                   
                     λ 
                     
                       MODE 
                       , 
                       B 
                     
                   
                   = 
                   
                     
                       max 
                        
                       
                         ( 
                         
                           2 
                           , 
                           
                             min 
                              
                             
                               ( 
                               
                                 4 
                                 , 
                                 
                                   
                                     QP 
                                     - 
                                     12 
                                   
                                   6 
                                 
                               
                               ) 
                             
                           
                         
                         ) 
                       
                     
                     × 
                     
                       λ 
                       
                         MODE 
                         , 
                         I 
                         , 
                         P 
                       
                     
                   
                 
               
               
                 
                   [ 
                   
                     Equation 
                      
                     
                         
                     
                      
                     15 
                   
                   ] 
                 
               
             
           
         
       
     
         [0084]    The rate-distortion cost calculator  250  may calculate a rate-distortion cost (R-D cost) with respect to the first decoded image and the second decoded image. 
         [0085]    According to an exemplary embodiment, the rate-distortion cost calculator  250  may calculate the rate-distortion cost based on Equation 16 as below. 
         [0000]        J ( s,c ,MODE| QP,λ   MODE )= SSD ( s,c ,MODE| QP )+λ MODE   ·R ( s,c ,MODE| QP )  [Equation 16]
 
         [0086]    Here, s is a target image and c is a decoded image. SSD(s,c,MODE|QP) is a distortion of each decoded image and R(s,c,MODE|QP) is a number of bits of each decoded image. MODE is a coding mode used for an image coding. 
         [0087]    The rate-distortion cost calculator  260  may calculate a rate-distortion cost with respect to each mode to select an optimum mode from among every possible coding mode used for image coding, such as a variable block mode, four types of space prediction mode, a SKIP mode (P_SKIP mode and B_SKIP mode), a DIRECT mode, and the like. That is, the rate-distortion cost calculator  260  may calculate a rate-distortion with respect to each restoration image and each coding mode. 
         [0088]    The transform scheme determining unit  260  may select a transform coefficient corresponding to a restoration image having a smallest rate-distortion cost, as a transform coefficient with respect to the target image. That is, the transform scheme determining unit  260  may select an optimum transform scheme based on the distortion of each restoration image and a bit rate required for coding the transform coefficient. 
         [0089]    Also, the transform scheme determining unit  260  may determine a mode having a smallest rate-distortion cost as the coding mode. That is, the transform scheme determining unit  260  may select a transform mode having a high compression efficiency as a transform mode with respect to the target image. 
         [0090]    The transform scheme storage unit  270  may store information about a transform scheme corresponding to the transform coefficient with respect to the target image. That is, the transform scheme storage unit  270  may store information about whether the target image is discrete cosine transformed or discrete sine transformed, and an image decoding apparatus may determine a transform scheme with respect to the target image based on the information about the transform scheme. 
         [0091]    According to an exemplary embodiment, the transform scheme storage unit  270  may represent information about the transform scheme by using a flag bit included in a macro block unit. As an example, when the target image included in a macro block is discrete cosine transformed, the flag bit may be determined as ‘0’. Also, when the target image included in the macro block is discrete sine transformed, the flag bit may be determined as ‘1’. 
         [0092]    The transform scheme storage unit  270  may store information about the transform scheme based on CBP value with respect to the transform coefficient. The CBP value, which represents a luminance value of each block, represents ‘1’ when there is a transform coefficient in a corresponding block and represents ‘0’ when there is no transform coefficient in the corresponding block. When there is no transform efficient in a predetermined block, there is no need to determine a transform scheme with respect to the corresponding block, and thus, there is no need to store information about a transform scheme. 
         [0093]      FIG. 10  is a diagram illustrating an exemplary embodiment of storing transform scheme information based on coded block pattern (CBP) according to an exemplary embodiment of the present invention. 
         [0094]      FIG. 10  ( a ) illustrates an exemplary embodiment that all blocks  1011 ,  1012 ,  1013 , and  1014  do not include transform coefficients. In this instance, a image decoding apparatus may not need to determine a transform scheme with respect to a transform coefficient for each block. Accordingly, the transform scheme storage unit  270  may not store information about the transform scheme of each block. That is, the transform scheme storage unit  270  may store information about a transform scheme with respect to a corresponding block, only when a CBP with respect to each block is ‘1’. 
         [0095]      FIG. 10  ( b ) illustrates an exemplary embodiment that a second block and a third block do not have transform coefficients. A first block  1021  and a fourth block  1024  have transform coefficients, and each of the transform coefficients is discrete sine transformed and discrete cosine transformed respectively. 
         [0096]    The transform scheme storage unit  270  may store transform scheme information with respect to each of the first block  1021  and the fourth block  1041  which have corresponding transform coefficients. The first block  1021  is discrete sine transformed, and thus, the information about the transform scheme may be determined as ‘1’. Also, the fourth block  1024  is discrete cosine transformed, and thus, the information about the transform scheme may be determined as ‘0’. 
         [0097]    The image decoding apparatus may determine a block corresponding to information about a transform scheme of ‘10’ based on the CBP value coded for each block. 
         [0098]      FIG. 10  ( c ) illustrates an exemplary embodiment that a first block  1031  includes a transform coefficient, and a second block  1032 , a third block  1033 , and a fourth block  1034  do not include transform coefficients. The transform scheme storage unit  270  may store information about a transform scheme with respect to the first block  1031  having the transform coefficient. 
         [0099]      FIG. 10  ( d ) illustrates an exemplary embodiment that a first block  1041  does not include a transform coefficient, and a second block  1042 , a third block  1043 , and a fourth block  1044  include transform coefficients. The transform scheme storage unit  270  may store transform scheme information about transform schemes with respect to the second block  1042 , the third block  1043 , and the fourth block  1044 . 
         [0100]      FIG. 11  is a diagram illustrating an exemplary embodiment of storing information about a transform scheme in a macro block header 
         [0101]    Referring to a storage portion  1110  of a macro block head of  FIG. 11  that stores information about a transform scheme, the transform scheme storage unit  270  may store the information (alternative transform flag) about the transform scheme, when a CBP is greater than ‘0’. 
         [0102]      FIG. 12  is a diagram illustrating an exemplary embodiment of the present invention of storing, in a slice header, information about whether the present invention is applied. 
         [0103]    According to an exemplary embodiment, the image coding apparatus may code a target image by applying the present invention, and according to another exemplary embodiment, the image coding apparatus may not apply the present invention. The transform scheme storage unit  270  may store, by using a flag bit of a slice header, information  1210  about whether the present invention is applied, and a image decoding apparatus may determine whether the present invention is applied to a transform coefficient, by using the flag bit. 
         [0104]      FIG. 13  is a block diagram illustrating a configuration of a image decoding apparatus according to the present invention. The image decoding apparatus according to the present invention includes a transform scheme decision unit  1310 , a first inverse transforming unit  1320 , and a second inverse transforming unit  1330 . 
         [0105]    The transform scheme decision unit  1310  may decide whether the present invention is applied to a transform coefficient. According to an exemplary embodiment, when an image coding apparatus applies the present invention to the transform coefficient to code a target image, the image coding apparatus may represent whether the present invention is applied to the transform coefficient, by using a flag bit of a slice header. The transform scheme decision unit may decide whether the present invention is applied to the transform coefficient, by using a flag bit of a slice. 
         [0106]    Also, the transform scheme decision unit  1310  may decide a transform scheme with respect to a transform coefficient. When the present invention is applied to the transform coefficient, the transform coefficient may be discrete sine transformed or discrete cosine transformed. The image coding apparatus may represent a transform scheme applied to the transform coefficient by using a flag bit of a macroblock. That is, the flag bit of the macroblock may represent transform scheme information. The transform scheme decision unit  1310  may decide the transform scheme with respect to the transform coefficient, by using the flag bit of the macroblock. 
         [0107]    According to an exemplary embodiment, the flag bit of the macroblock may be stored based on a CBP value with respect to the transform coefficient. That is, the image coding apparatus may store the flag bit in the macroblock only when the CBP value is not ‘0’, and may not store the flag bit in the macroblock when the CBP is ‘0’. 
         [0108]    When the transform coefficient is discrete sine transformed, the first inverse transforming unit  1320  may generate a decoded image with respect to the transform coefficient by using a discrete sine inverse transform scheme. The first inverse transforming unit  1320  may include an inverse quantizing unit  1321  and a discrete sine inverse transforming unit  1322 . 
         [0109]    The inverse quantizing unit  1321  performs inverse quantization on a quantized transform coefficient. Inverse quantization has already been described with reference to  FIG. 2 , and thus, hereinafter, a detailed description thereto will be omitted. 
         [0110]    The discrete sine inverse transforming unit  1322  performs discrete sine inverse transform on an inverse-quantized transform coefficient to generate a decoded image. Discrete sine inverse transform has already been described with reference to  FIG. 2 , and thus, hereinafter, a detailed description thereto will be omitted. 
         [0111]    When the discrete cosine transform is applied to the transform coefficient, the second inverse transforming unit  1330  generates a decoded image with respect to the transform coefficient by using a discrete cosine inverse transform scheme. The second inverse transforming unit  1330  may include an inverse quantizing unit  1331  and a discrete cosine inverse transforming unit  1332 . 
         [0112]    The inverse quantizing unit  1331  may perform inverse quantization on a quantized transform coefficient. The inverse quantization has already been described with reference to  FIG. 2 , and thus, hereinafter, a detailed description thereto will be omitted. 
         [0113]    The discrete cosine inverse transforming unit  1332  may perform discrete cosine inverse on an inverse-quantized transform coefficient to generate a decoded image. 
         [0114]    According to an exemplary embodiment, a decoded image generated from the first inverse transforming unit  1320  or the second inverse transforming unit  1330  is not an input image inputted to the image coding apparatus, but corresponds to a residual image that is a difference between the input image and a prediction image. 
         [0115]    The image restoring unit  1340  may generate a prediction image with respect to a transform coefficient based on a reference image with respect to the transform coefficient. The image restoring unit  1340  may generate a restoration image with respect to the transform coefficient based on the prediction image and the decoded image. The restoration image corresponds to the input image inputted to the image coding apparatus. 
         [0116]      FIG. 14  is a block diagram illustrating a configuration of an image coding apparatus according to another exemplary embodiment of the present invention. The image coding apparatus may include an image predicting unit  1410 , a first transforming unit  1420 , a second transforming unit  1430 , a distortion rate measuring unit  1440 , a transform scheme determining unit  1450 , and a transform scheme storage unit  1460 . 
         [0117]    The image predicting unit  1410  may generate a prediction image with respect to an input image based on a reference image with respect to the input image. Also, the image predicting unit  1410  may calculate a difference between the input image and the prediction image as a target image. That is, a target image that is coded by the first transforming unit  1420  or the second transforming unit  1430  is a residual image with respect to the input image. 
         [0118]    The first transforming unit  1420  may generate a first transform coefficient by performing a discrete cosine transform on the target image. Also, the first transforming unit  1420  may generate a decoded image with respect to a first transform coefficient by performing a discrete cosine inverse transform on the first transform coefficient. 
         [0119]    The second transforming unit  1430  may generate a second transform coefficient by performing a discrete sine transform on the target image. Also, the second transforming unit  1430  may generate a decoded image with respect to the second transform coefficient by performing a discrete sine inverse transform on the first transform coefficient. 
         [0120]    The distortion measuring unit  1440  may compare the target image with the decoded image with respect to the first transform coefficient to measure a distortion rate of the decoded image with respect to the first transform coefficient. Also, the distortion rate measuring unit  1440  may compare the target image with the decoded image with respect to the second transform coefficient to measure a distortion rate of the decoded image with respect to the second transform coefficient. 
         [0121]    The transform scheme determining unit  1450  may select a transform coefficient with respect to the target image based on the distortion rate of the decoded image with respect to the first transform coefficient and the distortion rate of the decoded image with respect to the second transform coefficient. As an exemplary embodiment, the transform scheme determining unit  1450  may select a transform coefficient corresponding to a decoded image having a smaller distortion rate as the transform coefficient with respect to the target image. 
         [0122]    The transform scheme storage unit  1460  may store transform scheme information with respect to the selected transform coefficient in a macroblock header. As an example, when the transform coefficient is discrete sine transformed, the transform scheme storage unit  1460  may store the transform scheme information by representing a flag bit of the macroblock head as ‘1’. Also, when the transform coefficient is discrete cosine transformed, the transform scheme storage unit  1460  may store the transform scheme information by representing the flag bit of the macro block header as ‘0’. 
         [0123]    According to an exemplary embodiment, the transform scheme storage unit  1470  may store the transform scheme information based on a CBP with respect to the transform coefficient. A CBP value indicates existence of a transform coefficient. That is, when the transform coefficient exists, the CBP value may be ‘1’, and when the transform coefficient does not exist, the CBP value may be ‘0’. The transform scheme storage unit  1470  may not store the transform scheme information when the CBP value is ‘0’. 
         [0124]    Although a few embodiments of the present invention have been shown and described, the present invention is not limited to the described embodiments. Instead, it would be appreciated by those skilled in the art that changes may be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.