The present invention relates to a method of coding/decoding an image and an apparatus to which the method is applied.
Variable-length coding (entropy coding) to image data is a method for shortening average code length by, at the time of assigning a code to quantized data, assigning a short code for a value of high appearance value and assigning a long code to a code of low appearance frequency to thereby increase the compression rate.
In the H.264/AVC standard, as the entropy coding method, CAVLC (Context-Adaptive Variable-Length Coding) and CABAC (Context-Adaptive Binary Arithmetic Coding) are employed. The CAVLC is a technique for switching a variable-length code table used for coding a present macro block in accordance with the state of a DCT (Discrete Cosine Transform) coefficient of an adjacent macro block. The CABAC is a technique for coding a binary signal by using arithmetic coding.
However, in those techniques, a code is not always assigned in consideration of information generation probability. For example, in the H.264/AVC standard, a mode number of a variable length code to a macroblock type (MB type) is fixedly defined in advance, and variable length coding of the MB type is performed using a table (code table) in which the definition is reflected. The occurrence probability of the MB type, however, largely changes according to the size of an image, the state of a quantization parameter, and the like. There is a case such that a short code is assigned to an MB type which appears rarely or a long code is assigned to an MB type which appears frequently. Therefore, the compression rate cannot be always increased only by a defined code table. This problem occurs not only in the MB type but also in a CBP (Coded Block Pattern) parameter indicating whether an MB has a nonzero DCT coefficient or not.
One of methods which can be applied to such a problem is a method of adaptively generating a code table in accordance with situations, not using a fixed variable-length code table. For example, patent document 1 proposes a method of obtaining probability of occurrence of information such as a motion vector on a predetermined data unit of image data, adaptively generating a code table on the basis of the obtained occurrence probability, variable-length coding an image of the next predetermined data unit, and transmitting the coded image. Patent document 2 also discloses a coding/decoding technique of assigning a variable-length code on the basis of the occurrence probability.
However, in the techniques described in the patent documents 1 and 2, sufficient statistics length is not obtained at the initial stage of coding or immediately after resetting the occurrence probability, and high coding efficiency cannot be always achieved. Since the occurrence probability of information is obtained on the frame unit basis, the reliability of a communication path is low. When an information deficiency occurs, decoding becomes unable to be performed at that time point. The inventors of the present invention clarified problems such that, since a variable-length code table to be used in a next frame is generated on the basis of the occurrence probability of information in a preceding frame, in the case of a motion image having low correlation between frames, for example, a motion image having a dramatic movement, the coding efficiency deteriorates. Further, the inventors of the present invention found out that, from the viewpoint of improving compression efficiency, it is important to how to determine a reference range for obtaining the occurrence probability.
An object of the present invention is to provide a coding technique realizing improvement in compression efficiency of variable-length coding in accordance with characteristics of image data to be processed and a decoding technique corresponding to the coding technique.
A concrete object of the present invention is to provide a coding technique realizing improvement in compression efficiency of variable-length coding even when there is no sufficient statistics length and a decoding technique corresponding to the coding technique.
Another concrete object of the present invention is to provide a coding technique realizing improvement in compression efficiency of variable-length coding in the case where information deficiency occurs or for an image having a large change and a decoding technique corresponding to the coding technique.
The above and other objects and novel features of the present invention will become apparent from the description of the specification and appended drawings.
Outline of representative one of inventions disclosed in the present application will be briefly described as follows.
In an image coding method, occurrence probability of statistical information calculated in a predetermined range of coded image data and initial occurrence probability selected on the basis of a coding parameter are added, and a short code is assigned in descending order of statistical information of high occurrence probability obtained by the addition, thereby generating a variable-length code table. On the basis of the generated variable-length code table, variable-length coding is performed. In an image decoding method, occurrence probability of statistical information calculated in a predetermined range of decoded image data and initial occurrence probability selected on the basis of a decoding parameter are added, and a short code is assigned in descending order of statistical information of high occurrence probability obtained by the addition, thereby generating a variable-length decode table. On the basis of the generated variable-length decode table, variable-length decoding is performed.
Effects obtained by the representative one of the inventions disclosed in the application will be briefly described as follows.
That is, according to the image coding method of the present invention, the compression efficiency of variable-length coding can be improved according to the characteristics of image data to be processed. According to the image decoding method of the present invention, decoding on data coded by the image coding method according to the present invention can be realized.
First, summary of representative embodiments of the invention disclosed in the application will be described. Reference numerals in the diagrams which are referred to in parentheses in explanation of the summary of the representative embodiments just illustrate objects included in the concept of components to which the reference numerals are designated.
An image decoding method according to a representative embodiment of the present invention is a method of decoding data which is variable-length coded, and includes: a first process of storing statistical information of decoded image data into a memory; a second process of generating a variable-length decode table on the basis of the statistical information stored in the memory; and a third process of performing variable-length decoding on the basis of the variable-length decode table generated in the second process. The second process is a process of generating a variable-length decode table by adding occurrence probability of statistical information calculated within a predetermined range of the decoded image data and initial occurrence probability selected on the basis of a decoding parameter, and assigning a short code in descending order of statistical information obtained by the addition. By the method, the variable-length decode table can be updated according to the characteristics of image data to be processed, and it can contribute to improvement in the compression efficiency of the variable-length coding from the aspect of the decoding process.
An image decoding method according to a representative embodiment of the invention is an image decoding method of decoding data which is variable-length coded, and includes: a first process of storing statistical information of decoded image data into a memory; a second process of generating a variable-length decode table on the basis of the statistical information stored in the memory; and a third process of performing variable-length decoding on the basis of the variable-length decode table generated in the second process. The second process is a process of generating a variable-length decode table by selecting a code used for a variable-length decode table in accordance with the proportion of statistical information of high occurrence probability on entire statistical information calculated within a predetermined range of the decoded image data and assigning a short code in descending order of the calculated statistical information of the high occurrence probability. In the case of generating a variable-length decode table on the basis of the occurrence probability of the statistical information, a code used for the variable-length decode table can be selected. Consequently, the method can contribute to further improvement in compression efficiency of the variable-length coding from the aspect of the decoding process in accordance with the parameter of a code selected.
An image decoding method according to a representative embodiment of the invention is a method of decoding data which is variable-length coded, and includes: a first process of storing statistical information of decoded image data into a memory; a second process of generating a variable-length decode table on the basis of the statistical information stored in the memory; and a third process of performing variable-length decoding on the basis of the variable-length decode table generated in the second process. The second process is a process of generating a variable-length decode table by determining whether or not statistical information which can be referred to at the time of calculating occurrence probability of statistical information satisfies preliminarily-set statistics length or not, when the statistics length is not satisfied, selecting a predetermined variable-length decode table and setting it to be usable and, when the statistics length is satisfied, assigning a short code in descending order of the calculated statistical information of the high occurrence probability on the basis of the occurrence probability of the statistical information calculated within a predetermined range. The method can contribute to improvement in compression efficiency of the variable-length coding from the aspect of the decoding process even when there is no sufficient statistics length.
An image decoding method according to a representative embodiment of the present invention is a method of decoding data which is variable-length coded, and includes: a first process of storing statistical information of decoded image data into a memory; a second process of generating a variable-length decode table on the basis of the statistical information stored in the memory; and a third process of performing variable-length decoding on the basis of the variable-length decode table generated in the second process. The second process is a process of determining the degree of similarity of histograms on occurrence probability of statistical information calculated in a plurality of positions in decoded image data, determining a predetermined range for calculating the occurrence probability in accordance with the degree of similarity, and generating a variable-length decode table on the basis of the occurrence probability of the statistical information calculated in the determined predetermined range. Since the reference range can be determined according to the degree of similarity, also from this viewpoint, the method can contribute to improvement in compression efficiency of the variable-length coding from the aspect of the decoding process.
In the image decoding method of [8], for example, in the second process, when the degree of similarity of the histograms is smaller than a threshold, a predetermined range for calculating occurrence probability is determined in a present frame and, when the degree of similarity of the histograms is larger than a threshold, a predetermined range for calculating the occurrence probability is determined in a past or future frame. This is one mode realizing improved compression rate.
In the image decoding method of [8], for example, the second process is a process of generating a variable-length decode table by adding occurrence probability of statistical information calculated in the determined predetermined range of decoded image data and initial occurrence probability selected on the basis of a decode parameter, and assigning a short code in descending order of statistical information of high occurrence probability obtained by the addition.
An image decoding method according to a representative embodiment of the invention is a method of decoding data which is variable-length coded and includes: a first process of storing statistical information of decoded image data into a memory; a second process of generating a variable-length decode table on the basis of the statistical information stored in the memory; and a third process of performing variable-length decoding on the basis of the variable-length decode table generated in the second process. The second process is a process of generating a variable-length decode table by generating a motion vector in a predetermined range of a block to be decoded in a present frame of the decoded image data, determining a predetermined range for calculating occurrence probability on the basis of the generated motion vector, and assigning a short code in descending order of statistical information of the occurrence probability of the statistical information in the predetermined range. In such a manner, the reference range can be determined according to the motion vector, also from the viewpoint, the method can contribute to improvement in compression efficiency of the variable-length coding from the aspect of the decoding process.
An image decoding method according to a representative embodiment of the invention is a method of decoding data which is variable-length coded, and includes: a first process of storing statistical information of decoded image data into a memory; a second process of generating a variable-length decode table on the basis of the statistical information stored in the memory; and a third process of performing variable-length decoding on the basis of the variable-length decode table generated in the second process. The second process is a process of generating a variable-length decode table by assigning a short code in descending order of statistical information of the occurrence probability of the statistical information in the predetermined range in which the number of bits of a code to be variable-length decoded in a past frame is predetermined number of bits or less. Since the reference range is determined in response to a range of high compression rate by actual performance of the variable-length coding, in a manner similar to the above, the method can contribute to improvement in the compression efficiency of the variable-length coding from the aspect of the decoding process.
An image decoding apparatus according to a representative embodiment of the invention is an apparatus for decoding data which is variable-length coded, and includes: a memory for storing statistical information of decoded image data; a variable-length decode table generating unit for generating a variable-length decode table on the basis of the statistical information stored in the memory; and a variable-length decoding unit for performing variable-length decoding on the basis of the variable-length decode table generated by the variable-length decode table generating unit. The variable-length decode table generating unit generates a variable-length decode table by adding occurrence probability of statistical information calculated within a predetermined range of the decoded image data and initial occurrence probability selected on the basis of a decoding parameter, and assigning a short code in descending order of statistical information obtained by the addition.
An image decoding apparatus according to another representative embodiment of the invention is an apparatus of decoding data which is variable-length coded, and includes: a memory for storing statistical information of decoded image data; a variable-length decode table generating unit for generating a variable-length decode table on the basis of the statistical information stored in the memory; and a variable-length decoding unit for performing variable-length decoding on the basis of the variable-length decode table generated by the variable-length decode table generating unit. The variable-length decode table generating unit generates a variable-length decode table by selecting a code used for a variable-length decode table in accordance with the proportion of statistical information of high occurrence probability on statistical information calculated within a predetermined range of the decoded image data and assigning a short code in descending order of the calculated statistical information of the high occurrence probability.
An image decoding apparatus according to another representative embodiment of the invention is an apparatus for decoding data which is variable-length coded, and includes: a memory for storing statistical information of decoded image data; a variable-length decode table generating unit for generating a variable-length decode table on the basis of the statistical information stored in the memory; and a variable-length decoding unit for performing variable-length decoding on the basis of the variable-length decode table generated by the variable-length decode table generating unit. The variable-length decode table generating unit determines whether or not statistical information which can be referred to at the time of calculating occurrence probability of statistical information satisfies preliminarily-set statistics length, when the statistics length is not satisfied, selects a predetermined variable-length decode table and sets it to be usable and, when the statistics length is satisfied, assigns a short code in descending order of the statistical information of the high occurrence probability on the basis of the occurrence probability of the statistical information calculated in a predetermined range.
An image decoding apparatus according to another representative embodiment of the invention is an apparatus for decoding data which is variable-length coded, and includes: a memory for storing statistical information of decoded image data; a variable-length decode table generating unit for generating a variable-length decode table on the basis of the statistical information stored in the memory; and a variable-length decoding unit for performing variable-length decoding on the basis of the variable-length decode table generated by the variable-length decode table generating unit. The variable-length decode table generating unit determines the degree of similarity of histograms on occurrence probability of statistical information calculated in a plurality of positions in decoded image data, determines a predetermined range for calculating the occurrence probability in accordance with the degree of similarity, and generates a variable-length decode table on the basis of the occurrence probability of the statistical information calculated in the determined predetermined range.
In the image decoding apparatus of [18], for example, when the degree of similarity of the histograms is smaller than a threshold, the variable-length decode table generating unit determines a predetermined range for calculating occurrence probability in a present frame. When the degree of similarity of the histograms is larger than a threshold, the variable-length decode table generating unit determines a predetermined range for calculating the occurrence probability in a past or future frame.
In the image decoding apparatus of [18], for example, the variable-length decode table generating unit generates a variable-length decode table by adding occurrence probability of statistical information calculated in the determined predetermined range of decoded image data and initial occurrence probability selected on the basis of a decode parameter, and assigning a short code in descending order of statistical information of high occurrence probability obtained by the addition.
An image decoding apparatus according to another representative embodiment of the invention is an apparatus for decoding data which is variable-length coded, and includes: a memory for storing statistical information of decoded image data; a variable-length decode table generating unit for generating a variable-length decode table on the basis of the statistical information stored in the memory; and a variable-length decoding unit for performing variable-length decoding on the basis of the variable-length decode table generated by the variable-length decode table generating unit. The variable-length decode table generating unit generates a variable-length decode table by generating a motion vector in a predetermined range of a block to be decoded in a present frame of the decoded image data, determining a predetermined range for calculating occurrence probability on the basis of the generated motion vector, and assigning a short code in descending order of statistical information of the occurrence probability of the statistical information in the predetermined range.
An image decoding apparatus according to another representative embodiment of the invention is an apparatus for decoding data which is variable-length coded, and includes: a memory for storing statistical information of decoded image data; a variable-length decode table generating unit for generating a variable-length decode table on the basis of the statistical information stored in the memory; and a variable-length decoding unit for performing variable-length decoding on the basis of the variable-length decode table generated by the second process. The variable-length decode table generating unit generates a variable-length decode table by setting a range in which the number of bits of a code to be variable-length decoded in a past frame is predetermined number of bits or less as the predetermined range and assigning a short code in descending order of statistical information of the occurrence probability of the statistical information calculated in the predetermined range.
An image coding method (
An image coding method (
An image coding method (
An image coding method (
In the image coding method of [28], in the second process, when the degree of similarity of the histograms is smaller than a threshold, a predetermined range for calculating occurrence probability is determined in a present frame. When the degree of similarity of the histograms is larger than a threshold, a predetermined range for calculating the occurrence probability is determined in a past or future frame.
In the coding method of [28], the second process is a process of generating a variable-length code table by adding occurrence probability of statistical information calculated in the determined predetermined range of coded image data and initial occurrence probability selected on the basis of a decode parameter, and assigning a short code in descending order of statistical information of high occurrence probability obtained by the addition (
An image coding method (
An image coding method (
An image coding apparatus according to a representative embodiment of the invention is an apparatus for compressing quantized data by variable-length coding and includes: a memory (212) for storing statistical information (MBT, CBPL) of coded image data; a variable-length code table generating unit (213) for generating a variable-length code table on the basis of the statistical information stored in the memory; and a variable-length coding unit (205) for performing variable-length coding on the basis of the variable-length code table generated by the variable-length code table generating unit. The variable-length code table generating unit generates a variable-length code table by adding occurrence probability of statistical information calculated within a predetermined range of the coded image data and initial occurrence probability selected on the basis of a coding parameter (S3005), and assigning a short code in descending order of statistical information obtained by the addition (S3006). By the apparatus, the compression efficiency of the variable-length coding can be improved according to the characteristics of image data to be processed.
An image coding apparatus according to a representative embodiment of the invention is an apparatus of compressing quantized data by variable-length coding, and includes: a memory for storing statistical information of coded image data; a variable-length code table generating unit for generating a variable-length code table on the basis of the statistical information stored in the memory; and a variable-length coding unit for performing variable-length coding on the basis of the variable-length code table generated by the variable-length code table generating unit. The variable-length code table generating unit generates a variable-length code table by selecting a code used for a variable-length code table in accordance with the proportion of statistical information of high occurrence probability on entire statistical information calculated within a predetermined range of the coded image data and assigning a short code in descending order of the calculated statistical information of the high occurrence probability. In the case of generating a variable-length code table on the basis of the occurrence probability of statistical information, a code used for the variable-length code table can be selected. Consequently, the apparatus can contribute to further improvement in compression efficiency of the variable-length coding according to the property of a code to be selected.
An image coding apparatus according to a representative embodiment of the invention is an apparatus for compressing quantized data by variable-length coding and includes: a memory for storing statistical information of coded image data; a variable-length code table generating unit for generating a variable-length code table on the basis of the statistical information stored in the memory; and a variable-length coding unit for performing variable-length coding on the basis of the variable-length code table generated by the variable-length code table generating unit. The variable-length code table generating unit generates a variable-length code table by determining whether or not statistical information which can be referred to at the time of calculating occurrence probability of statistical information satisfies preliminarily-set statistics length (S4002), when the statistics length is not satisfied, selecting a predetermined variable-length code table and setting it to be usable (S4003) and, when the statistics length is satisfied, assigning a short code in descending order of the statistical information of the high occurrence probability on the basis of the occurrence probability of,the statistical information calculated in a predetermined range (S4004 and S4005). Even when there is no sufficient statistics length, the apparatus can contribute to improvement in compression efficiency of variable-length coding.
An image coding apparatus according to a representative embodiment of the invention is an apparatus for compressing quantized data by variable-length coding and includes: a memory for storing statistical information of coded image data; a variable-length code table generating unit for generating a variable-length code table on the basis of the statistical information stored in the memory; and a variable-length coding unit for performing variable-length coding on the basis of the variable-length code table generated by the variable-length code table generating unit. The variable-length code table generating unit generates a variable-length code table by determining the degree of similarity of a histogram on occurrence probability of statistical information calculated in a plurality of positions in coded image data, determining a predetermined range for calculating the occurrence probability in accordance with the degree of similarity, and generating a variable-length code table on the basis of the occurrence probability of the statistical information calculated in the determined predetermined range.
In the coding apparatus of [38], when the degree of similarity of the histogram is smaller than a threshold, the variable-length code table generating unit determines a predetermined range for calculating occurrence probability in a present frame. When the degree of similarity of the histogram is larger than a threshold, the variable-length code table generating unit determines a predetermined range for calculating the occurrence probability in a past or future frame.
In the coding apparatus of [38], the variable-length code table generating unit performs a process of generating a variable-length code table by adding occurrence probability of statistical information calculated in the determined predetermined range of coded image data and initial occurrence probability selected on the basis of a decode parameter, and assigning a short code in descending order of statistical information of high occurrence probability obtained by the addition.
An image coding apparatus according to a representative embodiment of the invention is an apparatus for compressing quantized data by variable-length coding and includes: a memory for storing statistical information of coded image data; a variable-length code table generating unit for generating a variable-length code table on the basis of the statistical information stored in the memory; and a variable-length coding unit for performing variable-length coding on the basis of the variable-length code table generated by the second process. The variable-length code table generating unit generates a variable-length code table by generating a motion vector in a predetermined range of a block to be coded in a present frame of the coded image data, determining a predetermined range for calculating occurrence probability on the basis of the generated motion vector, and assigning a short code in descending order of statistical information of the occurrence probability of the statistical information in the predetermined range.
An image coding apparatus according to another representative embodiment of the invention is an apparatus for compressing quantized data by variable-length coding and includes: a memory for storing statistical information of coded image data; a variable-length code table generating unit for generating a variable-length code table on the basis of the statistical information stored in the memory; and a variable-length coding unit for performing variable-length coding on the basis of the variable-length code table generated by the variable-length code table generating unit. The variable-length code table generating unit generates a variable-length code table by assigning a short code in descending order of statistical information of the occurrence probability of the statistical information in the predetermined range in which the number of bits of a code to be variable-length coded in a past frame is predetermined number of bits or less.
The embodiments will be described more specifically.
The original image memory 201 temporarily buffers data of an original image frame. The subtractor 202 obtains the difference between an original image and a predicted image and generates a differential image. The orthogonal transformer 203 transforms the differential image generated by the subtractor 202 to an orthogonal transform coefficient by using an orthogonal transform method such as DCT. The quantizer 204 quantizes the orthogonal transform coefficient and outputs a quantized coefficient. The variable-length coding unit 205 codes the quantized coefficient output from the quantizer 204, a prediction mode output from the prediction mode selector 211, and the like by using a Huffman code, an arithmetic code, and the like, and outputs the result as image compression information. The inverse quantizer 206 inversely quantizes the quantized coefficient which is output from the quantizer 204. The inverse orthogonal transformer 207 inversely orthogonal-transforms the inversely quantized coefficient which is output from the inverse quantizer 206. The adder 208 adds the differential image output from the inverse orthogonal transform unit 207 and a predicted image which is output from the prediction mode selector 211, and outputs a local decoded image. The frame memory 209 stores the local decoded image generated by the adder 208. The prediction unit 210 performs prediction by using the local decoded image stored in the frame memory 209. The prediction mode selector 211 selects one prediction mode of the highest prediction efficiency and outputs the prediction mode and the predicted image. The statistical information storing memory 212 refers to the prediction mode which is output from the prediction mode selector 211 and stores an MB type (MBT) of a block to be coded by addresses of blocks. The variable-length code table generating unit 213 generates a histogram of the MB type by using an MB type of a coded macro block (MB) stored in the statistical information storing memory 212 in a proper range, adds the generated one to the initial histogram and, after that, assigns a short code in descending order of the occurrence probability, thereby generating a suitable variable-length code table. The range which is referred to at the time of generating the histogram and the MB type referred to in the range are set variably, and the generated histogram is added using the initial histogram as a start point and updated. The variable-length coding unit 205 codes a macroblock type as a prediction mode which is output from the prediction mode selector by using the generated variable-length code table.
By using a code other than an exponential Golomb used in the H.264 standard at the time of generating the variable-length code table, the compression rate can be increased. For example, as shown in
Once an initial histogram is set, the initial histogram is updated each time the coding is performed. First, a histogram of the MB type in the reference range is generated (S3004). Next, the frequency obtained in step S3004 is added to the initial histogram to update the initial histogram (S3005). Finally, a short code is assigned in the descending order of the occurrence probability to a valid MB type in the histogram selected and updated by the above procedure, thereby generating a suitable variable-length code table (S3006). Each time the coding is performed, a histogram in the reference range is generated and added to the initial histogram which is set in S3003 to generate a variable-length code table by a similar procedure. In the case where the occurrence probabilities are the same, it is sufficient to assign a code on the basis of the frequency of the initial histogram or a table describing the assigning order.
With respect to the histogram generating method, a weight according to the degree of importance can be set to an MB type in the reference range. For example, a histogram may be generated by using a function of weight which decreases with distance from a block to be coded as shown in mathematical expression 1.
Here, x0, y0, t0 denote three-dimensional positions of a block to be coded, “x, y, t” denote three-dimensional positions of a block in the reference range, and “a” denotes a parameter for adjusting weight. The weight may be set by applying a filter whose cost decreases with distance from a block to be coded as a center as shown in
Although the MB types shown in
The variable-length decoding unit 1101 decodes image compression information which is transmitted. The statistical information storing memory 1102 stores MB types (MBT) by addresses of blocks. The variable-length decode table generating unit 1103 generates a suitable variable-length decode table by obtaining the occurrence probability of the decoded MB type stored in the statistical information storing memory 1102 within a reference range, adding it to an initial histogram, and assigning short codes in descending order of the occurrence probability to valid MB types. Since it is sufficient to employ a procedure similar to the process flow in the image coding apparatus described with reference to
Although the MB type is taken as an example in the above description, the compression rate can be increased by applying a similar method also at the time of variable-length coding a coded block pattern (CBP) parameter. For example, a case of variable-length coding CodedBlockPatternLuma will be examined. It is now assumed that CodedBlockPatternLuma expresses a distribution of DCT coefficients of brightness components in one macro block by four bits.
CodedBlockPatternLuma by the above-described method. By applying the method to codes in 16 patterns, a suitable code can be assigned according to the occurrence probability. In
The above method is applied not only to CodedBlockPatternLuma but also similarly to CodedBlockPatternChroma. As shown in
In the foregoing first embodiment, adaptive variable-length coding based on the occurrence probability of the MB type and the CBP parameter can be performed, and the compression rate can be increased. By performing the similar variable-length code table/decode table generating processes in the coding apparatus and the decoding apparatus, the necessity of transmitting extra additional information is avoided so that the compression rate can be increased. Since the initial histogram is selected on the basis of the image size and the quantization parameter, also at the coding initial stage where the statistical length is insufficient, high compression rate can be obtained. At the time of generating a variable-length code table on the basis of a histogram, by selecting a proper code word on the basis of the occurrence probability distribution tendency, the compression rate can be increased. By setting a weight according to the degree of importance at the time of generating a histogram, a variable-length code table which is more adapted to the property of an image can be generated. Obviously, the technical matters described in the variable-length coding can be similarly applied to the variable-length decoding process.
Some methods of designating a parameter used for variable-length coding/decoding, for example, a parameter such as a reference range for the histogram generation will be described by paying attention to the description of coded stream information which is generated in the variable-length coding unit 205 in
For example, in the sequence header, a reference unit (vlc_reference_unit) specifying a range of calculating occurrence probability of an event is defined by the variable-length code table generating unit 213. Vlc_reference_unit indicates a syntax element for determining that the reference range is a peripheral unit, a slice unit, a picture unit, a sequence unit, or other units.
In addition, a reference range width (vlc_reference_range) for specifying a detailed reference range is defined. In the example of
The parameters may be included in a sequence header as shown in the example of setting the reference range in
The process of the variable-length code table generating unit 213 described with reference to
In
As the processes of the variable-length code table generating unit 213, the processes of
The processes in steps S4004 and S4005 in
In the foregoing second embodiment, the user can perform variable-length coding adaptively in a proper reference range in accordance with an assumed application. That is, resistance to an error can be freely set according to reliability of a communication path. Since a variable-length code table is not generated using both the initial histogram and the statistic information, the variable-length code table placing heavier weight on the characteristics of an image to be coded can be generated.
The content described in the second embodiment can be similarly applied also to the processes of the variable-length decode table generating unit 1103.
The MB types described in the first embodiment in similar blocks in an image are often the same, also in the CBP parameter. Therefore, as shown in
After determining the similar region by the coding apparatus, information of the similar region has to be sent to the decoding apparatus. As a sending method, a block address of the similar region may be directly sent, or the similar region is approximated to a rough rectangular region and only information of the start point, height, and width of the rectangle may be sent. Another method of describing region information may be also used.
The decoding apparatus receives information of the similar region and performs processes similar to those performed by the coding apparatus. In such a manner, the same variable-length code table can be generated by the decoding apparatus.
In the foregoing third embodiment, by weighting a region similar to a block to be coded, the possibility that a shorter code is assigned to information of the block to be coded becomes high, and the compression rate can be increased.
A fourth embodiment of the present invention will be described with reference to
Here, p in the mathematical expression 3 indicates a histogram of the MB type in the region A, and q in the mathematical expression 4 indicates a histogram of the MB type in the region B. The relation of the mathematical expression 5 is satisfied, and m denotes the number of bits of the MB type. The higher the degree of similarity is, the larger the value of the similarity degree ρ becomes. When the values coincide, 1 is derived. The degree of similarity may be obtained not only by the Bhattacharyya coefficient but also by a histogram intersection shown in the following mathematical expression 6 or by using another method.
Based on the similarity degree ρ obtained as described above and a threshold comparison result, the reference range is set (S20002). When the similarity degree ρ is smaller than the threshold, the correlation between frames is regarded as low, and a reference range is set from a present frame (S20003). That is, the reliability of information in the present frame is regarded as high. When the similarity degree ρ is larger than the threshold, the correlation between frames is regarded as high, and a reference range is set from frames including not only the present frame but also the past frame (S20004). That is, the reliability of information in not only the present frame but also in the past frame is similarly regarded as high. In step S20004, a reference range may be set not only from a past frame but also from a future frame.
Next, regarding only an MB type which can be used in the reference range which is set by the above-described means as a valid mode, a base table for generating a histogram is generated (S20005). After that, the histogram of the MB type in the reference range is generated (S20006), and a variable-length code table is generated in a manner similar to the first to third embodiments (S20007).
By adding the procedure using the initial histogram described in
Although the process of adaptively selecting a reference range is described as an example in the process of
In the above-described fourth embodiment, by obtaining the correlation of frames by the similarity degree of histograms, a variable-length code table in which the appearance probability of the MB type or the CBP parameter in a block to be coded is reflected more suitably can be generated. Accordingly, the compression rate can be further increased. The detailed description will not be given. Obviously, the technical matters described in the fourth embodiment can be applied also to the decoding apparatus and the decoding method.
A fifth embodiment of the present invention will be described with reference to
The processes (S2200 to S22010) using the initial histogram may be added also to the process flow of
In the fifth embodiment as described above, by obtaining the correlation of frames by the representative value of motion vectors, a variable-length code table in which the appearance probability of the MB type or the CBP parameter in a block to be coded is reflected more suitably can be generated. It is based on a phenomenon such that when the motion vector is small, a spatial distribution of the MB type or CBP parameter does not largely change in past and future frames. Accordingly, the compression rate can be further increased. The detailed description will not be given. Obviously, the technical matters described in the fifth embodiment can be applied also to the decoding apparatus and the decoding method.
A sixth embodiment of the present invention will be described with reference to
In the sixth embodiment as described above, by correcting the reference range by the representative value of motion vectors, a variable-length code table in which the appearance probability of the MB type or the CBP parameter in a block to be coded is reflected more suitably can be generated. Accordingly, the compression rate can be further increased. The detailed description will not be given. Obviously, the technical matters described in the sixth embodiment can be applied also to the decoding apparatus and the decoding method.
A seventh embodiment of the present invention will be described with reference to
It is assumed that, in a result of variable-length coding of the MB type in a block, code lengths required for describing the MB type of past five frames coded are bit lengths of 5, 1, 1, 3, and 1. In the case of defining that description of three bits or less is a correct answer, the correct answer rate in the block is 4/5. The number of frames in which the correct answer rate can be varied, and an arbitrary value of one past frame can be set. It is sufficient to describe the number of frames used for calculation of a correct answer rate as a syntax element (correct answer rate calculation width) in a coded stream.
In the embodiment, using only a block in which the correct answer rate calculated as described above becomes the threshold Thd or larger as the reference range, the variable-length coding on the MB type or CBP parameter is performed. It is also possible to generate a weighted histogram in accordance with the correct answer rate.
In the seventh embodiment described above, by generating a variable-length code table in accordance with the correct answer rate in past coded frames, a variable-length code table in which the appearance probability of the MB type or the CBP parameter in a block to be coded is reflected more suitably can be generated. Accordingly, the compression rate can be further increased. By adaptively selecting the reference range in the same rule using a syntax element (correct answer rate calculation width) commonly by the coding apparatus and the decoding apparatus, without transmitting an additional bit, higher compression can be realized. The detailed description will not be given. Obviously, the technical matters described in the seventh embodiment can be applied also to the decoding apparatus and the decoding method.
Although the invention achieved by the inventors of the present invention has been concretely described on the basis of the embodiments, obviously, the invention is not limited to the embodiments but can be variously modified without depart from the gist.
For example, the present invention can be applied not only to the motion image coding/decoding technique conformed to the H.264/AVC standard but also widely to the image process technique by the other methods.
Although a block size of 16 pixels by 16 pixels at maximum has been described above as an example, the invention can be also applied to block sizes of 32 pixels by 32 pixels, 64 pixels by 64 pixels, or larger, and variable-length coding on block sizes of 32 pixels by 16 pixels, 64 pixels by 32 pixels, and the like.
The variable-length coding according to the present invention can be applied not only to the MB type but also to a sub-MB type.
Number | Date | Country | Kind |
---|---|---|---|
2008-245329 | Sep 2008 | JP | national |
2009-126183 | May 2009 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP2009/002976 | 6/29/2009 | WO | 00 | 3/24/2011 |