Video encoding device and recording medium

By enabling the specification of unique co-located picture indices for each slice within the video encoding device, the redundancy issue in existing video encoding and decoding techniques is addressed, enhancing encoding efficiency.

JP2025085673AActive Publication Date: 2025-06-05SHARP KK
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2025038589
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-06-05
Estimated Expiration
2039-12-17

AI Technical Summary

Technical Problem

In existing video encoding and decoding techniques, the index value indicating the co-located picture must be the same for all slices in a coded picture, leading to redundancy when a picture has multiple slices.

Method used

A video encoding device that derives merging candidates for collocated positions at the bottom right or center of a target block, and uses a parameter coding unit to encode a flag and index for temporal motion vector prediction in the picture header, allowing for different co-located pictures to be specified for each slice.

Benefits of technology

This approach reduces redundancy by allowing the specification of a unique co-located picture index for each slice, improving encoding efficiency without prohibiting the generation of coded data with varying reference picture sizes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025085673000001_ABST
    Figure 2025085673000001_ABST
Patent Text Reader

Abstract

To solve a problem that when a plurality of slices exist in a single picture, an identical value would be designated multiple times, which causes redundancy.SOLUTION: A video encoding device (11) comprises a merge candidate derivation unit (30361) and a parameter encoding unit (111). When time motion vector prediction is valid, the parameter encoding unit (111) encodes a first flag. When the first flag is true, the parameter encoding unit (111) (1) encodes a second flag, and (2) encodes an index of a co-located picture. The value of the second flag indicates that the co-located picture to be used for time motion vector prediction is derived from a first reference picture list, and the value of the second flag indicates that the co-located picture to be used for time motion vector prediction is derived from a second reference picture list, the index being an index for referencing the co-located picture.SELECTED DRAWING: Figure 23
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] An embodiment of the present invention relates to a predicted image generating device, 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 a decoded image by decoding the encoded data.

[0003] Specific examples of video encoding methods include H.264 / AVC and H.265 / HEVC (High-Efficiency Video Coding).

[0004] In such a video coding method, images (pictures) constituting a video are managed in a hierarchical structure consisting of slices obtained by dividing images, coding tree units (CTUs) obtained by dividing slices, coding units (sometimes called coding units: CUs) obtained by dividing coding tree units, and transform units (TUs) obtained by dividing coding units, and are coded / decoded for each CU.

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

[0006] Moreover, Non-Patent Document 1 can be cited as a recent example of a video encoding and decoding technique.

[0007] Non-Patent Document 1 introduces a motion vector prediction technique in the time direction. Therefore, when there are multiple collocated pictures that can be referenced, the header information of a slice describes an index value that specifies which collocated picture's motion vector is to be used for motion vector prediction. [Prior art documents] [Non-patent literature]

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

[0009] However, in Non-Patent Document 1, it is stipulated that the index value indicating the co-located picture must be the same for all slices in the coded picture as a requirement that the coded data must satisfy. Therefore, when one picture has multiple slices, the same value is specified multiple times, which is redundant, which is a problem. [Means for solving the problem]

[0010] A video encoding device according to one aspect of the present invention comprises: a merging candidate derivation unit that derives merging candidates that refer to collocated positions that are spatially located at the bottom right or center of the target block, and derives pairwise candidates from the average of two merging candidates stored in the merging candidate list; a parameter coding unit for generating a picture header, a slice header and a picture parameter set; The parameter coding unit codes a first flag, which is to be included in the picture header and indicates whether or not the temporal motion vector prediction is used, when the temporal motion vector prediction is enabled; When the first flag is true, the parameter encoding unit: (1) encoding a second flag; (2) encoding an index of a co-located picture used for the temporal motion vector prediction to be included in the picture header; a value of the second flag equal to 1 indicates that the co-located picture used for the temporal motion vector prediction is derived from a first reference picture list; a value of the second flag equal to 0 indicates that the co-located picture used for the temporal motion vector prediction is derived from a second reference picture list; The index is an index for referencing the co-located picture in the first reference picture list or the second reference picture list indicated by the second flag. It is characterized by: Further, a recording medium according to one aspect of the present invention includes: A computer-readable recording medium having a program recorded thereon for causing a computer to encode a moving image, The program causes the computer to deriving merge candidates that reference collocated positions that are spatially located to the bottom right or center of the current block; deriving pairwise candidates from an average of two merging candidates stored in the merging candidate list; if temporal motion vector prediction is enabled, encoding a first flag to be included in a picture header indicating whether the temporal motion vector prediction is used; If the first flag is true, (1) The second flag and (2) encoding an index of a co-located picture used for the temporal motion vector prediction to be included in the picture header; generating the picture header, slice header and picture parameter set; a value of the second flag equal to 1 indicates that the co-located picture used for the temporal motion vector prediction is derived from a first reference picture list; a value of the second flag equal to 0 indicates that the co-located picture used for the temporal motion vector prediction is derived from a second reference picture list; The index is an index for referencing the co-located picture in the first reference picture list or the second reference picture list indicated by the second flag. It is characterized by: Effect of the Invention

[0011] According to one aspect of the present invention, in a video encoding / decoding process, it is possible to specify an index indicating one co-located picture in a coding picture, thereby reducing redundancy and solving the above problem. [Brief description of the drawings]

[0012] [Figure 1] 1 is a schematic diagram showing a configuration of an image transmission system according to an embodiment of the present invention. [Diagram 2] 1 is a diagram showing the configuration of a transmitting device equipped with a video encoding device according to the present embodiment, and a receiving device equipped with a video decoding device, in which PROD_A indicates the transmitting device equipped with the video encoding device, and PROD_B indicates the receiving device equipped with the video decoding device. [Diagram 3] 1 is a diagram showing the configuration of a recording device equipped with a video encoding device according to the present embodiment, and a playback device equipped with a video decoding device, in which PROD_C indicates a recording device equipped with a video encoding device, and PROD_D indicates 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. [Diagram 5] 1 is a conceptual diagram of an image to be processed in the image transmission system according to the present embodiment. [Figure 6] FIG. 2 is a conceptual diagram showing an example of a reference picture and a reference picture list. [Figure 7] FIG. 1 is a schematic diagram showing a configuration of a video decoding device. [Figure 8] 11 is a flowchart illustrating a schematic operation of the video decoding device. [Figure 9] 13 is a diagram illustrating an example of the configuration of a syntax table of a slice header. [Figure 10] 2 is a flowchart illustrating an example of a process of the present application. [Figure 11] 11 is a diagram showing an example of the structure of a syntax table of a picture header and a slice header. FIG. [Figure 12] FIG. 13 is a schematic diagram showing a configuration of an inter-prediction parameter derivation unit. [Figure 13] 1 is a schematic diagram showing the configuration of a merge prediction parameter derivation unit and an AMVP prediction parameter derivation unit. [Figure 14] A diagram showing affine prediction motion vectors spMvLX[xi][yi]. [Figure 15] FIG. 13 is a schematic diagram showing a configuration of an inter-prediction image generating unit. [Figure 16] 13 is a table relating to derivation of coefficients in an Interpolation Filter process. [Figure 17] 13 is a table relating to derivation of coefficients in an Interpolation Filter process. [Figure 18] 13 is a table relating to derivation of coefficients in an Interpolation Filter process. [Figure 19] 13 is a table relating to derivation of coefficients in an Interpolation Filter process. [Figure 20] 13 is a table relating to derivation of coefficients in an Interpolation Filter process. [Figure 21] 13 is a table relating to derivation of coefficients in an Interpolation Filter process. [Figure 22] 13 is a table relating to derivation of coefficients in an Interpolation Filter process. [Figure 23] FIG. 1 is a block diagram showing a configuration of a video encoding device. [Figure 24] 13 is a schematic diagram showing a configuration of an inter-prediction parameter encoding unit. [Diagram 25] 13 is a schematic diagram showing a configuration of an intra-prediction parameter encoding unit. [Figure 26] 13 is a flowchart illustrating a process flow in which the BDOF unit derives a predicted image. [Figure 27] FIG. 2 is a schematic diagram showing the configuration of a BDOF section. [Figure 28] FIG. 13 is a diagram for explaining the syntax of coding parameters for weighted prediction. [Figure 29] FIG. 13 is a diagram for explaining the syntax of coding parameters for weighted prediction. [Diagram 30] FIG. 13 is a diagram for explaining the syntax of BCW prediction. [Diagram 31] FIG. 13 is a diagram for explaining the syntax of coding parameters for weighted prediction. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

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

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

[0015] The image transmission system 1 is a system that transmits an encoded stream obtained by encoding an image of a different resolution after resolution conversion, decodes the transmitted encoded stream, and displays the image by converting it back to the original resolution. The image transmission system 1 includes a resolution conversion device (resolution conversion unit) 51, a video encoding device (image encoding device) 11, a network 21, a video decoding device (image decoding device) 31, a resolution inverse conversion device (resolution inverse conversion unit) 61, and a video display device (image display device) 41.

[0016] The resolution conversion device 51 converts the resolution of an image T included in the video, and supplies a variable resolution video signal including images of different resolutions to the video coding device 11. The resolution conversion device 51 also supplies information indicating whether or not the resolution of an image is to be converted to the video coding device 11. If the information indicates resolution conversion, the video coding device sets resolution conversion information ref_pic_resampling_enabled_flag, which will be described later, to 1, and includes it in a sequence parameter set SPS (Sequence Parameter Set) of the coded data for coding.

[0017] The video encoding device 11 receives an image T whose resolution has been converted.

[0018] The network 21 transmits the encoded stream Te generated by the video encoding device 11 to the video decoding device 31. The network 21 is the Internet, a wide area network (WAN), a local area network (LAN), or a combination of these. The network 21 is not necessarily limited to a bidirectional communication network, and may be a unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. The network 21 may also be replaced by a storage medium on which the encoded stream Te is recorded, such as a DVD (Digital Versatile Disc: registered trademark) or a BD (Blue-ray Disc: registered trademark).

[0019] The video decoding device 31 decodes each of the coded streams Te transmitted by the network 21 , generates a variable resolution decoded image signal, and supplies it to the resolution inverse conversion device 61 .

[0020] When the resolution conversion information included in the variable resolution decoded image signal indicates resolution conversion, the resolution inverse conversion device 61 generates a decoded image signal of the original size by inversely converting the resolution-converted image.

[0021] The video display device 41 displays all or part of one or more decoded images Td indicated by the decoded image signal input from the resolution inverse conversion unit. The video display device 41 includes a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display. The display may be in the form of a stationary display, a mobile display, an HMD, or the like. When the video decoding device 31 has high processing power, it displays high quality images, and when it has only low processing power, it displays images that do not require high processing power or display power.

[0022] Fig. 5 is a conceptual diagram of an image to be processed in the image transmission system 1 shown in Fig. 1, showing changes in the resolution of the image over time. However, in Fig. 5, no distinction is made as to whether the image is encoded or not. Fig. 5 shows an example in which an image is transmitted to the image decoding device 31 with a reduced resolution during processing in the image transmission system 1. As shown in Fig. 5, the resolution conversion device 51 normally performs conversion to reduce the resolution of the image in order to reduce the amount of information to be transmitted.

[0023] <operator> The operators used in this specification are listed below.

[0024] >> is a right bit shift, << is a left bit shift, & is a bitwise AND, | is a bitwise OR, |= is the OR assignment operator, and || indicates 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. It returns a if c < a, b if c > b, and c otherwise (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.

[0030] ceil(a) is a function that returns the smallest integer greater than or equal to a.

[0031] a / d represents the division of a by d (truncating the fractional part).

[0032] <Structure of the Encoded Stream Te> Prior to the detailed description of the moving image encoding device 11 and the moving image decoding device 31 according to this embodiment, the data structure of the encoded stream Te generated by the moving image encoding device 11 and decoded by the moving image decoding device 31 will be described.

[0033] FIG. 4 is a diagram showing the hierarchical structure of data in the encoded stream Te. The encoded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence. FIG. 4 shows an encoded video sequence that defines a sequence SEQ, an encoded picture that defines a picture PICT, an encoded slice that defines a slice S, and encoded slice data that defines slice data, an encoded tree unit included in the encoded slice data, and an encoded unit included in the encoded tree unit. A diagram showing the encoded slice data, the encoded tree unit included in the encoded slice data, and the encoded unit included in the encoded tree unit is shown.

[0034] (Coded Video Sequence) The coded video sequence defines a set of data that the video decoding device 31 refers to in order to decode the sequence SEQ to be processed. As shown in Fig. 4, the sequence SEQ includes a video parameter set VPS (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 specifies a set of coding parameters common to multiple videos composed of multiple layers, as well as a set of coding parameters related to multiple layers and each individual layer included in the video.

[0036] The sequence parameter set SPS specifies a set of coding parameters that the video decoding device 31 refers to in order to decode the target sequence. For example, the width and height of a picture are specified. Note that there may be multiple SPSs. In that case, one of the multiple SPSs is selected from the PPS.

[0037] Here, the sequence parameter set SPS includes the following syntax: ref_pic_resampling_enabled_flag: A flag that specifies whether or not to use a function that changes the resolution (resampling) when decoding each image included in a single sequence that references the target SPS. In other words, this flag indicates that the size of the reference picture referenced in generating a predicted image changes between each image indicated by a single sequence. If the value of this flag is 1, the resampling is applied, and if the value is 0, it is not applied. pic_width_max_in_luma_samples: This syntax specifies the width of the image with the largest width among the images in a single sequence, in units of luminance blocks. The value of this syntax must not be 0 and must be an integer multiple of Max(8, MinCbSizeY), where MinCbSizeY is a value determined by the minimum size of a luminance block. pic_height_max_in_luma_samples: This syntax specifies the height of the image with the maximum height among the images in a single sequence, in units of luminance blocks. The value of this syntax is required to be a non-zero integer multiple of Max(8, MinCbSizeY). sps_temporal_mvp_enabled_flag: A flag that specifies whether or not to use temporal motion vector prediction when decoding a target sequence. If the value of the flag is 1, temporal motion vector prediction is used, and if the value is 0, temporal motion vector prediction is not used. In addition, by specifying the flag, it is possible to prevent the reference coordinate position from shifting when, for example, referring to a reference picture with a different resolution.

[0038] The picture parameter set PPS specifies a set of coding parameters that the video decoding device 31 refers to in order to decode each picture in the target sequence. For example, the picture parameter set PPS includes a reference value of the quantization width (pic_init_qp_minus26) used in decoding the picture and a flag (weighted_pred_flag) indicating the application of weighted prediction. Note that there may be multiple PPSs. In that case, one of the multiple PPSs is selected for each picture in the target sequence.

[0039] Here, the picture parameter set PPS includes the following syntax. ·pic_width_in_luma_samples: Syntax that specifies the width of the target picture. The value of this syntax is required to be a non-zero integer multiple of Max(8, MinCbSizeY) and equal to or less than pic_width_max_in_luma_samples. ·pic_height_in_luma_samples: Syntax that specifies the height of the target picture. The value of this syntax is required to be a non-zero integer multiple of Max(8, MinCbSizeY) and equal to or less than pic_height_max_in_luma_samples. conformance_window_flag: a flag indicating whether conformance (cropping) window offset parameters will be signaled subsequently, and where the conformance window will be displayed. If this flag is 1, the parameters will be signaled, if it is 0, the conformance window offset parameters are not present. conf_win_left_offset, conf_win_right_offset, conf_win_top_offset, conf_win_bottom_offset: offset values ​​for specifying the left, right, top, and bottom positions of the picture output by the decoding process with respect to the rectangular area specified by the output picture coordinates. In addition, if the value of conformance_window_flag is 0, the values ​​of conf_win_left_offset, conf_win_right_offset, conf_win_top_offset, and conf_win_bottom_offset are estimated to be 0. scaling_window_flag: A flag indicating whether or not a scaling window offset parameter exists in the target PPS, and is a flag related to the specification of the output image size. When this flag is 1, it indicates that the parameter exists in the PPS, and when this flag is 0, it indicates that the parameter does not exist in the PPS. In addition, when the value of ref_pic_resampling_enabled_flag is 0, the value of scaling_window_flag is also required to be 0. ·scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, scaling_win_bottom_offset: Syntax to specify the offset applied to the image size for scaling ratio calculation in luminance samples for the left, right, top, and bottom positions of the target picture. If the value of scaling_window_flag is 0, the values ​​of scaling_win_left_offset, scaling_win_right_offset, scaling_win_top_offset, and scaling_win_bottom_offset are presumed to be 0. It is also required that the value of scaling_win_left_offset + scaling_win_right_offset is less than pic_width_in_luma_samples, and the value of scaling_win_top_offset + scaling_win_bottom_offset is less than pic_height_in_luma_samples.

[0040] The width PicOutputWidthL and height PicOutputHeightL of the output picture are derived as follows:

[0041] PicOutputWidthL = pic_width_in_luma_samples - (scaling_win_right_offset + scaling_win_left_offset) PicOutputHeightL = pic_height_in_pic_size_units - (scaling_win_bottom_offset +scaling_win_top_offset) pps_collocated_from_l0_idc: This is a syntax indicating whether collocated_from_l0_flag is present in the slice header of the slice that references the PPS. When the value of this syntax is 0, collocated_from_l0_flag is present in the slice header, and when the value is 1 or 2, it is not present in the slice header.

[0042] (Encoded Picture) A coded picture defines a set of data to be referenced by the video decoding device 31 in order to decode a picture PICT to be processed. As shown in Fig. 4, the picture PICT includes a picture header PH and slices 0 to NS-1 (NS is the total number of slices included in the picture PICT).

[0043] Hereinafter, when there is no need to distinguish between slices 0 to NS-1, the subscripts of the symbols may be omitted. The same applies to other data that are included in the coded stream Te described below and have subscripts.

[0044] The picture header contains the following syntax: pic_temporal_mvp_enabled_flag: a flag that specifies whether or not temporal motion vector prediction is used for inter prediction of a slice associated with the picture header. If the value of the flag is 0, the syntax elements of the slice associated with the picture header are restricted so that temporal motion vector prediction is not used in decoding the slice. If the value of the flag is 1, it indicates that temporal motion vector prediction is used in decoding the slice associated with the picture header. If the flag is not specified, the value is presumed to be 0.

[0045] (Coded Slice) A coded slice defines a set of data to be referenced by the video decoding device 31 in order to decode a target slice S. As shown in Fig. 4, a slice includes a slice header and slice data.

[0046] The slice header includes a group of coding parameters to be referred to by the video decoding device 31 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.

[0047] Slice types that can be specified by the slice type specification information include (1) an I slice that uses only intra prediction when encoding, (2) a P slice that uses uni-prediction (L0 prediction) or intra prediction when encoding, and (3) a B slice that uses uni-prediction (L0 prediction or L1 prediction), bi-prediction, or intra prediction when 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, when referring to P or B slice, it refers to a slice including a block that can use inter prediction.

[0048] In addition, the slice header may include a reference to a picture parameter set PPS (pic_parameter_set_id).

[0049] Furthermore, the slice header may include the following syntax as shown in FIG. collocated_from_l0_flag: a flag that specifies from which reference picture list the collocated picture used for temporal motion vector prediction is derived. When the value of the flag is 1, it indicates that the picture is derived from reference picture list 0 (L0 list), and when the value of the flag is 0, it indicates that the picture is derived from reference picture list 1 (L1 list). When the flag is not specified, a value of 0 or 1 is estimated according to the slice type and pps_collocated_from_l0_idc.

[0050] If the slice type is other than B, collocated_from_l0_flag is inferred to be 1. If the slice type is B, collocated_from_l0_flag is inferred to be pps_collocated_from_l0_idc - 1. collocated_ref_idx: reference index of the collocated picture used for temporal motion vector prediction. The value of collocated_ref_idx is also specified by the slice type or the value of collocated_from_l0_flag. If the slice type is P, or if the slice type is B and collocated_from_l0_flag is 1, collocated_ref_idx refers to a picture in List0. If the slice type is B and collocated_from_l0_flag is 0, collocated_ref_idx refers to a picture in List1. If collocated_ref_idx is not present, it is inferred to be 0.

[0051] In this embodiment, if the value of the variable RefPicIsScaled[collocated_from_l0_flag? 0:1][collocated_ref_idx] indicating that the size of the coded picture and the size of the reference picture are different is 1, the variable SliceTemporalMvpEnableFlag is set to 0. Otherwise, the variable SliceTemporalMvpEnableFlag is set to the value of pic_temporal_mvp_enabled_flag. As a result, if a reference picture of a size different from the size of the coded picture is specified in collocated_ref_idx, the variable SliceTemporalMvpEnableFlag is forcibly set to 0, and coding and decoding processes are performed for that slice without using the motion vector information of the reference picture.

[0052] FIG. 10 is a flow diagram of the above process. First, the value of collocated_from_l0_flag, which is a flag that specifies whether a collocated picture used for temporal motion vector prediction is derived from either the L0 or L1 reference picture list, is substituted into the variable X. (S201) Next, in order to check whether the size of the collocated picture indicated by collocated_ref_idx is different from the size of the coding picture, the value of the variable RefPicIsScaled is compared to see if it is 1 or not. (S202) If it is 1, it is determined that the size of the collocated picture is different from the size of the coding picture, and the variable SliceTemporalMvpEnableFlag is set to 0, and the motion vector information of the collocated picture is not used. (S203) If it is not 1, the value of picTemporalMvpEnableFlag, which is a flag at the picture level, is substituted into the variable SliceTemporalMvpEnableFlag. (S204) In another embodiment, if a reference picture of a size different from the size of the coded picture is specified by collocated_ref_idx, the smallest value of ref_idx among reference pictures of the same size as the size of the coded picture is set as collocated_ref_idx. Otherwise, if there is no reference picture of the same size as the size of the coded picture, the variable SliceTemporalMvpEnableFlag may be forcibly set to 0, and coding and decoding processes may be performed in the slice without using motion vector information of the reference picture.

[0053] In any case, when a reference picture of a size different from the size of the coded picture is specified by collocated_ref_idx, a procedure is set so that the operation of the decoding process is always the same.

[0054] In this way, instead of prohibiting the generation of coded data including collocated_ref_idx that indicates a reference picture with a size different from that of the coded picture, the process when such collocated_ref_idx is decoded is defined, which makes it possible to guarantee that the operation of the decoding process is always the same.

[0055] In Non-Patent Document 1, it is stipulated that the value of collocated_ref_idx must be the same for all slices in a coded picture as a requirement that coded data must satisfy. Therefore, when one picture has multiple slices, the same value is specified multiple times, which is redundant, which is a problem.

[0056] Therefore, in another embodiment of the present invention, collocated_ref_idx is specified in the picture header PH as shown in FIG.

[0057] FIG. 11(a) shows a part of the syntax of the picture header PH.

[0058] When decoding a target sequence, the value of pic_temporal_mvp_enabled_flag is set if sps_temporal_mvp_enabled_flag is 1, and collocated_ref_idx is set if pic_temporal_mvp_enabled_flag is 1. sps_temporal_mvp_enabled_flag is a flag that specifies whether or not to use temporal motion vector prediction.

[0059] If the slice_type of the slice associated with the picture header PH is equal to P, or if the slice_type of the slice associated with the picture header PH is equal to B and the collocated_from_l0_flag of the slice associated with the picture header PH is 1, collocated_ref_idx refers to a picture in list 0.

[0060] If the slice_type of the slice associated with the picture header PH is equal to B and the collocated_from_l0_flag of the slice associated with the picture header PH is equal to 0, then collocated_ref_idx refers to a picture in list 1. If collocated_ref_idx is not present, the value of collocated_ref_idx is inferred to be equal to 0.

[0061] If the slice associated with the picture header PH does not have a reference index indicated by collocated_ref_idx, the variable SliceTemporalMvpEnableFlag of the slice associated with PH is set to 0.

[0062] If RefPicIsScaled[collocated_from_l0_flag? 0:1][collocated_ref_idx] of a slice associated with the picture header PH is equal to 1, the variable SliceTemporalMvpEnableFlag of the slice associated with the picture header PH is set to 0.

[0063] Otherwise, the variable SliceTemporalMvpEnableFlag is set to pic_temporal_mvp_enabled_flag.

[0064] FIG. 11(b) shows a part of the syntax of the slice header.

[0065] If the value of pic_temporal_mvp_enabled_flag is 1, collocated_from_l0_flag is specified when the slice_type of the slice is equal to B and the value of pps_collocated_from_l0_idc is 0.

[0066] When the value of collocated_from_l0_flag is 1, it indicates that the picture is derived from reference picture list 0 (L0 list), and when the value of the flag is 0, it indicates that the picture is derived from reference picture list 1 (L1 list). If the flag is not specified, a value of 0 or 1 is inferred depending on the slice type and pps_collocated_from_l0_idc.

[0067] If the slice type is other than B, collocated_from_l0_flag is inferred to be 1. If the slice type is B, collocated_from_l0_flag is inferred to be pps_collocated_from_l0_idc - 1.

[0068] By using the above syntax, even if a picture has multiple slices, it is possible to specify an index that indicates one co-located picture for a coded picture without specifying the same value multiple times, thereby reducing redundancy and solving the above problem.

[0069] (Encoded slice data) The coded slice data specifies a set of data to be referenced by the video decoding device 31 in order to decode the slice data to be processed. The slice data includes a CTU, as shown in the coded slice header in Fig. 4. A CTU is a block of a fixed size (e.g., 64x64) that constitutes a slice, and is also called a Largest Coding Unit (LCU).

[0070] (coding tree unit) 4 specifies a set of data that the video decoding device 31 refers to in order to decode a CTU to be processed. The CTU is divided into coding units CU, which are basic units of encoding processing, by recursive quad tree division (QT (Quad Tree) division), binary tree division (BT (Binary Tree) division), or ternary tree division (TT (Ternary Tree) division). BT division and TT division are collectively called multi tree division (MT (Multi Tree) division). A node of a tree structure obtained by recursive quad tree division is called a coding node. Intermediate nodes of a quad tree, binary tree, and ternary tree are coding nodes, and the CTU itself is specified as the top coding node.

[0071] CT includes, as CT information, a CU split flag (split_cu_flag) indicating whether CT splitting is performed, a QT split flag (qt_split_cu_flag) indicating whether QT splitting is performed, an MT split direction (mtt_split_cu_vertical_flag) indicating the split direction of MT splitting, and an MT split type (mtt_split_cu_binary_flag) indicating the split type of MT splitting. split_cu_flag, qt_split_cu_flag, mtt_split_cu_vertical_flag, and mtt_split_cu_binary_flag are transmitted for each encoding node.

[0072] Different trees may be used for luminance and chrominance. The type of tree is indicated by treeType. For example, when using a common tree for luminance (Y, cIdx=0) and chrominance (Cb / Cr, cIdx=1,2), the common single tree is indicated by treeType=SINGLE_TREE. When using two different trees (DUAL trees) 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.

[0073] (Encoding Unit) 4 specifies a set of data to be referenced by the video decoding device 31 in order to decode a coding unit to be processed. Specifically, a CU is composed of a CU header CUH, prediction parameters, transformation parameters, quantization transformation coefficients, etc. The CU header specifies a prediction mode, etc.

[0074] The prediction process may be performed on a CU basis, or on a sub-CU basis by further dividing a CU. If the size 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 that 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 2 parts horizontally and 2 parts vertically, into 4 sub-CUs.

[0075] 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).

[0076] The transform and quantization processes are performed in units of CUs, but the quantized transform coefficients may be entropy coded in units of sub-blocks such as 4x4.

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

[0078] Hereinafter, prediction parameters of inter prediction will be described. Inter prediction parameters are composed of prediction list use flags predFlagL0 and predFlagL1, reference picture indexes 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 "a flag indicating whether or not XX" is written, a flag other than 0 (for example, 1) is XX, 0 is not XX, and 1 is treated as true and 0 is treated as false in logical negation, logical product, etc. (similarly below). However, in an actual device or method, other values ​​can be used as true and false values.

[0079] Syntax elements for deriving inter-prediction parameters include, for example, an affine flag affine_flag used in merge mode, a merge flag merge_flag, a merge index merge_idx, an MMVD flag mmvd_flag, 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.

[0080] (See 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 the conceptual diagram showing an example of a reference picture in FIG. 6, a rectangle indicates a picture, an arrow indicates a reference relationship between pictures, the horizontal axis indicates time, I, P, and B in the rectangle indicate an intra picture, a uni-predictive picture, and a bi-predictive picture, respectively, and numbers in the rectangle indicate a decoding order. As shown in the figure, the decoding order of pictures is I0, P1, B2, B3, and B4, and the display order is I0, B3, B2, B4, and P1. FIG. 6 shows an example of a reference picture list of a picture B3 (target picture). A reference picture list is a list indicating candidates for a reference picture, 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, refIdxLX specifies which picture in the reference picture list RefPicListX (X=0 or 1) is actually referenced. The diagram shows an example where refIdxL0=2 and refIdxL1=0. Note that LX is a description method used when there is no distinction between L0 prediction and L1 prediction, and hereinafter, parameters for the L0 list and parameters for the L1 list are distinguished by replacing LX with L0 and L1.

[0081] (Merge prediction and AMVP prediction) The prediction parameter decoding (encoding) method includes a merge prediction mode and an AMVP (Advanced Motion Vector Prediction) mode, and merge_flag is a flag for identifying these. The merge prediction mode is a mode in which the prediction list usage flag predFlagLX, the reference picture index refIdxLX, and the motion vector mvLX are not included in the encoded data, but are derived from the prediction parameters of the neighboring blocks that have already been processed. The 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 the difference vector mvdLX. In addition to the merge prediction mode, there may be an affine prediction mode and an MMVD prediction mode.

[0082] 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 indicate uni-prediction using one reference picture managed in the L0 list and L1 list, respectively. PRED_BI indicates bi-prediction using two reference pictures managed in the L0 list and L1 list.

[0083] The merge_idx is an index indicating which prediction parameter is to be used as the prediction parameter of the current block among prediction parameter candidates (merge candidates) derived from blocks for which processing has been completed.

[0084] (Motion Vector) mvLX indicates the amount of shift between blocks on two different pictures. A prediction vector and a difference vector related to mvLX are called mvpLX and mvdLX, respectively.

[0085] (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 are mutually convertible.

[0086] inter_pred_idc = (predFlagL1<<1)+predFlagL0 predFlagL0 = inter_pred_idc & 1 predFlagL1 = inter_pred_idc >> 1 In addition, the inter prediction parameter 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.

[0087] (Bi-predictive biPred decision) The flag biPred indicating whether or not the prediction is performed can be derived based on whether or not two prediction list usage flags are both 1. For example, the flag can be derived by the following formula.

[0088] biPred = (predFlagL0==1 && predFlagL1==1) Alternatively, biPred can be derived based on whether the inter prediction identifier is a value indicating the use of two prediction lists (reference pictures). For example, biPred can be derived using the following formula:

[0089] biPred = (inter_pred_idc==PRED_BI) ? 1 : 0 (Configuration of a video decoding device) The configuration of a video decoding device 31 (FIG. 7) according to this embodiment will be described.

[0090] 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 generating unit (prediction image generating device) 308, an inverse quantization and inverse transform unit 311, an adder 312, and a prediction parameter derivation unit 320. Note that, in accordance with the video encoding device 11 described below, the video decoding device 31 may also be configured not to include the loop filter 305.

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

[0092] In cases other than the skip mode (skip_mode==0), the TU decoding unit 3024 decodes the QP update information and the quantized prediction error from the encoded data. More specifically, in cases of skip_mode==0, the TU decoding unit 3024 decodes a flag cu_cbp indicating whether or not the current block includes a quantized prediction error, and decodes the quantized prediction error when cu_cbp is 1. When cu_cbp does not exist in the encoded data, it derives 0.

[0093] The TU decoding unit 3024 decodes an index mts_idx indicating a transformation base from the coded data. The TU decoding unit 3024 also decodes an index stIdx indicating the use of a secondary transformation and a transformation base from the coded data. When stIdx is 0, it indicates no application of a secondary transformation, when it is 1, it indicates one transformation of a set (pair) of secondary transformation bases, and when it is 2, it indicates the other transformation of the pair.

[0094] Furthermore, the TU decoding unit 3024 may decode a sub-block transform flag cu_sbt_flag. When cu_sbt_flag is 1, the CU is divided into a plurality of sub-blocks, and the residual of only one specific sub-block is decoded. Furthermore, the TU decoding unit 3024 may decode a flag cu_sbt_quad_flag indicating whether the number of sub-blocks is 4 or 2, cu_sbt_horizontal_flag indicating the division direction, and cu_sbt_pos_flag indicating a sub-block including a non-zero transform coefficient.

[0095] The predicted image generating unit 308 includes an inter predicted image generating unit 309 and an intra predicted image generating unit 310 .

[0096] The prediction parameter derivation unit 320 is configured to include an inter prediction parameter derivation unit 303 and an intra prediction parameter derivation unit 304 .

[0097] In addition, although an example in which CTU and CU are used as processing units will be described below, the present invention is not limited to this example, and processing may be performed in sub-CU units. Alternatively, CTU and CU may be read as blocks, and sub-CU as sub-blocks, and processing may be performed in block or sub-block units.

[0098] The entropy decoding unit 301 performs entropy decoding on the externally inputted coded stream Te to decode each code (syntax element). There are two types of entropy coding: a method of variable-length coding the syntax element using a context (probability model) adaptively selected according to the type of syntax element and surrounding circumstances, and a method of variable-length coding the syntax element using a predetermined table or formula. The former CABAC (Context Adaptive Binary Arithmetic Coding) stores the CABAC state of the context (probability state index pStateIdx that specifies the type (0 or 1) and probability of the most probable symbol) in memory. The entropy decoding unit 301 initializes all CABAC states at the beginning of a segment (tile, CTU row, slice). The entropy decoding unit 301 converts the syntax element into a binary string (Bin String) and decodes each bit of the Bin String. When a context is used, a context index ctxInc is derived for each bit of the syntax element, the bit is decoded using the context, and the CABAC state of the used context is updated. Bits that do not use a context are decoded with equal probability (EP, bypass), and the derivation of ctxInc and the CABAC state are omitted. The decoded syntax elements include prediction information for generating a predicted image and a prediction error for generating a difference image.

[0099] 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. Control of which code to decode is performed based on an instruction from the parameter decoding unit 302.

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

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

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

[0103] Thereafter, the video decoding device 31 repeats the processes from S1300 to S5000 for each CTU included in the target picture to derive a decoded image of each CTU.

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

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

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

[0107] (S1510: Decoding CU information) The CU decoding unit 3022 decodes the CU information, prediction information, the TU split flag split_transform_flag, the CU residual flags cbf_cb, cbf_cr, cbf_luma, and the like from the encoded data.

[0108] (S1520: TU information decoding) When a prediction error is included in a TU, the TU decoding unit 3024 decodes the QP update information, the quantization prediction error, and the transform index mts_idx from the encoded data. Note that the QP update information is a difference value from the quantization parameter predicted value qPpred, which is a predicted value of the quantization parameter QP.

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

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

[0111] (S4000: Generate decoded image) The adder 312 adds the predicted image supplied from the predicted image generation unit 308 and the prediction error supplied from the inverse quantization and inverse transform unit 311 to generate a decoded image of the current CU.

[0112] (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.

[0113] (Configuration of inter-prediction parameter derivation unit) 12 is a schematic diagram showing the configuration of the inter prediction parameter derivation unit 303 according to this embodiment. The inter prediction parameter derivation unit 303 derives inter prediction parameters by referring to the prediction parameters stored in the prediction parameter memory 307 based on the syntax elements input from the parameter decoding unit 302. In addition, the inter prediction parameters are output to the inter prediction image generation unit 309 and the prediction parameter memory 307. The inter prediction parameter derivation unit 303 and its internal elements, the AMVP prediction parameter derivation unit 3032, the merge prediction parameter derivation unit 3036, the affine prediction unit 30372, the MMVD prediction unit 30373, the triangle prediction unit 30377, the DMVR unit 30537, and the MV addition unit 3038, are means common to the video encoding device and the video decoding device, and therefore may be collectively referred to as a motion vector derivation unit (motion vector derivation device).

[0114] The scale parameter derivation unit 30378 derives the horizontal scaling ratio RefPicScale[i][j][0] of the reference picture, the vertical scaling ratio RefPicScale[i][j][1] of the reference picture, and RefPicIsScaled[i][j] indicating whether the reference picture is scaled or not, where i indicates whether the reference picture list is the L0 list or the L1 list, and j is the value of the L0 reference picture list or the L1 reference picture y list, as follows:

[0115] RefPicScale[i][j][0] = ((fRefWidth << 14)+(PicOutputWidthL >> 1)) / PicOutputWidthL RefPicScale[ i ][ j ]

[0001] = ((fRefHeight << 14)+(PicOutputHeightL >> 1)) / PicOutputHeightL RefPicIsScaled[i][j] = (RefPicScale[i][j][0] != (1<<14)) || (RefPicScale[i][j][1] != (1<<14)) Here, the variable PicOutputWidthL is a value used when calculating a horizontal scaling ratio when a coded picture is referenced, and is the value obtained by subtracting left and right offset values ​​from the number of pixels in the horizontal direction of the luminance of the coded picture. The variable PicOutputHeightL is a value used when calculating a vertical scaling ratio when a coded picture is referenced, and is the value obtained by subtracting top and bottom offset values ​​from the number of pixels in the vertical direction of the luminance of the coded picture. The variable fRefWidth is the value of PicOutputWidthL of the reference picture with reference list value j in list i, and the variable fRefHight is the value of PicOutputHeightL of the reference picture with reference picture list value j in list i.

[0116] When affine_flag is 1, that is, when affine prediction mode is indicated, the affine prediction unit 30372 derives inter prediction parameters on a sub-block basis.

[0117] When mmvd_flag is 1, that is, when it indicates the MMVD prediction mode, the MMVD predictor 30373 derives inter prediction parameters from the merge candidates and difference vectors derived by the merge prediction parameter derivation unit 3036.

[0118] When TriangleFlag is 1, that is, when it indicates a triangle prediction mode, the triangle predictor 30377 derives triangle prediction parameters.

[0119] When merge_flag is 1, that is, when it indicates the merge prediction mode, merge_idx is derived and output to the merge prediction parameter derivation unit 3036 .

[0120] 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.

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

[0122] (Affine prediction part) The affine prediction unit 30372 1) derives motion vectors for two control points CP0 and CP1, or three control points CP0, CP1, and CP2 of the target block, 2) derives affine prediction parameters for the target block, and 3) derives motion vectors for each sub-block from the affine prediction parameters.

[0123] In the case of merge affine prediction, the motion vector cpMvLX[] of each control point CP0, CP1, CP2 is derived from the motion vector of the block adjacent to the target block. In the case of inter-affine prediction, the cpMvLX[] of each control point is derived from the sum of the predicted vector of each control point CP0, CP1, CP2 and the difference vector mvdCpLX[] derived from the encoded data.

[0124] 14 is a diagram showing an example of deriving the motion vector spMvLX of each sub-block constituting a target block (bW*bH) from the motion vector cpMvLX[0] of control point CP0, the motion vector cpMvLX[1] of CP1, and the motion vector cpMvLX[2] of CP2. As shown in the diagram, spMvLX is derived as the motion vector of the point (xPosCb, yPosCb) located at the center of each sub-block.

[0125] The affine prediction unit 30372 derives affine prediction parameters (mvScaleHor, mvScalerVer, dHorX, dHorY, dHorX, dVerY) of the current block from the motion vector of the control point.

[0126] mvScaleHor = cpMvLX

[0000]

[0000] << 7 mvScaleVer = cpMvLX

[0000]

[0001] << 7 dHorX = ( cpMvLX

[0001]

[0000] - cpMvLX

[0000]

[0000] ) << ( 7 - log2CbW ) dVerX = ( cpMvLX

[0001]

[0001] - cpMvLX

[0000]

[0001] ) << ( 7 - log2CbW ) If numCpMv==3, dHorY = ( cpMvLX

[0002]

[0000] - cpMvLX

[0000]

[0000] ) << ( 7 - log2CbH ) dVerY = ( cpMvLX

[0002]

[0001] - cpMvLX

[0000]

[0001] ) << ( 7 - log2CbH ) If numCpMv != 3, dHorY = - dVerX dVerY = dHorX Here, log2CbW and log2CbH are the logarithmic values ​​of the width bW and height bH of the target block.

[0127] The affine prediction unit 30372 derives spMvLX[i][j] (i = 0, 1, 2, ..., (bW / sbW)-1, j = 0, 1, 2, ..., (bH / sbH)-1) in the current block based on the affine prediction parameters of the current block using the following equation.

[0128] xPosCb = 2 + (i<<2) yPosCb = 2 + (j<<2) spMvLX[i][j][0] = mvScaleHor + dHorX * xPosCb + dHorY * yPosCb spMvLX[i][j][1] = mvScaleVer + dVerX * xPosCb + dVerY * yPosCb It may also be round shifted and clipped.

[0129] spMvLX[i][j][0] = Clip3(-2^17, 2^17, (spMvLX[i][j][0]+64)>>7 ) spMvLX[i][j][1] = Clip3(-2^17, 2^17, (spMvLX[i][j][1]+64)>>7 ) Here, sbW and sbH are the width and height of the current sub-block.

[0130] Furthermore, in the coordinates (xSb, ySb) of the upper left block of the subblock, spMvLX[i][j] is assigned to the corresponding mvLX in the screen, where x = 0..sbW-1, y = 0..sbH-1.

[0131] mvLX[xSb + x][yXb + y] = spMv[i][j] (Merge prediction) 13 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 a merge candidate includes prediction parameters (predFlagLX, mvLX, refIdxLX), and is stored in a merge candidate list. An index is assigned to the merge candidates stored in the merge candidate list according to a predetermined rule.

[0132] The merge candidate derivation unit 30361 derives merge candidates by directly using the motion vectors and refIdxLX of the decoded adjacent blocks. In addition, the merge candidate derivation unit 30361 may apply a spatial merge candidate derivation process, a temporal merge candidate derivation process, a pairwise merge candidate derivation process, and a zero merge candidate derivation process, which will be described later.

[0133] As a spatial merge candidate derivation process, the merge candidate derivation unit 30361 reads out prediction parameters stored in the prediction parameter memory 307 according to a predetermined rule, and sets them as merge candidates. The method of specifying the reference picture is, for example, prediction parameters related to each of adjacent blocks within a predetermined range from the target block (for example, all or part of blocks adjacent to the left A1, right B1, upper right B0, lower left A0, and upper left B2 of the target block). The respective 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: The positions of A1, B1, B0, A0, and B2 are shown in the arrangement of merging candidates in the target picture in FIG.

[0134] 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), its width is cbWidth, and its height is cbHeight.

[0135] As a temporal merge derivation process, the merge candidate derivation unit 30361 reads the prediction parameters of the lower right CBR of the target block or the block C in the reference image including the center coordinates from the prediction parameter memory 307, as shown in the collocated picture of Figure 9, sets it as a merge candidate Col, and stores it in the merge candidate list mergeCandList[ ].

[0136] In general, block CBR is added to mergeCandList[] with priority, and when CBR does not have a motion vector (for example, an intra-prediction block) or when CBR is located outside the picture, the motion vector of block C is added to the prediction vector candidate. By adding the motion vector of a collocated block that is likely to have different motion as a prediction candidate, the number of prediction vector options increases, and the coding efficiency improves.

[0137] If SliceTemporalMvpEnabledFlag is 0 or cbWidth*cbHeight is less than or equal to 32, the co-located motion vector mvLXCol of the target block is set to 0, and the availability flag availableFlagLXCol of the co-located block is set to 0.

[0138] Otherwise (SliceTemporalMvpEnabledFlag is 1), do the following.

[0139] For example, the merging candidate derivation unit 30361 may derive the position of C (xColCtr, yColCtr) and the position of CBR (xColCBr, yColCBr) using the following formula.

[0140] xColCtr = xCb + (cbWidth>>1) yColCtr = yCb + (cbHeight>>1) xColCBr = xCb+cbWidth yColCBr = yCb + cbHeight If CBR is available, a motion vector of CBR is used to derive a merge candidate COL. If CBR is not available, COL is derived using C. Then, availableFlagLXCol is set to 1. Note that the reference picture may be collocated_ref_idx notified in the slice header.

[0141] The pairwise candidate derivation unit derives a pairwise candidate avgK from the average of the two merge candidates (p0Cand, p1Cand) already stored in mergeCandList, and stores it in mergeCandList[].

[0142] mvLXavgK[0] = (mvLXp0Cand[0]+mvLXp1Cand[0]) / 2 mvLXavgK[1] = (mvLXp0Cand[1]+mvLXp1Cand[1]) / 2 The merging candidate derivation unit 30361 derives zero merging candidates Z0, . . . , ZM, in which refIdxLX is 0...M and the X and Y components of mvLX are both 0, and stores them in the merging candidate list.

[0143] The order of storing the mergeCandList[] is, for example, spatial merge candidates (A1, B1, B0, A0, B2), temporal merge candidates Col, pairwise candidates avgK, and zero merge candidates ZK. Note that reference blocks that are unavailable (e.g., blocks that are intra-predicted) are 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 if( availableFlagAvgK ) mergeCandList[ i++ ] = avgK if( i < MaxNumMergeCand ) mergeCandList[ i++ ] = ZK The merging candidate selection unit 30362 selects a merging candidate N indicated by merge_idx from among the merging candidates included in the merging candidate list, using the following formula.

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

[0145] The merging candidate selection unit 30362 selects the selected (mvLXN[0], mvLXN[0]), predFlagLXN, and refIdxLXN as inter prediction parameters for the current block. The merging candidate selection unit 30362 stores the inter prediction parameters of the selected merging candidate in the prediction parameter memory 307, and also outputs them to the inter predicted image generation unit 309.

[0146] (DMVR) Next, a DMVR (Decoder side Motion Vector Refinement) process performed by the DMVR unit 30375 will be described. When merge_flag is 1 for a target CU, or when skip_flag is 1, the DMVR unit 30375 corrects the mvLX of the target CU derived by the merge prediction unit 30374 using a reference image. Specifically, when the prediction parameters derived by the merge prediction unit 30374 are bi-predictive, the DMVR unit 30375 corrects the motion vector using a predicted image derived from a motion vector corresponding to two reference pictures. The corrected mvLX is supplied to the inter-prediction image generation unit 309.

[0147] In deriving the flag dmvrFlag that specifies whether or not to perform DMVR processing, one of the conditions for setting dmvrFlag to 1 is that the above-mentioned values ​​of RefPicIsScaled[0][refIdxL0] are 0 and the values ​​of RefPicIsScaled[1][refIdxL1] are 0. When the value of dmvrFlag is set to 1, DMVR processing is performed by the DMVR unit 30375.

[0148] In addition, in deriving the flag dmvrFlag that specifies whether or not to perform DMVR processing, one of the conditions for setting dmvrFlag to 1 is that ciip_flag is 0, that is, IntraInter blending processing is not applied.

[0149] In deriving the flag dmvrFlag that specifies whether or not to perform DMVR processing, one of the conditions for setting dmvrFlag to 1 includes that the value of luma_weight_l0_flag[i], which is a flag indicating whether or not there is coefficient information for weighted prediction of luminance L0 prediction described later, is 0, and the value of luma_weight_l1_flag[i], which is a flag indicating whether or not there is coefficient information for weighted prediction of luminance L1 prediction, is 0. When the value of dmvrFlag is set to 1, DMVR processing is performed by the DMVR unit 30375.

[0150] In deriving the flag dmvrFlag that specifies whether or not to perform DMVR processing, one of the conditions for setting dmvrFlag to 1 may include that luma_weight_l0_flag[i] is 0, the value of luma_weight_l1_flag[i] is 0, chroma_weight_l0_flag[i] is a flag indicating whether or not coefficient information for weighted prediction of chroma L0 prediction (described later) is present, and chroma_weight_l1_flag[i] is a flag indicating whether or not coefficient information for weighted prediction of chroma L1 prediction is present, the value of chroma_weight_l1_flag[i] is 0. When the value of dmvrFlag is set to 1, DMVR processing is performed by the DMVR unit 30375.

[0151] (Prof.) Furthermore, the value of cbProfFlagLX is set to FALSE if the value of RefPicIsScaled[0][refIdxLX] is 1 or the value of RefPicIsScaled[1][refIdxLX] is 1. Here, cbProfFlagLX is a flag that specifies whether or not to perform Prediction refinement (PROF) of affine prediction.

[0152] (AMVP Prediction) 13 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 includes a vector candidate derivation unit 3033 and a vector candidate selection unit 3034. The vector candidate derivation unit 3033 derives a prediction vector candidate from the motion vector of the decoded adjacent block stored in the prediction parameter memory 307 based on refIdxLX, and stores the candidate in a prediction vector candidate list mvpListLX[].

[0153] The vector candidate selection unit 3034 selects the motion vector mvpListLX[mvp_LX_idx] indicated by mvp_LX_idx as mvpLX from among the predicted vector candidates in mvpListLX[]. The vector candidate selection unit 3034 outputs the selected mvpLX to the MV addition unit 3038.

[0154] (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 the prediction parameter memory 307.

[0155] mvLX[0] = mvpLX[0] + mvdLX[0] mvLX[1] = mvpLX[1] + mvdLX[1] (Detailed classification of subblock merges) The types of prediction processes related to sub-block merging are summarized below. As described above, they are roughly divided into merge prediction and AMVP prediction.

[0156] Merge predictions are further categorized as follows:

[0157] Normal merge prediction (block-based merge prediction) Sub-block merge prediction Sub-block merge prediction is further categorized as follows:

[0158] Sub-block prediction (ATMVP) Affine prediction Inferred affine prediction · Constructed affine prediction On the other hand, AMVP predictions are categorized as follows:

[0159] ·AMVP (translation) ·MVD affine prediction MVD affine prediction is further categorized as follows:

[0160] 4-parameter MVD affine prediction 6-parameter MVD affine prediction It should be noted that MVD affine prediction refers to affine prediction that uses a decoded difference vector.

[0161] In the sub-block prediction, similarly to the temporal merge derivation process, the availability of the co-located sub-block COL of the target sub-block, availableFlagSbCol, is determined, and if available, prediction parameters are derived. At least when the above-mentioned SliceTemporalMvpEnabledFlag is 0, availableFlagSbCol is set to 0.

[0162] MMVD prediction (Merge with Motion Vector Difference) may be classified as merge prediction or AMVP prediction. In the former case, mmvd_flag and MMVD-related syntax elements are decoded when merge_flag=1, and in the latter case, mmvd_flag and MMVD-related syntax elements are decoded when merge_flag=0.

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

[0164] The reference picture memory 306 stores the decoded image of the CU in a location that is determined in advance for each current picture and current CU.

[0165] The prediction parameter memory 307 stores prediction parameters at a predetermined location for each CTU or CU. Specifically, the prediction parameter memory 307 stores parameters decoded by the parameter decoding unit 302, parameters derived by the prediction parameter derivation unit 320, and the like.

[0166] The predicted image generating unit 308 receives parameters derived by the prediction parameter derivation unit 320. The predicted image generating unit 308 also reads a reference picture from the reference picture memory 306. The predicted image generating unit 308 generates a predicted image of a block or sub-block using the parameters and a reference picture (reference picture block) in a prediction mode indicated by predMode. Here, the reference picture block is a set of pixels on the reference picture (usually rectangular, so called a block), and is an area referenced to generate a predicted image.

[0167] (Inter-prediction image generation unit 309) When predMode indicates inter prediction mode, the inter prediction image generation unit 309 generates a prediction image of a block or sub-block by inter prediction using the inter prediction parameters and reference picture input from the inter prediction parameter derivation unit 303.

[0168] 15 is a schematic diagram showing a 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 includes a motion compensation unit (prediction image generation device) 3091 and a synthesis unit 3095. The synthesis unit 3095 includes an IntraInter synthesis unit 30951, a Triangle synthesis unit 30952, a BDOF unit 30954, and a weighted prediction unit 3094.

[0169] (Motion Compensation) The motion compensation unit 3091 (interpolated image generation unit 3091) generates an interpolated image (motion compensated image) by reading a reference block from the reference picture memory 306 based on the inter prediction parameters (predFlagLX, refIdxLX, mvLX) input from the inter prediction parameter derivation unit 303. The reference block is a block at a position shifted by mvLX from the position of the target block on the reference picture RefPicLX specified by refIdxLX. Here, if mvLX is not integer precision, a filter for generating pixels at decimal positions called a motion compensation filter is applied to generate an interpolated image.

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

[0171] 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 block of size bW*bH, where x=0...bW-1, y=0...bH-1, and MVPREC indicates the accuracy of mvLX (1 / MVPREC pixel accuracy), e.g., MVPREC=16.

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

[0173] 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).

[0174] 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[][].

[0175] In addition, the motion compensation unit 3091 has the function of scaling the interpolated image according to the horizontal scaling ratio RefPicScale[i][j][0] of the reference picture derived by the scale parameter derivation unit 30378 and the vertical scaling ratio RefPicScale[i][j][1] of the reference picture.

[0176] The synthesis unit 3095 includes an IntraInter synthesis unit 30951, a Triangle synthesis unit 30952, a weighted prediction unit 3094, and a BDOF unit 30954.

[0177] (Interpolation filter processing) Hereinafter, an interpolation filter process performed by the predicted image generating unit 308 will be described, in which the above-mentioned resampling is applied and the size of the reference picture changes within a single sequence. Note that this process may be performed by the motion compensation unit 3091, for example.

[0178] When the value of RefPicIsScaled[i][j] input from the inter prediction parameter derivation unit 303 indicates that the reference picture has been scaled, the predicted image generation unit 308 executes the following interpolation filter process.

[0179] When correcting the size of the reference picture for luminance, the predicted image generating unit 308 derives the value of the horizontal luminance interpolation filter coefficient fLH[p] and the value of the vertical luminance interpolation filter coefficient fLV[p]. Here, the value p corresponds to every 1 / 16 position of the luminance sample in the horizontal or vertical direction. The horizontal luminance interpolation filter coefficient fLH[p] at the 1 / 16 pixel position p of xFracL or yFracL is derived as follows.

[0180] In affine prediction, when the block size is equal to 4 in both the horizontal and vertical directions, the luminance interpolation filter coefficient fLH[p] shown in FIG.

[0181] Otherwise, if scalingRatio[0] is greater than 28672, the luminance interpolation filter coefficients fLH[p] shown in FIG.

[0182] Otherwise, if scalingRatio[0] is greater than 20480, the luminance interpolation filter coefficients fLH[p] shown in FIG.

[0183] Otherwise, the luminance interpolation filter coefficients fLH[p] are specified in FIG. 16 according to hpelIfIdx.

[0184] The vertical luma interpolation filter coefficient fLV[p] for each 1 / 16 fractional sample position p, which is equal to yFracL, is derived as follows:

[0185] In affine prediction, when the block size is equal to 4 in both the horizontal and vertical directions, the luminance interpolation filter coefficient fLV[p] uses the coefficients shown in FIG.

[0186] Otherwise, if scalingRatio[1] is greater than 28672, the luminance interpolation filter coefficient fLV[p] uses the values ​​shown in FIG.

[0187] Otherwise, if scalingRatio[1] is greater than 20480, the luminance interpolation filter coefficient fLV[p] uses the values ​​shown in FIG.

[0188] Otherwise, the luminance interpolation filter coefficient fLV[p] uses the values ​​shown in FIG. 16 according to hpelIfIdx.

[0189] The integer pixel position of luminance for i = 0..7 is (xInti, yInti), the decimal pixel position of luminance is (xFracL, yFracL), the reference pixel array of luminance is refPicLXL, and the index of the half-pixel interpolation filter is hpelIfIdx. The pixel value of the luminance interpolated image, predSampleLXL, is derived as follows:

[0190] If both xFracL and yFracL are equal to 0, and both scalingRatio[0] and scalingRatio[1] are less than 20481, the value of predSampleLXL is derived as follows, where Σ denotes summation for i=0..7.

[0191] predSampleLXL = refPicLXL[xInt3][yInt3] << shift3 Otherwise, if yFracL is 0 and scalingRatio[1] is less than 20481, the value of predSampleLXL is derived as follows:

[0192] predSampleLXL =(ΣfLH[xFracL][i]*refPicLXL[xInti][yInt3])>>shift1 Otherwise, if xFracL is 0 and scalingRatio[0] is less than 20481, the value of predSampleLXL is derived as follows:

[0193] predSampleLXL =(ΣfLV[yFracL][i]*refPicLXL[xInt3][yInti])>>shift1 Otherwise, the value of predSampleLXL is derived as follows:

[0194] The pixel array temp[n] for n = 0..7 is derived as follows:

[0195] temp[n] =(ΣfLH[xFracL][i]*refPicLXL[xInti][yIntn])>>shift1 The pixel value predSampleLXL of the luminance interpolated image is derived as follows.

[0196] predSampleLXL =(ΣfLV[yFracL][i]*temp[i])>> shift2 Furthermore, when correcting the size of the reference picture for chrominance, the predicted image generating unit 308 derives the value of a horizontal chrominance interpolation filter coefficient fCH[p] and the value of a vertical chrominance interpolation filter coefficient fCV[p]. Here, the value p corresponds to every 1 / 32 position of the chrominance sample in the horizontal or vertical direction. The horizontal chrominance interpolation filter coefficient fCH[p] at the 1 / 32 pixel position p of xFracC is derived as follows:

[0197] When scalingRatio[0] is greater than 28672, the color difference interpolation filter coefficients fCH[p] shown in FIG.

[0198] Otherwise, if scalingRatio[0] is greater than 20480, the color difference interpolation filter coefficients fCH[p] shown in FIG.

[0199] In other cases, the color difference interpolation filter coefficients fCH[p] shown in FIG. 20 are used.

[0200] The vertical chrominance interpolation filter coefficient fCV[p] for each 1 / 32 sub-pel position p, which is equal to yFracC, is derived as follows:

[0201] When scalingRatio[1] is greater than 28672, the color difference interpolation filter coefficients fCV[p] shown in FIG. 22 are used.

[0202] Otherwise, if scalingRatio[1] is greater than 20480, the color difference interpolation filter coefficients fCV[p] shown in FIG. 21 are used.

[0203] In other cases, the chroma interpolation filter coefficients fCV[p] shown in FIG. 20 are used.

[0204] When i = 0..3, the integer pixel position of the chrominance is (xInti, yInti), and the decimal pixel position of the chrominance (xFracL, yFracL), the chrominance reference pixel array refPicLXL, and the pixel value of the chrominance interpolated image predSampleLXLC are derived as follows.

[0205] The pixel value predSampleLXC of the color difference interpolated image is derived as follows.

[0206] If both xFracC and yFracC are 0 and both scalingRatio[0] and scalingRatio[1] are less than 20481, the value of predSampleLXC is derived as follows, where Σ denotes the sum for i=0..3.

[0207] predSampleLXC = refPicLXC[xInt1][yInt1] << shift3 Otherwise, if yFracC is 0 and scalingRatio[1] is less than 20481, the value of predSampleLXC is derived as follows:

[0208] predSampleLXC =(ΣfCH[xFracC][i]*refPicLXC[xInti][yInt1])>> shift1 Otherwise, if xFracC is 0 and scalingRatio[0] is less than 20481, the value of predSampleLXC is derived as follows:

[0209] predSampleLXC =(ΣfCV[yFracC][i]*refPicLXC[xInt1][yInti])>> shift1 Otherwise, the value of predSampleLXC is derived as follows: The pixel array temp[n] for n = 0..3 is derived as follows:

[0210] temp[n] =(ΣfCH[xFracC][i]*refPicLXC[xInti][yIntn])>> shift1 The pixel value predSampleLXC of the chrominance interpolated image is derived as follows.

[0211] predSampleLXC =(fCV[yFracC][0]*temp[0]+fCV[yFracC][1]*temp[1] + fCV[yFracC][2]*temp[2]+fCV[yFracC][3]*temp[3])>> shift2 (IntraInter synthesis processing) The IntraInter synthesis unit 30951 generates a predicted image by a weighted sum of an inter predicted image and an intra predicted image.

[0212] If the flag ciip_flag indicating whether to apply IntraInter blending processing is 1, the pixel value predSamplesComb[x][y] of the predicted image is derived as follows.

[0213] predSamplesComb[x][y] =(w * predSamplesIntra[x][y] +(4 - w)*predSamplesInter[x][y] + 2)>> 2 Here, predSamplesIntra[x][y] is the intra-predicted image, which is restricted to planar prediction, and predSamplesInter[x][y] is the reconstructed inter-predicted image.

[0214] The weight w is derived as follows:

[0215] When the bottommost block (A1 in FIG. 9) adjacent to the left of the current coding block and the rightmost block (B1 in FIG. 9) adjacent to the top of the current coding block are both intra blocks, w is set to 3.

[0216] Otherwise, if both the bottommost left-neighboring block and the rightmost upper-neighboring block to the current coding block are not intra, then w is set to 1.

[0217] Otherwise, w is set to 2.

[0218] (Triangle synthesis processing) The triangle synthesis unit 30952 generates a predicted image using the above-mentioned triangle prediction.

[0219] (BDOF prediction) Next, a description will be given of details of the BDOF prediction (Bi-Directional Optical Flow, BDOF processing) performed by the BDOF unit 30954. In a bi-prediction mode, the BDOF 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.

[0220] FIG. 26 is a flowchart illustrating the flow of a process for deriving a predicted image.

[0221] When the inter prediction parameter decoding unit 303 determines that L0 is uni-predictive (inter_pred_idc is 0 in S101), the motion compensation unit 3091 generates PredL0[x][y] (S102). When the inter prediction parameter decoding unit 303 determines that L1 is uni-predictive (inter_pred_idc is 1 in S101), the motion compensation unit 3091 generates PredL1[x][y] (S103). On the other hand, when the inter prediction parameter decoding unit 303 determines that the mode is bi-predictive (inter_pred_idc is 2 in S101), the process proceeds to S104 below. In S104, the synthesis unit 3095 determines whether or not BDOF processing is required by referring to bdofAvailableFlag indicating whether or not BDOF processing is performed. If bdofAvailableFlag indicates TRUE, the BDOF unit 30954 executes BDOF processing to generate a bi-predictive image (S106), and if it indicates FALSE, the synthesis unit 3095 generates a predicted image by normal bi-predictive image generation (S105).

[0222] In deriving the flag bdofAvailableFlag, which specifies whether or not to perform BDOF processing, one of the conditions for setting bdofAvailableFlag to 1 is that the value of the above-mentioned RefPicIsScaled[0][refIdxL0] is 0 and the value of RefPicIsScaled[1][refIdxL1] is 0.

[0223] In addition, in deriving the flag bdofAvailableFlag that specifies whether or not to perform BDOF processing, one of the conditions for setting bdofAvailableFlag to 1 is that ciip_flag is 0, in other words, IntraInter synthesis processing is not applied.

[0224] In addition, in deriving the flag bdofAvailableFlag, which specifies whether or not to perform BDOF processing, one of the conditions for setting bdofAvailableFlag to 1 includes that the value of luma_weight_l0_flag[i], a flag indicating whether or not coefficient information for weighted prediction of luminance L0 prediction described below, is 0, and the value of luma_weight_l1_flag[i], a flag indicating whether or not coefficient information for weighted prediction of luminance L1 prediction, is 0.

[0225] In addition, in deriving the flag bdofAvailableFlag that specifies whether or not to perform BDOF processing, one of the multiple conditions for the inter prediction parameter decoding unit 303 to set bdofAvailableFlag to 1 may include that luma_weight_l0_flag[i] is 0, the value of luma_weight_l1_flag[i] is 0, chroma_weight_l0_flag[i] is a flag indicating whether or not coefficient information for weighted prediction of chroma L0 prediction described later is present, and the value of chroma_weight_l1_flag[i] is 0.

[0226] The specific contents of the processing performed by the BDOF unit 30954 will be described with reference to FIG. 27. The BDOF unit 30954 includes an L0, L1 predicted image generating unit 309541, a gradient image generating unit 309542, a correlation parameter calculating unit 309543, a motion compensation correction value derivation unit 309544, and a bi-predictive image generating unit 309545. The BDOF unit 30954 generates a predicted image from an interpolated image received from the motion compensation unit 3091 and an inter prediction parameter received from the inter prediction parameter decoding unit 303, and outputs the predicted image to the addition unit 312. Note that the process of deriving a motion compensation correction value bdofOffset (motion compensation correction image) from a gradient image and correcting and deriving PredL0 and PredL1 is called a bi-directional gradient change process.

[0227] The L0,L1 predicted image generation unit 309541 generates L0 and L1 predicted interpolated images predSamplesL0 and predSamplesL1 used in BDOF processing.

[0228] Note that the variable shift1 is set to 6, the variable shift2 is set to 4, the variable shift3 is set to 1, the variable shift4 is set to Max(3,15-BitDepth), the variable offset4 is set to 1<<(shift4-1), and the variable mvRefineThres is set to 1<<4. predSamplesL0 is an interpolated image for L0 prediction, and predSamplesL1 is an interpolated image for L1 prediction.

[0229] When bdofAvailableFlag is FALSE, the bi-predictive image generation unit 309545 derives pixel values ​​of a predicted image in units of 4x4 pixel blocks as follows.

[0230] pbSamples[x][y]=Clip3(0,(1< <BitDepth)-1, (predSamplesL0[x+1][y+1]+offset4+predSamplesL1[x+1][y+1])>>shift4) Otherwise (bdofAvailableFlag is equal to TRUE), the pixel value of the current predicted image is derived as follows:

[0231] The position (hx, vy) of the corresponding pixel position (x, y) in the predicted image array is derived as follows.

[0232] hx = Clip3(1,W,x) vy = Clip3(1,H,y) Here, W is the number of pixels in the horizontal direction of the processing block, and H is the number of pixels in the vertical direction.

[0233] A gradient image is generated in the gradient image generation unit 309542. Specifically, the gradient image variables gradientHL0[x][y], gradientVL0[x][y], gradientHL1[x][y], and gradientVL1[x][y] are derived as follows: gradientHL0 and gradientHL1 represent horizontal gradient images, and gradientVL0 and gradientVL1 represent vertical gradient images.

[0234] gradientHL0[x][y]=(predSamplesL0[hx+1][vy]>>shift1) -(predSampleL0[hx-1][vy])>>shift1) gradientVL0[x][y]=(predSampleL0[hx][vy+1]>>shift1) -(predSampleL0[hx][vy-1])>>shift1) gradientHL1[x][y]=(predSamplesL1[hx+1][vy]>>shift1) -(predSampleL1[hx-1][vy])>>shift1) gradientVL1[x][y]=(predSampleL1[hx][vy+1]>>shift1) -(predSampleL1[hx][vy-1])>>shift1) We also derive the variables diff[x][y], tempH[x][y] and tempV[x][y].

[0235] diff[x][y] = (predSamplesL0[hx][vy]>>shift2)-(predSamplesL1[hx][vy]>>shift2) tempH[x][y] = (gradientHL0[x][y]+gradientHL1[x][y])>>shift3 tempV[x][y] = (gradientVL0[x][y]+gradientVL1[x][y])>>shift3 Next, the correlation parameter calculation unit 309543 derives gradient product-sum variables sGx2, sGy2, sGxGy, sGxdI, and sGydI for each block of 4x4 pixels as follows.

[0236] sGx2=ΣΣabs(tempH[xSb+i][ySb+j]) sGy2=ΣΣabs(tempV[xSb+i][ySb+j]) sGxGy=ΣΣ(Sign(tempV[xSb+i][ySb+j])*tempH[xSb+i][ySb+j]) sGxdI=ΣΣ(-Sign(tempH[xSb+i][ySb+j])*diff[xSb+i][ySb+j]) sGydI=ΣΣ(-Sign(tempV[xSb+i][ySb+j])*diff[xSb+i][ySb+j]) Here, ΣΣ means that the sum of the 6x6 pixel block including one pixel around the 4x4 pixel, for i=-1..4, j=-1..4, abs(x) is a function that returns the absolute value of x, and Sign(x) is a function that returns 1 if the value of x is greater than 0, 0 if the value of x is 0, and -1 if the value is less than 0.

[0237] Next, the motion compensation modification value derivation unit 309544 uses the derived gradient product sums sGx2, sGy2, sGxGy, sGxdI, and sGydI to derive a correction weight vector (u, v) in units of 4x4 pixels.

[0238] u = sGx2>0 ? Clip3(-mvRefineThres+1,mvRefineThres-1, (sGxdI<<2)>>Floor(Log2(sGx2))) : 0 v = sGy2 > 0 ? Clip3( -mvRefineThres + 1, mvRefineThres - 1, ((sGydI << 2 ) - ((vx*sGxGy) >> 1)) >> Floor(Log2(sGy2))) : 0 The motion compensation correction value derivation unit 309544 derives bdofOffset using the correction weight vector (u, v) in 4x4 pixel units and the gradient images gradientHL0, gradientVL0, gradientHL1, and gradientVL1.

[0239] bdofOffset = u*(gradientHL0[x+1][y+1]-gradientHL1[x+1][y+1]) +v*(gradientVL0[x+1][y+1]-gradientVL1[x+1][y+1]) The bi-predictive image generation unit 309545 uses the above parameters to derive the pixel value Pred of a 4x4 pixel predicted image according to the following equation.

[0240] pbSamples[x][y] = Clip3(0,(1< <BitDepth)-1, (predSamplesL0[x+1][y+1]+offset4+predSamplesL1[x+1][y+1]+bdofOffset)>>shift4) (Weighted prediction) The weighted prediction unit 3094 generates a predicted image pbSamples of the block from the interpolated image PredLX. First, the syntax related to the weighted prediction unit 3094 will be described.

[0241] FIG. 28(a) shows an example of the syntax of sps_weighted_pred_flag and sps_weighted_bipred_flag in a Sequence Parameter Set (SPS).

[0242] sps_weighted_pred_flag equal to 1 indicates that weighted prediction may be applied to P slices that reference an SPS. sps_weighted_pred_flag equal to 0 indicates that weighted prediction is not applied to P slices that reference an SPS. sps_weighted_bipred_flag equal to 1 indicates that weighted prediction may be applied to B slices that reference an SPS. sps_weighted_bipred_flag equal to 0 indicates that weighted prediction is not applied to B slices that reference an SPS.

[0243] FIG. 28(b) shows an example of the syntax of pps_weighted_pred_flag and pps_weighted_bipred_flag in the Picture Parameter Set (PPS).

[0244] pps_weighted_pred_flag equal to 0 indicates that weighted prediction is not applied to the P slice that references the PPS. pps_weighted_pred_flag equal to 1 indicates that weighted prediction is applied to the P slice that references the PPS. When sps_weighted_pred_flag is equal to 0, the weighted prediction unit 3094 sets the value of pps_weighted_pred_flag to 0. If pps_weighted_pred_flag is not present, the value is set to 0.

[0245] When pps_weighted_bipred_flag is equal to 0, it indicates that weighted prediction is not applied to B slices that reference a PPS. When pps_weighted_bipred_flag is equal to 1, it indicates that weighted prediction is applied to B slices that reference a PPS. When sps_weighted_bipred_flag is equal to 0, the weighted prediction unit 3094 sets the value of pps_weighted_bipred_flag to 0. If pps_weighted_bipred_flag is not present, the value is set to 0.

[0246] FIG. 29 shows the Weighted prediction parameters syntax() of Non-Patent Document 1 that is called in the slice header.

[0247] where luma_log2_weight_denom is the base 2 logarithm of the denominators of all luma weight coefficients. The value of luma_log2_weight_denom must be in the range of 0 to 7. delta_chroma_log2_weight_denom is the base 2 logarithm difference of the denominators of all chrominance weight coefficients. If delta_chroma_log2_weight_denom is not present, it is inferred to be equal to 0. The variable ChromaLog2WeightDenom is derived to be equal to luma_log2_weight_denom + delta_chroma_log2_weight_denom and its value must be in the range of 0 to 7.

[0248] When luma_weight_l0_flag[i] is 1, it indicates that a weighting factor for the luma component of L0 prediction is present. When luma_weight_l0_flag[i] is 0, it indicates that a weighting factor for the luma component of L0 prediction is not present. When luma_weight_l0_flag[i] is not present, the weighting predictor 3094 infers that it is equal to 0. When chroma_weight_l0_flag[i] is 1, it indicates that a weighting factor for the chroma prediction value of L0 prediction is present. When chroma_weight_l0_flag[i] is 0, it indicates that a weighting factor for the chroma prediction value of L0 prediction is not present. When chroma_weight_l0_flag[i] is not present, the weighting predictor 3094 infers that it is equal to 0.

[0249] delta_luma_weight_l0[i] is the weighting factor difference applied to the luma prediction value for L0 prediction using RefPicList[0][i]. The variable LumaWeightL0[i] is derived to be equal to (1 << luma_log2_weight_denom) + delta_luma_weight_l0[i]. If luma_weight_l0_flag[i] is equal to 1, the value of delta_luma_weight_l0[i] must be in the range of -128 to 127. If luma_weight_l0_flag[i] is equal to 0, the weight predictor 3094 infers that LumaWeightL0[i] is equal to the luma_log2_weight_denom power of 2 (2^luma_log2_weight_denom).

[0250] luma_offset_l0[i] is an additive offset applied to the luma prediction value for L0 prediction using RefPicList[0][i]. The value of luma_offset_l0[i] must be in the range of −128 to 127. If luma_weight_l0_flag[i] is equal to 0, the weight predictor 3094 infers that luma_offset_l0[i] is equal to 0.

[0251] delta_chroma_weight_l0[i][j] is the weighting factor difference applied to the chroma prediction value for L0 prediction using RefPicList0[i] with j equal to 0 for Cb and j equal to 1 for Cr. The variable ChromaWeightL0[i][j] is derived to be equal to (1 << ChromaLog2WeightDenom) + delta_chroma_weight_l0[i][j]. When chroma_weight_l0_flag[i] is equal to 1, the value of delta_chroma_weight_l0[i][j] must be in the range of -128 to 127. When chroma_weight_l0_flag[i] is 0, the weighting predictor 3094 infers that ChromaWeightL0[i][j] is equal to the power of 2 of ChromaLog2WeightDenom (2^ChromaLog2WeightDenom). delta_chroma_offset_l0[i][j] is the additive offset difference applied to the chroma prediction value for L0 prediction using RefPicList0[i] where j is 0 for Cb and 1 for Cr. The variable ChromaOffsetL0[i][j] is derived as follows:

[0252] ChromaOffsetL0[i][j] = Clip3(-128,127, (128 + delta_chroma_offset_l0[i][j] - ((128 * ChromaWeightL0[i][j])>> ChromaLog2WeightDenom))) The value of delta_chroma_offset_l0[i][j] must be in the range of −4 * 128 to 4 * 127. If chroma_weight_l0_flag[i] is equal to 0, the weighted prediction unit 3094 infers that ChromaOffsetL0[i][j] is equal to 0.

[0253] Note that luma_weight_l1_flag[i], chroma_weight_l1_flag[i], delta_luma_weight_l1[i], luma_offset_l1[i], delta_chroma_weight_l1[i][j], and delta_chroma_offset_l1[i][j] are interpreted as luma_weight_l0_flag[i], chroma_weight_l0_flag[i], delta_luma_weight_l0[i], luma_offset_l0[i], delta_chroma_weight_l0[i][j], and delta_chroma_offset_l0[i][j], respectively, and l0, L0, list0, and List0 are interpreted as l1, l1, list 1, and List1, respectively.

[0254] The processing performed by the inter prediction parameter derivation unit 303 will be described below.

[0255] In Non-Patent Document 1, the variable weightedPredFlag, which indicates whether or not to perform weighted prediction processing, is derived as follows.

[0256] If slice_type is equal to P, weightedPredFlag is set equal to pps_weighted_pred_flag defined in PPS.

[0257] Otherwise, if slice_type is equal to B, weightedPredFlag is set equal to pps_weighted_bipred_flag && (!dmvrFlag) defined in PPS.

[0258] Hereinafter, bcw_idx is a weight index for bi-prediction with a weight per CU. If bcw_idx is not notified, set bcw_idx = 0. In merge prediction mode, bcwIdx is set to bcwIdxN of a neighboring block, and in AMVP prediction mode, bcwIdx of a target block is set.

[0259] If the value of the variable weightedPredFlag is equal to 0 or the value of the variable bcwIdx is 0, the predicted image pbSamples is derived as follows, as normal predicted image processing.

[0260] When one of the prediction list usage flags (predFlagL0 or predFlagL1) is 1 (uniprediction) (weighted prediction is not used), the following equation is processed to match PredLX (LX is L0 or L1) to the pixel bit count bitDepth.

[0261] pbSamples[x][y] = Clip3(0,(1<<bitDepth)-1,(PredLX[x][y]+offset1)> >shift1) Here, shift1=14-bitDepth, offset1=1<<(shift1-1). PredLX is an interpolated image of L0 or L1 prediction.

[0262] Furthermore, when both prediction list usage flags (predFlagL0 and predFlagL1) are 1 (bi-prediction PRED_BI) and weighted prediction is not used, the following formula is processed to average PredL0 and PredL1 and match them to the number of pixel bits.

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

[0264] If the value of the variable weightedPredFlag is equal to 1 and the value of the variable bcwIdx is equal to 0, the predicted image pbSamples is derived as follows in weighted prediction processing.

[0265] The variable shift1 is set equal to Max(2, 14-bitDepth). The variables log2Wd, o0, o1, w0, and w1 are derived as follows:

[0266] If cIdx is 0, i.e. luminance, then the following applies:

[0267] log2Wd = luma_log2_weight_denom + shift1 w0 = LumaWeightL0[refIdxL0] w1 = LumaWeightL1[refIdxL1] o0 = luma_offset_l0[refIdxL0] <<(bitDepth - 8) o1 = luma_offset_l1[refIdxL1] <<(bitDepth - 8) Otherwise (cIdx is a chrominance not equal to 0), the following applies:

[0268] log2Wd = ChromaLog2WeightDenom + shift1 w0 = ChromaWeightL0[refIdxL0][cIdx - 1] w1 = ChromaWeightL1[refIdxL1][cIdx - 1] o0 = ChromaOffsetL0[refIdxL0][cIdx - 1] <<(bitDepth - 8) o1 = ChromaOffsetL1[refIdxL1][cIdx - 1] <<(bitDepth - 8) The pixel values ​​pbSamples[x][y] of the predicted image for x = 0..nCbW - 1 and y = 0..nCbH - 1 are derived as follows:

[0269] Next, if predFlagL0 is equal to 1 and predFlagL1 is equal to 0, the pixel values ​​pbSamples[x][y] of the predicted image are derived as follows:

[0270] if(log2Wd >= 1) pbSamples[x][y] = Clip3(0,(1 << bitDepth)- 1, ((predSamplesL0[x][y] * w0 + 2^(log2Wd - 1))>> log2Wd)+ o0) else pbSamples[x][y] = Clip3(0,(1< <bitDepth)-1, predSamplesL0[x][y]*w0 + o0) Otherwise, if predFlagL0 is 0 and predFlagL1 is 1, the pixel values ​​pbSamples[x][y] of the predicted image are derived as follows.

[0271] if(log2Wd >= 1) pbSamples[x][y] = Clip3(0,(1 << bitDepth)- 1, ((predSamplesL1[x][y] * w1 + 2^(log2Wd - 1))>> log2Wd)+ o1) else pbSamples[x][y] = Clip3(0,(1< <bitDepth)-1、predSamplesL1[x][y]*w1 + o1) Otherwise, if predFlagL0 is equal to 1 and predFlagL1 is equal to 1, the pixel values ​​pbSamples[x][y] of the predicted image are derived as follows:

[0272] pbSamples[x][y] = Clip3(0,(1 << bitDepth)- 1, (predSamplesL0[x][y] * w0 + predSamplesL1[x][y] * w1 + ((o0 + o1 + 1)<< log2Wd))>>(log2Wd + 1)) However, in the method described in Non-Patent Document 1, for example, a flag luma_weight_l0_flag[i] exists for each reference picture in the L0 list indicating whether or not the luminance weighting factor LumaWeightL0[i] and offset value luma_offset_l0[refIdxL0] exist, whereas there is only one right shift value luma_log2_weight_denom for luminance, which corresponds to the denominator of the weighting factor. Therefore, when the weighting factor and offset value for the reference list do not exist, the weighted prediction process is performed by setting the weighting factor value to the power of 2 to the luma_log2_weight_denom and the offset value to 0. Therefore, when the weighting factor and offset value for the reference list do not exist during L0 prediction or L1 prediction, the weighted prediction process is performed instead of the normal prediction process that should be performed. Also, when the weighting factor and offset value for both the L0 list and the L1 list do not exist during bi-prediction, the weighted prediction process is performed instead of the normal bi-prediction process that should be performed. Thus, there is a problem that the weighted prediction process may be performed even when the normal prediction process should be performed.

[0273] Therefore, in this embodiment, the function WeightedPredFlag( slice_type, cIdx, refIdxL0, refIdxL1 ) is defined as follows.

[0274] WeightedPredFlag( slice_type, cIdx, refIdxL0, refIdxL1 ) = (slice_type == P && pps_weighted_pred_flag ) ? ((cIdx == 0) ? luma_weight_l0_flag [refIdxL0] : chroma_weight_l0_flag[refIdxL0]): ((slice_type == B && pps_weighted_bipred_flag ) ? ((refIdxL0>=0 && refIdxL1>=0) ? ((cIdx == 0) ? (luma_weight_l0_flag[refIdxL0] || luma_weight_l1_flag[refIdxL1]) : (chroma_weight_l0_flag[refIdxL0] || chroma_weight_l1_flag[refIdxL1])) : ((refIdxL0>=0 && refIdxL1<0) ? ((cIdx == 0) ? luma_weight_l0_flag [refIdxL0] : chroma_weight_l0_flag[refIdxL0]): ((refIdxL0<0 && refIdxL1>=0) ? ((cIdx == 0) ? luma_weight_l1_flag [refIdxL1] : chroma_weight_l1_flag[refIdxL1]) : 0))) : 0) This function WeightedPredFlag(slice_type, cIdx, refIdxL0, refIdxL1) can be used when performing exclusive processing with weighted prediction. The syntax in Fig. 30 is an example for notifying bcw_idx[x0][y0] only when there is no coefficient of weighted prediction in order to operate BCW prediction and weighted prediction exclusively.

[0275] In addition, when the luminance weighting coefficient does not exist in the weighted prediction process, in the case where the DMVR process and the BDOF process are applied, a condition that the value of the function WeightedPredFlag(B, 0, refIdxL0, refIdxL1) is equal to 0 can be set.

[0276] When applying DMVR processing and BDOF processing in the absence of both luma and chroma weighting coefficients in the weighted prediction processing, a condition can be set that the values ​​of both functions WeightedPredFlag(B, 0, refIdxL0, refIdxL1) and WeightedPredFlag(B, 1, refIdxL0, refIdxL1) are equal to 0.

[0277] The variable weightedPredFlag indicating whether or not to perform weighted prediction processing may be set to the value of a function WeightedPredFlag( slice_type, cIdx, refIdxL0.refIdxL1 ).

[0278] Furthermore, in the method described in Non-Patent Document 1, even if the value of the variable weightedPredFlag is 1 and weighted prediction processing is called, the result is that weighted prediction processing is performed when normal prediction processing should be performed.

[0279] Therefore, in another embodiment of this embodiment, the weighted prediction unit 3094 derives the variable weightedPredFlag as follows.

[0280] If slice_type is equal to P, set the variable weightedPredFlag to weightedPredFlag = ( cIdx == 0 ) ? luma_weight_l0_flag[refIdxL0] : chroma_weight_l0_flag[refIdxL0] Set to.

[0281] Otherwise (slice_type is equal to B), set as follows.

[0282] If refIdxL0 is greater than or equal to 0 and refIdxL1 is greater than or equal to 0, the variable weightedPredFlag is weightedPredFlag = ( cIdx == 0 ) ? (luma_weight_l0_flag[refIdxL0] || luma_weight_l1_flag[refIdxL1]) : (chroma_weight_l0_flag[refIdxL0] || chroma_weight_l1_flag[refIdxL1]) Set to.

[0283] If refIdxL0 is greater than or equal to 0 and refIdxL1 is less than 0, the variable weightedPredFlag is weightedPredFlag = ( cIdx == 0 ) ? luma_weight_l0_flag[refIdxL0] : chroma_weight_l0_flag[refIdxL0] Set to.

[0284] If refIdxL0 is less than 0 and refIdxL1 is greater than or equal to 0, the variable weightedPredFlag is weightedPredFlag = ( cIdx == 0 ) ? luma_weight_l1_flag[refIdxL1] : chroma_weight_l0_flag[refIdxL1] Set to.

[0285] Otherwise, the variable weightedPredFlag is weightedPredFlag = 0 Set to.

[0286] By deriving it as described above, it is possible to specify separately for the luminance and color difference signals that weighted prediction is not performed when no weighting coefficient exists, thereby solving the above problem.

[0287] Furthermore, as another embodiment of this embodiment, a method for solving the above problem within the weighted prediction process will be described.

[0288] If the value of the variable weightedPredFlag is equal to 1 and the value of the variable bcwIdx is equal to 0, the predicted image pbSamples is derived as follows in weighted prediction processing.

[0289] The variable shift1 is set equal to Max(2, 14-bitDepth). The variables log2Wd, o0, o1, w0, and w1 are derived as follows:

[0290] If cIdx is 0, i.e. luminance, then the following applies:

[0291] log2Wd = luma_log2_weight_denom + shift1 WeightL0Flag = luma_weight_l0_flag[ refIdxL0 ] WeightL1Flag = luma_weight_l1_flag[ refIdxL1 ] w0 = LumaWeightL0[refIdxL0] w1 = LumaWeightL1[refIdxL1] o0 = luma_offset_l0[refIdxL0] <<(bitDepth - 8) o1 = luma_offset_l1[refIdxL1] <<(bitDepth - 8) Otherwise (cIdx is a chrominance not equal to 0), the following applies:

[0292] log2Wd = ChromaLog2WeightDenom + shift1 WeightL0Flag = chroma_weight_l0_flag[ refIdxL0 ] WeightL1Flag = chroma_weight_l1_flag[ refIdxL1 ] w0 = ChromaWeightL0[refIdxL0][cIdx - 1] w1 = ChromaWeightL1[refIdxL1][cIdx - 1] o0 = ChromaOffsetL0[refIdxL0][cIdx - 1] <<(bitDepth - 8) o1 = ChromaOffsetL1[refIdxL1][cIdx - 1] <<(bitDepth - 8) The pixel values ​​pbSamples[x][y] of the predicted image for x = 0..nCbW - 1 and y = 0..nCbH - 1 are derived as follows:

[0293] If predFlagL0 is equal to 1 and predFlagL1 is equal to 0, the pixel values ​​pbSamples[x][y] of the predicted image are derived as follows:

[0294] if( WeightL0Flag == 0 ) pbSamples[x][y] = Clip3( 0, ( 1 << bitDepth ) - 1, ( predSamplesL0[x][y] + offset1 ) >> shift1 ) else if(log2Wd>=1) pbSamples[x][y] = Clip3(0,(1 << bitDepth)- 1, ((predSamplesL0[x][y] * w0 + 2^(log2Wd - 1))>> log2Wd)+ o0) else pbSamples[x][y] = Clip3(0,(1< <bitDepth)-1, predSamplesL0[x][y]*w0 + o0) Otherwise, if predFlagL0 is 0 and predFlagL1 is 1, the pixel values ​​pbSamples[x][y] of the predicted image are derived as follows.

[0295] if( WeightL1Flag == 0 ) pbSamples[x][y] = Clip3(0, (1 << bitDepth ) - 1, (predSamplesL1[x][y] + offset1) >> shift1) else if(log2Wd>=1) pbSamples[x][y] = Clip3(0,(1 << bitDepth)- 1, ((predSamplesL1 [x][y] * w1 + 2^(log2Wd - 1))>> log2Wd)+ o1) else pbSamples[x][y] = Clip3(0,(1< <bitDepth)-1、predSamplesL1[x][y]*w1 + o1) Otherwise, if predFlagL0 is equal to 1 and predFlagL1 is equal to 1, the pixel values ​​pbSamples[x][y] of the predicted image are derived as follows:

[0296] if( WeightL0Flag == 0 && WeightL1Flag == 0 ) pbSamples[x][y] = Clip3( 0, ( 1 << bitDepth ) - 1, (predSamplesL0[x][y] + predSamplesL1[x][y] + offset2) >> shift2) else pbSamples[x][y] = Clip3(0,(1 << bitDepth)- 1, (predSamplesL0[x][y] * w0 + predSamplesL1[x][y] * w1 + ((o0 + o1 + 1)<< log2Wd))>>(log2Wd + 1)) By deriving it as described above, it is possible to specify separately for the luminance and color difference signals that weighted prediction is not performed when no weighting coefficient exists, thereby solving the above problem.

[0297] Another problem is that the concept of a new picture header is not supported in Non-Patent Document 1.

[0298] Therefore, as another embodiment of this embodiment, flag information for weighted prediction is newly introduced into the Picture header. Specifically, as shown in Fig. 31(b), pic_weighted_pred_flag and pic_weighted_bipred_flag are introduced into picture_header_rbsp( ), and in the Slice header, as shown in Fig. 31(c), if pic_weighted_pred_flag or pic_weighted_bipred_flag is 1, pred_weight_table() is called.

[0299] By using the above syntax, it becomes possible to switch the weight prediction process for each Picture.

[0300] Another issue is that in Non-Patent Document 1, when slice_type is equal to B, the variable weightedPredFlag, which indicates whether or not weighted prediction processing is performed, is set equal to pps_weighted_bipred_flag && (!dmvrFlag) defined by PPS. However, one of the conditions for dmvrFlag, which is the variable indicating whether or not DMVR processing is performed, to be TRUE is defined only for weighted prediction processing of the luminance signal, that is, both luma_weight_l0_flag[refIdxL0] and luma_weight_l1_flag[refIdxL1] are 0, so there is a problem that the conditions for applying weighted prediction processing to the processing of color difference signals are not clear.

[0301] Therefore, as another embodiment of this embodiment, the variable weightedPredFlag is set equal to pps_weighted_bipred_flag && !(dmvrFlag && cIdx == 0) defined in PPS when slice_type is equal to B.

[0302] By setting the above conditions, even when dmvrFlag is 1, weighted prediction processing for color difference signals operates appropriately, and the application conditions for weighted prediction processing are clarified.

[0303] Alternatively, weighted prediction processing may not be performed on either luminance or chrominance in either DMVR processing or BDOF processing. When slice_type is equal to B, weightedPredFlag is set equal to pps_weighted_bipred_flag && !dmvrFlag && !bdofAvailableFlag defined by PPS.

[0304] Another problem is that the relationship between weighted prediction and intra-inter synthesis processing is not clear in Non-Patent Document 1.

[0305] Therefore, the variable weightedPredFlag is set as follows:

[0306] If slice_type is equal to P, weightedPredFlag is set equal to pps_weighted_pred_flag && (!ciip_flag), where pps_weighted_pred_flag is a flag defined in PPS.

[0307] Otherwise, if slice_type is equal to B, weightedPredFlag is set equal to pps_weighted_bipred_flag && (!dmvrFlag) && (!ciip_flag), where pps_weighted_bipred_flag is a flag defined in PPS.

[0308] Alternatively, in addition to the method of setting the variable weightedPredFlag shown in the above embodiments, weightedPredFlag = weightedPredFlag && (!ciip_flag) The condition may be added.

[0309] By setting the above conditions, the application conditions of the weighted prediction process are clarified.

[0310] (BCW forecast) Bi-prediction with CU-level Weights (BCW) prediction is a prediction method that allows for switching of weighting coefficients that are determined in advance at the CU level. Two variables nCbW and nCbH that specify the width and height of the current coding block, two (nCbW) x (nCbH) arrays predSamplesL0 and predSamplesL1, flags predFlagL0 and predFlagL1 indicating whether to use a prediction list, reference indices refIdxL0 and refIdxL1, a BCW prediction index bcw_idx, and a variable cIdx that specifies the indexes of the luminance and chrominance components are input, BCW prediction processing is performed, and the pixel values ​​of the predicted image in the (nCbW) x (nCbH) array pbSamples are output.

[0311] When sps_bcw_enabled_flag, which indicates whether or not this prediction is used at the SPS level, is TRUE, the variable weightedPredFlag is 0, the reference pictures indicated by the two reference indexes refIdxL0 and refIdxL1 do not have weighted prediction coefficients, and the coding block size is equal to or smaller than a certain value, the bcw_idx of the CU level syntax is explicitly notified and the value is substituted for the variable bcwIdx. If bcw_idx does not exist, 0 is substituted for the variable bcwIdx.

[0312] When the variable bcwIdx is 0, the pixel value of the predicted image is derived as follows.

[0313] pbSamples[x][y] = Clip3(0,(1 << bitDepth)- 1, (predSamplesL0[x][y] + predSamplesL1[x][y] + offset2)>> shift2) Otherwise (bcwIdx is not equal to 0), the following applies:

[0314] The variable w1 is set equal to bcwWLut[bcwIdx], where bcwWLut[k] = {4, 5, 3, 10, -2}.

[0315] The variable w0 is set to (8-w1). Furthermore, the pixel values ​​of the predicted image are derived as follows.

[0316] pbSamples[x][y] = Clip3(0, (1 << bitDepth)- 1, (w0 * predSamplesL0[x][y] + w1 * predSamplesL1[x][y] + offset3)>>(shift2 + 3)) When BCW prediction is used in the AMVP prediction mode, the inter prediction parameter decoding unit 303 decodes bcw_idx and sends it to the BCW unit 30955. When BCW prediction is used in the merge prediction mode, the inter prediction parameter decoding unit 303 decodes the merge index merge_idx, and the merge candidate derivation unit 30361 derives bcwIdx of each merge candidate. Specifically, the merge candidate derivation unit 30361 uses the weighting factor of the adjacent block used to derive the merge candidate as the weighting factor of the merge candidate used for the current block. That is, in the merge mode, the weighting factor used in the past is inherited as the weighting factor of the current block.

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

[0318] The inverse quantization and inverse transform unit 311 inverse quantizes the quantized transform coefficients input from the parameter decoding unit 302 to obtain transform coefficients.

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

[0320] The inverse quantization and inverse transform unit 311 inverse quantizes the quantized transform coefficients input from the parameter decoding unit 302 to obtain transform coefficients.

[0321] The adder 312 generates a decoded image of the block by adding, for each pixel, the predicted image of the block input from the predicted image generation unit 308 and the prediction error input from the inverse quantization and inverse transform unit 311. 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.

[0322] (Configuration of a video encoding device) Next, the configuration of the video encoding device 11 according to this embodiment will be described. Fig. 23 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 generating 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, an encoding parameter determining unit 110, a parameter encoding unit 111, a prediction parameter derivation unit 120, and an entropy encoding unit 104.

[0323] 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 310, which have already been described, and therefore a description thereof will be omitted.

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

[0325] 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 transform / quantization unit 103 outputs the quantized transform coefficients to the parameter coding unit 111 and the inverse quantization / inverse transform unit 105.

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

[0327] 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 following describes an outline of the operation of each module.

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

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

[0330] The CU encoding unit 1112 encodes the CU information, prediction information, division information, and so on.

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

[0332] The CT information encoding unit 1111 and the CU encoding unit 1112 supply 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.

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

[0334] The prediction parameter derivation unit 120 is a means including an inter-prediction parameter encoding unit 112 and an intra-prediction parameter encoding unit 113, and derives intra-prediction parameters and intra-prediction parameters from the parameters input from the encoding parameter determination unit 110. The derived intra-prediction parameters and intra-prediction parameters are output to the parameter encoding unit 111.

[0335] (Configuration of the inter-prediction parameter encoding unit) 24, the inter prediction parameter encoding unit 112 includes a parameter encoding 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 encoding control unit 1121 includes a merge index derivation unit 11211 and a vector candidate index derivation unit 11212.

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

[0337] (Configuration of the intra-prediction parameter encoding unit 113) 25, the intra prediction parameter encoding unit 113 includes a parameter encoding control unit 1131 and an intra prediction parameter derivation unit 304. The intra prediction parameter derivation unit 304 has the same configuration as the video decoding device.

[0338] The parameter coding control unit 1131 derives IntraPredModeY and IntraPredModeC. Furthermore, it determines intra_luma_mpm_flag by referring to mpmCandList[ ]. These prediction parameters are output to the intra prediction parameter derivation unit 304 and the parameter coding unit 111.

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

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

[0341] 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 have to include the above three types of filters, and may be configured, for example, as only a deblocking filter.

[0342] 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.

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

[0344] The coding parameter determination unit 110 selects one set from among a plurality of sets of coding 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.

[0345] The coding parameter determination unit 110 calculates an RD cost value indicating the magnitude of the information amount and the coding error for each of the multiple sets. The RD cost value is, for example, the sum of the code amount and the value obtained by multiplying the squared error by a coefficient λ. The code amount is the information amount of the coding stream Te obtained by entropy coding the quantization error and the coding parameters. The squared error is the sum of the squares of the prediction errors calculated in the subtraction unit 102. The coefficient λ is a real number greater than zero that is set in advance. The coding parameter determination unit 110 selects a set of coding parameters that minimizes the calculated cost value. The coding parameter determination unit 110 outputs the determined coding parameters to the parameter coding unit 111 and the prediction parameter derivation unit 120.

[0346] In addition, a part of the video encoding device 11 and the video decoding device 31 in the above-mentioned embodiment, for example, the entropy decoding unit 301, the parameter decoding unit 302, the loop filter 305, the predicted image generating unit 308, the inverse quantization and inverse transform unit 311, the addition unit 312, the prediction parameter derivation unit 320, the predicted image generating 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. In this case, a program for realizing this control function may be recorded in a computer-readable recording medium, and the program recorded in the recording medium may be read into and executed by a computer system. In addition, the "computer system" referred to here is 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. In addition, "computer-readable recording medium" refers to portable media such as flexible disks, optical magnetic disks, ROMs, and CD-ROMs, and storage devices such as hard disks built into computer systems. Furthermore, "computer-readable recording medium" may also include devices that dynamically hold 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, and devices that hold a program for a certain period of time, such as volatile memory inside a computer system that serves as a server or client in such cases. Furthermore, the above program may be one that realizes part of the above-mentioned functions, or may be one that can realize the above-mentioned functions in combination with a program already recorded in the computer system.

[0347] In addition, a part or the whole of the video encoding device 11 and the video decoding device 31 in the above-mentioned embodiment may be realized as an integrated circuit such as an LSI (Large Scale Integration). Each functional block of the video encoding device 11 and the video decoding device 31 may be individually made into a processor, or a part or the whole may be integrated into a processor. The integrated circuit method is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. Furthermore, when an integrated circuit technology that replaces LSI appears due to the progress of semiconductor technology, an integrated circuit based on that technology may be used.

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

[0349] [Application example] The above-mentioned video encoding device 11 and video decoding device 31 can be mounted on various devices that transmit, receive, record, and play videos. 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.

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

[0351] PROD_A in Fig. 2 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 obtains encoded data by encoding a video, a modulation unit PROD_A2 that obtains a modulated signal by modulating a carrier wave with the encoded data obtained by the encoding unit PROD_A1, and a transmitting unit PROD_A3 that transmits the modulated signal obtained by the modulation unit PROD_A2. The above-mentioned video encoding device 11 is used as this encoding unit PROD_A1.

[0352] The transmitting device PROD_A may further include a camera PROD_A4 for capturing moving images, a recording medium PROD_A5 for recording moving images, an input terminal PROD_A6 for inputting moving images from the outside, and an image processing unit A7 for generating or processing images, as a source of moving images to be input to the encoding unit PROD_A1. In the figure, the transmitting device PROD_A is illustrated as having all of these components, but some of them may be omitted.

[0353] The recording medium PROD_A5 may record unencoded video, or may record video encoded by an encoding method for recording that is different from the encoding method for transmission. In the latter case, a decoding unit (not shown) that decodes the encoded data read from the recording medium PROD_A5 according to the encoding method for recording may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.

[0354] PROD_B in Fig. 2 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, a demodulation 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 video by decoding the coded data obtained by the demodulation unit PROD_B2. The above-mentioned video decoding device 31 is used as this decoding unit PROD_B3.

[0355] The receiving device PROD_B may further include, as destinations of the moving image output by the decoding unit PROD_B3, a display PROD_B4 for displaying the moving image, a recording medium PROD_B5 for recording the moving image, and an output terminal PROD_B6 for outputting the moving image to the outside. In the figure, the receiving device PROD_B is illustrated as having all of these components, but some of them may be omitted.

[0356] The recording medium PROD_B5 may be for recording unencoded video, or may be encoded by an encoding method for recording that is different from the encoding method for transmission. In the latter case, it is preferable to interpose an encoding unit (not shown) between the decoding unit PROD_B3 and the recording medium PROD_B5, which encodes the video acquired from the decoding unit PROD_B3 according to the encoding method for recording.

[0357] 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 broadcast, wired broadcast, wireless communication, and wired communication.

[0358] 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 by 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 by cable broadcasting.

[0359] Also, a server (such as a workstation) / client (such as a television receiver, a personal computer, a smartphone, etc.) of a VOD (Video On Demand) service or a video sharing service using the Internet is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals by communication (usually, in a LAN, either wireless or wired is used as a transmission medium, and in a WAN, wired is used as a transmission medium). Here, personal computers include desktop PCs, laptop PCs, and tablet PCs. Also, smartphones include multi-function mobile phone terminals.

[0360] The client of the video hosting service has a function to decode the encoded data downloaded from the server and display it on a display, as well as a function to encode the video captured by the camera and upload it to the server. That is, the client of the video hosting service functions as both the transmitting device PROD_A and the receiving device PROD_B.

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

[0362] PROD_C in Fig. 3 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 includes an encoding unit PROD_C1 that obtains encoded data by encoding a 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 used as this encoding unit PROD_C1.

[0363] 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 SSD (Solid State Drive), (2) a type connected to the recording device PROD_C, such as an SD memory card or USB (Universal Serial Bus) flash memory, or (3) a type loaded into a drive device (not shown) built into the recording device PROD_C, such as a DVD (Digital Versatile Disc: registered trademark) or BD (Blu-ray Disc: registered trademark).

[0364] The recording device PROD_C may further include a camera PROD_C3 for capturing moving 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, as a supply source of moving images to be input to the encoding unit PROD_C1. Although the figure illustrates a configuration in which the recording device PROD_C includes all of these, some of them may be omitted.

[0365] The receiving unit PROD_C5 may receive unencoded video, or may receive encoded data encoded by an encoding method for transmission that is different from the encoding method for recording. In the latter case, a transmission decoding unit (not shown) that decodes the encoded data encoded by the encoding method for transmission may be interposed between the receiving unit PROD_C5 and the encoding unit PROD_C1.

[0366] 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). Other examples of such a recording device PROD_C include 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 processing unit C6 is the main source of the moving image), and a smartphone (in this case, the camera PROD_C3 or the receiving unit PROD_C5 is the main source of the moving image).

[0367] Fig. 3PROD_D 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 to a recording medium PROD_M, and a decoding unit PROD_D2 that obtains video by decoding the coded data read by the reading unit PROD_D1. The above-mentioned video decoding device 31 is used as this decoding unit PROD_D2.

[0368] 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, (2) a type that is connected to the playback device PROD_D, such as an SD memory card or USB flash memory, or (3) a type that is loaded into a drive device (not shown) built into the playback device PROD_D, such as a DVD or BD.

[0369] The playback device PROD_D may further include, as destinations of the video output by the decoding unit PROD_D2, a display PROD_D3 for displaying the video, an output terminal PROD_D4 for outputting the video to the outside, and a transmission unit PROD_D5 for transmitting the video. In the figure, the playback device PROD_D is illustrated as having all of these components, but some of them may be omitted.

[0370] The transmission unit PROD_D5 may transmit unencoded video, or may transmit encoded data encoded by an encoding method for transmission different from the encoding method for recording. In the latter case, it is preferable to interpose an encoding unit (not shown) between the decoding unit PROD_D2 and the transmission unit PROD_D5, which encodes the video by the encoding method for transmission.

[0371] 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 is the main destination of the video image). Other examples of such a playback device PROD_D include a television receiver (in this case, the display PROD_D3 is the main destination of the video image), a digital signage (also called an electronic billboard or electronic bulletin board, and the display PROD_D3 or the transmission unit PROD_D5 is the main destination of the video image), a desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 is the main destination of the video image), a laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 is the main destination of the video image), and a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is the main destination of the video image).

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

[0373] In the latter case, each of the above devices includes a CPU that executes the commands of a program that realizes each function, a ROM (Read Only Memory) that stores the above program, a RAM (Random Access Memory) that expands the above program, and a storage device (recording medium) such as a memory that stores the above program and various data.The object of the embodiment of the present invention is to supply each of the above devices with a recording medium on which the program code (executable program, intermediate code program, source program) of the control program of each of the above devices, which is software that realizes the above-mentioned functions, is recorded in a computer-readable manner, and the computer (or CPU or MPU) reads the recording medium. This can also be achieved by reading and executing program code recorded in the memory.

[0374] 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 optical disks such as 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 (registered trademark), and IC cards (including memory cards). Cards such as optical cards, semiconductor memories such as mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory: registered trademark) / flash ROM, or logic circuits such as PLD (Programmable logic device) and FPGA (Field Programmable Gate Array) can be used.

[0375] Moreover, each of the above devices may be configured to be connectable to a communication network, and the above program code may be supplied via the communication network. This communication network is not particularly limited as long as it is capable of transmitting the program code. For example, the Internet, an intranet, an extranet, a LAN (Local Area Network), an ISDN (Integrated Services Digital Network), a VAN (Value-Added Network), a CATV (Community Antenna television / Cable Television) communication network, a virtual private network, a telephone line network, a mobile communication network, a satellite communication network, etc. may be used. Moreover, the transmission medium constituting this communication network is not limited to a specific configuration or type as long as it is a medium capable of transmitting the program code. For example, it 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, ADSL (Asymmetric Digital Subscriber Line) line, etc., or in wireless communication such as infrared such as IrDA (Infrared Data Association) or remote control, BlueTooth (registered trademark), IEEE802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone network, satellite line, terrestrial digital broadcasting network, etc. The embodiment of the present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

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

[0377] 〔summary〕 A video decoding device according to one aspect of the present invention includes: A spatial prediction method for predicting a motion vector of a target block using a motion vector of a surrounding area of ​​the target block; An adaptive motion vector prediction unit that adaptively performs temporal prediction using a motion vector of a co-located picture, The temporal prediction by the adaptive vector prediction unit is characterized in that a collocated picture to be referenced is specified in picture units, and a reference list is specified in slice units.

[0378] Furthermore, a video encoding device according to an aspect of the present invention includes: A spatial prediction method for predicting a motion vector of a target block using a motion vector of a surrounding area of ​​the target block; An adaptive motion vector prediction unit that adaptively performs temporal prediction using a motion vector of a co-located picture, The temporal prediction by the adaptive vector prediction unit is characterized in that a collocated picture to be referenced is specified in picture units, and a reference list is specified in slice units.

[0379] Further, a predicted image generating method according to one aspect of the present invention includes: A spatial prediction method for predicting a motion vector of a target block using a motion vector of a surrounding area of ​​the target block; An adaptive motion vector prediction unit that adaptively performs temporal prediction using a motion vector of a co-located picture, The temporal prediction by the adaptive vector prediction unit is characterized in that a collocated picture to be referenced is specified in picture units, and a reference list is specified in slice units.

[0380] Furthermore, a video decoding device according to one aspect of the present invention includes: a merging candidate derivation unit that derives merging candidates that refer to collocated positions that are spatially located at the bottom right or center of the target block, and derives pairwise candidates from the average of two merging candidates stored in the merging candidate list; a parameter decoding unit configured to receive a picture header, a slice header, and a picture parameter set, and when temporal motion vector prediction is enabled, to decode a first flag indicating whether the temporal motion vector prediction is used or not from the picture header; When the first flag is true, the parameter decoding unit: (1) Decrypt the second flag; (2) decoding an index of a co-located picture used for the temporal motion vector prediction from the picture header; a value of the second flag equal to 1 indicates that the co-located picture used for the temporal motion vector prediction is derived from a first reference picture list; a value of the second flag equal to 0 indicates that the co-located picture used for the temporal motion vector prediction is derived from a second reference picture list; The index is an index for referencing the co-located picture of the first reference picture list or the second reference picture list indicated by the second flag. [Industrial Applicability]

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

[0382] 31 Image Decoding Device 301 Entropy Decoding Unit 302 Parameter Decoding Unit 303 Inter-prediction parameter derivation unit 304 Intra prediction parameter derivation unit 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 310 Intra-prediction image generation unit 311, 105 Inverse quantization and inverse transformation unit 312, 106 Addition section 320 Prediction Parameter Derivation Unit 11 Image encoding device 102 Subtraction section 103 Transformation and Quantization Section 104 Entropy coding unit 110 Encoding parameter determination unit 111 Parameter Encoding Unit 112 Inter-prediction parameter coding unit 113 Intra prediction parameter coding unit 120 Prediction parameter derivation part

Claims

1. a merging candidate derivation unit that derives merging candidates that refer to collocated positions that are spatially located at the bottom right or center of the target block, and derives pairwise candidates from an average of two merging candidates stored in the merging candidate list; a parameter coding unit for generating a picture header, a slice header and a picture parameter set; The parameter coding unit codes a first flag, which is to be included in the picture header and indicates whether or not the temporal motion vector prediction is used, when the temporal motion vector prediction is enabled; When the first flag is true, the parameter encoding unit: (1) encoding a second flag; (2) encoding an index of a co-located picture used for the temporal motion vector prediction to be included in the picture header; a value of the second flag equal to 1 indicates that the co-located picture used for the temporal motion vector prediction is derived from a first reference picture list; a value of the second flag equal to 0 indicates that the co-located picture used for the temporal motion vector prediction is derived from a second reference picture list; The index is an index for referencing the co-located picture in the first reference picture list or the second reference picture list indicated by the second flag. A video encoding device comprising:

2. A computer-readable recording medium having a program recorded thereon for causing a computer to encode a moving image, The program causes the computer to deriving merge candidates that reference collocated positions that are spatially located to the bottom right or center of the current block; deriving pairwise candidates from an average of two merging candidates stored in the merging candidate list; if temporal motion vector prediction is enabled, encoding a first flag indicating whether the temporal motion vector prediction is used or not to be included in a picture header; If the first flag is true, (1) The second flag (2) encoding an index of a co-located picture used for the temporal motion vector prediction to be included in the picture header; generating the picture header, slice header and picture parameter set; a value of the second flag equal to 1 indicates that the co-located picture used for the temporal motion vector prediction is derived from a first reference picture list; a value of the second flag equal to 0 indicates that the co-located picture used for the temporal motion vector prediction is derived from a second reference picture list; The index is an index for referencing the co-located picture in the first reference picture list or the second reference picture list indicated by the second flag. A computer-readable recording medium comprising:

Citation Information

Patent Citations

  • Image processing method based on inter prediction mode, and device therefor

    WO2019194514A1

  • Systems and methods for signaling parameters in video coding

    WO2020059688A1

  • Method and apparatus for encoding / decoding image on basis of picture header including information relating to co-located picture, and method for transmitting bitstream

    WO2021112633A1