Abstract:
A moving image coding apparatus includes a coding section, an intraframe filter circuit, and a selector. The coding section predicts a pixel block in a current frame from a preceding frame by a motion compensation scheme, and performs orthogonal transformation and quantization for a predicted error, thereby coding the predicted error. The intraframe filter circuit performs intraframe filtering for each pixel of an input frame. The selector adaptively determines and sets the filter characteristic of the intraframe filter circuit on the basis of a pixel of the input frame and a corresponding pixel of a predicted image or adaptively selects an output from the intraframe filter circuit having an optimal filter characteristic.

Description:
BACKGROUND OF THE INVENTION 
     The present invention relates to a moving image coding apparatus and, more particularly, to a moving image coding apparatus for performing coding operation by performing pre-processing using an intraframe filter. 
     In moving image compression coding, a moving image coding scheme based on a combination of motion compensation and orthogonal transformation is often used. Image data input to a coding apparatus contains high-frequency components due to noise. To prevent a deterioration in coding efficiency due to such high-frequency components, pre-processing is performed by using an intraframe filter. The above intraframe filter has the effect of removing high-frequency components that impair spatial correlation. The removal of such high-frequency components, however, leads to a decrease in resolution and a deterioration in image quality in a still area, in particular. A scheme for solving this problem is disclosed in, for example, Japanese Patent Laid-Open No. 2-154588. In this scheme, the filter strength is changed for the still and moving areas of a moving image such that a weak filter is used for the still area, and a strong filter is used for the moving area. 
     FIG. 5 shows a conventional moving image signal coding apparatus. An input image  1  is processed in units of pixel blocks (e.g., 16×16). A moving area determination circuit  4  compares each pixel of the input image  1  with a corresponding pixel of the previous frame stored in a frame memory  3  to determine a moving or still area. A filter coefficient  19  used by an intraframe filter circuit  2  is output on the basis of the determination result and coding control data  17  output from a coding control circuit  15 . The intraframe filter circuit  2  filters the input image  1  by using the filter coefficient  19  and sends the resultant data to a coding section  5 . 
     A subtracter  6  subtracts a predicted image  18  motion-compensated by a motion compensation circuit  14  from the pixel blocks sent to the coding section  5 . The resultant data is processed by a DCT (Discrete Cosine Transform) circuit  7  and a quantization circuit  8  and coded by a coding circuit  9 . The coded data is stored in the buffer  16 . The output from the quantization circuit  8  is processed by a de-quantization circuit  10  and an inverse DCT circuit  11  in the coding section  5  and is added to the predicted image  18  by an adder  12 . The resultant data is stored in a frame memory  13 . 
     In the above conventional apparatus, all the pixels even in an area having undergone accurate prediction based on motion compensation are filtered by the strong filter if the area is a moving area. This unnecessarily decreases the resolution of the image. 
     Furthermore, in the conventional apparatus, the strong filter sometimes works on even an accurately predicted area. The effect of this filter may increase the difference between an input signal and a predicted signal even in such an area where the difference should be sufficiently small, resulting in a decrease in coding efficiency. 
     SUMMARY OF THE INVENTION 
     The present invention has been made to solve the above problems in the prior art, and has as its object to provide a moving image signal coding apparatus which can improve the coding efficiency using an intraframe filter while minimizing a decrease in the resolution of an image. 
     In order to achieve the above object, according to the present invention, there is provided a moving image coding apparatus comprising motion compensation type moving image coding means for predicting a pixel block in a current frame from a preceding frame by a motion compensation scheme, and performing orthogonal transformation and quantization for a predicted error, thereby coding the predicted error, intraframe filter means for performing intraframe filtering for each pixel of an input frame, and means for adaptively determining and setting a filter characteristic of the intraframe filter means on the basis of a pixel of the input frame and a corresponding pixel of a predicted image or adaptively selecting an output from the intraframe filter means having an optimal filter characteristic. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 a block diagram showing an embodiment of the present invention; 
     FIG. 2 is a block diagram showing the detailed arrangement of a filter coefficient control circuit in FIG. 1; 
     FIG. 3 is a block diagram showing another embodiment of the present invention; and 
     FIG. 4 is a block diagram showing still another embodiment of the present invention; and 
     FIG. 5 is a block diagram showing a conventional moving image coding apparatus using an intraframe filter. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     FIG. 1 shows an embodiment of the present invention. Referring to FIG. 1, a filter coefficient control circuit  120  determines a filter coefficient  119  on the basis of each pixel of an input image  101 , a predicted image  118  output from a motion compensation circuit  114 , and coding control data  117  output from a coding control circuit  115 . An intraframe filter circuit  102  filters the input image  101  by using the filter coefficient  119 , and outputs the resultant data to a coding section  121 . 
     The coding section  121  calculates the difference between the output from the intraframe filter circuit  102  and the predicted image  118  by using a subtracter  106 , codes the difference by using a DCT circuit  107 , a quantization circuit  108 , and a coding circuit  109 , and outputs the resultant data to a buffer  116 . The output from the quantization circuit  108  is processed by de-quantization circuit  110  and an inverse DCT circuit  111 , and the resultant data is added to the predicted image  118  by an adder  112 . The sum is stored in a frame memory  113 . 
     FIG. 2 shows an arrangement of the filter coefficient control circuit  120 . Referring to FIG. 2, a subtracter  130  calculates the difference between a pixel value of the input image  101  and a corresponding pixel value of the predicted image  118 . A threshold comparator  131  then compares the absolute value of the difference with the threshold contained in the coding control data  117 . A filter coefficient generating circuit  132  determines the filter coefficient  119  on the basis of the comparison result and the filter coefficient candidate contained in the coding control data  117 . 
     The operation of this embodiment will be described next with reference to FIG.  1 . The input image  101  is processed in units of pixel blocks (e.g., 16×16 pixels). The filter coefficient control circuit  120  determines the filter coefficient  119  on the basis of each pixel in each pixel block of the input image  101 , a corresponding pixel in the predicted image  118 , and the coding control data  117 , and outputs the filter coefficient  119  to the intraframe filter circuit  102 . The intraframe filter circuit  102  filters each pixel of the input image by using the filter coefficient  119 . 
     The above filter coefficient determination and filtering are performed for all the pixels in each pixel block, and the resultant data is output to the coding section  121 . The coding section  121  performs moving image coding based on a combination of motion compensation and DCT for the input pixel block. Since a filter coefficient is determined by using both the input image  101  and the predicted image  118  instead of using only the input image  101 , control can be performed to weaken the effect of the filter (perform weak filter processing) for an accurately predicted area even if it is a moving area, thereby preventing an unnecessary decrease in resolution. This can also prevent a decrease in coding efficiency due to strong filter processing for an accurately predicted area. 
     The operation of the filter coefficient control circuit  120  will be described next with reference to FIG.  2 . The filter coefficient control circuit  120  calculates the difference between a pixel value of the input image  101  and a corresponding pixel value of the predicted image  118  by using the subtracter  130 . The threshold comparator  131  then compares the absolute value of the calculation result with the threshold contained in the coding control data  117 . A plurality of filter coefficients are prepared in the filter coefficient generating circuit  132 . Two types of candidates for strong and weak filter coefficients of these filter coefficients are designated in the coding control data  117 . 
     If the comparison result obtained by the threshold comparator  131  indicates that the absolute value of the difference between the input image and the predicted image is larger than the threshold contained in the coding control data  117 , the strong filter coefficient is selected and output to the intraframe filter circuit  102 . Otherwise, it is determined that the corresponding pixel is in a still area or in a moving area that has been accurately predicted by motion compensation. As a result, the weak filter coefficient is selected and output to the intraframe filter circuit  2 . 
     The coding control data  117  is prepared by the coding control circuit  115 . The coding control data  117  contains information such as quantization step size used by the quantization circuit  108  in addition to one threshold used by the threshold comparator  131  and two types of filter coefficient candidates used in the filter coefficient generating circuit  132 , as described above. 
     When the processing for the pixel block is complete, the coding control circuit  115  outputs the coding control data  117  for the next pixel block on the basis of the contents of the buffer  116  and the like. If the amount of information generated is large and may overflow the buffer  116 , the threshold in the coding control data  117  is decreased to make it easy to select the strong filter. In addition, strong filter coefficients are set as two types of candidates. With this operation, since strong filter processing can be performed for the input image  101 , the amount of information generated can be suppressed. 
     In contrast to this, if the amount of information generated is small and there is much free space in the buffer  116 , the threshold in the coding control data  117  is increased to make it easy to select the weak filter. In addition, weak filter coefficients are set as two types of candidates. This can suppress a decrease in resolution due to unnecessary filter processing. 
     In this embodiment, of these filter coefficients, two types of candidates, i.e., strong and weak filter coefficients, are designated in the coding control data  117 . However, n (n&gt;2) filter coefficient candidates and n−1 thresholds may be set in the coding control data  117  in FIGS. 1 and 2. In addition, the threshold comparator  131  can be designed to determine the location of one of n areas in which the input absolute value is present, and the filter coefficient generating circuit  132  can be designed to generate n types of filter coefficients. With this arrangement, the number of types of filter coefficients can be increased from two, i.e., strong and weak filter coefficients, to n, thereby allowing finer image quality control. 
     FIG. 3 shows another embodiment of the present invention. In this embodiment, first and second intraframe filter circuits  140  and  141  are prepared as intraframe filter circuits. Assume that the filter coefficients in the respective intraframe filter circuits  140  and  141  are fixed, and one of the coefficients is a weak filter coefficient, and the other is a strong filter coefficient. 
     An input image  101  is filtered by the intraframe filter circuits  140  and  141 , and the differences between the resultant data and a predicted image  118  are calculated by subtracters  142  and  143  and are input to a selector  144 . A threshold comparator  145  compares the absolute value of the output from the subtracter  142  with the threshold in coding control data  146  and controls the selector  144  to select either the output from the intraframe filter circuit having a weak filter characteristic or the output from the intraframe filter circuit  141  having a strong filter characteristic. In this embodiment, since the filter coefficients in the intraframe filter circuits  140  and  141  are fixed, the arrangement of each circuit can be simplified and easily implemented as compared with the intraframe filter circuit  102  in which the filter coefficients change in units of pixels. 
     Referring t FIG. 3, the absolute value of the output from the subtracter  142  is compared with the threshold in the coding control data  146  by the threshold comparator  145 . However, the absolute value of the difference between a pixel value of the input image  101  and a corresponding pixel value of the predicted image  118  may be compared with the threshold in the coding control data  146  by the threshold comparator  145 . 
     FIG. 4 shows still another embodiment of the present invention. This embodiment includes n (n&gt;2) intraframe filter circuits. More specifically, the embodiment includes a total of n intraframe filter circuits from first and second intraframe filter circuits  140  and  141  to nth intraframe filter circuit  150 . An input image  101  is input to each of these circuits. Fixed filter coefficients are set in these intraframe filter circuits. The images obtained by filtering the input image  1  with n types of filter strengths are input to a selector  153 . A threshold comparator  154  receives the result obtained by calculating the difference between the input image  1  and a predicted image  118  using a subtracter  151  and the n−1 thresholds set in coding control data, and controls the selector  153  on the basis of these input data to select one of the n intraframe filter outputs. With this operation, the number of types of filter coefficients can be increased from two, i.e., strong and weak filter coefficients, to n, thereby allowing finer image quality control. 
     In the embodiments shown in FIGS. 3 and 4, the input image  1  is always output through the intraframe filters. However, the first intraframe filter circuit  140  in FIGS. 3 and 4 can be omitted. With this arrangement, each of the selectors  44  and  53  has a pixel free from intraframe filtering as a candidate to be selected with respect to the input image  1 . As a result, the number of intraframe filter circuits can be decreased by one, and hence the apparatus size can be reduced. This attains a reduction in cost. 
     In the embodiments shown in FIGS. 3 and 4, the filter coefficients in the intraframe filter circuits  140 ,  141 , . . . ,  150  are fixed. However, these filter coefficients may be made variable. When the processing for the pixel block is complete, each of coding control circuits  147  and  156  determines the filter coefficient to be used for the next pixel block on the basis of the contents of the buffer  116 , and sets it in each of the intraframe filter circuits  140 ,  141 , . . . ,  150 . In this case, the coefficient in each of the intraframe filter circuits  140 ,  141 , . . . ,  150  does not change in units of pixels. This makes it easy to implement each intraframe filter circuit as compared with the intraframe filter circuit  2  in FIG.  1 . In addition, since the filter coefficient can be changed in units of pixel blocks, sufficiently fine image quality control can be performed. 
     According to the moving image coding apparatus of the present invention, the coefficient in an intraframe filter is made variable or a plurality of intraframe filters are prepared, and a filter characteristic is determined on the basis of the difference between an input image and a predicted image. This can prevent an unnecessary decrease in resolution and improve the image quality. In addition, when the difference between the input image and the predicted image is small, a strong filter does not work on the corresponding pixel, and hence the difference is not increased. An improvement in coding efficiency can therefore be attained.