Embodiments described herein relate generally to a video encoding apparatus for adding information for controlling a filtering process performed with a video decoding apparatus to encoded data, and a video decoding apparatus for performing a filtering process on a decoded image based on information for controlling the filtering process, which is added to encoded data.
As a technique to output an image obtained by filtering a decoded image, there is a technique by which an encoding apparatus designs a filter to minimize an error between an input image and an image provided by filtering the decoded image and transmits information of this filter, and a decoding apparatus outputs an image obtained by filtering the decoded image using the filter information. This allows the decoding apparatus to provide an output image of a small error with respect to the input image.
As a similar technique, there is considered a method of using an image obtained by filtering a decoded image as a reference image in generating a prediction image in addition to processing similar to the above technique. This makes it possible to provide an effect to reduce a prediction error in predicting a next frame because an error between the reference image and the input image reduces.
The above technique causes a rounding error when filtering is done by integer division. Accordingly, in order to reduce an error between an input image and an image provided by a filtering process using the integer division, it is necessary to control rounding as well as a filter coefficient according to the image. However, the rounding based on round-off used broadly cannot be controlled according to the image.
As a technique to avoid accumulation of rounding errors in a filtering process, there is a technique of selecting round-up or round-down in the rounding for a filtering process. In this technique, the information designating round-up or round-down is transmitted from an encoding apparatus to a decoding apparatus. However, what can be selected is round-up or rounding-down only, and the rounding such as five or less rounding-down and six or more round-up cannot be done.
As described above, the prior art has a problem not to be able to control the rounding freely according to an image.
In general, according to one embodiment, a video encoding/decoding apparatus decreases an error between an input image and a reference image, and an error between the input image and an output image by controlling rounding freely according to an image.
According to another example embodiment, a video encoding apparatus comprises a setting module to set a filter coefficient for use in a filtering process in a video decoding apparatus, and set a rounding offset for controlling the rounding of operation in the filtering process, and an encoder to output information of the filter coefficient and the rounding offset as encoded data.
According to another example embodiment, a video decoding apparatus comprises an information acquisition module to acquire information of a filter coefficient and a rounding offset from encoded data, a signal processor to generate a decoded image signal from the encoded data, a filter processor to filter a decoded image of the decoded image signal by using the filter coefficient and the rounding offset obtained from the encoded data.
There will now be explained embodiments of the present invention.
Configuration of a video encoding apparatus concerning the first embodiment will be described referring to
Concretely, the signal processor 110 comprises a subtractor 120, an orthogonal transformer 121, a quantizer 122, a dequantizer 123, an inverse orthogonal transformer 124 and an adder 125. The frame memory 111 is connected to a filter/rounding offset designing module 112 and a filter processor 113. The filter/rounding offset designing module 112 designs a filter coefficient and a rounding offset from the input image signal 101 and the local decoded image signal 104, and generates a filter coefficient 105 and a rounding offset 126. The filter processes 113 filters the local decoded image signal 104 using the filter coefficient 105 and the rounding offset 126, and generates an image signal 106.
The variable length encoder 115 performs variable length encoding on residual information 102, the filter coefficient 105 and the rounding offset 126, and outputs encoded data 109.
Action of the video encoding apparatus of the above configuration will be described referring to the flowchart of
The input image signal 101 is input to the signal processor 110. The signal processor 110 generates an residual signal between a prediction image signal 108 and the input image signal 101 (S11), and generates the residual information (for example, DCT coefficient) 102 obtained by orthogonal-transforming the residual signal (S12). The local decoded image signal 103 is generated from the prediction image signal 108 and the residual signal and is output (S13). The residual information 102 is input to the variable length encoder 115, and the local decoded image signal 103 is stored in the frame memory 111.
There will now be described an example of the signal processor 110 using
The local decoded image signal 104 read from the frame memory 111 is input to the filter/rounding offset designing module 112 and the filter processor 113. The filter/rounding offset designing module 112 designs a filter and a rounding offset from the input image signal 101 and the local decoded image signal 104 (S14). In other words, the filter/rounding offset designing module 112 sets a filter coefficient for use in a filtering process in the video decoding apparatus, and sets a rounding offset for controlling rounding of a filtering operation. The filter coefficient 105 and the rounding offset 126 are input to the filter processor 113 and the variable length encoder 115.
When the filter/rounding offset designing module 112 designs a filter, the filtering process is done. In other words, the filter processor 113 filters the local decoded image signal 104 using the filter coefficient 105 and the rounding offset 126, and generates the image signal 106 (S15).
The image signal 106 is stored in the frame memory 111. The image signal stored in the frame memory 111 is read as a reference image signal 107, and input to the predictor 114. The predictor 114 predicts using the reference image signal 107, and generates the prediction image signal 108 (S16). The prediction image signal 108 is input to the signal processor 110. The variable length encoder 115 performs variable length encoding on the residual information 102, the filter coefficient 105 and the rounding offset 126, and generates encoded data 109 including those codes (S17).
The filter processor 113 carries out the filtering process according to the following equation.
where Sflt(x,y) is a pixel value of position (x,y) of the image provided by the filtering process, S(x,y) is a pixel value of position (x,y) of the local decoded image, and N is a predetermined natural number.
hij(int), δ(int), D is integer values, hi j(int) is the filter coefficient, δ(int) is the rounding offset, and D is a predetermined value. A division is assumed to be an integer division.
The value set with the filter/rounding offset designing module 112 is input as hi j(int), δ(int).
The equation (1) means that the integer division is performed on a value obtained by adding the set rounding offset δ(int) to the weighted sum of values of pixels located around a to-be-filtered pixel (x, y). In addition, the filter coefficient hi j(int) corresponds to the weight of the weighted sum.
In general, the filtering process is done using bit shift operation in terms of simple and easy of hardware realization and high-speed processing. When bit shift operation is used, assuming D=2n, the following equation is used.
The filter/rounding offset designing module 112 sets hi j(int), δ(int) so that an error between the image provided by filtering and the input image decreases.
For example, a square error in units of a frame can be used as the error.
where Sorg(x,y) is a pixel of position (x, y) of the input image, and X, Y are a set of x coordinate and y coordinate in each frame. A method for solving a Wiener-Hopf equation is known as a method for obtaining a filter coefficient for minimizing a square error. In the present embodiment, since there is a constraint that the filter coefficient hi j(int) and the rounding offset δ(int) are an integer value, the filter coefficient hi j(int) and the rounding offset δ(int) are obtained by an approximation procedure based on the above method. At first, the equation (1) is approximated to the following equation.
where hij corresponds to an approximate value of hij(int)/D, and δ corresponds to an approximate value of (δ(int)−D/2)/D. In addition, D/2 is a value for approximating the integer division to a floating-point divide.
When the equation (4) is used, hi j, δ for minimizing a square error between the input image provided by the filtering process and the input image is obtained by solving an equation established by setting a value obtained by differentiating partially the equation (5) by hij, δ to 0.
In other words, the equation on hij, δ may be solved.
Since hij is an approximate value of hij(int)/D, and δ corresponds to an approximate value of (δ(int)−D/2)/D, the filter coefficient hij(int) and the rounding offset δ(int) may be calculated according to the following equation, for example.
h
ij
(int)
=└h
i j
×D+0.5┘ (8)
δ(int)=└δ×D+0.5┘D/2 (9)
hij(int) and δ(int) are calculated in units of a frame by the above described method, and output as the filter coefficient 105 and the rounding offset 126.
In the present embodiment, since it is possible to control the rounding according to the image, an error between the output image provided with the video decoding apparatus and the input image can be decreased in comparison with a case of setting the rounding offset to a fixed value. Further, a prediction efficiency is improved because an error between the input image and the reference image can be decreased.
A video decoding apparatus concerning the second embodiment of the present invention will be described referring to
The signal processor 211 comprises a dequantizer 217, an inverse orthogonal transformer 218 and an adder 219 as shown in
Action of the video encoding apparatus of the above configuration will be described referring to the flowchart of
The encoded data 109 is output, as the encoded data 201 to be decoded, from the video encoding apparatus of
There will now be described an example of the signal processor 211 referring to
The decoded image signal 203 is stored in the frame memory 212, and the decoded image signal 204 read from the frame memory 212 is input to the filter processor 214. The filter processor 214 filters the decoded image signal 204 using the filter coefficient 209 and the rounding offset 208 similarly to the filter processor 113 of the first embodiment, and generates an image signal 205 (S23). The image signal 205 is stored in the frame memory 212, and output as an output image signal. The image signal stored in the frame memory 212 is read as a reference image signal 206, and input to the predictor 213. The predictor 213 predicts using the reference image signal 206 and generates the prediction image signal 207. The prediction image signal 207 is input to the signal processor 211.
In the present embodiment, since it is possible to control the rounding according to the image, an error between the input image encoded with the video encoding apparatus and the output image can be decreased in comparison with a case of setting the rounding offset to a fixed value. Further, prediction efficiency is improved because an error between the input image and the reference image can be decreased.
The third embodiment of the present invention will be described referring to
In other words, according to the video encoding apparatus of
The local decoded image signal 303 stored in the frame memory 309 is input to the predictor 310 as a reference image signal 304, and to the filter/rounding offset designing module 312. The filter/rounding offset designing module 312 designs a filter and a rounding offset from the input image signal 301 and the local decoded image signal 304. At this time, the filter/rounding offset designing module 312 sets the filter coefficient and rounding offset so that an error between an image obtained by filtering a decoded image in the video decoding apparatus and the input image decreases. The operation of the filter/rounding offset designing module 312 may be done similarly to the filter/rounding offset designing module 112 of the first embodiment. The filter coefficient 307 and the rounding offset 313 are input to the variable length encoder 311, and are encoded.
In the present embodiment, since it is possible to control the rounding according to the image, an error between the output image provided with the video decoding apparatus and the input image can be decreased in comparison with a case of setting the rounding offset to a fixed value.
The fourth embodiment will be described referring to
In other words, according to the video decoding apparatus of
In the present embodiment, since it is possible to control the rounding according to the image, an error between the input image encoded with the video encoding apparatus and the output image can be decreased in comparison with a case of setting the rounding offset to a fixed value.
According to the present invention, it is possible to decrease an error between the input image and the reference image, and an error between the input image and the output image, by controlling the rounding according to the image freely.
It is possible to make a computer execute the procedure described in the present embodiments. Alternatively, it is possible to distribute the procedure by storing it in a storing medium such as magnetic disks (flexible disk, hard disk, etc.), optical disks (CD-ROM, DVD, etc.), semiconductor memories as a program allowing a computer execute the procedure.
While certain embodiments have been described, these embodiments have been presented by way of example only, and are not intended to limit the scope of the inventions. Indeed, the novel embodiments described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiments described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
Number | Date | Country | Kind |
---|---|---|---|
2008-119151 | Apr 2008 | JP | national |
This is a Continuation Application of PCT Application No. PCT/JP2009/058513, filed Apr. 30, 2009, which was published under PCT Article 21(2) in Japanese. This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2008-119151, filed Apr. 30, 2008; the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP2009/058513 | Apr 2009 | US |
Child | 12880918 | US |