[go: up one dir, main page]

HK1261441B - Image decoding device - Google Patents

Image decoding device Download PDF

Info

Publication number
HK1261441B
HK1261441B HK19121068.1A HK19121068A HK1261441B HK 1261441 B HK1261441 B HK 1261441B HK 19121068 A HK19121068 A HK 19121068A HK 1261441 B HK1261441 B HK 1261441B
Authority
HK
Hong Kong
Prior art keywords
prediction
unit
parameter
prediction parameter
sub
Prior art date
Application number
HK19121068.1A
Other languages
Chinese (zh)
Other versions
HK1261441A1 (en
Inventor
山本智幸
Original Assignee
威勒斯媒体国际有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 威勒斯媒体国际有限公司 filed Critical 威勒斯媒体国际有限公司
Publication of HK1261441A1 publication Critical patent/HK1261441A1/en
Publication of HK1261441B publication Critical patent/HK1261441B/en

Links

Description

Image decoding device
The present application is a divisional application of an invention patent application having an application date of 2010, 12/27, an application number of 201080064667.8, entitled "image encoding apparatus and image decoding apparatus".
Technical Field
The present invention relates to an image encoding device that encodes an image to generate encoded data. The present invention also relates to an image decoding apparatus that decodes encoded data generated using such an image encoding apparatus.
Background
In order to efficiently transmit or record a moving image, a moving image encoding apparatus is used. Specific examples of the moving picture coding method include methods used in KTA software, which is a co-development codec in h.264/MPEG-4AVC (non-patent document 1) and VCEG (video coding experts group).
In such an encoding system, an image (picture) constituting a moving image is managed by a hierarchical structure including a slice obtained by dividing the image, a macroblock obtained by dividing the slice, and subblocks obtained by dividing the macroblock, and is usually encoded for each subblock.
In such an encoding system, in general, a predicted image is generated based on a local decoded image obtained by encoding and decoding an input image, and differential data between the predicted image and the input image is encoded. As a method of generating a predicted image, a method called inter prediction (inter prediction) or intra prediction (intra prediction) is known.
In the inter prediction, a prediction image in a prediction target frame is generated by applying motion compensation using a motion vector to a reference image in a reference frame obtained by decoding the entire frame. In the inter prediction, a prediction image can be generated by referring to a plurality of reference images, and in this case, a prediction image is generated using a value obtained by multiplying a pixel value of each reference image by a weight coefficient.
On the other hand, in intra prediction, predicted images in the same frame are sequentially generated based on a locally decoded image in the frame. Specifically, in intra prediction, in general, for each prediction unit (for example, a subblock) constituting a unit region (for example, a macroblock), any one prediction direction is selected from among prediction directions included in a predetermined prediction direction (prediction mode) group, and a pixel value of a reference pixel in a local decoded image is extrapolated in the selected prediction direction to generate a predicted pixel value in the prediction target region.
In this way, a predicted image can be generally generated based on a prediction parameter such as a motion vector, a weight coefficient, or a prediction mode.
Prior art documents
Non-patent document
Non-patent document 1: ITU-T Recommendation H.264(11/07) (published 11 months 2007)
Problems to be solved by the invention
However, in order to appropriately generate a predicted image in a moving image decoding apparatus, it is necessary to encode a prediction parameter used in the moving image encoding apparatus and transmit the encoded data to the moving image decoding apparatus, and therefore there is a problem that the code amount of the encoded data increases due to the prediction parameter.
For example, in the conventional intra prediction described above, it is necessary to encode not only the difference data but also prediction mode information indicating which prediction mode is selected for each prediction target region, and therefore there is a problem that the code amount of encoded data increases due to the prediction mode information.
Disclosure of Invention
The present invention has been made in view of the above-described problems, and an object of the present invention is to realize an image encoding device capable of reducing the amount of code for specifying a prediction parameter without sacrificing encoding efficiency, and an image decoding device capable of decoding encoded data generated by such an image encoding device.
Means for solving the problems
In order to solve the above problem, an image encoding device according to the present invention is an image encoding device for encoding a difference between an input image and a predicted image, the image encoding device including: a classifying unit that divides the predicted image into a plurality of unit regions and classifies a plurality of prediction units included in each unit region into a 1 st group or a 2 nd group; 1 st selecting means for selecting a prediction parameter for specifying a method of generating a predicted image in each prediction unit belonging to the 1 st group from a basic set including a predetermined prediction parameter; a 2 nd selecting unit configured to select a prediction parameter for specifying a method of generating a predicted image in each prediction unit belonging to the 2 nd group from a reduced set including at least a part of the prediction parameters selected by the 1 st selecting unit and including prediction parameters equal to or less than the number of prediction parameters included in the basic set; and prediction parameter encoding means for encoding which prediction parameters have been selected by the 1 st selecting means for each prediction unit belonging to the 1 st group, and which prediction parameters have been selected by the 2 nd selecting means for each prediction unit belonging to the 2 nd group.
According to the image encoding device configured as described above, the prediction parameters for specifying the method for generating the predicted image in each prediction unit belonging to the 2 nd group are selected from the reduced set including at least some of the prediction parameters selected by the 1 st selection means for each prediction unit belonging to the 1 st group in the same unit area as the 2 nd group and including the prediction parameters equal to or less than the number of prediction parameters included in the basic set, and the 2 nd selection means selects which of the prediction parameters are selected for encoding.
Here, since there is generally a correlation between the prediction parameter for each prediction unit and the prediction parameter for the prediction unit located in the vicinity of the prediction unit, the prediction parameter selected for each prediction unit belonging to the 1 st group is highly likely to be an appropriate prediction parameter for each prediction unit belonging to the 2 nd group. That is, for each prediction unit belonging to the group 2, the prediction parameter selected from the reduced set is highly likely to be an appropriate prediction parameter. Therefore, according to the above configuration, the prediction parameter can be encoded without reducing the encoding efficiency.
In the above configuration, the reduced set is a set including at least a part of the prediction parameters selected by the 1 st selection means and is a set of prediction parameters equal to or less than the number of prediction parameters included in the basic set, and therefore the amount of code of information indicating which prediction parameters are selected for each prediction unit belonging to the 2 nd group can be reduced.
Therefore, according to the above configuration, the amount of code for specifying the prediction parameters can be reduced without sacrificing the coding efficiency.
An image encoding device according to the present invention is an image encoding device for encoding a difference between an input image and a predicted image, the image encoding device including: a selection unit that selects a prediction parameter for specifying a generation method of a predicted image in each prediction unit from among a reduced set including at least a part of prediction parameters for specifying a generation method of a predicted image in a prediction unit that is located in the vicinity of the prediction unit and that has been encoded; and a prediction parameter encoding unit that encodes which prediction parameters have been selected by the selection unit for each prediction unit.
In general, there is a correlation between a prediction parameter for each prediction unit and a prediction parameter for a prediction unit located in the vicinity of the prediction unit. Therefore, in the generation of a prediction image in the prediction unit, the prediction parameter is most likely to be included in the reduced set. In addition, since the reduced set is composed of at least some of the prediction parameters for the prediction units located in the vicinity of the prediction unit, the number of prediction parameters included in the reduced set is smaller than the number of prediction parameters included in a parameter set composed of prediction parameters for prediction units other than the prediction unit.
Therefore, the image encoding device according to the present invention can generate encoded data with a small code amount without sacrificing encoding efficiency by adopting the above-described configuration.
An image decoding device according to the present invention is a decoding device for decoding encoded data obtained by encoding a difference between an original image and a predicted image together with selection information indicating which of a plurality of prediction parameters for specifying a method of generating the predicted image is selected for each prediction unit, the decoding device including: a classifying unit that classifies a plurality of prediction units included in each of a plurality of unit regions constituting a prediction image into a 1 st group or a 2 nd group; a 1 st selecting unit that selects prediction parameters for specifying a method of generating a predicted image in each prediction unit belonging to the 1 st group from a basic set consisting of predetermined prediction parameters, with reference to selection information for each prediction unit belonging to the 1 st group; and a 2 nd selecting unit configured to select, with reference to selection information for each prediction unit belonging to the 2 nd group, a prediction parameter for specifying a method for generating a predicted image in each prediction unit belonging to the 2 nd group from a reduced set including at least a part of the prediction parameters selected by the 1 st selecting unit and including prediction parameters equal to or less than the number of prediction parameters included in the basic set.
According to the image decoding device configured as described above, the prediction parameters for specifying the method of generating the predicted image in each prediction unit belonging to the 2 nd group can be selected from the reduced set including at least some of the prediction parameters selected by the 1 st selection means for each prediction unit belonging to the 1 st group in the same unit region as the 2 nd group and including the prediction parameters equal to or less than the number of prediction parameters included in the basic set.
Here, since there is generally a correlation between the prediction parameter for each prediction unit and the prediction parameter for the prediction unit located in the vicinity of the prediction unit, the prediction parameter selected for each prediction unit belonging to the 1 st group is highly likely to be an appropriate prediction parameter for each prediction unit belonging to the 2 nd group. Therefore, according to the above configuration, the prediction parameter can be decoded from the selection information having a smaller code amount without reducing the encoding efficiency.
An image decoding device according to the present invention is an image decoding device for decoding encoded data obtained by encoding a difference between an input image and a predicted image together with selection information indicating which of a plurality of prediction parameters for specifying a method for generating the predicted image is selected for each prediction unit, the image decoding device including: and a selecting unit that selects, with reference to the selection information, a prediction parameter for specifying a method for generating a predicted image in each prediction unit from among a reduced set including at least a part of prediction parameters for specifying a method for generating a predicted image in a prediction unit in which decoding is completed and which is located in the vicinity of the prediction unit.
In general, there is a correlation between a prediction parameter for each prediction unit and a prediction parameter for a prediction unit located in the vicinity of the prediction unit. Therefore, the reduced set is highly likely to include prediction parameters that are optimal for generating a prediction image in the prediction unit. In addition, since the reduced set is configured by at least a part of the prediction parameters for the prediction units located in the vicinity of the prediction unit, the number of prediction parameters included in the reduced set is smaller than the number of prediction parameters included in the parameter set configured by the prediction parameters for the prediction units other than the prediction unit.
Therefore, the image encoding device having the configuration corresponding to the above configuration can generate encoded data with a small code amount without sacrificing the encoding efficiency.
The image decoding apparatus having the above-described configuration can decode encoded data having a small code amount.
The data structure of encoded data according to the present invention is a data structure of encoded data obtained by encoding a difference between an input image and a predicted image together with selection information indicating which of a plurality of prediction parameters for specifying a method of generating a predicted image is selected for each prediction unit, and includes selection information to be referred to for selecting a prediction parameter for specifying a method of generating a predicted image in each prediction unit from a reduced set including at least a part of prediction parameters for specifying a method of generating a predicted image in a prediction unit that is located in the vicinity of the prediction unit and has been decoded, in an image decoding device that decodes the encoded data.
In general, there is a correlation between a prediction parameter for each prediction unit and a prediction parameter for a prediction unit located in the vicinity of the prediction unit. Therefore, the reduced set is highly likely to include prediction parameters optimal for generating a prediction image in the prediction unit. In addition, since the reduced set is configured by at least a part of the prediction parameters for the prediction units located in the vicinity of the prediction unit, the number of prediction parameters included in the reduced set is smaller than the number of prediction parameters included in the parameter set configured by the prediction parameters for the prediction units other than the prediction unit.
Therefore, the encoded data having the above-described configuration is encoded data in which the amount of code is reduced without sacrificing the encoding efficiency.
Effects of the invention
As described above, the image encoding device according to the present invention is an image encoding device that encodes a difference between an input image and a predicted image, and includes: a classification unit that divides the prediction image into a plurality of unit regions and classifies a plurality of prediction units included in each unit region into a 1 st group or a 2 nd group; 1 st selecting means for selecting a prediction parameter for specifying a method of generating a predicted image in each prediction unit belonging to the 1 st group from a basic set including a predetermined prediction parameter; a 2 nd selecting means for selecting a prediction parameter for specifying a method of generating a predicted image in each prediction unit belonging to the 2 nd group from a reduced set including at least a part of the prediction parameters selected by the 1 st selecting means and including prediction parameters equal to or less than the number of prediction parameters included in the basic set; and a prediction parameter encoding unit that encodes which prediction parameters the 1 st selecting unit has selected for each prediction unit belonging to the 1 st group and which prediction parameters the 2 nd selecting unit has selected for each prediction unit belonging to the 2 nd group.
According to the image encoding device configured as described above, the amount of code for specifying the prediction parameters can be reduced without sacrificing the encoding efficiency.
Drawings
Fig. 1 is a block diagram of a configuration of a moving image decoding device according to an embodiment.
Fig. 2 is a block diagram showing a configuration of an MB decoding unit provided in the moving picture decoding apparatus according to the embodiment.
Fig. 3 is a block diagram showing a configuration of a prediction parameter decoding unit provided in the moving image decoding device according to the embodiment.
Fig. 4 is a diagram for explaining an operation of a group determination unit provided in the prediction parameter decoding unit. (a) Each of 16 subblocks included in a macroblock is classified into either group 1 or group 2 based on the classification method a, and each of the subblocks is classified based on the classification method B.
Fig. 5 shows intra prediction modes used for intra prediction in the h.264/MPEG-4AVC standard, together with index numbers assigned to the respective prediction modes.
Fig. 6 is a diagram for explaining an operation of the reduced set deriving unit included in the prediction parameter decoding unit. (a) The flowchart is an example 1 of the generating operation of the reduced set in the reduced set deriving unit, (b) is an example 2 of the generating operation of the reduced set in the reduced set deriving unit, and (c) is an example 3 of the generating operation of the reduced set in the reduced set deriving unit.
Fig. 7 is a flowchart showing an example of a flow of decoding processing in the 2 nd prediction parameter decoding unit included in the prediction parameter decoding unit.
Fig. 8 is a diagram for explaining another configuration example of the prediction parameter decoding unit. (a) The flowchart shows the operation of generating a reduced set by the reduced set deriving unit, and (b) shows an example of a neighboring subblock region.
Fig. 9 is a diagram for explaining the process of generating a predicted image by the predicted image generating unit included in the MB decoding unit, and shows each pixel of a sub block to be predicted, which is 4 × 4 pixels, and pixels in the vicinity of the sub block to be predicted.
Fig. 10 is a block diagram showing the configuration of the moving image coding device according to the embodiment.
Fig. 11 is a block diagram showing a configuration of an MB encoding unit provided in the moving picture encoding device according to the embodiment.
Fig. 12 is a block diagram showing a configuration of a prediction parameter determination unit included in an MB encoding unit.
Fig. 13 is a diagram for explaining an operation of the prediction parameter determining unit included in the MB encoding unit. (a) An example of a prediction mode selected by the 1 st prediction parameter determining unit for each of the subblocks constituting the macroblock MB, which belongs to the 1 st group, is shown, (b) an example of a reduced set generated by the reduced set deriving unit when each of the prediction modes shown in (a) is provided as a prediction parameter, and (c) an example of a prediction mode selected by the 2 nd prediction parameter determining unit for each of the subblocks belonging to the 2 nd group, which belongs to the reduced set shown in (b), is shown.
Fig. 14 is a block diagram showing a configuration of a prediction parameter encoding unit included in the MB encoding unit.
Fig. 15 is a diagram showing a bit stream structure for each macroblock of encoded data to be referred to by the moving picture decoding device according to the embodiment, which is generated by the moving picture encoding device according to the embodiment.
Fig. 16 is a diagram showing another example of the basic parameter set. (a) An example of a parameter set in which importance is attached to the horizontal direction is shown, and (b) an example of a parameter set in which importance is attached to the vertical direction is shown.
Detailed Description
(moving Picture decoding apparatus)
The configuration of a moving image decoding device (image decoding device) 1 according to the embodiment will be described with reference to fig. 1 to 9. The moving picture decoding apparatus 1 is a moving picture encoding apparatus in which a technique adopted in the h.264/MPEG-4AVC standard is partially used.
In short, the moving image decoding apparatus 1 is an apparatus that decodes input encoded data #1 to generate and output a decoded image # 2.
The moving image decoding apparatus 1 divides a unit region on the image indicated by the encoded data #1 into a plurality of prediction target regions (prediction units), and generates a decoded image #2 using a prediction image generated for each of the prediction target regions.
Although the following description will be given by taking as an example a case where the unit area is a macroblock in the h.264/MPEG-4AVC standard and the prediction target area is a subblock within the macroblock, the present invention is not limited to this. For example, the unit area may be an area larger than a macroblock, or may be an area in which a plurality of macroblocks overlap.
Fig. 1 is a block diagram showing the configuration of a moving picture decoding apparatus 1. As shown in fig. 1, the moving picture decoding apparatus 1 includes: a variable-length code demultiplexing unit 11, a header information decoding unit 12, an MB setting unit 13, an MB decoding unit 14, and a frame memory 15.
The encoded data #1 input to the moving picture decoding apparatus 1 is input to the variable length code demultiplexing unit 11. The variable-length code demultiplexing unit 11 demultiplexes the input encoded data #1 to separate the encoded data #1 into header encoded data #11a, which is encoded data relating to header information, and MB encoded data #11b, which is encoded data relating to a macroblock (unit area), and outputs the header encoded data #11a to the header information decoding unit 12 and the MB encoded data #11b to the MB setting unit 13, respectively.
The header information decoding unit 12 decodes the header information #12 from the header encoded data #11 a. Here, the header information #12 is information including the size of the input image.
The MB setting unit 13 separates the MB encoded data #11b into encoded data #13 corresponding to each macroblock based on the inputted header information #12, and sequentially outputs the separated data to the MB decoding unit 14.
The MB decoding unit 14 sequentially decodes the input encoded data #13 corresponding to each macroblock, and generates and outputs a decoded image #2 corresponding to each macroblock. Further, decoded picture #2 is output to frame memory 15. The structure of the MB decoding unit 14 will be described later, and therefore, description thereof will be omitted.
The decoded picture #2 is recorded in the frame memory 15. In the frame memory 15, at the time point when a specific macroblock is decoded, decoded images corresponding to all macroblocks located before the macroblock in raster scan order are recorded.
At the point in time when the MB decoding unit 14 finishes the decoded image generation processing in units of macroblocks performed on all macroblocks in the image, the moving image decoding apparatus 1 completes the generation processing of the decoded image #2 corresponding to the input encoded data.
(MB decoding unit 14)
The MB decoding unit 14 will be specifically described below with reference to the drawings.
Fig. 2 is a block diagram showing the configuration of the MB decoding unit 14. As shown in fig. 2, the MB decoding unit 14 includes: a subblock dividing unit 141, a prediction residual decoding unit 142, a subblock decoded image generating unit 143, a prediction parameter decoding unit 144, a predicted image generating unit 145, and an MB decoded image generating unit 146.
The subblock dividing unit 141 starts at the time point when the encoded data #13 in macroblock units is input, and sequentially outputs subblock position information #141a indicating the position of each subblock (each prediction target region) constituting a macroblock (unit region) within the macroblock and subblock encoded data #141b, which is encoded data relating to the subblock indicated by the subblock position information #141a, in a predetermined order. Further, the method of dividing subblocks into macroblocks can be applied to a method used in a moving picture encoding apparatus that generates encoded data # 1.
The sub-block division unit 141 is preferably configured as follows: after the sub-block position information #141a and sub-block encoded data #141b relating to the sub-block belonging to group 1 described later are output, the sub-block position information #141a and sub-block encoded data #141b relating to the sub-block belonging to group 2 described later are output. For example, it is preferable to have the following configuration: the sub-blocks belonging to the 1 st group are scanned in a raster scan order, and next, the sub-blocks belonging to the 2 nd group are scanned in a raster scan order. The subblock dividing unit 141 may output the subblock position information #141a and the subblock encoded data #141b in the same order as used in the moving image encoding apparatus that generates the encoded data # 1.
The prediction residual decoding unit 142 applies variable-length code decoding to the input sub-block encoded data #141b to generate a transform coefficient for the sub-block indicating the input sub-block position information #141 a. The prediction residual decoding unit 142 applies an inverse transform to the generated transform coefficient by DCT (discrete cosine transform) of the same size as the size of the sub-block indicated by the sub-block position information #141a, and generates and outputs a decoded residual # 142.
The prediction parameter decoding unit 144 decodes and outputs the prediction parameter #144 for each sub-block based on the sub-block position information #141a and the sub-block encoded data #141 b.
Here, the prediction parameter refers to a parameter used for generating a predicted image. Examples of the prediction parameter include a prediction mode in intra prediction, a motion vector in motion compensation prediction, a weight coefficient in luminance compensation prediction, and the like.
In addition, prediction parameter #144 includes: prediction parameter #43 output from the 1 st prediction parameter decoding unit 43 described later, and prediction parameter #45 output from the 2 nd prediction parameter decoding unit 45 described later. The specific configuration and operation of the prediction parameter decoding unit 144 will be described later, and therefore, description thereof will be omitted.
The predicted image generator 145 generates and outputs a predicted image #145 corresponding to the target subblock to be predicted, based on the prediction parameter #144, the decoded image #2, and the decoded image #15 stored in the frame memory 15. A specific method of generating the predicted image #145 in the predicted image generator 145 will be described later, and therefore, description thereof will be omitted.
The sub-block decoded image generator 143 adds the predicted image #145 to the decoded residual #142, and generates and outputs a sub-block decoded image #143, which is a decoded image in sub-block units.
The MB decoded image generation unit 146 accumulates the subblock decoded images #143 in subblock units for each macroblock, and merges all the subblock decoded images #143 constituting the macroblock, thereby generating and outputting a decoded image #2 in macroblock units. The generated decoded image #2 is also supplied to the predicted image generator 145.
(prediction parameter decoding section 144)
Next, the configuration of the prediction parameter decoding unit 144 will be described with reference to fig. 3.
Fig. 3 is a block diagram showing the configuration of the prediction parameter decoding unit 144. As shown in fig. 3, the prediction parameter decoding unit 144 includes: a group determination unit 41, a switching unit 42, a 1 st prediction parameter decoding unit 43, a reduced set derivation unit 44, and a 2 nd prediction parameter decoding unit 45.
(group determination unit 41)
The group determination unit 41 determines to which of a plurality of groups defined in advance the subblock indicated by the subblock position information #141a belongs, and outputs group information #41 indicating the determination result to the switching unit 42.
Here, the predetermined groups are groups obtained by classifying sub-blocks in a moving picture encoding device that generates encoded data #1, for example. That is, in the moving picture encoding device that generates the encoded data #1, when each of the subblocks SB1 to SBNs (Ns is the total number of subblocks belonging to a macroblock MB) belonging to a certain macroblock MB is classified into any one of the groups GP1 to GPM (M is the total number of groups into which subblocks belonging to the macroblock MB are classified) based on a predetermined classification method, and the subblock SBn is classified into the group GPM, the group determination unit determines that the subblock SBn indicated by the subblock position information #141a belongs to the group GPM based on the predetermined classification method, for example.
Hereinafter, a case where each sub-block is classified into 2 groups will be described with reference to (a) to (f) of fig. 4 as an example.
Fig. 4(a) to (B) are diagrams showing that 16 sub-blocks included in a macroblock MB are classified into either a group 1 or a group 2 based on a classification method a, fig. 4(C) to (d) are diagrams showing that the sub-blocks are classified based on a classification method B, and fig. 4(e) to (f) are diagrams showing that the sub-blocks are classified based on a classification method C.
Each of the subblocks included in the macroblock MB may be classified into the 1 st group or the 2 nd group so that the arrangement of the subblocks included in each group is in a flag shape as shown in fig. 4(a) to (b), may be classified so that the subblocks included in each group are adjacent only in the horizontal direction as shown in fig. 4(c) to (d), or may be classified so that the subblocks included in each group are adjacent only in the vertical direction as shown in fig. 4(e) to (f).
In general, the optimal classification method differs depending on the spatial correlation of the prediction parameters within the macroblock. The above-described classification method a is an effective classification method even in the case where spatial correlation exists in either of the vertical and horizontal directions. On the other hand, the classification method B and the classification method C described above are effective in the case where a diagonal edge exists in the macroblock.
In any classification method, as is clear from fig. 4(a) to (f), each subblock is classified into any one of the 1 st group and the 2 nd group according to the position within the macroblock MB.
The group determination unit 41 refers to the sub-block position information #141a, and determines to which of the 1 st group and the 2 nd group the sub-block indicated by the sub-block position information #141a belongs, based on the classification method used in the moving picture encoding device that generates the encoded data # 1.
For example, in a moving picture encoding device that generates encoded data #1, as shown in fig. 4(a) to (b), when the sub-block SB1 belonging to the macroblock MB is classified into the 2 nd group and the sub-block SB2 is classified into the 1 st group based on the classification method a, the group determination unit 41 determines that the sub-block SB2 belongs to the 1 st group and the sub-block SB1 belongs to the 2 nd group by referring to the sub-block position information #141a based on the classification method a. The same applies to other subblocks included in the macroblock MB.
In addition, when a different classification method is used for each macroblock in the moving picture coding apparatus that generates the coded data #1, it is preferable that the coded data #1 include a flag indicating which classification method is used for each macroblock. By referring to such a flag, even when the classification method differs for each macroblock, the group determination unit 41 can perform the determination based on the classification method used in the moving image coding apparatus.
In addition, although the number of subblocks included in a macroblock is set to 16 in the above description, the present invention is not limited thereto (the same applies hereinafter). The method of classifying the subblocks in the macroblock MB is not limited to the above example, and other classification methods may be used. For example, a classification method may be adopted in which the number of sub-blocks belonging to group 1 and the number of sub-blocks belonging to group 2 are different from each other (the same applies hereinafter).
(switching section 42)
Based on the group information #41, the switching unit 42 transfers the sub-block encoded data #141b, which is the encoded data relating to the sub-block indicated by the sub-block position information #141a, to any one of the 1 st predicted parameter decoding unit 43 and the 2 nd predicted parameter decoding unit 45.
Specifically, when the group determination unit 41 determines that the sub-block indicated by the sub-block position information #141a belongs to the 1 st group, the switching unit 42 transfers the sub-block encoded data #141b to the 1 st prediction parameter decoding unit 43, and when the group determination unit 41 determines that the sub-block indicated by the sub-block position information #141a belongs to the 2 nd group, the switching unit 42 transfers the sub-block encoded data #141b to the 2 nd prediction parameter decoding unit 45.
(1 st prediction parameter decoding unit 43)
The 1 st prediction parameter decoding unit 43 decodes the sub-block encoded data #141b described above, and thereby decodes and outputs the prediction parameter #43 used for prediction of the sub-block (prediction target sub-block) indicated by the sub-block position information #141a in the moving picture encoding device that generates the encoded data # 1.
More specifically, the 1 st prediction parameter decoding unit 43 first sets the prediction parameters used for prediction of the sub-block above or to the left of the prediction target sub-block and having been decoded as the estimated values for the prediction target sub-block.
Next, the 1 st prediction parameter decoding unit 43 decodes the flag included in the sub-block coded data #141 b.
When the flag indicates that the estimated value is used, the estimated value is set as the prediction parameter for the subblock to be predicted, and when the flag indicates that the estimated value is not used, the prediction parameter decoded from a portion other than the flag is set as the prediction parameter for the subblock to be predicted.
In the case where the subblock above or to the left of the prediction target subblock is not decoded, the prediction parameter used for prediction of the subblock closest to the prediction target subblock, which is decoded above or to the left of the prediction target subblock, may be referred to as the estimation value.
The decoded prediction parameter #43 is also supplied to the reduced set derivation unit 44.
Through the above operation, prediction parameter #43 decoded from each sub-block belonging to group 1 is supplied to reduced set deriving unit 44.
(reduced set derivation section 44)
The reduced set deriving unit 44 accumulates the prediction parameter #43 and generates a reduced prediction parameter set RS (hereinafter referred to as "reduced set RS"). Here, the reduced set RS is a set including the prediction parameter #43 decoded from each subblock belonging to the group 1. In addition, the reduced set RS may further include a prediction parameter other than the prediction parameter # 43.
In the case where the same prediction parameter is decoded from a plurality of subblocks belonging to the group 1, the reduced set deriving unit 44 may generate the reduced set RS so that only 1 prediction parameter is included in the same prediction parameter. In other words, the reduced set derivation unit 44 may generate the reduced set RS so that the prediction parameters do not overlap. For example, when the prediction parameters PP1 are decoded from the sub-blocks SB1 to SB8 among the sub-blocks SB1 to SB16 belonging to the group 1, and the prediction parameters PP2 are decoded from the sub-blocks SB9 to SB16, the reduced set derivation section 44 generates the reduced set RS so that the prediction parameters PP1 and the prediction parameters PP2 are 1 each.
Hereinafter, the operation of generating the reduced set RS by the reduced set deriving unit 44 will be described with reference to fig. 5 and fig. 6(a) to (c), taking as an example a case where the prediction parameter is the intra prediction mode in the h.264/MPEG-4AVC standard.
Fig. 5 shows intra prediction modes (hereinafter, referred to as "prediction modes") used for intra prediction in the h.264/MPEG-4AVC standard, and index numbers assigned to the respective prediction modes. Each intra prediction mode represents a prediction direction used for intra prediction, and as shown in fig. 5, in the h.264/MPEG-4AVC specification, a prediction mode of 8 directions (corresponding to index numbers 0, 1, 3 to 8) and a DC prediction mode (corresponding to index number 2) are used. Hereinafter, the prediction mode designated by the index number I is characterized as the prediction mode I. The parameter set including prediction modes 0 to 8 is referred to as a basic parameter set.
(reduced set RS production example 1)
Fig. 6(a) is a flowchart showing an example 1 of the operation of generating the reduced set RS in the reduced set deriving unit 44.
As shown in fig. 6 a, first, the reduced set deriving unit 44 initializes the reduced set RS by setting the reduced set RS to null (step S101).
Next, the reduced set derivation unit 44 adds the prediction parameter #43 decoded from each subblock belonging to the group 1 to the reduced set RS (step S102). For example, when the prediction mode 1, the prediction mode 6, and the prediction mode 8 are decoded from each subblock belonging to the group 1, the reduced set deriving unit 44 adds the prediction mode 1, the prediction mode 6, and the prediction mode 8 to the reduced set RS.
By performing the above operation, in example 1, the reduced set deriving unit 44 can generate the reduced set RS including the prediction parameter #43 decoded from each sub-block belonging to group 1.
In general, there is a correlation between prediction parameters that are optimal for each subblock constituting a macroblock. Therefore, the prediction parameter selected for each sub-block belonging to group 1 is highly likely to be the optimal prediction parameter for each sub-block belonging to group 2. The number of prediction modes included in the reduced set RS is smaller than the number of prediction parameters included in the basic parameter set.
Therefore, the moving picture coding apparatus that generates coded data #1 can generate coded data #1 with a small code amount without sacrificing coding efficiency by adopting a configuration corresponding to the configuration of this example. Further, by adopting the configuration of this example, the moving image decoding apparatus 1 can decode the encoded data #1 with a small code amount generated in this way.
(reduced set RS production example 2)
Fig. 6(b) is a flowchart showing an example 2 of the operation of generating the reduced set RS in the reduced set deriving unit 44.
As shown in fig. 6 b, first, the reduced set deriving unit 44 initializes the reduced set RS by setting the reduced set RS to null (step S201).
Next, the reduced set deriving unit 44 adds the addition parameter set AS to the reduced set RS (step S202). Here, it is preferable that the additional parameter set AS includes a prediction parameter with a tendency to be frequently used. In general, among the prediction modes of the h.264/MPEG-4AVC standard, the prediction mode specified by a smaller index number tends to be used more frequently in intra prediction, and therefore, it is preferable to include the prediction mode specified by a smaller index number from 0 to 8. For example, the additional parameter set AS is preferably configured to include a prediction mode 0 (vertical prediction mode), a prediction mode 1 (horizontal prediction mode), and a prediction mode 2(DC prediction mode).
It is preferable that the additional parameter set AS includes at least 1 prediction mode from among the prediction mode 0, the prediction mode 1, and the prediction mode 2.
Next, the reduced set deriving unit 44 adds the prediction parameter #43 decoded from each subblock belonging to the group 1 to the reduced set RS (step S203). The reduced set derivation unit 44 does not add the prediction parameters included in the reduced set RS among the prediction parameters #43 to the reduced set RS in order to avoid duplication. For example, when the prediction parameter #43 is the prediction mode 1 and the prediction mode 4 and the prediction mode 1 and the prediction mode 2 are already included in the reduced set RS, the reduced set derivation unit 44 may add the prediction mode 4 only to the reduced set RS.
By performing the above operation, in example 2, the reduced set deriving unit 44 can generate the reduced set RS including the prediction parameter #43 decoded from each subblock belonging to the group 1 and the prediction mode included in the additional parameter set.
By constructing the reduced set RS as described above, it is possible to generate the reduced set RS including the prediction parameter #43 decoded from each subblock belonging to the group 1 and the prediction mode which tends to be frequently used.
Therefore, the moving picture coding apparatus having the reduced set deriving unit operating as in the present example, which generates the coded data #1, can generate the coded data #1 having a smaller amount of prediction residual. The moving image decoding device 1 including the reduced set deriving unit 44 operating as in this example can decode the encoded data #1 having a smaller amount of prediction residual.
(reduced set RS production example 3)
Fig. 6(c) is a flowchart showing an example 3 of the operation of generating the reduced set RS in the reduced set deriving unit 44.
As shown in fig. 6 c, the reduced set deriving unit 44 initializes the reduced set RS by setting the reduced set RS to null (step S301).
Next, the reduced set deriving unit 44 adds the prediction parameter #43 decoded from each subblock belonging to the group 1 to the reduced set RS (step S302).
Next, the reduced set derivation unit 44 determines the log 2 Whether (Np-1) is an integer (step S303). Here, Np is the number of prediction parameters included in the reduced set RS.
At log 2 When (Np-1) is an integer (yes in step S303), the reduced set deriving unit 44 outputs the reduced set RS.
At log 2 If (Np-1) is not an integer (no in step S303), the reduced set deriving unit 44 adds the predetermined prediction parameter to the reduced set (step S304), and performs the process of step S303 again. Here, as the predetermined prediction parameter, for example, a prediction mode that is not included in the reduced set RS and has the smallest index number, among the prediction modes 0 to 8 included in the basic parameter set, may be used.
As described above, the prediction mode specified by a smaller index number tends to be used more frequently in intra prediction. Therefore, in this step, the reduced set deriving unit 44 adds a prediction mode that tends to be used more frequently in intra prediction to the reduced set.
By performing the above operation, in example 3, the reduced set deriving unit 44 can generate a prediction parameter #43 including the prediction parameter #43 decoded from each subblock belonging to the group 1 and including 2 n +1 (n is an integer) reduced set of prediction parameters RS.
In general, when variable length coding is performed on a prediction parameter together with a flag indicating whether or not the prediction parameter is identical to an estimated value, the number of prediction parameters is 2 n The number of +1 (n is an integer) prediction parameters is not 2 n In the case of +1, the compression efficiency tends to be improved when variable-length coding is performed on the prediction parameter.
Therefore, by performing the above-described operation, the reduced set deriving unit 44 can generate the reduced set RS having high compression efficiency in variable length coding. Therefore, the moving picture decoding apparatus including the reduced set deriving part operating as in this example, which generates the encoded data #1, can generate the encoded data #1 with high compression efficiency. The moving picture decoding apparatus 1 including the reduced set deriving unit 44 operating as in this example can decode the encoded data #1 having such high compression efficiency.
In addition, the number of prediction parameters #43 is not 2 n In the case of +1 (where n is an integer), the reduced set deriving unit 44 can generate the reduced set RS so as to include the above-described predetermined prediction parameters, and thus can generate the reduced set RS including a prediction mode that tends to be used more frequently.
(reduced set RS production example 4)
In the examples of generation of the 3 types of reduced set RS shown in fig. 6(a) to (c), the reduced set deriving unit 44 adds all types of prediction parameters except for the duplicated prediction parameters to the prediction parameters #43 decoded from each subblock belonging to the group 1 to the reduced set RS. However, it may be configured such that: prediction parameters decoded from sub-blocks belonging to group 1 are not added with all types but only with a part of types.
Specifically, the configuration may be: among the sets of prediction parameters decoded from the subblocks belonging to the group 1, only prediction parameters whose appearance ratio is higher than a given value are added to the reduced set RS. Here, the appearance ratio of the prediction parameter can be defined, for example, by dividing the number of sub-blocks to which the prediction parameter is allocated among sub-blocks belonging to group 1 by the number of all sub-blocks belonging to group 1. For example, if the number of all sub-blocks belonging to group 1 is Nf, and the number of sub-blocks of the sub-blocks belonging to group 1, to which the prediction parameter Pa is decoded and allocated, is Npa, the occurrence ratio of the prediction parameter P can be defined by Npa/Nf. The above-mentioned appearance ratio can also be expressed by percentage.
Further, the following describes the present generation example more specifically in the case where 8 sub-blocks (sub-blocks SB1 to SB8) belong to group 1.
For example, when the prediction mode 0 is decoded for the sub-blocks SB1, SB2, SB3, SB4, the prediction mode 1 is decoded for the sub-blocks SB5, SB6, the prediction mode 2 is decoded for the sub-block SB7, and the prediction mode 3 is decoded for the sub-block SB8, and the given value is set to 40%, only the prediction mode 0 whose appearance ratio is 50% is added to the reduced set RS. On the other hand, when the given value is set to 20%, the prediction mode 0 having the appearance ratio of 50% and the prediction mode 1 having the appearance ratio of 25% are added to the reduced set RS.
In general, when the number of subblocks included in a macroblock is large, it is difficult to efficiently reduce the amount of codes because a reduced set RS includes a plurality of prediction parameters.
According to the present generation example, the reduced set derivation section 44 adds only the prediction parameter having an appearance ratio higher than a predetermined value to the reduced set RS among the set of prediction parameters decoded from the sub-blocks belonging to the group 1, and therefore can solve the above-described problem that it is difficult to efficiently reduce the amount of code when the number of sub-blocks is large.
As described above in the generation examples 1 to 4 of the reduced set RS, the reduced set RS can be generated based on the prediction parameters belonging to the group 1. More strictly, the reduced set RS can be generated based on at least one of the kind of the prediction parameters belonging to the 1 st group and the occurrence ratio of each prediction parameter belonging to the 1 st group.
(2 nd prediction parameter decoding unit 45)
Next, the operation of the 2 nd prediction parameter decoding unit 45 will be described with reference to fig. 7. The 2 nd prediction parameter decoding unit 45 decodes the prediction parameter P used for prediction of each sub-block determined to belong to the 2 nd group by the group determination unit 41, among the encoded data for each sub-block included in the sub-block encoded data #141 b.
In other words, the 2 nd prediction parameter decoding unit 45 decodes the prediction parameter P used for prediction of each sub-block belonging to the 2 nd group with reference to information on a prediction parameter included in the sub-block encoded data #141b, that is, information on a prediction parameter for each sub-block belonging to the 2 nd group.
The decoded prediction parameter P is output as prediction parameter # 45.
Fig. 7 is a flowchart showing an example of the flow of the decoding process in the 2 nd prediction parameter decoding unit 45.
As shown in fig. 7, first, the 2 nd prediction parameter decoding unit 45 counts the number N of prediction parameters included in the reduced set RS (step S501).
Next, the 2 nd prediction parameter decoding unit 45 determines whether or not the number N of prediction parameters included in the reduced set RS is 1 (step S502).
When N is equal to 1 (yes in step S502), the 2 nd prediction parameter decoding unit 45 sets the only prediction parameter included in the reduced set as the prediction parameter P (step S503).
If N is not 1 (no in step S502), the 2 nd prediction parameter decoding unit 45 derives the prediction parameter estimation value Q (step S504). Here, the prediction parameter estimation value Q is a prediction parameter used for prediction of a sub block adjacent to the upper side or the left side of the prediction target sub block. When a sub-block adjacent to the prediction target sub-block on the upper side or the left side is not decoded, the prediction parameter used for prediction of a sub-block closest to the prediction target sub-block after decoding on the upper side or the left side of the prediction target sub-block may be set to the estimated value Q.
Next, the 2 nd prediction parameter decoding unit 45 decodes a flag indicating whether the prediction parameter to be decoded is the same as the prediction parameter estimation value Q, and substitutes the decoded value for the variable a (step S505).
Hereinafter, a case where the estimated value Q of the prediction parameter is the same as any of the prediction parameters included in the reduced set RS will be described as an example. In the following description, a case where the value of the variable a is 1 corresponds to a case where the prediction parameter to be decoded is the same as the prediction parameter estimation value Q, and a case where the value of the variable a is not 1 corresponds to a case where the prediction parameter to be decoded is not the same as the prediction parameter estimation value Q.
Next, the 2 nd prediction parameter decoding unit 45 determines whether or not the value of the variable a is 1 (step S506).
If the value of the variable a is 1 (yes in step S506), the estimated value Q of the prediction parameter is set as the prediction parameter P (step S507).
When the value of the variable a is not 1 (no in step S506), the 2 nd prediction parameter decoding unit 45 determines whether or not the number N of prediction parameters included in the reduced set RS is 2 (step S508).
When N is 2 (yes in step S508), the 2 nd prediction parameter decoding unit 45 sets, as the prediction parameter P, the prediction parameter included in the reduced set RS that does not match the prediction parameter estimation value Q (step S509).
If N is not 2 (no in step S508), the 2 nd prediction parameter decoding unit 45 performs ceil (log) 2 (N-1)) bit string of the length of bits is decoded, and the decoded value is substituted into the variable b (step S510). Ceil (…) is an upper integer function (the same applies below) in which the smallest integer among integers equal to or larger than a value in parentheses is set as a value. Therefore, ceil (…) can also be expressed as a function of an integer up to the value in brackets when the value in brackets is positive.
For example, when N is 5, the 2 nd prediction parameter decoding unit 45 performs prediction on ceil (log) 2 (5-1)) -2-bit long bit string is decoded and the decoded value is substituted into the variable b. Here, the value of the variable b corresponds to a bit string having a length of 2 bits, and b is any one of 0, 1, 2, and 3.
Next, the 2 nd prediction parameter decoding unit 45 sets, as the prediction parameter P, the prediction parameter having the index number (b +1) th smaller out of the prediction parameters included in the reduced set RS and not matching the prediction parameter estimation value Q (step S511).
For example, when the value of the variable b is 0, the 2 nd prediction parameter decoding unit 45 sets, as the prediction parameter P, a prediction parameter having the index number 1 th smaller among the prediction parameters included in the reduced set RS and not matching the prediction parameter estimation value Q.
In addition, when the prediction parameter estimation value Q derived by the processing described in step S504 is different from any of the prediction parameters included in the reduced set RS, the prediction parameter to which the smallest index number is given among the prediction parameters included in the reduced set RS may be used as the prediction parameter estimation value Q.
The above is an example of the decoding process performed by the 2 nd prediction parameter decoding unit 45. The 2 nd prediction parameter decoding unit outputs the prediction parameter P decoded by the above-described processing as prediction parameter # 45.
As described above, the moving picture decoding apparatus 1 is a moving picture decoding apparatus for decoding encoded data obtained by encoding a difference between an original image and a predicted image together with selection information indicating which of a plurality of prediction parameters for specifying a method of generating the predicted image is selected for each prediction unit, and is characterized by including: a classification unit (group determination unit 41) that classifies a plurality of prediction units included in each of a plurality of unit regions constituting a prediction image into the 1 st group or the 2 nd group; a 1 st selecting means (a 1 st prediction parameter decoding unit 43) for referring to 1 st selection information (information on a prediction parameter included in the sub-block encoded data #141b and information on a prediction parameter for each sub-block belonging to the 1 st group) which is selection information for each prediction unit belonging to the 1 st group among the selection information, and selecting a prediction parameter for specifying a method of generating a predicted image in each prediction unit belonging to the 1 st group from a basic set consisting of predetermined prediction parameters; and a 2 nd selecting means (a 2 nd prediction parameter decoding unit 45) for referring to 2 nd selection information (information on prediction parameters included in the subblock encoded data #141b, which is information on prediction parameters for subblocks belonging to the 2 nd group) among the selection information, the selection information being selection information on prediction units belonging to the 2 nd group, and selecting a prediction parameter for specifying a method of generating a predicted image in each prediction unit belonging to the 2 nd group, from among a reduced set RS including at least a part of the prediction parameters selected by the 1 st selecting means (the 1 st prediction parameter decoding unit 43) and including prediction parameters equal to or less than the number of prediction parameters included in the basic set.
(other configuration example of the prediction parameter decoding unit 144)
Although the above description of the prediction parameter decoding unit 144 describes the configuration in which the reduced set deriving unit 44 generates the reduced set RS for each macroblock, the present invention is not limited to this.
The prediction parameter decoding unit 144 may be configured to, for example: the reduced set deriving unit 44 generates a reduced set RS for each subblock, and the 2 nd prediction parameter decoding unit 45 decodes a prediction parameter for a prediction target subblock based on the reduced set RS generated for each subblock.
In such a configuration, the reduced set deriving unit 44 can generate the reduced set RS by performing the following processing as shown in fig. 8 (a).
(step S701)
First, the reduced set deriving unit 44 initializes the reduced set RS by setting the reduced set RS to null.
(step S702)
Next, the reduced set deriving unit 44 sets a region composed of sub-blocks surrounding the prediction target sub-block as a neighboring sub-block region NSR.
Fig. 8(b) shows an example of the neighboring subblock region NSR. As shown in fig. 8(b), the neighboring sub-block region NSR may be formed of, for example, sub-blocks around the prediction target sub-block, the distance from the prediction target sub-block being within 1 to 3 city distances in units of sub-block. Here, the urban distance is defined by the sum of absolute values of differences between coordinates of 2 points.
As shown in fig. 8(b), the neighboring subblock region NSR may generally include subblocks belonging to macroblocks other than the macroblock to which the prediction target subblock belongs.
(step S703)
Next, the reduced set deriving unit 44 adds the decoded prediction parameter of the prediction parameters for each subblock included in the neighboring subblock region NSR to the reduced set RS.
When the same prediction parameter corresponds to a plurality of subblocks included in the neighboring subblock region NSR, the reduced set deriving unit 44 may add only 1 of the same parameter to the reduced set RS.
By performing the above operation, the reduced set deriving unit 44 can generate the reduced set RS for each macroblock. The 2 nd prediction parameter decoding unit 45 can decode the prediction parameters for the prediction target subblock based on the reduced set RS generated for each subblock.
In general, the prediction parameters for a prediction target sub-block are correlated with the existence of prediction parameters for sub-blocks surrounding the prediction target sub-block. Therefore, the prediction parameters included in the reduced set RS generated by the above-described processing are highly likely to include the most suitable prediction parameters for prediction of the sub-blocks belonging to the group 2. In addition, the number of prediction parameters included in the reduced set RS generated by the above-described processing is generally smaller than the number of selectable prediction parameters for the group 1.
Therefore, the moving picture coding apparatus that generates coded data #1 can generate coded data #1 with a small code amount without sacrificing coding efficiency by adopting a configuration corresponding to the above-described configuration. Further, by adopting the above configuration, the moving picture decoding apparatus 1 can decode the encoded data #1 having a small code amount generated in this manner.
In addition, when there is no decoded prediction parameter for a plurality of sub-blocks included in the neighboring sub-block region NSR, the 2 nd prediction parameter decoding unit 45 may be configured to select a prediction parameter from among basic parameter sets, for example.
In addition, the reduced set deriving unit 44 in the present configuration example may be configured to: the reduced set RS is derived by almost the same processing as described in (reduced set RS generation example 1) to (reduced set RS generation example 4). In this case, "group 1" in (reduced set RS generation example 1) to (reduced set RS generation example 4) is referred to as "nearby subblock region NSR" in this configuration example instead.
In addition, although the reduced set RS is set for use with the group 2 in the above description, the present invention is not limited thereto. The above process can be applied to all sub-blocks within a macro-block. That is, the following configurations are possible: prediction parameters are decoded for all subblocks within a macroblock based on a reduced set RS generated for each subblock.
The moving picture encoding device that generates the encoded data #1 can further reduce the amount of prediction parameters for all sub-blocks within the macro-block by adopting a configuration corresponding to the above-described configuration. Therefore, the moving image encoding device can generate encoded data #1 having a smaller code amount. Further, by adopting the above configuration, the moving picture decoding apparatus 1 can decode the encoded data #1 thus generated.
(predicted image generating section 145)
The following describes the process of generating the predicted image #145 by the predicted image generator 145.
The predicted image generator 145 generates a predicted pixel value of each pixel (pixel to be predicted) in the predicted image #145 (sub block to be predicted), for example, as follows, based on the prediction direction (prediction mode) indicated by the prediction parameter # 144. In the following, a case where the prediction parameter #144 is any one of the prediction modes 0 to 8 shown in fig. 5 will be described as an example.
The predicted image generator 145 performs the following operation after assigning the prediction mode indicated by the prediction parameter #144 to the pixel to be predicted.
When the assigned prediction mode is other than prediction mode 2(DC prediction), the predicted image generation unit 145 sets the pixel position of the pixel to be predicted as a starting point, and sets the pixel value of the pixel closest to the pixel (hereinafter, referred to as the closest pixel) among the decoded pixels located on the virtual line segment in the opposite direction to the prediction direction as the pixel value of the pixel to be predicted. Further, a value calculated using the pixel value of the closest pixel and the pixel values of the pixels in the periphery of the closest pixel may be set as the pixel value of the prediction target pixel.
When the allocated prediction mode is prediction mode 2 and the sub-block adjacent to the upper side of the prediction target sub-block (hereinafter referred to as the upper sub-block) and the sub-block adjacent to the left side (hereinafter referred to as the left sub-block) are decoded, the average value of the pixel values of the pixels in the lowermost row of the upper sub-block and the pixel values of the pixels in the rightmost column of the left sub-block is set as the pixel value of the prediction target pixel.
When the assigned prediction mode is prediction mode 2 and the upper sub-block is decoded completely but the left sub-block is not decoded completely, the average value of the pixel values of the pixels in the lowermost row of the upper sub-block and the pixel values of the pixels in the rightmost column in the sub-block (hereinafter, referred to as the leftmost sub-block) closest to the prediction target sub-block on the left of the prediction target sub-block is set as the pixel value of the prediction target pixel.
When the assigned prediction mode is prediction mode 2 and the upper sub-block is not decoded yet the left sub-block is decoded completely, the average value of the pixel values of the pixels in the lowermost row and the pixel values of the pixels in the rightmost column of the left sub-block in the sub-block (hereinafter referred to as the uppermost closest sub-block) above and closest to the prediction target sub-block is set as the pixel value of the prediction target pixel.
When the assigned prediction mode is prediction mode 2 and both the upper sub-block and the left sub-block are not complete in decoding, the average value of the pixel values of the pixels in the lowermost row of the upper closest sub-block and the pixel values of the pixels in the rightmost column of the left closest sub-block is set as the pixel value of the pixel to be predicted.
An example of the process of generating the predicted image #145 by the predicted image generator 145 when the target sub-block to be predicted is 4 × 4 pixels will be described specifically below with reference to fig. 9.
Fig. 9 is a diagram showing each pixel (prediction target pixel) of a prediction target sub-block of 4 × 4 pixels and pixels (reference pixels) in the periphery of the prediction target sub-block. As shown in fig. 9, reference numerals a to p are given to the prediction target pixels, reference numerals a to M are given to the reference pixels, and the pixel value of a pixel X (X is any of a to p, and a to M) is represented as X. In addition, it is assumed that the reference pixels a to M are all decoded.
(prediction mode 0)
When the assigned prediction mode is prediction mode 0, the predicted image generation unit 145 generates pixel values a to p by the following equations
a,e,i,m=A,
b,f,i,n=B,
c,g,k,o=C,
d,h,l,p=D。
(prediction mode 2)
When the assigned prediction mode is prediction mode 2(DC prediction), the predicted image generation unit 145 generates pixel values a to p by the following expression
a~p=ave(A,B,C,D,I,J,K,L)。
Here, ave (…) represents averaging of elements contained in parentheses.
(prediction mode 4)
When the assigned prediction mode is prediction mode 4, the predicted image generator 145 generates pixel values a to p by the following equations
d=(B+(C×2)+D+2)>>2,
c,h=(A-+(B×2)+C+2)>>2,
b,g,l=(M+(A×2)+B+2)>>2,
a,f,k,p=(I+(M×2)+A+2)>>2,
e,j,o=(J+(I×2)+M+2)>>2,
i,n=(K+(J×2)+I+2)>>2,
m=(L+(K×2)+J+2)>>2。
Here, ">" means a right shift operation, where for any positive integer x, s, the value of x > s is equal to the value of the decimal portion of x ÷ (2^ s) after being removed.
The predicted image generator 145 can also calculate the pixel values a to p in the same manner for the prediction modes other than the above-described prediction mode.
< supplementary notes on moving image decoding apparatus >
Although the moving picture decoding apparatus according to the present invention has been described above, the present invention is not limited to the above configuration.
(Note with 1)
For example, the 2 nd prediction parameter decoding unit 45 may be configured to: whether or not to use the reduced set RS at the time of decoding the prediction parameter #45 is switched according to a flag included in the encoded data # 1.
More specifically, the 2 nd prediction parameter decoding unit 45 may be configured to: when the value of the flag included in the encoded data #1 is 1, the prediction parameter #45 is decoded using the reduction set RS, and when the value of the flag included in the encoded data #1 is 0, the prediction parameter #45 is decoded using the basic parameter set instead of the reduction set RS.
With this configuration, the amount of processing at the time of decoding prediction parameter #45 can be reduced.
(Note with 2)
The 2 nd prediction parameter decoding unit 45 may be configured to: whether or not to use the reduced set RS when decoding the prediction parameter #45 is switched according to the number of subblocks included in the macroblock.
More specifically, the present invention may be configured as follows: when the number of subblocks included in a macroblock is 16 or more, prediction parameter #45 is decoded using a reduced set RS, and when the number of subblocks included in a macroblock is less than 16, prediction parameter #45 is decoded using a basic parameter set instead of the reduced set RS.
With this configuration, the amount of processing in decoding prediction parameter #45 can be reduced.
(Note with 3)
In the above description, the set of prediction parameters as shown in fig. 5 is used as the basic parameter set, but the present invention is not limited to this.
For example, the prediction parameter decoding unit 144 may be configured to: as the basic parameter set, a parameter set in which the horizontal direction is emphasized as shown in fig. 16(a) or a parameter set in which the vertical direction is emphasized as shown in fig. 16(b) is used.
More specifically, the prediction parameter decoding unit 144 may be configured to: in the case where a horizontal edge exists in a macroblock, a parameter set with importance placed on the horizontal direction as shown in fig. 16(a) is used as a basic parameter set, and in the case where a vertical edge exists in a macroblock, a parameter set with importance placed on the vertical direction as shown in fig. 16(b) is used as a basic parameter set.
Further, the following configuration is possible: in the case where such a plurality of basic parameter sets are selectively used and the parameter set shown in fig. 16(a) or (b) is selected as the basic parameter set, the 2 nd prediction parameter decoding section 45 decodes the prediction parameter #45 using the reduction set RS, and in the case where the parameter set shown in fig. 5 is selected as the basic parameter set, the 2 nd prediction parameter decoding section 45 decodes the prediction parameter #45 using the basic parameter set instead of the reduction set RS.
With such a configuration, the reduced set RS can be used according to the characteristics of the image in the macro block.
(moving Picture coding apparatus)
The moving image coding device (image coding device) 2 according to the present embodiment will be described below with reference to fig. 10 to 14. Fig. 10 is a block diagram showing the configuration of the moving image encoding device 2. As shown in fig. 10, the moving image encoding device 2 includes: a header information determining unit 21, a header information encoding unit 22, an MB determining unit 23, an MB encoding unit 24, a variable-length code multiplexing unit 25, an MB decoding unit 26, and a frame memory 27.
In short, the moving image encoding device 2 is a device that encodes the input image #100 to generate and output encoded data # 1.
The header information determining unit 21 determines header information based on the input image # 100. The determined header information is output as header information # 21. The header information #21 contains the picture size of the input picture # 100. The header information #21 is not only input to the MB determination unit 23, but also supplied to the header information encoding unit 22.
The header information encoding unit 22 encodes the header information #21 and outputs the encoded header information # 22. The encoding completion header information #22 is supplied to the variable length code multiplexing section 25.
The MB determination unit 23 divides the input image #100 into a plurality of macroblocks based on the header information #21, and outputs a macroblock image #23 associated with each macroblock. The macroblock picture #23 is sequentially supplied to the MB encoding unit 24.
The MB encoding unit 24 encodes the macroblock image #23 sequentially input, and generates MB encoded data # 24. The generated MB encoded data #24 is supplied to the variable length code multiplexing section 25. The structure of the MB encoding unit 24 will be described later, and therefore, description thereof will be omitted.
The variable-length code multiplexing unit 25 multiplexes the coded header information #22 and the MB coded data #24 to generate and output coded data # 1.
The MB decoding unit 26 sequentially decodes the inputted MB encoded data #24 corresponding to each macroblock, and generates and outputs a decoded image #26 corresponding to each macroblock. The decoded picture #26 is supplied to the frame memory 27.
The input decoded picture #26 is recorded in the frame memory 27. At the time point when a specific macroblock is encoded, decoded images corresponding to all macroblocks located before the macroblock in raster scan order are recorded.
(MB encoding unit 24)
The MB encoding unit 24 will be described in more detail below with reference to the drawings.
Fig. 11 is a block diagram showing the structure of the MB encoding unit 24. As shown in fig. 11, the MB encoding unit 24 includes: a sub-block dividing unit 241, a prediction parameter determining unit 242, a prediction parameter encoding unit 243, a prediction residual generating unit 244, a transform coefficient encoding unit 245, a prediction residual decoding unit 246, a sub-block decoded image generating unit 247, a predicted image generating unit 248, and an MB encoded data generating unit 249.
The subblock dividing unit 241 divides the macroblock image #23 into a plurality of subblocks, and sequentially outputs subblock position information #241a indicating the positions of the subblocks constituting the macroblock within the macroblock and a subblock image #241b that is image data relating to the subblock indicated by the subblock position information #241a in a predetermined order.
Further, the sub-block dividing unit 241 is preferably configured as follows: after the sub-block position information #241a and the sub-block image #241b on the sub-block belonging to the group 1 described later are output, the sub-block position information #241a and the sub-block image #241b on the sub-block belonging to the group 2 described later are output. For example, the following configuration is preferable: the sub-blocks belonging to the 1 st group are scanned in a raster scan order, and next, the sub-blocks belonging to the 2 nd group are scanned in a raster scan order.
The prediction parameter determination unit 242 determines and outputs the prediction parameter #242 used for generating the prediction image for the subblock indicated by the subblock position information #241 a. The prediction parameter encoding unit 243 encodes the prediction parameter #242 and outputs the encoded prediction parameter # 243. The configurations of the prediction parameter determining unit 242 and the prediction parameter encoding unit 243 will be described later, and therefore, the description thereof will be omitted.
The prediction residual generation unit 244 specifies a sub-block to be predicted based on the sub-block position information #241a, and generates a prediction residual #244 which is a difference image between the sub-block image #241b and the predicted image #248 generated by the predicted image generation unit 248 in the sub-block.
The transform coefficient encoding unit 245 applies frequency transform of the same size as the size of the sub-block to the prediction residual #244 to generate a transform coefficient of the prediction residual # 244.
Further, the transform coefficient encoding unit 245 applies a variable length coding method such as CABAC or CAVLC to the quantized transform coefficient #245a to generate a variable length code after generating the quantized transform coefficient #245a by quantizing the transform coefficient, and outputs the variable length code as encoded data #245 b.
The prediction residual decoding unit 246 inversely quantizes the quantized transform coefficient #245a, and then applies the inverse transform of the frequency transform (inverse frequency transform) to generate and output a decoded residual # 246.
The above-described processing performed by the prediction residual generation unit 244, the transform coefficient encoding unit 245, and the prediction residual decoding unit 246 is not intended to limit the present invention. For example, the transform coefficient encoding unit 245 may directly quantize the prediction residual without the frequency transform.
The sub-block decoded image generator 247 can generate and output a sub-block decoded image #247 by adding the predicted image #248 to the decoded residual # 246.
The predicted image generator 248 generates and outputs a predicted image #248 corresponding to the target subblock based on the prediction parameter #242, the decoded image #27, and the subblock decoded image # 247. As a specific method of generating the predicted image #248 in the predicted image generator 248, for example, the same method as the method of generating the predicted image #145 in the predicted image generator 145 described above can be applied.
The MB encoded data generating unit 249 accumulates the encoded data #245b relating to each sub-block and the encoding prediction parameter #243 relating to each sub-block, and merges the accumulated data into macroblock units, thereby generating and outputting MB encoded data #24 which is encoded data in macroblock units.
The prediction parameter determination unit 242 and the prediction parameter encoding unit 243 will be described below, with reference to the drawings.
(prediction parameter determining section 242)
Fig. 12 is a block diagram showing the configuration of the prediction parameter determination unit 242. As shown in fig. 12, the prediction parameter determination unit 242 includes: a group determination unit 51, a switching unit 52, a 1 st prediction parameter determination unit 53, a reduced set derivation unit 54, and a 2 nd prediction parameter determination unit 55.
The group determination unit 51 classifies the sub-blocks indicated by the sub-block position information #241a into any one of a plurality of groups, and outputs group information #51 indicating the classification result to the switching unit 52.
As shown in fig. 4(a) to (f), the group determination unit 51 can classify each sub-block into either the 1 st group or the 2 nd group.
The group determination unit 51 may classify each sub-block into any one of a plurality of groups by using a different classification method for each macro block. For example, the following configurations may be adopted: the sub-blocks constituting the macroblock MB1 are classified into 2 groups as shown in fig. 4(a) to (b), and the sub-blocks constituting the macroblock MB2 different from the macroblock MB1 are classified into 2 groups as shown in fig. 4(c) to (d). In this manner, when any one of a plurality of classification methods is used for each macroblock, it is preferable that the group determination unit 51 outputs a flag indicating which classification method is used. By transmitting this flag to the moving picture decoding apparatus that decodes the encoded data #1, the moving picture decoding apparatus can recognize which classification method is used in the group determination unit 51.
Based on the group information #51, the switching unit 52 transmits sub-block encoded data #241b, which is encoded data relating to the sub-block indicated by the sub-block position information #241a, to either the 1 st prediction parameter determining unit 53 or the 2 nd prediction parameter determining unit 55.
Specifically, when the sub-block indicated by the sub-block position information #241a is classified into the 1 st group by the group determination unit 51, the switching unit 52 transfers the sub-block encoded data #241b to the 1 st prediction parameter determination unit 53, and when the group determination unit 51 determines that the sub-block indicated by the sub-block position information #241a is classified into the 2 nd group, the switching unit 52 transfers the sub-block encoded data #241b to the 2 nd prediction parameter determination unit 55.
The 1 st prediction parameter determining section 53 determines (selects) and outputs the prediction parameter #53 used for generating the predicted image for each sub-block belonging to the 1 st group based on the decoded picture #27, the sub-block decoded picture #247, and the sub-block encoded data #241 b. The prediction parameter #53 is also supplied to the reduced set deriving unit 54.
For example, when the prediction parameter is an intra prediction mode in the h.264/MPEG-4AVC standard, the 1 st prediction parameter determining unit 53 selects and outputs any one of the prediction modes from the basic parameter sets shown in fig. 5 described above for each sub-block belonging to the 1 st group.
Although the specific method of determining the prediction parameter #53 in the 1 st prediction parameter determining unit 53 is not limited to the present invention, the 1 st prediction parameter determining unit 53 may determine the prediction parameter #53 such that the difference between the predicted image in each sub-block belonging to the 1 st group and the input image #100 is minimized, for example, for each sub-block belonging to the 1 st group. For example, the 1 st prediction parameter determining unit 53 may be configured as follows: in the sub-block SB1 belonging to the group 1, when the difference between the input image #100 and the prediction image generated using the prediction mode 1 in the basic parameter set is smallest, the prediction mode 1 is selected for the sub-block SBI, and when the difference between the input image #100 and the prediction image generated using the prediction mode 2 in the basic parameter set is smallest, the prediction mode 2 is selected for the sub-block SB2 belonging to the group 1, the sub-block SB2 is used.
Fig. 13(a) is a diagram showing an example of a prediction mode selected by the 1 st prediction parameter determining unit 53 for each of the subblocks belonging to the 1 st group among the subblocks constituting the macroblock MB. In the example shown in fig. 13(a), the 1 st prediction parameter determining unit 53 selects any one of the prediction mode 1, the prediction mode 6, and the prediction mode 8 for each sub-block belonging to the 1 st group. In this example, prediction mode 1, prediction mode 6, and prediction mode 8 are supplied to the reduced set derivation section 54 as prediction parameter # 53.
By the above operation, prediction parameter #53 for each sub-block belonging to group 1 is supplied to reduced set deriving unit 54.
The reduced set deriving unit 54 has the same configuration as the reduced set deriving unit 44 described above. That is, the reduced set derivation unit 54 generates the reduced set RS using the prediction parameter # 53. The method of generating the reduced set RS in the reduced set deriving unit 54 is the same as the method of generating the reduced set RS in the reduced set deriving unit 44 described above.
In the case where a plurality of generation methods are selectively used in the reduced set derivation unit 54, it is preferable that the reduced set derivation unit 54 outputs a flag indicating which generation method is selected. By transmitting this flag to the moving image decoding apparatus that decodes the encoded data #1, the moving image decoding apparatus can recognize which generation method is used in the reduced set deriving section 54.
Fig. 13(b) is a diagram showing an example of the reduced set RS generated by the reduced set deriving unit 54 when each prediction mode shown in fig. 13(a) is provided as the prediction parameter # 53. As shown in fig. 13(b), in the present example, the reduced set RS is composed of prediction mode 1, prediction mode 8, and prediction mode 6.
The 2 nd prediction parameter determining unit 55 selects and outputs the prediction parameter #55 used for generating the prediction image for each sub-block belonging to the 2 nd group from the prediction parameters included in the reduced set RS.
Although the specific method of determining the prediction parameter #55 in the 2 nd prediction parameter determining section 55 is not limited to the present invention, the 2 nd prediction parameter determining section 55 may select, for example, the prediction parameter #55 that can optimally generate a predicted image in each sub-block belonging to the 2 nd group from among the prediction parameters included in the reduced set RS.
Fig. 13(c) shows an example of a prediction mode selected by the 2 nd prediction parameter determining unit 55 from the reduced set RS shown in fig. 13(b) for each of the subblocks belonging to the 2 nd group among the subblocks constituting the macroblock MB. As shown in fig. 13(c), any one of the prediction modes 1, 6, or 8 included in the reduced set RS shown in fig. 13(b) is selected for each sub-block belonging to the 2 nd block.
In general, there is a correlation between prediction parameters that are optimal for each subblock constituting a macroblock. Therefore, the prediction parameter selected for each sub-block belonging to group 1 is highly likely to be the optimal prediction parameter for each sub-block belonging to group 2.
Further, as described above, the 2 nd prediction parameter determining unit 55 selects the prediction parameter #55 for each sub-block belonging to the 2 nd group from the prediction parameters included in the reduced set RS, and therefore, the code amount of the prediction parameter #55 can be reduced as compared with the case where the reduced set RS is not used.
For example, as described later, when a prediction mode is encoded together with a flag indicating whether or not it is the same as an estimated value, ceil (log) can be used for 3 prediction modes included in the reduced set RS shown in fig. 13(b) 2 (3-1)) -1 bit code amount. On the other hand, when the 2 nd prediction parameter determining unit 55 selects a prediction parameter from among basic parameter sets including 9 prediction modes without using the reduced set RS, ceil (log) will be required 2 (9-1)) ═ 3 bits of code size. In the above example, since the 2 nd group is composed of 8 subblocks, the use of the reduced set RS can reduce the amount of codes of 3 × 8 to 1 × 8 to 16 bits for each macroblock, compared to the case where the reduced set RS is not used.
In general, when a prediction parameter is encoded together with a flag indicating whether or not the prediction parameter is the same as an estimated value, if Nfs represents the number of prediction parameters that can be selected for each subblock belonging to the group 1, Nrs represents the number of prediction parameters included in the reduced set RS, and Ngs represents the number of subblocks included in the group 2, Ngs x (ceil (log) can be reduced for each macroblock by using the reduced set RS, compared to a case where the reduced set RS is not used 2 (Nfs-1))-ceil(log 2 (Nrs-1))) bits.
In this way, by using the reduced set RS, the amount of code required for encoding the prediction parameters can be reduced without sacrificing the encoding efficiency.
(other configuration example of the prediction parameter determining part 242)
Although the above description of the prediction parameter determining unit 242 describes the configuration in which the reduced set deriving unit 54 generates the reduced set RS for each macroblock, the present invention is not limited to this.
That is, the prediction parameter determination unit 242 may be configured as follows: the reduced set deriving unit 54 generates a reduced set RS for each subblock, and the 2 nd prediction parameter determining unit 55 determines a prediction parameter for a prediction target subblock based on the reduced set RS generated for each subblock.
In such a configuration, the reduced set derivation unit 54 may be configured to perform the same operations as the operations of the reduced set derivation unit 44 described in (step S701) to (step S703) of (another configuration example of the predicted parameter decoding unit 144). The decoded prediction parameters in (step S701) to (step S703) (another configuration example of the prediction parameter decoding unit 144) correspond to the encoded prediction parameters in this example.
In this way, the reduced set deriving unit 54 can generate the reduced set RS for each subblock. The 2 nd prediction parameter determining unit 55 can determine the prediction parameters for the subblock to be predicted based on the reduced set RS generated for each subblock.
In general, there is a correlation between a prediction parameter for a prediction target sub-block and a prediction parameter for a sub-block surrounding the prediction target sub-block. Therefore, the prediction parameters included in the reduced set RS generated by the above-described processing are highly likely to include the most suitable prediction parameters for prediction of the sub-blocks belonging to the group 2. In addition, the number of prediction parameters included in the reduced set RS generated by the above-described processing is generally smaller than the number of selectable prediction parameters for the group 1.
Therefore, by adopting the above configuration, the moving picture encoding device 1 can generate encoded data #1 with a small code amount without sacrificing encoding efficiency.
When there is no prediction parameter that has been encoded for a plurality of sub-blocks included in the neighboring sub-block region NSR, the 2 nd prediction parameter determination unit 55 may be configured to select a prediction parameter from among basic parameter sets, for example.
In addition, the reduced set deriving unit 54 in the present configuration example may be configured to: the reduced set RS is derived by almost the same processing as described in (reduced set RS generation example 1) to (reduced set RS generation example 4). In this case, "group 1" in (reduced set RS generation example 1) to (reduced set RS generation example 4) is referred to as "nearby subblock region NSR" in this configuration example instead.
In addition, although the reduced set RS is set for use with group 2 in the above description, the present invention is not limited thereto. The above process can be applied to all sub-blocks within a macro-block. That is, the following configurations are possible: prediction parameters are determined for all subblocks in a macroblock based on a reduced set RS generated for each subblock.
With the above configuration, the amount of codes of prediction parameters for all sub-blocks in a macro-block can be reduced. Therefore, by adopting the above configuration, the moving picture coding apparatus 1 can generate coded data #1 having a smaller code amount.
(prediction parameter coding unit 243)
Next, the prediction parameter encoding unit 243 will be described with reference to fig. 14. Fig. 14 is a block diagram showing the configuration of the prediction parameter encoding unit 243. As shown in fig. 14, the prediction parameter encoding unit 243 includes: a group determination unit 61, a switching unit 62, a 1 st prediction parameter encoding unit 63, a reduced set derivation unit 64, and a 2 nd prediction parameter encoding unit 65.
The group determination unit 61 has substantially the same configuration as the group determination unit 51 described above. That is, the group determination unit 61 classifies the sub-blocks indicated by the sub-block position information #241a into any one of a plurality of groups defined in advance, and outputs the group information #61 indicating the classification result to the switching unit 62. The group determination unit 61 may classify each sub-block into any one of a plurality of groups defined in advance, using the same classification method as that used in the group determination unit 51.
The switching unit 62 transfers the prediction parameter #242 of the sub-block indicated by the sub-block position information #241a to any one of the 1 st prediction parameter encoding unit 63 and the 2 nd prediction parameter encoding unit 65 based on the group information # 61.
Specifically, when the sub-block indicated by the sub-block position information #241a is classified into the 1 st group by the group determination unit 61, the switching unit 62 transfers the prediction parameter #242 to the 1 st prediction parameter encoding unit 63 and the reduced set derivation unit 64, and when the sub-block indicated by the sub-block position information #241a is classified into the 2 nd group by the group determination unit 61, the switching unit 62 transfers the prediction parameter #242 to the 2 nd prediction parameter encoding unit 65.
The 1 st prediction parameter encoding unit 63 encodes the prediction parameter #242 for each sub-block belonging to the 1 st group, and generates and outputs the encoded prediction parameter # 63.
Specifically, the 1 st prediction parameter encoding unit 63 first sets the prediction parameters selected for the sub-blocks surrounding the sub-blocks belonging to the 1 st group as the estimated values for the sub-blocks.
Next, the 1 st prediction parameter encoding unit 63 encodes a flag indicating whether or not the prediction parameter selected for the sub-block is different from the estimated value, and encodes the prediction parameter when the prediction parameter selected for the sub-block is different from the estimated value.
Here, when the prediction parameters of each sub-block are selected from the basic parameter set, the prediction parameters including the flag can be expressed by a 1-bit or 4-bit code.
As described above, by performing encoding using the estimated values, the compression rate at the time of encoding prediction parameter #242 for each sub-block belonging to group 1 can be improved.
The 1 st prediction parameter encoding unit 63 may be configured to directly encode the prediction parameter #242 for each sub-block belonging to the 1 st group.
The reduced set deriving unit 64 generates a reduced set RS using the prediction parameter #242 for the subblock belonging to the group 1. The method of generating the reduced set RS in the reduced set deriving unit 64 is the same as the method of generating the reduced set RS in the reduced set deriving unit 44 described above, and therefore, the description thereof is omitted here.
The 2 nd prediction parameter encoding unit 65 encodes the prediction parameters included in the reduced set RS, that is, the prediction parameters selected for each sub-block belonging to the 2 nd group, and generates and outputs an encoded prediction parameter # 65.
Specifically, the 2 nd prediction parameter encoding unit 65 first sets the prediction parameters selected for the sub-blocks surrounding each sub-block belonging to the 2 nd group as the estimated values for the sub-blocks.
When the number Nrs of prediction parameters included in the reduced set RS is 1, the encoding process of the 2 nd prediction parameter is terminated without performing any encoding.
Next, the 2 nd prediction parameter encoding unit 65 encodes a flag indicating whether or not the prediction parameter selected for the sub-block is different from the estimated value, and encodes the prediction parameter when the prediction parameter selected for the sub-block is different from the estimated value.
Here, when Nrs is 2, the encoding process of the 2 nd prediction parameter is ended.
In other cases, the prediction parameters contained in the reduced set can pass ceil (log) 2 (Nrs-1)) bits.
In addition, the number Nrs of prediction parameters contained in the reduced set RS is generally less than the number of prediction parameters that are optional for group 1.
Therefore, by using the reduced set RS, the prediction parameters selected for each subblock belonging to the group 2 can be encoded with a smaller code amount.
Further, by performing encoding using the estimated values as described above, the compression rate when encoding the prediction parameter #242 for each sub-block belonging to group 2 can be improved.
The 2 nd prediction parameter encoding unit 65 may be configured to: the prediction parameters selected for each sub-block belonging to group 2 are directly encoded.
< supplementary notes on moving image coding apparatus >
Although the moving image encoding device 2 according to the present invention has been described above, the present invention is not limited to the above configuration.
(additional notes 1')
For example, the 2 nd prediction parameter determining unit 55 may be configured to: whether or not the reduced set RS is used is determined based on the magnitude of spatial correlation of the prediction parameter in the macroblock, and if the spatial correlation is small, the prediction parameter #55 is determined without using the reduced set RS. In addition, the moving picture coding apparatus 2 is preferably configured to: when the 2 nd prediction parameter determination unit 55 determines the prediction parameter #55 without using the reduced set RS, a flag indicating that the reduced set RS is not used is encoded and transmitted to the moving picture decoding apparatus.
With such a configuration, when the spatial correlation of the prediction parameters is small, the prediction parameter #55 can be determined without using the reduced set RS, and therefore, the amount of processing for determining the prediction parameters can be suppressed.
(Note 2')
The 2 nd prediction parameter determining unit 55 may be configured to: whether or not the reduced set RS is used when determining the prediction parameter #55 is switched according to the number of subblocks included in the macroblock.
More specifically, the configuration may be: when the number of subblocks included in a macroblock is 16 or more, prediction parameter #55 is determined using a reduced set RS, and when the number of subblocks included in a macroblock is less than 16, prediction parameter #45 is determined using a basic parameter set instead of the reduced set RS.
With this configuration, when the spatial correlation of the prediction parameters is small, the prediction parameter #55 can be determined without using the reduced set RS, and therefore the amount of processing for determining the prediction parameters can be reduced.
(additional notes 3')
The prediction parameter determination unit 242 may be configured to: as the basic parameter set, a parameter set in which the horizontal direction is emphasized as shown in fig. 16(a) or a parameter set in which the vertical direction is emphasized as shown in fig. 16(b) is used.
For example, the prediction parameter determination unit 242 may be configured to: in the case where a horizontal edge exists in a macroblock, a parameter set in which the horizontal direction is emphasized is used as a basic parameter set as shown in fig. 16(a), and in the case where a vertical edge exists in a macroblock, a parameter set in which the vertical direction is emphasized is used as a basic parameter set as shown in fig. 16 (b).
The configuration may be such that: when such a plurality of basic parameter sets are selectively used and the parameter set shown in fig. 16(a) or (b) is selected as the basic parameter set, the 2 nd prediction parameter determining unit 55 determines the prediction parameter #55 using the reduced set RS, whereas when the parameter set shown in fig. 5 is selected as the basic parameter set, the 2 nd prediction parameter determining unit 55 decodes the prediction parameter #55 using the basic parameter set instead of the reduced set RS.
With this configuration, the reduced set RS can be used according to the characteristics of the image within the macroblock, and thus the amount of code of the prediction parameter can be efficiently reduced.
(data Structure of encoded data # 1)
The data structure of coded data #1 generated by the moving image coding apparatus 2 will be described below with reference to fig. 15.
Fig. 15 is a diagram showing a bit stream structure of the bit stream # MBS for each macroblock of the coded data # 1. As shown in fig. 15, the bit stream # MBS includes subblock information # SB1 to # SBN (N is the number of subblocks in the macroblock), which are information on subblocks SB1 to SBN (N is the number of subblocks in the macroblock) included in the macroblock.
Further, as shown in FIG. 15, each sub-block information # SBn (1. ltoreq. n.ltoreq.N) includes: subblock position information # Ln that is information indicating the position of a subblock SBn in a macroblock, and prediction parameter information # Pn indicating a prediction parameter associated with the subblock SBn.
The subblock position information # Ln is information referred to in a moving image decoding apparatus that decodes the encoded data #1 in order to determine the position of the subblock SBn in the macroblock. In particular, in the moving image decoding apparatus 1 described above, the subblock position information # Ln is information referred to for classifying the subblocks SBn into groups.
The prediction parameter information # Pn is information for specifying a prediction parameter associated with the sub-block SBn in the moving picture decoding apparatus that decodes the encoded data # 1. In particular, in the moving image decoding apparatus 1 described above, the prediction parameter information # Pn is information indicating any one of prediction parameters selectable for the group to which the sub-block SBn belongs.
For example, when the sub-block SBn belongs to group 1 and the prediction parameter set including the prediction parameters selectable for group 1 is the basic parameter set, the prediction parameter information # Pn is information indicating any one of the prediction modes 0 to 8 included in the basic parameter set.
In addition, in the case where the sub-block SBn belongs to the case of group 2, the prediction parameter information # Pn is information indicating any one of the prediction parameters contained in the reduced set RS.
When the encoded data #1 is data generated by encoding a prediction mode together with a flag indicating whether or not the prediction mode is the same as the estimated value, the prediction parameter information # Pn is passed through ceil (log) 2 (N-1)) bit code. Here, N is the number of prediction parameters selectable for the group to which the subblock SBn belongs.
In general, the number of prediction parameters contained in the reduced set RS is less than the number of selectable prediction parameters for group 1. Therefore, the code amount of the prediction parameter contained in the encoded data #1 is smaller than in the case where the reduced set RS is not used.
Specifically, in the case where the encoded data #1 is data generated by encoding the prediction mode together with a flag indicating whether or not the prediction mode is the same as the estimated value, the code amount of the prediction parameter information # Pn is reduced by ceil (log) as compared with the case where the reduced set RS is not used 2 (Nfs-1))-ceil(log 2 (Nrs-1)) bits. Here, Nfs denotes the number of selectable prediction parameters for each subblock belonging to group 1, and Nrs denotes the number of prediction parameters included in the reduced set RS.
In this way, by using the reduced set RS, the code amount of the encoded data #1 can be reduced.
Further, the sub-block location information # Ln may not be contained in the encoded data # 1. For example, if a common sub-block scanning order is set in advance at the time of encoding and decoding, the sub-block position can be determined based on the information indicating the number of sub-blocks in the encoded data # 1.
< examples of application to other prediction parameters >
Although the above description has been given mainly taking the prediction mode in intra prediction as an example of a prediction parameter, the present invention is not limited to this, and is generally applicable to other parameters used when generating a predicted image in encoding/decoding processing of a moving image.
Hereinafter, an application example in the case where the prediction parameter is a motion vector in motion compensation prediction and an application example in the case where the prediction parameter is a weight coefficient in luminance compensation prediction will be described.
(application example to motion vector)
In the motion compensated prediction, a prediction parameter called a motion vector is used to represent the position of an area on a decoded image used for prediction of a prediction target sub-block.
The motion vector is selected from a set of prediction parameters whose number of elements depends on the image size and the accuracy (interpolation accuracy). For example, when the width (number of pixels in the horizontal direction) of an image is W, the height (number of pixels in the vertical direction) is H, and the interpolation accuracy is 0.25 pixel, a motion vector V is selected from a prediction parameter set S defined by the following equation.
S≡{V|V=((N/4),(M/4))
Here, N, M is an integer satisfying 0. ltoreq. N < 4W and 0. ltoreq. M < 4H.
When the prediction parameter is such a motion vector, the 1 st prediction parameter determining unit 53 may determine and assign a motion vector for each sub-block belonging to the 1 st group, for example. The 1 st prediction parameter decoding unit 43 can decode the motion vector for each sub-block belonging to the 1 st group.
The reduced set derivation units 44 and 54 can generate a reduced set RS from the motion vectors allocated to the respective sub-blocks belonging to the group 1. As described above, the reduced set derivation units 44 and 54 can generate the reduced set RS from the motion vectors allocated to the sub-blocks around the prediction target sub-block.
The other units included in the moving image decoding apparatus 1 and the moving image encoding apparatus 2 can reduce the amount of prediction parameters included in the encoded data #1 by performing the same operation as in the case where the prediction parameters are in the prediction mode.
When the prediction parameter is a motion vector, the reduced set derivation units 44 and 54 may be configured to: a motion vector having a norm of a difference vector between the motion vector and a motion vector allocated to a subblock adjacent to the prediction target subblock and a constant value or less is added to the reduced set RS.
In general, in the case where the prediction parameters are motion vectors, the prediction parameter set contains many prediction vectors. For example, if W is 2000 and H is 1000, the number of motion vectors included in the prediction parameter set S is 8000 × 4000.
On the other hand, the number of motion vectors stored in the reduced set RS is limited to the number of sub-blocks belonging to the 1 st group or the number of sub-blocks around the prediction target sub-block. For example, even when the subblocks included in the neighboring subblock region NSR shown in fig. 8(b) are used, the number of motion vectors stored in the reduced set RS is at most 24.
Therefore, depending on the characteristics of the image to be encoded/decoded, there is a possibility that: even if the reduced set RS is generated from only the motion vectors allocated to the sub blocks surrounding the prediction target sub block, a sufficient number of motion vectors cannot be accumulated in the reduced set RS, and therefore the prediction accuracy is degraded and the amount of residual data increases. By adding a motion vector to the reduced set RS such that the norm of the difference vector between the motion vector and the motion vector allocated to the sub block surrounding the prediction target sub block is equal to or less than a constant value, the amount of code of the prediction parameter can be reduced without increasing the amount of code of the residual data.
(application example of weighting factor in luminance compensation prediction)
In the luminance compensation prediction, the luminance of a prediction target sub-block is predicted using a value obtained by multiplying a weight coefficient by the luminance of each of a plurality of reference pictures that the prediction target sub-block refers to for motion compensation prediction.
The present invention can also be applied to a case where the prediction parameter is set to the weight coefficient. For example, the reduced set derivation units 44 and 54 may be configured to generate the reduced set RS from weighting coefficients assigned to sub-blocks surrounding the prediction target sub-block.
In addition, when the present invention is applied to the weight coefficient, the weight coefficient may be configured to: each value taken by the weight coefficient is associated with a plurality of representative values whose total number is specified in advance, and the representative values are used as prediction parameters.
For example, when the value W of the weight coefficient can be all real values (or values of a predetermined number of bits) satisfying 0 ≦ W ≦ 1, the following configuration may be adopted: values Wn satisfying all weight coefficients of (n/X). ltoreq.wn.ltoreq ((n +1)/X) are associated with the representative value w, and the representative value w is used as a prediction parameter. Here, X is a natural number, and n is an integer satisfying 0. ltoreq. n.ltoreq.X-1. By performing such a correspondence, all real values satisfying 0. ltoreq. W.ltoreq.1 can be mapped to a set of representative values Wn whose total number is X. The specific value of X may be set to, for example, a smaller code amount of encoded data.
By limiting the number of elements used as prediction parameters to a predetermined number in this manner, the amount of coded data can be reduced compared to the case where weighting coefficients are used as prediction parameters directly.
(Note attached)
An image encoding device according to the present invention is an image encoding device for encoding a difference between an input image and a predicted image, and is characterized by comprising: a classifying unit that divides the predicted image into a plurality of unit regions and classifies a plurality of prediction units included in each unit region into a 1 st group or a 2 nd group; 1 st selecting means for selecting a prediction parameter for specifying a method of generating a predicted image in each prediction unit belonging to the 1 st group from a basic set including a predetermined prediction parameter; a 2 nd selecting means for selecting a prediction parameter for specifying a method of generating a predicted image in each prediction unit belonging to the 2 nd group from a reduced set including at least a part of the prediction parameters selected by the 1 st selecting means and including prediction parameters equal to or less than the number of prediction parameters included in the basic set; and prediction parameter encoding means for encoding which prediction parameters have been selected by the 1 st selecting means for each prediction unit belonging to the 1 st group, and which prediction parameters have been selected by the 2 nd selecting means for each prediction unit belonging to the 2 nd group.
According to the image encoding device configured as described above, the prediction parameters for specifying the method of generating the predicted image in each prediction unit belonging to the 2 nd group are selected from the reduced set including at least some of the prediction parameters selected by the 1 st selection means for each prediction unit belonging to the 1 st group included in the same unit region as the 2 nd group and including the prediction parameters equal to or less than the number of the prediction parameters included in the basic set, and the 2 nd selection means selects which of the prediction parameters are selected for encoding.
Here, since there is generally a correlation between the prediction parameter for each prediction unit and the prediction parameter for the prediction unit located in the vicinity of the prediction unit, the prediction parameter selected for each prediction unit belonging to the 1 st group is highly likely to be an appropriate prediction parameter for each prediction unit belonging to the 2 nd group. That is, for each prediction unit belonging to the group 2, the prediction parameter selected from the reduced set is highly likely to be an appropriate prediction parameter. Therefore, according to the above configuration, the prediction parameter can be encoded without reducing the encoding efficiency.
In the above configuration, the reduced set is a set including at least a part of the prediction parameters selected by the 1 st selection means and is a set of prediction parameters equal to or less than the number of prediction parameters included in the basic set, and therefore the amount of code of information indicating which prediction parameters are selected for each prediction unit belonging to the 2 nd group can be reduced.
Therefore, according to the above configuration, the amount of code for specifying the prediction parameter can be reduced without sacrificing the coding efficiency.
Preferably, the reduced set includes only all of the prediction parameters selected by the 1 st selecting means and different from each other.
According to the above configuration, the number of prediction parameters included in the reduced set can be reduced, and thus the amount of code can be further reduced. More specifically, since the prediction parameters are generally spatially correlated, the optimal distribution of the prediction parameters for each prediction unit in a specific area is unbalanced. Therefore, in the specific region, there is a high probability that only a part of the plurality of prediction parameters included in the basic set is used. Therefore, the number of elements in the set of prediction parameters selected by the 1 st selection unit in a specific region is often smaller than the number of elements in the set of prediction parameters included in the basic set. In this way, the number of elements in the reduced set can be reduced by using as the reduced set all the sets of the non-overlapping prediction parameters selected by the 1 st selecting means.
In addition, each of the plurality of unit regions is preferably a coding unit in the image coding apparatus.
According to the above configuration, the processing for generating the reduced set can be executed once for each coding unit (for example, a macroblock in the h.264/MPEG-4AVC specification), and thus the amount of processing for generating the reduced set can be reduced.
In the image encoding device according to the present invention, it is preferable that the prediction units belonging to the 1 st group and the prediction units belonging to the 2 nd group are arranged in a checkerboard shape (a checkerboard shape).
In general, there is a correlation between a prediction parameter in each prediction unit and a prediction parameter in a neighboring prediction unit.
According to the above configuration, since the prediction units belonging to the 1 st group and the prediction units belonging to the 2 nd group are arranged in a checkerboard shape (a checkerboard shape), it is highly likely that the prediction parameters selected for the prediction units belonging to the 1 st group are appropriate prediction parameters for the prediction units belonging to the 2 nd group.
Therefore, according to the above configuration, the amount of code required for encoding the prediction parameter can be reduced without sacrificing the encoding efficiency.
In addition, the above prediction parameters may be used to specify a prediction mode in intra prediction.
According to the above configuration, the amount of code required for encoding the prediction mode in intra prediction can be reduced without sacrificing encoding efficiency.
Preferably, the 2 nd selecting means selects a prediction parameter for specifying a method of generating a predicted image in the 2 nd group of prediction units from among a reduced set including the prediction parameter selected by the 1 st selecting means and including at least one of a vertical prediction mode, a horizontal prediction mode, and a DC prediction mode in intra prediction.
In general, the vertical direction prediction mode, the horizontal method prediction mode, and the DC prediction mode are prediction modes that are selected frequently in intra prediction.
According to the above configuration, since the 2 nd selecting means selects the prediction parameters for specifying the method of generating the predicted image in the prediction unit belonging to the 2 nd group from the reduction set including the prediction parameters selected by the 1 st selecting means and including at least one of the vertical direction prediction mode, the horizontal direction prediction mode, and the DC prediction mode in the intra prediction, it is possible to reduce the amount of code without reducing the prediction accuracy when generating the predicted image in the prediction unit belonging to the 2 nd group.
Further, the following configuration is possible: the 2 nd selecting means selects a prediction parameter from the reduced set when the number of prediction units in a unit area including the 1 st group and the 2 nd group is equal to or greater than a predetermined threshold, and otherwise, the 2 nd selecting means selects a prediction parameter from the basic set.
According to the above configuration, when the number of prediction units in the unit area is smaller than a predetermined value, the prediction parameter can be selected from the basic set, and therefore, the amount of processing for selecting the prediction parameter can be reduced.
In the image encoding device according to the present invention, the image encoding device may be configured to: the basic set may be set for each unit area, and the 2 nd selecting means may select the prediction parameter from the reduced set when the basic set for the unit area including the 1 st group and the 2 nd group satisfies a specific condition, or the 2 nd selecting means may select the prediction parameter from the basic set.
According to the above configuration, since the basic set can be set for each unit area, and the 2 nd selecting means selects the prediction parameters from the reduced set when the basic set for the unit area including the 1 st group and the 2 nd group satisfies a specific condition, and otherwise selects the prediction parameters from the basic set, the amount of processing for selecting the prediction parameters can be reduced, and the amount of code can be reduced.
The image encoding device according to the present invention may further include: an image encoding device that encodes a difference between an input image and a predicted image, comprising: a selection unit that selects a prediction parameter for specifying a generation method of a predicted image in each prediction unit from among a reduced set including at least a part of prediction parameters for specifying a generation method of a predicted image in a prediction unit that is located in the vicinity of the prediction unit and that has been encoded; and a prediction parameter encoding unit that encodes which prediction parameters have been selected by the selection unit for each prediction unit.
In general, there is a correlation between a prediction parameter for each prediction unit and a prediction parameter for a prediction unit located in the vicinity of the prediction unit. Therefore, in the generation of a prediction image in the prediction unit, the prediction parameter is most likely to be included in the reduced set. In addition, since the reduced set is composed of at least some of the prediction parameters for the prediction units located in the vicinity of the prediction unit, the number of prediction parameters included in the reduced set is smaller than the number of prediction parameters included in a parameter set composed of prediction parameters for prediction units other than the prediction unit.
Therefore, the image encoding device according to the present invention can generate encoded data with a small code amount without sacrificing encoding efficiency by adopting the above-described configuration.
Preferably, the prediction parameter encoding unit uses a code shorter than the code length of the code indicating which prediction parameters have been selected by the 1 st selecting unit as the code indicating which prediction parameters have been selected by the 2 nd selecting unit.
According to the above configuration, since the prediction parameter encoding means can use, as the code indicating which prediction parameters have been selected by the 2 nd selecting means, a code having a shorter code length than the code indicating which prediction parameters have been selected by the 1 st selecting means, it is possible to encode information indicating which prediction parameters have been selected by using a code having a shorter code length for each prediction unit belonging to the 2 nd group.
In addition, it is preferable that the 2 nd selecting means includes 2 prediction parameters selected by the 1 st selecting means n And +1 (n is an arbitrary natural number) prediction parameters, the prediction parameters defining the method of generating the predicted image in the prediction unit belonging to the 2 nd group are selected.
Generally, the ratio of 2 n When coding an element group consisting of +1 (n is an arbitrary natural number) elements, the number of elements is 2 or more n When encoding an element group consisting of elements other than +1, the compression efficiency is improved.
According to the above configuration, the number of prediction parameters including the prediction parameter selected by the 1 st selection means can be selected from the number 2 n The present invention has been made in view of the above-described circumstances, and an object thereof is to provide a technique for encoding a prediction image that can improve compression efficiency when encoding prediction parameters, by selecting prediction parameters that specify a method for generating a prediction image in a prediction unit belonging to the above-described group 2 from among reduced sets of +1 (n is an arbitrary natural number) prediction parameters and encoding the selected prediction parameters.
An image decoding device according to the present invention is a decoding device for decoding encoded data obtained by encoding a difference between an original image and a predicted image together with selection information indicating which of a plurality of prediction parameters for specifying a method of generating the predicted image is selected for each prediction unit, the decoding device including: a classifying unit that classifies a plurality of prediction units included in each of a plurality of unit regions constituting a prediction image into a 1 st group or a 2 nd group; a 1 st selecting unit that selects prediction parameters for specifying a method of generating a predicted image in each prediction unit belonging to the 1 st group from a basic set consisting of predetermined prediction parameters, with reference to selection information for each prediction unit belonging to the 1 st group; and a 2 nd selecting unit configured to select, with reference to selection information for each prediction unit belonging to the 2 nd group, a prediction parameter for specifying a method for generating a predicted image in each prediction unit belonging to the 2 nd group from a reduced set including at least a part of the prediction parameters selected by the 1 st selecting unit and including prediction parameters equal to or less than the number of prediction parameters included in the basic set.
According to the image decoding device configured as described above, the prediction parameters for specifying the method of generating the predicted image in each prediction unit belonging to the 2 nd group can be selected from the reduced set including at least some of the prediction parameters selected by the 1 st selection means for each prediction unit belonging to the 1 st group included in the unit region identical to the 2 nd group and including the prediction parameters equal to or less than the number of the prediction parameters included in the basic set.
Here, since there is generally a correlation between the prediction parameter for each prediction unit and the prediction parameter for the prediction unit located in the vicinity of the prediction unit, the prediction parameter selected for each prediction unit belonging to the 1 st group is highly likely to be an appropriate prediction parameter for each prediction unit belonging to the 2 nd group. Therefore, according to the above configuration, the prediction parameter can be decoded from the selection information with a smaller code amount without reducing the coding efficiency.
Further, it is preferable that the reduced set includes only all the prediction parameters selected by the 1 st selecting means and different from each other.
According to the above configuration, the number of prediction parameters included in the reduced set can be further reduced, and thus the amount of code can be further reduced.
In addition, each of the plurality of unit regions is preferably a decoding unit in the image decoding apparatus.
According to the above configuration, the generation processing of the reduced set may be executed once for each decoding unit (for example, a macroblock in the h.264/MPEG-4AVC standard), and thus the amount of processing for the reduced set generation can be reduced.
In the image decoding device according to the present invention, it is preferable that the prediction units belonging to the 1 st group and the prediction units belonging to the 2 nd group are arranged in a checkerboard shape (a checkerflag shape).
In general, there is a correlation between a prediction parameter in each prediction unit and a prediction parameter in a neighboring prediction unit.
According to the image coding device having the configuration corresponding to the above configuration, since the prediction units belonging to the 1 st group and the prediction units belonging to the 2 nd group are arranged in a checkerboard shape (a checkerboard shape), it is possible to select an appropriate prediction parameter for each prediction unit belonging to the 2 nd group. Therefore, according to the image encoding device having the configuration corresponding to the above configuration, the amount of code required for encoding the prediction parameter can be reduced without sacrificing the encoding efficiency.
According to the image decoding apparatus having the above configuration, it is possible to decode encoded data in which the code amount is further reduced.
In the image decoding device according to the present invention, the prediction parameter may be used to specify a prediction mode in intra prediction.
According to the above configuration, encoded data in which the code amount of the prediction mode in intra prediction is reduced can be decoded without sacrificing the encoding efficiency.
Preferably, the 2 nd selecting means selects a prediction parameter for specifying a method of generating a predicted image in the 2 nd group of prediction units from among a reduced set including the prediction parameter selected by the 1 st selecting means and including at least one of a vertical prediction mode, a horizontal prediction mode, and a DC prediction mode in intra prediction.
In general, the vertical direction prediction mode, the horizontal method prediction mode, and the DC prediction mode are prediction modes that are selected frequently in intra prediction.
According to the image encoding device having a configuration corresponding to the above configuration, since the 2 nd selecting means selects the prediction parameter for specifying the method for generating the predicted image in the prediction unit belonging to the 2 nd group from the reduced set including the prediction parameter selected by the 1 st selecting means and including at least one of the vertical direction prediction mode, the horizontal direction prediction mode, and the DC prediction mode in the intra prediction, the amount of code can be reduced without reducing the prediction accuracy in generating the predicted image in the prediction unit belonging to the 2 nd group.
According to the image decoding apparatus having the above configuration, such encoded data with a small code amount can be decoded.
Further, the following configuration is possible: the 2 nd selecting means selects a prediction parameter from the reduced set when the number of prediction units in a unit area including the 1 st group and the 2 nd group is equal to or greater than a predetermined threshold, and otherwise, the 2 nd selecting means selects a prediction parameter from the basic set.
According to the above configuration, when the number of prediction units in the unit area is smaller than a predetermined value, the prediction parameter can be selected from the basic set, and therefore, the amount of processing for selecting the prediction parameter can be reduced.
The image decoding device according to the present invention may be configured to: the basic set may be set for each unit area, and the 2 nd selecting means may select the prediction parameter from the reduced set when the basic set for the unit area including the 1 st group and the 2 nd group satisfies a specific condition, or the 2 nd selecting means may select the prediction parameter from the basic set.
According to the above configuration, since the basic set can be set for each unit area, and the 2 nd selecting means selects the prediction parameter from the reduced set when the basic set for the unit area including the 1 st group and the 2 nd group satisfies a specific condition, and otherwise selects the prediction parameter from the basic set, it is possible to reduce the amount of processing for selecting the prediction parameter and decode the encoded data with the reduced amount of code.
The image decoding device according to the present invention can further include: an image decoding device for decoding encoded data obtained by encoding a difference between an input image and a predicted image together with selection information indicating which of a plurality of prediction parameters for specifying a method for generating the predicted image is selected for each prediction unit, the image decoding device comprising: and a selection unit that selects, with reference to the selection information, a prediction parameter for specifying a method of generating a predicted image in each prediction unit from among a reduced set including at least a part of prediction parameters for specifying a method of generating a predicted image in a decoded prediction unit located in the vicinity of the prediction unit.
In general, there is a correlation between a prediction parameter for each prediction unit and a prediction parameter for a prediction unit located in the vicinity of the prediction unit. Therefore, the reduced set is highly likely to include prediction parameters that are optimal for generating a prediction image in the prediction unit. In addition, since the reduced set is composed of at least some of the prediction parameters for the prediction units located in the vicinity of the prediction unit, the number of prediction parameters included in the reduced set is smaller than the number of prediction parameters included in a parameter set composed of prediction parameters for prediction units other than the prediction unit.
Therefore, the image encoding device having the configuration corresponding to the above configuration can generate encoded data with a small code amount without sacrificing the encoding efficiency.
The image decoding apparatus having the above-described configuration can decode such encoded data with a small code amount.
Preferably, the 2 nd selecting means includes 2 nd prediction parameters selected by the 1 st selecting means n And +1 (n is an arbitrary natural number) prediction parameters, the prediction parameters defining the method of generating the predicted image in the prediction unit belonging to the 2 nd group are selected.
Generally, in the pair 2 n When coding an element group consisting of +1 (n is an arbitrary natural number) elements, the number of elements is 2 or more n When encoding an element group consisting of elements other than +1 elements, the compression efficiency is improved.
With the above configuration, the encoded data having high compression efficiency can be decoded.
The data structure of encoded data according to the present invention is a data structure of encoded data obtained by encoding a difference between an input image and a predicted image together with selection information indicating which of a plurality of prediction parameters for specifying a method of generating a predicted image is selected for each prediction unit, and includes selection information to be referred to for selecting a prediction parameter for specifying a method of generating a predicted image in each prediction unit from a reduced set including at least a part of prediction parameters for specifying a method of generating a predicted image in a prediction unit that is located in the vicinity of the prediction unit and has been decoded, in an image decoding device that decodes the encoded data.
In general, there is a correlation between a prediction parameter for each prediction unit and a prediction parameter for a prediction unit located in the vicinity of the prediction unit. Therefore, the reduced set is highly likely to include prediction parameters that are optimal for generating a prediction image in the prediction unit. In addition, since the reduced set is configured by at least a part of the prediction parameters for the prediction units located in the vicinity of the prediction unit, the number of prediction parameters included in the reduced set is smaller than the number of prediction parameters included in the parameter set configured by the prediction parameters for the prediction units other than the prediction unit.
Therefore, the encoded data having the above-described configuration is encoded data in which the amount of code is reduced without sacrificing the encoding efficiency.
The present invention is not limited to the above embodiments, and various modifications can be made within the scope shown in the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments are also included in the technical scope of the present invention.
Industrial applicability
The present invention is preferably applicable to an image encoding device that encodes an image to generate encoded data, and an image decoding device that decodes encoded data generated using such an image encoding device.
Description of the reference symbols
1 moving picture decoding apparatus
14 MB decoding unit
144 prediction parameter decoding unit
41 set judgment part (classification means)
42 switching part
43 st prediction parameter decoding part (1 st selection means)
44 reduced set derivation section
45 nd prediction parameter decoding part (2 nd selecting means)
2-motion picture coding apparatus
24 MB coding unit
242 prediction parameter determination unit
51 sets of judgment units (classification means)
52 switching part
53 No. 1 prediction parameter determining part (No. 1 selecting means)
54 reduced set deriving part
55 2 nd prediction parameter determining part (2 nd selecting means)
243 prediction parameter encoding unit (prediction parameter encoding means)
248 predictive image generating part

Claims (4)

1. An image decoding method for decoding a bitstream, the method comprising:
decoding from the bitstream:
a residual image of each of the plurality of prediction units; and
a prediction parameter for generating a prediction image to be applied to each of the plurality of prediction units;
wherein the prediction parameter is any one of:
1 st prediction parameter contained in a basic set of prediction parameters, said basic set of prediction parameters consisting of predetermined prediction parameters, or
A 2 nd prediction parameter contained in the prediction parameter reduction set, wherein:
the 2 nd prediction parameter is decoded from a bit string having a length determined according to the number of prediction parameters contained in the prediction parameter reduction set,
the prediction parameter reduction set includes at least one prediction parameter included in a neighboring prediction unit region of a target prediction unit selected from the plurality of prediction units,
the number of prediction parameters contained in the prediction parameter reduced set is smaller than the number of prediction parameters contained in the prediction parameter basic set,
wherein decoding the prediction parameter to be applied to each of the plurality of prediction units is in accordance with a value of a flag for each prediction unit contained in the bitstream such that the prediction parameter is decoded by using the 1 st prediction parameter or the prediction parameter is decoded by using the 2 nd prediction parameter, and
in a case where there are prediction parameters identical to each other among at least two prediction parameters contained in the vicinity prediction unit region of the target prediction unit, the prediction parameter reduction set contains one of the prediction parameters identical to each other.
2. The image decoding method according to claim 1, wherein:
each of the prediction parameters is an intra prediction mode used in intra prediction.
3. An image decoding apparatus for decoding a bitstream, the apparatus comprising:
circuitry configured to:
decoding from the bitstream:
a residual image of each of the plurality of prediction units; and
a prediction parameter for generating a prediction image to be applied to each of the plurality of prediction units;
wherein the prediction parameter is any one of:
1 st prediction parameter contained in a basic set of prediction parameters, said basic set of prediction parameters consisting of predetermined prediction parameters, or
A 2 nd prediction parameter contained in the reduced set of prediction parameters, wherein:
the 2 nd prediction parameter is decoded from a bit string having a length determined according to the number of prediction parameters contained in the prediction parameter reduction set,
the reduced set of prediction parameters includes at least one prediction parameter included in a neighboring prediction unit region of a target prediction unit selected from the plurality of prediction units,
the number of prediction parameters contained in the prediction parameter reduced set is smaller than the number of prediction parameters contained in the prediction parameter basic set,
wherein decoding the prediction parameter to be applied to each of the plurality of prediction units is in accordance with a value of a flag for each prediction unit contained in the bitstream such that the prediction parameter is decoded by using the 1 st prediction parameter or the prediction parameter is decoded by using the 2 nd prediction parameter, and
in a case where there are prediction parameters identical to each other among at least two prediction parameters contained in the vicinity prediction unit region of the target prediction unit, the prediction parameter reduction set contains one of the prediction parameters identical to each other.
4. The image decoding device according to claim 3, wherein:
each of the prediction parameters is an intra prediction mode used in intra prediction.
HK19121068.1A 2010-02-24 2019-03-18 Image decoding device HK1261441B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010-039293 2010-02-24

Publications (2)

Publication Number Publication Date
HK1261441A1 HK1261441A1 (en) 2020-01-03
HK1261441B true HK1261441B (en) 2023-03-31

Family

ID=

Similar Documents

Publication Publication Date Title
CN102484698B9 (en) Method for encoding and decoding image, encoding device and decoding device
HK1217253A1 (en) Image decoding device
JP5919407B2 (en) Video decoding device
KR101479141B1 (en) Coding Method and Apparatus by Using Tree Structure
JP6212890B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
HK1261441B (en) Image decoding device
HK1261441A1 (en) Image decoding device
HK1217254B (en) Image decoding device
CN114788276B (en) Image data encoding and decoding
HK1217255B (en) Image decoding device
WO2011048904A1 (en) Image encoding apparatus, image decoding apparatus, and data structure of encoded data
JP5469931B2 (en) Video decoding method, video encoding method
HK1180154A (en) Image encoding device, image decoding device, and data structure