Video decoding device, video encoding device, and computer-readable recording medium

JP2024151450A5Pending Publication Date: 2026-03-19SHARP KK
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
SHARP KK
Filing Date
2023-04-12
Publication Date
2026-03-19

AI Technical Summary

Technical Problem

Existing video encoding methods, such as H.266, face issues when the number of weights in weight prediction is set to 0, leading to operational failures in encoding and decoding processes.

Method used

The video encoding and decoding devices set the number of weights in the reference list to 1 or more, and include a flag to indicate the presence of weighting coefficients and offset values, enabling the generation of predicted images through multiplication and addition processes.

Benefits of technology

This configuration allows for effective encoding and decoding by ensuring a minimum number of weights, preventing operational failures and enhancing the reliability of the video processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

To provide a video encoding device and a video decoding device that avoid the inability to operate when the number of weights in weighted prediction is 0.SOLUTION: A video decoding device includes a prediction image generation unit that decodes the number of weights in a reference list from encoded data, sets the number of weights in the reference list to 1 or more, decodes a flag indicating whether a weighting coefficient and an offset value are present for each index of the reference list according to the number of weights, decodes the weighting coefficient and the offset value when the value of the flag is true, and generates a weighted prediction image by multiplying an interpolated image of the reference picture by the weighting coefficient and adding the offset value to generate a prediction image.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] An embodiment of the present invention relates to a video encoding device and a video decoding 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 divided into slices obtained by dividing the images, coding tree units (CTUs) obtained by dividing the slices, coding tree units (CTUs) obtained by dividing the coding tree units, and so on. The coding unit (sometimes called a coding unit (CU)) that is to be encoded, and The coding unit is divided into transform units (TUs), which are managed in a hierarchical structure, and the coding unit is encoded / 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] In Non-Patent Document 1, a mechanism is adopted in which a plurality of reference picture lists are defined and used by referring to them in reference picture list management. Also, a method is adopted in which the number of weights is explicitly defined in weighted prediction. [Prior art documents] [Non-patent literature]

[0008] [Non-Patent Document 1] Recommendation ITU-T H.266 (04 / 22) "Versatile Video Coding" Summary of the Invention [Problem to be solved by the invention]

[0009] However, in Non-Patent Document 1, the specification states that the number of weights in weight prediction should be set to 0. Even though it can be defined, there is a problem that it cannot work when the number of weights is 0. do. [Means for solving the problem]

[0010] A video decoding device according to one aspect of the present invention is characterized in that it decodes a weight number of a reference list from encoded data, and sets the weight number of the reference list to 1 or more, and and a weighted prediction processing unit that decodes a flag indicating whether a weighting coefficient and an offset value exist for each index of the reference list, and if the value of the flag is true, decodes the weighting coefficient and the offset value, multiplies an interpolated image of the reference picture by the weighting coefficient, and adds the offset value to generate a predicted image.

[0011] A video encoding device according to an aspect of the present invention is characterized in that it encodes a number of weights of a reference list, and the number of weights of the reference list is set to 1 or more, and the reference list is determined according to the number of weights. The weighted prediction unit encodes a flag indicating whether a weighting coefficient and an offset value exist for each index of a reference picture, and when the value of the flag is true, encodes the weighting coefficient and the offset value, and generates a predicted image by multiplying an interpolated image of the reference picture by the weighting coefficient and adding the offset value.

[0012] With this configuration, the above problem can be solved. Effect of the Invention

[0013] According to one aspect of the present invention, the above problems can be solved. [Brief description of the drawings]

[0014] [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] FIG. 2 is a diagram showing a hierarchical structure of encoded data. [Diagram 3] FIG. 13 is a diagram showing a hierarchical structure of encoded data in units of PUs. [Figure 4] FIG. 1 is a schematic diagram showing a configuration of an image decoding device. [Diagram 5] 11 is a flowchart illustrating a schematic operation of an image decoding device. [Figure 6] FIG. 13 is a schematic diagram showing a configuration of an inter-prediction parameter derivation unit. [Figure 7] FIG. 1 is a block diagram showing a configuration of a video encoding device. [Figure 8] 1 is a diagram showing a portion of the syntax of Sequence Parameter Set (SPS) and Picture Parameter Set (PPS). [Figure 9] FIG. 13 is a diagram showing a part of the syntax of a picture header PH. [Figure 10] A diagram showing a part of the syntax of a slice header. [Figure 11] FIG. 13 is a diagram illustrating the syntax of weighted prediction information pred_weight_table. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

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

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

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

[0018] The resolution conversion device 51 converts the resolution of an image T included in a video to generate an image of a different resolution. The resolution conversion device 51 supplies a variable resolution video signal including the above to the video coding device 11. The resolution conversion device 51 also supplies information indicating whether or not the resolution of the 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 converts the sequence parameter set SPS (Sequence The IEEE 802.11b parameter set is encoded as part of the IEEE 802.11b parameter set

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

[0020] The network 21 transmits the coded stream Te generated by the video coding device 11 to the video decoding device 22. The network 21 may be the Internet, a wide area network (WAN), a local area network (LAN), or any of these. The network 21 is a combination of the above. The network 21 is not necessarily limited to a two-way communication network, but may be a one-way communication network that transmits broadcast waves such as terrestrial digital broadcasting, satellite broadcasting, etc. 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).

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

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

[0023] 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. If device 31 has high processing power, it displays high quality images, and if it has lower processing power, it displays images that do not require high processing and display power.

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

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

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

[0027] Clip3(a, b, c) is a function that clips c to a value between a and b (inclusive). If c < a, it returns a; if c > b, it returns b; otherwise, it returns c (assuming a <= b). It is a function that returns a when c < a, returns b when c > b, and returns c in other cases (where a <= b).

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

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

[0030] Floor(a) is a function that returns the largest integer less than or equal to a.

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

[0032] Max(a, b) is a function that returns the larger of the values a and b.

[0033] Min(a, b) is a function that returns the smaller of the values a and b.

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

[0035] a÷d and a over d represent the division of a by d (without rounding).

[0036] (Structure of the encoded data Te) Prior to the detailed description of the image encoding device 11 and the image decoding device 31 according to this embodiment, the data structure of the encoded data Te generated by the image encoding device 11 and decoded by the image decoding device 31 will be described with reference to FIGS. 2 and 3.

[0037] The coded data Te is a bitstream consisting of multiple CVS (Coded Video Sequence) and EoB (End of Bitstream) NAL units as shown in Fig. 2. The CVS consists of multiple AUs (Access Units) and EoS (End of Sequence) NAL units. The AU at the beginning of the CVS is called the CVSS (Coded Video Sequence Start) AU. The unit obtained by dividing the CVS into layers is called the CLVS (Coded Layer Video Sequence). An AU consists of one or more layered picture units (PUs) with the same output time. If the multilayer coding method is not adopted, an AU consists of one PU. A PU is a unit of coded data for one decoded picture consisting of multiple NAL units. The CLVS consists of PUs of the same layer, and the PU at the beginning of the CLVS is called the CLVSS (Coded Layer Video Sequence Start) PU. The CLVSS PU is limited to PUs consisting of randomly accessible IRAPs (Intra Random Access Pictures) and GDRs (Gradual Decoder Refresh Pictures). NAL A unit consists of a NAL unit header and RBSP (Raw Byte Sequence Payload) data. The NAL unit header consists of two bits of 0 data, followed by a 6-bit nuh_layer_id that indicates the layer value, a 5-bit nuh_unit_type that indicates the NAL unit type, and a Temporal ID value plus 1. It consists of the 3 bits nuh_temporal_id_plus1 of the value entered.

[0038] FIG. 3 is a diagram showing a hierarchical structure of data in the encoded data Te in units of PUs. The data Te illustratively includes a sequence and a plurality of pictures constituting the sequence. FIG. 3 shows a coded video sequence defining the sequence SEQ, a coded picture defining the picture PICT, a coded slice defining the slice S, a coded slice defining the slice data, and a coded video sequence defining the slice data. A diagram showing encoded slice data, a coding tree unit contained in the encoded slice data, and a coding unit contained in the coding tree unit is shown.

[0039] In a coded video sequence, an image decoding device is used to decode the sequence SEQ to be processed. The standard specifies a set of data referenced by the video parameter set (VPS) 31. As shown in Fig. 3, the sequence SEQ includes a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), an adaptation parameter set (APS), a picture PICT, and supplemental enhancement information (SEI).

[0040] In the video parameter set VPS, for a video image that consists of multiple layers, A set of coding parameters common to a plurality of video streams and a set of coding parameters associated with a plurality of layers and each individual layer contained in the video stream are defined.

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

[0042] Here, the sequence parameter set SPS includes the following syntax elements: pic_width_max_in_luma_samples: The maximum width of any image in a sequence. This syntax element specifies the width of the image in luminance block units. The value of this syntax element must not be 0 and must be an integer multiple of Max(8, MinCbSizeY). Here, MinCbSizeY is a value determined by the minimum size of a luminance block. pic_height_max_in_luma_samples: This syntax element 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 element must not be 0 and must be an integer multiple of Max(8, MinCbSizeY). is required.

[0043] The picture parameter set PPS specifies the number of pictures to be decoded for each picture in the target sequence. A set of coding parameters to be referred to by the image decoding device 31 is specified. If present, one of multiple PPSs may be selected for each picture in the target sequence. Select.

[0044] Here, the picture parameter set PPS includes the following syntax elements: pps_pic_width_in_luma_samples: Syntax element that specifies the width of the target picture. The value of this syntax element is not 0, is an integer multiple of Max(8, MinCbSizeY), and The InpPicWidthInLumaSamples value, described below, is set equal to pps_pic_width_in_luma_samples. pps_pic_height_in_luma_samples: A syntax element that specifies the height of the target picture. The value of this syntax element is not 0, but an integer multiple of Max(8, MinCbSizeY). It is required that the value be less than or equal to sps_pic_height_max_in_luma_samples. InpPicHeightInLumaSamples, described below, is set equal to pps_pic_height_in_luma_samples. pps_conformance_window_flag: Conformance (cropping) window offset This flag indicates whether the conformance parameter is to be notified next and indicates where to display the conformance window. If this flag is 1, the parameter is signaled and is 0, the conformance window offset parameter is not present. Indicates that there is no sps_chroma_format_id is a parameter that indicates the chrominance format. ChromaFormatIdc, described below, is set equal to sps_chroma_format_id. · pps_init_qp_minus26 is information for deriving the quantization parameter SliceQpY of the slice referenced by the PPS.

[0045] (Encoded Picture) The coded picture defines a set of data to be referenced by the image decoding device 31 in order to decode the picture PICT to be processed. The picture PICT is, as shown in FIG. PH, including slices 0 to NS-1 (NS is the total number of slices contained in the picture PICT) .

[0046] (Coded Slice) In the case of the coded slice, the image decoding device 31 refers to the coded slice S to decode the slice S to be processed. As shown in Figure 3, a slice consists of a slice header and and contains slice data.

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

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

[0049] Note that the slice header contains a reference to the picture parameter set (PPS) (pic_parameter_set _id) may be included.

[0050] (Encoded slice data) The coded slice data defines a set of data to be referenced by the image decoding device 31 in order to decode the slice data to be processed. The slice data is the coded slice data shown in FIG. As shown in the header, it contains a CTU, which is a fixed-size (e.g., 64x64) block that constitutes a slice, and is also called a Largest Coding Unit (LCU).

[0051] (coding tree unit) 3, a set of data to be referred to by the image decoding device 31 in order to decode the CTU to be processed is specified. The CTU is divided into a plurality of sub-trees by recursive quad tree (QT), binary tree (BT), or ternary tree (TT). The tree structure obtained by recursive quadtree division is called a coding node. The intermediate nodes of the ternary tree are coding nodes, and the CTU itself is the top coding node. It is stipulated as follows.

[0052] (Encoding Unit) FIG. 3 shows data to be referenced by the image decoding device 31 in order to decode the coding unit to be processed. Specifically, a CU consists of a CU header CUH, prediction parameters, and transformation parameters. The CU header includes a quantization transform coefficient, a quantization metric, etc. The CU header specifies a prediction mode, etc.

[0053] The prediction process may be performed in units of CUs, or in units of sub-CUs obtained by further dividing a CU.

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

[0055] Transformation and quantization are performed in units of CUs, but quantization coefficients are stored in units of subblocks such as 4x4. It may be entropy coded.

[0056] In this specification, when "a flag indicating whether or not XX" is used, a flag other than 0 (for example, 1) indicates XX and 0 indicates non-XX, and in logical negation, logical product, etc., 1 is treated as true and 0 as false (same below). However, in an actual device or method, other values ​​may be used as true and false values.

[0057] (Configuration of an image decoding device) The configuration of an image decoding device 31 (FIG. 4) according to this embodiment will be described.

[0058] The image 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, and a prediction image A generation unit (prediction image generation device) 308, an inverse quantization and inverse transformation unit 311, an addition unit 312, a prediction parameter The image decoding device 320 is configured to include a data derivation unit 320. In some configurations, the device 31 does not include a loop filter 305 .

[0059] The parameter decoding unit 302 further includes a header decoding unit 3020, a CT information decoding unit 3021, and a CU decoding unit 3022. The header decoding unit 3020 includes 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 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 the QP update information (quantization correction value) and the quantization prediction error (residual_coding) from the encoded data.

[0060] The predicted image generating unit 308 includes an inter predicted image generating unit 309 and an intra predicted image generating unit 310. It is composed of:

[0061] The entropy decoding unit 301 performs entropy decoding on the encoded data Te input from the outside. Decoding is performed to decode the individual symbols (syntax elements).

[0062] The entropy decoding unit 301 outputs the decoded code to the parameter decoding unit 302. Control of which code to decode is performed based on an instruction from the parameter decoding unit 302.

[0063] (Basic flow) FIG. 5 is a flowchart illustrating a schematic operation of the image decoding device 31.

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

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

[0066] Hereinafter, the image decoding device 31 performs the steps S1300 to S5000 for each CTU included in the target picture. The process is repeated to derive a decoded image for each CTU.

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

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

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

[0070] (S1510: Decode CU information) The CU decoding unit 3022 decodes CU information, prediction information, etc. from the encoded data. do.

[0071] (S1520: TU information decoding) The TU decoding unit 3024 decodes the QP update information and the quantization prediction error from the encoded data. 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.

[0072] (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 the prediction information.

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

[0074] (S4000: Decoded image generation) The adder 312 receives a predicted image from the predicted image generator 308 and The prediction error supplied from the inverse quantization and inverse transform unit 311 is added to the A decoded image is generated.

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

[0076] (Inter-prediction image generation unit) FIG. 6 is a block diagram of the inter-prediction image generating unit 309 included in the prediction image generating unit 308 according to this embodiment. 3 is a schematic diagram showing a configuration. The predicted image generation unit 308 includes an intra predicted image generation unit 309 and an inter predicted image generation unit 310. The inter predicted image generation unit 309 includes a motion compensation unit (predicted image generation device) 3091 and a synthesis unit 3095. The synthesis unit 3095 includes an IntraInter synthesis unit 30951, a GPM synthesis unit 30952, a BDOF unit 30954, and a weighted prediction unit 3094.

[0077] When the prediction mode indicates an inter prediction mode, the inter predicted image generating unit 309 - Using the inter-prediction parameters and reference pictures input from the prediction parameter derivation unit 303 A predicted image of a block or sub-block is generated by inter prediction.

[0078] (Motion Compensation) The motion compensation unit 3091 (interpolated image generation unit 3091) receives the input from the inter prediction parameter derivation unit 303. Based on the input inter prediction parameters, a reference block is selected from the reference picture memory 306. An interpolated image (motion-compensated image) is generated by reading out the data.

[0079] The synthesis unit 3092 includes at least an IntraInter synthesis unit 30921, a GPM synthesis unit 30922, a BDOF unit 30923, and a weighted prediction unit 30924.

[0080] (IntraInter synthesis processing) The IntraInter synthesis unit 30931 synthesizes the inter-predicted image and the intra-predicted image by weighting the sum of the inter-predicted image and the intra-predicted image. A predicted image is generated.

[0081] (GPM synthesis processing) The GPM synthesis unit 30932 generates a predicted image using the above-mentioned GPM prediction.

[0082] (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 30923. In the bi-prediction mode, the BDOF unit 30923 generates two predicted images (a first predicted image and a second predicted image) in the bi-prediction mode. A predicted image is generated by referring to the first predicted image and the second predicted image) and a gradient correction term.

[0083] (Weighted prediction) The weighted prediction unit 30924 generates a predicted image pbSamples of the block from the interpolated image predSamplesLX. do.

[0084] First, the variable weightedPredFlag indicating whether or not to perform weighted prediction processing is derived as follows: if slice_type is equal to P, weightedPredFlag is set equal to pps_weighted_pred_flag defined in PPS. Otherwise, if slice_type is equal to B, weightedPredFlag is set equal to pps_weighted_bipred_flag && (!dmvrFlag) defined in PPS.

[0085] Hereafter, bcw_idx is a weight index for bi-prediction with CU-based weighting. If bcw_idx is not signaled, set bcw_idx=0. In merge prediction mode, bcwIdx is the weight index for neighboring blocks. In AMVP prediction mode, it sets the bcw_idx of the current block.

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

[0087] When one of the prediction list usage flags (predFlagL0 or predFlagL1) is 1 (uniprediction) (weighted prediction is not used), predSamplesLX (LX is L0 or L1) is set to the pixel bit depth bitDepth The following equation is processed to match:

[0088] pbSamples[x][y] = Clip3(0,(1<<bitDepth)-1,(predSamplesLX[x][y]+offset1)> >shift1) Here, shift1=14-bitDepth, offset1=1<<(shift1-1). PredLX is L0 or L1 This is a predicted interpolated image.

[0089] In addition, both prediction list usage flags (predFlagL0 and predFlagL1) are 1 (bi-prediction PRED_BI ), and if weighted prediction is not used, the following equation is processed to average predSamplesL0 and predSamplesL1 and match them to the number of pixel bits.

[0090] pbSamples[x][y] = Clip3(0,(1<<bitDepth)-1,(predSamplesL0[x][y]+predSamplesL1[x][y]+offset2)> >shift2) Here, shift2=15-bitDepth and offset2=1<<(shift2-1).

[0091] If the value of the variable weightedPredFlag is equal to 1 and the value of the variable bcwIdx is equal to 0, In this case, as a weighted prediction process, the predicted image pbSamples is derived as follows.

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

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

[0094] 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:

[0095] 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 as follows: It is derived as follows.

[0096] 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:

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

[0098] 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:

[0099] pbSamples[x][y] = Clip3(0,(1 << bitDepth)- 1, (predSamplesL0[x][y] * w0 + predSamplesL1[x][y] * w1 + ((o0 + o1 + 1)<< log2Wd))>>(log2Wd + 1)) (Intra-prediction image generation unit 310) When predMode indicates an intra prediction mode, the intra prediction image generation unit 310 The intra prediction unit 303 performs intra prediction using the intra prediction parameters input from the prediction parameter derivation unit 304 and reference pixels read from the reference picture memory 306 .

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

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

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

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

[0104] (Configuration of a video encoding device) Next, a configuration of the video encoding device 11 according to this embodiment will be described. 1 is a block diagram showing a configuration of a video encoding device 11 according to the present 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.

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

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

[0107] The transform / quantization unit 103 performs frequency transform on the prediction error input from the subtraction unit 102. The transform / quantization unit 103 calculates transform coefficients and derives quantized transform coefficients by quantization. The quantized transform coefficients are output to the parameter coding unit 111 and the inverse quantization and inverse transform unit 105 .

[0108] The inverse quantization and inverse transform unit 105 corresponds to the inverse quantization and inverse transform unit 311 (FIG. 4) in the video decoding device 31. The calculated prediction error is output to the adder 106.

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

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

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

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

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

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

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

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

[0117] (Configuration of the inter-prediction parameter encoding unit) The inter-prediction parameter encoding unit 112 includes a parameter encoding control unit 1121, an inter-prediction The parameter encoding control unit 1121 includes a parameter derivation unit 303. The inter prediction parameter derivation unit 303 is a common component to that of 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.

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

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

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

[0121] However, unlike the video decoding device, the inter prediction parameter derivation unit 303 and the intra prediction The input to the parameter derivation unit 304 is the coding parameter determination unit 110 and the prediction parameter memory 108. and outputs it to parameter coding section 111.

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

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

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

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

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

[0127] The coding parameter determination unit 110 determines the size of the amount of information and the coding parameter for each of the plurality of sets. The RD cost value indicating the error is calculated. 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 coded stream Te obtained by entropy coding the quantization error and the coding parameters. The squared error is calculated in the subtraction unit 102. The coefficient λ is a preset real number greater than zero. The coding parameter determination unit 110 selects a set of coding parameters that minimizes the calculated cost value. The encoding parameter determination unit 110 selects the encoding parameter. The signal is output to the encoding unit 111 and the prediction parameter derivation unit 120 .

[0128] 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 306, The control unit 308, the inverse quantization and inverse transform unit 311, the addition unit 312, the prediction parameter derivation unit 320, the prediction image generation unit 101, the subtraction unit 102, the transform and quantization unit 103, the entropy coding unit 104, the inverse quantization and inverse transform unit 105, the loop filter 107, the coding parameter determination unit 110, the parameter coding unit 111, and the prediction parameter derivation unit 120 may be realized by a computer. Alternatively, the program for implementing the above may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read and executed by a computer system. Note that the "computer system" 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. Also, the "computer-readable recording medium" refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a computer readable medium. It also refers to a storage device such as a hard disk that is built into a computer system. The term "computer-readable recording medium" may include a medium that dynamically stores a program for a short period of time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, and a medium that stores a program for a certain period of time, such as a volatile memory inside a computer system that serves as a server or client in such a case. 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.

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

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

[0131] (Syntax) FIG. 8(a) shows a part of the syntax of the Sequence Parameter Set (SPS) of Non-Patent Document 1.

[0132] sps_weighted_pred_flag is a flag indicating whether or not weighted prediction may be applied to a P slice that references an SPS. When sps_weighted_pred_flag is equal to 1, it indicates that weighted prediction is applied to a P slice that references an SPS. When sps_weighted_pred_flag is equal to 0, it indicates that weighted prediction is not applied to a P slice that references an SPS.

[0133] sps_weighted_bipred_flag is a flag indicating whether or not weighted prediction may be applied to a B slice that references an SPS. When sps_weighted_bipred_flag is equal to 1, it indicates that weighted prediction is applied to a B slice that references an SPS. When sps_weighted_bipred_flag is equal to 0, it indicates that weighted prediction is not applied to a B slice that references an SPS.

[0134] The long_term_ref_pics_flag is a flag indicating whether or not long-term pictures are used.

[0135] inter_layer_ref_pics_present_flag is a flag that indicates whether inter-layer prediction is used. be.

[0136] sps_idr_rpl_present_flag is set when the nal_unit type is an IDR picture (Instantaneous Decoding The header of a slice that indicates a "Refresh picture" determines whether to define a reference picture list. This is a flag to indicate

[0137] If rpl1_same_as_rpl0_flag is 1, there is no information for reference picture list 1 and it is the same as num_ref_pic_lists_in_sps[0] and ref_pic_list_struct(0,rplsIdx). This indicates that:

[0138] FIG. 8(b) shows a part of the syntax of the Picture Parameter Set (PPS) in Non-Patent Document 1.

[0139] pps_no_pic_partition_flag indicates whether the picture is not divided into tiles or slices. If pps_no_pic_partition_flag is 1, each picture that references a PPS If pps_no_pic_partition_flag is 0, it indicates that each picture that references the PPS may be divided into multiple tiles or slices. This indicates that:

[0140] pps_num_ref_idx_default_active_minus1[i]+1 indicates the value of the variable NumRefIdxActive[0] for a P or B slice when i is 0 and sh_num_ref_idx_active_override_flag is 0. The variable NumRefIdxActive[0] means the number of active reference pictures in reference list 0. The value of pps_num_ref_idx_default_active_minus1[i] indicates the value of the variable NumRefIdxActive[1] for a B slice when sh_num_ref_idx_active_override_flag is equal to 0. The variable NumRefIdxActive[1] denotes the number of active reference pictures in reference list 1. The value of pps_num_ref_idx_default_active_minus1[i] must be within the range of 0 to 14.

[0141] pps_weighted_pred_flag is a flag indicating whether weighted prediction is applied to a P slice that references a PPS. When pps_weighted_pred_flag is equal to 0, weighted prediction is applied to a P slice that references a PPS. The weighted prediction unit 3094 sets the value of pps_weighted_pred_flag to 0. If pps_weighted_pred_flag is not present, the weighted prediction unit 3094 sets the value of pps_weighted_pred_flag to 0. If pps_weighted_pred_flag is not present, the weighted prediction unit 3094 sets the value of pps_weighted_pred_flag to 0.

[0142] pps_weighted_bipred_flag is a flag indicating whether weighted prediction is applied to a B slice that references a PPS. When pps_weighted_bipred_flag is equal to 0, weighted prediction is applied to a B slice that references a PPS. Indicates that weighted prediction is not applied to the rice. pps_weighted_bipred_flag is set to 1. indicates that weighted prediction is applied to a B slice referring to 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.

[0143] If pps_no_pic_partition_flag is 0, the following syntax exists:

[0144] pps_rpl_info_in_ph_flag indicates whether reference picture list information is present in the picture header. pps_rpl_info_in_ph_flag is a flag indicating whether reference picture list information is present in the picture header. When pps_rpl_info_in_ph_flag is equal to 1, it indicates that reference picture list information is present in the picture header. When pps_rpl_info_in_ph_flag is equal to 0, it indicates that reference picture list information is not present in the picture header, but a slice header may be present.

[0145] pps_wp_info_in_ph_flag is present when pps_weighted_pred_flag is equal to 1, pps_weighted_bipred_flag is equal to 1, or pps_rpl_info_in_ph_flag is equal to 1. pps_wp_info_in_ph_flag is equal to 1 indicates that the weighted prediction information pred_weight_table is present in the picture header but not in the slice header. This means that the weight prediction information pred_weight_table does not exist in the picture header and is stored in the slice header. If pps_wp_info_in_ph_flag is not present, the value of pps_wp_info_in_ph_flag shall be equal to 0.

[0146] FIG. 9 shows a part of the syntax of the picture header PH in Non-Patent Document 1.

[0147] If ph_inter_slice_allowed_flag is 0, slice_type of all slices in the picture is 2. If ph_inter_slice_allowed_flag is 1, the picture is Indicates that the slice_type of the included slices is at least one of 0 (B Slice) or 1 (P Slice).

[0148] If pps_rpl_info_in_ph_flag is 1, ref_pic_lists() defines the reference picture list. to select the reference picture list.

[0149] ph_inter_slice_allowed_flag is not 0 and pps_weighted_pred_flag is equal to 1 Or, if pps_weighted_bipred_flag is equal to 1 and pps_wp_info_in_ph_flag is equal to 1, weighted prediction information pred_weight_table is present.

[0150] 10 shows a part of the syntax of the slice header in Non-Patent Document 1. These syntaxes are decoded by the parameter decoding unit 302, for example.

[0151] If sh_num_ref_idx_active_override_flag is 1, it indicates that the syntax element sh_num_ref_idx_active_minus1[0] is present in P and B slices and the syntax element sh_num_ref_idx_active_minus1[1] is present in B slice. If num_ref_idx_active_override_flag is 0, it indicates that the syntax element num_ref_idx_active_minus1[0] is not present in P and B slices. If not present, the value of num_ref_idx_active_override_flag is assumed to be equal to 1. Measure.

[0152] sh_num_ref_idx_active_minus1[i] is used to derive the number of reference pictures in reference picture list i that are actually used. The method of deriving the variable NumRefIdxActive[i], which is the number of reference pictures that are actually used, will be described later. The value of sh_num_ref_idx_active_minus1[i] must be between 0 and 14. If the slice is a B slice, and num_ref_idx_active_override_flag is 1, and num_ref_idx_active_minus1[i] does not exist, num_ref_idx_active_minus1[i] is inferred to be equal to 0.

[0153] If pps_wp_info_in_ph_flag is not 1 and pps_weighted_pred_flag is equal to 1 and slice_type is 1 (P Slice), or pps_weighted_bipred_flag is equal to 1 and slice_type is 0 (B Slice), then pred_weight_table is called.

[0154] The following pseudo code shows how the prediction parameter derivation unit 320 derives the variable NumRefIdxActive[i] of Non-Patent Document 1. Or, in the case of a P slice and reference picture list 0, if sh_num_ref_idx_active_override_flag is equal to 1, the variable NumRefIdxActive[i] is set to the value of sh_num_ref_idx_active_minus1[i]. Set the value by adding 1 to the value. Otherwise (B slice or P slice and reference) In the case of picture list 0, if sh_num_ref_idx_active_override_flag is equal to 0, If the value of num_ref_entries[i][RplsIdx[i]] is equal to or greater than the value obtained by adding 1 to pps_num_ref_idx_default_active_minus1[i], the variable NumRefIdxActive[i] is assigned the value obtained by adding 1 to pps_num_ref_idx_default_active_minus1[i]. Otherwise, the variable NumRefIdxActive[i] is assigned the value of num_ref_entries[i][RplsIdx[i]]. pps_num_ref_idx_default_active_minus1[i] is the value of the default variable NumRefIdxActive[i] defined in the PPS. In the case of an I slice or a P slice and reference picture list 1, the variable NumRefIdxActive[i] is assigned the value of 0.

[0155] for(i=0; i<2; i++) if(sh_slice_type == B || (sh_slice_type == P && i == 0)){ if(sh_num_ref_idx_active_override_flag) NumRefIdxActive[i] = sh_num_ref_idx_active_minus1[i] + 1 else { if(num_ref_entries[i][RplsIdx[i]] >= pps_num_ref_idx_default_active_minus1[i]+1) NumRefIdxActive[i] = pps_num_ref_idx_default_active_minus1[i] + 1 else NumRefIdxActive[i] = num_ref_entries[i][RplsIdx[i]] } } else / * sh_slice_type == I || (sh_slice_type == P && i == 1) * / NumRefIdxActive[i] = 0 } The value of NumRefIdxActive[i]-1 indicates the maximum reference index value of the reference list that can be used to decode a slice. If the value of NumRefIdxActive[i] is 0, no reference index can be used. No. Therefore, if the current slice is a P slice, the value of NumRefIdxActive[0] must be greater than 0. Also, if the current slice is a B slice, both NumRefIdxActive[0] and NumRefIdxActive[1] must be greater than 0.

[0156] FIG. 11 shows the syntax of the weight prediction information pred_weight_table in Non-Patent Document 1.

[0157] luma_log2_weight_denom is the base 2 logarithm of the denominators of all luma weighting factors 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 logarithmic difference of the denominators of all the 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.

[0158] num_l0_weights indicates the number of weights signaled for entries in reference picture list 0 when pps_wp_info_in_ph_flag is equal to 1. The value of num_l0_weights must be greater than or equal to 0. , Min(15,num_ref_entries[0][RplsIdx[0]]). If pps_wp_info_in_ph_flag is equal to 1, the variable NumWeightsL0 is set equal to num_l0_weights. If (pps_wp_info_in_ph_flag is equal to 0), the variable NumWeightsL0 is equal to NumRefIdxActive[0] where num_ref_entries[i][RplsIdx[i]] is the number of references in reference picture list i. The variable RplsIdx[i] indicates the number of reference pictures in the reference picture list i. The index value indicates the store.

[0159] luma_weight_l0_flag[i] is a flag indicating the presence of a weighting factor for the i-th luminance component of L0 prediction in reference picture list 0. When luma_weight_l0_flag[i] is 1, the luminance component of L0 prediction is luma_weight_l0_flag[i] is 0, it indicates the presence of weighting coefficients for L0 prediction. It indicates that there is no weight coefficient for the luma component. When luma_weight_l0_flag[i] does not exist, the weight prediction unit 3094 infers that it is equal to 0. chroma_weight_l0_flag[i] is a flag indicating the existence of a weight coefficient for the chroma prediction value of the i-th L0 prediction in reference picture list 0. When chroma_weight_l0_flag[i] is 1, it indicates the existence of a weight coefficient for the chroma prediction value of the L0 prediction. When chroma_weight_l0_flag[i] is 0, it indicates the non-existence of a weight coefficient for the chroma prediction value of the L0 prediction. When chroma_weight_l0_flag[i] does not exist, the weight prediction unit 3094 infers that it is equal to 0. It is a flag indicating the existence of a weight coefficient for the chroma prediction value of the i-th L0 prediction in reference picture list 0. When chroma_weight_l0_flag[i] is 1, it indicates the existence of a weight coefficient for the chroma prediction value of the L0 prediction. When chroma_weight_l0_flag[i] is 0, it indicates the non-existence of a weight coefficient for the chroma prediction value of the L0 prediction. When chroma_weight_l0_flag[i] does not exist, the weight prediction unit 3094 infers that it is equal to 0. to infer.

[0160] delta_luma_weight_l0[i] is the difference in the weight coefficient applied to the luma prediction value of the i-th L0 prediction in reference picture list 0. The variable LumaWeightL0[i] is derived to be equal to (1<<luma_log2_weight_denom)+delta_luma_weight_l0[i]. When luma_weight_l0_flag[i] is equal to 1, the value of delta_luma_weight_l0[i] must be within the range of -128 to 127. When luma_weight_l0_flag[i] is equal to 0, the weight prediction unit 3094 infers that LumaWeightL0[i] is equal to 2 to the power of luma_log2_weight_denom (2^luma_log2_weight_denom). When luma_weight_l0_flag[i] is equal to 1, the value of delta_luma_weight_l0[i] must be within the range of -128 to 127. When luma_weight_l0_flag[i] is equal to 0, the weight prediction unit 3094 infers that LumaWeightL0[i] is equal to 2 to the power of luma_log2_weight_denom (2^luma_log2_weight_denom). When luma_weight_l0_flag[i] is equal to 0, the weight prediction unit 3094 infers that LumaWeightL0[i] is equal to 2 to the power of luma_log2_weight_denom (2^luma_log2_weight_denom).

[0161] Luma_offset_l0[i] is applied to the predicted luma value of the i-th L0 prediction in reference picture list 0. It is the offset value to be obtained. The value of Luma_offset_l0[i] must be within the range from -128 to 127. When luma_weight_l0_flag[i] is equal to 0, the weight prediction unit 3094 assumes that luma_offset_l0[i] is equal to 0.

[0162] delta_chroma_weight_l0[i][j] is the difference in the weight coefficient applied to the predicted value of the chromaticity difference of the i-th L0 prediction in the L0 reference picture list where j is 0 for Cb and j is 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 from -128 to 127. When chroma_weight_l0_flag[i] is 0, the weight prediction unit 3094 assumes that ChromaWeightL0[i][j] is equal to the power of 2 to the ChromaLog2WeightDenom value (2^ChromaLog2WeightDenom). delta_chroma_offset_l0[i][j] is the difference in the offset value applied to the predicted value of the chromaticity difference of the i-th L0 prediction in the L0 reference picture list where j is 0 for Cb and j is 1 for Cr. The variable ChromaOffsetL0[i][j] is derived as follows. ChromaOffsetL0[i][j] = Clip3(-128,127, (128 + delta_chroma_offset_l0[i][j] -

[0163] ((128 * ChromaWeightL0[i][j])>> ChromaLog2WeightDenom))) (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 weighting prediction unit 3094 uses ChromaOffsetL0[i][j] is assumed to be equal to 0.

[0164] num_l1_weights is set when pps_weighted_bipred_flag and pps_wp_info_in_ph_flag are both equal to 1. Indicates the number of weights to be signaled for entries in reference picture list 1 when The value of num_l1_weights is in the range 0 to Min(15,num_ref_entries[1][RplsIdx[1]]). It is surrounded by.

[0165] The variable NumWeightsL1 is derived by the following pseudocode: If not, or if pps_wp_info_in_ph_flag is 1 and the value of num_ref_entries[1][RplsIdx[1]] is 0, the value of the variable NumWeightsL1 is set to 0. Otherwise, if pps_wp_info_in_ph_flag is 1, the value of the variable NumWeightsL1 is set to the value of the syntax element num_l1_weights. Otherwise, the variable num_l1_weights is set to the value of the variable NumRefIdxActive[1]. If pps_weighted_bipred_flag is not 1, it means that weighted prediction is not applied to B slices. pps_wp_info_in_ph_flag is the weighted prediction information pred_weight_table A flag indicating whether a reference picture exists in the picture header. This is a parameter indicating the number of reference pictures in picture list 1.

[0166] if(!pps_weighted_bipred_flag || (pps_wp_info_in_ph_flag && num_ref_entries[1][RplsIdx[1]] == 0)) NumWeightsL1 = 0 else if(pps_wp_info_in_ph_flag) NumWeightsL1 = num_l1_weights else NumWeightsL1 = NumRefIdxActive[1] In addition, 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 replaced with 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 replaced with l1, l1 , list1 and List1 and interpret as such.

[0167] In Non-Patent Document 1, the following restrictions are imposed on the value of the variable NumRefIdxActive[0]: do.

[0168] The value of NumRefIdxActive[0] must be less than or equal to the value of NumWeightsL0 if any of the following conditions are true: -The value of pps_wp_info_in_ph_flag is 1, pps_weighted_pred_flag is 1, and sh_slice_type is P. · The value of pps_wp_info_in_ph_flag is 1, pps_weighted_bipred_flag is 1, and sh_slice_type is the case of B.

[0169] Furthermore, regarding the value of the variable NumRefIdxActive[1], when pps_wp_info_in_ph_flag is 1, pps_weighted_bipred_flag is 1, and sh_slice_type is B, the value of NumRefIdxActive[1] must be less than or equal to the value of NumWeightsL1.

[0170] In Non-Patent Document 1, if any of the following conditions is true, for each value of i in the range from 0 to NumRefIdxActive[0]-1, the values ​​of luma_weight_l0_flag[i] and chroma_weight_l0_flag[i] are Both values ​​are inferred to be equal to 0. -The value of pps_wp_info_in_ph_flag is 1, pps_weighted_pred_flag is 0, and sh_slice_type is P. The value of pps_wp_info_in_ph_flag is 1, pps_weighted_bipred_flag is 0, and sh_slice_type is the case of B.

[0171] In Non-Patent Document 1, the number of weights is explicitly specified in the syntax in weight prediction as described above. However, even though it is possible to specify 0 as the number of weights, However, if 0 is specified, encoding and decoding will not be possible.

[0172] Specifically, for reference list 0, the syntax element num_l0_weights The value of is in the range of 0 to Min(15,num_ref_entries[0][RplsIdx[0]]). Therefore, It can take the value 0. Next, when pps_wp_info_in_ph_flag is equal to 1, that is, when the syntax element num_l0_weights is encoded and decoded, the value of the variable NumWeightsL0 is set equal to num_l0_weights.

[0173] If the value of pps_wp_info_in_ph_flag is 1, pps_weighted_pred_flag is 1, and sh_slice_type is P, or if the value of pps_wp_info_in_ph_flag is 1, pps_weighted_bipred_flag is 1, and sh_slice_type is B, the value of the variable NumRefIdxActive[0] must be less than or equal to the value of NumWeightsL0.

[0174] The syntax element num_l0_weights is encoded and decoded when the value of pps_wp_info_in_ph_flag is 1, pps_weighted_pred_flag is 1, and sh_slice_type is P, or when the value of pps_wp_info_in_ph_flag is 1, pps_weighted_bipred_flag is 1, and sh_slice_type is B. When the value of num_l0_weights is 0, the value of the variable NumWeightsL0 is 0, and the value of the variable NumRefIdxActive[0] must also be set to 0.

[0175] However, for P slices, the value of NumRefIdxActive[0] must be greater than 0. For B slices, both NumRefIdxActive[0] and NumRefIdxActive[1] must be greater than 0. In other words, if the value of NumRefIdxActive[0] is 0, there is no reference picture in reference list 0, and coding and decoding are not possible. For this reason, num_l0_weights should be explicitly set to 0. When this is set, the variable NumWeightsL0 will always be 0, and NumRefIdxActive[0] will also be 0, indicating that encoding and decoding are not possible.

[0176] Therefore, in this embodiment, as a first solution, the value of the syntax element num_l0_weights Change the range of the syntax element num_l0_weights so that the value is in the range of 1 to Min(15,num_ref_entries[0][RplsIdx[0]]).

[0177] In another embodiment, the second solution is to change the way the variable NumWeightsL0 is set. If pps_wp_info_in_ph_flag is equal to 1, the variable NumWeightsL0 is set to Max(1,num_l0_weights). Otherwise (pps_wp_info_in_ph_flag is equal to 0), the variable NumWeightsL0 shall be set to NumRefIdxActive[0].

[0178] In another embodiment, as a third solution, the condition that the value of the variable NumRefIdxActive[0] must not be equal to or less than the value of NumWeightsL0 is changed as follows.

[0179] If any of the following conditions are true, the value of NumRefIdxActive[0] is equal to Max(1,NumWeightsL0) Must be less than or equal to: If the value of pps_wp_info_in_ph_flag is 1, pps_weighted_pred_flag is 1, and sh_slice_type is P, The value of pps_wp_info_in_ph_flag is 1, pps_weighted_bipred_flag is 1, and sh_slice_type is the case of B.

[0180] A similar problem exists for Reference List 1. The value of the syntax element num_l1_weights is , 0 or more and Min(15, num_ref_entries[1][RplsIdx[1]]) or less. Therefore, it is possible to take the value 0. Next, if pps_weighted_bipred_flag is not 1, or if pps_wp_info_in_ph_flag is 1 and num_ref_entries[1][RplsIdx[1]] is 0, the variable NumWeightsL1 is set to 0. In other words, if the weighted prediction of bidirectional prediction is not performed in a B slice, or if the weighted prediction information pred_weight_table exists in the picture header but the number of reference pictures in the reference list 1 is 0 (in the case of a P slice), the variable NumWeightsL1 is set to 0. Note that under this condition, the syntax element num_l1_weights is not coded or decoded. If the above condition is not met, and pps_wp_info_in_ph_flag is equal to 1, the value of the variable NumWeightsL1 is set equal to num_l1_weights. That is, if the syntax element num_l1_weights is encoded or decoded, the value of the variable NumWeightsL1 is set equal to num_l1_weights. If none of the above conditions are met, the variable NumWeightsL1 is set to the value of the variable NumRefIdxActive[1].

[0181] When pps_wp_info_in_ph_flag is 1, pps_weighted_bipred_flag is 1, and sh_slice_type is B, the value of the variable NumRefIdxActive[1] must be less than or equal to the value of NumWeightsL1.

[0182] pps_wp_info_in_ph_flag has a value of 1, pps_weighted_bipred_flag has a value of 1, and sh_slice_type The syntax element num_l1_weights is encoded and decoded when the value of num_l1_weights is B. Therefore, when the value of num_l1_weights is 0, the value of the variable NumWeightsL1 is 0, and the value of the variable NumRefIdxActive[1] must also be set to 0.

[0183] However, for B slices, both NumRefIdxActive[0] and NumRefIdxActive[1] must be greater than 0. In other words, if the value of NumRefIdxActive[1] is 0, there is no reference picture in reference list 1, and coding and decoding are not possible. Therefore, if num_l1_weights is explicitly set to 0, the variable NumWeightsL1 will always be 0, and NumRefIdxActive[1] will also be 0, It is clear that encoding and decoding are not possible.

[0184] Therefore, in this embodiment, as a fourth solution, the value of the syntax element num_l1_weights is Change the range of the syntax element num_l1_weights so that the value is in the range of 1 to Min(15,num_ref_entries[1][RplsIdx[1]]).

[0185] In another embodiment, as a fifth solution, the variable NumWeightsL1 is set as follows: Change the code as follows:

[0186] if(!pps_weighted_bipred_flag || (pps_wp_info_in_ph_flag && num_ref_entries[1][RplsIdx[1]] == 0)) NumWeightsL1 = 0 else if(pps_wp_info_in_ph_flag) NumWeightsL1 = Max(1, num_l1_weights) else NumWeightsL1 = NumRefIdxActive[1] When the syntax element num_l1_weights is encoded and decoded, the variable NumWeightsL1 is set equal to Max(1, num_l1_weights).

[0187] In addition, in another embodiment, as a sixth solution, the condition that the value of the variable NumRefIdxActive[1] must not be equal to or less than the value of NumWeightsL1 is changed as follows.

[0188] Regarding the value of the variable NumRefIdxActive[1], when pps_wp_info_in_ph_flag is 1, pps_weighted_bipred_flag is 1, and sh_slice_type is B, the value of NumRefIdxActive[1] must be less than or equal to the value of Max(1, NumWeightsL1).

[0189] By configuring it like this, even though you can specify 0 as the number of weights in weight prediction, However, if 0 is specified, the problem of being unable to encode or decode is solved. Cut.

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

[0191] (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 may be realized by a CPU. This may be realized in software using a Central Processing Unit (Central Processing Unit).

[0192] 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. [Industrial Applicability]

[0193] 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]

[0194] 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 3091 Motion Compensation Unit 3092 Composite section 30921 IntraInter synthesis section 30922 GPM synthesis section 30923 BDOF section 30924 Weight Prediction 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. From the encoded data, decode the number of reference pictures in the reference picture list and the number of weights in the reference picture list. Here, the number of weights in the reference picture list is set to a value in the range of 1 or more and less than or equal to the upper limit, and the upper limit is the minimum value between 15 and the number of reference pictures. Depending on the number of weights, a flag indicating whether a weight coefficient and offset value exist for each index of the reference picture list is decoded. If the value of the flag is true, the weight coefficient and the offset value are decoded. A motion image decoding device having a weight prediction unit that generates a predicted image using an interpolated image of a reference picture, the weight coefficients, and the offset values.

2. Encode the number of reference pictures in the reference picture list and the number of weights in the reference picture list, The number of weights in the aforementioned reference picture list is set to a value within the range of 1 or more and less than or equal to the upper limit, where the upper limit is the minimum value between 15 and the number of the aforementioned reference pictures. Depending on the number of weights, a flag is encoded to indicate whether a weight coefficient and offset value exist for each index of the reference picture list. If the value of the flag is true, encode the weight coefficient and the offset value. A motion image encoding device having a weight prediction unit that generates a predicted image using an interpolated image of a reference picture, the weight coefficients, and the offset values.

3. A computer-readable recording medium that records a program causing a computer to perform the steps of generating a predicted image using an interpolated image of a reference picture, weight coefficients, and offset values, The weight coefficient and the offset value are analyzed if the value of the flag indicating whether or not a weight coefficient and an offset value exist for each index of the reference picture list is true. The aforementioned flag is parsed according to the number of weights in the reference picture list, A computer-readable recording medium wherein the number of weights in the reference picture list is set to a value in the range of 1 or more and less than or equal to an upper limit, the upper limit being the minimum value between 15 and the number of reference pictures in the reference picture list.