Image decoding device and image encoding device

The video decoding device addresses inefficiencies in edge direction changes by using non-rectangular prediction units and non-separable transforms, improving coding efficiency through enhanced intra prediction.

JP7735065B2Active Publication Date: 2025-09-08SHARP KK
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2021052872
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-03-26
Publication Date
2025-09-08
Estimated Expiration
2041-03-26

AI Technical Summary

Technical Problem

Existing video encoding and decoding methods face inefficiencies when the edge direction between adjacent blocks of an intra-block changes significantly, leading to inaccurate directional prediction and reduced coding efficiency.

Method used

A video decoding device that performs prediction for non-rectangular prediction units using a table associating a partition index with angle and distance indices, and applies non-separable transforms based on intra prediction modes, enhancing the coding efficiency by improving intra prediction accuracy.

Benefits of technology

Improves coding efficiency in video processing by accurately handling changes in edge directions between adjacent blocks, thereby enhancing the overall coding performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007735065000001
    Figure 0007735065000001
  • Figure 0007735065000002
    Figure 0007735065000002
  • Figure 0007735065000003
    Figure 0007735065000003
Patent Text Reader

Abstract

To provide an image encoding device and an image decoding device capable of improving encoding efficiency.SOLUTION: A video decoding device 31 includes a parameter decoding unit 302 that decodes a plurality of parameters, and a prediction unit 308 that performs prediction for each of two temporary non-rectangular prediction units obtained by dividing the target block by a straight line spanning a target intra block. The prediction unit performs prediction on the basis of at least a table obtained by associating values of partition indexes from among the parameters decoded by the parameter decoding unit with pairs of partition indexes, angle indexes, and distance indexes.SELECTED DRAWING: Figure 7
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] An embodiment of the present invention relates to a video decoding device and a video encoding device. [Background technology]

[0002] In order to efficiently transmit or record moving images, a moving image encoding device is used that generates encoded data by encoding moving images, and a moving image decoding device is used that generates decoded images by decoding the encoded data.

[0003] Specific video encoding methods include, for example, H.264 / AVC and HEVC (High-Efficiency Video Coding) methods.

[0004] In such a video coding method, images (pictures) constituting a video are divided into slices obtained by dividing the image, coding tree units (CTUs) obtained by dividing the slices, and coding tree units (CTUs) obtained by dividing the coding tree units. The coding unit (sometimes called a coding unit (CU)) that is used for encoding, and The coding unit is divided into transform units (TUs) and managed in a hierarchical structure, and is coded / decoded for each CU.

[0005] In such video coding methods, a predicted image is usually generated based on a locally decoded image obtained by encoding / decoding an input image, and the predicted image is subtracted from the input image (original image) to obtain a prediction error (sometimes called a "difference image" or "residual image"), which is then coded. Methods for generating predicted images include inter-frame prediction (inter-prediction) and intra-frame prediction (intra-prediction).

[0006] Non-Patent Document 1 is another example of a recent video encoding and decoding technique. Non-Patent Document 1 discloses intra-prediction techniques such as directional prediction, planar prediction, and DC prediction. Directional prediction allows prediction according to the edge of an object by imparting directionality to the prediction, while planar prediction and DC prediction can effectively predict flat parts of an image, improving encoding efficiency.

[0007] Furthermore, Non-Patent Document 1 discloses merge prediction. Merge prediction involves dividing a target block into shapes other than a rectangle and performing different inter predictions for each region using General Purpose Multicast (GPM) metric. In this way, the target block can be divided into shapes other than a rectangle. By dividing the image into multiple parts, more accurate prediction is possible even for complex textures, improving coding efficiency. [Prior art documents] [Non-patent literature]

[0008] [Non-Patent Document 1] "Versatile Video Coding (Draft 6)", JVET-O2001-vE, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 2019-05-29 Summary of the Invention [Problem to be solved by the invention]

[0009] However, the method described in Non-Patent Document 1 has a problem in that, when the edge direction between adjacent blocks of an intrablock changes significantly, the directional prediction is inaccurate and the coding efficiency does not improve.

[0010] Therefore, one aspect of the present invention has been made in consideration of the above-mentioned problems, and its purpose is to provide a video decoding device and a video encoding device that can improve intra prediction. [Means for solving the problem]

[0011] In order to solve the above problem, a video decoding device according to one embodiment of the present invention is a video decoding device comprising a parameter decoding unit that decodes a plurality of parameters and a prediction unit that performs prediction for each of two temporary non-rectangular prediction units into which a target block is divided by a straight line segment that spans a target intra block, wherein the prediction unit performs the prediction based at least on a table that associates a value of a partition index among the plurality of parameters decoded by the parameter decoding unit with a pair of an angle index and a distance index.

[0012] According to another aspect of the present invention, a video decoding device decodes transform coefficients for each transform unit, and a set number (lfnstTrSetId) of a non-separable transform derived from an intra prediction mode IntraPredMode is ) when the prediction mode is used, the inverse transform unit performs non-separable transform according to IntraGPM partition information (intra_gpm_partition_idx) The method is characterized by deriving a set number (lfnstTrSetId) of the non-separable transformation from the

[0013] In a video decoding device according to another aspect of the present invention, the table associating the partition index with pairs of angle index and distance index varies depending on the shape of the block. [Effects of the Invention]

[0014] According to an aspect of the present invention, it is possible to improve the coding efficiency in video coding / decoding processing. [Brief explanation of the drawings]

[0015] [Figure 1] 1 is a schematic diagram showing the configuration of an image transmission system according to an embodiment of the present invention. [Figure 2] 1 is a diagram showing the configuration of a transmitting device equipped with a video encoding device according to this embodiment, and a receiving device equipped with a video decoding device, where (a) shows the transmitting device equipped with the video encoding device, and (b) shows the receiving device equipped with the video decoding device. [Figure 3] 1A and 1B are diagrams showing the configurations of a recording device equipped with a video encoding device according to an embodiment of the present invention, and a playback device equipped with a video decoding device, where (a) shows the configuration of a recording device equipped with a video encoding device, and (b) shows the configuration of a playback device equipped with a video decoding device. [Figure 4] FIG. 2 is a diagram showing a hierarchical structure of data in an encoded stream. [Figure 5] FIG. 10 is a diagram illustrating an example of division of a CTU. [Figure 6] FIG. 1 is a conceptual diagram illustrating an example of a reference picture and a reference picture list. [Figure 7] FIG. 1 is a schematic diagram illustrating a configuration of a video decoding device. [Figure 8] 10 is a flowchart illustrating a schematic operation of the video decoding device. [Figure 9] FIG. 10 is a schematic diagram showing types of intra-prediction modes (mode numbers). [Figure 10] FIG. 10 is a schematic diagram showing the configuration of an intra-prediction parameter derivation unit. [Figure 11] FIG. 10 is a diagram showing the correspondence between reference regions used in intra prediction, intra prediction modes, and prediction angles. [Figure 12] FIG. 10 is a diagram illustrating a configuration of an intra-prediction image generation unit. [Figure 13] FIG. 10 is a schematic diagram showing the configuration of an inter-prediction parameter derivation unit. [Figure 14] 1 is a schematic diagram showing the configuration of a merge prediction parameter derivation unit and an AMVP prediction parameter derivation unit. [Figure 15]FIG. 10 is a schematic diagram showing the configuration of an inter-prediction image generation unit. [Figure 16] FIG. 1 is a block diagram showing a configuration of a video encoding device. [Figure 17] FIG. 10 is a schematic diagram showing the configuration of an inter-prediction parameter encoding unit. [Figure 18] FIG. 1 is a diagram illustrating IntraGPM prediction and GPM prediction. [Figure 19] FIG. 10 is a syntax diagram illustrating coding parameters for GPM prediction. [Figure 20] FIG. 10 is a diagram showing the structure of a table indicating the correspondence between intra_gpm_partition_idx and merge_gpm_partition_idx and angleIdx and distanceIdx in IntraGPM prediction and GPM prediction. [Figure 21] FIG. 10 is a diagram showing the structure of a table showing the correspondence between intra_gpm_partition_idx, angleIdx, and distanceIdx when multiple tables are used in IntraGPM prediction. [Figure 22] FIG. 10 is a diagram showing the structure of a table showing the correspondence between idx and Dis[idx] used in the weighting coefficient derivation process and the motion vector storage process in GPM prediction. [Figure 23] 10 is a flowchart showing the flow of processing for GPM prediction. [Figure 24] FIG. 10 is a diagram showing a table for determining a set number for selecting a non-separable transform. [Figure 25] 1 is an example of a syntax diagram illustrating coding parameters for IntraGPM prediction. DETAILED DESCRIPTION OF THE INVENTION

[0016] (First embodiment) Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

[0017] FIG. 1 is a schematic diagram showing the configuration of an image transmission system 1 according to this embodiment.

[0018] 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 video encoding device (image encoding device) 11, a network 21, a video decoding device (image decoding device) 31, and a video display device (image display device) 41.

[0019] An image T is input to the video encoding device 11 .

[0020] The network 21 transmits the coded stream Te generated by the video coding device 11 to the video decoding device 31. The network 21 may be the Internet, a wide area network (WAN), a local area network (LAN), or any of these. The network 21 is a combination of the above. The network 21 is not necessarily limited to a two-way communication network, but may be a one-way communication network that transmits broadcast waves such as terrestrial digital broadcasting, satellite broadcasting, etc. Furthermore, the network 21 may be replaced by a storage medium on which the coded stream Te is recorded, such as a DVD (Digital Versatile Disc: registered trademark) or a BD (Blue-ray Disc: registered trademark).

[0021] The video decoding device 31 decodes each of the coded streams Te transmitted over the network 21, and generates one or more decoded images Td.

[0022] The video display device 41 displays all or part of one or more decoded images Td generated by the video decoding device 31. The video display device 41 is equipped with a display device such as a liquid crystal display, an organic EL (Electro-luminescence) display, etc. The display may be in the form of a stationary display, a mobile display, an HMD, etc. In addition, the video decoding device 31 has high processing capability. When it has [the required capabilities], it displays an image with high image quality. When it only has lower processing capabilities, it displays an image that does not require high processing and display capabilities.

[0023] <Operator> The operators used in this specification are described below.

[0024] >> is a right bit shift, << is a left bit shift, & is a bitwise AND, and | is a bitwise OR. |= is an OR assignment operator, and || indicates a logical OR.

[0025] x?y:z is a ternary operator that takes y when x is true (non-zero) and z when x is false (0).

[0026] Clip3(a, b, c) is a function that clips c to a value between a and b. If c < a, it returns a. If c > b, it returns b; otherwise, it returns c (where a <= b).

[0027] abs(a) is a function that returns the absolute value of a.

[0028] Int(a) is a function that returns the integer value of a.

[0029] floor(a) is a function that returns the largest integer less than or equal to a. <00001​​​​​​​​​​​​​

[0033] FIG. 4 shows the hierarchical structure of data in the coded stream Te. The frame Te illustratively includes a sequence and a plurality of pictures constituting the sequence. (a) to (f) of FIG. 4 respectively show a coded video sequence defining the sequence SEQ, a coded picture defining the picture PICT, a coded slice defining the slice S, and a slice data. 1 is a diagram showing coded slice data defining data, coding tree units included in the coded slice data, and coding units included in the coding tree units.

[0034] (Coded Video Sequence) In the case of a coded video sequence, a video decoder is used to decode the sequence SEQ to be processed. The sequence SEQ defines a set of data to be referenced by the device 31. As shown in Fig. 4, the sequence SEQ includes a video parameter set, a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), an adaptation parameter set (APS), a picture PICT, and supplemental enhancement information SEI (Supplemental Enhancement Information).

[0035] The video parameter set VPS is used to A set of coding parameters common to several video images and a set of coding parameters related to several layers included in the video image and each individual layer are defined.

[0036] The sequence parameter set SPS is used to decode the target sequence. A set of coding parameters to be referenced by the PPS is specified. For example, the width and height of a picture are specified. Note that there may be multiple SPSs. In that case, one of the multiple SPSs can be selected from the PPS. Select .

[0037] The picture parameter set PPS requires the following parameters to be used to decode each picture in the target sequence: It defines a set of coding parameters to be referenced by the video decoding device 31. For example, the reference value of the quantization width (pic_init_qp_minus26) used for decoding a picture and the application of weighted prediction are specified. It should be noted that there may be multiple PPSs. In this case, one of multiple PPSs is selected from each picture in the target sequence.

[0038] (encoded picture) A coded picture defines a set of data that the video decoding device 31 refers to in order to decode a picture PICT to be processed. As shown in Fig. 4, the picture PICT includes slices 0 to NS-1 (NS is the total number of slices included in the picture PICT).

[0039] In the following, when there is no need to distinguish between slices 0 to NS-1, the symbols The subscripts may be omitted in the description, and the same applies to other data to which subscripts are added that are included in the coded stream Te described below.

[0040] (encoded slice) In the coded slice, the video decoding device 31 refers to the slice S to be processed in order to decode the slice S. As shown in Figure 4, a slice consists of a slice header, and includes slice data.

[0041] The slice header includes a group of coding parameters that the video decoding device 31 refers to in order to determine a decoding method for the current slice. Slice type designation information (slice_type) that designates the slice type is an example of a coding parameter included in the slice header.

[0042] Slice types that can be specified by the slice type specification information include (1) an I-slice that uses only intra-prediction during encoding, (2) a P-slice that uses unidirectional or intra-prediction during encoding, and (3) a B-slice that uses unidirectional, bidirectional, or intra-prediction during encoding. Note that inter-prediction is not limited to uni-prediction or bi-prediction, and a predicted image may be generated using more reference pictures. Hereinafter, P When called a B slice, it is a slice that contains blocks that can use inter prediction. Refers to the s.

[0043] Note that the slice header may include a reference to a picture parameter set PPS (pic_parameter_set_id).

[0044] (encoded slice data) The coded slice data defines a set of data that the video decoding device 31 refers to in order to decode the slice data to be processed. As shown in Fig. 4(d), the slice data includes a CTU. The CTU is a block of a fixed size (for example, 64x64) that constitutes a slice. and is sometimes called the Largest Coding Unit (LCU).

[0045] (coding tree unit) 4 defines a set of data that the video decoding device 31 refers to in order to decode the CTU to be processed. The CTU is decoded by recursive quad tree (QT) partitioning, binary tree (BT) partitioning, or ternary tree (TT) partitioning. The data is divided into coding units (CU), which are the basic units of processing. BT division and TT division are collectively called multi-tree division (MT (Multi Tree) division). The node of the tree structure obtained by recursive quadtree division is called a coding node. The intermediate nodes of the tree are coding nodes, and the CTU itself is also defined as the top coding node. will be done.

[0046] The CT includes, as CT information, a CU split flag (split_cu_flag) indicating whether to split the CT, a QT split flag (split_cu_flag) indicating whether to split the CT, and QT split flag (qt_split_cu_flag) indicates whether to split the text, and MT split flag (qt_split_cu_flag) indicates the split direction of the text. It includes the split direction (mtt_split_cu_vertical_flag) and the MT split type (mtt_split_cu_binary_flag) that indicates the split type of MT split. split_cu_flag, qt_split_cu_flag, mtt_split_cu_vertical_flag, and mtt_split_cu_binary_flag are transmitted for each encoding node.

[0047] If split_cu_flag is 1 and qt_split_cu_flag is 1, the coding node splits into four coding nodes. The image is divided into four columns (Fig. 5(b)).

[0048] If split_cu_flag is 0, the coding node is not split and has one CU as a node ( CU is the terminal node of the coding node and is not further divided. CU is the basic unit of the coding process.

[0049] If split_cu_flag is 1 and qt_split_cu_flag is 0, the encoding node will When mtt_split_cu_binary_flag is 1 and mtt_split_cu_vertical_flag is 0, the coding node is split horizontally into two coding nodes (Fig. 5(d)), and when mtt_split_cu_vertical_flag is 1, the coding node is split vertically into two coding nodes (Fig. 5(c)). When mtt_split_cu_binary_flag is 0 and mtt_split_cu_vertical_flag is 0, the coding node is split horizontally into three coding nodes (Fig. 5(f)), and when mtt_split_cu_vertical_flag is 1, the coding node is split vertically into three coding nodes (Fig. 5(e)). These are shown in Fig. 5(g).

[0050] Also, when the size of the CTU is 64x64 pixels, the size of the CU can be 64x64 pixels, 64x32 pixels, 32x64 pixels, 32x32 pixels, 64x16 pixels, 16x64 pixels, 32x16 pixels, 16x32 pixels, 16x16 pixels, 64x8 pixels, Pixels, 8x64 pixels, 32x8 pixels, 8x32 pixels, 16x8 pixels, 8x16 pixels, 8x8 pixels, 64x4 pixels, 4x64 pixels, 32x4 pixels, 4x32 pixels, 16x4 pixels, 4x16 pixels, 8x4 pixels, 4x8 pixels, and 4x4 pixels You can choose either one.

[0051] Different trees may be used for luminance and chrominance. The tree type is indicated by treeType. For example, if a common tree is used for luminance (Y, cIdx=0) and chrominance (Cb / Cr, cIdx=1,2), the common single tree is indicated by treeType=SINGLE_TREE. If two different trees (DUAL trees) are used for luminance and chrominance, the luminance tree is indicated by treeType=DUAL_TREE_LUMA and the chrominance tree is indicated by treeType=DUAL_TREE_CHROMA.

[0052] (encoding unit) FIG. 4 shows the data that the video decoding device 31 refers to in order to decode the coding unit to be processed. Specifically, a CU consists of a CU header CUH, prediction parameters, and transformation parameters. The CU header contains information such as prediction mode.

[0053] Prediction processing may be performed in units of CUs, or in units of sub-CUs obtained by further dividing a CU. If the sizes of a CU and a sub-CU are the same, there is one sub-CU in the CU. If the size of a CU is larger than the size of a sub-CU, the CU is divided into sub-CUs. For example, if the CU is 8x8 and the sub-CU is 4x4, the CU is divided into four sub-CUs, divided horizontally by two and vertically by two.

[0054] There are two types of prediction (prediction modes): intra prediction and inter prediction. Intra prediction is a prediction within the same picture, while inter prediction refers to a prediction process performed between different pictures (for example, between display times or between layer images).

[0055] The transformation and quantization process is performed in units of CU, but the quantized transformation coefficients are stored in units of sub-blocks such as 4x4. It may be entropy coded.

[0056] (Prediction parameters) The predicted image is derived from prediction parameters associated with the block, which include intra-prediction and inter-prediction parameters.

[0057] (Prediction parameters for intra prediction) The prediction parameters of intra prediction are explained below. The intra prediction parameters consist of a luminance prediction mode IntraPredModeY and a color difference prediction mode IntraPredModeC. 1 is a schematic diagram showing types of intra prediction modes (mode numbers). As shown in the diagram, there are, for example, 67 types (0 to 66) of intra prediction modes. For example, there are planar prediction (0), DC prediction (1), and ), and Angular prediction (2 to 66). In addition, LM mode (67 to 72) may be added for chrominance.

[0058] Syntax elements for deriving intra prediction parameters include, for example, intra_luma_mpm_flag, intra_luma_mpm_idx, and intra_luma_mpm_remainder.

[0059] (MPM) The intra_luma_mpm_flag is a flag indicating whether the IntraPredModeY of the target block matches the MPM (Most Probable Mode). The MPM is included in the MPM candidate list mpmCandList[]. The MPM candidate list is based on the intra prediction modes of neighboring blocks and the This is a list that stores candidates that are estimated to have a high probability of being applied to the current block from the intra prediction modes in

[0000] . When intra_luma_mpm_flag is 1, IntraPredModeY of the current block is derived using the MPM candidate list and the index intra_luma_mpm_idx.

[0060] IntraPredModeY = mpmCandList[intra_luma_mpm_idx] (REM) If intra_luma_mpm_flag is 0, the intra prediction mode is selected from the remaining modes RemIntraPredMode, excluding the intra prediction modes included in the MPM candidate list from all intra prediction modes. The intra prediction modes selectable as RemIntraPredMode are "non-MPM" or It is called "REM". RemIntraPredMode is derived using intra_luma_mpm_remainder. do.

[0061] (Inter prediction parameters) Prediction parameters for inter prediction will be described. 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 a reference picture list (L0 list, L1 list) is used, and when the value is 1, the corresponding reference picture list is used. Note that in this specification, when the term "flag indicating whether XX is true" is used, a flag other than 0 (for example, 1) is considered to be XX, and 0 is considered to be not XX, and in logical negation, logical product, etc., 1 is treated as true and 0 is treated as false (the same applies below). However, in an actual device or method, other values ​​may be used as true and false values.

[0062] Syntax elements for deriving inter-prediction parameters include, for example, a merge flag merge_flag (general_merge_flag), a merge index merge_idx, merge_subblock_flag, regulare_merge_flag, an intra-inter flag ciip_flag, a GPM_flag indicating whether to use GPM mode, an inter-prediction identifier inter_pred_idc for selecting a reference picture to be used in AMVP mode, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx for deriving a motion vector, a difference vector mvdLX, and a motion vector precision mode amvr_mode.

[0063] (Reference Picture List) The reference picture list is a list of reference pictures stored in the reference picture memory 306. FIG. 6 is a conceptual diagram showing an example of a reference picture and a reference picture list. In Fig. 6(a), the rectangles represent pictures, the arrows represent picture reference relationships, the horizontal axis represents time, I, P, and B in the rectangles represent intra-pictures, uni-predictive pictures, and bi-predictive pictures, respectively, and the numbers in the rectangles represent decoding. As shown in the figure, the decoding order of the pictures is I0, P1, B2, B3, B4, and the display order is I0, B3, B2, B4, P1. FIG. 6(b) shows an example of a reference picture list for picture B3 (target picture). A reference picture list is a list indicating candidate reference pictures, and one picture (slice) may have one or more reference picture lists. In the example shown in the figure, the target picture B3 has two reference picture lists: an L0 list RefPicList0 and an L1 list RefPicList1. In each CU, the reference picture lists RefPicListX (X=0 or 1) Which picture is actually referenced is specified by refIdxLX. The diagram shows an example where refIdxL0=2 and refIdxL1=0. Note that LX is a notation method used when there is no distinction between L0 prediction and L1 prediction; hereinafter, parameters for the L0 list and parameters for the L1 list will be distinguished by replacing LX with L0 or L1.

[0064] (Merge prediction and AMVP prediction) Prediction parameter decoding (encoding) methods include merge prediction mode and AMVP (Advanced Motion Vector Prediction) mode, and merge_flag is a flag for distinguishing between them. Merge prediction mode is a mode in which the prediction list usage flag predFlagLX, reference picture index refIdxLX, and motion vector mvLX are not included in the encoded data, but are derived from prediction parameters of already processed neighboring blocks, etc. AMVP mode is a mode in which inter_pred_idc, refIdxLX, and mvLX are included in the encoded data. Note that mvLX is encoded as mvp_LX_idx, which identifies the prediction vector mvpLX, and a difference vector mvdLX.

[0065] inter_pred_idc is a value indicating the type and number of reference pictures, and takes one of the values ​​PRED_L0, PRED_L1, and PRED_BI. PRED_L0 and PRED_L1 are managed by the L0 list and the L1 list, respectively. PRED_BI is managed by the L0 list and the L1 list. This shows bi-prediction using two reference pictures.

[0066] merge_idx is the prediction parameter candidate (merge candidate) derived from the processed block. (Auxiliary) is an index indicating which prediction parameter is to be used as the prediction parameter for the current block.

[0067] (motion vector) mvLX indicates the amount of shift between blocks on two different pictures. The predicted vector and differential vector related to mvLX are called mvpLX and mvdLX, respectively.

[0068] (Inter prediction identifier inter_pred_idc and prediction list usage flag predFlagLX) The relationship between inter_pred_idc, predFlagL0, and predFlagL1 is as follows, and they can be converted to each other.

[0069] inter_pred_idc = (predFlagL1<<1)+predFlagL0 predFlagL0 = inter_pred_idc & 1 predFlagL1 = inter_pred_idc >> 1 Note that the inter prediction parameters may use a prediction list usage flag or an inter prediction identifier. Furthermore, the determination using the prediction list usage flag may be replaced with a determination using the inter prediction identifier. Conversely, the determination using the inter prediction identifier may be replaced with a determination using the prediction list usage flag.

[0070] (Bi-prediction biPred decision) The flag biPred indicating whether or not bi-prediction is performed can be derived based on whether or not two prediction list usage flags are both 1.

[0071] Alternatively, biPred can also be derived based on whether the inter-prediction identifier is a value indicating the use of two prediction lists (reference pictures).

[0072] (Configuration of video decoding device) The configuration of a video decoding device 31 (FIG. 7) according to this embodiment will be described.

[0073] 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 quantization and inverse transform unit 311, and an adder 312, a prediction parameter The video encoding device 11 includes a meter derivation unit 320. The image decoding device 31 may also be configured without the loop filter 305 .

[0074] The parameter decoding unit 302 further includes a header decoding unit 3020, a CT information decoding unit 3021, and a CU decoding unit. The CU decoding unit 3022 further includes a TU decoding unit 3024. These may be collectively referred to as a decoding module. The header decoding unit 3020 decodes parameter set information such as VPS, SPS, PPS, and APS, and slice headers (slice information) from the coded data. The CT information decoding unit 3021 decodes the CT from the coded data. The CU decoding unit 3022 decodes the CU from the coded data. The TU decoding unit 3024 extracts QP update information (quantization correction value) and quantization prediction error (residual_coding) from the coded data when a prediction error is included in the TU. Decrypt.

[0075] The TU decoding unit 3024 decodes the index mts_idx indicating the transformation base from the coded data. Furthermore, the TU decoding unit 3024 decodes the parameter lfnst_idx, which indicates whether or not a non-separable transform is used and the transform base, from the coded data. If the above is true and the prediction mode is intra mode, lfnst_idx is decoded. If lfnst_idx is 0, it indicates that no non-separable transformation is applied, and if it is 1, it indicates that the set of non-separable transformation bases is applied. In the case of 1, it indicates one transformation of the pair, and in the case of 2, it indicates the other transformation of the pair.

[0076] The predicted image generating unit 308 includes an inter predicted image generating unit 309 (FIG. 15) and an intra predicted image generating unit 310 (FIG. 12).

[0077] The prediction parameter derivation unit 320 includes the inter prediction parameter derivation unit 303 (FIG. 13) and the intra prediction parameter derivation unit (FIG. 10).

[0078] In the following, an example will be described in which CTU and CU are used as processing units, but this is not limitative. Alternatively, the processing may be performed in units of sub-CUs. and processing may be performed in units of blocks or sub-blocks.

[0079] The entropy decoding unit 301 performs entropy decoding on the coded stream Te input from the outside. Entropy coding is performed to decode individual codes (syntax elements). There are two types of entropy coding: one in which syntax elements are variable-length coded using a context (probability model) that is adaptively selected depending on the type of syntax element and the surrounding circumstances, and one in which syntax elements are variable-length coded using a predetermined table or formula.

[0080] The entropy decoding unit 301 outputs the decoded code to the parameter decoding unit 302. The decoded code is, for example, a prediction mode predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX, amvr_mode, etc. Which code is to be decoded is controlled by the parameter decoding unit 302. This is done based on instructions from the meter decoder 302.

[0081] (Basic flow) FIG. 8 is a flowchart illustrating the general operation of the video decoding device 31.

[0082] (S1100: Decode Parameter Set Information) The header decoder 3020 decodes parameter set information such as VPS, SPS, and PPS from the coded data.

[0083] (S1200: Decode slice information) The header decoding unit 3020 decodes the slice header from the encoded data. Decode (slice information).

[0084] Hereinafter, the video decoding device 31 performs steps S1300 to S5000 for each CTU included in the target picture. By repeating the above process, a decoded image of each CTU is derived.

[0085] (S1300: Decode CTU Information) The CT information decoding unit 3021 decodes the CTU from the encoded data.

[0086] (S1400: Decode CT Information) The CT information decoding unit 3021 decodes the CT from the encoded data.

[0087] (S1500: CU Decoding) The CU decoding unit 3022 performs S1510 and S1520 to decode the CU from the encoded data. Issued.

[0088] (S1510: Decode CU information) The CU decoding unit 3022 decodes CU information, prediction information, and TU division information from the encoded data. The flag split_transform_flag, the CU residual flags cbf_cb, cbf_cr, cbf_luma, etc. are decoded.

[0089] (S1520: TU information decoding) When a TU includes a prediction error, the TU decoding unit 3024 The quantized prediction error and the transformation index mts_idx are decoded from the data.

[0090] (S2000: Generate predicted image) The predicted image generation unit 308 generates a predicted image for each block included in the current CU based on prediction information.

[0091] (S3000: Inverse Quantization and Inverse Transformation) The inverse quantization and inverse transform unit 311 executes inverse quantization and inverse transform processing on each TU included in the target CU.

[0092] (S4000: Generate decoded image) The adder 312 generates a decoded image using the predicted image supplied from the predicted image generator 308. , and the prediction error supplied from the inverse quantization and inverse transform unit 311 are added to obtain the target CU. A decoded image is generated.

[0093] (S5000: Loop filter) The loop filter 305 applies a loop filter such as a deblocking filter, SAO, or ALF to the decoded image to generate a decoded image.

[0094] (Configuration of the intra-prediction parameter derivation unit 304) The intra prediction parameter derivation unit 304 performs intra prediction by referring to the prediction parameters stored in the prediction parameter memory 307 based on the code input from the entropy decoding unit 301. Decode parameters, such as the intra prediction mode IntraPredMode. The meter derivation unit 304 outputs the decoded intra prediction parameters to the predicted image generation unit 308, and also stores them in the prediction parameter memory 307. The intra prediction parameter derivation unit 304 may derive different intra prediction modes for luma and chroma.

[0095] 10 is a schematic diagram showing the configuration of the intra-prediction parameter derivation unit 304 of the parameter decoding unit 302. As shown in the figure, the intra-prediction parameter derivation unit 304 is 041, a luma intra prediction parameter decoding unit 3042, and a chroma intra prediction parameter decoding unit 3043.

[0096] The parameter decoding control unit 3041 instructs the entropy decoding unit 301 to decode the syntax elements. The parameter decoding control unit 3041 receives syntax elements from the entropy decoding unit 301. If intra_luma_mpm_flag is 1, the parameter decoding control unit 3041 outputs intra_luma_mpm_idx to the MPM parameter decoding unit 30422 in the luma intra prediction parameter decoding unit 3042. If intra_luma_mpm_flag is 0, the parameter decoding control unit 3041 outputs intra_luma_mpm_remainder to the non-MPM parameter decoding unit 30423 in the luma intra prediction parameter decoding unit 3042. The meter decoding control unit 3041 outputs the syntax elements of the chrominance intra prediction parameters to the chrominance intra prediction parameter decoding unit 3043.

[0097] The luma intra prediction parameter decoding unit 3042 receives an MPM candidate list derivation unit 30421 and an MPM parameter The MPM parameter decoding unit 30422 includes a non-MPM parameter decoding unit 30423 (decoding unit, derivation unit). can be.

[0098] The MPM parameter decoding unit 30422 derives IntraPredModeY by referencing the mpmCandList[] and intra_luma_mpm_idx derived by the MPM candidate list derivation unit 30421, and generates an intra-predicted image. The signal is output to the signal generator 310.

[0099] The non-MPM parameter decoding unit 30423 derives RemIntraPredMode from mpmCandList[ ] and intra_luma_mpm_remainder, and outputs IntraPredModeY to the intra-predicted image generation unit 310.

[0100] The chrominance intra-prediction parameter decoding unit 3043 derives IntraPredModeC from the syntax elements of the chrominance intra-prediction parameters, and outputs it to the intra-prediction image generation unit 310.

[0101] The loop filter 305 is a filter provided in the encoding loop, and is used to remove block distortion and ringing. The loop filter 305 is a filter that removes distortion and improves image quality. The loop filter 305 applies a deblocking filter, a sample adaptive offset (SAO), and an adaptive filter to the decoded image of the CU generated by the adder 312. Apply a filter such as an adaptive loop filter (ALF).

[0102] The reference picture memory 306 stores the decoded image of the CU generated by the adder 312 at a predetermined location for each current picture and current CU.

[0103] The prediction parameter memory 307 stores prediction parameters at a predetermined location for each CTU or CU to be decoded. Specifically, the prediction parameter memory 307 stores parameters decoded by the parameter decoding unit 302 and the prediction mode predMode separated by the entropy decoding unit 301. do.

[0104] The prediction image generation unit 308 receives the prediction mode predMode, prediction parameters, etc. The predicted image generation unit 308 reads the reference picture from the reference picture memory 306. The predicted image generation unit 308 uses the prediction parameters and the read reference picture in the prediction mode indicated by the prediction mode predMode. A predicted image of a block or sub-block is generated using a reference picture (reference picture block). Here, a reference picture block is a set of pixels (usually rectangular, hence called a block) on the reference picture, which is an area referenced to generate a predicted image.

[0105] (Intra-predicted image generation unit 310) When the prediction mode predMode indicates an intra prediction mode, the intra predicted image generation unit 310 , the intra-prediction parameters and the reference picture input from the intra-prediction parameter derivation unit 304 The intra prediction is performed using reference pixels read from the pixel memory 306.

[0106] Specifically, the intra-prediction image generation unit 310 generates a predicted image from a current block in a current picture. The adjacent blocks within the predetermined range are read from the reference picture memory 306. The surrounding area refers to adjacent blocks to the left, upper left, upper, and upper right of the current block, and the area to be referenced differs depending on the intra prediction mode.

[0107] The intra-prediction image generation unit 310 generates a prediction image of the current block by referring to the read decoded pixel values ​​and the prediction mode indicated by IntraPredMode. The predicted image of the block thus obtained is output to the adder 312.

[0108] The generation of predicted images based on intra prediction modes is explained below. Planar prediction, DC prediction, and angular prediction refer to the decoded surrounding area adjacent (close) to the block to be predicted. Then, a predicted image is generated by extrapolating pixels in the reference region R in a specific direction. For example, the reference region R is an L-shaped region (for example, indicated by the pixels in the shaded circle in FIG. 11(a)) that includes the left and top (or top left, top right, and bottom left) of the block to be predicted. The area may be set as the area where the

[0109] (Details of predicted image generation unit) Next, the configuration of the intra-prediction image generation unit 310 will be described in detail with reference to FIG. The prediction image generation unit 310 includes a prediction target block setting unit 3101, a filtered reference image setting unit 3103, a prediction target block setting unit 3104, a prediction target block setting unit 3105, a prediction target block setting unit 3106, a prediction target block setting unit 3107, a prediction target block setting unit 3108, a prediction target block setting unit 3109, a prediction target block setting unit 3110, a prediction target block setting unit 31 The image processing unit 3102 includes a prediction image correction unit 3104 and a prediction image correction unit 3105 (prediction image correction unit, filter switching unit, weighting coefficient change unit).

[0110] Based on the filtered reference image in the reference region R and the intra prediction mode, the prediction unit 3104 generates a temporary predicted image (predicted image before correction) of the block to be predicted and outputs it to the predicted image correction unit 3105. The filtered reference image is generated by applying a reference pixel filter (first filter). The predicted image correction unit 3105 corrects the temporary predicted image according to the intra prediction mode, and generates and outputs a predicted image (corrected predicted image).

[0111] Each unit included in the intra-predicted image generation unit 310 will be described below.

[0112] (Prediction target block setting unit 3101) The prediction target block setting unit 3101 sets the target CU as the prediction target block, and outputs information about the prediction target block (prediction target block information). The prediction target block information includes at least the size, position, and index indicating whether the prediction target block is luminance or chrominance.

[0113] (Filtered reference image setting unit 3103) The filtered reference image setting unit 3103 sets the neighboring surrounding area of ​​the block to be predicted as a reference area R based on the size and position of the block to be predicted. Then, a reference image is set for each pixel value (boundary pixel) in the reference area R. The reference image is stored in each pixel value (boundary pixel) in the reference picture memory 306. A reference pixel filter (first filter) corresponding to the intra prediction mode is applied to the decoded pixel value. Specifically, a low-pass filter is applied to the (x, y) and surrounding unfiltered reference images. The filtered reference image (reference area in Fig. 11(a)) is derived by applying It is not necessary to apply a low-pass filter to intra prediction modes, and a low-pass filter may be applied to some intra prediction modes. Note that the filter applied to the reference image in the reference region R in the filtered reference image setting unit 3103 is called a "reference pixel filter (first filter)," while the filter that corrects the temporary predicted image in the predicted image correction unit 3105 (described later) is called a "boundary filter (second filter)."

[0114] (Configuration of the intra prediction unit 3104) The intra prediction unit 3104 generates a provisional predicted image (provisional predicted pixel values, pre-corrected predicted image) of the block to be predicted based on the intra prediction mode and filtered reference pixel values, and outputs the generated image to the predicted image correction unit 3105. The intra prediction unit 3104 internally includes a planar prediction unit 31041, a DC prediction unit 31042, an angular prediction unit 31043, an LM prediction unit 31044, and an IntraGPM unit 31045. The prediction unit 3104 selects a specific prediction unit according to the intra prediction mode, and inputs the filtered reference image. The relationship between the intra prediction mode and the corresponding prediction unit is as follows: ·Planar Prediction ···Planar Prediction Section 31041 DC prediction DC prediction section 31042 ·Angular Prediction ··Angular Prediction Part 31043 ·LM prediction ··LM prediction unit 31044 ·IntraGPM Prediction···IntraGPM Prediction Part 31045 (Planar forecast) The planar prediction unit 31041 performs a plurality of planar predictions according to the distance between the pixel position to be predicted and the reference pixel position. The filtered reference images are linearly added to generate a tentative predicted image, which is output to the predicted image correction unit 3105 .

[0115] (DC forecast) The DC prediction unit 31042 derives a DC predicted value equivalent to the average value of the filtered reference image s[x][y], and outputs a temporary predicted image q[x][y] whose pixel values ​​are the DC predicted values.

[0116] (Angular prediction) The angular prediction unit 31043 generates a temporary predicted image q[x][y] using the filtered reference image s[x][y] in the prediction direction (reference direction) indicated by the intra prediction mode, and outputs the temporary predicted image q[x][y] to the predicted image correction unit 3105.

[0117] (LM forecast) The LM prediction unit 31044 predicts the pixel values ​​of the color differences based on the pixel values ​​of the luminance. This method uses a linear model to generate a predicted image of the color difference image (Cb, Cr) based on the decoded luminance image. One of the LM prediction methods is CCLM (Cross-Component Linear Model Prediction). CCLM prediction is a prediction method that uses a linear model to predict chrominance from luminance for one block.

[0118] (IntraGPM prediction) Next, IntraGPM prediction will be described. The IntraGPM prediction unit 31045 divides a target CU into two diverse non-rectangular prediction units using a line segment as a boundary, as shown in Fig. 18(a).

[0119] Also, as shown in FIG. 18(b), the straight line segment that crosses the target CU is defined by the angle index angleIdx and a distance index distanceIdx. and the line segment. distanceIdx is the distance from the center of the target CU to the line segment. The angle is shown in Fig. 18(c), where one angle mode (angle The figure shows 32 angle modes (for example, For example, this is an example that represents angleIdx=0 to 31 shown in Fig. 20. The distance is represented by distanceIdx=0 to 3 shown in Fig. 20 as a distance mode (distance index).

[0120] The predicted image of GPM prediction is derived from a "non-rectangular" predicted image corresponding to a non-rectangular prediction unit. Instead, two "rectangular" predicted images including a non-rectangular prediction unit are derived, and the two rectangular regions are weighted according to the shape of the non-rectangular prediction unit. One is region A, the other is region B. The predicted image for area A is called predSamplesLA, and the predicted image for area B is called predSamplesLB. In other words, the IntraGPM prediction unit 31045 derives two temporary intra-predicted images for the target CU. The predicted image is derived by applying a weighting mask process to each pixel of the two temporal predicted images according to the pixel position. Both IntraGPM prediction and GPM prediction use two intra-predicted images, predSamples Using LA, predSamplesLB, angleId, and distanceIdx, the GPM synthesis unit 30952 synthesizes the predicted image. Generate it.

[0121] The GPM synthesis unit 30952 has the same configuration as the GPM synthesis unit 30952 shown in the inter-prediction image generation unit 309 in FIG. The GPM synthesis unit 30952 is located after the predicted image correction unit 3105 in FIG.

[0122] The adaptive weighting process for the predicted image is applied to both areas on either side of the line segment that divides the image into two non-rectangular prediction units. The predicted image for the entire target CU (rectangular block) is derived by adaptive weighting process using two temporary predicted images. This process is called GPM synthesis. Processing other than prediction (for example, transformation (inverse transformation) and quantization (inverse quantization)) is applied to the entire target CU.

[0123] The following describes how to derive the angle angleId and the distance distanceIdx.

[0124] (Example 1 of angle and distance combination) As shown in this embodiment, IntraGPM prediction, which generates a predicted image from two temporal intra-predicted images, and GPM prediction, which generates a predicted image from two temporal inter-predicted images, have the same results. The same disLut table may be used. Specifically, the IntraGPM prediction unit 31045 may use 64 combinations of angles and distances shown in FIG. 20(b) from among the above 32 combinations of angles and four distances. The combination may be the same as the GPM division combination applied to the interblock. .

[0125] (Example 2 of angle and distance combination) In this embodiment, the selectable angles may differ depending on the shape of the block. The IntraGPM prediction unit 31045 selects the angle depending on the shape of the target CU, that is, the difference between the width nCbW of the CU and the height nCbH of the CU. Depending on the magnitude relationship, for example, one of the three tables shown in FIG. 21 is selected. Then, angleIdx and distanceIdx corresponding to intra_gpm_partition_idx are set. More specifically, the IntraGPM prediction unit 31045 refers to one of the tables shown in FIG. 21 as follows: Do. When the target CU is square (nCbW = nCbH), the IntraGPM prediction unit 31045 sets the angleIdx and distanceIdx corresponding to intra_gpm_partition_idx according to the table shown in Fig. 21(a). When the target CU is a horizontally long rectangle (nCbW > nCbH), the IntraGPM prediction unit 31045 sets the angleIdx and distanceIdx corresponding to intra_gpm_partition_idx according to the table shown in Fig. 21(b). When the target CU is a vertically long rectangle (nCbW < nCbH), the IntraGPM prediction unit 31045 sets the angleIdx and distanceIdx corresponding to intra_gpm_partition_idx according to the table shown in Fig. 21(c). The table shown in Fig. 21(a) is the same as that in Fig. 20(b). The angleIdx in the table shown in Fig. 21(b) includes angle modes closer to the horizontal direction and does not include angle modes closer to the vertical direction. The angleIdx in the table shown in Fig. 21(c) includes angle modes closer to the vertical direction and does not include angle modes closer to the horizontal direction.

[0126] In the case of a horizontally long rectangle (nCbW > nCbH), it is considered that long textures in the horizontal direction are being processed. In such a case, by having a partitioning mode with an angle closer to the horizontal direction, it becomes possible to preferably perform block partitioning. That is, when the size of the target CU is nCbW > nCbH, the IntraGPM prediction unit 31045 calculates the number NHor of angles closer to the horizontal angleIdxHor (here 8, 24) among the angles included in the table and the number NVer of angles closer to the vertical angleIdxVer (here 0, 16). Then, it compares them and derives the angleIdx using a table (e.g., Fig. 21(b)) where NHor > NVer. More specifically, the number of selectable angles is MaxAngleNum (here 32), and the horizontal direction Let the angles be angleHor1, angleHor2, angleHor3 (where angleHor1 = angleHor3 % MaxAngleNum) (here angleHor1 = 8, angleHor2 = 24, angleHor2 = 40), and the vertical angles be angleVer1, angleVer2, angleVer3 (where angleVer1 = angleVer3 % MaxAngleNum) (here angleVer1 = 0, angleVer2 = 16, angleVer3 = 32). Then, the number of angles NHor for which min(min(|angle - angleHor1|, |angle - angleHor2|), |angle - angleHor3|) < min(min(|angle - angleVer1|, |angle - angleVer2|), |angle - angleVer3|), and the number of angles NVer for which min(min(|angle - angleHor1|, |angle - angleHor2|), |angle - angleHor3|) > min(min(|angle - angleVer1|, |angle - angleVer2|), |angle - angleVer3|) may be counted. Similarly, in the case of a vertically long rectangle (nCbW < nCbH), by having a division direction with an angle closer to the vertical direction, it becomes possible to perform block division preferably. That is, when the size of the target CU is nCbW < nCbH, the IntraGPM prediction unit 31045 compares the number NVer of those closer to the horizontal angles angleIdxHor (here 8, 24) among the angles included in the table with the number NHor of those closer to the vertical angles angleIdxVer (here 0, 16), and derives angleIdx using a table (for example, Fig. 21(c)) where NHor < NVer . In the above configuration, when the block shape is a horizontally long rectangle, it has a division mode with an angle closer to the horizontal direction, and when it is a vertically long rectangle, it has a division mode with an angle closer to the vertical direction. Therefore, the coding efficiency is improved.

[0127] (Combination example 3 of angle and distance) The IntraGPM prediction unit 31045 uses the same table when the target CU is a square or a vertically long rectangle. That is, when the target CU is a square or a vertically long rectangle (nCbW<=nCbH), the IntraGPM prediction unit 31045 may predict the partition corresponding to intra_gpm_partition_idx according to the table shown in FIG. If the target CU is a horizontally long rectangle (nCbW>nCbH), the IntraGPM prediction unit 31045 sets the angleIdx and distanceIdx to intra_gpm_partition_idx according to the table shown in FIG. 21(b). Set the corresponding angleIdx and distanceIdx.

[0128] In the above configuration, when the block shape is a horizontally long rectangle, the division mode has an angle closer to the horizontal direction, and when the block shape is a vertically long rectangle, the division mode has an angle closer to the vertical direction, thereby improving coding efficiency.

[0129] The numbers of angle modes (angle indexes) and distance modes (distance indexes) listed above are merely examples, and are not limited to the above values.

[0130] In the following, the derivation of the two temporal prediction images is described.

[0131] (Example 1 of derivation of two temporal prediction images) In this embodiment, the IntraGPM prediction unit 31045 may derive two temporal prediction images using the top two prediction modes in the MPM list. This allows flags indicating the two temporal prediction modes to be set. This eliminates the need to transmit the data, improving coding efficiency.

[0132] (Example 2 of derivation of two temporal prediction images) In this embodiment, the IntraGPM prediction unit 31045 may derive two temporal prediction images using intra_gpm_mpm_idx0 and intra_gpm_mpm_idx1. The intra_gpm_mpm_idx0 and intra_gpm_mpm_idx1 are coded and notified to the video decoding device 31. In this way, the two optimal temporal prediction images are obtained. This allows the selection of a desired image, thereby improving coding efficiency.

[0133] (Example 3 of derivation of two temporal prediction images) In this embodiment, the IntraGPM prediction unit 31045 may derive two temporal predicted images, one by planar prediction and the other by intra_gpm_mpm_idx0. The intra_gpm_mpm_idx0 is coded and notified to the video decoding device 31. This allows the quality of the two temporal predicted images to be determined. The bit amount of the flag indicating the prediction mode can be reduced without dropping any data, thereby improving the coding efficiency.

[0134] where intra_gpm_mpm_idx0 and intra_gpm_mpm_idx1 are the inverses of the non-rectangular region, respectively. Intra_gpm_mpm_idx0 and intra_gpm_mpm_idx1 are indexes for deriving an intra-predicted image. MPM candidates are used to derive an intra-predicted image for a non-rectangular area. intra_gpm_mpm_idx0 and intra_gpm_mpm_idx1 are candidate indices in the MPM list.

[0135] The above configuration enables division of intra blocks into non-rectangular prediction units, improving coding efficiency.

[0136] (Syntax decoding for IntraGPM prediction) An example of syntax elements for IntraGPM prediction will be described with reference to FIG.

[0137] As shown in Fig. 25(a), sps_intra_gpm_enabled_flag may be notified by the SPS. sps_intra_gpm_enabled_flag indicates whether or not the IntraGPM prediction mode is used in the target sequence.

[0138] Also, as shown in FIG. 25(b), intra_gpm_partition_idx, intra_gpm_mpm_idx0, and intra_gpm_mpm_idx1 may be notified as syntax elements of IntraGPM prediction. intra_gpm_partition_idx is an index (partition) indicating the partition pattern of IntraGPM prediction. Specifically, the index indicates a combination of angleIdx and distanceIdx that identifies a line segment that divides the target block into two non-rectangular regions. The number of partition index options is NumGPMFull (for example, 64), and intra_gpm_partition_idx takes an integer value between 0 and NumGPMFull-1. The number of partition index options is sometimes referred to as the number of partition patterns in this specification.

[0139] (Configuration of the predicted image correction unit 3105) The predicted image correction unit 3105 corrects the temporary predicted image output from the prediction unit 3104 according to the intra prediction mode. Specifically, the predicted image correction unit 3105 performs weighted addition (weighted averaging) on ​​the filtered reference image and the temporary predicted image for each pixel of the temporary predicted image according to the distance between the reference region R and the target predicted pixel, thereby deriving a predicted image (corrected predicted image) Pred obtained by correcting the temporary predicted image. Note that in some intra prediction modes, the predicted image correction unit 3105 may not correct the temporary predicted image, and the output of the prediction unit 3104 may be used as the predicted image as is.

[0140] The predicted image correction unit 3105 derives corrected predicted pixels predSample[x][y] in the following procedure: nTbW represents the width of the TU block, nTbH represents the height of the TU block, refW represents the width of the reference pixel, refH represents the height of the reference pixel, and p[x][y] (x=-1, y=-1..refH-1 and x=0..refW-1, y=-1) represents adjacent reference pixels.

[0141] First, the predicted image correction unit 3105 derives nScale as follows.

[0142] If predModeIntra is greater than INTRA_ANGULAR50, set the value of nScale as follows:

[0143] nScale = Min(2, Log2(nTbH) - Floor(Log2(3 * invAngle - 2)) + 8) If predModeIntra is smaller than INTRA_ANGULAR18, is not INTRA_PLANAR, and is not INTRA_DC, set the value of nScale as follows:

[0144] nScale = Min(2, Log2(nTbW) - Floor(Log2(3 * invAngle - 2)) + 8) Otherwise, set the value of nScale as follows:

[0145] nScale = ((Log2(nTbW) + Log2(nTbH) - 2) >> 2) Here, invAngle is calculated as invAngle = Round((512*32) / intraPredAngle). PredAngle is derived from predModeIntra using FIG. 11(b).

[0146] The predicted image correction unit 3105 calculates mainRef[x], sideref[y] (x=0..refW-1 and and y=0..refH-1).

[0147] mainRef[x] = p[x][-1] sideRef[y] = p[-1][y] The predicted image correction unit 3105 derives refL[x][y], refT[x][y], wT[y], and wL[x] (x=0..nTbW-1, y=0..nTbH-1) as follows:

[0148] If predModeIntra is INTRA_PLANAR or INTRA_DC, refL[x][y] = p[-1][y] refT[x][y] = p[x][-1] wT[y] = 32 >> ((y << 1) >> nScale) wL[x] = 32 >> ((x << 1) >> nScale) If predModeIntra is INTRA_ANGULAR18 or INTRA_ANGULAR50, refL[x][y] = p[-1][y] - p[-1][-1] + predSamples[x][y] refT[x][y] = p[x][-1] - p[-1][-1] + predSamples[x][y] wT[y] = (predModeIntra==INTRA_ANGULAR18) ? 32 >> ((y << 1) >> nScale) : 0 wL[x] = (predModeIntra==INTRA_ANGULAR50) ? 32 >> ((x << 1) >> nScale) : 0 If predModeIntra is less than INTRA_ANGULAR18 and nScale is greater than or equal to 0, The predicted image correction unit 3105 derives dXInt[y] and dX[x][y] as follows.

[0149] dXInt[y] = ((y + 1) * invAngle + 256) >> 9 dX[x][y] = x + dXInt[y] Then, derive refL[x][y], refT[x][y], wT[y], and wL[x].

[0150] refL[x][y] = 0 refT[x][y] = (y < (3 << nScale)) ? mainRef[dX[x][y]] : 0 wT[y] = 32 >> ((y << 1) >> nScale) wL[x] = 0 If predModeIntra is greater than INTRA_ANGULAR50 and nScale is greater than or equal to 0, The predicted image correction unit 3105 derives dYInt[x] and dY[x][y] as follows.

[0151] dYInt[x] = ((x + 1) * invAngle + 256) >> 9 dY[x][y] = y + dYInt[x] Then, derive refL[x][y], refT[x][y], wT[y], and wL[x].

[0152] refL[x][y] = (x < (3 << nScale)) ? sideRef[dY[x][y]] : 0 refT[x][y] = 0 wT[y] = 0 wL[x] = 32 >> ((x << 1) >> nScale) Otherwise, set refL[x][y], refT[x][y], wT[y], and wL[x] to 0.

[0153] Finally, the predicted image correction unit 3105 derives the corrected predicted pixel predSample[x][y] as follows.

[0154] predSamples[x][y] = Clip1((refL[x][y] * wL[x] + refT[x][y] * wT[y] + (64 - wL[x] - wT[y]) * predSamples[x][y] + 32) >> 6) (Another configuration of the predicted image correction unit 3105) In the IntraGPM prediction, the predicted image predSamplesLA corrected by the predicted image correction unit 3105 using filtered reference pixels and the predicted image predSamplesLA corrected by the predicted image correction unit 3105 using filtered reference pixels are used. The image predSamplesLB may be used by the GPM synthesis unit 30952 to create a synthesized image.

[0155] In this configuration, the predicted image correction unit 3105 is applied to the intra-predicted images of the area A and the area B, respectively, which has the effect of achieving high image quality.

[0156] (Another configuration of the predicted image correction unit 3105) In the case of IntraGPM prediction, the GPM synthesis unit 30952 may create a synthesized image using the predicted image predSamplesLA corrected by the predicted image correction unit 3105 using filtered reference pixels and the predicted image predSamplesLB that does not pass through the predicted image correction unit 3105.

[0157] In this configuration, the predicted image correction unit 3105 applies the correction to only one of the two temporary intra-predicted images that form the basis of IntraGPM prediction, thereby reducing the amount of processing. Furthermore, the correction effect is considered to be weak in areas located far from the left and top boundaries of the target block. Therefore, it is appropriate to turn off the correction process in areas located farther from the target block. For areas far from the left and top boundaries of the target block, angleIdx may be set as follows:

[0158] When 0 <= angleIdx < 5, area A When 5 <= angleIdx < 13, area B When 13 <= angleIdx < 20, area A When 20 <= angleIdx < 28, area B When 28 <= angleIdx <= 31, area A (Another configuration of the predicted image correction unit 3105) Furthermore, when IntraGPM prediction is used as the intra prediction mode, the predicted image correction unit 3105 may be configured not to correct the temporary predicted image, but to use the output of the prediction unit 3104 as the predicted image as is. This reduces the amount of processing because correction processing is not performed.

[0159] (Another configuration of the predicted image correction unit 3105) In IntraGPM prediction, the predicted image correction unit 3105 may use the predicted image synthesized by the GPM synthesis unit 30952 as a provisional predicted image, and derive the predicted image (corrected predicted image) Pred by weighting and adding (weighted averaging) the filtered reference image and the provisional predicted image.

[0160] The GPM prediction is performed using predSamplesLA and predSamplesLB corrected by the predicted image correction unit 3105. Instead of synthesizing the GPM image, the synthesized predicted image is corrected by the predicted image correction unit 3105. In other words, the GPM synthesis unit 30952 is located before the predicted image correction unit 3105. This allows the predicted image correction unit 3105 to perform processing only once, thereby reducing the processing load compared to applying the processing to two temporary predicted images predSamplesLA and predSamplesLB. Furthermore, the predicted image correction unit 3105 selects the operation of the predicted image correction unit 3105 using the intra prediction mode of either region A or region B. In particular, it is appropriate to select the correction processing according to the intra prediction mode of the region closest to the left and top boundaries of the target block, out of region A and region B. The regions closest to the left and top boundaries of the target block may be set using angleIdx as follows:

[0161] When 0 <= angleIdx < 5, area B When 5 <= angleIdx < 13, area A 13 <= angleIdx < 20: Area B When 20 <= angleIdx < 28, area A When 28 <= angleIdx <= 31, area B (Configuration of the inter-prediction parameter derivation unit) The inter-prediction parameter derivation unit 303 decodes the syntax input from the parameter decoding unit 302. Based on the data elements, the predictive parameters stored in the predictive parameter memory 307 are referenced to calculate the inverse. The inter prediction parameter derivation unit 303 and the inter prediction parameter derivation unit 304 output the inter prediction parameters to the inter prediction image generation unit 309 and the prediction parameter memory 307. Its internal elements, the AMVP prediction parameter derivation unit 3032, the merge prediction parameter derivation unit 3036, the GPM prediction unit 3037, and the MV addition unit 3038, are means common to both video encoding devices and video decoding devices, and may therefore be collectively referred to as a motion vector derivation unit (motion vector derivation device).

[0162] When GPM_Flag is 1, that is, when it indicates the GPM prediction mode, the GPM prediction unit 30377 derives GPM prediction parameters.

[0163] If merge_flag is 1, i.e., indicates merge prediction mode, then derive merge_idx and The result is output to the prediction parameter derivation unit 3036.

[0164] When merge_flag is 0, that is, when it indicates the AMVP prediction mode, the AMVP prediction parameter derivation unit 3032 derives mvpLX from inter_pred_idc, refIdxLX, or mvp_LX_idx.

[0165] (MV addition section) The MV adder 3038 adds the derived mvpLX and mvdLX to derive mvLX.

[0166] (Merge prediction) FIG. 14(a) is a schematic diagram showing the configuration of the merge prediction parameter derivation unit 3036 according to this embodiment. The merge prediction parameter derivation unit 3036 includes a merge candidate derivation unit 30361 and a merge candidate selection unit 30362. Note that merge candidates are configured to include prediction parameters (predFlagLX, mvLX, refIdxLX) and are stored in a merge candidate list. Merge candidates stored in the merge candidate list are assigned indices according to predetermined rules.

[0167] The merge candidate derivation unit 30361 directly combines the motion vectors and refIdxLX of the decoded neighboring blocks. In addition, the merge candidate derivation unit 30361 uses the spatial A merge candidate derivation process, a temporal merge candidate derivation process, etc. may be applied.

[0168] As a spatial merge candidate derivation process, the merge candidate derivation unit 30361 predicts merge candidates according to a predetermined rule. The predicted parameters stored in the measurement parameter memory 307 are read out and set as merge candidates. The reference picture is specified, for example, by prediction parameters for each of the neighboring blocks within a predetermined range from the target block (for example, all or some of the blocks adjacent to the left A1, right B1, upper right B0, lower left A0, and upper left B2 of the target block). The merge candidates are called A1, B1, B0, A0, and B2. Here, A1, B1, B0, A0, and B2 are motion information derived from blocks containing the following coordinates:

[0169] 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) The upper left coordinates of the target block are (xCb, yCb), the width is cbWidth, and the height is cbHeight.

[0170] In the temporal merge derivation process, the merge candidate derivation unit 30361 calculates the prediction parameters of the block C in the reference image including the coordinates of the lower right CBR or the center of the target block from the prediction parameter menu. The merge candidates are read from memory 307 and stored as merge candidates Col in the merge candidate list mergeCandList[]. do.

[0171] The order of storing merge candidates in mergeCandList[] is, for example, spatial merge candidates (A1, B1, B0, A0, B2), time This is a merge candidate Col. Note that if a reference block is unavailable (e.g., if the block is intra-predicted), The merge candidate list is not stored in the merge candidate list. i = 0 if( availableFlagA1 ) mergeCandList[ i++ ] = A1 if( availableFlagB1 ) mergeCandList[ i++ ] = B1 if( availableFlagB0 ) mergeCandList[ i++ ] = B0 if( availableFlagA0 ) mergeCandList[ i++ ] = A0 if( availableFlagB2 ) mergeCandList[ i++ ] = B2 if( availableFlagCol ) mergeCandList[ i++ ] = Col 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.

[0172] N = mergeCandList[merge_idx] Here, N is a label indicating a merge candidate, and can be A1, B1, B0, A0, B2, Col, etc. The motion information of the merge candidate indicated by label N is indicated by (mvLXN[0], mvLXN[0]), predFlagLXN, and refIdxLXN.

[0173] The selected (mvLXN[0], mvLXN[0]), predFlagLXN, and refIdxLXN are selected as inter prediction parameters for the current block. The inter-prediction parameters are stored in a prediction parameter memory 307, and the inter-prediction image is The result is output to the generation unit 309.

[0174] (GPM forecast) Next, GPM prediction will be described. In the inter GPM mode, as in the IntraGPM mode, a target CU is divided into two various non-rectangular prediction units with a line segment shown in FIG. 18(a) as the boundary. As in the IntraGPM mode, the line segments that cross the target CU are divided into The angle is specified by an angle index angleIdx and a distance index distanceIdx. angleIdx indicates the angle φ formed between a vertical line and the line segment. distanceIdx indicates the distance ρ from the center of the target CU to the line segment. The angle is specified by the angle mode (angle index index) is assigned.

[0175] In the case of InterGPM prediction, as with IntraGPM, the predicted image is a "non-rectangular" predicted image. Instead of deriving a rectangular prediction unit, two "rectangular" prediction images are derived that include a non-rectangular prediction unit. The two rectangular regions are then weighted according to the shape of the non-rectangular prediction unit. In inter prediction, the motion compensation unit 3091 derives two temporal prediction images for the target CU, and the GPM sum is used. The weighting unit 30952 applies a weighting matrix to each pixel of the two temporary predicted images according to the position of the pixel. A predicted image is derived by applying a weighting process to the predicted image. The adaptive weighting process for the predicted image is applied to both areas on either side of the line segment used to divide the image into non-rectangular prediction units. A predicted image for the entire target CU (rectangular block) is derived by adaptive weighting process using two temporary predicted images. This process is called GPM synthesis process. The quantization (dequantization) is applied to the entire target CU.

[0176] 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. To simplify the process, GPM prediction may not be configured to use bi-prediction. In this case, unidirectional inter-prediction parameters are derived for the non-rectangular regions. The derivation and synthesis of the two temporal prediction images are performed by the motion compensation unit 3091 (FIG. 15) and the GPM synthesis unit 30952 (FIG. 15).

[0177] (Decoding syntax in GPM prediction) Whether GPM prediction is on or off and the parameters when GPM prediction is on are signaled in the coded data as follows:

[0178] As shown in Figure 19(a), sps_gpm_enabled_flag is notified by SPS and indicates whether the GPM prediction mode is used in the target sequence. When sps_gpm_enabled_flag is 0, it indicates that the GPM prediction mode is not used in the target sequence. When sps_gpm_enabled_flag is 1, it indicates that the GPM prediction mode is used in the target sequence. Here, it indicates that a GPM prediction mode in which the number of selectable division patterns (division types) is NumGPMFull is used in the target sequence. Note that sps_gpm_enabled_flag is not limited to SPS, and may be transmitted in PPS, picture header, or slice header.

[0179] 19(b) shows part of the syntax notified by merge_data. The parameter decoding unit 302 decodes the syntax elements in the encoded data, and the GPM prediction unit 30377 (inter-prediction parameter derivation unit 303) derives GPM prediction parameters according to the following rules.

[0180] In the 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 MaxNumGpmMergeCand, the maximum number of merge candidates for GPM prediction. Specifically, the GPM prediction unit 30377 derives MaxNumGpmMergeCand, the maximum number of merge candidates for GPM prediction, using MaxNumMergeCand, the maximum number of merge candidates for merge prediction.

[0181] If sps_gpm_enabled_flag is on and MaxNumMergeCand is 3 or greater, MaxNumGpmMergeCand = MaxNumMergeCand - sps_max_num_merge_cand_minus_max_num_gpm_cand If sps_gpm_enabled_flag is on and MaxNumMergeCand is 2, MaxNumGpmMergeCand = 2 If none of the above applies, MaxNumGpmMergeCand = 0 When MaxNumGpmMergeCand is 0, GPM prediction is disabled.

[0182] FIG. 19(b) shows an example of syntax in which merge_data() is notified when merge prediction is on for the current block (general_merge_flag==1). general_merge_flag is a flag that is notified when the current block is not in skip mode and indicates whether prediction parameters are derived from CUs adjacent to the current CU. In skip mode, the inter prediction parameter derivation unit 303 sets general_merge_flag=1. merge_data() is used to set parameters for merge prediction. In the example of FIG. 19(b), when ciip_flag is 0, the syntax elements merge_gpm_partition_idx, merge_gpm_idx0, and merge_gpm_idx1 of the GPM prediction are merge_gpm_partition_idx is an index (partition index) indicating the division pattern of the GPM prediction mode. Specifically, the index indicates a combination of angleIdx and distanceIdx that identify a line segment that spans the target block in order to divide the target block into two non-rectangular regions. merge_gpm_idx0 and merge_gpm_idx1 are These are indices that indicate the motion information of two non-rectangular regions. Merge candidates are used for the motion information of the two non-rectangular regions. merge_gpm_idx0 and merge_gpm_idx1 are the merge candidates. The index of the merge candidate in the complement list. If sps_gpm_enabled_flag is 1, The number of partition index options is NumGPMFull (for example, 64), and merge_gpm_partition_idx takes an integer value from 0 to NumGPMFull-1 (=63). The number of partition index options is sometimes referred to herein as the number of partition patterns.

[0183] MergeGpmFlag is a flag indicating whether or not to perform GPM prediction on a current block in a B slice. If all of the following conditions (GPM determination conditions) are met, the GPM prediction unit 30377 sets MergeGpmFlag=1 (GPM prediction on), and if not, the GPM prediction unit 30377 sets MergeGpmFlag=0. sps_gpm_enabled_flag=1 (GPM forecasts are available for the target SPS) slice_type is B slice general_merge_flag=1 (merge prediction is on, the inter prediction parameters of the target block are estimated from the neighboring inter prediction blocks) cbWidth>=8 and cbHeight>=8 cbWidth < 8*cbHeight and cbHeight < 8*cbWidth regular_merge_flag=0 (basic merge prediction or MMVD prediction is off) merge_subblock_flag=0 (subblock-level inter prediction is off) ciip_flag=0 (combining intra-predicted and inter-predicted images is off) When MergeGpmFlag=1, the GPM prediction unit 30377 derives parameters necessary for generating a predicted image in the following procedure and outputs them to the GPM synthesis unit 30952. The parameter decoding unit 302 (CU decoding unit 3022) decodes merge_gpm_partition_idx, merge_gpm_idx0, and merge_gpm_idx1. The parameter decoding unit 302 (CU decoding unit 3022) may decode merge_gpm_partition_idx and merge_gpm_idx0 if !ciip_flag[x0][y0] && MaxNumGpmMergeCand>1, and may decode merge_gpm_idx1 if MaxNumGpmMergeCand>2.

[0184] (Movement information derivation process in GPM prediction) The GPM prediction unit 30377 derives merge indexes m and n from syntax elements merge_gpm_idx0 and merge_gpm_idx1 that indicate motion information of two non-rectangular regions, as follows:

[0185] m = merge_gpm_idx0 n = merge_gpm_idx1 + (merge_gpm_idx1 >= m) ? 1 : 0 In the following, the merge candidate pointed to by merge index m is denoted as M, and the merge candidate pointed to by merge index n is denoted as N.

[0186] The merge prediction parameter derivation unit 3036 determines the merge candidate M by the method described in (Merge Prediction). and N motion information (mvLXM, mvLXN, refIdxLXM, refIdxLXN, predFlagLXM, predFlagLXN , bcwIdx, mergeCandList, etc.) are derived. The GPM prediction unit 30377 uses this motion information The motion vectors mvA and mvB of merge_gpm_idx0 and merge_gpm_idx1, the reference indices refIdxA and refIdxB, and the prediction list flags predListFlagA and predListFlagB are calculated as follows: and set predListFlagB.

[0187] mvA[0] = mvLXM[0] mvA[1] = mvLXM[1] refIdxA = refIdxLXM predListFlagA = X Here, the GPM prediction unit 30377 sets the lowest 1 bit of m to X (m & 0x01). Note that if predFlagLXM is 0, the GPM prediction unit 30377 sets X to (1-X).

[0188] mvB[0] = mvLXN[0] mvB[1] = mvLXN[1] refIdxB = refIdxLXN predListFlagB = X Here, the GPM prediction unit 30377 sets the lowest 1 bit of n to X (n & 0x01). Note that if predFlagLXN is 0, the GPM prediction unit 30377 sets X to (1-X).

[0189] These motion information are referenced to generate temporal prediction images for the two non-rectangular regions.

[0190] The GPM prediction unit 30377 derives angleIdx and distanceIdx corresponding to merge_gpm_partition_idx according to the table shown in FIG. 20( a ) and outputs them to the GPM synthesis unit 30952 .

[0191] The GPM prediction unit 30377 uses the above motion information (mvX, refIdxX, predListFlagX, X=A or B) to The GPM synthesis unit 30952 derives temporary predicted images predSamplesLA and predSamplesLB and outputs them to the GPM synthesis unit 30952. The GPM synthesis unit 30952 generates a predicted image using weight information derived using angleIdx and distanceIdx and the temporary predicted images predSamplesLA and predSamplesLB.

[0192] (Weighted pixel prediction process in GPM prediction) The GPM synthesis unit 30952 derives the predicted pixel value pbSample in the following procedure: where nCbW=cbWidth, nCbH=cbHeight. First, the GPM synthesis unit 30952 performs the following steps for the weighting coefficient derivation process in GPM prediction and the motion vector storage process described later. Derive bitDepth as follows:

[0193] If cIdx is 0, the GPM synthesis unit 30952 sets bitDepth to the luminance pixel bit count BitDepthY.

[0194] If cIdx is 0, the GPM synthesis unit 30952 converts nW and nH into nCbW and nCbH, respectively. If cIdx is not 0, the GPM synthesis unit 30952 sets nW and nH to nCbW*SubWidthC and nCbH*SubHeightC, respectively. Here, SubWidthC and SubHeightC are the chrominance frames. This is a value that is predetermined depending on the format.

[0195] If cIdx is 0, the GPM synthesis unit 30952 sets both subW and subH to 1. If cIdx is not 0, the GPM synthesis unit 30952 sets subW and subH to SubWidthC and SubHeightC, respectively.

[0196] If cIdx is not 0, the GPM synthesis unit 30952 sets bitDepth to the number of color difference pixel bits, BitDepthC.

[0197] Next, the GPM synthesis unit 30952 derives the variables nW, nH, shift1, offset1, displacementX, displacementY, partFlip, and shiftHor as follows:

[0198] 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 When shiftHor is 0, the GPM synthesis unit 30952 calculates offsetX and offsetY as follows: Derive.

[0199] offsetX = (-nW) >> 1 offsetY = ((-nH) >> 1) + (angleIdx<16? (distanceIdx * nH) >> 3 : -((distanceIdx * nH) >> 3)) When shiftHor is 1, the GPM synthesis unit 30952 calculates offsetX and offsetY as follows: Derive.

[0200] offsetX = ((-nW) >> 1) + (angleIdx<16? (distanceIdx * nW) >> 3 : -((distanceIdx * nW) >> 3)) offsetY = (-nH) >> 1 The GPM synthesis unit 30952 derives the predicted pixels pbSamples according to the following steps.

[0201] 1) The GPM synthesis unit 30952 derives xL and yL as follows:

[0202] xL = (cIdx==0) ? x : x * SubWidthC yL = (cIdx==0) ? y : y * SubHeightC 2) The GPM synthesis unit 30952 calculates wValue as follows using disLut shown in FIG.

[0203] 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) The GPM synthesis unit 30952 derives the value of pbSample as follows:

[0204] pbSamples[x][y] = Clip3(0, (1 << BitDepth) - 1, (predSamplesLA[x][y] * wValue + predSamplesLB[x][y] * (8 - wValue) + offset1) >> shift1) (Motion vector storage process in GPM prediction) The GPM prediction unit 30377 calculates the non-rectangular area A and the non-rectangular area B in the following procedure so that they can be referenced in subsequent processing. and B motion vectors (mvA, mvB) and reference picture information (predFlagA, prefFlagB, refIdxLA, refIdxLB) are stored in memory in 4*4 sub-block units.

[0205] Below, a process common to the first and second examples will be described.

[0206] numSbX and numSbY are the horizontal and vertical 4*4 sub-blocks of the target block, respectively. The GPM prediction unit 30377 uses numSbX = cbWidth >> 2, numSbY = cbHeight >> 2. The GPM prediction unit 30377 derives the variables displacementX, displacementY, isFlip, and shiftHor as follows:

[0207] displacementX = angleIdx displacementY = (angleIdx + 8) % 32 isFlip = (angleIdx>=13 && angleIdx<=27)? 1 : 0 shiftHor = (angleIdx%16==8 || (angleIdx%16!=0 && cbHeight>=cbWidth)) ? 0 : 1 If shiftHor is 0, the GPM prediction unit 30377 calculates offsetX and offsetY as follows: Derive.

[0208] offsetX = (-cbWidth) >> 1 offsetY = ((-cbHeight) >> 1) + ((angleIdx<16) ? (distanceIdx * cbHeight) >> 3 : -((distanceIdx * cbHeight) >> 3)) When shiftHor is 1, the GPM prediction unit 30377 calculates offsetX and offsetY as follows: Derive.

[0209] offsetX = ((-cbWidth) >> 1) + ((angleIdx<16) ? (distanceIdx * cbWidth) >> 3 : -((distanceIdx * cbWidth) >> 3)) offsetY = (-cbHeight) >> 1 The GPM prediction unit 30377 is a 4*4 sub-unit with xSbIdx = 0..numSbX - 1, ySbIdx = 0..numSbY - 1. For each block position (xSbIdx, ySbIdx), the following process is performed.

[0210] The GPM prediction unit 30377 calculates motionIdx as follows using disLut shown in FIG. 22: do.

[0211] motionIdx = (((4 * xSbIdx + offsetX) << 1) + 5) * disLut[displacementX] + (((4 * ySbIdx + offsetY) << 1) + 5) * disLut[displacementY] The GPM prediction unit 30377 derives sType as follows.

[0212] sType = (abs(motionIdx)<32) ? 2 : ((motionIdx<=0) ? (1 - isFlip) : isFlip) If sType is 0, the GPM prediction unit 30377 performs the following:

[0213] If the prediction list flag for A is 0 (predListFlagA==0), the GPM predictor 30377 stores the motion vector for A in L0 as unidirectional prediction. If the prediction list flag for A is not 0 (predListFlagA!=0), the GPM predictor 30377 stores the motion vector for A in L1 as unidirectional prediction.

[0214] 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] Otherwise, if sType is 1, or if sType is 2 and predListFlagA+predListFlagB is not 1, then the GPM predictor 30377 performs the following: where predListFlagA+predListFlagB is not 1 indicates that the reference picture lists of A and B are the same.

[0215] If the prediction list flag for B is 0 (predListFlagB==0), the GPM predictor 30377 stores the motion vector of B in L0 as unidirectional prediction. If the prediction list flag for B is not 0 (predListFlagB!=0), the GPM predictor 30377 stores the motion vector of B in L1 as unidirectional prediction.

[0216] 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] Otherwise (if sType is 2 and predListFlagA+predListFlagB is 1), the GPM predictor 30377 performs the following: This means that the reference picture lists of A and B are different.

[0217] If the prediction list flag for A is 0 (predListFlagA == 0), the GPM predictor 30377 stores the motion vector of A in L0 and the motion vector of B in L1, setting bidirectional prediction. If the prediction list flag for A is not 0 (predListFlagA != 0), the GPM predictor 30377 stores the motion vector of B in L0. The motion vector is stored, and bidirectional prediction is set with the motion vector of A stored in L1.

[0218] 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] (GPM prediction processing flow) 23 is a flowchart showing the flow of GPM prediction processing. The following describes the flow of GPM prediction processing on the assumption that all conditions for setting MergeGpmFlag=1 (GPM prediction on) as described above are met.

[0219] In S3501, the parameter decoding unit 302 decodes the SPS, PPS, and slides as shown in FIG. The unit 303 appropriately decodes various syntax elements notified by the inter-prediction parameter derivation unit 303 (the merge prediction parameter derivation unit 3036, the GPM prediction unit 30377, etc.) and outputs these syntax elements to the inter-prediction parameter derivation unit 303 (the merge prediction parameter derivation unit 3036, the GPM prediction unit 30377, etc.).

[0220] In S3502, the GPM prediction unit 30377 determines whether sps_gpm_enabled_flag is 1 or not.

[0221] If sps_gpm_enabled_flag is not 1 in S3502, the GPM prediction unit 30377 turns off GPM prediction in S3506 and ends the processing.

[0222] In S3502, if sps_gpm_enabled_flag is 1, the GPM prediction unit 30377 performs GPM prediction processing in S3503 to S3505.

[0223] In S3503, the GPM prediction unit 30377 derives motion information using the method described above in (Motion information derivation process in GPM prediction).

[0224] In S3504, the GPM prediction unit 30377 derives weighting coefficients using the method described above in (Process for deriving weighting coefficients in GPM prediction).

[0225] More specifically, the GPM prediction unit 30377 derives angleIdx and distanceIdx corresponding to merge_gpm_partition_idx according to the table shown in FIG. 21(a). derives weighting factors based on angleIdx, distanceIdx, etc.

[0226] In S3505, the GPM prediction unit 30377 stores the motion vector in memory using the method described above in (Motion vector storage process in GPM prediction).

[0227] (AMVP forecast) FIG. 14(b) is a schematic diagram showing the configuration of the AMVP prediction parameter derivation unit 3032 according to this embodiment. The AMVP prediction parameter derivation unit 3032 is a vector candidate derivation unit 3033 and a vector candidate selection unit 3034. The vector candidate derivation unit 3033 includes a prediction parameter memory 307 based on refIdxLX. The prediction vector candidate is derived from the motion vector of the adjacent block that has already been decoded and stored in the prediction vector candidate list mvpListLX[ ].

[0228] The vector candidate selection unit 3034 selects the vector candidate mvp_LX_idx from the prediction vector candidates in mvpListLX[]. The vector candidate selection unit 3034 outputs the selected mvpLX to the MV addition unit 3038.

[0229] (MV addition section) The MV addition unit 3038 calculates mvLX by adding the mvpLX input from the AMVP prediction parameter derivation unit 3032 and the decoded mvdLX. The addition unit 3038 outputs the calculated mvLX to the inter predicted image generation unit 309. and outputs it to the prediction parameter memory 307.

[0230] mvLX[0] = mvpLX[0]+mvdLX[0] mvLX[1] = mvpLX[1] + mvdLX[1] (Motion vector accuracy) The amvr_mode is a syntax for switching the accuracy of motion vectors derived in the AMVP mode For example, in the elements amvr_mode = 0, 1, 2, the accuracy is switched between 1 / 4 pixel, 1 pixel, and 4 pixels. Instead of amvr_mode, a flag amvr_flag indicating whether it is 1 / 4 and a flag amvr_precision_flag for switching between 1 / 16 and 1 may be used

[0231] When the accuracy of the motion vector is 1 / 16 accuracy, in order to change the motion vector differences of 1 / 4, 1, and 4 pixel accuracies to the motion vector difference of 1 / 16 pixel accuracy, inverse quantization is performed using MvShift (= 1 << amvr_mode = (amvr_flag + amvr_precision_flag) << 1) derived from amvr_mode as follows It may be

[0232] MvdLX[0] = MvdLX[0] << (MvShift + 2) MvdLX[1] = MvdLX[1] << (MvShift + 2) Similarly, when the affine_flag is 1, it is derived by the following formula

[0233] MvShift = amvr_precision_flag? (amvr_precision_flag << 1) : (-(amvr_flag << 1))) MvdCpLX[cpIdx][0] = MvdLX[cpIdx][0] << (MvShift + 2) MvdCpLX[cpIdx][1] = MvdLX[cpIdx][1] << (MvShift + 2) Note that the parameter decoding unit 302 may also decode and derive the mvdLX[] before shifting by the above MvShift according to the following Syntax elements · abs_mvd_greater0_flag · abs_mvd_minus2 mvd_sign_flag Then, the parameter decoding unit 302 uses the following formula to extract the parameter from the syntax element: The difference vector lMvd[] is decoded from

[0234] lMvd[compIdx] = abs_mvd_greater0_flag[compIdx] * (abs_mvd_minus2[compIdx]+2) * (1-2*mvd_sign_flag[compIdx]) Furthermore, lMvd[] is set to MvdLX in the case of translational MVD (MotionModelIdc==0), and to MvdCpLX in the case of control point MVD (MotionModelIdc!=0).

[0235] if (MotionModelIdc == 0) MvdLX[compIdx] = lMvd[compIdx] else MvdCpLX[cpIdx][compIdx] = lMvd[cpIdx][compIdx] where compIdx = 0, 1 and cpIdx = 0, 1, 2.

[0236] (Inter-prediction image generation unit 309) When predMode indicates an inter prediction mode, the inter predicted image generation unit 309 Using the inter-prediction parameters and reference pictures input from the prediction parameter derivation unit 303, A predicted image of the block or sub-block is generated by inter-prediction.

[0237] FIG. 15 is a schematic diagram showing the configuration of an inter-prediction image generation unit 309 included in the prediction image generation unit 308 according to this embodiment. The inter-prediction image generation unit 309 is a motion compensation unit (prediction image generation device). The synthesis unit 3095 includes an IntraInter synthesis unit 30951, a GPM synthesis unit 30952, a BIO unit 30954, and a weighted prediction unit 3094.

[0238] (motion compensation) The motion compensation unit 3091 (interpolated image generation unit 3091) receives the input from the inter prediction parameter derivation unit 303. Based on the input inter prediction parameters (predFlagLX, refIdxLX, mvLX), an interpolated image (motion compensated image) is generated by reading reference blocks from the reference picture memory 306. The reference block is a block located at a position shifted by mvLX from the position of the current block on the reference picture RefPicLX specified by refIdxLX. If mvLX does not have integer precision, an interpolated image is generated by applying a filter called a motion compensation filter, which generates pixels at decimal positions.

[0239] The motion compensation unit 3091 first derives the integer position (xInt, yInt) and phase (xFrac, yFrac) corresponding to the coordinates (x, y) in the prediction block using the following equations.

[0240] xInt = xPb+(mvLX[0]>>(log2(MVPREC)))+x xFrac = mvLX[0]&(MVPREC-1) yInt = yPb+(mvLX[1]>>(log2(MVPREC)))+y yFrac = mvLX[1]&(MVPREC-1) Here, (xPb, yPb) are the upper left coordinates of a bW*bH size block, x=0...bW-1, y=0...bH-1, and MVPREC indicates the accuracy of mvLX (1 / MVPREC pixel accuracy), e.g., MVPREC=16.

[0241] The motion compensation unit 3091 derives the temporary image temp[][] by performing horizontal interpolation on the reference picture refImg using an interpolation filter. In the following, Σ is the sum over k, where k=0..NTAP-1, shift1 is a normalization parameter that adjusts the value range, and offset1=1<<(shift1-1).

[0242] temp[x][y] = (ΣmcFilter[xFrac][k]*refImg[xInt+k-NTAP / 2+1][yInt]+offset1)>>shift1 Next, the motion compensation unit 3091 derives the interpolated image Pred[][] by vertically interpolating the temporary image temp[][]. In the following, Σ is the sum for k=0..NTAP-1, shift2 is a normalization parameter that adjusts the value range, and offset2=1<<(shift2-1).

[0243] Pred[x][y] = (ΣmcFilter[yFrac][k]*temp[x][y+k-NTAP / 2+1]+offset2)>>shift2 In the case of bi-prediction, the above Pred[][] is derived for each L0 list and L1 list (called interpolated images PredL0[][] and PredL1[][]), and the interpolated image Pred[][] is generated from PredL0[][] and PredL1[][].

[0244] The synthesis unit 3095 includes an IntraInter synthesis unit 30951, a GPM synthesis unit 30952, a weighted prediction unit 3094, and a BIO unit 30954.

[0245] (IntraInter synthesis processing) The IntraInter synthesis unit 30951 performs weighted summation of the inter-predicted image and the intra-predicted image. A predicted image is generated.

[0246] (GPM composite processing) The GPM synthesis unit 30952 generates a predicted image using the above-mentioned IntraGPM prediction or GPM prediction. do.

[0247] When MergeGpmFlag is 1, the GPM synthesis unit 30952 generates predicted images predSamples.

[0248] In the following description, predSamples is a prediction block of size cbWidth*cbHeight. predSamplesLA and predSamplesLB are used by the intra prediction unit 3104 and the motion compensation unit 3091 to estimate the motion information of A and B. This is a predicted image generated using

[0249] As already described, the GPM synthesis unit 30952 applies weighted prediction processing using two temporary predicted images predSamplesLA and predSamplesLB to generate pbSamples as follows:

[0250] (BIO forecast) Next, we will explain the details of BIO prediction (Bi-Directional Optical Flow, BDOF processing) performed by the BIO unit 30954. In bi-prediction mode, the BIO unit 30954 generates a predicted image by referring to two predicted images (a first predicted image and a second predicted image) and a gradient correction term.

[0251] (Weight prediction) The weighted prediction unit 3094 generates a predicted image of the block by multiplying the interpolated image PredLX by a weighting coefficient. When one of the prediction list usage flags (predFlagL0 or predFlagL1) is 1 (uni-prediction) and weighted prediction is not used, the weighted prediction unit 3094 performs the following equation processing to adjust PredLX (LX is L0 or L1) to the pixel bit depth bitDepth.

[0252] Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredLX[x][y]+offset1)> >shift1) Here, shift1=14-bitDepth, offset1=1<<(shift1-1). Also, both prediction list usage flags (predFlagL0 and predFlagL1) are 1 (bi-prediction PRED_BI) , and if weighted prediction is not used, the following equation is processed to average PredL0 and PredL1 and adjust the average to the number of pixel bits.

[0253] Pred[x][y] = Clip3(0,(1<<bitDepth)-1,(PredL0[x][y]+PredL1[x][y]+offset2)> >shift2) Here, shift2=15-bitDepth, offset2=1<<(shift2-1).

[0254] Furthermore, when uni-prediction and weighted prediction are performed, the weighted prediction unit 3094 derives a weighted prediction coefficient w0 and an offset o0 from the coded data, and performs processing according to the following equations.

[0255] Pred[x][y] = Clip3(0,(1<<bitDepth)-1,((PredLX[x][y]*w0+2^(log2WD-1))> >log2WD)+o0) Here, log2WD is a variable indicating a predetermined shift amount.

[0256] Furthermore, when bi-prediction PRED_BI and weighted prediction are performed, the weighted prediction unit 3094 derives weighted prediction coefficients w0, w1, o0, and o1 from the coded data and performs the processing of the following equations.

[0257] Pred[x][y] = Clip3(0,(1< <bitDepth)-1,(PredL0[x][y]*w0+PredL1[x][y]*w1+((o0+o1+1)<<log2WD))> >(log2WD+1)) The inter-prediction image generation unit 309 outputs the generated prediction image of the block to the addition unit 312 .

[0258] (Intra-prediction image generation unit) When predMode indicates the intra prediction mode, 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 and inverse transformation unit 311 performs inverse quantization on the quantization transformation coefficients input from the parameter decoding unit 302 to obtain transformation coefficients.

[0259] The inverse quantization and inverse transformation unit 311 performs inverse quantization on the quantization transformation coefficients input from the parameter decoding unit 302 to obtain transformation coefficients.

[0260] (Explanation of non-separable transformation and inverse non-separable transformation) The non-separable transformation (second transformation) is applied to some or all of the transformation coefficients in a part of the TU after the separable transformation (such as DCT2 and DST7) in the moving image encoding device 11. In the non-separable transformation, the remaining correlation in the transformation coefficients is removed and the energy is concentrated on some of the transformation coefficients. The inverse non-separable transformation is applied to some or all of the transformation coefficients of the TU in the moving image decoding device 31. After the inverse non-separable transformation is applied, the inverse separable transformation (such as DCT2 and DST7) is applied to the transformation coefficients after the inverse non-separable transformation. Also, when the TU is divided into 4x4 sub-blocks, the non-separable transformation and the inverse non-separable transformation are applied only to a predetermined sub-block in the upper left corner. Among the width W and height H of the TU, the sizes of the TUs where one of them 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).

[0261] Also, the technique of transmitting only some of the low-frequency components in the transformation coefficients after the separable transformation is called the RST (Reduced Secondary Transform) transformation or the LFNST (Low Frequency Non-Separable-Transform). Specifically, when the number nonZeroSize of the transformation coefficients of the separable transformation to be transmitted is less than or equal to the size ((1<<log2StSize)x(1<<log2StSize)) of the separable transformation, it becomes the LFNST. When the number nonZeroSize of the transformation coefficients of the separable transformation to be transmitted is less than or equal to the size ((1<<log2StSize)x(1<<log2StSize)) of the separable transformation, it becomes the LFNST. [[ID=*]]

[0262] In the non-separable transform and inverse non-separable transform, the following processes are performed depending on the TU size and intra prediction mode (IntraPredMode). The processes of the inverse non-separable transform will be described below in order.

[0263] (S1: Set the conversion size and input / output size) Inverse non-separable transform, the size of the inverse non-separable transform (4x4 or The number of output transform coefficients (nStOutSize), the number of transform coefficients to apply (input transform coefficients) Derive the number nonZeroSize and the number of sub-blocks (numStX, numStY) to which the inverse non-separable transform is applied. The sizes of the 4x4 and 8x8 inverse non-separable transforms are denoted by nStSize=4 and 8. The sizes of the 4x4 and 8x8 inverse non-separable transforms may also be called RST4x4 and RST8x8, respectively.

[0264] In the inverse non-separable transform, if the TU is equal to or larger than a predetermined size, 48 transform coefficients are output through an RST8x8 inverse non-separable transform. Otherwise, 16 transform coefficients are output through an RST4x4 inverse non-separable transform. If the TU is 4x4, 16 transform coefficients are derived from 8 transform coefficients using RST4x4, and if the TU is 8x8, 48 transform coefficients are derived from 8 transform coefficients using RST8x8. Otherwise, 16 or 48 transform coefficients are output from 16 transform coefficients depending on the TU size.

[0265] If W and H are both 8 or more, log2StSize = 3, nStOutSize = 48 Otherwise, log2StSize = 2, nStOutSize=16 nStSize = 1< <log2StSize If W and H are both 4, or 8x8, nonZeroSize = 8 Otherwise, nonZeroSize = 16 The input nonZeroSize of LFNST is not limited to 8 and 16. For example, it may be 12. The output nStOutSize is also not limited to 16 and 48. It may be 32, 36, 64, or the like.

[0266] numStX = (nTbH == 4 && nTbW > 8) ? 2 : 1 numStY = (nTbW == 4 && nTbH > 8) ? 2 : 1 It is also possible to always set numStX=numStY without performing non-separable transformation on multiple sub-blocks.

[0267] (S2: Rearrange into one-dimensional signal) The inverse non-separable transform unit 31121 rearranges some of the transform coefficients d[][] of the TU into a one-dimensional array u[]. Specifically, the inverse non-separable transform unit 31121 performs processing by dividing the 2 regions of the target TU indicated by the region RU. Derive u[] from the dimension transformation coefficients d[][] by referencing the transformation coefficients for x = 0.. nonZeroSize-1 xC, yC are the positions on the TU, and the DiagScanOrder array indicating the scan order and the is derived from the position x of the transform coefficient.

[0268] xC = (xSbIdx< <log2StSize) + DiagScanOrder[log2StSize][log2StSize][x][0] yC = (ySbIdx< <log2StSize) + DiagScanOrder[log2StSize][log2StSize][x][1] u[x] = d[xC][yC] The range copied to the one-dimensional array is called the area RU.

[0269] (S3: Applying conversion processing) The inverse non-separable transform unit 31121 performs a transform using the transform matrix secTransMatrix[][] on u[] of length nonZeroSize, and derives coefficients v'[] of a one-dimensional array of length nStOutSize as output. do.

[0270] Specifically, the inverse non-separable transform unit 31121 derives the transform matrix secTranMatrix[][] from the set number of the non-separable transform (lfnstTrSetId), the lfnst_idx indicating the transform base of the non-separable transform, and the non-separable transform size nStSize(nTrS), as shown in FIG. 24(a). It is a set number of non-separable transforms derived from the prediction mode IntraPredMode. The separation transformation unit 31121 performs a product-sum operation between the transformation matrix and the one-dimensional variable u[] as shown in the following equation.

[0271] v[i] = Clip3( CoeffMin, CoeffMax,Σ(secTransMatrix[i][j]*u[j]+64)>>7) Here, Σ is the sum up to j=0..nonZeroSize-1. Also, i is processed for 0..nStSize-1. CoeffMin and CoeffMax indicate the range of values ​​of the conversion coefficients.

[0272] In this embodiment, when IntraGPM is used, the angle mode angleIdx may be used to derive the set number (lfnstTrSetId) of the non-separable transformation, as shown in FIG. 24(b). , intra_gpm_partition_idx. When the target block is divided into two non-rectangular regions, edges tend to appear in the division direction, and by selecting a non-separable transformation accordingly, it becomes possible to apply the non-separable transformation appropriately.

[0273] (S4: 2D arrangement of 1D signals after transformation processing) The inverse non-separable transform unit 31121 again transforms the coefficients v'[] of the transformed one-dimensional array into a predetermined position in the TU. The placement method may be changed depending on PredModeIntra.

[0274] Specifically, if "PredModeIntra <= 34, the following processing may be applied:

[0275] d[x][y] = (y<4) ? v[x+(y< <log2StSize)] : ((x<4) ? v[32+x+((y-4)<<2)] : d[x][y]) Otherwise, the following formula applies:

[0276] d[x][y] = (x<4) ? v[y+(x< <log2StSize)] : ((y<4) ? v[32+y+((x-4) << 2)] : d[x][y]) Also, the above branch judgment is "PredModeIntra<=34 or PredModeIntra==INTRA_LT_CCLM, IN TRA_T_CCLM, or INTRA_L_CCLM" are also acceptable.

[0277] The adder 312 adds, for each pixel, the predicted image of the block input from the predicted image generator 308 and the prediction error input from the inverse quantization and inverse transformer 311 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 .

[0278] (Configuration of a video encoding device) Next, the configuration of the video encoding device 11 according to this embodiment will be described. Fig. 16 is a block diagram showing the configuration of the video encoding device 11 according to this embodiment. The video encoding device 11 includes a prediction image generation unit 101, a subtraction unit 102, a transformation and quantization unit 103, an inverse quantization and inverse transformation unit 105, an addition unit 106, a loop filter 107, a prediction parameter memory (prediction parameter storage unit, frame memory) 108, a reference picture memory (reference image storage unit, frame memory) 109, a coding parameter determination unit 110, a parameter coding unit 111, a prediction parameter derivation unit 120, and an entropy coding unit 104.

[0279] The predicted image generation unit 101 generates a predicted image for each CU. The predicted image generation unit 101 includes the inter predicted image generation unit 309 and the intra predicted image generation unit already described, and therefore a description thereof will be omitted.

[0280] The subtraction unit 102 generates a prediction error by subtracting pixel values ​​of the predicted image of the block input from the predicted image generation unit 101 from pixel values ​​of the image T. The subtraction unit 102 outputs the prediction error to the transformation and quantization unit 103.

[0281] The transform / quantization unit 103 calculates transform coefficients by frequency transforming the prediction errors input from the subtraction unit 102, and derives quantized transform coefficients by quantizing the prediction errors. The quantized transform coefficients are output to the parameter coding unit 111 and the inverse quantization and inverse transform unit 105 .

[0282] The inverse quantization and inverse transform unit 105 is the same as the inverse quantization and inverse transform unit 311 in the video decoding device 31, and a description thereof will be omitted. The calculated prediction error is output to the adder .

[0283] The parameter coding unit 111 includes a header coding unit 1110, a CT information coding unit 1111, and a CU coding unit 1112 (prediction mode coding unit). The CU coding unit 1112 further includes a TU coding unit 1114. The outline of the operation of each module is explained below.

[0284] The header encoding unit 1110 performs encoding processing of parameters such as header information, division information, prediction information, and quantized transform coefficients.

[0285] The CT information encoding unit 1111 encodes QT, MT (BT, TT) division information and the like.

[0286] The CU encoding unit 1112 encodes CU information, prediction information, division information, and the like.

[0287] When a prediction error is included in a TU, the TU encoding unit 1114 encodes the QP update information and the quantized prediction error.

[0288] The CT information encoding unit 1111 and the CU encoding unit 1112 transmit syntax elements such as inter prediction parameters (predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX), intra prediction parameters (intra_luma_mpm_flag, intra_luma_mpm_idx, intra_luma_mpm_reminder, intra_chroma_pred_mode), and quantized transform coefficients to the parameter encoding unit 111. Supply.

[0289] The entropy coding unit 104 receives the quantized transform coefficients and coding parameters (division information, prediction parameters) from the parameter coding unit 111. These are then entropy coded to generate and output a coded stream Te.

[0290] The prediction parameter derivation unit 120 is a means including the inter-prediction parameter coding unit 112 and the intra-prediction parameter coding unit, and uses the parameters input from the coding parameter determination unit 110. The derived intra prediction parameters and intra prediction parameters are output to the parameter coding unit 111. do.

[0291] (Configuration of Inter-Prediction Parameter Encoding Unit) As shown in FIG. 17, the inter prediction parameter coding unit 112 includes a parameter coding control unit 1121 and an inter prediction parameter derivation unit 303. The inter prediction parameter derivation unit 303 has the same configuration as the video decoding device. The parameter coding control unit 1121 controls the merge input. It includes an index derivation unit 11211 and a vector candidate index derivation unit 11212 .

[0292] The merge index derivation unit 11211 derives merge candidates and the like, and calculates inter prediction parameters The vector candidate index derivation unit 11212 derives predicted vector candidates and outputs them to the inter prediction parameter derivation unit 303 and the parameter coding unit 111.

[0293] (Configuration of the intra-prediction parameter coding unit) The intra-prediction parameter coding unit includes a parameter coding control unit and an intra-prediction parameter derivation unit, which has the same configuration as the video decoding device.

[0294] However, unlike the video decoding device, the inter prediction parameter derivation unit 303 and the intra prediction The inputs to the parameter derivation unit are the coding parameter determination unit 110 and the prediction parameter memory 108 , and the output is to the parameter coding unit 111 .

[0295] The adder 106 generates a decoded image by adding, for each pixel, the pixel values ​​of the predicted block input from the predicted image generation unit 101 and the prediction errors input from the inverse quantization and inverse transform unit 105. The adder 106 stores the generated decoded image in a reference picture memory 109.

[0296] The loop filter 107 performs deblocking filtering, SAO, and ALF on the decoded image generated by the adder 106. Note that the loop filter 107 does not necessarily include the above three types of filters. For example, the filter may be configured with only a deblocking filter.

[0297] The prediction parameter memory 108 stores the prediction parameters generated by the coding parameter determination unit 110 in a predetermined location for each current picture and CU.

[0298] The reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined location for each current picture and CU.

[0299] The encoding parameter determination unit 110 determines one set of encoding parameters from among a plurality of sets of encoding parameters. The coding parameters are the above-mentioned QT, BT or TT division information, prediction parameters, or parameters to be coded that are generated in relation to these. The predicted image generation unit 101 generates a predicted image using these coding parameters.

[0300] The encoding parameter determination unit 110 determines the size of the information amount and the encoding parameter for each of the plurality of sets. Calculate the RD cost value that indicates the error. For example, the RD cost value is calculated by multiplying the code amount and square error by a coefficient λ. The code amount is the amount of information in the coded stream Te obtained by entropy coding the quantization error and the coding parameters. The square error is calculated in the subtraction unit 102. The coefficient λ is a preset real number greater than zero. The coding parameter determination unit 110 determines the set of coding parameters that minimizes the calculated cost value. The encoding parameter determination unit 110 selects the encoding parameter. The result is output to the encoding unit 111 and the prediction parameter derivation unit 120.

[0301] Note that, in the above-described embodiment, the video encoding device 11 and a part of the video decoding device 31, for example, the entropy decoding unit 301, the parameter decoding unit 302, the loop filter 305, the predicted image generation unit 306, The control unit 308, the inverse quantization and inverse transform unit 311, the addition unit 312, the prediction parameter derivation unit 320, the prediction image generation unit 101, the subtraction unit 102, the transform and quantization unit 103, the entropy coding unit 104, the inverse quantization and inverse transform unit 105, the loop filter 107, the coding parameter determination unit 110, the parameter coding unit 111, and the prediction parameter derivation unit 120 may be realized by a computer. The program for realizing the above may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read and executed by a computer system. Note that the "computer system" here refers to a computer system built into either the video encoding device 11 or the video decoding device 31, and includes hardware such as an OS and peripheral devices. Also, the "computer-readable recording medium" refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a computer-readable medium. "A computer-readable recording medium" refers to a storage device, such as a hard disk, built into a computer system. Furthermore, "computer-readable recording medium" may also include a device that dynamically stores a program for a short period of time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, or a device that stores a program for a fixed period of time, such as volatile memory within a computer system that serves as a server or client in such cases. Furthermore, the program may be one that realizes part of the aforementioned functions, or may be one that can realize the aforementioned functions in combination with a program already stored in the computer system.

[0302] Furthermore, part or all of the video encoding device 11 and video decoding device 31 in the above-described embodiments may be realized as an integrated circuit such as an LSI (Large Scale Integration). Each functional block of the video encoding device 11 and video decoding device 31 may be individually implemented as a processor, or part or all of them may be integrated into a processor. Furthermore, the integrated circuit implementation method is not limited to LSI, and may be implemented using a dedicated circuit or a general-purpose processor. Furthermore, if an integrated circuit implementation technology that can replace LSI emerges due to advances in semiconductor technology, an integrated circuit based on that technology may be used.

[0303] One embodiment of the present invention has been described in detail above with reference to the drawings, but the specific configuration is not limited to that described above, and various design changes and the like are possible within the scope that does not deviate from the gist of the present invention.

[0304] [Application example] The above-described video encoding device 11 and video decoding device 31 can be mounted on various devices that transmit, receive, record, and play back video. The video may be a natural video captured by a camera or the like, or an artificial video (including CG and GUI) generated by a computer or the like.

[0305] First, it will be explained with reference to FIG. 2 that the above-described video encoding device 11 and video decoding device 31 can be used for transmitting and receiving video.

[0306] FIG. 2(a) is a block diagram showing the configuration of a transmitting device PROD_A equipped with a video encoding device 11. As shown in the figure, the transmitting device PROD_A includes an encoding unit PROD_A1 that encodes a video image to obtain encoded data, a modulation unit PROD_A2 that modulates a carrier wave with the encoded data obtained by the encoding unit PROD_A1 to obtain a modulated signal, and a transmitting unit PROD_A3 that transmits the modulated signal obtained by the modulation unit PROD_A2. The above-described video encoding device 11 is used as this encoding unit PROD_A1.

[0307] The transmitting device PROD_A captures moving images as a supply source of moving images to be input to the encoding unit PROD_A1. a recording medium PROD_A5 on which moving images are recorded; an input terminal PROD_A6 for inputting moving images from the outside; and an image processing unit A7 for generating or processing images. In the figure, the transmitting device PROD_A is shown as having all of these components, but some of them may be omitted.

[0308] The recording medium PROD_A5 may also be one that records unencoded moving images. Alternatively, the recording medium PROD_A5 may be a recording medium that has been coded using a coding method for recording that is different from the coding method for transmission. In the latter case, a decoding unit ( It is advisable to use a device (not shown) between the two.

[0309] 2(b) is a block diagram showing the configuration of a receiving device PROD_B equipped with a video decoding device 31. As shown in the figure, the receiving device PROD_B includes a receiving unit PROD_B1 that receives a modulated signal, and a demodulating unit PROD_B2 that obtains coded data by demodulating the modulated signal received by the receiving unit PROD_B1. and a decoding unit PROD_B3 that obtains a moving image by decoding the coded data obtained by the demodulation unit PROD_B2. The above-mentioned moving image decoding device 31 is used as this decoding unit PROD_B3. .

[0310] The receiving device PROD_B is a supply destination of the video output from the decoding unit PROD_B3, and displays the video. The device may further include a display PROD_B4 for recording moving images, a recording medium PROD_B5 for recording moving images, and an output terminal PROD_B6 for outputting moving images to the outside. Although the receiving device PROD_B is illustrated as having the above components, some of these may be omitted.

[0311] The recording medium PROD_B5 is for recording unencoded moving images. In the latter case, a signal from the decoder PROD_B3 to the recording medium PROD_B5 is inserted between the decoder PROD_B3 and the recording medium PROD_B5. It is preferable to interpose an encoding unit (not shown) that encodes the acquired moving images according to an encoding method for recording.

[0312] The transmission medium for transmitting the modulated signal may be wireless or wired. The transmission mode for transmitting the modulated signal may be broadcast (here, this refers to a transmission mode in which the destination is not specified in advance) or communication (here, this refers to a transmission mode in which the destination is specified in advance). In other words, the transmission of the modulated signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.

[0313] For example, a broadcasting station (such as a broadcasting facility) / receiving station (such as a television receiver) for terrestrial digital broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals via wireless broadcasting. Also, a broadcasting station (such as a broadcasting facility) / receiving station (such as a television receiver) for cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals via cable broadcasting.

[0314] In addition, servers (workstations, etc.) and clients (television receivers, personal computers, etc.) for VOD (Video On Demand) services and video sharing services using the Internet A personal computer (e.g., a personal computer, a smartphone, etc.) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals via communication (usually, in a LAN, either wireless or wired is used as the transmission medium, while in a WAN, wired is used as the transmission medium). Here, personal computers include desktop PCs, laptop PCs, and tablet PCs. Also, smartphones include multi-function mobile phone terminals.

[0315] The client of the video hosting service has the function of decoding the encoded data downloaded from the server and displaying it on a display, as well as the function of encoding the video images captured by a camera and uploading them to the server. In other words, the client of the video hosting service functions as both the transmitting device PROD_A and the receiving device PROD_B.

[0316] Next, it will be explained with reference to FIG. 3 that the above-described video encoding device 11 and video decoding device 31 can be used for recording and reproducing video.

[0317] Fig. 3(a) is a block diagram showing the configuration of a recording device PROD_C equipped with the above-mentioned video encoding device 11. As shown in the figure, the recording device PROD_C is equipped with an encoding unit PROD_C1 that obtains encoded data by encoding video, and a writing unit PROD_C2 that writes the encoded data obtained by the encoding unit PROD_C1 onto a recording medium PROD_M. The above-mentioned video encoding device 11 is It is used as the encoding unit PROD_C1.

[0318] The recording medium PROD_M may be (1) a type built into the recording device PROD_C, such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive), (2) a type connected to the recording device PROD_C, such as an SD memory card or a USB (Universal Serial Bus) flash memory, or (3) a DVD (Digital Versatile Disc: registered). (registered trademark) or BD (Blu-ray Disc: registered trademark), It may also be one that is loaded into a live device (not shown).

[0319] The recording device PROD_C also receives the video as a video source to be input to the encoding unit PROD_C1. The recording device PROD_C may further include a camera PROD_C3 for capturing images, an input terminal PROD_C4 for inputting moving images from the outside, a receiving unit PROD_C5 for receiving moving images, and an image processing unit PROD_C6 for generating or processing images. In the figure, the recording device PROD_C is shown as having all of these components, but some of them may be omitted.

[0320] The receiving unit PROD_C5 may receive unencoded video. Alternatively, the receiving unit PROD_C5 may receive coded data coded by a coding method for transmission that is different from the coding method for recording. In the latter case, it is preferable to interpose a decoding unit for transmission (not shown) between the receiving unit PROD_C5 and the coding unit PROD_C1, which decodes the coded data coded by the coding method for transmission.

[0321] Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, and an HDD (Hard Disk Drive) recorder (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 is the main source of the moving image). Also, a camcorder (in this case, the camera PROD_C3 is the main source of the moving image), a personal computer (in this case, the receiving unit PROD_C5 or the image The processing unit C6 is the main source of video images), a smartphone (in this case, the camera PROD_C3 or the receiving unit PROD_C5 is the main source of the moving image), such a recording device PROD_C This is an example.

[0322] 3(b) is a block diagram showing the configuration of a playback device PROD_D equipped with the above-mentioned video decoding device 31. As shown in the figure, the playback device PROD_D includes a reading unit PROD_D1 that reads out coded data written on a recording medium PROD_M, and a decoding unit that decodes the coded data read by the reading unit PROD_D1. and a decoding unit PROD_D2 that obtains a video by , this is used as the decoding unit PROD_D2.

[0323] The recording medium PROD_M may be (1) a type that is built into the playback device PROD_D, such as an HDD or SSD, or (2) a type that is not built into the playback device PROD_D, such as an SD memory card or a USB flash memory. (3) DVD, BD, etc. As shown in the figure, the disc may be loaded into a drive device (not shown) built into the playback device PROD_D.

[0324] Furthermore, the playback device PROD_D receives the video output from the decoding unit PROD_D2 and sends the video to The image processing device may further include a display PROD_D3 for displaying the moving image, an output terminal PROD_D4 for outputting the moving image to the outside, and a transmission unit PROD_D5 for transmitting the moving image. Although the configuration of the playback device PROD_D is illustrated, some of the components may be omitted.

[0325] The transmission unit PROD_D5 may transmit unencoded video. Alternatively, the decoder PROD_D2 may transmit coded data coded by a coding method for transmission that is different from the coding method for recording. In the latter case, it is preferable to interpose a coding unit (not shown) between the decoder PROD_D2 and the transmitter PROD_D5 that codes the video by the coding method for transmission.

[0326] Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, the output terminal PROD_D4 to which a television receiver or the like is connected operates). In addition, television receivers (in this case, the display PROD_D3 is the main supply destination of moving images), digital signage (also called electronic billboards or electronic bulletin boards, etc.) a display PROD_D3 or a transmitter PROD_D5 is the main supply destination of the moving image), a desktop PC (in this case, the output terminal PROD_D4 or a transmitter PROD_D5 is the main supply destination of the moving image), a laptop or tablet PC (in this case, the display PROD_D3 or a transmitter PROD_D5 is the main supply destination of the moving image). Examples of such a playback device PROD_D include a playback device PROD_D1 (in which case the display PROD_D3 or the transmission unit PROD_D5 is the main supply destination of the video images) and a smartphone (in which case the display PROD_D3 or the transmission unit PROD_D5 is the main supply destination of the video images).

[0327] (hardware and software implementations) Furthermore, each block of the video decoding device 31 and the video encoding device 11 may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be realized by a CPU. It may be realized in software using a Central Processing Unit (CPU).

[0328] In the latter case, each of the above devices includes a CPU that executes instructions from a program to realize each function, ROM (Read Only Memory) stores the program, and RAM (Random Access Memory) expands the program. The device may include a storage device (recording medium) such as an access memory (access memory) for storing the above programs and various data. The object of the embodiment of the present invention can also be achieved by supplying each of the devices with a recording medium on which program code (executable program, intermediate code program, source program) of the control program for each of the devices, which is software for realizing the above functions, is recorded in a computer-readable manner, and having the computer (or CPU or MPU) read and execute the program code recorded on the recording medium.

[0329] Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy disks (registered trademark) and hard disks, and CD-ROMs (Compact Disc Read-Only Memory), MO disks (Magneto-Optical discs), MDs (Mini Discs), DVDs (Digital Versatile Discs: registered trademark), CD-Rs (CD Recordable), and Blu-ray discs. Discs, including optical discs such as (Disc: registered trademark), IC cards (including memory cards) / Optical cards and other cards, mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory: registered trademark) Semiconductor memories such as flash ROMs, or logic circuits such as PLDs (Programmable logic devices) and FPGAs (Field Programmable Gate Arrays) can be used.

[0330] Furthermore, each of the above devices may be configured to be connectable to a communications network, and the program code may be supplied via the communications network. This communications network may be any network capable of transmitting the program code. For example, the Internet, an intranet, an extranet, a local area network (LAN), an integrated services digital network (ISDN), a value-added network (VAN), a community antenna television / cable television (CATV) communications network, a virtual private network, a telephone line network, a mobile communications network, a satellite communications network, etc. Furthermore, the transmission media constituting this communications network may be any medium capable of transmitting the program code, and are not limited to any particular configuration or type. For example, the present invention can be used in wired communication such as IEEE (Institute of Electrical and Electronic Engineers) 1394, USB, power line carrier, cable TV line, telephone line, or ADSL (Asymmetric Digital Subscriber Line) line, or in wireless communication such as IrDA (Infrared Data Association), infrared such as that used in remote controls, Bluetooth (registered trademark), IEEE 802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone networks, satellite lines, or terrestrial digital broadcasting networks. Note that the present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

[0331] The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. In other words, embodiments obtained by combining technical means modified appropriately within the scope of the claims are also included in the technical scope of the present invention. [Industrial Applicability]

[0332] The embodiments of the present invention can be suitably applied to a video decoding device that decodes coded data obtained by coding image data, and a video coding device that generates coded data obtained by coding image data, and can also be suitably applied to the data structure of coded data generated by a video coding device and referenced by the video decoding device. [Explanation of symbols]

[0333] 31 Image decoding device 301 Entropy Decoding Unit 302 Parameter Decoding Unit 303 Inter-prediction parameter derivation unit 30377 GPM Forecasting Department 305, 107 Loop filter 306, 109 Reference Picture Memory 307, 108 Prediction parameter memory 308, 101 Prediction image generation unit 309 Inter-prediction image generation unit 30952 GPM synthesis section 311, 105 Inverse quantization and inverse transform unit 312, 106 Addition section 320 Prediction parameter derivation part 11 Image encoding device 102 Subtraction section 103 Transformation and Quantization Unit 104 Entropy coding unit 110 Encoding parameter determination unit 111 Parameter Encoding Unit 112 Inter-prediction parameter coding unit 120 Prediction parameter derivation part

Claims

1. a prediction unit that derives a plurality of intra prediction modes and weights a plurality of prediction regions to generate a single predicted image; a parameter decoding unit that decodes a plurality of syntax elements; the prediction unit performs prediction for each of two non-rectangular prediction units into which the target block is divided by a line segment spanning the target block; An image decoding device characterized by referring to a table that associates partition indexes, angle indexes, and distance indexes, and generating the predicted image using the angle index and distance index derived based on the partition index among the plurality of syntax elements.

2. An inverse transform unit that performs a non-separable transform based on a non-separable transform size and a set number of the non-separable transform derived based on the intra prediction mode, The image decoding device according to claim 1, wherein the set number of the non-separable transform is derived from IntraGPM division information when the intra prediction mode is IntraGPM mode.

3. An image decoding device as described in Claim 1, characterized in that the table differs depending on the shape of the block.

4. a predicted image correction unit that corrects a temporary predicted image according to the intra prediction mode, When the intra prediction mode is IntraGPM mode, the predicted image correction unit corrects two intra predicted images used for IntraGPM prediction using filtered reference pixels to create two corrected predicted images. The image decoding device described in claim 1.

5. a prediction unit that derives a plurality of intra prediction modes and weights a plurality of prediction regions to generate a single predicted image; a parameter encoding unit that encodes a plurality of syntax elements; the prediction unit performs prediction for each of two non-rectangular prediction units into which the target block is divided by a line segment spanning the target block; An image coding device characterized by referring to a table that associates partition indexes, angle indexes, and distance indexes, and generating the predicted image using the angle index and distance index derived based on the partition index of the plurality of syntax elements.

6. An inverse transform unit that performs a non-separable transform based on a non-separable transform size and a set number of the non-separable transform derived based on the intra prediction mode, The image encoding device according to claim 5, wherein the set number of the non-separable transform is derived from IntraGPM division information when the intra prediction mode is an IntraGPM mode.

7. An image encoding device as described in Claim 5, characterized in that the table differs depending on the shape of the block.

8. a predicted image correction unit that corrects a temporary predicted image according to the intra prediction mode, When the intra prediction mode is IntraGPM mode, the predicted image correction unit corrects two intra predicted images used for IntraGPM prediction using filtered reference pixels to create two corrected predicted images. The image encoding device described in claim 5, characterized in that

Citation Information

Patent Citations

  • Video encoding method and apparatus with intra prediction, video decoding method and apparatus

    JP2014523697A

  • Image decoding device, image decoding method, and image decoding program

    JP2020058025A

  • Intra prediction device, image coding device, image decoding device, and program

    JP2020137119A