WO2023112648A1 - 動画像復号装置および動画像符号化装置 - Google Patents

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

Info

Publication number
WO2023112648A1
WO2023112648A1 PCT/JP2022/043680 JP2022043680W WO2023112648A1 WO 2023112648 A1 WO2023112648 A1 WO 2023112648A1 JP 2022043680 W JP2022043680 W JP 2022043680W WO 2023112648 A1 WO2023112648 A1 WO 2023112648A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction
unit
separable
transform
gpm
Prior art date
Application number
PCT/JP2022/043680
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 シャープ株式会社
Publication of WO2023112648A1 publication Critical patent/WO2023112648A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • Embodiments of the present invention relate to a video decoding device and a video encoding device.
  • This application claims priority based on Japanese Patent Application No. 2021-202155 filed on December 14, 2021, the contents of which are incorporated herein.
  • a moving image encoding device that generates encoded data by encoding a moving image and a moving image that generates a decoded image by decoding the encoded data in order to efficiently transmit or record the moving image An image decoding device is used.
  • video encoding methods include H.264/AVC and HEVC (High-Efficiency Video Coding).
  • the images (pictures) that make up the video are divided into slices obtained by dividing an image, and coding tree units (CTU: Coding Tree Units) obtained by dividing a slice. ), a coding unit obtained by dividing the coding tree unit (Coding Unit: CU)), and a transform unit obtained by dividing the coding unit (TU: Transform Unit), and encoded/decoded for each CU.
  • CTU Coding Tree Units
  • a predicted image is normally generated based on a locally decoded image obtained by encoding/decoding an input image, and the predicted image is generated from the input image (original image).
  • the prediction error obtained by subtraction (sometimes called the "difference image” or “residual image”) is encoded.
  • Inter-prediction and intra-prediction are methods for generating predicted images.
  • Non-Patent Document 1 discloses a GPM (Geometric partition mode) mode in which a target block is divided into shapes other than rectangles and different inter predictions are performed for each region. By dividing the target block into non-rectangular shapes in this way, even complex textures can be predicted more accurately, and coding efficiency is improved.
  • Non-Patent Document 1 discloses an image coding apparatus that performs non-separate transform in order to further concentrate coefficients obtained by separating and transforming prediction errors in a low frequency region for each transform unit.
  • Non-Patent Document 1 a non-separable transform technique that is effective for predictive residuals with directionality is applied only to intra prediction blocks that are highly correlated with adjacent pixels and are less prone to luminance changes, and inter prediction blocks that are prone to luminance changes. There are challenges that have not been addressed in predictive blocks.
  • An object of one aspect of the present invention is to provide a moving image decoding device and a moving image encoding device that can preferably apply inverse non-separable transform even when luminance changes.
  • a video decoding device provides a video decoding device including a predicted image generating unit that generates a predicted image and an inverse non-separable transform unit that performs inverse non-separable transform.
  • the decoding device is characterized in that the non-separable transform unit does not change specific frequency components of the transform coefficients.
  • the inverse non-separable transform unit is characterized by not changing the DC component, which is the upper left component.
  • the inverse non-separable transform unit is characterized by not changing the DC component, which is the upper left component, in the case of inter prediction.
  • the inverse non-separable transformation unit is characterized by excluding the DC component, deriving a one-dimensional array, and converting it into a one-dimensional array.
  • the inverse non-separable transformation unit is characterized by using a transformation matrix in which the leftmost component and the topmost component excluding the upper left component are 0.
  • a video decoding device comprising a predicted image generating unit that generates a predicted image and an inverse non-separable transform unit that performs inverse non-separable transform, wherein the non-separable transform unit changes specific frequency components of transform coefficients. It is characterized by not letting
  • the intra prediction mode used for deriving the intra predicted image is used to select a transformation matrix for non-separable transformation and perform non-separable transformation.
  • the moving image decoding device wherein the mode using the predicted image is a CIIP mode in which the weight is derived according to the states of adjacent blocks.
  • the moving image decoding device wherein the mode using the predicted image is a geometry mode in which weights are derived from parameters derived from encoded data.
  • the intra prediction mode used for deriving the intra predicted image is used to select a transformation matrix for non-separable transformation and perform non-separable transformation.
  • encoding efficiency can be improved by performing non-separable transform suitable for inter prediction in video encoding/decoding processing.
  • FIG. 1 is a schematic diagram showing the configuration of an image transmission system according to this embodiment
  • FIG. FIG. 3 is a diagram showing the hierarchical structure of data in an encoded stream
  • 1 is a schematic diagram showing the configuration of a video decoding device
  • FIG. It is a schematic diagram which shows the structure of an inter prediction image production
  • FIG. 4 is a schematic diagram showing the configuration of an inter-prediction parameter deriving unit; 4 is a flowchart for explaining schematic operations of a video decoding device;
  • FIG. 4 is a syntax diagram illustrating coding parameters for GPM prediction;
  • FIG. 4 is a diagram for explaining GPM prediction;
  • FIG. 10 is a diagram showing the structure of a table showing the correspondence between merge_gpm_partition_idx and angleIdx and distanceIdx in GPM prediction.
  • FIG. 10 is a diagram showing the structure of a table showing the correspondence between idx and DisLut[idx] used in weighting factor derivation processing and motion vector storage processing in GPM prediction;
  • FIG. 3 is a schematic diagram showing types (mode numbers) of intra prediction modes;
  • 2 is a functional block diagram showing a configuration example of an inverse quantization/inverse transform unit;
  • FIG. It is an example of a syntax table showing non-separable conversion flags. It is an example of a syntax table showing non-separable conversion flags.
  • intra prediction mode it is a table used for transform matrix selection of non-separable transform. It is a flowchart which shows the process which switches a non-separable transform according to prediction mode.
  • FIG. 11 illustrates one configuration of the operation of an inverse non-separable transform that preserves the DC transform;
  • FIG. 11 illustrates another configuration of the operation of the inverse non-separable transform that preserves the DC transform;
  • FIG. 11 illustrates a transform that preserves the DC transform (non-separable transform);
  • FIG. 4 is a schematic diagram showing the configuration of an inter-prediction parameter encoding unit;
  • FIG. 1 is a schematic diagram showing the configuration of an image transmission system 1 according to this embodiment.
  • the image transmission system 1 is a system that transmits an encoded stream obtained by encoding a target image, decodes the transmitted encoded stream, and displays the image.
  • the image transmission system 1 includes a moving image coding device (image coding device) 11, a network 21, a moving image decoding device (image decoding device) 31, and a moving image display device (image display device) 41. .
  • An image T is input to the video encoding device 11 .
  • the network 21 transmits the encoded stream Te generated by the video encoding device 11 to the video decoding device 31.
  • the network 21 is the Internet, a Wide Area Network (WAN), a Local Area Network (LAN), or a combination thereof.
  • the network 21 is not necessarily a two-way communication network, and may be a one-way communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting.
  • the network 21 may be replaced by a storage medium such as a DVD (Digital Versatile Disc: registered trademark) or a BD (Blue-ray Disc: registered trademark) that records the encoded stream Te.
  • the video decoding device 31 decodes each of the encoded streams Te transmitted by the network 21 and generates one or more decoded decoded images Td.
  • the moving image display device 41 displays all or part of one or more decoded images Td generated by the moving image decoding device 31.
  • the moving image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
  • the form of the display includes stationary, mobile, HMD, and the like.
  • the moving image decoding device 31 has high processing power, it displays an image with high image quality, and when it has only lower processing power, it displays an image that does not require high processing power and display power. .
  • x?y:z is a ternary operator that takes y if x is true (other than 0) and z if x is false (0).
  • abs(a) is a function that returns the absolute value of a.
  • Int(a) is a function that returns the integer value of a.
  • floor(a) is a function that returns the largest integer less than or equal to a.
  • ceil(a) is a function that returns the smallest integer greater than or equal to a.
  • a/d represents the division of a by d (truncated after the decimal point).
  • FIG. 2 is a diagram showing the hierarchical structure of data in the encoded stream Te.
  • the encoded stream Te illustratively includes a sequence and a plurality of pictures that constitute the sequence.
  • (a) to (f) of FIG. 2 respectively show a coded video sequence that defines a sequence SEQ, a coded picture that defines a picture PICT, a coded slice that defines a slice S, and a coded slice that defines slice data.
  • FIG. 3 is a diagram showing data, a coding tree unit included in the coded slice data, and a coding unit included in the coding tree unit;
  • the encoded video sequence defines a set of data that the video decoding device 31 refers to in order to decode the sequence SEQ to be processed.
  • Sequence SEQ as shown in Figure 2, consists of Video Parameter Set, Sequence Parameter Set SPS, Picture Parameter Set PPS, Adaptation Parameter Set (APS), Picture PICT, and Supplemental Enhancement Information (SEI).
  • a video parameter set VPS is a set of coding parameters common to multiple video images, multiple layers included in the video image, and coding parameters related to individual layers. Sets are defined.
  • the sequence parameter set SPS defines a set of coding parameters that the video 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.
  • the picture parameter set PPS defines a set of coding parameters that the video decoding device 31 refers to in order to decode each picture in the target sequence. For example, it includes a quantization width reference value (pic_init_qp_minus26) used for picture decoding and a flag (weighted_pred_flag) indicating application of weighted prediction.
  • a plurality of PPSs may exist. In that case, one of a plurality of PPSs is selected from each picture in the target sequence.
  • the encoded picture defines a set of data that the video decoding device 31 refers to in order to decode the picture PICT to be processed.
  • a picture PICT includes slices 0 to NS-1 (NS is the total number of slices included in the picture PICT), as shown in FIG.
  • the encoded slice defines a set of data that the video decoding device 31 refers to in order to decode the slice S to be processed.
  • a slice includes a slice header and slice data, as shown in FIG.
  • the slice header contains a group of coding parameters that the video decoding device 31 refers to in order to determine the decoding method for the target slice.
  • Slice type designation information (slice_type) that designates a slice type is an example of a coding parameter included in a slice header.
  • Slice types that can be specified by the slice type specifying information include (1) I slices that use only intra prediction during encoding, (2) P slices that use unidirectional prediction or intra prediction during encoding, (3) B slices using uni-prediction, bi-prediction, or intra-prediction during encoding.
  • inter prediction is not limited to uni-prediction and bi-prediction, and a predicted image may be generated using more reference pictures.
  • P and B slices they refer to slices containing blocks for which inter prediction can be used.
  • the slice header may contain a reference (pic_parameter_set_id) to the picture parameter set PPS.
  • the encoded slice data defines a set of data that the video decoding device 31 refers to in order to decode slice data to be processed.
  • the slice data includes CTU, as shown in FIG. 2(d).
  • a CTU is a block of a fixed size (for example, 64x64) that forms a slice, and is also called a maximum coding unit (LCU).
  • FIG. 2 defines a set of data that the video decoding device 31 refers to in order to decode the CTU to be processed.
  • CTU uses recursive quad tree partitioning (QT (Quad Tree) partitioning), binary tree partitioning (BT (Binary Tree) partitioning), or ternary tree partitioning (TT (Ternary Tree) partitioning) to perform coding processing. It is divided into coding units CU, which are basic units. BT partitioning and TT partitioning are collectively called multi-tree partitioning (MT (Multi Tree) partitioning).
  • MT Multi Tree partitioning
  • a node of a tree structure obtained by recursive quadtree partitioning is called a coding node.
  • Intermediate nodes of quadtrees, binary trees, and ternary trees are coding nodes, and the CTU itself is defined as a top-level coding node. Also, the lowest coding node is defined as a coding unit.
  • FIG. 2 defines a set of data that the video decoding device 31 refers to in order to decode the encoding unit to be processed.
  • a CU is composed of a CU header CUH, prediction parameters, transform parameters, quantized transform coefficients, and the like.
  • a prediction mode and the like are defined in the CU header.
  • Prediction processing may be performed in units of CUs or in units of sub-CUs, which are subdivided into CUs. If the CU and sub-CU sizes are equal, there is one sub-CU in the CU. If the CU is larger than the sub-CU size, the CU is split into sub-CUs. For example, if the CU is 8x8 and the sub-CU is 4x4, the CU is divided into 4 sub-CUs consisting of 2 horizontal divisions and 2 vertical divisions.
  • prediction mode The types of prediction (prediction mode) are intra prediction (MODE_INTRA), inter prediction (MODE_INTER), and intra block copy (MODE_IBC). Intra prediction is prediction within the same picture, and inter prediction is prediction processing performed between different pictures (for example, between display times, between layer images).
  • the transform/quantization process is performed in CU units, but the quantized transform coefficients may be entropy coded in subblock units such as 4x4.
  • prediction parameter A predicted image is derived from the prediction parameters associated with the block.
  • the prediction parameters include prediction parameters for intra prediction and inter prediction.
  • the inter prediction parameters are composed of prediction list usage flags predFlagL0 and predFlagL1, reference picture indices refIdxL0 and refIdxL1, and motion vectors mvL0 and mvL1.
  • predFlagL0 and predFlagL1 are flags indicating whether or not reference picture lists (L0 list, L1 list) are used, and when the value is 1, the corresponding reference picture list is used.
  • flag when the term "flag indicating whether or not it is XX" is used, when the flag is other than 0 (for example, 1), it is XX, and 0 is not XX. Treat 1 as true and 0 as false (same below). However, in actual devices and methods, other values can be used as true and false values.
  • inter prediction parameters include, for example, merge flag merge_flag (general_merge_flag), merge index merge_idx, merge_subblock_flag and regulare_merge_flag indicating whether to use subblock unit inter prediction, intra inter flag ciip_flag, GPM mode ( GPM_flag (hereinafter also called MergeGpmFlag) indicating whether to use geometric partitioning merge mode), merge_gpm_partition_idx indicating the partition shape of GPM mode, merge_gpm_idx0, merge_gpm_idx1 indicating the merge index of GPM, inter prediction for selecting reference pictures used in AMVP mode There are an identifier inter_pred_idc, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx for deriving a motion vector, a difference vector mvdLX, a motion vector accuracy mode amvr_mode, and a ciip_f
  • a reference picture list is a list of reference pictures stored in the reference picture memory 306 .
  • LX is a description method used when L0 prediction and L1 prediction are not distinguished, and hereinafter, parameters for the L0 list and parameters for the L1 list are distinguished by replacing LX with L0 and L1.
  • merge prediction and AMVP prediction There are merge prediction (merge) mode (merge mode) and AMVP (Advanced Motion Vector Prediction, Adaptive Motion Vector Prediction) mode for the prediction parameter decoding (encoding) method, and merge_flag is a flag to identify these.
  • the merge mode is a prediction mode that omits part or all of the motion vector difference, and predicts already processed neighboring blocks without including the prediction list usage flag predFlagLX, the reference picture index refIdxLX, and the motion vector mvLX in the encoded data. This mode is derived from parameters and the like.
  • AMVP mode is a mode in which inter_pred_idc, refIdxLX, and mvLX are included in encoded data.
  • mvLX is encoded as mvp_LX_idx that identifies the prediction vector mvpLX and the difference vector mvdLX.
  • general merge mode the generic name of the prediction mode which abbreviate
  • general_merge_flag the generic name of the prediction mode which abbreviate
  • regular_merge_flag may be transmitted, and if regular_merge_flag is 1, normal merge mode or MMVD may be selected, otherwise CIIP mode or GPM mode may be selected.
  • inter_pred_idc is a value that indicates the type and number of reference pictures, and takes one of PRED_L0, PRED_L1, and PRED_BI.
  • PRED_L0 and PRED_L1 indicate uni-prediction using one reference picture managed by the L0 list and L1 list, respectively.
  • PRED_BI indicates bi-prediction using two reference pictures managed by the L0 list and L1 list.
  • merge_idx is an index that indicates which prediction parameter is to be used as the prediction parameter for the target block among the prediction parameter candidates (merge candidates) derived from the blocks for which processing has been completed.
  • (motion vector) mvLX indicates the amount of shift between blocks on two different pictures.
  • a prediction vector and a difference vector for mvLX are called mvpLX and mvdLX, respectively.
  • inter_pred_idc Inter prediction identifier inter_pred_idc and prediction list usage flag predFlagLX
  • inter_pred_idc The relationships between inter_pred_idc, predFlagL0, and predFlagL1 are as follows, and can be mutually converted.
  • the inter-prediction parameter may use a prediction list usage flag or an inter-prediction identifier. Also, the judgment using the prediction list usage flag may be replaced with the judgment using the inter-prediction identifier. Conversely, the determination using the inter-prediction identifier may be replaced with the determination using the prediction list usage flag.
  • the bi-prediction flag biPred can be derived depending on whether the two prediction list usage flags are both 1.
  • biPred can also be derived depending on whether the inter-prediction identifier is a value that indicates the use of two prediction lists (reference pictures).
  • the video decoding device 31 includes an entropy decoding unit 301, a 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, an inverse It includes a quantization/inverse transformation unit 311 , an addition unit 312 and a prediction parameter derivation unit 320 .
  • the moving image decoding device 31 may have a configuration in which the loop filter 305 is not included in accordance with the moving image encoding device 11 described later.
  • the parameter decoding unit 302 further includes a header decoding unit 3020, a CT information decoding unit 3021, and a CU decoding unit 3022 (prediction mode decoding unit), and the CU decoding unit 3022 further includes a TU decoding unit 3024. These may be collectively called a decoding module.
  • Header decoding section 3020 decodes parameter set information such as VPS, SPS, PPS, and APS, and slice headers (slice information) from encoded data.
  • CT information decoding section 3021 decodes CT from encoded data.
  • a CU decoding unit 3022 decodes a CU from encoded data.
  • TU decoding section 3024 decodes QP update information (quantization correction value) and quantization prediction error (residual_coding) from encoded data when prediction error is included in TU.
  • the header decoding unit 3020 decodes the flag sps_lfnst_enabled_flag indicating whether or not to use the non-separate transform from the SPS. Also, when the sps_lfnst_enabled_flag is 1, the header decoding unit 3020 decodes the ph_lfnst_enabled_flag from the picture header (PH). Infer ph_lfnst_enabled_flag to 0 if ph_lfnst_enabled_flag does not appear.
  • the value of sps_lfnst_enabled_flag may be set as the value of ph_lfnst_enabled_flag.
  • the GPM non-separable transform in one aspect of the present invention is the name of the inverse non-separable transform (and non-separable transform) for inter prediction in GPM mode.
  • a method of deriving a non-separable transformation matrix or a set of transformation matrices from a GPM partitioned shape will be described below.
  • sps_gpm_enabled_flag is notified by SPS and indicates whether the GPM prediction mode is used in the target sequence.
  • SPS sps_max_num_merge_cand_minus_max_num_gpm_cand is notified.
  • sps_max_num_merge_cand_minus_max_num_gpm_cand is a parameter used to derive the maximum number of merge candidates for GPM prediction, MaxNumGpmMergeCand. When MaxNumGpmMergeCand is 0, GPM prediction is disabled.
  • the header decoding unit 3020 decodes the flag sps_gpm_lfnst_enabled_flag from the SPS.
  • sps_gpm_lfnst_enabled_flag is a flag indicating whether or not non-separable transform (hereinafter referred to as GPM non-separable transform) is used for GPM prediction.
  • GPM non-separable transform non-separable transform
  • the TU decoding unit 3024 decodes the parameter lfnst_idx indicating whether non-separable transform is used and the transform basis from the encoded data. Specifically, the TU decoding unit 3024 decodes lfnst_idx when the width and height of the CU are 4 or more and the prediction mode is the intra prediction mode. When lfnst_idx is 0, it indicates that non-separable transformation is not applied, when it is 1, it indicates one of the transformation matrices (transformation basis) set (pair) of non-separable transformation, and when it is 2, it indicates the above The transformation matrix of the other of the pair is shown.
  • the predicted image generation unit 308 includes an inter predicted image generation unit 309 (FIG. 4) and an intra predicted image generation unit 310.
  • the prediction parameter derivation unit 320 includes an inter prediction parameter derivation unit 303 (Fig. 5) and an intra prediction parameter derivation unit.
  • CTU and CU as processing units
  • processing may be performed in sub-CU units.
  • CTU and CU may be read as blocks
  • sub-CU may be read as sub-blocks
  • processing may be performed in units of blocks or sub-blocks.
  • the entropy decoding unit 301 performs entropy decoding on the encoded stream Te input from the outside to decode individual codes (syntax elements).
  • syntax elements For entropy coding, a method of variable-length coding syntax elements using a context (probability model) adaptively selected according to the type of syntax elements and surrounding circumstances, a predetermined table, or There is a method of variable-length coding syntax elements using a formula.
  • the entropy decoding unit 301 outputs the decoded code to the parameter decoding unit 302.
  • the decoded codes are, for example, prediction modes predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX, amvr_mode, and the like. Control of which code is to be decoded is performed based on an instruction from parameter decoding section 302 .
  • FIG. 6 is a flow chart for explaining a schematic operation of the video decoding device 31. As shown in FIG.
  • the header decoding unit 3020 decodes parameter set information such as VPS, SPS, and PPS from the encoded data.
  • the header decoding unit 3020 decodes the slice header (slice information) from the encoded data.
  • the video decoding device 31 derives a decoded image of each CTU by repeating the processing from S1300 to S5000 for each CTU included in the target picture.
  • the CT information decoding unit 3021 decodes the CTU from the encoded data.
  • the CT information decoding unit 3021 decodes the CT from the encoded data.
  • the CU decoding unit 3022 performs S1510 and S1520 to decode the CU from the encoded data.
  • the CU decoding unit 3022 decodes CU information, prediction information, TU division flags, CU residual flags, etc. from the encoded data.
  • the TU decoding unit 3024 decodes the quantized prediction error, transform index lfnst_idx, etc. from the encoded data when the TU contains a prediction error.
  • the predicted image generation unit 308 generates a predicted image based on the prediction information for each block included in the target CU.
  • the inverse quantization/inverse transform unit 311 executes inverse quantization/inverse transform processing for each TU included in the target CU.
  • the addition unit 312 adds the predicted image supplied from the predicted image generation unit 308 and the prediction error supplied from the inverse quantization/inverse transform unit 311, thereby decoding the target CU. Generate an image.
  • the loop filter 305 generates a decoded image by applying loop filters such as deblocking filter, SAO, and ALF to the decoded image.
  • loop filters such as deblocking filter, SAO, and ALF
  • a loop filter 305 is a filter provided in the encoding loop, and is a filter that removes block distortion and ringing distortion and improves image quality.
  • a 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 addition 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 addition unit 312 .
  • the reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 in a predetermined position for each target picture and target CU.
  • the prediction parameter memory 307 stores prediction parameters in predetermined positions for each CTU or CU to be decoded. Specifically, the prediction parameter memory 307 stores the parameters decoded by the parameter decoding unit 302, the prediction mode predMode separated by the entropy decoding unit 301, and the like.
  • a prediction mode predMode, prediction parameters, etc. are input to the prediction image generation unit 308 .
  • the predicted image generation unit 308 reads a reference picture from the reference picture memory 306 .
  • the predicted image generating unit 308 generates a predicted image of a block or sub-block using the prediction parameter and the read reference picture (reference picture block) in the prediction mode indicated by the prediction mode predMode.
  • a reference picture block is a set of pixels on a reference picture (usually rectangular and therefore called a block), and is an area referred to for generating a prediction image.
  • inter prediction parameter derivation section 303 derives inter prediction parameters by referring to prediction parameters stored in prediction parameter memory 307 based on syntax elements input from parameter decoding section 302. . Also, inter prediction parameters are output to inter prediction image generation section 309 and prediction parameter memory 307 .
  • the inter-prediction parameter derivation unit 303 and its internal elements, the AMVP prediction parameter derivation unit 3032, the merge prediction parameter derivation unit 3036, the GPM prediction unit 30377, and the MV addition unit 3038, are common to the video encoding device and the video decoding device. Since these are means for deriving motion vectors, they may be collectively referred to as motion vector derivation units (motion vector derivation devices).
  • merge_idx is derived and output to the merge prediction parameter derivation unit 3036.
  • the AMVP prediction parameter derivation unit 3032 derives mvpLX from inter_pred_idc, refIdxLX or mvp_LX_idx.
  • GPM_flag 1, that is, it indicates that the target block is encoded in GPM prediction mode
  • the GPM prediction unit 30377 derives parameters for GPM prediction. Derivation of GPM_flag will be described later.
  • the MV adder 3038 adds the derived mvpLX and mvdLX to derive mvLX.
  • the merge prediction parameter derivation unit 3036 includes a merge candidate derivation unit 30361 and a merge candidate selection unit 30362 .
  • the merge candidates are configured including prediction parameters (predFlagLX, mvLX, refIdxLX) and stored in the merge candidate list.
  • the merge candidates stored in the merge candidate list are assigned indices according to a predetermined rule.
  • the merge candidate derivation unit 30361 derives merge candidates using the motion vectors and refIdxLX of the decoded adjacent blocks as they are.
  • the merge candidate derivation unit 30361 may apply spatial merge candidate derivation processing, temporal merge candidate derivation processing, etc., which will be described later.
  • the merge candidate derivation unit 30361 reads prediction parameters stored in the prediction parameter memory 307 according to a predetermined rule, and sets them as merge candidates. For example, read the prediction parameters at the positions A1, B1, B0, A0, and B2 below.
  • the merge candidate derivation unit 30361 reads the prediction parameters of the block C in the reference image including the lower right CBR of the target block or the center coordinates from the prediction parameter memory 307 and uses them as merge candidates Col, Store in merge candidate list mergeCandList[].
  • mergeCandList[] The order of storing in mergeCandList[] is, for example, spatial merge candidate (B1, A1, B0, A0, B2), temporal merge candidate Col. Note that reference blocks that are not available (blocks are intra-predicted, etc.) are not stored in the merge candidate list.
  • the merge candidate selection unit 30362 selects a merge candidate N indicated by merge_idx from among the merge candidates included in the merge candidate list using the following formula.
  • N mergeCandList[merge_idx]
  • N is a label indicating a merge candidate, such as A1, B1, B0, A0, B2, Col.
  • the motion information of the merge candidate indicated by label N is indicated by (mvLXN[0], mvLXN[1]), predFlagLXN, and refIdxLXN.
  • the merge candidate selection unit 30362 stores the inter prediction parameter of the selected merge candidate in the prediction parameter memory 307 and outputs it to the inter prediction image generation unit 309 .
  • FIG. 8(a) shows an example of a straight line segment.
  • a straight line segment spanning the target CU is defined by an angle index angleIdx (angle variable) and a distance index distanceIdx (distance variable) shown in FIG. 8(b).
  • angleIdx indicates the angle ⁇ between a vertical straight line and the straight line segment.
  • distanceIdx indicates the distance ⁇ from the center of the target CU to the straight line segment.
  • angleIdx is an integer value assigned to the angle of a straight line segment. For example, when 360 degrees are roughly divided into 32, the values shown in FIG. 8(c) are assigned. It should be noted that 360 degrees may be divided into 64, and a finer angle index may be sent.
  • GPM prediction In the predicted image generation of GPM prediction, two "rectangular" predicted images (temporary predicted images) containing non-rectangular prediction units are derived, and the above two rectangular regions are weighted according to the shape of the prediction unit. can be derived by
  • the motion compensation unit 3091 derives two temporary predicted images of the target CU, and the GPM synthesizing unit 30952 weights each pixel of the two temporary predicted images according to the position of the pixel to generate a predicted image. to derive This processing is called GPM synthesis processing. Processing other than prediction (eg transform (inverse transform) and quantization (inverse quantization)) is applied to the entire target CU.
  • prediction eg transform (inverse transform) and quantization (inverse quantization)
  • the GPM prediction unit 30377 derives prediction parameters for the two non-rectangular regions and supplies them to the inter prediction image generation unit 309.
  • GPM prediction may be configured without bi-prediction for simplification of processing.
  • inter-prediction parameters for unidirectional prediction are derived for non-rectangular regions.
  • FIG. 7 is a diagram showing the syntax configuration notified by merge_data().
  • the parameter decoding unit 302 decodes syntax elements in the encoded data, and the GPM prediction unit 30377 (inter prediction parameter derivation unit 303) derives GPM prediction parameters.
  • the parameter decoding unit 302 decodes GPM prediction syntax elements merge_gpm_partition_idx, merge_gpm_idx0, and merge_gpm_idx1. Alternatively, you can decrypt merge_gpm_partition_idx and merge_gpm_idx0, and if MaxNumGpmMergeCand>2, decrypt merge_gpm_idx1.
  • merge_gpm_partition_idx is an index (partition index) indicating a partition pattern in GPM prediction mode. The partition index indicates a combination of angleIdx and distanceIdx that specify a straight line segment across the target block for dividing the target block into two regions.
  • Merge candidates are used as the motion information used to generate predicted images for GPM prediction.
  • merge_gpm_idx0 and merge_gpm_idx1 are indices of merge candidates indicating motion information of two regions respectively.
  • the GPM prediction unit 30377 outputs the derived parameters to the GPM synthesis unit 30952.
  • the GPM prediction unit 30377 derives merge indices m and n from syntax elements merge_gpm_idx0 and merge_gpm_idx1 indicating motion information for two non-rectangular regions as follows.
  • merge candidate indicated by merge index m is indicated as M
  • merge candidate indicated by merge index n is indicated as N.
  • the merge prediction parameter derivation unit 3036 derives motion information (mvLXM, mvLXN, refIdxLXM, refIdxLXN, predFlagLXM, predFlagLXN, mergeCandList, etc.) of merge candidates M and N by the method described in (merge prediction).
  • the GPM prediction unit 30377 sets motion vectors mvA and mvB of merge_gpm_idx0 and merge_gpm_idx1, reference indices refIdxA and refIdxB, and prediction list flags predListFlagA and predListFlagB as follows using these motion information.
  • the GPM prediction unit 30377 sets the lower 1 bit of m to X (m & 0x01). Note that when predFlagLXM is 0, the GPM prediction unit 30377 sets X to (1-X).
  • the GPM prediction unit 30377 sets the lower 1 bit of n to X (n & 0x01). Note that when predFlagLXN is 0, the GPM prediction unit 30377 sets X to (1-X).
  • the GPM prediction unit 30377 derives angleIdx and distanceIdx corresponding to merge_gpm_partition_idx according to the table shown in FIG.
  • the GPM prediction unit 30377 converts motion vectors (mvA, mvB) of non-rectangular areas A and B and reference picture information (predFlagA, prefFlagB, refIdxLA, refIdxLB) into 4x4 Store in memory in sub-block units.
  • numSbX and numSbY are the number of 4x4 sub-blocks in the horizontal and vertical directions of the target block, respectively.
  • the GPM predictor 30377 derives the variables displacementX, displacementY, isFlip and shiftHor as follows.
  • the GPM predictor 30377 derives offsetX and offsetY as follows.
  • the GPM prediction unit 30377 uses disLut shown in FIG. 9 to calculate motionIdx as follows.
  • predListFlagA+predListFlagB is not 1 means that the reference picture lists of A and B are the same.
  • predListFlagA+predListFlagB 1 means that the reference picture lists of A and B are different.
  • the GPM prediction unit 30377 stores the motion vector of A in L0 and the motion vector of B in L1 to perform bidirectional prediction.
  • the GPM prediction unit 30377 stores the motion vector of B in L0 and the motion vector of A in L1 to perform bidirectional prediction.
  • inter prediction image generation unit 309 When predMode indicates an inter prediction mode, the inter prediction image generation unit 309 generates a prediction image of a block or sub-block by inter prediction using the inter prediction parameters and reference pictures input from the inter prediction parameter derivation unit 303.
  • FIG. 4 is a schematic diagram showing the configuration of the inter predicted image generation unit 309 included in the predicted image generation unit 308 according to this embodiment.
  • the inter predicted image generation unit 309 includes a motion compensation unit (predicted image generation device) 3091 and a synthesizing unit 3095 .
  • the synthesizing section 3095 includes an IntraInter synthesizing section 30951 , a GPM synthesizing section 30952 , a BIO section 30954 and a weight predicting section 3094 .
  • the predicted image derived by the intra predicted image generating unit 310 is used for predicted image generation by the intrainter synthesizing unit 30951 and the GPM synthesizing unit 30952 .
  • the motion compensation unit 3091 (interpolated image generation unit 3091) performs interpolation by reading reference blocks from the reference picture memory 306 based on the inter prediction parameters (predFlagLX, refIdxLX, mvLX) input from the inter prediction parameter derivation unit 303. Generate an image (motion compensated image).
  • the reference block is a block on the reference picture RefPicLX specified by refIdxLX, which is shifted by mvLX from the position of the target block.
  • refIdxLX refIdxLX
  • mvLX motion compensation filter
  • the motion compensation unit 3091 first derives the integer position (xInt, yInt) and phase (xFrac, yFrac) corresponding to the intra-prediction block coordinates (x, y) using the following equations.
  • the motion compensation unit 3091 derives a temporary image temp[][] by performing horizontal interpolation processing on the reference picture refImg using an interpolation filter.
  • shift1 is a normalization parameter that adjusts the range of values
  • offset1 1 ⁇ (shift1-1).
  • temp[x][y] ( ⁇ mcFilter[xFrac][k]*refImg[xInt+k-NTAP/2+1][yInt]+offset1)>>shift1
  • the motion compensation unit 3091 derives an interpolated image Pred[][] by subjecting the temporary image temp[][] to vertical interpolation processing.
  • shift2 is a normalization parameter that adjusts the range of values
  • offset2 1 ⁇ (shift2-1).
  • Pred[x][y] ( ⁇ mcFilter[yFrac][k]*temp[x][y+k-NTAP/2+1]+offset2)>>shift2
  • Pred[][] is the L0 list
  • interpolated images PredL0[][] and PredL1[][] are derived for each L1 list
  • PredL0[][] and PredL1[][] Generate an interpolated image Pred[][] from
  • the GPM synthesizing unit 30952 derives a predicted image using the temporary predicted images predSamplesLA and predSamplesLB and the weight parameter derived from the angle variable.
  • the GPM synthesizing unit 30952 derives variables nW, nH, shift1, offset1, displacementX, displacementY, partFlip and shiftHor as follows.
  • the GPM synthesizing unit 30952 derives offsetX and offsetY as follows.
  • the GPM synthesizing unit 30952 derives generalized coordinates (xL, yL) from the coordinates (x, y) in the CU.
  • the GPM synthesizing unit 30952 uses the disLut shown in FIG. 9(b) to calculate the weighting factor wValue according to the coordinates in the CU as follows.
  • the GPM synthesizing unit 30952 derives the value of pbSample as follows.
  • the GPM synthesizing unit 30952 may generate a predicted image by weighted sum of the intra predicted image and the inter predicted image. That is, one of predSamplesLA and predSamplesLB may be an intra-predicted image predSamplesIntra, and the other may be an inter-predicted image predSamplesInter.
  • pbSamples[x][y] Clip3(0, (1 ⁇ BitDepth) - 1, (predSamplesIntra[x][y] * wValue + predSamplesIner[x][y] * (8 - wValue) + offset1) >> shift1)
  • the CU decoding unit 3022 decodes merge_gpm_intra_flag from the encoded data, and if merge_gpm_intra_flag is true, then IntraPredMode may be decrypted.
  • the configuration may be such that intra prediction is allowed for both of the two predicted images.
  • the CU decoding unit 3022 decodes merge_gpm_intra_flag0 and merge_gpm_intra_flag1.
  • merge_gpm_intra_flag0 and merge_gpm_intra_flag1 are flags indicating whether or not each predicted image predSamplesLA and predSamplesLB is derived by intra prediction.
  • IntraInter synthesizing unit 30951 When ciip_mode is 1, the IntraInter synthesizing unit 30951 generates a predicted image in CIIP mode. For example, a predicted image predSamplesComb[x][y] is generated by a weighted sum of the inter predicted image and the intra predicted image.
  • predSamplesComb[x][y] (wIntra * predSamplesIntra[x][y] +(4 - wIntra)*predSamplesInter[x][y] + 2)>> 2
  • predSamplesIntra[x][y] is an intra prediction image, which may be planar prediction.
  • predSamplesInter[x][y] is an inter-predicted image.
  • the IntraInter synthesizing unit 30951 may derive the weight wIntra of the intra-predicted image according to the prediction modes of the left-neighboring block and the upper-neighboring block of the current block.
  • the IntraInter synthesis unit 30951 may derive wIntra according to the intra-prediction mode of the target block and the position of the pixel within the target block.
  • nTbW ⁇ 4
  • BIO unit 30954 refers to two predicted images (first predicted image and second predicted image) and a gradient correction term to generate a predicted image in the bi-prediction mode.
  • the weight prediction unit 3094 generates a block prediction image by multiplying the interpolation image PredLX by a weighting factor.
  • the inter predicted image generation unit 309 outputs the generated block predicted image to the addition unit 312 .
  • the intra prediction image generation unit performs intra prediction using the intra prediction parameters input from the intra prediction parameter derivation unit and the reference pixels read from the reference picture memory 306 .
  • the inverse quantization/inverse transform unit 311 inversely quantizes the quantized transform coefficients input from the parameter decoding unit 302 to obtain transform coefficients.
  • FIG. 11 is a block diagram showing the configuration of the inverse quantization/inverse transform unit 311 of this embodiment.
  • the inverse quantization/inverse transform unit 311 is composed of a scaling unit 31111 , an inverse non-separable transform unit 31121 , and an inverse separable transform unit 31123 .
  • the inverse quantization/inverse transform unit 311 scales (inverse quantizes) the quantized transform coefficients qd[][] input from the entropy decoding unit 301 by the scaling unit 31111 to obtain transform coefficients d[][].
  • This quantized transform coefficient qd[][] is quantized by transforming the prediction error, such as DCT (Discrete Cosine Transform) or DST (Discrete Sine Transform), in the encoding process. or the coefficients obtained by further non-separating transformation of the transformed coefficients.
  • inverse frequency transform such as inverse DCT and inverse DST is performed on the transform coefficients to calculate prediction errors.
  • Inverse quantization/inverse transform section 311 outputs the prediction error to addition section 312 .
  • transformation and inverse transformation may be interpreted by replacing each other.
  • the transform may be called a forward transform.
  • the non-separable transform may be called the forward non-separable transform.
  • separate transformations are simply referred to as transformations.
  • the scaling section 31111 uses the quantization parameter and the scaling factor derived in the parameter decoding section 302 to scale the transform coefficients decoded by the TU decoding section using the weight for each coefficient.
  • the scaled transform coefficients d[x][y] are transmitted to the inverse separable transform unit 31123 or the inverse non-separable transform unit 31121.
  • the inverse non-separable transform unit 31121 applies an inverse non-separable transform to the transform coefficients d[][] after the inverse quantization and before the separable transform.
  • the inverse non-separable transform is applied to the transform coefficients of part or all of the TU in the video decoding device 31 .
  • an inverse separable transform (such as DCT2 and DST7) is applied to the transform coefficients after the inverse non-separable transform.
  • the non-separable transform and the inverse non-separable transform are applied only to a predetermined upper left sub-block.
  • TU sizes where one of TU width W and height H is 4 are, for example, 4 ⁇ 4, 8 ⁇ 4, 4 ⁇ 8, L ⁇ 4, and 4 ⁇ L (L is a natural number of 16 or more). is mentioned.
  • RST Reduced Secondary Transform
  • LFNST Low Frequency Non-Separable-Transform
  • the number nonZeroSize of the transform coefficients of the non-separable transform to be transmitted is equal to or smaller than the size of the separable transform ((1 ⁇ log2StSize)x(1 ⁇ log2StSize))
  • GPM non-separable transform or GPM_LFNST
  • the processing of the inverse non-separable transformation will be described below in order.
  • FIG. 12 shows an example of CU reporting lfnst_idx and mtx_idx
  • FIG. 13 shows an example of TU reporting lfnst_idx and mtx_idx.
  • lfnst_idx is an index indicating whether non-separable transform is used and a transform matrix
  • mts_idx is an index indicating a transform matrix for separable transform.
  • the TU decoding unit 3024 decodes lfnst_idx and mts_idx from the encoded data.
  • TU decoding section 3024 decodes lfnst_idx according to the determination shown in the following syntax table, as shown in the figure. if(condA && (condB
  • condA, condB, and condC are derived by the following formulas.
  • condB includes intra prediction in the determination formula.
  • the TU decoding unit 3024 may decode lfnst_idx from encoded data in the case of intra prediction, GPM mode, or CIIP mode.
  • the TU decoding unit 3024 may derive the value of ApplyLfnstFlag using lfnst_idx for intra prediction and without using lfnst_idx for non-intra prediction.
  • the inverse non-separable transform unit 31121 derives lfnstTrSetId from the intra prediction mode IntraPredMode.
  • the prediction mode is GPM prediction
  • lfnstTrSetId is derived from GPM angle index angleIdx (or GPM mode number merge_gpm_partition_idx).
  • lfnstTrSetId is a number indicating a set of transformation matrices for non-separable transformation.
  • FIG. 14 is a table used for non-separable transform matrices in intra prediction mode.
  • the inverse non-separable transform unit 31121 may derive a non-separable transform matrix, here a transform matrix set number (lfnstTrSetId), from the intra prediction mode IntraPredMode using the table in FIG.
  • lfnstTrSetId may be derived using the lookup table nstSetTableIntra as follows.
  • a plurality of predetermined transformation matrices can be used for the non-separation transformation, and suitable transformation can be achieved by selecting an appropriate transformation matrix from intra prediction mode or GPM mode.
  • the inverse non-separable transformation unit 31121 may derive nonZeroSize as follows.
  • nonZeroSize is not limited to 8 and 16.
  • 12, 32, etc. may be used.
  • nStOutSize is not limited to 16 and 64, but may be 32, 48, 64, 96, and so on.
  • xC and yC are positions on the TU, and are derived from the array DiagScanOrder indicating the scan order and the position x of the array u[].
  • xC (xSbIdx ⁇ log2StSize) + DiagScanOrder[log2StSize][log2StSize][x][0]
  • xC DiagScanOrder[log2StSize][log2StSize][x][0]
  • the range copied to the one-dimensional array is called an area RU.
  • the inverse non-separable transform unit 31121 transforms u[] of length nonZeroSize using the transform matrix secTransMatrix[][], and outputs coefficient v[] of a one-dimensional array of length nStOutSize.
  • transposition processing is performed according to the symmetry used in deriving the transformation matrix. Whether or not transposition processing is performed is determined by a coefficient transposition processing flag transposeFlag.
  • PredModeIntra is the prediction direction shown in FIG.
  • FIG. 15 is a flowchart showing processing for switching non-separable transforms according to prediction modes.
  • S2230 transition to S2231 or S2232. It is preferable to transition to S2231 in a prediction mode with a large number of transform coefficients such as intra prediction, and to transition to S2232 in inter prediction with a small number of transform coefficients. Also, in inter prediction using pixels other than pixels adjacent to the target block as reference pixels, the correlation between the DC component and the AC component is low. In such a case, the process may transition to S2232, and in other cases, the process may transition to S2231. For example, as shown in the figure, in the case of intra prediction, the process may transition to S2231, and in other cases, the process may transition to S2232.
  • intra prediction mode or CIIP mode it may change to S2231, and in other cases, it may change to S2232.
  • the process may transition to S2231 in the case of GPM using intra prediction mode, CIIP mode, or intra prediction, and transition to S2232 in other cases.
  • the inverse non-separable transform unit 31121 performs non-separable transform on transform coefficients containing specific frequency components (DC components).
  • the inverse non-separable transform unit 31121 performs non-separable transform on the transform coefficients so as to "preserve” the specific frequency component (DC component).
  • “save” means not to change the value. However, even when the polarity is reversed, it may be included in “save”.
  • non-separating transform may be performed on transform coefficients excluding specific frequency components (DC components).
  • a non-separable transform may be performed on transform coefficients containing a specific frequency component (DC component), but a transform matrix that does not change the DC component may be used.
  • the non-separable transform unit 31121 is characterized by not changing specific frequency components of transform coefficients.
  • the inverse non-separable transform unit 31121 may be configured so as not to change the DC component, which is the upper left component, when the prediction mode of the target block is inter prediction.
  • non-zero transform coefficients are concentrated at a specific frequency (for example, DC component) in frequency transforms such as DCT2 and DST7 such as inter-prediction, and even when the number of non-zero coefficients is small, the effect of non-separate transform can be obtained, and there is an effect of improving the coding efficiency. That is, it is possible to prevent non-zero transform coefficients concentrated at a specific frequency from being distributed to coefficients other than the specific frequency by non-separating transform (reversely reducing the degree of concentration). In intra prediction, which predicts from adjacent pixels near the target block, there is a correlation between the DC coefficient residual and the AC coefficient residual, and non-separable transform between the DC and AC coefficients is effective. .
  • a specific frequency for example, DC component
  • the inverse non-separable transform unit 31121 may use a transform matrix in which the leftmost component and the topmost component excluding the upper left component are 0 (configuration 3). According to the following configuration, the correlation of DC coefficients is not used in the case of prediction from pixels at different times or when the correlation between DC coefficient residuals and AC coefficient residuals is indeterminate. A non-separable transform that preserves the DC component has the effect of improving coding efficiency.
  • FIG. 16 is a diagram showing one configuration of the operation of the inverse non-separable transform that preserves the DC transform.
  • the inverse non-separable transform unit 31121 performs inverse non-separable transform processing for components other than the DC component by changing S2202 and S2204 out of S2201 to S2204 already described.
  • xC and yC are positions on the TU, and are derived from the array DiagScanOrder indicating the scan order and the position x of the array u[].
  • xC (xSbIdx ⁇ log2StSize) + DiagScanOrder[log2StSize][log2StSize][x][0]
  • xC DiagScanOrder[log2StSize][log2StSize][x][0]
  • FIG. 17 is a diagram showing another configuration of the operation of the inverse non-separable transform that preserves the DC transform.
  • the inverse non-separable transform unit 31121 performs inverse non-separable transform processing for components other than the DC component by changing S2203 out of S2201 to S2204 already described.
  • FIG. 18 is a diagram showing a conversion that preserves the DC conversion.
  • the inverse non-separable transform unit 31121 performs inverse non-separable transform for preserving the DC value by setting secTransMatrixDC having a predetermined characteristic as the matrix used in S2203 among the already described S2201 to S2204.
  • the product of the transposed matrix of secTransMatrixDC and secTransMatrixDC may be an integral multiple (1 ⁇ (shiftVal+1)) of the identity matrix.
  • secTransMatrixDC it is possible to apply the Identical transform to the leading (DC) component of the input vector in transform/inverse transform of non-separable transform.
  • Usually signed variables use a range like -128 to 127 (-2 ⁇ shiftVal to 2 ⁇ shiftVal-1), so as above, the value of (1 ⁇ shiftVal)-1 (e.g. 127) By using it, the range of 1-bit values can be reduced and the load of multiplication processing can be reduced.
  • the range of 1-bit values can be reduced and the load of multiplication processing can be reduced.
  • Fig. 19 shows a flowchart of the process of performing LFNST in CIIP mode.
  • IntraPredMode Derive lfnstTrSetId from IntraPredMode. Also, a transformation matrix secTransMatrix[][] is derived from lfnstTrSetId, block size, and lfnst_idx. IntraPredMode is used to derive an intra-predicted image in the case of CIIP mode or GPM mode using intra-prediction.
  • the inverse non-separable transformation unit 31121 performs non-separable transformation using the transformation matrix secTransMatrix[][]. Specifically, the processing from S2201 to S2204 described above may be performed. Also, different transform matrices may be used for non-separable transform for intra prediction and non-separable transform for inter prediction (CIIP mode or GPM mode). Also, in the non-separable conversion in CIIP mode or GPM mode, non-separable conversion (configuration 1, configuration 2, configuration 3 described above) that removes or preserves the DC component may be used.
  • the inverse separable transform unit 31123 performs separable transform on transform coefficients that have undergone non-separable transform or transform coefficients that have not undergone non-separable transform.
  • the non-separable transform is performed even in the CIIP mode for generating a predicted image close to intra prediction, so there is an effect of improving the coding efficiency.
  • the non-separable transform may be performed when the prediction mode is the CIIP mode or the GPM mode using intra prediction. Whether the prediction mode is the CIIP mode or the GPM mode using intra prediction may be determined by the following generalizedIntraInter.
  • generalizedIntraInter ciip_flag[x0][y0]
  • (S3111) Determine whether the prediction mode is intra mode. If YES (prediction mode is intra mode), transition to S3112A. If NO (prediction mode is inter mode), transition to S3112C.
  • the inverse non-separable transform unit 31121 performs non-separable transform. A method of deriving a transformation matrix used in non-separable transformation will be described separately.
  • LfnstZeroOutSigCoeffFlag is a flag indicating the presence or absence of non-zero transform coefficients in the zero-out area, and if TRUE, indicates that there are no non-zero coefficients in the zero-out area.
  • lfnst_idx may be decoded by inter prediction, and LFNST may be performed when lfnst_idx>0. In this case, it is derived below.
  • (S3111) Determine whether the prediction mode is intra mode. In the case of NO (when the prediction mode is the inter mode), the process transitions to S3112.
  • the inverse non-separable transform unit 31121 performs non-separable transform. A method of deriving a transformation matrix used in non-separable transformation will be described separately.
  • LFNST is not performed when the prediction mode is inter mode and the transform coefficient is only DC. Therefore, by applying the LFNST transform to the DC coefficients, the transform coefficients that are already concentrated in one coefficient position (DC) can be spread out, reducing waste such as creating unnecessary frequency limits.
  • the CU decoding unit 3022 and the CU encoding unit 1112 may derive ApplyLfnstFlag from the following conditional expression and use ApplyLfnstFlag to determine whether or not to perform LFNST.
  • a configuration for performing non-separable transform processing without decoding lfnst_idx will be described.
  • ApplyLfnstFlag is set to TRUE if transform coefficients are zeroed out in GPM prediction.
  • the addition unit 312 adds the predicted image of the block input from the predicted image generation unit 308 and the prediction error input from the inverse quantization/inverse transform unit 311 for each pixel to generate a decoded image of the block.
  • the adder 312 stores the decoded image of the block in the reference picture memory 306 and also outputs it to the loop filter 305 .
  • FIG. 22 is a block diagram showing the configuration of the video encoding device 11 according to this embodiment.
  • the video encoding device 11 includes a predicted image generation unit 101, a subtraction unit 102, a transformation/quantization unit 103, an inverse quantization/inverse transformation unit 105, an addition unit 106, a loop filter 107, a prediction parameter memory (prediction parameter storage unit , frame memory) 108, reference picture memory (reference image storage unit, frame memory) 109, coding parameter determination unit 110, parameter coding unit 111, prediction parameter derivation unit 120, and entropy coding unit 104.
  • a prediction parameter memory prediction parameter storage unit , frame memory
  • reference picture memory reference image storage unit, frame memory
  • the predicted image generation unit 101 generates a predicted image for each CU.
  • the predicted image generation unit 101 includes the already described inter predicted image generation unit 309 and intra predicted image generation unit, and the description thereof is omitted.
  • the subtraction unit 102 subtracts the pixel values of the predicted image of the block input from the predicted image generation unit 101 from the pixel values of the image T to generate prediction errors.
  • Subtraction section 102 outputs the prediction error to transform/quantization section 103 .
  • the transform/quantization unit 103 calculates transform coefficients by frequency transforming the prediction error input from the subtraction unit 102, and derives quantized transform coefficients by quantization.
  • the transform/quantization unit 103 outputs the quantized transform coefficients to the parameter coding unit 111 and the inverse quantization/inverse transform unit 105 .
  • the transform/quantization unit 103 includes a separate transform unit (first transform unit), a non-separate transform unit (second transform unit), and a scaling unit.
  • the separable transform unit applies a separable transform to the prediction error. If lfnst_idx is not 0, the non-separate conversion unit performs non-separate conversion.
  • the scaling unit scales the transform coefficients using a quantization matrix.
  • the conversion/quantization unit 103 specifically performs the following processing.
  • the separation conversion unit performs separation conversion.
  • S4 The scaling unit scales the transform coefficients using the quantization matrix.
  • the (forward) non-separable transform performs almost the same processing as the inverse non-separable transform.
  • the inverse quantization/inverse transform unit 105 is the same as the inverse quantization/inverse transform unit 311 in the moving image decoding device 31, and description thereof is omitted.
  • the calculated prediction error is output to addition section 106 .
  • the parameter encoding unit 111 includes a header encoding unit 1110, a CT information encoding unit 1111, and a CU encoding unit 1112 (prediction mode encoding unit).
  • CU encoding section 1112 further comprises TU encoding section 1114 . The general operation of each module will be described below.
  • a header encoding unit 1110 performs encoding processing of parameters such as header information, division information, prediction information, and quantized transform coefficients.
  • the CT information encoding unit 1111 encodes QT, MT (BT, TT) division information and the like.
  • a CU encoding unit 1112 encodes CU information, prediction information, division information, and the like.
  • the TU encoding unit 1114 encodes the QP update information and the quantized prediction error when the TU contains the prediction error.
  • the CT information encoding unit 1111 and the CU encoding unit 1112 parameter-encode syntax elements such as inter prediction parameters (predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX), intra prediction parameters, and quantized transform coefficients.
  • inter prediction parameters predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX
  • intra prediction parameters e.g., intra prediction parameters supplied to section 111.
  • the entropy coding unit 104 receives input from the parameter coding unit 111 of the quantized transform coefficients and coding parameters (division information, prediction parameters). The entropy encoding unit 104 entropy-encodes these to generate and output an encoded stream Te.
  • the prediction parameter derivation unit 120 is means including the inter prediction parameter encoding unit 112 and the intra prediction parameter encoding unit, and derives intra prediction parameters and intra prediction parameters from the parameters input from the encoding parameter determination unit 110.
  • the derived intra prediction parameters and intra prediction parameters are output to parameter coding section 111 .
  • Inter prediction parameter encoding section 112 is configured including parameter encoding control section 1121 and inter prediction parameter deriving section 303, as shown in FIG.
  • the inter-prediction parameter deriving unit 303 has a configuration common to that of the video decoding device.
  • Parameter encoding control section 1121 includes merge index derivation section 11211 and vector candidate index derivation section 11212 .
  • the merge index derivation unit 11211 derives merge candidates and the like, and outputs them to the inter prediction parameter derivation unit 303.
  • Vector candidate index derivation section 11212 derives vector prediction candidates and the like, and outputs them to inter prediction parameter derivation section 303 and parameter coding section 111 .
  • the intra prediction parameter encoding unit includes a parameter encoding control unit and an intra prediction parameter deriving unit.
  • the intra-prediction parameter deriving unit has a configuration common to that of the video decoding device.
  • the inputs to the inter prediction parameter derivation unit 303 and the intra prediction parameter derivation unit are the coding parameter determination unit 110 and the prediction parameter memory 108, and are output to the parameter coding unit 111.
  • the addition unit 106 adds pixel values of the prediction block input from the prediction image generation unit 101 and prediction errors input from the inverse quantization/inverse transformation unit 105 for each pixel to generate a decoded image.
  • the addition unit 106 stores the generated decoded image in the reference picture memory 109 .
  • a loop filter 107 applies a deblocking filter, SAO, and ALF to the decoded image generated by the addition unit 106.
  • the loop filter 107 does not necessarily include the three types of filters described above, and may be configured with only a deblocking filter, for example.
  • the prediction parameter memory 108 stores the prediction parameters generated by the coding parameter determination unit 110 in predetermined positions for each current picture and CU.
  • the reference picture memory 109 stores the decoded image generated by the loop filter 107 in a predetermined position for each target picture and CU.
  • the coding parameter determination unit 110 selects one set from a plurality of sets of coding parameters.
  • the coding parameter is the above-described QT, BT or TT division information, prediction parameters, or parameters to be coded generated in relation to these.
  • the predicted image generator 101 uses these coding parameters to generate predicted images.
  • the coding parameter determination unit 110 calculates an RD cost value indicating the magnitude of the information amount and the coding error for each of the multiple sets.
  • the RD cost value is, for example, the sum of the code amount and the value obtained by multiplying the squared error by the coefficient ⁇ .
  • the code amount is the information amount of the encoded stream Te obtained by entropy-encoding the quantization error and encoding parameters.
  • the squared error is the sum of squares of the prediction errors calculated in subtraction section 102 .
  • the coefficient ⁇ is a preset real number greater than zero. Coding parameter determination section 110 selects a set of coding parameters that minimizes the calculated cost value. Coding parameter determination section 110 outputs the determined coding parameters to parameter coding section 111 and prediction parameter derivation section 120 .
  • the encoding parameter determining unit 110, the parameter encoding unit 111, and the prediction parameter deriving unit 120 may be implemented by a computer.
  • a program for realizing this control function may be recorded in a computer-readable recording medium, and the program recorded in this recording medium may be read into a computer system and executed.
  • the "computer system” here is a computer system built in either the moving image encoding device 11 or the moving image decoding device 31, and includes hardware such as an OS and peripheral devices.
  • the term "computer-readable recording medium” refers to portable media such as flexible discs, magneto-optical discs, ROMs and CD-ROMs, and storage devices such as hard disks built into computer systems.
  • “computer-readable recording medium” means a medium that dynamically stores a program for a short period of time, such as a communication line for transmitting a program via a network such as the Internet or a communication line such as a telephone line. In that case, it may also include a memory that holds the program for a certain period of time, such as a volatile memory inside a computer system that serves as a server or client. Further, the program may be for realizing part of the functions described above, or may be capable of realizing the functions described above in combination with a program already recorded in the computer system.
  • part or all of the video encoding device 11 and the video decoding device 31 in the above-described embodiments may be implemented as an integrated circuit such as LSI (Large Scale Integration).
  • LSI Large Scale Integration
  • Each functional block of the moving image encoding device 11 and the moving image decoding device 31 may be processorized individually, or may be partially or wholly integrated and processorized.
  • the method of circuit integration is not limited to LSI, but may be realized by a dedicated circuit or a general-purpose processor.
  • an integrated circuit based on this technology may be used.
  • Embodiments of the present invention are preferably applied to a moving image decoding device that decodes encoded image data and a moving image encoding device that generates encoded image data. be able to. Also, the present invention can be suitably applied to the data structure of encoded data generated by a video encoding device and referenced by a video decoding device.

Landscapes

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

Abstract

非分離変換により符号化効率を向上させることができる動画像符号化・復号装置を提供する。本発明の一態様に係る動画像復号装置は、予測画像を生成する予測画像生成部と、逆非分離変換を行う逆非分離変換部を備えている動画像復号装置であって、上記非分離変換部は、変換係数の特定の周波数成分を変化させないことを特徴とする。

Description

動画像復号装置および動画像符号化装置
 本発明の実施形態は、動画像復号装置および動画像符号化装置に関する。本出願は、2021年12月14日に出願された特願2021-202155号に基づき優先権を主張し、その内容をここに援用する。
 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置が用いられている。
 具体的な動画像符号化方式としては、例えば、H.264/AVCやHEVC(High-Efficiency Video Coding)方式などが挙げられる。
 このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化ツリーユニット(CTU:Coding Tree Unit)、符号化ツリーユニットを分割することで得られる符号化単位(符号化ユニット(Coding Unit:CU)と呼ばれることもある)、及び、符号化単位を分割することより得られる変換ユニット(TU:Transform Unit)からなる階層構造により管理され、CU毎に符号化/復号される。
 また、このような動画像符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像を入力画像(原画像)から減算して得られる予測誤差(「差分画像」または「残差画像」と呼ぶこともある)が符号化される。予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)が挙げられる。
 また、非特許文献1には、対象ブロックを矩形以外の形状に分割し、領域ごとに異なるインター予測を実施するGPM(Geometric partition mode)モードが開示されている。このように対象ブロックを矩形以外の形状に分割することにより、複雑なテクスチャに対してもより正確に予測することができ、符号化効率が向上する。また、非特許文献1には、変換ユニット毎に、予測誤差を分離変換した係数をさらに低周波数領域に集中させるために、非分離変換する画像符号化装置が開示されている。
ITU-T Rec. H.266
 非特許文献1では、方向性をもつ予測残差に対して有効な非分離変換技術が、隣接画素との相関が高く輝度変化が生じにくいイントラ予測ブロックのみに適用され、輝度変化が生じやすいインター予測ブロックには適応されていない課題がある。本発明の一態様は、輝度変化がある場合においても好適に逆非分離変換を適用することができる動画像復号装置、動画像符号化装置を提供することを目的とする。
 上記の課題を解決するために、本発明の一態様に係る動画像復号装置は、予測画像を生成する予測画像生成部と、逆非分離変換を行う逆非分離変換部を備えている動画像復号装置であって、上記非分離変換部は、変換係数の特定の周波数成分を変化させないことを特徴とする。
 上記逆非分離変換部は、左上成分であるDC成分を変化させないことを特徴とする。
 上記逆非分離変換部は、インター予測の場合に、左上成分であるDC成分を変化させないことを特徴とする。
 上記逆非分離変換部は、上記DC成分を除外して一次元配列を導出し、一次元配列に変換を行うことを特徴とする。
 上記逆非分離変換部は、左上成分を除く左端成分と上端成分が0である変換行列を用いることを特徴とする。
 予測画像を生成する予測画像生成部と、逆非分離変換を行う逆非分離変換部を備えている動画像復号装置であって、上記非分離変換部は、変換係数の特定の周波数成分を変化させないことを特徴とする。
 イントラ予測画像とインター予測画像の重み付け和により予測画像を導出する場合において、上記イントラ予測画像の導出に用いたイントラ予測モードを用いて、非分離変換の変換行列を選択し、非分離変換を行うことを特徴とする動画像復号装置。
 上記予測画像を用いるモードは、隣接ブロックの状態に応じて上記重みを導出するCIIPモードであることを特徴とする請求項7に記載の動画像復号装置。
 上記予測画像を用いるモードは、符号化データから導出したパラメータにより重みを導出するジオメトリモードであることを特徴とする請求項7に記載の動画像復号装置。
 イントラ予測画像とインター予測画像の重み付け和により予測画像を導出する場合において、上記イントラ予測画像の導出に用いたイントラ予測モードを用いて、非分離変換の変換行列を選択し、非分離変換を行うことを特徴とする動画像符号化装置。
 本発明の態様によれば、動画像符号化・復号処理において、インター予測に好適な非分離変換を行うことで符号化効率を向上させることができる。
本実施形態に係る画像伝送システムの構成を示す概略図である。 符号化ストリームのデータの階層構造を示す図である。 動画像復号装置の構成を示す概略図である。 インター予測画像生成部の構成を示す概略図である。 インター予測パラメータ導出部の構成を示す概略図である。 動画像復号装置の概略的動作を説明するフローチャートである。 GPM予測の符号化パラメータを説明するシンタックス図である。 GPM予測を説明する図である。 GPM予測において、merge_gpm_partition_idxとangleIdxおよびdistanceIdxとの対応を示すテーブルの構造を示す図である。GPM予測における重み係数導出処理および動きベクトル格納処理において用いられるidxとDisLut[idx]との対応を示すテーブルの構造を示す図である。 イントラ予測モードの種類(モード番号)を示す概略図である。 逆量子化・逆変換部の構成例を示す機能ブロック図である。 非分離変換のフラグを示すシンタックステーブルの例である。 非分離変換のフラグを示すシンタックステーブルの例である。 イントラ予測モードにおいて、非分離変換の変換行列選択に用いるテーブルである。 予測モードに応じて非分離変換を切り替える処理を示すフローチャートである。 DC変換を保存する逆非分離変換の動作の一構成を示す図である。 DC変換を保存する逆非分離変換の動作の別の構成を示す図である。 DC変換を保存する変換(非分離変換)を示す図である。 CIIPモードにおいてLFNSTを行う処理のフローチャートである。 対象ブロックがインター予測の場合(CuPredMode!=MODE_INTRA)でLFNST処理を行う構成を示すフローチャートである。 対象ブロックがインター予測の場合(CuPredMode!=MODE_INTRA)でLFNST処理を行う構成を示すフローチャートである。 動画像符号化装置の構成を示すブロック図である。 インター予測パラメータ符号化部の構成を示す概略図である。
  (第1の実施形態)
 以下、図面を参照しながら本発明の実施形態について説明する。
 図1は、本実施形態に係る画像伝送システム1の構成を示す概略図である。
 画像伝送システム1は、対象画像を符号化した符号化ストリームを伝送し、伝送された符号化ストリームを復号し画像を表示するシステムである。画像伝送システム1は、動画像符号化装置(画像符号化装置)11、ネットワーク21、動画像復号装置(画像復号装置)31、及び動画像表示装置(画像表示装置)41を含んで構成される。
 動画像符号化装置11には画像Tが入力される。
 ネットワーク21は、動画像符号化装置11が生成した符号化ストリームTeを動画像復号装置31に伝送する。ネットワーク21は、インターネット(Internet)、広域ネットワーク(WAN:Wide Area Network)、小規模ネットワーク(LAN:Local Area Network)またはこれらの組み合わせである。ネットワーク21は、必ずしも双方向の通信網に限らず、地上デジタル放送、衛星放送等の放送波を伝送する一方向の通信網であっても良い。また、ネットワーク21は、DVD(Digital Versatile Disc:登録商標)、BD(Blue-ray Disc:登録商標)等の符号化ストリームTeを記録した記憶媒体で代替されても良い。
 動画像復号装置31は、ネットワーク21が伝送した符号化ストリームTeのそれぞれを復号し、復号した1または複数の復号画像Tdを生成する。
 動画像表示装置41は、動画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。動画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。ディスプレイの形態としては、据え置き、モバイル、HMD等が挙げられる。また、動画像復号装置31が高い処理能力を有する場合には、画質の高い画像を表示し、より低い処理能力しか有しない場合には、高い処理能力、表示能力を必要としない画像を表示する。
 <演算子>
 本明細書で用いる演算子を以下に記載する。
 >>は右ビットシフト、<<は左ビットシフト、&はビットワイズ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)。
 abs(a)はaの絶対値を返す関数である。
 Int(a)はaの整数値を返す関数である。
 floor(a)はa以下の最大の整数を返す関数である。
 ceil(a)はa以上の最小の整数を返す関数である。
 a/dはdによるaの除算(小数点以下切り捨て)を表す。
  <符号化ストリームTeの構造>
 本実施形態に係る動画像符号化装置11および動画像復号装置31の詳細な説明に先立って、動画像符号化装置11によって生成され、動画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
 図2は、符号化ストリームTeにおけるデータの階層構造を示す図である。符号化ストリームTeは、例示的に、シーケンス、およびシーケンスを構成する複数のピクチャを含む。図2の(a)~(f)は、それぞれ、シーケンスSEQを既定する符号化ビデオシーケンス、ピクチャPICTを規定する符号化ピクチャ、スライスSを規定する符号化スライス、スライスデータを規定する符号化スライスデータ、符号化スライスデータに含まれる符号化ツリーユニット、符号化ツリーユニットに含まれる符号化ユニットを示す図である。
  (符号化ビデオシーケンス)
 符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために動画像復号装置31が参照するデータの集合が規定されている。シーケンスSEQは、図2に示すように、ビデオパラメータセット(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、Adaptation Parameter Set(APS)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。
 ビデオパラメータセットVPSは、複数のレイヤから構成されている動画像において、複数の動画像に共通する符号化パラメータの集合および動画像に含まれる複数のレイヤおよび個々のレイヤに関連する符号化パラメータの集合が規定されている。
 シーケンスパラメータセットSPSでは、対象シーケンスを復号するために動画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの幅や高さが規定される。なお、SPSは複数存在してもよい。その場合、PPSから複数のSPSの何れかを選択する。
 ピクチャパラメータセットPPSでは、対象シーケンス内の各ピクチャを復号するために動画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの復号に用いられる量子化幅の基準値(pic_init_qp_minus26)や重み付き予測の適用を示すフラグ(weighted_pred_flag)が含まれる。なお、PPSは複数存在してもよい。その場合、対象シーケンス内の各ピクチャから複数のPPSの何れかを選択する。
  (符号化ピクチャ)
 符号化ピクチャでは、処理対象のピクチャPICTを復号するために動画像復号装置31が参照するデータの集合が規定されている。ピクチャPICTは、図2に示すように、スライス0~スライスNS-1を含む(NSはピクチャPICTに含まれるスライスの総数)。
 なお、以下、スライス0~スライスNS-1のそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化ストリームTeに含まれるデータであって、添え字を付している他のデータについても同様である。
  (符号化スライス)
 符号化スライスでは、処理対象のスライスSを復号するために動画像復号装置31が参照するデータの集合が規定されている。スライスは、図2に示すように、スライスヘッダ、および、スライスデータを含んでいる。
 スライスヘッダには、対象スライスの復号方法を決定するために動画像復号装置31が参照する符号化パラメータ群が含まれる。スライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダに含まれる符号化パラメータの一例である。
 スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、または、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、または、イントラ予測を用いるBスライスなどが挙げられる。なお、インター予測は、単予測、双予測に限定されず、より多くの参照ピクチャを用いて予測画像を生成してもよい。以下、P、Bスライスと呼ぶ場合には、インター予測を用いることができるブロックを含むスライスを指す。
 なお、スライスヘッダは、ピクチャパラメータセットPPSへの参照(pic_parameter_set_id)を含んでいても良い。
  (符号化スライスデータ)
 符号化スライスデータでは、処理対象のスライスデータを復号するために動画像復号装置31が参照するデータの集合が規定されている。スライスデータは、図2(d)に示すように、CTUを含んでいる。CTUは、スライスを構成する固定サイズ(例えば64x64)のブロックであり、最大符号化単位(LCU:Largest Coding Unit)と呼ぶこともある。
  (符号化ツリーユニット)
 図2には、処理対象のCTUを復号するために動画像復号装置31が参照するデータの集合が規定されている。CTUは、再帰的な4分木分割(QT(Quad Tree)分割)、2分木分割(BT(Binary Tree)分割)あるいは3分木分割(TT(Ternary Tree)分割)により、符号化処理の基本的な単位である符号化ユニットCUに分割される。BT分割とTT分割を合わせてマルチツリー分割(MT(Multi Tree)分割)と呼ぶ。再帰的な4分木分割により得られる木構造のノードのことを符号化ノード(Coding Node)と称する。4分木、2分木、及び3分木の中間ノードは、符号化ノードであり、CTU自身も最上位の符号化ノードとして規定される。また、最下位の符号化ノードは符号化ユニットとして規定される。
  (符号化ユニット)
 図2は、処理対象の符号化ユニットを復号するために動画像復号装置31が参照するデータの集合が規定されている。具体的には、CUは、CUヘッダCUH、予測パラメータ、変換パラメータ、量子化変換係数等から構成される。CUヘッダでは予測モード等が規定される。
 予測処理は、CU単位で行われる場合と、CUをさらに分割したサブCU単位で行われる場合がある。CUとサブCUのサイズが等しい場合には、CU中のサブCUは1つである。CUがサブCUのサイズよりも大きい場合、CUはサブCUに分割される。たとえばCUが8x8、サブCUが4x4の場合、CUは水平2分割、垂直2分割からなる、4つのサブCUに分割される。
 予測の種類(予測モード)は、イントラ予測(MODE_INTRA)と、インター予測(MODE_INTER)、イントラブロックコピー(MODE_IBC)がある。イントラ予測は、同一ピクチャ内の予測であり、インター予測は、互いに異なるピクチャ間(例えば、表示時刻間、レイヤ画像間)で行われる予測処理を指す。
 変換・量子化処理はCU単位で行われるが、量子化変換係数は4x4等のサブブロック単位でエントロピー符号化してもよい。
  (予測パラメータ)
 予測画像は、ブロックに付随する予測パラメータによって導出される。予測パラメータには、イントラ予測とインター予測の予測パラメータがある。
  (インター予測の予測パラメータ)
 インター予測の予測パラメータについて説明する。インター予測パラメータは、予測リスト利用フラグpredFlagL0とpredFlagL1、参照ピクチャインデックスrefIdxL0とrefIdxL1、動きベクトルmvL0とmvL1から構成される。predFlagL0、predFlagL1は、参照ピクチャリスト(L0リスト、L1リスト)が用いられるか否かを示すフラグであり、値が1の場合に対応する参照ピクチャリストが用いられる。なお、本明細書中「XXであるか否かを示すフラグ」と記す場合、フラグが0以外(たとえば1)をXXである場合、0をXXではない場合とし、論理否定、論理積などでは1を真、0を偽と扱う(以下同様)。但し、実際の装置や方法では真値、偽値として他の値を用いることもできる。
 インター予測パラメータを導出するためのシンタックス要素には、例えば、マージフラグmerge_flag (general_merge_flag)、マージインデックスmerge_idx、サブブロック単位のインター予測を用いるかを示すmerge_subblock_flag、regulare_merge_flag、イントラインターフラグciip_flag、GPMモード(Geometric partitioning merge mode)を用いるかを示すGPM_flag(以下MergeGpmFlagとも呼ぶ)、GPMモードの分割形状を示すmerge_gpm_partition_idx、GPMのマージインデックスを示すmerge_gpm_idx0、merge_gpm_idx1、AMVPモードで用いる参照ピクチャを選択するためのインター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、動きベクトルを導出するための予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、動きベクトル精度モードamvr_mode、CIIPモード(Combined intra inter prediction)を示すciip_flagがある。
  (参照ピクチャリスト)
 参照ピクチャリストは、参照ピクチャメモリ306に記憶された参照ピクチャからなるリストである。個々のCUでは、参照ピクチャリストRefPicListX(X=0または1)中のどのピクチャを実際に参照するかをrefIdxLXで指定する。なお、LXは、L0予測とL1予測を区別しない場合に用いられる記述方法であり、以降では、LXをL0、L1に置き換えることでL0リストに対するパラメータとL1リストに対するパラメータを区別する。
  (マージ予測とAMVP予測)
 予測パラメータの復号(符号化)方法には、マージ予測(merge)モード(マージモード)とAMVP(Advanced Motion Vector Prediction、適応動きベクトル予測)モードがあり、merge_flagは、これらを識別するためのフラグである。マージモードは、動きベクトル差分の一部もしくは全てを省略する予測モードであり、予測リスト利用フラグpredFlagLX、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めずに、既に処理した近傍ブロックの予測パラメータ等から導出するモードである。AMVPモードは、inter_pred_idc、refIdxLX、mvLXを符号化データに含めるモードである。なお、mvLXは、予測ベクトルmvpLXを識別するmvp_LX_idxと差分ベクトルmvdLXとして符号化される。また動きベクトル差分を省略・簡素化する予測モードの総称をgeneral merge modeと呼び、general_merge_flagによりgeneral merge modeとAMVP予測を選択してもよい。さらにregular_merge_flagを伝送し、regular_merge_flagが1である場合に、通常マージモードもしくはMMVDを選択し、それ以外の場合にCIIPモードもしくはGPMモードを選択してもよい。
 inter_pred_idcは、参照ピクチャの種類および数を示す値であり、PRED_L0、PRED_L1、PRED_BIの何れかの値をとる。PRED_L0、PRED_L1は、各々L0リスト、L1リストで管理された1枚の参照ピクチャを用いる単予測を示す。PRED_BIはL0リストとL1リストで管理された2枚の参照ピクチャを用いる双予測を示す。
 merge_idxは、処理が完了したブロックから導出される予測パラメータ候補(マージ候補)のうち、いずれの予測パラメータを対象ブロックの予測パラメータとして用いるかを示すインデックスである。
  (動きベクトル)
 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は、2つの予測リスト利用フラグがともに1であるかによって導出できる。
 あるいは、biPredは、インター予測識別子が2つの予測リスト(参照ピクチャ)を使うことを示す値であるか否かによっても導出できる。
  (動画像復号装置の構成)
 本実施形態に係る動画像復号装置31(図3)の構成について説明する。
 動画像復号装置31は、エントロピー復号部301、パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆変換部311、及び加算部312、予測パラメータ導出部320を含んで構成される。なお、後述の動画像符号化装置11に合わせ、動画像復号装置31にループフィルタ305が含まれない構成もある。
 パラメータ復号部302は、さらに、ヘッダ復号部3020、CT情報復号部3021、及びCU復号部3022(予測モード復号部)を備えており、CU復号部3022はさらにTU復号部3024を備えている。これらを総称して復号モジュールと呼んでもよい。ヘッダ復号部3020は、符号化データからVPS、SPS、PPS、APSなどのパラメータセット情報、スライスヘッダ(スライス情報)を復号する。CT情報復号部3021は、符号化データからCTを復号する。CU復号部3022は符号化データからCUを復号する。TU復号部3024は、TUに予測誤差が含まれている場合に、符号化データからQP更新情報(量子化補正値)と量子化予測誤差(residual_coding)を復号する。
 ヘッダ復号部3020は、SPSから非分離変換を利用するか否かを示すフラグsps_lfnst_enabled_flagを復号する。また、ヘッダ復号部3020は、sps_lfnst_enabled_flagが1である場合に、ピクチャヘッダ(PH)からph_lfnst_enabled_flagを復号する。ph_lfnst_enabled_flagが現れない場合には、ph_lfnst_enabled_flagを0と推定(infer)する。あるいは、ph_lfnst_enabled_flagが現れない場合には、ph_lfnst_enabled_flagの値としてsps_lfnst_enabled_flagの値を設定してもよい。
 本発明の一態様におけるGPM非分離変換は、インター予測がGPMモード用の逆非分離変換(及び非分離変換)の呼称である。以下では、GPMの分割形状から非分離変換の変換行列、もしくは変換行列のセットを導出する方法を説明する。
 sps_gpm_enabled_flagは、SPSで通知され、対象シーケンスにおいて、GPM予測モードが用いられるか否かを示す。SPSでは、sps_max_num_merge_cand_minus_max_num_gpm_candが通知される。sps_max_num_merge_cand_minus_max_num_gpm_candは、GPM予測のマージ候補数の最大値MaxNumGpmMergeCandの導出に使用されるパラメータである。MaxNumGpmMergeCandが0のとき、GPM予測は禁止される。
 ヘッダ復号部3020は、SPSからフラグsps_gpm_lfnst_enabled_flagを復号する。sps_gpm_lfnst_enabled_flagは、GPM予測する場合に、非分離変換(以下、GPM非分離変換)を利用するか否かを示すフラグである。ヘッダ復号部3020は、sps_lfnst_enabled_flagが1、かつ、sps_gpm_enabled_flagが1の場合、sps_gpm_lfnst_enabled_flagを復号する。それ以外の場合、sps_gpm_lfnst_enabled_flag=0に設定する。sps_gpm_lfnst_enabled_flag==1の場合、GPM非分離変換を適用してもよいことを示し、sps_gpm_lfnst_enabled_flag==0の場合、GPM非分離変換を適用しないことを示す。
 TU復号部3024は、符号化データから非分離変換の利用の有無、及び、変換基底を示すパラメータlfnst_idxを復号する。具体的には、TU復号部3024は、CUの幅と高さが4以上であり、且つ、予測モードがイントラ予測モードである場合に、lfnst_idxを復号する。なお、lfnst_idxは0の場合、非分離変換の非適用を示し、1の場合、非分離変換の変換行列(変換基底)のセット(ペア)のうち一方の変換行列を示し、2の場合、上記ペアのうち他方の変換行列を示す。
 予測画像生成部308は、インター予測画像生成部309(図4)及びイントラ予測画像生成部310を含んで構成される。
 予測パラメータ導出部320は、インター予測パラメータ導出部303(図5)及びイントラ予測パラメータ導出部を含んで構成される。
 また、以降では処理の単位としてCTU、CUを使用した例を記載するが、この例に限らず、サブCU単位で処理をしてもよい。あるいはCTU、CUをブロック、サブCUをサブブロックと読み替え、ブロックあるいはサブブロック単位の処理としてもよい。
 エントロピー復号部301は、外部から入力された符号化ストリームTeに対してエントロピー復号を行って、個々の符号(シンタックス要素)を復号する。エントロピー符号化には、シンタックス要素の種類や周囲の状況に応じて適応的に選択したコンテキスト(確率モデル)を用いてシンタックス要素を可変長符号化する方式と、あらかじめ定められた表、あるいは計算式を用いてシンタックス要素を可変長符号化する方式がある。
 エントロピー復号部301は、復号した符号をパラメータ復号部302に出力する。復号した符号とは、例えば、予測モードpredMode、merge_flag、merge_idx、inter_pred_idc、refIdxLX、mvp_LX_idx、mvdLX、amvr_mode等である。どの符号を復号するかの制御は、パラメータ復号部302の指示に基づいて行われる。
  (基本フロー)
 図6は、動画像復号装置31の概略的動作を説明するフローチャートである。
 (S1100:パラメータセット情報復号)ヘッダ復号部3020は、符号化データからVPS、SPS、PPSなどのパラメータセット情報を復号する。
 (S1200:スライス情報復号)ヘッダ復号部3020は、符号化データからスライスヘッダ(スライス情報)を復号する。
 以下、動画像復号装置31は、対象ピクチャに含まれる各CTUについて、S1300からS5000の処理を繰り返すことにより各CTUの復号画像を導出する。
 (S1300:CTU情報復号)CT情報復号部3021は、符号化データからCTUを復号する。
 (S1400:CT情報復号)CT情報復号部3021は、符号化データからCTを復号する。
 (S1500:CU復号)CU復号部3022はS1510、S1520を実施して、符号化データからCUを復号する。
 (S1510:CU情報復号)CU復号部3022は、符号化データからCU情報、予測情報、TU分割フラグ、CU残差フラグ等を復号する。
 (S1520:TU情報復号)TU復号部3024は、TUに予測誤差が含まれている場合に、符号化データから量子化予測誤差、変換インデックスlfnst_idx等を復号する。
 (S2000:予測画像生成)予測画像生成部308は、対象CUに含まれる各ブロックについて、予測情報に基づいて予測画像を生成する。
 (S3000:逆量子化・逆変換)逆量子化・逆変換部311は、対象CUに含まれる各TUについて、逆量子化・逆変換処理を実行する。
 (S4000:復号画像生成)加算部312は、予測画像生成部308より供給される予測画像と、逆量子化・逆変換部311より供給される予測誤差とを加算することによって、対象CUの復号画像を生成する。
 (S5000:ループフィルタ)ループフィルタ305は、復号画像にデブロッキングフィルタ、SAO、ALFなどのループフィルタをかけ、復号画像を生成する。
 ループフィルタ305は、符号化ループ内に設けたフィルタで、ブロック歪やリンギング歪を除去し、画質を改善するフィルタである。ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)等のフィルタを施す。
 参照ピクチャメモリ306は、加算部312が生成したCUの復号画像を、対象ピクチャ及び対象CU毎に予め定めた位置に記憶する。
 予測パラメータメモリ307は、復号対象のCTUあるいはCU毎に予め定めた位置に予測パラメータを記憶する。具体的には、予測パラメータメモリ307は、パラメータ復号部302が復号したパラメータ及びエントロピー復号部301が分離した予測モードpredMode等を記憶する。
 予測画像生成部308には、予測モードpredMode、予測パラメータ等が入力される。また、予測画像生成部308は、参照ピクチャメモリ306から参照ピクチャを読み出す。予測画像生成部308は、予測モードpredModeが示す予測モードで、予測パラメータと読み出した参照ピクチャ(参照ピクチャブロック)を用いてブロックもしくはサブブロックの予測画像を生成する。ここで、参照ピクチャブロックとは、参照ピクチャ上の画素の集合(通常矩形であるのでブロックと呼ぶ)であり、予測画像を生成するために参照する領域である。
  (インター予測パラメータ導出部の構成)
 図5に示すように、インター予測パラメータ導出部303は、パラメータ復号部302から入力されたシンタックス要素に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してインター予測パラメータを導出する。また、インター予測パラメータをインター予測画像生成部309、予測パラメータメモリ307に出力する。インター予測パラメータ導出部303及びその内部の要素であるAMVP予測パラメータ導出部3032、マージ予測パラメータ導出部3036、GPM予測部30377、MV加算部3038は、動画像符号化装置、動画像復号装置で共通する手段であるので、これらを総称して動きベクトル導出部(動きベクトル導出装置)と称してもよい。
 merge_flagが1、すなわち、マージ予測モードを示す場合、merge_idxを導出し、マージ予測パラメータ導出部3036に出力する。
 merge_flagが0、すなわち、AMVP予測モードを示す場合、AMVP予測パラメータ導出部3032はinter_pred_idc、refIdxLXかmvp_LX_idxからmvpLXを導出する。
 GPM_flagが1、すなわち、対象ブロックがGPM予測モードで符号化されることを示す場合、GPM予測部30377はGPM予測のパラメータを導出する。GPM_flagの導出は後述する。
 (MV加算部)
 MV加算部3038では導出されたmvpLXとmvdLXを加算し、mvLXを導出する。
 (マージ予測)
 マージ予測パラメータ導出部3036は、マージ候補導出部30361、マージ候補選択部30362を備える。なお、マージ候補は、予測パラメータ(predFlagLX、mvLX、refIdxLX)を含んで構成され、マージ候補リストに格納される。マージ候補リストに格納されたマージ候補には、所定の規則に従ってインデックスが割り当てられる。
 マージ候補導出部30361は、復号済の隣接ブロックの動きベクトルとrefIdxLXをそのまま用いてマージ候補を導出する。それ以外に、マージ候補導出部30361は、後述する空間マージ候補導出処理、時間マージ候補導出処理等を適用してもよい。
 空間マージ候補導出処理として、マージ候補導出部30361は、所定の規則に従って、予測パラメータメモリ307が記憶している予測パラメータを読み出し、マージ候補に設定する。例えば、下記、A1,B1,B0,A0,B2の位置の予測パラメータを読み出す。
 A1: (xCb-1, yCb+cbHeight-1)
 B1: (xCb+cbWidth-1, yCb-1)
 B0: (xCb+cbWidth, yCb-1)
 A0: (xCb-1, yCb+cbHeight)
 B2: (xCb-1, yCb-1)
対象ブロックの左上座標を(xCb, yCb)、幅cbWidth、高さcbHeightとする。
 時間マージ導出処理として、マージ候補導出部30361は、対象ブロックの右下CBR、あるいは、中央の座標を含む参照画像中のブロックCの予測パラメータを、予測パラメータメモリ307から読み出してマージ候補Colとし、マージ候補リストmergeCandList[]に格納する。
 mergeCandList[]に格納する順番は、例えば、空間マージ候補(B1,A1,B0,A0,B2)、時間マージ候補Colである。なお、利用可能でない(ブロックがイントラ予測等)参照ブロックはマージ候補リストに格納しない。
i = 0
if(availableFlagB1)
 mergeCandList[i++] = B1
if(availableFlagA1)
 mergeCandList[i++] = A1
if(availableFlagB0)
 mergeCandList[i++] = B0
if(availableFlagA0)
 mergeCandList[i++] = A0
if(availableFlagB2)
 mergeCandList[i++] = B2
if(availableFlagCol)
 mergeCandList[i++] = Col
さらに、ヒストリマージ候補HmvpCand、平均候補avgCand、ゼロマージ候補zeroCandmをmergeCandList[]に追加して利用してもよい。
 マージ候補選択部30362は、マージ候補リストに含まれるマージ候補のうち、merge_idxが示すマージ候補Nを以下の式で選択する。
 N = mergeCandList[merge_idx]
 ここでNは、マージ候補を示すラベルであり、A1,B1,B0,A0,B2,Colなどをとる。ラベルNで示されるマージ候補の動き情報は(mvLXN[0], mvLXN[1])、predFlagLXN、refIdxLXNで示される。
 選択された(mvLXN[0], mvLXN[0])、predFlagLXN、refIdxLXNを対象ブロックのインター予測パラメータとして選択する。マージ候補選択部30362は選択したマージ候補のインター予測パラメータを予測パラメータメモリ307に記憶するとともに、インター予測画像生成部309に出力する。
 (GPM予測)
 GPM予測はGPMモードで利用される予測であり、対象CUを線分で分割する2つの非矩形の予測単位を用いて、予測画像を生成する。図8(a)に示す直線分の例を示す。対象CUをまたがる直線分は、図8(b)に示す角度インデックスangleIdx(角度変数)と、距離インデックスdistanceIdx(距離変数)とによって規定される。angleIdxは、垂直方向の直線と当該直線分とがなす角度φを示す。distanceIdxは、対象CUの中心から当該直線分までの距離ρを示す。angleIdxは、直線分の角度を整数値に割り当てたものであり、例えば、360度を大まかに32等分した場合には、図8(c)に示す値が割り当てられる。なお、360度を64分割し、さらに細かい角度インデックスを送る構成であってもよい。
 GPM予測の予測画像生成では、非矩形予測単位を含む「矩形の」予測画像(一時的予測画像)を2つ導出し、上記2つの矩形領域を、予測単位の形状に応じた重み付けを行うことで導出してもよい。動き補償部3091が対象CUの一時的予測画像を2つ導出し、GPM合成部30952が、上記2つの一時的予測画像の各画素に、画素の位置に応じた重み付け処理を施すことで予測画像を導出する。この処理をGPM合成処理と呼ぶ。予測以外の処理(例えば変換(逆変換)及び量子化(逆量子化))は対象CU全体に適用される。
 GPM予測部30377は、2つの非矩形領域の予測パラメータを導出し、インター予測画像生成部309に供給する。GPM予測では処理の簡略化のために、双予測を用いない構成でもよい。この場合、非矩形領域に対し単方向予測のインター予測パラメータを導出する。
 (GPM予測におけるシンタックスの復号)
 図7はmerge_data()で通知されるシンタックス構成を示す図である。パラメータ復号部302は、符号化データ中のシンタックス要素を復号し、GPM予測部30377(インター予測パラメータ導出部303)は、GPM予測のパラメータを導出する。
 general_merge_flagは、対象ブロックがスキップモードでない場合に通知される、マージモードを利用するか否かを示すフラグである。スキップモードの場合、インター予測パラメータ導出部303は、general_merge_flag=1に設定する。
 ciip_flagが0である場合に、パラメータ復号部302(CU復号部3022)は、GPM予測のシンタックス要素merge_gpm_partition_idx、merge_gpm_idx0、およびmerge_gpm_idx1を復号する。あるいは、merge_gpm_partition_idxとmerge_gpm_idx0を復号し、さらにMaxNumGpmMergeCand>2の場合にmerge_gpm_idx1を復号してもよい。merge_gpm_partition_idxは、GPM予測モードの分割パターンを示すインデックス(パーティションインデックス)である。パーティションインデックスは、対象ブロックを2つの領域に分割にするための、対象ブロックをまたがる直線分を特定するangleIdxおよびdistanceIdxの組み合わせを示す。GPM予測の予測画像生成に用いる動き情報は、マージ候補を用いる。merge_gpm_idx0およびmerge_gpm_idx1はそれぞれ、2つの領域の動き情報を示すマージ候補のインデックスである。パーティションインデックスの選択肢の数(分割パターン数)はNumGPMFullであり、merge_gpm_partition_idxは0~NumGPMFull-1(=63)のうちのいずれかの整数値をとる。
 MergeGpmFlagは、対象ブロックでGPM予測を実施するか否かを示すフラグである。少なくとも、以下の条件(GPM判定条件)が満たされる場合、GPM予測部30377は、MergeGpmFlag=1(GPM予測オン)に設定し、そうでない場合には、GPM予測部30377は、MergeGpmFlag=0に設定する。
(GPM判定条件)
・sps_gpm_enabled_flag=1
・slice_typeはBスライス
・general_merge_flag=1
・対象ブロックが所定のサイズの範囲(例えばcbWidth>=8かつcbHeight>=8かつcbWidth<8*cbHeightかつcbHeight<8*cbWidth)
・regular_merge_flag=0
・merge_subblock_flag=0
・ciip_flag=0
 GPM予測部30377は導出したパラメータをGPM合成部30952に出力する。
 (GPM予測における動き情報導出処理)
 GPM予測部30377は、以下のように、2つの非矩形領域の動き情報を示すシンタックス要素merge_gpm_idx0およびmerge_gpm_idx1からマージインデックスmおよびnを導出する。
 m = merge_gpm_idx0
 n = merge_gpm_idx1 + (merge_gpm_idx1 >= m) ? 1 : 0
 以下では、マージインデックスmが指すマージ候補がMとして示され、マージインデックスnが指すマージ候補がNとして示される。
 マージ予測パラメータ導出部3036は、(マージ予測)に記載された方法でマージ候補MおよびNの動き情報(mvLXM、mvLXN、refIdxLXM、refIdxLXN、predFlagLXM、predFlagLXN、mergeCandList等)を導出する。GPM予測部30377は、これらの動き情報を用いて、以下のように、merge_gpm_idx0およびmerge_gpm_idx1の動きベクトルmvAおよびmvB、参照インデックスrefIdxAおよびrefIdxB、ならびに、予測リストフラグpredListFlagAおよびpredListFlagBを設定する。
 mvA[0] = mvLXM[0]
 mvA[1] = mvLXM[1]
 refIdxA = refIdxLXM
 predListFlagA = X
 ここで、GPM予測部30377はXにmの下位1bitを設定する(m & 0x01)。なお、predFlagLXMが0である場合、GPM予測部30377はXを(1-X)に設定する。
 mvB[0] = mvLXN[0]
 mvB[1] = mvLXN[1]
 refIdxB = refIdxLXN
 predListFlagB = X
 ここで、GPM予測部30377はXにnの下位1bitを設定する(n & 0x01)。なお、predFlagLXNが0である場合、GPM予測部30377はXを(1-X)に設定する。
 これらの動き情報は、2つの非矩形領域の一時的予測画像を生成するために参照される。
 GPM予測部30377は図9に示すテーブルに従って、merge_gpm_partition_idxに対応するangleIdxおよびdistanceIdxを導出する。
 (GPM予測における動きベクトル格納処理)
 GPM予測部30377は、後続の処理で参照できるように、以下の手順で、非矩形領域AおよびBの動きベクトル(mvA、mvB)と参照ピクチャの情報(predFlagA, prefFlagB, refIdxLA, refIdxLB)を4x4サブブロック単位でメモリに格納する。
 numSbXおよびnumSbYはそれぞれ、対象ブロックの水平および垂直方向の4x4サブブロックの個数である。GPM予測部30377は、numSbX=cbWidth>>2、numSbY=cbHeight>>2を設定する。GPM予測部30377は、以下のように、変数displacementX、displacementY、isFlipおよびshiftHorを導出する。
  displacementX = angleIdx
  displacementY = (angleIdx + 8) % 32
  isFlip = (angleIdx>=13 && angleIdx<=27) ? 1 : 0
  shiftHor = (angleIdx%16==8 || (angleIdx%16!=0 && cbHeight>=cbWidth)) ? 0 : 1
 GPM予測部30377は、以下のように、offsetXおよびoffsetYを導出する。
 if (shiftHor == 0) {
  offsetX = (-cbWidth) >> 1
  offsetY = ((-cbHeight) >> 1) + ((angleIdx<16) ? (distanceIdx * cbHeight) >> 3 : -((distanceIdx * cbHeight) >> 3))
 } else { // shiftHor == 1
  offsetX = ((-cbWidth) >> 1) + ((angleIdx<16) ? (distanceIdx * cbWidth) >> 3 : -((distanceIdx * cbWidth) >> 3))
  offsetY = (-cbHeight) >> 1
 }
 GPM予測部30377は、xSbIdx = 0..numSbX-1、ySbIdx = 0..numSbY-1である4x4サブブロックの位置(xSbIdx,ySbIdx)毎に、以下の処理を実行する。
  GPM予測部30377は、図9に示すdisLutを用いて、以下のようにmotionIdxを算出する。
   motionIdx = (((4 * xSbIdx + offsetX) << 1) + 5) * disLut[displacementX] + (((4 * ySbIdx + offsetY) << 1) + 5) * disLut[displacementY]
  GPM予測部30377は、以下のようにsTypeを導出する。
   sType = (abs(motionIdx)<32) ? 2 : ((motionIdx<=0) ? (1-isFlip) : isFlip)
  sTypeが0である場合、GPM予測部30377は、以下を実施する。
   Aの予測リストフラグが0である(predListFlagA==0)場合、GPM予測部30377は単方向予測としてL0にAの動きベクトルを格納する。Aの予測リストフラグが0でない(predListFlagA!=0)場合、GPM予測部30377は単方向予測としてL1にAの動きベクトルを格納する。
    predFlagL0 = (predListFlagA==0) ? 1 : 0
    predFlagL1 = (predListFlagA==0) ? 0 : 1
    refIdxL0 = (predListFlagA==0) ? refIdxA : -1
    refIdxL1 = (predListFlagA==0) ? -1 : refIdxA
    mvL0[0] = (predListFlagA==0) ? mvA[0] : 0
    mvL0[1] = (predListFlagA==0) ? mvA[1] : 0
    mvL1[0] = (predListFlagA==0) ? 0 : mvA[0]
    mvL1[1] = (predListFlagA==0) ? 0 : mvA[1]
   そうではなく、sTypeが1である、または、sTypeが2でありかつpredListFlagA+predListFlagBが1でない場合、GPM予測部30377は以下を実施する。ここで、predListFlagA+predListFlagBが1でないことは、AおよびBの参照ピクチャリストが同じであることを表す。
   Bの予測リストフラグが0である(predListFlagB==0)場合、GPM予測部30377は単方向予測としてL0にBの動きベクトルを格納する。Bの予測リストフラグが0でない(predListFlagB!=0)場合、GPM予測部30377は単方向予測としてL1にBの動きベクトルを格納する。
    predFlagL0 = (predListFlagB==0) ? 1 : 0
    predFlagL1 = (predListFlagB==0) ? 0 : 1
    refIdxL0 = (predListFlagB==0) ? refIdxB : -1
    refIdxL1 = (predListFlagB==0) ? -1 : refIdxB
    mvL0[0] = (predListFlagB==0) ? mvB[0] : 0
    mvL0[1] = (predListFlagB==0) ? mvB[1] : 0
    mvL1[0] = (predListFlagB==0) ? 0 : mvB[0]
    mvL1[1] = (predListFlagB==0) ? 0 : mvB[1]
   そうでない場合(sTypeが2でありかつpredListFlagA+predListFlagBが1である場合)、GPM予測部30377は以下を実施する。ここで、predListFlagA+predListFlagBが1であることは、AおよびBの参照ピクチャリストが異なることを表す。
    Aの予測リストフラグが0である(predListFlagA==0)場合、GPM予測部30377は、L0にAの動きベクトルを格納し、L1にBの動きベクトルを格納した双方向予測を行う。Aの予測リストフラグが0でない(predListFlagA!=0)場合、GPM予測部30377は、L0にBの動きベクトルを格納し、L1にAの動きベクトルを格納した双方向予測を行う。
     predFlagL0 = 1
     predFlagL1 = 1
     refIdxL0 = (predListFlagA==0) ? refIdxA : refIdxB
     refIdxL1 = (predListFlagA==0) ? refIdxB : refIdxA
     mvL0[0] = (predListFlagA==0) ? mvA[0] : mvB[0]
     mvL0[1] = (predListFlagA==0) ? mvA[1] : mvB[1]
     mvL1[0] = (predListFlagA==0) ? mvB[0] : mvA[0]
     mvL1[1] = (predListFlagA==0) ? mvB[1] : mvA[1]
  (インター予測画像生成部309)
 predModeがインター予測モードを示す場合、インター予測画像生成部309は、インター予測パラメータ導出部303から入力されたインター予測パラメータと参照ピクチャを用いてインター予測によりブロックもしくはサブブロックの予測画像を生成する。
 図4は、本実施形態に係る予測画像生成部308に含まれるインター予測画像生成部309の構成を示す概略図である。インター予測画像生成部309は、動き補償部(予測画像生成装置)3091、合成部3095を含んで構成される。合成部3095は、IntraInter合成部30951、GPM合成部30952、BIO部30954、重み予測部3094を含んで構成される。イントラ予測画像生成部310で導出された予測画像はIntraInter合成部30951、GPM合成部30952の予測画像生成に用いられる。
  (動き補償)
 動き補償部3091(補間画像生成部3091)は、インター予測パラメータ導出部303から入力された、インター予測パラメータ(predFlagLX、refIdxLX、mvLX)に基づいて、参照ピクチャメモリ306から参照ブロックを読み出すことによって補間画像(動き補償画像)を生成する。参照ブロックは、refIdxLXで指定された参照ピクチャRefPicLX上で、対象ブロックの位置からmvLXシフトした位置のブロックである。ここで、mvLXが整数精度でない場合には、動き補償フィルタと呼ばれる小数位置の画素を生成するためのフィルタを施して、補間画像を生成する。
 動き補償部3091は、まず、予測ブロック内座標(x,y)に対応する整数位置(xInt,yInt)および位相(xFrac,yFrac)を以下の式で導出する。
  xInt = xPb+(mvLX[0]>>(log2(MVPREC)))+x
  xFrac = mvLX[0]&(MVPREC-1)
  yInt = yPb+(mvLX[1]>>(log2(MVPREC)))+y
  yFrac = mvLX[1]&(MVPREC-1)
ここで、(xPb,yPb)は、bW*bHサイズのブロックの左上座標、x=0…bW-1、y=0…bH-1であり、MVPRECは、mvLXの精度(1/MVPREC画素精度)を示す。例えばMVPREC=16である。
 動き補償部3091は、参照ピクチャrefImgに補間フィルタを用いて水平補間処理を行うことで、一時的画像temp[][]を導出する。以下のΣはk=0..NTAP-1のkに関する和、shift1は値のレンジを調整する正規化パラメータ、offset1=1<<(shift1-1)である。
  temp[x][y] = (ΣmcFilter[xFrac][k]*refImg[xInt+k-NTAP/2+1][yInt]+offset1)>>shift1
 続いて、動き補償部3091は、一時的画像temp[][]を垂直補間処理により、補間画像Pred[][]を導出する。以下のΣはk=0..NTAP-1のkに関する和、shift2は値のレンジを調整する正規化パラメータ、offset2=1<<(shift2-1)である。
  Pred[x][y] = (ΣmcFilter[yFrac][k]*temp[x][y+k-NTAP/2+1]+offset2)>>shift2
 なお、双予測の場合、上記のPred[][]をL0リスト、L1リスト毎に補間画像PredL0[][]とPredL1[][]を導出し、PredL0[][]とPredL1[][]から補間画像Pred[][]を生成する。
 (GPM合成部30952)
 GPM合成部30952は、一時的予測画像predSamplesLA、predSamplesLBと、角度変数により導出される重みパラメータを用いて予測画像を導出する。一時的予測画像predSamplesLA、predSamplesLBは、動き補償部3091が上記動き情報(mvX, refIdxX, predListFlagX, X=A or B)を用いて生成した予測画像である。
 GPM合成部30952は、予測画素値pbSampleを以下の手順で導出する。ここで、nCbW=cbWidth、nCbH=cbHeightである。
 次に、GPM合成部30952は、以下のように、変数nW、nH、shift1、offset1、displacementX、displacementY、partFlipおよびshiftHorを導出する。
 nW = (cIdx==0) ? nCbW : nCbW * SubWidthC
 nH = (cIdx==0) ? nCbH : nCbH * SubHeightC
 shift1 = Max(5, 17 - BitDepth)
 offset1 = 1 << (shift1 - 1)
 displacementX = angleIdx
 displacementY = (angleIdx + 8) % 32
 partFlip = (angleIdx>=13 && angleIdx<=27) ? 0 : 1
 shiftHor = (angleIdx%16==8 || (angleIdx%16!=0 && nH>=nW)) ? 0 : 1
 GPM合成部30952は、以下のように、offsetXおよびoffsetYを導出する。
 if (shiftHor == 0) {
 offsetX = (-nW) >> 1
 offsetY = ((-nH) >> 1) + (angleIdx<16? (distanceIdx * nH) >> 3 : -((distanceIdx * nH) >> 3))
 } else //shiftHor ==1
 {
 offsetX = ((-nW) >> 1) + (angleIdx<16? (distanceIdx * nW) >> 3 : -((distanceIdx * nW) >> 3))
 offsetY = (-nH) >> 1
 }
 GPM合成部30952は、以下のステップに従って、予測画素pbSamplesを導出する。
 1)GPM合成部30952は、CU内の座標(x, y)から一般化座標(xL, yL)を導出する。
  xL = (cIdx==0) ? x : x * SubWidthC
  yL = (cIdx==0) ? y : y * SubHeightC
 2)GPM合成部30952は、図9(b)に示すdisLutを用いて、以下のように、CU内の座標に応じた重み係数wValueを算出する。
  weightIdx = (((xL + offsetX) << 1) + 1) * disLut[displacementX] + (((yL + offsetY) << 1) + 1) * disLut[displacementY]
  weightIdxL = partFlip ? 32 + weightIdx : 32 - weightIdx
  wValue = Clip3(0, 8, (weightIdxL + 4) >> 3)
 3)GPM合成部30952は、以下のように、pbSampleの値を導出する。
  pbSamples[x][y] = Clip3(0, (1 << BitDepth) - 1, (predSamplesLA[x][y] * wValue + predSamplesLB[x][y] * (8 - wValue) + offset1) >> shift1)
 (イントラ予測を用いるGPMモード)
 上記GPMモードにおいて、GPM合成部30952は、イントラ予測画像とインター予測画像の重み付き和によって予測画像を生成してもよい。すなわち上記predSamplesLAもしくはpredSamplesLBの一方はイントラ予測画像predSamplesIntra、他方がインター予測画像predSamplesInterであってもよい。
  pbSamples[x][y] = Clip3(0, (1 << BitDepth) - 1, (predSamplesIntra[x][y] * wValue + predSamplesIner[x][y] * (8 - wValue) + offset1) >> shift1)
このときciip_flag[x0][y0]が0、すなわち、GPMモードが利用される場合に、CU復号部3022は、符号化データからmerge_gpm_intra_flagを復号し、merge_gpm_intra_flagが真の場合にさらに符号化データからIntraPredModeを復号してもよい。
また、2つの予測画像ともにイントラ予測を許す構成であってもよい。このときCU復号部3022は、merge_gpm_intra_flag0及びmerge_gpm_intra_flag1を復号する。merge_gpm_intra_flag0及びmerge_gpm_intra_flag1は各予測画像predSamplesLA、predSamplesLBがイントラ予測によって導出されるか否かを示すフラグである。
 (IntraInter合成処理)
 IntraInter合成部30951は、ciip_modeが1の場合に、CIIPモードの予測画像を生成する。例えば、インター予測画像とイントラ予測画像の重み付け和により予測画像predSamplesComb[x][y]を生成する。
 predSamplesComb[x][y] =(wIntra * predSamplesIntra[x][y]
            +(4 - wIntra)*predSamplesInter[x][y] + 2)>> 2
 ここで、predSamplesIntra[x][y]はイントラ予測画像で、planar予測であってもよい。predSamplesInter[x][y]は、インター予測画像である。IntraInter合成部30951は、対象ブロックの左隣接ブロックと上隣接ブロックの予測モードに応じてイントラ予測画像の重みwIntraを導出してもよい。
 wIntra = 3 (左ブロックと上ブロックのCuPredModeが両方ともPRED_INTRA)
 wIntra = 2 (左ブロックと上ブロックのCuPredModeの一方がPRED_INTRA)
 wIntra = 1 (それ以外、左と上のCuPredModeが両方ともPRED_INTRAではない)
 また、IntraInter合成部30951は、対象ブロックのイントラ予測モードと、画素の対象ブロック内位置に応じてwIntraを導出してもよい。
 predSamplesComb[x][y] =(wIntra * predSamplesIntra[x][y]
            +(8 - wIntra)*predSamplesInter[x][y] + 4)>> 3
 if (IntraPredMode == INTRA_PLANAR || IntraPredMode == INTRA_DC || nTbW <= 4 ||nTbH <= 4) // プレーヤ予測もしくはDC予測もしくはブロックサイズが小さい場合
 {
  wIntra = 6 (左ブロックと上ブロックのCuPredModeが両方ともPRED_INTRA)
  wIntra = 4 (左ブロックと上ブロックのCuPredModeの一方がPRED_INTRA)
  wIntra = 2 (それ以外、左と上のCuPredModeが両方ともPRED_INTRAではない)
 } else if (IntraPredMode < DIA_IDX) // 左上45度よりも水平に近いイントラ予測モードの場合
  wIntra = 6 (xC < (nTbW>>2))
  wIntra = 5 (それ以外、かつ、xC < (nTbW>1))
  wIntra = 3 (それ以外、かつ、xC < 3*(nTbW>>2))
  wIntra = 2 (それ以外、xC >= 3*(nTbW>>2))
 } else { // 左上45度よりも垂直に近いイントラ予測モードの場合
  wIntra = 6 (yC < (nTbH>>2))
  wIntra = 5 (それ以外、かつ、yC < (nTbH>1))
  wIntra = 3 (それ以外、かつ、yC < 3*(nTbH>>2))
  wIntra = 2 (それ以外、yC >= 3*(nTbH>>2))
 }
ここで(xC, yC)は対象画素の位置、nTbW、nTbHは対象ブロックの幅と高さ。上記のIntraInter合成部30951は、水平に近いイントラ予測モード(< DIA_IDX)では、対象画素の水平xCが大きくなるにつれて徐々にwIntraの大きさを小さくし、垂直に近いイントラ予測モード(>=DIA_IDX)では、yCが大きくなるにつれて徐々にwIntraの大きさを小さくする。それ以外の場合には、隣接ブロックの予測モードに応じて重みを変更する。つまり、xCとyCに基づいて境界から離れるにつれてイントラ予測画像の重みを小さく、インター予測画像の重みを大きくする。
 (BIO予測)
 BIO部30954は、双予測モードにおいて、2つの予測画像(第1の予測画像及び第2の予測画像)及び勾配補正項を参照して予測画像を生成する。
  (重み予測)
 重み予測部3094は、補間画像PredLXに重み係数を乗算することによりブロックの予測画像を生成する。
 インター予測画像生成部309は生成したブロックの予測画像を加算部312に出力する。
  (イントラ予測画像生成部)
 predModeがイントラ予測モードを示す場合、イントラ予測画像生成部は、イントラ予測パラメータ導出部から入力されたイントラ予測パラメータと参照ピクチャメモリ306から読み出した参照画素を用いてイントラ予測を行う。
 逆量子化・逆変換部311は、パラメータ復号部302から入力された量子化変換係数を逆量子化して変換係数を求める。
 (逆量子化・逆変換)
 図11は、本実施形態の逆量子化・逆変換部311の構成を示すブロック図である。逆量子化・逆変換部311は、スケーリング部31111、逆非分離変換部31121、逆分離変換部31123から構成される。
 逆量子化・逆変換部311は、エントロピー復号部301から入力された量子化変換係数qd[][]をスケーリング部31111によりスケーリング(逆量子化)して変換係数d[][]を求める。この量子化変換係数qd[][]は、符号化処理において、予測誤差に対してDCT(Discrete Cosine Transform、離散コサイン変換)、DST(Discrete Sine Transform、離散サイン変換)等の変換を行い量子化して得られる係数、もしくは、変換後の係数をさらに非分離変換した係数である。逆量子化・逆変換部311は、lfnst_idx!=0の場合、逆非分離変換部31121により逆変換を行う。さらに変換係数について逆DCT、逆DST等の逆周波数変換を行い、予測誤差を算出する。また、lfnst_idx==0の場合、逆非分離変換部31121を行わず、スケーリング部31111によりスケーリングされた変換係数について逆DCT、逆DST等の逆変換を行い、予測誤差を算出する。逆量子化・逆変換部311は予測誤差を加算部312に出力する。
 なお、逆変換及び変換は、対になる処理であるため、変換と逆変換とを互いに置き換えて解釈してもよい。あるいは、逆変換を変換と呼ぶ場合には、変換を順変換と呼んでもよい。例えば、逆非分離変換を非分離変換と呼ぶ場合、非分離変換は順非分離変換と呼んでもよい。また、分離変換を単に変換と呼ぶ。
 (スケーリング部31111の詳細)
 スケーリング部31111は、パラメータ復号部302において導出された量子化パラメータおよびスケーリングファクタを用いて、TU復号部が復号した変換係数に対して係数単位の重みを用いてスケーリングする。
 スケーリングされた変換係数d[x][y]は、逆分離変換部31123もしくは逆非分離変換部31121に伝送される。逆非分離変換部31121は、逆量子化の後、分離変換の前に、変換係数d[][]に対して逆非分離変換を適用する。
 (非分離変換)
 逆非分離変換は、動画像復号装置31において、TUの一部又は全領域の変換係数に対して適用される。逆非分離変換が適用された後、逆非分離変換後の変換係数に対して、逆分離変換(DCT2及びDST7等)が適用される。また、TUを4x4のサブブロックに分割した場合において、左上の所定のサブブロックのみに非分離変換及び逆非分離変換が適用される。TUの幅W、高さHのうち、一方が4であるTUのサイズは、例えば、4×4、8×4、4×8、L×4及び4×L(Lは16以上の自然数)が挙げられる。
 また、分離変換後の変換係数において一部の低周波数成分のみを伝送する技術をRST(Reduced Secondary Transform)変換、もしくはLFNST(Low Frequency Non-Separable-Transform)と呼ぶ。具体的には伝送する非分離変換の変換係数の数nonZeroSizeが分離変換のサイズ((1<<log2StSize)x(1<<log2StSize))以下である場合、LFNSTと呼ぶ。なお、本明細書ではGPM合成部30952が生成した予測画像と原画像との差分に適用される変換を、GPM非分離変換(又はGPM_LFNST)と呼ぶ。以下、逆非分離変換の処理を順に説明する。
 (S2000:非分離変換インデックスの復号)
 図12、図13は、非分離変換のフラグを示すシンタックステーブルの例である。図12は、CUでlfnst_idx、mtx_idxを通知する例を示し、図13はTUでlfnst_idx、mtx_idxを通知する例を示す。lfnst_idxは非分離変換の利用の有無、及び、変換行列を示すインデックスであり、mts_idxは分離変換の変換行列を示すインデックスである。
 TU復号部3024は、符号化データからlfnst_idx、mts_idxを復号する。mts_idxをlfnst_idxのあとに復号し、lfnst_idxが0の場合のみ、mtx_idxを復号する構成であってもよい。つまり、非分離変換を用いない場合(lfnst_idxが0)のみ、mtx_idx!=0で示されるDCT2以外の変換行列を用いる構成でもよい。
 TU復号部3024は、図に示す通り、以下のシンタックステーブルで示す判定に応じてlfnst_idxを復号する。
if(condA && (condB || condC)) lfnst_idx
ここで、condA、condB、condCは下式で導出する。
condA:sps_lfnst_enabled_flag==1 && (IntraSubPartitionsSplitType!=ISP_NO_SPLIT || LfnstDcOnly==0) && LfnstZeroOutSigCoeffFlag==1
condB: CuPredMode[chType][x0][y0]==MODE_INTRA
condC: MergeGpmFlag==1 || ciip_flag
 condAは変換係数のゼロアウト(LfnstZeroOutSigCoeffFlag==1)、かつ非分離変換が利用可能であること、を判定式に含む。condBは、イントラ予測であることを判定式に含む。
 condCは、インター予測(GPM予測かCIIPモード)の判定である。なお、regular_merge_flag==0の場合にGPMモードもしくはCIIPモードを用いる場合にはcondCは以下の判定でもよい。
condC: regular_merge_mode==0
なお、イントラ予測モードでregular_merge_modeが復号されない場合(このときgeneral_merge_flag=0、merge_subblock_flag=0)に、regular_merge_mode = general_merge_flag && !merge_subblock_flagから、regular_merge_mode=0であることを利用して、condBがなくても同じ判定が可能である。つまり、TU復号部3024は、以下の判定を利用してlfnst_idxを復号してもよい。
if(condA && regular_merge_mode==0) lfnst_idxを復号する。
 つまり、TU復号部3024は、イントラ予測、もしくはGPMモードもしくはCIIPモードである場合、lfnst_idxを符号化データから復号してもよい。
 また、TU復号部3024は、イントラ予測の場合にlfnst_idxを用い、イントラ予測以外ではlfnst_idxを用いずにApplyLfnstFlagの値を導出してもよい。
 ApplyLfnstFlag = ((MergeGpmFlag==1) || (CuPredMode==MODE_INTRA && lfnst_idx>0)) ? 1 : 0
以下でもよい。
 ApplyLfnstFlag = (((CuPredMode!=MODE_INTRA && regular_merge_flag == 0) || lfnst_idx>0)) ? 1 : 0
 (変換行列の導出)
 逆非分離変換部31121は、変換処理で用いる変換行列secTransMatrix[][]を導出する。
 具体的には、逆非分離変換部31121は、予測モードがイントラ予測の場合、イントラ予測モードIntraPredModeから、lfnstTrSetIdを導出する。予測モードがGPM予測の場合、GPMの角度インデックスangleIdx(もしくはGPMのモード番号merge_gpm_partition_idx)から、lfnstTrSetIdを導出する。lfnstTrSetIdは、非分離変換の変換行列のセットを示す番号である。なお、lfnstTrSetId=Kに対応する変換行列(もしくは変換行列のセット)を以下MKと呼ぶ。
 図14は、イントラ予測モードにおいて、非分離変換の変換行列に用いるテーブルである。逆非分離変換部31121は、イントラ予測モードIntraPredModeから、図14のテーブルを用いて非分離変換の行列、ここでは変換行列のセット番号(lfnstTrSetId)を導出してもよい。あるいは、以下のようにルックアップテーブルnstSetTableIntraを用いてlfnstTrSetIdを導出してもよい。
 lfnstTrSetIdx = nstSetTableIntra[IntraPredMode]
 nstSetTableIntra[] = {2, 2, 3, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2,, 3, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 1, 2}
 非分離変換は、予め定められた複数の変換行列を用いることができ、イントラ予測モードやGPMのモードから、適切な変換行列を選択することで好適な変換が可能になる。
 以下の例ではルックアップテーブルの場合の処理を記載する。
 逆非分離変換部31121は、非分離変換のセット番号(lfnstTrSetId)、非分離変換の変換行列を示すlfnst_idx、非分離変換サイズnStSize(nTrS)から、変換行列secTransMatrix[][]を導出する。例えば、以下のように導出してもよい。
 secTransMatrix[][] = secTransMatrixTbl[nTrS][lfnstTrSetId][lfnst_idx-1][][]
 以下、非分離変換の処理を順に説明する。
 (S2201:変換サイズ及び入出力サイズの設定)
 逆非分離変換部31121は、TUのサイズ(幅nTbW、高さnTbH)に応じて、変換行列のサイズnStSize(= 1<<log2StSize)、変換行列のサイズの対数値log2StSize、入力変換係数の数nonZeroSize、出力変換係数の数nStOutSizeを導出する。
 例えば、下式で導出してもよい。
  nStOutSize = (nTbW>=16 && nTbH>=16) ? 96 : (nTbW>=8 && nTbH>=8) ? 64 : 16
  log2StSize = (nTbW>=16 && nTbH>=16) ? 4 : (nTbW>=8 && nTbH>=8) ? 3 : 2
また、下式で導出してもよい。
  nStOutSize = (nTbW>=16 && nTbH>=16) ? 96 : (nTbW>=8 && nTbH>=8) ? 32 : 16
  log2StSize = (nTbW>=16 && nTbH>=16) ? 4 : (nTbW>=8 && nTbH>=8) ? 3 : 2
また、下式で導出してもよい。
  nStOutSize = ((nTbW>=8 && nTbH>=8) ? 64 : 16
  log2StSize = ((nTbW>=8 && nTbH>=8) ? 3 : 2
 逆非分離変換部31121は、nonZeroSizeを以下で導出してもよい。
  nonZeroSize = (nTbW>=16 && nTbH>=16) ? 32 : 16
 nonZeroSizeは以下で導出してもよい。
  nonZeroSize = (nTbW>=16 && nTbH>=16) ? 32 : (nTbW==8 && nTbH==8)) ? 8 : 16
 nonZeroSizeは以下で導出してもよい。
  nonZeroSize = (nTbW==4 && nTbH==4) || (nTbW==8 && nTbH==8)) ? 8 : 16
なお、nonZeroSizeは8と16に限定されない。例えば12、32などでもよい。nStOutSizeも16と64に限定されず、32や48、64、96などでもよい。
 例えば、以下でもよい。
nTbW及びnTbHが両方とも8以上の場合、log2StSize=3、nStOutSize=48にセットする。
上記以外の場合、log2StSize=2、nStOutSize=16にセットする。
nTbW及びnTbHが両方とも4の場合、又は共に8の場合、nonZeroSize=8にセットする。
上記以外の場合、nonZeroSize=16にセットする。
上記を式で記載すると下式で表せる。
 nStOutSize = ( nTbW >= 8 && nTbH >= 8 ) ? 48 : 16
 nonZeroSize = ( ( nTbW == 4 && nTbH == 4 ) || (nTbW == 8 && nTbH == 8 ) ) ? 8: 16
 log2StSize = ( nTbW >= 8 && nTbH >= 8 ) ? 3 : 2
 さらにTUのサイズに応じて逆非分離変換を適用するサブブロックの数numStX、numStYを導出してもよい
 numStX = (nTbH==4 && nTbW>8) ? 2 : 1
 numStY = (nTbW==4 && nTbH>8) ? 2 : 1
なお複数のサブブロックに非分離変換を行わず常にnumStX=numStYとしてもよい。
 (S2202:1次元配列に並び替え)
 逆非分離変換部31121は、TUの一部の変換係数d[][]を、1次元配列u[]に並び替える。具体的には、逆非分離変換部31121は、領域RUによって示される対象TUの2次元変換係数d[][]から、x=0..nonZeroSize-1の変換係数を参照して、u[]を導出する。xC、yCはTU上の位置であり、スキャン順を示す配列DiagScanOrderと配列u[]の位置xから導出する。
 xC = (xSbIdx<<log2StSize) + DiagScanOrder[log2StSize][log2StSize][x][0]
 yC = (ySbIdx<<log2StSize) + DiagScanOrder[log2StSize][log2StSize][x][1]
 u[x] = d[xC][yC]
左上サブブロックのみを処理する場合には、
 xC = DiagScanOrder[log2StSize][log2StSize][x][0]
 yC = DiagScanOrder[log2StSize][log2StSize][x][1]
 u[x] = d[xC][yC]
なお、1次元配列にコピーされる範囲を領域RUと呼ぶ。
 (S2203:変換処理の適用)
 逆非分離変換部31121は、長さがnonZeroSizeのu[]に対して、変換行列secTransMatrix[][]を用いた変換を行い、出力として長さがnStOutSizeの一次元配列の係数v[]を導出する。
 v[i] = Clip3(CoeffMin, CoeffMax,Σ(secTransMatrix[i][j]*u[j]+64)>>7)
ここで、Σはj=0..nonZeroSize-1までの和である。また、iは0..nStSize-1に対して処理を行う。CoeffMin、CoeffMaxは変換係数の値の範囲を示す。後述のようにsecTransMatrixとしてsecTransMatrixDCを用いてもよい。
 (S2204:変換処理後の1次元配列の2次元配置)
 逆非分離変換部31121は、変換された一次元配列の係数v[]を再度TU内(d[][])の所定の位置に配置する。具体的には、x = 0..nStSize - 1, y = 0..nStSize - 1に対して以下の処理を行う。
 if (transposeFlag==0)
  d[x][y] = (y<4&&x<0) ? v[x+(y<<log2StSize)] : d[x][y])
 else
  d[x][y] = (x<4&&y<0) ? v[y+(x<<log2StSize)] : d[x][y])
このとき、変換行列導出で用いた対称性に応じて、転置処理を行う。転置処理を行うか否かは、係数転置処理用フラグtransposeFlagにより決定する。
 (イントラ予測の場合の転置フラグ導出)
 予測モードがイントラ予測の場合、逆非分離変換部31121はイントラ予測モードPredModeIntra>34のとき、transposeFlag=1に設定し、PredModeIntra<=34のとき、transposeFlag=0に設定する。PredModeIntraは図10に示す予測方向である。
 逆非分離変換部31121は、GPM予測の場合には、merge_gpm_partition_idxに応じてtransposeFlagを設定する。例えば、merge_gpm_partition_idx<=13、もしくは、merge_gpm_partition_idx>46のとき、transposeFlag=1に設定し、13<merge_gpm_partition_idx<=46のとき、transposeFlag=0に設定する。また、angleIdxから導出してもよい。
 transposeFlag = (0<angleIdx-4 && angleIdx-4<=16) ? 0 : 1
 nStOutSize==64(64係数)の場合には、逆非分離変換部31121は、以下の処理を行ってもよい。
 if (transposeFlag==0)
  d[x][y] = (x<8&&y<8) ? v[x+(y<<log2StSize)] : d[x][y]
 else
  d[x][y] = (x<8&&y<8) ? v[y+(x<<log2StSize)] : d[x][y]
 nStOutSize==96(96係数)の場合には、逆非分離変換部31121は、以下の処理を行ってもよい。
 if (transposeFlag==0)
  d[x][y] = (y<4) ? v[x+(y<<log2StSize)] : (y<8) ? v[x+48+((y-4)<<3)] : (y<12) ? v[x+80+((y-8)<<2)] : d[x][y])
 else
  d[x][y] = (x<4) ? v[y+(x<<log2StSize)] : (x<8) ? v[y+48+((x-4)<<3] : (x<12) ? v[y+80+((x-8)<<2)] : d[x][y])
 さらに、nStOutSize == 48(48係数)の場合には、逆非分離変換部31121は、以下の処理を行ってもよい。
 if (transposeFlag==0)
  d[x][y] = (y<4) ? v[x+(y<<log2StSize)] : ((x<4) ? v[32+x+((y-4)<<2)] : d[x][y])
 else
  d[x][y] = (x<4) ? v[y+(x<<log2StSize)] : ((y<4) ? v[32+y+((x-4)<<2)] : d[x][y])
 <予測モードに応じて非分離変換を切り替える構成>
 図15は、予測モードに応じて非分離変換を切り替える処理を示すフローチャートである。
 (S2230) 予測モードに応じて、S2231もしくはS2232に遷移する。イントラ予測のような変換係数の数が多い予測モードではS2231に遷移し、変換係数が少ないインター予測の場合、S2232に遷移することが好ましい。また、対象ブロックの隣接画素以外を参照画素として用いるインター予測などではDC成分とAC成分の相関が低い。このような場合に、S2232に遷移し、それ以外の場合にS2231に遷移してもよい。例えば、図示するようにイントラ予測の場合に、S2231に遷移し、それ以外の場合にS2232に遷移してもよい。なお、イントラ予測モードもしくはCIIPモードの場合にS2231に遷移し、それ以外の場合にS2232に遷移してもよい。また、イントラ予測モードもしくはCIIPモードもしくはイントラ予測を用いるGPMの場合にS2231に遷移し、それ以外の場合にS2232に遷移してもよい。
 (S2231) 逆非分離変換部31121は、特定周波数成分(DC成分)を含む変換係数に対して非分離変換を行う。
 (S2232) 逆非分離変換部31121は、特定周波数成分(DC成分)を「保存する」ように変換係数に対して非分離変換を行う。ここで「保存する」とは、値を変化させない、ことをいう。ただし、極性を反転させる場合も、「保存する」に含めてもよい。例えば、特定周波数成分(DC成分)を除く変換係数に対して、非分離変換を行ってもよい。例えば、特定周波数成分(DC成分)を含む変換係数に対して非分離変換を行うが、DC成分を変化させないような変換行列を用いてもよい。
 上記構成によれば、非分離変換部31121は、変換係数の特定の周波数成分を変化させないことを特徴とする。また、逆非分離変換部31121は、左上成分(例えばブロック内座標xC==0かつyC==0)であるDC成分を変化させない構成でもよい。インター予測の場合に、特定の周波数成分を変化させない構成でもよい。また、図示するように逆非分離変換部31121は、対象ブロックの予測モードがインター予測の場合に、左上成分であるDC成分を変化させない構成でもよい。
 上記構成によれば、インター予測のようなDCT2、DST7などの周波数変換で特定周波数(例えばDC成分)に非ゼロ変換係数が集中し、非ゼロ係数の数が少ない場合においても非分離変換の効果を得ることができ、符号化効率を向上させる効果を奏する。すなわち、特定周波数に集中した非ゼロ変換係数を、非分離変換によって特定周波数以外の係数に分散させる(集中度を逆に減らす)ことを防ぐことができる。対象ブロックの付近にある隣接画素から予測を行うイントラ予測では、DC係数の残差とAC係数の残差の間には相関があり、DC係数とAC係数間の非分離変換は効果的である。しかし、異なる時間、レイヤにある画像から予測を行うインター予測の場合、DCオフセットと呼ばれる輝度や色差の変化があり、DC係数の残差とAC係数の残差の間の相関が不定である。このような場合にDC成分を保存する非分離変換により符号化効率を向上させる効果を奏する。
 <非分離変換においてDC成分を除く成分を変換する構成>
 非分離変換において最低次の変換係数であるDC成分の値をそのまま出力し、DC成分を除く成分(AC成分)を変換する構成を説明する。構成としてDC係数を除いて変換する方法と、DC係数を変化させない変換行列を用いて変換する構成がある。また、逆非分離変換部31121は、DC成分を除外して一次元配列を導出し、一次元配列に変換を行ってもよい(構成1、構成2)。逆非分離変換部31121は、左上成分を除く左端成分と上端成分が0である変換行列を用いてもよい(構成3)。以下の構成によれば、異なる時間の画素からの予測の場合、あるいは、DC係数の残差とAC係数の残差の間の相関が不定の場合、DC係数の相関を用いない。DC成分を保存する非分離変換は符号化効率を向上させる効果を奏する。
 <DC成分を除く非分離変換の構成1>
 図16は、DC変換を保存する逆非分離変換の動作の一構成を示す図である。
 図示するように、逆非分離変換部31121は、すでに説明したS2201~S2204のうち、S2202、S2204を変更することで、DC成分以外の逆非分離変換処理を行う。
 (S2202NonDC:1次元配列に並び替え)
 逆非分離変換部31121は、TUの一部の変換係数d[][]を、1次元配列u[]に並び替える。具体的には、逆非分離変換部31121は、領域RUによって示される対象TUの2次元変換係数d[][]から、x=1..nonZeroSize-1の変換係数を参照して(スキャン順の先頭成分x==0を除く成分から)、u[]を導出する。xC、yCはTU上の位置であり、スキャン順を示す配列DiagScanOrderと配列u[]の位置xから導出する。
 xC = (xSbIdx<<log2StSize) + DiagScanOrder[log2StSize][log2StSize][x][0]
 yC = (ySbIdx<<log2StSize) + DiagScanOrder[log2StSize][log2StSize][x][1]
 u[x-1] = d[xC][yC]
左上サブブロックのみを処理する場合には、
 xC = DiagScanOrder[log2StSize][log2StSize][x][0]
 yC = DiagScanOrder[log2StSize][log2StSize][x][1]
 u[x-1] = d[xC][yC]
ここでは、スキャン位置を、x=1..nonZeroSize-1として、DC成分を除く残差から一次元配列u[x]を導出する。S2203に示すように、逆非分離変換部31121は変換行列を用いてu[x]をv[]に変換する。
 (S2204NonDC:変換処理後の1次元配列の2次元配置)
 逆非分離変換部31121は、変換された一次元配列の係数v[]を再度TU内(d[][])の所定の位置に配置する。具体的には、x = 0..nStSize-1, y = 0..nStSize-1に対して以下の処理を行う。DCの位置d[0][0]の値を変更しないことが特徴である。
 if (transposeFlag==0)
  d[x][y] = ((x!=0 || y!=0) && y<4 && x<0) ? v[x-1+(y<<log2StSize)] : d[x][y])
 else
  d[x][y] = ((x!=0 || y!=0) && x<4 && y<0) ? v[y-1+(x<<log2StSize)] : d[x][y])ここでは、DC成分以外(x!=0 || y!=0)の場合にv[]を選択し、それ以外の場合(x==0 && y==0)にはそのままd[x][y]を用いる。(x!=0 || y!=0)の判定は(x+y!=0)を用いてもよい。また"!=0 "は">0"を用いてもよい。また、x = 0..nStSize-1, y = 0..nStSize-1で1次元配列v[]から2次元配列d[][]への割り当ての際に、x=0,y=0を除いて割り当てを行ってもよい(x=0,y=0を除いて走査してもよい)。
 <DC成分を除く非分離変換の構成2>
 図17は、DC変換を保存する逆非分離変換の動作の別の構成を示す図である。
 図示するように、逆非分離変換部31121は、すでに説明したS2201~S2204のうち、S2203を変更することで、DC成分以外の逆非分離変換処理を行う。
 (S2203KeepDC:変換処理の適用)
 逆非分離変換部31121は、長さがnonZeroSizeのu[]に対して、変換行列secTransMatrix[][]を用いた変換を行い、出力として長さがnStOutSizeの一次元配列の係数v[]を導出する。DCの位置v[0]の値を変更しないこと(v[0]=u[0])が特徴である。
 v[i] = u[i] (i==0)
 v[i] = Clip3(CoeffMin, CoeffMax,Σ(secTransMatrix[i][j]*u[j]+64) >> 7) (i!=0)
ここで、Σはj=1..nonZeroSize-1までの和である。また、iは1..nStSize-1に対して処理を行う。また以下(i=0..nStSize-2、j=0..nonZeroSize-2)でもよい。
 v[i+1] = Clip3(CoeffMin, CoeffMax,Σ(secTransMatrix[i][j]*u[j+1]+64) >> 7) (i!=0)
 上記では、DCの位置(i==0)ではそれ以外の位置とは別の動作を行うことでDCの値を変更しない構成を示したが、DCの値を変更しないような行列secTransMatrixDCを用いてもよい。
 <DC成分を除く非分離変換の構成3>
 図18は、DC変換を保存する変換を示す図である。図示するように、逆非分離変換部31121は、すでに説明したS2201~S2204のうち、S2203に用いる行列を所定の特徴をもつsecTransMatrixDCとすることにより、DC値を保存する逆非分離変換を行う。
 具体的には、図の(a)に示すように、secTransMatrixDCは、左上成分の値を1<<shiftVal(たとえばshiftVal=7)、上端の列の成分を0、左端の列の成分を0と設定した変換行列である。secTransMatrixDCを用いることにより、非分離変換の変換・逆変換において、入力ベクトルの先頭(DC)成分に対してIdentical変換を適用することができる。
 secTransMatrixDC[0][0] = 1 << shiftVal
 secTransMatrixDC[i][0] = 0 (i=0..nStSize-1)
 secTransMatrixDC[0][j] = 0 (j=0..nonZeroSize-1)
ここで、secTransMatrixDCとsecTransMatrixDCの転置行列の積は単位行列の整数倍(1<<(shiftVal+1))であってもよい。
 あるいは、図の(b)に示すように、secTransMatrixDCは、左上を(1<<shiftVal)-1(たとえばshiftVal=7)、上端の列を0、左端の列を0と設定した変換行列である。secTransMatrixDCを用いることにより、非分離変換の変換・逆変換において、入力ベクトルの先頭(DC)成分に対してIdentical変換を適用することができる。
 secTransMatrixDC[0][0] = (1 << shiftVal)-1
 secTransMatrixDC[i][0] = 0 (i=0..nStSize-1)
 secTransMatrixDC[0][j] = 0 (j=0..nonZeroSize-1)
 通常、符号付き変数は-128から127(-2^shiftValから2^shiftVal-1)のような範囲を用いるので、上記のように、(1<<shiftVal)-1の値(たとえば127)を用いることで1bitの値のレンジを減らし、乗算処理の負荷を軽減させることができる。
 また、図の(c)に示すように-(1<<shiftVal)の値(たとえば-128)を用いてもよい。この場合、非分離変換と逆非分離変換の処理の前後でDC値においてv[0]=-u[0]のように符号が反転するが、符号化装置で符号反転した係数が、復号装置で再度符号反転して同じ値になるので問題ない。
 secTransMatrixDC[0][0] = -(1 << shiftVal)
 secTransMatrixDC[i][0] = 0 (i=0..nStSize-1)
 secTransMatrixDC[0][j] = 0 (j=0..nonZeroSize-1)
この場合も、1bitの値のレンジを減らし、乗算処理の負荷を軽減させることができる。
 (非分離変換処理の詳細)
<CIIPモードで、LFNST変換を行う例>
 以下、CIIPモード(もしくはイントラ予測画像を用いるGPMモード)で、LFNST変換を行う例において、非分離変換の変換行列を規定するlfnstTrSetIdの導出方法を説明する。
 図19は、CIIPモードにおいてLFNSTを行う処理のフローチャートを示す。
 (S2101) 非分離変換する場合(ApplyLfnstFlag!=0)、S2102Aに遷移する。ApplyLfnstFlagはLFNSTを行うか否かを示すフラグである。ApplyLfnstFlagが1の場合(0より大きい場合、あるいは、0以外の場合)、LFNST(非分離変換)を行い、それ以外では、非分離変換をスキップして、S2300に遷移し分離変換を行う。なお、輝度のみに非分離変換をかける場合などは、ApplyLfnstFlagを利用して非分離変換を行うかの判定をしてもよい。
 if (treeType == SINGLE_TREE or DUAL_TREE_LUMA)
  ApplyLfnstFlag[0] = (lfnst_idx>0) ? 1 : 0
 else
  ApplyLfnstFlag[cIdx] = (lfnst_idx>0 && treeType==DUAL_TREE_CHROMA) ? 1 : 0
ここでtreeTypeは、SINGLE_TREE、DUAL_TREE_LUMA、DUAL_TREE_CHROMAのいずれかであり、cIdxは輝度で0、色差で1または2の変数である。
 (S2102A)  イントラ予測モードの場合には、S2103Aに遷移する。
 (S2103A) イントラ予測モードの場合には、IntraPredModeからlfnstTrSetIdを導出する。また、lfnstTrSetId、ブロックサイズ、lfnst_idxから変換行列secTransMatrix[][]を導出する。
 (S2102C) イントラ予測モードでない場合、S2102Cに遷移し、CIIPモードであるか否かの判定(ciip_flag!=0)を行う。この判定は、CIIPモードであるか、または、イントラ予測を用いたGPMであるかの判定であってもよい。CIIPモードでない場合(かつイントラ予測を用いたGPMではない場合)、非分離変換をスキップして、S2300に遷移し分離変換を行う。
 (S2103C) IntraPredModeからlfnstTrSetIdを導出する。また、lfnstTrSetId、ブロックサイズ、lfnst_idxから変換行列secTransMatrix[][]を導出する。IntraPredModeは、CIIPモードやイントラ予測を用いるGPMモードの場合、イントラ予測画像の導出に用いる。
 (S2200) 逆非分離変換部31121は、変換行列secTransMatrix[][]を用いて非分離変換を行う。具体的には上述のS2201からS2204の処理を行ってもよい。また、イントラ予測の非分離変換とインター予測(CIIPモードまたはGPMモード)の非分離変換では、異なる変換行列を用いても良い。また、CIIPモードまたはGPMモードの非分離変換において、DC成分を除くあるいは保存する非分離変換(上述の構成1、構成2、構成3)を用いてもよい。
 (S2300) 逆分離変換部31123は、非分離変換された変換係数もしくは非分離変換されていない変換係数に対して分離変換を行う。
 上記の構成によれば、イントラ予測に近い予測画像を生成するCIIPモードにおいても非分離変換を行うため、符号化効率を向上させる効果を奏する。さらに、CIIPモードに限定せず、予測モードがCIIPモードかイントラ予測を用いるGPMモードの場合に、非分離変換を行ってもよい。予測モードがCIIPモードか、あるいは、イントラ予測を用いるGPMモードであるかは以下のgeneralizedIntraInterにより判定してもよい。
generalizedIntraInter = ciip_flag[x0][y0] || merge_gpm_intra_flag0 || merge_gpm_intra_flag1
あるいは、以下のように導出してもよい。
generalizedIntraInter = ciip_flag[x0][y0] || merge_gpm_intra_flag
 インター予測の場合、lfnst_idxを復号せず常に非分離変換処理を行ってもよい。図20は、対象ブロックがインター予測の場合(CuPredMode!=MODE_INTRA)でLFNST処理を行う構成を示すフローチャートである。
 (S3111)予測モードがイントラモードであるか否かを判定する。YES(予測モードがイントラモード)の場合、S3112Aに遷移する。NO(予測モードがインターモード)の場合、S3112Cに遷移する。イントラモードの判定は、CuPredMode!=MODE_INTRAで判定してもCuPredMode=MODE_INTERを用いて判定してもよい。
 (S3112A) 予測モードがイントラ場合において、非ゼロ変換係数の数が少なくない(例えばDC係数のみを示すフラグLfnstDcOnly == 0)かつ所定の高周波数領域の変換係数の値がすべて0である(LfnstZeroOutSigCoeffFlag==1)かを判定する。判定がYESであれば、S3113Bに遷移する。
 (S3112B) 予測モードがイントラモード、かつ、非分離変換を行う場合にはlfnst_idxを符号化データから復号する。
 (S3112C) 予測モードがインターモードの場合、非ゼロ変換係数の数が少なくない(例えばDC係数のみを示すフラグLfnstDcOnly == 0)かつ所定の高周波数領域の変換係数の値がすべて0である(LfnstZeroOutSigCoeffFlag==1)かを判定する。判定がYESであれば、S3113に遷移する。このときlfnst_idxには非0の値をinferする。
 (S3113)逆非分離変換部31121は、非分離変換を行う。非分離変換で用いる変換行列の導出方法については別に説明する。
 なお、(S3112C)では、符号化データから導出せずにインター予測の場合にはlfnst_idxの値を導出したが、以下のようにApplyLfnstFlagをTRUEに設定してもよい。
 ApplyLfnstFlag = (lfnstDcOnly==0 && LfnstZeroOutSigCoeffFlag==1) ? 1 : 0
ここでLfnstZeroOutSigCoeffFlagはゼロアウト領域の非ゼロ変換係数の有無を示すフラグであり、TRUEの場合にゼロアウト領域に非ゼロ係数がないことを示す。
 さらに、lfnst_idxをインター予測でも復号し、lfnst_idx>0の場合にLFNSTを行う構成であってもよい。この場合、以下で導出する。
 ApplyLfnstFlag = (lfnstDcOnly==0 && LfnstZeroOutSigCoeffFlag==1 && lfnst_idx>0) ? 1 : 0
 イントラ予測の場合も考慮して、以下のようにApplyLfnstFlagを導出してもよい。
 ApplyLfnstFlag = (lfnstDcOnly==0 && LfnstZeroOutSigCoeffFlag==1) && (CuPredMode!=MODE_INTER || (CuPredMode!=MODE_INTRA && lfnst_idx>0)) ? 1 : 0
なお、lfnst_idxが符号化データに現れない場合には、lfnst_idxを0と推定(infer)してもよい。
 さらに、lfnst_idx>0の場合には、常にLFNSTを行うこととし、ApplyLfnstFlagを以下のように導出してもよい。
 ApplyLfnstFlag = (CuPredMode==MODE_INTER && LfnstZeroOutSigCoeffFlag==1 && lfnstDcOnly==0) || (lfnst_idx>0)) ? 1 : 0
なお、上記ApplyLfnstFlag = (CuPredMode==MODE_INTER && LfnstZeroOutSigCoeffFlag==1 && lfnstDcOnly==0) || lfnst_idx>0)のCuPredMode==MODE_INTERは、CuPredMode!=MODE_INTRAであってもよい。
 図21は対象ブロックがインター予測の場合(CuPredMode!=MODE_INTRA)でLFNST処理を行う構成を示すフローチャートである。
 (S3111)予測モードがイントラモードであるか否かを判定する。NOの場合(予測モードがインターモードの場合)には、S3112に遷移する。イントラモードの判定は、CuPredMode!=MODE_INTRAやCuPredMode=MODE_INTERを用いて判定してもよい。
 (S3112) 予測モードがインターモードの場合、非ゼロ変換係数の数が少なくない(例えばDC係数のみを示すフラグLfnstDcOnly == 0)かつ所定の高周波数領域の変換係数の値がすべて0である(LfnstZeroOutSigCoeffFlag==1)かを判定する。判定がYESであれば、S3113に遷移する。それ以外では、LFNST処理を行わない。また、(S3112)の判定は、(LfnstDcOnly==0) && (LfnstZeroOutSigCoeffFlag==1) && AddCondInterLfnstを用いてもよい。AddCondInterLfnstは対象ブロックのブロックサイズが所定の範囲内にあるか、あるいは、輝度であるか否か等を示すフラグである。LfnstDcOnlyは、DC係数のみが含まれることを示すフラグである。
 (S3113)逆非分離変換部31121は、非分離変換を行う。非分離変換で用いる変換行列の導出方法については別に説明する。
 上記の構成によれば、予測モードがインターモード、かつ、変換係数がDCのみである場合にLFNSTを行わない。従って、LFNST変換をDC係数に適用することで、すでに1係数位置(DC)に集中している変換係数を分散させ、不要な周波数制限を発生させるような無駄を減らすことができる。
 なお、CU復号部3022、CU符号化部1112は以下の条件式によりApplyLfnstFlagを導出し、ApplyLfnstFlagを用いてLFNSTを行うか否かを判定する構成としてもよい。
 ApplyLfnstFlag = (CuPredMode==MODE_INTER && LfnstDcOnly == 0 && LfnstZeroOutSigCoeffFlag==1) || (lfnst_idx>0)) ? 1 : 0
また、以下のように符号化データ中にlfnst_idxが現れない場合の処理としてlfnst_idxを導出し、lfnst_idxからApplyLfnstFlagを導出しても良い。符号化データ中にlfnst_idxが現れない場合、以下によりlfnst_idxを導出する。
 lfnst_idx = (CuPredMode==MODE_INTER && LfnstDcOnly == 0 && LfnstZeroOutSigCoeffFlag==1) ? 1 : 0
 (ゼロアウトに応じて非分離変換を行う構成2、GPM予測の構成)
 GPM予測の場合、lfnst_idxを復号せず常に非分離変換処理を行う構成を説明する。この構成では、GPM予測で変換係数がゼロアウトされている場合に、ApplyLfnstFlagをTRUEに設定する。
 ApplyLfnstFlag = ((MergeGpmFlag==1 && LfnstZeroOutSigCoeffFlag==1) || (CuPredMode!=MODE_INTRA && lfnst_idx>0))) ? 1 : 0
また、以下のように導出してもよい。
 ApplyLfnstFlag = ((MergeGpmFlag==1 && LfnstZeroOutSigCoeffFlag==1) || lfnst_idx>0)) ? 1 : 0
 逆非分離変換部はApplyLfnstFlagが0以外の場合、逆非分離変換を行う。
 加算部312は、予測画像生成部308から入力されたブロックの予測画像と逆量子化・逆変換部311から入力された予測誤差を画素毎に加算して、ブロックの復号画像を生成する。加算部312はブロックの復号画像を参照ピクチャメモリ306に記憶し、また、ループフィルタ305に出力する。
  (動画像符号化装置の構成)
 次に、本実施形態に係る動画像符号化装置11の構成について説明する。図22は、本実施形態に係る動画像符号化装置11の構成を示すブロック図である。動画像符号化装置11は、予測画像生成部101、減算部102、変換・量子化部103、逆量子化・逆変換部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、パラメータ符号化部111、予測パラメータ導出部120、エントロピー符号化部104を含んで構成される。
 予測画像生成部101はCU毎に予測画像を生成する。予測画像生成部101は既に説明したインター予測画像生成部309とイントラ予測画像生成部を含んでおり、説明を省略する。
 減算部102は、予測画像生成部101から入力されたブロックの予測画像の画素値を、画像Tの画素値から減算して予測誤差を生成する。減算部102は予測誤差を変換・量子化部103に出力する。
 変換・量子化部103は、減算部102から入力された予測誤差に対し、周波数変換によって変換係数を算出し、量子化によって量子化変換係数を導出する。変換・量子化部103は、量子化変換係数をパラメータ符号化部111及び逆量子化・逆変換部105に出力する。
 変換・量子化部103は、分離変換部(第1の変換部)と、非分離変換部(第2の変換部)と、スケーリング部と、を備えている。
 分離変換部は、予測誤差に分離変換を適用する。lfnst_idxが0でない場合、非分離変換部は非分離変換行う。スケーリング部は、変換係数に対して、量子化マトリックスによるスケーリングを行う。
 変換・量子化部103は具体的に以下の処理を行う。
 S1:分離変換部は分離変換を行う。
 S2:非分離変換部は、非分離変換が有効(lfnst_idx!=0)か否かを判定する。
 S3:非分離変換が有効である場合、非分離変換部は非分離変換(順非分離変換)を行う。
 S3B:非分離変換が有効ではない場合、非分離変換部は非分離変換(順非分離変換)を行わない。
 S4:スケーリング部は変換係数に対して、量子化マトリックスによるスケーリングを行う。
 (順)非分離変換は、逆非分離変換とほぼ等しい処理を行う。
 逆量子化・逆変換部105は、動画像復号装置31における逆量子化・逆変換部311と同じであり、説明を省略する。算出した予測誤差は加算部106に出力される。
 パラメータ符号化部111は、ヘッダ符号化部1110、CT情報符号化部1111、CU符号化部1112(予測モード符号化部)を備えている。CU符号化部1112はさらにTU符号化部1114を備えている。以下、各モジュールの概略動作を説明する。
 ヘッダ符号化部1110はヘッダ情報、分割情報、予測情報、量子化変換係数等のパラメータの符号化処理を行う。
 CT情報符号化部1111は、QT、MT(BT、TT)分割情報等を符号化する。
 CU符号化部1112はCU情報、予測情報、分割情報等を符号化する。
 TU符号化部1114は、TUに予測誤差が含まれている場合に、QP更新情報と量子化予測誤差を符号化する。
 CT情報符号化部1111、CU符号化部1112は、インター予測パラメータ(predMode、merge_flag、merge_idx、inter_pred_idc、refIdxLX、mvp_LX_idx、mvdLX)、イントラ予測パラメータ、量子化変換係数等のシンタックス要素をパラメータ符号化部111に供給する。
 エントロピー符号化部104には、パラメータ符号化部111から量子化変換係数と符号化パラメータ(分割情報、予測パラメータ)が入力される。エントロピー符号化部104はこれらをエントロピー符号化して符号化ストリームTeを生成し、出力する。
 予測パラメータ導出部120は、インター予測パラメータ符号化部112、イントラ予測パラメータ符号化部を含む手段であり、符号化パラメータ決定部110から入力されたパラメータからイントラ予測パラメータ及びイントラ予測パラメータを導出する。導出されたイントラ予測パラメータ及びイントラ予測パラメータは、パラメータ符号化部111に出力される。
  (インター予測パラメータ符号化部の構成)
 インター予測パラメータ符号化部112は図23に示すように、パラメータ符号化制御部1121、インター予測パラメータ導出部303を含んで構成される。インター予測パラメータ導出部303は動画像復号装置と共通の構成である。パラメータ符号化制御部1121は、マージインデックス導出部11211とベクトル候補インデックス導出部11212を含む。
 マージインデックス導出部11211は、マージ候補等を導出し、インター予測パラメータ導出部303に出力する。ベクトル候補インデックス導出部11212は予測ベクトル候補等を導出し、インター予測パラメータ導出部303とパラメータ符号化部111に出力する。
  (イントラ予測パラメータ符号化部の構成)
 イントラ予測パラメータ符号化部は、パラメータ符号化制御部とイントラ予測パラメータ導出部を備える。イントラ予測パラメータ導出部は動画像復号装置と共通の構成である。
 ただし、動画像復号装置と異なり、インター予測パラメータ導出部303、イントラ予測パラメータ導出部への入力は符号化パラメータ決定部110、予測パラメータメモリ108であり、パラメータ符号化部111に出力する。
 加算部106は、予測画像生成部101から入力された予測ブロックの画素値と逆量子化・逆変換部105から入力された予測誤差を画素毎に加算して復号画像を生成する。加算部106は生成した復号画像を参照ピクチャメモリ109に記憶する。
 ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ、SAO、ALFを施す。なお、ループフィルタ107は、必ずしも上記3種類のフィルタを含まなくてもよく、例えばデブロッキングフィルタのみの構成であってもよい。
 予測パラメータメモリ108は、符号化パラメータ決定部110が生成した予測パラメータを、対象ピクチャ及びCU毎に予め定めた位置に記憶する。
 参照ピクチャメモリ109は、ループフィルタ107が生成した復号画像を対象ピクチャ及びCU毎に予め定めた位置に記憶する。
 符号化パラメータ決定部110は、符号化パラメータの複数のセットのうち、1つのセットを選択する。符号化パラメータとは、上述したQT、BTあるいはTT分割情報、予測パラメータ、あるいはこれらに関連して生成される符号化の対象となるパラメータである。予測画像生成部101は、これらの符号化パラメータを用いて予測画像を生成する。
 符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化誤差を示すRDコスト値を算出する。RDコスト値は、例えば、符号量と二乗誤差に係数λを乗じた値との和である。符号量は、量子化誤差と符号化パラメータをエントロピー符号化して得られる符号化ストリームTeの情報量である。二乗誤差は、減算部102において算出された予測誤差の二乗和である。係数λは、予め設定されたゼロよりも大きい実数である。符号化パラメータ決定部110は、算出したコスト値が最小となる符号化パラメータのセットを選択する。符号化パラメータ決定部110は決定した符号化パラメータをパラメータ符号化部111と予測パラメータ導出部120に出力する。
 なお、上述した実施形態における動画像符号化装置11、動画像復号装置31の一部、例えば、エントロピー復号部301、パラメータ復号部302、ループフィルタ305、予測画像生成部308、逆量子化・逆変換部311、加算部312、予測パラメータ導出部320、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化・逆変換部105、ループフィルタ107、符号化パラメータ決定部110、パラメータ符号化部111、予測パラメータ導出部120をコンピュータで実現するようにしても良い。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現しても良い。なお、ここでいう「コンピュータシステム」とは、動画像符号化装置11、動画像復号装置31のいずれかに内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
 また、上述した実施形態における動画像符号化装置11、動画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。動画像符号化装置11、動画像復号装置31の各機能ブロックは個別にプロセッサ化しても良いし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。
 以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。
 本発明の実施形態は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
 本発明の実施形態は、画像データが符号化された符号化データを復号する動画像復号装置、および、画像データが符号化された符号化データを生成する動画像符号化装置に好適に適用することができる。また、動画像符号化装置によって生成され、動画像復号装置によって参照される符号化データのデータ構造に好適に適用することができる。

 

Claims (10)

  1.  予測画像を生成する予測画像生成部と、
     逆非分離変換を行う逆非分離変換部を備えている動画像復号装置であって、
     上記非分離変換部は、変換係数の特定の周波数成分を変化させないことを特徴とする動画像復号装置。
  2.  上記逆非分離変換部は、左上成分であるDC成分を変化させないことを特徴とする請求項1に記載の動画像復号装置。
  3.  上記逆非分離変換部は、インター予測の場合に、左上成分であるDC成分を変化させないことを特徴とする請求項2に記載の動画像復号装置。
  4.  上記逆非分離変換部は、上記DC成分を除外して一次元配列を導出し、一次元配列に変換を行うことを特徴とする請求項2に記載の動画像復号装置。
  5.  上記逆非分離変換部は、左上成分を除く左端成分と上端成分が0である変換行列を用いることを特徴とする請求項1に記載の動画像復号装置。
  6.  予測画像を生成する予測画像生成部と、
     逆非分離変換を行う逆非分離変換部を備えている動画像復号装置であって、
     上記非分離変換部は、変換係数の特定の周波数成分を変化させないことを特徴とする動画像符号化装置。
  7.  イントラ予測画像とインター予測画像の重み付け和により予測画像を導出する場合において、上記イントラ予測画像の導出に用いたイントラ予測モードを用いて、非分離変換の変換行列を選択し、非分離変換を行うことを特徴とする動画像復号装置。
  8.  上記予測画像を用いるモードは、隣接ブロックの状態に応じて上記重みを導出するCIIPモードであることを特徴とする請求項7に記載の動画像復号装置。
  9.  上記予測画像を用いるモードは、符号化データから導出したパラメータにより重みを導出するジオメトリモードであることを特徴とする請求項7に記載の動画像復号装置。
  10.  イントラ予測画像とインター予測画像の重み付け和により予測画像を導出する場合において、上記イントラ予測画像の導出に用いたイントラ予測モードを用いて、非分離変換の変換行列を選択し、非分離変換を行うことを特徴とする動画像符号化装置。

     
PCT/JP2022/043680 2021-12-14 2022-11-28 動画像復号装置および動画像符号化装置 WO2023112648A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021-202155 2021-12-14
JP2021202155 2021-12-14

Publications (1)

Publication Number Publication Date
WO2023112648A1 true WO2023112648A1 (ja) 2023-06-22

Family

ID=86774204

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/043680 WO2023112648A1 (ja) 2021-12-14 2022-11-28 動画像復号装置および動画像符号化装置

Country Status (1)

Country Link
WO (1) WO2023112648A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190007705A1 (en) * 2017-06-29 2019-01-03 Qualcomm Incorporated Memory reduction for non-separable transforms
JP2021034887A (ja) * 2019-08-23 2021-03-01 シャープ株式会社 画像復号装置及び画像符号化装置
WO2022254899A1 (ja) * 2021-05-31 2022-12-08 シャープ株式会社 動画像復号装置および動画像符号化装置

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190007705A1 (en) * 2017-06-29 2019-01-03 Qualcomm Incorporated Memory reduction for non-separable transforms
JP2021034887A (ja) * 2019-08-23 2021-03-01 シャープ株式会社 画像復号装置及び画像符号化装置
WO2022254899A1 (ja) * 2021-05-31 2022-12-08 シャープ株式会社 動画像復号装置および動画像符号化装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
M. KOO (LGE), M. SALEHIFAR (LGE), J. LIM (LGE), S. KIM (LGE): "CE6: Reduced Secondary Transform (RST) (CE6-3.1)", 14. JVET MEETING; 20190319 - 20190327; GENEVA; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 12 March 2019 (2019-03-12), XP030202677 *

Similar Documents

Publication Publication Date Title
US20240031556A1 (en) Method for encoding/decoding video signal and apparatus therefor
US20160191944A1 (en) Method for decoding a moving picture
US20160381383A1 (en) Apparatus for decoding a moving picture
WO2021111962A1 (ja) 動画像復号装置
US11457233B2 (en) Motion information storage for video coding and signaling
EP3843389A1 (en) Method for encoding/decoding image signal and apparatus therefor
JP7448349B2 (ja) 動画像復号装置
JP2020053924A (ja) 動画像符号化装置、動画像復号装置
WO2022254899A1 (ja) 動画像復号装置および動画像符号化装置
WO2020032049A1 (ja) 動画像復号装置、および動画像符号化装置
WO2023112648A1 (ja) 動画像復号装置および動画像符号化装置
JP2021518084A (ja) 動きベクトルに基づく映像コーディング方法およびその装置
WO2023100970A1 (ja) 動画像復号装置および動画像符号化装置
JP2023028331A (ja) 動画像復号装置および動画像符号化装置
WO2024009877A1 (ja) 動画像復号装置および動画像符号化装置
WO2023162920A1 (ja) 動画像復号装置および動画像符号化装置
JP7465128B2 (ja) 動画像符号化装置及び動画像復号装置
JP2023043219A (ja) 動画像復号装置および動画像符号化装置
US20240107004A1 (en) Image decoding apparatus and image coding apparatus
WO2023249006A1 (ja) 動画像復号装置
WO2021235448A1 (ja) 動画像符号化装置及び動画像復号装置
US20220174288A1 (en) Device and method for encoding motion vector, and device and method for decoding motion vector
US20220295075A1 (en) Resource constrained video encoding
JP2024041558A (ja) 動画像復号装置および動画像符号化装置
WO2023047950A1 (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: 22907178

Country of ref document: EP

Kind code of ref document: A1