Image encoding / decoding method, bitstream transmission method, and recording medium storing bitstream
Patent Information
- Application Number
- JP2024549459
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-04-12
- Filing Date
- 2023-04-12
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2043-04-12
AI Technical Summary
【0017】 本開示によれば、符号化/復号化効率が向上した画像符号化/復号化方法及び装置が提供されることができる。
Smart Images

Figure 2025505837000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an image encoding / decoding method, a method for transmitting a bitstream, and a recording medium storing a bitstream, and more particularly, to a method for setting a template matching error value depending on whether reference picture resampling is applied. [Background technology]
[0002] Recently, the demand for high-resolution, high-quality images, for example, HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various fields. As the resolution and quality of image data increases, the amount of information or bits transmitted increases relatively compared to conventional image data. The increase in the amount of information or bits transmitted leads to an increase in transmission costs and storage costs.
[0003] This requires a highly efficient image compression technique for effectively transmitting, storing, and reproducing high-resolution, high-quality image information. Summary of the Invention [Problem to be solved by the invention]
[0004] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0005] Another object of the present disclosure is to provide a method for performing inter prediction using template matching.
[0006] Another object of the present disclosure is to provide a method for setting a template matching error value depending on whether reference picture resampling is applied.
[0007] In addition, the present disclosure aims to set the priority of a prediction candidate relatively low without calculating a template matching error value of the prediction candidate when the reference picture of the prediction candidate is a reference picture to which reference picture resampling has been applied.
[0008] Another object of the present disclosure is to provide a non-transitory computer-readable recording medium for storing a bitstream generated by the image encoding method according to the present disclosure.
[0009] Another object of the present disclosure is to provide a non-transitory computer-readable recording medium for storing a bitstream that is received by an image decoding device according to the present disclosure, decoded, and used to reconstruct an image.
[0010] Another object of the present disclosure is to provide a method for transmitting a bitstream generated by the image encoding method according to the present disclosure.
[0011] The technical problems to be solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described above will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the following description. [Means for solving the problem]
[0012] An image decoding method according to one aspect of the present disclosure may be an image decoding method performed by an image decoding device, comprising the steps of: constructing a prediction candidate list for a current block; deriving an error value for the current block based on whether a reference picture referred to by a prediction candidate in the prediction candidate list is a resampled reference picture; and rearranging the order of the prediction candidates in the prediction candidate list based on the error value, wherein the error value is induced to a predetermined value based on the reference picture being a resampled reference picture.
[0013] An image encoding method according to another aspect of the present disclosure may be an image encoding method performed by an image encoding device, comprising the steps of: constructing a prediction candidate list for a current block; deriving an error value for the current block based on whether a reference picture referred to by a prediction candidate in the prediction candidate list is a resampled reference picture; and rearranging the order of the prediction candidates in the prediction candidate list based on the error value, wherein the error value is induced to a predetermined value based on the reference picture being a resampled reference picture.
[0014] A computer-readable recording medium according to another aspect of the present disclosure can store a bitstream generated by the image encoding method or apparatus of the present disclosure.
[0015] A transmission method according to another aspect of the present disclosure can transmit a bitstream generated by the image coding method or apparatus of the present disclosure.
[0016] The features described above in the brief summary of the present disclosure are merely exemplary embodiments of the detailed description of the present disclosure that follows and are not intended to limit the scope of the present disclosure. Effect of the Invention
[0017] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.
[0018] Furthermore, according to the present disclosure, a method for performing inter prediction using template matching can be provided.
[0019] In addition, according to the present disclosure, a low ranking is assigned to a prediction candidate of a reference picture to which reference picture resampling is applied, so that errors occurring during the reference picture resampling process are not reflected in the prediction process of the current block, and prediction of the current block can be realized more accurately.
[0020] According to the present disclosure, a non-transitory computer-readable recording medium for storing a bitstream generated by the image encoding method according to the present disclosure can be provided.
[0021] According to the present disclosure, a non-transitory computer-readable recording medium can be provided that stores a bitstream that is received by an image decoding device according to the present disclosure, decoded, and used to restore an image.
[0022] Furthermore, according to the present disclosure, a method for transmitting a bitstream generated by an image coding method can be provided.
[0023] The effects obtained by the present disclosure are not limited to the effects described above, and other effects not described above will be clearly understood by those having ordinary skill in the art to which the present disclosure pertains from the following description. [Brief description of the drawings]
[0024] [Figure 1] FIG. 1 is a schematic diagram illustrating a video coding system to which an embodiment of the present disclosure can be applied. [Diagram 2] 1 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied; [Diagram 3] 1 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied; [Figure 4] FIG. 2 is a diagram illustrating an inter prediction unit of an image encoding device. [Diagram 5] 1 is a flowchart illustrating a method for encoding an image based on inter prediction. [Figure 6] FIG. 2 is a diagram illustrating an inter prediction unit of an image decoding device. [Figure 7] 1 is a flowchart illustrating a method for decoding an image based on inter prediction. [Figure 8] 1 is a flowchart illustrating an inter prediction method. [Figure 9]FIG. 13 is a diagram for explaining the MMVD mode. [Figure 10] FIG. 1 is a diagram for explaining an affine mode. [Figure 11] FIG. 1 is a diagram for explaining an affine mode. [Figure 12] FIG. 1 is a diagram for explaining an affine mode. [Figure 13] FIG. 13 is a diagram for explaining template matching and rearrangement based on the template matching. [Figure 14] FIG. 13 is a diagram for explaining template matching and rearrangement based on the template matching. [Figure 15] FIG. 13 is a diagram for explaining template matching and rearrangement based on the template matching. [Figure 16] 2 is a flowchart showing an image encoding / decoding method according to an embodiment of the present invention. [Figure 17] 13 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure. [Figure 18] 13 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure. [Figure 19] 13 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure. [Figure 20] 13 is a flowchart illustrating an image encoding / decoding method according to another embodiment of the present disclosure. [Figure 21] FIG. 1 is a diagram illustrating an example of a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0025] The present disclosure will be described in detail below with reference to the accompanying drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein.
[0026] In describing the embodiments of the present disclosure, if it is determined that a specific description of a known configuration or function may make the gist of the present disclosure unclear, the detailed description thereof will be omitted. In addition, in the drawings, parts that are not related to the description of the present disclosure are omitted, and similar parts are denoted by similar reference numerals.
[0027] In the present disclosure, when a certain component is "connected," "coupled," or "connected" to another component, this includes not only a direct connection relationship, but also an indirect connection relationship in which another component exists between them. Furthermore, when a certain component is described as "including" or "having" another component, this does not mean that the other component is excluded, but that the other component can be further included, unless otherwise specified.
[0028] In this disclosure, terms such as "first" and "second" are used only for the purpose of distinguishing one component from another component, and do not limit the order or importance of the components unless otherwise specified. Therefore, within the scope of this disclosure, a first component in one embodiment may be called a second component in another embodiment, and similarly, a second component in one embodiment may be called a first component in another embodiment.
[0029] In this disclosure, components that are distinguished from one another are used to clearly describe the characteristics of each component, and do not necessarily mean that the components are separate. In other words, multiple components may be integrated and configured as a single hardware or software unit, or one component may be distributed and configured as multiple hardware or software units. Thus, even if not otherwise stated, such integrated or distributed embodiments are also included in the scope of the present disclosure.
[0030] In the present disclosure, the components described in the various embodiments are not necessarily essential components, and some may be optional components. Therefore, an embodiment consisting of a subset of the components described in one embodiment is also included in the scope of the present disclosure. In addition, an embodiment including other components in addition to the components described in the various embodiments is also included in the scope of the present disclosure.
[0031] The present disclosure relates to image encoding and decoding, and terms used in this disclosure may have ordinary meanings in the technical field to which the present disclosure belongs, unless they are newly defined in this disclosure.
[0032] In this disclosure, a "picture" generally means a unit indicating any one image in a particular time period, a slice / tile is a coding unit constituting a part of a picture, and one picture may be composed of one or more slices / tiles. Also, a slice / tile may include one or more coding tree units (CTUs).
[0033] In this disclosure, a "pixel" or a "pel" may refer to the smallest unit that constitutes one picture (or image). A "sample" may also be used as a term corresponding to a pixel. A sample may generally indicate a pixel or a pixel value, may indicate only a pixel / pixel value of a luma component, or may indicate only a pixel / pixel value of a chroma component.
[0034] In this disclosure, a "unit" may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may be used interchangeably with terms such as "sample array," "block," or "area," depending on the case. In a general case, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0035] In the present disclosure, a "current block" may refer to any one of a "current coding block," a "current coding unit," a "block to be coded," a "block to be decoded," or a "block to be processed." If prediction is performed, a "current block" may refer to a "current predicted block" or a "block to be predicted." If transformation (inverse transformation) / quantization (inverse quantization) is performed, a "current block" may refer to a "current transformed block" or a "block to be transformed." If filtering is performed, a "current block" may refer to a "block to be filtered."
[0036] Additionally, in this disclosure, unless explicitly stated as a chroma block, a "current block" may refer to a block including both a luma component block and a chroma component block, or a "luma block of the current block." The luma component block of the current block may be explicitly expressed as including an explicit description of the luma component block, such as a "luma block" or a "current luma block." Additionally, the chroma component block of the current block may be explicitly expressed as including an explicit description of the chroma component block, such as a "chroma block" or a "current chroma block."
[0037] In the present disclosure, " / " and "," can be interpreted as "and / or." For example, "A / B" and "A, B" can be interpreted as "A and / or B." Also, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."
[0038] In this disclosure, "or" can be interpreted as "and / or." For example, "A or B" can mean 1) only "A," 2) only "B," or 3) "A and B." Alternatively, in this disclosure, "or" can mean "additionally or alternatively."
[0039] Video Coding System Overview
[0040] FIG. 1 is a schematic diagram of a video coding system to which embodiments of the present disclosure can be applied.
[0041] A video coding system according to an embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may transmit encoded video and / or image information or data to the decoding device 20 in a file or streaming format via a digital storage medium or a network.
[0042] The encoding device 10 according to an embodiment may include a video source generating unit 11, an encoding unit 12, and a transmitting unit 13. The decoding device 20 according to an embodiment may include a receiving unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 may be referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as a video / image decoding unit. The transmitting unit 13 may be included in the encoding unit 12. The receiving unit 21 may be included in the decoding unit 22. The rendering unit 23 may include a display unit, which may be configured as a separate device or an external component.
[0043] The video source generating unit 11 can obtain videos / images through a process of capturing, synthesizing, or generating videos / images. The video source generating unit 11 can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured videos / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate videos / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced by a process in which related data is generated.
[0044] The encoder 12 may encode the input video / image. The encoder 12 may perform a series of steps such as prediction, transformation, quantization, etc. for compression and encoding efficiency. The encoder 12 may output the encoded data (encoded video / image information) in a bitstream format.
[0045] The transmitting unit 13 may obtain the encoded video / image information or data output in a bitstream format and may transmit the same to the receiving unit 21 of the decoding device 20 or other external objects in a file or streaming format via a digital storage medium or a network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit 13 may include elements for generating a media file via a predetermined file format and may include elements for transmitting via a broadcasting / communication network. The transmitting unit 13 may be provided as a transmitting device separate from the encoding device 12, in which case the transmitting device may include at least one processor for obtaining the encoded video / image information or data output in a bitstream format and a transmitting unit for transmitting the same in a file or stream format. The receiving unit 21 may extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit 22.
[0046] The decoding unit 22 can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding unit 12.
[0047] The rendering unit 23 can render the decoded video / images. The rendered video / images can be displayed via a display unit.
[0048] Overview of the image encoding device
[0049] FIG. 2 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied.
[0050] As shown in Fig. 2, the image coding device 100 may include an image division unit 110, a subtraction unit 115, a transformation unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse transformation unit 150, an addition unit 155, a filtering unit 160, a memory 170, an inter prediction unit 180, an intra prediction unit 185, and an entropy coding unit 190. The inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a "prediction unit." The transformation unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transformation unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115.
[0051] All or at least some of the components constituting the image encoding device 100 may be realized by a single hardware component (e.g., an encoder or a processor) depending on the embodiment. Also, the memory 170 may include a decoded picture buffer (DPB) and may be realized by a digital storage medium.
[0052] The image division unit 110 may divide an input image (or picture, frame) input to the image encoding device 100 into one or more processing units. As an example, the processing units may be called coding units (CUs). The coding units may be obtained by recursively dividing a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / Binary-tree / Ternal-tree) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. For dividing the coding units, a quad-tree structure may be applied first, and a binary-tree structure and / or a ternary-tree structure may be applied later. A coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. The maximum coding unit may be used as the final coding unit, and a lower depth coding unit obtained by dividing the maximum coding unit may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or restoration, which will be described later. As another example, a processing unit of the coding procedure may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit, respectively. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0053] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on a block to be processed (current block) and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of a current block or a CU. The prediction unit may generate various information related to prediction of the current block and transmit it to the entropy encoding unit 190. The information related to prediction may be encoded by the entropy encoding unit 190 and output in a bitstream format.
[0054] The intra prediction unit 185 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block according to an intra prediction mode and / or an intra prediction technique. The intra prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode may include, for example, a DC mode and a Planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 185 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.
[0055] The inter prediction unit 180 may derive a predicted block for a current block based on a reference block (reference sample array) identified 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 may be predicted in units of a block, a sub-block, or a sample based on the correlation of motion information between a neighboring block and a current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different from each other. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 180 may generate information indicating which candidate is used to derive a motion vector and / or a reference picture index of the current block by forming a motion information candidate list based on neighboring blocks. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter prediction unit 180 may use motion information of neighboring blocks as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, the motion vector of the current block can be signaled by using the motion vector of a neighboring block as a motion vector predictor and encoding a motion vector difference and an indicator for the motion vector predictor. The motion vector difference can mean the difference between the motion vector of the current block and the motion vector predictor.
[0056] The prediction unit may generate a prediction signal based on various prediction methods and / or prediction techniques, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of the current block, and may simultaneously apply intra prediction and inter prediction. A prediction method that simultaneously applies intra prediction and inter prediction for prediction of the current block may be called combined inter and intra prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of the current block. Intra block copy can be used for content image / video coding such as games, for example, as in screen content coding (SCC). IBC is a method of predicting a current block using an already restored reference block in a current picture that is located a predetermined distance away from the current block. When IBC is applied, the position of the reference block in the current picture may be coded as a vector (block vector) corresponding to the predetermined distance. IBC is basically performed in the current picture, but may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure.
[0057] The prediction signal generated by the prediction unit may be used to generate a restored signal or a residual signal. The subtraction unit 115 may subtract the prediction signal (predicted block, prediction sample array) output from the prediction unit from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array). The generated residual signal may be transmitted to the conversion unit 120.
[0058] The transform unit 120 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. The CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size, or may be applied to non-square, variable-sized blocks.
[0059] The quantization unit 130 may quantize the transform coefficients and transmit the quantized transform coefficients to the entropy coding unit 190. The entropy coding unit 190 may code the quantized signal (information on the quantized transform coefficients) and output the coded signal in a bitstream format. The information on the quantized transform coefficients may be referred to as residual information. The quantization unit 130 may rearrange the quantized transform coefficients in a block format into a one-dimensional vector format based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector format.
[0060] The entropy coding unit 190 may perform various coding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy coding unit 190 may also code information required for video / image restoration (e.g., values of syntax elements, etc.) together or separately in addition to the quantized transform coefficients. The coded information (e.g., coded video / image information) may be transmitted or stored in a network abstraction layer (NAL) unit unit in a bitstream format. The video / image information may further include information on 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). The video / image information may further include general constraint information. The signaling information, transmitted information and / or syntax elements referred to in this disclosure may be encoded through the above-mentioned encoding procedures and included in the bitstream.
[0061] The bitstream may be transmitted via a network or may be stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 190 and / or a storing unit (not shown) for storing the signal may be provided as an internal / external element of the image encoding device 100, or the transmitting unit may be provided as a component of the entropy encoding unit 190.
[0062] The quantized transform coefficients output from the quantization unit 130 can be used to generate a residual signal. For example, the quantized transform coefficients are subjected to inverse quantization and inverse transformation via the inverse quantization unit 140 and the inverse transformation unit 150, so that a residual signal (residual block or residual sample) can be restored.
[0063] The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to a prediction signal output from the inter prediction unit 180 or the intra prediction unit 185. When there is no residual for the current block to be processed, such as when a skip mode is applied, a predicted block may be used as a reconstructed block. The adder 155 may be referred to as a reconstruction unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next current block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering as described below.
[0064] The filtering unit 160 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, and the like. The filtering unit 160 may generate various information related to filtering, as will be described later in the description of each filtering method, and transmit the information to the entropy coding unit 190. The information related to filtering may be coded by the entropy coding unit 190 and output in a bitstream format.
[0065] The modified reconstructed picture transmitted to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied through this, the image encoding device 100 may avoid a prediction mismatch between the image encoding device 100 and the image decoding device, and may also improve encoding efficiency.
[0066] The DPB in the memory 170 may store modified reconstructed pictures to be used as reference pictures in the inter prediction unit 180. The memory 170 may store motion information of blocks from which motion information in the current picture is derived (or coded) and / or motion information of already reconstructed intra-picture blocks. The stored motion information may be transmitted to the inter prediction unit 180 to be used as motion information of spatial surrounding blocks or motion information of temporal surrounding blocks. The memory 170 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 185.
[0067] Overview of the image decoding device
[0068] FIG. 3 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied.
[0069] 3, the image decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265. The inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a "prediction unit." The inverse quantization unit 220 and the inverse transform unit 230 may be included in a residual processing unit.
[0070] All or at least some of the components constituting the image decoding device 200 may be realized by one hardware component (e.g., a decoder or a processor) depending on the embodiment. Also, the memory 170 may include a DPB and may be realized by a digital storage medium.
[0071] The image decoding device 200, which receives a bitstream including video / image information, can reconstruct an image by executing a process corresponding to the process performed by the image encoding device 100 of Fig. 2. For example, the image decoding device 200 can perform decoding using a processing unit applied in the image encoding device. Thus, the processing unit for decoding can be, for example, a coding unit. The coding unit can be obtained by dividing a coding tree unit or a maximum coding unit. Then, the reconstructed image signal decoded and output by the image decoding device 200 can be reproduced by a reproduction device (not shown).
[0072] The image decoding apparatus 200 may receive a signal output from the image encoding apparatus of FIG. 2 in the form of a bitstream. The received signal may be decoded via the entropy decoding unit 210. For example, the entropy decoding unit 210 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on 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 may further include general constraint information. The image decoding apparatus may further use information on the parameter set and / or the general constraint information to decode an image. The signaling information, received information, and / or syntax elements referred to in the present disclosure may be obtained from the bitstream by being decoded via the decoding procedure. For example, the entropy decoding unit 210 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to the residual. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element from the bitstream, determine a context model using syntax element information to be decoded and decoded information of neighboring blocks and a block to be decoded, or information of a symbol / bin decoded in a previous step, predict the occurrence probability of the bin based on the determined context model, and perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model.Among the information decoded by the entropy decoding unit 210, information related to prediction is provided to a prediction unit (inter prediction unit 260 and intra prediction unit 265), and residual values entropy-decoded by the entropy decoding unit 210, i.e., quantized transform coefficients and related parameter information, may be input to the inverse quantization unit 220. Also, among the information decoded by the entropy decoding unit 210, information related to filtering may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) for receiving a signal output from the image encoding device may be further provided as an internal / external element of the image decoding device 200, or the receiving unit may be provided as a component of the entropy decoding unit 210.
[0073] Meanwhile, the image decoding device according to the present disclosure may be called a video / image / picture decoding device. The image decoding device may include an information decoder (video / image / picture information decoder) and / or a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoding unit 210, and the sample decoder may include at least one of an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265.
[0074] The inverse quantization unit 220 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 220 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on a coefficient scan order performed in the image encoding device. The inverse quantization unit 220 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0075] The inverse transform unit 230 can inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0076] The prediction unit may perform prediction on a current block and generate a predicted block including a prediction sample for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 210, and may determine a specific intra / inter prediction mode (prediction technique).
[0077] The prediction unit can generate a prediction signal based on various prediction methods (techniques) described below, as has been described in the explanation of the prediction unit of the image encoding device 100.
[0078] The intra prediction unit 265 may predict the current block by referring to samples in the current picture. The description of the intra prediction unit 185 may be similarly applied to the intra prediction unit 265.
[0079] The inter prediction unit 260 may derive a predicted block for the current block based on a reference block (reference sample array) identified 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 may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 260 may configure a motion information candidate list based on the neighboring blocks, and derive a motion vector and / or a reference picture index for the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes (techniques), and the prediction information may include information indicating a mode (technique) of inter prediction for the current block.
[0080] The adder 235 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 260 and / or the intra prediction unit 265). When there is no residual for the current block, such as when a skip mode is applied, the predicted block can be used as the reconstructed block. The description of the adder 155 may also be applied to the adder 235. The adder 235 may also be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture via filtering, as described below.
[0081] The filtering unit 240 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 250, specifically, in the DPB of the memory 250. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0082] The (modified) reconstructed picture stored in the DPB of the memory 250 may be used as a reference picture in the inter prediction unit 260. The memory 250 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial surrounding block or motion information of a temporal surrounding block. The memory 250 may store a reconstructed sample of a reconstructed block in the current picture and transmit it to the intra prediction unit 265.
[0083] In this specification, the embodiments described for the filtering unit 160, inter prediction unit 180 and intra prediction unit 185 of the image encoding device 100 can also be applied in a similar or corresponding manner to the filtering unit 240, inter prediction unit 260 and intra prediction unit 265 of the image decoding device 200, respectively.
[0084] Inter Prediction
[0085] The prediction unit of the image encoding device 100 and the image decoding device 200 may perform inter prediction on a block basis to derive a prediction sample. The inter prediction may be a prediction derived in a manner dependent on data elements (e.g., sample values or motion information, etc.) of pictures other than the current picture. When inter prediction is applied to the current block, a predicted block (prediction sample array) for the current block may be derived based on a reference block (reference sample array) identified by a motion vector on a reference picture indicated by a reference picture index. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information of the current block may be predicted on a block, sub-block, or sample basis based on correlation between motion information of neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter prediction is applied, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal peripheral block may be the same or different from each other. The temporal peripheral block may be called a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal peripheral block may be called a collocated picture (colPic). For example, a motion information candidate list may be constructed based on the peripheral blocks of the current block, and a flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled.Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the motion information of the current block may be the same as the motion information of the selected neighboring block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, a motion vector of a selected neighboring block may be used as a motion vector predictor, and a motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.
[0086] The motion information may include L0 motion information and / or L1 motion information depending on an inter prediction type (such as L0 prediction, L1 prediction, Bi prediction, etc.). A motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and a motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. A prediction based on an L0 motion vector may be referred to as an L0 prediction, a prediction based on an L1 motion vector may be referred to as an L1 prediction, and a prediction based on both the L0 motion vector and the L1 motion vector may be referred to as a bi-prediction (Bi) prediction. Here, the L0 motion vector may represent a motion vector associated with a reference picture list L0 (L0), and the L1 motion vector may represent a motion vector associated with a reference picture list L1 (L1). The reference picture list L0 may include a previous picture in output order from the current picture as a reference picture, and the reference picture list L1 may include a subsequent picture in output order from the current picture. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may further include a subsequent picture in output order from the current picture as a reference picture. In this case, the previous picture may be indexed first in the reference picture list L0, and the subsequent picture may be indexed next. The reference picture list L1 may further include a previous picture in output order from the current picture as a reference picture. In this case, the subsequent picture may be indexed first in the reference picture list 1, and the previous picture may be indexed next. Here, the output order may correspond to a picture order count (POC) order.
[0087] FIG. 4 is a diagram illustrating an inter prediction unit (180) of the image decoding device 100, and FIG. 5 is a flowchart showing a method for encoding an image based on inter prediction.
[0088] The image encoding device 100 may perform inter prediction on a current block (S510). The image encoding device 100 may derive an inter prediction mode and motion information of the current block, and generate a prediction sample of the current block. Here, the steps of determining the inter prediction mode, deriving the motion information, and generating the prediction sample may be performed simultaneously, or one of the steps may be performed prior to the other steps. For example, the inter prediction unit 180 of the image encoding device 100 may include a prediction mode determination unit 181, a motion information derivation unit 182, and a prediction sample derivation unit 183, and the prediction mode determination unit 181 may determine a prediction mode for the current block, the motion information derivation unit 182 may derive motion information of the current block, and the prediction sample derivation unit 183 may derive a prediction sample of the current block. For example, the inter prediction unit 180 of the image encoding device 100 may search for a block similar to the current block within a certain region (search region) of a reference picture through motion estimation, and derive a reference block whose difference from the current block is minimum or equal to or less than a certain criterion. Based on this, a reference picture index indicating a reference picture in which the reference block is located may be derived, and a motion vector may be derived based on a position difference between the reference block and the current block. The image encoding device 100 may determine a mode to be applied to the current block among various prediction modes. The image encoding device 100 may compare RD costs for the various prediction modes and determine an optimal prediction mode for the current block.
[0089] For example, when a skip mode or a merge mode is applied to the current block, the image encoding device 100 may construct a merge candidate list (to be described later) and derive a reference block whose difference from the current block is minimum or equal to or less than a certain criterion among reference blocks indicated by merge candidates included in the merge candidate list. In this case, a merge candidate related to the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and signaled to a decoding device. Motion information of the current block may be derived using motion information of the selected merge candidate.
[0090] As another example, when the (A)MVP mode is applied to the current block, the image encoding apparatus 100 may construct an (A)MVP candidate list (to be described later) and use a motion vector of a selected MVP candidate among the MVP (motion vector predictor) candidates included in the (A)MVP candidate list as the MVP of the current block. In this case, for example, a motion vector indicating a reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and an MVP candidate having a motion vector with the smallest difference from the motion vector of the current block among the MVP candidates may become the selected MVP candidate. A motion vector difference (MVD), which is a difference obtained by subtracting the MVP from the motion vector of the current block, may be derived. In this case, information on the MVD may be signaled to the image decoding apparatus 200. In addition, when the (A)MVP mode is applied, the value of the reference picture index may be configured as reference picture index information and separately signaled to the image decoding apparatus 200.
[0091] The image encoding device 100 may derive a residual sample based on the predicted sample (S520). The image encoding device 100 may derive the residual sample by comparing an original sample of the current block with the predicted sample.
[0092] The image encoding device 100 may encode image information including prediction information and residual information (S530). The image encoding device 100 may output the encoded image information in a bitstream format. The prediction information may include prediction mode information (e.g., skip flag, merge flag or mode index, etc.) and information on motion information as information related to the prediction procedure. The information on the motion information may include candidate selection information (e.g., merge index, mvp flag or mvp index) which is information for deriving a motion vector. In addition, the information on the motion information may include the above-mentioned information on MVD and / or reference picture index information. In addition, the information on the motion information may include information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. The residual information is information on the residual sample. The residual information may include information on a quantized transform coefficient for the residual sample.
[0093] The output bitstream may be stored in a (digital) storage medium and then transmitted to the image decoding device 200, or may be transmitted to the image decoding device 200 via a network.
[0094] Meanwhile, as described above, the image coding apparatus 100 may generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is because the same prediction result as that performed by the image decoding apparatus 200 is derived by the image coding apparatus 100, thereby improving coding efficiency. Therefore, the image coding apparatus 100 may store the reconstructed picture (or reconstructed sample, reconstructed block) in a memory and use it as a reference picture for inter prediction. As described above, an in-loop filtering procedure or the like may be further applied to the reconstructed picture.
[0095] FIG. 6 is a diagram illustrating the inter prediction unit 260 of the image decoding device 200, and FIG. 7 is a flowchart showing a method for decoding an image based on inter prediction.
[0096] The image decoding apparatus 200 may perform operations corresponding to those performed by the image encoding apparatus 100. The image decoding apparatus 200 may perform prediction on a current block based on received prediction information and derive a prediction sample.
[0097] Specifically, the image decoding apparatus 200 may determine a prediction mode for the current block based on the received prediction information (S710). The image decoding apparatus 200 may determine which inter prediction mode is applied to the current block based on prediction mode information in the prediction information.
[0098] For example, it may be determined whether the merge mode is applied to the current block or the (A)MVP mode is determined based on the merge flag. Alternatively, one of various inter prediction mode candidates may be selected based on the mode index. The inter prediction mode candidates may include skip mode, merge mode, and / or (A)MVP mode, or may include various inter prediction modes described below.
[0099] The image decoding apparatus 200 may derive motion information of the current block based on the determined inter prediction mode (S720). For example, when a skip mode or a merge mode is applied to the current block, the image decoding apparatus 200 may form a merge candidate list (to be described later) and select one merge candidate from among the merge candidates included in the merge candidate list. The selection may be performed based on the above-mentioned selection information (merge index). Motion information of the selected merge candidate may be used to derive motion information of the current block. The motion information of the selected merge candidate may be used as motion information of the current block.
[0100] As another example, when the (A)MVP mode is applied to the current block, the image decoding apparatus 200 may construct an (A)MVP candidate list described below, and may use a motion vector of a selected MVP candidate among the MVP (motion vector predictor) candidates included in the (A)MVP candidate list as the MVP of the current block. The selection may be performed based on the above-mentioned selection information (mvp flag or mvp index). In this case, the MVD of the current block may be derived based on information on the MVD, and the motion vector of the current block may be derived based on the MVP of the current block and the MVD. Also, the reference picture index of the current block may be derived based on the reference picture index information. A picture pointed to by the reference picture index in a reference picture list for the current block may be derived as a reference picture referenced for inter prediction of the current block.
[0101] Meanwhile, the motion information of the current block may be derived without constructing a candidate list, as described below, in which case the motion information of the current block may be derived according to a procedure disclosed in a prediction mode, as described below. In this case, the candidate list construction as described above may be omitted.
[0102] The image decoding apparatus 200 may generate a prediction sample for the current block based on the motion information of the current block (S730). In this case, the reference picture may be derived based on a reference picture index of the current block, and the prediction sample of the current block may be derived using a sample of a reference block to which the motion vector of the current block points on the reference picture. In this case, as described below, a prediction sample filtering procedure may be further performed on all or a part of the prediction sample of the current block, if necessary.
[0103] For example, the inter prediction unit 260 of the image decoding device 200 may include a prediction mode determination unit 261, a motion information derivation unit 262, and a prediction sample derivation unit 263, and may determine a prediction mode for the current block based on prediction mode information received by the prediction mode determination unit 181, derive motion information (such as a motion vector and / or a reference picture index) of the current block based on information regarding the motion information received by the motion information derivation unit 182, and derive a prediction sample of the current block by the prediction sample derivation unit 183.
[0104] The image decoding apparatus 200 may generate a residual sample for the current block based on the received residual information (S740). The image decoding apparatus 200 may generate a reconstructed sample for the current block based on the predicted sample and the residual sample, and may generate a reconstructed picture based on the reconstructed sample (S750). Thereafter, an in-loop filtering procedure may be further applied to the reconstructed picture, as described above.
[0105] 8, as described above, the inter prediction procedure may include an inter prediction mode determination step (S810), a motion information derivation step (S820) according to the determined prediction mode, and a prediction execution step (a prediction sample generation step) based on the derived motion information (S830). The inter prediction procedure may be performed in the image encoding device 100 and the image decoding device 200 as described above.
[0106] Inter prediction mode decision
[0107] Various inter prediction modes can be used to predict a current block in a picture. For example, various modes such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, and merge with MVD (MVVD) mode can be used. Decoder side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, Bi-prediction with CU-level weight (BCW), Bi-directional optical flow (BDOF), etc. can be used in addition to or instead of the affine mode. The affine mode may also be referred to as affine motion prediction mode. The MVP mode may also be referred to as advanced motion vector prediction mode (AMVP). In this document, motion information candidates derived by some modes and / or some modes may be included as one of the motion information related candidates of other modes. For example, an HMVP candidate may be added as a merge candidate of the merge / skip mode, or may be added as an MVP candidate of the MVP mode.
[0108] Prediction mode information indicating an inter prediction mode of a current block may be signaled from the image encoding apparatus 100 to the image decoding apparatus 200. The prediction mode information may be included in a bitstream and received by the image decoding apparatus 200. The prediction mode information may include index information indicating one of a number of candidate modes. Alternatively, the inter prediction mode may be indicated through hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, a skip flag may be signaled to indicate whether or not a skip mode is applied, and if the skip mode is not applied, a merge flag may be signaled to indicate whether or not a merge mode is applied, and if the merge mode is not applied, an MVP mode may be indicated to be applied, or a flag for additional division may be further signaled. The affine mode may be signaled in an independent mode or in a mode dependent on the merge mode or MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.
[0109] Deriving motion information
[0110] Inter prediction may be performed using motion information of the current block. The image encoding device 100 may derive optimal motion information for the current block through a motion estimation procedure. For example, the image encoding device 100 may search for a similar reference block having high correlation with an original block in an original picture for the current block in a fractional pixel unit within a predetermined search range in the reference picture, thereby deriving motion information. The similarity of the block may be derived based on a difference in phase-based sample values. For example, the similarity of the block may be calculated based on the 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 may be derived based on the reference block having the smallest SAD in the search range. The derived motion information may be signaled to the image decoding device 200 according to various methods based on the inter prediction mode.
[0111] Generating prediction samples
[0112] A predicted block for the current block may be derived based on the motion information derived according to the prediction mode. The predicted block may include a prediction sample (prediction sample array) of the current block. If the motion vector of the current block points to a fractional sample unit, an interpolation procedure may be performed, whereby a prediction sample of the current block may be derived based on a reference sample of a fractional sample unit in a reference picture. If affine inter prediction is applied to the current block, a prediction sample may be generated based on a sample / sub-block unit MV. If bi-prediction is applied, a prediction sample derived through a weighted sum or weighted average (by phase) of a prediction sample derived based on L0 prediction (i.e., prediction using a reference picture in a reference picture list L0 and MVL0) and a prediction sample derived based on L1 prediction (i.e., prediction using a reference picture in a reference picture list L1 and MVL1) may be used as a prediction sample of the current block. When bi-prediction is applied, if the reference picture used for L0 prediction and the reference picture used for L1 prediction are located in different temporal directions from the current picture (i.e., bi-prediction but also bidirectional prediction), this can be called true bi-prediction.
[0113] As described above, reconstructed samples and reconstructed pictures can be generated based on the derived predicted samples, and then procedures such as in-loop filtering can be performed.
[0114] MMVD(merge mode with motion vector difference)
[0115] In addition to the merge mode, in which implicitly derived motion information is immediately used to generate a prediction sample of the current block, the MMVD mode has been proposed. Since a similar motion information deriving method is used for the skip mode and the merge mode, the MMVD mode can also be applied to the skip mode. An mmvd flag (e.g., mmvd_flag) indicating whether the MMVD mode is applied to the current block can be signaled immediately after the skip flag and the merge flag are transmitted.
[0116] In the MMVD mode, after a merge candidate is selected, the selected merge candidate can be improved by the signaled MVDs information. If the MMVD mode is applied to the current block (i.e., the value of mmvd_flag is 1), additional information for the MMVD mode can be signaled. The additional information can include a merge candidate flag (e.g., mmvd_merge_flag) indicating whether the first (0) or second (1) merge candidate in the merge candidate list is used with the MVD, an index indicating the magnitude of the motion (e.g., mmvd_distance_idx), and an index indicating the direction of the motion (e.g., mmvd_direction_idx). In the MMVD mode, any of the first two candidates in the merge candidate list can be selected to be used as the MV basis. The merge candidate flag can be signaled to indicate which of the first two candidates is used.
[0117] The distance index (e.g., mmvd_distance_idx) indicates the magnitude of motion information and may indicate a predetermined offset from a starting point. As shown in FIG. 9, the offset may be added to the horizontal or vertical component of the starting MV (starting point). The relationship between the distance index and the predetermined offset may be shown in Table 1.
[0118] [Table 1]
[0119] In Table 1, a value of 1 for slice_fpel_mmvd_enabled_flag may indicate that the MMVD mode uses integer sample accuracy in the current slice. A value of 0 for slice_fpel_mmvd_enabled_flag may indicate that the MMVD mode uses fractional sample accuracy in the current slice. If slice_fpel_mmvd_enabled_flag is not present, the value of slice_fpel_mmvd_enabled_flag may be inferred to be 0. The slice_fpel_mmvd_enabled_flag syntax element may be signaled via (or included in) the slice header.
[0120] The direction index (e.g., mmvd_direction_idx) can indicate the MVD direction based on the starting point. The direction index can indicate four directions, as shown in Table 2.
[0121] [Table 2]
[0122] In Table 2, the meaning of the MVD code (MmvdSign) is variable according to the information of the start MVs. If the start MVs is a uni-prediction MV, or if the two prediction lists are bi-prediction MVs pointing to the same direction of the current picture (i.e., the POC of the reference picture is larger than the POC of the current picture, or the POC of the reference picture is smaller than the POC of the current picture), the MVD code in Table 2 may indicate the sign of the MV offset added to the start MV. If the two prediction lists are bi-prediction MVs pointing to different directions of the current picture (i.e., the POC of one reference picture is larger than the POC of the current picture, and the POC of the other reference picture is smaller than the POC of the current picture), the MVD code in Table 2 may indicate the sign of the MV offset added to the list 0 MV component of the start MV, and the MVD for the list 1 MV may have a value with the opposite sign.
[0123] The two components of Mmvdoffset[x0][y0] can be derived as shown in Equation 1.
[0124] [Formula 1]
number
[0125] Affine prediction
[0126] Existing video coding systems use only one MV (motion vector) to represent the motion of a coding block (using translation MV). However, although the above method can represent optimal motion in block units, this is not the optimal motion of each actual pixel, so if an optimal MV can be determined in pixel units, coding efficiency can be improved. To this end, in this embodiment, an affine motion prediction method that uses an affine motion model for coding will be described. The fine motion prediction method can represent MVs in each pixel unit of a block using two, three, or four MVs.
[0127] The affine motion model can express four motions as shown in Fig. 10. Among the motions that the affine motion model can express, an affine motion model that expresses three motions (translation, scale, and rotate) is called a similarity (or simplified) affine motion model, and in this application, the proposed method will be described based on the similarity (or simplified) affine motion model. However, the proposed method is not limited to this affine motion model.
[0128] As shown in Figure 11, affine motion prediction can determine the MV of a pixel position included in a block using two or more control point motion vectors (CPMVs). At this time, a set of MVs is called an affine motion vector field (MVF), and the MVF can be determined by the following Equation 2 and Equation 3.
[0129] For the 4-parameter affine motion model, the MV of a sample position (x, y) within a block can be derived by Equation 3.
[0130] [Formula 2]
number
[0131] For the 6-parameter affine motion model, the MV of a sample position (x, y) within a block can be derived by Equation 3.
[0132] [Formula 3]
number
[0133] In FIG. 11, Equation 2 and Equation 3, JPEG2025505837000007.jpg5136 is the CPMV of the CP at the top-left corner position of the coding block, JPEG2025505837000008.jpg5136 is the CPMV of the CP at the top-right corner position, JPEG2025505837000009.jpg5136 may be a CPMV of a CP at the bottom-left corner position, where W corresponds to the width of the current block, H corresponds to the height of the current block, JPEG2025505837000010.jpg5136 may correspond to the MV at position {x, y}.
[0134] In the encoding / decoding process, the affine MVF can be determined in pixel units or in predefined subblock units. When determined in pixel units, an MV is obtained based on each pixel value, and when determined in subblock units, an MV of the block can be obtained based on the pixel value at the center of the subblock (lower right side of the center, i.e., the lower right sample of the central four samples). In the present application, as shown in FIG. 12, it is assumed that the affine MVF is determined in 4×4 subblock units. However, this is merely for convenience of explanation, and the size of the subblock for which the affine MVF is determined can be variously modified.
[0135] When affine prediction is available, the motion models applicable to the current block may include three: a translational motion model, a 4-parameter affine motion model, and a 6-parameter affine motion model, where the translational motion model may indicate a model in which an existing block-based motion vector is used, the 4-parameter affine motion model may indicate a model in which two CPMVs are used, and the 6-parameter affine motion model may indicate a model in which three CPMVs are used.
[0136] The affine motion prediction may include an affine MVP (or affine inter) mode and an affine merge mode. In the affine motion prediction, the MVs of the current block may be derived on a sub-block basis or a sample basis.
[0137] Template matching(TM)
[0138] Template matching (TM) is a method of deriving a motion vector performed at the decoder end, which can refine motion information of a current block (e.g., current coding unit, current CU) by finding a template (hereinafter, referred to as a "reference template") in a reference picture that is most similar to a template (hereinafter, referred to as a "current template") adjacent to the current block. The current template may be a top neighboring block and / or a left neighboring block of the current block, or a part of these neighboring blocks. In addition, the reference template can be determined to be the same size as the current template.
[0139] As shown in Fig. 13, if an initial motion vector of a current block is derived, a search for a better motion vector can be performed in a surrounding area of the initial motion vector. For example, the range of the surrounding area in which the search is performed may be within a [-8, +8]-pel search area centered on the initial motion vector. Also, the size of a search step for performing the search can be determined based on the AMVR mode of the current block. Also, template matching may be performed consecutively with a bilateral matching process in a merge mode.
[0140] Adaptive reordering of merge candidates with template matching (ARMC-TM)
[0141] Merge candidates can be adaptively reordered by template matching. The reordering method can be applied to general merge mode, template matching (TM) merge mode, and affine merge mode (except for SbTMVP candidates). In the case of TM merge mode, the reordering of merge candidates can be performed before the motion vector refinement process described above.
[0142] After the merge candidate list is constructed, the merge candidates may be divided into one or more subgroups. The size of the subgroups for the general merge mode and the TM merge mode may be 5, and the size of the subgroups for the affine merge mode may be 3. The merge candidates in each subgroup may be reordered in ascending order by cost values based on template matching. For simplicity, the merge candidates in the last subgroup but not the first subgroup may not be reordered.
[0143] The template matching cost of a merging candidate can be measured by the sum of absolute differences (SAD) between the template samples of the current block and the corresponding reference samples. In this case, the template can include a set of reconstructed samples adjacent to the current block. The template reference samples can be located according to the motion information of the merging candidate.
[0144] FIG. 14 is a diagram illustrating an example of a template of a current block and a reference sample of a template in a reference picture. When a merge candidate uses bidirectional prediction, a reference sample of the template of the merge candidate may be generated as shown in FIG. 14. Specifically, after a reference block in a list0 reference picture is identified based on a list0 (L0) motion vector of a merge candidate of a current block, a reference template (reference template 0, RT0) in the list0 reference picture may be identified. Similarly, after a reference block in a list1 reference picture is identified based on a list1 (L1) motion vector of a merge candidate of a current block, a reference template (reference template 1, RT1) in the list1 reference picture may be identified.
[0145] In the case of a subblock-based merging candidate with a subblock size of Wsub×Hsub, the top template may include one or more subtemplates of size Wsub×1, and the left template may include one or more subtemplates of size 1×Hsub.
[0146] FIG. 15 is a diagram for explaining a method of specifying a template using motion information of sub-blocks.
[0147] In the example shown in FIG. 15, a reference sample of each sub-template may be derived using motion information of sub-blocks included in the first column and the first row of the current block. More specifically, a reference sub-block (A_ref, B_ref, C_ref, D_ref, E_ref, F_ref, G_ref) corresponding to a reference picture may be identified using motion vectors of sub-blocks (A, B, C, D, E, F, G) included in the first column and the first row of the current block in the current picture. For example, a position of a corresponding reference sub-block may be identified from a collocated block in the reference picture based on the motion vector of each sub-block. Then, a reference template may be configured from a restoration area adjacent to each reference sub-block. As shown in FIG. 15, when the size of a sub-block is Wsev×Hsub, the top reference template may include one or more sub-reference templates of a size of Wsub×1, and the left reference template may include one or more sub-reference templates of a size of 1×Hsub.
[0148] TMVP / NAMVP candidate reordering
[0149] Merge candidates of one single type (e.g., TVMP or NAMVP) can be reordered based on the ARMC TM cost value. Here, TMVP (temporal motion vector prediction) is a temporal prediction candidate for the current block, and NAMVP (non-adjacent) can be a prediction candidate that is not adjacent to the current block. The reordered candidates can be added to the merge candidate list. The TMVP candidate type can add more TMVP candidates with inter prediction directions different from more temporal positions for reordering and selection. In addition, the NAMVP candidate type can be extended to more spatially non-adjacent positions.
[0150] MMVD / Affine MMVD candidate reordering
[0151] The number of directions can be increased from 4 to 16 by adding an additional refinement position along the kXπ / 8 diagonal angle. Also, the distance position for each direction can be reduced from 8 to 6. Based on the SAD cost between the template (one above the current block and the other to the left of the current block) and the reference template for each refinement position, all 96 (16*6) MMVD refinement positions (i.e., MMVD prediction candidates) can be rearranged for each base candidate. The top 1 / 8 MMVD prediction candidates with the smallest template SAD cost can be kept as available candidates for MMVD index coding. The MMVD index can be binarized with a Rice code with a parameter of 2.
[0152] An extended affine MMVD realignment is added in which additional refinement positions are added along the kXπ / 8 diagonal angle. After the affine MMVD prediction candidates are realigned, the top 1 / 2 affine MMVD prediction candidates with the smallest template SAD cost can be kept.
[0153] Reference Picture Resampling (RPR)
[0154] Image compression technology may support Adaptive Resolution Change (Arc) of Coded Layer Video Sequence (CLVS). If ARC is allowed, a reference picture having a different resolution from the current picture may be resampled. The reference picture may be a picture included in the same layer as the current layer in which the current picture is included. Resampling may be called Reference Picture Resampling (RPR). For example, reference picture resampling may include a process of scaling and interpolating a reference picture.
[0155] If ARC is allowed, inter prediction can be performed based on a reference picture having a different resolution. The reference picture may have a different width and / or height of luma samples than the current picture. For inter prediction, the reference picture may be resampled. A prediction sample of a current block in a current picture can be derived based on a motion vector of the current block and the resampled reference picture.
[0156] [Example]
[0157] In the present disclosure, template matching may be a process of searching for a reference template that has the highest similarity to a current template. According to the present disclosure, a template matching cost (TM cost) may be calculated to measure the similarity, and a cost function such as SAD may be used for this purpose. A high template matching cost may mean a high template matching error, and thus a low similarity between templates. Conversely, a low template matching cost may mean a low template matching error, and thus a high similarity between templates.
[0158] In the present disclosure, a cost function for calculating a template matching cost may be a function that utilizes the difference between a sample value in a current template and a corresponding sample value in a reference template. Thus, the cost function may be referred to as a "difference (error)-based function" or a "difference (error)-based equation" between corresponding samples in two templates. Also, the template matching cost calculated by the cost function may be referred to as a "difference (error)-based function value" or a "difference (error)-based value" between corresponding samples in two templates.
[0159] In this disclosure, "cost" may be referred to as "error", "error", etc. That is, in this disclosure, "cost", "error", and "error" may have the same meaning. Thus, a "cost function" may also be referred to as an "error function", "error function", etc. The cost may be derived based on the difference between the current template and the reference template, and therefore may correspond to an error value for the current block.
[0160] This application proposes a method for adaptively deriving an error value for a current block based on whether reference picture resampling (RPR) is applied to a reference picture. That is, this application proposes a method for adaptively deriving a TM cost based on whether RPR is applied to a reference picture. Hereinafter, a reference picture to which RPR is applied is referred to as an "RPR reference picture", and a reference picture to which RPR is not applied is referred to as a "non-RPR reference picture".
[0161] FIG. 16 is a flowchart showing an image encoding / decoding method according to an embodiment of the present invention.
[0162] Referring to FIG. 16, the image encoding device 100 and the image decoding device 200 may generate a prediction candidate list for a current block (S1610).
[0163] The prediction candidate may be any of a merge candidate, a temporal motion vector prediction (TMVP) candidate, a non-adjacent (NAMVP) candidate that is a prediction candidate that is not adjacent to the current block, an MMVD candidate, and an affine MMVD candidate. The prediction candidate list may be any of a merge candidate list including a merge candidate, a TMVP candidate list including a TMVP candidate, a non-adjacent candidate list including a NAMVP candidate, an MMVD candidate list including an MMVD correct answer candidate, and an affine MMVD candidate list including an affine MMVD candidate.
[0164] The image encoding apparatus 100 and the image decoding apparatus 200 may derive an error value for the current block (S1620). The error value may be a TM cost. The error value may be induced based on whether a reference picture referred to by a prediction candidate is an RPR reference picture. For example, if the reference picture is an RPR reference picture, the error value may be induced to a predetermined value, and if the reference picture is a non-RPR reference picture, the error value may be induced based on a difference between the current template and the reference template. That is, if the reference picture is an RPR reference picture, the process of calculating an error value based on a difference between the current template and the reference template is bypassed, and the error value may be induced to a predetermined value. Here, the predetermined value may be a maximum value predetermined for the error value.
[0165] The image encoding device 100 and the image decoding device 200 may rearrange the order of the prediction candidates based on the error value (S1630).
[0166] The rearrangement order of the prediction candidates may be in ascending order according to the error value of each prediction candidate. In this case, if the error value for the RPR reference picture is induced to a predetermined maximum value, the prediction candidate has a lower priority than other prediction candidates (prediction candidates for non-RPR reference pictures). Therefore, the prediction candidate for the RPR reference picture may not be used for prediction of the current block.
[0167] In order to calculate the error value, a reference picture may be scaled to the same size as the current picture and then interpolated, but the RPR reference picture may have a relatively large error in this process compared to a non-RPR reference picture. Therefore, if the priority of a prediction candidate for an RPR reference picture is lowered to prevent the prediction candidate from being used as in the present application, the scaling and interpolation processes are not performed, and as a result, it is possible to prevent large errors from occurring in the scaling and interpolation processes, and thus to more accurately realize prediction of the current block.
[0168] Example 1
[0169] In the conventional merge candidate rearrangement method, when a reference picture is an RPR reference picture, the TM cost (error value) of the merge candidate is set to 0, and the process of calculating the TM cost is bypassed, thereby configuring the priority of the merge candidate to be higher than that of a merge candidate that references a non-RPR reference picture.
[0170] However, according to the conventional merging candidate rearrangement method, in the process of scaling the RPR reference picture to the same size as the current picture and additionally interpolating it to calculate the TM cost, the merging candidates of the RPR reference picture may have a higher error than the merging candidates of the non-RPR reference picture. Therefore, in order to solve the above problem, the present application proposes a method in which the merging candidates of the RPR reference picture are arranged in the lowest order in the candidate list through a first embodiment.
[0171] FIG. 17 is a flowchart showing the image encoding / decoding method according to the first embodiment.
[0172] Referring to FIG. 17, the image encoding device 100 and the image decoding device 200 derive a merge candidate list (S1702), set the value of an index idx indicating one of the merge candidates in the merge candidate list to 0 (S1704), and then determine whether the merge candidate indicated by the index is the last merge candidate in the merge candidate list (i.e., the number of merge candidates, numValidMergeCand) (S1706).
[0173] If the merging candidate indicated by the index is not the last merging candidate, the image encoding device 100 and the image decoding device 200 can determine the prediction direction (interDir) of the merging candidate indicated by the index (S1708), and determine the values of the start reference list (startRefList) and the end reference list (endRefList) according to the determined direction (S1710 to S1714).
[0174] The image encoding device 100 and the image decoding device 200 can set the value of the variable refPicList to be the same as the value of the start reference list, and can set the value of a variable (bRPR) indicating whether or not the picture is an RPR reference picture to 0 (S1716). Furthermore, the image encoding device 100 and the image decoding device 200 can determine whether or not a reference picture corresponding to refPicidx in refPicList is an RPR reference picture (S1728), increment the value of the reference list by 1 (S1730), and set the next reference list as the determination target. The image encoding device 100 and the image decoding device 200 can determine whether or not each reference picture in each reference list is an RPR reference picture by performing steps S1728 and S1730 for all reference lists (S1718).
[0175] When the reference picture is an RPR reference picture (S1720), the image encoding device 100 and the image decoding device 200 can set the value of the TM cost of the merging candidate to a predetermined maximum value (S1724), and when the reference picture is a non-RPR reference picture (S1720), the image encoding device 100 and the image decoding device 200 can calculate and derive the TM cost of the merging candidate (S1722).
[0176] The image encoding apparatus 100 and the image decoding apparatus 200 can repeatedly perform steps S1706 through S1724 on all merging candidates in the merging candidate list by performing steps S1706 through S1724 on the next merging candidate (idx++, S1726).
[0177] When steps S1706 to S1724 have been performed for all merge candidates in the merge candidate list (S1706), the image encoding device 100 and the image decoding device 200 may rearrange the merge candidates in the merge candidate list based on an error value of the merge candidates (S1732). In this process, a merge candidate having an error value of a predetermined maximum value (a merge candidate that references an RPR reference picture) may be rearranged with a lower priority. The image encoding device 100 may determine a merge candidate to be used for predicting a current block from among the rearranged merge candidates, and may code an index (merge index) indicating the determined merge candidate into a bitstream and signal the same. The image decoding device 200 may derive motion information based on the signaled merge index (S1734).
[0178] Example 2
[0179] The conventional TMVP candidate rearrangement method calculates the TM cost of all TMVP candidates without considering whether the reference picture is an RPR reference picture or not.
[0180] However, according to this conventional TMVP candidate rearrangement method, in the process of scaling the RPR reference picture to the same size as the current picture and performing additional interpolation to calculate the TM cost, a higher error may occur in the TMVP candidates of the RPR reference picture compared to the TMVP candidates of the non-RPR reference picture. Therefore, in order to solve the above problem, the present application proposes, through embodiment 2, a method in which the TMVP candidates of the RPR reference picture are configured in the candidate list with the lowest ranking.
[0181] FIG. 18 is a flowchart showing an image encoding / decoding method according to the second embodiment.
[0182] Referring to FIG. 18, image encoding device 100 and image decoding device 200 derive a TMVP candidate list (S1802), set the value of an index (idx) indicating one of the TMVP candidates in the TMVP candidate list to 0 (S1804), and then determine whether the TMVP candidate indicated by the index is the last TMVP candidate in the TMVP candidate list (i.e., the number of TMVP candidates, numValidMergeCand) (S1806).
[0183] If the TMVP candidate indicated by the index is not the last TMVP candidate, the image encoding device 100 and the image decoding device 200 can determine the prediction direction (interDir) of the TMVP candidate indicated by the index (S1808), and determine the values of the start reference list (startRefList) and the end reference list (endRefList) according to the determined direction (S1810 to S1814).
[0184] The image encoding device 100 and the image decoding device 200 can set the value of the variable refPicList to be the same as the value of the start reference list, and can set the value of a variable (bRPR) indicating whether or not a reference picture is an RPR reference picture to 0 (S1816). Furthermore, the image encoding device 100 and the image decoding device 200 can determine whether or not a reference picture corresponding to refPicidx in refPicList is an RPR reference picture (S1828), increment the value of the reference list by 1 (S1830), and set the next reference list as the determination target. The image encoding device 100 and the image decoding device 200 can determine whether or not each reference picture in each reference list is an RPR reference picture by performing steps S1828 and S1830 for all reference lists (S1818).
[0185] When the reference picture is an RPR reference picture (S1820), the image encoding device 100 and the image decoding device 200 can set the TM cost value of the TMVP candidate to a predetermined maximum value (S1824), and when the reference picture is a non-RPR reference picture (S1820), they can calculate and derive the TM cost of the TMVP candidate (S1822).
[0186] The image encoding device 100 and the image decoding device 200 can repeatedly perform steps S1806 through S1824 on all TMVP candidates in the TMVP candidate list by performing steps S1806 through S1824 on the next TMVP candidate (idx++, S1826).
[0187] When steps S1806 through S1824 have all been performed for all TMVP candidates in the TMVP candidate list (S1806), image encoding device 100 and image decoding device 200 may rearrange the TMVP candidates based on the error value of each TMVP candidate in the TMVP candidate list (S1832). In this process, a TMVP candidate having an error value with a predetermined maximum value (a TMVP candidate that references an RPR reference picture) may be rearranged with a lower priority. Image encoding device 100 and image decoding device 200 may determine the first TMVP candidate among the rearranged TMVP candidates as the TMVP information of the current block (S1834).
[0188] Example 3
[0189] The conventional NAMVP candidate rearrangement method calculates the TM cost of all NAMVP candidates without considering whether the reference picture is an RPR reference picture or not.
[0190] However, according to the conventional NAMVP candidate rearrangement method, in the process of scaling the RPR reference picture to the same size as the current picture and additionally interpolating it to calculate the TM cost, the NAMVP candidate of the RPR reference picture may have a higher error than the NAMVP candidate of the non-RPR reference picture. Therefore, in order to solve the above problem, the present application proposes a method in which the NAMVP candidate of the RPR reference picture is configured in the lowest order in the candidate list through a third embodiment.
[0191] FIG. 19 is a flowchart showing an image encoding / decoding method according to the third embodiment.
[0192] Referring to FIG. 19, image encoding device 100 and image decoding device 200 derive a NAMVP candidate list (S1902), set the value of an index (idx) indicating one of the NAMVP candidates in the NAMVP candidate list to 0 (S1904), and then determine whether the NAMVP candidate indicated by the index is the last NAMVP candidate in the NAMVP candidate list (i.e., the number of NAMVP candidates, numValidMergeCand) (S1906).
[0193] If the NAMVP candidate indicated by the index is not the last NAMVP candidate, the image encoding device 100 and the image decoding device 200 can determine the prediction direction (interDir) of the NAMVP candidate indicated by the index (S1908), and determine the values of the start reference list (startRefList) and the end reference list (endRefList) according to the determined direction (S1910 to S1914).
[0194] The image encoding device 100 and the image decoding device 200 can set the value of the variable refPicList to be the same as the value of the start reference list, and can set the value of a variable (bRPR) indicating whether or not the picture is an RPR reference picture to 0 (S1916). Furthermore, the image encoding device 100 and the image decoding device 200 can determine whether or not a reference picture corresponding to refPicidx in refPicList is an RPR reference picture (S1928), increment the value of the reference list by 1 (S1930), and set the next reference list as the determination target. The image encoding device 100 and the image decoding device 200 can determine whether or not each reference picture in each reference list is an RPR reference picture by performing steps S1928 and S1930 for all reference lists (S1918).
[0195] When the reference picture is an RPR reference picture (S1920), the image encoding device 100 and the image decoding device 200 can set the TM cost value of the NAMVP candidate to a predetermined maximum value (S1924), and when the reference picture is a non-RPR reference picture (S1920), they can calculate and derive the TM cost of the NAMVP candidate (S1922).
[0196] The image encoding device 100 and the image decoding device 200 can repeatedly perform steps S1906 through S1924 on all NAMVP candidates in the NAMVP candidate list by performing steps S1906 through S1924 on the next NAMVP candidate (idx++, S1926).
[0197] When steps S1906 to S1924 have all been performed for all NAMVP candidates in the NAMVP candidate list (S1906), the image encoding device 100 and the image decoding device 200 may rearrange the NAMVP candidates in the NAMVP candidate list based on the error value of each NAMVP candidate (S1932). In this process, a NAMVP candidate having a predetermined maximum value as an error value (NAMVP candidate that references an RPR reference picture) may be rearranged with a lower priority. The image encoding device 100 and the image decoding device 200 may set the NAMVP list based on a predetermined number (N) of candidates having the optimal TM cost (S1934).
[0198] Example 4
[0199] The conventional MMVD candidate rearrangement method and the affine MMVD candidate rearrangement method calculate TM cost for all prediction candidates without considering whether the reference picture of a base candidate is an RPR reference picture. Here, the prediction candidate can be derived from the motion information of the base candidate through the MMVD and the affine MMVD. In addition, the conventional MMVD candidate rearrangement method and the affine MMVD candidate rearrangement method signal 12.5% of MMVD candidates and 50% of affine MMVD candidates in ascending order of calculated TM cost.
[0200] However, according to the conventional MMVD candidate rearrangement method and affine MMVD candidate rearrangement method, in the process of scaling the RPR reference picture to the same size as the current picture and additionally interpolating it to calculate the TM cost, the error of the RPR reference picture may be larger than that of a non-RPR reference picture. Therefore, in order to solve the above problem, the present application proposes a method in which, when the reference picture of a base candidate is an RPR reference picture, MMVD candidates and affine MMVD candidates are arranged in a candidate list with the lowest ranking through embodiment 4. Hereinafter, embodiment 4 will be described focusing on MMVD candidates, but embodiment 4 can also be applied to affine MMVD candidates.
[0201] FIG. 20 is a flowchart showing an image encoding / decoding method according to the fourth embodiment.
[0202] Referring to FIG. 20, the image encoding apparatus 100 and the image decoding apparatus 200 may derive a merge candidate list (S2002). The image encoding apparatus 100 may set a base candidate (baseCand) for the MMVD, and may encode and signal an index (base candidate index) for the set base candidate into a bitstream. The image decoding apparatus 200 may set a base candidate for the MMVD using the signaled base candidate index (S2004). The base candidate may indicate any of the merge candidates in the merge candidate list. The merge candidate list may be referred to as a "first prediction candidate list", and the base candidate may be referred to as a "first prediction candidate".
[0203] The image encoding device 100 and the image decoding device 200 can determine the prediction direction (interDir) of the base candidate (S2006), and determine the values of the start reference list (startRefList) and the end reference list (endRefList) according to the determined direction (S2008 to S2010).
[0204] The image encoding device 100 and the image decoding device 200 can set the value of the variable refPicList to be the same as the value of the start reference list, and can set the value of a variable (bRPR) indicating whether or not the picture is an RPR reference picture to 0 (S2014). Furthermore, the image encoding device 100 and the image decoding device 200 can determine whether or not a reference picture corresponding to refPicidx in refPicList is an RPR reference picture (S2018), increment the value of the reference list by 1 (S2020), and set the next reference list as the determination target. The image encoding device 100 and the image decoding device 200 can determine whether or not each reference picture in each reference list is an RPR reference picture by performing steps S2018 and S2020 for all reference lists (S2016).
[0205] When the reference picture of the base candidate is an RPR reference picture (S2022), the image encoding device 100 and the image decoding device 200 can set the value of the TM cost of the MMVD candidate for the base candidate to a predetermined maximum value (S2032).
[0206] On the other hand, when the reference picture of the base candidate is a non-RPR reference picture (S2022), the image encoding device 100 and the image decoding device 200 may set mmvdIdx, which is an index indicating an MMVD candidate, to an initial value (0) (S2024), and then calculate TM cost values for all MMVD candidates for the base candidate (S2026, S2030) (S2028). In addition, the image encoding device 100 and the image decoding device 200 may rearrange all MMVD candidates based on the TM cost values calculated for each of them (S2034).
[0207] The image encoding device 100 and the image decoding device 200 can set an MMVD list based on the MMVD candidates whose TM cost values are set to a predetermined maximum value through step S2032 and a predetermined number (N) of MMVD candidates having optimal TM costs among the MMVD candidates rearranged through step S2034 (S2036).
[0208] The MMVD candidates may be referred to as “secondary prediction candidates,” and the MMVD list may be referred to as a “secondary prediction candidate list.” The MMVD candidates may be derived by applying an offset to the base candidates.
[0209] FIG. 21 is a diagram illustrating an example of a content streaming system to which an embodiment of the present disclosure can be applied.
[0210] As shown in FIG. 21, a content streaming system to which an embodiment of the present disclosure is applied may broadly include an encoding server, a streaming server, a Web server, a media storage, a user device, and a multimedia input device.
[0211] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, video camera, etc. directly generates a bitstream, the encoding server can be omitted.
[0212] The bitstream may be generated by an image encoding method and / or image encoding device to which an embodiment of the present disclosure is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0213] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server can transmit the multimedia data to the user. At this time, the content streaming system can include a separate control server, and in this case, the control server can control commands / responses between devices in the content streaming system.
[0214] The streaming server may receive the content from a media storage and / or an encoding server. For example, when receiving the content from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a certain period of time in order to provide a smooth streaming service.
[0215] Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices such as smartwatches, smart glass, head mounted displays (HMDs), digital TVs, desktop computers, and digital signage.
[0216] Each server in the content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.
[0217] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of the various embodiments to be performed on a device or computer, and non-transitory computer-readable medium on which such software or commands can be stored and executed on a device or computer. [Industrial Applicability]
[0218] The embodiments of the present disclosure can be used to encode / decode images.
Claims
1. An image decoding method performed by an image decoding device, comprising: constructing a prediction candidate list for the current block; deriving an error value for the current block based on whether a reference picture referred to by a prediction candidate in the prediction candidate list is a resampled reference picture; and reordering the prediction candidates in the prediction candidate list based on the error value; The image decoding method, wherein the error value is induced to a predetermined value based on the reference picture being a resampled reference picture.
2. The prediction candidates are rearranged in ascending order in the prediction candidate list based on the error value; The image decoding method of claim 1 , wherein the error value is guided to a predetermined maximum value based on the reference picture being a resampled reference picture.
3. 2. The image decoding method of claim 1, wherein the error value is derived based on a difference between a template of the current block and a reference template in the reference picture based on the reference picture being a non-resampled reference picture.
4. The image decoding method according to claim 1 , wherein the prediction candidate is any one of a merge candidate of the current block, a temporal candidate of the current block, or a non-adjacent candidate of the current block.
5. The prediction candidates include a first prediction candidate and a second prediction candidate obtained by applying an offset to the first prediction candidate, the predicted candidate lists include a first predicted candidate list including the first predicted candidate and a second predicted candidate list including the second predicted candidate, The constructing step constructs the first prediction candidate list; The deriving step derives an error value between the current block and the second prediction candidate based on a fact that a reference picture referred to by the first prediction candidate is not a resampled reference picture; The image decoding method according to claim 1 , wherein the rearrangement step rearranges an order of the second prediction candidates in the second prediction candidate list based on the error value.
6. An image coding method performed by an image coding device, comprising: constructing a prediction candidate list for the current block; deriving an error value for the current block based on whether a reference picture referred to by a prediction candidate in the prediction candidate list is a resampled reference picture; and reordering the prediction candidates in the prediction candidate list based on the error value; The method of image coding, wherein the error value is induced to a predetermined value based on the reference picture being a resampled reference picture.
7. A method for transmitting a bitstream generated by an image coding method, comprising the steps of: The image encoding method includes: constructing a prediction candidate list for the current block; deriving an error value for the current block based on whether a reference picture referred to by a prediction candidate in the prediction candidate list is a resampled reference picture; and reordering the prediction candidates in the prediction candidate list based on the error value; The method, wherein the error value is induced to a predetermined value based on the reference picture being a resampled reference picture.
Citation Information
Patent Citations
Video coding and decoding
WO2023052489A1
Grouping based adaptive reordering of merge candidate
WO2023059979A1
Method, apparatus, and medium for video processing
WO2023098899A1
Interaction between reference picture resampling and template-based inter prediction techniques in video coding
WO2023114627A1