Video encoding devices and video decoding devices
Patent Information
- Application Number
- VN1202604960
- Authority / Receiving Office
- VN · VN
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-05-21
- Filing Date
- 2021-05-18
- Publication Date
- 2026-08-03
AI Technical Summary
The existing video encoding and decoding methods, such as those described in Non-Patent Document 1, suffer from flaws in the syntax and semantics for defining reference picture lists, leading to undefined reference picture list structures when selecting two reference picture lists with a single index value, particularly when the number of reference picture list structures is not properly managed.
A video encoding device and decoding device are designed to encode and decode reference picture list structures by selecting two reference picture lists based on the number of reference picture list structures, ensuring proper indexing and structure definition to avoid defects in the encoding and decoding process.
This configuration allows for efficient encoding and decoding without defects, ensuring accurate and reliable video transmission and playback by correctly managing reference picture lists.
Smart Images

Figure VN1202604960_0 
Figure VN1202604960_1
Abstract
Description
Video encoding device and video decoding device
[0001] An embodiment of the present invention relates to a video encoding device and a video decoding device.
[0002] In order to efficiently transmit or record moving images, a moving image encoding device is used that generates encoded data by encoding moving images, and a moving image decoding device is used that generates decoded images by decoding the encoded data.
[0003] Specific examples of video encoding methods include H.264 / AVC and H.265 / HEVC (High-Efficiency Video Coding).
[0004] In such a video coding method, images (pictures) constituting a video are managed in a hierarchical structure consisting of slices obtained by dividing images, coding tree units (CTUs) obtained by dividing slices, coding units (sometimes called coding units (CUs)) obtained by dividing coding tree units, and transform units (TUs) obtained by dividing coding units, and are coded / decoded for each CU.
[0005] In such video coding methods, a predicted image is typically generated based on a locally decoded image obtained by encoding / decoding an input image, and the predicted image is subtracted from the input image (original image) to obtain a prediction error (sometimes called a "difference image" or "residual image"), which is then coded. Methods for generating predicted images include inter-frame prediction (inter-prediction) and intra-frame prediction (intra-prediction).
[0006] Furthermore, Non-Patent Document 1 is an example of a recent video encoding and decoding technique.
[0007] Non-Patent Document 1 employs a method in which a plurality of reference picture lists are registered for each list, and the lists are used by referencing them in a picture header or a slice header.
[0008] "Versatile Video Coding (Draft 8)", JVET-R2001-vA, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 2020-05-15
[0009] However, the method described in Non-Patent Document 1 has deficiencies in the syntax and semantics for defining reference picture lists, and when two reference picture lists are selected with one index value, there is a problem that the reference picture list becomes indeterminate depending on the number of two reference picture list structures.
[0010] A video decoding device according to one aspect of the present invention has a prediction unit that decodes a reference picture list structure including a plurality of reference picture lists and selects two reference picture lists from the reference picture list structure on a picture-by-picture or slice-by-slice basis, and is characterized in that the prediction unit selects two reference picture lists with one index value according to the number of two reference picture list structures.
[0011] A video coding device according to one aspect of the present invention is characterized in that it encodes a reference picture list structure including a plurality of reference picture lists, and has a prediction unit that selects two reference picture lists from the reference picture list structure on a picture-by-picture or slice-by-slice basis, and that the prediction unit selects two reference picture lists with one index value according to the number of two reference picture list structures.
[0012] By adopting such a configuration, encoding and decoding can be performed without any problems.
[0013] According to one aspect of the present invention, the above-mentioned problems can be solved.
[0014] FIG. 1 is a schematic diagram showing the configuration of an image transmission system according to the present embodiment. FIG. 1 is a diagram showing the configurations 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. PROD_A indicates a transmitting device equipped with a video encoding device, and PROD_B indicates a receiving device equipped with a video decoding device. FIG. 2 is a diagram showing the configurations 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. PROD_C indicates a recording device equipped with a video encoding device, and PROD_D indicates a playback device equipped with a video decoding device. FIG. 3 is a diagram showing the hierarchical structure of data in an encoded stream. FIG. 4 is a conceptual diagram showing an example of reference pictures and a reference picture list. FIG. 5 is a schematic diagram showing the configuration of a video decoding device. FIG. 6 is a flowchart explaining the general operation of a video decoding device. FIG. 7 is a diagram explaining the arrangement of merge candidates. FIG. 8 is a schematic diagram showing the configuration of an inter prediction parameter derivation unit. FIG. 9 is a schematic diagram showing the configurations of a merge prediction parameter derivation unit and an AMVP prediction parameter derivation unit. FIG. 10 is a schematic diagram showing the configuration of an inter prediction image generation unit. FIG. 11 is a block diagram showing the configuration of a video encoding device. FIG. 12 is a schematic diagram showing the configuration of an inter prediction parameter coding unit. FIG. 13 is a schematic diagram showing the configuration of an intra prediction parameter coding unit. Fig. 1 is a diagram illustrating a portion of the syntax of a Sequence Parameter Set (SPS) and a Picture Parameter Set (PPS). Fig. 2 is a diagram illustrating a portion of the syntax of a picture header PH and a slice header. Fig. 3 is a diagram illustrating the syntax of ref_pic_lists() that defines a reference picture list and a reference picture list structure ref_pic_list_struct (listIdx, rplsIdx).
[0015] First Embodiment Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0016] FIG. 1 is a schematic diagram showing the configuration of an image transmission system 1 according to this embodiment.
[0017] The image transmission system 1 is a system that transmits an encoded stream obtained by encoding images of different resolutions after resolution conversion, decodes the transmitted encoded stream, and converts the images back to the original resolution for display. The image transmission system 1 includes a resolution conversion device (resolution conversion unit) 51, a video encoding device (image encoding device) 11, a network 21, a video decoding device (image decoding device) 31, a resolution inverse conversion device (resolution inverse conversion unit) 61, and a video display device (image display device) 41.
[0018] The resolution conversion device 51 converts the resolution of an image T included in the video and supplies a variable resolution video signal including images of different resolutions to the video coding device 11. The resolution conversion device 51 also supplies information indicating whether or not the resolution of an image is to be converted to the video coding device 11. If the information indicates resolution conversion, the video coding device sets resolution conversion information ref_pic_resampling_enabled_flag (described later) to 1, includes it in a sequence parameter set SPS (Sequence Parameter Set) of the coded data, and codes it.
[0019] The video encoding device 11 receives an image T whose resolution has been converted.
[0020] The network 21 transmits the coded stream Te generated by the video coding device 11 to the video decoding device 31. The network 21 is the Internet, a wide area network (WAN), a local area network (LAN), or a combination thereof. The network 21 is not necessarily limited to a bidirectional communication network, but may also be a unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. The network 21 may also be replaced by a storage medium on which the coded stream Te is recorded, such as a DVD (Digital Versatile Disc: registered trademark) or a BD (Blue-ray Disc: registered trademark).
[0021] The moving image decoding device 31 decodes each of the encoded streams Te transmitted by the network 21, generates a variable-resolution decoded image signal, and supplies it to the resolution inverse conversion device 61.
[0022] When the resolution conversion information included in the variable-resolution decoded image signal indicates resolution conversion, the resolution inverse conversion device 61 generates a decoded image signal of the original size by inversely converting the resolution-converted image.
[0023] The moving image display device 41 displays all or part of one or more decoded images Td indicated by the decoded image signal input from the resolution inverse conversion unit. The 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, an HMD, etc. 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 and display capabilities.
[0024] <Operator> The operators used in this specification are described below.
[0025] >> is a right bit shift, << is a left bit shift, & is a bitwise AND, | is a bitwise OR, |= is an OR assignment operator, and || indicates a logical OR.
[0026] x? y : z is a ternary operator that takes y when x is true (non-zero) and z when x is false (0).
[0027] Clip3(a, b, c) is a function that clips c to a value between a and b (inclusive). If c < a, it returns a; if c > b, it returns b; otherwise, it returns c (where a <= b).
[0028] abs(a) is a function that returns the absolute value of a.
[0029] Int(a) is a function that returns the integer value of a.
[0030] floor(a) is a function that returns the largest integer less than or equal to a.
[0031] ceil(a) is a function that returns the smallest integer greater than or equal to a.
[0032] a / d represents the division of a by d (rounded down to the nearest integer).
[0033] min(a,b) represents the smaller of a and b.
[0034] <Structure of encoded stream Te> Before providing a detailed description of the video encoding device 11 and 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.
[0035] 4 is a diagram showing a hierarchical structure of data in an encoded stream Te. The encoded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence. In FIG. 4, a diagram showing an encoded video sequence defining the sequence SEQ, an encoded picture defining a picture PICT, an encoded slice defining a slice S, encoded slice data defining slice data, an encoding tree unit included in the encoded slice data, and an encoding unit included in the encoding tree unit is shown.
[0036] (Encoded Video Sequence) The encoded video sequence defines a set of data that the video decoding device 31 refers to in order to decode the sequence SEQ to be processed. As shown in Fig. 4, the sequence SEQ includes a video parameter set VPS (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), an adaptation parameter set (APS), a picture PICT, and supplemental enhancement information SEI (Supplemental Enhancement Information).
[0037] The video parameter set VPS specifies a set of coding parameters common to multiple videos composed of multiple layers, as well as a set of coding parameters related to multiple layers included in the video and each individual layer.
[0038] The sequence parameter set SPS defines a set of coding parameters that the video decoding device 31 references to decode the target sequence. For example, the width and height of a picture are defined. Note that there may be multiple SPSs. In this case, one of the multiple SPSs is selected from the PPS.
[0039] (Coded Picture) A coded picture defines a set of data that the video decoding device 31 references in order to decode a picture PICT to be processed. As shown in Fig. 4, a picture PICT includes a picture header PH and slices 0 to NS-1 (NS is the total number of slices included in the picture PICT).
[0040] Hereinafter, when there is no need to distinguish between slices 0 to NS-1, the subscripts of the codes may be omitted. This also applies to other data that are included in the coded stream Te described below and have subscripts.
[0041] (Encoded Slice) An encoded slice defines a set of data to be referenced by the video decoding device 31 in order to decode a slice S to be processed. As shown in Fig. 4, a slice includes a slice header and slice data.
[0042] The slice header includes a group of coding parameters that the video decoding device 31 refers to in order to determine a decoding method for the current slice. Slice type designation information (slice_type) that designates the slice type is an example of a coding parameter included in the slice header.
[0043] 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 uni-prediction (L0 prediction) or intra prediction during encoding, and (3) a B slice that uses uni-prediction (L0 prediction using only reference picture list 0 or L1 prediction using only reference picture list 1), bi-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, the terms P and B slices refer to slices including blocks that can use inter prediction.
[0044] Note that the slice header may include a reference to the picture parameter set PPS (pic_parameter_set_id).
[0045] (Coded Slice Data) The coded slice data defines a set of data that the video decoding device 31 references in order to decode the slice data to be processed. The slice data includes a CTU, as shown in the coded slice header in Fig. 4. A CTU is a block of a fixed size (e.g., 64x64) that constitutes a slice, and is also called a Largest Coding Unit (LCU).
[0046] (Coding Tree Unit) Figure 4 defines a set of data that the video decoding device 31 references to decode the target CTU. The CTU is divided into coding units (CUs), which are the basic units of the encoding process, by recursive quad tree (QT) division, binary tree (BT) division, or ternary tree (TT) division. BT division and TT division are collectively called multi-tree (MT) division. A node in the tree structure obtained by recursive quad tree division is called a coding node. The intermediate nodes of a quad tree, binary tree, and ternary tree are coding nodes, and the CTU itself is defined as the top-level coding node.
[0047] The CT includes, as CT information, a CU split flag (split_cu_flag) indicating whether CT splitting is performed, a QT split flag (qt_split_cu_flag) indicating whether QT splitting is performed, an MT split direction (mtt_split_cu_vertical_flag) indicating the split direction of MT splitting, and an MT split type (mtt_split_cu_binary_flag) indicating the split type of MT splitting. split_cu_flag, qt_split_cu_flag, mtt_split_cu_vertical_flag, and mtt_split_cu_binary_flag are transmitted for each encoding node.
[0048] Different trees may be used for luminance and chrominance. The tree type is indicated by treeType. For example, if a common tree is used for luminance (Y, cIdx=0) and chrominance (Cb / Cr, cIdx=1,2), the common single tree is indicated by treeType=SINGLE_TREE. If two different trees (DUAL trees) are used for luminance and chrominance, the luminance tree is indicated by treeType=DUAL_TREE_LUMA and the chrominance tree is indicated by treeType=DUAL_TREE_CHROMA.
[0049] (Coding Unit) Fig. 4 defines a set of data that the video decoding device 31 references in order to decode a coding unit to be processed. Specifically, a CU is composed of a CU header CUH, prediction parameters, transformation parameters, quantization transformation coefficients, etc. The CU header defines a prediction mode, etc.
[0050] The prediction process may be performed in units of CUs, or in units of sub-CUs obtained by further dividing a CU. When the sizes of a CU and a sub-CU are the same, there is one sub-CU in the CU. When the size of a CU is larger than the size of a sub-CU, the CU is divided into sub-CUs. For example, when a CU is 8x8 and a sub-CU is 4x4, the CU is divided into four sub-CUs, divided horizontally in half and vertically in half.
[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] The transformation and quantization processes are performed in units of CUs, but the quantized transformation coefficients may be entropy coded in units of sub-blocks such as 4x4.
[0053] (Prediction Parameters) A predicted image is derived from prediction parameters associated with a block. Prediction parameters include intra-prediction and inter-prediction parameters.
[0054] The following describes prediction parameters for inter prediction. The inter prediction parameters are composed of prediction list usage flags predFlagL0 and predFlagL1, reference picture indices refIdxL0 and refIdxL1, and motion vectors mvL0 and mvL1. predFlagL0 and predFlagL1 are flags indicating whether 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 XX is true" is used, a flag other than 0 (e.g., 1) is considered to be XX, and 0 is considered to be not XX, and in logical negation, logical product, etc., 1 is treated as true and 0 is treated as false (the same applies below). However, in actual devices and methods, other values may 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 merge mode, a merge flag merge_flag, a merge index merge_idx, an MMVD flag mmvd_flag, an inter-prediction identifier inter_pred_idc for selecting a reference picture to be used in AMVP mode, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx for deriving a motion vector, a difference vector mvdLX, and a motion vector precision mode amvr_mode.
[0056] (Reference Picture List) A reference picture list is a list of reference pictures stored in the reference picture memory 306. FIG. 5 is a conceptual diagram illustrating an example of a reference picture and a reference picture list. In the conceptual diagram illustrating an example of a reference picture in FIG. 5, each rectangle represents a picture, each arrow represents the reference relationship between pictures, the horizontal axis represents time, I, P, and B in the rectangle represent intra-pictures, uni-predictive pictures, and bi-predictive pictures, respectively, and the numbers in the rectangle represent the decoding order. As shown in the diagram, the decoding order of pictures is I0, P1, B2, B3, and B4, and the display order is I0, B3, B2, B4, and P1. FIG. 5 also illustrates an example of a reference picture list for picture B3 (the target picture). A reference picture list represents candidate reference pictures, and one picture (slice) may have one or more reference picture lists. In the example shown in the diagram, the target picture B3 has reference picture lists: an L0 list RefPicList0 and an L1 list RefPicList1. In each CU, refIdxLX specifies which picture in the reference picture list RefPicListX (X=0 or 1) to actually reference. The diagram shows an example where refIdxL0=2 and refIdxL1=0. Note that LX is a notation method used when there is no distinction between L0 prediction and L1 prediction; hereinafter, parameters for the L0 list and parameters for the L1 list will be distinguished by replacing LX with L0 or L1.
[0057] (Merge Prediction and AMVP Prediction) Prediction parameter decoding (encoding) methods include merge prediction mode and AMVP (Advanced Motion Vector Prediction, adaptive motion vector prediction) mode, and merge_flag is a flag for distinguishing between them. Merge prediction mode is a mode in which the prediction list usage flag predFlagLX, reference picture index refIdxLX, and motion vector mvLX are not included in the encoded data, but are derived from prediction parameters of already processed neighboring blocks, etc. AMVP mode is a mode in which inter_pred_idc, refIdxLX, and mvLX are included in the encoded data. Note that mvLX is encoded as mvp_LX_idx, which identifies the prediction vector mvpLX, and a difference vector mvdLX. In addition to merge prediction mode, affine prediction mode and MMVD prediction mode may also be used.
[0058] inter_pred_idc is a value indicating the type and number of reference pictures, and takes one of the values PRED_L0, PRED_L1, or PRED_BI. PRED_L0 and PRED_L1 indicate uni-prediction using one reference picture managed in the L0 list and L1 list, respectively. PRED_BI indicates bi-prediction using two reference pictures managed in the L0 list and L1 list.
[0059] The merge_idx is an index indicating which prediction parameter from among prediction parameter candidates (merge candidates) derived from blocks for which processing has been completed is to be used as the prediction parameter for the current block.
[0060] (Motion Vector) mvLX indicates the amount of shift between blocks on two different pictures. The predicted vector and differential vector related to mvLX are called mvpLX and mvdLX, respectively.
[0061] (Inter prediction identifier inter_pred_idc and prediction list use flag predFlagLX) The relationship between inter_pred_idc, predFlagL0, and predFlagL1 is as follows, and they can be converted into each other.
[0062] inter_pred_idc = (predFlagL1<<1)+predFlagL0 predFlagL0 = inter_pred_idc & 1 predFlagL1 = inter_pred_idc >> 1 Note that, as the inter prediction parameters, a prediction list usage flag or an inter prediction identifier may be used. Furthermore, a determination using the prediction list usage flag may be replaced with a determination using the inter prediction identifier. Conversely, a determination using the inter prediction identifier may be replaced with a determination using the prediction list usage flag.
[0063] (Determination of Bi-Prediction biPred) The flag biPred indicating whether bi-prediction is performed can be derived based on whether two prediction list usage flags are both 1. For example, it can be derived using the following formula.
[0064] biPred = (predFlagL0==1 && predFlagL1==1) Alternatively, biPred can also be derived based on whether the inter prediction identifier is a value indicating the use of two prediction lists (reference pictures). For example, it can be derived using the following formula:
[0065] biPred = (inter_pred_idc==PRED_BI) ? 1 : 0 (Configuration of Video Decoding Apparatus) The configuration of a video decoding apparatus 31 (FIG. 6) 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 transform unit 311, an adder 312, and a prediction parameter derivation unit 320. Note that the video decoding device 31 may also be configured without including the loop filter 305, in accordance with the video coding device 11 described below.
[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 (prediction mode decoding unit), and the CU decoding unit 3022 further includes a TU decoding unit 3024. These may be collectively referred to as a decoding module. The header decoding unit 3020 decodes parameter set information such as VPS, SPS, PPS, and APS, and slice headers (slice information) from the coded data. The CT information decoding unit 3021 decodes the CT from the coded data. The CU decoding unit 3022 decodes the CU from the coded data. When a prediction error is included in the TU, the TU decoding unit 3024 decodes QP update information (quantization correction value) and quantized prediction error (residual_coding) from the coded data.
[0068] The TU decoding unit 3024 decodes the QP update information and the quantized prediction error from the coded 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 coded data, it is derived as 0.
[0069] The TU decoding unit 3024 decodes an index mts_idx indicating a transform base from the coded data. The TU decoding unit 3024 also decodes an index stIdx indicating the use of a secondary transform and the transform base from the coded data. stIdx indicates no application of a secondary transform when it is 0, indicates one transform of a set (pair) of secondary transform bases when it is 1, and indicates the other transform of the pair when it is 2.
[0070] The TU decoding unit 3024 may also decode a sub-block transform flag cu_sbt_flag. When cu_sbt_flag is 1, the CU is divided into multiple sub-blocks and the residual of only one specific sub-block is decoded. The TU decoding unit 3024 may also 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 that includes 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 .
[0072] The prediction parameter derivation unit 320 includes an inter prediction parameter derivation unit 303 and an intra prediction parameter derivation unit 304 .
[0073] In the following, an example will be described in which CTUs and CUs are used as processing units, but this is not limiting and processing may be performed in sub-CU units. Alternatively, CTUs and CUs may be read as blocks, and sub-CUs as sub-blocks, and processing may be performed in block or sub-block units.
[0074] The entropy decoding unit 301 performs entropy decoding on the externally input coded stream Te to decode individual codes (syntax elements). Entropy coding can be divided into two types: variable-length coding of syntax elements using a context (probability model) adaptively selected according to the type of syntax element and surrounding conditions, and variable-length coding of syntax elements using a predefined table or formula. The former, CABAC (Context Adaptive Binary Arithmetic Coding), stores the CABAC state of the context (the type of most probable symbol (0 or 1) and a probability state index pStateIdx that specifies the probability) 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 that do not use a context are decoded with equal probability (EP, bypass), and the ctxInc derivation and CABAC state are omitted. The decoded syntax elements include prediction information for generating a predicted image and a prediction error for generating a difference image.
[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, amvr_mode, etc. Control of which code to decode is performed based on an instruction from the parameter decoding unit 302.
[0076] (Basic Flow) FIG. 7 is a flowchart illustrating the general operation of the video decoding device 31.
[0077] (S1100: Decode parameter set information) The header decoder 3020 decodes parameter set information such as VPS, SPS, and PPS from the coded data.
[0078] (S1200: Decode slice information) The header decoding unit 3020 decodes the slice header (slice information) from the coded data.
[0079] Thereafter, the video decoding device 31 repeats the processes from S1300 to S5000 for each CTU included in the target picture, thereby deriving a decoded image of each CTU.
[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.
[0083] (S1510: Decode CU information) The CU decoding unit 3022 decodes CU information, prediction information, the TU split flag split_transform_flag, the CU residual flags cbf_cb, cbf_cr, cbf_luma, and the like from the encoded data.
[0084] (S1520: TU information decoding) When a TU includes a prediction error, the TU decoding unit 3024 decodes the QP update information, the quantization prediction error, and the transform index mts_idx from the coded data. Note that the QP update information is a difference value from the quantization parameter predicted value qPpred, which is a predicted value of the quantization parameter QP.
[0085] (S2000: Generate predicted image) The predicted image generation unit 308 generates a predicted image for each block included in the current CU based on prediction information.
[0086] (S3000: Inverse quantization and inverse transform) The inverse quantization and inverse transform unit 311 executes inverse quantization and inverse transform processing on each TU included in the target CU.
[0087] (S4000: Decoded image generation) The addition unit 312 generates a decoded image of the target CU by adding the predicted image supplied from the predicted image generation unit 308 and the prediction error supplied from the inverse quantization and inverse transform unit 311.
[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) FIG. 9 is a schematic diagram showing the configuration of the inter prediction parameter derivation unit 303 according to this embodiment. The inter prediction parameter derivation unit 303 derives inter prediction parameters by referring to prediction parameters stored in the prediction parameter memory 307, based on the syntax elements input from the parameter decoding unit 302. The inter prediction parameter derivation unit 303 also outputs the inter prediction parameters to the inter prediction image generation unit 309 and the prediction parameter memory 307. The inter prediction parameter derivation unit 303 and its internal elements, namely, 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 GPM 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 therefore be collectively referred to as a motion vector derivation unit (motion vector derivation device).
[0090] The scale parameter derivation unit 30378 derives the horizontal scaling ratio of the reference picture, RefPicScale[i][j][0], the vertical scaling ratio of the reference picture, RefPicScale[i][j][1], and RefPicIsScaled[i][j] indicating whether the reference picture has been scaled, as follows, where i indicates whether the reference picture list is an L0 list or an L1 list, and j is the value of the L0 reference picture list or the L1 reference picture list:
[0091] RefPicScale[i][j][0] = ((fRefWidth << 14)+(PicOutputWidthL >> 1)) / PicOutputWidthL RefPicScale[i][j][1] = ((fRefHeight << 14)+(PicOutputHeightL >> 1)) / PicOutputHeightL RefPicIsScaled[i][j] = (RefPicScale[i][j][0] != (1<<14)) || (RefPicScale[i][j][1] != (1<<14)) Here, the variable PicOutputWidthL is the value used when calculating the horizontal scaling ratio when a picture to be coded is referenced, and is calculated by subtracting the left and right offset values from the number of horizontal luminance pixels of the picture to be coded. The variable PicOutputHeightL is a value used when calculating the vertical scaling ratio when a picture to be coded is referenced, and is calculated by subtracting the top and bottom offset values from the vertical luminance pixel count of the picture to be coded. The variable fRefWidth is the value of PicOutputWidthL of the reference picture with reference picture list value j in list i, and the variable fRefHight is the value of PicOutputHeightL of the reference picture with reference picture list value j in list i.
[0092] When affine_flag is 1, that is, when it indicates affine prediction mode, the affine prediction unit 30372 derives inter prediction parameters in units of subblocks.
[0093] When mmvd_flag is 1, that is, when the MMVD prediction mode is indicated, the MMVD predictor 30373 derives inter prediction parameters from the merge candidates and difference vectors derived by the merge prediction parameter derivation unit 3036 .
[0094] When the GPM Flag is 1, that is, when it indicates the GPM (Geometric Partitioning Mode) prediction mode, the GPM prediction unit 30377 derives GPM prediction parameters.
[0095] If merge_flag is 1, that is, if it indicates merge prediction mode, merge_idx is derived and output to the merge prediction parameter derivation unit 3036 .
[0096] 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.
[0097] (MV Addition Unit) The MV addition unit 3038 adds the derived mvpLX and mvdLX to derive mvLX.
[0098] (Affine prediction unit) The affine prediction unit 30372 1) derives motion vectors for two control points CP0 and CP1 or three control points CP0, CP1, and CP2 of the target block, 2) derives affine prediction parameters for the target block, and 3) derives motion vectors for each sub-block from the affine prediction parameters.
[0099] In merge affine prediction, the motion vector cpMvLX[] for each control point CP0, CP1, CP2 is derived from the motion vectors of the blocks adjacent to the current block. In inter-affine prediction, the cpMvLX[] for each control point CP0, CP1, CP2 is derived from the sum of the predicted vector for each control point CP0, CP1, CP2 and the difference vector mvdCpLX[] derived from the encoded data.
[0100] (Merge Prediction) FIG. 10 is a schematic diagram showing the configuration of the merge prediction parameter derivation unit 3036 according to this embodiment. The merge prediction parameter derivation unit 3036 includes a merge candidate derivation unit 30361 and a merge candidate selection unit 30362. Note that merge candidates include prediction parameters (predFlagLX, mvLX, refIdxLX) and are stored in a merge candidate list. Merge candidates stored in the merge candidate list are assigned indices according to a predetermined rule.
[0101] The merge candidate derivation unit 30361 derives merge candidates by directly using the motion vectors and refIdxLX of decoded neighboring blocks. In addition, the merge candidate derivation unit 30361 may apply a spatial merge candidate derivation process, a temporal merge candidate derivation process, a pairwise merge candidate derivation process, and a zero merge candidate derivation process, which will be described later.
[0102] In the spatial merge candidate derivation process, the merge candidate derivation unit 30361 reads prediction parameters stored in the prediction parameter memory 307 according to a predetermined rule and sets them as merge candidates. The reference pictures are specified, for example, by prediction parameters for each of the neighboring blocks within a predetermined range from the current block (e.g., 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 current block). The merge candidates are referred to as A1, B1, B0, A0, and B2. Here, A1, B1, B0, A0, and B2 are motion information derived from blocks containing the following coordinates: The positions of A1, B1, B0, A0, and B2 are shown in the layout of the merge candidates in the current picture in Figure 8.
[0103] 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 top left coordinates of the target block are (xCb, yCb), the width is cbWidth, and the height is cbHeight.
[0104] As a temporal merge derivation process, the merge candidate derivation unit 30361 reads the prediction parameters of the block C in the reference image including the lower right CBR or center coordinates of the target block from the prediction parameter memory 307, as shown in the co-located picture of Figure 8, sets it as a merge candidate Col, and stores it in the merge candidate list mergeCandList[].
[0105] Generally, block CBR is given priority and added to mergeCandList[], and when CBR does not have a motion vector (for example, an intra-prediction block) or when CBR is located outside the picture, the motion vector of block C is added to the prediction vector candidates. By adding the motion vector of a co-located block, which is likely to have different motion, as a prediction candidate, the number of prediction vector options increases and coding efficiency improves.
[0106] If ph_temporal_mvp_enabled_flag is 0 or cbWidth*cbHeight is less than or equal to 32, the co-located motion vector mvLXCol of the current block is set to 0, and the availability flag availableFlagLXCol of the co-located block is set to 0.
[0107] Otherwise (SliceTemporalMvpEnabledFlag is 1), do the following:
[0108] For example, the merge candidate derivation unit 30361 may derive the position of C (xColCtr, yColCtr) and the position of CBR (xColCBr, yColCBr) using the following formulas.
[0109] xColCtr = xCb+(cbWidth>>1) yColCtr = yCb+(cbHeight>>1) xColCBr = xCb+cbWidth yColCBr = yCb+cbHeight If CBR is available, the CBR motion vector is used to derive the merge candidate COL. If CBR is not available, C is used to derive the COL. Then, availableFlagLXCol is set to 1. Note that the reference picture may be collocated_ref_idx notified in the slice header.
[0110] 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[].
[0111] mvLXavgK[0] = (mvLXp0Cand[0] + mvLXp1Cand[0]) / 2 mvLXavgK[1] = (mvLXp0Cand[1] + mvLXp1Cand[1]) / 2 The merge candidate derivation unit 30361 derives zero merge candidates Z0,...,ZM where refIdxLX is 0...M and both the X and Y components of mvLX are 0, and stores them in the merge candidate list.
[0112] The order in which the mergeCandList[] is stored is, for example, spatial merge candidates (A1, B1, B0, A0, B2), temporal merge candidate Col, pairwise candidate avgK, and zero merge candidate ZK. Note that reference blocks that are unavailable (e.g., blocks that are intra-predicted) are not stored in the merge candidate list. i = 0 if( availableFlagB1 ) mergeCandList[ i++ ] = B1 if( availableFlagA1 ) mergeCandList[ i++ ] = A1 if( availableFlagB0 ) mergeCandList[ i++ ] = B0 if( availableFlagA0 ) mergeCandList[ i++ ] = A0 if( availableFlagB2 ) mergeCandList[ i++ ] = B2 if( availableFlagCol ) mergeCandList[ i++ ] = Col if( availableFlagAvgK ) mergeCandList[ i++ ] = avgK if( i < MaxNumMergeCand ) mergeCandList[ i++ ] = ZK The merge candidate selection unit 30362 selects the merge candidate N indicated by merge_idx from the merge candidates included in the merge candidate list using the following formula.
[0113] N = mergeCandList[merge_idx] where N is a label indicating a merge candidate, such as A1, B1, B0, A0, B2, Col, avgK, ZK, etc. The motion information of the merge candidate indicated by label N is indicated by (mvLXN[0], mvLXN[0]), predFlagLXN, refIdxLXN.
[0114] The selected (mvLXN[0], mvLXN[0]), predFlagLXN, and refIdxLXN are selected as the inter prediction parameters for the current block. The merging candidate selection unit 30362 stores the inter prediction parameters of the selected merging candidate in the prediction parameter memory 307 and outputs them to the inter prediction image generation unit 309.
[0115] (DMVR) Next, the 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 corrects the mvLX of the target CU derived by the merge prediction unit 30374 using a reference image. Specifically, when the prediction parameters derived by the merge prediction unit 30374 are bi-predictive, the DMVR unit 30375 corrects the motion vector using a predicted image derived from the motion vector corresponding to two reference pictures. The corrected mvLX is supplied to the inter-prediction image generation unit 309. When dmvrFlag is 1 (when at least ph_disable_dmvr_flag is 0), the DMVR unit 30375 performs the above-mentioned motion vector correction. When all of the following expressions are true, the DMVR unit 30375 sets dmvrFlag=1, and sets it to 0 otherwise.
[0116] ph_disable_dmvr_flag == 0 general_merge_flag == 1 predFlagL0 == 1 and predFlagL1 == 1 mmvd_merge_flag == 0 ciip_flag == 0 DiffPicOrderCnt(currPic, RefPicList[0][refIdxL0]) == DiffPicOrderCnt(RefPicList[1][refIdxL1], currPic) RefPicList[0][refIdxL0] and RefPicList[1][refIdxL1] are short term reference pictures BcwIdx == 0 luma_weight_l0_flag[refIdxL0] == 0 and luma_weight_l1_flag[refIdxL1] == 0 chroma_weight_l0_flag[refIdxL0] == 0 and chroma_weight_l1_flag[refIdxL1] == 0 cbWidth >= 8 cbHeight >= 8 cbHeight*cbWidth >= 128 RefPicIsScaled[0][refIdxL0] == 0 and RefPicIsScaled[1][refIdxL1] == 0 The function DiffPicOrderCnt(picA, picB) is shown as follows:
[0117] DiffPicOrderCnt(picA, picB) = PicOrderCnt(picA) - PicOrderCnt(picB) Furthermore, in deriving the flag dmvrFlag that specifies whether or not to perform DMVR processing, one of the conditions for setting dmvrFlag to 1 is that the value of RefPicIsScaled[0][refIdxL0] described above is 0 and the value of RefPicIsScaled[1][refIdxL1] is 0. When the value of dmvrFlag is set to 1, DMVR processing is performed by the DMVR unit 30375.
[0118] Furthermore, in deriving the flag dmvrFlag that specifies whether or not to perform DMVR processing, one of the conditions for setting dmvrFlag to 1 is that ciip_flag is 0, that is, IntraInter composition processing is not applied.
[0119] Furthermore, in deriving the flag dmvrFlag that specifies whether or not to perform DMVR processing, one of the conditions for setting dmvrFlag to 1 is that luma_weight_l0_flag[i], which is a flag indicating whether or not coefficient information for weighted prediction of luminance L0 prediction, described later, is present, is 0, and the value of luma_weight_l1_flag[i], which is a flag indicating whether or not coefficient information for weighted prediction of luminance L1 prediction, is present, is 0. When the value of dmvrFlag is set to 1, DMVR processing by the DMVR unit 30375 is performed.
[0120] In deriving the flag dmvrFlag that specifies whether to perform DMVR processing, one of the conditions for setting dmvrFlag to 1 may include that luma_weight_l0_flag[i] is 0, the value of luma_weight_l1_flag[i] is 0, and chroma_weight_l0_flag[i], a flag indicating whether coefficient information for weighted prediction of chroma L0 prediction (described later), is present, is 0, and the value of chroma_weight_l1_flag[i], a flag indicating whether coefficient information for weighted prediction of chroma L1 prediction, is present, is 0. When the value of dmvrFlag is set to 1, DMVR processing by the DMVR unit 30375 is performed.
[0121] (Prof) Also, if the value of RefPicIsScaled[0][refIdxLX] is 1 or the value of RefPicIsScaled[1][refIdxLX] is 1, the value of cbProfFlagLX is set to FALSE (=0). Here, cbProfFlagLX is a flag that specifies whether or not to perform Prediction refinement (PROF) of affine prediction.
[0122] (AMVP Prediction) Fig. 10 is a schematic diagram showing the configuration of the AMVP prediction parameter derivation unit 3032 according to this embodiment. The AMVP prediction parameter derivation unit 3032 includes a vector candidate derivation unit 3033 and a vector candidate selection unit 3034. The vector candidate derivation unit 3033 derives predictor vector candidates from the motion vectors of decoded adjacent blocks stored in the prediction parameter memory 307 based on refIdxLX, and stores the candidates in a predictor vector candidate list mvpListLX[].
[0123] The vector candidate selection unit 3034 selects, as mvpLX, the motion vector mvpListLX[mvp_LX_idx] indicated by 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.
[0124] (MV Addition Unit) The MV addition unit 3038 calculates mvLX by adding the mvpLX input from the AMVP prediction parameter derivation unit 3032 and the decoded mvdLX. The addition unit 3038 outputs the calculated mvLX to the inter predicted image generation unit 309 and the prediction parameter memory 307.
[0125] mvLX[0] = mvpLX[0] + mvdLX[0] mvLX[1] = mvpLX[1] + mvdLX[1] (Detailed classification of sub-block merging) The types of prediction processing related to sub-block merging are summarized below. As described above, they are broadly divided into merge prediction and AMVP prediction.
[0126] Merge predictions are further categorized as follows:
[0127] Normal merge prediction (block-based merge prediction) Sub-block merge prediction Sub-block merge prediction is further categorized as follows:
[0128] Sub-block prediction (ATMVP) Affine prediction Inferred affine prediction Constructed affine prediction On the other hand, AMVP prediction is categorized as follows:
[0129] AMVP (translational) MVD affine prediction MVD affine prediction is further classified as follows:
[0130] 4-parameter MVD affine prediction 6-parameter MVD affine prediction Note that MVD affine prediction refers to affine prediction that uses a decoded difference vector.
[0131] In sub-block prediction, similarly to the temporal merge derivation process, the availability of the co-located sub-block COL of the target sub-block (availableFlagSbCol) is determined, and if it is available, prediction parameters are derived. At least when the above-mentioned SliceTemporalMvpEnabledFlag is 0, availableFlagSbCol is set to 0.
[0132] MMVD prediction (Merge with Motion Vector Difference) may be classified as merge prediction or AMVP prediction. In the former case, mmvd_flag and MMVD-related syntax elements are decoded when merge_flag=1, and in the latter case, mmvd_flag and MMVD-related syntax elements are decoded when merge_flag=0.
[0133] The loop filter 305 is a filter provided in the encoding loop that removes block distortion and ringing distortion to improve image quality. The loop filter 305 applies filters such as a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the adder 312.
[0134] The reference picture memory 306 stores the decoded image of the CU in a predetermined location for each current picture and current CU.
[0135] 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.
[0136] The predicted image generation unit 308 receives as input 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 predicted image of a block or sub-block using the parameters and a reference picture (reference picture block) in the prediction mode indicated by predMode. Here, a reference picture block is a set of pixels on a reference picture (usually rectangular, and therefore referred to as a block), and is an area referenced to generate a predicted image.
[0137] (Inter-prediction image generation unit 309) When predMode indicates inter-prediction mode, the inter-prediction image generation unit 309 generates a prediction image of a block or sub-block by inter-prediction using the inter-prediction parameters and reference picture input from the inter-prediction parameter derivation unit 303.
[0138] 11 is a schematic diagram showing the configuration of an inter-prediction image generation unit 309 included in the prediction image generation unit 308 according to this embodiment. The inter-prediction image generation unit 309 includes a motion compensation unit (prediction image generation device) 3091 and a synthesis unit 3095. The synthesis unit 3095 includes an intra-inter synthesis unit 30951, a GPM synthesis unit 30952, a BDOF unit 30954, and a weighted prediction unit 3094.
[0139] (Motion Compensation) The motion compensation unit 3091 (interpolated image generation unit 3091) generates an interpolated image (motion-compensated image) by reading a reference block from the reference picture memory 306 based on the inter-prediction parameters (predFlagLX, refIdxLX, mvLX) input from the inter-prediction parameter derivation unit 303. The reference block is a block located at a position shifted by mvLX from the position of the current block on the reference picture RefPicLX specified by refIdxLX. Here, if mvLX does not have integer precision, an interpolated image is generated by applying a filter called a motion compensation filter, which is used to generate pixels at decimal positions.
[0140] The motion compensation unit 3091 first derives the integer position (xInt, yInt) and phase (xFrac, yFrac) corresponding to the coordinates (x, y) in the prediction block using the following equations.
[0141] xInt = xPb+(mvLX[0]>>(log2(MVPREC)))+x xFrac = mvLX[0]&(MVPREC-1) yInt = yPb+(mvLX[1]>>(log2(MVPREC)))+y yFrac = mvLX[1]&(MVPREC-1) Here, (xPb, yPb) are the upper left coordinates of a bW*bH size block, x=0...bW-1, y=0...bH-1, and MVPREC indicates the accuracy of mvLX (1 / MVPREC pixel accuracy). For example, MVPREC=16.
[0142] The motion compensation unit 3091 derives the temporary image temp[][] by performing horizontal interpolation on the reference picture refImg using an interpolation filter. In the following, Σ is the sum over k, where k=0..NTAP-1, shift1 is a normalization parameter that adjusts the value range, and offset1=1<<(shift1-1).
[0143] 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).
[0144] Pred[x][y] = (ΣmcFilter[yFrac][k]*temp[x][y+k-NTAP / 2+1]+offset2)>>shift2 In the case of bi-prediction, the above Pred[][] is derived for each L0 list and L1 list (called interpolated images PredL0[][] and PredL1[][]), and the interpolated image Pred[][] is generated from PredL0[][] and PredL1[][].
[0145] The motion compensation unit 3091 has the function of scaling the interpolated image according to the horizontal scaling ratio RefPicScale[i][j][0] of the reference picture and the vertical scaling ratio RefPicScale[i][j][1] of the reference picture derived by the scale parameter derivation unit 30378.
[0146] The synthesis unit 3095 includes an IntraInter synthesis unit 30951, a GPM synthesis unit 30952, a weighted prediction unit 3094, and a BDOF unit 30954.
[0147] (Interpolation filter processing) The following describes the interpolation filter processing performed by the predicted image generation unit 308 when the above-described resampling is applied and the size of the reference picture changes within a single sequence. Note that this processing may also be performed by the motion compensation unit 3091, for example.
[0148] When the value of RefPicIsScaled[i][j] input from the inter prediction parameter derivation unit 303 indicates that the reference picture is scaled, the predicted image generation unit 308 switches between multiple filter coefficients and performs interpolation filter processing.
[0149] (IntraInter Synthesis Processing) The intrainter synthesis unit 30951 generates a predicted image by weighting the inter predicted image and the intra predicted image.
[0150] If the flag ciip_flag indicating whether to apply IntraInter synthesis processing is 1, the pixel value predSamplesComb[x][y] of the predicted image is derived as follows.
[0151] predSamplesComb[x][y] = (w * predSamplesIntra[x][y] + (4 - w) * predSamplesInter[x][y] + 2) >> 2 where predSamplesIntra[x][y] is the intra-predicted image, restricted to planar prediction. predSamplesInter[x][y] is the reconstructed inter-predicted image.
[0152] The weight w is derived as follows:
[0153] If the bottommost left adjacent block and the rightmost upper adjacent block of the current coding block are both intra, w is set to 3.
[0154] Otherwise, if both the bottommost left-neighboring block and the rightmost upper-neighboring block of the current coding block are not intra, w is set to 1.
[0155] Otherwise, w is set to 2.
[0156] (GPM Synthesis Processing) The GPM synthesis unit 30952 generates a predicted image using the above-described GPM prediction.
[0157] (BDOF Prediction) Next, details of BDOF prediction (Bi-Directional Optical Flow, BDOF processing) performed by the BDOF unit 30954 will be described. In bi-prediction mode, the BDOF unit 30954 generates a predicted image by referring to two predicted images (a first predicted image and a second predicted image) and a gradient correction term bdofOffset. Specifically, the DMVR unit 30375 sets bdofFlag=1 if all of the following expressions are true, and sets it to 0 otherwise.
[0158] ph_disable_bdof_flag == 0 predFlagL0 == 1 and predFlagL1 == 1 DiffPicOrderCnt(currPic, RefPicList[0][refIdxL0]) == DiffPicOrderCnt(RefPicList[1][refIdxL1], currPic). RefPicList[0][refIdxL0] and RefPicList[1][refIdxL1] are short-term reference pictures. MotionModelIdc == 0 merge_subblock_flag == 0 sym_mvd_flag == 0 ciip_flag == 0 BcwIdx == 0 luma_weight_l0_flag[refIdxL0] == 0 and luma_weight_l1_flag[refIdxL1] == 0 chroma_weight_l0_flag[refIdxL0] == 0 and chroma_weight_l1_flag[refIdxL1] == 0 cbWidth >= 8 cbHeight >= 8 cbHeight * cbWidth >= 128 RprConstraintsActive[0][refIdxL0] == 0 and RprConstraintsActive[1][refIdxL1] == 0 cIdx == 0 BDOF performs the following processing when bdofFlag is 1 (at least when ph_disable_bdor_flag is 0).・Gradient derivation gradientHL0[x][y] = (predSamplesL0[hx+1][vy] >> shift1) - (predSamplesL0[hx-1][vy] >> shift1) gradientVL0[x][y] = (predSamplesL0[hx][vy+1] >> shift1) - (predSamplesL0[hx][vy-1] >> shift1) gradientHL1[x][y] = (predSamplesL1[hx+1][vy] >> shift1) - (predSamplesL1[hx-1][vy] >> shift1) gradientVL1[x][y] =(predSamplesL1[hx][vy + 1] >> shift1) - (predSamplesL1[hx][vy - 1] >> shift1) - Prediction image difference derivation diff[x][y] = (predSamplesL0[hx][vy] >> shift2) - (predSamplesL1[hx][vy] >> shift2) tempH[x][y] = (gradientHL0[x][y] + gradientHL1[x][y]) >> shift3 tempV[x][y] = (gradientVL0[x][y] + gradientVL1[x][y]) >> shift3 - Gradient correlation value derivation sGx2 = ΣiΣj Abs(tempH[xSb + i][ySb + j]) with i, j = -1..4 sGy2 = ΣiΣj Abs(tempV[xSb + i][ySb + j]) with i, j = -1..4 sGxGy = ΣiΣj(Sign(tempV[xSb + i][ySb + j]) * tempH[xSb + i][ySb + j]) with i, j = -1..4 sGxdI = ΣiΣj(-Sign(tempH[xSb + i][ySb + j]) * diff[xSb + i][ySb + j]) with i, j = -1..4 sGydI = ΣiΣj(-Sign(tempV[xSb + i][ySb + j]) * diff[xSb + i][ySb + j]) with i, j = -1..4 - Derivation of corrected motion vectors vx, vy vx = sGx2 > 0? Clip3(-mvRefineThres + 1, mvRefineThres - 1, (sGxdI << 2) >> Floor(Log2(sGx2))) : 0 vy = sGy2 > 0? Clip3(-mvRefineThres + 1, mvRefineThres - 1, ((sGydI << 2)-((vx * sGxGy) >> 1)) >> Floor(Log2(sGy2))) : 0 - Derivation of correction term bdofOffset = vx * (gradientHL0[x + 1][y + 1] - gradientHL1[x + 1][y + 1]) + vy * (gradientVL0[x + 1][y + 1] -gradientVL1[x+1][y+1]) ・Predicted image derivation pbSamples[x][y] = Clip3(0, (2^BitDepth) - 1, (predSamplesL0[x+1][y+1] + offset4 + predSamplesL1[x+1][y+1] + bdofOffset) >> shift4) (Weighted prediction) The weighted prediction unit 3094 generates a predicted image pbSamples of the block from the interpolated image predSamplesLX.
[0159] First, the variable weightedPredFlag, which indicates whether or not weighted prediction processing is performed, is derived as follows: if slice_type is equal to P, weightedPredFlag is set equal to pps_weighted_pred_flag defined in PPS. Otherwise, if slice_type is equal to B, weightedPredFlag is set equal to pps_weighted_bipred_flag && (!dmvrFlag) defined in PPS.
[0160] Hereinafter, bcw_idx is a weight index for bi-prediction with weights per CU. If bcw_idx is not notified, set bcw_idx = 0. In merge prediction mode, bcwIdx is set to the bcwIdxN of the neighboring block, and in AMVP prediction mode, it is set to the bcw_idx of the current block.
[0161] If the value of the variable weightedPredFlag is equal to 0 or the value of the variable bcwIdx is 0, the predicted image pbSamples is derived as follows, as normal predicted image processing.
[0162] When one of the prediction list usage flags (predFlagL0 or predFlagL1) is 1 (uniprediction) (weighted prediction is not used), the following equation is processed to match predSamplesLX (LX is L0 or L1) to the pixel bit count bitDepth.
[0163] pbSamples[x][y] = Clip3(0,(1<<bitDepth)-1,(predSamplesLX[x][y]+offset1)> >shift1) where shift1=14-bitDepth and offset1=1<<(shift1-1). PredLX is an interpolated image for L0 or L1 prediction.
[0164] Furthermore, when both prediction list usage flags (predFlagL0 and predFlagL1) are 1 (bi-prediction PRED_BI) and weighted prediction is not used, the following equation is processed to average predSamplesL0 and predSamplesL1 and adjust them to the number of pixel bits.
[0165] pbSamples[x][y] = Clip3(0,(1<<bitDepth)-1,(predSamplesL0[x][y]+predSamplesL1[x][y]+offset2)> >shift2) where shift2=15-bitDepth and offset2=1<<(shift2-1).
[0166] If the value of the variable weightedPredFlag is equal to 1 and the value of the variable bcwIdx is equal to 0, the predicted image pbSamples is derived as follows in weighted prediction processing.
[0167] The variable shift1 is set equal to Max(2, 14-bitDepth). The variables log2Wd, o0, o1, w0, and w1 are derived as follows:
[0168] If cIdx is 0 and is luminance, then the following applies:
[0169] log2Wd = luma_log2_weight_denom + shift1 w0 = LumaWeightL0[refIdxL0] w1 = LumaWeightL1[refIdxL1] o0 = luma_offset_l0[refIdxL0] << (bitDepth - 8) o1 = luma_offset_l1[refIdxL1] << (bitDepth - 8) For cases other than (chroma difference where cIdx is not equal to 0), the following applies.
[0170] log2Wd = ChromaLog2WeightDenom + shift1 w0 = ChromaWeightL0[refIdxL0][cIdx - 1] w1 = ChromaWeightL1[refIdxL1][cIdx - 1] o0 = ChromaOffsetL0[refIdxL0][cIdx - 1] << (bitDepth - 8) o1 = ChromaOffsetL1[refIdxL1][cIdx - 1] << (bitDepth - 8) The pixel value pbSamples[x][y] of the predicted image for x = 0..nCbW - 1 and y = 0..nCbH - 1 is derived as follows.
[0171] Next, if predFlagL0 is equal to 1 and predFlagL1 is equal to 0, the pixel value pbSamples[x][y] of the predicted image is derived as follows.
[0172] if (log2Wd >= 1) pbSamples[x][y] = Clip3(0, (1 << bitDepth) - 1, (((predSamplesL0[x][y] * w0 + 2^(log2Wd - 1)) >> log2Wd) + o0)) else pbSamples[x][y] = Clip3(0, (1 << bitDepth) - 1, predSamplesL0[x][y] * w0 + o0) Otherwise, if predFlagL0 is 0 and predFlagL1 is 1, the pixel value pbSamples[x][y] of the predicted image is derived as follows.
[0173] If (log2Wd >= 1), then pbSamples[x][y] = Clip3(0, (1 << bitDepth) - 1, ((predSamplesL1[x][y] * w1 + 2 ^ (log2Wd - 1)) >> log2Wd) + o1); else pbSamples[x][y] = Clip3(0, (1 << bitDepth) - 1, predSamplesL1[x][y] * w1 + o1). Otherwise, if predFlagL0 is equal to 1 and predFlagL1 is equal to 1, the pixel value pbSamples[x][y] of the predicted image is derived as follows.
[0174] pbSamples[x][y] = Clip3(0, (1 << bitDepth) - 1, (predSamplesL0[x][y] * w0 + predSamplesL1[x][y] * w1 + ((o0 + o1 + 1) << log2Wd)) >> (log2Wd + 1)) (BCW prediction). BCW (Bi-prediction with CU-level Weights) prediction is a prediction method that can switch pre-determined weight coefficients at the CU level.
[0175] Input two variables nCbW and nCbH that specify the width and height of the current coding block, two arrays predSamplesL0 and predSamplesL1 of (nCbW) x (nCbH), flags predFlagL0 and predFlagL1 indicating whether to use the prediction list, reference picture indices refIdxL0 and refIdxL1, BCW prediction index bcw_idx, and a variable cIdx that specifies the indices of the luminance and chrominance components, perform BCW prediction processing, and output the pixel values of the predicted image of the array pbSamples of (nCbW) x (nCbH).
[0176] When sps_bcw_enabled_flag, which indicates whether or not this prediction is used at the SPS level, is set to TRUE, the variable weightedPredFlag is set to 0, the reference pictures indicated by the two reference picture indexes refIdxL0 and refIdxL1 do not have weighted prediction coefficients, and the coding block size is equal to or smaller than a certain value, the bcw_idx of the CU-level syntax is explicitly notified and its value is substituted for the variable bcwIdx. If bcw_idx does not exist, 0 is substituted for the variable bcwIdx.
[0177] When the variable bcwIdx is 0, the pixel values of the predicted image are derived as follows.
[0178] pbSamples[x][y] = Clip3(0,(1 << bitDepth)- 1, (predSamplesL0[x][y] + predSamplesL1[x][y] + offset2) >> shift2) else (bcwIdx is not equal to 0), the following applies:
[0179] The variable w1 is set equal to bcwWLut[bcwIdx], where bcwWLut[k] = {4, 5, 3, 10, -2}.
[0180] The variable w0 is set to (8-w1). The pixel values of the predicted image are derived as follows:
[0181] 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 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 merge prediction mode, the inter prediction parameter decoding unit 303 decodes the merge index merge_idx, and the merge candidate derivation unit 30361 derives bcwIdx of each merge candidate. Specifically, the merge candidate derivation unit 30361 uses the weighting coefficients of the neighboring blocks used to derive the merge candidates as the weighting coefficients of the merge candidates to be used for the current block. In other words, in merge mode, the weighting coefficients used in the past are inherited as the weighting coefficients of the current block.
[0182] (Intra-prediction image generation unit 310) When predMode indicates an intra-prediction mode, the intra-prediction image generation unit 310 performs intra-prediction using the intra-prediction parameters input from the intra-prediction parameter derivation unit 304 and reference pixels read from the reference picture memory 306.
[0183] 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.
[0184] The adder 312 generates a decoded image for the block by adding, for each pixel, the predicted image for the block input from the predicted image generation unit 308 and the prediction error input from the inverse quantization and inverse transform unit 311. The adder 312 stores the decoded image for the block in the reference picture memory 306 and also outputs it to the loop filter 305.
[0185] 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.
[0186] The adder 312 generates a decoded image for the block by adding, for each pixel, the predicted image for the block input from the predicted image generation unit 308 and the prediction error input from the inverse quantization and inverse transform unit 311. The adder 312 stores the decoded image for the block in the reference picture memory 306 and also outputs it to the loop filter 305.
[0187] (Configuration of Video Encoding Device) Next, the configuration of the video encoding device 11 according to this embodiment will be described. Fig. 12 is a block diagram showing the configuration of the video encoding device 11 according to this embodiment. The video encoding device 11 includes a prediction image generation unit 101, a subtraction unit 102, a transformation / quantization unit 103, an inverse quantization / inverse transformation unit 105, an addition unit 106, a loop filter 107, a prediction parameter memory (prediction parameter storage unit, frame memory) 108, a reference picture memory (reference image storage unit, frame memory) 109, a coding parameter determination unit 110, a parameter encoding unit 111, a prediction parameter derivation unit 120, and an entropy encoding unit 104.
[0188] 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 further description thereof will be omitted.
[0189] 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 / quantization unit 103.
[0190] The transform / quantization unit 103 calculates transform coefficients by frequency transforming the prediction errors input from the subtraction unit 102, and derives quantized transform coefficients by quantizing them. The transform / quantization unit 103 outputs the quantized transform coefficients to the parameter coding unit 111 and the inverse quantization / inverse transform unit 105.
[0191] The inverse quantization and inverse transform unit 105 is the same as the inverse quantization and inverse transform unit 311 (FIG. 6) in the video decoding device 31, and a description thereof will be omitted. The calculated prediction error is output to the adder .
[0192] The parameter coding unit 111 includes a header coding unit 1110, a CT information coding unit 1111, and a CU coding unit 1112 (prediction mode coding unit). The CU coding unit 1112 further includes a TU coding unit 1114. The following describes an outline of the operation of each module.
[0193] The header encoding unit 1110 performs encoding processing of parameters such as header information, division information, prediction information, and quantized transform coefficients.
[0194] The CT information encoding unit 1111 encodes QT, MT (BT, TT) division information and the like.
[0195] The CU encoding unit 1112 encodes CU information, prediction information, division information, and the like.
[0196] When a prediction error is included in a TU, the TU encoding unit 1114 encodes the QP update information and the quantized prediction error.
[0197] The CT information encoding unit 1111 and the CU encoding unit 1112 supply syntax elements such as inter-prediction parameters (predMode, merge_flag, merge_idx, inter_pred_idc, refIdxLX, mvp_LX_idx, mvdLX), intra-prediction parameters (intra_luma_mpm_flag, intra_luma_mpm_idx, intra_luma_mpm_reminder, intra_chroma_pred_mode), and quantized transform coefficients to the parameter encoding unit 111.
[0198] The entropy coding unit 104 receives the quantized transform coefficients and coding parameters (division information, prediction parameters) from the parameter coding unit 111. The entropy coding unit 104 entropy codes these to generate and output a coded stream Te.
[0199] 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.
[0200] (Configuration of inter prediction parameter coding unit) As shown in Fig. 13 , the inter prediction parameter coding unit 112 includes a parameter coding control unit 1121 and an inter prediction parameter derivation unit 303. The inter prediction parameter derivation unit 303 has the same configuration as the video decoding device. The parameter coding control unit 1121 includes a merge index derivation unit 11211 and a vector candidate index derivation unit 11212.
[0201] The merge index derivation unit 11211 derives merge candidates and the like, and outputs them to the inter prediction parameter derivation unit 303. The vector candidate index derivation unit 11212 derives predicted vector candidates and the like, and outputs them to the inter prediction parameter derivation unit 303 and the parameter coding unit 111.
[0202] (Configuration of Intra Prediction Parameter Encoding Unit 113) As shown in Fig. 14, the intra prediction parameter encoding unit 113 includes a parameter encoding control unit 1131 and an intra prediction parameter derivation unit 304. The intra prediction parameter derivation unit 304 has the same configuration as the video decoding device.
[0203] The parameter coding control unit 1131 derives IntraPredModeY and IntraPredModeC. Furthermore, it determines intra_luma_mpm_flag by referring to mpmCandList[ ]. These prediction parameters are output to the intra prediction parameter derivation unit 304 and the parameter coding unit 111.
[0204] However, unlike the video decoding device, the inputs to the inter prediction parameter derivation unit 303 and the intra prediction parameter derivation unit 304 are the coding parameter determination unit 110 and the prediction parameter memory 108 , and they are output to the parameter coding unit 111 .
[0205] The adder 106 generates a decoded image by adding, for each pixel, the pixel values of the predicted block input from the predicted image generation unit 101 and the prediction errors input from the inverse quantization and inverse transform unit 105. The adder 106 stores the generated decoded image in a reference picture memory 109.
[0206] The loop filter 107 performs deblocking filtering, SAO, and ALF on the decoded image generated by the adder 106. Note that the loop filter 107 does not necessarily have to include the above three types of filters, and may be configured with only a deblocking filter, for example.
[0207] 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.
[0208] The reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined location for each current picture and CU.
[0209] The coding parameter determination unit 110 selects one set of coding parameters from among multiple sets of coding parameters. The coding parameters are the above-mentioned QT, BT, or TT division information, prediction parameters, or parameters to be coded that are generated in relation to these. The predicted image generation unit 101 generates a predicted image using these coding parameters.
[0210] The coding parameter determination unit 110 calculates an RD cost value indicating the magnitude of the information amount and the coding error for each of the multiple sets. The RD cost value is, for example, the sum of the code amount and the value obtained by multiplying the squared error by a coefficient λ. The code amount is the information amount of the coded stream Te obtained by entropy coding the quantization error and the coding parameters. The squared error is the sum of the squares of the prediction errors calculated by the subtraction unit 102. The coefficient λ is a preset real number greater than zero. The coding parameter determination unit 110 selects the set of coding parameters that minimizes the calculated cost value. The coding parameter determination unit 110 outputs the determined coding parameters to the parameter coding unit 111 and the prediction parameter derivation unit 120.
[0211] Note that a portion of the video encoding device 11 and the video decoding device 31 in the above-described embodiments, such as the entropy decoding unit 301, the parameter decoding unit 302, the loop filter 305, the predicted image generation unit 308, the inverse quantization / inverse transform unit 311, the adder 312, the prediction parameter derivation unit 320, the predicted image generation unit 101, the subtractor 102, the transform / quantization unit 103, the entropy encoding unit 104, the inverse quantization / inverse transform unit 105, the loop filter 107, the encoding parameter determination unit 110, the parameter encoding unit 111, and the prediction parameter derivation unit 120, may be implemented by a computer. In this case, a program for implementing this control function may be recorded on a computer-readable recording medium, and the program may be read and executed by a computer system. Note that the term "computer system" used here refers to a computer system built into either the video encoding device 11 or the video decoding device 31, and includes hardware such as an OS and peripheral devices. Furthermore, "computer-readable recording media" refers to portable media such as flexible disks, optical magnetic disks, ROMs, and CD-ROMs, as well as storage devices such as hard disks built into computer systems. Furthermore, "computer-readable recording media" may also include devices that dynamically store programs for a short period of time, such as communication lines used when transmitting programs over networks like the Internet or communication lines like telephone lines, or devices that store programs for a fixed period of time, such as volatile memory within computer systems that serve as servers or clients in such cases. Furthermore, the programs may be programs that realize some of the aforementioned functions, or may be programs that can realize the aforementioned functions in combination with programs already stored in the computer system.
[0212] Furthermore, part or all of the video encoding device 11 and video decoding device 31 in the above-described embodiments may be realized as an integrated circuit such as an LSI (Large Scale Integration). Each functional block of the video encoding device 11 and video decoding device 31 may be individually implemented as a processor, or part or all of them may be integrated into a processor. Furthermore, the integrated circuit implementation method is not limited to LSI, and may be implemented using a dedicated circuit or a general-purpose processor. Furthermore, if an integrated circuit implementation technology that can replace LSI emerges due to advances in semiconductor technology, an integrated circuit based on that technology may be used.
[0213] One embodiment of the present invention has been described in detail above with reference to the drawings, but the specific configuration is not limited to that described above, and various design changes and the like are possible within the scope that does not deviate from the gist of the present invention.
[0214] (Syntax) FIG. 15(a) shows a part of the syntax of the Sequence Parameter Set (SPS) of Non-Patent Document 1.
[0215] sps_long_term_ref_pics_flag is a flag indicating whether long-term pictures are used or not.
[0216] sps_inter_layer_ref_pics_present_flag is a flag indicating whether inter-layer prediction is used or not.
[0217] sps_idr_rpl_present_flag is a flag indicating whether or not a reference picture list syntax element is present in the slice header of an IDR picture (Instantaneous Decoding Refresh picture).
[0218] sps_rpl1_same_as_rpl0_flag is a flag indicating whether information for reference picture list 1 exists. When sps_rpl1_same_as_rpl0_flag is 1, it indicates that information for reference picture list 1 is not coded or decoded as coded data, and information in reference picture list 0 is used. Specifically, it indicates that the number of reference picture list information ref_pic_lists() for reference picture list 1, sps_num_ref_pic_lists[1], and the reference picture list structure ref_pic_list_struct(1,rplsIdx) are the same values as sps_num_ref_pic_lists[0] and ref_pic_list_struct(0,rplsIdx).
[0219] Specifically, when sps_rpl1_same_as_rpl0_flag is 1, the video decoding device and the video encoding device set the following.
[0220] sps_num_ref_pic_lists[1] = sps_num_ref_pic_lists[0] Also, for rplsIdx from 0 to sps_num_ref_pic_lists[ 0 ] - 1, set each value of ref_pic_list_struct( 1, rplsIdx ) to each value of ref_pic_list_struct( 0, rplsIdx ).
[0221] sps_num_ref_pic_lists[i], where listIdx is equal to i, indicates the number of ref_pic_list_struct (listIdx, rplsIdx) included in the SPS. listIdx is a value of 0 or 1 indicating reference picture list 0 or reference picture list 1, respectively, and the value of sps_num_ref_pic_lists[i] is in the range of 0 to 64.
[0222] In SPS, if sps_rpl1_same_as_rpl0_flag is 1, only i = 0 corresponding to reference picture list 0 is coded and decoded, and if sps_rpl1_same_as_rpl0_flag is 0, sps_num_ref_pic_lists[i] ref_pic_list_struct(i, j) are coded and decoded for i = 0 and 1 corresponding to two reference picture lists.
[0223] FIG. 15(b) shows a part of the syntax of the Picture Parameter Set (PPS) in Non-Patent Document 1.
[0224] The pps_no_pic_partition_flag is a flag indicating that picture partitioning is not applied to each picture that references the PPS.
[0225] pps_rpl1_idx_present_flag is a flag indicating the presence of the syntax elements rpl_sps_flag[1] and rpl_idx[1] in ref_pic_lists() called in the picture header PH or slice header.
[0226] pps_rpl_info_in_ph_flag is a flag indicating whether reference picture list information is present in the picture header PH. When pps_no_pic_partition_flag, which is a flag indicating that picture partitioning is not applied to the picture, is 0, the presence of pps_no_pic_partition_flag and pps_rpl_info_in_ph_flag equal to 1 indicates that reference picture list information is present in the picture header. The presence of rpl_info_in_ph_flag equal to 0 indicates that reference picture list information is not present in the picture header, but may be present in the slice header.
[0227] FIG. 16(a) shows a part of the syntax of the picture header PH in Non-Patent Document 1.
[0228] ph_inter_slice_allowed_flag is a flag indicating whether slices in a picture are inter. If ph_inter_slice_allowed_flag is 0, it indicates that the slice_type of all slices in the picture is 2 (I Slice). If ph_inter_slice_allowed_flag is 1, it indicates that the slice_type of at least one slice included in the picture is 0 (B Slice) or 1 (P Slice).
[0229] If the flag pps_rpl_info_in_ph_flag indicating that reference picture list information exists in the picture header PH is 1, ref_pic_lists() that defines the reference picture list is called in the picture header PH for decoding or encoding.
[0230] If ph_inter_slice_allowed_flag is 1 and pps_rpl_info_in_ph_flag is 0, or if num_ref_entries[1][RplsIdx[1]], which represents the number of reference pictures in list 1, is greater than 1, ph_mvd_l1_zero_flag, a flag indicating whether to apply a mode that sets the motion vector difference to zero in L1 prediction of bidirectional prediction, is coded and decoded.
[0231] 16(b) shows part of the syntax of the slice header in Non-Patent Document 1. These syntaxes are decoded by the parameter decoding unit 302, for example.
[0232] If pps_rpl_info_in_ph_flag is 0 and the NAL unit type nal_unit_type is neither IDR_W_RADL nor IDR_N_LP, which are IDRs, or if the flag sps_idr_rpl_present_flag indicating that the reference picture list syntax element is present in the slice header of the IDR picture is 1, then ref_pic_lists(), which defines the reference picture list, is called in the slice header.
[0233] Note that if sps_idr_rpl_present_flag is equal to 0 and nal_unit_type is equal to IDR_W_RADL or IDR_N_LP, then the reference picture lists RefPicList[0] and RefPicList[1] are both derived to be empty, i.e. containing 0 entries, and for i=0 and 1, the value of the variable RplsIdx[i] is inferred to be equal to sps_num_ref_pic_lists[i], the value of num_ref_entries[i][RplsIdx[i]] is inferred to be equal to 0, and the value of the variable NumRefIdxActive[i], which is the number of reference pictures actually used, is inferred to be 0.
[0234] Figure 17(a) shows the syntax of ref_pic_lists(), which defines a reference picture list in this embodiment. ref_pic_lists() may be present in a picture header or a slice header, as shown in Figure 16. ref_pic_lists() may include rpl_sps_flag[i], rpl_idx[i], and ref_pic_list_struct() for i = 0, 1. In other words, a video encoding device or a video decoding device encodes or decodes rpl_sps_flag[i], rpl_idx[i], and ref_pic_list_struct() for i = 0, 1.
[0235] rpl_sps_flag[i] is a flag indicating that the reference picture list structure is selected based on ref_pic_list_struct(listIdx, rplsIdx) encoded and decoded in SPS, where listIdx is equal to i.
[0236] If rpl_sps_flag[i] is 1, it indicates that one of the ref_pic_list_struct (listIdx, rplsIdx) in the SPS is used as the reference picture list i used by the corresponding picture or slice in ref_pic_lists().
[0237] When rpl_sps_flag[i] is 0, it indicates that the reference picture list i used in the corresponding picture or slice is derived directly based on ref_pic_list_struct(listIdx, rplsIdx). In other words, when rpl_sps_flag[i] is 0, the video encoder encodes ref_pic_list_struct(listIdx = i, rplsIdx = sps_num_ref_pic_lists[i]) as the reference picture structure of reference picture list i, and the video decoder decodes ref_pic_list_struct(listIdx = i, rplsIdx = sps_num_ref_pic_lists[i]).
[0238] If rpl_sps_flag[i] is not present, the following applies: If sps_num_ref_pic_lists[i] is 0, then the value of rpl_sps_flag[i] is inferred to be 0. Otherwise (if num_ref_pic_lists_in_sps[i] is greater than 0), if pps_rpl1_idx_present_flag is 0 and i is equal to 1, then the value of rpl_sps_flag[1] is inferred to be equal to rpl_sps_flag[0].
[0239] rpl_idx[i] is used to derive an index rplsIdx into the SPS encoded and decoded ref_pic_list_struct (listIdx, rplsIdx), where listIdx is equal to i. rpl_idx[i] is represented as Ceil(Log2(sps_num_ref_pic_lists[i])) bits. The value of rpl_idx[i] is in the range of 0 to sps_num_ref_pic_lists[i]-1. If rpl_idx[i] does not exist, if rpl_sps_flag[i] is equal to 1 and pps_rpl1_idx_present_flag is equal to 0, the value of rpl_idx[1] is inferred to be equal to rpl_idx[0]; otherwise, the value of rpl_idx[1] is inferred to be 0.
[0240] The variable RplsIdx[i], which is the index rplsIdx of the reference picture structure ref_pic_list_struct (listIdx, rplsIdx) used in the current picture or slice, is derived as follows.
[0241] RplsIdx[i]=(rpl_sps_flag[i])? rpl_idx[i]: num_ref_pic_lists_in_sps[i] (Equation 1) In other words, if rpl_sps_flag[i] is 1, the index rpl_idx[i] (0<=rpl_idx<=num_ref_pic_lists_in_sps[i]-1) indicating the reference picture structure coded and decoded using SPS is used. On the other hand, if rpl_sps_flag[i] is 0, the index num_ref_pic_lists_in_sps[i] indicating the reference picture structure coded and decoded using PH or SH is used.
[0242] FIG. 17(b) shows the syntax that defines the reference picture list structure ref_pic_list_struct (listIdx, rplsIdx) of this embodiment.
[0243] ref_pic_list_struct(listIdx, rplsIdx) may exist in an SPS, picture header, or slice header. Depending on whether the syntax is included in an SPS, picture header, or slice header, the following applies: If it exists in a picture or slice header, ref_pic_list_struct(listIdx, rplsIdx) indicates the reference picture list listIdx of the current picture (the picture containing the slice). If it exists in an SPS, ref_pic_list_struct(listIdx, rplsIdx) indicates candidates for the reference picture list listIdx. The current picture then references the list of ref_pic_list_struct(listIdx, rplsIdx) included in the SPS by index value from its picture header or slice header. In the ref_pic_list_struct, num_ref_entries, ltrp_in_header_flag, st_ref_pic_flag, abs_delta_poc_st, strp_entry_sign_flag, and ilrp_idx are encoded or decoded.
[0244] Here, num_ref_entries[listIdx][rplsIdx] indicates the number of reference pictures in the reference picture list of ref_pic_list_struct (listIdx, rplsIdx), i.e., the reference picture list listIdx of index rpsIdx. The value of num_ref_entries[listIdx][rplsIdx] is greater than or equal to 0 and less than MaxDpbSize+13. MaxDpbSize is the number of decoded pictures determined by the profile level.
[0245] ltrp_in_header_flag[listIdx][rplsIdx] is a flag indicating whether or not a long-term reference picture exists in the reference picture list of ref_pic_list_struct (listIdx, rplsIdx).
[0246] inter_layer_ref_pic_flag[listIdx][rplsIdx][i] is a flag indicating whether the i-th entry in the reference picture list of ref_pic_list_struct (listIdx, rplsIdx) is inter-layer predicted or not.
[0247] st_ref_pic_flag[listIdx][rplsIdx][i] is a flag indicating whether the i-th entry in the reference picture list of ref_pic_list_struct (listIdx, rplsIdx) is a short-term reference picture.
[0248] abs_delta_poc_st[listIdx][rplsIdx][i] is a syntax element for deriving the absolute difference value of the POC of a short-term reference picture.
[0249] strp_entry_sign_flag[listIdx][rplsIdx][i] is a flag for deriving a positive or negative sign.
[0250] rpls_poc_lsb_lt[listIdx][rplsIdx][i] is a syntax element for deriving the POC of the i-th long-term reference picture in the reference picture list of ref_pic_list_struct(listIdx, rplsIdx).
[0251] ilrp_idx[listIdx][rplsIdx][i] is a syntax element for deriving layer information of the i-th inter-layer prediction reference picture in the reference picture list of ref_pic_list_struct (listIdx, rplsIdx).
[0252] A problem with the above configuration, which is also used in Non-Patent Document 1, is that there are deficiencies in the syntax and semantics related to ref_pic_lists() that defines the reference picture list.
[0253] The first problem is that the reference picture list structure of reference picture list 1 becomes indefinite under the following conditions:
[0254] Specifically, a problem occurs when sps_rpl1_same_as_rpl0_flag, which is a flag indicating whether information for reference picture list 1 exists, is 0, and in the following cases: For sps_num_ref_pic_lists[i], the value of sps_num_ref_pic_lists[0] is greater than sps_num_ref_pic_lists[1], pps_rpl1_idx_present_flag is 0, rpl_sps_flag[0] is 1, and rpl_idx[0] is greater than or equal to sps_num_ref_pic_lists[1] and less than or equal to sps_num_ref_pic_lists[0]-1. Here, sps_num_ref_pic_lists[i] indicates the number of reference picture list structures ref_pic_list_struct(listIdx, rplsIdx) to be coded and decoded in SPS. pps_rpl1_idx_present_flag is a flag indicating whether the syntax elements rpl_sps_flag[1] and rpl_idx[1] are present in the picture header PH or the ref_pic_lists() called in the slice header. rpl_sps_flag[0] is a flag indicating that the reference picture list structure is selected based on the ref_pic_list_struct(0, rplsIdx) coded and decoded in the SPS. rpl_idx[0] is an index used to derive an index to the ref_pic_list_struct(listIdx, rplsIdx) coded and decoded in the SPS.
[0255] Under the above conditions, since pps_rpl1_idx_present_flag is 0, the values of rpl_sps_flag[1] and rpl_idx[1] are copied from rpl_sps_flag[0] and rpl_idx[0], respectively. However, if the value of rpl_idx[0] is greater than or equal to sps_num_ref_pic_lists[1] and less than or equal to sps_num_ref_pic_lists[0]-1, this exceeds the range of 0 to sps_num_ref_pic_lists[1]-1 that rpl_idx[1] can take. And, if rpl_sps_flag[1] is 1, the value of rpl_idx[0] is assigned to the variable RplsIdx[1].
[0256] In this case, the reference picture structure ref_pic_list_struct(1, rplsIdx) referenced by rplsIdx does not exist because it is outside the range of reference picture structures defined by the SPS (0..sps_num_ref_pic_lists[1]-1).
[0257] rplsIdx = RplsIdx[1] = rpl_idx[1] = rpl_idx[0] >= sps_num_ref_pic_lists[1] As a result, a defect occurs in which an index value that does not exist in the reference picture list structure coded and decoded in SPS is derived.
[0258] For example, assume that sps_rpl1_same_as_rpl0_flag = 0 sps_num_ref_pic_lists[0] = 5 sps_num_ref_pic_lists[1] = 3 pps_rpl1_idx_present_flag = 0 rpl_sps_flag[0] = 1 rpl_idx[0] = 4. According to the above explanation, rpl_sps_flag[1] = 1, rpl_idx[1] = 4, and RplsIdx[1] = 4 are derived, but since sps_num_ref_pic_lists[1] is 3, there is no reference picture list structure that corresponds to the above rplsIdx = RplsIdx[1] = 4.
[0259] In this embodiment, the following method is disclosed to solve the above problem. Specifically, the following additions or modifications are made to the above configuration.
[0260] The first method is to add the following condition to the semantics of sps_num_ref_pic_lists[i]:
[0261] sps_num_ref_pic_lists[0] must be less than or equal to sps_num_ref_pic_lists[1].
[0262] In other words, sps_num_ref_pic_lists[1] must be greater than sps_num_ref_pic_lists[0].
[0263] By adding such a constraint, the value of rpl_idx[0] that can be selected as the reference picture list structure of reference picture list 1 (a value less than or equal to sps_num_ref_pic_lists[0]-1) will no longer be greater than or equal to sps_num_ref_pic_lists[1], thereby solving the problem.
[0264] Adding a condition as semantics means that encoded data that satisfies the added condition is encoded by a video encoding device and decoded by a video decoding device.
[0265] In addition to the above, the encoded data may also satisfy the following conditions:
[0266] If sps_rpl1_same_as_rpl0_flag is 0, sps_num_ref_pic_lists[0] must be less than or equal to sps_num_ref_pic_lists[1].
[0267] If sps_rpl1_same_as_rpl0_flag is 0 and pps_rpl1_idx_present_flag is 0, sps_num_ref_pic_lists[0] must be less than or equal to sps_num_ref_pic_lists[1].
[0268] In the above example, sps_num_ref_pic_lists[1] may also be set to a value greater than sps_num_ref_pic_lists[0].
[0269] As a second method, the following condition is added as the semantics of pps_rpl1_idx_present_flag:
[0270] If sps_rpl1_same_as_rpl0_flag is 0, pps_rpl1_idx_present_flag must not be 0.
[0271] In other words, if pps_rpl1_idx_present_flag is 0, sps_rpl1_same_as_rpl0_flag must not be 0.
[0272] By adding such a constraint, it becomes possible to set pps_rpl1_idx_present_flag to 0 only when list 0 and list 1 have the same reference picture list structure, thereby solving the problem.
[0273] As a third method, the following condition is added as the semantics of pps_rpl1_idx_present_flag:
[0274] If the value of sps_num_ref_pic_lists[0] is greater than the value of sps_num_ref_pic_lists[1], pps_rpl1_idx_present_flag must not be 0.
[0275] By adding such a constraint, it becomes possible to set pps_rpl1_idx_present_flag to 0 only when the value of sps_num_ref_pic_lists[0] is less than or equal to the value of sps_num_ref_pic_lists[1], thereby solving the problem.
[0276] Furthermore, the following condition may also be satisfied:
[0277] If the value of sps_num_ref_pic_lists[0] is greater than the value of sps_num_ref_pic_lists[1], sps_rpl1_same_as_rpl0_flag must not be 0.
[0278] If the value of sps_num_ref_pic_lists[0] is greater than the value of sps_num_ref_pic_lists[1], sps_rpl1_same_as_rpl0_flag=0 and pps_rpl1_idx_present_flag=0 must not be true.
[0279] As a fourth method, the semantics of rpl_sps_flag[i] is set as follows:
[0280] If rpl_sps_flag[i] is not present, the following applies: If sps_num_ref_pic_lists[i] is 0, then the value of rpl_sps_flag[i] is inferred to be 0. Otherwise (num_ref_pic_lists_in_sps[i] is greater than 0), if pps_rpl1_idx_present_flag is 0, and i is equal to 1, and rpl_sps_flag[0] is 1, and the value of sps_num_ref_pic_lists[0] is less than or equal to the value of sps_num_ref_pic_lists[1], then the value of rpl_sps_flag[1] is inferred to be equal to rpl_sps_flag[0]. Otherwise, rpl_sps_flag[i] is inferred to be 0.
[0281] Alternatively, the following condition may be satisfied: If rpl_sps_flag[i] is not present, the following applies: If sps_num_ref_pic_lists[i] is 0, then the value of rpl_sps_flag[i] is inferred to be 0. If rpl_sps_flag[i] (i != 0) is not present and num_ref_pic_lists_in_sps[i] is greater than 0, then if pps_rpl1_idx_present_flag is 0, and rpl_sps_flag[0] is 1, and the value of sps_num_ref_pic_lists[0] is less than or equal to the value of sps_num_ref_pic_lists[1], then the value of rpl_sps_flag[1] is inferred to be equal to rpl_sps_flag[0]. Otherwise, rpl_sps_flag[i] is inferred to be 0.
[0282] By adopting such semantics, when pps_rpl1_idx_present_flag is 0, the issue can be resolved by determining rpl_sps_flag[1] taking into account the magnitude of the values of sps_num_ref_pic_lists[0] and sps_num_ref_pic_lists[1].
[0283] As a fifth method, the semantics of rpl_idx[0] is set as follows:
[0284] If pps_rpl1_idx_present_flag is 0, the value range of rpl_idx[0] is 0 to min(sps_num_ref_pic_lists[0], sps_num_ref_pic_lists[1])-1. The syntax element rpl_idx[0] is expressed using Ceil(Log2(min(sps_num_ref_pic_lists[0], sps_num_ref_pic_lists[1]))) bits. Otherwise (pps_rpl1_idx_present_flag is 1), the value range of rpl_idx[i] is 0 to sps_num_ref_pic_lists[i]-1. The syntax element rpl_idx[i] is expressed using Ceil(Log2(sps_num_ref_pic_lists[i]))) bits.
[0285] By using this semantics, when pps_rpl1_idx_present_flag is 0, the issue can be resolved by limiting the value range of rpl_idx[1], taking into account the size of the values of sps_num_ref_pic_lists[0] and sps_num_ref_pic_lists[1].
[0286] As a sixth method, the semantics of rpl_idx[i] is as follows:
[0287] If rpl_idx[0] does not exist, the value of rpl_idx[0] is assumed to be 0.
[0288] If rpl_idx[1] is not present, the value of rpl_idx[1] is inferred to be equal to rpl_idx[0] if rpl_sps_flag[0] is equal to 1, pps_rpl1_idx_present_flag is equal to 0, and the value of rpl_idx[0] is less than sps_num_ref_pic_lists[1]. Otherwise, the value of rpl_idx[1] is inferred to be 0.
[0289] The second problem with Non-Patent Document 1 is that there are cases where the variable RplsIdx[1] is used before ref_pic_lists() is called, which causes the value of RplsIdx[1] to become undefined.
[0290] Specifically, the conditions for encoding and decoding ph_mvd_l1_zero_flag in FIG. 16(a) include the condition that pps_rpl_info_in_ph_flag is 0 or num_ref_entries[1][RplsIdx[1]]>0. If pps_rpl_info_in_ph_flag is 0, this conditional expression is evaluated without calling ref_pic_lists(). However, because rpl_sps_flag[i] is not decoded, the value of RplsIdx[1] derived using this value becomes indefinite, and the value of num_ref_entries[1][RplsIdx[1]] also becomes indefinite. Therefore, the condition for whether to encode and decode ph_mvd_l1_zero_flag cannot be determined.
[0291] In this embodiment, the following semantics are introduced to solve the above problem.
[0292] First, the semantics when rpl_sps_flag[i] does not exist are as follows:
[0293] If rpl_sps_flag[i] is not present, the following applies: If sps_num_ref_pic_lists[i] is 0, then the value of rpl_sps_flag[i] is inferred to be 0. Otherwise, if pps_rpl1_idx_present_flag is 0 and i is equal to 1, then the value of rpl_sps_flag[1] is inferred to be equal to rpl_sps_flag[0]. Otherwise, the value of rpl_sps_flag[i] is inferred to be 0.
[0294] Next, if num_ref_entries[i][sps_num_ref_pic_lists[i]] does not exist, num_ref_entries[i][sps_num_ref_pic_lists[i]] is estimated to be 0.
[0295] By using such semantics, the value of RplsIdx[i] becomes sps_num_ref_pic_lists[i], and num_ref_entries[i][sps_num_ref_pic_lists[i]] becomes 0, so the value of num_ref_entries[1][RplsIdx[1]] is uniquely determined to be 0, thereby resolving the issue.
[0296] The third problem in Non-Patent Document 1 is that the semantics of rpl_idx[0] is insufficient in that the semantics when the value of sps_num_ref_pic_lists[0] is 1 is not defined.
[0297] According to the syntax in Figure 17(a), rpl_idx[0] is not coded or decoded as a syntax element when the value of sps_num_ref_pic_lists[0] is 1. However, there is no description in the semantics that defines the value of rpl_idx[0] in this case, so the value becomes undefined.
[0298] In this embodiment, the following semantics are used to solve the above problem.
[0299] If rpl_idx[i] does not exist, perform the following: If sps_num_ref_pic_lists[i] is 1 or less, the value of rpl_idx[i] is assumed to be 0; otherwise (sps_num_ref_pic_lists[i] is greater than 1), rpl_sps_flag[0] is equal to 1, pps_rpl1_idx_present_flag is equal to 0, and i is equal to 1, the value of rpl_idx[1] is assumed to be equal to rpl_idx[0].
[0300] Alternatively, the following semantics is acceptable:
[0301] If rpl_idx[i] does not exist, do the following: If rpl_sps_flag[0] is equal to 1, pps_rpl1_idx_present_flag is equal to 0, and i is equal to 1, then infer the value of rpl_idx[i] to be equal to rpl_idx[0]; otherwise, infer the value of rpl_idx[i] to be 0.
[0302] By using such semantics, values are never indeterminate.
[0303] The problem can be solved by using the method according to the above embodiment.
[0304] [Application Example] The above-described video encoding device 11 and video decoding device 31 can be mounted and used in various devices that transmit, receive, record, and play back video. The video may be a natural video captured by a camera or the like, or an artificial video (including CG and GUI) generated by a computer or the like.
[0305] First, it will be explained with reference to FIG. 2 that the above-described video encoding device 11 and video decoding device 31 can be used for transmitting and receiving video.
[0306] 2 is a block diagram showing the configuration of a transmitting device PROD_A equipped with a video encoding device 11. As shown in the figure, the transmitting device PROD_A includes an encoding unit PROD_A1 that encodes video to obtain encoded data, a modulation unit PROD_A2 that modulates a carrier wave with the encoded data obtained by the encoding unit PROD_A1 to obtain a modulated signal, and a transmitting unit PROD_A3 that transmits the modulated signal obtained by the modulation unit PROD_A2. The above-described video encoding device 11 is used as this encoding unit PROD_A1.
[0307] The transmitting device PROD_A may further include, as a source of moving images to be input to the encoding unit PROD_A1, a camera PROD_A4 that captures moving images, a recording medium PROD_A5 on which moving images are recorded, an input terminal PROD_A6 for inputting moving images from the outside, and an image processing unit A7 that generates or processes images. In the figure, the transmitting device PROD_A is shown as having all of these components, but some of them may be omitted.
[0308] The recording medium PROD_A5 may record unencoded video, or may record video encoded using a recording encoding method that is different from the transmission encoding method. In the latter case, a decoding unit (not shown) that decodes the encoded data read from the recording medium PROD_A5 in accordance with the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.
[0309] 2 is a block diagram showing the configuration of a receiving device PROD_B equipped with a video decoding device 31. As shown in the figure, the receiving device PROD_B includes a receiving unit PROD_B1 that receives a modulated signal, a 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 video by decoding the coded data obtained by the demodulating unit PROD_B2. The above-mentioned video decoding device 31 is used as this decoding unit PROD_B3.
[0310] The receiving device PROD_B may further include, as destinations of the moving images output by the decoding unit PROD_B3, a display PROD_B4 for displaying the moving images, a recording medium PROD_B5 for recording the moving images, and an output terminal PROD_B6 for outputting the moving images to the outside. In the figure, the receiving device PROD_B is shown as having all of these components, but some of them may be omitted.
[0311] The recording medium PROD_B5 may be for recording unencoded video, or may be encoded using an encoding method for recording that is different from the encoding method for transmission. In the latter case, it is preferable to interpose an encoding unit (not shown) between the decoding unit PROD_B3 and the recording medium PROD_B5, which encodes the video acquired from the decoding unit PROD_B3 according to the encoding method for recording.
[0312] The transmission medium for transmitting the modulated signal may be wireless or wired. The transmission mode for transmitting the modulated signal may be broadcast (here, this refers to a transmission mode in which the destination is not specified in advance) or communication (here, this refers to a transmission mode in which the destination is specified in advance). In other words, the transmission of the modulated signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.
[0313] For example, a broadcasting station (such as a broadcasting facility) and a receiving station (such as a television receiver) for terrestrial digital broadcasting are an example of a transmitting device PROD_A and a receiving device PROD_B that transmit and receive modulated signals via wireless broadcasting, and a broadcasting station (such as a broadcasting facility) and a receiving station (such as a television receiver) for cable television broadcasting are an example of a transmitting device PROD_A and a receiving device PROD_B that transmit and receive modulated signals via cable broadcasting.
[0314] In addition, a server (e.g., a workstation) and a client (e.g., a television receiver, a personal computer, a smartphone) of an Internet-based video-on-demand (VOD) service or video sharing service are examples of a transmitting device PROD_A and a receiving device PROD_B that transmit and receive modulated signals via communication (typically, a LAN uses either a wireless or wired transmission medium, while a WAN uses a wired transmission medium). Here, personal computers include desktop PCs, laptop PCs, and tablet PCs. Smartphones also include multi-function mobile phone terminals.
[0315] The client of the video hosting service has the function of decoding the encoded data downloaded from the server and displaying it on a display, as well as the function of encoding the video images captured by a camera and uploading them to the server. In other words, the client of the video hosting service functions as both the transmitting device PROD_A and the receiving device PROD_B.
[0316] Next, it will be explained with reference to FIG. 3 that the above-described video encoding device 11 and video decoding device 31 can be used for recording and reproducing video.
[0317] PROD_C in Fig. 3 is a block diagram showing the configuration of a recording device PROD_C equipped with the above-mentioned video encoding device 11. As shown in the figure, the recording device PROD_C includes an encoding unit PROD_C1 that obtains encoded data by encoding video, and a writing unit PROD_C2 that writes the encoded data obtained by the encoding unit PROD_C1 onto a recording medium PROD_M. The above-mentioned video encoding device 11 is used as this encoding unit PROD_C1.
[0318] The recording medium PROD_M may be (1) a type that is built into the recording device PROD_C, such as an HDD (Hard Disk Drive) or an SSD (Solid State Drive), (2) a type that is connected to the recording device PROD_C, such as an SD memory card or a USB (Universal Serial Bus) flash memory, or (3) a type that is loaded into a drive device (not shown) built into the recording device PROD_C, such as a DVD (Digital Versatile Disc: registered trademark) or a BD (Blu-ray Disc: registered trademark).
[0319] The recording device PROD_C may further include a camera PROD_C3 that captures moving images, an input terminal PROD_C4 for inputting moving images from an external device, a receiving unit PROD_C5 for receiving moving images, and an image processing unit PROD_C6 that generates or processes images, as sources of moving images to be input to the encoding unit PROD_C1. Although the figure illustrates a configuration in which the recording device PROD_C includes all of these components, some of them may be omitted.
[0320] The receiving unit PROD_C5 may receive unencoded video, or may receive encoded data 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 encoded by the transmission encoding method may be interposed between the receiving unit PROD_C5 and the encoding unit PROD_C1.
[0321] Examples of such recording devices PROD_C include DVD recorders, BD recorders, and HDD (Hard Disk Drive) recorders (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 is the main source of moving images). Other examples of such recording devices PROD_C include camcorders (in this case, the camera PROD_C3 is the main source of moving images), personal computers (in this case, the receiving unit PROD_C5 or the image processing unit C6 is the main source of moving images), and smartphones (in this case, the camera PROD_C3 or the receiving unit PROD_C5 is the main source of moving images).
[0322] 3PROD_D is a block diagram showing the configuration of a playback device PROD_D equipped with the above-mentioned video decoding device 31. As shown in the figure, the playback device PROD_D includes a reading unit PROD_D1 that reads coded data written to a recording medium PROD_M, and a decoding unit PROD_D2 that obtains video by decoding the coded data read by the reading unit PROD_D1. The above-mentioned video decoding device 31 is used as this decoding unit PROD_D2.
[0323] The recording medium PROD_M may be (1) a type that is built into the playback device PROD_D, such as an HDD or SSD, (2) a type that is connected to the playback device PROD_D, such as an SD memory card or USB flash memory, or (3) a type that is loaded into a drive device (not shown) built into the playback device PROD_D, such as a DVD or BD.
[0324] The playback device PROD_D may further include, as destinations of the video output by the decoding unit PROD_D2, a display PROD_D3 that displays the video, an output terminal PROD_D4 that outputs the video to the outside, and a transmission unit PROD_D5 that transmits the video. Although the figure shows an example of a configuration in which the playback device PROD_D includes all of these, some of them may be omitted.
[0325] The transmitting unit PROD_D5 may transmit unencoded video, or 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 decoding unit PROD_D2 and the transmitting unit PROD_D5, which encodes the video by the transmission encoding method.
[0326] Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, the output terminal PROD_D4 to which a television receiver or the like is connected is the main destination of the video image). Other examples of such a playback device PROD_D include a television receiver (in this case, the display PROD_D3 is the main destination of the video image), a digital signage (also called an electronic billboard or electronic bulletin board, and the display PROD_D3 or the transmitter PROD_D5 is the main destination of the video image), a desktop PC (in this case, the output terminal PROD_D4 or the transmitter PROD_D5 is the main destination of the video image), a laptop or tablet PC (in this case, the display PROD_D3 or the transmitter PROD_D5 is the main destination of the video image), and a smartphone (in this case, the display PROD_D3 or the transmitter PROD_D5 is the main destination of the video image).
[0327] (Hardware and software implementation) Furthermore, each block of the above-mentioned video decoding device 31 and video encoding device 11 may be implemented in hardware using a logic circuit formed on an integrated circuit (IC chip), or in software using a CPU (Central Processing Unit).
[0328] In the latter case, each of the above devices includes a CPU that executes instructions of a program that realizes each function, a ROM (Read Only Memory) that stores the program, a RAM (Random Access Memory) that expands the program, a storage device (recording medium) such as a memory that stores the program and various data, etc. The object of the embodiment of the present invention can also be achieved by supplying each of the above devices with a recording medium on which program code (executable program, intermediate code program, source program) of a control program for each of the above devices, which is software that realizes the above-mentioned functions, is recorded in a computer-readable manner, and having the computer (or CPU or MPU) read and execute the program code recorded on the recording medium.
[0329] Examples of the recording medium that can be used include tapes such as magnetic tape and cassette tape, magnetic disks such as floppy disks (registered trademark) and hard disks, disks including optical disks such as CD-ROMs (Compact Disc Read-Only Memory), MO disks (Magneto-Optical discs), MDs (Mini Discs), DVDs (Digital Versatile Discs: registered trademark), CD-Rs (CD Recordable), and Blu-ray Discs (registered trademark), cards such as IC cards (including memory cards) and optical cards, semiconductor memories such as mask ROMs, EPROMs (Erasable Programmable Read-Only Memory), EEPROMs (Electrically Erasable and Programmable Read-Only Memory: registered trademark), and flash ROMs, and logic circuits such as PLDs (Programmable logic devices) and FPGAs (Field Programmable Gate Arrays).
[0330] Furthermore, each of the above devices may be configured to be connectable to a communications network, and the program code may be supplied via the communications network. This communications network may be any network capable of transmitting the program code. For example, the Internet, an intranet, an extranet, a local area network (LAN), an integrated services digital network (ISDN), a value-added network (VAN), a community antenna television / cable television (CATV) communications network, a virtual private network, a telephone line network, a mobile communications network, a satellite communications network, etc. Furthermore, the transmission media constituting this communications network may be any network capable of transmitting the program code, and are not limited to any particular configuration or type. For example, the present invention can be applied to wired networks such as IEEE (Institute of Electrical and Electronic Engineers) 1394, USB, power line carriers, cable TV lines, telephone lines, and ADSL (Asymmetric Digital Subscriber Line) lines, as well as wireless networks such as IrDA (Infrared Data Association), infrared networks like those used in remote controls, Bluetooth (registered trademark), IEEE 802.11 wireless networks, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone networks, satellite networks, and terrestrial digital broadcasting networks. Note that the present invention can also be implemented in the form of a computer data signal embedded in a carrier wave, in which the program code is embodied by electronic transmission.
[0331] The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. In other words, embodiments obtained by combining technical means modified appropriately within the scope of the claims are also included in the technical scope of the present invention.
[0332]
[0009] Embodiments of the present invention can be suitably applied to a video decoding device that decodes coded data in which image data has been coded, and a video coding device that generates coded data in which image data has been coded. They can also be suitably applied to the data structure of coded data generated by a video coding device and referenced by the video decoding device. (Cross-Reference to Related Applications) This application claims the benefit of priority to Japanese Patent Application No. 2020-088862, filed on May 21, 2020, the entire contents of which are incorporated herein by reference.
[0333] 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 / inverse transform unit 312, 106 Addition unit 320 Prediction parameter derivation unit 11 Image encoding device 102 Subtraction unit 103 Transform / quantization unit 104 Entropy encoding unit 110 Encoding parameter determination unit 111 Parameter encoding unit 112 Inter prediction parameter encoding unit 113 Intra prediction parameter encoding unit 120 Prediction parameter derivation unit
Claims
1. A video coding system comprising: a decoding unit that decodes a plurality of reference picture list structures; and a prediction unit that derives a reference picture list from the reference picture list structures on a picture-by-picture or slice-by-slice basis, wherein the decoding unit decodes a first flag (rpl_sps_flag[i]), wherein the first flag (rpl_sps_flag[i]) indicates that the reference picture list corresponding to reference picture list information (ref_pic_lists) is derived based on a first reference picture list structure decoded by SPS when its value is 1, and indicates that the reference picture list corresponding to the reference picture list information (ref_pic_lists) is derived based on a second reference picture list structure directly included in the reference picture list information (ref_pic_lists) when its value is 0; the decoding unit decodes an index (rpl_idx[i]) indicating the first reference picture list structure based on the number of first reference picture list structures (sps_num_ref_pic_lists[i]) and a second flag (pps_rpl1_idx_present_flag) when the first flag (rpl_sps_flag[i]) is 1; and the decoding unit decodes the second reference picture list structure directly included in the reference picture list information (ref_pic_lists) when the first flag (rpl_sps_flag[i]) is 0; The video decoding device is characterized in that the decoding unit estimates the value of the index (rpl_idx[i]) to be 0 when the first flag (rpl_sps_flag[i]) is equal to 1 and the number of the first reference picture list structures (sps_num_ref_pic_lists[i]) is 1 or less, and estimates the value of the index (rpl_idx[1]) to be equal to the value of the index (rpl_idx[0]) when the first flag (rpl_sps_flag[i]) is equal to 1 and the second flag (pps_rpl1_idx_present_flag) is equal to 0.
2. A step of deriving a reference picture list from a reference picture list structure on a picture-by-picture or slice-by-slice basis; and a step of decoding a first flag (rpl_sps_flag[i]), wherein the first flag (rpl_sps_flag[i]) indicates that the reference picture list corresponding to reference picture list information (ref_pic_lists) is derived based on a first reference picture list structure decoded by SPS when the value of the first flag (rpl_sps_flag[i]) is 1, and indicates that the reference picture list corresponding to the reference picture list information (ref_pic_lists) is derived based on a second reference picture list structure directly included in the reference picture list information (ref_pic_lists) when the value of the first flag is 0; decoding an index (rpl_idx[i]) for indicating the first reference picture list structure based on the number of first reference picture list structures (sps_num_ref_pic_lists[i]) and a second flag (pps_rpl1_idx_present_flag) when the first flag (rpl_sps_flag[i]) is 1; and decoding the second reference picture list structure directly included in the reference picture list information (ref_pic_lists) when the first flag (rpl_sps_flag[i]) is 0. a step of estimating the value of the index (rpl_idx[i]) to be 0 if the first flag (rpl_sps_flag[i]) is equal to 1 and the number of the first reference picture list structures (sps_num_ref_pic_lists[i]) is 1 or less, and estimating the value of the index (rpl_idx[1]) to be equal to the value of the index (rpl_idx[0]) if the first flag (rpl_sps_flag[i]) is equal to 1 and the second flag (pps_rpl1_idx_present_flag) is equal to 0.
3. A coding unit that codes a plurality of reference picture list structures; and a prediction unit that derives a reference picture list from the reference picture list structures on a picture-by-picture or slice-by-slice basis, wherein the coding unit codes a first flag (rpl_sps_flag[i]), wherein the first flag (rpl_sps_flag[i]) indicates that the reference picture list corresponding to reference picture list information (ref_pic_lists) is derived based on a first reference picture list structure decoded by SPS when its value is 1, and indicates that the reference picture list corresponding to the reference picture list information (ref_pic_lists) is derived based on a second reference picture list structure directly included in the reference picture list information (ref_pic_lists) when its value is 0; the encoding unit encodes an index (rpl_idx[i]) for indicating the first reference picture list structure based on the number of first reference picture list structures (sps_num_ref_pic_lists[i]) and a second flag (pps_rpl1_idx_present_flag) when the first flag (rpl_sps_flag[i]) is 1; and the encoding unit encodes the second reference picture list structure directly included in the reference picture list information (ref_pic_lists) when the first flag (rpl_sps_flag[i]) is 0; A video encoding device characterized in that the encoding unit estimates the value of the index (rpl_idx[i]) to be 0 when the first flag (rpl_sps_flag[i]) is equal to 1 and the number of the first reference picture list structures (sps_num_ref_pic_lists[i]) is 1 or less, and estimates the value of the index (rpl_idx[1]) to be equal to the value of the index (rpl_idx[0]) when the first flag (rpl_sps_flag[i]) is equal to 1 and the second flag (pps_rpl1_idx_present_flag) is equal to 0.