WO2011048904A1 - 画像符号化装置、画像復号装置、および、符号化データのデータ構造 - Google Patents

画像符号化装置、画像復号装置、および、符号化データのデータ構造 Download PDF

Info

Publication number
WO2011048904A1
WO2011048904A1 PCT/JP2010/066248 JP2010066248W WO2011048904A1 WO 2011048904 A1 WO2011048904 A1 WO 2011048904A1 JP 2010066248 W JP2010066248 W JP 2010066248W WO 2011048904 A1 WO2011048904 A1 WO 2011048904A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
unit
prediction
target
rectangular
Prior art date
Application number
PCT/JP2010/066248
Other languages
English (en)
French (fr)
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 シャープ株式会社
Priority to EP10824755.2A priority Critical patent/EP2493196A4/en
Priority to CN201080046955.0A priority patent/CN102577391A/zh
Priority to US13/502,703 priority patent/US20120219232A1/en
Priority to JP2011537184A priority patent/JPWO2011048904A1/ja
Publication of WO2011048904A1 publication Critical patent/WO2011048904A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type

Definitions

  • the present invention relates to an image coding apparatus and an image coding method for generating coded data by coding an image.
  • the present invention also relates to an image decoding apparatus and an image decoding method for generating an image by decoding encoded data generated using such an image encoding apparatus.
  • a moving picture coding apparatus is used to efficiently transmit or record moving pictures.
  • a moving picture coding method in the moving picture coding apparatus for example, H.264 shown in Non-Patent Document 1 is used. H.264 / AVC is mentioned.
  • the image to be encoded is divided into a plurality of blocks and then encoded.
  • a technology is employed in which a predicted image is generated with reference to a decoded region in the same frame as the target block, and a difference image between the predicted image and the target block is coded. ing.
  • Patent Document 1 a reverse L character target adjacent area adjacent to the prediction target area and a search area are set, and the sum of absolute error values is the smallest with respect to the target adjacent area in the search area.
  • An image characterized by generating a prediction signal for the prediction target area by searching for the prediction adjacent area which is the area where the prediction target area is and setting the area adjacent to the prediction adjacent area as the texture signal for the prediction target area.
  • a predictive coding device is disclosed.
  • Patent Document 1 searches for an area similar to the inverted L character target adjacent area by scanning the search area two-dimensionally, calculation when performing the search There is a problem that the amount is large and the speed of generating a predicted image is reduced.
  • Patent Document 1 sets the prediction target area to a square. Therefore, for example, in the case where the image to be encoded includes an edge whose curvature changes, it is not possible to search for an appropriate predicted adjacent region, and there is a problem that the encoding efficiency decreases. There is.
  • the present invention has been made in view of the above problems, and an object thereof is that the image to be encoded includes an edge whose curvature changes while reducing the amount of calculation at the time of searching. Even if, it is in realizing an image coding device with high coding efficiency.
  • an image coding apparatus for coding a target image divided into a plurality of blocks for each block, in which a plurality of long sides are adjacent to each other.
  • a prediction residual obtained by subtracting a predicted image from a target image on a target block divided into rectangular regions is quantized for each quantization unit consisting of one or more rectangular regions selected from the plurality of rectangular regions.
  • inverse quantization means for generating a decoded image on a target quantization unit by adding a difference to the prediction image
  • predicted image generation means for generating a prediction image on the target block for each of the rectangular regions Therefore, a rectangular area on the decoded image facing the long side of the target rectangular area is used as a template, and a rectangular area facing the long side opposite to the side facing the target rectangular area of the template is parallel to the long side direction.
  • a predicted image generation unit configured to generate a predicted image on a target rectangular region by searching for a region having the highest correlation with the template among regions on the decoded image obtained by moving. It is characterized by
  • a rectangular area on the decoded image facing the long side of the target rectangular area is used as a template, and the long side opposite to the side facing the target rectangular area of the template
  • the predicted image on the target rectangular area is generated by searching the area having the highest correlation with the template among the areas on the decoded image obtained by translating the rectangular area facing in parallel in the long side direction. be able to.
  • the region on the decoded image obtained by translating the rectangular region in the long side direction is scanned one-dimensionally in the region having the highest correlation with the template. Search by Therefore, according to the above-described image coding apparatus, the amount of calculation at the time of searching can be reduced compared to the case of performing two-dimensional scanning as in the technique described in Patent Document 1, This produces an effect that the generation of a predicted image can be performed at high speed.
  • the above-mentioned image encoding apparatus performs a search for each of the rectangular regions, it is possible to accurately generate a predicted image even when the target image includes an edge whose curvature changes. it can. That is, even in the case where the target image includes an edge whose curvature changes, the coding efficiency is high.
  • the data structure of encoded data according to the present invention is a data structure of encoded data obtained by encoding a target image divided into a plurality of blocks for each block.
  • a prediction residual obtained by subtracting the predicted image from the target image on the target block divided into a plurality of rectangular regions whose long sides are adjacent to each other, the one or more rectangles selected from the plurality of rectangular regions.
  • the prediction image on the target block is generated for each of the rectangular regions, including the encoded data generated by performing quantization on each quantization unit of the regions, and the predicted image on each of the rectangular regions is generated.
  • the decoding device can perform the decoding process based on the predicted image of each rectangular area and the quantized prediction residual of each quantization unit. Therefore, according to the above configuration, it is possible to realize the data structure of encoded data with high decoding efficiency.
  • an image decoding apparatus is an image decoding apparatus that generates a decoded image divided into a plurality of blocks for each block, in a plurality of rectangular regions in which long sides are adjacent to each other.
  • Inverse quantization means for generating a decoded image on a divided target block for each quantization unit consisting of one or more rectangular regions selected from the plurality of rectangular regions, and performing inverse quantization on the quantization value
  • An inverse quantization unit that generates a decoded image on a target quantization unit by adding the obtained prediction residual to a predicted image; and a predicted image generation unit that generates the predicted image for each of the rectangular regions,
  • a rectangular area on the decoded image facing the long side of the target rectangular area is used as a template, and a rectangular area facing the long side opposite to the side facing the target rectangular area of the template is used as the template.
  • Predictive image generation means for generating a predicted image on the target rectangular region by searching for a region having the highest correlation with the template among regions
  • a rectangular area on the decoded image facing the long side of the target rectangular area is used as a template, and the long side opposite to the side facing the target rectangular area of the template Generating a predicted image on the target rectangular region by searching for a region having the highest correlation with the template among regions on the decoded image obtained by translating the opposing rectangular region in the long side direction in parallel Can.
  • the region having the highest correlation with the template is scanned one-dimensionally in the region on the decoded image obtained by translating the rectangular region in the long side direction.
  • the amount of calculation at the time of searching can be reduced as compared with the case of performing two-dimensional scanning as in the technique described in Patent Document 1, prediction
  • the effect is that image generation can be performed at high speed.
  • the above-described image decoding apparatus performs the search for each of the rectangular regions, it is possible to accurately generate a predicted image even when the target image includes an edge whose curvature changes. It plays an effect.
  • the present invention it is possible to generate a predicted image at a high speed as compared to the case where the predicted image is generated by a two-dimensional search. Further, even in the case where the image to be encoded includes an edge or the like in which the curvature changes, encoding with high encoding efficiency can be performed.
  • FIG. 7 is a diagram for explaining the operation of the TM prediction unit shown in FIG. 2; (A) shows the relationship between the prediction target area, the template, and the search area, and (b) shows the relation between the search area and the search candidate. It is a figure which shows the relationship between an object macroblock and a prediction unit.
  • (A) shows the case where the size of the prediction unit is 16 pixels ⁇ 1 pixel
  • (b) shows the case where the size of the prediction unit is 1 pixel ⁇ 16 pixels
  • (c) shows the size of the prediction unit Indicates that 4 pixels ⁇ 1 pixel
  • (d) indicates that the size of the prediction unit is 1 pixel ⁇ 4 pixels.
  • (A) shows the case where there are two curve edges going from the top to the bottom in the target macroblock, and the curvature of the curve edge increases toward the bottom of the MB; (b) when predicted by direction prediction (C) shows a case where intra TM prediction is performed with a square area as a prediction unit, and (d) shows the MB encoding unit shown in FIG. 1 with 16 ⁇ 1 pixels as a prediction unit. It is the figure which showed the case where encoding was performed using. It is a block diagram which shows the structure of the image coding apparatus provided with MB coding part shown in FIG. It is a block diagram which shows the structure of MB decoding part concerning the 1st Embodiment of this invention.
  • FIG. 17 is a block diagram showing a configuration of a TM prediction unit that configures the MB coding unit shown in FIG.
  • FIG. 17 is a block diagram which shows the structure of MB decoding part which comprises the image decoding apparatus which concerns on the 3rd Embodiment of this invention.
  • FIG. 17 is a figure for demonstrating the operation
  • Embodiment 1 An image coding apparatus 100 and an image decoding apparatus 150 which are the first embodiment of the image coding apparatus and the image decoding apparatus according to the present invention will be described with reference to FIGS. 1 to 10.
  • elements having the same function are denoted by the same reference numerals, and the description thereof is omitted.
  • an image coding apparatus / image decoding apparatus which divides an image into a plurality of macro blocks (hereinafter referred to as "MB") and performs coding processing / decoding processing for each MB in raster scan order. Assume. Further, MB is divided into a plurality of prediction units, and a prediction image is generated for each prediction unit. The prediction unit to be processed at a certain point is called a prediction target area.
  • MB macro blocks
  • TM prediction unit 105 which is a component common to the image encoding device 100 and the image decoding device 150, will be described based on FIGS. 2 to 3.
  • FIG. 1 the TM prediction unit 105, which is a component common to the image encoding device 100 and the image decoding device 150, will be described based on FIGS. 2 to 3.
  • FIG. 1 the TM prediction unit 105, which is a component common to the image encoding device 100 and the image decoding device 150, will be described based on FIGS. 2 to 3.
  • FIG. 2 is a block diagram showing the configuration of the TM prediction unit 105.
  • the TM prediction unit 105 includes a search area setting unit 101, a template setting unit 102, a template comparison unit 103, and a predicted image generation unit 104.
  • the TM prediction unit 105 executes template matching based on prediction unit information # 106 described later and a decoded image # 109 recorded in a frame memory 109 described later, and a predicted image # 105 based on the result of template matching.
  • the prediction unit information # 106 includes information indicating the shape and the position of the region to be predicted, as described later.
  • the prediction unit information # 106 is used as the position of the prediction target area at the upper left of the prediction target area. It is assumed that the coordinates of a corner pixel (based on the pixel at the upper left corner of the input image) are indicated. Then, the width of the prediction target area is puw, the height of the prediction target area is puh, and the position of the prediction target area, that is, the coordinates of the pixel at the upper left corner of the prediction target area is denoted as (pux, puy). The units of puw, puh, pux and puy are all "pixels". In addition, although the size of the preferable prediction unit in this embodiment is mentioned later, in description of TM estimation part 105, it is not necessary to assume the prediction unit of a specific size especially.
  • the template setting unit 102 sets a template corresponding to the prediction target area based on the input prediction unit information # 106, and outputs template information # 102 that is information about the template.
  • the template setting unit 102 is adjacent to the upper side of the prediction target area, and has a width equal to the width of the prediction target area and a height of one pixel.
  • Set as template That is, in the case of puw ⁇ puh, an area having a size of puw ⁇ 1 pixel located at (pux, puy ⁇ 1) is set as a template.
  • the region to be predicted is a vertically long rectangle, a region adjacent to the left side of the region to be predicted, having a height equal to the height of the region to be predicted and a width of 1 pixel, is set as a template.
  • FIG. (A) of FIG. 3 is a figure which shows a prediction object area
  • the search area shown in FIG. 3A will be described later.
  • the search area setting unit 101 sets a search area corresponding to the area to be predicted based on the input prediction unit information # 106 and the template information # 102, and searches area information # that is information on the search area. Output 101.
  • the search area setting unit 101 is located at ( ⁇ , ⁇ 2) in relative coordinates (pixel unit) with respect to the prediction target area, An area having a width of (width of prediction target area + 2 ⁇ ) pixels and a height of 1 pixel is set as a search area.
  • a region of (puw + 2 ⁇ ) ⁇ 1 pixel size located at (pux ⁇ , puy ⁇ 2) is set as a search region.
  • the prediction target area is a vertically long rectangle
  • the relative coordinates with respect to the prediction target area are located at (-2, -.alpha.)
  • the height is (the height of the prediction target area + 2.alpha.) Pixels
  • the width is An area of one pixel is set as a search area.
  • puw ⁇ puh an area having a size of 1 pixel ⁇ (puh + 2 ⁇ ) pixels located at (pux ⁇ 2, puy ⁇ ) is set as the search area.
  • a search area when the size of the prediction target area is 4 ⁇ 1 pixel is shown in FIG.
  • the template comparison unit 103 executes template matching based on the template information # 102, the search area information # 101, and the decoded image # 109 recorded in the frame memory 109 described later, thereby generating a predicted image generation parameter #. 103 is derived and output.
  • the predicted image generation parameter # 103 is information indicating the position of a region that approximates the region to be predicted. For example, among partial areas in the search area, the position (position relative to the template) of the partial area that most closely approximates the decoded image on the template can be used as the predicted image generation parameter # 103. In that case, the predicted image generation parameter # 103 can be derived by the following procedures S1 to S3.
  • Step S1 the template comparison unit 103 generates a list of search candidates.
  • the search candidate is a partial area in the search area congruent with the template.
  • each search candidate can be specified by a search index assigned to the search area. For example, as shown in FIG. 3B, when the size of the template is 4 ⁇ 1 pixel and the size of the search area is 8 ⁇ 1 pixel, the offset value spos (0, 1) from the left end of the search area , 2, 3, 4), and sets five types of search candidates. In this case, the offset value can be used as a search index.
  • Step S2 the template comparison unit 103 calculates, for each search candidate, an evaluation value indicating the dissimilarity of the decoded image on the template and the decoded image on the search candidate.
  • an evaluation value used here SAD (Sum of Absolute Difference), SSD (Sum of Squared Difference) etc. are mentioned, for example.
  • Step S3 the template comparison unit 103 specifies a search candidate (that is, a search candidate which most closely approximates the template) which minimizes the dissimilarity calculated in step S2. Then, the relative position of the specified search candidate with respect to the template is calculated, and is output as a predicted image generation parameter # 103 indicating the calculated position.
  • a search candidate that is, a search candidate which most closely approximates the template
  • the search candidate may be set by another method. For example, by reducing the number of search candidates, it is possible to derive the predicted image generation parameter # 103 with a smaller amount of processing although the accuracy is reduced.
  • the position of the search candidate in the search area can be set in units smaller than one pixel, for example, in 0.5 pixel units or 0.25 pixel units.
  • an interpolation value obtained by applying the interpolation filter to the pixel value of the decoded image at the integer position is used as the pixel value of the decoded image in the search candidate.
  • the position of the search candidate can be finely adjusted, and template matching can be performed on more search candidates. Therefore, although the amount of processing is increased, the possibility of detecting a search candidate that more closely approximates the decoded image on the template can be increased.
  • Prediction image generation unit 104 Based on predicted image generation parameter # 103 derived by template comparison unit 103 and decoded image # 109 recorded in frame memory 109, predicted image generation unit 104 generates a predicted image # corresponding to the target area for prediction. Generate 105 and output.
  • each pixel value P (pux + i, puy + j) of the predicted image (where i and j) Is 0 ⁇ i ⁇ puw, and 0 ⁇ j ⁇ puh) is derived by the following equation.
  • Ir (x, y) the pixel value of the pixel (x, y) of the decoded image.
  • x or y is a decimal
  • the interpolated pixel value generated by applying the interpolation filter to the pixel value of the neighboring decoded image is used.
  • the TM prediction unit 105 generates the predicted image # 105 corresponding to the region to be predicted based on the input prediction unit information # 106 and the decoded image # 109 recorded in the frame memory 109. And output.
  • the MB encoding unit 110 is for encoding an input image corresponding to each MB to generate encoded data corresponding to the MB, and is used by the image encoding apparatus 100 as described later. .
  • FIG. 1 is a block diagram showing the configuration of the MB coding unit 110.
  • the MB coding unit 110 includes a TM prediction unit 105, a prediction unit division unit 106, a prediction residual coding unit 107, a decoded image generation unit 108, and a frame memory 109.
  • process target MB the thing of MB which is a process target of the MB encoding part 110 at a certain time.
  • the prediction unit division unit 106 divides the processing target macroblock into predetermined units (hereinafter, referred to as “prediction units”), and outputs prediction unit information # 106, which is information on each prediction unit.
  • Prediction unit information # 106 includes information on the position and size of each prediction unit.
  • the size of the macroblock to be processed is 16 pixels ⁇ 16 pixels
  • the present invention is not limited to this, and the size of a general macroblock is described. It can apply.
  • FIG. 4 An example of division into prediction units in the prediction unit division unit 106 is shown in (a) to (d) of FIG.
  • FIG. 4 shows the case where the size of the prediction unit is 16 pixels ⁇ 1 pixel
  • (b) shows the case where the size of the prediction unit is 1 pixel ⁇ 16 pixels
  • (c) Indicates a case where the size of the prediction unit is 4 pixels ⁇ 1 pixel
  • (d) indicates a case where the size of the prediction unit is 1 pixel ⁇ 4 pixels.
  • the prediction unit division unit 106 vertically aligns the processing target macroblocks by division lines extending in the horizontal direction. Divide into 16 prediction units. Further, as shown in (b) of FIG. 4, when the size of the prediction unit is 1 pixel ⁇ 16 pixels, the prediction unit division unit 106 extends the processing target macroblock in the horizontal direction by the division line extending in the vertical direction. Divide into 16 side-by-side prediction units. Also, as shown in (c) of FIG. 4, when the size of the prediction unit is 4 pixels ⁇ 1 pixel, the prediction unit division unit 106 selects 16 macroblocks to be processed in the vertical direction and 4 in the horizontal direction. Divide into a total of 64 prediction units.
  • the prediction unit division unit 106 selects four macroblocks to be processed in the vertical direction and 16 in the horizontal direction. Divide into a total of 64 prediction units.
  • a prediction unit index is assigned to each prediction unit. As shown in (a) to (d) of FIG. 4, the prediction unit index is an integer of 0 or more, and is assigned in ascending order of raster scan in the macro block.
  • the prediction unit information # 106 is sequentially output in the ascending order of the prediction unit index.
  • the prediction residual coding unit 107 generates coded data # 110 and decoding residual # 107 based on the prediction image # 105, prediction unit information # 106, and input image # 113 corresponding to each prediction unit input. Generate and output.
  • the encoded data # 110 and the decoding residual # 107 are generated by the following procedures S11 to S15.
  • the prediction residual coding unit 107 identifies the prediction target area based on the input prediction unit information # 106, and the difference image between the input image # 113 and the prediction image # 105 in the prediction target area. , That is, generate prediction residuals.
  • the prediction residual coding unit 107 performs frequency transform on the same size as the size of the prediction unit (for example, for a prediction unit of 16 ⁇ 1 pixels). And 16 ⁇ 1 DCT (Discrete Cosine Transform) is applied to generate transform coefficients of the prediction residual.
  • the prediction residual coding unit 107 performs frequency conversion for each quantization unit of the same size as the prediction unit, and generates a conversion coefficient of the prediction residual.
  • frequency transformation refers to orthogonal transformation that transforms a space domain representation of an image into a frequency domain representation.
  • Step S13 Subsequently, the prediction residual coding unit 107 quantizes the transform coefficient generated in step S12 to generate a quantized transform coefficient.
  • the prediction residual coding unit 107 generates a variable-length code by applying a variable-length coding method such as CABAC or CAVLC to the quantized transform coefficient generated in step S13.
  • the variable-length code is output as coded data # 110.
  • the prediction residual coding unit 107 applies inverse quantization to the quantized transform coefficient generated in step S13, and then performs inverse transform of the frequency transform applied in step S12 (inverse frequency Decoding residual # 107 is generated and output by applying transformation.
  • the present invention is not limited by the above procedure.
  • the frequency conversion in step S12 may be omitted, and in step 13, the prediction residual may be directly quantized.
  • the decoded image generation unit 108 generates the decoded image # 108 by adding the predicted image # 105 to the input decoded residual # 107, and outputs the generated decoded image # 108.
  • the frame memory 109 records the input decoded image # 108. At the time of encoding a specific MB, decoded images corresponding to all the MBs preceding the MB in raster scan order are recorded in the frame memory 109.
  • FIG. 5 is a flowchart showing a procedure of encoding the input image # 113 corresponding to the processing target MB in the MB encoding unit 110 to generate encoded data # 110.
  • Step S21 First, the input image # 113 corresponding to the processing object MB input to the MB encoding unit 110 is input to the prediction unit division unit 106 and the prediction residual encoding unit 107.
  • prediction unit division section 106 input image # 113 is divided into N prediction units of a predetermined size, and each prediction unit is assigned a prediction unit index (puid) taking an integer value in the range of 0 or more and N-1 or less. Be done.
  • Prediction unit information # 106 corresponding to the prediction target area is input from the prediction unit division unit 106 to the TM prediction unit 105 and the prediction residual coding unit 107.
  • Step S23 The TM prediction unit 105 performs template matching on the decoded image # 109 recorded in the frame memory 109 based on the prediction unit information # 106 input in step S22. Then, a predicted image # 105 corresponding to the region to be predicted is generated based on the result of template matching, and is output to the prediction residual coding unit 107 and the decoded image generation unit 108.
  • Step S24 The prediction residual encoding unit 107 predicts, based on the predicted image # 105 generated in step S23, the prediction unit information # 106 generated in step S22, and the input image # 113. Encoded data # 110 corresponding to the area is generated and output.
  • Step S25 Further, in the prediction residual coding unit 107, based on the prediction image # 105 generated in step S23, the prediction unit information # 106 generated in step S22, and the input image # 113, Decoding residual # 107 corresponding to the region to be predicted is generated and output to the decoded image generation unit 108.
  • the decoded image generation unit 108 generates the decoded image # 108 corresponding to the region to be predicted based on the input decoding residual # 107 and the predicted image # 105 input in step S23, and is recorded in the frame memory 109. Ru.
  • Step S26 If generation of the decoded image # 108 corresponding to all prediction units in the processing target MB is completed, the process ends; otherwise, the process proceeds to step S22.
  • the MB encoding unit 110 can generate and output encoded data # 110 corresponding to the same MB from the input image # 113 corresponding to the processing target MB.
  • the prediction unit is assumed to be 16 ⁇ 1 pixel, but the prediction unit having a width or height of 1 pixel (for example, 8 ⁇ 1 pixel, 4 ⁇ 1 pixel, 1 ⁇ 16 pixel) Even in the case of using a prediction unit of 1 ⁇ 8 pixels and 1 ⁇ 4 pixels, the same effect can be obtained.
  • a prediction unit whose height is extremely small compared to the width for example, a prediction unit of 8 ⁇ 2 pixels, 16 ⁇ 2 pixels
  • a prediction unit whose width is extremely small compared to the height for example, 2 ⁇ 8
  • the same effect can be obtained for the pixel (2 ⁇ 16 pixel prediction unit).
  • direction prediction When such a region is predicted by a prediction method called direction prediction, the direction of the broken line shown in FIG. 6B is assumed, and the pixel adjacent to the MB upper side is extrapolated in that direction. Predictive images can be generated. However, in direction prediction, the curved edge can be accurately approximated above the MB with a small curvature, but there is a problem that the accuracy is lowered below the MB.
  • FIG. 6 is a figure which shows the encoding process in the case of encoding by the MB encoding part 110 by making 16x1 pixel into a prediction unit.
  • a 16 ⁇ 1 pixel prediction unit located at the top of the MB is set as a prediction target area
  • a 16 ⁇ 1 pixel template is set one pixel above
  • a search area one pixel above the template.
  • the prediction target area is moved to a prediction unit one pixel below, and similarly, the prediction image # 105 and the decoded image # 108 are generated. Subsequently, similarly, the prediction target area is moved downward by one pixel, and the prediction image The generation of # 105 and the decoded image # 108 is repeated.
  • the generation of the prediction image # 105 is always performed at the position of the edge in the region to be predicted and one pixel above, regardless of which prediction unit is set as the region to be predicted to generate a prediction image. It is performed by detecting the displacement of the position of the edge.
  • the MB encoding unit 110 it is possible to generate a highly accurate predicted image # 105 even in a region where there is a curved edge whose curvature changes in the MB. Therefore, such a region can be encoded with high coding efficiency.
  • a straight edge by detecting the deviation of the edge position in the region to be predicted and the region one pixel above, it is possible to detect the inclination of the straight line and generate a predicted image. Therefore, by using the MB encoding unit 110, it is possible to encode an area in which linear edges with various slopes exist with high encoding efficiency.
  • the prediction unit division unit 106 has been described as sequentially outputting the prediction unit information # 106 in the ascending order of the prediction unit index, but the present invention is not limited to this. That is, the output order of prediction unit information # 106 in prediction unit division section 106 may not necessarily be in ascending order of prediction unit index.
  • the prediction unit is a horizontally long rectangle
  • the prediction unit closer to the upper side of the MB be processed first.
  • the prediction unit closer to the left side of the MB be processed first.
  • FIG. 7 is a block diagram showing the configuration of the image coding apparatus 100 according to the present invention.
  • the image coding apparatus 100 includes an MB coding unit 110, a header information determination unit 111, a header information coding unit 112, an MB setting unit 113, and a variable length code multiplexing unit 114. There is.
  • the image coding apparatus 100 receives an input image # 100.
  • the image coding apparatus 100 performs coding processing of an input image # 100 and outputs coded data # 180.
  • the header information determination unit 111 determines header information based on the input image # 100.
  • the determined header information is output as header information # 111.
  • the header information # 111 includes the image size of the input image # 100.
  • the header information # 111 is input to the MB setting unit 113 and to the header information encoding unit 112.
  • the header information encoding unit 112 encodes the header information # 111 and outputs encoded header information # 112.
  • the encoded header information # 112 is input to the variable-length code multiplexing unit 114.
  • the MB setting unit 113 divides the input image # 100 into a plurality of macro blocks based on the input image # 100 and the header information # 111.
  • the MB setting unit 113 inputs the input image # 100 to the MB encoding unit 110 for each macroblock.
  • the MB coding unit 110 codes the input image # 113 for one macroblock input sequentially, and generates MB coded data # 110.
  • the generated MB encoded data # 110 is input to the variable-length code multiplexing unit 114.
  • variable-length code multiplexing unit 114 multiplexes the encoded header information # 112 and the MB encoded data # 110 to generate and output encoded data # 180.
  • the encoded data # 110 generated by the MB encoding unit 110 (that is, the encoded header information # 112 is The encoded data # 110) before being multiplexed is referred to herein as “MB encoded data”.
  • the MB decoding unit 153 that receives the encoded data # 110 in MB units generated by the MB encoding unit 110 and outputs a decoded image # 190 in MB units will be described with reference to FIGS.
  • FIG. 8 is a block diagram showing the configuration of the MB decoding unit 153.
  • the MB decoding unit 153 includes a TM prediction unit 105, a decoded image generation unit 108, a frame memory 109, a prediction unit setting unit 151, and a prediction residual decoding unit 152.
  • the prediction unit setting unit 151 is activated when the encoded data # 110 in MB is input, and sequentially outputs prediction unit information # 151 indicating the position and size of the prediction unit in the MB in a predetermined order.
  • the same method as the division method applied in the prediction unit division unit 106 (see FIG. 1) in the MB encoding unit 110 can be applied as the division method of MB into prediction units.
  • the order of outputting prediction unit information # 151 can be the same as the order applied by the prediction unit division unit 106.
  • the prediction residual decoding unit 152 applies variable-length code decoding to the input encoded data # 110 in MB units, and generates a transform coefficient corresponding to the prediction unit indicating the input prediction unit information # 151. . Subsequently, decoding residual # 152 is generated and applied by applying inverse DCT transformation (inverse transformation of DCT) having the same size as the size of the prediction unit indicated by prediction unit information # 151 to the generated transformation coefficient. .
  • inverse DCT transformation inverse transformation of DCT
  • FIG. 9 is a flowchart showing the procedure of the decoding process in the MB decoding unit 153.
  • Step S31 First, the encoded data # 110 corresponding to the process target MB input to the MB decoding unit 153 is input to the prediction unit setting unit 151 and the prediction residual decoding unit 152.
  • the prediction unit setting unit 151 divides the processing target MB into N prediction units of a predetermined size, and assigns a prediction unit index (puid) taking an integer value in the range of 1 to N to each prediction unit.
  • Step S33 Subsequently, the TM prediction unit 105 performs template matching on the decoded image # 109 recorded in the frame memory 109 based on the prediction unit information # 151 generated in step S32. Then, a predicted image # 105 corresponding to the region to be predicted is generated based on the result of template matching, and is output to the decoded image generation unit 108.
  • the prediction residual decoding unit 152 generates a decoding residual # 152 corresponding to the area to be predicted based on the prediction unit information # 151 generated in the step S32 and the encoded data # 110. , And is output to the decoded image generation unit 108.
  • Step S35 In the decoded image generation unit 108, based on the predicted image # 105 input in step S33 and the decoded residual # 152 generated in step S34, the decoded image # 190 corresponding to the region to be predicted is It is generated.
  • the decoded image # 190 is output to the outside of the MB decoding unit 153 and is also recorded in the frame memory 109.
  • Step S36 If generation of the decoded image # 190 corresponding to all prediction units in the processing object MB is completed, the process ends; otherwise, the process proceeds to step S32.
  • the MB decoding unit 153 can generate a decoded image # 190 corresponding to the same MB from the encoded data # 110 corresponding to the processing target MB.
  • the image decoding device 150 receives the encoded data # 180 generated by the image encoding device 100 described above, and generates and outputs a decoded image # 190.
  • FIG. 10 is a block diagram showing the configuration of the image decoding apparatus 150.
  • the image decoding apparatus 150 includes an MB decoding unit 153, a variable length code demultiplexing unit 154, a header information decoding unit 155, and an MB setting unit 156.
  • the encoded data # 180 input to the image decoding apparatus 150 is input to the variable-length code demultiplexing unit 154.
  • the variable-length code de-multiplexing unit 154 de-multiplexes the input coded data # 180 to form header coded data # 154 a which is coded data concerning header information, and MB coding which is coded data concerning macro blocks.
  • the encoded data # 154b is separated into data # 154b, and the encoded header data # 154a is output to the header information decoding unit 155, and the encoded MB data # 154b is output to the MB setting unit 156.
  • the header information decoding unit 155 decodes the header information # 155 from the header encoded data # 154a.
  • the header information # 155 is information including the size of the input image.
  • the MB setting unit 156 separates the MB encoded data # 154 b into the encoded data # 156 corresponding to each MB based on the input header information # 155, and sequentially outputs the encoded data # 154 b to the MB decoding unit 153.
  • the MB decoding unit 153 sequentially decodes the encoded data # 156 corresponding to each input MB to generate and output a decoded image # 190 corresponding to each MB.
  • generation processing of the decoded image # 190 corresponding to the encoded data input to the image decoding device 150 is performed. Complete.
  • the image coding apparatus 100 is an image coding apparatus that codes a target image divided into a plurality of blocks for each block (MB), and has long sides A quantum quantizes a target image on a target block (target MB) divided into a plurality of rectangular regions (prediction units) adjacent to one another for each continuous quantization unit composed of one or more rectangular regions (prediction units)
  • Quantizing means predictive residual coding unit 107) for quantizing the prediction residual obtained by subtracting the predicted image from the target image on the target quantization unit, and the target block (target MB) inverse quantization means for generating a decoded image on each of said quantization units, said prediction image obtained by inverse quantization of the quantization value generated by said quantization means
  • Inverse quantization means prediction residual coding unit 107) for generating a decoded image on a unit of distortion, and predicted image generation means for generating the predicted image for each rectangular area (prediction unit), which is a target rectangle A rectangular area
  • a region having the highest correlation with the template is searched by one-dimensionally scanning a region on a decoded image obtained by translating the rectangular region in the long side direction. Do. Therefore, according to the above-described image coding apparatus, the amount of calculation at the time of searching can be reduced compared to the case of performing two-dimensional scanning as in the technique described in Patent Document 1, The prediction image can be generated at high speed.
  • the above-described image decoding apparatus searches for each of the rectangular regions, even when the target image includes an edge whose curvature changes, as compared with the technique described in Patent Document 1. , Generation of a predicted image can be performed accurately. That is, even in the case where the target image includes an edge whose curvature changes, the coding efficiency is high.
  • the image decoding apparatus 150 is an image decoding apparatus that generates a decoded image divided into a plurality of blocks (MB) for each block, and a plurality of long sides are adjacent to each other.
  • Inverse quantization means for generating a decoded image on a target block (target MB) divided into rectangular areas for each successive quantization unit consisting of one or more rectangular areas (prediction units), wherein the quantization value is Inverse quantization means (prediction residual decoding unit 152) for generating a decoded image on the target quantization unit by adding the prediction residual obtained by inverse quantization of Predicted image generation means for generating each rectangular area, wherein a rectangular area on the decoded image facing the long side of the target rectangular area is used as a template, and the opposite side of the template to the side facing the target rectangular area
  • the predicted image on the target rectangular area is searched by searching the area having the highest correlation with the template among the areas on the decoded image obtained by translating the rectangular area facing the long side in the long
  • the predicted image can be generated at high speed.
  • the above-described image decoding apparatus performs the search for each of the rectangular regions, it is possible to accurately generate a predicted image even when the target image includes an edge whose curvature changes. It plays an effect.
  • FIG. 11 is a block diagram showing the configuration of the image coding apparatus 300 according to the present embodiment.
  • the image coding apparatus 300 includes a header information determination unit 111, a header information coding unit 112, an MB setting unit 113, a variable length code multiplexing unit 114, and an MB coding unit 205. There is.
  • the header information determining unit 111, the header information encoding unit 112, the MB setting unit 113, and the variable length code multiplexing unit 114 have already been described, and therefore the MB encoding unit 205 will be described below.
  • the MB encoding unit 205 included in the image coding apparatus 300 shown in FIG. 11 will be described with reference to FIG.
  • the MB encoding unit 205 is for generating and outputting the encoded data # 205 based on the input image # 113 corresponding to the processing target MB output from the MB setting unit 113.
  • FIG. 12 is a block diagram showing the configuration of MB coding section 205.
  • the MB coding unit 205 includes a prediction unit structure comparison unit 201, a prediction unit division unit 202, a TM prediction unit 105, a prediction residual coding unit 107, a decoded image generation unit 108, a frame memory 109, A side information coding unit 203 and an MB coded data multiplexing unit 204 are provided.
  • the TM prediction unit 105, the prediction residual coding unit 107, the decoded image generation unit 108, and the frame memory 109 have already been described, and hence the prediction unit structure comparison unit 201, the prediction unit division unit 202, the side information coding unit The 203 and the MB encoded data multiplexing unit 204 will be described.
  • the prediction unit structure comparison unit 201 analyzes the input image # 113 corresponding to the processing target MB, and selects a prediction unit suitable for the MB from among prediction units included in a predetermined prediction unit set. Also, the prediction unit structure comparison unit 201 outputs prediction unit structure information # 201, which is information indicating the structure of the selected prediction unit.
  • the predetermined prediction unit set includes the prediction unit of 16 ⁇ 1 pixel and the prediction unit of 1 ⁇ 16 pixel is described as an example, the present invention is limited to this. It is not a thing, but various other combinations can be considered as a combination of a prediction unit set.
  • the predetermined prediction unit set includes a vertically long rectangular prediction unit and a horizontally long rectangular prediction unit.
  • the prediction unit structure comparison part 201 selects a prediction unit with high encoding efficiency among the prediction units contained in a prediction unit set.
  • the prediction unit structure comparison unit 201 selects a prediction unit according to the result of rate distortion determination. That is, for each prediction unit included in the predetermined prediction unit set, the prediction unit structure comparison unit 201 uses the prediction unit to encode the input image # 113 of the processing target MB.
  • the evaluation value RD R + D ⁇ is calculated by calculating R and distortion D (the input image on the processing target and the SSD of the decoded image), and according to the result, any one prediction of each prediction unit is calculated. Choose a unit. More specifically, a prediction unit with which the evaluation value RD becomes smaller is selected.
  • prediction unit structure information # 201 indicating the structure of the selected prediction unit is output to the prediction unit division unit 202 and the side information coding unit 203.
  • the prediction unit structure comparison unit 201 may select a prediction unit by analyzing the directionality of an edge, or may select a prediction unit by another method.
  • the prediction unit dividing unit 202 divides the input image # 113 corresponding to the processing target MB into predetermined prediction units determined by the prediction unit structure information # 201. Also, the prediction unit division unit 106 outputs prediction unit information # 106, which is information on each prediction unit.
  • the prediction unit information # 106 includes information on the position and size of each prediction unit as described above.
  • a prediction unit index is assigned to each prediction unit as already described using (a) to (d) of FIG.
  • Side information encoding section 203 generates side information # 203 based on prediction unit structure information # 201.
  • the generated side information # 203 is output to the MB encoded data multiplexing unit 204.
  • the side information coding unit 203 performs prediction indicated by prediction unit structure information # 201.
  • bit string 0 is generated
  • bit string 1 is generated.
  • the side information encoding unit 203 When the prediction unit indicated by prediction unit structure information # 201 is 16 ⁇ 1 pixel, bit string 00 is generated as side information # 203, and the prediction unit indicated by prediction unit structure information # 201 is 1 ⁇ 16 pixels In one case, bit string 10 is generated, and when the prediction unit indicated by prediction unit structure information # 201 is 8 ⁇ 1 pixel, bit string 01 is generated, and the prediction unit indicated by prediction unit structure information # 201 is 1 In the case of ⁇ 8 pixels, a bit string 11 is generated.
  • the upper digit of the bit string is information indicating the long side direction of the prediction unit
  • the lower digit of the bit string is information indicating the size of the prediction unit.
  • the same symbol as the digit indicating the direction information in the bit string can be encoded. Is likely to occur continuously, so that more efficient encoding processing can be performed.
  • the bit string is generated using bias of the symbol occurrence probability. The number of bits of can be reduced.
  • MB encoded data multiplexing section 204 is configured to encode data based on encoded data # 110 output from prediction residual encoding section 107 and side information # 203 output from side information encoding section 203. Generate # 205 and output.
  • FIG. 13 shows a bit stream structure of coded data # 205.
  • the encoded data # 205 includes side information # 203 indicating which prediction unit is selected in the prediction unit set, and encoded data # 110.
  • the prediction unit most suitable for the local characteristics of the input image # 113 that is, the coding efficiency Since the highest prediction unit is selected and the input image # 113 can be encoded using the prediction unit, the coding efficiency is improved.
  • the prediction unit set includes the vertically long prediction unit and the horizontally long prediction unit, it is possible to efficiently encode the input image # 113 of various characteristics.
  • the image decoding apparatus 350 receives the encoded data # 181, and generates and outputs a decoded image # 254.
  • FIG. 14 is a block diagram showing the configuration of the image decoding apparatus 350.
  • the image decoding apparatus 350 includes a variable-length code demultiplexing unit 154, a header information decoding unit 155, an MB setting unit 156, and an MB decoding unit 254.
  • variable-length code demultiplexing unit 154 Since the variable-length code demultiplexing unit 154, the header information decoding unit 155, and the MB setting unit 156 have already been described, the MB decoding unit 254 will be described below.
  • the MB decoding unit 254 provided in the image decoding apparatus 350 shown in FIG. 14 will be described with reference to FIG. The MB decoding unit 254 sequentially decodes the encoded data # 156 corresponding to each MB output from the MB setting unit 156 to generate and output a decoded image # 254 corresponding to each MB. It is for.
  • FIG. 15 is a block diagram showing the configuration of the MB decoding unit 254.
  • the MB decoding unit 254 includes an MB encoded data demultiplexing unit 251, a side information decoding unit 253, a prediction unit setting unit 252, a prediction residual decoding unit 152, a TM prediction unit 105, and a decoded image generation. And a frame memory 109.
  • the MB encoded data demultiplexing unit 251, the side information decoding unit 253, and the prediction unit are described below.
  • the setting unit 252 will be described.
  • the MB encoded data demultiplexing unit 251 demultiplexes the encoded data # 156 into side information # 251 b and encoded data # 251 a in MB units.
  • Side information # 251 b is output to side information decoding section 253, and encoded data # 251 a in MB units is output to prediction unit setting section 252 and prediction residual decoding section 152.
  • the side information # 251 b is information corresponding to the above-described side information # 203.
  • the side information decoding unit 253 decodes the side information # 251 b to generate prediction unit structure information # 253.
  • the prediction unit structure information # 253 is information corresponding to the prediction unit structure information # 201.
  • the prediction unit setting unit 252 generates prediction unit information # 252 indicating the position and size of a prediction unit in the MB based on the encoded data # 251a in MB and prediction unit structure information # 253, and performs predetermined Output sequentially in order.
  • MB decoding section 254 configured as described above, decoding processing can be performed using the optimal prediction unit included in the side information, that is, the prediction unit with the highest encoding efficiency. It has the effect of improving the efficiency.
  • the image coding apparatus 300 includes a plurality of blocks (MBs) each having a plurality of long sides adjacent to each other.
  • the division unit (prediction unit structure comparison unit 201) is configured to be divided into rectangular regions (prediction units), and the long side direction of the plurality of rectangular regions is switched for each block.
  • the image encoding device 300 is a flag (prediction unit structure indicating the long side direction of the plurality of rectangular regions (prediction units) for each of the plurality of blocks (MB) It further comprises flag encoding means (side information encoding unit 203) for encoding information # 201).
  • the MB coding unit 309 included in the image coding apparatus according to the present embodiment will be described with reference to FIG.
  • the image coding apparatus according to the present embodiment includes an MB coding unit 309 in place of the MB coding unit 110 in the image coding apparatus 100 described above.
  • FIG. 16 is a block diagram showing the configuration of the MB coding unit 309 provided in the image coding apparatus according to the third embodiment.
  • the MB coding unit 309 includes a quantization unit division unit 306, a prediction unit division unit 106, a TM prediction unit 305, a frame memory 109, a prediction residual coding unit 307, and a decoded image generation unit. It has 308.
  • MB coding section 309 receives input image # 113 in MB units and outputs coded data # 309.
  • the quantization unit division unit 306 divides the input image # 113 into a plurality of quantization units.
  • the size of the quantization unit is larger than the size of the prediction unit.
  • information on the size of each quantization unit is output as quantization unit information # 306.
  • the TM prediction unit 305 receives the quantization unit information # 306 output from the quantization unit division unit 306 and the prediction unit information # 106 output from the prediction unit division unit 106, and outputs a prediction image # 305.
  • the details of the TM prediction unit 305 will be described later, with reference to the referenced drawings.
  • the prediction residual coding unit 307 generates coded data # 309 and decoding residual # 307 based on the prediction image # 305, quantization unit information # 306, prediction unit information # 106, and input image # 113. ,Output.
  • the decoded image generation unit 308 generates the decoded image # 308 by adding the predicted image # 305 to the input decoded residual # 307, and outputs the generated decoded image # 308.
  • the output decoded image # 308 is stored in the frame memory 109.
  • FIG. 17 is a block diagram showing the configuration of the TM prediction unit 305.
  • the TM prediction unit 305 includes a search area setting unit 301, a template setting unit 302, a template comparison unit 303, and a predicted image generation unit 304.
  • the template setting unit 302 sets a template corresponding to the prediction target area based on the quantization unit information # 306 and the prediction unit information # 106, and outputs template information # 302 which is information about the template.
  • the search area setting unit 301 sets a search area corresponding to the prediction target area based on the quantization unit information # 306 and the prediction unit information # 106, and search area information # 301 which is information on the search area.
  • FIG. 19 is a diagram for explaining the operations of the template setting unit 302 and the search area setting unit 301. As shown in FIG. 19, the template is set outside the quantization unit including the prediction target area.
  • the template is selected from the regions closest to the prediction target region among the regions existing outside the transform region including the prediction target region.
  • the search area is set to an area separated from the template by the same distance as the distance between the area to be predicted and the template. Further, when the distance is large, it is preferable to widen the range of the search area accordingly.
  • the template comparison unit 303 derives and outputs predicted image generation parameter # 303 by executing template matching based on the template information # 302, the search area information # 301, and the decoded image # 109. More specifically, the template comparison unit 303 obtains a search candidate that most closely approximates the template indicated by the template information # 302 from the search area indicated by the search area information # 301, and the template comparison unit 303 applies the search candidate to the template Calculate the relative position (displacement). Further, it is output as parameter # 303 for predicted image generation which is information indicating the relative position.
  • the predicted image generation unit 304 generates a predicted image # corresponding to the region to be predicted based on the predicted image generation parameter # 303 derived by the template comparison unit 303 and the decoded image # 109 recorded in the frame memory 109. Generate 305 and output. Specifically, the predicted image generation unit 304 assigns each pixel of the decoded image at a position shifted by the displacement indicated by the predicted image generation parameter # 303 to each pixel of the region to be predicted.
  • the MB decoding unit 353 included in the image decoding apparatus according to the present embodiment will be described with reference to FIG.
  • the image decoding apparatus according to the present embodiment includes an MB decoding unit 353 instead of the MB decoding unit 153 in the image decoding apparatus 150 described above.
  • the MB decoding unit 353 receives the encoded data # 156 and generates and outputs a decoded image # 254.
  • FIG. 18 is a block diagram showing a configuration of MB decoding unit 353.
  • the MB decoding unit 353 includes a TM prediction unit 305, a decoded image generation unit 308, a frame memory 109, a prediction unit setting unit 151, a quantization unit setting unit 351, and a prediction residual decoding unit 352.
  • the quantization unit setting unit 351 sequentially outputs quantization unit information # 351 indicating the position and size of the quantization unit in the MB in a predetermined order.
  • the prediction residual decoding unit 352 applies variable-length code decoding to the input encoded data # 156 to generate transform coefficients. Subsequently, a decoding residual # 352 is generated by applying to the generated transform coefficient an inverse DCT transform (inverse transform of DCT) having the same size as the size of the quantization unit indicated by quantization unit information # 351, Output.
  • inverse DCT transform inverse transform of DCT
  • the decoded image generation unit 308 in the MB decoding unit 353 generates a decoded image # 254 by adding the predicted image # 305 to the input decoded residual # 352, and outputs the generated decoded image # 254.
  • FIG. 20 is a flowchart showing a procedure of encoding the input image # 113 corresponding to the process target MB in the MB encoding unit 309 to generate encoded data # 110.
  • Step S41 First, the input image # 113 corresponding to the processing target MB input to the MB encoding unit 309 is input to the quantization unit division unit 306, the prediction unit division unit 106, and the prediction residual coding unit 307. It is input.
  • the quantization unit division unit 306 divides the input image # 113 into M quantization units of a predetermined size, and takes an integer value in the range of 0 or more and M ⁇ 1 or less in each quantization unit. tuid) is given.
  • the input image # 113 is divided into N prediction units of a predetermined size, and each prediction unit takes an integer value in the range of 0 to N ⁇ 1.
  • Unit index (puid) is given.
  • Step S44 the TM prediction unit 305 performs template matching on the decoded image # 109 recorded in the frame memory 109 based on the prediction unit information # 106 and the quantization unit information # 306. Further, based on the result, a predicted image # 305 corresponding to the region to be predicted is generated. The predicted image # 305 is output to the prediction residual coding unit 307 and the decoded image generation unit 308.
  • Step S45 the MB encoding unit 309 determines whether or not the predicted image # 305 has been generated for all prediction units in the conversion target area.
  • Step S47 The decoded image generation unit 308 that receives the decoded residual # 307 generated in step S46 generates a decoded image # 308 of the conversion target area.
  • Step S48 When the conversion target area includes a prediction unit in which the predicted image # 350 is not generated (No in step S45) or when the decoded image # 308 is generated in step S47.
  • the MB encoding unit 309 determines whether all prediction units in the processing target MB have been decoded. If all prediction units in the processing target MB have been decoded, the encoding process of the processing target MB is ended (Yes in step S48), and prediction units not decoded are included in the processing target MB. If it is (No in step S48), the process of step S43 is performed.
  • the MB encoding unit 309 can generate and output encoded data # 309 corresponding to the same MB from the input image # 113 corresponding to the processing target MB.
  • the size of the quantization unit is the same as the size of the prediction unit, or larger than the size of the prediction unit. That is, the number M of quantization units is equal to or greater than the number N of prediction units, and the quantization unit includes one or more prediction units.
  • the MB coding unit 309 frequency conversion and quantization can be performed for each quantization unit including a single prediction unit, so the correlation in the short side direction of the prediction unit is removed. And the coding efficiency is improved.
  • frequency conversion and quantization can be performed for each quantization unit including a plurality of prediction units. That is, generation of predicted images # 305 for a plurality of prediction units included in the same quantization unit can be performed in parallel, which has an effect of increasing processing speed. Also, by performing such parallel processing, there is an effect that the processing load is reduced.
  • the quantization unit includes two or more rectangular regions (prediction units), and the prediction image generation unit (TM prediction unit 305) Of the rectangular areas on the decoded image facing the long side, a rectangular area closest to the target rectangular area is a template, and the rectangular area facing the long side opposite to the side facing the target rectangular area of the template Among the regions on the decoded image obtained by translating the rectangular region parallel to the long side direction, the distance between the target rectangular region and the template is the highest, the correlation with the template is the highest. It is characterized by searching for a region.
  • the quantization unit is composed of two or more rectangular regions, that is, two or more prediction units. Furthermore, the prediction image of each prediction unit included in the quantization unit can be generated without referring to the decoded image on the same quantization unit. That is, according to the above configuration, a plurality of prediction units included in each quantization unit can be processed in parallel. Therefore, according to the above configuration, the processing time of the encoding process can be reduced.
  • the quantization unit includes two or more rectangular regions whose long sides face each other, and the quantization unit (prediction residual coding unit 107) performs frequency conversion in the quantization unit and performs the inverse quantum quantization.
  • the encoding unit (prediction residual encoding unit 107) performs inverse frequency transformation, which is the inverse transformation of the above frequency transformation, in the above quantization unit, and the above prediction image generation unit (TM prediction unit 305)
  • TM prediction unit 305 a prediction image generation unit
  • the rectangular area closest to the target rectangular area is a template
  • the rectangular area faces the long side opposite to the side facing the target rectangular area of the template.
  • the regions in the decoded image obtained by translating in parallel the rectangular region whose distance from the template is equal to the distance between the target rectangular region and the template. Correlation with rate explore the highest region, it is preferable.
  • the quantization unit includes two or more rectangular regions whose long sides face each other, that is, two or more prediction units whose long sides face each other. Furthermore, the prediction image of each prediction unit included in the quantization unit can be generated without referring to the decoded image on the same quantization unit. As a result, since frequency conversion can be applied in quantization units, correlation in the short side direction of prediction units is removed, and coding efficiency is further improved.
  • the TM prediction unit 105 in the first embodiment is a region one pixel above the prediction unit, and the prediction unit
  • the DC value of the area of the same shape may be set as the prediction value of each pixel of the prediction unit (hereinafter referred to as “flat prediction”).
  • SSD degrees of dissimilarity
  • Step SA4 When flat prediction is selected, the value of each pixel in the region to be predicted is set as the DC value of the template.
  • the above flat prediction it is possible to reduce the amount of coding processing while maintaining high coding efficiency.
  • the above flat prediction is effective in the MB where the edge portion and the flat portion are mixed, in particular, in coding for the flat portion of the MB.
  • the image coding apparatus divides the processing target MB into a plurality of subblocks, and uses the prediction based on the template matching described above for each subblock, or H. It is also possible to select whether to use directional prediction such as intra prediction in H.264 / AVC.
  • the image coding apparatus may perform reversible conversion with a predetermined length in the short side direction of the prediction unit before coding the quantized conversion coefficient.
  • the image decoding apparatus may perform coding according to the following procedure.
  • Step SA21 First, derive quantized transform coefficients of all prediction units, (Step SA22) Next, lossless conversion is performed on a group of transform coefficients composed of quantized transform coefficients corresponding to the same frequency component in each prediction unit in the processing object MB.
  • the image decoding apparatus may switch the prediction unit and the prediction method based on the characteristics of the decoded image on the template.
  • the image decoding apparatus determines whether an edge is present on the template by using an index such as the variance of pixel values of each pixel of the decoded image on the template, and the edge is present.
  • a prediction unit of 4 ⁇ 1 pixels may be selected, and DCT may be performed at that size. If no edge is present, a prediction unit of 16 ⁇ 1 pixel may be selected, and DCT may be performed at that size. .
  • the coding efficiency can be improved by performing DCT in a wide range, so by adopting the configuration as described above, appropriate prediction can be performed without increasing side information. You can choose the unit.
  • the image decoding apparatus may use the above-mentioned flat prediction when the variance of the pixel values of each pixel of the decoded image on the template is small.
  • the flat portion has a small variance of the pixel values of each pixel. Further, for the flat part, the amount of processing of the encoding process can be reduced by using the above-described flat prediction.
  • a predicted image is subtracted from the target image on the target block divided into a plurality of rectangular regions whose long sides are adjacent to each other
  • Quantizing means for quantizing the prediction residual obtained in one or more rectangular regions for each successive quantizing unit, and dequantizing for generating the decoded image on the target block for each of the quantizing units
  • a predicted image generating unit for generating the predicted image on the target block for each of the rectangular regions, the rectangular region on the decoded image facing the long side of the target rectangular region being a template, and Of the regions on the decoded image obtained by translating in parallel the rectangular region opposite to the long side opposite to the side opposite to the target rectangular area of the template in the long side direction, the area having the highest correlation with the template
  • the quantization unit is composed of a single rectangular area, and the prediction image generation means uses the rectangular area on the decoded image adjacent to the long side of the target rectangular area as a template, and the rectangular area adjacent to the long side of the template Search the region having the highest correlation with the template among the regions on the decoded image obtained by translating L in parallel in the direction of the long side.
  • the image coding apparatus according to claim 1.
  • the quantization unit is composed of two or more rectangular areas, and the prediction image generation unit templates the rectangular area closest to the target rectangular area among the rectangular areas on the decoded image facing the long side of the target rectangular area as a template A rectangular area facing the long side opposite to the side facing the target rectangular area of the template and facing the long side, wherein the distance between the template and the template is equal to the distance between the target rectangular area and the template Among the regions on the decoded image obtained by parallel displacement in the side direction, a region having the highest correlation with the template is searched.
  • the image coding apparatus according to claim 1.
  • the above quantization means quantizes in parallel each prediction residual obtained from the two or more rectangular regions.
  • Each of the plurality of rectangular regions is a rectangular region having a width in the short side direction of one pixel.
  • a dividing unit configured to divide each of the plurality of blocks into a plurality of rectangular regions whose long sides are adjacent to each other, the dividing unit switching the long side direction of the plurality of rectangular regions for each block; Characteristic 1. To 5. The image coding device according to any one of the above.
  • the division means switches the long side direction of the plurality of rectangular regions for each block in accordance with the coding efficiency.
  • the apparatus further comprises: flag encoding means for encoding a flag indicating the long side direction of the plurality of rectangular regions for each of the plurality of blocks.
  • flag encoding means for encoding a flag indicating the long side direction of the plurality of rectangular regions for each of the plurality of blocks.
  • the image is generated for each of the rectangular areas, and the predicted image on each rectangular area has the rectangular area on the decoded image facing the long side of the rectangular area as a template, and the rectangular area on the template Among the regions on the decoded image obtained by translating the rectangular region opposite to the opposite side and the opposite long side in parallel to the long side direction, the correlation with the template is the most And it is generated by searching the area have a data structure of the encoded data, characterized in that.
  • the decoded image on a target block divided into a plurality of rectangular regions whose long sides are adjacent to each other is made up of one or more rectangular regions
  • Inverse quantization means for producing for each successive quantization unit, generating a decoded image on the target quantization unit by adding the prediction residual obtained by inverse quantization of the quantization value to the prediction image
  • predicted image generation means for generating the predicted image for each of the rectangular regions, wherein a rectangular region on the decoded image facing the long side of the target rectangular region is used as a template, and the target of the template Among the areas on the decoded image obtained by translating the rectangular area facing the long side opposite to the long side opposite to the rectangular area, the correlation with the template is the most significant.
  • An image coding method for coding a target image divided into a plurality of blocks for each block, and one or more target images on the target block divided into a plurality of rectangular regions in which long sides are adjacent to each other A quantization step of quantizing each successive quantization unit consisting of a rectangular region, wherein the quantization step is to quantize a prediction residual obtained by subtracting a prediction image from a target image on a target quantization unit; An inverse quantization step of generating a decoded image on the target block for each quantization unit, wherein the prediction residual obtained by inverse quantization of the quantization value generated in the quantization step is predicted An inverse quantization step of generating a decoded image on the target quantization unit by adding to the image; and a predicted image generation step of generating the predicted image for each rectangular region, the long side of the target rectangular region Back to face Among the regions on the decoded image obtained by translating a rectangular region on the image opposite to the long side opposite to the target rectangular region of the template on the long side direction, using the
  • a decoded image on a target block divided into a plurality of rectangular regions whose long sides are adjacent to each other is made up of one or more rectangular regions
  • the target rectangle and the predicted image generation step of generating a predictive image of the region contains the image decoding method characterized by.
  • An image coding apparatus is an image coding apparatus for coding a target image divided into a plurality of blocks for each block, on a target block divided into a plurality of rectangular regions in which long sides are adjacent to each other.
  • Quantizing means for quantizing a prediction residual obtained by subtracting a predicted image from a target image of each for each successive quantizing unit consisting of one or more rectangular regions, and the above quantization of the decoded image on the target block
  • Inverse quantization means for generating each unit, and adding a prediction residual obtained by inverse quantization of the quantization value generated by the quantization means to the prediction image, on the target quantization unit
  • Inverse quantization means for generating a decoded image of the target image, and predicted image generation means for generating a predicted image on the target block for each of the rectangular regions, and a long side on the decoded image facing the long side of the target rectangular region Among the regions on the decoded image obtained by translating the rectangular region opposite to the long side opposite to the target rectangular region of the above template into
  • a rectangular area on the decoded image facing the long side of the target rectangular area is used as a template, and the long side opposite to the side facing the target rectangular area of the template
  • the predicted image on the target rectangular area is generated by searching the area having the highest correlation with the template among the areas on the decoded image obtained by translating the rectangular area facing in parallel in the long side direction. be able to.
  • the region on the decoded image obtained by translating the rectangular region in the long side direction is scanned one-dimensionally in the region having the highest correlation with the template. Search by Therefore, according to the above-described image coding apparatus, the amount of calculation at the time of searching can be reduced compared to the case of performing two-dimensional scanning as in the technique described in Patent Document 1, This produces an effect that the generation of a predicted image can be performed at high speed.
  • the above-mentioned image encoding apparatus performs a search for each of the rectangular regions, it is possible to accurately generate a predicted image even when the target image includes an edge whose curvature changes. it can. That is, even in the case where the target image includes an edge whose curvature changes, the coding efficiency is high.
  • the quantization unit is formed of a single rectangular area
  • the predicted image generation means uses a rectangular area on the decoded image adjacent to the long side of the target rectangular area as a template and is adjacent to the long side of the template It is preferable to search a region having the highest correlation with the template among regions on the decoded image obtained by translating a rectangular region in the long side direction.
  • a rectangular area on the decoded image adjacent to the long side of the target rectangular area is used as a template, and on the decoded image obtained by translating the rectangular area adjacent to the long side of the template in the long side direction Among the regions, it is possible to search for the region having the highest correlation with the template, so that the deviation between the position of the edge in the region to be predicted and the position of the edge in the region adjacent to the region to be predicted is detected. Can generate a predicted image. That is, even when the edge is a curve, a predicted image can be generated by detecting the curvature of the curve, so that the coding efficiency can be further improved. Play.
  • the quantization unit is composed of two or more rectangular areas
  • the predicted image generation means is a rectangular area closest to the target rectangular area among the rectangular areas on the decoded image facing the long side of the target rectangular area.
  • a rectangular area facing the long side opposite to the target rectangular area of the template and opposite to the long side opposite to the target rectangular area, wherein the distance between the template and the template is equal to the distance between the target rectangular area and the template It is preferable to search a region having the highest correlation with the template among regions on the decoded image obtained by translating L in parallel in the long-side direction.
  • the quantization unit is composed of two or more rectangular regions, that is, two or more prediction units. Furthermore, the prediction image of each prediction unit included in the quantization unit can be generated without referring to the decoded image on the same quantization unit. That is, according to the above configuration, a plurality of prediction units included in each quantization unit can be processed in parallel. Therefore, according to the above configuration, it is possible to further reduce the processing time of the encoding process.
  • the quantization unit includes two or more rectangular regions whose long sides face each other, the quantization unit performs frequency conversion in the quantization unit, and the dequantization unit performs the frequency conversion in the quantization unit.
  • the prediction image generation means performs template conversion on the rectangular area closest to the target rectangular area among the rectangular areas on the decoded image facing the long side of the target rectangular area, performing inverse frequency conversion which is inverse conversion of the frequency conversion.
  • a rectangular area facing the long side opposite to the side facing the target rectangular area of the template and facing the long side, wherein the distance between the template and the template is equal to the distance between the target rectangular area and the template It is preferable to search a region having the highest correlation with the template among regions on the decoded image obtained by parallel movement in the side direction.
  • the quantization unit includes two or more rectangular regions whose long sides face each other, that is, two or more prediction units whose long sides face each other. Furthermore, the prediction image of each prediction unit included in the quantization unit can be generated without referring to the decoded image on the same quantization unit. As a result, since frequency conversion can be applied on a quantization unit basis, the correlation in the short side direction of the prediction unit is removed, and the encoding efficiency is further improved.
  • each of the plurality of rectangular regions is a rectangular region having a width in the short side direction of one pixel.
  • the image coding apparatus is dividing means for dividing each of the plurality of blocks into a plurality of rectangular areas whose long sides are adjacent to each other, and switches the long side direction of the plurality of rectangular areas for each block. It is preferred to have a dividing means.
  • the division means for switching the long side direction of the plurality of rectangular areas is provided for each block, the rectangular area having the long side direction optimum for the local characteristics of the image to be encoded is used. Since the predicted image can be generated, the coding efficiency can be further improved.
  • the image coding apparatus further comprises flag coding means for coding a flag indicating the long side direction of the plurality of rectangular regions for each of the plurality of blocks.
  • the image decoding apparatus further comprises: flag encoding means for encoding the flag indicating the long side direction of the plurality of rectangular regions for each of the plurality of blocks.
  • flag encoding means for encoding the flag indicating the long side direction of the plurality of rectangular regions for each of the plurality of blocks.
  • the data structure of encoded data according to the present invention is a data structure of encoded data obtained by encoding a target image divided into a plurality of blocks for each block, and long sides thereof are mutually different.
  • a prediction residual obtained by subtracting a predicted image from a target image on a target block divided into a plurality of adjacent rectangular regions is generated by quantizing each successive quantization unit including one or more rectangular regions.
  • the predicted image on the target block is generated for each of the rectangular regions, and the predicted image on each rectangular region is on the decoded image facing the long side of the rectangular region.
  • the decoding device can perform the decoding process based on the predicted image of each rectangular area and the quantized prediction residual of each quantization unit. Therefore, according to the above configuration, it is possible to realize the data structure of encoded data with high decoding efficiency.
  • the image decoding apparatus for generating a decoded image divided into a plurality of blocks for each block
  • the image decoding apparatus is on an object block divided into a plurality of rectangular areas with long sides adjacent to each other.
  • Inverse quantization means for generating a decoded image for each successive quantization unit consisting of one or more rectangular regions, and adding prediction residuals obtained by inverse quantization of quantization values to the predicted image,
  • a rectangle on a decoded image facing the long side of a target rectangular area which is an inverse quantization unit that generates a decoded image on a target quantization unit, and a predicted image generation unit that generates the predicted image for each rectangular area
  • An area on a decoded image obtained by translating in the long side direction a rectangular area opposite to the long side opposite to the side opposite to the target rectangular area of the template using the area as a template Chi, by searching the highest area correlation with the template is characterized in that it comprises a, the predicted image generating means for generating a predicted image on the target rectangular area.
  • a rectangular area on the decoded image facing the long side of the target rectangular area is used as a template, and the long side opposite to the side facing the target rectangular area of the template Generating a predicted image on the target rectangular region by searching for a region having the highest correlation with the template among regions on the decoded image obtained by translating the opposing rectangular region in the long side direction in parallel Can.
  • the region having the highest correlation with the template is scanned one-dimensionally in the region on the decoded image obtained by translating the rectangular region in the long side direction.
  • the amount of calculation at the time of searching can be reduced as compared with the case of performing two-dimensional scanning as in the technique described in Patent Document 1, prediction
  • the effect is that image generation can be performed at high speed.
  • the above-described image decoding apparatus performs the search for each of the rectangular regions, it is possible to accurately generate a predicted image even when the target image includes an edge whose curvature changes. It plays an effect.
  • the present invention can be suitably applied to an image coding apparatus for coding an image and an image decoding apparatus for decoding coded image data.
  • image coding device 105 TM prediction unit (predicted image generation means) 106 Prediction unit division unit 107 Prediction residual coding unit (quantization unit, inverse quantization unit) 108 Decoded image generation unit 109 Frame memory 110 MB coding unit 150 Image decoding device 152 Prediction residual decoding unit (inverse quantization means) 203 Side information encoding unit (flag encoding unit)

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

 本発明の画像符号化装置は、予測画像を予測単位毎に生成するTM予測部(105)を備えている。このTM予測部(105)は、対象予測単位の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象予測単位に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象予測単位上の予測画像を生成する。これにより、符号化の対象となる画像が曲率の変化するエッジなどにより構成される場合であっても、符号化効率の高い画像符号化装置を実現する。

Description

画像符号化装置、画像復号装置、および、符号化データのデータ構造
 本発明は、画像を符号化することによって、符号化データを生成する画像符号化装置および画像符号化方法に関する。また、そのような画像符号化装置を用いて生成された符号化データを復号することによって、画像を生成する画像復号装置および画像復号方法に関する。
 動画像を効率的に伝送または記録するために、動画像符号化装置が用いられている。動画像符号化装置における動画像の符号化方式としては、例えば、非特許文献1に示されたH.264/AVCが挙げられる。
 上記の符号化方式では、符号化の対象となる画像を複数のブロックに分割した上で符号化を行う。また、符号化効率を高めるため、対象ブロックと同じフレーム内にある復号済みの領域を参照して予測画像を生成し、当該予測画像と上記対象ブロックとの差分画像を符号化する技術が採用されている。
 特許文献1には、予測対象領域に隣接する逆L文字型の対象隣接領域と、探索領域とを設定し、当該探索領域の中で、上記対象隣接領域に対し絶対誤差値の和が最も小さくなる領域である予測隣接領域を探索し、当該予測隣接領域に隣接している領域を上記予測対象領域に対するテキスチャー信号とすることによって、当該予測対象領域に対する予測信号を生成することを特徴とする画像予測符号化装置が開示されている。
日本国公開特許公報「特開2007-300380号公報」(2007年11月15日公開)
ITU-T Recommendation H.264(11/07)(2007年11月公開)
 しかしながら、特許文献1に記載の技術は、逆L文字型の対象隣接領域に類似する領域の探索を、探索領域を2次元的に走査することにより行うものであるため、探索を行う際の計算量が多く、予測画像を生成する速度が低下するという問題を有している。
 また、特許文献1に記載の技術は、予測対象領域を正方形に設定している。したがって、例えば、符号化対象の画像が曲率の変化するエッジを含んでいるような場合には、適切な予測隣接領域を探索することができないため、符号化効率が低下するという問題を有している。
 本発明は、上記の問題に鑑みてなされたものであり、その目的は、探索を行う際の計算量を削減しつつ、符号化対象の画像が曲率の変化するエッジを含んでいるような場合であっても、符号化効率の高い画像符号化装置を実現することにある。
 上記の課題を解決するために、本発明に係る画像符号化装置は、複数のブロックに分割された対象画像をブロック毎に符号化する画像符号化装置において、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の対象画像から予測画像を減算して得られる予測残差を、上記複数の長方形領域から選択された1以上の長方形領域からなる量子化単位毎に量子化する量子化手段と、上記対象ブロック上の復号画像を上記量子化単位毎に生成する逆量子化手段であって、上記量子化手段にて生成された量子化値を逆量子化して得られる予測残差を上記予測画像に加算することによって、対象量子化単位上の復号画像を生成する逆量子化手段と、上記対象ブロック上の予測画像を上記長方形領域毎に生成する予測画像生成手段であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、対象長方形領域上の予測画像を生成する予測画像生成手段と、を備えている、ことを特徴としている。
 本発明に係る上記の画像符号化装置によれば、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成することができる。
 すなわち、上記の画像符号化装置によれば、上記テンプレートとの相関が最も高い領域を、上記長方形領域を長辺方向に平行移動して得られる復号画像上の領域を1次元的に走査することにより探索する。したがって、上記の画像符号化装置によれば、特許文献1に記載された技術のように2次元的な走査を行う場合に比べて、探索を行う際の計算量を削減することができるため、予測画像の生成を高速に行うことができるという効果を奏する。
 また、上記の画像符号化装置は、上記長方形領域毎に探索を行うため、対象画像が曲率の変化するエッジを含んでいるような場合であっても、予測画像の生成を正確に行うことができる。すなわち、対象画像が曲率の変化するエッジを含んでいるような場合であっても、符号化効率が高いという効果を奏する。
 上記の課題を解決するために、本発明に係る符号化データのデータ構造は、複数のブロックに分割された対象画像をブロック毎に符号化することによって得られた符号化データのデータ構造であって、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の対象画像から予測画像を減算して得られる予測残差を、上記複数の長方形領域から選択された1以上の長方形領域からなる量子化単位毎に量子化することによって生成された符号化データを含み、上記対象ブロック上の予測画像は、上記長方形領域毎に生成されたものであり、各長方形領域上の予測画像は、当該長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの当該長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって生成されたものである、ことを特徴としている。
 本発明に係る上記符号化データのデータ構造によれば、復号装置において、各長方形領域の予測画像と各量子化単位の量子化された予測残差に基づいて復号処理を行うことができる。従って、上記の構成によれば、復号効率のよい符号化データのデータ構造を実現することができるという効果を奏する。
 上記の課題を解決するために、本発明に係る画像復号装置は、複数のブロックに分割された復号画像をブロック毎に生成する画像復号装置において、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の復号画像を、上記複数の長方形領域から選択された1以上の長方形領域からなる量子化単位毎に生成する逆量子化手段であって、量子化値を逆量子化して得られる予測残差を予測画像に加算することによって、対象量子化単位上の復号画像を生成する逆量子化手段と、上記予測画像を上記長方形領域毎に生成する予測画像生成手段であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成する予測画像生成手段と、を備えていることを特徴としている。
 本発明に係る上記の画像復号装置によれば、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成することができる。
 すなわち、上記の画像復号装置によれば、上記テンプレートとの相関が最も高い領域を、上記長方形領域を長辺方向に平行移動して得られる復号画像上の領域を1次元的に走査することにより探索する。したがって、上記の画像復号装置によれば、特許文献1に記載された技術のように2次元的な走査を行う場合に比べて、探索を行う際の計算量を削減することができるため、予測画像の生成を高速に行うことができるという効果を奏する。
 また、上記の画像復号装置は、上記長方形領域毎に探索を行うため、対象画像が曲率の変化するエッジを含んでいるような場合であっても、予測画像の生成を正確に行うことができるという効果を奏する。
 以上のように、本発明によれば、予測画像の生成を2次元的な探索により行う場合に比べて、予測画像の生成を高速に行うことができる。また、符号化対象画像が曲率の変化するエッジなどを含む場合であっても、符号化効率の高い符号化を行うことができる。
本発明の第1の実施形態に係るMB符号化部の構成を示すブロック図である。 図1に示したMB符号化部が備えているTM予測部の構成を示すブロック図である。 図2に示したTM予測部の動作を説明するための図である。(a)は、予測対象領域とテンプレートと探索領域との関係を示し、(b)は、探索領域と探索候補との関係を示す。 対象マクロブロックと予測単位との関係を示す図である。(a)は、予測単位のサイズが16画素×1画素の場合を示し、(b)は、予測単位のサイズが1画素×16画素である場合を示し、(c)は、予測単位のサイズが4画素×1画素である場合を示し、(d)は、予測単位のサイズが1画素×4画素である場合を示す。 図1に示したMB符号化部における符号化データ生成の手順を示すフローチャートである。 本発明の効果を説明するための図である。(a)は、対象マクロブロックに上方から下方に向かう2本の曲線エッジが存在し、MB下方ほど曲線エッジの曲率が大きくなっている場合を示し、(b)は、方向予測によって予測した場合の予測画像を示し、(c)は、正方形の領域を予測単位としたイントラTM予測を行う場合を示し、(d)は、16×1画素を予測単位として、図1に示すMB符号化部を用いて符号化を行う場合を示した図である。 図1に示したMB符号化部を備えている画像符号化装置の構成を示すブロック図である。 本発明の第1の実施形態に係るMB復号部の構成を示すブロック図である。 図8に示したMB復号部における復号処理の手順を示すフローチャートである。 図7に示したMB復号部を備えている画像復号装置の構成を示すブロック図である。 本発明の第2の実施形態に係る画像符号化装置の構成を示すブロック図である。 図11に示した画像符号化装置を構成するMB符号化部の構成を示すブロック図である。 図11に示した画像符号化装置によって生成された符号化データのビットストリーム構造を示す図である。 本発明の第2の実施形態に係る画像復号装置の構成を示すブロック図である。 図14に示した画像復号装置を構成するMB復号部の構成を示すブロック図である。 本発明の第3の実施形態に係る画像符号化装置を構成するMB符号化部の構成を示すブロック図である。 図16に示したMB符号化部を構成するTM予測部の構成を示すブロック図である。 本発明の第3の実施形態に係る画像復号装置を構成するMB復号部の構成を示すブロック図である。 第3の実施形態におけるテンプレート設定部、および、探索領域設定部の動作を説明するための図である。 図16に示したMB符号化部における符号化データ生成の手順を示すフローチャートである。
 〔実施形態1〕
 本発明に係る画像符号化装置および画像復号装置の第1の実施形態である画像符号化装置100および画像復号装置150について図1~図10を参照しつつ説明する。なお、図面の説明において、同一機能を有する要素には同一符号を付与して説明を省略する。
 なお、以下の説明では、画像を複数のマクロブロック(以下、「MB」と呼ぶ)に分割し、ラスタスキャン順でMB毎に符号化処理/復号処理を行う画像符号化装置/画像復号装置を仮定する。また、MBは、複数の予測単位に分割され、予測画像は、予測単位毎に生成されるものとする。ある時点で処理対象となっている予測単位のことを予測対象領域と呼ぶ。
 1.1 TM予測部105
 まず始めに、画像符号化装置100および画像復号装置150に共通の構成要素であるTM予測部105について、図2~図3に基いて説明する。
 図2はTM予測部105の構成を示すブロック図である。TM予測部105は、探索領域設定部101、テンプレート設定部102、テンプレート比較部103、および予測画像生成部104より構成される。TM予測部105は、後述する予測単位情報#106と、後述するフレームメモリ109に記録されている復号画像#109とに基づいてテンプレートマッチングを実行し、テンプレートマッチングの結果に基づいて予測画像#105を生成するためのものである。予測単位情報#106は、後述するように、予測対象領域の形状と位置とを示す情報を含んでいる。
 なお、以下のTM予測部105の説明において、予測単位情報#106は、予測対象領域の幅(width)と高さ(height)とに加え、予測対象領域の位置として、その予測対象領域の左上隅の画素の座標(入力画像の左上隅の画素を基準とする)を示すものとする。そして、予測対象領域の幅をpuw、予測対象領域の高さをpuh、予測対象領域の位置、すなわち、予測対象領域の左上隅の画素の座標を(pux、puy)と表記する。puw、puh、pux、およびpuyの単位は、何れも「画素」である。なお、本実施形態における好ましい予測単位のサイズについては後述するが、TM予測部105の説明においては特に特定のサイズの予測単位を仮定する必要はない。
 <テンプレート設定部102>
 テンプレート設定部102は、入力される予測単位情報#106に基づいて、予測対象領域に対応するテンプレートを設定し、当該テンプレートについての情報であるテンプレート情報#102を出力する。
 より具体的に言うと、テンプレート設定部102は、予測対象領域が横長の長方形である場合、予測対象領域の上辺に隣接する、幅が予測対象領域の幅と等しく、高さが1画素の領域をテンプレートに設定する。すなわち、puw≧puhの場合に、(pux、puy-1)に位置するpuw×1画素のサイズの領域をテンプレートに設定する。一方、予測対象領域が縦長の長方形である場合、予測対象領域の左辺に隣接する、高さが予測対象領域の高さと等しく、幅が1画素の領域をテンプレートに設定する。すなわち、puw<puhの場合に、(pux-1、puy)に位置する1×puhのサイズの領域をテンプレートに設定する。予測対象領域のサイズが4×1画素の場合のテンプレートを図3の(a)に示す。図3の(a)は、予測対象領域と、対応するテンプレートとを示す図である。なお、図3の(a)に示す探索領域については、後述する。
 <探索領域設定部101>
 探索領域設定部101は、入力される予測単位情報#106、および、テンプレート情報#102に基づいて、予測対象領域に対応する探索領域を設定し、当該探索領域についての情報である探索領域情報#101を出力する。
 より具体的に言うと、探索領域設定部101は、予測対象領域が横長の長方形である場合、予測対象領域を基準とする相対座標(画素単位)で(-α、-2)に位置し、幅が(予測対象領域の幅+2α)画素、高さが1画素の領域を探索領域に設定する。言い換えると、puw≧puhの場合に、(pux-α、puy-2)に位置する(puw+2α)×1画素のサイズの領域を探索領域に設定する。ここで、値αは探索領域の広さを示す所定のパラメータ(0以上)であり、例えばα=1を用いる。一方、予測対象領域が縦長の長方形である場合、予測対象領域を基準とする相対座標で(-2、-α)に位置し、高さが(予測対象領域の高さ+2α)画素、幅が1画素の領域を探索領域に設定する。言い換えると、puw<puhの場合に、(pux-2、puy-α)に位置する1画素×(puh+2α)画素のサイズの領域を探索領域に設定する。予測対象領域のサイズが4×1画素の場合の探索領域を図3の(a)に示す。
 <テンプレート比較部103>
 テンプレート比較部103は、テンプレート情報#102、探索領域情報#101、および、後述するフレームメモリ109に記録されている復号画像#109に基づいてテンプレートマッチングを実行することにより、予測画像生成用パラメータ#103を導出し、出力する。予測画像生成用パラメータ#103は、予測対象領域を近似する領域の位置を表す情報である。例えば、探索領域内の部分領域のうちで、テンプレート上の復号画像を最も正確に近似する部分領域の位置(テンプレートに対する位置)を、予測画像生成用パラメータ#103として用いることができる。その場合、予測画像生成用パラメータ#103は次の手順S1~S3によって導出することができる。
 (手順S1)まず、テンプレート比較部103は、探索候補のリストを生成する。ここで、探索候補とは、テンプレートと合同な探索領域内の部分領域である。ここで、各探索候補は、その探索領域に割り振られた探索インデックスにより特定することができる。例えば、図3の(b)に示すように、テンプレートのサイズが4×1画素、探索領域のサイズが8×1画素である場合には、探索領域の左端からのオフセット値spos(0、1、2、3、4)に応じて5種類の探索候補を設定する。この場合、オフセット値を探索インデックスとして利用できる。
 (手順S2)続いて、テンプレート比較部103は、各探索候補について、テンプレート上の復号画像と探索候補上の復号画像の非類似度を示す評価値を計算する。ここで用いる評価値としては、例えば、SAD(Sum of Absolute Difference)やSSD(Sum of Squared Difference)などが挙げられる。
 (手順S3)続いて、テンプレート比較部103は、手順S2で計算した非類似度が最小となる探索候補(すなわちテンプレートを最も良く近似する探索候補)を特定する。そして、特定した探索候補のテンプレートに対する相対位置を算出し、算出した位置を示す予測画像生成用パラメータ#103として出力する。
 なお、探索候補のサイズや、MB内での予測単位の処理順によっては、探索候補の一部で復号画像が存在しない場合がある。その場合には、探索候補内で復号画像が存在しない各画素の代わりに、各画素に最も近い復号画像が存在する画素の複製を利用する。
 <探索候補の設定方法の他の例>
 上記の説明では、テンプレート比較部103における探索候補の設定方法の一例を示したが、別の方法で探索候補を設定しても良い。例えば、探索候補数を削減することにより、精度は落ちるが、より少ない処理量で予測画像生成用パラメータ#103を導出できる。一方、探索候補の探索領域内における位置を1画素よりも小さい単位、例えば0.5画素単位や0.25画素単位で設定することもできる。この場合は探索候補における復号画像の画素値として、整数位置の復号画像の画素値に補間フィルタを適用して得られる補間値を用いる。探索候補の位置を細かく調整できるようになり、より多くの探索候補に対しテンプレートマッチングを実行することができる。したがって、処理量は増加するが、テンプレート上の復号画像をより正確に近似する探索候補を検出できる可能性を高めることができる。
 <予測画像生成部104>
 予測画像生成部104は、テンプレート比較部103で導出された予測画像生成用パラメータ#103、および、フレームメモリ109に記録されている復号画像#109に基づいて、予測対象領域に対応する予測画像#105を生成し、出力する。
 予測画像生成用パラメータ#103に含まれる、テンプレートを近似する探索候補のテンプレートに対する相対位置を(sx、sy)とした場合、予測画像の各画素値P(pux+i、puy+j)(ただし、i、jは0≦i<puw、0≦j<puhを満たすものとする)は次式により導出される。
 P(pux+i、puy+j)=Ir(pux+sx+i、puy+sy+j)
 ここでIr(x、y)は、復号画像の画素(x、y)の画素値を表す。なお、xまたはyが小数の場合には、近傍の復号画像の画素値に補間フィルタを適用することで生成される補間された画素値を用いる。
 以上説明した通り、TM予測部105では、入力される予測単位情報#106と、フレームメモリ109に記録されている復号画像#109とに基づいて、予測対象領域に対応する予測画像#105が生成され、出力される。
 1.2 MB符号化部110
 次にTM予測部105を構成要素として含むMB符号化部110について図1、4~6を参照して説明する。このMB符号化部110は、各MBに対応する入力画像を符号化して、そのMBに対応する符号化データを生成するためのものであり、後述するように画像符号化装置100に利用される。
 図1はMB符号化部110の構成を示すブロック図である。MB符号化部110は、TM予測部105、予測単位分割部106、予測残差符号化部107、復号画像生成部108、およびフレームメモリ109より構成される。
 なお、以下では、ある時点でMB符号化部110の処理対象となっているMBのことを処理対象MBと呼ぶ。
 <予測単位分割部106>
 予測単位分割部106は、処理対象マクロブロックを予め定められた所定の単位(以下、「予測単位」と呼ぶ)に分割し、各予測単位についての情報である予測単位情報#106を出力する。予測単位情報#106は、各予測単位の位置およびサイズについての情報を含む。
 また、以下では、処理対象マクロブロックのサイズが16画素×16画素である場合を例にとって説明を行うが、本発明は、これに限定されるものではなく、一般のマクロブロックのサイズに対して適用することができる。
 予測単位分割部106における予測単位への分割の例を、図4の(a)~(d)に示す。図4において、(a)は、予測単位のサイズが、16画素×1画素の場合を示し、(b)は、予測単位のサイズが、1画素×16画素である場合を示し、(c)は、予測単位のサイズが、4画素×1画素である場合を示し、(d)は、予測単位のサイズが1画素×4画素である場合を示す。
 図4の(a)に示すように、予測単位のサイズが16画素×1画素である場合、予測単位分割部106は、処理対象マクロブロックを、横方向に伸びる分割線により、縦方向に並んだ16個の予測単位に分割する。また図4の(b)に示すように、予測単位のサイズが1画素×16画素である場合、予測単位分割部106は、処理対象マクロブロックを、縦方向に伸びる分割線により、横方向に並んだ16個の予測単位に分割する。また、図4の(c)に示すように、予測単位のサイズが4画素×1画素である場合、予測単位分割部106は、処理対象マクロブロックを、縦方向に16個、横方向に4個の合計64個の予測単位に分割する。また、図4の(d)に示すように、予測単位のサイズが1画素×4画素である場合、予測単位分割部106は、処理対象マクロブロックを、縦方向に4個、横方向に16個の合計64個の予測単位に分割する。
 また、各予測単位には、予測単位インデックスが付与される。図4の(a)~(d)に示すように、予測単位インデックスは、0以上の整数であり、マクロブロック内におけるラスタスキャン順に昇順となるように付与するものとする。予測単位情報#106は、予測単位インデックスの昇順に順次出力される。
 <予測残差符号化部107>
 予測残差符号化部107は、入力される各予測単位に対応する予測画像#105、予測単位情報#106、および入力画像#113に基づいて、符号化データ#110及び復号残差#107を生成し、出力する。符号化データ#110及び復号残差#107は以下の手順S11~S15により生成される。
 (手順S11)まず、予測残差符号化部107は、入力される予測単位情報#106に基づいて予測対象領域を特定し、予測対象領域における入力画像#113と予測画像#105との差分画像、すなわち予測残差を生成する。
 (手順S12)続いて、予測残差符号化部107は、手順S11にて生成された予測残差に対し、予測単位のサイズと同一サイズの周波数変換(例えば16×1画素の予測単位に対して16×1DCT(Discrete Cosine Transform))を適用して、予測残差の変換係数を生成する。換言すれば、予測残差符号化部107は、予測単位と同じサイズの量子化単位ごとに周波数変換を行い、予測残差の変換係数を生成する。ここで、周波数変換とは、画像の空間領域表現を周波数領域表現に変換する直交変換のことを指す。
 (手順S13)続いて、予測残差符号化部107は、手順S12にて生成された変換係数を量子化して量子化変換係数を生成する。
 (手順S14)続いて、予測残差符号化部107は、手順S13にて生成された量子化変換係数にCABACやCAVLC等の可変長符号化方法を適用して可変長符号を生成し、当該可変長符号を符号化データ#110として出力する。
 (手順S15)また、予測残差符号化部107は、手順S13にて生成された量子化変換係数に逆量子化を適用し、その後、手順S12にて適用した周波数変換の逆変換(逆周波数変換)を適用することで、復号残差#107を生成して出力する。
 なお、本発明は、上記の手順によって限定されるものではない。例えば、手順S12における周波数変換を省略し、手順13において、予測残差を直接量子化するようにしてもよい。
 <復号画像生成部108>
 復号画像生成部108は、入力された復号残差#107に予測画像#105を加えることで復号画像#108を生成し、出力する。
 <フレームメモリ109>
 フレームメモリ109には、入力された復号画像#108が記録される。特定のMBを符号化する時点では、当該MBよりもラスタスキャン順で先にある全てのMBに対応する復号画像がフレームメモリ109に記録されている。
 <MB符号化処理>
 以下では、上述したMB符号化部110における符号化処理について図5を参照して説明する。図5は、MB符号化部110における、処理対象MBに対応する入力画像#113を符号化して符号化データ#110を生成する手順を示すフローチャートである。
 (手順S21)まず、MB符号化部110に入力された処理対象MBに対応する入力画像#113が、予測単位分割部106および予測残差符号化部107に入力される。予測単位分割部106では、入力画像#113が所定のサイズのN個の予測単位に分割され、各予測単位に0以上N-1以下の範囲の整数値を取る予測単位インデックス(puid)が付与される。
 (手順S22)続いて、復号画像の生成が完了していない予測単位の中で、puidが最小である予測単位が予測対象領域に設定される。予測対象領域に対応する予測単位情報#106が、予測単位分割部106からTM予測部105および予測残差符号化部107へ入力される。
 (手順S23)TM予測部105では、手順S22にて入力された予測単位情報#106に基づき、フレームメモリ109に記録された復号画像#109上でテンプレートマッチングが行われる。そして、テンプレートマッチングの結果に基づいて予測対象領域に対応する予測画像#105が生成され、予測残差符号化部107および復号画像生成部108に対して出力される。
 (手順S24)予測残差符号化部107では、手順S23にて生成された予測画像#105、手順S22にて生成された予測単位情報#106、および、入力画像#113に基づいて、予測対象領域に対応する符号化データ#110が生成され、出力される。
 (手順S25)また、予測残差符号化部107では、手順S23にて生成された予測画像#105、手順S22にて生成された予測単位情報#106、および、入力画像#113に基づいて、予測対象領域に対応する復号残差#107が生成され、復号画像生成部108に出力される。復号画像生成部108では、入力された復号残差#107と手順S23で入力された予測画像#105とに基づいて、予測対象領域に対応する復号画像#108が生成されフレームメモリ109へ記録される。
 (手順S26)処理対象MB内の全ての予測単位に対応する復号画像#108の生成が完了していれば処理を終了し、そうでなければ、手順S22の処理へ進む。
 上記の手順S21~S26により、MB符号化部110では、処理対象MBに対応する入力画像#113から、同じMBに対応する符号化データ#110を生成して出力することができる。
 <MB符号化部110における符号化の効果>
 MB符号化部110において、MB単位の入力画像#113を符号化した場合、曲線エッジや多様な方向の直線エッジが存在する領域に対する予測画像#105を高い予測精度で生成することができる。以下では、その効果について、図6を参照しながら詳しく説明する。
 なお、以下の説明では、16×1画素の予測単位を仮定して説明を行うが、幅または高さが1画素の予測単位(例えば、8×1画素、4×1画素、1×16画素、1×8画素、1×4画素の予測単位)を用いる場合でも、同様の効果がある。また、幅に較べて高さが極端に小さい予測単位(例えば、8×2画素、16×2画素の予測単位)や、高さに較べて幅が極端に小さい予測単位(例えば、2×8画素、2×16画素の予測単位)についても、ほぼ同様の効果がある。
 まず、図6の(a)に示したように、MB内に、MB上方から下方に向かう2本の曲線エッジが存在し、MB下方ほど曲線エッジの曲率が大きくなっている領域を考える。
 そのような領域を、方向予測と呼ばれる予測方法により予測する場合には、図6の(b)に示した破線の方向を仮定し、MB上辺に隣接する画素をその方向に外挿することによって予測画像を生成することができる。しかしながら、方向予測では、曲率の小さいMB上方では曲線エッジを精度良く近似できるが、MB下方では精度が低下するという問題がある。
 また、正方形の領域を予測単位としたイントラTM予測を行う場合、図6の(c)に示すように、MB下方の曲率の大きい曲線エッジに相当する領域を、復号画像の存在する領域から探索しても、曲率の一致する曲線エッジを検出できないという問題がある。
 一方で、MB符号化部110を用いて符合化を行う場合は以下のようになる。図6の(d)は、16×1画素を予測単位として、MB符号化部110により符号化を行う場合の符号化処理を示す図である。
 まず、MB内で最上段に位置する16×1画素の予測単位を予測対象領域に設定し、その1画素上方に16×1画素のテンプレートを設定し、さらにテンプレートの1画素上方に探索領域を設定する。この条件下でテンプレートマッチングを実行することにより、予測対象領域におけるエッジの位置と、予測対象領域の1画素上方におけるエッジの位置とのずれ(図2のテンプレート比較部103で導出される予測画像生成用パラメータ#103に含まれる)を検出し、そのずれに基づいて予測対象領域の予測画像#105を生成する。その後、上述したように、予測対象領域の復号画像#108が生成されてフレームメモリ109に記録される。
 次に、予測対象領域を1画素下の予測単位に移し、同様に予測画像#105および復号画像#108を生成する、以降、同様にして、予測対象領域を1画素ずつ下に移し、予測画像#105および復号画像#108の生成を繰り返す。
 ここで、上記予測画像#105の生成は、いずれの予測単位を予測対象領域に設定して予測画像を生成する場合であっても、常に予測対象領域におけるエッジの位置と、その1画素上方におけるエッジの位置のずれを検出することにより行われる。
 従って、図6の(a)に示すような、MB内で曲率が変化する曲線エッジであっても、予測対象領域と、1画素上方の領域におけるエッジ位置のずれ、すなわち曲線エッジの曲率を検出して予測画像を生成することができる。
 したがって、MB符号化部110を用いることにより、MB内で曲率が変化するような曲線エッジが存在する領域でも、精度の高い予測画像#105を生成することができる。したがって、そのような領域を高い符号化効率で符号化することができる。同様に直線エッジについても、予測対象領域と、1画素上方の領域におけるエッジ位置のずれを検出することで、直線の傾きを検出して予測画像が生成できる。したがって、MB符号化部110を用いることにより、多様な傾きの直線エッジが存在する領域を高い符号化効率で符号化することができる。
 <予測単位情報#106の出力順の他の例>
 上記の説明では、予測単位分割部106は、予測単位情報#106を予測単位インデックスの昇順に順次出力するとして説明を行ったが、本発明はこれに限られない。すなわち、予測単位分割部106における予測単位情報#106の出力順は、必ずしも予測単位インデックスの昇順でなくても良い。
 例えば、予測単位が横長の長方形である場合は、MBの上辺に近い予測単位ほど先に処理されるような順序であることが好ましい。そうすることで、TM予測部におけるTM実行時にテンプレートおよび探索領域上の復号画像が存在するため、予測画像の精度を高めることができる。同様の理由により、予測単位が縦長の長方形である場合は、MBの左辺に近い予測単位ほど先に処理されるような順序であることが好ましい。
 1.3 画像符号化装置100
 次に、MB符号化部110を構成要素として含む画像符号化装置100について図7を参照して説明する。図7は、本発明に係る画像符号化装置100の構成を示すブロック図である。
 図7に示すように、画像符号化装置100は、MB符号化部110、ヘッダ情報決定部111、ヘッダ情報符号化部112、MB設定部113、および、可変長符号多重化部114を備えている。
 画像符号化装置100には、入力画像#100が入力される。画像符号化装置100は、入力画像#100の符号化処理を行い、符号化データ#180を出力する。
 ヘッダ情報決定部111は、入力画像#100に基づいて、ヘッダ情報を決定する。決定されたヘッダ情報はヘッダ情報#111として出力される。ヘッダ情報#111には、入力画像#100の画像サイズが含まれる。ヘッダ情報#111は、MB設定部113に入力されると共に、ヘッダ情報符号化部112に入力される。
 ヘッダ情報符号化部112は、ヘッダ情報#111を符号化し、符号化済ヘッダ情報#112を出力する。符号化済ヘッダ情報#112は、可変長符号多重化部114に入力される。
 MB設定部113は、入力画像#100とヘッダ情報#111とに基づいて、入力画像#100を複数のマクロブロックに分割する。MB設定部113は、入力画像#100をマクロブロック毎にMB符号化部110に入力する。
 MB符号化部110は、順次入力される1マクロブロック分の入力画像#113を符号化し、MB符号化データ#110を生成する。生成されたMB符号化データ#110は、可変長符号多重化部114に入力される。
 可変長符号多重化部114は、符号化済ヘッダ情報#112と、MB符号化データ#110とを多重化し、符号化データ#180を生成し、出力する。
 なお、符号化済ヘッダ情報#112が多重化された符号化データ#180と区別するために、MB符号化部110により生成される符号化データ#110(すなわち、符号化済ヘッダ情報#112が多重化される前の符号化データ#110)のことを、ここでは、「MB符号化データ」と呼んだ。
 1.4 MB復号部153
 次に、MB符号化部110で生成されるMB単位の符号化データ#110を受け、MB単位の復号画像#190を出力するMB復号部153について図8~9を参照して説明する。
 図8はMB復号部153の構成を示すブロック図である。MB復号部153は、TM予測部105、復号画像生成部108、フレームメモリ109、予測単位設定部151、予測残差復号部152より構成される。
 予測単位設定部151は、MB単位の符号化データ#110が入力された時点で起動し、MB内の予測単位の位置やサイズを示す予測単位情報#151を所定の順序で順次出力する。なお、MBの予測単位への分割方法は、MB符号化部110内の予測単位分割部106(図1参照)において適用した分割方法と同じ方法を適用することができる。また、予測単位情報#151を出力する順序も、予測単位分割部106で適用した順序と同じ順序を用いることができる。
 予測残差復号部152は、入力されたMB単位の符号化データ#110に対し可変長符号復号を適用して、入力された予測単位情報#151を示す予測単位に対応する変換係数を生成する。続いて、生成した変換係数に対し、予測単位情報#151の示す予測単位のサイズと同一サイズの逆DCT変換(DCTの逆変換)を適用することによって復号残差#152を生成し、出力する。
 <MB復号部153における復号処理>
 以上説明したMB復号部153において、特定のMBに対応する符号化データ#110を復号して復号画像#190を生成する処理の手順を、図9を参照して説明する。図9は、MB復号部153における復号処理の手順を示すフローチャートである。
 (手順S31)まず、MB復号部153に入力された処理対象MBに対応する符号化データ#110が、予測単位設定部151および予測残差復号部152に入力される。予測単位設定部151では、処理対象MBが所定のサイズのN個の予測単位に分割され、各予測単位に1~Nの範囲の整数値を取る予測単位インデックス(puid)が付与される。
 (手順S32)続いて、予測単位設定部151では、復号画像の生成が完了していない予測単位の中で、puidが最小である予測単位を予測対象領域に設定する。予測対象領域に対応する予測単位情報#151が、TM予測部105および予測残差復号部152へ入力される。
 (手順S33)続いて、TM予測部105では、手順S32で生成された予測単位情報#151に基づき、フレームメモリ109に記録された復号画像#109上でテンプレートマッチングが行われる。そして、テンプレートマッチングの結果に基づいて予測対象領域に対応する予測画像#105が生成され、復号画像生成部108に出力される。
 (手順S34)また、予測残差復号部152では、手順S32で生成された予測単位情報#151と符号化データ#110とに基づき、予測対象領域に対応する復号残差#152が生成されて、復号画像生成部108に出力される。
 (手順S35)復号画像生成部108では、手順S33で入力された予測画像#105と、手順S34で生成された復号残差#152とに基づいて、予測対象領域に対応する復号画像#190が生成される。復号画像#190はMB復号部153の外部に出力されるとともに、フレームメモリ109へ記録される。
 (手順S36)処理対象MB内の全ての予測単位に対応する復号画像#190の生成が完了していれば処理を終了し、そうでなければ、手順S32の処理へ進む。
 上記手順により、MB復号部153では、処理対象MBに対応する符号化データ#110から、同じMBに対応する復号画像#190を生成できる。
 1.5 画像復号装置150
 次に、前述のMB復号部153を構成要素として含む画像復号装置150について図10を参照して説明する。画像復号装置150は、前述の画像符号化装置100の生成する符号化データ#180を入力として、復号画像#190を生成して出力する。
 図10は画像復号装置150の構成を示すブロック図である。図10に示すように、画像復号装置150は、MB復号部153、可変長符号逆多重化部154、ヘッダ情報復号部155、およびMB設定部156より構成される。
 画像復号装置150に入力された符号化データ#180は可変長符号逆多重化部154へ入力される。可変長符号逆多重化部154は、入力された符号化データ#180を逆多重化してヘッダ情報に関する符号化データであるヘッダ符号化データ#154aと、マクロブロックに関する符号化データであるMB符号化データ#154bに分離し、ヘッダ符号化データ#154aをヘッダ情報復号部155に、MB符号化データ#154bをMB設定部156にそれぞれ出力する。
 ヘッダ情報復号部155では、ヘッダ符号化データ#154aからヘッダ情報#155を復号する。ここで、ヘッダ情報#155は、入力画像のサイズを含む情報である。
 MB設定部156では、入力されたヘッダ情報#155に基づいて、MB符号化データ#154bを個々のMBに対応する符号化データ#156に分離し、MB復号部153に対し順次出力する。
 MB復号部153は、入力された個々のMBに対応する符号化データ#156を順次復号することにより、個々のMBに対応する復号画像#190を生成し、出力する。画像内の全てのMBに対して、MB復号部153によるMB単位の復号画像生成処理が終わった時点で、画像復号装置150に入力された符号化データに対応する復号画像#190の生成処理が完了する。
 1.6 まとめ
 上記のように、本発明に係る画像符号化装置100は、複数のブロックに分割された対象画像をブロック(MB)毎に符号化する画像符号化装置であって、長辺同士が互いに隣接する複数の長方形領域(予測単位)に分割された対象ブロック(対象MB)上の対象画像を、1以上の長方形領域(予測単位)からなる連続した量子化単位毎に量子化する量子化手段であって、対象量子化単位上の対象画像から予測画像を減算して得られた予測残差を量子化する量子化手段(予測残差符号化部107)と、上記対象ブロック(対象MB)上の復号画像を上記量子化単位毎に生成する逆量子化手段であって、上記量子化手段にて生成された量子化値を逆量子化して得られた予測残差を上記予測画像に加算することによって、上記対象量子化単位上の復号画像を生成する逆量子化手段(予測残差符号化部107)と、上記予測画像を上記長方形領域(予測単位)毎に生成する予測画像生成手段であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成する予測画像生成手段(TM予測部105)とを備えている。
 上記の画像符号化装置によれば、上記テンプレートとの相関が最も高い領域を、上記長方形領域を長辺方向に平行移動して得られる復号画像上の領域を1次元的に走査することにより探索する。したがって、上記の画像符号化装置によれば、特許文献1に記載された技術のように2次元的な走査を行う場合に比べて、探索を行う際の計算量を削減することができるため、予測画像の生成を高速に行うことができる。
 また、上記の画像復号装置は、上記長方形領域毎に探索を行うため、特許文献1に記載された技術に比べて、対象画像が曲率の変化するエッジを含んでいるような場合であっても、予測画像の生成を正確に行うことができる。すなわち、対象画像が曲率の変化するエッジを含んでいるような場合であっても、符号化効率が高い。
 また、上記のように、本発明に係る画像復号装置150は、複数のブロック(MB)に分割された復号画像をブロック毎に生成する画像復号装置であって、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック(対象MB)上の復号画像を、1以上の長方形領域(予測単位)からなる連続した量子化単位毎に生成する逆量子化手段であって、量子化値を逆量子化して得られた予測残差を予測画像に加算することによって、対象量子化単位上の復号画像を生成する逆量子化手段(予測残差復号部152)と、上記予測画像を上記長方形領域毎に生成する予測画像生成手段であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成する予測画像生成手段(TM予測部105)とを備えている。
 したがって、画像復号装置150によれば、予測画像の生成を高速に行うことができる。また、上記の画像復号装置は、上記長方形領域毎に探索を行うため、対象画像が曲率の変化するエッジを含んでいるような場合であっても、予測画像の生成を正確に行うことができるという効果を奏する。
 〔実施形態2〕
 以下では、本発明に係る画像符号化装置および画像復号装置の第2の実施形態である画像符号化装置300、および、画像復号装置350について、図11~15を参照して説明する。なお、すでに説明した構成と同じ部分については、同じ符号を付し、説明を省略する。
 2.1 画像符号化装置300
 本実施形態に係る画像符号化装置300について、図11~13に基づいて説明すれば以下のとおりである。
 図11は、本実施形態に係る画像符号化装置300の構成を示すブロック図である。図11に示すように、画像符号化装置300は、ヘッダ情報決定部111、ヘッダ情報符号化部112、MB設定部113、可変長符号多重化部114、および、MB符号化部205を備えている。
 ヘッダ情報決定部111、ヘッダ情報符号化部112、MB設定部113、および可変長符号多重化部114については既に説明したので、以下、MB符号化部205について説明する。
 2.1.1 MB符号化部205
 図11に示した画像符号化装置300が備えているMB符号化部205について、図12を参照して説明する。このMB符号化部205は、MB設定部113から出力される、処理対象MBに対応する入力画像#113に基づいて、符号化データ#205を生成し、出力するためのものである。
 図12は、MB符号化部205の構成を示すブロック図である。図12に示すように、MB符号化部205は、予測単位構造比較部201、予測単位分割部202、TM予測部105、予測残差符号化部107、復号画像生成部108、フレームメモリ109、サイド情報符号化部203、およびMB符号化データ多重化部204より構成される。
 TM予測部105、予測残差符号化部107、復号画像生成部108、およびフレームメモリ109については既に説明したので、以下、予測単位構造比較部201、予測単位分割部202、サイド情報符号化部203、およびMB符号化データ多重化部204について説明する。
 <予測単位構造比較部201>
 予測単位構造比較部201は、処理対象MBに対応する入力画像#113を解析し、予め定められた予測単位セットに含まれる予測単位の中から、当該MBに適した予測単位を選択する。また、予測単位構造比較部201は、選択された予測単位の構造を示す情報である予測単位構造情報#201を出力する。
 以下では、上記予め定められた予測単位セットに、16×1画素の予測単位と1×16画素の予測単位が含まれるような場合を例にとり説明を行うが、本発明はこれに限定されるものではなく、予測単位セットの組み合わせとしては他にも様々な組み合わせが考えられる。なお、上記予め定められた予測単位セットには、縦長長方形の予測単位と横長長方形の予測単位とが含まれていることが好ましい。
 また、縦長長方形を予測単位とし、予測単位上方の画素を予測に用いることにより、鉛直方向の直線に近い方向性を持つエッジの予測を精度よく行うことができる。一方で、横長長方形を予測単位とし、予測単位左方の画素を予測に用いることにより、水平方向の直線に近い方向性を持つエッジの予測を精度よく行うことができる。
 したがって、縦長長方形の予測単位、および、横長長方形の予測単位の双方を予測単位セットに含むことにより、入力画像#113におけるエッジが鉛直と水平のいずれに近い場合であっても、精度の高い予測が可能となる。
 また、予測単位構造比較部201は、予測単位セットに含まれる予測単位のうち、符号化効率の高い予測単位を選択する。
 例えば、予測単位構造比較部201は、レート歪判定の結果に応じて予測単位を選択する。すなわち、予測単位構造比較部201は、上記予め定められた予測単位セットに含まれる各予測単位に対して、各予測単位を用いて処理対象MBの入力画像#113を符号化した際の符号量Rと、歪みD(処理対象上での入力画像と復号画像のSSD)とを計算して評価値RD=R+Dλを計算し、その結果に応じて、各予測単位のうち、何れか1つの予測単位を選択する。より具体的には、上記評価値RDがより小さくなる予測単位を選択する。
 また、選択された予測単位の構造を示す予測単位構造情報#201は、予測単位分割部202、および、サイド情報符号化部203に対して出力される。
 なお、予測単位構造比較部201は、エッジの方向性を解析することによって予測単位を選択してもよいし、その他の方法によって予測単位を選択してもよい。
 <予測単位分割部202>
 予測単位分割部202は、処理対象MBに対応する入力画像#113を、予測単位構造情報#201によって定められた所定の予測単位に分割する。また、予測単位分割部106は、各予測単位についての情報である予測単位情報#106を出力する。予測単位情報#106は、上述のように、各予測単位の位置およびサイズについての情報を含む。
 また、各予測単位には、図4の(a)~(d)を用いてすでに説明したように、予測単位インデックスが付与される。
 <サイド情報符号化部203>
 サイド情報符号化部203は、予測単位構造情報#201に基づき、サイド情報#203を生成する。生成されたサイド情報#203は、MB符号化データ多重化部204に対して出力される。
 例えば、予測単位セットが、16×1画素、および、1×16画素の2つの予測単位によって構成されている場合には、サイド情報符号化部203は、予測単位構造情報#201により示される予測単位が16×1画素である場合にビット列0を生成し、予測単位構造情報#201により示される予測単位が1×16画素である場合にビット列1を生成する。
 また、予測単位セットが、16×1画素、1×16画素、4×1画素、および、1×4画素の4つの予測単位によって構成されている場合には、サイド情報符号化部203は、予測単位構造情報#201により示される予測単位が16×1画素である場合に、サイド情報#203として、ビット列00を生成し、予測単位構造情報#201により示される予測単位が1×16画素である場合に、ビット列10を生成し、予測単位構造情報#201により示される予測単位が8×1画素である場合に、ビット列01を生成し、予測単位構造情報#201により示される予測単位が1×8画素である場合に、ビット列11を生成する。ここで、上記ビット列の上位桁は、予測単位の長辺方向を示す情報であり、上記ビット列の下位桁は、予測単位のサイズを示す情報である。このように、予測単位の方向に関する情報(方向情報)と、予測単位のサイズに関する情報(サイズ情報)とに分けて符号化を行うことにより、ビット列のうち、方向情報を示す桁に同一のシンボルが連続して発生しやすくなるので、より効率のよい符号化処理を行うことができる。例えば、方向情報を示す桁のビットを集めて新たなビット列を構成し、当該ビット列に対してハフマン符号化や算術符号化を適用することで、シンボルの発生確率の偏りを利用して、当該ビット列のビット数を削減できる。
 <MB符号化データ多重化部204>
 MB符号化データ多重化部204は、予測残差符号化部107から出力される符号化データ#110と、サイド情報符号化部203から出力されるサイド情報#203とに基づいて、符号化データ#205を生成し、出力する。
 図13は、符号化データ#205のビットストリーム構造を示す図である。図13に示すように、符号化データ#205は、予測単位セットのうち、何れの予測単位が選択されたかを示すサイド情報#203と、符号化データ#110とを含んでいる。
 <MB符号化部205における符号化処理の効果>
 上述したMB符号化部205を用いることによって、MB単位の入力画像#113を符号化する際の符号化効率が向上する。
 より具体的には、予測単位構造比較部201によって、予測単位セットに含まれる複数の予測単位の中から、入力画像#113の局所的な特性に最も適した予測単位、すなわち、符号化効率の最も高い予測単位が選択され、当該予測単位を用いて入力画像#113の符号化を行うことができるので、符号化効率が向上するという効果がある。
 また、予測単位セットが、縦長の予測単位と横長の予測単位とを含むことにより、様々な特性の入力画像#113の符号化を効率よく行うことができる。
 以上のように、MB符号化部205を用いることによって、より符号化効率の高い符号化を行うことができる。
 2.2 画像復号装置350
 続いて、本実施形態に係る画像復号装置350について、図14および図15を参照して説明する。画像復号装置350は符号化データ#181を受け、復号画像#254を生成し出力する。
 図14は、画像復号装置350の構成を示すブロック図である。図14に示すように、画像復号装置350は、可変長符号逆多重化部154、ヘッダ情報復号部155、MB設定部156、および、MB復号部254を備えている。
 可変長符号逆多重化部154、ヘッダ情報復号部155、およびMB設定部156については既に説明したので、以下、MB復号部254について説明する。
 2.2.1 MB復号部254
 図14に示した画像復号装置350が備えているMB復号部254について、図15を参照して説明する。このMB復号部254は、MB設定部156から出力される、個々のMBに対応する符号化データ#156を順次復号することにより、個々のMBに対応する復号画像#254を生成し、出力するためのものである。
 図15は、MB復号部254の構成を示すブロック図である。図15に示すように、MB復号部254は、MB符号化データ逆多重化部251、サイド情報復号部253、予測単位設定部252、予測残差復号部152、TM予測部105、復号画像生成部108、およびフレームメモリ109より構成される。
 予測残差復号部152、TM予測部105、復号画像生成部108、およびフレームメモリ109については既に説明したので、以下、MB符号化データ逆多重化部251、サイド情報復号部253、および予測単位設定部252について説明する。
 <MB符号化データ逆多重化部251>
 MB符号化データ逆多重化部251は、符号化データ#156を逆多重化することによって、サイド情報#251b、および、MB単位の符号化データ#251aに分離する。サイド情報#251bは、サイド情報復号部253に対して出力され、MB単位の符号化データ#251aは、予測単位設定部252、および、予測残差復号部152に対して出力される。なお、サイド情報#251bは、上述したサイド情報#203に対応する情報である。
 <サイド情報復号部253>
 サイド情報復号部253は、サイド情報#251bを復号し、予測単位構造情報#253を生成する。なお、予測単位構造情報#253は、予測単位構造情報#201に対応する情報である。
 <予測単位設定部252>
 予測単位設定部252は、MB単位の符号化データ#251a、および、予測単位構造情報#253に基づいて、MB内の予測単位の位置やサイズを示す予測単位情報#252を生成し、所定の順序で順次出力する。
 <MB復号部254における復号の効果>
 以上のように構成されたMB復号部254を用いることによって、サイド情報に含まれる、最適な予測単位、すなわち、符号化効率の最も高い予測単位を用いて復号処理を行うことができるので、復号効率が向上するという効果がある。
 上記のように、本実施形態に係る画像符号化装置300は、実施形態1に係る画像符号化装置100の構成に加えて、複数のブロック(MB)の各々を長辺同士が互いに隣接する複数の長方形領域(予測単位)に分割する分割手段であって、上記複数の長方形領域の長辺方向をブロック毎に切り替える分割手段(予測単位構造比較部201)を備えている。
 また、上記のように、本実施形態に係る画像符号化装置300は、上記複数のブロック(MB)の各々について、上記複数の長方形領域(予測単位)の長辺方向を示すフラグ(予測単位構造情報#201)を符号化するフラグ符号化手段(サイド情報符号化部203)を更に備えている。
 したがって、当該フラグを参照することによって復号装置にて復号可能な、符号化効率の高い符号化データを生成することができる。
 〔実施形態3〕
 以下では、本発明に係る画像符号化装置および画像復号装置の第3の実施形態について図16~図20を参照して説明する。なお、すでに説明した構成と同じ部分については、同じ符号を付し、説明を省略する。
 3.1 MB符号化部309
 本実施形態に係る画像符号化装置が備えているMB符号化部309について、図16を参照して説明する。本実施形態に係る画像符号化装置は、上述した画像符号化装置100におけるMB符号化部110に代えて、MB符号化部309を備えている。
 図16は、第3の実施形態に係る画像符号化装置が備えているMB符号化部309の構成を示すブロック図である。図16に示すように、MB符号化部309は、量子化単位分割部306、予測単位分割部106、TM予測部305、フレームメモリ109、予測残差符号化部307、および、復号画像生成部308を備えている。
 MB符号化部309は、MB単位の入力画像#113を受け、符号化データ#309を出力する。
 量子化単位分割部306は、入力画像#113を複数の量子化単位に分割する。ここで、量子化単位のサイズは、予測単位のサイズよりも大きくとるものとする。また、各量子化単位のサイズについて情報は、量子化単位情報#306として出力される。
 TM予測部305は、量子化単位分割部306から出力された量子化単位情報#306、および、予測単位分割部106から出力される予測単位情報#106を受け、予測画像#305を出力する。TM予測部305の詳細については、参照する図面を代えて後述する。
 予測残差符号化部307は、予測画像#305、量子化単位情報#306、予測単位情報#106、および入力画像#113に基づいて、符号化データ#309及び復号残差#307を生成し、出力する。
 復号画像生成部308は、入力された復号残差#307に予測画像#305を加えることで復号画像#308を生成し、出力する。出力された復号画像#308は、フレームメモリ109に記憶される。
 3.1.1 TM予測部305
 続いて、図16に示したMB符号化部309が備えているTM予測部305について、図17および図19を参照しつつより詳しく説明する。
 図17は、TM予測部305の構成を示すブロック図である。図17に示すように、TM予測部305は、探索領域設定部301、テンプレート設定部302、テンプレート比較部303、および、予測画像生成部304を備えている。
 テンプレート設定部302は、量子化単位情報#306、および、予測単位情報#106に基づいて、予測対象領域に対応するテンプレートを設定し、当該テンプレートについての情報であるテンプレート情報#302を出力する。
 探索領域設定部301は、量子化単位情報#306、および、予測単位情報#106に基づいて、予測対象領域に対応する探索領域を設定し、当該探索領域についての情報である探索領域情報#301を出力する。
 図19は、テンプレート設定部302、および、探索領域設定部301の動作を説明するための図である。図19に示すように、上記テンプレートは、上記予測対象領域を含む量子化単位の外側に設定される。
 また、図19に示すように、上記テンプレートは、上記予測対象領域が含まれる変換領域外に存在する領域のうち、上記予測対象領域に最も近い領域から選択されることが好ましい。また、図19に示すように、上記探索領域は、上記テンプレートから、上記予測対象領域と上記テンプレートとの間の距離と同じ距離だけ離れた領域に設定されることが好ましい。また、上記距離が大きい場合には、それに応じて、上記探索領域の範囲を広くとることが好ましい。
 テンプレート比較部303は、テンプレート情報#302、探索領域情報#301、および、復号画像#109に基づいてテンプレートマッチングを実行することにより、予測画像生成用パラメータ#303を導出し、出力する。より具体的には、テンプレート比較部303は、テンプレート情報#302によって示されたテンプレートを最も良く近似する探索候補を、探索領域情報#301によって示される探索領域から求め、当該探索候補の当該テンプレートに対する相対位置(変位)を計算する。また、当該相対位置を示す情報である予測画像生成用パラメータ#303として出力する。
 予測画像生成部304は、テンプレート比較部303で導出された予測画像生成用パラメータ#303、および、フレームメモリ109に記録されている復号画像#109に基づいて、予測対象領域に対応する予測画像#305を生成し、出力する。具体的には、予測画像生成部304は、予測対象領域の各画素に対して、予測画像生成用パラメータ#303が示す変位分だけずれた位置にある復号画像の各画素を割り当てる。
 3.2 MB復号部353
 本実施形態に係る画像復号装置が備えているMB復号部353について、図18を参照して説明する。本実施形態に係る画像復号装置は、上述した画像復号装置150におけるMB復号部153に代えて、MB復号部353を備えている。このMB復号部353は、符号化データ#156を受け、復号画像#254を生成し出力するためのものである。
 図18は、MB復号部353の構成を示すブロック図である。MB復号部353は、TM予測部305、復号画像生成部308、フレームメモリ109、予測単位設定部151、量子化単位設定部351、および、予測残差復号部352より構成される。
 量子化単位設定部351は、MB内の量子化単位の位置やサイズを示す量子化単位情報#351を所定の順序で順次出力する。
 予測残差復号部352は、入力された符号化データ#156に対し可変長符号復号を適用して変換係数を生成する。続いて、生成した変換係数に対し、量子化単位情報#351の示す量子化単位のサイズと同一サイズの逆DCT変換(DCTの逆変換)を適用することによって復号残差#352を生成し、出力する。
 また、MB復号部353における復号画像生成部308は、入力された復号残差#352に予測画像#305を加えることによって、復号画像#254を生成し、出力する。
 3.3 MB符号化部309におけるMB符号化処理
 以下では、上述したMB符号化部309における符号化処理について図20を参照して説明する。図20は、MB符号化部309における、処理対象MBに対応する入力画像#113を符号化して符号化データ#110を生成する手順を示すフローチャートである。
 (手順S41)まず、MB符号化部309に入力された処理対象MBに対応する入力画像#113が、量子化単位分割部306、予測単位分割部106、および、予測残差符号化部307に入力される。量子化単位分割部306では、入力画像#113が所定のサイズのM個の量子化単位に分割され、各量子化単位に0以上M-1以下の範囲の整数値を取る量子化単位インデックス(tuid)が付与される。
 (手順S42)続いて、予測単位分割部106では、入力画像#113が所定のサイズのN個の予測単位に分割され、各予測単位に0以上N-1以下の範囲の整数値を取る予測単位インデックス(puid)が付与される。
 (手順S43)続いて、復号画像の生成が完了していない予測単位の中で、puidが最小である予測単位が予測対象領域に設定される。また、当該予測対象領域を含む量子化単位が変換対象領域に設定される。また、予測対象領域に対応する予測単位情報#106が、予測単位分割部106からTM予測部305へ入力され、変換対象領域に対応する量子化単位情報#306が、量子化単位分割部306からTM予測部305へ入力される。
 (手順S44)続いて、TM予測部305では、予測単位情報#106、および、量子化単位情報#306に基づき、フレームメモリ109に記録された復号画像#109上でテンプレートマッチングが行われる。また、その結果に基づいて、予測対象領域に対応する予測画像#305が生成される。予測画像#305は、予測残差符号化部307、および、復号画像生成部308に対して出力される。
 (手順S45)また、MB符号化部309は、変換対象領域内のすべての予測単位について予測画像#305が生成されたか否かの判定を行う。
 (手順S46)変換対象領域内のすべての予測単位について予測画像#305が生成された場合(手順S45のYes)には、予測残差符号化部307は、変換対象領域の復号残差#307を生成する。
 (手順S47)手順S46にて生成された復号残差#307を受けた復号画像生成部308は、変換対象領域の復号画像#308を生成する。
 (手順S48)変換対象領域に予測画像#350が生成されていない予測単位が含まれている場合には(手順S45のNo)、または、手順S47にて復号画像#308が生成された場合には、MB符号化部309は、処理対象MB内のすべての予測単位が復号済みであるか否かの判定を行う。処理対象MB内のすべての予測単位が復号済みである場合には、当該処理対象MBの符号化処理を終了し(手順S48のYes)、処理対象MB内に復号されていない予測単位が含まれている場合には(手順S48のNo)、手順S43の処理を行う。
 上記の手順S41~S48により、MB符号化部309では、処理対象MBに対応する入力画像#113から、同じMBに対応する符号化データ#309を生成して出力することができる。
 なお、本実施形態においては、量子化単位のサイズは、予測単位のサイズと同一であるか、または、予測単位のサイズよりも大きい。すなわち、上記量子化単位の数Mは、上記予測単位の数N以上であるものとし、上記量子化単位は1または複数の上記予測単位を含むものとする。
 3.4 MB符号化部309における符号化の効果
 上述したMB符号化部309を用いることによって、MB単位の入力画像#113を符号化する符号化効率が向上する。また、MB符号化部309を用いることによって、符号化処理の処理時間が削減される。
 より具体的には、MB符号化部309を用いることにより、単一の予測単位を含む量子化単位ごとに周波数変換および量子化を行うことができるため、予測単位の短辺方向の相関が除去され、符号化効率が向上するという効果がある。
 また、MB符号化部309を用いることにより、複数の予測単位を含む量子化単位ごとに周波数変換および量子化を行うこともできる。すなわち、同一の量子化単位に含まれる複数の予測単位についての予測画像#305の生成を並列に実行することができるので、処理速度が上昇するという効果がある。また、そのように並列処理を行うことにより、処理負担が低減されるという効果がある。
 3.5 まとめ
 上記のように、本実施形態においては、上記量子化単位は、2以上の長方形領域(予測単位)からなり、上記予測画像生成手段(TM予測部305)は、対象長方形領域の長辺に対向する復号画像上の長方形領域のうち、上記対象長方形領域に最も近い長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域であって、上記テンプレートとの間隔が上記対象長方形領域と上記テンプレートとの間隔に等しい長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索する、ことを特徴としている。
 上記の構成によれば、上記量子化単位が、2以上の長方形領域、すなわち、2以上の予測単位から構成される。さらに、量子化単位に含まれる各予測単位の予測画像は、同じ量子化単位上の復号画像を参照することなく生成できる。すなわち、上記の構成によれば、各量子化単位に含まれる複数の予測単位を並列に処理することができる。したがって、上記の構成によれば、符号化処理の処理時間を削減することができる。
 また、上記量子化単位は、長辺が互いに対向する2以上の長方形領域を含み、上記量子化手段(予測残差符号化部107)は、上記量子化単位で周波数変換を行い、上記逆量子化手段(予測残差符号化部107)は、上記量子化単位で上記周波数変換の逆変換である逆周波数変換を行い、上記予測画像生成手段(TM予測部305)は、対象長方形領域の長辺に対向する復号画像上の長方形領域のうち、上記対象長方形領域に最も近い長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域であって、上記テンプレートとの間隔が上記対象長方形領域と上記テンプレートとの間隔に等しい長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索する、ことが好ましい。
 上記の構成によれば、上記量子化単位が、長辺が互いに対向する2以上の長方形領域、すなわち、長辺が互いに対向する2以上の予測単位を含んでいる。さらに、量子化単位に含まれる各予測単位の予測画像は、同じ量子化単位上の復号画像を参照することなく生成できる。それにより、量子化単位で周波数変換を適用することができるため、予測単位の短辺方向の相関が除去され、符号化効率がより一層向上する。
 4.補足事項
 <補足事項1>
 本発明は、上述した実施形態に限定されるものではない。
 例えば、実施形態1におけるTM予測部105は、テンプレートのDC値とテンプレートの上方に位置する探索候補のDC値との差が小さければ、予測単位の1画素上方の領域であって、当該予測単位と同形状の領域のDC値を、当該予測単位の各画素の予測値に設定してもよい(以下、「平坦予測と」呼ぶ)。
 より具体的には、TM予測部105は、
 (手順SA1)まず、テンプレート上の復号画像のDC値と探索候補上の復号画像のDC値の差分ΔDCを計算し、
 (手順SA2)ΔDCを用いて、Ev=ΔDC×ΔDC×(テンプレートの画素数)により、評価指標Evを算出し、
 (手順SA3)評価指数Evが、テンプレート比較部103において計算された全ての非類似度(SSD)よりも小さい場合には、平坦予測を選択する。
 (手順SA4)平坦予測が選択された場合には、予測対象領域の各画素の値をテンプレートのDC値とする。
 実施形態2および3についても、ほぼ同様である。
 上記の平坦予測を用いることによって、高い符号化効率を維持しつつ、符号化処理の処理量を削減することができる。また、上記の平坦予測は、エッジ部分と平坦部分が混在するMBにおいて、特に、MBの平坦部分に対する符号化において有効である。
 <補足事項2>
 また、本発明に係る画像符号化装置は、処理対象MBを複数のサブブロックに分割し、サブブロックごとに、上述したテンプレートマッチングによる予測を用いるか、H.264/AVCにおけるイントラ予測などの方向予測を用いるか、を選択するようにしても良い。
 上記のような選択を行うことによって、処理対象MBの有する局所的な特性により適切な予測方式を用いて符号化を行うことができるため、符号化効率を高めることができる。
 <補足事項3>
 また、本発明に係る画像符号化装置は、量子化された変換係数を符号化する前に、予測単位の短辺方向に所定の長さで可逆変換を行ってもよい。
 より具体的には、本発明に係る画像復号装置は、以下の手順によって符号化を行っても良い。
 (手順SA21)まず、全ての予測単位の量子化された変換係数を導出し、
 (手順SA22)次に、処理対象MB内の各予測単位における同一周波数成分に対応する量子化された変換係数から構成される変換係数群に対して、可逆変換を行う。
 (手順SA23)次に、手順SA22にて可逆変換された値を可変長符号化する。
 上記のような符号化を行うことにより、予測残差における予測単位の短辺方向の相関を利用した符号化を行うことができるので、より効率のよい符号化を行うことができる。
 <補足事項4>
 また、本発明に係る画像復号装置は、テンプレート上の復号画像の特性に基づいて、予測単位、および、予測方法を切り替えるようにしても良い。
 例えば、本発明に係る画像復号装置は、テンプレート上の復号画像の各画素の画素値の分散などの指標を用いることによって、テンプレート上にエッジが存在するか否かを判定し、エッジが存在する場合には、4×1画素の予測単位を選択し当該サイズでDCTを行い、エッジが存在しない場合には、16×1画素の予測単位を選択し当該サイズでDCTを行うようにしても良い。
 一般に、エッジが存在しない場合には、広い範囲でDCTを行うことにより符号化効率を向上させることができるので、上記のような構成をとることによって、サイド情報を増加させることなく、適切な予測単位を選択することができる。
 また、本発明に係る画像復号装置は、テンプレート上の復号画像の各画素の画素値の分散が小さい場合には、上述の平坦予測を用いるようにしてもよい。
 一般に、処理対象MBにおけるエッジ部分と平坦部分のうち、平坦部分は、各画素の画素値の分散が小さい。また、平坦部分については、上述した平坦予測を用いることにより符号化処理の処理量を削減することができる。
 したがって、上記のような構成をとることによって、高い符号化効率を維持しつつ、符号化に必要な処理量を削減することができる。
 本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
 (付記事項)
 例えば、本発明は、以下のように表現することもできる。
 1.複数のブロックに分割された対象画像をブロック毎に符号化する画像符号化装置において、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の対象画像から予測画像を減算して得られる予測残差を、1以上の長方形領域からなる連続した量子化単位毎に量子化する量子化手段と、上記対象ブロック上の復号画像を上記量子化単位毎に生成する逆量子化手段であって、上記量子化手段にて生成された量子化値を逆量子化して得られる予測残差を上記予測画像に加算することによって、対象量子化単位上の復号画像を生成する逆量子化手段と、上記対象ブロック上の予測画像を上記長方形領域毎に生成する予測画像生成手段であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、対象長方形領域上の予測画像を生成する予測画像生成手段と、を備えている、ことを特徴とする画像符号化装置。
 2.上記量子化単位は、単一の長方形領域からなり、上記予測画像生成手段は、対象長方形領域の長辺に隣接する復号画像上の長方形領域をテンプレートとし、該テンプレートの長辺に隣接する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索する、ことを特徴とする1.に記載の画像符号化装置。
 3.上記量子化単位は、2以上の長方形領域からなり、上記予測画像生成手段は、対象長方形領域の長辺に対向する復号画像上の長方形領域のうち、上記対象長方形領域に最も近い長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域であって、上記テンプレートとの間隔が上記対象長方形領域と上記テンプレートとの間隔に等しい長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索する、ことを特徴とする1.に記載の画像符号化装置。
 4.上記量子化手段は、上記2以上の長方形領域から得られた各々の予測残差を並列に量子化する、ことを特徴とする3.に記載の画像符号化装置。
 5.上記複数の長方形領域の各々は、短辺方向の幅が1画素の長方形領域である、ことを特徴とする1.から4.までの何れかに記載の画像符号化装置。
 6.上記複数のブロックの各々を長辺同士が互いに隣接する複数の長方形領域に分割する分割手段であって、上記複数の長方形領域の長辺方向をブロック毎に切り替える分割手段を備えている、ことを特徴とする1.から5.までの何れかに記載の画像符号化装置。
 7.上記分割手段は、符号化効率に応じて、上記複数の長方形領域の長辺方向をブロック毎に切り替える、ことを特徴とする6.に記載の画像符号化装置。
 8.上記複数のブロックの各々について、上記複数の長方形領域の長辺方向を示すフラグを符号化するフラグ符号化手段を更に備えている、ことを特徴とする1.から7.までの何れかに記載の画像符号化装置。
 9.複数のブロックに分割された対象画像をブロック毎に符号化することによって得られた符号化データのデータ構造であって、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の対象画像から予測画像を減算して得られる予測残差を、1以上の長方形領域からなる連続した量子化単位毎に量子化することによって生成された符号化データを含み、上記対象ブロック上の予測画像は、上記長方形領域毎に生成されたものであり、各長方形領域上の予測画像は、当該長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの当該長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって生成されたものである、ことを特徴とする符号化データのデータ構造。
 10.複数のブロックに分割された復号画像をブロック毎に生成する画像復号装置において、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の復号画像を、1以上の長方形領域からなる連続した量子化単位毎に生成する逆量子化手段であって、量子化値を逆量子化して得られた予測残差を予測画像に加算することによって、対象量子化単位上の復号画像を生成する逆量子化手段と、上記予測画像を上記長方形領域毎に生成する予測画像生成手段であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成する予測画像生成手段と、を備えている、ことを特徴とする画像復号装置。
 11.複数のブロックに分割された対象画像をブロック毎に符号化する画像符号化方法であって、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の対象画像を、1以上の長方形領域からなる連続した量子化単位毎に量子化する量子化工程であって、対象量子化単位上の対象画像から予測画像を減算して得られた予測残差を量子化する量子化工程と、上記対象ブロック上の復号画像を上記量子化単位毎に生成する逆量子化工程であって、上記量子化工程にて生成された量子化値を逆量子化して得られる予測残差を上記予測画像に加算することによって、上記対象量子化単位上の復号画像を生成する逆量子化工程と、上記予測画像を上記長方形領域毎に生成する予測画像生成工程であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成する予測画像生成工程と、を含んでいる、ことを特徴とする画像符号化方法。
 12.複数のブロックに分割された復号画像をブロック毎に生成する画像復号方法において、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の復号画像を、1以上の長方形領域からなる連続した量子化単位毎に生成する逆量子化工程であって、量子化値を逆量子化して得られた予測残差を予測画像に加算することによって、対象量子化単位上の復号画像を生成する逆量子化工程と、上記予測画像を上記長方形領域毎に生成する予測画像生成工程であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成する予測画像生成工程と、を含んでいる、ことを特徴とする画像復号方法。
 本発明に係る画像符号化装置は、複数のブロックに分割された対象画像をブロック毎に符号化する画像符号化装置において、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の対象画像から予測画像を減算して得られる予測残差を、1以上の長方形領域からなる連続した量子化単位毎に量子化する量子化手段と、上記対象ブロック上の復号画像を上記量子化単位毎に生成する逆量子化手段であって、上記量子化手段にて生成された量子化値を逆量子化して得られる予測残差を上記予測画像に加算することによって、対象量子化単位上の復号画像を生成する逆量子化手段と、上記対象ブロック上の予測画像を上記長方形領域毎に生成する予測画像生成手段であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、対象長方形領域上の予測画像を生成する予測画像生成手段と、を備えている、ことを特徴としている。
 本発明に係る上記の画像符号化装置によれば、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成することができる。
 すなわち、上記の画像符号化装置によれば、上記テンプレートとの相関が最も高い領域を、上記長方形領域を長辺方向に平行移動して得られる復号画像上の領域を1次元的に走査することにより探索する。したがって、上記の画像符号化装置によれば、特許文献1に記載された技術のように2次元的な走査を行う場合に比べて、探索を行う際の計算量を削減することができるため、予測画像の生成を高速に行うことができるという効果を奏する。
 また、上記の画像符号化装置は、上記長方形領域毎に探索を行うため、対象画像が曲率の変化するエッジを含んでいるような場合であっても、予測画像の生成を正確に行うことができる。すなわち、対象画像が曲率の変化するエッジを含んでいるような場合であっても、符号化効率が高いという効果を奏する。
 また、上記量子化単位は、単一の長方形領域からなり、上記予測画像生成手段は、対象長方形領域の長辺に隣接する復号画像上の長方形領域をテンプレートとし、該テンプレートの長辺に隣接する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索する、ことが好ましい。
 上記の構成によれば、対象長方形領域の長辺に隣接する復号画像上の長方形領域をテンプレートとし、該テンプレートの長辺に隣接する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうちで上記テンプレートとの相関が最も高い領域を探索する、ことができるので、予測対象領域におけるエッジの位置と、当該予測対象領域に隣接する領域におけるエッジの位置のずれを検出することにより予測画像を生成することができる。すなわち、当該エッジが曲線であるような場合であっても、当該曲線の曲率を検出することにより予測画像を生成することができるので、符号化効率を更に向上させることができるという更なる効果を奏する。
 また、上記量子化単位は、2以上の長方形領域からなり、上記予測画像生成手段は、対象長方形領域の長辺に対向する復号画像上の長方形領域のうち、上記対象長方形領域に最も近い長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域であって、上記テンプレートとの間隔が上記対象長方形領域と上記テンプレートとの間隔に等しい長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索する、ことが好ましい。
 上記の構成によれば、上記量子化単位が、2以上の長方形領域、すなわち、2以上の予測単位から構成される。さらに、量子化単位に含まれる各予測単位の予測画像は、同じ量子化単位上の復号画像を参照することなく生成できる。すなわち、上記の構成によれば、各量子化単位に含まれる複数の予測単位を並列に処理することができる。したがって、上記の構成によれば、符号化処理の処理時間を削減することができるという更なる効果を奏する。
 また、上記量子化単位は、長辺が互いに対向する2以上の長方形領域を含み、上記量子化手段は、上記量子化単位で周波数変換を行い、上記逆量子化手段は、上記量子化単位で上記周波数変換の逆変換である逆周波数変換を行い、上記予測画像生成手段は、対象長方形領域の長辺に対向する復号画像上の長方形領域のうち、上記対象長方形領域に最も近い長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域であって、上記テンプレートとの間隔が上記対象長方形領域と上記テンプレートとの間隔に等しい長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索する、ことが好ましい。
 上記の構成によれば、上記量子化単位が、長辺が互いに対向する2以上の長方形領域、すなわち、長辺が互いに対向する2以上の予測単位を含んでいる。さらに、量子化単位に含まれる各予測単位の予測画像は、同じ量子化単位上の復号画像を参照することなく生成できる。それにより、量子化単位で周波数変換を適用することができるため、予測単位の短辺方向の相関が除去され、符号化効率がより一層向上するという更なる効果を奏する。
 また、上記複数の長方形領域の各々は、短辺方向の幅が1画素の長方形領域である、ことが好ましい。
 上記の構成によれば、短辺方向の幅が1画素の長方形領域を用いて予測画像を生成することができる。したがって、予測対象領域におけるエッジ(曲線)の曲率をより正確に検出することにより、より正確な予測を行うことができるため、符号化効率がさらに向上するという効果を奏する。
 また、上記画像符号化装置は、上記複数のブロックの各々を長辺同士が互いに隣接する複数の長方形領域に分割する分割手段であって、上記複数の長方形領域の長辺方向をブロック毎に切り替える分割手段を備えている、ことが好ましい。
 上記の構成によれば、上記複数の長方形領域の長辺方向をブロック毎に切り替える分割手段を備えているため、符号化対象画像の局所的な特性に最適な長辺方向を有する長方形領域を用いて予測画像の生成を行うことができるため、符号化効率をさらに向上させることができるという更なる効果を奏する。
 また、上記画像符号化装置は、上記複数のブロックの各々について、上記複数の長方形領域の長辺方向を示すフラグを符号化するフラグ符号化手段を更に備えている、ことが好ましい。
 上記の構成によれば、上記複数のブロックの各々について、上記複数の長方形領域の長辺方向を示すフラグを符号化するフラグ符号化手段を更に備えているため、画像復号装置において符号化データを復号する際に、当該フラグを参照して復号を行うことができる。したがって、上記の構成によれば、復号装置にて復号可能な、符号化効率の高い符号化データを生成することができるという更なる効果を奏する。
 また、本発明に係る符号化データのデータ構造は、複数のブロックに分割された対象画像をブロック毎に符号化することによって得られた符号化データのデータ構造であって、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の対象画像から予測画像を減算して得られる予測残差を、1以上の長方形領域からなる連続した量子化単位毎に量子化することによって生成された符号化データを含み、上記対象ブロック上の予測画像は、上記長方形領域毎に生成されたものであり、各長方形領域上の予測画像は、当該長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの当該長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって生成されたものである、ことを特徴としている。
 本発明に係る上記符号化データのデータ構造によれば、復号装置において、各長方形領域の予測画像と各量子化単位の量子化された予測残差に基づいて復号処理を行うことができる。従って、上記の構成によれば、復号効率のよい符号化データのデータ構造を実現することができるという効果を奏する。
 また、本発明に係る画像復号装置は、複数のブロックに分割された復号画像をブロック毎に生成する画像復号装置において、長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の復号画像を、1以上の長方形領域からなる連続した量子化単位毎に生成する逆量子化手段であって、量子化値を逆量子化して得られる予測残差を予測画像に加算することによって、対象量子化単位上の復号画像を生成する逆量子化手段と、上記予測画像を上記長方形領域毎に生成する予測画像生成手段であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成する予測画像生成手段と、を備えていることを特徴としている。
 本発明に係る上記の画像復号装置によれば、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成することができる。
 すなわち、上記の画像復号装置によれば、上記テンプレートとの相関が最も高い領域を、上記長方形領域を長辺方向に平行移動して得られる復号画像上の領域を1次元的に走査することにより探索する。したがって、上記の画像復号装置によれば、特許文献1に記載された技術のように2次元的な走査を行う場合に比べて、探索を行う際の計算量を削減することができるため、予測画像の生成を高速に行うことができるという効果を奏する。
 また、上記の画像復号装置は、上記長方形領域毎に探索を行うため、対象画像が曲率の変化するエッジを含んでいるような場合であっても、予測画像の生成を正確に行うことができるという効果を奏する。
 本発明は、画像を符号化する画像符号化装置、および、符号化された画像データを復号する画像復号装置に好適に適用することができる。
100 画像符号化装置
105 TM予測部(予測画像生成手段)
106 予測単位分割部
107 予測残差符号化部(量子化手段、逆量子化手段)
108 復号画像生成部
109 フレームメモリ
110 MB符号化部
150 画像復号装置
152 予測残差復号部(逆量子化手段)
203 サイド情報符号化部(フラグ符号化手段)

Claims (9)

  1.  複数のブロックに分割された対象画像をブロック毎に符号化する画像符号化装置において、
     長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の対象画像から予測画像を減算して得られる予測残差を、上記複数の長方形領域から選択された1以上の長方形領域からなる量子化単位毎に量子化する量子化手段と、
     上記対象ブロック上の復号画像を上記量子化単位毎に生成する逆量子化手段であって、上記量子化手段にて生成された量子化値を逆量子化して得られる予測残差を上記予測画像に加算することによって、対象量子化単位上の復号画像を生成する逆量子化手段と、
     上記対象ブロック上の予測画像を上記長方形領域毎に生成する予測画像生成手段であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、対象長方形領域上の予測画像を生成する予測画像生成手段と、を備えている、
    ことを特徴とする画像符号化装置。
  2.  上記量子化単位は、単一の長方形領域からなり、
     上記予測画像生成手段は、対象長方形領域の長辺に隣接する復号画像上の長方形領域をテンプレートとし、該テンプレートの長辺に隣接する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索する、
    ことを特徴とする請求項1に記載の画像符号化装置。
  3.  上記量子化単位は、2以上の長方形領域からなり、
     上記予測画像生成手段は、対象長方形領域の長辺に対向する復号画像上の長方形領域のうち、上記対象長方形領域に最も近い長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域であって、上記テンプレートとの間隔が上記対象長方形領域と上記テンプレートとの間隔に等しい長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索する、
    ことを特徴とする請求項1に記載の画像符号化装置。
  4.  上記量子化単位は、長辺が互いに対向する2以上の長方形領域を含み、
     上記量子化手段は、上記量子化単位で周波数変換を行い、
     上記逆量子化手段は、上記量子化単位で上記周波数変換の逆変換である逆周波数変換を行い、
     上記予測画像生成手段は、対象長方形領域の長辺に対向する復号画像上の長方形領域のうち、上記対象長方形領域に最も近い長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域であって、上記テンプレートとの間隔が上記対象長方形領域と上記テンプレートとの間隔に等しい長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索する、
    ことを特徴とする請求項1に記載の画像符号化装置。
  5.  上記複数の長方形領域の各々は、短辺方向の幅が1画素の長方形領域である、
    ことを特徴とする請求項1から4までの何れか1項に記載の画像符号化装置。
  6.  上記複数のブロックの各々を長辺同士が互いに隣接する複数の長方形領域に分割する分割手段であって、上記複数の長方形領域の長辺方向をブロック毎に切り替える分割手段を備えている、
    ことを特徴とする請求項1から5までの何れか1項に記載の画像符号化装置。
  7.  上記複数のブロックの各々について、上記複数の長方形領域の長辺方向を示すフラグを符号化するフラグ符号化手段を更に備えている、
    ことを特徴とする請求項1から6までの何れか1項に記載の画像符号化装置。
  8.  複数のブロックに分割された対象画像をブロック毎に符号化することによって得られた符号化データのデータ構造であって、
     長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の対象画像から予測画像を減算して得られる予測残差を、上記複数の長方形領域から選択された1以上の長方形領域からなる量子化単位毎に量子化することによって生成された符号化データを含み、
     上記対象ブロック上の予測画像は、上記長方形領域毎に生成されたものであり、各長方形領域上の予測画像は、当該長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの当該長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって生成されたものである、
    ことを特徴とする符号化データのデータ構造。
  9.  複数のブロックに分割された復号画像をブロック毎に生成する画像復号装置において、
     長辺同士が互いに隣接する複数の長方形領域に分割された対象ブロック上の復号画像を、上記複数の長方形領域から選択された1以上の長方形領域からなる量子化単位毎に生成する逆量子化手段であって、量子化値を逆量子化して得られた予測残差を予測画像に加算することによって、対象量子化単位上の復号画像を生成する逆量子化手段と、
     上記予測画像を上記長方形領域毎に生成する予測画像生成手段であって、対象長方形領域の長辺に対向する復号画像上の長方形領域をテンプレートとし、上記テンプレートの上記対象長方形領域に対向する側と反対側の長辺に対向する長方形領域を長辺方向に平行移動して得られる復号画像上の領域のうち、上記テンプレートとの相関が最も高い領域を探索することによって、上記対象長方形領域上の予測画像を生成する予測画像生成手段と、を備えている、
    ことを特徴とする画像復号装置。
PCT/JP2010/066248 2009-10-20 2010-09-17 画像符号化装置、画像復号装置、および、符号化データのデータ構造 WO2011048904A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP10824755.2A EP2493196A4 (en) 2009-10-20 2010-09-17 IMAGE ENCODING APPARATUS, IMAGE DECODING APPARATUS, AND CODED DATA STRUCTURE
CN201080046955.0A CN102577391A (zh) 2009-10-20 2010-09-17 图像编码装置、图像解码装置、以及编码数据的数据结构
US13/502,703 US20120219232A1 (en) 2009-10-20 2010-09-17 Image encoding apparatus, image decoding apparatus, and data structure of encoded data
JP2011537184A JPWO2011048904A1 (ja) 2009-10-20 2010-09-17 画像符号化装置、画像復号装置、および、符号化データのデータ構造

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009-241339 2009-10-20
JP2009241339 2009-10-20

Publications (1)

Publication Number Publication Date
WO2011048904A1 true WO2011048904A1 (ja) 2011-04-28

Family

ID=43900144

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/066248 WO2011048904A1 (ja) 2009-10-20 2010-09-17 画像符号化装置、画像復号装置、および、符号化データのデータ構造

Country Status (5)

Country Link
US (1) US20120219232A1 (ja)
EP (1) EP2493196A4 (ja)
JP (1) JPWO2011048904A1 (ja)
CN (1) CN102577391A (ja)
WO (1) WO2011048904A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018512810A (ja) * 2015-03-27 2018-05-17 クゥアルコム・インコーポレイテッドQualcomm Incorporated ビデオコーディングにおけるサブブロックの動き情報の導出

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201501511A (zh) * 2013-06-25 2015-01-01 Hon Hai Prec Ind Co Ltd 框內預測方法及系統

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007043651A (ja) * 2005-07-05 2007-02-15 Ntt Docomo Inc 動画像符号化装置、動画像符号化方法、動画像符号化プログラム、動画像復号装置、動画像復号方法及び動画像復号プログラム
JP2007300380A (ja) 2006-04-28 2007-11-15 Ntt Docomo Inc 画像予測符号化装置、画像予測符号化方法、画像予測符号化プログラム、画像予測復号装置、画像予測復号方法及び画像予測復号プログラム
WO2008102805A1 (ja) * 2007-02-23 2008-08-28 Nippon Telegraph And Telephone Corporation 映像符号化方法及び復号方法、それらの装置、それらのプログラム並びにプログラムを記録した記録媒体

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5446271A (en) * 1993-08-06 1995-08-29 Spectra-Physics Scanning Systems, Inc. Omnidirectional scanning method and apparatus
US5761686A (en) * 1996-06-27 1998-06-02 Xerox Corporation Embedding encoded information in an iconic version of a text image
CN1156169C (zh) * 1997-05-07 2004-06-30 西门子公司 一个数字化图象的编码方法和装置
JP2897761B2 (ja) * 1997-07-18 1999-05-31 日本電気株式会社 ブロック・マッチング演算装置及びプログラムを記録した機械読み取り可能な記録媒体
US6654419B1 (en) * 2000-04-28 2003-11-25 Sun Microsystems, Inc. Block-based, adaptive, lossless video coder
US6711211B1 (en) * 2000-05-08 2004-03-23 Nokia Mobile Phones Ltd. Method for encoding and decoding video information, a motion compensated video encoder and a corresponding decoder
EP1404136B1 (en) * 2001-06-29 2018-04-04 NTT DoCoMo, Inc. Image encoder, image decoder, image encoding method, and image decoding method
RU2008146977A (ru) * 2006-04-28 2010-06-10 НТТ ДоКоМо, Инк. (JP) Устройство прогнозирующего кодирования изображений, способ прогнозирующего кодирования изображений, программа прогнозирующего кодирования изображений, устройство прогнозирующего декодирования изображений, способ прогнозирующего декодирования изображений и программа прогнозирующего декодирования изображений
KR101712351B1 (ko) * 2009-06-26 2017-03-06 에스케이 텔레콤주식회사 다차원 정수 변환을 이용한 영상 부호화/복호화 장치 및 방법

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007043651A (ja) * 2005-07-05 2007-02-15 Ntt Docomo Inc 動画像符号化装置、動画像符号化方法、動画像符号化プログラム、動画像復号装置、動画像復号方法及び動画像復号プログラム
JP2007300380A (ja) 2006-04-28 2007-11-15 Ntt Docomo Inc 画像予測符号化装置、画像予測符号化方法、画像予測符号化プログラム、画像予測復号装置、画像予測復号方法及び画像予測復号プログラム
WO2008102805A1 (ja) * 2007-02-23 2008-08-28 Nippon Telegraph And Telephone Corporation 映像符号化方法及び復号方法、それらの装置、それらのプログラム並びにプログラムを記録した記録媒体

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
HONGBO ZHU: "Improved intra 4x4 DC prediction mode, ITU - Telecommunications Standardization Sector STUDY GROUP 16 Question 6", VCEG-AG15, VIDEO CODING EXPERTS GROUP (VCEG) 33RD MEETING, - 20 October 2007 (2007-10-20), SHENZHEN, CHINA, pages 1 - 3, XP030003619 *
See also references of EP2493196A4 *
THIOW KENG TAN ET AL.: "Intra Prediction by Template Matching", IEEE INTERNATIONAL CONFERENCE ON IMAGE PROCESSING (ICIP 2006), - October 2006 (2006-10-01), pages 1693 - 1696, XP008155299 *
YUNG-LYUL LEE ET AL.: "Improved lossless intra coding for H.264/MPEG-4 AVC", IEEE TRANSACTIONS ON IMAGE PROCESSING, vol. 15, no. 9, September 2006 (2006-09-01), pages 2610 - 2615, XP008155305 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018512810A (ja) * 2015-03-27 2018-05-17 クゥアルコム・インコーポレイテッドQualcomm Incorporated ビデオコーディングにおけるサブブロックの動き情報の導出
JP2018513611A (ja) * 2015-03-27 2018-05-24 クゥアルコム・インコーポレイテッドQualcomm Incorporated ビデオコーディングにおける動きベクトル導出
US10958927B2 (en) 2015-03-27 2021-03-23 Qualcomm Incorporated Motion information derivation mode determination in video coding
US11330284B2 (en) 2015-03-27 2022-05-10 Qualcomm Incorporated Deriving motion information for sub-blocks in video coding

Also Published As

Publication number Publication date
US20120219232A1 (en) 2012-08-30
EP2493196A1 (en) 2012-08-29
JPWO2011048904A1 (ja) 2013-03-07
CN102577391A (zh) 2012-07-11
EP2493196A4 (en) 2013-06-05

Similar Documents

Publication Publication Date Title
US11070802B2 (en) Moving image coding device, moving image decoding device, moving image coding/decoding system, moving image coding method and moving image decoding method
RU2603542C2 (ru) Способ и устройство для кодирования видео и способ и устройство для декодирования видео
KR101951696B1 (ko) 화면 내 예측 모드에 기초한 적응적인 변환 방법 및 이러한 방법을 사용하는 장치
KR101457929B1 (ko) 화면 간 예측 수행시 후보 블록 결정 방법 및 이러한 방법을 사용하는 장치
WO2012087034A2 (ko) 화면 내 예측 방법 및 이러한 방법을 사용하는 장치
KR20140128904A (ko) 화면 내 예측 방법 및 장치
KR101974952B1 (ko) 두 개의 후보 인트라 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법 및 이러한 방법을 사용하는 장치
KR20170108367A (ko) 인트라 예측 기반의 비디오 신호 처리 방법 및 장치
CN108810532B (zh) 图像解码装置
RU2721160C1 (ru) Способ и устройство декодирования изображения на основе интрапредсказания в системе кодирования изображения
WO2011048904A1 (ja) 画像符号化装置、画像復号装置、および、符号化データのデータ構造
KR102185952B1 (ko) 두 개의 후보 인트라 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법 및 이러한 방법을 사용하는 장치
KR102069784B1 (ko) 두 개의 후보 인트라 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법 및 이러한 방법을 사용하는 장치
KR102516137B1 (ko) 두 개의 후보 인트라 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법 및 이러한 방법을 사용하는 장치
JP2012070249A (ja) 画像符号化方法、画像復号方法、画像符号化装置、画像復号装置、及びプログラム
KR20200136862A (ko) 두 개의 후보 인트라 예측 모드를 이용한 화면 내 예측 모드의 부/복호화 방법 및 이러한 방법을 사용하는 장치
KR20220121747A (ko) 비디오 신호 부호화/복호화 방법 및 상기 부호화 방법에 의해 생성된 데이터 스트림을 저장하는 기록 매체
KR102038818B1 (ko) 화면 내 예측 방법 및 이러한 방법을 사용하는 장치
KR101348566B1 (ko) 화면 간 예측 수행시 후보 블록 결정 방법 및 이러한 방법을 사용하는 장치
KR20140004825A (ko) 엔트로피 부호화 및 엔트로피 복호화를 위한 구문 요소 이진화 방법 및 장치
KR20130139810A (ko) 화면 간 예측 수행시 후보 블록 결정 방법 및 이러한 방법을 사용하는 장치

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201080046955.0

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10824755

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2011537184

Country of ref document: JP

Ref document number: 13502703

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2010824755

Country of ref document: EP