WO2018199002A1 - 動画像符号化装置及び動画像復号装置 - Google Patents

動画像符号化装置及び動画像復号装置 Download PDF

Info

Publication number
WO2018199002A1
WO2018199002A1 PCT/JP2018/016408 JP2018016408W WO2018199002A1 WO 2018199002 A1 WO2018199002 A1 WO 2018199002A1 JP 2018016408 W JP2018016408 W JP 2018016408W WO 2018199002 A1 WO2018199002 A1 WO 2018199002A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
conversion
transform
inverse
prediction
Prior art date
Application number
PCT/JP2018/016408
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 US16/607,765 priority Critical patent/US20200053365A1/en
Publication of WO2018199002A1 publication Critical patent/WO2018199002A1/ja
Priority to US17/492,748 priority patent/US11863764B2/en
Priority to US18/509,398 priority patent/US20240089469A1/en

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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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
    • 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
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame 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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Definitions

  • the present invention relates to an image decoding device and an image encoding device.
  • an image encoding device that generates encoded data by encoding the moving image, and image decoding that generates a decoded image by decoding the encoded data The device is used.
  • the moving image encoding method include a method proposed in H.264 / AVC and HEVC (High-Efficiency Video Coding).
  • an image (picture) constituting a moving image is a slice obtained by dividing the image, a coding unit obtained by dividing the slice (coding unit (Coding Unit : CU)), and a hierarchical structure consisting of a prediction unit (PU) and a transform unit (TU) that are obtained by dividing a coding unit. Decrypted.
  • a predicted image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and the predicted image is generated from the input image (original image).
  • a prediction residual obtained by subtraction (sometimes referred to as “difference image” or “residual image”) is encoded. Examples of methods for generating a predicted image include inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction).
  • the moving image encoding device encodes the quantized transform coefficient obtained by performing orthogonal transform and quantization on the prediction residual, and the moving image decoding device decodes the quantized transform coefficient from the encoded data, and performs inverse quantization and Inverse orthogonal transformation is performed to restore the prediction residual (Non-Patent Document 2).
  • a first orthogonal transformation (primary transformation) is performed on a prediction residual, and then a second transformation (secondary transformation) is further performed on the transformation coefficient to concentrate the transformation coefficient value near zero.
  • a technique for reducing the amount of codes has been developed (Non-Patent Document 1).
  • the image encoding apparatus performs primary conversion on a prediction residual, concentrates energy on a specific component, and then performs secondary conversion on a conversion coefficient of the prediction residual to further concentrate energy. Increase.
  • the image encoding apparatus performs quantization and entropy encoding processing on the result to generate encoded data.
  • the image decoding apparatus performs inverse secondary inverse transform and inverse primary inverse transform on transform coefficients obtained by entropy decoding and inverse quantization of the encoded data.
  • the secondary conversion concentrates energy on a specific component (low frequency component), but the processing amount is greatly increased.
  • energy concentration of diagonal components that could not be handled by separate primary conversion can be increased, so that diagonal line segments can be reproduced with high quality. Can do.
  • the calculation amount of the conversion of length N is O (N ⁇ 2) or O (NlogN)
  • the conversion of long components increases the complexity.
  • the present invention has been made in view of the above-described problems, and an object of the present invention is to provide an image decoding apparatus and an image code that can reduce the conversion processing amount and complexity while maintaining the code amount reduction effect. It is in providing a conversion apparatus.
  • An image encoding apparatus includes a unit that divides one screen of an input moving image into encoding units (CU) including a plurality of pixels, and performs a predetermined conversion using the CU as a unit to obtain a conversion coefficient.
  • CU encoding units
  • Conversion means for outputting, means for quantizing the transform coefficients and outputting quantized transform coefficients, and means for variable-length encoding the quantized transform coefficients
  • the transform means comprising: first transform means; , Second conversion means for converting a part of the first conversion coefficient output from the first conversion means, wherein the second conversion means is a region having a different size in the horizontal direction and the vertical direction (first At least one of the first conversion coefficient in the region (1) or the first conversion coefficient in the non-rectangular region (second region).
  • An image decoding apparatus includes: means for variable-length decoding encoded data using a coding unit (CU) composed of a plurality of pixels as a processing unit and outputting a quantized transform coefficient; And inverse transform means for inversely transforming the transform coefficient, and the inverse transform means inversely transforms at least a part of the transform coefficient to generate a second transform.
  • a second inverse transformation means for outputting a coefficient; and a first inverse transformation means for inversely transforming the remainder of the transformation coefficient and the second transformation coefficient, wherein the second inverse transformation means is perpendicular to the horizontal direction. It is characterized in that at least one of the conversion coefficient of a region (first region) having a different size in the direction or the conversion coefficient of a non-rectangular region (second region) is inversely converted.
  • FIG. 1 is a schematic diagram illustrating a configuration of an image transmission system according to an embodiment of the present invention. It is a figure which shows the hierarchical structure of the data of the encoding stream which concerns on one Embodiment of this invention. It is a figure which shows the pattern of PU division
  • FIG. 1 It is a block diagram which shows the structure of the image decoding apparatus which concerns on one Embodiment of this invention. It is a block diagram which shows the structure of the image coding apparatus which concerns on one Embodiment of this invention. It is a detailed block diagram of a transform / quantization unit and an inverse quantization / inverse transform unit. It is the figure shown about the structure of the transmitter which mounts the image coding apparatus which concerns on one Embodiment of this invention, and the receiver which mounts an image decoding apparatus. (A) shows a transmission device equipped with an image encoding device, and (b) shows a reception device equipped with an image decoding device.
  • FIG. 1 is a schematic diagram showing a configuration of an image transmission system 1 according to the present embodiment.
  • the image transmission system 1 is a system that transmits a code obtained by encoding an encoding target image, decodes the transmitted code, and displays an image.
  • the image transmission system 1 includes an image encoding device 11, a network 21, an image decoding device 31, and an image display device 41.
  • the image encoding device 11 receives an image T indicating a single layer image or a plurality of layers.
  • a layer is a concept used to distinguish a plurality of pictures when there are one or more pictures constituting a certain time. For example, when the same picture is encoded with a plurality of layers having different image quality and resolution, scalable encoding is performed, and when a picture of a different viewpoint is encoded with a plurality of layers, view scalable encoding is performed.
  • inter-layer prediction, inter-view prediction When prediction is performed between pictures of a plurality of layers (inter-layer prediction, inter-view prediction), encoding efficiency is greatly improved. Further, even when prediction is not performed (simultaneous casting), encoded data can be collected.
  • the network 21 transmits the encoded stream Te generated by the image encoding device 11 to the image decoding device 31.
  • the network 21 is the Internet, a wide area network (WAN: Wide Area Network), a small network (LAN: Local Area Network), or a combination thereof.
  • the network 21 is not necessarily limited to a bidirectional communication network, and may be a unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting.
  • the network 21 may be replaced with a storage medium that records an encoded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blu-ray Disc: registered trademark).
  • the image decoding device 31 decodes each of the encoded streams Te transmitted by the network 21, and generates one or a plurality of decoded images Td decoded.
  • the image display device 41 displays all or part of one or more decoded images Td generated by the image decoding device 31.
  • the image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
  • a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
  • a high-quality enhancement layer image is displayed and only a lower processing capability is provided. Displays a base layer image that does not require higher processing capability and display capability as an extension layer.
  • X? Y: z is a ternary operator that takes y when x is true (non-zero) and takes z when x is false (0).
  • FIG. 2 is a diagram showing a hierarchical structure of data in the encoded stream Te.
  • the encoded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence.
  • (A) to (f) of FIG. 2 respectively show an encoded video sequence defining a sequence SEQ, an encoded picture defining a picture PICT, an encoded slice defining a slice S, and an encoded slice defining a slice data
  • the encoded video sequence In the encoded video sequence, a set of data referred to by the image decoding device 31 for decoding the sequence SEQ to be processed is defined. As shown in FIG. 2A, the sequence SEQ includes a video parameter set (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), a picture PICT, and an addition. Includes SEI (Supplemental Enhancement Information). Here, the value indicated after # indicates the layer ID.
  • FIG. 2 shows an example in which encoded data of # 0 and # 1, that is, layer 0 and layer 1, exists, but the type of layer and the number of layers are not dependent on this.
  • the video parameter set VPS is a set of coding parameters common to a plurality of moving images, a plurality of layers included in the moving image, and coding parameters related to individual layers in a moving image composed of a plurality of layers.
  • a set is defined.
  • the sequence parameter set SPS defines a set of encoding parameters that the image decoding device 31 refers to in order to decode the target sequence. For example, the width and height of the picture are defined. A plurality of SPSs may exist. In that case, one of a plurality of SPSs is selected from the PPS.
  • a set of encoding parameters referred to by the image decoding device 31 in order to decode each picture in the target sequence is defined.
  • a quantization width reference value (pic_init_qp_minus26) used for picture decoding and a flag (weighted_pred_flag) indicating application of weighted prediction are included.
  • the picture PICT includes slices S0 to S NS-1 (NS is the total number of slices included in the picture PICT).
  • the coded slice In the coded slice, a set of data referred to by the image decoding device 31 for decoding the slice S to be processed is defined. As shown in FIG. 2C, the slice S includes a slice header SH and slice data SDATA.
  • the slice header SH includes an encoding parameter group that is referred to by the image decoding device 31 in order to determine a decoding method of the target slice.
  • Slice type designation information (slice_type) for designating a slice type is an example of an encoding parameter included in the slice header SH.
  • I slice using only intra prediction at the time of encoding (2) P slice using unidirectional prediction or intra prediction at the time of encoding, (3) B-slice using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding may be used.
  • inter prediction is not limited to single prediction and bi-prediction, and a predicted image may be generated using more reference pictures.
  • the P and B slices refer to slices including blocks that can use inter prediction.
  • the slice header SH may include a reference (pic_parameter_set_id) to the picture parameter set PPS included in the encoded video sequence.
  • the slice data SDATA includes a coding tree unit (CTU).
  • a CTU is a block of a fixed size (for example, 64x64) that constitutes a slice, and is sometimes called a maximum coding unit (LCU: Large Coding Unit).
  • Encoding tree unit As shown in (e) of FIG. 2, a set of data referred to by the image decoding device 31 in order to decode the processing target coding tree unit is defined.
  • the coding tree unit is divided into coding units (CU: Coding Unit) which is a basic unit of coding processing by recursive quadtree division (QT division) or binary tree division (BT division). .
  • a tree structure obtained by recursive quadtree partitioning or binary tree partitioning is called a coding tree (CT), and a node of the tree structure is called a coding node (CN).
  • CT coding tree
  • CN coding node
  • the intermediate nodes of the quadtree and the binary tree are coding nodes, and the coding tree unit itself is defined as the highest coding node.
  • CT includes, as CT information, a QT split flag (cu_split_flag) indicating whether or not to perform QT split, and a BT split mode (split_bt_mode) indicating a split method of BT split.
  • cu_split_flag and / or split_bt_mode are transmitted for each coding node CN.
  • cu_split_flag is 1, the encoding node CN is divided into four encoding nodes CN.
  • split_bt_mode is 1, the encoding node CN is horizontally divided into two encoding nodes CN.
  • split_bt_mode When split_bt_mode is 2, the encoding node CN is vertically divided into two encoding nodes CN. When split_bt_mode is 0, the encoding node CN is not divided and has one encoding unit CU as a node.
  • the encoding unit CU is a terminal node (leaf node) of the encoding node and is not further divided.
  • the size of the coding unit is 64x64 pixels, 64x32 pixels, 32x64 pixels, 32x32 pixels, 64x16 pixels, 16x64 pixels, 32x16 pixels, 16x32 pixels, 16x16 pixels.
  • the encoding unit As shown in (f) of FIG. 2, a set of data referred to by the image decoding device 31 in order to decode the encoding unit to be processed is defined.
  • the encoding unit includes a prediction tree, a conversion tree, and a CU header CUH.
  • the CU header defines a prediction mode, a division method (PU division mode), and the like.
  • the prediction parameters (reference picture index, motion vector, etc.) of each prediction unit (PU) obtained by dividing the coding unit into one or a plurality are defined.
  • the prediction unit is one or a plurality of non-overlapping areas constituting the encoding unit.
  • the prediction tree includes one or a plurality of prediction units obtained by the above-described division.
  • a prediction unit obtained by further dividing the prediction unit is referred to as a “sub-block”.
  • the sub block is composed of a plurality of pixels.
  • the number of sub-blocks in the prediction unit is one.
  • the prediction unit is larger than the size of the sub-block, the prediction unit is divided into sub-blocks. For example, when the prediction unit is 8 ⁇ 8 and the sub-block is 4 ⁇ 4, the prediction unit is divided into four sub-blocks that are divided into two horizontally and two vertically.
  • the prediction process may be performed for each prediction unit (sub block).
  • Intra prediction is prediction within the same picture
  • inter prediction refers to prediction processing performed between different pictures (for example, between display times and between layer images).
  • the division method is encoded by the PU division mode (part_mode) of encoded data, and 2Nx2N (the same size as the encoding unit), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN etc.
  • 2NxN and Nx2N indicate 1: 1 symmetrical division
  • nRx2N indicate 1: 3, 3: 1 asymmetric partitioning.
  • the PUs included in the CU are expressed as PU0, PU1, PU2, and PU3 in this order.
  • FIG. 3 specifically show the partition shape (the position of the boundary of the PU partition) in each PU partition mode.
  • 3A shows a 2Nx2N partition
  • FIGS. 3B, 3C, and 2D show 2NxN, 2NxnU, and 2NxnD partitions (horizontal partitions), respectively.
  • E), (f), and (g) show partitions (vertical partitions) in the case of Nx2N, nLx2N, and nRx2N, respectively, and (h) shows an NxN partition.
  • the horizontal partition and the vertical partition are collectively referred to as a rectangular partition
  • 2Nx2N and NxN are collectively referred to as a square partition.
  • the encoding unit is divided into one or a plurality of conversion units, and the position and size of each conversion unit are defined.
  • a transform unit is one or more non-overlapping areas that make up a coding unit.
  • the conversion tree includes one or a plurality of conversion units obtained by the above division.
  • the division in the conversion tree includes a case where an area having the same size as that of the encoding unit is assigned as a conversion unit, and a case where recursive quadtree division is used, as in the case of the CU division described above.
  • Conversion processing is performed for each conversion unit.
  • the prediction parameter includes prediction list use flags predFlagL0 and predFlagL1, reference picture indexes refIdxL0 and refIdxL1, and motion vectors mvL0 and mvL1.
  • the prediction list use flags predFlagL0 and predFlagL1 are flags indicating whether or not reference picture lists called L0 list and L1 list are used, respectively, and a reference picture list corresponding to a value of 1 is used.
  • flag indicating whether or not it is XX when “flag indicating whether or not it is XX” is described, when the flag is not 0 (for example, 1) is XX, 0 is not XX, and logical negation, logical product, etc. 1 is treated as true and 0 is treated as false (the same applies hereinafter).
  • flag when the flag is not 0 (for example, 1) is XX, 0 is not XX, and logical negation, logical product, etc. 1 is treated as true and 0 is treated as false (the same applies hereinafter).
  • other values can be used as true values and false values in an actual apparatus or method.
  • Syntax elements for deriving inter prediction parameters included in the encoded data include, for example, PU partition mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, There is a difference vector mvdLX.
  • the reference picture list is a list including reference pictures stored in the reference picture memory 306.
  • FIG. 4 is a conceptual diagram illustrating an example of a reference picture and a reference picture list.
  • a rectangle is a picture
  • an arrow is a reference relationship of the picture
  • a horizontal axis is time
  • I, P, and B in the rectangle are an intra picture
  • a single prediction picture a bi-prediction picture
  • numbers in the rectangle are Indicates the decoding order.
  • the decoding order of pictures is I0, P1, B2, B3, and B4
  • the display order is I0, B3, B2, B4, and P1.
  • FIG. 4B shows an example of the reference picture list.
  • the reference picture list is a list representing candidate reference pictures, and one picture (slice) may have one or more reference picture lists.
  • the target picture B3 has two reference picture lists, an L0 list RefPicList0 and an L1 list RefPicList1.
  • the reference pictures are I0, P1, and B2, and the reference picture has these pictures as elements.
  • refIdxLX the reference picture index
  • the figure shows an example in which reference pictures P1 and B2 are referred to by refIdxL0 and refIdxL1.
  • the prediction parameter decoding (encoding) method includes a merge prediction (merge) mode and an AMVP (Adaptive Motion Vector Prediction) mode.
  • the merge flag merge_flag is a flag for identifying these.
  • the merge mode is a mode in which the prediction list use flag predFlagLX (or inter prediction identifier inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX are not included in the encoded data and are derived from the prediction parameters of already processed neighboring PUs.
  • the AMVP mode is a mode in which the inter prediction identifier inter_pred_idc, the reference picture index refIdxLX, and the motion vector mvLX are included in the encoded data.
  • the motion vector mvLX is encoded as a prediction vector index mvp_LX_idx for identifying the prediction vector mvpLX and a difference vector mvdLX.
  • the inter prediction identifier inter_pred_idc is a value indicating the type and number of reference pictures, and takes one of PRED_L0, PRED_L1, and PRED_BI.
  • PRED_L0 and PRED_L1 indicate that reference pictures managed by the reference picture lists of the L0 list and the L1 list are used, respectively, and that one reference picture is used (single prediction).
  • PRED_BI indicates that two reference pictures are used (bi-prediction BiPred), and reference pictures managed by the L0 list and the L1 list are used.
  • the prediction vector index mvp_LX_idx is an index indicating a prediction vector
  • the reference picture index refIdxLX is an index indicating a reference picture managed in the reference picture list.
  • LX is a description method used when L0 prediction and L1 prediction are not distinguished from each other. By replacing LX with L0 and L1, parameters for the L0 list and parameters for the L1 list are distinguished.
  • the merge index merge_idx is an index indicating which prediction parameter is used as a prediction parameter of the decoding target PU among prediction parameter candidates (merge candidates) derived from the PU for which processing has been completed.
  • the motion vector mvLX indicates a shift amount between blocks on two different pictures.
  • a prediction vector and a difference vector related to the motion vector mvLX are referred to as a prediction vector mvpLX and a difference vector mvdLX, respectively.
  • Inter prediction identifier inter_pred_idc and prediction list use flag predFlagLX The relationship between the inter prediction identifier inter_pred_idc and the prediction list use flags predFlagL0 and predFlagL1 is as follows and can be converted into each other.
  • the flag biPred as to whether it is a bi-prediction BiPred can be derived depending on whether the two prediction list use flags are both 1. For example, it can be derived by the following formula.
  • the flag biPred can also be derived depending on whether or not the inter prediction identifier is a value indicating that two prediction lists (reference pictures) are used. For example, it can be derived by the following formula.
  • the luminance intra prediction mode IntraPredModeY is 67 mode and corresponds to planar prediction (0), DC prediction (1), and direction prediction (2 to 66).
  • the color difference intra prediction mode IntraPredModeC is a 68 mode obtained by adding a Color Component Linear Mode (CCLM) to the above 67 mode.
  • CCLM is a mode in which the pixel value of the target pixel in the target color component is derived by linear prediction with reference to the pixel value of another color component encoded before the target color component.
  • the color component includes luminance Y, color difference Cb, and color difference Cr.
  • Different intra prediction modes may be assigned depending on luminance and color difference, and the prediction mode is encoded and decoded in units of CU or PU.
  • FIG. 5 is a schematic diagram illustrating a configuration of the image decoding device 31 according to the present embodiment.
  • the image decoding device 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (prediction image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (prediction image generation device) 308, and inversely.
  • a quantization / inverse transform unit 311 and an adder 312 are included.
  • the prediction parameter decoding unit 302 includes an inter prediction parameter decoding unit 303 and an intra prediction parameter decoding unit 304.
  • the predicted image generation unit 308 includes an inter predicted image generation unit 309 and an intra predicted image generation unit 310.
  • the entropy decoding unit 301 performs entropy decoding on the coded stream Te input from the outside, and separates and decodes individual codes (syntax elements).
  • the separated code includes a prediction parameter for generating a prediction image and residual information for generating a difference image.
  • the entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 302. Some of the separated codes are, for example, the prediction mode predMode, the PU partition mode part_mode, the merge flag merge_flag, the merge index merge_idx, the inter prediction identifier inter_pred_idc, the reference picture index ref_Idx_lX, the prediction vector index mvp_LX_idx, and the difference vector mvdLX. Control of which code is decoded is performed based on an instruction from the prediction parameter decoding unit 302.
  • the entropy decoding unit 301 outputs the quantized coefficient to the inverse quantization / inverse transform unit 311. This quantized coefficient is a coefficient obtained by performing orthogonal transform (discrete cosine transform, discrete sine transform, etc.) on the residual signal and performing quantization in the encoding process.
  • the inter prediction parameter decoding unit 303 decodes the inter prediction parameter with reference to the prediction parameter stored in the prediction parameter memory 307 based on the code input from the entropy decoding unit 301.
  • the inter prediction parameter decoding unit 303 outputs the decoded inter prediction parameter to the prediction image generation unit 308 and stores it in the prediction parameter memory 307.
  • the intra prediction parameter decoding unit 304 refers to the prediction parameter stored in the prediction parameter memory 307 on the basis of the code input from the entropy decoding unit 301 and decodes the intra prediction parameter.
  • the intra prediction parameter is a parameter used in a process of predicting a CU within one picture, for example, an intra prediction mode IntraPredMode.
  • the intra prediction parameter decoding unit 304 outputs the decoded intra prediction parameter to the prediction image generation unit 308 and stores it in the prediction parameter memory 307.
  • the loop filter 305 applies filters such as a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the adding unit 312.
  • filters such as a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the adding unit 312.
  • the reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 at a predetermined position for each decoding target picture and CU.
  • the prediction parameter memory 307 stores the prediction parameter in a predetermined position for each decoding target picture and prediction unit (or sub-block, fixed-size block, pixel). Specifically, the prediction parameter memory 307 stores the inter prediction parameter decoded by the inter prediction parameter decoding unit 303, the intra prediction parameter decoded by the intra prediction parameter decoding unit 304, and the prediction mode predMode separated by the entropy decoding unit 301. .
  • the stored inter prediction parameters include, for example, a prediction list utilization flag predFlagLX (inter prediction identifier inter_pred_idc), a reference picture index refIdxLX, and a motion vector mvLX.
  • the prediction image generation unit 308 receives the prediction mode predMode input from the entropy decoding unit 301 and the prediction parameter from the prediction parameter decoding unit 302. Further, the predicted image generation unit 308 reads a reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of the PU using the input prediction parameter and the read reference picture in the prediction mode indicated by the prediction mode predMode.
  • the inter prediction image generation unit 309 uses the inter prediction parameter input from the inter prediction parameter decoding unit 303 and the read reference picture to perform prediction of the PU by inter prediction. Is generated.
  • the inter prediction image generation unit 309 performs a motion vector on the basis of the decoding target PU from the reference picture indicated by the reference picture index refIdxLX for a reference picture list (L0 list or L1 list) having a prediction list use flag predFlagLX of 1.
  • the reference picture block at the position indicated by mvLX is read from the reference picture memory 306.
  • the inter prediction image generation unit 309 performs prediction based on the read reference picture block to generate a prediction image of the PU.
  • the inter prediction image generation unit 309 outputs the generated prediction image of the PU to the addition unit 312.
  • the intra predicted image generation unit 310 When the prediction mode predMode indicates the intra prediction mode, the intra predicted image generation unit 310 performs intra prediction using the intra prediction parameter input from the intra prediction parameter decoding unit 304 and the read reference picture. Specifically, the intra predicted image generation unit 310 reads, from the reference picture memory 306, neighboring PUs that are pictures to be decoded and are in a predetermined range from the decoding target PUs among the PUs that have already been decoded.
  • the predetermined range is, for example, one of the left, upper left, upper, and upper right adjacent PUs when the decoding target PU sequentially moves in the so-called raster scan order, and differs depending on the intra prediction mode.
  • the raster scan order is an order in which each row is sequentially moved from the left end to the right end in each picture from the upper end to the lower end.
  • the intra predicted image generation unit 310 performs prediction in the prediction mode indicated by the intra prediction mode IntraPredMode for the read adjacent PU, and generates a predicted image of the PU.
  • the intra predicted image generation unit 310 outputs the generated predicted image of the PU to the adding unit 312.
  • the intra prediction image generation unit 310 performs planar prediction (0), DC prediction (1), direction according to the luminance prediction mode IntraPredModeY.
  • Prediction image of luminance PU is generated by any one of prediction (2 to 66), and planar prediction (0), DC prediction (1), direction prediction (2 to 66), LM mode according to color difference prediction mode IntraPredModeC
  • a prediction image of a color difference PU is generated according to any one of (67).
  • FIG. 7B shows an inverse quantization / inverse transformation unit 311 which includes an inverse quantization unit 706, a rearrangement unit 707, an inverse secondary transformation unit 708, a rearrangement unit 709, and an inverse primary transformation unit 710.
  • the inverse quantization unit 706 performs inverse quantization on the quantized transform coefficient input from the entropy decoding unit 301.
  • Rearrangement section 707 (subset extraction section, coefficient assignment section) extracts coefficients to be subjected to inverse secondary transformation from the output of inverse quantization section 706 and rearranges them into a format to be input to inverse secondary transformation section 708.
  • Inverse secondary conversion section 708 performs inverse secondary conversion on the output of rearrangement section 707. Details will be described later.
  • Reordering section 709 (subset storage section, coefficient assigning section) combines the output of inverse secondary transform section 708 and the output of inverse quantization section 706 that has not undergone inverse secondary transform, and inputs the combined result to inverse primary transform section 710 Sort by.
  • the inverse primary conversion unit 710 performs inverse primary conversion on the output of the rearrangement unit 709 to calculate a prediction residual signal.
  • the inverse quantization / inverse transform unit 311 outputs the calculated residual signal to the adder 312.
  • the addition unit 312 adds the prediction image of the PU input from the inter prediction image generation unit 309 or the intra prediction image generation unit 310 and the residual signal input from the inverse quantization / inverse conversion unit 311 for each pixel, Generate a decoded PU image.
  • the adding unit 312 stores the generated decoded image of the PU in the reference picture memory 306, and outputs a decoded image Td in which the generated decoded image of the PU is integrated for each picture to the outside.
  • FIG. 6 is a block diagram illustrating a configuration of the image encoding device 11 according to the present embodiment.
  • the image encoding device 11 includes a predicted image generation unit 101, a subtraction unit 102, a transform / quantization unit 103, an entropy encoding unit 104, an inverse quantization / inverse transform unit 105, an addition unit 106, a loop filter 107, and a prediction parameter memory.
  • the prediction parameter encoding unit 111 includes an inter prediction parameter encoding unit 112 and an intra prediction parameter encoding unit 113.
  • the predicted image generation unit 101 generates, for each picture of the image T, a predicted image P of the prediction unit PU for each encoding unit CU that is an area obtained by dividing the picture.
  • the predicted image generation unit 101 reads a decoded block from the reference picture memory 109 based on the prediction parameter input from the prediction parameter encoding unit 111.
  • the prediction parameter input from the prediction parameter encoding unit 111 is, for example, a motion vector in the case of inter prediction.
  • the predicted image generation unit 101 reads a block at a position on the reference image indicated by the motion vector with the target PU as a starting point.
  • the prediction parameter is, for example, an intra prediction mode.
  • a pixel value of an adjacent PU used in the intra prediction mode is read from the reference picture memory 109, and a predicted image P of the PU is generated.
  • the predicted image generation unit 101 generates a predicted image P of the PU using one prediction method among a plurality of prediction methods for the read reference picture block.
  • the predicted image generation unit 101 outputs the generated predicted image P of the PU to the subtraction unit 102.
  • predicted image generation unit 101 has the same operation as that of the predicted image generation unit 308 already described, and therefore description thereof is omitted here.
  • the prediction image generation unit 101 generates a prediction image P of the PU based on the pixel value of the reference block read from the reference picture memory, using the parameter input from the prediction parameter encoding unit.
  • the predicted image generated by the predicted image generation unit 101 is output to the subtraction unit 102 and the addition unit 106.
  • the subtraction unit 102 subtracts the signal value of the predicted image P of the PU input from the predicted image generation unit 101 from the pixel value of the corresponding PU of the image T, and generates a residual signal.
  • the subtraction unit 102 outputs the generated residual signal to the transform / quantization unit 103.
  • FIG. 7A shows a transform / quantization unit 103, which includes a primary transform unit 701, a rearrangement unit 702, a secondary transform unit 703, a rearrangement unit 704, and a quantization unit 705.
  • the primary conversion unit 701 performs primary conversion on the prediction residual signal input from the subtraction unit 102 and calculates a primary conversion coefficient.
  • the rearrangement unit 702 rearranges the output of the primary conversion unit 701 into a format that is input to the secondary conversion unit 703. In this rearrangement, the rearrangement of the rearrangement unit 709 of the inverse quantization / inverse transformation unit 311 and the input / output are in an inverse relationship.
  • Secondary conversion unit 703 performs secondary conversion on the output of rearrangement unit 702. Details will be described later.
  • the rearrangement unit 704 combines the output of the secondary conversion unit 703 and the output of the primary conversion unit 701 that has not been subjected to the secondary conversion, and rearranges them into a format that is input to the quantization unit 705.
  • the rearrangement of the rearrangement unit 707 of the inverse quantization / inverse transformation unit 311 and the input / output are in an inverse relationship.
  • the quantization unit 705 quantizes the output of the rearrangement unit 704 to obtain a quantization coefficient.
  • the transform / quantization unit 103 outputs the obtained quantization coefficient to the entropy coding unit 104 and the inverse quantization / inverse transform unit 105.
  • Primary conversion is generally performed on the CU or TU unit prediction residuals. Select from multiple transformation bases, such as DCT-2, DCT-5, DCT-8, DST-1, DST-7, etc. to transform with mutually independent transformation axes that match the characteristics of the prediction residual it can.
  • the inverse primary transform described in the image decoding apparatus is an inverse transform of the primary transform, and uses a base for inverse transform corresponding to the transform base used in the primary transform.
  • Secondary conversion is a conversion applied to the coefficient after the primary conversion.
  • primary conversion is realized by separation type conversion, and is not optimal for an oblique component, for example, and energy cannot be concentrated efficiently. In such a case, energy can be concentrated on a specific component by performing effective conversion on the component in the diagonal direction again on the primary conversion coefficient.
  • Figure 7 shows the procedure for secondary conversion and reverse secondary conversion.
  • M * M block conversion When the secondary target is an M * M block, it is also simply called “M * M block conversion”.
  • the secondary conversion is applied to the entire primary conversion coefficient or a part of low frequency components.
  • Output of secondary transformation is expressed as M * M array SY (each component of the array is described as SYm, n), and W * H array PY (each component of the array is expressed as PYw, h) input to quantization section 705 Store in the MxM area located in the upper left of the.
  • the primary transform coefficient PX is stored in the remaining area of the W * H array PY input to the quantization unit 705.
  • the processes of the rearrangement unit 702, the secondary transformation unit 703, and the rearrangement unit 704 are expressed as follows.
  • [ROTf] is an array of ROT transformation bases.
  • the two-dimensional array of ROTf and SX is regarded as a matrix, and the product of each matrix is calculated (hereinafter, the array is regarded as a matrix and calculated).
  • T [X] represents the transpose of the matrix [X].
  • the separation-type two-dimensional transformation of (Expression 2) can also be realized by applying a one-dimensional transformation, which is a product of the transformation base matrix, to the input matrix twice. In this case, the second conversion is performed using a matrix obtained by transposing the output of the first conversion as an input.
  • ⁇ ROT is a conversion in which the energy concentration of the oblique component is high in the separation type conversion, but a non-separation type conversion having a higher energy concentration than the separation type conversion may be used as the secondary conversion instead of the ROT.
  • the rearrangement unit 702 executes processing for converting a two-dimensional array into a one-dimensional array in addition to the above-described processing.
  • the rearrangement unit 704 executes processing for converting a one-dimensional array into a two-dimensional array.
  • the processes of the rearrangement unit 702, the secondary conversion unit 703, and the rearrangement unit 704 are expressed as follows.
  • both the M * M array SX and the M * M array SY are one-dimensional arrays.
  • Tf is an array of non-separable transformation (one-dimensional transformation), such as one-dimensional DCT-2, DCT-5, DCT-8, DST-1, DST-7, HyGT (Hypercube-Givens Transform), etc. can do.
  • ROT Retrive-Givens Transform
  • FIG. 11A is a flowchart showing the operation of the transform / quantization unit 103 in FIG.
  • the primary conversion unit 701 performs primary conversion on the prediction residual in CU units (S1101).
  • M1 and M2 are preferably powers of 2.
  • Rearranging section 702 sets M * M primary transform coefficients as input SX to secondary transform section 703 as shown in (Expression 1) or (Expression 4) described above (S1105).
  • the secondary conversion unit 703 applies the separation type shown in (Expression 2) or the non-separation type conversion shown in (Expression 5) to the input M * M primary conversion coefficients to perform secondary conversion ( S1106).
  • the rearrangement unit 704 sets the primary transform coefficient and the secondary transform coefficient as the input PY to the quantization unit 705 as shown in (Expression 3) or (Expression 6) described above (S1107).
  • the quantization unit 705 performs quantization on the transform coefficient PY (S1108).
  • the W * H array PY ′ storing the output of the inverse quantization unit 706 (each component of the array is denoted as PY′w, h) is positioned at the upper left of PY ′.
  • the M * M array SY ′ (each component of the array is expressed as SY′m, n) is the object of inverse secondary conversion.
  • the output of the inverse secondary transformation is the M * M array SX ′ (each element of the array is denoted as SX′m, n), and the W * H array PX ′ (each element of the array is PX ′) input to the inverse primary conversion unit 710.
  • SX′m, n each element of the array
  • PX ′ each element of the array is PX ′
  • the output PY ′ of the inverse quantization unit 706 that has not undergone inverse secondary transform is stored.
  • Inverse secondary conversion unit 708: SX ′ T [ROTb] [SY ′] [ROTb] (Formula 8)
  • [ROTb] is an array of inverse ROT transform bases
  • T [X] represents transposition of the matrix [X].
  • the rearrangement unit 707 executes a process for converting a two-dimensional array into a one-dimensional array in addition to the above-described processes. Further, in addition to the above-described processing, the rearranging unit 709 executes processing for converting a one-dimensional array into a two-dimensional array.
  • the processes of the rearrangement unit 707, the inverse secondary conversion unit 708, and the rearrangement unit 709 are expressed as follows.
  • the arrays SX ′ and SY ′ are both one-dimensional arrays of M * M size.
  • [Tb] is an array of non-separable transformations, and the inverse of the above-described one-dimensional DCT-2, DCT-5, DCT-8, DST-1, DST-7, HyGT (Hypercube-Givens Transform), etc. It can be a conversion.
  • FIG. 11B is a flowchart showing the operations of the inverse quantization / inverse transform unit 311 in FIG. 6 and the inverse quantization / inverse transform unit 105 in FIG.
  • the inverse quantization unit 706 performs inverse quantization on the quantized transform coefficient of the prediction residual decoded by the entropy decoding unit 301 (S1109).
  • the rearrangement unit 707 extracts the M ⁇ M area as the secondary conversion area using the set M.
  • M1 and M2 are the same as those used in the flowchart of FIG.
  • rearrangement section 707 sets M * M transform coefficients as input SY ′ to inverse secondary conversion section 708 (S1113).
  • the inverse secondary conversion unit 708 applies the separation type shown in (Expression 8) or the non-separation type conversion shown in (Expression 11) to the input M * M conversion coefficients, and performs the reverse secondary conversion. (S1114).
  • Rearranging section 709 sets the primary transform coefficient as input PX ′ to inverse primary transform section 710 as shown in (Equation 9) or (Equation 12) described above (S1115).
  • the inverse primary conversion unit 710 performs inverse primary conversion on the conversion coefficient PX ′ (S1116).
  • the entropy encoding unit 104 receives a quantization coefficient from the transform / quantization unit 103 and receives a prediction parameter from the prediction parameter encoding unit 111.
  • the input prediction parameters include, for example, codes such as a reference picture index ref_Idx_lX, a prediction vector index mvp_LX_idx, a difference vector mvdLX, a prediction mode pred_mode_flag, and a merge index merge_idx.
  • the entropy encoding unit 104 entropy-encodes the input division information, prediction parameters, quantization transform coefficients, and the like to generate an encoded stream Te, and outputs the generated encoded stream Te to the outside.
  • the inverse quantization / inverse transform unit 105 is the same as the inverse quantization / inverse transform unit 311 (FIG. 5) in the image decoding device, and inversely quantizes the quantization coefficient input from the transform / quantization unit 103. Find the conversion factor.
  • the inverse quantization / inverse transform unit 105 performs inverse transform on the obtained transform coefficient to calculate a residual signal.
  • the inverse quantization / inverse transform unit 105 outputs the calculated residual signal to the addition unit 106.
  • the addition unit 106 adds the signal value of the prediction image P of the PU input from the prediction image generation unit 101 and the signal value of the residual signal input from the inverse quantization / inverse conversion unit 105 for each pixel, and performs decoding. Generate an image.
  • the adding unit 106 stores the generated decoded image in the reference picture memory 109.
  • the loop filter 107 performs a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) on the decoded image generated by the adding unit 106.
  • SAO sample adaptive offset
  • ALF adaptive loop filter
  • the prediction parameter memory 108 stores the prediction parameter generated by the encoding parameter determination unit 110 at a predetermined position for each encoding target picture and CU.
  • the reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined position for each picture to be encoded and each CU.
  • the encoding parameter determination unit 110 selects one set from among a plurality of sets of encoding parameters.
  • the encoding parameter is a parameter to be encoded that is generated in association with the above-described QTBT division parameter and prediction parameter.
  • the predicted image generation unit 101 generates a predicted image P of the PU using each of these encoding parameter sets.
  • the encoding parameter determination unit 110 calculates an RD cost value indicating the amount of information and the encoding error for each of a plurality of sets.
  • the RD cost value is, for example, the sum of a code amount and a square error multiplied by a coefficient ⁇ .
  • the code amount is the information amount of the encoded stream Te obtained by entropy encoding the quantization residual and the encoding parameter.
  • the square error is the sum between pixels regarding the square value of the residual value of the residual signal calculated by the subtracting unit 102.
  • the coefficient ⁇ is a real number larger than a preset zero.
  • the encoding parameter determination unit 110 selects a set of encoding parameters that minimizes the calculated RD cost value.
  • the entropy encoding unit 104 outputs the selected set of encoding parameters to the outside as the encoded stream Te, and does not output the set of unselected encoding parameters.
  • the encoding parameter determination unit 110 stores the determined encoding parameter in the prediction parameter memory 108.
  • the prediction parameter encoding unit 111 derives a format for encoding from the parameters input from the encoding parameter determination unit 110 and outputs the format to the entropy encoding unit 104. Deriving the format for encoding is, for example, deriving a difference vector from a motion vector and a prediction vector. Also, the prediction parameter encoding unit 111 derives parameters necessary for generating a prediction image from the parameters input from the encoding parameter determination unit 110 and outputs the parameters to the prediction image generation unit 101.
  • the parameter necessary for generating the predicted image is, for example, a motion vector in units of sub-blocks.
  • the inter prediction parameter encoding unit 112 derives an inter prediction parameter such as a difference vector based on the prediction parameter input from the encoding parameter determination unit 110.
  • the inter prediction parameter encoding unit 112 derives parameters necessary for generating a prediction image to be output to the prediction image generating unit 101, and an inter prediction parameter decoding unit 303 (see FIG. 5 and the like) derives inter prediction parameters.
  • Some of the configurations are the same as the configuration to be performed.
  • the intra prediction parameter encoding unit 113 derives a prediction parameter necessary for generating a prediction image to be output to the prediction image generation unit 101, and the intra prediction parameter decoding unit 304 (see FIG. 5 and the like) And a part of the same structure as that for deriving.
  • the intra prediction parameter encoding unit 113 derives a format (for example, MPM_idx, rem_intra_luma_pred_mode) for encoding from the intra prediction mode IntraPredMode input from the encoding parameter determination unit 110.
  • a format for example, MPM_idx, rem_intra_luma_pred_mode
  • the secondary conversion has used a square and a power of two.
  • the base of the transform coefficient is 16 times, and thus reducing the transform size has a great effect on reducing the memory used.
  • FIG. 14 shows an example of the primary conversion coefficient area to be subjected to secondary conversion.
  • FIG. 14A is an example of the input SX when the M * N (4 * 8) block conversion is applied as the secondary conversion.
  • the rearrangement unit 702 applies (Equation 13) to the input SX.
  • the rearrangement unit 702 applies (Expression 14) to the input SX.
  • FIG. 14, (Equation 13), and (Equation 14) are general arrangements, and are read by replacing X, Xm, n with SX, SXm, n.
  • FIG. 14B is an example of the input SX when the M * N (8 * 4) conversion is applied as the secondary conversion.
  • the rearrangement unit 702 sets (Expression 15) to the input SX in the case of the separation-type secondary conversion, and sets (Expression 16) to the input SX in the case of the non-separation-type secondary conversion.
  • FIG. 14, (Equation 15), and (Equation 16) are general arrangements, and are read by replacing X, Xm, n with SX, SXm, n.
  • Inverse secondary conversion unit 708: SX ′ T [ROTb_N] [SY ′] [ROTb_M] (Formula 18)
  • N and M are the vertical and horizontal sizes of the transformation. That is, [ROTf_N] is an N * N array, and [ROTf_M] is an M * M array.
  • the rearrangement unit 702 sets (Formula 19) to the input SX in the case of non-separable secondary conversion.
  • 14 and (Equation 19) are general arrangements, and are read by replacing X, Xm, n with SX, SXm, n.
  • Non-separable secondary transformation and inverse secondary transformation are expressed by (Equation 5) and (Equation 11).
  • the shape of the input area of the secondary transform (secondary transform input SX) extracted by the rearrangement unit 702 of the transform / quantization unit 103 will be described.
  • the rearrangement of the inverse quantization / inverse transform unit 311 (105) is described.
  • the above shape is used as the shape of the output region of the inverse secondary transformation. That is, it is possible to select an area for setting the output of inverse secondary transformation according to the scan direction, the intra prediction direction, and the block shape.
  • which input SX of FIGS. 14 (a) to (c) is used depends on the three scan directions of the conversion coefficient shown in FIG. To determine.
  • FIG. 14 shows a general arrangement, which is read by replacing X, Xm, n with SX, SXm, n. If the scan direction of the transform coefficient is the vertical direction, use a vertically long secondary transform area, for example, the input SX in FIG. 14 (a) . If the scan direction is the horizontal direction, use a horizontally long secondary transform area, for example, FIG. 14 (b). If the other input SX is used (the scan direction is oblique), a vertically or horizontally long secondary conversion area may be used as the input SX.
  • the scan direction of the transform coefficient is a vertical direction, a vertically long secondary transform area, for example, the input SX of FIG. 14 (a) is used, and if the scan direction is a horizontal direction, a horizontally long secondary transform area.
  • the input SX of FIG. 14B is used.
  • the upper left center area whose distance from the upper left of the M * M block is a certain distance or less is the secondary conversion area, for example, the secondary conversion using the input SX in Fig. 14 (c) Execute.
  • the input is FIG. 14 (c) and the number of elements is a power of 2
  • the distance from the upper left is not an equidistant area (triangle), but it is somewhat distorted. is not a problem.
  • the scan direction of the transform coefficient is the vertical direction
  • a vertically long secondary transform area for example, the input SX in FIG.
  • a horizontally long secondary conversion region for example, the input SX of FIG. 14B
  • the intra prediction mode shown in FIG. 17 is referred to.
  • the intra prediction mode is 0 to predDiag-1
  • a vertically long secondary conversion region for example, the input SX in FIG. 14 (a) is used.
  • the intra prediction mode is predDiag to predUR
  • the secondary conversion is executed using a horizontally long secondary conversion region, for example, the input SX of FIG.
  • the non-square area may be used as the input of the secondary conversion area.
  • a horizontally long secondary conversion region for example, the input SX of the 8 ⁇ 4 block in FIG. 14B is used. In other cases, a vertically or horizontally long secondary conversion area may be used.
  • the secondary conversion region may be executed using the secondary conversion region in the upper left center of the M * M block, for example, the input SX in FIG. 14 (c).
  • the intra prediction mode is less than predDiag shown in FIG. 17, use the input SX of FIG. 14 (a), which is a vertically long secondary conversion region. Secondary conversion may be executed using the input SX of FIG. Further, in the case of an intra prediction mode other than the direction prediction, a vertically long or horizontally long secondary conversion area may be used as the input SX.
  • a 4 * 4 square area is used as the input of the secondary conversion area, and otherwise (the CU or TU width W and In the case where both of the heights H are equal to or higher than the threshold value TH), the non-square area may be input to the secondary conversion area.
  • the shape of the area to be input for secondary conversion may be determined using a block shape. If the block shape is vertically long (W ⁇ H), for example, the vertically long secondary conversion area shown in FIG. 14 (a) is used as the input SX, and if the block shape is horizontally long (W> H), for example, FIG. The horizontally long secondary conversion area shown in (b) may be used for the input SX. Otherwise, a vertically or horizontally long secondary conversion area may be used.
  • the block shape is vertically long (W ⁇ H)
  • the vertically long secondary conversion area shown in FIG. 14 (a) is used as the input SX
  • the block shape is horizontally long (W> H).
  • a horizontally long secondary conversion area shown in FIG. 14B may be used as the input SX.
  • the secondary conversion area at the upper left center of the M * M block shown in FIG. 14 (c) may be used as the input SX.
  • a 4 * 4 square area is used as the input of the secondary conversion area, and otherwise (the CU or TU width W and In the case where both of the heights H are equal to or higher than the threshold value TH), the non-square area may be input to the secondary conversion area.
  • S1101, S1102, and S1108 are the same as S1101, S1102, and S1108 in FIG.
  • M1 and M2 are preferably powers of 2.
  • the secondary conversion unit 703 applies the non-separable conversion shown in (Equation 5) to the input primary conversion coefficient and performs the secondary conversion (S1606).
  • Rearranging section 704 sets the primary transform coefficient and the secondary transform coefficient as input PY to quantization section 705 as shown in (Equation 6) described above (S1607).
  • S1109, S1110, and S1116 are the same as S1109, S1110, and S1116 in FIG.
  • the process proceeds to S16123, and the M2 * M2 / 2 conversion coefficients in FIG. 14 (c) are set as the input SY ′ to the inverse secondary conversion unit 708 as shown in (Equation 17).
  • the inverse secondary conversion unit 708 applies non-separable conversion shown in (Equation 11) to the input conversion coefficient, and performs inverse secondary conversion (S1614).
  • Rearranging section 709 sets the primary transform coefficient as input PX ′ to inverse primary transform section 710 as shown in (Equation 12) above (S1615).
  • the inverse primary conversion unit 710 performs inverse primary conversion on the conversion coefficient (S1616).
  • the transform coefficient to be input to the secondary transform unit 703 or the inverse secondary transform unit 708 is set by referring to the scan direction.
  • the intra prediction mode is referred to instead of the scan direction.
  • a conversion coefficient may be set.
  • FIG. 16 shows the operation of performing the secondary conversion or the inverse secondary conversion on the conversion coefficient SX1 or SY′1 existing on the low frequency component side, but in FIG. 16 (a), S1102 to S1607 are performed twice. In FIG. 16 (b), S1110 to S1615 are processed twice, and the conversion coefficient SX2 or SY'2 existing on the high frequency component side is set as the input of secondary conversion or inverse secondary conversion for the second time, Secondary conversion or inverse secondary conversion can also be performed on the entire M * M.
  • Fig. 18 shows how to divide M2 * M2 size blocks for secondary conversion into small size areas (M1 * M1 rectangular blocks or M1 * M1 one-dimensional data, both of which will be called blocks hereinafter).
  • M2 and M1 are powers of 2
  • 18 (a) and 18 (b) show a case where secondary conversion is performed on all divided small blocks, and FIGS.
  • FIGS. 18 (h) and (i) show a case where secondary conversion is performed on three of the divided small blocks.
  • FIGS. 18 (h) and (i) are converted into one of the divided small blocks.
  • the case where secondary conversion is performed is shown.
  • the small block is defined as a two-dimensional array as shown in FIG. 18 (a) and when it is defined as a one-dimensional array as shown in FIG. 18 (b)
  • the input SX1 to the separable secondary conversion unit 703 , SX2, SX3, SX4 are shown below.
  • the inputs SX1, SX2, SX3, and SX4 to the non-separable secondary conversion unit 703 are shown below.
  • the number of small blocks among the small blocks obtained by dividing the M2 * M2 block can be determined according to the allowable processing amount and memory size. If there is sufficient margin for processing amount and memory size, perform secondary conversion for all small blocks, and if there is little margin for processing amount and memory size, perform secondary conversion for only one small block. . In this way, the number of small blocks to be subjected to secondary conversion can be determined according to the amount of processing and the margin of memory size.
  • the number of small blocks to be subjected to secondary conversion may be encoded and notified to the image decoding apparatus. Alternatively, when the number is determined with reference to the level information included in the encoded data, it is not necessary to newly add syntax indicating the number.
  • the intra prediction mode it is determined whether to divide into small rectangular blocks, non-rectangular small blocks, or which small block is subjected to secondary transformation. For example, when the scan direction is vertical or horizontal, the block is divided into rectangular small blocks. When the scan direction is diagonal, the block is divided into non-rectangular small blocks. Or, if the intra prediction mode is predHor-diff to predHor + diff or predVer-diff to predVer + diff as shown in FIG. 17, it is divided into rectangular small blocks. Otherwise, it is converted into a non-rectangular small block. To divide.
  • SX1 and SX3 are selected as inputs as shown in FIG. 18 (g), and if the scan direction is the horizontal direction, FIG. As shown in (f), SX1 and SX2 are selected as inputs, and in the oblique direction, SX1 and SX2 are selected as inputs as shown in FIG. 18 (e).
  • the intra prediction mode is predHor-diff to predHor + diff shown in FIG. 17
  • predVer-diff to predVer + diff As shown in FIG. 18 (f), SX1 and SX2 are selected as inputs. Otherwise, SX1 and SX2 are selected as inputs as shown in FIG. 18 (e).
  • the operation of the rearrangement unit and the inverse secondary conversion unit when the number L of secondary converted small blocks is 1, 3, and 4 will be described with reference to the flowchart of FIG.
  • the rearrangement unit 707 checks whether or not the scan direction of the transform coefficient is an oblique direction (S1902). If it is an oblique direction, the process proceeds to S1903; otherwise, the process proceeds to S1904.
  • rearrangement section 707 divides the M * M block to be subjected to inverse secondary transform into non-rectangular small blocks, and sets SY ′s in (Equation 22) (S1903).
  • s 1 to L.
  • X, Xm, and n in (Expression 20) to (Expression 22) are read as SY ′ and SY′m, n as described above.
  • Rearranging section 707 divides the M * M block to be subjected to secondary conversion into rectangular small blocks if the scan direction of the transform coefficient is not oblique, and sets SY ′ in (Equation 21) (S1904).
  • the reverse secondary conversion unit 708 performs reverse secondary conversion on the array SY ′ set by the rearrangement unit 707 (S1905).
  • the rearranging unit 709 writes the output SX ′ of the inverse secondary conversion to the array PX ′ that is input to the inverse primary conversion (S1906).
  • the inverse quantization / inverse transform unit 311 (105) increments the variable s (S1907).
  • Sorting section 707 divides the target area for secondary conversion into non-rectangular small blocks in FIG. 18 (e) and selects the corresponding conversion coefficient from (Equation 22) if the scan direction of the conversion coefficient is oblique.
  • SY ' is set (S1903). Note that X, Xm, and n in (Expression 22) and (Expression 21), which will be described later, are read as SY ′ and SY′m, n as described above.
  • the rearrangement unit 707 checks whether or not the scan direction of the transform coefficient is the vertical direction (S19041). If it is the vertical direction, the process proceeds to S19042; otherwise, the process proceeds to S19043. In the case of vertical scanning, the rearrangement unit 707 divides the target area for secondary conversion into small blocks in FIG. 18 (g), selects the corresponding conversion coefficient from (Equation 21), and sets SY's (S19042). In the case of horizontal scanning, the rearrangement unit 707 divides the secondary transformation target area into small blocks in FIG. 18 (f), selects the corresponding transformation coefficient from (Equation 21), and sets SY's (S19043).
  • the inverse quantization / inverse transform unit 311 (105) increments the variable s by 2 in the case of vertical scanning, and increments the variable s by 1 in other cases (S19071).
  • the M2 * M2 secondary conversion is not used, and a plurality of small-size secondary conversions such as M1 * M1 are applied, thereby suppressing the decrease in encoding efficiency and processing.
  • the amount and memory used can be reduced.
  • the shape (type) of the input SX / SY ′ to the secondary conversion / inverse secondary conversion or the secondary conversion / inverse secondary conversion is derived from the scan direction of the conversion coefficient and the intra prediction mode.
  • a technique for explicitly notifying the type of conversion using an index nIdx used for selecting a secondary conversion will be described.
  • a conversion set including three types of conversion is prepared for each intra prediction mode, and a conversion specified by nIdx is selected from the three types of conversion.
  • Fig. 20 (a) is an example of a set composed of a separable secondary transformation and a non-separable secondary transformation.
  • Fig. 20 (b) is an example of a set composed of non-separable secondary transformations.
  • the encoding parameter determining unit 110 derives the optimal secondary transform for the target CU from these, and encodes nIdx, thereby using the secondary transform with the highest encoding efficiency to generate the video. It can be encoded and decoded.
  • the type of secondary transform applied to the primary transform coefficient is encoded with the index nIdx and notified to the image decoding apparatus, whereby the video is encoded using the secondary transform with the highest coding efficiency. Can be decrypted.
  • FIG. 17 is a diagram illustrating the intra prediction mode iPred.
  • predVer + diff ⁇ iPred ⁇ predUR (Formula 23) Only in this case, secondary conversion is performed. Where diff is a positive integer.
  • FIG. 21 (a) is a flowchart showing the operation of the transform / quantization unit 103.
  • S1101 and S1108 are the same as S1101 and S1108 in FIG.
  • the transform / quantization unit 103 checks whether or not the intra prediction mode of the target CU satisfies (Equation 23) (S2102). When the intra prediction mode of the target CU satisfies (Equation 23), the process proceeds to S2103 to perform secondary conversion, and otherwise, the process proceeds to S1108 without performing the secondary conversion.
  • Equation 23 the intra prediction mode of the target CU satisfies
  • S2103 secondary conversion processing of S1102 to S1107 in FIG. 11A or S1102 to S1607 in FIG.
  • FIG. 21B is a flowchart showing the operation of the inverse quantization / inverse transform unit 311 (105).
  • S1109 and S1116 are the same as S1109 and S1116 in FIG.
  • the inverse quantization / inverse transform unit 311 (105) checks whether the intra prediction mode of the target CU satisfies (Equation 23) (S2102). When the intra prediction mode of the target CU satisfies (Equation 23), the process proceeds to S2104 to perform inverse secondary conversion, and otherwise, the process proceeds to S1116 without performing inverse secondary conversion.
  • the secondary conversion is a conversion applied to the coefficient after the primary conversion.
  • primary conversion is realized by separation type conversion, and is not optimal for diagonal components, and energy cannot be concentrated efficiently. In such a case, energy can be more concentrated on a specific component by performing effective secondary conversion on the component in the diagonal direction again on the primary conversion coefficient.
  • Embodiment 3 demonstrated an example of the technique which changes the choice of secondary conversion according to intra prediction mode that implements secondary conversion, when intra prediction mode is diagonal, and does not implement secondary conversion otherwise. .
  • a technique for suppressing the decrease in encoding efficiency by increasing the choices of secondary conversion will be described.
  • the technique for explicitly selecting the shape (type) of the secondary conversion using the index nIdx as shown in FIG. 20 is described in the first modification, but in the second modification, the nIdx is selected according to the intra prediction mode. Limit the value of.
  • FIG. 22 shows the relationship between intra prediction modes and possible nIdx.
  • the primary conversion often uses the separation type conversion, the energy concentration is not good for the component in the oblique direction, and in the secondary conversion using the non-separation type conversion, the energy concentration is good also for the component in the oblique direction.
  • the primary conversion using the separation type filter that separates and calculates the input into horizontal and vertical components increases the amount of processing and memory usage, but does not increase so much.
  • the secondary conversion using the non-separable conversion when the size is doubled, the memory usage is quadrupled, and the calculation amount is increased accordingly. Therefore, when the conversion size is small and the main component is in the oblique direction, only the secondary conversion is performed, and the primary conversion is not performed, thereby reducing the processing amount.
  • iPred is the intra prediction mode
  • W and H are the width and height of the CU
  • M1 is a threshold value for determining whether or not the CU size is small
  • FIG. 23 (a) is a flowchart showing the operation of the transform / quantization unit 103 of the fourth embodiment.
  • S1101 and S1108 are the same as S1101 and S1108 in FIG.
  • the transform / quantization unit 103 checks whether the size of the target CU and the intra prediction mode satisfy (Equation 24) (S2301). When the size of the target CU and the intra prediction mode do not satisfy (Equation 24), the process proceeds to S1101 to perform primary conversion, and then proceeds to S2103. Otherwise, the primary conversion is not performed and the process proceeds to S2103. In S2103, secondary conversion processing of S1102 to S1107 in FIG. 11A or S1102 to S1607 in FIG.
  • FIG. 23 (b) is a flowchart showing the operation of the inverse quantization / inverse transform unit 311 (105) of the fourth embodiment.
  • S1109 and S1116 are the same as S1109 and S1116 in FIG.
  • S2104 the inverse secondary conversion process of S1110 to S1115 in FIG. 11B or S1110 to S1615 in FIG. 16B is performed.
  • the inverse quantization / inverse transform unit 311 (105) checks whether the size of the target CU and the intra prediction mode satisfy (Equation 24) (S2301). If the size of the target CU and the intra prediction mode do not satisfy (Equation 24), the process proceeds to S1116 to perform inverse primary conversion, and otherwise ends without performing inverse primary conversion.
  • the fourth embodiment it is possible to reduce the processing amount while suppressing a decrease in encoding efficiency by switching whether or not to apply primary conversion under a certain condition.
  • An image encoding apparatus includes a unit that divides one screen of an input moving image into encoding units (CU) including a plurality of pixels, and performs a predetermined conversion using the CU as a unit to obtain a conversion coefficient.
  • CU encoding units
  • Conversion means for outputting, means for quantizing the transform coefficients and outputting quantized transform coefficients, and means for variable-length encoding the quantized transform coefficients
  • the transform means comprising: first transform means; , Second conversion means for converting a part of the first conversion coefficient output from the first conversion means, wherein the second conversion means is a region having a different size in the horizontal direction and the vertical direction (first At least one of the first conversion coefficient in the region (1) or the first conversion coefficient in the non-rectangular region (second region).
  • the second conversion unit further performs conversion on the first region in combination with small-size square conversion.
  • the second transforming unit further selects transform for the first region or transform for the second region depending on the intra prediction mode or the scan direction of the transform coefficient. It is characterized by that.
  • the image encoding device is characterized by determining whether or not to execute the first transformation according to an intra prediction mode and a size of a CU.
  • An image decoding apparatus includes: means for variable-length decoding encoded data using a coding unit (CU) composed of a plurality of pixels as a processing unit and outputting a quantized transform coefficient; And inverse transform means for inversely transforming the transform coefficient, and the inverse transform means inversely transforms at least a part of the transform coefficient to generate a second transform.
  • a second inverse transformation means for outputting a coefficient; and a first inverse transformation means for inversely transforming the remainder of the transformation coefficient and the second transformation coefficient, wherein the second inverse transformation means is perpendicular to the horizontal direction. It is characterized in that at least one of the conversion coefficient of a region (first region) having a different size in the direction or the conversion coefficient of a non-rectangular region (second region) is inversely converted.
  • the second inverse transform unit further performs inverse transform on the first region in combination with small-size square inverse transform.
  • the second inverse transform unit further performs inverse transform on the first region or inverse transform on the second region depending on the intra prediction mode or the scan direction of the transform coefficient. It is characterized by selecting.
  • the image decoding apparatus is characterized by determining whether or not to execute the first inverse transform according to an intra prediction mode and a size of a CU.
  • a part of the image encoding device 11 and the image decoding device 31 in the above-described embodiment for example, the entropy decoding unit 301, the prediction parameter decoding unit 302, the loop filter 305, the predicted image generation unit 308, the inverse quantization / inverse transformation.
  • the prediction parameter encoding unit 111 may be realized by a computer.
  • the program for realizing the control function may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by a computer system and executed.
  • the “computer system” is a computer system built in either the image encoding device 11 or the image decoding device 31 and includes hardware such as an OS and peripheral devices.
  • the “computer-readable recording medium” refers to a storage device such as a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a hard disk built in a computer system.
  • the “computer-readable recording medium” is a medium that dynamically holds a program for a short time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line,
  • a volatile memory inside a computer system serving as a server or a client may be included and a program that holds a program for a certain period of time.
  • the program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
  • part or all of the image encoding device 11 and the image decoding device 31 in the above-described embodiment may be realized as an integrated circuit such as an LSI (Large Scale Integration).
  • LSI Large Scale Integration
  • Each functional block of the image encoding device 11 and the image decoding device 31 may be individually made into a processor, or a part or all of them may be integrated into a processor.
  • the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. Further, in the case where an integrated circuit technology that replaces LSI appears due to progress in semiconductor technology, an integrated circuit based on the technology may be used.
  • the image encoding device 11 and the image decoding device 31 described above can be used by being mounted on various devices that perform transmission, reception, recording, and reproduction of moving images.
  • the moving image may be a natural moving image captured by a camera or the like, or may be an artificial moving image (including CG and GUI) generated by a computer or the like.
  • FIG. 8 is a block diagram showing a configuration of a transmission device PROD_A in which the image encoding device 11 is mounted.
  • the transmission apparatus PROD_A modulates a carrier wave with an encoding unit PROD_A1 that obtains encoded data by encoding a moving image, and with the encoded data obtained by the encoding unit PROD_A1.
  • a modulation unit PROD_A2 that obtains a modulation signal and a transmission unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2 are provided.
  • the above-described image encoding device 11 is used as the encoding unit PROD_A1.
  • Transmission device PROD_A as a source of moving images to be input to the encoding unit PROD_A1, a camera PROD_A4 that captures moving images, a recording medium PROD_A5 that records moving images, an input terminal PROD_A6 for inputting moving images from the outside, and An image processing unit A7 that generates or processes an image may be further provided.
  • FIG. 8A illustrates a configuration in which the transmission apparatus PROD_A includes all of these, but some of them may be omitted.
  • the recording medium PROD_A5 may be a recording of a non-encoded moving image, or a recording of a moving image encoded by a recording encoding scheme different from the transmission encoding scheme. It may be a thing. In the latter case, a decoding unit (not shown) for decoding the encoded data read from the recording medium PROD_A5 in accordance with the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.
  • FIG. 8 is a block diagram showing a configuration of a receiving device PROD_B in which the image decoding device 31 is mounted.
  • the receiving device PROD_B includes a receiving unit PROD_B1 that receives the modulated signal, a demodulating unit PROD_B2 that obtains encoded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a demodulator.
  • a decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the unit PROD_B2.
  • the above-described image decoding device 31 is used as the decoding unit PROD_B3.
  • the receiving device PROD_B is a display destination PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording a moving image, and an output terminal for outputting the moving image to the outside as a supply destination of the moving image output by the decoding unit PROD_B3 PROD_B6 may be further provided.
  • FIG. 8B illustrates a configuration in which all of these are provided in the receiving device PROD_B, but some of them may be omitted.
  • the recording medium PROD_B5 may be used for recording a non-encoded moving image, or is encoded using a recording encoding method different from the transmission encoding method. May be. In the latter case, an encoding unit (not shown) for encoding the moving image acquired from the decoding unit PROD_B3 according to the recording encoding method may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.
  • the transmission medium for transmitting the modulation signal may be wireless or wired.
  • the transmission mode for transmitting the modulated signal may be broadcasting (here, a transmission mode in which the transmission destination is not specified in advance) or communication (here, transmission in which the transmission destination is specified in advance). Refers to the embodiment). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.
  • a terrestrial digital broadcast broadcasting station (broadcasting equipment, etc.) / Receiving station (such as a television receiver) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wireless broadcasting.
  • a broadcasting station (such as broadcasting equipment) / receiving station (such as a television receiver) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by cable broadcasting.
  • a server workstation, etc.
  • Client television receiver, personal computer, smartphone, etc.
  • VOD Video On Demand
  • video sharing service using the Internet is a transmission device that transmits and receives modulated signals via communication.
  • PROD_A / receiving device PROD_B normally, either a wireless or wired transmission medium is used in a LAN, and a wired transmission medium is used in a WAN.
  • the personal computer includes a desktop PC, a laptop PC, and a tablet PC.
  • the smartphone also includes a multi-function mobile phone terminal.
  • the video sharing service client has a function of encoding a moving image captured by the camera and uploading it to the server. That is, the client of the video sharing service functions as both the transmission device PROD_A and the reception device PROD_B.
  • FIG. 9A is a block diagram showing a configuration of a recording apparatus PROD_C equipped with the image encoding device 11 described above.
  • the recording apparatus PROD_C includes an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1 on a recording medium PROD_M.
  • the above-described image encoding device 11 is used as the encoding unit PROD_C1.
  • the recording medium PROD_M may be of a type built into the recording device PROD_C, such as (1) HDD (Hard Disk Drive) or SSD (Solid State Drive), or (2) SD memory. It may be of the type connected to the recording device PROD_C, such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.
  • HDD Hard Disk Drive
  • SSD Solid State Drive
  • SD memory such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.
  • the recording device PROD_C is a camera PROD_C3 that captures moving images as a source of moving images to be input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting moving images from the outside, and a reception for receiving moving images
  • a unit PROD_C5 and an image processing unit PROD_C6 for generating or processing an image may be further provided.
  • FIG. 9A illustrates a configuration in which the recording apparatus PROD_C includes all of these, but some of them may be omitted.
  • the receiving unit PROD_C5 may receive a non-encoded moving image, or may receive encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding method may be interposed between the reception unit PROD_C5 and the encoding unit PROD_C1.
  • Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, an HDD (Hard Disk Drive) recorder, and the like (in this case, the input terminal PROD_C4 or the receiver PROD_C5 is a main source of moving images). .
  • a camcorder in this case, the camera PROD_C3 is a main source of moving images
  • a personal computer in this case, the receiving unit PROD_C5 or the image processing unit C6 is a main source of moving images
  • a smartphone this In this case, the camera PROD_C3 or the reception unit PROD_C5 is a main source of moving images
  • the like is also an example of such a recording apparatus PROD_C.
  • FIG. 9 is a block showing a configuration of a playback device PROD_D in which the above-described image decoding device 31 is mounted.
  • the playback device PROD_D reads a moving image by decoding a read unit PROD_D1 that reads encoded data written to the recording medium PROD_M and a read unit PROD_D1 that reads the encoded data. And a decoding unit PROD_D2 to obtain.
  • the above-described image decoding device 31 is used as the decoding unit PROD_D2.
  • the recording medium PROD_M may be of the type built into the playback device PROD_D, such as (1) HDD or SSD, or (2) such as an SD memory card or USB flash memory. It may be of the type connected to the playback device PROD_D, or (3) may be loaded into a drive device (not shown) built in the playback device PROD_D, such as a DVD or BD. Good.
  • the playback device PROD_D has a display unit PROD_D3 that displays a moving image as a supply destination of the moving image output by the decoding unit PROD_D2, an output terminal PROD_D4 that outputs the moving image to the outside, and a transmission unit that transmits the moving image.
  • PROD_D5 may be further provided.
  • FIG. 9B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but some of them may be omitted.
  • the transmission unit PROD_D5 may transmit a non-encoded moving image, or transmits encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, it is preferable to interpose an encoding unit (not shown) that encodes a moving image using a transmission encoding method between the decoding unit PROD_D2 and the transmission unit PROD_D5.
  • Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, an output terminal PROD_D4 to which a television receiver or the like is connected is a main moving image supply destination). .
  • a television receiver in this case, the display PROD_D3 is a main supply destination of moving images
  • a digital signage also referred to as an electronic signboard or an electronic bulletin board
  • the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images
  • Desktop PC in this case, output terminal PROD_D4 or transmission unit PROD_D5 is the main video source
  • laptop or tablet PC in this case, display PROD_D3 or transmission unit PROD_D5 is video
  • a smartphone which is a main image supply destination
  • a smartphone in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main moving image supply destination
  • the like are also examples of such a playback device PROD_D.
  • Each block of the image decoding device 31 and the image encoding device 11 described above may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be a CPU (Central Processing Unit). You may implement
  • IC chip integrated circuit
  • CPU Central Processing Unit
  • each of the above devices includes a CPU that executes instructions of a program that realizes each function, a ROM (Read Memory) that stores the program, a RAM (RandomAccess Memory) that expands the program, the program, and various data
  • a storage device such as a memory for storing the.
  • the object of the embodiment of the present invention is a record in which the program code (execution format program, intermediate code program, source program) of the control program for each of the above devices, which is software that realizes the above-described functions, is recorded in a computer-readable manner This can also be achieved by supplying a medium to each of the above devices, and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).
  • Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, CD-ROMs (Compact Disc Read-Only Memory) / MO discs (Magneto-Optical discs).
  • tapes such as magnetic tapes and cassette tapes
  • magnetic disks such as floppy (registered trademark) disks / hard disks
  • CD-ROMs Compact Disc Read-Only Memory
  • MO discs Magnetic-Optical discs
  • IC cards including memory cards
  • Cards such as optical cards
  • Semiconductor memories such as flash ROM, or PLD (Programmable logic device ) Or FPGA (Field Programmable Gate Gate Array) or the like.
  • each of the above devices may be configured to be connectable to a communication network, and the program code may be supplied via the communication network.
  • the communication network is not particularly limited as long as it can transmit the program code.
  • Internet intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Area Antenna / television / Cable Television), Virtual Private Network (Virtual Private Network) Network), telephone line network, mobile communication network, satellite communication network, and the like.
  • the transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type.
  • IEEE Institute of Electrical and Electronic Engineers 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, etc. wired such as IrDA (Infrared Data Association) or remote control , BlueTooth (registered trademark), IEEE802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone network, satellite line, terrestrial digital broadcasting network, etc. It can also be used wirelessly.
  • the embodiment of the present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.
  • Embodiments of the present invention are preferably applied to an image decoding apparatus that decodes encoded data in which image data is encoded, and an image encoding apparatus that generates encoded data in which image data is encoded. it can. Further, the present invention can be suitably applied to the data structure of encoded data generated by an image encoding device and referenced by the image decoding device.
  • CT information decoding unit 11 Image encoding device 20
  • CU decoding unit 31 Image decoding device 41

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Discrete Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

符号化単位(CU)を変換する第1の変換手段と、第1の変換手段から出力された第1の変換係数の一部を変換する第2の変換手段とを備え、第2の変換手段は、水平方向と垂直方向のサイズの異なる領域(第1の領域)の第1の変換係数、あるいは非矩形領域(第2の領域)の第1の変換係数の少なくともいづれかを変換する。

Description

動画像符号化装置及び動画像復号装置
 本発明は、画像復号装置、及び画像符号化装置に関する。
 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する画像符号化装置、及び、当該符号化データを復号することによって復号画像を生成する画像復号装置が用いられている。
 具体的な動画像符号化方式としては、例えば、H.264/AVCやHEVC(High-Efficiency Video Coding)にて提案されている方式などが挙げられる。
 このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化単位(符号化ユニット(Coding Unit:CU)と呼ばれることもある)、及び、符号化単位を分割することより得られるブロックである予測ユニット(PU)、変換ユニット(TU)からなる階層構造により管理され、CUごとに符号化/復号される。
 また、このような動画像符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像を入力画像(原画像)から減算して得られる予測残差(「差分画像」または「残差画像」と呼ぶこともある)が符号化される。予測画像の生成方法としては、画面間予測(インター予測)、及び、画面内予測(イントラ予測)が挙げられる。
 動画像符号化装置では、この予測残差に直交変換および量子化を施した量子化変換係数を符号化し、動画像復号装置では、符号化データから量子化変換係数を復号し、逆量子化および逆直交変換を施して、予測残差を復元する(非特許文献2)。近年、予測残差に対し、第1の直交変換(プライマリ変換)を施した後、変換係数に対し、さらに第2の変換(セカンダリ変換)を施すことで、変換係数値をゼロ付近に集中させ、符号量を削減する技術が開発されている(非特許文献1)。
"Algorithm Description of Joint Exploration Test Model 5", JVET-E1001, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 12-20 January 2017 ITU-T H.265(04/2015) SERIES H:AUDIOVISUAL AND MULTIMEDIA SYSTEMS Infrastructure of audiovisual services - Coding of moving video High efficiency video coding
 非特許文献1では、画像符号化装置は予測残差にプライマリ変換を施して、特定の成分にエネルギーを集中させた後、さらに予測残差の変換係数にセカンダリ変換を施して、さらにエネルギー集中を高める。画像符号化装置は、この結果に対し、量子化、エントロピー符号化処理を施して符号化データを生成する。また、画像復号装置は符号化データをエントロピー復号、逆量子化した変換係数に対し、逆セカンダリ逆変換、逆プライマリ逆変換を施す。
 セカンダリ変換によって、特定の成分(低周波数成分)にエネルギーが集中するものの、処理量が大幅に増加する。また、セカンダリ変換に非分離型の変換を用いた場合、分離型のプライマリ変換では対応できなかった斜め方向成分のエネルギー集中も高めることができるので、斜め方向の線分も高い品質で再現することができる。しかしながら、長さNの変換の演算量はO(N^2)もしくはO(NlogN)であることが知られているように、長い成分の変換では、複雑度が高くなる。
 そこで、本発明は、上記の課題に鑑みてなされたものであり、その目的は、符号量削減効果を維持しつつ、変換の処理量および複雑度を削減することができる画像復号装置及び画像符号化装置を提供することにある。
 本発明の一態様に係る画像符号化装置は、入力動画像の1画面を複数の画素からなる符号化単位(CU)に分割する手段と、前記CUを単位として所定の変換を行い変換係数を出力する変換手段と、前記変換係数を量子化し、量子化変換係数を出力する手段と、前記量子化変換係数を可変長符号化する手段とを備え、前記変換手段は、第1の変換手段と、第1の変換手段から出力された第1の変換係数の一部を変換する第2の変換手段とを備え、第2の変換手段は、水平方向と垂直方向のサイズの異なる領域(第1の領域)の第1の変換係数、あるいは非矩形領域(第2の領域)の第1の変換係数の少なくともいづれかを変換することを特徴とする。
 本発明の一態様に係る画像復号装置は、複数の画素からなる符号化単位(CU)を処理単位として符号化データを可変長復号して量子化変換係数を出力する手段と、量子化変換係数を逆量子化して変換係数を出力する手段と、前記変換係数を逆変換する逆変換手段とを備え、前記逆変換手段は、前記変換係数の少なくとも一部を逆変換して、第2の変換係数を出力する第2の逆変換手段と、前記変換係数の残りと前記第2の変換係数を逆変換する第1の逆変換手段とを備え、第2の逆変換手段は、水平方向と垂直方向のサイズの異なる領域(第1の領域)の前記変換係数、あるいは非矩形領域(第2の領域)の前記変換係数の少なくともいづれかを逆変換することを特徴とする。
 本発明の一態様によれば、符号化効率の低下を抑えつつ、動画像符号化・復号処理量および使用するメモリを削減することができる。
本発明の一実施形態に係る画像伝送システムの構成を示す概略図である。 本発明の一実施形態に係る符号化ストリームのデータの階層構造を示す図である。 PU分割モードのパターンを示す図である。(a)~(h)は、それぞれ、PU分割モードが、2Nx2N、2NxN、2NxnU、2NxnD、Nx2N、nLx2N、nRx2N、及び、NxNの場合のパーティション形状について示している。 参照ピクチャ及び参照ピクチャリストの一例を示す概念図である。 本発明の一実施形態に係る画像復号装置の構成を示すブロック図である。 本発明の一実施形態に係る画像符号化装置の構成を示すブロック図である。 変換・量子化部および逆量子化・逆変換部の詳細なブロック図である。 本発明の一実施形態に係る画像符号化装置を搭載した送信装置、及び、画像復号装置を搭載した受信装置の構成について示した図である。(a)は、画像符号化装置を搭載した送信装置を示しており、(b)は、画像復号装置を搭載した受信装置を示している。 本発明の一実施形態に係る画像符号化装置を搭載した記録装置、及び、画像復号装置を搭載した再生装置の構成について示した図である。(a)は、画像符号化装置を搭載した記録装置を示しており、(b)は、画像復号装置を搭載した再生装置を示している。 セカンダリ変換の対象領域を示す図である。 変換・量子化部および逆量子化・逆変換部の動作を示すフローチャートである。 イントラ予測モードとセカンダリ変換の対応関係を示す表である。 セカンダリ変換の性能を示す一例である。 セカンダリ変換に入力する32個の係数を示す図である。 変換係数のスキャン方向を示す図である。 変換・量子化部および逆量子化・逆変換部の動作を示す別のフローチャートである。 変換・量子化部および逆量子化・逆変換部の動作を示す別のフローチャートである。 イントラ予測モードを示す図である。 セカンダリ変換に入力する16個の係数を示す図である。 逆量子化・逆変換部の動作の一部を示すフローチャートである。 逆量子化・逆変換部の動作の一部を示すフローチャートである。 セカンダリ変換セットの具体例を示す表である。 変換・量子化部および逆量子化・逆変換部の動作を示す別のフローチャートである。 イントラ予測モードとセカンダリ変換の対応関係を示す別の表である。 変換・量子化部および逆量子化・逆変換部の動作を示す別のフローチャートである。
  (実施形態1)
 以下、図面を参照しながら本発明の実施形態について説明する。
 図1は、本実施形態に係る画像伝送システム1の構成を示す概略図である。
 画像伝送システム1は、符号化対象画像を符号化した符号を伝送し、伝送された符号を復号し画像を表示するシステムである。画像伝送システム1は、画像符号化装置11、ネットワーク21、画像復号装置31及び画像表示装置41を含んで構成される。
 画像符号化装置11には、単一レイヤもしくは複数レイヤの画像を示す画像Tが入力される。レイヤとは、ある時間を構成するピクチャが1つ以上ある場合に、複数のピクチャを区別するために用いられる概念である。たとえば、同一ピクチャを、画質や解像度の異なる複数のレイヤで符号化するとスケーラブル符号化になり、異なる視点のピクチャを複数のレイヤで符号化するとビュースケーラブル符号化となる。複数のレイヤのピクチャ間で予測(インターレイヤ予測、インタービュー予測)を行う場合には、符号化効率が大きく向上する。また予測を行わない場合(サイマルキャスト)の場合にも、符号化データをまとめることができる。
 ネットワーク21は、画像符号化装置11が生成した符号化ストリームTeを画像復号装置31に伝送する。ネットワーク21は、インターネット(internet)、広域ネットワーク(WAN:Wide Area Network)、小規模ネットワーク(LAN:Local Area Network)またはこれらの組み合わせである。ネットワーク21は、必ずしも双方向の通信網に限らず、地上デジタル放送、衛星放送等の放送波を伝送する一方向の通信網であっても良い。また、ネットワーク21は、DVD(Digital Versatile Disc)、BD(Blu-ray Disc:登録商標)等の符号化ストリームTeを記録した記憶媒体で代替されても良い。
 画像復号装置31は、ネットワーク21が伝送した符号化ストリームTeのそれぞれを復号し、それぞれ復号した1または複数の復号画像Tdを生成する。
 画像表示装置41は、画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。また、空間スケーラブル符号化、SNRスケーラブル符号化では、画像復号装置31、画像表示装置41が高い処理能力を有する場合には、画質の高い拡張レイヤ画像を表示し、より低い処理能力しか有しない場合には、拡張レイヤほど高い処理能力、表示能力を必要としないベースレイヤ画像を表示する。
  <演算子>
 本明細書で用いる演算子を以下に記載する。
 >>は右ビットシフト、<<は左ビットシフト、&はビットワイズAND、|はビットワイズOR、|=は別の条件との和演算(OR)である。
 x ? y : zは、xが真(0以外)の場合にy、xが偽(0)の場合にzをとる3項演算子である。
 Clip3(a, b, c) は、cをa以上b以下の値にクリップする関数であり、c<aの場合にはaを返し、c>bの場合にはbを返し、その他の場合にはcを返す関数である(ただし、a<=b)。
  <符号化ストリームTeの構造>
 本実施形態に係る画像符号化装置11及び画像復号装置31の詳細な説明に先立って、画像符号化装置11によって生成され、画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
 図2は、符号化ストリームTeにおけるデータの階層構造を示す図である。符号化ストリームTeは、例示的に、シーケンス、及びシーケンスを構成する複数のピクチャを含む。図2の(a)~(f)は、それぞれ、シーケンスSEQを既定する符号化ビデオシーケンス、ピクチャPICTを規定する符号化ピクチャ、スライスSを規定する符号化スライス、スライスデータを規定する符号化スライスデータ、符号化スライスデータに含まれる符号化ツリーユニット、符号化ツリーユニットに含まれる符号化ユニット(Coding Unit;CU)を示す図である。
  (符号化ビデオシーケンス)
 符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために画像復号装置31が参照するデータの集合が規定されている。シーケンスSEQは、図2の(a)に示すように、ビデオパラメータセット(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。ここで#の後に示される値はレイヤIDを示す。図2では、#0と#1すなわちレイヤ0とレイヤ1の符号化データが存在する例を示すが、レイヤの種類及びレイヤの数はこれによらない。
 ビデオパラメータセットVPSは、複数のレイヤから構成されている動画像において、複数の動画像に共通する符号化パラメータの集合及び動画像に含まれる複数のレイヤ及び個々のレイヤに関連する符号化パラメータの集合が規定されている。
 シーケンスパラメータセットSPSでは、対象シーケンスを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの幅や高さが規定される。なお、SPSは複数存在してもよい。その場合、PPSから複数のSPSの何れかを選択する。
 ピクチャパラメータセットPPSでは、対象シーケンス内の各ピクチャを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの復号に用いられる量子化幅の基準値(pic_init_qp_minus26)や重み付き予測の適用を示すフラグ(weighted_pred_flag)が含まれる。なお、PPSは複数存在してもよい。その場合、対象シーケンス内の各ピクチャから複数のPPSの何れかを選択する。
  (符号化ピクチャ)
 符号化ピクチャでは、処理対象のピクチャPICTを復号するために画像復号装置31が参照するデータの集合が規定されている。ピクチャPICTは、図2の(b)に示すように、スライスS0~SNS-1を含んでいる(NSはピクチャPICTに含まれるスライスの総数)。
 なお、以下、スライスS0~SNS-1のそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化ストリームTeに含まれるデータであって、添え字を付している他のデータについても同様である。
  (符号化スライス)
 符号化スライスでは、処理対象のスライスSを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスSは、図2の(c)に示すように、スライスヘッダSH、及び、スライスデータSDATAを含んでいる。
 スライスヘッダSHには、対象スライスの復号方法を決定するために画像復号装置31が参照する符号化パラメータ群が含まれる。スライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダSHに含まれる符号化パラメータの一例である。
 スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、または、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、または、イントラ予測を用いるBスライスなどが挙げられる。なお、インター予測は、単予測、双予測に限定されず、より多くの参照ピクチャを用いて予測画像を生成してもよい。以下、P、Bスライスと呼ぶ場合には、インター予測を用いることができるブロックを含むスライスを指す。
 なお、スライスヘッダSHには、上記符号化ビデオシーケンスに含まれる、ピクチャパラメータセットPPSへの参照(pic_parameter_set_id)を含んでいても良い。
  (符号化スライスデータ)
 符号化スライスデータでは、処理対象のスライスデータSDATAを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスデータSDATAは、図2の(d)に示すように、符号化ツリーユニット(CTU:Coding Tree Unit)を含んでいる。CTUは、スライスを構成する固定サイズ(例えば64x64)のブロックであり、最大符号化単位(LCU:Largest Coding Unit)と呼ぶこともある。
  (符号化ツリーユニット)
 図2の(e)に示すように、処理対象の符号化ツリーユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。符号化ツリーユニットは、再帰的な4分木分割(QT分割)または2分木分割(BT分割)により符号化処理の基本的な単位である符号化ユニット(CU:Coding Unit)に分割される。再帰的な4分木分割または2分木分割により得られる木構造を符号化ツリー(CT:Coding Tree)、木構造のノードのことを符号化ノード(CN:Coding Node)と称する。4分木及び2分木の中間ノードは、符号化ノードであり、符号化ツリーユニット自身も最上位の符号化ノードとして規定される。
 CTは、CT情報として、QT分割を行うか否かを示すQT分割フラグ(cu_split_flag)、及びBT分割の分割方法を示すBT分割モード(split_bt_mode)を含む。cu_split_flag及び/又はsplit_bt_modeは符号化ノードCNごとに伝送される。cu_split_flagが1の場合には、符号化ノードCNは4つの符号化ノードCNに分割される。cu_split_flagが0の場合、split_bt_modeが1の場合には、符号化ノードCNは2つの符号化ノードCNに水平分割される。split_bt_modeが2の場合には、符号化ノードCNは2つの符号化ノードCNに垂直分割される。split_bt_modeが0の場合には、符号化ノードCNは分割されず、1つの符号化ユニットCUをノードとして持つ。符号化ユニットCUは符号化ノードの末端ノード(リーフノード)であり、これ以上分割されない。
 また、符号化ツリーユニットCTUのサイズが64x64画素の場合には、符号化ユニットのサイズは、64x64画素、64x32画素、32x64画素、32x32画素、64x16画素、16x64画素、32x16画素、16x32画素、16x16画素、64x8画素、8x64画素、32x8画素、8x32画素、16x8画素、8x16画素、8x8画素、64x4画素、4x64画素、32x4画素、4x32画素、16x4画素、4x16画素、8x4画素、4x8画素、及び、4x4画素の何れかをとり得る。
  (符号化ユニット)
 図2の(f)に示すように、処理対象の符号化ユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。具体的には、符号化ユニットは、予測ツリー、変換ツリー、CUヘッダCUHから構成される。CUヘッダでは予測モード、分割方法(PU分割モード)等が規定される。
 予測ツリーでは、符号化ユニットを1または複数に分割した各予測ユニット(PU)の予測パラメータ(参照ピクチャインデックス、動きベクトル等)が規定される。別の表現でいえば、予測ユニットは、符号化ユニットを構成する1または複数の重複しない領域である。また、予測ツリーは、上述の分割により得られた1または複数の予測ユニットを含む。なお、以下では、予測ユニットをさらに分割した予測単位を「サブブロック」と呼ぶ。サブブロックは、複数の画素によって構成されている。予測ユニットとサブブロックのサイズが等しい場合には、予測ユニット中のサブブロックは1つである。予測ユニットがサブブロックのサイズよりも大きい場合には、予測ユニットは、サブブロックに分割される。たとえば予測ユニットが8x8、サブブロックが4x4の場合には、予測ユニットは水平に2分割、垂直に2分割からなる、4つのサブブロックに分割される。
 予測処理は、この予測ユニット(サブブロック)ごとに行ってもよい。
 予測ツリーにおける分割の種類は、大まかにいえば、イントラ予測の場合と、インター予測の場合との2つがある。イントラ予測とは、同一ピクチャ内の予測であり、インター予測とは、互いに異なるピクチャ間(例えば、表示時刻間、レイヤ画像間)で行われる予測処理を指す。
 イントラ予測の場合、分割方法は、2Nx2N(符号化ユニットと同一サイズ)と、NxNとがある。
 また、インター予測の場合、分割方法は、符号化データのPU分割モード(part_mode)により符号化され、2Nx2N(符号化ユニットと同一サイズ)、2NxN、2NxnU、2NxnD、Nx2N、nLx2N、nRx2N、及び、NxNなどがある。なお、2NxN、Nx2Nは1:1の対称分割を示し、
2NxnU、2NxnD及びnLx2N、nRx2Nは、1:3、3:1の非対称分割を示す。CUに含まれるPUを順にPU0、PU1、PU2、PU3と表現する。
 図3の(a)~(h)に、それぞれのPU分割モードにおけるパーティションの形状(PU分割の境界の位置)を具体的に図示している。図3の(a)は、2Nx2Nのパーティションを示し、(b)、(c)、(d)は、それぞれ、2NxN、2NxnU、及び、2NxnDのパーティション(横長パーティション)を示す。(e)、(f)、(g)は、それぞれ、Nx2N、nLx2N、nRx2Nである場合のパーティション(縦長パーティション)を示し、(h)は、NxNのパーティションを示す。なお、横長パーティションと縦長パーティションを総称して長方形パーティション、2Nx2N、NxNを総称して正方形パーティションと呼ぶ。
 また、変換ツリーにおいては、符号化ユニットが1または複数の変換ユニットに分割され、各変換ユニットの位置とサイズとが規定される。別の表現でいえば、変換ユニットは、符号化ユニットを構成する1または複数の重複しない領域のことである。また、変換ツリーは、上述の分割より得られた1または複数の変換ユニットを含む。
 変換ツリーにおける分割には、符号化ユニットと同一のサイズの領域を変換ユニットとして割り付けるものと、上述したCUの分割と同様、再帰的な4分木分割によるものがある。
 変換処理は、この変換ユニットごとに行われる。
  (予測パラメータ)
 予測ユニット(PU:Prediction Unit)の予測画像は、PUに付随する予測パラメータによって導出される。予測パラメータには、イントラ予測の予測パラメータもしくはインター予測の予測パラメータがある。以下、インター予測の予測パラメータ(インター予測パラメータ)について説明する。インター予測パラメータは、予測リスト利用フラグpredFlagL0、predFlagL1と、参照ピクチャインデックスrefIdxL0、refIdxL1と、動きベクトルmvL0、mvL1から構成される。予測リスト利用フラグpredFlagL0、predFlagL1は、各々L0リスト、L1リストと呼ばれる参照ピクチャリストが用いられるか否かを示すフラグであり、値が1の場合に対応する参照ピクチャリストが用いられる。なお、本明細書中「XXであるか否かを示すフラグ」と記す場合、フラグが0以外(たとえば1)をXXである場合、0をXXではない場合とし、論理否定、論理積などでは1を真、0を偽と扱う(以下同様)。但し、実際の装置や方法では真値、偽値として他の値を用いることもできる。
 符号化データに含まれるインター予測パラメータを導出するためのシンタックス要素には、例えば、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXがある。
  (参照ピクチャリスト)
 参照ピクチャリストは、参照ピクチャメモリ306に記憶された参照ピクチャからなるリストである。図4は、参照ピクチャ及び参照ピクチャリストの一例を示す概念図である。図4の(a)において、矩形はピクチャ、矢印はピクチャの参照関係、横軸は時間、矩形中のI、P、Bは各々イントラピクチャ、単予測ピクチャ、双予測ピクチャ、矩形中の数字は復号順を示す。図に示すように、ピクチャの復号順は、I0、P1、B2、B3、B4であり、表示順は、I0、B3、B2、B4、P1である。図4の(b)に、参照ピクチャリストの例を示す。参照ピクチャリストは、参照ピクチャの候補を表すリストであり、1つのピクチャ(スライス)が1つ以上の参照ピクチャリストを有してもよい。図の例では、対象ピクチャB3は、L0リストRefPicList0及びL1リストRefPicList1の2つの参照ピクチャリストを持つ。対象ピクチャがB3の場合の参照ピクチャは、I0、P1、B2であり、参照ピクチャはこれらのピクチャを要素として持つ。個々の予測ユニットでは、参照ピクチャリストRefPicListX中のどのピクチャを実際に参照するかを参照ピクチャインデックスrefIdxLXで指定する。図では、refIdxL0及びrefIdxL1により参照ピクチャP1とB2が参照される例を示す。
  (マージ予測とAMVP予測)
 予測パラメータの復号(符号化)方法には、マージ予測(merge)モードとAMVP(Adaptive Motion Vector Prediction、適応動きベクトル予測)モードがある、マージフラグmerge_flagは、これらを識別するためのフラグである。マージモードは、予測リスト利用フラグpredFlagLX(またはインター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めずに、既に処理した近傍PUの予測パラメータから導出するモードである。AMVPモードは、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めるモードである。なお、動きベクトルmvLXは、予測ベクトルmvpLXを識別する予測ベクトルインデックスmvp_LX_idxと差分ベクトルmvdLXとして符号化される。
 インター予測識別子inter_pred_idcは、参照ピクチャの種類及び数を示す値であり、PRED_L0、PRED_L1、PRED_BIの何れかの値をとる。PRED_L0、PRED_L1は、各々L0リスト、L1リストの参照ピクチャリストで管理された参照ピクチャを用いることを示し、1枚の参照ピクチャを用いること(単予測)を示す。PRED_BIは2枚の参照ピクチャを用いること(双予測BiPred)を示し、L0リストとL1リストで管理された参照ピクチャを用いる。予測ベクトルインデックスmvp_LX_idxは予測ベクトルを示すインデックスであり、参照ピクチャインデックスrefIdxLXは、参照ピクチャリストで管理された参照ピクチャを示すインデックスである。なお、LXは、L0予測とL1予測を区別しない場合に用いられる記述方法であり、LXをL0、L1に置き換えることでL0リストに対するパラメータとL1リストに対するパラメータを区別する。
 マージインデックスmerge_idxは、処理が完了したPUから導出される予測パラメータ候補(マージ候補)のうち、いずれの予測パラメータを復号対象PUの予測パラメータとして用いるかを示すインデックスである。
  (動きベクトル)
 動きベクトルmvLXは、異なる2つのピクチャ上のブロック間のずれ量を示す。動きベクトルmvLXに関する予測ベクトル、差分ベクトルを、それぞれ予測ベクトルmvpLX、差分ベクトルmvdLXと呼ぶ。
  (インター予測識別子inter_pred_idcと予測リスト利用フラグpredFlagLX)
 インター予測識別子inter_pred_idcと、予測リスト利用フラグpredFlagL0、predFlagL1の関係は以下のとおりであり、相互に変換可能である。
 inter_pred_idc = (predFlagL1<<1) + predFlagL0
 predFlagL0 = inter_pred_idc & 1
 predFlagL1 = inter_pred_idc >> 1
 なお、インター予測パラメータは、予測リスト利用フラグを用いても良いし、インター予測識別子を用いてもよい。また、予測リスト利用フラグを用いた判定は、インター予測識別子を用いた判定に置き替えてもよい。逆に、インター予測識別子を用いた判定は、予測リスト利用フラグを用いた判定に置き替えてもよい。
  (双予測biPredの判定)
 双予測BiPredであるかのフラグbiPredは、2つの予測リスト利用フラグがともに1であるかによって導出できる。たとえば以下の式で導出できる。
 biPred = (predFlagL0 == 1 && predFlagL1 == 1)
 フラグbiPredは、インター予測識別子が2つの予測リスト(参照ピクチャ)を使うことを示す値であるか否かによっても導出できる。たとえば以下の式で導出できる。
 biPred = (inter_pred_idc == PRED_BI) ? 1 : 0
上記式は、以下の式でも表現できる。
 biPred = (inter_pred_idc == PRED_BI)
 なお、PRED_BIはたとえば3の値を用いることができる。
  (イントラ予測モード)
 輝度イントラ予測モードIntraPredModeYは67モードであり、プレーナ予測(0)、DC予測(1)、方向予測(2~66)が対応する。色差イントラ予測モードIntraPredModeCは上記の67モードにCCLM(Colour Component Linear Mode)を加えた68モードである。CCLMは、対象色成分における対象画素の画素値を、対象色成分よりも前に符号化された別の色成分の画素値を参照した線形予測によって導出するモードである。なお、色成分には輝度Y、色差Cb、色差Crが含まれる。輝度と色差で異なるイントラ予測モードを割り当ててもよく、CUあるいはPU単位で予測モードを符号化、復号する。
  (画像復号装置の構成)
 次に、本実施形態に係る画像復号装置31の構成について説明する。図5は、本実施形態に係る画像復号装置31の構成を示す概略図である。画像復号装置31は、エントロピー復号部301、予測パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆変換部311、及び加算部312を含んで構成される。
 また、予測パラメータ復号部302は、インター予測パラメータ復号部303及びイントラ予測パラメータ復号部304を含んで構成される。予測画像生成部308は、インター予測画像生成部309及びイントラ予測画像生成部310を含んで構成される。
 エントロピー復号部301は、外部から入力された符号化ストリームTeに対してエントロピー復号を行って、個々の符号(シンタックス要素)を分離し復号する。分離された符号には、予測画像を生成するための予測パラメータ及び、差分画像を生成するための残差情報などがある。
 エントロピー復号部301は、分離した符号の一部を予測パラメータ復号部302に出力する。分離した符号の一部とは、例えば、予測モードpredMode、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスref_Idx_lX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXである。どの符号を復号するかの制御は、予測パラメータ復号部302の指示に基づいて行われる。エントロピー復号部301は、量子化係数を逆量子化・逆変換部311に出力する。この量子化係数は、符号化処理において、残差信号に対して直交変換(離散コサイン変換、離散サイン変換等)を行い量子化して得られる係数である。
 インター予測パラメータ復号部303は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してインター予測パラメータを復号する。
 インター予測パラメータ復号部303は、復号したインター予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。
 イントラ予測パラメータ復号部304は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してイントラ予測パラメータを復号する。イントラ予測パラメータとは、CUを1つのピクチャ内で予測する処理で用いるパラメータ、例えば、イントラ予測モードIntraPredModeである。イントラ予測パラメータ復号部304は、復号したイントラ予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。
 ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)等のフィルタを施す。
 参照ピクチャメモリ306は、加算部312が生成したCUの復号画像を、復号対象のピクチャ及びCU毎に予め定めた位置に記憶する。
 予測パラメータメモリ307は、予測パラメータを、復号対象のピクチャ及び予測ユニット(もしくはサブブロック、固定サイズブロック、ピクセル)毎に予め定めた位置に記憶する。具体的には、予測パラメータメモリ307は、インター予測パラメータ復号部303が復号したインター予測パラメータ、イントラ予測パラメータ復号部304が復号したイントラ予測パラメータ及びエントロピー復号部301が分離した予測モードpredModeを記憶する。記憶されるインター予測パラメータには、例えば、予測リスト利用フラグpredFlagLX(インター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXがある。
 予測画像生成部308には、エントロピー復号部301から入力された予測モードpredModeが入力され、また予測パラメータ復号部302から予測パラメータが入力される。また、予測画像生成部308は、参照ピクチャメモリ306から参照ピクチャを読み出す。予測画像生成部308は、予測モードpredModeが示す予測モードで、入力された予測パラメータと読み出した参照ピクチャを用いてPUの予測画像を生成する。
 ここで、予測モードpredModeがインター予測モードを示す場合、インター予測画像生成部309は、インター予測パラメータ復号部303から入力されたインター予測パラメータと読み出した参照ピクチャを用いてインター予測によりPUの予測画像を生成する。
 インター予測画像生成部309は、予測リスト利用フラグpredFlagLXが1である参照ピクチャリスト(L0リスト、もしくはL1リスト)に対し、参照ピクチャインデックスrefIdxLXで示される参照ピクチャから、復号対象PUを基準として動きベクトルmvLXが示す位置にある参照ピクチャブロックを参照ピクチャメモリ306から読み出す。インター予測画像生成部309は、読み出した参照ピクチャブロックをもとに予測を行ってPUの予測画像を生成する。インター予測画像生成部309は、生成したPUの予測画像を加算部312に出力する。
 予測モードpredModeがイントラ予測モードを示す場合、イントラ予測画像生成部310は、イントラ予測パラメータ復号部304から入力されたイントラ予測パラメータと読み出した参照ピクチャを用いてイントラ予測を行う。具体的には、イントラ予測画像生成部310は、復号対象のピクチャであって、既に復号されたPUのうち、復号対象PUから予め定めた範囲にある隣接PUを参照ピクチャメモリ306から読み出す。予め定めた範囲とは、復号対象PUがいわゆるラスタースキャンの順序で順次移動する場合、例えば、左、左上、上、右上の隣接PUのうちのいずれかであり、イントラ予測モードによって異なる。ラスタースキャンの順序とは、各ピクチャにおいて、上端から下端まで各行について、順次左端から右端まで移動させる順序である。
 イントラ予測画像生成部310は、読み出した隣接PUについてイントラ予測モードIntraPredModeが示す予測モードで予測を行ってPUの予測画像を生成する。イントラ予測画像生成部310は、生成したPUの予測画像を加算部312に出力する。
 イントラ予測パラメータ復号部304において、輝度と色差で異なるイントラ予測モードを導出する場合、イントラ予測画像生成部310は、輝度予測モードIntraPredModeYに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2~66)の何れかによって輝度のPUの予測画像を生成し、色差予測モードIntraPredModeCに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2~66)、LMモード(67)の何れかによって色差のPUの予測画像を生成する。
 逆量子化・逆変換部311の詳細なブロック図を図7に示す。図7(b)は逆量子化・逆変換部311であり、逆量子化部706、並び替え部707、逆セカンダリ変換部708、並び替え部709、逆プライマリ変換部710からなる。逆量子化部706は、エントロピー復号部301から入力された量子化変換係数を逆量子化する。並べ替え部707(サブセット抽出部、係数アサイン部)は、逆量子化部706の出力の中から逆セカンダリ変換を施す係数を抽出し、逆セカンダリ変換部708に入力する形式に並び替える。逆セカンダリ変換部708は、並べ替え部707の出力に逆セカンダリ変換を施す。詳細は後述する。並び替え部709(サブセット格納部、係数アサイン部)は、逆セカンダリ変換部708の出力と逆セカンダリ変換しなかった逆量子化部706の出力とを合わせて、逆プライマリ変換部710に入力する形式に並び替える。逆プライマリ変換部710は、並び替え部709の出力に逆プライマリ変換を行い、予測残差信号を算出する。逆量子化・逆変換部311は、算出した残差信号を加算部312に出力する。
 加算部312は、インター予測画像生成部309またはイントラ予測画像生成部310から入力されたPUの予測画像と逆量子化・逆変換部311から入力された残差信号を画素毎に加算して、PUの復号画像を生成する。加算部312は、生成したPUの復号画像を参照ピクチャメモリ306に記憶し、生成したPUの復号画像をピクチャ毎に統合した復号画像Tdを外部に出力する。
  (画像符号化装置の構成)
 次に、本実施形態に係る画像符号化装置11の構成について説明する。図6は、本実施形態に係る画像符号化装置11の構成を示すブロック図である。画像符号化装置11は、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化・逆変換部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、予測パラメータ符号化部111を含んで構成される。予測パラメータ符号化部111は、インター予測パラメータ符号化部112及びイントラ予測パラメータ符号化部113を含んで構成される。
 予測画像生成部101は画像Tの各ピクチャについて、そのピクチャを分割した領域である符号化ユニットCU毎に予測ユニットPUの予測画像Pを生成する。ここで、予測画像生成部101は、予測パラメータ符号化部111から入力された予測パラメータに基づいて参照ピクチャメモリ109から復号済のブロックを読み出す。予測パラメータ符号化部111から入力された予測パラメータとは、例えばインター予測の場合、動きベクトルである。予測画像生成部101は、対象PUを起点として動きベクトルが示す参照画像上の位置にあるブロックを読み出す。またイントラ予測の場合、予測パラメータとは例えばイントラ予測モードである。イントラ予測モードで使用する隣接PUの画素値を参照ピクチャメモリ109から読み出し、PUの予測画像Pを生成する。予測画像生成部101は、読み出した参照ピクチャブロックについて複数の予測方式のうちの1つの予測方式を用いてPUの予測画像Pを生成する。予測画像生成部101は、生成したPUの予測画像Pを減算部102に出力する。
 なお、予測画像生成部101は、既に説明した予測画像生成部308と同じ動作であるためここでの説明を省略する。
 予測画像生成部101は、予測パラメータ符号化部から入力されたパラメータを用いて、参照ピクチャメモリから読み出した参照ブロックの画素値をもとにPUの予測画像Pを生成する。予測画像生成部101で生成した予測画像は減算部102、加算部106に出力される。
 減算部102は、予測画像生成部101から入力されたPUの予測画像Pの信号値を、画像Tの対応するPUの画素値から減算して、残差信号を生成する。減算部102は、生成した残差信号を変換・量子化部103に出力する。
 変換・量子化部103の詳細なブロック図を図7に示す。図7(a)は変換・量子化部103であり、プライマリ変換部701、並び替え部702、セカンダリ変換部703、並び替え部704、量子化部705からなる。プライマリ変換部701は、減算部102から入力された予測残差信号に対しプライマリ変換を行い、プライマリ変換係数を算出する。並び替え部702はプライマリ変換部701の出力をセカンダリ変換部703に入力する形式に並び替える。この並び替えは、逆量子化・逆変換部311の並び替え部709の並び替えと入出力が逆の関係にある。セカンダリ変換部703は、並び替え部702の出力にセカンダリ変換を施す。詳細は後述する。並び替え部704は、セカンダリ変換部703の出力とセカンダリ変換しなかったプライマリ変換部701の出力を合わせて、量子化部705に入力する形式に並び替える。この並び替えは、逆量子化・逆変換部311の並び替え部707の並び替えと入出力が逆の関係にある。量子化部705は、並び替え部704の出力を量子化して量子化係数を求める。変換・量子化部103は、求めた量子化係数をエントロピー符号化部104及び逆量子化・逆変換部105に出力する。
 プライマリ変換はCUあるいはTU単位の予測残差に対し、一般的に分離型変換を施す。予測残差の特徴に適合した、相互に独立な変換軸で変換するため、DCT-2、DCT-5、DCT-8、DST-1、DST-7等、複数の変換基底から選択することができる。画像復号装置で記載した逆プライマリ変換は、プライマリ変換の逆変換であり、プライマリ変換で使用した変換基底に対応する逆変換用の基底を用いる。
 次にセカンダリ変換とその逆変換について説明する。
 セカンダリ変換はプライマリ変換後の係数に対し適用する変換である。一般的にプライマリ変換は分離型変換で実現されており、例えば斜め方向成分に対しては最適ではなく、エネルギーを効率的に集中させることができない。このような場合に、プライマリ変換係数に再度斜め方向の成分に対して効果のある変換を施すことによって、特定の成分にエネルギーを集中させることができる。
 図7を用いてセカンダリ変換、逆セカンダリ変換の手順を示す。プライマリ変換(CU単位)後のプライマリ変換係数を格納した幅W、高さHのW*HブロックPXに対し、PXの左上領域を含む幅M、高さMのM*M配列SX(図10の斜線部に対応)をセカンダリ変換の対象とする。セカンダリの対象がM*Mブロックの場合、単に「M*Mブロック変換」とも呼ぶ。行列表現では垂直方向、水平方向の順に表記するのが自然であるが、以下ではブロックのサイズを幅*高さで表現することに合わせて、W*HブロックPXをW*H配列PX(配列の各成分をPXw,h w=0..W-1、h=0..H-1)と記す。ここでW、HはCU(CUを分割して変換する場合TU)の幅と高さであり、M<=W、かつM<=Hである。なお、MはCUが8x8以上の場合はM=8、それ以外の場合はM=4のように、CUのサイズに合わせてMを設定してもよい。セカンダリ変換はプライマリ変換係数全体、あるいは一部の低周波数成分に施す。セカンダリ変換の出力をM*M配列SY(配列の各成分をSYm,nと記す)と表記し、量子化部705に入力するW*H配列PY(配列の各成分をPYw,hと記す)の左上に位置するMxM領域に格納する。量子化部705に入力するW*H配列PYの残りの領域にはプライマリ変換係数PXを格納する。
 セカンダリ変換にROT(ROtational Transform)のような分離型の2次元変換を用いる場合、並び替え部702、セカンダリ変換部703、並び替え部704の処理は下記で表される。
  並び替え部702:    SXm,n = PXm,n(0<=m,n<M)  (式1)
  セカンダリ変換部703: SY = [ROTf][SX]T[ROTf]   (式2)
  並び替え部704:    PYw,h = SYw,h (0<=w,h<M)  (式3)
                 = PXw,h (上記以外)
Figure JPOXMLDOC01-appb-M000001
 ここで[ROTf]はROT変換基底の配列である。(式2)では、ROTf,SXの2次元配列を行列とみなして、各行列の積を計算する(以後、配列を行列とみなして計算する)。T[X]は行列[X]の転置を表す。(式2)の分離型の2次元変換は、入力行列に対し、変換基底行列の積である1次元変換を2回適用することでも実現できる。この場合、1回目の変換の出力を転置して得られる行列を入力として2回目の変換を行う。
 ROTは分離型変換の中では、斜め方向成分のエネルギー集中が高い変換であるが、ROTの代わりに分離型変換よりもエネルギー集中の高い非分離型変換をセカンダリ変換として用いてもよい。この場合、並び替え部702では上述の処理に加え、2次元配列を1次元配列にする処理を実行する。また、並び替え部704では上述の処理に加え、1次元配列を2次元配列にする処理を実行する。
 セカンダリ変換に非分離型変換を用いる場合、並び替え部702、セカンダリ変換部703、並び替え部704の処理は下記で表される。ここでM*M配列SXおよびM*M配列SYは共に1次元の配列である。
  並び替え部702:    SXj = PXm,n (m=j%M, n=j/M (j=0..M*M-1))  (式4)
  セカンダリ変換部703: SY = [Tf][SX]               (式5)
  並び替え部704:    PYw,h = SYj (w=j%M, h=j/M (j=0..M*M-1))  (式6)
                 = PXw,h (上記以外)
Figure JPOXMLDOC01-appb-M000002
 ここでTfは非分離型変換(1次元変換)の配列であり、1次元のDCT-2、DCT-5、DCT-8、DST-1、DST-7、HyGT(Hypercube-Givens Transform)等とすることができる。以下にROTおよび非分離型変換のいくつかの例を示す。
Figure JPOXMLDOC01-appb-M000003
 図11(a)は図5の変換・量子化部103の動作を示すフローチャートである。
 プライマリ変換部701は、予測残差に対しCU単位でプライマリ変換を行う(S1101)。並び替え部702は、CUの幅Wと高さHを所定の閾値THと比較する(S1102)。WとHのいずれか一方が閾値THより小さい場合、並び替え部702はセカンダリ変換サイズM=M1とし(S1103)、そうでない場合、M=M2とする(S1104)。ここでM1<M2である。M1、M2は2のべき乗であることが望ましい。並び替え部702は、上述の(式1)あるいは(式4)に示すように、M*M個のプライマリ変換係数をセカンダリ変換部703への入力SXとしてセットする(S1105)。セカンダリ変換部703は、入力されたM*M個のプライマリ変換係数に対し、(式2)に示す分離型、あるいは(式5)に示す非分離型変換を適用し、セカンダリ変換を実施する(S1106)。並び替え部704は、上述の(式3)あるいは(式6)に示すように、プライマリ変換係数およびセカンダリ変換係数を量子化部705への入力PYとしてセットする(S1107)。量子化部705は、変換係数PYに対し量子化を施す(S1108)。
 次に逆セカンダリ変換について説明する。図7(b)に示すように、逆量子化部706の出力を格納したW*H配列PY'(配列の各成分をPY'w,hと記す)に対し、PY'の左上に位置するM*M配列SY'(配列の各成分をSY'm,nと記す)が逆セカンダリ変換の対象である。ここでM<=W、M<=Hである。逆セカンダリ変換の出力をM*M配列SX'(配列の各成分をSX'm,nと記す)を、逆プライマリ変換部710に入力するW*H配列PX'(配列の各成分をPX'w,hと記す)の左上に位置するMxM領域に格納する。逆プライマリ変換部710に入力するW*H配列PX'の残りの領域には、逆セカンダリ変換しなかった逆量子化部706の出力PY'を格納する。
 セカンダリ変換にROT(ROtational Transform)のような分離型の2次元変換を用いる場合、並び替え部707、逆セカンダリ変換部708、並び替え部709の処理は下記で表される。
  並び替え部707:     SY'm,n = PY'm,n(0<=m,n<M)  (式7)
  逆セカンダリ変換部708: SX' = T[ROTb][SY'][ROTb]   (式8)
  並び替え部709:     PX'w,h = SX'w,h (0<=w,h<M)  (式9)
                  = PY'w,h (上記以外)
Figure JPOXMLDOC01-appb-M000004
 ここで[ROTb]は逆ROT変換基底の配列であり、T[X]は行列[X]の転置を表す。
 ROTの代わりに非分離型変換をセカンダリ変換として用いた場合、並び替え部707では上述の処理に加え、2次元配列を1次元配列にする処理を実行する。また、並び替え部709では上述の処理に加え、1次元配列を2次元配列にする処理を実行する。
 セカンダリ変換に非分離型変換を用いる場合、並び替え部707、逆セカンダリ変換部708、並び替え部709の処理は下記で表される。ここで配列SX'および配列SY'は共にM*Mサイズの1次元の配列である。
  並び替え部707:    SY'j = PY'm,n (m=j%M, n=j/M (j=0..M*M-1)) (式10)
  セカンダリ変換部708: SX' = [Tb][SY']              (式11)
  並び替え部709:    PX'w,h = SX'j (w=j%M, h=j/M (j=0..M*M-1)) (式12)
                 = PY'w,h (上記以外)
Figure JPOXMLDOC01-appb-M000005
 ここで[Tb]は非分離型変換の配列であり、上述の1次元のDCT-2、DCT-5、DCT-8、DST-1、DST-7、HyGT(Hypercube-Givens Transform)等の逆変換とすることができる。
 図11(b)は図6の逆量子化・逆変換部311および図5の逆量子化・逆変換部105の動作を示すフローチャートである。
 逆量子化部706は、エントロピー復号部301で復号された予測残差の量子化変換係数に対し、逆量子化を行う(S1109)。並び替え部707は、CUの幅Wと高さHを所定の閾値THと比較する(S1110)。WとHのいずれか一方が閾値THより小さい場合、並び替え部707は逆セカンダリ変換サイズM=M1とし(S1111)、そうでない場合、M=M2とする(S1112)。並び替え部707は設定されたMを用いてM×M領域をセカンダリ変換用の領域として抽出する。ここでM1、M2は図11(a)のフローチャートで用いたものと同じである。並び替え部707は上述の(式7)あるいは(式10)に示すように、M*M個の変換係数を逆セカンダリ変換部708への入力SY'としてセットする(S1113)。逆セカンダリ変換部708は、入力されたM*M個の変換係数に対し、(式8)に示す分離型、あるいは(式11)に示す非分離型変換を適用し、逆セカンダリ変換を実施する(S1114)。並び替え部709は、上述の(式9)あるいは(式12)に示すように、プライマリ変換係数を逆プライマリ変換部710への入力PX'としてセットする(S1115)。逆プライマリ変換部710は、変換係数PX'に対し逆プライマリ変換を施す(S1116)。
 上記において、閾値TH=8とした場合、M1=4、M2=8と設定してもよい。
 セカンダリ変換はイントラ予測において適用され、イントラ予測モードiPredと、インデックスnIdxを参照してCU毎に適用する変換を選択する。図12(a)は67種類のイントラ予測モードに対し、35種類の変換セットTPREDを割り当てた例である。1個の変換セットには3種類のフィルタが割り当てられており、図12(b)に示すインデックスnIdxを用いて適用する変換を指定する(nIdx=1~3)。nIdx=0の場合はセカンダリ変換を適用しない。
 エントロピー符号化部104には、変換・量子化部103から量子化係数が入力され、予測パラメータ符号化部111から予測パラメータが入力される。入力される予測パラメータには、例えば、参照ピクチャインデックスref_Idx_lX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、予測モードpred_mode_flag、及びマージインデックスmerge_idx等の符号がある。
 エントロピー符号化部104は、入力された分割情報、予測パラメータ、量子化変換係数等をエントロピー符号化して符号化ストリームTeを生成し、生成した符号化ストリームTeを外部に出力する。
 逆量子化・逆変換部105は、画像復号装置における、逆量子化・逆変換部311(図5)と同じであり、変換・量子化部103から入力された量子化係数を逆量子化して変換係数を求める。逆量子化・逆変換部105は、求めた変換係数について逆変換を行い、残差信号を算出する。逆量子化・逆変換部105は、算出した残差信号を加算部106に出力する。
 加算部106は、予測画像生成部101から入力されたPUの予測画像Pの信号値と逆量子化・逆変換部105から入力された残差信号の信号値を画素毎に加算して、復号画像を生成する。加算部106は、生成した復号画像を参照ピクチャメモリ109に記憶する。
 ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)を施す。
 予測パラメータメモリ108は、符号化パラメータ決定部110が生成した予測パラメータを、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。
 参照ピクチャメモリ109は、ループフィルタ107が生成した復号画像を、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。
 符号化パラメータ決定部110は、符号化パラメータの複数のセットのうち、1つのセットを選択する。符号化パラメータとは、上述したQTBT分割パラメータや予測パラメータやこれらに関連して生成される符号化の対象となるパラメータである。予測画像生成部101は、これらの符号化パラメータのセットの各々を用いてPUの予測画像Pを生成する。
 符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化誤差を示すRDコスト値を算出する。RDコスト値は、例えば、符号量と二乗誤差に係数λを乗じた値との和である。符号量は、量子化残差と符号化パラメータをエントロピー符号化して得られる符号化ストリームTeの情報量である。二乗誤差は、減算部102において算出された残差信号の残差値の二乗値についての画素間の総和である。係数λは、予め設定されたゼロよりも大きい実数である。符号化パラメータ決定部110は、算出したRDコスト値が最小となる符号化パラメータのセットを選択する。これにより、エントロピー符号化部104は、選択した符号化パラメータのセットを符号化ストリームTeとして外部に出力し、選択されなかった符号化パラメータのセットを出力しない。符号化パラメータ決定部110は決定した符号化パラメータを予測パラメータメモリ108に記憶する。
 予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから、符号化するための形式を導出し、エントロピー符号化部104に出力する。符号化するための形式の導出とは、例えば動きベクトルと予測ベクトルから差分ベクトルを導出することである。また予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから予測画像を生成するために必要なパラメータを導出し、予測画像生成部101に出力する。予測画像を生成するために必要なパラメータとは、例えばサブブロック単位の動きベクトルである。
 インター予測パラメータ符号化部112は、符号化パラメータ決定部110から入力された予測パラメータに基づいて、差分ベクトルのようなインター予測パラメータを導出する。インター予測パラメータ符号化部112は、予測画像生成部101に出力する予測画像の生成に必要なパラメータを導出する構成として、インター予測パラメータ復号部303(図5等、参照)がインター予測パラメータを導出する構成と一部同一の構成を含む。また、イントラ予測パラメータ符号化部113は、予測画像生成部101に出力する予測画像の生成に必要な予測パラメータを導出する構成として、イントラ予測パラメータ復号部304(図5等参照)がイントラ予測パラメータを導出する構成と、一部同一の構成を含む。
 イントラ予測パラメータ符号化部113は、符号化パラメータ決定部110から入力されたイントラ予測モードIntraPredModeから、符号化するための形式(例えばMPM_idx、rem_intra_luma_pred_mode等)を導出する。
 図13に示すように、セカンダリ変換による符号化ゲイン(符号量削減量)は大きいが、新しい変換を適用するので、処理量や使用するメモリも増加する。上述のように、セカンダリ変換サイズをMxMに制限することで処理量や使用するメモリの増加を抑える試みがあるが、十分ではない。以降ではセカンダリ変換サイズをさらに制限することで、処理量や使用するメモリの増加を抑える技術を説明する。
 従来、セカンダリ変換は、正方形かつ2のべき乗のサイズを用いてきた。M1*M1の次に大きい変換は(M1*2)*(M1*2)=M1*M2*4であり、変換サイズは4倍になる。本発明では、セカンダリ変換のサイズをM*MではなくM*N(M=M1*2、N=M1あるいはM=M1、N=M1*2)のように、横と縦で異なるサイズとすることにより、変換サイズは4倍ではなく2倍に抑える。特に非分離型変換では、入力の個数が4倍になると変換係数の基底は16倍になるので、変換サイズを2倍に抑えることは使用するメモリの削減に大きな効果がある。またM*N変換を2回ではなく、低周波数成分を含む入力に対してのみ行うことで、さらに処理量および使用するメモリ量を削減することができる。プライマリ変換後の非ゼロ変換係数のほとんどは低周波数領域に集まるため、高周波数成分側の入力に対してセカンダリ変換を行わなくても、符号化効率に大きな低下はない。
 図14は、セカンダリ変換の対象とするプライマリ変換係数の領域の例である。図14(a)、(b)はM=8のM*Mブロック変換(8*8ブロック変換)をM=4、N=8(4*8ブロック変換)、あるいはM=8、N=4(8*4ブロック変換)のM*Nブロック変換で置き換えた例である。図14(a)はセカンダリ変換としてM*N(4*8)ブロック変換を適用した時の入力SXの一例である。分離型のセカンダリ変換の場合、並び替え部702は入力SXに(式13)を適用する。また、非分離型のセカンダリ変換の場合、並び替え部702は入力SXに(式14)を適用する。なお図14、(式13)、(式14)は一般的な配列であり、X、Xm,nをSX、SXm,nと置き換えて読む。
Figure JPOXMLDOC01-appb-M000006
 図14(b)はセカンダリ変換としてM*N(8*4)変換を適用した時の入力SXの一例である。並び替え部702は、分離型のセカンダリ変換の場合、入力SXに(式15)をセットし、非分離型のセカンダリ変換の場合、入力SXに(式16)をセットする。なお図14、(式15)、(式16)は一般的な配列であり、X、Xm,nをSX、SXm,nと置き換えて読む。
Figure JPOXMLDOC01-appb-M000007
 分離型のセカンダリ変換およびセカンダリ逆変換は以下で表される。
  セカンダリ変換部703:   SY = [ROTf_N][SX]T[ROTf_M]   (式17)
  逆セカンダリ変換部708: SX' = T[ROTb_N][SY'][ROTb_M]  (式18)
ここで“N”、および“M”は変換の垂直および水平サイズである。つまり、[ROTf_N]はN*N配列であり、[ROTf_M]はM*M配列である。
 図14(c)はセカンダリ変換として1次元のM*N(=32)変換を適用した時の入力SXの一例である。並び替え部702は非分離型のセカンダリ変換の場合、入力SXに(式19)をセットする。なお図14、(式19)は一般的な配列であり、X、Xm,nをSX、SXm,nと置き換えて読む。
Figure JPOXMLDOC01-appb-M000008
 非分離型のセカンダリ変換および逆セカンダリ変換は(式5)、(式11)で表される。
 以下では、変換・量子化部103の並び替え部702で抽出するセカンダリ変換の入力領域の形状(セカンダリ変換の入力SX)について説明するが、逆量子化・逆変換部311(105)の並び替え部709においても、上記形状を逆セカンダリ変換の出力領域の形状として用いる。すなわち、スキャン方向、イントラ予測方向、ブロック形状に応じて、逆セカンダリ変換の出力を設定する領域を選択することができる。
  (スキャン方向依存セカンダリ変換)
 M*Mセカンダリ変換(図14はM=8の例)に対し、図14(a)~(c)のいずれの入力SXを使用するかは、図15に示す変換係数の3種類のスキャン方向を用いて決定する。図14は一般的な配列であり、X、Xm,nをSX、SXm,nと置き換えて読む。変換係数のスキャン方向が垂直方向であれば縦長のセカンダリ変換領域、例えば、図14(a)の入力SXを用い、スキャン方向が水平方向であれば横長のセカンダリ変換領域、例えば図14(b)の入力SXを用い、それ以外(スキャン方向が斜め方向)であれば、縦長あるいは横長のセカンダリ変換領域を入力SXに用いればよい。
 また、別の構成として、変換係数のスキャン方向が垂直方向であれば縦長のセカンダリ変換領域、例えば、図14(a)の入力SXを用い、スキャン方向が水平方向であれば横長のセカンダリ変換領域、例えば図14(b)の入力SXを用いる。それ以外(スキャン方向が斜め方向)であれば、M*Mブロックの左上からの距離が一定以下の左上中心の領域をセカンダリ変換領域、例えば、図14(c)の入力SXを用いてセカンダリ変換を実行する。なお、入力が図14(c)で、要素数を2のべき乗とする場合には、完全には左上からの距離が等距離の領域(三角形)とならず、多少いびつな形になるが特に問題ではない。
 さらに、別の構成として、分離型のセカンダリ変換の場合、変換係数のスキャン方向が垂直方向であれば縦長のセカンダリ変換領域、例えば、図14(a)の入力SXを用い、スキャン方向が水平方向であれば横長のセカンダリ変換領域、例えば図14(b)の入力SXを用いる。スキャン方向が斜め方向であれば、図17に示すイントラ予測モードを参照し、イントラ予測モードが0~predDiag-1の場合は縦長のセカンダリ変換領域、例えば、図14(a)の入力SXを用い、イントラ予測モードがpredDiag~predURの場合は横長のセカンダリ変換領域、例えば図14(b)の入力SXを用いてセカンダリ変換を実行する。
 なお、後述のフローチャートで示すように、CUあるいはTUの幅Wと高さHのいづれか一方が閾値TH未満の場合には、例えば4*4の正方形の領域をセカンダリ変換領域の入力とし、それ以外(CUまたはTUの幅Wと高さHの双方が閾値TH以上の)場合には、上記の非正方形領域をセカンダリ変換領域の入力としてもよい。
  (イントラ方向依存セカンダリ変換)
 また、別の一例として、M*Mセカンダリ変換(図14はM=8の例)に対し、図14(a)~(c)のいずれの入力SXを使用するかを、変換係数のスキャン方向ではなく、イントラ予測モードを用いて決定してもよい。非分離型のセカンダリ変換の場合、イントラ予測モードが水平方向付近、例えば、図17に示すpredHor-diff~predHor+diffであれば、縦長のセカンダリ変換領域、例えば、図14(a)の4x8ブロックの入力SXを用い、イントラ予測モードが垂直方向付近、例えば、predVer-diff~predVer+diffであれば、横長のセカンダリ変換領域、例えば、図14(b)の8x4ブロックの入力SXを用いる。それ以外の場合には、縦長あるいは横長のセカンダリ変換領域を用いればよい。
 また、別の構成として、イントラ予測モードが水平方向付近であれば、例えば、図14(a)の縦長のセカンダリ変換領域を、イントラ予測モードが垂直方向付近であれば、例えば、図14(b)の横長のセカンダリ変換領域を、それ以外の場合にも、M*Mブロックの左上中心のセカンダリ変換領域、例えば、図14(c)の入力SXを用いてセカンダリ変換を実行してもよい。
 さらに、別の構成として、イントラ予測モードが図17に示すpredDiag未満であれば、縦長のセカンダリ変換領域である図14(a)の入力SXを用い、イントラ予測モードがpredDiag以上であれば、横長のセカンダリ変換領域である図14(b)の入力SXを用いてセカンダリ変換を実行しても良い。また方向予測以外のイントラ予測モードの場合には、縦長あるいは横長のセカンダリ変換領域を入力SXに用いても良い。ここでpredHor、predVer、predDiag、predURは各々、水平方向予測、垂直方向予測、左上方向予測、左下方向から右上方向のイントラ予測モード番号であり、イントラ予測モード数が67であれば、predHor=18、pred=50、predDiag=34、predBL=2、predUR=66などを用いる。diffは正の整数である。
 なお、CUあるいはTUの幅Wと高さHのいづれか一方が閾値TH未満の場合には、例えば4*4の正方形の領域をセカンダリ変換領域の入力とし、それ以外(CUまたはTUの幅Wと高さHの双方が閾値TH以上の)場合には、上記の非正方形領域をセカンダリ変換領域の入力としてもよい。
  (ブロック形状依存セカンダリ変換)
 また、別の一例として、セカンダリ変換の入力とする領域の形状は、ブロック形状を用いて決定してもよい。ブロック形状が縦長(W<H)であれば、例えば、図14(a)に示す縦長のセカンダリ変換領域を入力SXに用い、ブロック形状が横長(W>H)であれば、例えば、図14(b)に示す横長のセカンダリ変換領域を入力SXに用いても良い。それ以外であれば、縦長あるいは横長のセカンダリ変換領域を用いても良い。
 また、別の構成として、ブロック形状が縦長(W<H)であれば、例えば、図14(a)に示す縦長のセカンダリ変換領域を入力SXに用い、ブロック形状が横長(W>H)であれば、例えば、図14(b)に示す横長のセカンダリ変換領域を入力SXに用いても良い。それ以外であれば、図14(c)に示すM*Mブロックの左上中心のセカンダリ変換領域を入力SXに用いても良い。
 なお、CUあるいはTUの幅Wと高さHのいづれか一方が閾値TH未満の場合には、例えば4*4の正方形の領域をセカンダリ変換領域の入力とし、それ以外(CUまたはTUの幅Wと高さHの双方が閾値TH以上の)場合には、上記の非正方形領域をセカンダリ変換領域の入力としてもよい。
 図16(a)は、M*N点非分離型セカンダリ変換(M!=N、MとNは等しくない)を適用する場合の図5の変換・量子化部103の動作を示すフローチャートである。
 S1101、S1102、S1108は、図11のS1101、S1102、S1108と同じであり説明を省略する。S1603、S1605はM=N=M1のセカンダリ変換を適用する場合であり、図11のS1103、S1105と同じであり説明を省略する。CUの幅Wと高さHのいずれもが閾値TH以上の場合、並び替え部702は変換係数のスキャン方向を参照する(S1604)。スキャン方向が垂直方向の場合、S16041に進み、セカンダリ変換のサイズを縦長のM=M2/2、N=M2とし、(式14)で示すように図14(a)のM*N個の変換係数をセカンダリ変換部703への入力SXとする。スキャン方向が水平方向の場合、S16042に進み、セカンダリ変換サイズを横長のM=M2、N=M2/2とし、(式16)で示すように図14(b)のM*N個の変換係数をセカンダリ変換部703への入力SXとする。スキャン方向がそれ以外(例えば斜め方向)の場合、S16043に進み、(式17)で示すようにM*Mブロックの左上中心の領域である図14(c)のM2*M2/2個の変換係数をセカンダリ変換部703への入力SXとする。ここでM1<M2である。M1、M2は2のべき乗であることが望ましい。セカンダリ変換部703は、入力されたプライマリ変換係数に対し、(式5)に示す非分離型変換を適用し、セカンダリ変換を実施する(S1606)。並び替え部704は、上述の(式6)に示すように、プライマリ変換係数およびセカンダリ変換係数を量子化部705への入力PYとしてセットする(S1607)。なお、(式14)、(式16)、(式17)ではM1=4、M2=8とした。なお図14、(式14)、(式16)、(式17)は一般的な配列であり、X、Xm,nをSX、SXm,nあるいはPY、PYm,nと置き換えて読む。
 図16(b)は、M*N点非分離型セカンダリ変換(M!=N)を適用する場合の図6の逆量子化・逆変換部311および図5の逆量子化・逆変換部105の動作を示すフローチャートである。
 S1109、S1110、S1116は、図11のS1109、S1110、S1116と同じであり説明を省略する。S1611、S1613はM=N=M1の逆セカンダリ変換を適用する場合であり、図11のS1111、S1113と同じであり説明を省略する。CUの幅Wと高さHの双方が閾値TH以上の場合、並び替え部707は変換係数のスキャン方向を参照する(S1612)。スキャン方向が垂直方向の場合、S16121に進み、逆セカンダリ変換のサイズをM=M2/2、N=M2とし、(式14)で示すように図14(a)のM*N個の変換係数を逆セカンダリ変換部708への入力SY'とする。(式14)および以下で参照する(式16)、(式17)は、一般的な配列であるのでXをSY'と置き替えて読む。つまり、X1、X2、Xm,nはSY'1、SY'2、SY'm,nと置き換える。スキャン方向が水平方向の場合、S16122に進み、逆セカンダリ変換のサイズをM=M2、N=M2/2とし、(式16)で示すように図14(b)のM*N個の変換係数を逆セカンダリ変換部708への入力SY'とする。スキャン方向が斜め方向の場合、S16123に進み、(式17)で示すように図14(c)のM2*M2/2個の変換係数を逆セカンダリ変換部708への入力SY'とする。逆セカンダリ変換部708は、入力された変換係数に対し、(式11)に示す非分離型変換を適用し、逆セカンダリ変換を実施する(S1614)。並び替え部709は、上述の(式12)に示すように、プライマリ変換係数を逆プライマリ変換部710への入力PX'としてセットする(S1615)。逆プライマリ変換部710は、変換係数に対し逆プライマリ変換を施す(S1616)。
 なお、図16ではスキャン方向を参照してセカンダリ変換部703、あるいは逆セカンダリ変換部708に入力する変換係数をセットしたが、上述のようにスキャン方向ではなく、イントラ予測モードを参照してして変換係数をセットしてもよい。
 また、図16では低周波数成分側に存在する変換係数SX1あるいはSY'1に対して、セカンダリ変換あるいは逆セカンダリ変換を実施する動作を示したが、図16(a)ではS1102~S1607を2回処理し、図16(b)ではS1110~S1615を2回処理し、2回目に高周波数成分側に存在する変換係数SX2あるいはSY'2をセカンダリ変換あるいは逆セカンダリ変換の入力としてセットすることで、M*M全体にセカンダリ変換あるいは逆セカンダリ変換を実施することもできる。
 以上、説明したように、セカンダリ変換を行う変換係数の領域に非正方形M*N(M!=N)を用いることにより、符号化効率の低下を抑えつつ、処理量や使用するメモリを削減することができる。さらに、M>Nとして横長の変換M*Nと縦長の変換N*Mを組み合わせることにより、M*M変換よりも小さな変換サイズでも符号化効率の低減を最低限としている。
  (実施形態2)
 実施形態1ではセカンダリ変換の要素数をM2*M2からM2*M2/2とすることで、符号化効率の低下を抑えつつ、処理量や使用するメモリを削減する技術を説明した。実施形態2では、CUサイズが大きい場合もM2*M2セカンダリ変換を使用せず、M1*M1のような小サイズのセカンダリ変換を適用することで、符号化効率の低下を抑えつつ、処理量や使用するメモリを削減する技術を説明する。ここでM1、M2の定義は実施形態1と同じである。
 図18はセカンダリ変換を行うM2*M2サイズのブロックを小サイズの領域(M1*M1の矩形ブロック、あるいはM1*M1個の1次元データ、以降ではどちらもブロックと呼ぶ)に分割し、小ブロック毎にセカンダリ変換を実施する場合に、M2=8、M1=4と設定した例である。以下ではM2=8、M1=4の例を説明するが、M2、M1が2のべき乗であり、M2>M1の関係を満たせば、M2=8、M1=4に限らず、他の値をとることも可能である。図18(a)、(b)は分割した小サイズの全ブロックに対しセカンダリ変換を行う場合、図18(c)、(d)は分割した小ブロックのうち3つに対しセカンダリ変換を行う場合、図18(e)、(f)、(g)は分割した小ブロックのうち2つに対しセカンダリ変換を行う場合、図18(h)、(i)は分割した小ブロックのうち1つに対しセカンダリ変換を行う場合を示す。ここで小ブロックを図18(a)のように2次元配列として定義した場合と、図18(b)のように1次元配列として定義した場合の、分離型のセカンダリ変換部703への入力SX1、SX2、SX3、SX4を以下に示す。
Figure JPOXMLDOC01-appb-M000009
 また、非分離型のセカンダリ変換部703への入力SX1、SX2、SX3、SX4を以下に示す。
Figure JPOXMLDOC01-appb-M000010
 なお、(式20)~(式22)は一般的な配列であり、X、Xm,nをSX、SXm,nと置き換えて読む。
 M2*M2ブロックを分割した小ブロックのうちの何個の小ブロックをセカンダリ変換するかは、許容可能な処理量やメモリサイズに合わせて決定することができる。処理量やメモリサイズに十分余裕があれば、全ての小ブロックに対しセカンダリ変換を実施し、処理量やメモリサイズにほとんど余裕がなければ、1個の小ブロックに対してのみセカンダリ変換を実施する。このように、処理量やメモリサイズの余裕に応じてセカンダリ変換する小ブロックの個数を決定することができる。セカンダリ変換する小ブロックの個数は、符号化して画像復号装置に通知してもよい。あるいは符号化データに含まれるレベル情報を参照して個数を決定した場合は、新たに個数を示すシンタックスを追加する必要はない。
 また、変換係数のスキャン方向やイントラ予測モードを参照して、矩形の小ブロックに分割するか、非矩形の小ブロックに分割するか、あるいはどの小ブロックをセカンダリ変換するかを決定する。例えば、スキャン方向が垂直あるいは水平方向である場合、矩形の小ブロックに分割し、スキャン方向が斜め方向である場合、非矩形の小ブロックに分割する。または、イントラ予測モードが図17に示すpredHor-diff~predHor+diff、あるいはpredVer-diff~predVer+diffであれば、矩形の小ブロックに分割し、そうでなければ場合、非矩形の小ブロックに分割する。または、2つの小ブロックに対しセカンダリ変換を実施する場合は、スキャン方向が垂直方向であれば、図18(g)のように入力としてSX1とSX3を選択し、水平方向であれば、図18(f)のように入力としてSX1とSX2を選択し、斜め方向であれば、図18(e)のように入力としてSX1とSX2を選択する。または、イントラ予測モードが図17に示すpredHor-diff~predHor+diffであれば、図18(g)のように入力としてSX1とSX3を選択し、predVer-diff~predVer+diffであれば、図18(f)のように入力としてSX1とSX2を選択し、それ以外であれば、図18(e)のように入力としてSX1とSX2を選択する。
 セカンダリ変換するM*Mブロックを小サイズのブロックに分割し、ブロック毎にセカンダリ変換あるいは逆セカンダリ変換する場合の変換・量子化部103、逆量子化・逆変換部311(105)の動作は、図16のフローチャートの動作とほぼ同じであるが、並び替え部の動作が若干異なる。そのため、図16(b)に示す枠線で囲んだ部分(1612)について、図19を用いて説明する。図16(a)に対しても、並び替え部の処理内容の差分は図16(b)と同じであり、説明は省略する。
 セカンダリ変換した小ブロックの個数Lが1、3、4個の場合の並び替え部と逆セカンダリ変換部の動作を、図19(a)のフローチャートを用いて説明する。逆量子化・逆変換部311(105)は変数s=1をセットする(S1901)。sは逆セカンダリ変換部708に入力する変換係数の配列SXの番号である。並び替え部707は、変換係数のスキャン方向が斜め方向か否かをチェックし(S1902)、斜め方向であればS1903に進み、そうでなければS1904に進む。並び替え部707は、変換係数のスキャン方向が斜め方向であれば、逆セカンダリ変換するM*Mブロックを非矩形の小ブロックに分割し、(式22)のSY'sをセットする(S1903)。ここでs=1~Lである。なお(式20)~(式22)のX、Xm,nは先に述べたようにSY'、SY'm,nと置き換えて読む。並び替え部707は、変換係数のスキャン方向が斜め方向でなければ、セカンダリ変換するM*Mブロックを矩形の小ブロックに分割し、(式21)のSY'をセットする(S1904)。逆セカンダリ変換部708は、並び替え部707でセットされた配列SY'を逆セカンダリ変換する(S1905)。並び替え部709は、逆セカンダリ変換の出力SX'を逆プライマリ変換に入力する配列PX'に書き込む(S1906)。逆量子化・逆変換部311(105)は変数sをインクリメントする(S1907)。逆量子化・逆変換部311(105)は変数sと小ブロックの個数Lを比較し、S=LでなければS1902に戻り、次の小ブロックに対し処理を継続し、S>=Lであれば対象となる全ての小ブロックの処理が終了したので、処理を終了する。
 セカンダリ変換した小ブロックの個数Lが2個の場合の並び替え部、逆セカンダリ変換部の動作を、図19(b)のフローチャートを用いて説明する。S1901~S1902、S1905~S1906、S1908の処理は図19(a)と同じであり、説明を省略する。並び替え部707は、変換係数のスキャン方向が斜め方向であれば、セカンダリ変換の対象領域を図18(e)の非矩形の小ブロックに分割し、対応する変換係数を(式22)から選択しSY'をセットする(S1903)。なお(式22)と後で述べる(式21)のX、Xm,nは先に述べたようにSY'、SY'm,nと置き換えて読む。並び替え部707は、変換係数のスキャン方向が垂直方向か否かをチェックし(S19041)、垂直方向であればS19042に進み、そうでなければS19043に進む。垂直方向スキャンの場合、並び替え部707は、セカンダリ変換の対象領域を図18(g)の小ブロックに分割し、対応する変換係数を(式21)から選択しSY'sをセットする(S19042)。水平方向スキャンの場合、並び替え部707は、セカンダリ変換の対象領域図18(f)の小ブロックに分割し、対応する変換係数を(式21)から選択しSY'sをセットする(S19043)。逆量子化・逆変換部311(105)は、垂直方向スキャンの場合、変数sを2インクリメントし、それ以外の場合、変数sを1インクリメントする(S19071)。
 実施形態2では、CUサイズが大きい場合もM2*M2セカンダリ変換を使用せず、M1*M1のような小サイズのセカンダリ変換を複数個適用することで、符号化効率の低下を抑えつつ、処理量や使用するメモリを削減することができる。
  (変形例1)
 実施形態1および実施形態2では、セカンダリ変換/逆セカンダリ変換、あるいはセカンダリ変換/逆セカンダリ変換への入力SX/SY'の形状(種類)を変換係数のスキャン方向やイントラ予測モードから導出した。変形例1では、セカンダリ変換の選択に使用するインデックスnIdxを用いて、明示的に変換の種類を通知する技術を説明する。
 図12に示すように、セカンダリ変換ではイントラ予測モード毎に3種類の変換からなる変換セットが準備されており、3種類の変換の中からnIdxで指定された変換を選択する。図20に示すように、この3種類の変換に、斜め方向、垂直方向、水平方向に適したM*N変換(M!=N)を割り当てる。
 図20(a)は、分離型のセカンダリ変換と非分離型のセカンダリ変換で構成されたセットの例である。nIdx=0はセカンダリ変換オフ、nIdx=1は非分離型のセカンダリ変換で、図14(c)や図18(b)の入力に適した変換である。nIdx=2はM*N分離型のセカンダリ変換でM>N、つまり横長の形状で、図14(b)や図18(f)の入力に適した変換である。nIdx=3はM*N分離型のセカンダリ変換でM<N、つまり縦長の形状で、図14(a)や図18(g)の入力に適した変換である。
 図20(b)は、非分離型のセカンダリ変換で構成されたセットの例である。nIdx=0はセカンダリ変換オフ、nIdx=1は図14(c)や図18(b)の入力に適した変換である。nIdx=2は図14(b)や図18(f)のような横長の入力に適した変換である。nIdx=3は図14(a)や図18(g)のような縦長の入力に適した変換である。
 画像符号化装置では、符号化パラメータ決定部110が、これらの中から対象CUに最適なセカンダリ変換を導出し、nIdxを符号化することで、最も符号化効率のよいセカンダリ変換を用いて映像を符号化、復号することができる。
 以上のように、変形例1ではプライマリ変換係数に適用するセカンダリ変換の種類をインデックスnIdxで符号化し、画像復号装置に通知することで、最も符号化効率のよいセカンダリ変換を用いて映像を符号化、復号することができる。
  (実施形態3)
 セカンダリ変換導入の動機は、プライマリ変換でエネルギーを効率的に集中させることができなかった成分に対して、セカンダリ変換を施すことでエネルギーを集中させることである。実施形態3では、分離型変換で実現されたプライマリ変換は斜め方向成分に対しては最適ではないことから、斜め方向成分が重要な場合、つまりイントラ予測モードが斜め方向の場合にのみセカンダリ変換を実施する技術を説明する。斜め方向以外のイントラ予測の場合は、もともと斜め方向成分にエネルギーが集中することがないため、セカンダリ変換の効果は小さく、セカンダリ変換を実施しなくても符号化効率の低下は小さい。セカンダリ変換を実施しないので、符号化効率の低下を抑えつつ、処理量を削減することができる。
 図17はイントラ予測モードiPredを表す図である。図17に示す67種類のイントラ予測モードのうち、予測方向が斜め方向の予測モード、つまり、
  predBL<=iPred<predHor-diff || predHor+diff<iPred<predVer-diff || predVer+diff<iPred<=predUR  (式23)
の場合にのみ、セカンダリ変換を実施する。ここでdiffは正の整数である。
 図21(a)は変換・量子化部103の動作を示すフローチャートである。図21(a)において、S1101とS1108は図11(a)のS1101とS1108と同じであるため、説明を省略する。変換・量子化部103は対象CUのイントラ予測モードが(式23)を満たすかどうかをチェックする(S2102)。対象CUのイントラ予測モードが(式23)を満たす場合、セカンダリ変換を実施するためにS2103に進み、そうでなければセカンダリ変換を行わずS1108に進む。S2103では図11(a)のS1102~S1107、あるいは図16(a)のS1102~S1607のセカンダリ変換処理を実施する。
 図21(b)は逆量子化・逆変換部311(105)の動作を示すフローチャートである。図21(b)において、S1109とS1116は図11(b)のS1109とS1116と同じであるため、説明を省略する。逆量子化・逆変換部311(105)は対象CUのイントラ予測モードが(式23)を満たすかどうかをチェックする(S2102)。対象CUのイントラ予測モードが(式23)を満たす場合、逆セカンダリ変換を実施するためにS2104に進み、そうでなければ逆セカンダリ変換を行わずS1116に進む。S2104では図11(b)のS1110~S1115、あるいは図16(b)のS1110~S1615の逆セカンダリ変換処理を実施する。
 以上で説明したように、セカンダリ変換はプライマリ変換後の係数に対し適用する変換である。一般的にプライマリ変換は分離型変換で実現されており、斜め方向成分に対しては最適ではなく、エネルギーを効率的に集中することができない。このような場合に、プライマリ変換係数に再度斜め方向の成分に対して効果のあるセカンダリ変換を施すことによって、特定の成分に、よりエネルギーを集中することができる。
  (変形例2)
 実施形態3では、イントラ予測モードが斜め方向の場合、セカンダリ変換を実施し、そうでない場合はセカンダリ変換を実施しないという、イントラ予測モードに応じてセカンダリ変換という選択肢を変更する技術の一例を説明した。変形例2ではセカンダリ変換の選択肢を増やして符号化効率の低下を抑制する技術を説明する。
 セカンダリ変換では、図20に示すような、インデックスnIdxを用いて明示的にセカンダリ変換の形状(種類)を選択する技術を変形例1で述べたが、変形例2ではイントラ予測モードに応じてnIdxの値を制限する。
 変形例2では、イントラ予測モードiPredが水平方向の場合(predHor-diff<=iPred<=predHor+diff)、水平方向に適した変換(nIdx=3)、斜め方向に適した変換(nIdx=1)、変換オフ(nIdx=0)の3つから選択する。イントラ予測モードiPredが垂直方向の場合(predVer-diff<=iPred<=predVer+diff)、垂直方向に適した変換(nIdx=2)、斜め方向に適した変換(nIdx=1)、変換オフ(nIdx=0)の3つから選択する。それ以外の場合(プレナ予測、DC予測、斜め方向予測)、斜め方向に適した変換(nIdx=1)、変換オフ(nIdx=0)の2つから選択する。ここでdiffは正の整数である。図22にイントラ予測モードと取りうるnIdxの関係を示す。
 このように、イントラ予測モードに応じて取りうるnIdxの個数を削減することで、処理量を削減しつつ符号化効率の低下を抑制することができる。
  (実施形態4)
 実施形態1~3はセカンダリ変換の処理量、あるいは使用するメモリを削減する技術について述べた。実施形態4では、ある条件下でプライマリ変換を適用するか否かを切り替えることで処理量を削減する技術について述べる。
 プライマリ変換は分離型変換を用いることが多いため、斜め方向の成分に対してはエネルギー集中が良くなく、非分離型変換を用いるセカンダリ変換では、斜め方向の成分に対してもエネルギー集中が良い。一方、変換サイズが大きくなると、入力を水平・垂直方向成分に分離して演算する分離型フィルタを用いるプライマリ変換は、処理量、メモリ使用量は増加するものの、それほど大きな増加ではない。しかしながら、非分離型変換を用いるセカンダリ変換ではサイズが2倍になるとメモリ使用量は4倍になり、これに伴って演算量も増加する。そこで変換サイズが小さく、主要な成分が斜め方向である場合には、セカンダリ変換のみ実施し、プライマリ変換を実施しないことで、処理量を削減することができる。
 例えば、変換サイズが小さく、主要な成分が斜め方向であるという条件を下式とすると、
  (predBL<=iPred<predHor-diff || predHor+diff<iPred<predVer-diff || predVer+diff<iPred<=predUR) && (W<=M1 && H<=M1)  (式24)
これが成り立つ場合はプライマリ変換を行わない。ここでiPredはイントラ予測モード、W、HはCUの幅および高さ、M1はCUサイズが小さいか否かを判定する閾値、diffは正の整数である。例えばM1=4である。
 図23(a)は実施形態4の変換・量子化部103の動作を示すフローチャートである。図23(a)において、S1101とS1108は図11(a)のS1101とS1108と同じであるため、説明を省略する。変換・量子化部103は対象CUのサイズおよびイントラ予測モードが(式24)を満たすかどうかをチェックする(S2301)。対象CUのサイズおよびイントラ予測モードが(式24)を満たさない場合、プライマリ変換を実施するためにS1101に進み、その後、S2103に進む。そうでなければプライマリ変換を行わずS2103に進む。S2103では図11(a)のS1102~S1107、あるいは図16(a)のS1102~S1607のセカンダリ変換処理を実施する。
 図23(b)は実施形態4の逆量子化・逆変換部311(105)の動作を示すフローチャートである。図23(b)において、S1109とS1116は図11(b)のS1109とS1116と同じであるため、説明を省略する。S2104では、図11(b)のS1110~S1115、あるいは図16(b)のS1110~S1615の逆セカンダリ変換処理を実施する。逆量子化・逆変換部311(105)は対象CUのサイズおよびイントラ予測モードが(式24)を満たすかどうかをチェックする(S2301)。対象CUのサイズおよびイントラ予測モードが(式24)を満たさない場合、逆プライマリ変換を実施するためにS1116に進み、そうでなければ逆プライマリ変換を行わずに終了する。
 なお、図23ではセカンダリ変換、セカンダリ逆変換は非分離型変換を用いる。
 以上のように、実施形態4では、ある条件下でプライマリ変換を適用するか否かを切り替えることで符号化効率低下を抑制しつつ、処理量を削減することができる。
 本発明の一態様に係る画像符号化装置は、入力動画像の1画面を複数の画素からなる符号化単位(CU)に分割する手段と、前記CUを単位として所定の変換を行い変換係数を出力する変換手段と、前記変換係数を量子化し、量子化変換係数を出力する手段と、前記量子化変換係数を可変長符号化する手段とを備え、前記変換手段は、第1の変換手段と、第1の変換手段から出力された第1の変換係数の一部を変換する第2の変換手段とを備え、第2の変換手段は、水平方向と垂直方向のサイズの異なる領域(第1の領域)の第1の変換係数、あるいは非矩形領域(第2の領域)の第1の変換係数の少なくともいづれかを変換することを特徴とする。
 本発明の一態様に係る画像符号化装置の、前記第2の変換手段はさらに、第1の領域に対する変換を、小サイズの正方形変換を組み合わせて実行することを特徴とする。
 本発明の一態様に係る画像符号化装置の、前記第2の変換手段はさらに、イントラ予測モードあるいは変換係数のスキャン方向によって、第1の領域に対する変換、あるいは第2の領域に対する変換を選択することを特徴とする。
 本発明の一態様に係る画像符号化装置は、イントラ予測モードとCUのサイズによって前記第1の変換を実行するか否かを決定することを特徴とする。
 本発明の一態様に係る画像復号装置は、複数の画素からなる符号化単位(CU)を処理単位として符号化データを可変長復号して量子化変換係数を出力する手段と、量子化変換係数を逆量子化して変換係数を出力する手段と、前記変換係数を逆変換する逆変換手段とを備え、前記逆変換手段は、前記変換係数の少なくとも一部を逆変換して、第2の変換係数を出力する第2の逆変換手段と、前記変換係数の残りと前記第2の変換係数を逆変換する第1の逆変換手段とを備え、第2の逆変換手段は、水平方向と垂直方向のサイズの異なる領域(第1の領域)の前記変換係数、あるいは非矩形領域(第2の領域)の前記変換係数の少なくともいづれかを逆変換することを特徴とする。
 本発明の一態様に係る画像復号装置の、前記第2の逆変換手段はさらに、第1の領域に対する逆変換を、小サイズの正方形逆変換を組み合わせて実行することを特徴とする。
 本発明の一態様に係る画像復号装置の、前記第2の逆変換手段はさらに、イントラ予測モードあるいは変換係数のスキャン方向によって、第1の領域に対する逆変換、あるいは第2の領域に対する逆変換を選択することを特徴とする。
 本発明の一態様に係る画像復号装置は、イントラ予測モードとCUのサイズによって、前記第1の逆変換を実行するか否かを決定することを特徴とする。
  (ソフトウェアによる実現例)
 なお、上述した実施形態における画像符号化装置11、画像復号装置31の一部、例えば、エントロピー復号部301、予測パラメータ復号部302、ループフィルタ305、予測画像生成部308、逆量子化・逆変換部311、加算部312、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化・逆変換部105、ループフィルタ107、符号化パラメータ決定部110、予測パラメータ符号化部111をコンピュータで実現するようにしても良い。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現しても良い。なお、ここでいう「コンピュータシステム」とは、画像符号化装置11、画像復号装置31のいずれかに内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
 また、上述した実施形態における画像符号化装置11、画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。画像符号化装置11、画像復号装置31の各機能ブロックは個別にプロセッサ化しても良いし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。
  (応用例)
 上述した画像符号化装置11及び画像復号装置31は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CG及びGUIを含む)であってもよい。
 まず、上述した画像符号化装置11及び画像復号装置31を、動画像の送信及び受信に利用できることを、図8を参照して説明する。
 図8の(a)は、画像符号化装置11を搭載した送信装置PROD_Aの構成を示したブロック図である。図8の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した画像符号化装置11は、この符号化部PROD_A1として利用される。
 送信装置PROD_Aは、符号化部PROD_A1に入力する動画像の供給源として、動画像を撮像するカメラPROD_A4、動画像を記録した記録媒体PROD_A5、動画像を外部から入力するための入力端子PROD_A6、及び、画像を生成または加工する画像処理部A7を更に備えていてもよい。図8の(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示しているが、一部を省略しても構わない。
 なお、記録媒体PROD_A5は、符号化されていない動画像を記録したものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化された動画像を記録したものであってもよい。後者の場合、記録媒体PROD_A5と符号化部PROD_A1との間に、記録媒体PROD_A5から読み出した符号化データを記録用の符号化方式に従って復号する復号部(不図示)を介在させるとよい。
 図8の(b)は、画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック図である。図8の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した画像復号装置31は、この復号部PROD_B3として利用される。
 受信装置PROD_Bは、復号部PROD_B3が出力する動画像の供給先として、動画像を表示するディスプレイPROD_B4、動画像を記録するための記録媒体PROD_B5、及び、動画像を外部に出力するための出力端子PROD_B6を更に備えていてもよい。図8の(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。
 なお、記録媒体PROD_B5は、符号化されていない動画像を記録するためのものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化されたものであってもよい。後者の場合、復号部PROD_B3と記録媒体PROD_B5との間に、復号部PROD_B3から取得した動画像を記録用の符号化方式に従って符号化する符号化部(不図示)を介在させるとよい。
 なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。
 例えば、地上デジタル放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を無線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。また、ケーブルテレビ放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を有線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。
 また、インターネットを用いたVOD(Video On Demand)サービスや動画共有サービスなどのサーバ(ワークステーションなど)/クライアント(テレビジョン受像機、パーソナルコンピュータ、スマートフォンなど)は、変調信号を通信で送受信する送信装置PROD_A/受信装置PROD_Bの一例である(通常、LANにおいては伝送媒体として無線または有線の何れかが用いられ、WANにおいては伝送媒体として有線が用いられる)。ここで、パーソナルコンピュータには、デスクトップ型PC、ラップトップ型PC、及びタブレット型PCが含まれる。また、スマートフォンには、多機能携帯電話端末も含まれる。
 なお、動画共有サービスのクライアントは、サーバからダウンロードした符号化データを復号してディスプレイに表示する機能に加え、カメラで撮像した動画像を符号化してサーバにアップロードする機能を有している。すなわち、動画共有サービスのクライアントは、送信装置PROD_A及び受信装置PROD_Bの双方として機能する。
 次に、上述した画像符号化装置11及び画像復号装置31を、動画像の記録及び再生に利用できることを、図9を参照して説明する。
 図9の(a)は、上述した画像符号化装置11を搭載した記録装置PROD_Cの構成を示したブロック図である。図9の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した画像符号化装置11は、この符号化部PROD_C1として利用される。
 なお、記録媒体PROD_Mは、(1)HDD(Hard Disk Drive)やSSD(Solid State Drive)などのように、記録装置PROD_Cに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSB(Universal Serial Bus)フラッシュメモリなどのように、記録装置PROD_Cに接続されるタイプのものであってもよいし、(3)DVD(Digital Versatile Disc)やBD(Blu-ray Disc:登録商標)などのように、記録装置PROD_Cに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。
 また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部PROD_C6を更に備えていてもよい。図9の(a)においては、これら全てを記録装置PROD_Cが備えた構成を例示しているが、一部を省略しても構わない。
 なお、受信部PROD_C5は、符号化されていない動画像を受信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを受信するものであってもよい。後者の場合、受信部PROD_C5と符号化部PROD_C1との間に、伝送用の符号化方式で符号化された符号化データを復号する伝送用復号部(不図示)を介在させるとよい。
 このような記録装置PROD_Cとしては、例えば、DVDレコーダ、BDレコーダ、HDD(Hard Disk Drive)レコーダなどが挙げられる(この場合、入力端子PROD_C4または受信部PROD_C5が動画像の主な供給源となる)。また、カムコーダ(この場合、カメラPROD_C3が動画像の主な供給源となる)、パーソナルコンピュータ(この場合、受信部PROD_C5または画像処理部C6が動画像の主な供給源となる)、スマートフォン(この場合、カメラPROD_C3または受信部PROD_C5が動画像の主な供給源となる)なども、このような記録装置PROD_Cの一例である。
 図9の(b)は、上述した画像復号装置31を搭載した再生装置PROD_Dの構成を示したブロックである。図9の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した画像復号装置31は、この復号部PROD_D2として利用される。
 なお、記録媒体PROD_Mは、(1)HDDやSSDなどのように、再生装置PROD_Dに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSBフラッシュメモリなどのように、再生装置PROD_Dに接続されるタイプのものであってもよいし、(3)DVDやBDなどのように、再生装置PROD_Dに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。
 また、再生装置PROD_Dは、復号部PROD_D2が出力する動画像の供給先として、動画像を表示するディスプレイPROD_D3、動画像を外部に出力するための出力端子PROD_D4、及び、動画像を送信する送信部PROD_D5を更に備えていてもよい。図9の(b)においては、これら全てを再生装置PROD_Dが備えた構成を例示しているが、一部を省略しても構わない。
 なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。
 このような再生装置PROD_Dとしては、例えば、DVDプレイヤ、BDプレイヤ、HDDプレイヤなどが挙げられる(この場合、テレビジョン受像機等が接続される出力端子PROD_D4が動画像の主な供給先となる)。また、テレビジョン受像機(この場合、ディスプレイPROD_D3が動画像の主な供給先となる)、デジタルサイネージ(電子看板や電子掲示板等とも称され、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)、デスクトップ型PC(この場合、出力端子PROD_D4または送信部PROD_D5が動画像の主な供給先となる)、ラップトップ型またはタブレット型PC(この場合、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)、スマートフォン(この場合、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)なども、このような再生装置PROD_Dの一例である。
  (ハードウェア的実現及びソフトウェア的実現)
 また、上述した画像復号装置31及び画像符号化装置11の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
 後者の場合、上記各装置は、各機能を実現するプログラムの命令を実行するCPU、上記プログラムを格納したROM(Read Only Memory)、上記プログラムを展開するRAM(RandomAccess Memory)、上記プログラム及び各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の実施形態の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。
 上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD-ROM(Compact Disc Read-Only Memory)/MOディスク(Magneto-Optical disc)/MD(Mini Disc)/DVD(Digital Versatile Disc)/CD-R(CD Recordable)/ブルーレイディスク(Blu-ray Disc:登録商標)等の光ディスクを含むディスク類、ICカード(メモリカードを含む)/光カード等のカード類、マスクROM/EPROM(Erasable Programmable Read-Only Memory)/EEPROM(Electrically Erasable and Programmable Read-Only Memory:登録商標)/フラッシュROM等の半導体メモリ類、あるいはPLD(Programmable logic device)やFPGA(Field Programmable Gate Array)等の論理回路類などを用いることができる。
 また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、LAN(Local Area Network)、ISDN(Integrated Services Digital Network)、VAN(Value-Added Network)、CATV(Community Antenna television/Cable Television)通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な媒体であればよく、特定の構成または種類のものに限定されない。例えば、IEEE(Institute of Electrical and Electronic Engineers)1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital Subscriber Line)回線等の有線でも、IrDA(Infrared Data Association)やリモコンのような赤外線、BlueTooth(登録商標)、IEEE802.11無線、HDR(High Data Rate)、NFC(Near Field Communication)、DLNA(Digital Living Network Alliance:登録商標)、携帯電話網、衛星回線、地上デジタル放送網等の無線でも利用可能である。なお、本発明の実施形態は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。
 本発明の実施形態は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
 (関連出願の相互参照)
 本出願は、2017年4月28日に出願された日本国特許出願:特願2017-089788に対して優先権の利益を主張するものであり、それを参照することにより、その内容の全てが本書に含まれる。
 本発明の実施形態は、画像データが符号化された符号化データを復号する画像復号装置、及び、画像データが符号化された符号化データを生成する画像符号化装置に好適に適用することができる。また、画像符号化装置によって生成され、画像復号装置によって参照される符号化データのデータ構造に好適に適用することができる。
10 CT情報復号部
11 画像符号化装置
20 CU復号部
31 画像復号装置
41 画像表示装置

Claims (6)

  1.  入力動画像を符号化する動画像符号化装置において、
     前記入力動画像の1画面を複数の画素からなる符号化単位(CU)に分割する手段と、
     前記CUを単位として所定の変換を行い変換係数を出力する変換手段と、
     前記変換係数を量子化し、量子化変換係数を出力する手段と、
     前記量子化変換係数を可変長符号化する手段とを備え、
     前記変換手段は、
     第1の変換手段と、
     第1の変換手段から出力された第1の変換係数の一部を変換する第2の変換手段とを備え、
     第2の変換手段は、水平方向と垂直方向のサイズの異なる領域(第1の領域)の第1の変換係数、あるいは非矩形領域(第2の領域)の第1の変換係数の少なくともいづれかを変換することを特徴とする動画像符号化装置。
  2.  前記第2の変換手段は、第1の領域に対する変換を、小サイズの正方形変換を組み合わせて実行することを特徴とする請求項1に記載の動画像符号化装置。
  3.  前記第2の変換手段は、イントラ予測モードあるいは変換係数のスキャン方向によって、第1の領域に対する変換、あるいは第2の領域に対する変換を選択することを特徴とする請求項1に記載の動画像符号化装置。
  4.  動画像を復号する動画像復号装置において、
     複数の画素からなる符号化単位(CU)を処理単位として、符号化データを可変長復号して量子化変換係数を出力する手段と、
     量子化変換係数を逆量子化して変換係数を出力する手段と、
     前記変換係数を逆変換する逆変換手段とを備え、
     前記逆変換手段は、
     前記変換係数の少なくとも一部を逆変換して、第2の変換係数を出力する第2の逆変換手段と、
     前記変換係数の残りと前記第2の変換係数を逆変換する第1の逆変換手段とを備え、
     第2の逆変換手段は、水平方向と垂直方向のサイズの異なる領域(第1の領域)の前記変換係数、あるいは非矩形領域(第2の領域)の前記変換係数の少なくともいづれかを逆変換することを特徴とする動画像復号装置。
  5.  前記第2の逆変換手段は、第1の領域に対する逆変換を、小サイズの正方形逆変換を組み合わせて実行することを特徴とする請求項4に記載の動画像復号装置。
  6.  前記第2の逆変換手段は、イントラ予測モードあるいは変換係数のスキャン方向によって、第1の領域に対する逆変換、あるいは第2の領域に対する逆変換を選択することを特徴とする請求項4に記載の動画像復号装置。
PCT/JP2018/016408 2017-04-28 2018-04-23 動画像符号化装置及び動画像復号装置 WO2018199002A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US16/607,765 US20200053365A1 (en) 2017-04-28 2018-04-23 Video encoding device and video decoding device
US17/492,748 US11863764B2 (en) 2017-04-28 2021-10-04 Video encoding device and video decoding device
US18/509,398 US20240089469A1 (en) 2017-04-28 2023-11-15 Video encoding device and video decoding device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017-089788 2017-04-28
JP2017089788A JP2020109884A (ja) 2017-04-28 2017-04-28 動画像符号化装置及び動画像復号装置

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US16/607,765 A-371-Of-International US20200053365A1 (en) 2017-04-28 2018-04-23 Video encoding device and video decoding device
US17/492,748 Continuation US11863764B2 (en) 2017-04-28 2021-10-04 Video encoding device and video decoding device

Publications (1)

Publication Number Publication Date
WO2018199002A1 true WO2018199002A1 (ja) 2018-11-01

Family

ID=63919597

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/016408 WO2018199002A1 (ja) 2017-04-28 2018-04-23 動画像符号化装置及び動画像復号装置

Country Status (3)

Country Link
US (3) US20200053365A1 (ja)
JP (1) JP2020109884A (ja)
WO (1) WO2018199002A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113906747A (zh) * 2019-06-24 2022-01-07 Kddi 株式会社 图像解码装置、图像解码方法及程序

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019009129A1 (ja) 2017-07-03 2019-01-10 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ 符号化装置、復号装置、符号化方法及び復号方法
US10666981B2 (en) * 2018-06-29 2020-05-26 Tencent America LLC Method, apparatus and medium for decoding or encoding
EP3806475B1 (en) * 2018-07-06 2023-05-10 LG Electronics, Inc. Transform-based image coding method and device
US11166044B2 (en) * 2018-07-31 2021-11-02 Tencent America LLC Method and apparatus for improved compound orthonormal transform
EP3991406A1 (en) * 2019-06-25 2022-05-04 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Coding using matrix based intra-prediction and secondary transforms

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012014461A1 (ja) * 2010-07-28 2012-02-02 パナソニック株式会社 符号化方法および復号化方法
JP2014530537A (ja) * 2011-09-12 2014-11-17 クゥアルコム・インコーポレイテッドQualcomm Incorporated ビデオ・コーディングにおける非正方形変換ユニットおよび予測ユニット
US20170094313A1 (en) * 2015-09-29 2017-03-30 Qualcomm Incorporated Non-separable secondary transform for video coding

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120046726A (ko) * 2009-08-06 2012-05-10 파나소닉 주식회사 부호화 방법, 복호 방법, 부호화 장치 및 복호 장치

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012014461A1 (ja) * 2010-07-28 2012-02-02 パナソニック株式会社 符号化方法および復号化方法
JP2014530537A (ja) * 2011-09-12 2014-11-17 クゥアルコム・インコーポレイテッドQualcomm Incorporated ビデオ・コーディングにおける非正方形変換ユニットおよび予測ユニット
US20170094313A1 (en) * 2015-09-29 2017-03-30 Qualcomm Incorporated Non-separable secondary transform for video coding

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JIANLE, CHEN ET AL.: "Algorithm Description of Joint Exploration Test Model 5 (JEM 5)", ISO/IEC JTC1/SC 29/WG11, 5TH MEETING JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG16 WP3, 11 February 2017 (2017-02-11), Geneva, CH, pages 1 - 44, XP030150648 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113906747A (zh) * 2019-06-24 2022-01-07 Kddi 株式会社 图像解码装置、图像解码方法及程序

Also Published As

Publication number Publication date
US20240089469A1 (en) 2024-03-14
JP2020109884A (ja) 2020-07-16
US11863764B2 (en) 2024-01-02
US20200053365A1 (en) 2020-02-13
US20220030254A1 (en) 2022-01-27

Similar Documents

Publication Publication Date Title
JP7223886B2 (ja) 画像復号方法
JP7260472B2 (ja) 画像フィルタ装置
WO2018116925A1 (ja) イントラ予測画像生成装置、画像復号装置、および画像符号化装置
WO2018221368A1 (ja) 動画像復号装置、及び動画像符号化装置
WO2018199001A1 (ja) 画像復号装置及び画像符号化装置
WO2018116802A1 (ja) 画像復号装置、画像符号化装置、及び画像予測装置
WO2019069950A1 (ja) 画像符号化装置及び画像復号装置
WO2018037853A1 (ja) 画像復号装置及び画像符号化装置
JP7213689B2 (ja) 画像復号装置及び画像符号化装置
WO2018070107A1 (ja) エントロピー復号装置、エントロピー符号化装置、画像復号装置および画像符号化装置
WO2019221072A1 (ja) 画像符号化装置、符号化ストリーム抽出装置及び画像復号装置
WO2018199002A1 (ja) 動画像符号化装置及び動画像復号装置
EP2804377A1 (en) Image decoding device, image encoding device, and data structure of encoded data
WO2019182159A1 (ja) 画像フィルタ装置、画像復号装置、及び画像符号化装置
JP7241153B2 (ja) 画像復号装置
WO2018216688A1 (ja) 動画像符号化装置及び動画像復号装置、フィルタ装置
WO2018159526A1 (ja) 動画像符号化装置及び動画像復号装置
WO2019065488A1 (ja) 画像復号装置および画像符号化装置
CN112204978B (zh) 图像解码装置以及图像编码装置
JP7073186B2 (ja) 画像フィルタ装置
WO2018061550A1 (ja) 画像復号装置及び画像符号化装置
WO2018173862A1 (ja) 画像復号装置及び画像符号化装置
JP2020036101A (ja) 画像復号装置および画像符号化装置
WO2018037919A1 (ja) 画像復号装置、画像符号化装置、画像復号方法、および画像符号化方法
JP2019201332A (ja) 画像符号化装置、画像復号装置、及び画像符号化システム

Legal Events

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

Ref document number: 18792312

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18792312

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP