Method and apparatus for weighted prediction for image / video coding

By parsing weighted prediction flags and information in video encoding devices, generating prediction samples and reducing residual samples, the problem of large information content in high-resolution image/video encoding is solved, achieving efficient encoding and decoding processes and reducing signaling overhead and bit volume.

CN115280783BActive Publication Date: 2025-11-21LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202180019319.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-01-13
Filing Date
2021-01-13
Publication Date
2025-11-21
Estimated Expiration
2041-01-13

AI Technical Summary

Technical Problem

Existing technologies suffer from problems such as large information volume and high transmission and storage costs in high-resolution, high-quality image/video encoding, especially when transmitting virtual reality and immersive media, requiring efficient image/video compression technologies to reduce signaling overhead and bit volume.

Method used

By parsing the flags and information of weighted prediction in the video decoding device, prediction samples are generated and residual samples are reduced. Motion information is derived using the video encoding device for weighted prediction, and the prediction weighting table syntax is efficiently notified in the signal, reducing redundant signaling.

Benefits of technology

It improves image/video compression efficiency, reduces the number of bits in weighted prediction and signaling overhead, and achieves a more efficient encoding and decoding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115280783B_ABST
    Figure CN115280783B_ABST
Patent Text Reader

Abstract

According to this document, a video decoding method performed by a video decoding device can comprise the following steps: parsing a first flag and a second flag from a bitstream, wherein the first flag is related to whether weighted prediction is applied to a slice of a picture parameter set in the bitstream, and the second flag is related to whether information about weighted prediction is present in a picture header of the bitstream; parsing a prediction weighting table syntax from the picture header based on the first flag and the second flag; generating prediction samples of a current block in a current picture based on syntax elements in the prediction weighting table syntax; generating residual samples based on residual information obtained from the bitstream; and generating reconstructed samples based on the prediction samples and the residual samples, wherein the second flag is parsed from the picture parameter set based on the first flag.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to methods and apparatus for performing weighted prediction when encoding / decoding images / videos. Background Technology

[0002] Recently, there has been an increasing demand for high-resolution, high-quality images / videos, such as 4K or 8K or higher Ultra High Definition (UHD) images / videos, across various fields. As image / video resolution or quality increases, a relatively larger amount of information or bits is transmitted compared to regular image / video data. Therefore, if image / video data is transmitted via media such as existing wired / wireless broadband lines or stored in traditional storage media, the costs for transmission and storage can easily increase.

[0003] In addition, there is growing interest and demand for virtual reality (VR) and artificial reality (AR) content, as well as immersive media such as holograms; and the broadcasting of images / videos that exhibit characteristics different from actual images / videos (e.g., game images / videos) is also increasing.

[0004] Therefore, highly efficient image / video compression technology is needed to effectively compress and send, store, or play high-resolution, high-quality images / videos that exhibit the various characteristics described above. Summary of the Invention

[0005] Technical issues

[0006] The technical subject of this document is to provide methods and devices for improving the efficiency of image / video encoding.

[0007] Another technical topic of this document is providing methods and apparatus for efficiently signaling the predictive weighted table syntax.

[0008] Another technical topic of this document is providing methods and apparatus for reducing signaling overhead related to weighted prediction.

[0009] Another technical subject of this document is to provide methods and apparatus for reducing the amount of bits used for weighted prediction.

[0010] Problem-solving methods

[0011] According to an embodiment of this document, a video decoding method performed by a video decoding device may include the following steps: parsing from a bitstream a first flag related to whether weighted prediction is applied to a slice of a picture parameter set in the reference bitstream and a second flag related to whether information about the weighted prediction exists in the picture header of the bitstream; parsing a prediction weighted table syntax from the picture header based on the first flag and the second flag; generating a prediction sample of the current block in the current picture based on syntax elements in the prediction weighted table syntax; generating a residual sample based on residual information obtained from the bitstream; and generating a reconstruction sample based on the prediction sample and the residual sample, wherein the second flag may be parsed from the picture parameter set based on the first flag.

[0012] According to another embodiment of this document, a video encoding method performed by a video encoding device may include the following steps: deriving motion information about a current block; generating a prediction sample of the current block by performing a weighted prediction based on the motion information; generating residual information based on the prediction sample and the original sample; and encoding image information including information about the weighted prediction and the residual information, wherein the information about the weighted prediction may include a first flag related to whether the weighted prediction is applied to a slice of a picture parameter set referencing the image information, a second flag related to whether the information about the weighted prediction exists in the picture header of the image information, and a prediction weighting table syntax, the second flag may be included in the picture parameter set based on the first flag, and the prediction weighting table syntax may be included in the picture header based on the first flag and the second flag.

[0013] According to another embodiment of this document, a computer-readable digital storage medium may include information that causes a video decoding device to perform a video decoding method, the video decoding method comprising the steps of: parsing from image information a first flag related to whether weighted prediction is applied to a slice of a picture parameter set in the reference image information and a second flag related to whether information about the weighted prediction exists in a picture header of the image information; parsing a prediction weighted table syntax from the picture header based on the first flag and the second flag; generating a prediction sample of the current block in the current picture based on syntax elements in the prediction weighted table syntax; generating a residual sample based on residual information obtained from the image information; and generating a reconstruction sample based on the prediction sample and the residual information, wherein the second flag may be parsed from the picture parameter set based on the first flag.

[0014] Effects of the present invention

[0015] The implementation methods described in this document can improve overall video / image compression efficiency.

[0016] According to the implementation method described in this document, the predictive weighted table syntax can be efficiently communicated using signals.

[0017] According to the implementation method described in this document, redundant signaling for sending information about weighted predictions can be reduced.

[0018] According to the implementation method described in this document, the amount of bits used for weighted prediction can be reduced. Attached Figure Description

[0019] Figure 1 Examples of video / image coding systems to which the implementation methods of this document can be applied are illustrated schematically.

[0020] Figure 2 This is a diagram that schematically illustrates the configuration of a video / image encoding device to which the implementation methods of this document can be applied.

[0021] Figure 3 This is a diagram that schematically illustrates the configuration of a video / image decoding device to which the implementation methods of this document can be applied.

[0022] Figure 4 An example of encoding a syntax element is shown.

[0023] Figure 5 An inter-frame predictor in a coding device is illustrated schematically.

[0024] Figure 6 An inter-frame predictor in a decoding device is illustrated schematically.

[0025] Figure 7 and Figure 8 Examples of video / image encoding methods and related components according to the embodiments of this document are illustrated schematically.

[0026] Figure 9 and Figure 10 Examples of video / image decoding methods and related components according to embodiments of this document are illustrated schematically.

[0027] Figure 11 Examples of content streaming systems to which the implementation methods disclosed in this document can be applied are illustrated. Detailed Implementation

[0028] This document relates to video / image coding. For example, the methods / implementations disclosed in this document can be applied to methods disclosed in the Universal Video Coding (VVC) standard. Furthermore, the methods / implementations disclosed in this document can be applied to methods disclosed in the Basic Video Coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the Audio Video Coding 2 (AVS2) standard, or next-generation video / image coding standards (e.g., H.267, H.268, etc.).

[0029] This document presents various implementation methods related to video / image encoding, and unless otherwise specified, these implementation methods may also be performed in combination with each other.

[0030] In this document, video can refer to a series of images over time. An image typically refers to a unit representing an image at a specific time frame, and a slice / tile refers to a unit that constitutes part of an image in terms of coding. A slice / tile can include one or more Code Tree Units (CTUs). An image can consist of one or more slices / tiles. An image can consist of one or more groups of tiles. A group of tiles can include one or more tiles. A brick can represent a rectangular area of ​​CTU rows within a tile in an image. A tile can be divided into multiple tiles, each tile consisting of one or more CTU rows within the tile. A tile that is not divided into multiple tiles can also be referred to as a tile. Tile scanning is a specific ordering of the CTUs that divide an image, where CTUs are ordered consecutively within a tile by CTU raster scans, tiles within a tile are ordered consecutively by the raster scans of the tiles within the tile, and tiles in an image are ordered consecutively by the raster scans of the tiles within the image. A tile is a rectangular region of a CTU within a specific tile column and a specific tile row in an image. A tile column is a rectangular region of a CTU with a height equal to the height of the image and a width specified by a syntax element in the image parameter set. A tile row is a rectangular region of a CTU with a height specified by a syntax element in the image parameter set and a width equal to the width of the image. A tile scan is a specific ordering of the CTUs that segment the image, where the CTUs are ordered consecutively in a tile by a CTU raster scan, and the tiles in the image are ordered consecutively by a raster scan of the image's tiles. A slice comprises an integer number of tiles of an image that can be contained within a single NAL unit. A slice can consist of multiple complete tiles or a consecutive sequence of complete tiles of a single tile. In this document, tile groups and slices are used interchangeably. For example, in this document, a tile group / tile group header can be referred to as a slice / slice header.

[0031] A pixel or cell (pel) can refer to the smallest unit that makes up a picture (or image). Additionally, "sample" can be used as the term corresponding to a pixel. A sample can typically represent a pixel or pixel value, and can represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chrominance component.

[0032] A unit can represent a basic unit of image processing. A unit may include a specific region of an image and at least one of the information associated with that region. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, the term "unit" may be used interchangeably with terms such as "block" or "region." In general, an M×N block may include a set (or array) of samples (or sample arrays) or transform coefficients in M ​​columns and N rows. Alternatively, a sample may refer to a pixel value in the spatial domain, and when such pixel values ​​are transformed to the frequency domain, it may refer to transform coefficients in the frequency domain.

[0033] In some cases, a unit can be used interchangeably with terms such as block or region. Generally, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. Samples can typically represent pixels or pixel values, and can represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chrominance component. Samples can be used as a term corresponding to pixels or cells that configure a picture (or image).

[0034] The disclosure of this document may be modified in various forms, and its specific implementation will be described and illustrated in the accompanying drawings. The terminology used in this document is for descriptive purposes only and is not intended to limit the methods disclosed herein. The singular expression includes the expression "at least one," provided it is clearly interpreted differently. Terms such as "comprising" and "having" are intended to indicate the presence of features, quantities, steps, operations, elements, components, or combinations thereof used in the document, and therefore should be understood that the possibility of having or adding one or more different features, quantities, steps, operations, elements, components, or combinations thereof is not excluded.

[0035] Furthermore, the various configurations described in the accompanying drawings are independent illustrations for explaining the functions that are different features from each other, and do not imply that the various configurations are implemented by different hardware or different software. For example, two or more configurations may be combined to form one configuration, and one configuration may also be divided into multiple configurations. Implementations of combining and / or separating configurations are included within the scope of the disclosure of this document without departing from the spirit of the methods disclosed herein.

[0036] In this document, the terms " / " and "," should be interpreted as indicating "and / or". For example, the expression "A / B" can mean "A and / or B". Furthermore, "A, B" can mean "A and / or B". Additionally, "A / B / C" can mean "at least one of A, B, and / or C". Furthermore, "A / B / C" can mean "at least one of A, B, and / or C".

[0037] Furthermore, in this document, the term "or" should be interpreted as indicating "and / or". For example, expressing "A or B" could include 1) only A, 2) only B, and / or 3) both A and B. In other words, the term "or" in this document should be interpreted as indicating "additionally or alternatively".

[0038] Furthermore, the parentheses used in this document may mean "for example". Specifically, when expressing "prediction (intra-frame prediction)", it may be indicated that "intra-frame prediction" is presented as an example of "prediction". In other words, the term "prediction" in this document is not limited to "intra-frame prediction", and may be indicated that "intra-frame prediction" is presented as an example of "prediction". Moreover, even when expressing "prediction (i.e., intra-frame prediction)", it may be indicated that "intra-frame prediction" is presented as an example of "prediction".

[0039] In this document, a technical feature described separately in a single figure may be implemented individually or simultaneously.

[0040] The embodiments described in this document will be described in detail below with reference to the accompanying drawings. Furthermore, in all the drawings, the same reference numerals will be used to indicate the same elements, and the same descriptions of the same elements will be omitted.

[0041] Figure 1 Examples of video / image coding systems to which the implementation methods of this document can be applied are illustrated.

[0042] Reference Figure 1 A video / image encoding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device in the form of a file or stream via a digital storage medium or network.

[0043] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display, and the display may be configured as a separate device or an external component.

[0044] Video sources can acquire video / images through processes that capture, synthesize, or generate video / images. Video sources may include video / image capture devices and / or video / image generation devices. For example, a video / image capture device may include one or more cameras, a video / image archive including previously captured video / images, etc. For example, a video / image generation device may include a computer, tablet computer, and smartphone, and may generate video / images (electronically). For example, virtual video / images may be generated via a computer, etc. In this case, the video / image capture process can be replaced by a process that generates related data.

[0045] Encoding devices can encode input video / images. For compression and encoding efficiency, encoding devices can perform a series of processes such as prediction, transformation, and quantization. The encoded data (encoded video / image information) can be output as a bitstream.

[0046] The transmitter can send encoded images / image information or data, output as a bitstream, to the receiver of the receiving device in the form of a file or stream via a digital storage medium or network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include elements for generating media files according to a predetermined file format and may include elements for transmission over a broadcast / communication network. The receiver can receive / extract the bitstream and send the received bitstream to a decoding device.

[0047] Decoding devices can decode video / images by performing a series of processes such as dequantization, inverse transform, and prediction, which correspond to the operations of encoding devices.

[0048] The renderer can render decoded video / images. The rendered video / images can be displayed on a monitor.

[0049] Figure 2 This diagram schematically illustrates the configuration of a video / image encoding device to which the embodiments described in this document can be applied. In the following text, a device referred to as a video encoding device may include an image encoding device.

[0050] Reference Figure 2The encoding device 200 includes and is configured with an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may also include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstruction block generator. According to embodiments, the image partitioner 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filter 260 described above may be configured by one or more hardware components (e.g., an encoder chipset or a processor). Additionally, the memory 270 may include a decoded picture buffer (DPB) or may also be configured by a digital storage medium. The hardware components may also include the memory 270 as an internal / external component.

[0051] Image partitioner 210 can partition an input image (or picture, frame) input to encoding device 200 into one or more processing units. For example, a processing unit may be referred to as a coding unit (CU). In this case, the coding unit can be recursively partitioned from a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree-binary-tritree (QTBTTT) structure. For example, a coding unit can be partitioned into multiple deeper coding units based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. In this case, for example, a quadtree structure can be applied first, followed by a binary tree structure and / or a ternary tree structure. Alternatively, a binary tree structure can be applied first. The encoding process according to this document can be performed based on the final coding unit that is no longer partitioned. In this case, the maximum coding unit can be directly used as the final coding unit based on image characteristics, coding efficiency, etc., or, if necessary, the coding unit can be recursively partitioned into deeper coding units such that the coding unit with the optimal size can be used as the final coding unit. Here, the encoding process may include processes such as prediction, transformation, and reconstruction (described later). In another example, the processing unit may also include a prediction unit (PU) or a transform unit (TU). In this case, each of the prediction unit and the transform unit can be segmented or partitioned from the aforementioned final encoding unit. The prediction unit may be a unit for predicting samples, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving residual signals from transform coefficients.

[0052] Encoding device 200 can subtract the prediction signal (prediction block, prediction sample array) output from inter-frame predictor 221 or intra-frame predictor 222 from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is sent to converter 232. In this case, as shown, the unit in encoding device 200 that subtracts the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) can be called subtractor 231. Predictor 220 can perform prediction on the processing target block (hereinafter referred to as the current block) and generate a prediction block including the prediction samples of the current block. Predictor 220 can determine whether to apply intra-frame prediction or inter-frame prediction in the unit of the current block or CU. As described later in the description of each prediction mode, predictor 220 can generate various types of information about the prediction (such as prediction mode information) and send the generated information to entropy encoder 240, as described below in the description of each prediction mode. Information about the prediction can be encoded by the entropy encoder 240 and output as a bitstream.

[0053] Intra-predictor 222 can refer to samples in the current image to predict the current block. Depending on the prediction mode, the referenced samples may be located near the current block or separated from it. In intra-prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. For example, non-directional modes can include DC mode and planar mode. For example, depending on the level of detail in the prediction direction, the directional modes can include 33 or 65 directional prediction modes. However, this is just an example, and more or fewer directional prediction modes may be used depending on the settings. Intra-predictor 222 can also use prediction modes applied to neighboring blocks to determine the prediction mode applied to the current block.

[0054] Inter-frame predictor 221 can deduce the predicted block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference image. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation between motion information between neighboring blocks and the current block. Motion information may include motion vectors and reference image indices. Motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, neighboring blocks may include spatially neighboring blocks existing in the current image and temporally neighboring blocks existing in the reference image. The reference image including the reference block and the reference image including the temporally neighboring block may be the same as or different from each other. The temporally neighboring block may be referred to as a juxtaposed reference block, a juxtaposed CU (colCU), etc., and the reference image including the temporally neighboring block may be referred to as a juxtaposed image (colPic). For example, inter-frame predictor 221 can configure a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to deduce the motion vector and / or reference image index of the current block. Inter-frame prediction can be performed based on various prediction modes. For example, in skip mode and merge mode, the inter-frame predictor 221 can use the motion information of neighboring blocks as the motion information of the current block. In skip mode, unlike merge mode, residual signals may not be sent. The motion vector prediction (MVP) mode uses the motion vectors of neighboring blocks as motion vector predictors and signals the motion vector difference to indicate the motion vector of the current block.

[0055] Predictor 220 can generate prediction signals based on various prediction methods described later. For example, predictor 220 can apply intra-frame prediction or inter-frame prediction to predict a block, and can apply both intra-frame and inter-frame prediction simultaneously. This can be referred to as combined intra-frame and inter-frame prediction (CIIP). Furthermore, the predictor can use an intra-block copy (IBC) prediction mode or a palette mode for predicting blocks. The IBC prediction mode or palette mode can be used for image / video coding of content such as games, for example, Screen Content Coding (SCC). IBC essentially performs prediction in the current frame, but it can be performed similarly to inter-frame prediction in that it derives a reference block in the current frame. That is, IBC can use at least one of the inter-frame prediction techniques described in this document. Palette mode can be considered as an example of intra-frame coding or intra-frame prediction. When applying palette mode, sample values ​​in the image can be signaled based on information about the palette table and palette index.

[0056] The predicted signal generated by the predictor (including inter-frame predictor 221 and / or intra-frame predictor 222) can be used to generate the reconstructed signal or the residual signal.

[0057] Transformer 232 can generate transform coefficients by applying transform techniques to the residual signal. For example, the transform technique may include at least one of the following: Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), Graphical Based Transform (GBT), or Conditional Nonlinear Transform (CNT). Here, when the relationship information between pixels is illustrated as a graph, GBT refers to a transform obtained from the graph. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. Additionally, the transform processing can be applied to pixel blocks that are squares of the same size, or it can be applied to blocks of variable size that are not squares.

[0058] Quantizer 233 quantizes the transform coefficients and sends the quantized transform coefficients to entropy encoder 240, which encodes the quantized signal (information about the quantized transform coefficients) and outputs the encoded signal as a bitstream. The information about the quantized transform coefficients can be referred to as residual information. Quantizer 233 can rearrange the quantized transform coefficients in block form based on the coefficient scan order in one-dimensional vector form, and can generate information about the transform coefficients based on the quantized transform coefficients in one-dimensional vector form.

[0059] The entropy encoder 240 can perform various encoding methods such as, for example, Golomb, Context Adaptive Variable Length Coding (CAVLC), and Context Adaptive Binary Arithmetic Coding (CABAC). The entropy encoder 240 can also encode, either together or separately, information necessary for video / image reconstruction (e.g., values ​​of syntax elements, etc.) other than the quantized transform coefficients. The encoded information (e.g., encoded video / image information) can be transmitted or stored in bitstream form at the unit level of Network Abstraction Layer (NAL) units. The video / image information can also include information about various parameter sets, such as Adaptive Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Set (SPS), or Video Parameter Set (VPS). Additionally, the video / image information can also include general constraint information. In this document, information and / or syntax elements signaled from / transmitted from the encoding device to the decoding device can be included in the video / image information. The video / image information can be encoded by the aforementioned encoding process and thus included in the bitstream. The bitstream can be transmitted over a network or stored in a digital storage medium. Here, the network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. A transmitting unit (not shown) for transmitting the signal output from the entropy encoder 240 and / or a storage unit (not shown) for storing the signal may be configured as internal / external components of the encoding device 200, or the transmitting unit may also be included in the entropy encoder 240.

[0060] The quantized transform coefficients output from quantizer 233 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transform to the quantized transform coefficients using dequantizer 234 and inverse transformer 235. Adder 250 can add the reconstructed residual signal to the prediction signal output from inter-frame predictor 221 or intra-frame predictor 222 to generate a reconstructed signal (reconstructed image, reconstructed block, reconstructed sample array). For example, when skip mode is applied, the prediction block can be used as a reconstructed block when there is no residual for the processing target block. Adder 250 can be referred to as a restorer or restore block generator. The generated reconstructed signal can be used for intra-frame prediction of the next processing target block in the current image, or it can be used for inter-frame prediction of the next image after filtering, as described below.

[0061] In addition, Luminance Mapping and Chromaticity Scaling (LMCS) can also be applied during image encoding and / or reconstruction processing.

[0062] Filter 260 can improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, filter 260 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image and store the modified reconstructed image in memory 270 (specifically, the DPB of memory 270). Various filtering methods may include deblocking filtering, sample adaptive shifting, adaptive loop filtering, bilateral filtering, etc. Filter 260 can generate various types of filtering-related information and transmit the generated information to entropy encoder 240, as described later in the description of each filtering method. The filtering-related information can be encoded by entropy encoder 240 and output as a bitstream.

[0063] The modified reconstructed image sent to memory 270 can be used as a reference image in inter-frame predictor 221. When inter-frame prediction is applied via the encoding device, prediction mismatch between the encoding device 200 and the decoding device can be avoided, and encoding efficiency can be improved.

[0064] The DPB of memory 270 can store the corrected reconstructed image for use as a reference image in inter-frame predictor 221. Memory 270 can store motion information of blocks from which motion information in the current image is derived (or encoded) and / or motion information of blocks in already reconstructed images. The stored motion information can be transmitted to inter-frame predictor 221 to be used as motion information for spatially or temporally neighboring blocks. Memory 270 can store reconstructed samples of reconstructed blocks in the current image and can transmit these reconstructed samples to intra-frame predictor 222.

[0065] Figure 3This is a diagram illustrating the configuration of a video / image decoding device to which the implementation methods of this document can be applied.

[0066] Reference Figure 3 The decoding device 300 may include and be configured with an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an intra-frame predictor 331 and an inter-frame predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. According to embodiments, the entropy decoder 310, residual processor 320, predictor 330, adder 340, and filter 350 described above may be configured by one or more hardware components (e.g., a decoder chipset or processor). Additionally, the memory 360 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware components may also include the memory 360 as an internal / external component.

[0067] When the input includes a bitstream containing video / image information, the decoding device 300 can respond to... Figure 2 The illustrated encoding apparatus processes video / image information to reconstruct the image. For example, decoding apparatus 300 can deduce units / blocks based on block partitioning information obtained from the bitstream. Decoding apparatus 300 can perform decoding using processing units applied to the encoding apparatus. Thus, for example, the decoding processing unit can be an encoding unit, and the encoding unit can be segmented from encoding tree units or maximum encoding units according to a quadtree structure, binary tree structure, and / or ternary tree structure. One or more transform units can be derived from the encoding unit. Furthermore, the reconstructed image signal decoded and output by decoding apparatus 300 can be reproduced by a reproduction apparatus.

[0068] Decoding device 300 can receive data in bitstream form from... Figure 2The signal output by the encoding device can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive the information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as adaptation parameter sets (APS), picture parameter sets (PPS), sequence parameter sets (SPS), or video parameter sets (VPS). In addition, the video / image information may also include general constraint information. The decoding device can also decode the picture based on the information about the parameter sets and / or general constraint information. The information and / or syntax elements that are signaled / received, as described later in this document, can be decoded and obtained from the bitstream through the decoding process. For example, the entropy decoder 310 can decode the information within the bitstream based on encoding methods such as exponential Golomb coding, context-adaptive variable-length coding (CAVLC), or context-adaptive binary arithmetic coding (CABAC), and output the syntax elements required for image reconstruction and the quantized values ​​of the transform coefficients for the residuals. More specifically, the CABAC entropy decoding method can receive bins corresponding to each syntax element in the bitstream, determine the context model by using information about the decoded target syntax element, decoding information about the decoded target block, or information about symbols / bins decoded in a previous stage, and perform arithmetic decoding on the bins by predicting the probability of bin occurrence based on the determined context model, and generate symbols corresponding to the values ​​of each syntax element. In this case, the CABAC entropy decoding method can update the context model after determining the context model by using the information of the decoded symbols / bins for the context model of the next symbol / bin. The prediction-related information among the information decoded by the entropy decoder 310 can be provided to the predictors (inter-frame predictor 332 and intra-frame predictor 331), and the residual values ​​(i.e., quantized transform coefficients and related parameter information) that have been entropy decoded in the entropy decoder 310 can be input to the residual processor 320.

[0069] The residual processor 320 can derive residual signals (residual blocks, residual samples, or residual sample arrays). Additionally, filtering information from the information decoded by the entropy decoder 310 can be provided to the filter 350. Meanwhile, a receiver (not shown) for receiving signals output from the encoding device can be configured as an internal / external element of the decoding device 300, or the receiver can be a component of the entropy decoder 310. Furthermore, the decoding device according to this document can be referred to as a video / image / picture decoding device, and the decoding device can be classified as an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoder 310, and the sample decoder may include at least one of the following: a dequantizer 321, an inverse transformer 322, an adder 340, a filter 350, a memory 360, an inter-frame predictor 332, and an intra-frame predictor 331.

[0070] Dequantizer 321 can dequantize the quantized transform coefficients to output transform coefficients. Dequantizer 321 can rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement can be performed based on the coefficient scan order performed by the encoding device. Dequantizer 321 can use quantization parameters (e.g., quantization step size information) to perform dequantization on the quantized transform coefficients and obtain the transform coefficients.

[0071] The inverse transformer 322 performs an inverse transformation on the transformation coefficients to obtain the residual signal (residual block, residual sample array).

[0072] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When quantization / dequantization is omitted, the quantization transform coefficients may be referred to as transform coefficients. When transform / inverse transform is omitted, the transform coefficients may be referred to as coefficients or residual coefficients, or for consistency, they may still be referred to as transform coefficients.

[0073] In this document, quantization transform coefficients and transform coefficients can be referred to as transform coefficients and scaling transform coefficients, respectively. In this context, residual information can include information about the transform coefficients, and this information can be signaled using residual coding syntax. Transform coefficients can be derived based on residual information (or information about the transform coefficients), and scaling transform coefficients can be derived by performing an inverse transform (scaling) on ​​the transform coefficients. Residual samples can be derived based on the inverse transform (scaling) of the scaling transform coefficients. This can also be applied / expressed in other parts of this document.

[0074] Predictor 330 can perform prediction on the current block and generate a prediction block that includes prediction samples of the current block. The predictor can determine whether to apply intra-frame prediction or inter-frame prediction to the current block based on information about the prediction output from entropy decoder 310 and determine a specific intra-frame / inter-frame prediction mode.

[0075] Predictor 330 can generate a prediction signal based on various prediction methods described below. For example, the predictor can apply intra-frame prediction or inter-frame prediction to predict a block, and can apply both intra-frame and inter-frame prediction simultaneously. This can be referred to as combined intra-frame and inter-frame prediction (CIIP). Alternatively, the predictor can predict blocks based on an intra-block copy (IBC) prediction mode or a palette mode. IBC prediction mode or palette mode can be used for image / video coding of content such as games, for example, screen content coding (SCC). IBC can essentially perform prediction within the current frame, but can be performed similarly to inter-frame prediction, such that a reference block is derived within the current frame. That is, IBC can use at least one inter-frame prediction technique described in this document. Palette mode can be considered as an example of intra-frame coding or intra-frame prediction. When a palette mode is applied, information about the palette table and palette index can be included in the video / image information and signaled.

[0076] Intra-predictor 331 can predict the current block by referencing samples in the current image. Depending on the prediction mode, the referenced samples may be located near the current block or separated from it. In intra-prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. Intra-predictor 331 can determine the prediction mode applied to the current block by using prediction modes applied to neighboring blocks.

[0077] Inter-frame predictor 332 can deduce the predicted block for the current block based on a reference block (reference sample array) specified by motion vectors on a reference image. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation between motion information of neighboring blocks and the current block. Motion information may include motion vectors and reference image indices. Motion information may also include information about the inter-frame prediction direction (L0 prediction, L1 prediction, dual prediction, etc.). In the case of inter-frame prediction, neighboring blocks may include spatially neighboring blocks existing in the current image and temporally neighboring blocks existing in the reference image. For example, inter-frame predictor 332 can construct a motion information candidate list based on neighboring blocks and deduce the motion vector and / or reference image index for the current block based on the received candidate selection information. Inter-frame prediction can be performed based on various prediction modes, and the information about the prediction may include information indicating the inter-frame prediction mode used for the current block.

[0078] Adder 340 can generate a reconstruction signal (reconstructed image, reconstruction block, reconstruction sample array) by adding the acquired residual signal to the prediction signal (prediction block or prediction sample array) output from the predictor (including inter-frame predictor 332 and / or intra-frame predictor 331). If there is no residual for the target block, such as when a skip mode is applied, the prediction block can be used as the reconstruction block.

[0079] Adder 340 can be referred to as a reconstructor or reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current image, and as described later, it can also be output by filtering or used for inter-frame prediction of the next image.

[0080] In addition, Luminance Mapping and Chromaticity Scaling (LMCS) can also be applied to image decoding processing.

[0081] Filter 350 can improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, filter 350 can generate a corrected reconstructed image by applying various filtering methods to the reconstructed image and store the corrected reconstructed image in memory 360, specifically in the DPB of memory 360. Various filtering methods may include, for example, deblocking filtering, adaptive sample shifting, adaptive loop filtering, bilateral filtering, etc.

[0082] The (modified) reconstructed image stored in the DPB of memory 360 can be used as a reference image in inter-frame predictor 332. Memory 360 can store motion information of blocks from which motion information within the current image is derived (decoded) and / or motion information of blocks within reconstructed images. The stored motion information can be transmitted to inter-frame predictor 332 to be used as motion information for spatially or temporally neighboring blocks. Memory 360 can store reconstructed samples of reconstructed blocks within the current image and transmit the reconstructed samples to intra-frame predictor 331.

[0083] In this document, the implementation described in the filter 260, inter-frame predictor 221 and intra-frame predictor 222 of the encoding device 200 can be equally applied to or correspond to the filter 350, inter-frame predictor 332 and intra-frame predictor 331.

[0084] Furthermore, the video / image coding method according to this document can be executed based on the following partitioning structure. Specifically, the aforementioned prediction, residual processing (inverse transform and dequantization), syntax element encoding, and filtering processes can be performed based on the CTU and CU (and / or TU and PU) derived from the partitioning structure. The block partitioning process can be performed by the image partitioner 210 of the aforementioned encoding device, and the partitioning-related information can be processed by the entropy encoder 240 (encoding) and can be transmitted to the decoding device in the form of a bitstream. The entropy decoder 310 of the decoding device can derive the block partitioning structure of the current image based on the partitioning-related information obtained from the bitstream, and based on this, can perform a series of processes for image decoding (e.g., prediction, residual processing, block / image reconstruction, in-loop filtering, etc.). The CU size and TU size can be equal to each other, or multiple TUs can exist within the CU region. Furthermore, the CU size can generally represent the size of the luma component (sample) coded block (CB). The TU size can generally represent the size of the luma component (sample) transform block (TB). The size of the chroma component (sample) CB or TB can be derived based on the color format (chroma format, e.g., 4:4:4, 4:2:2, 4:2:0, etc.) of the image / picture according to the component ratio and the size of the luminance component (sample) CB or TB. The TU size can be derived based on maxTbSize. For example, if the CU size is greater than maxTbSize, multiple TUs (TBs) of maxTbSize can be derived from the CU, and transform / inverse transform can be performed on a TU (TB) basis. Furthermore, for example, in the case of applying intra-frame prediction, the intra-frame prediction mode / type can be derived on a CU (or CB) basis, and the neighbor reference sample derivation and prediction sample generation process can be performed on a TU (or TB) basis. In this case, one or more TUs (or TBs) can exist in a CU (or CB) region, and multiple TUs (or TBs) can share the same intra-frame prediction mode / type.

[0085] Furthermore, in video / image encoding according to this document, the image processing unit can have a hierarchical structure. An image can be partitioned into one or more tiles, blocks, slices, and / or tile groups. A slice can include one or more blocks. A block can include one or more CTU rows within a tile. A slice can include an integer number of blocks in the image. A tile group can include one or more tiles. A tile can include one or more CTUs. A CTU can be partitioned into one or more CUs. A tile represents a rectangular area of ​​a CTU within a specific tile column and a specific tile row in an image. A tile group can include an integer number of tiles based on a tile raster scan in the image. A slice header can carry information / parameters that can be applied to the corresponding slice (a block within a slice). If the encoding / decoding device has a multi-core processor, the encoding / decoding processes for tiles, slices, blocks, and / or tile groups can be processed in parallel. In this document, slices or tile groups can be used interchangeably. That is, a tile group header can be referred to as a slice header. Here, a slice can have one of the following slice types: intra-frame (I) slices, prediction (P) slices, and double prediction (B) slices. When predicting blocks in an I slice, inter-frame prediction may not be used, and intra-frame prediction may be used only. Of course, even in this case, signaling can be performed by encoding the original sample values ​​without prediction. Regarding blocks in a P slice, either intra-frame or inter-frame prediction can be used, and if inter-frame prediction is used, only unidirectional prediction can be used. Furthermore, regarding blocks in a B slice, either intra-frame or inter-frame prediction can be used, and if inter-frame prediction is used, double prediction can be maximized.

[0086] Considering coding efficiency or parallel processing, or based on the characteristics of the video image (e.g., resolution), the encoding device can determine the size of the tile / tile group, patch, slice, and the maximum and minimum coding unit, and their information or information that can be deduced can be included in the bitstream.

[0087] Decoding devices can obtain information representing the tiles / groups of tiles, blocks, and slices of the current image, as well as whether the CTUs within a tile have been partitioned into multiple coding units. Efficiency can be improved by acquiring (transmitting) this information only under specific conditions.

[0088] As described above, an image can include multiple slices, and a slice can include a slice header and slice data. In this case, an image header can be further added to the multiple slices (a set of slice headers and slice data) in an image. The image header (image header syntax) can include information / parameters commonly applied to the image. The slice header (slice header syntax) can include information / parameters commonly applied to the slice. The Adaptive Parameter Set (APS) or Picture Parameter Set (PPS) can include information / parameters commonly applied to one or more images. The Sequence Parameter Set (SPS) can include information / parameters commonly applied to one or more sequences. The Video Parameter Set (VPS) can include information / parameters commonly applied to multiple layers. The Decoding Parameter Set (DPS) can include information / parameters commonly applied to the overall video. The DPS can include information / parameters related to the concatenation of encoded video sequences (CVS).

[0089] In this document, advanced syntax may include at least one of the following: APS syntax, PPS syntax, SPS syntax, VPS syntax, DPS syntax, image header syntax, and slice header syntax.

[0090] Additionally, information regarding the partitioning and configuration of tiles / tile groups / tiles / slices can be configured in the encoding device based on high-level syntax and sent to the decoding device as a bitstream.

[0091] Figure 4 An example of encoding a syntax element is shown.

[0092] Figure 4 This is a block diagram illustrating CABAC for encoding a syntax element. In CABAC encoding, when the input signal is a syntax element rather than a binary value, it is first converted to a binary value through binarization. When the input signal is already a binary value, it is bypassed without binarization. Here, each binary 0 or 1 that forms the binary value can be called a bin. For example, when the binarized binary string is 110, each of the 1s, 1s, and 0s is called a bin. The bin of a syntax element indicates the value of that syntax element.

[0093] Binary bins are input to either a regular encoding engine or a bypass encoding engine. The regular encoding engine assigns a context model reflecting the probability values ​​of the bin and encodes the bin based on the assigned context model. The regular encoding engine can perform encoding on each bin and then update the context model of the bin. These encoded bins can be called context-encoded bins. The bypass encoding engine omits the process of estimating the probabilities of the input bins and updating the probability model applied to the bins after encoding. The bypass encoding engine improves encoding speed by applying a uniform probability distribution (e.g., 50:50) to the input bins instead of assigning context. These encoded bins can be called bypass bins. Context models can be assigned and updated for each bin to be context-encoded (regular encoding), and the context model can be indicated based on ctxIdx or ctxInc. ctxIdx can be derived based on ctxInc. Specifically, for example, the context index (ctxIdx) indicating the context model of each regularly encoded bin can be derived as the sum of the context index increment (ctxInc) and the context index offset (ctxIdxOffset). Here, different ctxInc values ​​can be derived for each bin. ctxIdxOffset can be represented as the minimum value of ctxIdx. The minimum value of ctxIdx can be called the initial value (initValue) of ctxIdx. ctxIdxOffset is a value of the context model commonly used to distinguish other syntax elements; the context model of a syntax element can be classified / derived based on ctxInc.

[0094] In entropy coding, it is possible to determine whether encoding is performed using a regular encoding engine or a bypass encoding engine, and the encoding path can be switched. Entropy decoding can be performed through the same process as encoding in reverse order.

[0095] For example, the aforementioned entropy encoding can be performed as follows.

[0096] The encoding device (entropy encoder) performs entropy coding on the image / image information. The image / image information may include partition-related information, prediction-related information (e.g., inter-frame / intra-frame prediction classification information, intra-frame prediction mode information, and inter-frame prediction mode information), residual information, in-loop filtering-related information, etc., or may include various related syntax elements. Entropy coding can be performed on a per-syntax-element basis.

[0097] Specifically, the encoding device performs binarization on the target syntax element. Binarization can be based on various binarization methods, such as truncated Rice binarization and fixed-length binarization, and the binarization method for the target syntax element can be predefined. The binarization process can be performed by the binarizer 242 in the entropy encoder 240.

[0098] The encoding device performs entropy encoding on the target syntax element. The encoding device can perform entropy encoding on the empty string of the target syntax element based on regular encoding (context) or bypass encoding based on entropy encoding techniques such as Context Adaptive Arithmetic Encoding (CABAC) or Context Adaptive Variable Length Encoding (CAVLC), and the output from the encoding can be included in the bitstream. The entropy encoding process can be executed by the entropy encoding processor 243 in the entropy encoder 240. As described above, the bitstream can be transmitted to the decoding device via a (digital) storage medium or a network.

[0099] Decoding devices (entropy decoders) can decode encoded images / image information. Image / image information may include partition-related information, prediction-related information (e.g., inter-frame / intra-frame prediction classification information, intra-frame prediction mode information, and inter-frame prediction mode information), residual information, in-loop filtering-related information, etc., or may include various related syntax elements. Entropy coding can be performed on a syntax element-by-syntax basis.

[0100] Specifically, the decoding device performs binarization on the target syntax element. Here, binarization can be based on various binarization methods, such as truncated Rice binarization and fixed-length binarization, and the binarization method for the target syntax element can be predefined. The decoding device can derive available bin strings (bin string candidates) of available values ​​for the target syntax element through the binarization process. The binarization process can be performed by the binarizer 312 in the entropy decoder 310.

[0101] The decoding device performs entropy decoding on the target syntax element. While sequentially decoding and parsing the individual bins of the syntax element from the input bits in the bitstream, the decoding device compares the derived bin string with the available bin strings of the target syntax element. If the derived bin string matches one of the available bin strings, the value corresponding to that bin string is derived as the value of the syntax element. Otherwise, the decoding device further parses the next bit in the bitstream and then repeats the above process. This process allows variable-length bits to be used to signal specific information without using the start or end bits of that specific information (the specific syntax element) in the bitstream. Therefore, fewer bits can be allocated to lower values, and overall encoding efficiency can be improved.

[0102] The decoding device can perform context-based or bypass-based decoding on individual bins in a bin string from a bitstream based on entropy coding techniques such as CABAC or CAVLC. The entropy decoding process can be executed by the entropy decoding processor 313 in the entropy decoder 310. The bitstream can include various information for image / video decoding as described above. As mentioned above, the bitstream can be transmitted to the decoding device via a (digital) storage medium or a network.

[0103] In this document, a table including syntax elements (syntax table) can be used to indicate signaling of information from an encoding device to a decoding device. The order of the syntax elements in the table included in this document can refer to the order in which the syntax elements are parsed from the bitstream. The encoding device can construct and encode the syntax table such that the decoding device can parse the syntax elements in the parsing order, and the decoding device can parse and decode the syntax elements of the syntax table from the bitstream according to the parsing order to obtain the values ​​of the syntax elements.

[0104] The video / image coding process based on inter-frame prediction can schematically include the following.

[0105] Figure 5 An inter-frame predictor in a coding device is illustrated schematically.

[0106] Reference Figure 5 The encoding device performs inter-frame prediction on the current block. The encoding device can derive the inter-frame prediction mode and motion information for the current block, and can generate prediction samples for the current block. Here, the processes for determining the inter-frame prediction mode, deriving motion information, and generating prediction samples can be performed simultaneously, or one process can be performed before the other. For example, the inter-frame predictor 221 of the encoding device may include a prediction mode determiner 221_1, a motion information derivator 221_2, and a prediction sample derivator 221_3, wherein the prediction mode determiner 221_1 can determine the prediction mode for the current block, the motion information derivator 221_2 can derive motion information about the current block, and the prediction sample derivator 221_3 can derive prediction samples for the current block. For example, the inter-frame predictor of the encoding device can search for blocks similar to the current block within a predetermined region (search region) of a reference image through motion estimation, and can derive reference blocks whose difference from the current block is the minimum value, a predetermined reference level, or smaller. The inter-frame predictor can derive a reference image index based on a reference block, which indicates the reference image in which the reference block is located, and can derive motion vectors based on the positional difference between the reference block and the current block. The encoding device can determine the mode to be applied to the current block from various prediction modes. The encoding device can compare the rate-distortion (RD) costs of various prediction modes and determine the optimal prediction mode for the current block.

[0107] For example, when a skip mode or merge mode is applied to the current block, the encoding device can construct a merge candidate list and deduce a reference block among the reference blocks indicated by the merge candidates included in the merge candidate list, whose difference from the current block is a minimum or a predetermined reference level or less. In this case, a merge candidate associated with the deduced reference block can be selected, and merge index information indicating the selected merge candidate can be generated and signaled to the decoding device. Motion information about the current block can be deduced using motion information about the selected merge candidate.

[0108] In another example, when the (A)MVP mode is applied to the current block, the encoding device can construct an (A)MVP candidate list and use the motion vector of an MVP candidate selected from the motion vector predictor (MVP) candidates included in the (A)MVP candidate list as the MVP of the current block. For example, in this case, the motion vector of a reference block derived through motion estimation can be used as the motion vector of the current block, and the MVP candidate with the motion vector having the smallest difference from the motion vector of the current block can be the selected MVP candidate. The motion vector difference (MVD) can be derived by subtracting the MVP from the motion vector of the current block. In this case, information about the MVD can be signaled to the decoding device. When the (A)MVP mode is applied, the value of the reference picture index can be configured as reference picture index information and can be signaled to the decoding device separately.

[0109] The encoding device can derive residual samples based on the predicted samples. The encoding device can derive residual samples by comparing the original samples of the current block with the predicted samples.

[0110] The encoding device encodes image information, including prediction information and residual information. The encoding device may output the encoded image information as a bitstream. Prediction information is information related to the prediction process and may include prediction mode information (e.g., skip flag, merge flag, or mode index) and information about motion. Information about motion may include candidate selection information (e.g., merge index, MVP flag, or MVP index), which is used to derive motion vectors. Additionally, information about motion may include information about MVD and / or reference image index information. Furthermore, information about motion may include information indicating whether L0 prediction, L1 prediction, or dual prediction is applied. Residual information is information about residual samples. Residual information may include information about the quantized transform coefficients of the residual samples.

[0111] The output bitstream can be stored in (digital) storage media and sent to the decoding device, or it can be sent to the decoding device via a network.

[0112] As described above, the encoding device can generate a reconstructed image (including reconstructed samples and reconstructed blocks) based on reference samples and residual samples. This reconstructed image is used by the encoding device to derive the same prediction result as that derived by the decoding device, and is used to improve encoding efficiency. Therefore, the encoding device can store the reconstructed image (or reconstructed samples and reconstructed blocks) in memory and can use it as a reference image for inter-frame prediction. As mentioned above, the in-loop filtering process can be further applied to the reconstructed image.

[0113] For example, a video / image decoding process based on inter-frame prediction can schematically include the following.

[0114] Figure 6 An inter-frame predictor in a decoding device is illustrated schematically.

[0115] The decoding device can perform operations corresponding to those performed by the encoding device. The decoding device can predict the current block based on the received prediction information and can derive prediction samples.

[0116] Specifically, refer to Figure 6 The decoding device can determine the prediction mode of the current block based on the prediction information received from the bitstream. The decoding device can then determine which inter-frame prediction mode to apply to the current block based on the prediction mode information within the prediction information.

[0117] For example, a merge flag can be used to determine whether to apply a merge mode to the current block or whether to determine (A)MVP mode. Alternatively, a variety of inter-frame prediction mode candidates can be selected based on a merge index. Inter-frame prediction mode candidates can include various inter-frame prediction modes, such as skip mode, merge mode, and / or (A)MVP mode.

[0118] The decoding device derives motion information about the current block based on the determined inter-frame prediction mode. For example, when a skip mode or merge mode is applied to the current block, the decoding device can construct a merge candidate list (described later) and select a merge candidate from the merge candidates included in the list. The selection can be performed based on the selection information (merge index) described above. Motion information about the current block can be derived using the motion information about the selected merge candidate. The motion information about the selected merge candidate can be used as motion information about the current block.

[0119] In another example, when the (A)MVP mode is applied to the current block, the decoding device can construct an (A)MVP candidate list and use the motion vector of a motion vector predictor (MVP) candidate selected from the MVP candidates included in the (A)MVP candidate list as the MVP of the current block. Selection can be performed based on the aforementioned selection information (MVP flag or MVP index). In this case, the decoding device can deduce the MVD of the current block based on information about the MVD, and can deduce the motion vector of the current block based on the MVP and MVD of the current block. Furthermore, the decoding device can deduce the reference image index of the current block based on reference image index information. The image indicated by the reference image index in the reference image list of the current block can be deduced as the reference image referenced by the inter-frame prediction of the current block.

[0120] Motion information about the current block can be derived without constructing a candidate list, in which case the construction of the aforementioned candidate list can be omitted.

[0121] The decoding device can generate predicted samples for the current block based on motion information about the current block. In this case, a reference image can be derived based on the reference image index of the current block, and the predicted samples for the current block can be derived using samples of the reference block indicated by the motion vector of the current block in the reference image. In this case, as described later, a predicted sample filtering process for all or some of the predicted samples of the current block can be further performed as appropriate.

[0122] For example, the inter-frame predictor 332 of the decoding device may include a prediction mode determiner 332_1, a motion information deducer 332_2, and a prediction sample deducer 332_3. The prediction mode determiner 332_1 can determine the prediction mode of the current block based on the received prediction mode information, the motion information deducer 332_2 can deduce the motion information (motion vector and / or reference image index) of the current block based on the received information about motion information, and the prediction sample deducer 332_3 can deduce the prediction samples of the current block.

[0123] The decoding device generates residual samples for the current block based on the received residual information. The decoding device can then generate reconstructed samples for the current block based on the predicted samples and residual samples, and can generate a reconstructed image based on the reconstructed samples. Subsequently, as described above, the in-loop filtering process can be further applied to the reconstructed image.

[0124] A prediction block for the current block can be derived based on motion information inferred from the prediction mode of the current block. The prediction block can include prediction samples (an array of prediction samples) of the current block. When the motion vector of the current block indicates a partial sample unit, an interpolation process can be performed, through which the prediction samples of the current block can be derived based on reference samples in a partial sample unit of a reference image. When affine inter-frame prediction is applied to the current block, prediction samples can be generated based on motion vectors (MV) in sample / sub-block units. When dual prediction is applied, prediction samples derived by a weighted sum or weighted average of prediction samples derived based on L0 prediction (i.e., using reference images in reference image list L0 and predictions of MVL0) and prediction samples derived based on L1 prediction (i.e., using reference images in reference image list L1 and predictions of MVL1 (depending on the stage)) can be used as prediction samples for the current block. The case where dual prediction is applied and the reference images used for L0 prediction and L1 prediction are located in different time directions relative to the current image (i.e., corresponding to dual prediction and bidirectional prediction) is called true dual prediction.

[0125] As described above, reconstructed samples and reconstructed images can be generated based on the derived predicted samples, and then an in-loop filtering process can be performed.

[0126] In inter-frame prediction, weighted sample prediction can be used. Weighted sample prediction can be referred to as weighted prediction. Weighted prediction can be applied when the slice type of the current slice containing the current block (e.g., CU) is either a P-slice or a B-slice. That is, weighted prediction can be used not only when applying dual prediction but also when applying single prediction. For example, as described below, the weighted prediction can be determined based on `weightedPredFlag`, and the value of `weightedPredFlag` can be determined based on `pps_weighted_pred_flag` (in the case of P-slices) or `pps_weighted_bipred_flag` (in the case of B-slices) as signaled. For example, when `slice_type` is P, `weightedPredFlag` can be set to `pps_weighted_pred_flag`. Otherwise (when `slice_type` is B), `weightedPredFlag` can be set to `pps_weighted_bipred_flag`.

[0127] The predicted samples or values ​​of the predicted samples that are the output of the weighted prediction can be called pbSamples.

[0128] Weighted prediction processes can be broadly categorized into default weighted (sample) prediction processes and explicit weighted (sample) prediction processes. The term "weighted (sample) prediction process" can refer only to the explicit weighted (sample) prediction process. For example, when the value of `weightedPredFlag` is 0, the predicted sample values ​​(pbSamples) can be derived based on the default weighted (sample) prediction process. When the value of `weightedPredFlag` is 1, the predicted sample values ​​(pbSamples) can be derived based on the explicit weighted (sample) prediction process.

[0129] When applying dual prediction to the current block, the predicted samples can be derived based on a weighted average. Typically, the dual prediction signal (i.e., the dual prediction samples) can be derived by simply averaging the L0 prediction signal (L0 predicted sample) and the L1 prediction signal (L1 predicted sample). That is, the dual prediction samples are derived as the average of the L0 prediction sample based on the L0 reference image and MVL0 and the L1 prediction sample based on the L1 reference image and MVL1. However, according to this document, when applying dual prediction, the dual prediction signal (dual prediction samples) can be derived by weighted averaging the L0 and L1 prediction signals.

[0130] Bidirectional optical flow (BDOF) can be used to refine dual prediction signals. BDOF is used to generate prediction samples by computing improved motion information when applying dual predictions to the current block (e.g., CU), and the process of computing improved motion information can be included in the motion information derivation operation.

[0131] For example, BDOF can be applied horizontally in 4×4 sub-blocks. That is, BDOF can be executed in units of 4×4 sub-blocks within the current block. BDOF can only be applied to the luma component. Alternatively, BDOF can only be applied to the chroma component, or it can be applied to both the luma and chroma components.

[0132] As mentioned above, High-Level Syntax (HLS) can encode video / image information for signaling purposes. Video / image information can be included in the HLS.

[0133] An encoded image may include one or more slices. The parameters describing the encoded image are indicated by signals in the image header, and the parameters describing the slices are indicated by signals in the slice header. The image header is carried as a separate NAL unit. The slice header is located at the beginning of the NAL unit, which contains the slice's payload (i.e., the slice data).

[0134] Each image is associated with an image header. Images can include different types of slices (intra-coded slices (i.e., I-slices) and inter-coded slices (i.e., P-slices and B-slices)). Therefore, the image header can include the syntax elements required for intra-frame and inter-frame image slices.

[0135] Images can be divided into sub-images, tiles, and / or slices. The Sequence Parameter Set (SPS) can contain sub-image signaling, and the Picture Parameter Set (PPS) can contain tile and square slice signaling. The slice header can contain raster scan slice signaling.

[0136] When weighted prediction is applied to inter-frame prediction of the current block, weighted prediction can be performed based on information about the weighted prediction.

[0137] The weighted prediction process can begin with two flags in SPS.

[0138] For example, the syntactic elements shown in Table 1 below can be included in the SPS syntactic for weighted prediction.

[0139] [Table 1]

[0140]

[0141] In Table 1, a value of 1 for sps_weighted_pred_flag indicates that the weighted prediction is applied to the P-slice of the reference SPS.

[0142] A value of sps_weighted_bipred_flag equal to 1 indicates that weighted predictions are applied to the B-slice of the reference SPS. A value of sps_weighted_bipred_flag equal to 0 indicates that weighted predictions are not applied to the B-slice of the reference SPS.

[0143] In SPS, two flags are used to indicate whether weighted prediction is applied to P-slices and B-slices in a coded video sequence (CVS).

[0144] The syntax elements shown in Table 2 below can be included in the PPS syntax for weighted prediction.

[0145] [Table 2]

[0146]

[0147] In Table 2, a value of pps_weighted_pred_flag equal to 0 indicates that weighted prediction was not applied to the P-slice of the reference PPS. A value of pps_weighted_pred_flag equal to 1 indicates that weighted prediction was applied to the P-slice of the reference PPS. When the value of sps_weighted_pred_flag is 0, the value of pps_weighted_pred_flag is 0.

[0148] A value of 0 for pps_weighted_bipred_flag indicates that weighted predictions are not applied to the B-slice of the reference PPS. A value of 1 for pps_weighted_bipred_flag indicates that explicit weighted predictions are applied to the B-slice of the reference PPS. When the value of sps_weighted_bipred_flag is 0, the value of pps_weighted_bipred_flag is 0.

[0149] Additionally, the syntax elements shown in Table 3 below can be included in the slice header syntax.

[0150] [Table 3]

[0151]

[0152] In Table 3, slice_pic_parameter_set_id indicates the value of pps_pic_parameter_set_id of the PPS used. The value of slice_pic_parameter_set_id is included in the range from 0 to 63.

[0153] The Temporal ID value of the current image must be greater than or equal to the Temporal ID value of the PPS that has the same pps_pic_parameter_set_id as slice_pic_parameter_set_id.

[0154] The prediction weighted table syntax can include information about the weighted predictions shown in Table 4 below.

[0155] [Table 4]

[0156]

[0157] In Table 4, luma_log2_weight_denom is the base-2 logarithm of the denominator of all brightness weighting factors. Values ​​of luma_log2_weight_denom are included in the range from 0 to 7.

[0158] delta_chroma_log2_weight_denom is the difference of the base-2 logarithms of the denominators of all chroma weighting factors. When delta_chroma_log2_weight_denom does not exist, delta_chroma_log2_weight_denom is inferred to be 0.

[0159] ChromaLog2WeightDenom is derived as luma_log2_weight_denom+

[0160] delta_chroma_log2_weight_denom, and its value is included in the range from 0 to 7.

[0161] A value of luma_weight_10_flag[i] equal to 1 indicates the existence of weighting factors for the luminance components predicted using List 0 (L0) of RefPicList[0][i]. A value of luma_weight_10_flag[i] equal to 0 indicates that these weighting factors do not exist.

[0162] A value of chroma_weight_10_flag[i] equal to 1 indicates the weighting factor of the chroma prediction value using the L0 prediction of RefPicList[0][i]. A value of chroma_weight_10_flag[i] equal to 0 indicates that these weighting factors do not exist. When chroma_weight_10_flag[i] does not exist, chroma_weight_10_flag[i] is inferred to be 0.

[0163] delta_luma_weight_10[i] is the difference of the weighting factor applied to the luminance predictions of the L0 prediction using RefPicList[0][i].

[0164] LumaWeightL0[i] is inferred to be (1< <luma_log2_weight_denom)

[0165] +delta_luma_weight_l0[i]. When luma_weight_10_flag[i] is 1, the value of delta_luma_weight_10[i] is included in the range from -128 to 127. When luma_weight_10_flag[i] is 0, LumaWeightL0[i] is inferred to be 2. luma_log2_weight_denom .

[0166] `luma_offset_10[i]` is the cumulative offset applied to the luminance prediction value using L0 prediction with `RefPicList[0][i]`. The value of `luma_offset_10[i]` is included in the range from -128 to 127. When the value of `luma_weight_10_flag[i]` is 0, the value of `luma_offset_10[i]` is inferred as 0.

[0167] delta_chroma_weight_l0[i][j] is the difference of the weighting factors applied to the L0 predictions using RefPicList[0][i], where j is 0 for Cb and 1 for Cr.

[0168] ChromaWeightL0[i][j] is derived as (1< <Chromalog2WeightDenom)

[0169] +delta_chroma_weight_l0[i][j]. When chroma_weight_10_flag[i] is 1.

[0170] The value of delta_chroma_weight_10[i][j] is included in the range from -128 to 127. When chroma_weight_l0_flag[i] is 0, ChromaWeightL0[i][j] is inferred to be 2. ChromaLog2WeightDenom .

[0171] delta_chroma_offset_l0[i][j] is the cumulative offset applied to the chroma prediction values ​​of L0 prediction using RefPicList[0][i], where j is 0 for Cb and 1 for Cr.

[0172] The value of delta_chroma_offset_10[i][j] is included in the range from -4×128 to 4×127. When the value of chroma_weight_10_flag[i] is 0, the value of ChromaOffsetL0[i][j] is inferred to be 0.

[0173] Prediction weighting table syntax is frequently used to modify sequences when the scene changes. When the PPS flag for weighted prediction is enabled and the slice type is P, or when the PPS flag for weighted dual prediction is enabled and the slice type is B, the existing prediction weighting table syntax is signaled in the slice header. However, it is common practice to adjust the prediction weighting table for one or more frames when the scene changes. Typically, when multiple frames share a PPS, it may not be necessary to signal the weighted prediction information for all frames referencing the PPS.

[0174] The following figures are provided to illustrate specific examples of this document. Because specific terminology or specific signal / message terminology is used to illustrate the apparatus in the figures, the technical features of this disclosure are not limited to the specific terminology used in the following figures.

[0175] This document provides the following methods to solve the above problems. These methods can be applied independently or in combination.

[0176] 1. Tools that allow weighted prediction to be applied at the image level rather than the slice level (information on weighted prediction). Weights are applied to a specific reference image of the image, and also to all slices of the image.

[0177] a. Alternatively, the tools used for weighted prediction may be applied at the image level or the slice level, but may not be applied at both levels for the same image. That is, when weighted prediction is applied at the image level, the weighted prediction does not require additional signaling for each slice of the image.

[0178] b. Alternatively, tools for weighted prediction can be applied at both the image and slice levels.

[0179] 2. The prediction weighting table syntax can be signaled at the picture level rather than the slice level. For this purpose, information about the weighted prediction syntax can be signaled in the picture header (PH) or picture parameter set (PPS).

[0180] 3. Alternatively, when the tool used for weighted prediction is applicable at the image level or the slice level, the tool used for weighted prediction can be notified at the image level or the slice level by a signal.

[0181] a. Image-level signaling is present in the image header.

[0182] b. Slice-level signaling is present in the slice header.

[0183] 4. Alternatively, when the tool used for weighted prediction is applicable at the image level or the slice level, the tool used for weighted prediction can be signaled at the image level, and then the tool can be overridden at the slice level.

[0184] a. Image-level signaling is present in the image header.

[0185] b. Slice-level signaling is present in the slice header.

[0186] 5. When the prediction weighting table exists in the image header, the number of weighted reference images can be explicitly signaled. A number from reference image list 0 and a number from reference image list 1 can be signaled. When the prediction weighting table exists in the slice header, this number can be inferred from the number of active reference images in reference image list 0 and reference image list 1.

[0187] 6. When a tool used for weighted prediction (e.g., a prediction weighting table) is signaled in the image header, a reference image signaling for the image (and slices of the image) may be present in the image header.

[0188] 7. When weighted prediction is applied at the picture level, if weighted prediction is applied to a picture, all slices of the picture can have the same active reference picture. This includes the order of the active reference pictures in the reference picture list (i.e., L0 of slice P, L0 and L1 of slice B).

[0189] 8. Alternatively, when the above does not apply, the following may apply.

[0190] a. The signaling for weighted prediction is independent of the signaling for the reference image list. That is, there are no assumptions about the order of the reference images in the RPL in the signaling for the weighted prediction table.

[0191] b. There is no signaling for weighted predictions for reference images in L0 and L1. For reference images, the weighted values ​​are provided directly.

[0192] c. Use only one loop, instead of two, to signal the weighted values ​​of the reference images. Within each loop, identify the reference images associated with the weighted values ​​signaled first.

[0193] d. Reference image recognition is based on the image sequence count (POC) value.

[0194] e. For bit saving, the incremental POC value between the reference image and the current image can be signaled instead of the POC value of the reference image.

[0195] 9. In addition to item 4, in order to signal the incremental POC value between the reference image and the current image, the following can be further specified so that the absolute incremental POC value can be signaled as follows.

[0196] a. The first incremental POC notified by the signal is the increment between the POC of the reference image and the POC of the current image.

[0197] b. The remaining incremental POCs notified by signals (i.e., the case where i starts from 1) are the increments between the POC of the i-th reference image and the POC of the (i-1)-th reference image.

[0198] 10. Two flags in PPS can be unified into a single control flag (e.g., pps_weighted_pred_flag). This flag can be used to indicate the presence of additional flags in the image header.

[0199] The flags in a.PH can be conditional on the PPS flag, and can further indicate the presence of pred_weighted_table() data (predictive weighted table syntax) when the NAL unit type is not Instantaneous Decoding Refresh (IDR).

[0200] 11. The two flags (pps_weighted_pred_flag and pps_weighted_bipred_flag) used for signal notification in PPS can be unified into a single flag. This single flag can use the existing name of pps_weighted_pred_flag.

[0201] 12. A signal flag can be included in the image header to indicate whether weighted prediction is applied to the image associated with the image header. This flag can be called `pic_weighted_pred_flag`.

[0202] The existence of `pic_weighted_pred_flag` is conditional upon the value of `pps_weighted_pred_flag`. When the value of `pps_weighted_pred_flag` is 0, `pic_weighted_pred_flag` does not exist, and its value can be inferred to be 0.

[0203] b. When the value of pic_weighted_pred_flag is 1, the image header may contain the signaling of pred_weighted_table().

[0204] 13. Alternatively, when weighted prediction is enabled (i.e., pps_weighted_pred_flag is 1 or pps_weighted_bipred_flag is 1), information about weighted prediction may still remain in the slice header, and the following may apply.

[0205] a. A new flag can be signaled to indicate whether information about weighted prediction exists in the slice header. The flag can be called slice_weighted_pred_present_flag.

[0206] b. The existence of slice_weighted_pred_present_flag can be determined based on the slice type and the values ​​of pps_weighted_pred_flag and pps_weighted_bipred_flag.

[0207] In this document, information regarding weighted prediction may include information / syntax elements related to weighted prediction as described in Tables 1 through 4. Video / image information may include various inter-frame prediction information, such as information regarding weighted prediction, residual information, and inter-frame prediction mode information. Inter-frame prediction mode information may include information / syntax elements such as information indicating whether a merge mode or MVP mode is applied to the current block, and selection information for selecting one of the motion candidates from the motion candidate list. For example, when a merge mode is applied to the current block, a merge candidate list is constructed based on the neighboring blocks of the current block, and a candidate can be selected / used from the merge candidate list (based on the merge index) to derive motion information about the current block. In another example, when the MVP mode is applied to the current block, an MVP candidate list can be constructed based on the neighboring blocks of the current block, and a candidate can be selected / used from the MVP candidate list (based on the MVP flag) to derive motion information about the current block.

[0208] In one implementation, for weighted prediction in inter-frame prediction, PPS may include the syntax elements shown in Table 5 below, and the semantics of the syntax elements may be as shown in Table 6 below.

[0209] [Table 5]

[0210]

[0211] [Table 6]

[0212]

[0213] Referring to Tables 5 and 6, a value of 0 for pps_weighted_pred_flag indicates that weighted prediction was not applied to the P or B slice of the reference PPS. A value of 1 for pps_weighted_pred_flag indicates that weighted prediction was applied to the P or B slice of the reference PPS.

[0214] In addition, the image header may include the syntax elements shown in Table 7 below, and the semantics of the syntax elements may be as shown in Table 8 below.

[0215] [Table 7]

[0216]

[0217] [Table 8]

[0218]

[0219] Referring to Tables 7 and 8, a value of 0 for pic_weighted_pred_flag indicates that weighted prediction was not applied to the P or B slices of the reference image header. A value of 1 for pic_weighted_pred_flag indicates that weighted prediction was applied to the P or B slices of the reference image header.

[0220] When pic_weighted_pred_flag is 1, all slices in the image associated with the image header can have the same list of reference images. Otherwise, when pic_weighted_pred_flag is 1, pic_rpl_present_flag can be 1.

[0221] If the above conditions are not met, pic_weighted_pred_flag can be notified by a signal, as shown in Table 9 below.

[0222] [Table 9]

[0223]

[0224] The slice header may include the syntax elements shown in Table 10 below.

[0225] [Table 10]

[0226]

[0227] The prediction weighted table syntax can include the syntax elements shown in Table 11 below, and the semantics of the syntax elements can be shown in Table 12 below.

[0228] [Table 11]

[0229]

[0230] [Table 12]

[0231]

[0232] Referring to Tables 11 and 12, num_10_weighted_ref_pics can indicate the number of weighted reference images in reference image list 0. The value of num_10_weighted_ref_pics is included in the range from 0 to MaxDecPicBuffMinus1+14.

[0233] `num_11_weighted_ref_pics` indicates the number of weighted reference images in reference image list 1. The value of `num_11_weighted_ref_pics` is included in the range from 0 to `MaxDecPicBuffMinus1+14`.

[0234] The value of luma_weight_10_flag[i] equal to 1 indicates the existence of a weighting factor for the luminance component predicted using list 0 (L0) of RefPicList[0][i].

[0235] A value of chroma_weight_10_flag[i] equal to 1 indicates the presence of weighting factors for the chroma predictions using L0 predictions from RefPicList[0][i]. A value of chroma_weight_10_flag[i] equal to 0 indicates the absence of these weighting factors.

[0236] A value of 1 for luma_weight_11_flag[i] indicates the existence of a weighting factor for the luminance component predicted using list 1 (L1) of RefPicList[0][i].

[0237] `chroma_weight_11_flag[i]` indicates the presence of weighting factors for the chroma predictions using L1 predictions from `RefPicList[0][i]`. A value of 0 for `chroma_weight_10_flag[i]` indicates that these weighting factors do not exist.

[0238] For example, when applying weighted prediction to the current block, the encoding device can generate information about the number of weighted reference images in the reference image list for the current block based on the weighted prediction. This quantity information can refer to the number of weights signaled for items (reference images) in the L0 and / or L1 reference image lists. That is, the value of the quantity information can be equal to the number of weighted reference images in the reference image lists (L0 and / or L1). Therefore, when the value of the quantity information is n, the prediction weighting table syntax can include n weighting factor-related flags for the reference image list. These weighting factor-related flags can correspond to luma_weight_l0_flag, luma_weight_l1_flag, chroma_weight_l0_flag, and / or chroma_weight_l0_flag in Table 11. The weights of the current image can be derived based on these weighting factor-related flags.

[0239] When weighted double prediction is applied to the current block, the prediction weighting table syntax can independently include information about the number of weighted reference images in the L1 reference image list and information about the number of weighted reference images in the L0 reference image list, as shown in Table 11. Weighting factor-related flags can be independently included for each of the information about the number of weighted reference images in the L1 and L0 reference image lists. That is, the prediction weighting table syntax can include the same number of `luma_weight_l0_flag` and / or `chroma_weight_l0_flag` as the number of weighted reference images in the L0 reference image list, and can include the same number of `luma_weight_l1_flag` and / or `chroma_weight_l1_flag` as the number of weighted reference images in the L1 reference image list.

[0240] The encoding device can encode image information including quantity information and weighting factor related flags, and can output the encoded image information in the form of a bitstream. Here, the prediction weighting table syntax in the image information, as shown in Table 11, can include quantity information and weighting factor related flags. The prediction weighting table syntax can be included in the image header or the slice header of the image information. To indicate whether the prediction weighting table syntax is included in the image header, that is, to indicate whether information about weighted prediction exists in the image header, weighted prediction related flags can be included in the image parameter set and / or the image header. When the weighted prediction related flags are included in the image parameter set, the weighted prediction related flags can correspond to pps_weighted_pred_flag in Table 5. When the weighted prediction related flags are included in the image header, the weighted prediction related flags can correspond to pic_weighted_pred_flag in Table 7. Alternatively, pps_weighted_pred_flag and pic_weighted_pred_flag can be included in the image information to indicate whether the prediction weighting table syntax is included in the image header.

[0241] When parsing weighted prediction-related flags from a bitstream, the decoding device can parse the prediction weighted table syntax from the bitstream based on the parsed flags. Weighted prediction-related flags can be parsed from the picture parameter set and / or the picture header of the bitstream. In other words, weighted prediction-related flags may include pps_weighted_pred_flag and / or pic_weighted_pred_flag. When the value of pps_weighted_pred_flag and / or pic_weighted_pred_flag is 1, the decoding device can parse the prediction weighted table syntax from the picture header of the bitstream.

[0242] When the prediction weighted table syntax is parsed from the image header (when the values ​​of pps_weighted_pred_flag and / or pic_weighted_pred_flag are 1), the decoding device can apply the information about weighted predictions included in the prediction weighted table syntax to all slices in the current image. In other words, when the prediction weighted table syntax is parsed from the image header, all slices in the image associated with the image header can have the same list of reference images.

[0243] The decoding device can parse the number of weighted reference images in the reference image list for the current block based on the prediction weighting table syntax. The value of the number information can be equal to the number of weighted reference images in the reference image list. When weighted double prediction is applied to the current block, the decoding device can independently parse the number of weighted reference images in the L1 reference image list and the L0 reference image list from the prediction weighting table syntax.

[0244] The decoding device can parse the weighting factor-related flags of the reference image list from the prediction weighting table syntax based on the quantity information. The weighting factor-related flags can correspond to `luma_weight_l0_flag`, `luma_weight_l1_flag`, `chroma_weight_l0_flag`, and / or `chroma_weight_l0_flag` in Table 11. For example, when the quantity information value is n, the decoding device can parse n weighting factor-related flags from the prediction weighting table syntax. The decoding device can deduce the weights of the reference images for the current block based on the weighting factor-related flags, and can perform weighted prediction on the current block based on the weights, thereby generating or deduce prediction samples. Subsequently, the decoding device can generate or deduce reconstructed samples for the current block based on the prediction samples, and can reconstruct the current image based on the reconstructed samples.

[0245] In another implementation, for weighted prediction in inter-frame prediction, the image header may include the syntax elements shown in Table 13 below, and the semantics of the syntax elements may be as shown in Table 14 below.

[0246] [Table 13]

[0247]

[0248] [Table 14]

[0249]

[0250] Referring to Tables 13 and 14, a value of pic_weighted_pred_flag equal to 0 indicates that weighted prediction was not applied to the P or B slices of the reference image header. A value of pic_weighted_pred_flag equal to 1 indicates that weighted prediction was applied to the P or B slices of the reference image header. When the value of sps_weighted_pred_flag is 0, the value of pic_weighted_pred_flag is 0.

[0251] The slice header may include the syntax elements shown in Table 15 below.

[0252] [Table 15]

[0253]

[0254]

[0255] Referring to Table 15, the weighted prediction-related flag (pic_weighted_pred_flag) can indicate whether the prediction weighted table syntax (information about weighted prediction) exists in the image header or the slice header. A value of pic_weighted_pred_flag equal to 1 indicates that the prediction weighted table syntax (information about weighted prediction) may exist in the image header, but not in the slice header. A value of pic_weighted_pred_flag equal to 0 indicates that the prediction weighted table syntax (information about weighted prediction) may exist in the slice header, but not in the image header. Although Tables 13 and 14 show that the weighted prediction-related flag is signaled in the image header, it can also be signaled in the image parameter set.

[0256] For example, when applying weighted prediction to the current block, the encoding device performs weighted prediction and can encode image information including weighted prediction-related flags and prediction weighting table syntax based on the weighted prediction. Here, when the prediction weighting table syntax is included in the image header of the image information, the encoding device can determine that the flag value is 1, and when the prediction weighting table syntax is included in the slice header of the image information, the encoding device can determine that the flag value is 0. When the flag value is 1, the information about weighted prediction included in the prediction weighting table syntax can be applied to all slices in the current image. When the flag value is 0, the information about weighted prediction included in the prediction weighting table syntax can be applied to the slices in the current image associated with the slice header. Therefore, when the image header includes the prediction weighting table syntax, all slices in the image associated with the image header can have the same list of reference images, and when the slice header includes the prediction weighting table syntax, the slices associated with the slice header can have the same list of reference images.

[0257] The prediction weighting table syntax may include information such as the number of weighted reference images in the reference image list for the current block, weighting factor related flags, etc. As mentioned above, the quantity information may refer to the number of weights signaled for items (reference images) in the L0 and / or L1 reference image lists, and the value of the quantity information may be equal to the number of weighted reference images in the reference image lists (L0 and / or L1). Therefore, when the value of the quantity information is n, the prediction weighting table syntax may include n weighting factor related flags for the reference image lists. The weighting factor related flags may correspond to luma_weight_l0_flag, luma_weight_l1_flag, chroma_weight_l0_flag, and / or chroma_weight_l0_flag in Table 11.

[0258] When weighted double prediction is applied to the current block, the encoding device can generate a prediction weighting table syntax that includes information about the number of weighted reference images in the L1 reference image list and information about the number of weighted reference images in the L0 reference image list. The prediction weighting table syntax can independently include weighting factor-related flags for each of the information about the number of weighted reference images in the L1 reference image list and the L0 reference image list. That is, the prediction weighting table syntax can include the same number of `luma_weight_l0_flag` and / or `chroma_weight_l0_flag` as the number of weighted reference images in the L0 reference image list, and can include the same number of `luma_weight_l1_flag` and / or `chroma_weight_l1_flag` as the number of weighted reference images in the L1 reference image list.

[0259] When parsing weighted prediction related flags from a bitstream, the decoding device can parse the prediction weighted table syntax from the bitstream based on the parsed flags. The weighted prediction related flags can be parsed from the picture parameter set and / or the picture header of the bitstream. In other words, the weighted prediction related flags can correspond to `pps_weighted_pred_flag` and / or `pic_weighted_pred_flag`. When the value of a weighted prediction related flag is 1, the decoding device can parse the prediction weighted table syntax from the picture header of the bitstream. When the value of a weighted prediction related flag is 0, the decoding device can parse the prediction weighted table syntax from the slice header of the bitstream.

[0260] When the prediction weighted table syntax is parsed from the image header, the decoding device can apply the information about weighted predictions included in the prediction weighted table syntax to all slices in the current image. In other words, when the prediction weighted table syntax is parsed from the image header, all slices in the image associated with the image header can have the same list of reference images. When the prediction weighted table syntax is parsed from the slice header, the decoding device can apply the information about weighted predictions included in the prediction weighted table syntax to the slices in the current image associated with the slice header. In other words, when the prediction weighted table syntax is parsed from the image header, the slices associated with the slice header can have the same list of reference images.

[0261] The decoding device can parse the number of weighted reference images in the reference image list for the current block based on the prediction weighting table syntax. The value of the number information can be equal to the number of weighted reference images in the reference image list. When weighted double prediction is applied to the current block, the decoding device can independently parse the number of weighted reference images in the L1 reference image list and the number of weighted reference images in the L0 reference image list from the prediction weighting table syntax.

[0262] The decoding device can parse the weighting factor-related flags of the reference image list from the prediction weighting table syntax based on the quantity information. The weighting factor-related flags can correspond to the aforementioned `luma_weight_l0_flag`, `luma_weight_l1_flag`, `chroma_weight_l0_flag`, and / or `chroma_weight_l0_flag`. For example, when the quantity information value is n, the decoding device can parse n weighting factor-related flags from the prediction weighting table syntax. The decoding device can deduce the weights of the reference images for the current block based on the weighting factor-related flags, and can perform inter-frame predictions for the current block based on the weights, thereby generating or deduce prediction samples. The decoding device can generate or deduce reconstructed samples for the current block based on the prediction samples, and can generate a reconstructed image of the current image based on the reconstructed samples.

[0263] In another embodiment, the prediction weighted table syntax may include the syntax elements shown in Table 16 below, and the semantics of the syntax elements may be as shown in Table 17 below.

[0264] [Table 16]

[0265]

[0266] [Table 17]

[0267]

[0268]

[0269] In Tables 16 and 17, when pic_poc_delta_sign[i] does not exist, pic_poc_delta_sign[i] is inferred as 0. DeltaPocWeightedRefPic[i] can be derived as follows, where i is included in the range from 0 to num_weighted_ref_pics_minus1.

[0270] [Equation 1]

[0271] DeltaPocWeightedRefPic[i] = pic_poc_abs_delta[i] * (1 - 2 * pic_poc_delta_sign[i])

[0272] Chromaweight[i][j] can be derived as (1 << Chromalog2WeightDenom) + delta_chroma_weight[i][j]. When the value of chroma_weight_flag[i] is 1, the value of delta_chroma_weight[i][j] is included in the range from -128 to 127. When the value of chroma_weight_flag[i] is 0, Chromaweight[i][j] can be derived as 2Chromalog2WeightDenom.

[0273] ChromaOffset[i][j] can be derived as follows.

[0274] [Equation 2]

[0275] ChromaOffset[i][j] = Clip3(-128, 127,

[0276] (128 + delta chroma offset[i][j] -

[0277] ((128 * ChromaWeight[i][j]) >> ChromaLog2WeightDenom)))

[0278] The value of delta_chroma_offset[i][j] can be included in the range from -4 * 128 to 4 * of 127. When the value of chroma_weight_flag[i] is 0, the value of ChromaOffset[i][j] is inferred as 9.

[0279] sumWeightflags can be derived as the sum of luma_weight_flag[i] + 2 * chroma_weight_flag[i]. i is included in the range from 0 to num_weighted_ref_pics_minus1. When slice_type is P, sumWeightL0Flags is less than or equal to 24.

[0280] When the current slice is a P slice or a B slice and the value of pic_weighted_pred_flag is 1, L0ToWeightedRefIdx[i] can represent the mapping between the index in the weighted reference image list and the i-th reference image L0. i is included in the range from 0 to NumRefIdxActive[0]-1, and can be derived as follows.

[0281] [Formula 3]

[0282]

[0283] When the current slice is slice B and the value of pic_weighted_pred_flag is 1, L1ToWeightedRefIdx[i] can represent the mapping between the index in the weighted reference image list and the i-th active reference image L1. i is included in the range from 0 to NumRefIdxActive[1]-1, and can be derived as follows.

[0284] [Formula 4]

[0285]

[0286] When luma_weight_10_flag[i] appears, luma_weight_10_flag[i] is replaced by luma_weight_flag[L0ToWeightedRefIdx[i]], and when luma_weight_l1_flag[i] appears, luma_weight_l1_flag[i] is replaced by luma_weight_flag[L1ToWeightedRefIdx[i]].

[0287] When LumaWeightL0[i] appears, LumaWeightL0[i] is replaced by LumaWeight[L0ToWeightedRefIdx[i]], and when LumaWeightL1[i] appears, LumaWeightL1[i] is replaced by LumaWeight[L1ToWeightedRefIdx[i]].

[0288] When luma_offset_l0[i] appears, luma_offset_l0[i] is replaced by luma_offset[L0ToWeightedRefIdx[i]], and when luma_offset_l1[i] appears, luma_offset_l1[i] is replaced by luma_offset[L1ToWeightedRefIdx[i]].

[0289] When ChromaWeightL0[i] appears, ChromaWeightL0[i] is replaced by ChromaWeight[L0ToWeightedRefIdx[i]], and when ChromaWeightL1[i] appears, ChromaWeightL1[i] is replaced by ChromaWeight[L1ToWeightedRefIdx[i]].

[0290] In another embodiment, the slice header syntax may include the syntax elements shown in Table 18 below, and the semantics of the syntax elements may be shown in Table 19 below.

[0291] [Table 18]

[0292]

[0293] [Table 19]

[0294]

[0295] Referring to Tables 18 and 19, a flag indicating the presence of the prediction weighted table syntax can be used in the slice header. This flag can be signaled in the slice header and can be referred to as slice_weight_pred_present_flag.

[0296] A value of 1 for `slice_weight_pred_present_flag` indicates that the prediction weighting table syntax is present in the slice header. A value of 0 for `slice_weight_pred_present_flag` indicates that the prediction weighting table syntax is not present in the slice header. In other words, a value of 0 for `slice_weight_pred_present_flag` indicates that the prediction weighting table syntax is present in the image header.

[0297] In another implementation, the predicted weighted table syntax is parsed from the slice header, but the set of adaptation parameters included in the syntax elements shown in Table 20 below can be signaled.

[0298] [Table 20]

[0299]

[0300] Each APS RBSP needs to be available for the decoding process before being included for use as a reference in at least one access unit, the access unit having a TemporalId less than or equal to the TemporalId of the encoded slice NAL unit, which references the APS RBSP or is provided by an external method.

[0301] The `aspLayerId` can be referred to as the `nuh_layer_id` of an APS NAL unit. When the layer with a `nuh_layer_id` equal to `aspLayerId` is an independent layer (i.e., when `vps_independent_layer_flag[GeneralLayerIdx[aspLayerId]]` is 1), the APS NAL unit, including the APS RBSP, has the same `nuh_layer_id` as the coded slice NAL of the reference APS RBSP. Otherwise, the APS NAL unit, including the APS RBSP, has the same `nuh_layer_id` as the coded slice NAL unit of the reference APS RBSP or the `nuh_layer_id` of the directly dependent layer of the layer including the coded slice NAL unit of the reference APS RBSP.

[0302] All APS NAL units in the access unit that have specific values ​​for adaptation_parameter_set_id and aps_params_type have the same content.

[0303] The adaptation_parameter_set_id provides an identifier for the APS so that other syntax elements can refer to the identifier.

[0304] When aps_params_type is ALF_APS, SCALING_APS, or PRED_WEIGHT_APS, the value of adaptation_parameter_set_id is included in the range from 0 to 7.

[0305] When aps_params_type is LMCS_APS, the value of adaptation_parameter_set_id is included in the range from 0 to 3.

[0306] aps_params_type indicates the type of APS parameters included in the APS, as shown in Table 21 below. When the value of aps_params_type is 1 (LMCS_APS), the value of adaptation_parameter_set_id is included in the range from 0 to 3.

[0307] [Table 21]

[0308] aps_params_type The name of aps_params_type Types of APS parameters 0 ALF_APS ALF parameters 1 LMCS_APS LMCS parameters 2 SCALING_APS Scaling list parameters 3 PRED_WEIGHT_APS Predicting weighted parameters 4..7 reserve reserve

[0309] Each type of APS uses a separate value space for adaptation_parameter_set_id.

[0310] APS NAL units (with specific values ​​for adaptation_parameter_set_id and aps_params_type) can be shared between images, and different slices in an image can reference different ALF APSs.

[0311] A value of 0 for `aps_extension_flag` indicates that the `aps_extension_data_flag` syntax element does not exist in the APSRBSP syntax structure. A value of 1 for `aps_extension_flag` indicates that the `aps_extension_data_flag` syntax element exists in the APSRBSP syntax structure.

[0312] aps_extension_data_flag can have random values.

[0313] As mentioned above, a new aps_params_type(PRED_WEIGHT_APS) can be added to the existing type. Furthermore, the slice header can be modified to signal the APS ID instead of pred_weight_table(), as shown in Table 22 below.

[0314] [Table 22]

[0315]

[0316] In Table 22, slice_pred_weight_aps_id indicates the adaptation_parameter_set_id of the prediction weighting table APS. The TemporalId of the APS NAL unit with the same aps_params_type as PERD_WEIGHT_APS and the same adaptation_parameter_set_id as slice_pred_weight_aps_id is less than or equal to the TemporalId of the encoded slice NAL unit.

[0317] When the slice_pred_weight_aps_id syntax element exists in the slice header, the value of slice_pred_weight_aps_id is the same for all slices of the image.

[0318] In this case, the prediction weighting table syntax shown in Table 23 below can be signaled.

[0319] [Table 23]

[0320]

[0321]

[0322] In Table 23, a value of 1 for num_lists_active_flag indicates that the prediction weighting table information is signaled for a single list of reference images. A value of 0 for num_lists_active_flag indicates that the prediction weighting table information for two lists of reference images, L0 and L1, is not signaled.

[0323] numRefIdxActive[i] can be used to indicate the number of active reference indices. The value of numRefIdxActive[i] ranges from 0 to 14.

[0324] The syntax of Table 23 indicates whether information about one or two lists was parsed in the APS when num_lists_active_flag was parsed.

[0325] Instead of Table 23, the prediction weighted table syntax shown in Table 24 below can be used.

[0326] [Table 24]

[0327]

[0328] In Table 24, a value of 1 for num_lists_active_flag indicates that prediction weighting table information is signaled for a list of reference images. A value of 0 for num_lists_active_flag indicates that prediction weighting table information is not signaled for two lists of reference images.

[0329] In another embodiment, the image parameter set syntax may include the syntax elements shown in Table 25 below, and the semantics of the syntax elements may be shown in Table 26 below.

[0330] [Table 25]

[0331]

[0332] [Table 26]

[0333]

[0334] Referring to Tables 25 and 26, the image parameter set may include information about flags indicating whether weighted prediction is applied to slices of the reference image parameter set and information about flags indicating whether information about weighted prediction exists in the image header or the slice header.

[0335] Information regarding flags indicating whether weighted prediction is applied to slices of the reference image parameter set may include a pps_weighted_pred_flag syntax element indicating whether weighted prediction is applied to P or B slices of the reference image parameter set and / or a pps_weighted_bipred_flag syntax element indicating whether weighted prediction is applied to B slices of the reference image parameter set.

[0336] Information indicating whether the weighted prediction information is present in the image header or the slice header may include the `weighted_pred_table_present_in_ph_flag` syntax element, which is used when the value of the `pps_weighted_pred_flag` and / or `pps_weighted_bipred_flag` syntax elements is 1.

[0337] The `weighted_pred_table_present_in_ph_flag` syntax element can be included in the image parameter set. When the flag indicating whether the information about weighted prediction is present in the image header or the slice header is set to 1, the information about weighted prediction included in the prediction weighting table syntax may not be present in the slice header of the reference image parameter set, but may be present in the image header of the reference image parameter set. When the flag indicating whether the information about weighted prediction is present in the image header or the slice header is set to 0, the information about weighted prediction may not be present in the image header of the reference image parameter set, but may be present in the slice header of the reference image parameter set.

[0338] In this case, the image header syntax and slice header syntax can be notified by signals as shown in Tables 27 and 28, respectively.

[0339] [Table 27]

[0340]

[0341] [Table 28]

[0342]

[0343]

[0344] Referring to Table 27, when the flags indicating whether weighted prediction is applied to slices of the reference image parameter set (pps_weighted_pred_flag and / or pps_weighted_bipred_flag) are 1 and the flag indicating whether information about weighted prediction exists in the image header or the slice header (weighted_pred_table_present_in_ph_flag) is 1, the image header syntax may include the prediction weighted table syntax (pred_weight_table).

[0345] Referring to Table 28, when the flags indicating whether weighted prediction is applied to slices of the reference image parameter set (pps_weighted_pred_flag and / or pps_weighted_bipred_flag) are 1 and the flag indicating whether information about weighted prediction exists in the image header or the slice header (weighted_pred_table_present_in_ph_flag) is 0, the slice header syntax may include the prediction weighted table syntax (pred_weight_table). Specifically, when pps_weighted_pred_flag is 1, the slice type is P slice, and the value of weighted_pred_table_present_in_ph_flag is 0, the prediction weighted table syntax may be included in the slice header. Alternatively, when pps_weighted_bipred_flag is 1, the slice type is B slice, and the value of weighted_pred_table_present_in_ph_flag is 0, the prediction weighted table syntax may be included in the slice header.

[0346] The prediction weighted table syntax can include the syntax elements shown in Table 29 below, and the semantics of the syntax elements can be shown in Table 30 below.

[0347] [Table 29]

[0348]

[0349] [Table 30]

[0350]

[0351] Referring to Tables 29 and 30, the prediction weighting table syntax may include quantity information for weighted predictions. This quantity information can indicate the number of weighted reference images in the reference image list. In other words, the value of the quantity information can be the same as the number of weighted reference images in the reference image list. The reference image list may include an L0 reference image list and an L1 reference image list. For example, the quantity information for weighted predictions may include first quantity information (num_10_weighted_ref_pics) for the L0 reference image list and second quantity information (num_10_weighted_ref_pics) for the L1 reference image list. As shown in Table 29, the first and second quantity information can be parsed independently from the prediction weighting table syntax. The quantity information for weighted predictions can be included in the prediction weighting table syntax based on flags indicating whether information about weighted predictions is present in the image header or the slice header (e.g., the weighted_pred_table_present_in_ph_flag syntax element). For example, when flags indicating whether information about weighted predictions is present in the image header or the slice header (e.g., ...

[0352] When the value of the weighted_pred_table_present_in_ph_flag syntax element is 1, the quantity information of the weighted prediction can be included in the prediction weighted table syntax. When the value of flag is 0, the first quantity information can be inferred as NumRefIdxActive[0], and the second quantity information can be inferred as NumRefIdxActive[1].

[0353] NumRefIdxActive[i] can indicate the number of (active) reference indices of the RPLi used to decode the corresponding slice.

[0354] The syntax element (luma_weight_10_flag) indicating the existence of a weighting factor for L0 prediction can be parsed from the prediction weighting table syntax based on a first quantity of information. The syntax element (luma_weight_11_flag) indicating the existence of a weighting factor for L1 prediction can be parsed from the prediction weighting table syntax based on a second quantity of information. For example, when the value of the first quantity of information is n, n luma_weight_10_flag syntax elements can be parsed from the prediction weighting table syntax. Similarly, when the value of the second quantity of information is n, n luma_weight_11_flag syntax elements can be parsed from the prediction weighting table syntax.

[0355] Figure 7 and Figure 8 Examples of video / image encoding methods and related components according to the embodiments of this document are illustrated schematically.

[0356] Figure 7 The publicly disclosed video / image coding methods can be derived from... Figure 2 and Figure 7 The (video / image) encoding device 200 disclosed herein performs the operation. Specifically, for example, Figure 7 S700 and S710 can be executed by the predictor 220 of the encoding device 200, and S720 can be executed by the residual processor 230 of the encoding device 200. S730 can be executed by the entropy encoder 240 of the encoding device 200. Figure 7 The video / image encoding methods disclosed herein may include the embodiments described above.

[0357] Specifically, refer to Figure 7 and Figure 8 The predictor 220 of the encoding device can deduce motion information about the current block in the current image based on motion estimation (S700). For example, the encoding device can use the original block in the original image to search for similar reference blocks with high correlation to the current block in a predetermined search range in the reference image, in fractional pixel units, and thus deduce motion information. The similarity of the blocks can be deduced based on the difference between sample values ​​based on the stage. For example, the similarity of the blocks can be calculated based on the sum of absolute differences (SAD) between the current block (or a template of the current block) and the reference block (or a template of the reference block). In this case, the motion information can be deduced based on the reference block with the minimum SAD in the search area. According to various methods, based on the inter-frame prediction mode, the deduced motion information can be signaled to the decoding device.

[0358] The predictor 220 of the encoding device can perform weighted (sample) prediction on the current block based on motion information about the current block, and can generate prediction samples (prediction blocks) and prediction-related information for the current block based on the weighted prediction (S710). The prediction-related information may include prediction mode information (merging mode, skipping mode, etc.), information about motion information, information about weighted prediction, etc. The information about motion information may include candidate selection information (e.g., merge index, MVP flag, or MVP index), which is information used to derive motion vectors. Furthermore, the information about motion information may include information about the aforementioned MVD and / or reference image index information. Additionally, the information about motion information may include information indicating whether L0 prediction, L1 prediction, or double prediction is applied. For example, when the slice type of the current slice is a P slice or a B slice, the predictor 220 can perform weighted prediction on the current block in the current slice. Weighted prediction can be used not only when double prediction is applied to the current block, but also when single prediction is applied to the current block.

[0359] The residual processor 230 of the encoding device can generate residual samples and residual information based on the predicted samples generated by the predictor 220 and the original image (original block and original sample) (S720). Here, the residual information is information about the residual samples and may include information about the (quantization) transform coefficients used for the residual samples.

[0360] The adder (or reconstructor) of the encoding device can generate reconstructed samples (reconstructed images, reconstructed blocks, or arrays of reconstructed samples) by adding the residual samples generated by the residual processor 230 and the predicted samples generated by the predictor 220.

[0361] The entropy encoder 240 of the encoding device can encode image information including prediction-related information and information about the weighted prediction generated by the predictor 220, residual information generated by the residual processor 230, etc. (S730). Here, the information about the weighted prediction may include flags related to whether the weighted prediction is applied to slices of the picture parameter set of the reference image information (hereinafter referred to as "first flags"), flags related to whether the information about the weighted prediction exists in the picture header or the slice header of the image information (hereinafter referred to as "second flags"), prediction weighting table syntax, etc. The first flag may include a pps_weighted_pred_flag syntax element indicating whether the weighted prediction is applied to P or B slices of the reference picture parameter set and / or a pps_weighted_bipred_flag syntax element indicating whether the weighted prediction is applied to B slices of the reference picture parameter set. The second flag may be, for example, weighted_pred_table_present_in_ph_flag, when the value of the pps_weighted_pred_flag and / or pps_weighted_bipred_flag syntax elements is 1.

[0362] The `weighted_pred_table_present_in_ph_flag` can be included in the image parameter set. When the second flag is 1, information about weighted predictions included in the prediction weighting table syntax may not be present in the slice header of the reference image parameter set, but may be present in the image header of the reference image parameter set. When the second flag is 0, information about weighted predictions may not be present in the image header of the reference image parameter set, but may be present in the slice header of the reference image parameter set.

[0363] Based on the values ​​of the first flag (pps_weighted_pred_flag and / or pps_weighted_bipred_flag) and the second flag, the prediction weighted table syntax can be included in the image header or slice header of the image information. For example, when both the first and second flags are 1, the prediction weighted table syntax can be included in the image header. When the first flag is 1 and the second flag is 0, the prediction weighted table syntax can be included in the slice header.

[0364] The prediction weighting table syntax can include the number of weighted predictions based on the value of the second flag. The value of the number of predictions can be the same as the number of weighted reference images in the reference image list. Here, the reference image list can include the L0 reference image list and the L1 reference image list. The number of predictions can include first number information (num_10_weighted_ref_pics) about the L0 reference image list and second number information (num_10_weighted_ref_pics) about the L1 reference image list. As shown in Table 29, the first number information and the second number information can be parsed independently from the prediction weighting table syntax. The number of predictions can be included in the prediction weighting table syntax depending on whether the value of the second flag is 0 or 1. For example, when the value of the second flag is 1, the number of predictions can be included in the prediction weighting table syntax. When the value of the second flag is 0, the first number information can be inferred as NumRefIdxActive[0], and the second number information can be inferred as NumRefIdxActive[1].

[0365] The prediction weighting table syntax may include a syntax element (luma_weight_10_flag) indicating the presence of a weighting factor for L0 prediction and / or a syntax element (luma_weight_11_flag) indicating the presence of a weighting factor for L1 prediction. luma_weight_10_flag may be included in the prediction weighting table syntax based on a first quantity. luma_weight_11_flag may be included in the prediction weighting table syntax based on a second quantity. For example, when the value of the first quantity is n, n luma_weight_10_flag syntax elements may be included in the prediction weighting table syntax. Similarly, when the value of the second quantity is n, n luma_weight_11_flag syntax elements may be included in the prediction weighting table syntax.

[0366] For example, the entropy encoder 240 of the encoding device can encode image information based on at least one of Tables 5 to 23, and can output the encoded image information in the form of a bitstream. Specifically, when the prediction weighted table syntax is included in the image header of the image information, the entropy encoder 240 of the encoding device can set the values ​​of the first flag (pps_weighted_pred_flag and / or pps_weighted_bipred_flag) and the second flag (weighted_pred_table_present_in_ph_flag) to 1. When the prediction weighted table syntax is included in the slice header of the image information, the entropy encoder 240 of the encoding device can set the value of the first flag to 1 and the value of the second flag to 0. When the prediction weighted table syntax is included in the image header, all slices associated with the image header in the image can have the same list of reference images, and when the prediction weighted table syntax is included in the slice header, the slices associated with the slice header can have the same list of reference images. The first flag and the second flag can be included in the image parameter set of the image information and sent to the decoding device.

[0367] The predictor 220 of the encoding device can generate information about the number of weighted reference images in the reference image list based on weighted predictions according to motion information. In this case, the entropy encoder 240 of the encoding device can encode the image information including information about the number. The number information can be included or excluded from the prediction weighted table syntax based on whether the value of a flag is 0 or 1. The value of the number information can be the same as the number of weighted reference images in the reference image list. Therefore, the prediction weighted table syntax can include as many weighting factor-related flags (luma_weight_l0_flag and / or luma_weight_l1_flag) as the value of the number information. For example, when the value of the number information is n, the prediction weighted table syntax can include n weighting factor-related flags. For each of L0 and L1, the prediction weighted table syntax can independently include the number information and / or the weighting factor-related flags. In other words, the number information about the weighted reference images in L0 and the number information about the weighted reference images in L1 can be independently signaled in the prediction weighted table syntax without depending on each other (not dependent on the number of active reference images in each list).

[0368] Figure 9 and Figure 10 Examples of video / image decoding methods and related components according to embodiments of this document are illustrated schematically.

[0369] Figure 9 The publicly disclosed video / image decoding method can be used by Figure 3and Figure 10 The (video / image) decoding device 300 disclosed herein performs the operation. Specifically, for example, Figure 9 S900 and S910 can be executed by the entropy decoder 310 of the decoding device. S920 can be executed by the predictor 330 of the decoding device, and S930 can be executed by the residual processor 320 of the decoding device. S940 can be executed by the adder 340 of the decoding device. Figure 9 The video / image decoding methods disclosed herein may include the embodiments described above.

[0370] refer to Figure 9 and Figure 10 The entropy decoder 310 of the decoding device can parse a first flag related to whether weighted prediction is applied to a slice of the reference image parameter set from the image parameter set of the bitstream, and can parse a second flag related to whether information about weighted prediction exists in the image header or the slice header of the bitstream based on the first flag (S900). The entropy decoder 310 of the decoding device can parse the prediction weighted table syntax from the image header or the slice header based on the first and second flags (S910). Here, the first flag may include a pps_weighted_pred_flag syntax element indicating whether weighted prediction is applied to the P or B slice of the reference image parameter set and / or a pps_weighted_bipred_flag syntax element indicating whether weighted prediction is applied to the B slice of the reference image parameter set. The second flag can be parsed from the image parameter set when the value of the pps_weighted_pred_flag and / or pps_weighted_bipred_flag syntax elements is 1.

[0371] When the value of the second flag is 1, the information about weighted prediction included in the prediction weighting table syntax may not exist in the slice header of the reference image parameter set, but may exist in the image header of the reference image parameter set. When the value of the second flag is 0, the information about weighted prediction may not exist in the image header of the reference image parameter set, but may exist in the slice header of the reference image parameter set. Therefore, when the values ​​of the first flag and the second flag are 1, the entropy decoder 310 of the decoding device can parse the prediction weighting table syntax from the image header of the bitstream. When the value of the first flag is 1 and the value of the second flag is 0, the entropy decoder 310 of the decoding device can parse the prediction weighting table syntax from the slice header of the bitstream. When parsing the prediction weighting table syntax from the image header, all slices associated with the image header in the image can have the same list of reference images, and when parsing the prediction weighting table syntax from the slice header, the slices associated with the slice header can have the same list of reference images.

[0372] The entropy decoder 310 of the decoding device can parse the quantity information of the weighted prediction from the prediction weighting table syntax. The value of the quantity information can be the same as the number of weighted reference images in the reference image list. The entropy decoder 310 of the decoding device can parse as many weighting factor related flags (luma_weight_l0_flag and / or luma_weight_l1_flag) as the value of the quantity information from the prediction weighting table syntax. For example, when the value of the second flag is 1, the entropy decoder 310 of the decoding device can parse the quantity information from the prediction weighting table syntax. When the value of the second flag is 0, the first quantity information can be inferred as NumRefIdxActive[0], and the second quantity information can be inferred as NumRefIdxActive[1]. When the value of the quantity information is n, n weighting factor related flags can be parsed from the prediction weighting table syntax. For each of L0 and L1, the prediction weighting table syntax can independently include the quantity information and / or the weighting factor related flags. In one example, information about the number of weighted reference images in L0 and information about the number of weighted reference images in L1 can be parsed independently in the prediction weighted table syntax without depending on each other (not depending on the number of active reference images in each list).

[0373] The decoding device can perform weighted prediction on the current block in the current image based on prediction-related information (inter-frame / intra-frame prediction classification information, intra-frame prediction mode information, inter-frame prediction mode information, information about weighted prediction, etc.) obtained from the bitstream, thereby reconstructing the current image. Specifically, the predictor 330 of the decoding device can perform weighted prediction on the current block based on the syntax elements in the prediction weighting table syntax, thereby generating a prediction sample for the current block (S920). In one example, the predictor 330 of the decoding device can parse the weighting factor-related flags based on the number of weighted predictions in the prediction weighting table syntax, and can deduce the weights of the weighted predictions based on the weighting factor-related information. For example, when the value of the number of flags is n, the predictor 330 of the decoding device can parse n weighting factor-related flags from the prediction weighting table syntax. The predictor 330 of the decoding device can perform weighted prediction on the current block based on the weights, thereby deduce a prediction sample for the current block.

[0374] The residual processor 320 of the decoding device can generate residual samples based on the residual information obtained from the bitstream (S930). The adder 340 of the decoding device can generate reconstructed samples based on the predicted samples generated by the predictor 330 and the residual samples generated by the residual processor 320 (S940). The adder 340 of the decoding device can generate a reconstructed image (reconstructed block) based on the reconstructed samples.

[0375] Subsequently, if needed, in-loop filtering processes (such as deblocking, SAO, and / or ALF) can be applied to the reconstructed image to improve subjective / objective image quality.

[0376] Although the method has been described above based on a flowchart in which steps or boxes are listed in sequence, the steps in this document are not limited to a particular order, and a step may be performed in different steps, in different orders, or simultaneously with respect to the above order. Furthermore, those skilled in the art will understand that the steps in the flowchart are not exclusive, and one or more steps may be included or removed from the flowchart without affecting the scope of this document.

[0377] The methods mentioned above according to this document can be in the form of software, and the encoding and / or decoding devices according to this document can be included in a device for performing image processing (e.g., TV, computer, smartphone, set-top box, display device, etc.).

[0378] When implementing the embodiments of this document in software, the methods described above can be implemented using modules (processes or functions) that perform the functions mentioned above. Modules can be stored in memory and executed by a processor. Memory can be installed internally or externally to the processor and can be connected to the processor via various known means. The processor may include application-specific integrated circuits (ASICs), other chipsets, logic circuits, and / or data processing devices. Memory may include read-only memory (ROM), random access memory (RAM), flash memory, memory cards, storage media, and / or other storage devices. In other words, the embodiments of this document can be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in the corresponding figures can be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information about the implementation (e.g., information about instructions) or algorithms can be stored in a digital storage medium.

[0379] Furthermore, the decoding and encoding devices using the embodiments described in this document can be included in multimedia broadcast transceivers, mobile communication terminals, home theater video devices, digital cinema video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, portable cameras, video-on-demand (VoD) service providers, over-the-top (OTT) video devices, internet streaming service providers, 3D video devices, virtual reality (VR) devices, augmented reality (AR) devices, video telephony devices, vehicle-mounted terminals (e.g., vehicle (including autonomous vehicle) terminals, aircraft terminals, or ship terminals), and medical video devices; and can be used to process image signals or data. For example, OTT video devices can include game consoles, Blu-ray players, networked TVs, home theater systems, smartphones, tablet PCs, and digital video recorders (DVRs).

[0380] Furthermore, the processing methods described in this document can be generated in the form of a computer-executable program and can be stored in a computer-readable recording medium. Multimedia data with data structures according to the embodiments of this document can also be stored in a computer-readable recording medium. Computer-readable recording media include all types of storage devices and distributed storage devices storing computer-readable data. Computer-readable recording media can include, for example, Blu-ray discs (BD), Universal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disks, and optical data storage devices. Computer-readable recording media also include media implemented in the form of carrier waves (e.g., transmission over the Internet). Additionally, bitstreams generated by encoding methods can be stored in computer-readable recording media or transmitted via wired or wireless communication networks.

[0381] Furthermore, the implementations described in this document can be implemented as a computer program product based on program code, and the program code can be executed on a computer according to the implementations described in this document. The program code can be stored on a computer-readable medium.

[0382] Figure 11 This document provides examples of content streaming systems to which the implementation methods described herein can be applied.

[0383] refer to Figure 11 The implementation methods described in this document are applied to content streaming systems that typically include encoding servers, streaming servers, web servers, media storage, user devices, and multimedia input devices.

[0384] An encoding server is used to compress content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data, generate a bitstream, and then transmit it to a streaming server. In another example, where the bitstream is generated directly by the multimedia input device such as a smartphone, camera, or camcorder, the encoding server can be omitted.

[0385] Bitstreams can be generated using the encoding methods or bitstream generation methods described in this document. Furthermore, the streaming server can temporarily store the bitstream during transmission or reception.

[0386] A streaming server transmits multimedia data to a user's device via a web server based on a user's request. The web server acts as a tool to notify the user of available services. When a user requests a desired service, the web server forwards the request to the streaming server, which then delivers the multimedia data to the user. In this respect, the content streaming system may include a separate control server, which in this case controls the commands / responses between the various devices within the content streaming system.

[0387] A streaming server can receive content from media storage and / or encoding servers. For example, if content is received from an encoding server, it can be received in real time. In this case, the streaming server can store the bitstream for a predetermined period of time to provide a smooth streaming service.

[0388] For example, user equipment may include mobile phones, smartphones, laptops, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, board PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, head-mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc.

[0389] Each server in the content streaming system can be operated as a distributed server, and in this case, the data received by each server can be processed in a distributed manner.

Claims

1. An image decoding method performed by an image decoding device, the image decoding method comprising the following steps: The first flag is related to whether weighted prediction is applied to slices of the image parameter set in the reference bitstream, and the second flag is related to whether information about the weighted prediction exists in the image header of the bitstream. Based on the first and second flags, the prediction weighted table syntax is parsed from the image header; Based on the syntax elements in the prediction weighted table syntax, generate prediction samples for the current block in the current image; Residual samples are generated based on the residual information obtained from the bitstream; as well as Reconstructed samples are generated based on the predicted samples and the residual samples. The second flag is parsed from the image parameter set based on the first flag. Specifically, based on the fact that the first flag is equal to 1 and the second flag is equal to 1, the prediction weighting table syntax is included in the image header of the bitstream. Wherein, based on the fact that the value of the first flag is equal to 1 and the value of the second flag is equal to 0, the prediction weighting table syntax is included in the slice header of the bitstream. Specifically, the second flag is used to determine whether the first quantity information is included in the prediction weighting table syntax. Specifically, the second flag is used to determine whether the second quantity information is included in the prediction weighting table syntax. The value of the first quantity information is the same as the number of weighted reference images in reference image list 0. The value of the second quantity information is the same as the number of weighted reference images in reference image list 1. The luma_weight_l0_flag syntax element, which indicates whether a weighting factor exists for the L0 prediction, is included in the prediction weighting table syntax based on the first quantity information. The luma_weight_l1_flag syntax element, indicating the presence of a weighting factor for L1 prediction, is included in the prediction weighting table syntax based on the second quantity information. Information regarding the weighting factor for L0 prediction is included in the prediction weighting table syntax based on the luma_weight_l0_flag syntax element, and information regarding the weighting factor for L1 prediction is included in the prediction weighting table syntax based on the luma_weight_l1_flag syntax element.

2. An image encoding method performed by an image encoding device, the image encoding method comprising the following steps: Derive motion information about the current block; A prediction sample for the current block is generated by performing a weighted prediction based on the motion information; Residual information is generated based on the predicted samples and the original samples; as well as The image information, including the first flag, the second flag, information about the weighted prediction, and the residual information, is encoded. The first flag relates to whether weighted prediction is applied to slices of the reference image parameter set, and the second flag relates to whether the information regarding the weighted prediction exists in the image header. The information regarding the weighted prediction includes the prediction weighting table syntax. Wherein, the second flag is included in the image parameter set based on the first flag. Specifically, based on the fact that the value of the first flag is equal to 1 and the value of the second flag is equal to 1, the prediction weighting table syntax is included in the image header. Wherein, based on the fact that the value of the first flag is equal to 1 and the value of the second flag is equal to 0, the prediction weighted table syntax is included in the slice header. Specifically, the second flag is used to determine whether the first quantity information is included in the prediction weighting table syntax. Specifically, the second flag is used to determine whether the second quantity information is included in the prediction weighting table syntax. The value of the first quantity information is the same as the number of weighted reference images in reference image list 0. The value of the second quantity information is the same as the number of weighted reference images in reference image list 1. The luma_weight_l0_flag syntax element, which indicates whether a weighting factor exists for the L0 prediction, is included in the prediction weighting table syntax based on the first quantity information. The luma_weight_l1_flag syntax element, indicating the presence of a weighting factor for L1 prediction, is included in the prediction weighting table syntax based on the second quantity information. Information regarding the weighting factor for L0 prediction is included in the prediction weighting table syntax based on the luma_weight_l0_flag syntax element, and information regarding the weighting factor for L1 prediction is included in the prediction weighting table syntax based on the luma_weight_l1_flag syntax element.

3. A method for transmitting data for an image, the method comprising the following steps: A bitstream for the image is obtained, wherein the bitstream is generated based on deriving motion information about the current block, generating prediction samples for the current block by performing weighted prediction based on the motion information, generating residual information based on the prediction samples and the original samples, and encoding image information including a first flag, a second flag, information about the weighted prediction, and the residual information; and Send the data including the bit stream. The first flag relates to whether weighted prediction is applied to slices of the reference image parameter set, and the second flag relates to whether the information regarding the weighted prediction exists in the image header. The information regarding the weighted prediction includes the prediction weighting table syntax. Wherein, the second flag is included in the image parameter set based on the first flag. Specifically, based on the fact that the value of the first flag is equal to 1 and the value of the second flag is equal to 1, the prediction weighting table syntax is included in the image header. Wherein, based on the fact that the value of the first flag is equal to 1 and the value of the second flag is equal to 0, the prediction weighted table syntax is included in the slice header. Specifically, the second flag is used to determine whether the first quantity information is included in the prediction weighting table syntax. Specifically, the second flag is used to determine whether the second quantity information is included in the prediction weighting table syntax. The value of the first quantity information is the same as the number of weighted reference images in reference image list 0. The value of the second quantity information is the same as the number of weighted reference images in reference image list 1. The luma_weight_l0_flag syntax element, which indicates whether a weighting factor exists for the L0 prediction, is included in the prediction weighting table syntax based on the first quantity information. The luma_weight_l1_flag syntax element, indicating the presence of a weighting factor for L1 prediction, is included in the prediction weighting table syntax based on the second quantity information. Information regarding the weighting factor for L0 prediction is included in the prediction weighting table syntax based on the luma_weight_l0_flag syntax element, and information regarding the weighting factor for L1 prediction is included in the prediction weighting table syntax based on the luma_weight_l1_flag syntax element.