1. Field of the Invention
The present invention relates to moving picture coding and decoding techniques, and in particular, to moving picture coding and decoding techniques using predictive coding of a quantization parameter.
2. Description of the Related Art
In digital moving picture coding, such as MPEG-2 Part2 (hereinafter, referred to as MPEG-2) or MPEG-4 Part10/H.264 (hereinafter, referred to as AVC), each picture is partitioned into blocks having a predetermined size and coding is performed, and a quantization parameter indicating the roughness of quantization for a prediction error signal (or simply a picture signal) is transmitted. By variably controlling the quantization parameter in units of a predetermined block on the coding side, it is possible to control the code amount or to improve the subjective picture quality.
As quantization parameter control for improving the subjective picture quality, Adaptive Quantization is often used. In the adaptive quantization, change according to the activity of each macroblock is made such that quantization is applied more finely in a flat portion, in which deterioration is visually easily recognized, and quantization is applied more coarsely in a complex design portion, in which the visual recognition of deterioration is relatively difficult. That is, in a macroblock with high activity for which the assigned bit amount at the time of coding tends to increase, the quantization parameter is changed so that the large quantization scale is set. As a result, the subjective picture quality is improved while performing control such that the number of bits in the data of the coded picture is reduced as much as possible.
In the MPEG-2, it is determined whether or not the quantization parameter of the last block in coding/decoding order is the same as the quantization parameter of a block to be coded, and the quantization parameter is transmitted when the quantization parameter of the last block is not the same as the quantization parameter of the block to be coded. In the AVC, differential coding of the quantization parameter of the block to be coded is performed using the quantization parameter of the last block in coding/decoding order as a predicted value. This is based on the fact that code amount control is performed in coding order in general, and accordingly, the quantization parameter of the last block in coding order is closest to the quantization parameter of the coding block, and the purpose is to suppress the amount of information of the quantization parameter to be transmitted.
[Patent Literature 1] Japanese Patent Application Laid-Open No. 2011-91772
In known quantization parameter control, the code amount of the quantization parameter has been reduced by calculating the difference between the quantization parameter of a coded block on the left side as a predictive quantization parameter and the quantization parameter of a block to be coded and coding the calculated differential quantization parameter. However, depending on the content in a screen, for example, when the features of a picture in a block to be coded and a picture in a coded block on the left side are different as shown in
In addition, since quantization parameters calculated by the code amount control are performed in raster scan order from the upper left to the lower right of the normal screen, processing turns of slices become away from each other if the block size to be coded is reduced. For this reason, when the quantization parameter of a coded block above which a block to be coded is adjacent is used for prediction, these blocks are adjacent to each other but the processing turns in the code amount control are away from each other. Therefore, there is no chance that the quantization parameters calculated by the code amount control will necessarily become the same value or close values in the block to be coded and a coded block adjacent to the top of the block to be coded. As a result, there has been a problem in that it cannot be said that the code amount of the differential quantization parameter can be reduced.
The present invention has been made in view of such a situation, and it is an object of the present invention to provide a technique for improving the coding efficiency by reducing the code amount of the quantization parameter.
In order to solve the problem described above, a moving picture coding device according to an aspect of the present invention is a moving picture coding device that codes moving pictures in units of a block by partitioning a first block, which is obtained by partitioning each picture of the moving pictures into predetermined sizes, into one or a plurality of second blocks. The moving picture coding device includes: a quantization parameter calculation unit (110) configured to calculate a quantization parameter of the second block; a predictive quantization parameter deriving unit (114) configured to derive a predictive quantization parameter of the second block using quantization parameters of a third block adjacent to the left of the second block and a fourth block adjacent to the top of the second block; a differential quantization parameter generation unit (111) configured to generate a differential quantization parameter of the second block from a difference between the quantization parameter of the second block and the predictive quantization parameter; and a coding unit (112) configured to code the differential quantization parameter of the second block. The predictive quantization parameter deriving unit (114) sets the quantization parameter of the third block as a first quantization parameter when the third block is at a position not beyond a boundary of the first block, sets a quantization parameter of a fifth block coded before the second block as the first quantization parameter when the third block is at a position beyond the boundary of the first block, sets the quantization parameter of the fourth block as a second quantization parameter when the fourth block is at a position not beyond the boundary of the first block, sets the quantization parameter of the fifth block as the second quantization parameter when the fourth block is at a position beyond the boundary of the first block, and derives the predictive quantization parameter of the second block using the first and second quantization parameters.
Another aspect of the present invention is also a moving picture coding device. This device is a moving picture coding device that codes moving pictures in units of a coding block by partitioning a block, which is obtained by partitioning each picture of the moving pictures into predetermined sizes, into one or a plurality of coding blocks. The device includes: a quantization parameter calculation unit (110) configured to calculate a quantization parameter of the coding block; a predictive quantization parameter deriving unit (114) configured to derive a predictive quantization parameter of the coding block using quantization parameters of coded neighboring blocks adjacent to the coding block; a differential quantization parameter generation unit (111) configured to generate a differential quantization parameter of the coding block from a difference between the quantization parameter of the coding block and the predictive quantization parameter; and a coding unit (112) configured to code the differential quantization parameter of the coding block. When a neighboring block adjacent to the coding block in a predetermined direction of the coding block is at a position beyond a boundary of the block having the predetermined size, the predictive quantization parameter deriving unit (114) derives the predictive quantization parameter of the coding block using quantization parameters of other coded blocks that are different from the neighboring block adjacent to the coding block in the predetermined direction.
Still another aspect of the present invention is a moving picture coding method. This method is a moving picture coding method of coding moving pictures in units of a block by partitioning a first block, which is obtained by partitioning each picture of the moving pictures into predetermined sizes, into one or a plurality of second blocks. The method includes: a quantization parameter calculation step of calculating a quantization parameter of the second block; a predictive quantization parameter deriving step of deriving a predictive quantization parameter of the second block using quantization parameters of a third block adjacent to the left of the second block and a fourth block adjacent to the top of the second block; a differential quantization parameter generation step of generating a differential quantization parameter of the second block from a difference between the quantization parameter of the second block and the predictive quantization parameter; and a coding step of coding the differential quantization parameter of the second block. In the predictive quantization parameter deriving step, the quantization parameter of the third block is set as a first quantization parameter when the third block is at a position not beyond a boundary of the first block, a quantization parameter of a fifth block coded before the second block is set as the first quantization parameter when the third block is at a position beyond the boundary of the first block, the quantization parameter of the fourth block is set as a second quantization parameter when the fourth block is at a position not beyond the boundary of the first block, the quantization parameter of the fifth block is set as the second quantization parameter when the fourth block is at a position beyond the boundary of the first block, and the predictive quantization parameter of the second block is derived using the first and second quantization parameters.
A moving picture decoding device according to an aspect of the present invention is a moving picture decoding device that decodes a bitstream in which moving pictures are coded by partitioning a first block, which is obtained by partitioning each picture of the moving pictures into predetermined sizes, into one or a plurality of second blocks. The moving picture decoding device includes: a decoding unit (202) configured to extract a differential quantization parameter of the second block by decoding the bitstream; a predictive quantization parameter deriving unit (205) configured to derive a predictive quantization parameter of the second block using quantization parameters of a third block adjacent to the left of the second block and a fourth block adjacent to the top of the second block; and a quantization parameter generation unit (203) configured to generate a quantization parameter of the second block by adding the differential quantization parameter of the second block and the predictive quantization parameter. The predictive quantization parameter deriving unit (205) sets the quantization parameter of the third block as a first quantization parameter when the third block is at a position not beyond a boundary of the first block, sets a quantization parameter of a fifth block decoded before the second block as the first quantization parameter when the third block is at a position beyond the boundary of the first block, sets the quantization parameter of the fourth block as a second quantization parameter when the fourth block is at a position not beyond the boundary of the first block, sets the quantization parameter of the fifth block as the second quantization parameter when the fourth block is at a position beyond the boundary of the first block, and derives the predictive quantization parameter of the second block using the first and second quantization parameters.
Another aspect of the present invention is also a moving picture decoding device. This device is a moving picture decoding device that decodes a bit stream in which moving pictures are coded in units of a coding block by partitioning a block, which is obtained by partitioning each picture of the moving pictures into predetermined sizes, into one or a plurality of coding blocks. The device includes: a decoding unit (202) configured to extract a differential quantization parameter of a decoding block by decoding the bit stream in units of a decoding block; a predictive quantization parameter deriving unit (205) configured to derive a predictive quantization parameter of the decoding block according to a prediction mode of the decoding block using quantization parameters of decoded neighboring blocks adjacent to the decoding block; and a quantization parameter generation unit (203) configured to generate a quantization parameter of the decoding block by adding the differential quantization parameter of the decoding block and the predictive quantization parameter. When a neighboring block adjacent to the decoding block in a predetermined direction of the decoding block is at a position beyond a boundary of the block having the predetermined size, the predictive quantization parameter deriving unit (205) derives the predictive quantization parameter of the decoding block using quantization parameters of other decoded blocks that are different from the neighboring block adjacent to the decoding block in the predetermined direction.
Still another aspect of the present invention is a moving picture decoding method. This method is a moving picture decoding method of decoding a bitstream in which moving pictures are coded by partitioning a first block, which is obtained by partitioning each picture of the moving pictures into predetermined sizes, into one or a plurality of second blocks. The method includes: a decoding step of extracting a differential quantization parameter of the second block by decoding the bitstream; a predictive quantization parameter deriving step of deriving a predictive quantization parameter of the second block using quantization parameters of a third block adjacent to the left of the second block and a fourth block adjacent to the top of the second block; and a quantization parameter generation step of generating a quantization parameter of the second block by adding the differential quantization parameter of the second block and the predictive quantization parameter. In the predictive quantization parameter deriving step, the quantization parameter of the third block is set as a first quantization parameter when the third block is at a position not beyond a boundary of the first block, a quantization parameter of a fifth block decoded before the second block is set as the first quantization parameter when the third block is at a position beyond the boundary of the first block, the quantization parameter of the fourth block is set as a second quantization parameter when the fourth block is at a position not beyond the boundary of the first block, the quantization parameter of the fifth block is set as the second quantization parameter when the fourth block is at a position beyond the boundary of the first block, and the predictive quantization parameter of the second block is derived using the first and second quantization parameters.
In addition, any combination of the above-described constituent elements and those obtained by converting the expression of the present invention into a method, a device, a system, a recording medium, a computer program, and the like are also effective as aspects of the present invention.
According to the present invention, it is possible to improve the coding efficiency by reducing the code amount of the quantization parameter.
In embodiments of the present invention, in order to reduce the code amount of the quantization parameter of a block to be processed in moving picture coding in which each picture is partitioned into rectangular blocks having a predetermined size, the block is partitioned into one or a plurality of coding blocks, and quantization and coding are performed in units of a coding block, a code amount control technique for performing coding by deriving an optimal predictive quantization parameter from the coding information of neighboring coded blocks and calculating a difference from the predictive quantization parameter is provided.
A moving picture coding device 100 and a moving picture decoding device 200 suitable for embodying the present invention will be described.
The picture memory 101 temporarily stores a picture signal to be coded that is supplied in order of imaging/display time. The picture memory 101 supplies the stored picture signal to be coded to the residual signal generation unit 102, the predicted picture generation unit 108, and the activity calculation unit 109 in units of a predetermined pixel block. In this case, the pictures stored in order of imaging/display time are sorted in coding order, and are output from the picture memory 101 in units of a pixel block.
The residual signal generation unit 102 generates a residual signal by performing subtraction between the picture signal to be coded and a prediction signal generated by the predicted picture generation unit 108, and supplies the residual signal to the orthogonal transform and quantization unit 103.
The orthogonal transform and quantization unit 103 generates an orthogonally transformed and quantized residual signal by performing orthogonal transform and quantization on the residual signal, and supplies the orthogonally transformed and quantized residual signal to the second bitstream generation unit 104 and the inverse quantization and inverse orthogonal transform unit 105.
The second bitstream generation unit 104 generates a second bitstream by entropy-coding the orthogonally transformed and quantized residual signal according to the defined syntax rules, and supplies the second bitstream to the bitstream multiplexing unit 115.
The inverse quantization and inverse orthogonal transform unit 105 calculates a residual signal by performing inverse quantization and inverse orthogonal transform of the orthogonally transformed and quantized residual signal, which is supplied from the orthogonal transform and quantization unit 103, and supplies the residual signal to the decoded picture signal superimposing unit 106.
The decoded picture signal superimposing unit 106 generates decoded pictures by superimposing the predicted picture signal generated by the predicted picture generation unit 108 and the residual signal obtained by inverse quantization and inverse orthogonal transform of the inverse quantization and inverse orthogonal transform unit 105, and stores the decoded pictures in the decoded picture memory 107. In addition, a filtering process to reduce distortion, such as block distortion due to coding of decoded pictures, may be performed and the result may be stored in the decoded picture memory 107. In this case, predicted coding information, such as a flag for identifying the information of a post filter such as a deblocking filter, is stored in the coding information storage memory 113 when necessary.
From the picture signal supplied from the picture memory 101 and the decoded picture signal supplied from the decoded picture memory 107, the predicted picture generation unit 108 generates a predicted picture signal by performing intra prediction or inter prediction based on the prediction mode. The intra prediction is to generate a predicted picture signal using a pixel signal of a block to be coded, which is obtained by partitioning the picture signal supplied from the picture memory 101 in units of a predetermined block, and pixel signals, which are supplied from the decoded picture memory 107, of neighboring coded blocks adjacent to the block to be coded that are present in the same frame as the blocks to be coded. The inter prediction is to generate a predicted picture signal by performing block matching between a coding frame and a reference frame to calculate a motion amount called a motion vector and performing motion compensation from the reference frame based on the motion amount. The reference frame is a coded frame stored in the decoded picture memory 107 that is several frames away from the front or back in time series of a frame (coding frame) of a block to be coded obtained by partitioning the picture signal supplied from the picture memory 101 in units of a predetermined block. The predicted picture signal generated in this manner is supplied to the residual signal generation unit 102. Coding information such as a motion vector obtained by the predicted picture generation unit 108 is stored in the coding information storage memory 113 when necessary. In addition, when the selection of a plurality of prediction modes is possible, the predicted picture generation unit 108 determines an optimal prediction mode by evaluating the amount of distortion or the like between the generated predicted picture signal and the original picture signal, selects a predicted picture signal generated by prediction based on the determined prediction mode, and supplies the predicted picture signal to the residual signal generation unit 102. When the prediction mode is intra prediction, the intra prediction mode is supplied to the coding information storage memory 113 and the first bitstream generation unit.
The activity calculation unit 109 calculates an activity that is a coefficient indicating the complexity or smoothness of a picture of the block to be coded that is supplied from the picture memory 101, and supplies the activity to the quantization parameter calculation unit 110. The detailed configuration and operation of the activity calculation unit 109 will be described in embodiments below.
The quantization parameter calculation unit 110 calculates a quantization parameter of the block to be coded using the activity calculated by the activity calculation unit 109, and supplies the quantization parameter to the differential quantization parameter generation unit 111 and the coding information storage memory 113. The detailed configuration and operation of the quantization parameter calculation unit 110 will be described in embodiments below.
The differential quantization parameter generation unit 111 calculates a differential quantization parameter by subtracting the predictive quantization parameter derived by the predictive quantization parameter deriving unit 114 from the quantization parameter calculated by the quantization parameter calculation unit 110, and supplies the differential quantization parameter to the first bitstream generation unit 112.
The first bitstream generation unit 112 generates a first bitstream by coding the differential quantization parameter calculated by the differential quantization parameter generation unit 111 according to the defined syntax rules, and supplies the first bitstream to the bitstream multiplexing unit 115.
The coding information storage memory 113 stores the quantization parameter of the coded block. In addition, although no connection is shown in
The predictive quantization parameter deriving unit 114 derives a predictive quantization parameter using coding information or quantization parameters of neighboring coded blocks adjacent to a block to be coded, and supplies the predictive quantization parameter to the differential quantization parameter generation unit 111. The detailed configuration and operation of the predictive quantization parameter deriving unit 114 will be described in embodiments below.
The bitstream multiplexing unit 115 multiplexes the first and second bitstreams according to the defined syntax rules, and outputs a bitstream.
Since a decoding process of the moving picture decoding device 200 shown in
A bitstream supplied to the bitstream separation unit 201 is separated according to the defined syntax rules, and the separated bitstreams are supplied to the first bitstream decoding unit 202 and the second bitstream decoding unit 206.
The first bitstream decoding unit 202 decodes the supplied bitstream and outputs coding information regarding a prediction mode, a motion vector, a differential quantization parameter, and the like, and gives the differential quantization parameter to the quantization parameter generation unit 203 and stores the coding information in the coding information storage memory 204.
The quantization parameter generation unit 203 calculates a quantization parameter by adding the differential quantization parameter supplied from the first bitstream decoding unit 202 and the quantization parameter derived by the predictive quantization parameter deriving unit 205, and supplies the quantization parameter to the inverse quantization and inverse orthogonal transform unit 207 and the coding information storage memory 204.
The coding information storage memory 113 stores the quantization parameter of the decoded block. In addition, not only the coding information of the block unit decoded by the first bitstream decoding unit 202 but also coding information generated in units of a picture or a slice is stored when necessary. In addition, although no connection is shown in
The predictive quantization parameter deriving unit 205 derives a predictive quantization parameter using the coding information or quantization parameters of neighboring decoded blocks adjacent to a block to be decoded, and supplies the predictive quantization parameter to the quantization parameter generation unit 203. The predictive quantization parameter deriving unit 205 has the same function as the predictive quantization parameter deriving unit 114 of the moving picture coding device 100, and the detailed configuration and operation will be described in embodiments below.
The second bitstream decoding unit 206 calculates an orthogonally transformed and quantized residual signal by decoding the supplied bitstream, and gives the orthogonally transformed and quantized residual signal to the inverse quantization and inverse orthogonal transform unit 207.
The inverse quantization and inverse orthogonal transform unit 207 performs inverse orthogonal transform and inverse quantization for the orthogonally transformed and quantized residual signal decoded by the second bitstream decoding unit 206 using the quantization parameter generated by the quantization parameter generation unit 203, thereby obtaining an inversely orthogonal-transformed and inversely quantized residual signal.
The decoded picture signal superimposing unit 208 generates a decoded picture signal by superimposing the predicted picture signal generated by the predicted picture generation unit 209 and the residual signal obtained by inverse orthogonal transform and inverse quantization of the inverse quantization and inverse orthogonal transform unit 207, and outputs the decoded picture signal and stores the decoded picture signal in the decoded picture memory 210. When storing the decoded picture signal in the decoded picture memory 210, a filtering process for reducing block distortion or the like due to coding may be performed on the decoded pictures, and the result may be stored in the decoded picture memory 210.
The predicted picture generation unit 209 generates a predicted picture signal from the decoded picture signal, which is supplied from the decoded picture memory 210, based on the coding information such as a prediction mode or a motion vector decoded by the second bitstream decoding unit 206 and the coding information from the coding information storage memory 204, and supplies the predicted picture signal to the decoded picture signal superimposing unit 208.
Next, a method of deriving a predictive quantization parameter that is commonly performed in various units 120 surrounded by the thick dotted line in the moving picture coding device 100, in particular, the predictive quantization parameter deriving unit 114 and various units 220 surrounded by the thick dotted line in the moving picture decoding device 200, in particular, the predictive quantization parameter deriving unit 205 will be described in detail.
First, the operation of each unit of the various units 120 surrounded by the thick dotted line in the moving picture coding device 100 of the present embodiment will be described. In the various units 120, with a pixel block having a predetermined pixel size unit supplied from the picture memory 101 as a coding block, a quantization parameter for quantizing the block is determined. The quantization parameter is mainly determined by the algorithm of code amount control and adaptive quantization. First, the method of adaptive quantization in the activity calculation unit 109 will be described.
Generally, a human being has a visual characteristic that the eyes are sensitive to a low-frequency component with few edges. Therefore, the activity calculation unit 109 calculates the activity indicating the complexity or smoothness of a picture in units of a predetermined block such that quantization is applied more finely in a flat portion, in which deterioration is visually easily recognized, and quantization is applied more coarsely in a complex design portion, in which the visual recognition of deterioration is relatively difficult.
As an example of the activity, calculation using the variance of pixels in a coding block described in MPEG-2 TestMode15 (TM5) can be mentioned. The variance is a value indicating the degree of dispersion from the average of pixels that form each picture in a block. The variance decreases as a picture in a block becomes flat (brightness change decreases), and increases as the complexity of the design increases (brightness change increases). Therefore, the variance is used as an activity of the block. When the pixel value in a block is expressed as p (x, y), the activity act of the block is calculated by the following expression.
Here, BLK is a total number of pixels in a coding block, and p_mean is an average value of pixels in a block.
In addition, it is also possible to calculate the absolute value of the differences between a pixel in a coding block and pixels, which are adjacent to the pixel in horizontal and vertical directions, and to take a total sum in the block, without being limited to the variance described above. Also in this case, the total sum is small when a picture is flat and is large in a complex design portion with many edges. Therefore, this can be used as an activity. This is calculated by the following expression.
The activity act calculated in this manner is supplied to the quantization parameter calculation unit 110.
Next, code amount control will be described. In the moving picture coding device 100 of the present embodiment, a unit for realizing the code amount control is not provided in particular. In the code amount control, however, a quantization parameter of the coding block is determined based on the amount of generated code. Therefore, the following explanation will be given on the assumption that the quantization parameter calculation unit 110 has the function.
The code amount control is intended to match the amount of generated code of a predetermined unit, such as a frame, near the target code amount. When it is determined that the amount of generated code of the coded block is larger than the target code amount, relatively rough quantization is applied to blocks to be coded subsequently. When it is determined that the amount of generated code of the coded block is smaller than the target code amount, relatively fine quantization is applied to blocks to be coded subsequently.
The algorithm of the specific code amount control will be described with reference to
First, a target code amount (T) is determined for each frame. In general, T is determined such that the relationship of I picture>P picture>reference B picture>non-reference B picture is satisfied. For example, when the target bit rate of a moving picture is 5 Mbps and the number of I pictures per second, the number of P pictures per second, the number of reference B pictures per second, and the number of non-reference B pictures per second are 1, 3, 11, and 15, respectively, assuming that the target code amount according to the picture type is Ti, Tp, Tbr, and Tb, Ti=400 kbit, Tp=300 kbit, Tbr=200 kbit, and Tb=100 kbit are set in order to control the target code amount so that the ratio of Ti:Tp:Tbr:Tb=4:3:2:1 is satisfied. However, the assigned code amount according to the picture type does not influence the essence of the present invention.
Next, code amount control in a frame will be described. Assuming that the number of blocks that are units to determine the quantization parameter is N, a generated code amount is B, and a difference bit from the target code amount is D, the following expression is satisfied.
Here, j is a coding sequence count number of a coding block. D(0) is an initial value of a target code amount difference.
A quantization parameter bQP by the code amount control is determined as follows.
bQP(j)=D(j)×r [Expression 4]
Here, r is a proportionality coefficient to convert a target code amount difference into a quantization parameter. The proportionality coefficient r is determined according to the available quantization parameter.
The quantization parameter calculation unit 110 changes the quantization parameter of the coding block calculated by the code amount control, using the activity act calculated for each coding block by the activity calculation unit 109. Since the quantization parameter is calculated for each coding block, the quantization parameter will be expressed as bQP hereinbelow by omitting the coding sequence count number of the quantization parameter by the code amount control.
The quantization parameter calculation unit 110 records an average activity in a frame coded last as avg_act, and calculates a normalization activity Nact of a coding block using the following expression.
Here, the coefficient 2 in the above expression is a value indicating the dynamic range of the quantization parameter, and the normalization activity Nact having a range of 0.5 to 2.0 is calculated.
In addition, for avg_act, an activity maybe calculated in advance for all blocks in a frame before the coding process, and the average value may be set as avg_act. In addition, avc_act may be stored in the coding information storage memory 113, and the quantization parameter calculation unit 110 may derive avg_act from the coding information storage memory 113 when necessary.
By multiplying the calculated normalization activity Nact by the quantization parameter bQP as a reference as in the following expression, a quantization parameter QP of the coding block is obtained.
QP=Nact×bQP [Expression 6]
In addition, although bQP is a quantization parameter of a block unit calculated by the code amount control as described above, it is also possible to use a quantization parameter representing a slice or a frame including a coding block as a fixed value. In addition, an average quantization parameter of a frame coded last may be used, and the calculation method is not limited in particular in the present embodiment.
The quantization parameter of the coding block calculated in this manner is supplied to the coding information storage memory 113 and the differential quantization parameter generation unit 111.
In the coding information storage memory 113, not only the quantization parameter calculated by the quantization parameter calculation unit 110 and the quantization parameter of the past coding block that is already coded but also coding information, such as a motion vector or a prediction mode to be coded, of the coding block, is stored. Each unit derives the coding information when necessary.
The predictive quantization parameter deriving unit 114 derives a predictive quantization parameter for coding and transmitting the quantization parameter of a coding block efficiently using the coding information or quantization parameters of neighboring coded blocks around a block to be coded from the coding information storage memory 113.
In order to code and transmit a quantization parameter efficiently, it is more efficient to take a difference (differential quantization parameter) between the quantization parameter and a quantization parameter of a coded block and code and transmit the differential quantization parameter rather than coding the quantization parameter as it is. From the point of view of code amount control, assuming that the quantization parameter of the last coded block in the coding sequence is a predictive quantization parameter, the value of the differential quantization parameter to be transmitted is reduced, and the code amount is reduced. On the other hand, from the point of view of adaptive quantization, since a coding block and neighboring blocks around the coding block are adjacent to each other, the designs are the same or alike in many cases. For this reason, the activity of a block adjacent to the coding block has a value close to the activity of the coding block. Accordingly, assuming that the quantization parameter of the neighboring block is a predictive quantization parameter, the value of the differential quantization parameter to be transmitted is reduced, and the code amount is reduced. For this reason, in H.264, as shown in
However, when hierarchical tree coding is performed, using the quantization parameter of the last block as a predictive quantization parameter as in H.264 is optimal for the code amount control. However, when transmitting the quantization parameter using the adaptive quantization, an optimal predictive value is not obtained. Therefore, a problem that the code amount of the differential quantization parameter is increased occurs.
Here, the hierarchical tree coding will be described. The hierarchical tree coding referred to herein is to determine the depth indicating the coding unit in units of a tree block (here, 64×64 blocks) and perform coding in units of a coding block using the determined depth. In this manner, since it is possible to determine the optimal depth depending on the definition of the picture, it is possible to greatly improve the coding efficiency.
In such hierarchical tree coding, since the coding sequence is different from the raster scan order (left to right) as in H.264 of
In addition, if the quantization parameter of a block adjacent to the left is uniformly set as a predictive quantization parameter as in H.264, for example, in the case shown in
As a solution, a method can be considered in which the predictive quantization parameter is not selected uniformly from the left neighboring block but the quantization parameter of an upper neighboring coded block is set as a predictive quantization parameter.
However, when predicting the quantization parameter from the upper neighboring block beyond the tree block boundary, if the calculation of the quantization parameter based on the code amount control is taken into consideration, the upper neighboring block is a quantization parameter that is calculated at the considerably past point in time from the coding block. In this case, as shown in
When performing parallel processing for each tree block slice to increase the speed of the decoding process, the quantization parameter of the upper neighboring block beyond the tree block boundary cannot be used for prediction. In this case, efficient coding and transmission may not be performed by referring to the upper neighboring block beyond the tree block boundary.
Therefore, the predictive quantization parameter deriving unit 114 according to the embodiment of the present invention derives an optimal predictive quantization parameter from neighboring coded blocks without using neighboring blocks of the tree block adjacent to the top of the coding block for quantization parameter prediction, thereby improving the efficiency of the amount of generated code of the differential quantization parameter.
The predictive quantization parameter deriving unit 114 derives a predictive quantization parameter from the position of a coding block and the quantization parameters of neighboring coded blocks around the coding block, which are supplied from the coding information storage memory 113. The details of the predictive quantization parameter deriving unit 114 will be described in embodiments below.
The differential quantization parameter generation unit 111 calculates a differential quantization parameter by subtracting the predictive quantization parameter derived by the predictive quantization parameter deriving unit 114 from the quantization parameter of the coding block calculated by the quantization parameter calculation unit 110. Also at the time of decoding, the predictive quantization parameter is derived in the same manner as at the time of coding from the neighboring decoded block. Therefore, by setting the differential coding parameter as a coding target, it is possible to reduce the code amount of the quantization parameter without inconsistency in coding and decoding. The calculated differential quantization parameter is supplied to the first bitstream generation unit 112.
The first bitstream generation unit 112 generates a first bitstream by entropy-coding the differential quantization parameter calculated by the differential quantization parameter generation unit 111 according to the defined syntax rules.
The operation of each unit of the various units 220 surrounded by the thick dotted line in the moving picture decoding device 200 corresponding to the moving picture coding device 100 of the present embodiment described above will be described.
In the various units 220, the differential quantization parameter decoded by the first bitstream decoding unit 202 is first supplied to the quantization parameter generation unit 203. In addition, coding information other than the differential quantization parameter is stored in the coding information storage memory 204 when necessary.
The quantization parameter generation unit 203 calculates a quantization parameter of a decoding block by adding the differential quantization parameter supplied from the first bit stream decoding unit 202 and the quantization parameter derived by the predictive quantization parameter deriving unit 205, and supplies the quantization parameter to the inverse quantization and inverse orthogonal transform unit 207 and the coding information storage memory 204.
The coding information storage memory 204 stores the quantization parameter of the decoded block. In addition, not only the coding information of the block unit decoded by the first bitstream decoding unit 202 but also coding information generated in units of a picture or a slice is stored when necessary.
The predictive quantization parameter deriving unit 205 derives a predictive quantization parameter using the coding information or the quantization parameters of decoded blocks adjacent to the decoding block, and supplies the predictive quantization parameter to the quantization parameter generation unit 203. The quantization parameter calculated by the quantization parameter generation unit 203 is stored in the coding information storage memory 204. When deriving a predictive quantization parameter of the next decoding block, neighboring decoded blocks located around the decoding block are determined, and the quantization parameters of the neighboring blocks are derived from the coding information storage memory 204. The quantization parameters of the neighboring decoded blocks obtained in this manner are the same as the quantization parameters that the predictive quantization parameter deriving unit 114 of the moving picture coding device 100 derives from the coding information storage memory 113. Since the predictive quantization parameter deriving unit 205 has the same function as the predictive quantization parameter deriving unit 114 of the moving picture coding device 100, the same predictive quantization parameter as at the time of coding is derived if the quantization parameters of neighboring blocks supplied from the coding information storage memory 204 are the same.
In the predictive quantization parameter deriving unit 205, the same process is performed except for changing the neighboring coded blocks to the neighboring decoded blocks. Accordingly, explanation of quantization parameter prediction will be omitted.
Thus, the predictive quantization parameter derived on the coding side is also derived consistently on the decoding side.
In the present embodiment, when deriving a predictive quantization parameter, neighboring blocks referred to by the predictive quantization parameter deriving unit 114 of the moving picture coding device 100 are coded blocks, and neighboring blocks referred to by the predictive quantization parameter deriving unit 205 of the moving picture decoding device 200 are decoded blocks. The coded block referred to on the coding side is a block that is locally decoded for the next coding in the coding, and is the same as the decoded block referred to on the decoding side. Therefore, the functions of the predictive quantization parameter deriving units 114 and 205 are the same, and the predictive quantization parameters derived by the predictive quantization parameter deriving units 114 and 205 are also the same. In the following embodiments, the derivation of a predictive quantization parameter on the coding side will be described as a common function without distinction of coding and decoding.
Hereinafter, the details of a method of deriving a predictive quantization parameter performed in common by the predictive quantization parameter deriving units 114 and 205 will be described.
The detailed operation of the predictive quantization parameter deriving unit 114 in a first embodiment will be described. In the first embodiment, when a coding block to be coded is adjacent to an upper tree block, using the quantization parameter of a coded block in the upper tree block, which is the considerably past block in coding order, for prediction is prohibited. However, the quantization parameter of a coded block of a tree block adjacent to the left, which is the past block in coding order but is not the past block as the upper tree block, is used for prediction.
As shown in
In addition, as shown in
In
The symbol QPx (x=L, A, AL) described in
The operation of the predictive quantization parameter deriving unit 114 will be described.
First, position information of a coding block to be coded is derived (S100). For the position information of the coding block, the upper left position of a tree block including the coding block is calculated with the upper left of the screen as a base point, and the position of the coding block is calculated from the upper left position of the tree block. Then, it is determined whether or not the coding block is adjacent to the upper tree block (S101).
When the coding block is adjacent to the upper tree block (Yes in S101), that is, when the coding block is located at the upper end of the tree block, the upper neighboring block is included in the upper tree block. Accordingly, since the upper neighboring block is beyond the tree block boundary, the upper neighboring block is not used for quantization parameter prediction. Here, noting that the quantization parameter always has a positive value, a quantization parameter QPA of the upper neighboring block is set to 0 when the upper neighboring block is not used (S102).
On the other hand, when the coding block is not adjacent to the upper tree block (No in S101), that is, when the upper neighboring block is located in the same tree block as the coding block, the storage region stored in the coding information storage memory 113 is accessed from the reference position information of the upper left of the coding block, and the quantization parameter QPA of the upper neighboring block is supplied to the predictive quantization parameter deriving unit 114 (S103).
Then, it is determined whether or not there is a coded block adjacent to the left of the coding block (S104). When there is a block adjacent to the left (Yes in S104), the storage region stored in the coding information storage memory 113 is accessed from the reference position information of the upper left of the coding block, and a quantization parameter QPL of the left neighboring block is supplied to the predictive quantization parameter deriving unit 114 (S105). When there is no left neighboring block (No in S104), the quantization parameter QPL of the left neighboring block is set to 0 (S106).
Then, it is determined whether or not both the quantization parameters of the left and upper neighboring blocks are positive (S107). When both the quantization parameters of the left and upper neighboring blocks are positive (Yes in S107), both the left and upper neighboring blocks are present. Accordingly, the average value of the quantization parameters of the left and upper neighboring blocks is set as a predictive quantization parameter (S111). On the other hand, when neither of the quantization parameters of the left and upper neighboring blocks is positive (No in S107), that is, when the quantization parameter of at least one of the left and upper neighboring blocks is 0, at least one of the left and upper neighboring blocks is not present. In this case, the process proceeds to S108.
Then, it is determined whether or not both the quantization parameters of the left and upper neighboring blocks are 0 (S108). That is, when both the quantization parameters of the left and upper neighboring blocks are 0, neither of the left and upper neighboring blocks is present. Accordingly, it is not possible to refer to the quantization parameters of the left and upper neighboring blocks as predictive quantization parameters. Therefore, a quantization parameter (prevQP) of a block coded before or immediately before a coding block to be coded, is set as a predictive quantization parameter. In addition, when the block at the upper left end of a picture is a coding block, left and upper neighboring blocks and a block coded before or immediately before the coding block to be coded are not present. Accordingly, the quantization parameter of a picture or a slice is set as a predictive quantization parameter (S109). When either the left neighboring block or the upper neighboring block is present, one of the quantization parameters that is positive is set as a predictive quantization parameter (S110). The predictive quantization parameter calculated in this manner is supplied to the differential quantization parameter generation unit 111.
In addition, the predictive quantization parameter deriving unit 114 can also determine the predictive quantization parameter from the quantization parameters of the left neighboring block, the upper neighboring block, and the upper left neighboring block around the coding block shown in
Then, it is determined whether or not the quantization parameter QPL of the left neighboring block matches the quantization parameter QPAL of the upper left neighboring block (S212). When QPL and QPAL match each other, assuming that the weighting factor of the quantization parameter of the upper neighboring block is FA and the weighting factor of the quantization parameter of the left neighboring block is FL, a weighting for the quantization parameter of the upper neighboring block is set to be large so that FA>FL is satisfied (S213). For example, FA is set to 3, and FL is set to 1. In this case, since the arrangement of the quantization parameter shown in
Here, the denominator of the above expression is FA+FL, and 2 of the numerator is a value of (FA+FL)/2 added for rounding off. The predictive quantization parameter derived in this manner is supplied to the differential quantization parameter generation unit 111.
Instead of the determination regarding whether or not QPL and QPAL are the same in S212 and the determination regarding whether or not QPA and QPAL are the same in S214 that are shown in
In a coding block and neighboring coded blocks around the coding block, ΔL indicates the absolute value of the difference between the quantization parameter of the left neighboring block and the quantization parameter of the upper left neighboring block, and ΔA indicates the absolute value of the difference between the quantization parameter of the upper neighboring block and the quantization parameter of the upper left neighboring block. ΔL and ΔA are expressed as the following expressions.
ΔL=|QPL−QPAL| [Expression 8]
ΔA=|QPA−QPAL| [Expression 9]
When ΔA is larger than ΔL, the difference between QPA and QPAL is large. In this case, it is estimated that the smoothness or complexity of pictures between the upper neighboring block and the upper left neighboring block is different from that between the left neighboring block and the upper left neighboring block (change is large). Accordingly, in the coding block and the neighboring coded blocks around the coding block, it is thought that a quantization parameter difference occurs between two left blocks (a left neighboring block and an upper left neighboring block) and two right blocks (a coding block and an upper neighboring block). For this reason, it is determined that the quantization parameter of the coding block is closer to the quantization parameter of the upper neighboring block than to the quantization parameter of the left neighboring block.
In the case of a decoding process, equivalent processing is realized by changing the reference numeral of the predictive quantization parameter deriving unit from 114 to 205 and the reference numeral of the coding information storage memory from 113 to 204 and changing the output destination of the predictive quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203.
The operations of the predictive quantization parameter deriving units 114 and 205 in a second embodiment will be described. Here, a coding process will be described. In the case of a decoding process, however, equivalent processing is realized by changing coding to decoding, changing the reference numeral of the predictive quantization parameter deriving unit from 114 to 205 and the reference numeral of the coding information storage memory from 113 to 204, and changing the output destination of the predictive quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203. In the second embodiment, quantization parameters of left and upper coded blocks adjacent to the coding block to be coded are used for prediction, as in the first embodiment. On the other hand, the difference from the first embodiment is that, when the coding block is adjacent to the left tree block, using the quantization parameter of a coded block in the left tree block for prediction is prohibited, in the same manner as when the coding block is adjacent to the upper tree block. The reason is as follows. The calculation of the quantization parameter of the coding block is performed based on the coding sequence of the coding control. Accordingly, coding turns between tree blocks become away from each other compared with coding turns within a tree block. In this case, even if coding blocks are adjacent to each other between the tree blocks, the quantization parameters of coding blocks calculated by the code amount control do not necessarily become close values. Accordingly, they may not be suitable as predictive quantization parameters. Therefore, in the second embodiment, when a coding block to be coded or decoded is adjacent to the left or upper tree block, the quantization parameter of a coded block in the left or upper tree block is not used for prediction, and is used after being replaced with the quantization parameter of a block coded before or immediately before the coding block to be coded in coding sequence.
In
First, position information of a coding block to be coded is derived (S300). For the position information of the coding block, the upper left position of a tree block including the coding block is calculated with the upper left of the screen as a base point, and the position of the coding block is calculated from the upper left position of the tree block. Then, it is determined whether or not the coding block is adjacent to the upper tree block (S301). When the coding block is adjacent to the upper tree block (Yes in S301), that is, when the coding block is located at the upper end of the tree block, the upper neighboring block is included in the upper tree block. Accordingly, since the upper neighboring block is beyond the tree block boundary, the upper neighboring block is not used for quantization parameter prediction, and the quantization parameter prevQP of a coding block coded before or immediately before the coding block to be coded is set as QPA (S302).
On the other hand, when the coding block is not adjacent to the upper tree block (No in S301), that is, when the upper neighboring block is located in the same tree block as the coding block, the storage region stored in the coding information storage memory 113 is accessed from the reference position information of the upper left of the coding block, and the quantization parameter QPA of the upper neighboring block is supplied to the predictive quantization parameter deriving unit 114 (S303).
Then, it is determined whether or not the coding block is adjacent to the left tree block (S304). When the coding block is adjacent to the left tree block (Yes in S304), that is, when the coding block is located at the left end of the tree block, the left neighboring block is included in the left tree block. Accordingly, since the left neighboring block is beyond the tree block boundary, the left neighboring block is not used for quantization parameter prediction, and the quantization parameter prevQP of a coding block coded before or immediately before the coding block to be coded is set as QPL (S305).
On the other hand, when the coding block is not adjacent to the left tree block (No in S304), that is, when the left neighboring block is located in the same tree block as the coding block, the storage region stored in the coding information storage memory 113 is accessed from the reference position information of the upper left of the coding block, and the quantization parameter QPL of the left neighboring block is supplied to the predictive quantization parameter deriving unit 114 (S306). Finally, the average value of the quantization parameters of the left and upper neighboring blocks is set as a predictive quantization parameter (S307). The predictive quantization parameter calculated in this manner is supplied to the differential quantization parameter generation unit 111.
In the second embodiment, when the left and upper neighboring blocks are beyond the tree block boundary, each quantization parameter serves as a quantization parameter of a coding block coded before or immediately before the coding block to be coded. Therefore, since there is necessarily a non-zero value, it is possible to reduce the amount of processing for determining the value of the quantization parameter more than in the first embodiment.
The operations of the predictive quantization parameter deriving units 114 and 205 in a third embodiment will be described. Here, a coding process will be described. In the case of a decoding process, however, equivalent processing is realized by changing coding to decoding, changing the reference numeral of the predictive quantization parameter deriving unit from 114 to 205 and the reference numeral of the coding information storage memory from 113 to 204, and changing the output destination of the predictive quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203. The difference from the first embodiment is that, when a coding block to be coded or decoded is adjacent to the left tree block, using the quantization parameter of a coded block in the left tree block for prediction is prohibited, in the same manner as when the coding block is adjacent to the upper tree block. That is, using the quantization parameter of a coded block beyond the tree block boundary for prediction is limited to only when in a tree block, a coding block to be first coded in the coding sequence uses the quantization parameters of blocks coded before or immediately before a coding block to be coded.
In
Since BLK0 located at the upper end of the tree block in
After determining whether or not the coding block and the upper tree block are adjacent to each other, it is determined whether or not the coding block is adjacent to the left tree block (S404). When the coding block is adjacent to the left tree block (Yes in S404), that is, when the coding block is located at the left end of the tree block, the left neighboring block is included in the left tree block. Accordingly, since the left neighboring block is beyond the tree block boundary, the left neighboring block is not used for quantization parameter prediction. Here, noting that the quantization parameter always has a positive value, the quantization parameter QPL of the left neighboring block is set to 0 when the left neighboring block is not used (S405). On the other hand, when the coding block is not adjacent to the left tree block (No in S404), that is, when the left neighboring block is located in the same tree block as the coding block, the storage region stored in the coding information storage memory 113 is accessed from the reference position information of the upper left of the coding block, and the quantization parameter QPL of the left neighboring block is supplied to the predictive quantization parameter deriving unit 114 (S406). A predictive quantization parameter is derived from the quantization parameters of the left and upper neighboring blocks derived in this manner, and the predictive quantization parameter is supplied to the differential quantization parameter generation unit 111.
The operations of the predictive quantization parameter deriving units 114 and 205 in a fourth embodiment will be described. Here, a coding process will be described. In the case of a decoding process, however, equivalent processing is realized by changing coding to decoding, changing the reference numeral of the predictive quantization parameter deriving unit from 114 to 205 and the reference numeral of the coding information storage memory from 113 to 204, and changing the output destination of the predictive quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203. In the fourth embodiment, when a coding block to be coded or decoded is adjacent to the left or upper tree block, using the quantization parameter of a coded block in the left or upper tree block for prediction is prohibited. In principle, the quantization parameter of the coded block adjacent to the left is used for prediction. When a coding block adjacent to the left is not present or is present at a position beyond the tree block boundary, the quantization parameter of a block coded before or immediately before the coding block to be coded is used for prediction.
In
Since BLK0 located at the upper end of the tree block in
In the fourth embodiment, the quantization parameter of the left neighboring coded block of the coding block is used for prediction in principle. Therefore, since the determination process is simplified compared with the previous embodiments, it is possible to reduce the circuit size.
The operations of the predictive quantization parameter deriving units 114 and 205 in a fifth embodiment will be described. Here, a coding process will be described. In the case of a decoding process, however, equivalent processing is realized by changing coding to decoding, changing the reference numeral of the predictive quantization parameter deriving unit from 114 to 205 and the reference numeral of the coding information storage memory from 113 to 204, and changing the output destination of the predictive quantization parameter from the differential quantization parameter generation unit 111 to the quantization parameter generation unit 203. The fifth embodiment is a combination of the first and second embodiments. When a coding block to be coded or decoded is adjacent to the left tree block, using the quantization parameter of the coded block of the tree block adjacent to the left for prediction is allowed. When the coding block is adjacent to the upper tree block, using the quantization parameter of the coded block in the upper tree block for prediction is prohibited, and the quantization parameter of the block coded before or immediately before the coding block to be coded is used for prediction instead of the quantization parameter of the coded block in the upper tree block.
In
BLK0 and BLK1 that are located at the upper end of the tree block in
The detailed operation of the predictive quantization parameter deriving unit 114 in the fifth embodiment will be described.
First, position information of a coding block to be coded is derived (S600). For the position information of the coding block, the upper left position of a tree block including the coding block is calculated with the upper left of the screen as a base point, and the position of the coding block is calculated from the upper left position of the tree block. Then, it is determined whether or not the coding block is adjacent to the upper tree block (S601). When the coding block is adjacent to the upper tree block (Yes in S601), that is, when the coding block is located at the upper end of the tree block, the upper neighboring block is included in the upper tree block. Accordingly, since the upper neighboring block is beyond the tree block boundary, the upper neighboring block is not used for quantization parameter prediction, and the quantization parameter prevQP of the coding block coded before or immediately before the coding block to be coded is set as QPA (S602).
On the other hand, when the coding block is not adjacent to the upper tree block (No in S601), that is, when the upper neighboring block is located in the same tree block as the coding block, the storage region stored in the coding information storage memory 113 is accessed from the reference position information of the upper left of the coding block, and the quantization parameter QPA of the upper neighboring block is supplied to the predictive quantization parameter deriving unit 114 (S603).
Then, it is determined whether or not there is a coded block adjacent to the left of the coding block (S604). When there is a block adjacent to the left (Yes in S604), the storage region stored in the coding information storage memory 113 is accessed from the reference position information of the upper left of the coding block, and a quantization parameter QPL of the left neighboring block is supplied to the predictive quantization parameter deriving unit 114 (S605). When there is no left neighboring block (No in S604), the quantization parameter QPL of the left neighboring block is set to 0 (S606).
Then, it is determined whether or not the quantization parameter of the left neighboring block is positive (S607). When the quantization parameter of the left neighboring block is positive (Yes in S607), the left neighboring block is present. Accordingly, the average value of the quantization parameters of the left and upper neighboring blocks is set as a predictive quantization parameter (S608). On the other hand, when the quantization parameter of the left neighboring block is not positive (No in S607), that is, when the quantization parameter of the left neighboring block is 0, the left neighboring block is not present. In this case, QPA is set as a predictive quantization parameter (S609). The predictive quantization parameter calculated in this manner is supplied to the differential quantization parameter generation unit 111.
According to the moving picture coding device of the embodiment, a quantization parameter coded for each block to be coded is derived by predicting an optimal predictive quantization parameter using the coding information and the quantization parameters of the neighboring coded blocks, and the difference between the quantization parameter and the predictive quantization parameter is taken to perform coding. As a result, since the code amount of the quantization parameter is reduced without changing the picture quality, it is possible to improve the coding efficiency.
In addition, since mounting as a common function for quantization parameter prediction is possible on the coding and decoding sides, it is possible to reduce the circuit size. This is because a neighboring coded block becomes a block, which is locally decoded for the prediction of the next coding block, on the coding side, and accordingly, the determination of quantization parameter prediction is realized so that inconsistency on the coding side and the decoding side is not caused.
In the above explanation, quantization parameter prediction has been performed with the coding block as a unit. However, if the number of coding blocks having a small block size is increased due to an increase in the number of partitions in a tree block, the assigned code amount per coding block in the code amount control becomes too small. In this case, the quantization parameter may not be calculated appropriately. In addition, the memory amount of the coding information storage memories 113 and 204 of the moving picture coding device 100 and the moving picture decoding device 200, in which coding information, such as the quantization parameter, is stored at the time of coding and decoding, is increased. Therefore, a block called a quantization group may be newly set as a unit for coding and transmission of the quantization parameter, and quantization parameter prediction may be performed in units of this block.
The quantization group is a block determined according to the size of a tree block, and the size is expressed as a value obtained by multiplying the length of the side of a block of the tree block by ½n times (n is an integer of 0 or more). That is, a value when the length of the side of a block of the tree block is shifted to the right by n bits is the length of the side of the quantization group. Since this value is determined by the block size as a tree block structure, the affinity with a tree block is high. In addition, since a tree block is partitioned into equal sizes, management and reading of quantization parameters stored in the coding information storage memories 113 and 204 can be simplified.
When the size of a coding block to be coded is larger than the block size of the quantization group (32×32 blocks), for example, a coding block expressed as a stippled rectangle in
When the size of the coding block to be coded is the same as the block size of the quantization group (16×16 blocks), quantization parameter prediction is performed in the same manner as in the case of the quantization parameter prediction in units of a coding block described above.
When the size of the coding block to be coded is smaller than the block size of the quantization group (8×8 blocks), for example, in the case of a coding block expressed as a white rectangle in
As described above, quantization parameter prediction in units of a quantization group can be performed in the same manner as the quantization parameter prediction in units of a coding block described above.
In addition, the block size may be directly described in the header information of the bitstream, or the bit shift amount indicating whether or not to apply ½n times (n is an integer of 0 or more) the tree block size may be described as the block size of the quantization group. For example, in the header information of a picture, a flag cu_qp_delta_enable_flag indicating whether or not to perform quantization parameter prediction in units of a picture, describe the differential quantization parameter in a bitstream, and transmit the bitstream is defined, and a parameter diff_cu_qp_delta_depth that determines the size of the quantization group is described in the bitstream only when the flag cu_qp_delta_enable_flag is valid (set to “1”). When the size of a tree block is expressed as 2n, the size of the quantization group is expressed as the exponentiation of 2 with a value obtained by subtracting diff_cu_qp_delta_depth from the exponent n as the exponent. In addition, the size of the quantization group may be determined implicitly in coding and decoding, instead of describing the size of the quantization group in the bitstream in particular.
The bit stream of moving pictures output from the moving picture coding device of the embodiment described above has a specific data format so that decoding according to the coding method used in the embodiment is possible, and the moving picture decoding device corresponding to the moving picture coding device can decode the bitstream of the specific data format.
When a wired or wireless network is used to exchange a bitstream between the moving picture coding device and the moving picture decoding device, the bitstream may be transmitted after being converted into a data format suitable for the transmission mode of communication channel. In this case, a moving picture transmission device, which converts the bitstream output from the moving picture coding device into coding data of the data format suitable for the transmission mode of communication channel and transmits the converted bitstream through a network, and a moving picture receiving device, which receives the coding data through the network, restores the coding data to the bitstream, and supplied the restored bitstream to the moving picture decoding device, are provided.
The moving picture transmission device includes a memory that buffers a bitstream output from the moving picture coding device, a packetizing unit that packetizes the bitstream, and a transmission unit that transmits the packetized coding data through a network. The moving picture receiving device includes a receiving unit that receives the packetized coded data through a network, a memory that buffers the received coding data, and a packetizing unit that packetizes the coding data to generate a bitstream and supplies the bitstream to the moving picture decoding device.
The above processing related to coding and decoding can be realized as a transmission device, a storage device, and a receiving device using hardware, and can also be realized by firmware stored in a ROM (read only memory), a flash memory, or the like or by software of a computer or the like. The firmware program and the software program can be provided in a state where the programs are recorded on a recording medium that can be read by a computer or the like, or can be provided from a server through a wired or wireless network, or can be provided as data broadcasting, such as ground-based broadcasting or digital satellite broadcasting.
Up to now, the present invention has been described based on the embodiments. The embodiments are illustrative, and it will be understood by those skilled in the art that various modifications of the combination of the respective constituent elements or the respective processes can be made and such modifications still fall within the technical scope of the present invention.
a quantization parameter calculation unit configured to calculate a quantization parameter of the second block;
a predictive quantization parameter deriving unit configured to derive a predictive quantization parameter of the second block using quantization parameters of a third block adjacent to the left of the second block and a fourth block adjacent to the top of the second block;
a differential quantization parameter generation unit configured to generate a differential quantization parameter of the second block from a difference between the quantization parameter of the second block and the predictive quantization parameter of the second block; and
a coding unit configured to code the differential quantization parameter of the second block, wherein
the predictive quantization parameter deriving unit sets the quantization parameter of the third block as a first quantization parameter when the third block is at a position not beyond a boundary of the first block, sets a quantization parameter of a fifth block coded before the second block as the first quantization parameter when the third block is at a position beyond the boundary of the first block, sets the quantization parameter of the fourth block as a second quantization parameter when the fourth block is at a position not beyond the boundary of the first block, sets the quantization parameter of the fifth block as the second quantization parameter when the fourth block is at a position beyond the boundary of the first block, and derives the predictive quantization parameter of the second block using the first and second quantization parameters.
the predictive quantization parameter deriving unit sets an average value of the first and second quantization parameters as the predictive quantization parameter.
size information of the second block is described in a bitstream.
a quantization parameter calculation unit configured to calculate a quantization parameter of the coding block;
a predictive quantization parameter deriving unit configured to derive a predictive quantization parameter of the coding block using quantization parameters of coded neighboring blocks adjacent to the coding block;
a differential quantization parameter generation unit configured to generate a differential quantization parameter of the coding block from a difference between the quantization parameter of the coding block and the predictive quantization parameter of the coding block; and
a coding unit configured to code the differential quantization parameter of the coding block, wherein
when a neighboring block adjacent to the coding block in a predetermined direction of the coding block is at a position beyond a boundary of the block having the predetermined size, the predictive quantization parameter deriving unit derives the predictive quantization parameter of the coding block using quantization parameters of other coded blocks that are different from the neighboring block adjacent to the coding block in the predetermined direction.
a quantization parameter calculation step of calculating a quantization parameter of the second block;
a predictive quantization parameter deriving step of deriving a predictive quantization parameter of the second block using quantization parameters of a third block adjacent to the left of the second block and a fourth block adjacent to the top of the second block;
a differential quantization parameter generation step of generating a differential quantization parameter of the second block from a difference between the quantization parameter of the second block and the predictive quantization parameter of the second block; and
a coding step of coding the differential quantization parameter of the second block, wherein
in the predictive quantization parameter deriving step, the quantization parameter of the third block is set as a first quantization parameter when the third block is at a position not beyond a boundary of the first block, a quantization parameter of a fifth block coded before the second block is set as the first quantization parameter when the third block is at a position beyond the boundary of the first block, the quantization parameter of the fourth block is set as a second quantization parameter when the fourth block is at a position not beyond the boundary of the first block, the quantization parameter of the fifth block is set as the second quantization parameter when the fourth block is at a position beyond the boundary of the first block, and the predictive quantization parameter of the second block is derived using the first and second quantization parameters.
a quantization parameter calculation step of calculating a quantization parameter of the second block;
a predictive quantization parameter deriving step of deriving a predictive quantization parameter of the second block using quantization parameters of a third block adjacent to the left of the second block and a fourth block adjacent to the top of the second block;
a differential quantization parameter generation step of generating a differential quantization parameter of the second block from a difference between the quantization parameter of the second block and the predictive quantization parameter of the second block; and
a coding step of coding the differential quantization parameter of the second block, wherein
in the predictive quantization parameter deriving step, the quantization parameter of the third block is set as a first quantization parameter when the third block is at a position not beyond a boundary of the first block, a quantization parameter of a fifth block coded before the second block is set as the first quantization parameter when the third block is at a position beyond the boundary of the first block, the quantization parameter of the fourth block is set as a second quantization parameter when the fourth block is at a position not beyond the boundary of the first block, the quantization parameter of the fifth block is set as the second quantization parameter when the fourth block is at a position beyond the boundary of the first block, and the predictive quantization parameter of the second block is derived using the first and second quantization parameters.
a decoding unit configured to extract a differential quantization parameter of the second block by decoding the bitstream;
a predictive quantization parameter deriving unit configured to derive a predictive quantization parameter of the second block using quantization parameters of a third block adjacent to the left of the second block and a fourth block adjacent to the top of the second block; and
a quantization parameter generation unit configured to generate a quantization parameter of the second block by adding the differential quantization parameter of the second block and the predictive quantization parameter of the second block, wherein
the predictive quantization parameter deriving unit sets the quantization parameter of the third block as a first quantization parameter when the third block is at a position not beyond a boundary of the first block, sets a quantization parameter of a fifth block decoded before the second block as the first quantization parameter when the third block is at a position beyond the boundary of the first block, sets the quantization parameter of the fourth block as a second quantization parameter when the fourth block is at a position not beyond the boundary of the first block, sets the quantization parameter of the fifth block as the second quantization parameter when the fourth block is at a position beyond the boundary of the first block, and derives the predictive quantization parameter of the second block using the first and second quantization parameters.
the predictive quantization parameter deriving unit sets an average value of the first and second quantization parameters as the predictive quantization parameter.
size information of the second block is extracted from a bitstream and is set as a size of the second block.
a decoding unit configured to extract a differential quantization parameter of a decoding block by decoding the bitstream in units of a decoding block;
a predictive quantization parameter deriving unit configured to derive a predictive quantization parameter of the decoding block according to a prediction mode of the decoding block using quantization parameters of decoded neighboring blocks adjacent to the decoding block; and
a quantization parameter generation unit configured to generate a quantization parameter of the decoding block by adding the differential quantization parameter of the decoding block and the predictive quantization parameter of the decoding block, wherein
when a neighboring block adjacent to the decoding block in a predetermined direction of the decoding block is at a position beyond a boundary of the block having the predetermined size, the predictive quantization parameter deriving unit derives the predictive quantization parameter of the decoding block using quantization parameters of other decoded blocks that are different from the neighboring block adjacent to the decoding block in the predetermined direction.
a decoding step of extracting a differential quantization parameter of the second block by decoding the bitstream;
a predictive quantization parameter deriving step of deriving a predictive quantization parameter of the second block using quantization parameters of a third block adjacent to the left of the second block and a fourth block adjacent to the top of the second block; and
a quantization parameter generation step of generating a quantization parameter of the second block by adding the differential quantization parameter of the second block and the predictive quantization parameter of the second block, wherein
in the predictive quantization parameter deriving step, the quantization parameter of the third block is set as a first quantization parameter when the third block is at a position not beyond a boundary of the first block, a quantization parameter of a fifth block decoded before the second block is set as the first quantization parameter when the third block is at a position beyond the boundary of the first block, the quantization parameter of the fourth block is set as a second quantization parameter when the fourth block is at a position not beyond the boundary of the first block, the quantization parameter of the fifth block is set as the second quantization parameter when the fourth block is at a position beyond the boundary of the first block, and the predictive quantization parameter of the second block is derived using the first and second quantization parameters.
a decoding step of extracting a differential quantization parameter of the second block by decoding the bitstream;
a predictive quantization parameter deriving step of deriving a predictive quantization parameter of the second block using quantization parameters of a third block adjacent to the left of the second block and a fourth block adjacent to the top of the second block; and
a quantization parameter generation step of generating a quantization parameter of the second block by adding the differential quantization parameter of the second block and the predictive quantization parameter of the second block, wherein
in the predictive quantization parameter deriving step, the quantization parameter of the third block is set as a first quantization parameter when the third block is at a position not beyond a boundary of the first block, a quantization parameter of a fifth block decoded before the second block is set as the first quantization parameter when the third block is at a position beyond the boundary of the first block, the quantization parameter of the fourth block is set as a second quantization parameter when the fourth block is at a position not beyond the boundary of the first block, the quantization parameter of the fifth block is set as the second quantization parameter when the fourth block is at a position beyond the boundary of the first block, and the predictive quantization parameter of the second block is derived using the first and second quantization parameters.
Number | Date | Country | Kind |
---|---|---|---|
2011-272470 | Dec 2011 | JP | national |
2011-272471 | Dec 2011 | JP | national |
2012-271418 | Dec 2012 | JP | national |
2012-271419 | Dec 2012 | JP | national |
This application is a Divisional of U.S. patent application Ser. No. 14/295,860, filed Jun. 4, 2014, which is a Continuation of PCT International Application No. PCT/JP2012/007964, filed Dec. 13, 2012, which claims the benefit of Japanese Patent Application Nos. 2011-272470 and 2011-272471, filed Dec. 13, 2011, and 2012-271418 and 2012-271419, filed Dec. 12, 2012.
Number | Date | Country | |
---|---|---|---|
Parent | 14295860 | Jun 2014 | US |
Child | 15177649 | US |
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP2012/007964 | Dec 2012 | US |
Child | 14295860 | US |