Decoding device, encoding device, and data transmission device
By parsing and encoding weighted prediction flags, prediction and residual samples are generated, solving the problem of large information content in high-resolution image/video coding, improving coding efficiency and reducing signaling overhead and bit count.
Patent Information
- Application Number
- CN202511583221.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2020-01-13
- Filing Date
- 2021-01-13
- Publication Date
- 2025-12-12
AI Technical Summary
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 in image/video broadcasting of virtual reality and immersive media, where efficient compression technologies are needed to reduce signaling overhead and bit volume.
The video decoding device parses the weighted prediction flags and information to generate prediction samples and reduce residual samples. The video encoding device derives motion information and generates prediction samples, and encodes weighted prediction information to reduce redundant signaling.
It improves image/video coding efficiency, reduces the number of bits in weighted prediction and signaling overhead, and achieves efficient signal notification.
Smart Images

Figure CN121126004A_ABST
Abstract
Description
[0001] This application is a divisional application of the original application No. 202180019319.7 (International Application No. PCT / KR2021 / 000471, filed on January 13, 2021, entitled "Method and apparatus for weighted prediction for image / video coding"). TECHNICAL FIELD
[0002] The disclosure relates to a method and apparatus for performing weighted prediction when encoding / decoding an image / video. BACKGROUND
[0003] Recently, there is an increasing demand for high-resolution, high-quality images / videos such as 4K or 8K or above ultra-high definition (UHD) images / videos in various fields. As the image / video resolution or quality becomes higher, a relatively larger amount of information or bits is transmitted compared to conventional image / video data. Therefore, if the image / video data is transmitted via a medium such as an existing wired / wireless broadband line or stored in a conventional storage medium, the cost for transmission and storage is easily increased.
[0004] In addition, there is a growing interest and demand for virtual reality (VR) and artificial reality (AR) content and immersive media such as holograms, and broadcasting of images / videos (e.g., game images / videos) that exhibit different image / video characteristics from actual images / videos is also increasing.
[0005] Therefore, there is a need for a highly efficient image / video compression technique to effectively compress and transmit, store, or play high-resolution, high-quality images / videos that exhibit various characteristics as described above. SUMMARY
[0006] TECHNICAL PROBLEM
[0007] A technical subject of the present document is to provide a method and apparatus for improving the efficiency of image / video coding.
[0008] Another technical subject of the present document is to provide a method and apparatus for efficiently signaling a prediction weighting table syntax.
[0009] Still another technical subject of the present document is to provide a method and apparatus for reducing signaling overhead regarding weighted prediction.
[0010] Still another technical subject of the present document is to provide a method and apparatus for reducing the amount of bits used for weighted prediction.
[0011] MEANS FOR SOLVING THE PROBLEM
[0012] According to an embodiment of the present document, a video decoding method performed by a video decoding device can include the steps of parsing, from a bitstream, a first flag related to whether weighted prediction is applied to a slice referring to a picture parameter set in the bitstream and a second flag related to whether information about the weighted prediction is present in a picture header of the bitstream, parsing, from the picture header, a prediction weighting table syntax 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 can be parsed from the picture parameter set based on the first flag.
[0013] According to another embodiment of the present document, a video encoding method performed by a video encoding device can include the steps of deriving motion information about a current block, generating prediction samples of the current block by performing weighted prediction based on the motion information, generating residual information based on the prediction samples and original samples, and encoding image information including information about the weighted prediction and the residual information, wherein the information about the weighted prediction can include a first flag related to whether the weighted prediction is applied to a slice referring to a picture parameter set of the image information, a second flag related to whether the information about the weighted prediction is present in a picture header of the image information, and a prediction weighting table syntax, the second flag can be included in the picture parameter set based on the first flag, and the prediction weighting table syntax can be included in the picture header based on the first flag and the second flag.
[0014] According to still another embodiment of the present document, a computer-readable digital storage medium can include information that causes a video decoding device to perform a video decoding method, the video decoding method can include the steps of parsing, from image information, a first flag related to whether weighted prediction is applied to a slice referring to a picture parameter set in the image information and a second flag related to whether information about the weighted prediction is present in a picture header of the image information, parsing, from the picture header, a prediction weighting table syntax 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 image information, and generating reconstructed samples based on the prediction samples and the residual information, wherein the second flag can be parsed from the picture parameter set based on the first flag.
[0015] Effects of the Invention
[0016] According to embodiments of the present document, overall video / image compression efficiency can be improved.
[0017] According to embodiments of the present document, a prediction weighting table syntax can be efficiently signaled.
[0018] According to embodiments of the present document, redundant signaling of information about weighted prediction can be reduced.
[0019] According to embodiments of the present document, the amount of bits for weighted prediction can be reduced. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 An example of a video / image encoding system to which embodiments of the present document can be applied is schematically illustrated.
[0021] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding apparatus to which embodiments of the present document can be applied.
[0022] Figure 3 is a diagram schematically illustrating a configuration of a video / image decoding apparatus to which embodiments of the present document can be applied.
[0023] Figure 4 An example of encoding one syntax element is illustrated.
[0024] Figure 5 An inter-frame predictor in an encoding apparatus is schematically illustrated.
[0025] Figure 6 An inter-frame predictor in a decoding apparatus is schematically illustrated.
[0026] Figure 7 and Figure 8 Examples of a video / image encoding method and related components according to embodiments of the present document are schematically illustrated.
[0027] Figure 9 and Figure 10 Examples of a video / image decoding method and related components according to embodiments of the present document are schematically illustrated.
[0028] Figure 11 An example of a content streaming system to which embodiments disclosed in the present document can be applied is illustrated. DETAILED DESCRIPTION
[0029] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in Versatile Video Coding (VVC) standard. In addition, the methods / embodiments disclosed in this document can be applied to methods disclosed in Essential Video Coding (EVC) standard, AOMedia Video 1 (AV1) standard, 2nd Generation Audio Video Coding standard (AVS2), or next generation video / image coding standards (e.g., H.267, H.268, etc.).
[0030] Various embodiments related to video / image coding are presented in this document, and the above-described embodiments can also be performed in combination with each other unless otherwise specified.
[0031] In this document, a video can refer to a series of pictures over time. A picture generally refers to a unit representing one image at a particular time frame, and a slice / tile refers to a unit constituting a part of a picture in terms of coding. A slice / tile can include one or more coding tree units (CTUs). One picture can be composed of one or more slices / tiles. One picture can be composed of one or more tile groups. One tile group can include one or more tiles. A brick can refer to a rectangular region of CTU rows within a tile in a picture. A tile can be partitioned into multiple bricks, each of which can be composed of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks can also be referred to as a brick. Brick scanning is a particular order of partitioning CTUs of a picture, in which the CTUs are consecutively ordered in a CTU raster scan within a brick, the tiles within a picture are consecutively ordered in a raster scan of the tiles of the picture, and the tiles in a picture are consecutively ordered in a raster scan of the tiles of the picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. A tile column is a rectangular region of CTUs having a height equal to a height of the picture and a width specified by a syntax element in a picture parameter set. A tile row is a rectangular region of CTUs having a height specified by a syntax element in a picture parameter set and a width equal to a width of the picture. Tile scanning is a particular order of partitioning CTUs of a picture, in which the CTUs are consecutively ordered in a CTU raster scan within a tile and the tiles in a picture are consecutively ordered in a raster scan of the tiles of the picture. A slice includes an integer number of tiles of a picture that can be contained in a single NAL unit. A slice can be composed of multiple complete tiles, or only a consecutive sequence of complete tiles of one tile. In this document, tile groups and slices can be used interchangeably. For example, in this document, tile group / tile group header can be referred to as slice / slice header.
[0032] A pixel or pel can mean a minimum unit constituting one picture (or image). Also, a "sample" can be used as a term corresponding to a pixel. A sample can generally mean a pixel or a pixel value, and can mean a pixel / pixel value of a luma component only or a pixel / pixel value of a chroma component only.
[0033] A unit can mean a basic unit of image processing. A unit can include at least one of a specific area of a picture and information related to the area. One unit can include one luma block and two chroma (e.g., cb, cr) blocks. In some cases, a unit can be used interchangeably with a term such as a block or an area. In general, an MxN block can include a set (or an array) of M columns and N rows of samples or transform coefficients. Alternatively, a sample can mean a pixel value in a spatial domain, and when such a pixel value is transformed into a frequency domain, it can mean a transform coefficient in the frequency domain.
[0034] In some cases, a unit can be used interchangeably with a term such as a block or an area. In general, an MxN block can mean a set of M columns and N rows of samples or transform coefficients. A sample can generally mean a pixel or a pixel value, and can mean a pixel / pixel value of a luma component only or a pixel / pixel value of a chroma component only. A sample can be used as a term corresponding to a pixel or a pel that configures one picture (or image).
[0035] The disclosure of the present document can be modified in various forms, and specific embodiments thereof will be described and illustrated in the accompanying drawings. The terms used in the present document are used only to describe specific embodiments, and are not intended to limit the disclosed methods in the present document. The expression of the singular includes the expression of "at least one" as long as it is clearly interpreted differently. Terms such as "include" and "have" are intended to indicate the presence of features, numbers, steps, operations, elements, components, or combinations thereof used in the document, and thus it should be understood that the possibility of existence or addition of one or more different features, numbers, steps, operations, elements, components, or combinations thereof is not excluded.
[0036] In addition, the various configurations of the drawings described in the present document are for independent illustrations of functions as features different from each other, and do not mean that the various configurations are implemented by mutually different hardware or different software. For example, two or more configurations can be combined to form one configuration, and one configuration can also be divided into multiple configurations. Embodiments of combining and / or dividing configurations are included in the scope of the disclosure of the present document without departing from the spirit of the disclosed methods of the present document.
[0037] In this document, the terms “ / ” and “,” should be interpreted to mean “and / or”. For example, the expression “A / B” can mean “A and / or B”. Also, “A, B” can mean “A and / or B”. Also, “A / B / C” can mean “at least one of A, B, and / or C”. Also, “A / B / C” can mean “at least one of A, B, and / or C”.
[0038] Also, in the document, the term “or” should be interpreted to mean “and / or”. For example, the expression “A or B” can 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 to mean “additionally or alternatively”.
[0039] Also, the parentheses used in this document can mean “for example”. Specifically, in the case of the expression “prediction (intra prediction)”, it can be indicated that “intra prediction” is proposed as an example of “prediction”. In other words, the term “prediction” in this document is not limited to “intra prediction”, and can indicate that “intra prediction” is proposed as an example of “prediction”. Also, even in the case of the expression “prediction (i.e., intra prediction)”, it can be indicated that “intra prediction” is proposed as an example of “prediction”.
[0040] In this document, technical features individually illustrated in one drawing can be implemented alone or can be simultaneously implemented.
[0041] Hereinafter, embodiments of the present document will be described in detail with reference to the accompanying drawings. Also, in all the drawings, the same reference numerals can be used to indicate the same elements, and the same description for the same elements will be omitted.
[0042] Figure 1 An example of a video / image encoding system to which embodiments of the present document can be applied is illustrated.
[0043] Referring to Figure 1 , the video / image encoding system can include a first apparatus (a source apparatus) and a second apparatus (a receiving apparatus). The source apparatus can transmit encoded video / image information or data in the form of a file or a stream to the receiving apparatus through a digital storage medium or a network.
[0044] The source apparatus can include a video source, an encoding device, and a transmitter. The receiving apparatus can include a receiver, a decoding device, and a renderer. The encoding device can be referred to as a video / image encoding device, and the decoding device can be referred to as a video / image decoding device. The transmitter can be included in the encoding device. The receiver can be included in the decoding device. The renderer can include a display, and the display can be configured as a separate apparatus or an external component.
[0045] The video source can acquire a video / image through a process of capturing, synthesizing, or generating a video / image. The video source can include a video / image capturing device, and / or a video / image generating device. For example, the video / image capturing device can include one or more cameras, a video / image archive including previously captured video / images, etc. For example, the video / image generating device can include a computer, a tablet, and a smartphone, and can generate a video / image (electronically). For example, a virtual video / image can be generated through a computer, etc. In this case, the video / image capturing process can be replaced by a process of generating related data.
[0046] The encoding device can encode an input video / image. For compression and encoding efficiency, the encoding device can perform a series of processes such as prediction, transformation, and quantization. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0047] The transmitter can transmit the encoded image / image information or data output in the form of a bitstream to a receiver of a receiving device in the form of a file or a stream through a digital storage medium or a network. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter can include an element for generating a media file through a predetermined file format, and can include an element for transmission through a broadcasting / communication network. The receiver can receive / extract a bitstream and transmit the received bitstream to a decoding device.
[0048] The decoding device can decode a video / image by performing a series of processes such as dequantization, inverse transformation, and prediction corresponding to the operations of the encoding device.
[0049] The renderer can render the decoded video / image. The rendered video / image can be displayed through a display.
[0050] Figure 2 FIG. 1 is a diagram schematically illustrating a configuration of a video / image encoding device to which embodiments of the present document can be applied. Hereinafter, a device referred to as a video encoding device can include an image encoding device.
[0051] Reference Figure 2The encoding apparatus 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 can include an inter-predictor 221 and an intra-predictor 222. The residual processor 230 can include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 can further include a subtractor 231. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. According to embodiments, the above-described image partitioner 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filter 260 can be configured by one or more hardware components (e.g., an encoder chipset or processor). In addition, the memory 270 can include a decoded picture buffer (DPB), or can further be configured by a digital storage medium. The hardware components can further include the memory 270 as an internal / external component.
[0052] The image partitioner 210 can partition an input image (or picture, frame) input to the encoding apparatus 200 into one or more processing units. For example, the processing units can be referred to as coding units (CUs). In this case, the coding units can be recursively partitioned from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree binary-tree ternary-tree (QTBTTT) structure. For example, one coding unit can be partitioned into a plurality of coding units at a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. In this case, for example, the quad-tree structure can be applied first, and the binary-tree structure and / or the ternary-tree structure can be applied later. Alternatively, the binary-tree structure can be applied first. The encoding process according to the present document can be performed based on the final coding units that are no longer partitioned. In this case, the largest coding unit can be directly used as the final coding unit according to the image characteristics based on coding efficiency, etc., or if necessary, the coding unit can be recursively partitioned into coding units at a deeper depth such that coding units having an optimal size can be used as the final coding units. Here, the encoding process can include processes such as prediction, transformation, and reconstruction (to be described later). In another example, the processing units can further include prediction units (PUs) or transform units (TUs). In this case, each of the prediction units and the transform units can be partitioned or partitioned from the above-described final coding units. The prediction unit can be a unit of sample prediction, and the transform unit can be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0053] The encoding device 200 can subtract a prediction signal (prediction block, prediction sample array) output from the inter predictor 221 or the intra predictor 222 from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the transformer 232. In this case, as illustrated, a unit that subtracts the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) in the encoding device 200 can be referred to as a subtractor 231. The predictor 220 can perform prediction on a processing target block (hereinafter, referred to as a current block) and generate a prediction block including predicted samples of the current block. The predictor 220 can determine whether to apply intra prediction or inter prediction in a unit of the current block or CU. The predictor 220 can generate various types of information on prediction, such as prediction mode information, as described later in the description of each prediction mode, and transmit the generated information to the entropy encoder 240, as described below in the description of each prediction mode. The information on prediction can be encoded by the entropy encoder 240 and output in the form of a bitstream.
[0054] The intra predictor 222 can predict the current block with reference to samples in the current picture. Depending on the prediction mode, the referenced samples can be located in the vicinity of the current block or can be spaced apart from the current block. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. For example, the non-directional modes can include a DC mode and a planar mode. For example, depending on the degree of detail of the prediction direction, the directional modes can include 33 directional prediction modes or 65 directional prediction modes. However, this is merely an example, and more or less directional prediction modes than the above number can be used according to settings. The intra predictor 222 can also determine a prediction mode applied to the current block using a prediction mode applied to a neighboring block.
[0055] The inter predictor 221 can derive a prediction block of a current block based on a reference block (a reference sample array) designated by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of a block, a sub-block, or a sample based on the correlation of the motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction (L0 prediction, L1 prediction, bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block can be the same as or different from each other. The temporal neighboring block can be referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block can be referred to as a collocated picture (colPic). For example, the inter predictor 221 can configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or the reference picture index of the current block. The inter prediction can be performed based on various prediction modes. For example, in the case of a skip mode and a merge mode, the inter predictor 221 can use the motion information of the neighboring blocks as the motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal can not be transmitted. A motion vector prediction (MVP) mode indicates a motion vector of the current block by using a motion vector of the neighboring block as a motion vector predictor and signaling a motion vector difference.
[0056] The predictor 220 can generate a prediction signal based on various prediction methods described later. For example, the predictor 220 can apply intra prediction or inter prediction to predict one block, and can simultaneously apply intra prediction and inter prediction. This can be referred to as combined inter and intra prediction (CIIP). In addition, the predictor can predict a block based on an intra block copy (IBC) prediction mode or based on a palette mode. The IBC prediction mode or the palette mode can be used for image / video encoding of content such as a game, etc., for example, screen content coding (SCC). The IBC basically performs prediction in the current picture, but it can be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC can use at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, sample values in a picture can be signaled based on information about a palette table and a palette index.
[0057] The prediction signal generated by the predictor (including the inter predictor 221 and / or the intra predictor 222) can be used to generate a reconstructed signal or can be used to generate a residual signal.
[0058] The transformer 232 can generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique can include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, the GBT means a transform obtained from a graph when relationship information between pixels is illustrated as a graph. The CNT means a transform obtained based on a prediction signal generated by using all previously reconstructed pixels. In addition, the transform process can also be applied to a block of pixels having a square shape of the same size, or can also be applied to a block of variable size that is not a square.
[0059] The quantizer 233 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoder 240, and the entropy encoder 240 encodes information about the quantized transform coefficients (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. The quantizer 233 can rearrange the quantized transform coefficients having a block form in a one-dimensional vector form based on a coefficient scan order, and can generate information about the transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
[0060] The entropy encoder 240 can perform various encoding methods such as, for example, exponential Golomb (Golomb), context adaptive variable length coding (CAVLC), and context adaptive binary arithmetic coding (CABAC). The entropy encoder 240 can also encode information (for example, values of syntax elements, etc.) necessary for video / image reconstruction together or individually, in addition to the quantized transform coefficients. The encoded information (for example, encoded video / image information) can be transmitted or stored in the form of a bitstream in units of network abstraction layer (NAL) units. The video / image information can also include information about various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information can also include general constraint information. In this document, information and / or syntax elements signaled / transmitted from an encoding device to a decoding device can be included in the video / image information. The video / image information can be encoded through the aforementioned encoding process and thus included in the bitstream. The bitstream can be transmitted through a network or can be stored in a digital storage medium. Here, the network can include a broadcast network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. A transmission unit (not shown) for transmitting a signal output from the entropy encoder 240 and / or a storage unit (not shown) for storing the signal can be configured as an internal / external element of the encoding device 200, or the transmission unit can also be included in the entropy encoder 240.
[0061] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, a dequantized and inverse transformed can be applied to the quantized transform coefficients by the dequantizer 234 and the inverse transformer 235 to reconstruct a residual signal (a residual block or residual samples). The adder 250 can add the reconstructed residual signal to the prediction signal output from the inter-predictor 221 or the intra-predictor 222 to generate a reconstructed signal (a reconstructed picture, a reconstructed block, a reconstructed sample array). A prediction block can be used as a reconstructed block, such as when a skip mode is applied, when there is no residual for a processing target block. The adder 250 can be referred to as a restorer or a reconstructed block generator. The generated reconstructed signal can be used for intra-prediction of a next processing target block within the current picture, or can be used for inter-prediction of a next picture after filtering, as described below.
[0062] Furthermore, luma mapping with chroma scaling (LMCS) can also be applied during the picture encoding and / or reconstruction processing.
[0063] The filter 260 can improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 270 (specifically, a DPB of the memory 270). For example, the various filtering methods can include a deblocking filter, a sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filter 260 can generate various types of information related to filtering and transmit the generated information to the entropy encoder 240, as described later in descriptions of the respective filtering methods. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bitstream.
[0064] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter-predictor 221. When inter-prediction is applied by the encoding apparatus, prediction mismatch between the encoding apparatus 200 and a decoding apparatus can be avoided and coding efficiency can be improved.
[0065] The DPB of the memory 270 can store the modified reconstructed picture to be used as a reference picture in the inter-predictor 221. The memory 270 can store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in a picture that has been reconstructed. The stored motion information can be transmitted to the inter-predictor 221 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 can store reconstructed samples of a reconstructed block in the current picture and can transmit the reconstructed samples to the intra-predictor 222.
[0066] Figure 3FIG. 1 is a diagram for schematically explaining a configuration of a video / image decoding apparatus to which embodiments of the present document can be applied.
[0067] Referring to Figure 3 , the decoding apparatus 300 can 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 can include an intra predictor 331 and an inter predictor 332. The residual processor 320 can include a dequantizer 321 and an inverse transformer 322. According to embodiments, the entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350, which have been described above, can be configured by one or more hardware components (e.g., a decoder chipset or a processor). In addition, the memory 360 can include a decoded picture buffer (DPB) or can be configured by a digital storage medium. The hardware components can further include the memory 360 as an internal / external component.
[0068] When a bitstream including video / image information is input, the decoding apparatus 300 can reconstruct a picture in response to processing a block partition related information obtained from the bitstream. Figure 2 The processing of video / image information in the illustrated encoding apparatus reconstructs a picture. For example, the decoding apparatus 300 can derive a unit / block based on block partition related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied to the encoding apparatus. Accordingly, for example, the decoded processing unit can be an encoding unit, and the encoding unit can be split from a coding tree unit or a largest coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the encoding unit. In addition, a reconstructed picture signal decoded and output by the decoding apparatus 300 can be reproduced by a reproduction apparatus.
[0069] The decoding apparatus 300 can receive a bitstream from an encoding apparatus in the form of a bitstream. Figure 2The signal outputted by the encoding device and can decode the received signal through the entropy decoder 310. For example, the entropy decoder 310 can parse a bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information can further include information on various parameter sets, such as adaptation parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). In addition, the video / image information can further include general constraint information. The decoding device can also decode a picture based on information on the parameter sets and / or the general constraint information. The information and / or syntax elements signaled / received later described in the present document can be decoded through the decoding process and acquired from the bitstream. For example, the entropy decoder 310 can decode information within a bitstream based on an encoding method such as exponential Golomb (Golomb) coding, context adaptive variable length coding (CAVLC), or context adaptive binary arithmetic coding (CABAC), and output syntax elements required for image reconstruction and quantized values of transform coefficients for a residual. More specifically, the CABAC entropy decoding method can receive bins corresponding to each syntax element in a bitstream, determine a context model by using information of a decoding target syntax element, decoding information of a decoding target block, or a symbol / bin decoded in a previous stage, and perform arithmetic decoding on bins by predicting a probability of occurrence of the bins according to the determined context model, and generate a symbol corresponding to a value of each syntax element. In this case, the CABAC entropy decoding method can update the context model by using information of the decoded symbol / bin for a context model of a next symbol / bin after determining the context model. Information related to prediction among the information decoded by the entropy decoder 310 can be provided to the predictor (inter-predictor 332 and intra-predictor 331), and residual values (i.e., quantized transform coefficients and related parameter information) on which entropy decoding has been performed in the entropy decoder 310 can be input to the residual processor 320.
[0070] The residue processor 320 can derive a residual signal (a residual block, residual samples, or a residual sample array). Also, among the information decoded by the entropy decoder 310, information about filtering can be provided to the filter 350. Meanwhile, a receiver (not shown) for receiving a signal output from an encoding apparatus can also be configured as an internal / external element of the decoding apparatus 300, or the receiver can be a component of the entropy decoder 310. Meanwhile, the decoding apparatus according to the present document can be referred to as a video / image / picture decoding apparatus, and the decoding apparatus can be classified into an information decoder (a video / image / picture information decoder) and a sample decoder (a video / image / picture sample decoder). The information decoder can include the entropy decoder 310, and the sample decoder can include at least one of the dequantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory 360, the inter predictor 332, and the intra predictor 331.
[0071] The dequantizer 321 can dequantize the quantized transform coefficients to output transform coefficients. The dequantizer 321 can rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the rearrangement can be performed based on a coefficient scan order performed by an encoding apparatus. The dequantizer 321 can perform dequantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step length information) and obtain transform coefficients.
[0072] The inverse transformer 322 inverse-transforms the transform coefficients to obtain a residual signal (a residual block, a residual sample array).
[0073] In the present document, at least one of quantization / dequantization and / or transform / inverse transform can be omitted. When quantization / dequantization is omitted, the quantized transform coefficients can be referred to as transform coefficients. When transform / inverse transform is omitted, the transform coefficients can be referred to as coefficients or residual coefficients or can still be referred to as transform coefficients for consistency of expression.
[0074] In the present document, the quantized transform coefficients and the transform coefficients can be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, residual information can include information about the transform coefficients, and the information about the transform coefficients can be signaled through a residual coding syntax. The transform coefficients can be derived based on the residual information (or the information about the transform coefficients), and the scaled transform coefficients can be derived through inverse transform (scaling) of the transform coefficients. The residual samples can be derived based on inverse transform (transform) of the scaled transform coefficients. This can also be applied / expressed in other parts of the present document.
[0075] The predictor 330 can perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor can determine whether to apply intra prediction or inter prediction to the current block and determine a specific intra / inter prediction mode based on information on prediction output from the entropy decoder 310.
[0076] The predictor 330 can generate a prediction signal based on various prediction methods described below. For example, the predictor can apply intra prediction or inter prediction for predicting one block, and can simultaneously apply intra prediction and inter prediction. This can be referred to as combined inter and intra prediction (CIIP). In addition, the predictor can predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode can be used for image / video encoding of content of a game or the like, such as screen content coding (SCC). The IBC can basically perform prediction in the current picture, but can be performed similarly to inter prediction such that a reference block is derived within the current picture. That is, the IBC can use at least one inter prediction technique described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, information on a palette table and a palette index can be included in video / image information and signaled.
[0077] The intra predictor 331 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referred samples can be located near the current block or can be spaced apart from the current block. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The intra predictor 331 can determine the prediction mode applied to the current block by using a prediction mode applied to a neighboring block.
[0078] The inter predictor 332 can derive a prediction block of the current block based on a reference block (a reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of a block, a sub-block, or a sample based on the correlation of the motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include information on an inter prediction direction (L0 prediction, L1 prediction, bi-prediction, etc.). In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter predictor 332 can construct a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index of the current block based on received candidate selection information. The inter prediction can be performed based on various prediction modes, and the information on prediction can include information indicating an inter prediction mode for the current block.
[0079] The adder 340 can generate a reconstructed signal (a reconstructed picture, a reconstructed block, a reconstructed sample array) by adding the obtained residual signal to a prediction signal (a prediction block or a prediction sample array) output from the predictor (including the inter-predictor 332 and / or the intra-predictor 331). If there is no residual for a processing target block, for example, in a case where a skip mode is applied, the prediction block can be used as the reconstructed block.
[0080] The adder 340 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-prediction of a next block in the current picture, and as subsequently described, can also be output by filtering or can also be used for inter-prediction of a next picture.
[0081] In addition, luminance mapping and chrominance scaling (LMCS) can also be applied to the picture decoding process.
[0082] The filter 350 can improve subjective / objective picture quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 360, specifically, in the DPB of the memory 360. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0083] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter-predictor 332. The memory 360 can store motion information of a block from which motion information within the current picture is derived (decoded) and / or motion information of a block within a picture that has been reconstructed. The stored motion information can be transferred to the inter-predictor 332 to be used as motion information of a spatially neighboring block or motion information of a temporally neighboring block. The memory 360 can store reconstructed samples of a reconstructed block within the current picture, and transfer the reconstructed samples to the intra-predictor 331.
[0084] In this document, the embodiments described in the filter 260, the inter-predictor 221, and the intra-predictor 222 of the encoding device 200 can be equally applied to or correspond to the filter 350, the inter-predictor 332, and the intra-predictor 331.
[0085] Furthermore, the video / image encoding method according to the present document can be performed based on the following partition structure. Specifically, the processes of prediction, residual processing ((inverse) transform and (de)quantization), syntax element encoding, and filtering described above can be performed according to the CTU and CU (and / or TU and PU) derived based on the partition structure. The block partitioning process can be performed by the image partitioner 210 of the encoding apparatus described above, and the partitioning-related information can be processed by the entropy encoder 240 (encoding), and can be transmitted to the decoding apparatus in the form of a bitstream. The entropy decoder 310 of the decoding apparatus can derive the block partitioning structure of the current picture based on the partitioning-related information obtained from the bitstream, and based on this, a series of processes for image decoding (e.g., prediction, residual processing, block / picture reconstruction, in-loop filtering, etc.) can be performed. The CU size and the TU size can be equal to each other, or a plurality of TUs can exist within a CU region. Furthermore, the CU size can generally represent a luma component (sample) coding block (CB) size. The TU size can generally represent a luma component (sample) transform block (TB) size. The chroma component (sample) CB or TB size can be derived based on the luma component (sample) CB or TB size in accordance with the color format (chroma format, e.g., 4:4:4, 4:2:2, 4:2:0, etc.) of the picture / image in terms of component ratio. The TU size can be derived based on maxTbSize. For example, if the CU size is greater than maxTbSize, a plurality of TUs (TBs) of maxTbSize can be derived from the CU, and the transform / inverse transform can be performed in units of TU (TB). Furthermore, for example, in the case where intra prediction is applied, the intra prediction mode / type can be derived in units of CU (or CB), and the neighboring reference sample derivation and prediction sample generation processes can be performed in units of TU (or TB). In this case, one or more TUs (or TBs) can exist in one CU (or CB) region, and in this case, a plurality of TUs (or TBs) can share the same intra prediction mode / type.
[0086] Furthermore, in video / image encoding according to the present document, an image processing unit can have a hierarchical structure. One picture can be partitioned into one or more tiles, slices, and / or tile groups. One slice can include one or more tiles. One tile can include one or more CTU rows within a tile. A slice can include an integer number of tiles of a picture. One tile group can include one or more tiles. One tile can include one or more CTUs. A CTU can be partitioned into one or more CUs. A tile represents a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. A tile group can include an integer number of tiles according to a tile raster in a picture. A slice header can carry information / parameters that can be applied to a corresponding slice (blocks in a slice). If an encoding / decoding device has a multi-core processor, encoding / decoding processes for tiles, slices, tiles, and / or tile groups can be processed in parallel. In the present document, a slice or a tile group 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 slice types including an intra (I) slice, a predictive (P) slice, and a bi-predictive (B) slice. In encoding blocks in a predictive I slice, inter prediction can not be used, and only intra prediction can be used. Of course, even in this case, signaling can be performed by encoding original sample values without prediction. As for blocks in a P slice, intra prediction or inter prediction can be used, and in the case of using inter prediction, only single prediction can be used. Furthermore, as for blocks in a B slice, intra prediction or inter prediction can be used, and in the case of using inter prediction, up to bi-prediction can be used.
[0087] Considering encoding efficiency or parallel processing or according to characteristics (e.g., resolution) of a video image, an encoding device can determine tiles / tile groups, slices, and maximum and minimum coding unit sizes, and information thereof or information capable of deriving thereof can be included in a bitstream.
[0088] A decoding device can obtain information representing tiles / tile groups, slices, and CTUs in a tile of a current picture, and whether the CTUs have been partitioned into a plurality of coding units. By acquiring (transmitting) such information only under a certain condition, efficiency can be improved.
[0089] As described above, one picture can include a plurality of slices, and one slice can include a slice header and slice data. In this case, a picture header can be further added for a plurality of slices (a set of slice header and slice data) in one picture. The picture header (picture header syntax) can include information / parameters commonly applied to a picture. The slice header (slice header syntax) can include information / parameters commonly applied to a slice. An adaptation parameter set (APS) or a picture parameter set (PPS) can include information / parameters commonly applied to one or more pictures. A sequence parameter set (SPS) can include information / parameters commonly applied to one or more sequences. A video parameter set (VPS) can include information / parameters commonly applied to a plurality of layers. A decoding parameter set (DPS) can include information / parameters commonly applied to an entire video. The DPS can include information / parameters related to a concatenation of a coded video sequence (CVS).
[0090] In this document, the high-level syntax can include at least one of an APS syntax, a PPS syntax, an SPS syntax, a VPS syntax, a DPS syntax, a picture header syntax, and a slice header syntax.
[0091] In addition, for example, information on partitioning and configuration of tiles / tile groups / tiles / slices can be configured in the encoding device based on the high-level syntax, and can be transmitted to the decoding device in the form of a bitstream.
[0092] Figure 4 An example of encoding one syntax element is illustrated.
[0093] Figure 4 is a block diagram illustrating CABAC for encoding one syntax element. In the encoding process of CABAC, when an input signal is a syntax element rather than a binary value, the input signal is first converted into a binary value through binarization. When the input signal is already a binary value, the input signal is bypassed without binarization. Here, each binary 0 or 1 forming a binary value can be referred to as a bin. For example, when a binary string resulting from binarization is 110, each of 1, 1, and 0 is referred to as a bin. A bin of one syntax element can indicate a value of the syntax element.
[0094] The binarized bins are input to a regular coding engine or a bypass coding engine. The regular coding engine assigns a context model reflecting a probability value of the bin and encodes the bin based on the assigned context model. The regular coding engine can perform encoding on each bin and then can update the context model of the bin. These encoded bins can be referred to as context-coded bins. The bypass coding engine omits the process of estimating a probability of the input bin and the process of updating the probability model applied to the bin after encoding. The bypass coding engine encodes the input bin by applying a uniform probability distribution (e.g., 50:50) instead of assigning a context, thereby improving encoding speed. These encoded bins can be referred to as bypass bins. A context model can be assigned and updated for each bin to be context-coded (regularly coded), and the context model can be indicated based on ctxIdx or ctxInc. ctxIdx can be derived based on ctxInc. Specifically, for example, a context index (ctxIdx) indicating a context model of each regularly coded bin can be derived as a sum of a context index increment (ctxInc) and a context index offset (ctxIdxOffset). Here, a different ctxInc can be derived for each bin. ctxIdxOffset can be expressed as a minimum value of ctxIdx. The minimum value of ctxIdx can be referred to as an initial value (initValue) of ctxIdx. ctxIdxOffset is a value that is commonly used to distinguish context models of other syntax elements, and a context model of one syntax element can be categorized / derived based on ctxInc.
[0095] In entropy encoding, it can be determined whether to perform encoding through a regular coding engine or a bypass coding engine, and the encoding path can be switched. Entropy decoding can be performed through the same process as encoding in the reverse order.
[0096] For example, the foregoing entropy encoding can be performed as follows.
[0097] An encoding apparatus (entropy encoder) performs an entropy encoding process on a picture / picture information. The picture / picture information can include partition-related information, prediction-related information (e.g., inter / intra prediction classification information, intra prediction mode information, and inter prediction mode information), residual information, in-loop filtering-related information, etc., or can include various syntax elements related thereto. Entropy encoding can be performed in units of syntax elements.
[0098] In particular, the encoding device performs binarization on the target syntax element. The binarization can be based on various binarization methods such as a truncated Rice binarization process and a fixed length binarization process, and the binarization method of the target syntax element can be predefined. The binarization process can be performed by a binarizer 242 in the entropy encoder 240.
[0099] The encoding device performs entropy encoding on the target syntax element. The encoding device can perform regular encoding (context)-based or bypass encoding-based encoding on the empty string of the target syntax element based on an entropy encoding technique such as context adaptive arithmetic coding (CABAC) or context adaptive variable length coding (CAVLC), and the output from the encoding can be included in the bitstream. The entropy encoding process can be performed by an entropy encoding processor 243 in the entropy encoder 240. As described above, the bitstream can be transmitted to the decoding device through a (digital) storage medium or a network.
[0100] The decoding device (entropy decoder) can decode the encoded image / image information. The image / image information can include partition related information, prediction related information (e.g., inter / intra prediction classification information, intra prediction mode information, and inter prediction mode information), residual information, in-loop filtering related information, etc., or can include various syntax elements related thereto. The entropy encoding can be performed in units of syntax elements.
[0101] In particular, the decoding device performs binarization on the target syntax element. Here, the binarization can be based on various binarization methods such as a truncated Rice binarization process and a fixed length binarization process, and the binarization method of the target syntax element can be predefined. The decoding device can derive available bin strings (bin string candidates) of available values of the target syntax element through the binarization process. The binarization process can be performed by a binarizer 312 in the entropy decoder 310.
[0102] The decoding device performs entropy decoding on the target syntax element. The decoding device compares the derived bin string with available bin strings of the target syntax element while decoding and parsing individual bins of the syntax element from the input bit order in the bitstream. If the derived bin string is identical to one of the available bin strings, the value corresponding to the 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 performs the above process again. Through this process, a variable length bit can be used to signal specific information without using a start bit or an end bit of the specific information (specific syntax element) in the bitstream. Accordingly, a lower value can be assigned a smaller number of bits, and overall encoding efficiency can be improved.
[0103] The decoding device can perform context-based or bypass-based decoding on individual bins in the bin string from the bitstream based on an entropy coding technique such as CABAC or CAVLC. The entropy decoding process can be performed by an entropy decoding processor 313 in the entropy decoder 310. The bitstream can include various information for image / video decoding as described above. The bitstream can be delivered to the decoding device through a (digital) storage medium or a network as described above.
[0104] In this document, a table (syntax table) including syntax elements can be used to indicate signaling of information from an encoding device to a decoding device. The order of syntax elements included in the table of syntax elements used in this document can refer to an order of parsing the syntax elements 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, thereby obtaining values of the syntax elements.
[0105] A video / image encoding process based on inter prediction can illustratively include the following.
[0106] Figure 5 An inter predictor in an encoding device is illustratively exemplified.
[0107] With reference to Figure 5 , the encoding device performs inter prediction on the current block. The encoding device can derive an inter prediction mode and motion information for the current block, and can generate prediction samples of the current block. Here, the processes for determining the inter prediction mode, deriving the motion information, and generating the prediction samples can be performed simultaneously, or one process can be performed before another process. For example, the inter predictor 221 of the encoding device can include a prediction mode determiner 221_1 that can determine a prediction mode of the current block, a motion information deriver 221_2 that can derive motion information about the current block, and a prediction sample deriver 221_3 that can derive prediction samples of the current block. For example, the inter predictor of the encoding device can search for a block similar to the current block within a predetermined region (search region) of a reference picture through motion estimation, and can derive a reference block having a minimum difference or a predetermined reference level or less from the current block. The inter predictor can derive a reference picture index indicating a reference picture in which the reference block is located based on the reference block, and can derive a motion vector based on a position difference between the reference block and the current block. The encoding device can determine a mode to be applied to the current block among various prediction modes. The encoding device can compare rate-distortion (RD) costs of various prediction modes, and can determine a best prediction mode of the current block.
[0108] For example, when the skip mode or the merge mode is applied to the current block, the encoding apparatus can construct a merge candidate list, and can derive a reference block among reference blocks indicated by merge candidate indications included in the merge candidate list, which has a minimum value or a predetermined reference level or less from the current block. In this case, a merge candidate associated with the derived reference block can be selected, and merge index information indicating the selected merge candidate can be generated and signaled to the decoding apparatus. Motion information about the current block can be derived using motion information about the selected merge candidate.
[0109] In another example, when the (A)MVP mode is applied to the current block, the encoding apparatus can construct an (A)MVP candidate list, and can use a motion vector of an mvp candidate selected from mvp candidates included in the (A)MVP candidate list as an mvp of the current block. For example, in this case, a motion vector indicating a reference block derived through motion estimation can be used as a motion vector of the current block, and an mvp candidate having a motion vector having a minimum difference from the motion vector of the current block among the mvp candidates can be the selected mvp candidate. A motion vector difference (MVD) obtained by subtracting the mvp from the motion vector of the current block can be derived. In this case, information about the MVD can be signaled to the decoding apparatus. When the (A)MVP mode is applied, a value of a reference picture index can be configured as reference picture index information, and can be separately signaled to the decoding apparatus.
[0110] The encoding apparatus can derive residual samples based on the prediction samples. The encoding apparatus can derive the residual samples by comparing original samples of the current block with the prediction samples.
[0111] The encoding apparatus encodes image information including prediction information and residual information. The encoding apparatus can output the encoded image information in the form of a bitstream. The prediction information is information related to a prediction process, and can include prediction mode information (e.g., a skip flag, a merge flag, or a mode index) and information about motion information. The information about motion information can include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index), which is information for deriving a motion vector. In addition, the information about motion information can include information about an MVD and / or reference picture index information. Furthermore, the information about motion information can include information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. The residual information is information about residual samples. The residual information can include information about quantized transform coefficients of the residual samples.
[0112] The output bitstream can be stored in a (digital) storage medium and transmitted to the decoding apparatus, or can be transmitted to the decoding apparatus through a network.
[0113] As described above, the encoding device can generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples, which is used for the encoding device to derive the same result as the prediction result derived by the decoding device and is used to improve the coding efficiency. Thus, the encoding device can store the reconstructed picture (or the reconstructed samples and the reconstructed blocks) in a memory and can use it as a reference picture for inter prediction. As described above, an in-loop filtering process can be further applied to the reconstructed picture.
[0114] For example, a video / image decoding process based on inter prediction can illustratively include the following.
[0115] Figure 6 An inter predictor in a decoding device is illustratively exemplified.
[0116] The decoding device can perform operations corresponding to the above-described operations performed by the encoding device. The decoding device can predict the current block based on the received prediction information and can derive the prediction samples.
[0117] In particular, with reference 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 determine which inter prediction mode is applied to the current block based on the prediction mode information in the prediction information.
[0118] For example, it can be determined whether to apply the merge mode to the current block or to determine the (A)MVP mode based on the merge flag. Alternatively, one of various inter prediction mode candidates can be selected based on the merge index. The inter prediction mode candidates can include various inter prediction modes, such as the skip mode, the merge mode, and / or the (A)MVP mode.
[0119] The decoding device derives the motion information about the current block based on the determined inter prediction mode. For example, when the skip mode or the merge mode is applied to the current block, the decoding device can construct a merge candidate list described later and can select one merge candidate from among the merge candidates included in the merge candidate list. The selection can be performed based on the above-described selection information (merge index). The 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 the motion information about the current block.
[0120] In another example, when (A)MVP mode is applied to the current block, the decoding device can construct the (A)MVP candidate list, and can use a 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. The selection can be performed based on the selection information (mvp flag or mvp index) described above. In this case, the decoding device can derive the MVD of the current block based on the information about the MVD, and can derive the motion vector of the current block based on the mvp and the MVD of the current block. In addition, the decoding device can derive the reference picture index of the current block based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list of the current block can be derived as the reference picture referred to for inter prediction of the current block.
[0121] The motion information about the current block can be derived without constructing the candidate list, in which case the construction of the candidate list described above can be omitted.
[0122] The decoding device can generate the prediction samples of the current block based on the motion information about the current block. In this case, the reference picture can be derived based on the reference picture index of the current block, and the prediction samples of the current block can be derived using the samples of the reference block indicated by the motion vector of the current block in the reference picture. In this case, as described later, the prediction sample filtering process of all or some of the prediction samples of the current block can be further performed as the case can be.
[0123] For example, the inter predictor 332 of the decoding device can include a prediction mode determiner 332_1 which can determine the prediction mode of the current block based on the received prediction mode information, a motion information derivation unit 332_2 which can derive the motion information (motion vector and / or reference picture index) about the current block based on the received information about the motion information, and a prediction sample derivation unit 332_3 which can derive the prediction samples of the current block.
[0124] The decoding device generates the residual samples of the current block based on the received residual information. The decoding device can generate the reconstructed samples of the current block based on the prediction samples and the residual samples, and can generate the reconstructed picture based on the reconstructed samples. Subsequently, as described above, the in-loop filtering process can be further applied to the reconstructed picture.
[0125] A prediction block of the current block can be derived based on motion information derived according to a prediction mode of the current block. The prediction block can include prediction samples (an array of prediction samples) of the current block. When a motion vector of the current block indicates a fractional sample unit, an interpolation process can be performed by which a prediction sample of the current block can be derived based on a reference sample in a fractional sample unit in a reference picture. When affine inter prediction is applied to the current block, a prediction sample can be generated based on a motion vector (MV) in a sample / sub-block unit. When bi-prediction is applied, a prediction sample derived by a weighted sum or a weighted average of prediction samples derived based on L0 prediction (i.e., using a reference picture in reference picture list L0 and a prediction of MVL0) and a prediction sample derived based on L1 prediction (i.e., using a reference picture in reference picture list L1 and a prediction (according to a stage) of MVL1) can be used as a prediction sample of the current block. A case where the reference picture used for L0 prediction and the reference picture used for L1 prediction are located in different temporal directions (i.e., corresponding to bi-prediction and bi-directional prediction) with respect to the current picture is referred to as true bi-prediction.
[0126] As described above, reconstructed samples and a reconstructed picture can be generated based on the derived prediction samples, and then an in-loop filtering process can be performed.
[0127] In inter prediction, weighted sample prediction can be used. The weighted sample prediction can be referred to as weighted prediction. The weighted prediction can be applied when a slice type of a current slice in which a current block (e.g., a CU) is located is a P slice or a B slice. That is, the weighted prediction can be used not only when bi-prediction is applied but also when uni-prediction is applied. For example, as described below, the weighted prediction can be determined based on a weightedPredFlag, and a value of the weightedPredFlag can be determined based on a signaled pps_weighted_pred_flag (in the case of a P slice) or pps_weighted_bipred_flag (in the case of a B slice). For example, when slice_type is p, the weightedPredFlag can be set to the pps_weighted_pred_flag. Otherwise (when slice_type is B), the weightedPredFlag can be set to the pps_weighted_bipred_flag.
[0128] A prediction sample or a value of a prediction sample that is output as the weighted prediction can be referred to as pbSamples.
[0129] The weighted prediction process can be largely divided into a default weighted (sample) prediction process and an explicit weighted (sample) prediction process. The weighted (sample) prediction process can refer to only the explicit weighted (sample) prediction process. For example, when the value of weightedPredFlag is 0, the value of the prediction sample (pbSamples) can be derived based on the default weighted (sample) prediction process. When the value of weightedPredFlag is 1, the value of the prediction sample (pbSamples) can be derived based on the explicit weighted (sample) prediction process.
[0130] When bi-prediction is applied to the current block, the prediction sample can be derived based on a weighted average. In general, the bi-prediction signal (i.e., the bi-prediction sample) can be derived by simply averaging the L0 prediction signal (L0 prediction sample) and the L1 prediction signal (L1 prediction sample). That is, the bi-prediction sample is derived as an average of the L0 prediction sample based on the L0 reference picture and MVL0 and the L1 prediction sample based on the L1 reference picture and MVL1. However, according to the present document, when bi-prediction is applied, the bi-prediction signal (bi-prediction sample) can be derived by weighted averaging the L0 prediction signal and the L1 prediction signal.
[0131] Bi-directional optical flow (BDOF) can be used to refine the bi-prediction signal. BDOF is used to generate the prediction sample by calculating improved motion information when bi-prediction is applied to the current block (e.g., CU), and the process of calculating the improved motion information can be included in the motion information derivation operation.
[0132] For example, BDOF can be applied in a 4x4 sub-block level. That is, BDOF can be performed in units of 4x4 sub-blocks in the current block. BDOF can be applied only to the luma component. Alternatively, BDOF can be applied only to the chroma component, or can also be applied to the luma component and the chroma component.
[0133] As described above, high-level syntax (HLS) can be coded for video / image encoding / signaling. Video / image information can be included in the HLS.
[0134] A coded picture can include one or more slices. Parameters describing the coded picture are signaled in a picture header, and parameters describing a slice are signaled in a slice header. The picture header is carried in a standalone NAL unit. The slice header exists at the beginning of a NAL unit that includes the payload (i.e., slice data) of the slice.
[0135] Each picture is associated with a picture header. A picture can include different types of slices (intra-coded slices (i.e., I slices) and inter-coded slices (i.e., P slices and B slices)). Thus, the picture header can include syntax elements required for the picture intra slices and the picture inter slices.
[0136] A picture can be divided into sub-pictures, tiles, and / or slices. Sequence parameter set (SPS) signaling can exist for sub-pictures, and picture parameter set (PPS) signaling can exist for tiles and square slices. Raster-scan slice signaling can exist in a slice header.
[0137] When weighted prediction is applied to inter prediction of a current block, the weighted prediction can be performed based on information about the weighted prediction.
[0138] The weighted prediction process can start based on two flags in the SPS.
[0139] For example, the syntax elements shown in Table 1 below can be included in the SPS syntax about the weighted prediction.
[0140] [Table 1]
[0141]
[0142] In Table 1, a value of sps_weighted_pred_flag equal to 1 can indicate that the weighted prediction is applied to P slices referring to the SPS.
[0143] A value of sps_weighted_bipred_flag equal to 1 can indicate that the weighted prediction is applied to B slices referring to the SPS. A value of sps_weighted_bipred_flag equal to 0 can indicate that the weighted prediction is not applied to B slices referring to the SPS.
[0144] The two flags signaled in the SPS indicate whether the weighted prediction is applied to P slices and B slices in a coded video sequence (CVS).
[0145] The syntax elements shown in Table 2 below can be included in the PPS syntax about the weighted prediction.
[0146] [Table 2]
[0147]
[0148] In Table 2, a value of pps_weighted_pred_flag equal to 0 can indicate that weighted prediction is not applied to P slices referring to the PPS. A value of pps_weighted_pred_flag equal to 1 can indicate that weighted prediction is applied to P slices referring to the PPS. When a value of sps_weighted_pred_flag is 0, a value of pps_weighted_pred_flag is 0.
[0149] A value of pps_weighted_bipred_flag equal to 0 can indicate that weighted prediction is not applied to B slices referring to the PPS. A value of pps_weighted_bipred_flag equal to 1 can indicate that explicit weighted prediction is applied to B slices referring to the PPS. When a value of sps_weighted_bipred_flag is 0, a value of pps_weighted_bipred_flag is 0.
[0150] In addition, syntax elements shown below in Table 3 can be included in the slice header syntax.
[0151] [Table 3]
[0152]
[0153]
[0154] In Table 3, slice_pic_parameter_set_id indicates a value of pps_pic_parameter_set_id of the used PPS. A value of slice_pic_parameter_set_id is included in a range from 0 to 63.
[0155] A value of TemporalID of the current picture needs to be greater than or equal to a value of TemporalID of the PPS having the same pps_pic_parameter_set_id as slice_pic_parameter_set_id.
[0156] The prediction weight table syntax can include information on weighted prediction shown below in Table 4.
[0157] [Table 4]
[0158]
[0159]
[0160] In Table 4, luma_log2_weight_denom is the base-2 logarithm of the denominator of all luma weighting factors. The value of luma_log2_weight_denom is included in the range of 0 to 7.
[0161] delta_chroma_log2_weight_denom is the difference of the base-2 logarithm of the denominator of all chroma weighting factors. When delta_chroma_log2_weight_denom is not present, delta_chroma_log2_weight_denom is inferred to be 0.
[0162] ChromaLog2WeightDenom is derived as luma_log2_weight_denom + delta_chroma_log2_weight_denom, and its value is included in the range of 0 to 7.
[0163] A value of luma_weight_10_flag[ i ] equal to 1 specifies that there are weighting factors for the luma components of the (reference picture) List 0 (L0) prediction using RefPicList[ 0 ][ i ]. A value of luma_weight_10_flag[ i ] equal to 0 specifies that these weighting factors are not present.
[0164] A value of chroma_weight_10_flag[ i ] equal to 1 specifies that there are weighting factors for the chroma prediction values of the L0 prediction using RefPicList[ 0 ][ i ]. A value of chroma_weight_10_flag[ i ] equal to 0 specifies that these weighting factors are not present. When chroma_weight_10_flag[ i ] is not present, chroma_weight_10_flag[ i ] is inferred to be 0.
[0165] delta_luma_weight_10[ i ] is the difference of the weighting factor applied to the luma prediction values of the L0 prediction using RefPicList[ 0 ][ i ].
[0166] LumaWeightL0[ i ] is inferred to be ( 1 « luma_log2_weight_denom ) + 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 of -128 to 127. When luma_weight_10_flag[ i ] is 0, LumaWeightL0[ i ] is inferred to be 2luma _log2_weight_denom .
[0167] luma_offset_10[ i ] is the accumulated offset applied to luma prediction values using L0 prediction with RefPicList[ 0 ][ i ]. The value of luma_offset_10[ i ] is included in the range of -128 to 127. When the value of luma_weight_10_flag[ i ] is 0, the value of luma_offset_10[ i ] is inferred to be 0.
[0168] delta_chroma_weight_l0[ i ][ j ] is the difference of weighting factors applied to chroma prediction values using L0 prediction with RefPicList[ 0 ][ i ], where j is 0 for Cb and 1 for Cr.
[0169] ChromaWeightL0[ i ][ j ] is derived as ( 1 « ChromaLog2WeightDenom ) + delta_chroma_weight_l0[ i ][ j ]. The value of delta_chroma_weight_l0[ i ][ j ] is included in the range of -128 to 127 when chroma_weight_10_flag[ i ] is 1. ChromaWeightL0[ i ][ j ] is inferred to be 2 ChromaLog2WeightDenom .
[0170] delta_chroma_offset_l0[ i ][ j ] is the accumulated offset applied to chroma prediction values using L0 prediction with RefPicList[ 0 ][ i ], where j is 0 for Cb and 1 for Cr.
[0171] The value of delta_chroma_offset_10[ i ][ j ] is included in the range of -4x128 to 4x127. When the value of chroma_weight_10_flag[ i ] is 0, the value of ChromaOffsetL0[ i ][ j ] is inferred to be 0.
[0172] The prediction weighting table syntax is often used to modify the sequence when a scene change occurs. When the PPS flag for weighted prediction is enabled and the slice type is P or when the PPS flag for weighted bi-prediction is enabled and the slice type is B, the existing prediction weighting table syntax is signaled in the slice header. However, it is often the case that the prediction weighting table needs to be adjusted for one or more frames when a scene change occurs. Typically, when multiple frames share a PPS, it can not be necessary to signal the information about the weighted prediction for all frames referring to the PPS.
[0173] The following drawings are provided to describe specific examples of the present document. Since specific terms of the apparatus exemplified in the drawings or specific signal / message terms are provided to be exemplified, the technical features of the present disclosure are not limited to the specific terms used in the following drawings.
[0174] The present document provides the following methods to solve the above problems. These methods can be independently applied, or can also be used in combination with each other.
[0175] 1. The tool for weighted prediction (information about weighted prediction) can be applied at the picture level instead of the slice level. The weighting values are applied to a specific reference picture of the picture and are used for all slices of the picture.
[0176] a. Alternatively, the tool for weighted prediction can be applied at the picture level or the slice level, but can not be applied at both levels for the same picture. That is, when the weighted prediction is applied at the picture level, additional signaling of individual slices of the picture for the weighted prediction is not needed.
[0177] b. Alternatively, the tool for weighted prediction can be applied at the picture level and the slice level.
[0178] 2. The prediction weighting table syntax can be signaled at the picture level instead of the slice level. For this purpose, the information about the weighted prediction syntax can be signaled in the picture header (PH) or the picture parameter set (PPS).
[0179] 3. Alternatively, when the tool for weighted prediction is applicable at the picture level or the slice level, the tool for weighted prediction can be signaled at the picture level or the slice level.
[0180] a. The picture level signaling is present in the picture header.
[0181] b. The slice level signaling is present in the slice header.
[0182] 4. Alternatively, when the tool for weighted prediction is applicable at the picture level or the slice level, the tool for weighted prediction can be signaled at the picture level, and then the tool can be overridden at the slice level.
[0183] a. The picture level signaling is present in the picture header.
[0184] b. The slice level signaling is present in the slice header.
[0185] 5. When the prediction weighting table is present in the picture header, the number of weighted reference pictures can be explicitly signaled. One number for reference picture list 0 and one number for reference picture list 1 can be signaled. When the prediction weighting table is present in the slice header, the number can be inferred from the number of active reference pictures of reference picture list 0 and reference picture list 1.
[0186] 6. When the tool for weighted prediction (e.g. prediction weighting table) is signaled in the picture header, the reference picture signaling of the picture (and slices of the picture) can be present in the picture header.
[0187] 7. When weighted prediction is applied at picture level, if weighted prediction is applied to a picture, all slices of the picture can have the same active reference pictures. This includes the order of active reference pictures in the reference picture lists (i.e. L0 for P slices, L0 and L1 for B slices).
[0188] 8. Alternatively, when the above does not apply, the following can apply.
[0189] a. The signaling of weighted prediction is independent of the signaling of the reference picture lists. That is, in the signaling of the prediction weighting table, there is no assumption about the order of reference pictures in the RPLs.
[0190] b. There is no signaling of the weighted prediction values for the reference pictures in L0 and L1. For a reference picture, the weighted value is provided directly.
[0191] c. Only one loop is used, instead of two loops, to signal the weighted values of the reference pictures. In each loop, the reference picture associated with the first signaled weighted value is identified.
[0192] d. The reference picture identification is based on the picture order count (POC) value.
[0193] e. For bit saving, instead of signaling the POC value of the reference picture, the delta POC value between the reference picture and the current picture can be signaled.
[0194] 9. In addition to item 4, to signal the delta POC value between the reference picture and the current picture, the following can be further specified so that the absolute delta POC value can be signaled as follows.
[0195] a. The first signaled delta POC is the delta between the POC of the reference picture and the POC of the current picture.
[0196] b. The remaining signaled delta POCs (i.e., for i starting from 1) are the delta between the POC of the i-th reference picture and the POC of the (i-1)-th reference picture.
[0197] 10. The two flags in PPS can be unified into a single control flag (e.g., pps_weighted_pred_flag). The flag can be used to indicate the presence of additional flags in the picture header.
[0198] a. The flag in PH can be conditional on the PPS flag, and can further indicate the presence of pred_weighted_table() data (prediction weighted table syntax) when the NAL unit type is not Instantaneous Decoding Refresh (IDR).
[0199] 11. The two signaled flags in PPS (pps_weighted_pred_flag and pps_weighted_bipred_flag) can be unified into one flag. The one flag can use the existing name of pps_weighted_pred_flag.
[0200] 12. A flag can be signaled in the picture header to indicate whether weighted prediction is applied to the picture associated with the picture header. The flag can be called pic_weighted_pred_flag.
[0201] a. The presence of pic_weighted_pred_flag can be conditional on the value of pps_weighted_pred_flag. When the value of pps_weighted_pred_flag is 0, pic_weighted_pred_flag is not present and its value can be inferred to be 0.
[0202] b. When the value of pic_weighted_pred_flag is 1, the signaling of pred_weighted_table() in the picture header can be present.
[0203] 13. Alternatively, when weighted prediction is enabled (i.e., the value of pps_weighted_pred_flag is 1 or the value of pps_weighted_bipred_flag is 1), information about weighted prediction can still be present in the slice header, and the following can apply.
[0204] a. A new flag can be signaled to indicate whether or not there is information on weighted prediction in the slice header. The flag can be referred to as slice_weighted_pred_present_flag.
[0205] b. The presence of slice_weighted_pred_present_flag can be determined according to the slice type and the values of pps_weighted_pred_flag and pps_weighted_bipred_flag.
[0206] In this document, the information on weighted prediction can include information / syntax elements related to the weighted prediction described in Table 1 to Table 4. The video / picture information can include various inter prediction information, such as the information on weighted prediction, residual information, and inter prediction mode information. The inter prediction mode information can include information / syntax elements such as information indicating whether a merge mode or an MVP mode is applied to a current block, and selection information for selecting one of motion candidates in a motion candidate list. For example, when the merge mode is applied to the current block, a merge candidate list is constructed based on neighboring blocks of the current block, and one candidate for deriving motion information on the current block can be selected / used (based on a merge index) from the merge candidate list. In another example, when the MVP mode is applied to the current block, an mvp candidate list can be constructed based on neighboring blocks of the current block, and one candidate for deriving motion information on the current block can be selected / used (based on an mvp flag) from the mvp candidate list.
[0207] In one embodiment, for weighted prediction in inter prediction, the PPS can include the syntax elements shown in Table 5 below, and the semantics of the syntax elements can be as shown in Table 6 below.
[0208] [Table 5]
[0209]
[0210] [Table 6]
[0211]
[0212] Referring to Table 5 and Table 6, a value of pps_weighted_pred_flag equal to 0 can indicate that weighted prediction is not applied to P or B slices referring to the PPS. A value of pps_weighted_pred_flag equal to 1 can indicate that weighted prediction is applied to P or B slices referring to the PPS.
[0213] In addition, the picture header can include the syntax elements shown in Table 7 below, and the semantics of the syntax elements can be as shown in Table 8 below.
[0214] [Table 7]
[0215]
[0216] [Table 8]
[0217]
[0218] Referring to Table 7 and Table 8, a value of pic_weighted_pred_flag equal to 0 can indicate that weighted prediction is not applied to a P or B slice of a reference picture header. A value of pic_weighted_pred_flag equal to 1 can indicate that weighted prediction is applied to a P or B slice of a reference picture header.
[0219] When the value of pic_weighted_pred_flag is 1, all slices in a picture associated with the picture header can have the same reference picture list. Otherwise, when the value of pic_weighted_pred_flag is 1, the value of pic_rpl_present_flag can be 1.
[0220] In the absence of the above conditions, pic_weighted_pred_flag can be signaled as shown in Table 9 below.
[0221] [Table 9]
[0222]
[0223] A slice header can include the syntax elements shown in Table 10 below.
[0224] [Table 10]
[0225]
[0226] A prediction weight table syntax can include the syntax elements shown in Table 11 below, and the semantics of the syntax elements can be as shown in Table 12 below.
[0227] [Table 11]
[0228]
[0229]
[0230] [Table 12]
[0231]
[0232] RefPicList[0][i] of the current picture. The value of num_10_weighted_ref_pics is included in the range of from 0 to MaxDecPicBuffMinusl + 14.
[0233] num_11_weighted_ref_pics can indicate the number of weighted reference pictures in the reference picture list 1. The value of num_11_weighted_ref_pics is included in the range of from 0 to MaxDecPicBuffMinusl + 14.
[0234] A value of luma_weight_10_flag[ i ] equal to 1 indicates that there are weighting factors for luma components of list 0 (L0) prediction using RefPicList[0][i].
[0235] A value of chroma_weight_10_flag[ i ] equal to 1 indicates that there are weighting factors for chroma prediction values of L0 prediction using RefPicList[0][i]. A value of chroma_weight_10_flag[ i ] equal to 0 indicates that these weighting factors are not present.
[0236] A value of luma_weight_11_flag[ i ] equal to 1 indicates that there are weighting factors for luma components of list 1 (LI) prediction using RefPicList[0][i].
[0237] A value of chroma_weight_11_flag[ i ] indicates that there are weighting factors for chroma prediction values of LI prediction using RefPicList[0][i]. A value of chroma_weight_10_flag[ i ] equal to 0 indicates that these weighting factors are not present.
[0238] For example, when the weighted prediction is applied to the current block, the encoding device can generate the number information about the weighted reference pictures in the reference picture list of the current block based on the weighted prediction. The number information can refer to the number information about the weights signaled for the entries (reference pictures) in the L0 reference picture list and / or the L1 reference picture list. That is, the value of the number information can be equal to the number of the weighted reference pictures in the reference picture list (L0 and / or L1). Thus, when the value of the number information is n, the prediction weight table syntax can include n weight factor related flags of the reference picture list. The weight factor related flags can correspond to luma_weight_l0_flag, luma_weight_l1_flag, chroma_weight_l0_flag, and / or chroma_weight_l0_flag of Table 11. The weights of the current picture can be derived based on the weight factor related flags.
[0239] When the weighted bi-prediction is applied to the current block, the prediction weight table syntax can independently include the number information about the weighted reference pictures in the L1 reference picture list and the number information about the weighted reference pictures in the L0 reference picture list as shown in Table 11. The weight factor related flags can be independently included for each of the number information about the weighted reference pictures in the L1 reference picture list and the number information about the weighted reference pictures in the L0 reference picture list. That is, the prediction weight table syntax can include the same number of luma_weight_l0_flag and / or chroma_weight_l0_flag as the number of the weighted reference pictures in the L0 reference picture list, and can include the same number of luma_weight_l1_flag and / or chroma_weight_l1_flag as the number of the weighted reference pictures in the L1 reference picture list.
[0240] The encoding apparatus can encode the image information including the number information and the weighting factor related flag, and can output the encoded image information in the form of a bitstream. Here, the number information and the weighting factor related flag can be included in a prediction weighting table syntax in the image information as shown in Table 11. The prediction weighting table syntax can be included in a picture header in the image information or a slice header of the image information. In order to indicate whether the prediction weighting table syntax is included in the picture header, that is, in order to indicate whether information on weighted prediction exists in the picture header, a weighted prediction related flag can be included in a picture parameter set and / or the picture header. When the weighted prediction related flag is included in the picture parameter set, the weighted prediction related flag can correspond to pps_weighted_pred_flag of Table 5. When the weighted prediction related flag is included in the picture header, the weighted prediction related flag can correspond to pic_weighted_pred_flag of 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 picture header.
[0241] When the weighted prediction related flag is parsed from the bitstream, the decoding apparatus can parse the prediction weighting table syntax from the bitstream based on the parsed flag. The weighted prediction related flag can be parsed from a picture parameter set and / or a picture header of the bitstream. In other words, the weighted prediction related flag can 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 apparatus can parse the prediction weighting table syntax from the picture header of the bitstream.
[0242] When the prediction weighting table syntax is parsed from the picture header (when the value of pps_weighted_pred_flag and / or pic_weighted_pred_flag is 1), the decoding apparatus can apply information on weighted prediction included in the prediction weighting table syntax to all slices in a current picture. In other words, when the prediction weighting table syntax is parsed from the picture header, all slices in the picture associated with the picture header can have the same reference picture list.
[0243] The decoding device can parse, based on the prediction weight table syntax, number information about the weighted reference pictures in the reference picture list of the current block. The value of the number information can be equal to the number of the weighted reference pictures in the reference picture list. When the weighted bi-prediction is applied to the current block, the decoding device can independently parse, from the prediction weight table syntax, the number information about the weighted reference pictures in the L1 reference picture list and the number information about the weighted reference pictures in the L0 reference picture list.
[0244] The decoding device can parse, based on the number information, the weight factor related flags of the reference picture list from the prediction weight table syntax. The weight factor related flags can correspond to luma_weight_l0_flag, luma_weight_l1_flag, chroma_weight_l0_flag, and / or chroma_weight_l0_flag of Table 11. For example, when the value of the number information is n, the decoding device can parse n weight factor related flags from the prediction weight table syntax. The decoding device can derive the weights of the reference pictures of the current block based on the weight factor related flags, and can perform the weighted prediction on the current block based on the weights, thereby generating or deriving the prediction samples. Subsequently, the decoding device can generate or derive the reconstructed samples of the current block based on the prediction samples, and can reconstruct the current picture based on the reconstructed samples.
[0245] In another embodiment, for the weighted prediction in inter prediction, the picture header can include the syntax elements shown in Table 13 below, and the semantics of the syntax elements can be as shown in Table 14 below.
[0246] [Table 13]
[0247]
[0248] [Table 14]
[0249]
[0250] Referring to Table 13 and Table 14, the value of pic_weighted_pred_flag equal to 0 can indicate that the weighted prediction is not applied to the P or B slice of the reference picture header. The value of pic_weighted_pred_flag equal to 1 can indicate that the weighted prediction is applied to the P or B slice of the reference picture header. When the value of sps_weighted_pred_flag is 0, the value of pic_weighted_pred_flag is 0.
[0251] The slice header can include the syntax elements shown in Table 15 below.
[0252] [Table 15]
[0253]
[0254]
[0255] Referring to Table 15, a weighted prediction related flag (pic_weighted_pred_flag) can indicate whether a prediction weighting table syntax (information on weighted prediction) is present in a picture header or a slice header. A value of 1 for the pic_weighted_pred_flag can indicate that the prediction weighting table syntax (information on weighted prediction) can be present in the picture header, not in the slice header. A value of 0 for the pic_weighted_pred_flag can indicate that the prediction weighting table syntax (information on weighted prediction) can be present in the slice header, not in the picture header. Although Tables 13 and 14 indicate that the weighted prediction related flag is signaled in the picture header, the weighted prediction related flag can be signaled in the picture parameter set.
[0256] For example, when weighted prediction is applied to a current block, the encoding apparatus performs the weighted prediction, and can encode image information including the weighted prediction related flag and the prediction weighting table syntax based on the weighted prediction. Here, when the prediction weighting table syntax is included in a picture header of the image information, the encoding apparatus can determine a value of the flag to be 1, and when the prediction weighting table syntax is included in a slice header of the image information, the encoding apparatus can determine a value of the flag to be 0. When the value of the flag is 1, information on weighted prediction included in the prediction weighting table syntax can be applied to all slices in a current picture. When the value of the flag is 0, information on weighted prediction included in the prediction weighting table syntax can be applied to a slice associated with the slice header among the slices in the current picture. Accordingly, when the prediction weighting table syntax is included in the picture header, all slices associated with the picture header in the picture can have the same reference picture list, and when the prediction weighting table syntax is included in the slice header, the slice associated with the slice header can have the same reference picture list.
[0257] The prediction weighting table syntax can include number information on the weighted reference pictures in the reference picture list of the current block, a weighting factor related flag, and the like. As described above, the number information can refer to number information on the weights signaled for the entries (reference pictures) in the L0 reference picture list and / or the L1 reference picture list, and the value of the number information can be equal to the number of the weighted reference pictures in the reference picture list (L0 and / or L1). Thus, when the value of the number information is n, the prediction weighting table syntax can include n weighting factor related flags of the reference picture list. 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 of Table 11.
[0258] When the weighted bi-prediction is applied to the current block, the encoding device can generate the prediction weighting table syntax including the number information on the weighted reference pictures in the L1 reference picture list and the number information on the weighted reference pictures in the L0 reference picture list. The prediction weighting table syntax can independently include the weighting factor related flags for each of the number information on the weighted reference pictures in the L1 reference picture list and the number information on the weighted reference pictures in the L0 reference picture list. That is, the prediction weighting table syntax can include the luma_weight_l0_flag and / or the chroma_weight_l0_flag in the same number as the number of the weighted reference pictures in the L0 reference picture list, and can include the luma_weight_l1_flag and / or the chroma_weight_l1_flag in the same number as the number of the weighted reference pictures in the L1 reference picture list.
[0259] When the weighted prediction related flag is parsed from the bitstream, the decoding device can parse the prediction weighting table syntax from the bitstream based on the parsed flag. The weighted prediction related flag can be parsed from the picture parameter set and / or the picture header of the bitstream. In other words, the weighted prediction related flag can correspond to pps_weighted_pred_flag and / or pic_weighted_pred_flag. When the value of the weighted prediction related flag is 1, the decoding device can parse the prediction weighting table syntax from the picture header of the bitstream. When the value of the weighted prediction related flag is 0, the decoding device can parse the prediction weighting table syntax from the slice header of the bitstream.
[0260] When the prediction weighting table syntax is parsed from the picture header, the decoding device can apply the information about the weighted prediction included in the prediction weighting table syntax to all slices in the current picture. In other words, when the prediction weighting table syntax is parsed from the picture header, all slices in the picture associated with the picture header can have the same reference picture list. When the prediction weighting table syntax is parsed from the slice header, the decoding device can apply the information about the weighted prediction included in the prediction weighting table syntax to the slice associated with the slice header among the slices in the current picture. In other words, when the prediction weighting table syntax is parsed from the picture header, the slice associated with the slice header can have the same reference picture list.
[0261] The decoding device can parse, based on the prediction weighting table syntax, number information about weighted reference pictures in a reference picture list of the current block. A value of the number information can be equal to a number of the weighted reference pictures in the reference picture list. When the weighted bi-prediction is applied to the current block, the decoding device can independently parse, from the prediction weighting table syntax, the number information about the weighted reference pictures in the L1 reference picture list and the number information about the weighted reference pictures in the L0 reference picture list.
[0262] The decoding device can parse, based on the number information, a weighting factor related flag of the reference picture list from the prediction weighting table syntax. The weighting factor related flag can correspond to the luma_weight_l0_flag, the luma_weight_l1_flag, the chroma_weight_l0_flag, and / or the chroma_weight_l0_flag described above. For example, when a value of the number information is n, the decoding device can parse n weighting factor related flags from the prediction weighting table syntax. The decoding device can derive weights of reference pictures of the current block based on the weighting factor related flags, and can perform inter prediction on the current block based on the weights, thereby generating or deriving prediction samples. The decoding device can generate or derive reconstructed samples of the current block based on the prediction samples, and can generate a reconstructed picture of the current picture based on the reconstructed samples.
[0263] In yet another embodiment, the prediction weighting table syntax can include the syntax elements shown in Table 16 below, and the semantics of the syntax elements can be as shown in Table 17 below.
[0264] [Table 16]
[0265]
[0266] [Table 17]
[0267]
[0268]
[0269] In Table 16 and Table 17, pic_poc_delta_sign[ i ] is inferred to be 0 when it is not present. DeltaPocWeightedRefPic[ i ] can be derived as follows, where i is included in the range of 0 to num_weighted_ref_pics_minus1.
[0270] [Formula 1]
[0271]
[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 of -128 to 127. When the value of chroma_weight_flag[ i ] is 0, ChromaWeight[ i ][ j ] can be derived as 2 « ChromaLog2WeightDenom.
[0273] ChromaOffset[ i ][ j ] can be derived as follows.
[0274] [Formula 2]
[0275]
[0276] The value of delta_chroma_offset[ i ][ j ] can be included in the range of -4x128 to 4x127. When the value of chroma_weight_flag[ i ] is 0, the value of ChromaOffset[ i ][ j ] is inferred to be 9.
[0277] sumWeightflags can be derived as the sum of luma_weight_flag[ i ] + 2xchroma_weight_flag[ i ]. i is included in the range of 0 to num_weighted_ref_pics_minus1. When slice_type is P, sumWeightL0Flags is less than or equal to 24.
[0278] 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 a mapping between an index in the weighted reference picture list and the i-th reference picture L0. i is included in the range of 0 to NumRefIdxActive[ 0 ] - 1, and can be derived as follows.
[0279] [Eq. 3]
[0280]
[0281] When the current slice is a B slice and the value of pic_weighted_pred_flag is 1, L1ToWeightedRefIdx[ i ] can represent a mapping between an index in the weighted reference picture list and the i-th active reference picture L1. i is included in the range of 0 to NumRefIdxActive[ 1 ] - 1, and can be derived as follows.
[0282] [Eq. 4]
[0283]
[0284] When luma_weight_l0_flag[ i ] is present, luma_weight_l0_flag[ i ] is replaced by luma_weight_flag[ L0ToWeightedRefIdx[ i ] ], and when luma_weight_l1_flag[ i ] is present, luma_weight_l1_flag[ i ] is replaced by luma_weight_flag[ L1ToWeightedRefIdx[ i ] ].
[0285] When LumaWeightL0[ i ] is present, LumaWeightL0[ i ] is replaced by LumaWeight[ L0ToWeightedRefIdx[ i ] ], and when LumaWeightL1[ i ] is present, LumaWeightL1[ i ] is replaced by LumaWeight[ L1ToWeightedRefIdx[ i ] ].
[0286] When luma offset_l0[ i ] is present, luma offset_l0[ i ] is replaced by luma offset[ L0ToWeightedRefIdx[ i ] ], and when luma offset_l1[ i ] is present, luma offset_l1[ i ] is replaced by luma offset[ L1ToWeightedRefIdx[ i ] ].
[0287] When ChromaWeightL0[ i ] is present, ChromaWeightL0[ i ] is replaced by ChromaWeight[ L0ToWeightedRefIdx[ i ] ], and when ChromaWeightL1[ i ] is present, ChromaWeightL1[ i ] is replaced by ChromaWeight[ L1ToWeightedRefIdx[ i ] ].
[0288] In yet another embodiment, the slice header syntax can include the syntax elements shown in Table 18 below, and the semantics of the syntax elements can be as shown in Table 19 below.
[0289] [Table 18]
[0290]
[0291] [Table 19]
[0292]
[0293] Referring to Table 18 and Table 19, a flag indicating whether the prediction weighting table syntax is present in the slice header can be signaled. The flag can be signaled in the slice header, and the flag can be referred to as slice_weight_pred_present_flag.
[0294] A value of slice_weight_pred_present_flag equal to 1 can indicate that the prediction weighting table syntax is present in the slice header. A value of slice_weight_pred_present_flag equal to 0 can indicate that the prediction weighting table syntax is not present in the slice header. That is, a value of slice_weight_pred_present_flag equal to 0 can indicate that the prediction weighting table syntax is present in the picture header.
[0295] In yet another embodiment, the prediction weighting table syntax is parsed from the slice header, but the adaptation parameter set including the syntax elements shown in Table 20 below can be signaled.
[0296] [Table 20]
[0297]
[0298] Each APS RBSP needs to be available for the decoding process before it is included for use as a reference in at least one access unit with Temporalld less than or equal to the Temporalld of the coded slice NAL unit that refers to the APS RBSP or provided through external methods.
[0299] aspLayerld can be referred to as the nuh layer id of the APS NAL unit. When the layer with nuh layer id equal to aspLayerld is an independent layer (i.e., when vps independent layer flag [GeneralLayerIdx [aspLayerld]] is equal to 1), the APS NAL unit containing the APS RBSP has the same nuh layer id as the nuh layer id of the coded slice NAL unit referring to the APS RBSP. Otherwise, the APS NAL unit containing the APS RBSP has the same nuh layer id as the nuh layer id of the coded slice NAL unit referring to the APS RBSP or the nuh layer id of the direct dependency layer of the layer containing the coded slice NAL unit referring to the APS RBSP.
[0300] All APS NAL units with the same value of adaptation parameter set id and the same value of aps params type in an access unit have the same content.
[0301] adaptation parameter set id provides an identifier of the APS so that other syntax elements can refer to the identifier.
[0302] 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 of 0 to 7.
[0303] When aps params type is LMCS APS, the value of adaptation parameter set id is included in the range of 0 to 3.
[0304] The 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.
[0305] [Table 21]
[0306]
[0307] Each type of APS uses a separate value space for adaptation_parameter_set_id.
[0308] An APS NAL unit (with a particular value of adaptation_parameter_set_id and a particular value of aps_params_type) can be shared between pictures, and different slices in a picture can refer to different ALF APSs.
[0309] A value of aps_extension_flag equal to 0 indicates that the aps_extension_data_flag syntax element is not present in the APS RBSP syntax structure. A value of aps_extension_flag equal to 1 indicates that the aps_extension_data_flag syntax element is present in the APS RBSP syntax structure.
[0310] The aps_extension_data_flag can have a random value.
[0311] As described above, a new aps_params_type (PRED_WEIGHT_APS) can be added to the existing types. In addition, the slice header can be modified to signal the APS ID instead of pred_weight_table(), as shown in Table 22 below.
[0312] [Table 22]
[0313]
[0314] In Table 22, slice_pred_weight_aps_id indicates adaptation_parameter_set_id of the prediction weight table APS. Temporalld of the APS NAL unit having the same adaptation_parameter_set_id as slice_pred_weight_aps_id and the same aps_params_type as PERD_WEIGHT_APS is less than or equal to Temporalld of the coded slice NAL unit.
[0315] When the slice_pred_weight_aps_id syntax element is present in the slice header, the value of slice_pred_weight_aps_id is the same for all slices of the picture.
[0316] In this case, the prediction weight table syntax shown in Table 23 below can be signaled.
[0317] [Table 23]
[0318]
[0319]
[0320] In Table 23, the value of num_lists_active_flag equal to 1 can indicate that the prediction weight table information is signaled for one reference picture list. The value of num_lists_active_flag equal to 0 can indicate that the prediction weight table information for two reference picture lists L0 and L1 is not signaled.
[0321] numRefIdxActive[i] can be used to indicate the number of active reference indices. The value of numRefIdxActive[i] is in the range of 0 to 14.
[0322] The syntax of Table 23 indicates whether the information about one or two lists is parsed in the APS when num_lists_active_flag is parsed.
[0323] Instead of Table 23, the prediction weight table syntax shown in Table 24 below can be used.
[0324] [Table 24]
[0325]
[0326]
[0327] In Table 24, a value of num_lists_active_flag equal to 1 can indicate that prediction weighting list information is signaled for one reference picture list. A value of num_lists_active_flag equal to 0 can indicate that prediction weighting list information is not signaled for two reference picture lists.
[0328] In yet another embodiment, the picture parameter set syntax can include the syntax elements as shown in Table 25 below, and the semantics of the syntax elements can be as shown in Table 26 below.
[0329] [Table 25]
[0330]
[0331] [Table 26]
[0332]
[0333] Referring to Table 25 and Table 26, the picture parameter set can include information on a flag indicating whether weighted prediction is applied to a slice of the reference picture parameter set and information on a flag indicating whether information on weighted prediction is present in a picture header or a slice header.
[0334] The information on the flag indicating whether weighted prediction is applied to a slice of the reference picture parameter set can include a pps_weighted_pred_flag syntax element indicating whether weighted prediction is applied to a P or B slice of the reference picture parameter set and / or a pps_weighted_bipred_flag syntax element indicating whether weighted prediction is applied to a B slice of the reference picture parameter set.
[0335] The information indicating whether the information on the weighted prediction is present in the picture header or the slice header can include a flag indicating whether the information on the weighted prediction is present in the picture header or the slice header. When the value of the flag indicating whether the information on the weighted prediction is present in the picture header or the slice header is 1, the information on the weighted prediction included in the prediction weight table syntax can not be present in the slice header of the reference picture parameter set but can be present in the picture header of the reference picture parameter set. When the value of the flag indicating whether the information on the weighted prediction is present in the picture header or the slice header is 0, the information on the weighted prediction can not be present in the picture header of the reference picture parameter set but can be present in the slice header of the reference picture parameter set.
[0336] In this case, the picture header syntax and the slice header syntax can be signaled as shown in Table 27 and Table 28, respectively.
[0337] [Table 27]
[0338]
[0339] [Table 28]
[0340]
[0341]
[0342] Referring to Table 27, when the value of the flag indicating whether the weighted prediction is applied to the slice of the reference picture parameter set (pps_weighted_pred_flag and / or pps_weighted_bipred_flag) is 1 and the value of the flag indicating whether the information on the weighted prediction is present in the picture header or the slice header (weighted_pred_table_present_in_ph_flag) is 1, the picture header syntax can include the prediction weight table syntax (pred_weight_table).
[0343] Referring to Table 28, when the value of a flag (pps_weighted_pred_flag and / or pps_weighted_bipred_flag) indicating whether weighted prediction is applied to a slice of a reference picture parameter set is 1 and the value of a flag (weighted_pred_table_present_in_ph_flag) indicating whether information on weighted prediction is present in a picture header or a slice header is 0, the slice header syntax can include a prediction weight table syntax (pred_weight_table). Specifically, when the value of pps_weighted_pred_flag is 1, the slice type is a P slice, and the value of weighted_pred_table_present_in_ph_flag is 0, the prediction weight table syntax can be included in the slice header. Alternatively, when the value of pps_weighted_bipred_flag is 1, the slice type is a B slice, and the value of weighted_pred_table_present_in_ph_flag is 0, the prediction weight table syntax can be included in the slice header.
[0344] The prediction weight table syntax can include the syntax elements shown in Table 29 below, and the semantics of the syntax elements can be as shown in Table 30 below.
[0345] [Table 29]
[0346]
[0347]
[0348] [Table 30]
[0349]
[0350] Referring to Tables 29 and 30, the prediction weighting table syntax can include a number of weighted prediction information. The number of weighted prediction information can indicate a number of weighted reference pictures in a reference picture list. In other words, a value of the number of weighted prediction information can be identical to the number of weighted reference pictures in the reference picture list. The reference picture list can include an L0 reference picture list and an L1 reference picture list. For example, the number of weighted prediction information can include a first number of weighted prediction information (num_10_weighted_ref_pics) for the L0 reference picture list and a second number of weighted prediction information (num_11_weighted_ref_pics) for the L1 reference picture list. As shown in Table 29, the first number of weighted prediction information and the second number of weighted prediction information can be independently parsed from the prediction weighting table syntax. The number of weighted prediction information can be included in the prediction weighting table syntax based on a flag (e.g., a weighted_pred_table_present_in_ph_flag syntax element) indicating whether information on weighted prediction is present in a picture header or a slice header. For example, when a value of the flag (e.g., the weighted_pred_table_present_in_ph_flag syntax element) indicating whether information on weighted prediction is present in a picture header or a slice header is 1, the number of weighted prediction information can be included in the prediction weighting table syntax. When the value of the flag is 0, the first number of weighted prediction information can be inferred as NumRefIdxActive[0] and the second number of weighted prediction information can be inferred as NumRefIdxActive[1]. NumRefIdxActive[i] can indicate a number of (active) reference indices for RPL i used for decoding a corresponding slice.
[0351] A syntax element (luma_weight_10_flag) indicating whether a weighting factor for L0 prediction is present can be parsed from the prediction weighting table syntax based on the first number of weighted prediction information. A syntax element (luma_weight_11_flag) indicating whether a weighting factor for L1 prediction is present can be parsed from the prediction weighting table syntax based on the second number of weighted prediction information. For example, when a value of the first number of weighted prediction information is n, n luma_weight_10_flag syntax elements can be parsed from the prediction weighting table syntax. Likewise, when a value of the second number of weighted prediction information is n, n luma_weight_11_flag syntax elements can be parsed from the prediction weighting table syntax.
[0352] Figure 7 and Figure 8 Examples of a video / image encoding method and related components according to embodiments of the present document are schematically illustrated.
[0353] Figure 7 The video / image encoding method disclosed in the above can be performed byFigure 2 and Figure 7 The (video / image) encoding device 200 disclosed in Figure 7 S700 and S710 can be performed by the predictor 220 of the encoding device 200, and S720 can be performed by the residual processor 230 of the encoding device 200. S730 can be performed by the entropy encoder 240 of the encoding device 200. Figure 7 The video / image encoding method disclosed in
[0354] Specifically, referring to Figure 7 and Figure 8 The predictor 220 of the encoding device can derive motion information about a current block in a current picture based on motion estimation (S700). For example, the encoding device can search for a similar reference block having high correlation with the current block in a predetermined search range in a reference picture using an original block in an original picture in units of a fractional pixel, and thus can derive the motion information. The similarity of the blocks can be derived according to a difference between sample values based on stages. For example, the similarity of the blocks can be calculated based on a 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 derived based on the reference block having the smallest SAD in the search area. According to various methods, the derived motion information can be signaled to the decoding device based on an inter prediction mode.
[0355] The predictor 220 of the encoding device can perform weighted (sample) prediction on the current block based on the motion information about the current block, and can generate a predicted sample (predicted block) of the current block and prediction-related information based on the weighted prediction (S710). The prediction-related information can include prediction mode information (merge mode, skip mode, etc.), information about the motion information, information about the weighted prediction, etc. The information about the motion information can include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index), which is information for deriving a motion vector. In addition, the information about the motion information can include information about the MVD described above and / or reference picture index information. Further, the information about the motion information can include information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. For example, when a slice type of a current slice is a P slice or a B slice, the predictor 220 can perform weighted prediction on a current block in the current slice. The weighted prediction can be used not only when bi-prediction is applied to the current block, but also when uni-prediction is applied to the current block.
[0356] The residual processor 230 of the encoding apparatus can generate residual samples and residual information based on the prediction samples generated by the predictor 220 and the original picture (original block and original samples) (S720). Here, the residual information is information about the residual samples, and can include information about the (quantized) transform coefficients for the residual samples.
[0357] The adder (or reconstructor) of the encoding apparatus can generate reconstructed samples (reconstructed picture, reconstructed block, or reconstructed sample array) by adding the residual samples generated by the residual processor 230 and the prediction samples generated by the predictor 220.
[0358] The entropy encoder 240 of the encoding apparatus can encode the image information including the prediction-related information and information about the weighted prediction generated by the predictor 220, the residual information generated by the residual processor 230, etc. (S730). Here, the information about the weighted prediction can include a flag (hereinafter referred to as a "first flag") related to whether the weighted prediction is applied to a slice of a picture parameter set of the reference image information, a flag (hereinafter referred to as a "second flag") related to whether the information about the weighted prediction is present in a picture header of the image information or in a slice header of the image information, a prediction weighting table syntax, etc. The first flag can include a pps_weighted_pred_flag syntax element indicating whether the weighted prediction is applied to a P or B slice of the reference picture parameter set and / or a pps_weighted_bipred_flag syntax element indicating whether the weighted prediction is applied to a B slice of the reference picture parameter set. The second flag can be, for example, weighted_pred_table_present_in_ph_flag, which can be included in the picture parameter set when the values of the pps_weighted_pred_flag and / or pps_weighted_bipred_flag syntax elements are 1. When the value of the second flag is 1, the information about the weighted prediction included in the prediction weighting table syntax can not be present in the slice header of the reference picture parameter set, but can be present in the picture header of the reference picture parameter set. When the value of the second flag is 0, the information about the weighted prediction can not be present in the picture header of the reference picture parameter set, but can be present in the slice header of the reference picture parameter set.
[0359] Based on the values of the first flag (pps_weighted_pred_flag and / or pps_weighted_bipred_flag) and the second flag, the prediction weighting table syntax can be included in a picture header or a slice header of the picture information. For example, when the value of the first flag and the value of the second flag are both 1, the prediction weighting table syntax can be included in the picture header. When the value of the first flag is 1 and the value of the second flag is 0, the prediction weighting table syntax can be included in the slice header.
[0360] The prediction weighting table syntax can include the number information of the weighted prediction based on the value of the second flag. The value of the number information can be the same as the number of the weighted reference pictures in the reference picture list. Here, the reference picture list can include an L0 reference picture list and an L1 reference picture list. The number information of the weighted prediction can include first number information (num_10_weighted_ref_pics) about the L0 reference picture list and second number information (num_11_weighted_ref_pics) about the L1 reference picture list. As shown in Table 29, the first number information and the second number information can be independently parsed from the prediction weighting table syntax. Based on whether the value of the second flag is 0 or 1, the number information of the weighted prediction can or can not be included in the prediction weighting table syntax. For example, when the value of the second flag is 1, the number information of the weighted prediction 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].
[0361] The prediction weighting table syntax can include a syntax element (luma_weight_10_flag) indicating whether the weighting factor of the L0 prediction exists and / or a syntax element (luma_weight_11_flag) indicating whether the weighting factor of the L1 prediction exists. The luma_weight_10_flag can be included in the prediction weighting table syntax based on the first number information. The luma_weight_11_flag can be included in the prediction weighting table syntax based on the second number information. For example, when the value of the first number information is n, n luma_weight_10_flag syntax elements can be included in the prediction weighting table syntax. Similarly, when the value of the second number information is n, n luma_weight_11_flag syntax elements can be included in the prediction weighting table syntax.
[0362] For example, the entropy encoder 240 of the encoding apparatus can encode the image information based on at least one of Table 5 to Table 23, and can output the encoded image information in the form of a bitstream. Specifically, when the prediction weighting table syntax is included in the picture header of the image information, the entropy encoder 240 of the encoding apparatus can determine the value of the first flag (pps_weighted_pred_flag and / or pps_weighted_bipred_flag) and the value of the second flag (weighted_pred_table_present_in_ph_flag) to be 1. When the prediction weighting table syntax is included in the slice header of the image information, the entropy encoder 240 of the encoding apparatus can determine the value of the first flag to be 1 and can determine the value of the second flag to be 0. When the prediction weighting table syntax is included in the picture header, all slices in the picture associated with the picture header can have the same reference picture list, and when the prediction weighting table syntax is included in the slice header, the slice associated with the slice header can have the same reference picture list. The first flag and the second flag can be included in the picture parameter set of the image information and transmitted to the decoding apparatus.
[0363] The predictor 220 of the encoding apparatus can generate the number information about the weighted reference pictures in the reference picture list based on the weighted prediction according to the motion information. In this case, the entropy encoder 240 of the encoding apparatus can encode the image information including the information about the number. The number information can be included or not included in the prediction weighting table syntax in the image information based on whether the value of the flag is 0 or 1. The value of the number information can be the same as the number of the weighted reference pictures in the reference picture list. Accordingly, the prediction weighting table syntax can include as many weighted 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 weighting table syntax can include n weighted factor related flags. The number information and / or the weighted factor related flags can be independently included in the prediction weighting table syntax for each of L0 and L1. In other words, the number information about the weighted reference pictures in L0 and the number information about the weighted reference pictures in L1 can be independently signaled in the prediction weighting table syntax without depending on each other (not dependent on the number of active reference pictures of the respective list).
[0364] Figure 9 and Figure 10 Examples of a video / image decoding method and related components according to embodiments of the present document are schematically illustrated.
[0365] Figure 9 The video / image decoding method disclosed in the above can be performed by Figure 3and Figure 10 The (video / image) decoding apparatus 300 disclosed in the foregoing embodiments can perform. Specifically, for example, Figure 9 S900 and S910 of the foregoing embodiments can be performed by the entropy decoder 310 of the decoding apparatus. S920 can be performed by the predictor 330 of the decoding apparatus, and S930 can be performed by the residue processor 320 of the decoding apparatus. S940 can be performed by the adder 340 of the decoding apparatus. Figure 9 The video / image decoding method disclosed in the foregoing embodiments can include the above-described embodiments of the present document.
[0366] Referring to Figure 9 and Figure 10 The entropy decoder 310 of the decoding apparatus can parse a first flag related to whether weighted prediction is applied to a slice of a reference picture parameter set from a picture parameter set of a bitstream, and can parse a second flag related to whether information on weighted prediction is present in a picture header of the bitstream or in a slice header of the bitstream from the bitstream based on the first flag (S900). The entropy decoder 310 of the decoding apparatus can parse a prediction weighting list syntax from the picture header or the slice header based on the first flag and the second flag (S910). Here, the first flag can include a pps_weighted_pred_flag syntax element indicating whether weighted prediction is applied to a P or B slice of the reference picture parameter set and / or a pps_weighted_bipred_flag syntax element indicating whether weighted prediction is applied to a B slice of the reference picture parameter set. When the values of the pps_weighted_pred_flag and / or the pps_weighted_bipred_flag syntax element are 1, the second flag can be parsed from the picture parameter set.
[0367] When the value of the second flag is 1, the information on weighted prediction included in the prediction weighting list syntax can not be present in the slice header of the reference picture parameter set but can be present in the picture header of the reference picture parameter set. When the value of the second flag is 0, the information on weighted prediction can not be present in the picture header of the reference picture parameter set but can be present in the slice header of the reference picture parameter set. Accordingly, when the value of the first flag and the value of the second flag are 1, the entropy decoder 310 of the decoding apparatus can parse the prediction weighting list syntax from the picture 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 apparatus can parse the prediction weighting list syntax from the slice header of the bitstream. When the prediction weighting list syntax is parsed from the picture header, all slices in a picture associated with the picture header can have the same reference picture list, and when the prediction weighting list syntax is parsed from the slice header, the slice associated with the slice header can have the same reference picture list.
[0368] The entropy decoder 310 of the decoding device can parse the number information of the weighted prediction from the prediction weighting table syntax. The value of the number information can be the same as the number of the weighted reference pictures in the reference picture list. The entropy decoder 310 of the decoding device can parse as many weighted factor related flags (luma_weight_l0_flag and / or luma_weight_l1_flag) as the value of the number information from the prediction weighting table syntax based on the number information. For example, when the value of the second flag is 1, the entropy decoder 310 of the decoding device can parse the number information from 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[l]. When the value of the number information is n, n weighted factor related flags can be parsed from the prediction weighting table syntax. The number information and / or the weighted factor related flags can be included in the prediction weighting table syntax independently for each of L0 and Ll. In one example, the number information about the weighted reference pictures in L0 and the number information about the weighted reference pictures in Ll can be parsed in the prediction weighting table syntax independently without relying on each other (not dependent on the number of active reference pictures for the respective list).
[0369] The decoding device can perform the weighted prediction for the current block in the current picture based on the prediction related information (inter / intra prediction classification information, intra prediction mode information, inter prediction mode information, information about the weighted prediction, etc.) obtained from the bitstream, thereby reconstructing the current picture. Specifically, the predictor 330 of the decoding device can perform the weighted prediction for the current block based on the syntax elements in the prediction weighting table syntax, thereby generating the prediction samples for the current block (S920). In one example, the predictor 330 of the decoding device can parse the weighted factor related flags based on the number information of the weighted prediction in the prediction weighting table syntax, and can derive the weights for the weighted prediction based on the weighted factor related. For example, when the value of the number information is n, the predictor 330 of the decoding device can parse n weighted factor related flags from the prediction weighting table syntax. The predictor 330 of the decoding device can perform the weighted prediction for the current block based on the weights, thereby deriving the prediction samples for the current block.
[0370] The residual processor 320 of the decoding device can generate the residual samples based on the residual information obtained from the bitstream (S930). The adder 340 of the decoding device can generate the reconstructed samples based on the prediction 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 the reconstructed picture (reconstructed block) based on the reconstructed samples.
[0371] Subsequently, if needed, in-loop filtering processes such as deblocking filtering, SAO, and / or ALF can be applied to the reconstructed picture to improve subjective / objective picture quality.
[0372] Although the method has been described in the above-described embodiments based on flowcharts in which steps or blocks are sequentially enumerated, the steps of the present document are not limited to a specific order, and a certain step can be performed in a different step or in a different order or simultaneously with respect to the above-described order. Also, it should be understood by one of ordinary skill in the art that the steps in the flowchart are not exclusive and another step can be included therein or one or more steps in the flowchart can be deleted without affecting the scope of the present document.
[0373] The above-mentioned method according to the present document can be in the form of software, and the encoding apparatus and / or the decoding apparatus according to the present document can be included in an apparatus for performing image processing (e.g., a TV, a computer, a smartphone, a set-top box, a display apparatus, etc.).
[0374] When the embodiments of the present document are implemented with software, the above-mentioned method can be implemented with modules (processes or functions) performing the above-mentioned functions. The modules can be stored in a memory and executed by a processor. The memory can be installed inside or outside the processor and can be connected to the processor via various well-known means. The processor can include an application-specific integrated circuit (ASIC), other chip sets, logic circuits, and / or data processing devices. The memory can 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 according to the present document can be implemented and executed on a processor, a microprocessor, a controller, or a chip. For example, the functional units illustrated in the respective drawings can be implemented and executed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information on the implementation (e.g., information on instructions) or algorithms of the embodiments can be stored in a digital storage medium.
[0375] In addition, the decoding apparatus and the encoding apparatus to which the embodiments of the present document are applied can be included in a multimedia broadcast transceiver, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video on demand (VoD) service provider, an over-the-top (OTT) video device, an Internet streaming service provider, a 3D video device, a virtual reality (VR) device, an augmented reality (AR) device, a picture phone video device, a vehicle terminal (for example, a vehicle (including an autonomous vehicle) terminal, an airplane terminal, or a ship terminal), and a medical video device; and can be used to process an image signal or data. For example, the OTT video device can include a game console, a Blueray player, a networked TV, a home theater system, a smartphone, a tablet PC, and a digital video recorder (DVR).
[0376] In addition, the processing method to which the embodiments of the present document are applied can be generated in the form of a program executed by a computer, and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiments of the present document can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices that store computer-readable data. The computer-readable recording medium can include, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable recording medium also includes a medium implemented in the form of a carrier wave (for example, a transmission over the Internet). In addition, a bitstream generated by an encoding method can be stored in a computer-readable recording medium or can be transmitted through a wired or wireless communication network.
[0377] In addition, the embodiments of the present document can be implemented as a computer program product based on program codes, and the program codes can be executed on a computer according to the embodiments of the present document. The program codes can be stored on a computer-readable carrier.
[0378] Figure 11 An example of a content streaming system to which embodiments of the present document can be applied is shown.
[0379] Reference Figure 11 The content streaming system to which the embodiments of the present document are applied can generally include an encoding server, a streaming server, a web server, a media store, a user device, and a multimedia input device.
[0380] The encoding server compresses content input from a multimedia input device such as a smart phone, a camera, a camcorder, etc. into digital data, generates a bitstream, and transmits it to the streaming server. In another example, in the case where a multimedia input device such as a smart phone, a camera, a camcorder, etc. directly generates a bitstream, the encoding server can be omitted.
[0381] A bitstream can be generated by an encoding method or a bitstream generation method to which embodiments of the present document can be applied. Also, the streaming server can temporarily store a bitstream in the process of transmitting or receiving the bitstream.
[0382] The streaming server transmits multimedia data to a user device through a web server that serves as a tool for informing a user of what services exist based on a request of the user. When the user requests a service that the user wants, the web server transfers the request to the streaming server, and the streaming server transmits multimedia data to the user. In this regard, the content streaming system can include a separate control server, and in this case, the control server serves to control commands / responses between the respective devices in the content streaming system.
[0383] The streaming server can receive content from a media storage and / or an encoding server. For example, in the case where content is received from the encoding server, the content can be received in real time. In this case, the streaming server can store a bitstream for a predetermined period of time to provide a streaming service smoothly.
[0384] For example, the user device can include a mobile phone, a smart phone, a laptop computer, a digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), a navigation, a slate PC, a tablet PC, an ultrabook, a wearable device (for example, a watch-type terminal (a smart watch), a glass-type terminal (a smart glass), a head-mounted display (HMD)), a digital TV, a desktop computer, a digital signage, etc.
[0385] Each server in the content streaming system can be operated as a distributed server, and in this case, data received by each server can be processed in a distributed manner.
Claims
1. An apparatus for decoding image information, the apparatus comprising: Memory; as well as At least one processor, the at least one processor being coupled to the memory, the at least one processor being configured to: 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; and 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 apparatus for encoding image information, the apparatus comprising: Memory; as well as At least one processor, the at least one processor being coupled to the memory, the at least one processor being configured to: 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. 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. An apparatus for transmitting data for an image, the apparatus comprising: At least one processor, the at least one processor being configured to obtain a bitstream for the image, The bitstream is generated by 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 A transmitter configured to transmit the data comprising 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. 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.