Video image decoding device and image encoding device
The video decoding and encoding devices address the ambiguity in executing PROF and Triangle prediction by using affine prediction and optical flow refinement, ensuring efficient execution without efficiency loss.
Patent Information
- Application Number
- JP2024129887
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2039-09-19
AI Technical Summary
The relationship between PROF (Prediction Refinement with Optical Flow) and Triangle prediction methods in video encoding is unclear, leading to ambiguity on whether they can be executed concurrently or how to distinguish between them.
A video decoding device and encoding device that includes an affine prediction unit to derive affine prediction parameters from motion vectors, incorporating a PROF unit for refining predicted images using optical flow, with clipping within a fixed value independent of pixel bit length, allowing exclusive or simultaneous execution of these prediction methods.
Enables exclusive or simultaneous execution of PROF and Triangle prediction without reducing encoding efficiency, enhancing video decoding and encoding processes.
Smart Images

Figure 2024149704000001_ABST
Abstract
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 the 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 High-Efficiency Video Coding (HEVC).
[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] Non-Patent Document 1 is an example of a recent video encoding and decoding technology. Non-Patent Document 1 describes a number of merge predictions, one of which is triangle prediction, in which a target block is divided into triangular regions and different inter predictions are performed for each region. Dividing the target block into shapes other than rectangular allows for more accurate prediction even for complex textures, improving encoding efficiency. [Prior art documents] [Non-patent literature]
[0007] [Non-Patent Document 1] "Versatile Video Coding (Draft 6)", JVET-O2001-vE, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11 Summary of the Invention [Problem to be solved by the invention]
[0008] Non-Patent Document 1 discloses the techniques of PROF (Prediction Refinement with Optical Flow), Triangle prediction, and Weighted Prediction. However, the relationship between the two prediction methods, PROF and Weighted Prediction, and Triangle Prediction and Weighted Prediction, is not clear, and there is a problem in that it is not clearly defined whether they can be executed simultaneously, or if not, how they should be distinguished from each other when executed.
[0009] The present invention has been made in view of the above problems, and an object of the present invention is to provide a video decoding device, an image coding device, and a predicted image generating method that realize a method of exclusively executing one of two prediction methods, or a method of simultaneously executing two prediction methods. be. [Means for solving the problem]
[0010] A video decoding device according to one aspect of the present invention includes an affine prediction unit that derives affine prediction parameters from motion vectors of a plurality of control points, and further includes a prediction refinement with optical flow (PROF) unit that receives a motion vector difference array derived from the affine prediction parameters and a predicted image array derived from the affine prediction parameters and derives predicted sample values from the motion vector difference array and the predicted image array, the motion vector difference array being The clipping is performed within a range using a fixed value that is independent of the pixel bit length.
[0011] A video coding apparatus according to an aspect of the present invention includes an affine prediction unit that derives affine prediction parameters from motion vectors of a plurality of control points, and further includes a prediction refinement with optical flow (PROF) unit that receives a motion vector difference array derived from the affine prediction parameters and a predicted image array derived from the affine prediction parameters and derives predicted sample values from the motion vector difference array and the predicted image array. The motion vector difference array is The image is characterized in that it is clipped within a range using a fixed value that is independent of the pixel bit length. Effect of the Invention
[0012] According to one aspect of the present invention, it is possible to provide a video decoding device, an image coding device, and a predicted image generation method that realize a method of exclusively executing one of two prediction methods, or a method of simultaneously executing two prediction methods, without reducing coding efficiency. [Brief description of the drawings]
[0013] [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, where (a) shows the transmitting device equipped with the video encoding device, and (b) shows 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, where (a) shows the configuration of a recording device equipped with a video encoding device, and (b) shows the configuration of a playback device equipped with a video decoding device. [Figure 4] FIG. 2 is a diagram showing a hierarchical structure of data in an encoded stream. [Diagram 5] FIG. 13 is a diagram illustrating an example of division of a CTU. [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] FIG. 13 is a schematic diagram showing a configuration of an inter-prediction parameter derivation unit. [Figure 10] 1 is a schematic diagram showing the configuration of a merge prediction parameter derivation unit and an AMVP prediction parameter derivation unit. [Figure 11] A diagram showing affine prediction motion vectors spMvLX[xi][yi]. [Figure 12] FIG. 2 is a schematic diagram showing a configuration of a PROF unit. [Figure 13] FIG. 13 is a diagram for explaining application conditions of PROF processing. [Figure 14] FIG. 13 is a schematic diagram showing a configuration of an inter-prediction image generating unit. [Figure 15] FIG. 1 is a block diagram showing a configuration of a video encoding device. [Figure 16] 13 is a schematic diagram showing a configuration of an inter-prediction parameter encoding unit. [Figure 17] FIG. 13 is a diagram for explaining triangle prediction. [Figure 18] FIG. 2 is a diagram illustrating a configuration of a triangle synthesis unit according to the present embodiment. [Figure 19] FIG. 13 is a diagram for explaining the syntax of coding parameters for weighted prediction. [Figure 20] FIG. 13 is a diagram for explaining the syntax of coding parameters for weighted prediction. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] (First embodiment) Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0015] FIG. 1 is a schematic diagram showing the configuration of an image transmission system 1 according to this embodiment.
[0016] The image transmission system 1 is a system that transmits an encoded stream obtained by encoding a target image, decodes the transmitted encoded stream, and displays an image. The image transmission system 1 includes a video encoding device (image encoding device) 11, a network 21, a video decoding device (image decoding device) 31, and a video display device (image display device) 41.
[0017] An image T is input to the video encoding device 11 .
[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 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, and 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).
[0019] The moving image decoding device 31 decodes each of the encoded streams Te transmitted by the network 21 and generates one or more decoded images Td that have been decoded.
[0020] The moving image display device 41 displays all or part of the one or more decoded images Td generated by the moving image decoding device 31. The moving image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display. Examples of the form of the display include a stationary type, a mobile type, and an HMD. Also, when the moving image decoding device 31 has high processing power it displays an image with high image quality, and when it has only lower processing power, it displays an image that does not require high processing power or display capabilities.
[0021] <Operator> The operators used in this specification are described below.
[0022] >> is a right bit shift, << is a left bit shift, & is a bitwise AND, and | is a bitwise OR |= is an OR assignment operator, and || indicates a logical OR.
[0023] x?y:z is a ternary operator that takes y when x is true (non-zero) and z when x is false (0).
[0024] Clip3(a, b, c) is a function that clips c to a value between a and b, inclusive. When c < a, it returns a and when c > b, it returns b, and in other cases it returns c (where a <= b).
[0025] abs(a) is a function that returns the absolute value of a.
[0026] Int(a) is a function that returns the integer value of a.
[0027] floor(a) is a function that returns the largest integer less than or equal to a.
[0028] ceil(a) is a function that returns the smallest integer greater than or equal to a.
[0029] a / d represents the division of a by d (truncated to an integer).
[0030] <Structure of the coding stream Te> Before describing in detail the video encoding device 11 and the video decoding device 31 according to this embodiment, the data structure of the encoded stream Te generated by the video encoding device 11 and decoded by the video decoding device 31 will be described.
[0031] FIG. 4 is a diagram showing a hierarchical structure of data in the coded stream Te. The frame Te illustratively includes a sequence and a number of pictures constituting the sequence. (a) to (f) of FIG. 4 respectively show a coded video sequence that defines a sequence SEQ, a coded picture that defines a picture PICT, a coded slice that defines a slice S, and a slice data. FIG. 13 is a diagram showing coded slice data defining data, coding tree units included in the coded slice data, and coding units included in the coding tree units.
[0032] (Coded Video Sequence) In the case of a coded video sequence, a video decoder is used to decode the sequence SEQ to be processed. The standard specifies a set of data to be referenced by the device 31. As shown in Fig. 4, the sequence SEQ includes a video parameter set, a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), an adaptation parameter set (APS), a picture PICT, and supplemental enhancement information SEI (Supplemental Enhancement Information).
[0033] The video parameter set VPS is used to determine the number of layers of a video image. A set of coding parameters common to multiple video images and a set of coding parameters related to multiple layers and individual layers included in the video images are defined.
[0034] The sequence parameter set SPS is used to decode the target sequence. A set of coding parameters to be referenced by the PPS is specified. For example, the width and height of a picture are specified. Note that there may be multiple SPSs. In that case, one of the multiple SPSs can be selected from the PPS. Select .
[0035] 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 video decoding device 31 is specified. For example, the reference value of the quantization width (pic_init_qp_minus26) used in decoding a picture and the application of weighted prediction are specified. A flag (weighted_pred_flag) is included to indicate whether the PPS is to be used. Note that multiple PPSs may exist. In this case, one of multiple PPSs is selected from each picture in the target sequence.
[0036] (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 slices 0 to NS-1 (NS is the total number of slices included in the picture PICT).
[0037] In the following, when there is no need to distinguish between slices 0 to NS-1, the code The same applies to other data to which subscripts are added that are included in the coded stream Te described below.
[0038] (Coded Slice) In the case of the coded slice, the video decoding device 31 refers to the slice S to be processed in order to decode the slice S. As shown in Figure 4, a slice consists of a slice header, and includes slice data.
[0039] 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.
[0040] Slice types that can be specified by the slice type specification information include (1) an I slice that uses only intra prediction during encoding, (2) a P slice that uses unidirectional prediction or intra prediction during encoding, and (3) a B slice that uses unidirectional prediction, bidirectional prediction, or intra prediction during encoding. Note that inter prediction is not limited to uni-prediction or bi-prediction, and a predicted image may be generated using more reference pictures. Hereinafter, P When called a B slice, it is a slice that includes blocks that can use inter prediction. This refers to the s.
[0041] In addition, the slice header may include a reference to a picture parameter set PPS (pic_parameter_set_id).
[0042] (Encoded slice data) The coded slice data defines a set of data to be referenced by the video decoding device 31 in order to decode the slice data to be processed. As shown in FIG. 4(d), the slice data includes a CTU. The CTU is a block of a fixed size (e.g., 64x64) that constitutes a slice. and is sometimes called the Largest Coding Unit (LCU).
[0043] (coding tree unit) 4 specifies a set of data to be referenced by the video decoding device 31 in order to decode a CTU to be processed. The CTU is encoded by recursive quad tree (QT) partitioning, binary tree (BT) partitioning, or ternary tree (TT) partitioning. The image is divided into coding units (CU), which are the basic units of processing. BT division and TT division are collectively called multi-tree division (MT (Multi Tree) division). A node in the tree structure obtained by recursive quadtree division is called a coding node. The intermediate nodes of the tree are coding nodes, and the CTU itself is also defined as the top coding node. will be done.
[0044] The CT includes, as CT information, a CU split flag (split_cu_flag) indicating whether or not to perform CT splitting, a QT split The flags include a QT split flag (qt_split_cu_flag) indicating whether or not to split the MT, an MT split direction (mtt_split_cu_vertical_flag) indicating the split direction of the MT, and an MT split type (mtt_split_cu_binary_flag) indicating the split type of the MT. split_cu_flag, qt_split_cu_flag, mtt_split_cu_vertical_flag, and mtt_split_cu_binary_flag are transmitted for each encoding node.
[0045] If split_cu_flag is 1 and qt_split_cu_flag is 1, the coding node is divided into four coding nodes. The data is divided into four parts (Figure 5(b)).
[0046] If split_cu_flag is 0, the coding node is not split and has one CU as a node ( Figure 5(a)). CU is the terminal node of the coding node and is not divided any further. CU is the basic unit of coding process.
[0047] If split_cu_flag is 1 and qt_split_cu_flag is 0, the encoding node performs MT as follows: When mtt_split_cu_binary_flag is 1, if mtt_split_cu_vertical_flag is 0, the coding node is split horizontally into two coding nodes (Figure 5(d)), and if mtt_split_cu_vertical_flag is 1, the coding node is split vertically into two coding nodes (Figure 5(c)). Also, when mtt_split_cu_binary_flag is 0, the coding node is split horizontally into three coding nodes (Fig. 5(f)) if mtt_split_cu_vertical_flag is 0, and the coding node is split vertically into three coding nodes (Fig. 5(e)) if mtt_split_cu_vertical_flag is 1. These are shown in Fig. 5(g).
[0048] 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.
[0049] (Encoding Unit) FIG. 4 shows data to be referenced by the video 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 conversion parameters. The CU header includes information such as a prediction mode, a quantized transformation coefficient, and the like.
[0050] 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.
[0051] 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).
[0052] 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.
[0053] (Prediction parameters) The predicted image is derived from prediction parameters associated with the block, which include intra-prediction and inter-prediction parameters.
[0054] 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.
[0055] Syntax elements for deriving inter prediction parameters include, for example, an affine flag affine_flag used in the merge mode, a merge flag merge_flag, a merge index merge_idx, an MMVD flag mmvd_flag, and an index for selecting a reference picture used in the AMVP mode. Inter prediction identifier inter_pred_idc, reference picture index refIdxLX, predicted vector index mvp_LX_idx for deriving a motion vector, difference vector mvdLX, motion vector There is a rule precision mode amvr_mode.
[0056] (Reference picture list) The reference picture list is a list of reference pictures stored in the reference picture memory 306. FIG. 6 is a conceptual diagram showing an example of a reference picture and a reference picture list. In FIG. 6(a), the rectangles are pictures, the arrows indicate the reference relationship of pictures, the horizontal axis is time, I, P, and B in the rectangles are intra-pictures, uni-predictive pictures, and bi-predictive pictures, respectively, and the numbers in the rectangles indicate decoding. 6(b) shows an example of a reference picture list for picture B3 (target picture). A reference picture list is a list indicating candidates for reference pictures, and one picture (slice) may have one or more reference picture lists. In the example shown in the figure, the target picture B3 has two reference picture lists, an L0 list RefPicList0 and an L1 list RefPicList1. In each CU, the picture in the reference picture list RefPicListX (X=0 or 1) Which picture is actually referenced is specified by refIdxLX. The diagram shows an example where refIdxL0=2 and refIdxL1=0. Note that LX is a description method used when there is no distinction between L0 prediction and L1 prediction, and hereafter, parameters for the L0 list and parameters for the L1 list will be distinguished by replacing LX with L0 and L1.
[0057] (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.
[0058] The inter_pred_idc is a value indicating the type and number of reference pictures, and takes one of the values PRED_L0, PRED_L1, and PRED_BI. PRED_L0 and PRED_L1 are managed by the L0 list and the L1 list, respectively. PRED_BI is managed by the L0 list and the L1 list. 1 shows bi-prediction using two reference pictures.
[0059] merge_idx is the prediction parameter candidate (merge candidate) derived from the processed block. (comment) is to be used as a prediction parameter for the current block.
[0060] (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.
[0061] (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.
[0062] 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.
[0063] (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.
[0064] 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:
[0065] 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.
[0066] The video decoding device 31 includes an entropy decoding unit 301, a parameter decoding unit (prediction image decoding device ) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (prediction image generation device) 308, an inverse quantization and inverse transformation unit 311, and an addition unit 312, a prediction parameter The meter derivation unit 320 is also included. The image decoding device 31 may also be configured without including the loop filter 305 .
[0067] 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 CU decoding unit 3022 further includes a TU decoding unit 3024. These may be collectively referred to as a decoding module. The header decoding unit 3020 decodes parameter set information such as VPS, SPS, PPS, and APS, and slice headers (slice information) from the 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 extracts QP update information (quantization correction value) and quantized prediction error (residual_coding) from the encoded data when a prediction error is included in the TU. Decrypt.
[0068] The TU decoding unit 3024 decodes the QP update information and the quantized prediction error from the encoded data when the mode is other than the skip mode (skip_mode==0). More specifically, when skip_mode==0, the TU decoding unit 3024 decodes the 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, In this case, it is derived as 0.
[0069] The TU decoding unit 3024 decodes the index mts_idx indicating the transformation base from the encoded data. In addition, the TU decoding unit 3024 decodes an index stIdx indicating the use of a secondary transform and a transform base from the encoded data. When stIdx is 0, it indicates that a secondary transform is not applied, when it is 1, it indicates one of the transforms in a set (pair) of secondary transform bases, and when it is 2, it indicates that one of the above-mentioned pair is applied. The other transformation is shown below.
[0070] 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.
[0071] 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:
[0072] 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 .
[0073] In the following, we will describe an example in which CTU and CU are used as processing units, but this is not limiting. Alternatively, the processing may be performed in units of sub-CUs. and processing may be performed in units of blocks or sub-blocks.
[0074] The entropy decoding unit 301 performs entropy decoding on the encoded stream Te input from the outside. Entropy coding is performed to decode individual codes (syntax elements). There are two types of entropy coding: one is to use a context (probability model) that is adaptively selected according to the type of syntax element and the surrounding circumstances to variable-length code the syntax elements, and the other is to use a predefined table or formula to variable-length code the syntax elements. The former, CABAC (Context Adaptive Binary Arithmetic Coding), uses the CABAC state (dominant The symbol type (0 or 1) and the probability state index (pStateIdx) that specifies the probability are stored 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 elements 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 without context are decoded with equal probability (EP, bypass) and are used for ctxInc derivation and CABAC. The decoded syntax elements include prediction information for generating a predicted image and prediction error for generating a difference image.
[0075] 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, etc. Control of which code to decode is performed based on an instruction from the parameter decoding unit 302.
[0076] (Basic flow) FIG. 8 is a flowchart illustrating a schematic operation of the video decoding device 31.
[0077] (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.
[0078] (S1200: Decode slice information) The header decoding unit 3020 decodes slice header information from the encoded data. Decode (slice information).
[0079] Hereinafter, the video decoding device 31 performs steps S1300 to S5000 for each CTU included in the target picture. By repeating the above process, a decoded image of each CTU is derived.
[0080] (S1300: Decode CTU Information) The CT information decoding unit 3021 decodes the CTU from the encoded data.
[0081] (S1400: Decode CT Information) The CT information decoding unit 3021 decodes the CT from the encoded data.
[0082] (S1500: CU Decoding) The CU decoding unit 3022 performs S1510 and S1520 to decode the CU from the encoded data. Issued.
[0083] (S1510: Decode CU information) The CU decoding unit 3022 decodes CU information, prediction information, and TU division from the encoded data. The flag split_transform_flag, the CU residual flags cbf_cb, cbf_cr, cbf_luma, etc. are decoded.
[0084] (S1520: Decode TU information) When a TU includes a prediction error, the TU decoding unit 3024 decodes the encoded TU information. The QP update information, quantized prediction error, and transformation index mts_idx are decoded from the data. The P update information is based on the quantization parameter prediction value qPpred, which is the predicted value of the quantization parameter QP. This is the difference value.
[0085] (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.
[0086] (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.
[0087] (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.
[0088] (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.
[0089] (Configuration of inter-prediction parameter derivation unit) The inter-prediction parameter derivation unit 303 refers to the prediction parameters stored in the prediction parameter memory 307 based on the syntax elements input from the parameter decoding unit 302, and derivates the inter-prediction parameters. The inter prediction parameter derivation unit 303 and the inter prediction parameter derivation unit 304 output the inter prediction parameters to the inter prediction image generation unit 309 and the prediction parameter memory 307. The 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 may be collectively referred to as a motion vector derivation unit (motion vector derivation device). An example of the inter prediction parameter derivation unit 303 is shown in FIG.
[0090] 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.
[0091] 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.
[0092] When triangleFlag is 1, that is, when it indicates a triangle prediction mode, the triangle prediction unit 30377 derives triangle prediction parameters.
[0093] If merge_flag is 1, i.e., it indicates merge prediction mode, derive merge_idx and The resultant signal is output to the prediction parameter derivation unit 3036.
[0094] 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.
[0095] (MV addition section) The MV adder 3038 adds the derived mvpLX and mvdLX to derive mvLX.
[0096] (Affine prediction part) The affine prediction unit 30372 performs the following steps: 1) estimating two control points CP0 and CP1 of the target block, or estimating three control points CP1 and CP2 of the target block; 2) Derive the motion vectors of the control points CP0, CP1, and CP2, and 3) derive the affine prediction parameters of the target block. 3) derive a motion vector for each subblock from the affine prediction parameters. do.
[0097] In the case of merge affine prediction, the motion vectors cpMvLX[] of each control point CP0, CP1, CP2 are derived from the motion vectors of the adjacent blocks of the target block. The motion vectors of the control points CP0, CP1, and CP2 derived from the motion vector of the block and the coding The cpMvLX[] of each control point is derived from the sum of the difference vector mvdCpLX[] derived from the data.
[0098] FIG. 11 shows the motion vectors spMvLX of each sub-block constituting the target block (cbWidth*cbHeight) as the motion vector cpMvLX[0] of control point CP0, the motion vector cpMvLX[1] of CP1, the motion vector cpMvLX[2] of CP2, FIG. 1 shows an example of how spMvLX is derived from the vector cpMvLX[2]. The motion vector is derived from the point (xPosCb, yPosCb) located at the center of the block.
[0099] The affine prediction unit 30372 calculates affine prediction parameters for the target block from the motion vectors of the control points. Derive meter(mvScaleHor, mvScalerVer, dHorX, dHorY, dVerX, dVerY).
[0100] mvScaleHor = cpMvLX[0][0] << 7 mvScaleVer = cpMvLX[0][1] << 7 dHorX = (cpMvLX[1][0] - cpMvLX[0][0]) << (7-log2CbW) dVerX = (cpMvLX[1][1] - cpMvLX[0][1]) << (7-log2CbW) If numCpMv==3, dHorY = (cpMvLX[2][0] - cpMvLX[0][0]) << (7 - log2CbH) dVerY = (cpMvLX[2][1] - cpMvLX[0][1]) << (7 - log2CbH) If numCpMv != 3, dHorY = - dVerX dVerY = dHorX Here, log2CbW and log2CbH are the logarithmic values of the width cbWidth and height cbHeight of the target block. do.
[0101] The affine prediction unit 30372 predicts the affine prediction parameters of the target block based on the affine prediction parameters of the target block. Derive the locked spMvLX[i][j] (i=0,1,2,...,(cbWidth / sbWidth)-1, j=0,1,2,...,(cbHeight / sbHeight)-1) using the following formula.
[0102] 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.
[0103] 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, sbWidth and sbHeight are the width and height of the current subblock.
[0104] Furthermore, at the top left coordinate (xSb, ySb) of the subblock, spMvLX[i][j] is assigned to the corresponding mvLX in the screen, where x = 0..sbWidth-1, y = 0..sbHeight-1.
[0105] mvLX[xSb + x][yXb + y] = spMv[i][j] (PROF) PROF (Prediction Refinement with Optical Flow) is a method to refine the pixel level based on the pixel gradient information. This method calculates Bell's optical flow to correct affine prediction at the subblock level.
[0106] The specific processing performed by the BIO unit 30954 will be described with reference to FIG. 12. The BIO 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 bidirectional predicted image generating unit 309545. The BIO unit 30954 generates a predicted image from the interpolated image received from the motion compensation unit 3091 and the inter prediction parameters received from the inter prediction parameter decoding unit 303, and outputs the predicted image to the adder 312. The process of deriving the motion compensation correction value bdofOffset (motion compensation corrected image) from the gradient image and correcting and deriving PredL0 and PredL1 is called a bidirectional gradient change process.
[0107] First, the variable cbProfFlagLX indicating the application condition of PROF is derived as follows.
[0108] cbProfFlagLX is set to FALSE if one or more of the following conditions are true:
[0109] numCpMv is equal to 2, cpMvLX[1][0] is equal to cpMvLX[0][0], and cpMvLX[1][1] is equal to cpMvLX[0][1].
[0110] numCpMv is equal to 3, cpMvLX[1][0] is equal to cpMvLX[0][0], cpMvLX[1][1] is equal to cpMvLX[0][1] and cpMvLX[2][0] is equal to cpMvLX[0][0], and cpMvLX[2][1] is equal to cpMvLX[0][1].
[0111] In general, in order to obtain optical flow, it is assumed that the luminance is constant. However, in Non-Patent Document 1, this assumption is not taken into consideration in the application conditions of PROF. Therefore, in this embodiment, the conditions for setting cbProfFlagLX to FALSE are as follows: In addition to the conditions above, bcwIdx[xCb][yCb] is not 0. (It is not the default weighting coefficient.) luma_weight_lX_flag[refIdxLX] is 1. (Weighting coefficients for weighted prediction are applied. ) (Note that X is 0 for L0 prediction and 1 for L1 prediction.) This allows the adoption of prediction methods that deal with brightness fluctuations (BCW prediction and weighted prediction). If the PROF option is used, the problem can be solved by adding a condition that PROF is not selected.
[0112] Otherwise, cbProfFlagLX is set to TRUE.
[0113] 13 is a flow chart for explaining the process of this embodiment. In FIG. 13(a), after the affine prediction process (S2001), it is checked whether BcwIdx[xCb][yCb] is 0 (S2002). If Yes, the PROF FIG. 13B shows an example in which, after the affine prediction process (S2004), it is checked whether luma_weight_lX_flag[refIdxLX] is 1 (S2005), and if it is Yes, the PROF process is skipped, and if it is No, the PROF process (S2006) is executed. This shows an example of executing the above.
[0114] If cbProfFlagLX is TRUE, the motion vector difference array diffMv is derived as follows.
[0115] First, the variables sbWidth, sbHeight, dmvLimit, posOffsetX and posOffsetY are as follows: It is derived as follows.
[0116] sbWidth = cbWidth / numSbX sbHeight = cbHeight / numSbY dmvLimit = 1 << Max(6, BitDepthY - 6) posOffsetX = 6 * dHorX + 6 * dVerX posOffsetY = 6 * dHorY + 6 * dVerY For x = 0..sbWidth - 1 and y = 0..sbHeight - 1, apply the following:
[0117] diffMv[x][y][0] = x *(dHorX << 2)+ y *(dVerX << 2)- posOffsetX diffMv[x][y][1] = x *(dHorY << 2)+ y *(dVerY << 2)- posOffsetY Furthermore, for i = 0..1, diffMv[x][y][0] =(diffMv[x][y][0] + 64 -(diffMv[x][y][0] >= 0))>> 7 diffMv[x][y][1] =(diffMv[x][y][1] + 64 -(diffMv[x][y][1] >= 0))>> 7 The values of diffMv[x][y][i] are clipped as follows:
[0118] diffMv[x][y][i] = Clip3(-dmvLimit, dmvLimit-1, diffMv[x][y][i]) Using the diffMV thus obtained, the optical flow at the pixel level is calculated based on the gradient information of the affine prediction at the subblock level, and the predicted sample value is corrected at the pixel level.
[0119] In addition, in Non-Patent Document 1, the variable dmvLimit, which indicates the range in which the diiffMV value is clipped, is set to 1. << Max(6, BitDepthY - 6) is set, but the range of the motion vector is actually the pixel This value should not depend on the bit length. Also, there is a problem that the accuracy of the calculation of the predicted sample, which will be described later, exceeds 16 bits. Therefore, in this embodiment, dmvLimit = 32 Or, dmvLimit = 16 The above fixed value will be used.
[0120] Next, two variables sbWidth and sbHeight that specify the width and height of the current subblock, a predicted sample array predSamples of (sbWidth + borderExtension)*(sbHeight + borderExtension), and a motion vector difference array diffMv of (sbWidth * sbHeight) are input. The variable shift1 is set to 6.
[0121] If x = 0..sbWidth-1, y = 0..sbHeight-1, then the next ordered step is Applies. - The variables gradientH[x][y] and gradientV[x][y] used to calculate the gradient are derived as follows:
[0122] gradientH[x][y] =(predSamples[x + 2][y] >> shift1) -(predSamples[x][y] >> shift1) gradientV[x][y] =(predSamples[x][y + 2] >> shift1) -(predSamples[x][y] >> shift1) The variable dI is derived as follows.
[0123] dI = gradientH[x][y] * diffMv[x][y][0] + gradientV[x][y] * diffMv[x][y][1] The predicted sample value at position (x, y) in the subblock is derived as follows, and a (sbWidth) x (sbHeight) array pbSamples of the predicted sample values is output.
[0124] pbSamples[x][y] = predSamples[x + 1][y + 1] +((dI + 1)>> 1) (Merge prediction) FIG. 10A 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 the merge candidate includes prediction parameters (predFlagLX, mvLX, refIdxLX, bcwIdx) 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.
[0125] The merge candidate derivation unit 30361 directly extracts the motion vector and refIdxLX of the decoded adjacent block. In addition, the merging candidate derivation unit 30361 uses the spatial Merge candidate derivation processes, temporal merge candidate derivation processes, pairwise merge candidate derivation processes, and zero merge candidate derivation processes may be applied.
[0126] As a spatial merge candidate derivation process, the merge candidate derivation unit 30361 predicts the spatial merge candidates according to a predetermined rule. The prediction parameters stored in the measurement parameter memory 307 are read out and set as merge candidates. The method of specifying the reference picture is, for example, prediction parameters related to each of the adjacent blocks within a predetermined range from the target block (for example, all or part of the blocks adjacent to the left A1, right B1, upper right B0, lower left A0, and upper left B2 of the target block). Each merge candidate is called A1, B1, B0, A0, and B2. Here, A1, B1, B0, A0, and B2 are motion information derived from blocks containing the following coordinates: Figure 10(b) shows the positions of A1, B1, B0, A0, and B2.
[0127] 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.
[0128] In the temporal merge derivation process, the merge candidate derivation unit 30361 calculates the prediction parameters of the block C in the reference image including the coordinates of the lower right CBR or the center of the target block from the prediction parameter memory. The merge candidates are read from memory 307 and stored as merge candidates Col in the merge candidate list mergeCandList[]. do.
[0129] 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[].
[0130] mvLXavgK[0] = (mvLXp0Cand[0]+mvLXp1Cand[0]) / 2 mvLXavgK[1] = (mvLXp0Cand[1]+mvLXp1Cand[1]) / 2 The merge candidate derivation unit 30361 determines whether refIdxLX is 0...M, and whether the X and Y components of mvLX are both 0. We derive zero merge candidates Z0, ..., ZM that correspond to the merge candidate set and store them in a merge candidate list.
[0131] The order of storing the mergeCandList[] is, for example, spatial merge candidates (A1, B1, B0, A0, B2), time The merge candidates Col, the pairwise candidates avgK, and the zero merge candidates ZK. The reference block (e.g., the block is intra-predicted) is not stored in the merge candidate list. i = 0 if( availableFlagA1 ) mergeCandList[ i++ ] = A1 if( availableFlagB1 ) mergeCandList[ i++ ] = B1 if( availableFlagB0 ) mergeCandList[ i++ ] = B0 if( availableFlagA0 ) mergeCandList[ i++ ] = A0 if( availableFlagB2 ) mergeCandList[ i++ ] = B2 if( availableFlagCol ) mergeCandList[ i++ ] = Col 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.
[0132] N = mergeCandList[merge_idx] Here, N is the label indicating the merge candidate, and takes 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, and bcwIdxN.
[0133] Selected (mvLXN[0], mvLXN[0]), predFlagLXN, refIdxLXN, bcwIdxN as the target block. The merge candidate selection unit 30362 selects the selected merge candidate as an inter prediction parameter of the next frame. The candidate inter-prediction parameters are stored in a prediction parameter memory 307, and the inter The predicted image is output to the predicted image generating unit 309.
[0134] (MMVD Prediction Section 30373) The MMVD prediction unit 30373 predicts the central vector mvpLX (merge candidate mvLX is obtained by adding mvdLX of a predetermined distance and a predetermined direction to the motion vector mvLX (complementary motion vector mvLXN). The MMVD prediction unit 30373 calculates the syntax element base_candidate_idx of the encoded data. The center vector mvLX[] is derived using the direction_idx, which indicates the index of the direction table. The difference vector mMvdLX[] is derived from distance_idx, which indicates the index of the distance table.
[0135] (Triangle forecast) In triangle prediction, as shown in Figure 17, the target block is divided into two parts using two types of diagonals. The image is divided into triangular prediction units (PU0, PU1). In the figure, (a) shows the division direction triangleDir=0, and (b) shows triangleDir=1. After the predicted images of PU0 and PU1 are generated, weighting processing is performed on the diagonal edges.
[0136] Operations other than prediction (eg, transformation and quantization) are applied to the entire block.
[0137] (Syntax Decoding) The on / off setting of triangle prediction and the parameters when it is on are notified in the encoded data as follows:
[0138] sps_triangle_enabled_flag is notified by the SPS and indicates whether or not the Triangle prediction mode is used in the target sequence. When sps_triangle_enabled_flag is 0, it indicates that the Triangle prediction mode is not used in the target sequence, and when sps_triangle_enabled_flag is 1, it indicates that the Triangle prediction mode is used in the target sequence.
[0139] (Motion information derivation process) The triangle prediction unit 30377 determines the merge indexes m and n of PU0 and PU1, the division method of the triangle prediction, Derive the directional triangleDir.
[0140] m = merge_triangle_idx0 n = merge_triangle_idx1 + (merge_triangle_idx1 >= m) ? 1 : 0 triangleDir = merge_triangle_split_dir In the following, we denote the merge candidate pointed to by merge index m as M, and the merge candidate pointed to by merge index n as M. The candidate is denoted as N.
[0141] The merge prediction parameter derivation unit 3036 derives the motion information (mvLXM, mvLXN, refIdxLXM, refIdxLXN, predFlagLXM, predFlagLXN, bcwIdxN) of the merge candidates M and N by the method described in (Merge Prediction). , bcwIdxN, mergeCandList, etc.) are derived. are used to set the motion vectors mvA and mvB, the reference indices refIdxA and refIdxB, and the prediction list flags predListFlagA and predListFlagB of PU0 and PU1.
[0142] mvA[0] = mvLXM[0] mvA[1] = mvLXM[1] refIdxA = refIdxLXM predListFlagA = X Here, the lowest 1 bit of m is set to X (m & 0x01). Note that if predFlagLXM is 0, X is set to (1-X).
[0143] mvB[0] = mvLXN[0] mvB[1] = mvLXN[1] refIdxB = refIdxLXN predListFlagB = X Here, the lowest 1 bit of n is set to X (n & 0x01). Note that if predFlagLXN is 0, X is set to (1-X).
[0144] These pieces of motion information are referenced to generate predicted images for PU0 and PU1.
[0145] (Derivation of weighting coefficients for triangle mode) The triangle prediction unit 30377 calculates the weighted prediction coefficients to be applied to the diagonal edge of the boundary between PU0 and PU1. The numbers are derived as follows, where nCbW=cbWidth and nCbH=cbHeight.
[0146] A variable nCbR that represents the shape of the target block is derived.
[0147] nCbR = (nCbW > nCbH) ? (nCbW / nCbH) : (nCbH / nCbW) When triangleDir is 0, the weighting coefficient wValue of the predicted pixel is derived as follows.
[0148] wValue = (nCbW > nCbH) ? (Clip3(0, 8, (x / nCbR - y) + 4)) : (Clip3(0, 8, (x - y / nCbR) + 4)) If triangleDir is 1, derive wValue as follows:
[0149] wValue = (nCbW > nCbH) ? (Clip3(0, 8, (nCbH - 1 - x / nCbR - y) + 4)) : (Clip3(0, 8, (nCbW - 1 - x - y / nCbR) + 4)) An example of wValue is shown in FIG.
[0150] (Triangle mode motion vector storage process) The triangle prediction unit 30377 performs the following steps to retrieve the PU0 and PU1 data so that they can be referenced in subsequent processing. Motion information is stored in memory in 4*4 sub-block units.
[0151] numSbX and numSbY are the numbers of 4*4 sub-blocks in the horizontal and vertical directions of the target block. Set numSbX = cbWidth >> 2, numSbY = cbHeight >> 2. minSb = min(numSbX, Set the number of SbY in the
[0152] Derive the block aspect ratio cbRatio.
[0153] cbRatio = (cbWidth > cbHeight) ? (cbWidth / cbHeight) : (cbHeight / cbWidth) For each position (xSbIdx, ySbIdx) of a 4*4 sub-block where xSbIdx = 0..numSbX - 1, ySbIdx = 0..numSbY - 1, the following process is performed.
[0154] Derive xIdx and yIdx using (xSbIdx, ySbIdx).
[0155] xIdx = (cbWidth > cbHeight) ? (xSbIdx / cbRatio) : xSbIdx yIdx = (cbWidth > cbHeight) ? ySbIdx : (ySbIdx / cbRatio) When triangleDir==0, the sType shown in FIG. 17(e) is derived as follows.
[0156] sType = (xIdx == yIdx) ? 2 : ((xIdx > yIdx) ? 0 : 1) When triangleDir==1, the sType shown in FIG. 17(f) is derived as follows.
[0157] sType = (xIdx + yIdx == minSb) ? 2 : ((xIdx + yIdx < minSb) ? 0 : 1) sType is a parameter that indicates whether each 4*4 sub-block is located in PU0, PU1, or the boundary between PU0 and PU1. sType=0 indicates that the 4*4 sub-block is located in PU0. sType=1 indicates that the 4*4 sub-block is located in PU1. sType=2 indicates that the 4*4 sub-block is located in the boundary between PU0 and PU1.
[0158] If sType==0, do the following:
[0159] When the prediction list flag of PU0 is 0 (predListFlagA==0), PU0 is treated as unidirectional prediction from L0, and when the prediction list flag of PU0 is not 0 (predListFlagA!=0), motion information is stored assuming that PU0 is treated as unidirectional prediction from L1.
[0160] predFlagL0 = (predListFlagA == 0) ? 1 : 0 predFlagL1 = (predListFlagA == 0) ? 0 : 1 refIdxL0 = (predListFlagA == 0) ? refIdxA : -1 refIdxL1 = (predListFlagA == 0) ? -1 : refIdxA mvL0[0] = (predListFlagA == 0) ? mvA[0] : 0 mvL0[1] = (predListFlagA == 0) ? mvA[1] : 0 mvL1[0] = (predListFlagA == 0) ? 0 : mvA[0] mvL1[1] = (predListFlagA == 0) ? 0 : mvA[1] Otherwise, if sType==1, or sType==2 and predListFlagA+predListFlagB!=1, then do the following: where predListFlagA+predListFlagB!=1 indicates that the reference picture lists of PU0 and PU1 are the same.
[0161] If the prediction list flag of PU1 is 0 (predListFlagB==0), PU1 is L0 predicted (unidirectional prediction). If the prediction list flag of PU1 is not 0 (predListFlagB != 0), PU1 is used for L1 prediction (unidirectional prediction). The motion information is stored as a time measurement.
[0162] predFlagL0 = (predListFlagB == 0) ? 1 : 0 predFlagL1 = (predListFlagB == 0) ? 0 : 1 refIdxL0 = (predListFlagB == 0) ? refIdxB : -1 refIdxL1 = (predListFlagB == 0) ? -1 : refIdxB mvL0[0] = (predListFlagB == 0) ? mvB[0] : 0 mvL0[1] = (predListFlagB == 0) ? mvB[1] : 0 mvL1[0] = (predListFlagB == 0) ? 0 : mvB[0] mvL1[1] = (predListFlagB == 0) ? 0 : mvB[1] Otherwise (sType==2 and predListFlagA+predListFlagB==1), do the following. Here, predListFlagA+predListFlagB==1 indicates that the reference picture lists of PU0 and PU1 are different.
[0163] If the prediction list flag for PU0 is 0 (predListFlagA == 0), bidirectional prediction is set with information for PU0 stored in L0 and information for PU1 stored in L1. If the prediction list flag for PU0 is not 0 (predListFlagA != 0), bidirectional prediction is set with information for PU1 stored in L0 and information for PU0 stored in L1.
[0164] predFlagL0 = 1 predFlagL1 = 1 refIdxL0 = (predListFlagA == 0) ? refIdxA : refIdxB refIdxL1 = (predListFlagA == 0) ? refIdxB : refIdxA mvL0[0] = (predListFlagA == 0) ? mvA[0] : mvB[0] mvL0[1] = (predListFlagA == 0) ? mvA[1] : mvB[1] mvL1[0] = (predListFlagA == 0) ? mvB[0] : mvA[0] mvL1[1] = (predListFlagA == 0) ? mvB[1] : mvA[1] (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 the skip flag skip_flag is 1, the DMVR unit 30375 performs a process of refining the mvLX of the target CU derived by the merge prediction unit 30374 based on the reference image. Specifically, the prediction parameters derived by the merge prediction unit 30374 are bi-predictive. When the motion vector is estimated, the motion vector is corrected using a predicted image derived from the motion vector corresponding to two reference pictures. The corrected mvLX is output to the inter-prediction image generating unit 309. are supplied to.
[0165] (AMVP Prediction) FIG. 10C 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 selects a vector candidate from the prediction parameter memory 307 based on refIdxLX. The prediction vector candidate is derived from the motion vector of the adjacent block that has already been decoded and stored in the prediction vector candidate list mvpListLX[ ].
[0166] The vector candidate selection unit 3034 selects the predicted vector candidate mvp_LX_idx from among the predicted vector candidates in mvpListLX[]. The vector candidate selection unit 3034 outputs the selected mvpLX to the MV addition unit 3038.
[0167] (MV addition section) The MV addition unit 3038 calculates mvLX by adding the mvpLX input from the AMVP prediction parameter derivation unit 3032 and the decoded mvdLX. The addition unit 3038 outputs the calculated mvLX to the inter predicted image generation unit 309. and outputs it to the prediction parameter memory 307.
[0168] mvLX[0] = mvpLX[0] + mvdLX[0] mvLX[1] = mvpLX[1] + mvdLX[1] (Motion Vector Scaling) A method of deriving the scaling of a motion vector will be described. A motion vector Mv (reference motion vector), a picture PicMv including a block having Mv, a reference picture PicMvRef of Mv, and a scaling vector are given. The motion vector sMv after the block is merged, the picture CurPic containing the block with sMv, and the reference block referenced by sMv. Assuming that the picture is CurPicRef, the derivative function of sMv, MvScale(Mv, PicMv, PicMvRef, CurPic, CurPicRef), is expressed by the following equation.
[0169] sMv = MvScale(Mv,PicMv,PicMvRef,CurPic,CurPicRef) = Clip3(-R1,R1-1,sign(distScaleFactor*Mv)*((abs(distScaleFactor*Mv)+round1-1)>>shift1)) distScaleFactor = Clip3(-R2,R2-1,(tb*tx+round2)>>shift2) tx = (16384+abs(td)>>1) / td td = DiffPicOrderCnt(PicMv,PicMvRef) tb = DiffPicOrderCnt(CurPic,CurPicRef) Here, round1, round2, shift1, and shift2 are round and shift values for performing division using reciprocals, for example, round1=1<<(shift1-1), round2=1<<(shift2-1), shift1=8, shift2=6, etc. DiffPicOrderCnt(Pic1,Pic2) is the time information (e.g., POC) of Pic1 and Pic2. This is a function that returns the difference between the two. R1 and R2 are used to limit the range of values in order to perform processing with limited precision. For example, R1 = 32768, R2 = 4096.
[0170] In addition, the scaling function MvScale(Mv, PicMv, PicMvRef, CurPic, CurPicRef) is expressed by the following formula: Good too.
[0171] MvScale(Mv,PicMv,PicMvRef,CurPic,CurPicRef) = Mv*DiffPicOrderCnt(CurPic,CurPicRef) / DiffPicOrderCnt(PicMv,PicMvRef) In other words, Mv may be scaled according to the ratio of the difference in time information between CurPic and CurPicRef to the difference in time information between PicMv and PicMvRef.
[0172] (Configuration of the intra prediction parameter derivation unit 304) The intra-prediction parameter derivation unit 304 derives intra-prediction parameters by referring to prediction parameters stored in a prediction parameter memory 307 based on an input from the parameter decoding unit 302. , for example, derive an intra prediction mode IntraPredMode. The unit 304 outputs the intra prediction parameters to a predicted image generation unit 308, and also stores them in a prediction parameter memory 307. The intra prediction parameter derivation unit 304 may derive different intra prediction modes for luma and chroma.
[0173] The loop filter 305 is a filter provided in the coding loop, and is used to remove block distortion and ringing. The loop filter 305 is a filter that removes distortion and improves image quality. The loop filter 305 applies a deblocking filter, a sample adaptive offset (SAO), and an adaptive filter to the decoded image of the CU generated by the adder 312. Apply a filter such as an automatic loop filter (ALF).
[0174] The reference picture memory 306 stores the decoded image of the CU in a predetermined Store it in position.
[0175] 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.
[0176] The predicted image generation unit 308 receives the parameters derived by the prediction parameter derivation unit 320. The predicted image generation unit 308 also reads a reference picture from the reference picture memory 306. The predicted image generation unit 308 generates a prediction image based on the parameters and the reference picture (reference picture A reference picture block (a reference block) is used to generate a predicted image of a block or sub-block. Here, a reference picture block is a set of pixels on a reference picture (usually rectangular, so called a block), and is an area to be referenced in order to generate a predicted image.
[0177] (Inter-prediction image generation unit 309) When predMode indicates an inter prediction mode, the inter prediction image generating unit 309 Using the inter-prediction parameters and the reference pictures input from the prediction parameter derivation unit 303, A predicted image of the block or sub-block is generated by inter prediction.
[0178] FIG. 14 is a schematic diagram showing a configuration of an inter-prediction image generating unit 309 included in the prediction image generating unit 308 according to this embodiment. The inter-prediction image generating unit 309 is a motion compensation unit (prediction image generating device). The synthesis unit 3095 includes an IntraInter synthesis unit 30951, a Triangle synthesis unit 30952, a BDOF unit 30954, a weighted prediction unit 3094, and a PROF unit 30955.
[0179] (Motion Compensation) The motion compensation unit 3091 (interpolated image generation unit 3091) receives the input from the inter prediction parameter derivation unit 303. Based on the input inter prediction parameters (predFlagLX, refIdxLX, mvLX), an interpolated image (motion compensated image) is generated by reading a reference block from the reference picture memory 306. The reference block is a block shifted by mvLX from the position of the target block on the reference picture RefPicLX specified by refIdxLX. If mvLX does not have integer precision, an interpolated image is generated by applying a filter called a motion compensation filter for generating pixels at decimal positions.
[0180] 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.
[0181] 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 cbWidth*cbHeight, x=0…cbWidth-1 , y=0...cbHeight-1, and MVPREC indicates the precision of mvLX (1 / MVPREC pixel precision), for example MVPREC=16.
[0182] 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).
[0183] 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).
[0184] 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 an interpolated image Pred[][] is generated from PredL0[][] and PredL1[][].
[0185] 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.
[0186] (IntraInter synthesis processing) The IntraInter synthesis unit 30951 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.
[0187] (Triangle synthesis processing) When MergeTriangleFlag is 1, the triangle synthesis unit 30952 generates a predicted image pbSamples.
[0188] In the following, pbSamples is a prediction block of size cbWidth*cbHeight. predSamplesLA and predSamplesLB are prediction images generated by the motion compensation unit 3091 using the motion information of PU0 and PU1. be.
[0189] The triangle synthesis unit 30952 generates pbSamples according to the triangleDir. In, weighted prediction processing is applied to the diagonal edge of the boundary between PU0 and PU1 using wValue according to the following equation:
[0190] pbSamples[x][y] = Clip3(0, (1 << bitDepth) - 1, (predSamplesLA[x][y] * wValue + predSamplesLB[x][y] * (8 - wValue) + offset1) >> shift1) Here, shift1 = Max(5, 17 - bitDepth) and offset1 = 1 << (shift1 - 1).
[0191] The problem with the above formula is that the value of shift1 is incorrect as a prediction formula. In this embodiment, the above problem is solved by using shift1 = Max(6, 18 - bitDepth) considering that the value of wValue is a maximum of 8.
[0192] Another problem with Non-Patent Document 1 is that it does not clearly state how to perform triangle synthesis processing when weighted prediction is applied. Triangle prediction is a merge mode, so it can only be switched on and off on a slice-by-slice basis. Therefore, the PPS If pps_weighted_pred_flag or pps_weighted_bipred_flag is 1, the triangle pred There are also methods that do not perform estimation, and methods that do not apply weighted prediction even if weighting coefficients exist in the case of triangle prediction. However, both methods have problems in terms of coding efficiency.
[0193] Therefore, in this embodiment, the following weighted prediction process is performed on the predicted images predSamplesLA and predSamplesLB, and then the triangle synthesis process is performed.
[0194] predSamplesLA[x][y] = Clip3(0,(1< <Max(14, bitDepth+2)-1, ((PredsampleLA[x][y]*w0+(1<<(log2WD-1))>>log2WD)+o0) predSamplesLB[x][y] = Clip3(0,(1< <Max(14, bitDepth+2)-1, ((PredsampleLB[x][y]*w1+(1<<(log2WD-1))>>log2WD)+o1) pbSamples[x][y] = Clip3(0, (1 << bitDepth) - 1, (predSamplesLA[x][y] * wValue + predSamplesLB[x][y] * (8 - wValue) + offset1) >> shift1) Here, shift1 = Max(6, 18 - bitDepth) and offset1 = 1 << (shift1 - 1).
[0195] In this way, by performing triangle synthesis processing after generating an interpolated image that has been subjected to weighted prediction processing in advance, triangle prediction can be performed efficiently even when the brightness fluctuates, such as in a faded image.
[0196] In another embodiment, a weighted prediction process described below is performed on two predicted images predSamplesLA and predSamplesLB according to refIdxA and refIdxB to generate a predicted image with a pixel bit length of bitDepth, and then a triangle synthesis process such as the one described below is performed.
[0197] pbSamples[x][y] = (predSamplesLA[x][y] * wValue + predSamplesLB[x][y] * (8 - wValue) + 4) >> 3 In this way, by generating a predicted image that has been subjected to weighted prediction processing in advance and then performing triangle synthesis processing, it is possible to efficiently perform triangle prediction even when the brightness fluctuates, such as in a faded image. In the above-mentioned method, it is necessary to specially generate an interpolated image that has been subjected to weighted prediction processing, but in the present embodiment, it is possible to perform triangle synthesis processing after normal weighted prediction processing.
[0198] 18 is a diagram for explaining the triangular synthesis unit 30952 of this embodiment, which receives motion compensation information from the motion compensation unit 3091 and outputs a predicted image to the addition unit 312. The triangular synthesis unit 30952 receives motion compensation information from the motion compensation unit 3091 and outputs a predicted image to the addition unit 312. The prediction image generator 309523 comprises an L0 weighted predicted image generator 309524, and a Triangle predicted image generator 309525. The predicted images predSamplesLA and predSamplesLB are associated with L0 prediction and L1 prediction, and default prediction or weighted prediction is selected depending on whether a weighting coefficient is present. After processing, the Triangle predicted image generator 309525 performs synthesis processing of the Triangle prediction.
[0199] (BDOF prediction) The BDOF unit 30954 generates two predicted images (a first predicted image and a second predicted image) in a bi-prediction mode. A predicted image is generated by referring to the predicted image) and the gradient correction term.
[0200] When the inter prediction parameter decoding unit 303 determines that the L0 prediction is unidirectional, the motion compensation unit 3091 generates PredL0[x][y]. The inter-prediction parameter decoding unit 303 determines that L1 is unidirectional prediction. On the other hand, if the inter prediction parameter decoding unit 303 determines that the mode is bi-prediction mode, the process proceeds to the following. If bdofAvailableFlag indicates TRUE, the BDOF unit 30954 executes BDOF processing to generate a bidirectional predicted image, and if it indicates FALSE, the synthesis unit 3095 generates a predicted image by normal bidirectional predicted image generation.
[0201] (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.
[0202] FIG. 19(a) shows an example of the syntax of sps_weighted_pred_flag and sps_weighted_bipred_flag in a Sequence Parameter Set (SPS).
[0203] sps_weighted_pred_flag equal to 1 indicates that weighted prediction is applied to the P slices referenced by the SPS. sps_weighted_pred_flag equal to 0 indicates that weighted prediction may be 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 may be applied to B slices that reference an SPS. Indicates that it does not apply.
[0204] FIG. 19(b) shows an example of the syntax of pps_weighted_pred_flag and pps_weighted_bipred_flag in the Picture Parameter Set (PPS).
[0205] pps_weighted_pred_flag equal to 0 means that weighted prediction is applied to the P slices that refer to the PPS. pps_weighted_pred_flag equal to 1 indicates that the PPS referenced Indicates that weighted prediction is applied to the rice. 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 not present, the value is set to 0.
[0206] pps_weighted_bipred_flag equal to 0 means that weighted prediction is used for B slices that refer to the PPS. pps_weighted_bipred_flag equal to 1 indicates that weighted prediction is applied to B slices that refer to the PPS. sps_weighted_bipred_flag equal to 0 indicates that weighted prediction is applied to B slices that refer to the PPS. When the weighted prediction unit 3094 detects the weighted bipred flag, the weighted prediction unit 3094 sets the value of the pps_weighted_bipred_flag to 0. If the pps_weighted_bipred_flag does not exist, the weighted prediction unit 3094 sets the value to 0.
[0207] FIG. 20 shows the Weighted prediction parameters syntax() of Non-Patent Document 1, which is called in the slice header. Here, when luma_weight_l0_flag[i] is 1, it indicates that there is a weighting coefficient for the luminance component of L0 prediction. When luma_weight_l0_flag[i] is 0, it indicates that there is a weighting coefficient for the luminance component of L0 prediction. Indicates that no weighting factor for the chroma prediction value for L0 prediction is present. If luma_weight_l0_flag[i] is not present, the weighting predictor 3094 infers it to be equal to 0. If chroma_weight_l0_flag[i] is 1, indicates that a weighting factor for the chroma prediction value for L0 prediction is present. If chroma_weight_l0_flag[i] is 0, chroma_weight_l0_flag[i] indicates that a weighting factor for the chrominance prediction value of the L1 prediction is not present. If chroma_weight_l0_flag[i] is not present, the weighting predictor 3094 infers that it is equal to 0. Similarly, if luma_weight_l1_flag[i] is 1, it indicates that a weighting factor for the luminance component of the L1 prediction is present. If luma_weight_l1_flag[i] is 0, it indicates that a weighting factor for the luminance component of the L1 prediction is not present. If luma_weight_l1_flag[i] is not present, the weighting predictor 3094 infers that it is equal to 0. If chroma_weight_l1_flag[i] is 1, it indicates that a weighting factor for the chrominance prediction value of the L1 prediction is present. If chroma_weight_l1_flag[i] is 0, it indicates that a weighting factor for the chrominance prediction value of the L1 prediction is not present. If chroma_weight_l1_flag[i] is not present, the weighting predictor 3094 infers that it is equal to 0.
[0208] In Non-Patent Document 1, the variable weightedPredFlag is derived as follows. If slice_type is equal to P, weightedPredFlag is set equal to pps_weighted_pred_flag defined in PPS. Else, if slice_type is equal to B, weightedPredFlag is set equal to pps_weighted_bipred_flag defined in PPS.
[0209] However, the above setting has a problem in that it is not possible to fully express the relationship between the combination of the prediction methods (DMVR, BDOF, PROF, BCW) defined in Non-Patent Document 1 and weighted prediction.
[0210] Therefore, in this embodiment, the weighted prediction unit 3094 derives the variable weightedPredFlag as follows. if slice_type is equal to P, set weightedPredFlag to (pps_weighted_pred_flag && ((cIdx == 0)? luma_weight_l0_flag [refIdxL0]:chroma_weight_l0_flag[refIdxL0])). else (slice_type equals B), set weightedPredFlag to (pps_weighted_bipred_flag && ((cIdx == 0) ? (luma_weight_l0_flag[refIdxL0] || luma_weight_l1_flag[refIdxL1]) : (chroma_weight_l0_flag[refIdxL0] || chroma_weight_l1_flag[refIdxL1])). 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.
[0211] If one of the prediction list usage flags (predFlagL0 or predFlagL1) is 1 (uniprediction) and weightedPredFlag is 0 (weighted prediction is not used), PredLX (LX is L0 or L1) is used. The following equation is processed to match the pixel bit depth (bitDepth).
[0212] pbSamples[x][y] = Clip3(0,(1<<bitDepth)-1,(PredLX[x][y]+offset1)> >shift1) Here, shift1=14-bitDepth and offset1=1<<(shift1-1).
[0213] 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 PredL0 and PredL1 and match them to the number of pixel bits.
[0214] 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).
[0215] Furthermore, when uni-prediction and weighted prediction are performed, the weighted prediction unit 3094 derives a weighted prediction coefficient w0 and an offset o0 from the encoded data, and performs processing according to the following equations.
[0216] pbSamples[x][y] = Clip3(0,(1< <bitDepth)-1, ((PredLX[x][y]*w0+(1<<(log2WD-1)))>>log2WD)+o0) Here, log2WD is a variable indicating a predetermined shift amount.
[0217] Furthermore, when bi-prediction PRED_BI and weighted prediction are performed, the weighted prediction unit 3094 derives weighted prediction coefficients w0, w1, o0, and o1 from the coded data, and performs processing according to the following equations.
[0218] pbSamples[x][y] = Clip3(0,(1< <bitDepth)-1,(PredL0[x][y]*w0+PredL1[x][y]*w1+((o0+o1+1)<<log2WD))> >(log2WD+1)) In addition, in Non-Patent Document 1, the syntax of the Reference picture list structure syntax is In the semantics of abs_delta_poc_st[listIdx][rplsIdx][i], the value of the variable AbsDeltaPocSt[listIdx][rplsIdx][i] is changed depending on the values of sps_weighted_pred_flag and sps_weighted_bipred_flag. However, because the Reference picture list structure syntax (ref_pic_list_struct) is called before sps_weighted_pred_flag and sps_weighted_bipred_flag are decoded in SPS, a problem occurs in which decoding cannot be performed correctly.
[0219] As an embodiment for solving the above problem and enabling correct decoding, -Inside the ref_pic_list_struct, prohibit the use of flags that turn tools on and off. · ref_pic_list_struct is decoded using PPS and slice header, not SPS. The ref_pic_list_struct must be decoded after the flag that turns the SPS tools on and off is decoded. Using either of the above methods will solve the above problem.
[0220] (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 for whether to use a prediction list, reference indices refIdxL0 and refIdxL1, and an index for BCW prediction. The BCW prediction process is performed using the input index bcw_idx and a variable cIdx that specifies the indexes of the luminance and chrominance components, and the predicted sample values of the (nCbW) x (nCbH) array pbSamples are output.
[0221] sps_bcw_enabled_flag, which indicates whether to use this prediction at the SPS level, is TRUE, and the two reference indexes If there is no weighted prediction coefficient in the reference pictures indicated by the indexes refIdxL0 and refIdxL1, and if the coding block is equal to or smaller than a certain size, the bcw_idx at the CU level is explicitly coded and decoded in the syntax, and the value is substituted for the variable bcwIdx. If bcw_idx does not exist, 0 is substituted for the variable bcwIdx.
[0222] If the variable bcwIdx is 0, the predicted sample values are derived as follows:
[0223] pbSamples[x][y] = Clip3(0, (1 << bitDepth)- 1, (predSamplesL0[x][y] + predSamplesL1[x][y] + offset2)>> shift2) Otherwise, if bcwIdx is not equal to 0, the following applies:
[0224] The variable w1 is set equal to bcwWLut[bcwIdx]. bcwWLut[k] = {4, 5, 3, 10, -2}. do.
[0225] The variable w0 is set to (8-w1), and the predicted sample values are derived as follows:
[0226] 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 the bcwIdx of each merge candidate. The merge candidate derivation unit 30361 applies the weighting coefficients of the neighboring blocks used to derive the merge candidates to the target block. In other words, in the merge mode, the weighting factor used in the past is inherited as the weighting factor of the current block.
[0227] (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 .
[0228] 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.
[0229] 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 .
[0230] (Configuration of a video encoding device) Next, the configuration of the video encoding device 11 according to this embodiment will be described. Fig. 15 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.
[0231] 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.
[0232] 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.
[0233] The transform / quantization unit 103 calculates transform coefficients by frequency transforming the prediction error input from the subtraction unit 102, and derives quantized transform coefficients by quantizing the prediction error. The quantized transform coefficients are output to the parameter coding unit 111 and the inverse quantization and inverse transform unit 105 .
[0234] The inverse quantization and inverse transform unit 105 corresponds to the inverse quantization and inverse transform unit 311 (FIG. 7) in the video decoding device 31. The calculated prediction error is output to the adder 106.
[0235] 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.
[0236] The header encoding unit 1110 performs encoding processing of parameters such as header information, division information, prediction information, and quantized transform coefficients.
[0237] The CT information encoding unit 1111 encodes the QT, MT (BT, TT) division information and the like.
[0238] The CU encoding unit 1112 encodes the CU information, prediction information, division information, and so on.
[0239] When a prediction error is included in a TU, the TU encoding unit 1114 encodes the QP update information and the quantized prediction error.
[0240] 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, and quantized transform coefficients to the parameter encoding unit 111.
[0241] 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.
[0242] 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.
[0243] (Configuration of the inter-prediction parameter encoding unit) As shown in FIG. 16, 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 controls the merge The vector candidate index derivation unit 11211 and the vector candidate index derivation unit 11212 are included.
[0244] 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.
[0245] (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.
[0246] 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.
[0247] The adder 106 receives the pixel values of the prediction block input from the prediction image generator 101 and performs inverse quantization and inverse The adder 106 generates a decoded image by adding up the prediction errors input from the converter 105 for each pixel. The adder 106 stores the generated decoded image in the reference picture memory 109.
[0248] 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.
[0249] 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.
[0250] 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.
[0251] 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.
[0252] 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 .
[0253] In addition, in the above-described embodiment, a part of the video encoding device 11 and the video decoding device 31, 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. The term "computer-readable recording medium" refers to a storage device such as a hard disk built into a computer system. Furthermore, the term "computer-readable recording medium" may also include a device that dynamically stores a program for a short period of time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, or a device that stores a program for a 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.
[0254] Further, 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 encoding device 11 and the video decoding device 31 may be individually implemented as a processor, or may be integrated in part or in whole as a processor. The integrated circuit method is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. If an integrated circuit technology that can replace LSI appears due to the progress of semiconductor technology, an integrated circuit based on that technology may be used.
[0255] 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.
[0256] [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.
[0257] 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.
[0258] Fig. 2(a) is a block diagram showing the configuration of a transmitting device PROD_A equipped with a video encoding device 11. As shown in the figure, the transmitting device PROD_A includes an encoding unit PROD_A1 that 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.
[0259] The transmission device PROD_A captures moving images as a supply source of moving images to be input to the encoding unit PROD_A1. The apparatus further includes a camera PROD_A4 for recording 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. In the figure, a configuration in which the transmitting device PROD_A includes all of these components is illustrated, but some of them may be omitted.
[0260] The recording medium PROD_A5 may be one in which unencoded moving images are recorded. Alternatively, the recording medium PROD_A5 may be a recording medium that has recorded thereon a moving image encoded by a recording encoding method different from the transmission encoding method. In the latter case, a decoding unit ( It is advisable to use a conductor (not shown) between the two.
[0261] 2(b) is a block diagram showing the configuration of a receiving device PROD_B equipped with a video decoding device 31. As shown in the figure, the receiving device PROD_B includes a receiving unit PROD_B1 that receives a modulated signal, and a demodulating unit PROD_B2 that obtains coded data by demodulating the modulated signal received by the receiving unit PROD_B1. and a decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the demodulation unit PROD_B2. The above-mentioned moving image decoding device 31 is used as the decoding unit PROD_B3. .
[0262] The receiving device PROD_B is a supply destination of the video output by the decoding unit PROD_B3, and displays the video. The display PROD_B4 may further include a recording medium PROD_B5 for recording moving images, and an output terminal PROD_B6 for outputting the moving images to the outside. Although the receiving device PROD_B is illustrated as having the above configuration, some of these may be omitted.
[0263] The recording medium PROD_B5 is for recording unencoded moving images. Alternatively, the signal may be encoded by a coding method for recording that is different from the coding method for transmission. In the latter case, a signal from the decoding unit PROD_B3 to the recording medium PROD_B5 may be provided between the decoding unit PROD_B3 and the recording medium PROD_B5. It is preferable to interpose an encoding unit (not shown) that encodes the acquired video image according to an encoding method for recording.
[0264] 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.
[0265] 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.
[0266] 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.
[0267] 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.
[0268] 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.
[0269] Fig. 3(a) is a block diagram showing the configuration of a recording device PROD_C equipped with the above-mentioned video encoding device 11. As shown in the figure, the recording device PROD_C is equipped with an encoding unit PROD_C1 that obtains encoded data by encoding 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 It is used as the encoding unit PROD_C1.
[0270] The recording medium PROD_M may be (1) a type built into the recording device PROD_C, such as a hard disk drive (HDD) or a solid state drive (SSD), (2) a type connected to the recording device PROD_C, such as an SD memory card or a universal serial bus (USB) flash memory, or (3) a DVD (digital versatile disc: registered). (registered trademark) or BD (Blu-ray Disc: registered trademark), It may be mounted on a live device (not shown).
[0271] The recording device PROD_C supplies a video image to the encoding unit PROD_C1. The camera PROD_C3 captures an image, an input terminal PROD_C4 inputs a moving image from the outside, a receiving unit PROD_C5 receives the moving image, and an image processing unit PROD_C6 generates or processes an image. In the figure, the recording device PROD_C is shown equipped with all of these components, but some of them may be omitted.
[0272] The receiving unit PROD_C5 may receive uncoded video. Alternatively, the receiving unit PROD_C5 may receive encoded data that has been encoded by a transmission encoding method different from the recording encoding method. In the latter case, a transmission decoding unit (not shown) that decodes the encoded data that has been encoded by the transmission encoding method may be provided between the receiving unit PROD_C5 and the encoding unit PROD_C1.
[0273] Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, and an HDD (Hard Disk Drive) recorder (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 is the main source of the moving image). Also, a camcorder (in this case, the camera PROD_C3 is the main source of the moving image), a personal computer (in this case, the receiving unit PROD_C5 or the image The processing unit C6 is the main source of video images), a smartphone (in this case, the camera PROD_C3 Or the receiving unit PROD_C5 is the main source of video images) This is an example.
[0274] Fig. 3(b) is a block diagram showing the configuration of a playback device PROD_D equipped with the above-mentioned video decoding device 31. As shown in the figure, the playback device PROD_D includes a reading unit PROD_D1 that reads out coded data written 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 includes , this is used as the decoding unit PROD_D2.
[0275] The recording medium PROD_M may be (1) a type built into the playback device PROD_D, such as an HDD or SSD, or (2) a type of storage device, such as an SD memory card or a USB flash memory. (3) DVD, BD, etc. The DVD-ROM 10 may be loaded into a drive device (not shown) built into the playback device PROD_D.
[0276] In addition, the playback device PROD_D receives the video output from the decoding unit PROD_D2 and outputs the video to the playback device PROD_D. The apparatus may further include a display PROD_D3 for displaying the moving image, an output terminal PROD_D4 for outputting the moving image to the outside, and a transmission unit PROD_D5 for transmitting the moving image. Although the configuration of the playback device PROD_D is illustrated, some of the configuration may be omitted.
[0277] The transmission unit PROD_D5 may transmit uncoded video. Alternatively, the decoder unit PROD_D2 may transmit encoded data encoded by a transmission encoding method different from the recording encoding method. In the latter case, it is preferable to interpose an encoding unit (not shown) between the decoder unit PROD_D2 and the transmitter unit PROD_D5, which encodes the video image by the transmission encoding method.
[0278] Examples of such a playback device PROD_D include a DVD player, a BD player, and a HDD player (in this case, the output terminal PROD_D4 to which a television receiver or the like is connected operates). In addition, television receivers (in this case, the display PROD_D3 is the main supply destination of moving images), digital signage (also called electronic billboards or electronic bulletin boards, etc.) a display PROD_D3 or a transmission unit PROD_D5 being the main destination of the moving image), a desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 being the main destination of the moving image), a laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 being the main destination of the moving image), Examples of such a playback device PROD_D include a playback device PROD_D for a smartphone (in which case the display PROD_D3 or the transmission unit PROD_D5 is the main destination of the video images), and a smartphone (in which case the display PROD_D3 or the transmission unit PROD_D5 is the main destination of the video images).
[0279] (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).
[0280] In the latter case, each of the above devices includes a CPU that executes the instructions of a program that realizes each function, ROM (Read Only Memory) stores the program, and RAM (Random Access Memory) expands the program. The present invention also includes a storage device (recording medium) such as a memory for storing the above-mentioned programs and various data, and the like. The object of the embodiment of the present invention can also be achieved by supplying each of the above-mentioned 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-mentioned devices, which is software for realizing the above-mentioned functions, is recorded in a computer-readable manner, and the computer (or CPU or MPU) reads out and executes the program code recorded on the recording medium.
[0281] Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy disks (registered trademark) and hard disks, and CD-ROMs (Compact Disc Read-Only Memory), MO disks (Magneto-Optical discs), MDs (Mini Discs), DVDs (Digital Versatile Discs: registered trademark), CD-Rs (CD Recordable), and Blu-ray discs (Blu-ray Discs, including optical discs such as Disc: registered trademark, IC cards (including memory cards) / Cards such as optical cards, mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory: registered trademark) Semiconductor memories such as flash ROMs, or logic circuits such as PLDs (Programmable logic devices) and FPGAs (Field Programmable Gate Arrays) can be used.
[0282] 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.
[0283] 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]
[0284] The embodiment 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. Therefore, it can be suitably applied to the data structure of the referenced encoded data. [Explanation of symbols]
[0285] 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. an affine prediction unit for deriving affine prediction parameters from motion vectors of a plurality of control points; a PROF (Prediction Refinement with Optical Flow) unit to which a motion vector difference array derived from the affine prediction parameters and a predicted image array derived from the affine prediction parameters are input, and which derives predicted sample values from the motion vector difference array and the predicted image array; 11. A video decoding device, comprising: a motion vector difference array, the motion vector difference array being clipped within a range using a fixed value that is independent of a pixel bit length.
2. an affine prediction unit for deriving affine prediction parameters from motion vectors of a plurality of control points; a PROF (Prediction Refinement with Optical Flow) unit to which a motion vector difference array derived from the affine prediction parameters and a predicted image array derived from the affine prediction parameters are input, and which derives predicted sample values from the motion vector difference array and the predicted image array; 11. A video encoding device, comprising: a motion vector difference array, the motion vector difference array being clipped within a range using a fixed value that is independent of a pixel bit length.
Citation Information
Patent Citations
Gradient calculation for different motion vector refinements
JP2022527852A
Gradient-based prediction refinement for video coding
JP2022533061A
Gradient calculation in different motion vector refinements
WO2020211865A1
Gradient-based prediction refinement for video coding
WO2020236568A1
