Image encoding / decoding method and apparatus based on MVD code prediction, and recording medium storing bit stream
By adopting an adaptive MVD symbol prediction method in image encoding and decoding, the prediction method is determined based on whether the reference picture is resampled, the problems of low high-resolution image encoding and decoding efficiency and decreasing MVD symbol prediction accuracy are solved, and the prediction accuracy of high-resolution image encoding and decoding is achieved. More efficient image transmission and storage.
Patent Information
- Application Number
- CN202380033662.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-04-12
- Filing Date
- 2023-04-12
- Publication Date
- 2024-11-22
AI Technical Summary
The prior art is difficult to efficiently encode and decode high-resolution and high-quality images, resulting in increased transmission and storage costs and increased throughput and decreased accuracy when MVD symbol prediction is resampled in reference picture.
An adaptive MVD symbol prediction method based on whether the reference picture is resampled is proposed. MVD symbol prediction is performed only when the reference picture is not resampled, and MVD symbols are derived from the predefined MVD symbol list during resampling, avoiding templates Match cost calculation.
It improves image encoding and decoding efficiency, reduces transmission and storage costs, and solves the problems of increased throughput and decreased accuracy of MVD symbol prediction when resampling the reference picture.
Smart Images

Figure CN119013976A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an image encoding / decoding method and device and a recording medium for storing a bit stream, and more specifically, to an image encoding and decoding method and device based on MVD symbol prediction and a recording medium for storing a bit stream generated by the image encoding method / device of the present disclosure. Background Art
[0002] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) images and ultra-high-definition (UHD) images, is increasing in various fields. As the resolution and quality of image data are improved, the amount of information or bit volume transmitted is relatively increased compared to existing image data. The increase in the amount of information or bit volume transmitted leads to an increase in transmission cost and storage cost.
[0003] Therefore, efficient image compression technology is needed to effectively transmit, store, and reproduce information about high-resolution and high-quality images. Summary of the invention
[0004] Technical issues
[0005] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0006] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus for performing adaptive MVD sign prediction based on whether a reference picture is resampled.
[0007] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus that performs MVD symbol prediction only when a reference picture is not resampled.
[0008] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus for deriving MVD symbols from a predefined MVD symbol list when a reference picture is resampled.
[0009] Another object of the present disclosure is to provide a non-transitory computer-readable recording medium storing a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0010] Another object of the present disclosure is to provide a non-transitory computer-readable recording medium storing a bit stream received and decoded by the image decoding apparatus according to the present disclosure and used to reconstruct an image.
[0011] Another object of the present disclosure is to provide a method for transmitting a bit stream generated by the image encoding method or apparatus according to the present disclosure.
[0012] The technical problems solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described here will be clear to those skilled in the art through the following description.
[0013] Technical Solution
[0014] According to an aspect of the present disclosure, an image decoding method may include the following steps: determining a motion vector difference (MVD) of a current block; deriving a motion vector of the current block based on a motion vector predictor (MVP) of the current block and the determined MVD; and generating a prediction sample of the current block based on a reference picture of the current block and the derived motion vector. The sign of the MVD may be determined based on whether the reference picture is resampled.
[0015] An image decoding device according to another aspect of the present disclosure may include a memory and at least one processor. The at least one processor may determine a motion vector difference (MVD) of a current block, derive a motion vector of the current block based on a motion vector predictor (MVP) of the current block and the determined MVD, and generate a prediction sample of the current block based on a reference picture of the current block and the derived motion vector. The sign of the MVD may be determined based on whether the reference picture is resampled.
[0016] According to another aspect of the present disclosure, an image encoding method may include the following steps: generating a prediction sample of a current block based on a motion vector of the current block and a reference picture; deriving a motion vector difference (MVD) of the current block based on the motion vector of the current block and a motion vector predictor (MVP); and encoding inter-frame prediction information including information about the size and sign of the MVD. The information about the sign of the MVD may be determined based on whether the reference picture is resampled.
[0017] A computer-readable recording medium according to another aspect of the present disclosure may store a bit stream generated by the image encoding method or apparatus of the present disclosure.
[0018] A transmission method according to another aspect of the present disclosure may transmit a bit stream generated by the image encoding method or apparatus of the present disclosure.
[0019] The features briefly summarized above with respect to the present disclosure are merely exemplary aspects of the following detailed description of the present disclosure and do not limit the scope of the present disclosure.
[0020] Beneficial Effects
[0021] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency may be provided.
[0022] According to the present disclosure, an image encoding / decoding method and apparatus for performing adaptive MVD sign prediction based on whether a reference picture is resampled may be provided.
[0023] According to the present disclosure, an image encoding / decoding method and apparatus for performing MVD symbol prediction only when a reference picture is not resampled may be provided.
[0024] According to the present disclosure, an image encoding / decoding method and apparatus for deriving an MVD symbol from a predefined MVD symbol list when a reference picture is resampled may be provided.
[0025] In addition, according to the present disclosure, a non-transitory computer-readable recording medium storing a bit stream generated by the image encoding method or apparatus according to the present disclosure may be provided.
[0026] In addition, according to the present disclosure, there may be provided a non-transitory computer-readable recording medium storing a bit stream received and decoded by the image decoding apparatus according to the present disclosure and used to reconstruct an image.
[0027] In addition, according to the present disclosure, a method of transmitting a bit stream generated by the image encoding method or apparatus according to the present disclosure may be provided.
[0028] Those skilled in the art will understand that the effects that can be achieved through the present disclosure are not limited to what has been specifically described above, and other advantages of the present disclosure will be more clearly understood from the detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 FIG. 4 is a diagram schematically illustrating a video encoding system to which an embodiment of the present disclosure is applicable.
[0030] Figure 2 is a view schematically illustrating an image encoding device to which an embodiment of the present disclosure is applicable.
[0031] Figure 3 is a view schematically illustrating an image decoding device to which an embodiment of the present disclosure is applicable.
[0032] Figure 4 is a diagram schematically illustrating the inter prediction unit 180 of the image encoding apparatus 100 .
[0033] Figure 5 is a flowchart illustrating a method for encoding an image based on inter-frame prediction.
[0034] Figure 6 is a diagram schematically illustrating the inter prediction unit 260 of the image decoding apparatus 200 .
[0035] Figure 7 is a flowchart illustrating a method of decoding an image based on inter-frame prediction.
[0036] Figure 8 is a flowchart illustrating an inter-frame prediction method.
[0037] Fig. 9 is a flowchart illustrating a method of constructing a motion vector predictor candidate list.
[0038] Fig.10 is a diagram illustrating a symmetric MVD pattern.
[0039] Fig.11 is a diagram illustrating an encoding / decoding method based on template matching according to the present disclosure.
[0040] Fig.12 and Fig.13 is a flowchart illustrating an MVD determination method according to an embodiment of the present disclosure.
[0041] Fig.14 and Fig.15 is a flowchart illustrating an MVD determination method according to an embodiment of the present disclosure.
[0042] Fig.16 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.
[0043] Fig.17 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.
[0044] Fig.18 is a diagram illustrating a content streaming system to which an embodiment of the present disclosure is applicable. DETAILED DESCRIPTION
[0045] Hereinafter, the embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to facilitate implementation by those skilled in the art. However, the present disclosure can be implemented in various forms and is not limited to the embodiments described herein.
[0046] When describing the present disclosure, if it is determined that the detailed description of related known functions or configurations makes the scope of the present disclosure unnecessarily ambiguous, the detailed description thereof will be omitted. In the drawings, parts irrelevant to the description of the present disclosure are omitted, and like reference numerals are given to like parts.
[0047] In the present disclosure, when a component is "connected", "coupled" or "linked" to another component, it may include not only a direct connection relationship but also an indirect connection relationship with intermediate components. In addition, when a component "includes" or "has" other components, unless otherwise specified, it means that other components may also be included, rather than excluding other components.
[0048] In the present disclosure, the terms first, second, etc. are used only for the purpose of distinguishing one component from other components, and do not limit the order or importance of the components unless otherwise specified. Accordingly, within the scope of the present disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly, a second component in one embodiment may be referred to as a first component in another embodiment.
[0049] In the present disclosure, components that are distinguished from each other are intended to clearly describe each feature and do not mean that the components must be separated. That is, multiple components can be integrated and implemented in one hardware or software unit, or one component can be distributed and implemented in multiple hardware or software units. Therefore, even if not specifically stated, implementations in which these components are integrated or distributed are also included in the scope of the present disclosure.
[0050] In the present disclosure, the components described in each embodiment are not necessarily indispensable components, and some components may be optional components. Therefore, the embodiments consisting of a subset of the components described in the embodiments are also included in the scope of the present disclosure. In addition, the embodiments including other components in addition to the components described in the various embodiments are included in the scope of the present disclosure.
[0051] The present disclosure relates to encoding and decoding of images. Unless otherwise defined in the present disclosure, terms used in the present disclosure may have general meanings commonly used in the technical field to which the present disclosure belongs.
[0052] In the present disclosure, a "picture" generally refers to a unit representing an image within a specific time period, and a slice / tile is a coding unit constituting a part of a picture, and a picture may be composed of one or more slices / tiles. In addition, a slice / tile may include one or more coding tree units (CTUs).
[0053] In the present disclosure, "pixel" or "pel" may refer to the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, or may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component.
[0054] In the present disclosure, a "unit" may refer to a basic unit of image processing. The unit may include at least one of a specific area of a picture and information related to the area. In some cases, the unit may be used interchangeably with terms such as "sample array", "block" or "area". In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients.
[0055] In the present disclosure, "current block" may mean one of "current coding block", "current coding unit", "coding target block", "decoding target block" or "processing target block". When prediction is performed, "current block" may mean "current prediction block" or "prediction target block". When transform (inverse transform) / quantization (dequantization) is performed, "current block" may mean "current transform block" or "transform target block". When filtering is performed, "current block" may mean "filtering target block".
[0056] In addition, in the present disclosure, unless explicitly stated as a chroma block, a "current block" may mean 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 represented by an explicit description including a luma component block such as "luma block" or "current luma block". In addition, a "chroma component block of the current block" may be represented by an explicit description including a chroma component block such as "chroma block" or "current chroma block".
[0057] In the present disclosure, the term " / " or "," may be interpreted as indicating "and / or". For example, "A / B" and "A, B" may mean "A and / or B". In addition, "A / B / C" and "A / B / C" may mean "at least one of A, B, and / or C".
[0058] In the present disclosure, the term "or" should be interpreted to indicate "and / or". For example, the expression "A or B" may include 1) only "A", 2) only "B", or 3) both "A and B". In other words, in the present disclosure, "or" should be interpreted to indicate "additionally or alternatively".
[0059] Overview of Video Coding Systems
[0060] Figure 1 is a diagram showing a video encoding system to which an embodiment of the present disclosure is applicable.
[0061] The video encoding system according to the embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may deliver the encoded video and / or image information or data to the decoding device 20 via a digital storage medium or a network in the form of a file or a stream.
[0062] The encoding device 10 according to the embodiment may include a video source generator 11, an encoding unit (encoder) 12, and a transmitter 13. The decoding device 20 according to the embodiment may include a receiver 21, a decoding unit (decoder) 22, and a renderer 23. The encoding unit 12 may be referred to as a video / image encoding device, and the decoding unit 22 may be referred to as a video / image decoding device. The transmitter 13 may be included in the encoding unit 12. The receiver 21 may be included in the decoding unit 22. The renderer 23 may include a display and the display may be configured as a separate device or an external component.
[0063] The video source generator 11 can obtain the video / image by the process of capturing, synthesizing or generating the video / image. The video source generator 11 may include a video / image capturing device and / or a video / image generating device. The video / image capturing device may include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generating device may include, for example, a computer, a tablet computer, and a smart phone, and may generate the video / image (electronically). For example, a virtual video / image may be generated by a computer, etc. In this case, the video / image capturing process may be replaced by a process of generating relevant data.
[0064] The encoding unit 12 may encode the input video / image. For compression and encoding efficiency, the encoding unit 12 may perform a series of processes such as prediction, transformation, and quantization. The encoding unit 12 may output encoded data (encoded video / image information) in the form of a bitstream.
[0065] The transmitter 13 can obtain the coded video / image information or data output in the form of a bit stream in the form of a file or stream through a digital storage medium or a network and forward it to the receiver 21 of the decoding device 20 or another external object. The digital storage medium may include various storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter 13 may include an element for generating a media file in a predetermined file format and may include an element for transmitting through a broadcast / communication network. The transmitter 13 may be provided as a transmitting device separated from the encoding device 10, and in this case, the transmitting device may include at least one processor that obtains the coded video / image information or data output in the form of a bit stream and a transmitting unit that transmits it in the form of a file or stream. The receiver 21 may extract / receive the bit stream from the storage medium or the network and transmit the bit stream to the decoding unit 22.
[0066] The decoding unit 22 may decode a video / image by performing a series of processes corresponding to the operations of the encoding unit 12, such as dequantization, inverse transformation, and prediction.
[0067] The renderer 23 may render the decoded video / image. The rendered video / image may be displayed through a display.
[0068] Overview of Image Coding Equipment
[0069] Figure 2 is a view schematically showing an image encoding device to which an embodiment of the present disclosure is applicable.
[0070] like Figure 2 As shown, the image encoding device 100 may include an image segmenter 110, a subtractor 115, a transformer 120, a quantizer 130, a dequantizer 140, an inverse transformer 150, an adder 155, a filter 160, a memory 170, an inter-frame prediction unit 180, an intra-frame prediction unit 185, and an entropy encoder 190. The inter-frame prediction unit 180 and the intra-frame prediction unit 185 may be collectively referred to as a "prediction unit". The transformer 120, the quantizer 130, the dequantizer 140, and the inverse transformer 150 may be included in a residual processor. The residual processor may also include a subtractor 115.
[0071] In some embodiments, all or at least some of the components configuring the image encoding apparatus 100 may be configured by one hardware component (eg, an encoder or a processor). In addition, the memory 170 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium.
[0072] The image segmenter 110 may segment the input image (or picture or frame) input to the image encoding device 100 into one or more processing units. For example, the processing unit may be referred to as a coding unit (CU). The coding unit may be obtained by recursively segmenting a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QT / BT / TT) structure. For example, a coding unit may be segmented into a plurality of coding units of a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. For the segmentation of the coding unit, the quadtree structure may be applied first, and then the binary tree structure and / or the ternary tree structure may be applied. The encoding process according to the present disclosure may be performed based on the final coding unit that is no longer segmented. The maximum coding unit may be used as the final coding unit, and the coding unit of a deeper depth obtained by segmenting the maximum coding unit may also be used as the final coding unit. Here, the encoding process may include the prediction, transformation, and reconstruction processes described later. As another example, the processing unit of the encoding process may be a prediction unit (PU) or a transformation unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit. The prediction unit may be a sample prediction unit, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.
[0073] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on the block to be processed (current block) and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction based on the current block or CU. The prediction unit may generate various information related to the prediction of the current block and transmit the generated information to the entropy encoder 190. The information about the prediction may be encoded in the entropy encoder 190 and output in the form of a bitstream.
[0074] The intra prediction unit (intra predictor) 185 can predict the current block by referring to the samples in the current picture. Depending on the intra prediction mode and / or intra prediction technology, the reference samples can be located in the neighbors of the current block or can be placed separately. The intra prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used according to the settings. The intra prediction unit 185 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0075] The inter prediction unit (inter predictor) 180 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the 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 also include inter prediction direction (L0 prediction, L1 prediction, dual 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. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter prediction unit 180 may construct a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter prediction unit 180 may use the motion information of the neighboring block as the motion information of the current block. In the case of skip mode, unlike the merge mode, the residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be signaled by encoding the motion vector difference and an indicator of the motion vector predictor. The motion vector difference may mean the difference between the motion vector of the current block and the motion vector predictor.
[0076] The prediction unit may generate a prediction signal based on various prediction methods and prediction techniques described below. For example, the prediction unit may not only apply intra prediction or inter prediction, but may also apply intra prediction and inter prediction simultaneously to predict the current block. The prediction method of applying both intra prediction and inter prediction simultaneously to predict the current block may be referred to as combined inter and intra prediction (CIIP). In addition, the prediction unit may perform intra block copying (IBC) to predict the current block. Intra block copying may be used for content image / video encoding of games, etc., such as screen content coding (SCC). IBC is a method of predicting the current picture using a previously reconstructed reference block in the current picture at a position separated by a predetermined distance from the current block. When IBC is applied, the position of the reference block in the current picture may be encoded as a vector (block vector) corresponding to a predetermined distance. IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because the reference block is derived within the current picture. That is, IBC may use at least one inter prediction technique described in the present disclosure.
[0077] The prediction signal generated by the prediction unit can be used to generate a reconstruction signal or to generate a residual signal. The subtractor 115 can generate a residual signal (residual block or residual sample array) by subtracting the prediction signal (prediction block or prediction sample array) output from the prediction unit from the input image signal (original block or original sample array). The generated residual signal can be transmitted to the transformer 120.
[0078] The transformer 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-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT refers to a transform obtained from a graph when relationship information between pixels is represented by a graph. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to square pixel blocks of the same size or may be applied to blocks of variable size instead of square.
[0079] The quantizer 130 may quantize the transform coefficients and transmit them to the entropy encoder 190. The entropy encoder 190 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 130 may rearrange the quantized transform coefficients of the block type into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
[0080] The entropy encoder 190 may perform various encoding methods, such as exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 190 may encode information required for video / image reconstruction other than quantized transform coefficients together or separately (e.g., values of syntax elements, etc.). The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of a network abstraction layer (NAL) in the form of a bitstream. The video / image information may also include information about various parameter sets, such as an adaptive 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 also include general constraint information. The signaled information, transmitted information, and / or syntax elements described in the present disclosure may be encoded and included in a bitstream through the above-described encoding process.
[0081] The bitstream may be transmitted over a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting a signal output from the entropy encoder 190 and / or a storage unit (not shown) for storing the signal may be included as an internal / external element of the image encoding device 100. Alternatively, a transmitter may be provided as a component of the entropy encoder 190.
[0082] The quantized transform coefficients output from the quantizer 130 may be used to generate a residual signal. For example, the residual signal (residual block or residual sample) may be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients through the dequantizer 140 and the inverse transformer 150.
[0083] The adder 155 adds the reconstructed residual signal to the prediction signal output from the inter-frame prediction unit 180 or the intra-frame prediction unit 185 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If the block to be processed has no residual, such as when the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 155 can be called a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.
[0084] The filter 160 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 160 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc. The filter 160 can generate various information related to filtering and transmit the generated information to the entropy encoder 190, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 190 and output in the form of a bit stream.
[0085] The modified reconstructed picture transferred to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied by the image encoding apparatus 100, prediction mismatch between the image encoding apparatus 100 and the image decoding apparatus may be avoided and encoding efficiency may be improved.
[0086] The DPB of the memory 170 may store the modified reconstructed picture for use as a reference picture in the inter-frame prediction unit 180. The memory 170 may store the motion information of the block from which the motion information in the current picture is derived (or encoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be transmitted to the inter-frame prediction unit 180 and used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 170 may store the reconstructed samples of the reconstructed blocks in the current picture and may transmit the reconstructed samples to the intra-frame prediction unit 185.
[0087] Overview of Image Decoding Equipment
[0088] Figure 3 is a view schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.
[0089] like Figure 3 As shown, the image decoding device 200 may include an entropy decoder 210, a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, and an intra-frame prediction unit 265. The inter-frame prediction unit (inter-frame predictor) 260 and the intra-frame prediction unit (intra-frame predictor) 265 may be collectively referred to as a "prediction unit (predictor)". The dequantizer 220 and the inverse transformer 230 may be included in a residual processor.
[0090] According to an embodiment, all or at least some of the plurality of components configuring the image decoding apparatus 200 may be configured by hardware components (eg, a decoder or a processor). In addition, the memory 250 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium.
[0091] The image decoding device 200 having received a bit stream including video / image information may perform the same Figure 2 The image encoding device 100 may reconstruct the image by processing corresponding to the processing performed by the image encoding device 100. For example, the image decoding device 200 may perform decoding using a processing unit applied in the image encoding device. Therefore, the processing unit of decoding may be, for example, a coding unit. The coding unit may be obtained by partitioning the coding tree unit or the maximum coding unit. The reconstructed image signal decoded and output by the image decoding device 200 may be reproduced by a reproduction device (not shown).
[0092] The image decoding device 200 may receive the image in the form of a bit stream from Figure 2The received signal may be decoded by the entropy decoder 210. For example, the entropy decoder 210 may parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as an adaptive 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 also include general constraint information. The image decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The information and / or syntax elements signaled / received described in the present disclosure may be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 210 may decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of the syntax elements required for image reconstruction and the quantized values of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method can receive a bin corresponding to each syntax element in the bitstream, use the decoding target syntax element information, the decoding information of the neighboring block and the decoding target block, or the information of the symbol / bin decoded in the previous stage to determine the context model, perform arithmetic decoding on the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method can update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. The information related to the prediction in the information decoded by the entropy decoder 210 can be provided to the prediction unit (inter-frame prediction unit 260 and intra-frame prediction unit 265), and the residual value of the entropy decoding performed on it in the entropy decoder 210, that is, the quantized transform coefficient and the related parameter information can be input to the dequantizer 220. In addition, the information about filtering in the information decoded by the entropy decoder 210 can be provided to the filter 240. In addition, a receiver (not shown) for receiving a signal output from the image encoding apparatus may be further configured as an internal / external element of the image decoding apparatus 200 , or the receiver may be a component of the entropy decoder 210 .
[0093] In addition, the image decoding device according to the present disclosure may be referred to as a video / image / picture decoding device. The image decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 210. The sample decoder may include a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, or at least one of an intra-frame prediction unit 265.
[0094] The dequantizer 220 may dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 220 may rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the image encoding device. The dequantizer 220 may dequantize the quantized transform coefficients by using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficients.
[0095] The inverse transformer 230 may inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0096] The prediction unit may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction to the current block based on the information about prediction output from the entropy decoder 210, and may determine a specific intra / inter prediction mode (prediction technique).
[0097] The same as described in the prediction unit of the image encoding device 100 , the prediction unit can generate a prediction signal based on various prediction methods (techniques) described later.
[0098] 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 is also applicable to the intra prediction unit 265.
[0099] The inter-frame prediction unit 260 can derive the prediction block of the current block based on the reference block (reference sample array) specified by the motion vector on the reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter-frame prediction mode, the motion information can be predicted in units of blocks, sub-blocks or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, dual prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter-frame prediction unit 260 may configure a motion information candidate list based on the neighboring blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating the inter-frame prediction mode of the current block.
[0100] The adder 235 can generate a reconstruction signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-frame prediction unit 260 and / or the intra-frame prediction unit 265). If the block to be processed has no residual (for example, when the skip mode is applied), the prediction block can be used as a reconstructed block. The description of the adder 155 also applies to the adder 235. The adder 235 can be called a reconstructor or a reconstructed block generator. The generated reconstruction signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.
[0101] The filter 240 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 240 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and 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, adaptive loop filtering, bilateral filtering, etc.
[0102] The (modified) reconstructed picture stored in the DPB of the memory 250 may be used as a reference picture in the inter-frame prediction unit 260. The memory 250 may store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be transmitted to the inter-frame prediction unit 260 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 250 may store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame prediction unit 265.
[0103] In the present disclosure, the implementations described in the filter 160, the inter-frame prediction unit 180 and the intra-frame prediction unit 185 of the image encoding device 100 can be equally or correspondingly applied to the filter 240, the inter-frame prediction unit 260 and the intra-frame prediction unit 265 of the image decoding device 200.
[0104] Inter prediction
[0105] The prediction unit of the image encoding device 100 and the image decoding device 200 may derive a prediction sample by performing inter-frame prediction on a per-block basis. Inter-frame prediction may be a prediction derived in a manner that depends on data elements (e.g., sample values or motion information) of a picture other than the current picture. When inter-frame prediction is applied to the current block, a prediction block (prediction sample array) of the current block may be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. Herein, in order to reduce the amount of motion information transmitted in the inter-frame prediction mode, the motion information of the current block may be predicted on a per-block, sub-block, or sample basis based on the 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 also include inter-frame prediction type (L0 prediction, L1 prediction, dual prediction, etc.) information. When inter-frame 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 neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block or collocated CU (colCU). A reference picture including temporally neighboring blocks may be referred to as a collocated picture (colPic). For example, a motion information candidate list may be constructed based on neighboring blocks of the current block. A flag or index information indicating which candidate is selected (used) to derive a motion vector and / or a reference picture index may be signaled. Inter-frame prediction may be performed based on various prediction modes. 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 merge mode, a residual signal may not be sent. In the case of motion information prediction (motion vector prediction, MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and the 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.
[0106] According to the inter-frame prediction type (L0 prediction, L1 prediction, dual prediction, etc.), the motion information may include L0 motion information and / or L1 motion information. The motion vector in the L0 direction may be referred to as the L0 motion vector or MVL0, and the motion vector in the L1 direction may be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as the L0 prediction. Prediction based on the L1 motion vector may be referred to as the L1 prediction. Prediction based on both the L0 motion vector and the L1 motion vector may be referred to as dual prediction. Herein, the L0 motion vector may refer to a motion vector (L0) associated with the reference picture list L0, and the L1 motion vector may refer to a motion vector (L1) associated with the reference picture list L1. The reference picture list L0 may include a picture before the current picture according to the output order as a reference picture. The reference picture list L1 may include a picture after the current picture according to the output order as a reference 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 also include a picture after the current picture according to the output order as a reference picture. In this case, within the reference picture list L0, the preceding picture may be indexed first, and the succeeding picture may be indexed next. The reference picture list L1 may also include a picture preceding the current picture in the output order as a reference picture. In this case, within the reference picture list 1, the succeeding picture may be indexed first, and the preceding picture may be indexed next. Herein, the output order may correspond to a picture order count (POC) order.
[0107] Figure 4 is a diagram schematically showing an inter-frame prediction unit 180 of the image encoding device 100, Figure 5 is a flowchart illustrating a method for encoding an image based on inter-frame prediction.
[0108] The image encoding device 100 may perform inter prediction on the current block (S510). The image encoding device 100 may derive the inter prediction mode and motion information of the current block, and may generate a prediction sample of the current block. Herein, the processes of inter prediction mode determination, motion information derivation, and prediction sample generation may be performed simultaneously, or any one process may be performed before the other processes. 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. The prediction mode determination unit 181 may determine the prediction mode of the current block. The motion information derivation unit 182 may derive the motion information of the current block. The prediction sample derivation unit 183 may derive the 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 in a predetermined area (search area) of the reference picture through motion estimation, and may derive a reference block having the smallest difference with the current block or less than or equal to a predetermined standard. Based on this, a reference picture index indicating a reference picture in which a reference block is located can be derived, and a motion vector can be derived based on a position difference between the reference block and the current block. The image encoding apparatus 100 can determine a mode applied to the current block among various prediction modes. The image encoding apparatus 100 can compare RD costs for various prediction modes, and can determine an optimal prediction mode for the current block.
[0109] For example, when the skip mode or merge mode is applied to the current block, the image encoding device 100 may construct a merge candidate list described later, and may derive a reference block having the smallest difference with the current block or less than or equal to a predetermined standard among the reference blocks indicated by the merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and signaled to the decoding device. The motion information of the current block may be derived using the motion information of the selected merge candidate.
[0110] As another example, when the (A)MVP mode is applied to the current block, the image encoding device 100 may construct an (A)MVP candidate list described later, and may use the motion vector of the MVP candidate selected from among the motion vector predictor (MVP) 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. Among the MVP candidates, the MVP candidate having a motion vector with the smallest difference from the motion vector of the current block may be the selected MVP candidate. A motion vector difference (MVD) as a difference obtained by subtracting the MVP from the motion vector of the current block may be derived. In this case, information about the MVD may be notified to the image decoding device 200 by a signal. In addition, when the (A)MVP mode is applied, the value of the reference picture index may be constructed as reference picture index information, and may be separately notified to the image decoding device 200 by a signal.
[0111] The image encoding apparatus 100 may induce a residual sample based on the prediction sample (S520). The image encoding apparatus 100 may compare the prediction sample with an original sample of the current block to induce the residual sample.
[0112] The image encoding device 100 may encode the image information including prediction information and residual information (S530). The image encoding device may output the encoded image information in the form of a bitstream. The prediction information is information related to the prediction process, and may include prediction mode information (e.g., a skip flag, a merge flag, or a mode index) and information about motion information. The information about the motion information may include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index) as information for deriving a motion vector. In addition, the information about the motion information may include the above-mentioned information about the MVD and / or the reference picture index information. In addition, the information about the motion information may include information indicating whether L0 prediction, L1 prediction, or dual prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficients used for the residual sample.
[0113] The output bit stream may be stored in a (digital) storage medium and transmitted to the decoding device, or may be transmitted to the image decoding device 200 via a network.
[0114] In addition, as described above, the image encoding device 100 may generate a reconstructed picture (including a reconstructed sample and a reconstructed block) based on the reference sample and the residual sample. This is to derive the same prediction result as the prediction result performed in the image decoding device 200 by the image encoding device 100, thereby increasing the encoding efficiency. Therefore, the image encoding device 100 may store the reconstructed picture (or reconstructed sample, reconstructed block) in a memory, and may use it as a reference picture for inter-frame prediction. As described above, the in-loop filtering process may also be applied to the reconstructed picture.
[0115] Figure 6 is a diagram schematically showing an inter-frame prediction unit 260 of the image decoding apparatus 200, Figure 7 is a flowchart illustrating a method of decoding an image based on inter-frame prediction.
[0116] The image decoding apparatus 200 may perform an operation corresponding to the operation performed by the image encoding apparatus 100. The image decoding apparatus 200 may perform prediction on the current block based on the received prediction information and may derive a prediction sample.
[0117] Specifically, the image decoding apparatus 200 may determine a prediction mode of a 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.
[0118] For example, based on the merge flag, it can be determined whether to apply the merge mode to the current block or to determine the (A) MVP mode. Alternatively, one of the various inter-frame prediction mode candidates can be selected based on the mode index. The inter-frame prediction mode candidates may include a skip mode, a merge mode, and / or an (A) MVP mode or may include various inter-frame prediction modes described later.
[0119] The image decoding device 200 may derive motion information of the current block based on the determined inter prediction mode (S720). For example, when the skip mode or merge mode is applied to the current block, the image decoding device 200 may construct a merge candidate list described later, and may select a merge candidate from the merge candidates included in the merge candidate list. The selection may be performed based on the above-mentioned selection information (merge index). The motion information of the selected merge candidate may be used to derive the motion information of the current block. The motion information of the selected merge candidate may be used as the motion information of the current block.
[0120] As another example, when the (A)MVP mode is applied to the current block, the image decoding device 200 may construct the (A)MVP candidate list described later, and may use the motion vector of the MVP candidate selected from the MVP candidates included in the (A)MVP candidate list as the motion vector predictor (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 the information about the MVD, and the motion vector of the current block may be derived based on the MVP and MVD of the current block. In addition, the reference picture index of the current block may be derived based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list related to the current block may be derived as the reference picture referenced by the inter-frame prediction of the current block.
[0121] In addition, as will be described later, the motion information of the current block can be derived without constructing a candidate list. In this case, the motion information of the current block can be derived according to the process described in the prediction mode described later. In this case, the candidate list configuration as described above can be omitted.
[0122] The image decoding apparatus 200 may generate a prediction sample of the current block based on the motion information of the current block (S730). In this case, a reference picture may be derived based on a reference picture index of the current block, and a sample of the reference block indicated by a motion vector of the current block on the reference picture may be used to derive the prediction sample of the current block. In this case, as described later, in some cases, a prediction sample filtering process may also be performed on all or some of the prediction samples of the current block.
[0123] 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. The prediction mode determination unit 181 may determine the prediction mode of the current block based on the received prediction mode information. The motion information derivation unit 182 may derive motion information (motion vector and / or reference picture index) of the current block based on the received information about the motion information. The prediction sample derivation unit 183 may derive the prediction sample of the current block.
[0124] The image decoding device 200 may generate a residual sample of the current block based on the received residual information (S740). The image decoding device 200 may generate a reconstructed sample of the current block based on the predicted sample and the residual sample, and may generate a reconstructed picture based thereon (S750). Thereafter, as described above, an in-loop filtering process may be further applied to the reconstructed picture.
[0125] Reference Figure 8The inter-frame prediction process may include the steps of determining an inter-frame prediction mode (S810), deriving motion information according to the determined prediction mode (S820), and performing prediction (generating prediction samples) based on the derived motion information (S830). As described above, the inter-frame prediction process may be performed in the image encoding apparatus 100 and the image decoding apparatus 200.
[0126] Inter prediction mode
[0127] Various inter prediction modes can be used for the prediction of the current block in the 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 (MMVD) mode can be used. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, dual prediction with CU-level weights (BCW), bidirectional optical flow (BDOF), etc. can also be used in addition or alternatively as additional modes. Affine mode can be referred to as affine motion prediction mode. MVP mode can be referred to as advanced motion vector prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived by some modes can be included as one of the motion information candidates of other modes. For example, an HMVP candidate can be added as a merge candidate in merge / skip mode, or can be added as an MVP candidate in MVP mode.
[0128] Prediction mode information indicating the inter prediction mode of the current block may be signaled from the image encoding device 100 to the image decoding device 200. The prediction mode information may be included in a bitstream and received by the image decoding device 200. The prediction mode information may include index information indicating one of a plurality of candidate modes. Alternatively, the inter prediction mode may be indicated by 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 the skip mode is applied, and if the skip mode is not applied, a merge flag may be signaled to indicate whether the 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 classification may be further signaled. The affine mode may be signaled in an independent mode, or may be signaled in a mode depending on the merge mode or the MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.
[0129] In addition, information indicating whether the above-mentioned list 0 (L0) prediction, list 1 (L1) prediction or dual prediction is used for the current block (current coding unit) may be signaled. This information may be referred to as motion prediction direction information, inter-frame prediction direction information or inter-frame prediction indication information, and may be configured / encoded / signaled in the form of an inter_pred_idc syntax element, for example. That is, the inter_pred_idc syntax element may indicate whether the above-mentioned list 0 (L0) prediction, list 1 (L1) prediction or dual prediction is used for the current block (current coding unit). In the present disclosure, for convenience of explanation, the inter-frame prediction type (L0 prediction, L1 prediction or BI prediction) indicated by the inter_pred_idc syntax element may be indicated as a motion prediction direction. L0 prediction may be represented as pred_L0, L1 prediction may be represented as pred_L1, and paired prediction may be represented as pred_BI. For example, according to the value of the inter_pred_idc syntax element, the prediction type shown in Table 1 below may be represented.
[0130] [Table 1]
[0131]
[0132] As described above, a picture may include one or more slices. A slice may have one of slice types including an intra (I) slice, a predicted (P) slice, and a bi-predicted (B) slice. The slice type may be indicated based on slice type information. For blocks in an I slice, inter prediction is not used for prediction, and only intra prediction may be used. Of course, even in this case, the original sample values may be encoded and signaled without prediction. For blocks in a P slice, intra prediction or inter prediction may be used, and when inter prediction is used, only single prediction may be used. On the other hand, for blocks in a B slice, intra prediction or inter prediction may be used, and when inter prediction is used, at most bi prediction may be used.
[0133] L0 and L1 may include reference pictures encoded / decoded before the current picture. For example, L0 may include reference pictures before and / or after the current picture in POC order, and L1 may include reference pictures after and / or before the current picture in POC order. In this case, in L0, a relatively low reference picture index may be assigned to a reference picture before the current picture in POC order, and in L1, a relatively low reference picture index may be assigned to a reference picture after the current picture in POC order. For B slices, bi-prediction may be applied, and in this case, unidirectional bi-prediction may be applied, or bi-directional bi-prediction may be applied. Bi-directional bi-prediction may be referred to as true bi-prediction.
[0134] Specifically, for example, information about the inter prediction mode of the current block can be encoded and signaled at the CU (CU syntax) level, or implicitly determined according to conditions. In this case, some modes can be explicitly signaled, and the remaining modes can be implicitly derived.
[0135] MVP Pattern
[0136] The MVP (motion vector prediction) mode may be referred to as the AMVP (advanced motion vector prediction) mode. When the MVP mode is applied, a motion vector predictor (MVP) candidate list may be generated using the motion vector of the reconstructed spatial neighboring block and / or the motion vector corresponding to the temporal neighboring block (or Col block). That is, the motion vector of the reconstructed spatial neighboring block and / or the motion vector corresponding to the temporal neighboring block may be used as a motion vector predictor candidate. When dual prediction is applied, an MVP candidate list for deriving L0 motion information and an MVP candidate list for deriving L1 motion information may be generated and used separately. The above-mentioned prediction information (or information about prediction) may include selection information (e.g., an MVP flag or an MVP index) indicating the optimal motion vector predictor candidate selected from the motion vector predictor candidates included in the list. At this time, the prediction unit may use the selection information to select the motion vector predictor of the current block from the motion vector predictor candidates included in the motion vector candidate list. The prediction unit of the encoding device may obtain the motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, and may encode it and output it in the form of a bitstream. That is, the MVD can be obtained as a value obtained by subtracting a motion vector predictor from a motion vector of the current block. At this time, the prediction unit of the decoding device can obtain a motion vector difference included in the information about the prediction, and derive the motion vector of the current block by adding the motion vector difference and the motion vector predictor. The prediction unit of the decoding device can obtain or derive a reference picture index indicating a reference picture, etc. from the information about the prediction.
[0137] An example of a method for constructing a motion vector predictor candidate list is as follows: Fig. 9 shown. Fig. 9 Each step of can be performed by the image encoding device 100 or the image decoding device 200. In the following, for the convenience of explanation, the image decoding device 200 will be described. Fig. 9 each step.
[0138] Reference Fig. 9 , the image decoding apparatus 200 may search for a spatial merging candidate block for motion vector prediction and insert it into the prediction candidate list (S910). In addition, the image decoding apparatus 200 may determine whether the number of spatial candidate blocks in the prediction candidate list is less than 2 (S920).
[0139] If the number of spatial candidate blocks in the prediction candidate list is less than 2 (S920 is "yes"), the image decoding device 200 may search for a temporal candidate block and insert it into the prediction candidate list (S930). If the temporal candidate block is not available, the image decoding device 200 may construct a prediction candidate list using a zero motion vector (S940).
[0140] In contrast, if the number of spatial candidate blocks in the prediction candidate list is 2 or more (No in S920 ), the image decoding apparatus 200 may skip the above-described steps S930 and S940 and end the construction of the prediction candidate list.
[0141] In addition, when the MVP mode is applied, the reference picture index may be explicitly signaled. In this case, the reference picture index for L0 prediction (refidxL0) and the reference picture index for L1 prediction (refidxL1) may be separately signaled. For example, when the MVP mode is applied and BI prediction is applied, both information about refidxL0 and information about refidxL1 may be signaled.
[0142] MVD Coding
[0143] When the MVP mode is applied, the information about the MVD derived as described above in the encoding device can be notified to the decoding device with a signal. For example, the information about the MVD may include information indicating the x, y components and the sign of the absolute value of the MVD. In this case, the information indicating whether the absolute value of the MVD is greater than 0 and greater than 1 and the MVD remainder can be notified with a signal in stages. For example, only when the value of the flag information indicating whether the absolute value of the MVD is greater than 0 is 1, the information indicating whether the absolute value of the MVD is greater than 1 can be notified with a signal.
[0144] For example, information about the MVD may be encoded in an encoding device and signaled to a decoding device using the syntax shown in Table 2 below.
[0145] [Table 2]
[0146]
[0147] Referring to Table 2, MVD[compIdx] may be derived based on abs_mvd_greater0_flag[compIdx]*(abs_mvd_minus2[compIdx]+2)*(1-2*mvd_sign_flag[compIdx]). Here, compIdx (or cpIdx) indicates an index of each component and may have a value of 0 or 1. compIdx 0 may indicate an x component, and compIdx 1 may indicate a y component. However, this is merely an example, and the value of each component may be represented using a coordinate system other than the x, y coordinate system.
[0148] In addition, the MVD (MVDL0) for L0 prediction and the MVD (MVDL1) for L1 prediction may be separately signaled, and the information about the MVD may include information about MVDL0 and / or information about MVDL1. For example, when the MVP mode is applied to the current block and BI prediction is applied, both the information about MVDL0 and the information about MVDL1 may be signaled.
[0149] Symmetric MVD
[0150] In addition, when BI prediction is applied, symmetric MVD can be used by considering coding efficiency (e.g., Fig.10 Example). In this case, signaling of some motion information may be omitted. For example, when symmetric MVD is applied to the current block, information about refidxL0, information about refidxL1, and information about MVDL1 may not be signaled from the encoding device to the decoding device, but may be derived internally. For example, when MVP mode and BI prediction are applied to the current block, flag information indicating whether symmetric MVD is applied (e.g., symmetric MVD flag information or sym_mvd_flag syntax element) may be signaled, and when the value of the flag information is 1, the decoding device may determine that symmetric MVD is applied to the current block.
[0151] When the symmetric MVD mode is applied (i.e., when the value of the symmetric MVD flag information is 1), information about mvp_l0_flag, mvp_l1_flag, and MVDL0 may be explicitly signaled, and signaling of information about refidxL0, information about refidxL1, and information about MVDL1 may be omitted and derived internally as described above. For example, refidxL0 may be derived as an index indicating a previous reference picture closest to the current picture in POC order within reference picture list 0 (which may be referred to as list 0 or L0). refidxL1 may be derived as an index indicating a subsequent reference picture closest to the current picture in POC order within reference picture list 1 (which may be referred to as list 1 or L1). Alternatively, for example, both refidxL0 and refidxL1 may be derived as 0, respectively. Alternatively, for example, refidxL0 and refidxL1 may be derived as the minimum index having the same POC difference relative to the current picture, respectively. Specifically, for example, when [POC of the current picture]-[POC of the first reference picture indicated by refidxL0] is referred to as the first POC difference, and [POC of the second reference picture indicated by refidxL1] is referred to as the second POC difference, only when the first POC difference and the second POC difference are the same, the value of refidxL0 indicating the first reference picture can be derived as the value of refidxL0 of the current block, and the value of refidxL1 indicating the second reference picture can be derived as the value of refidxL1 of the current block. In addition, for example, if there are multiple sets in which the first POC difference and the second POC difference are the same, refidxL0 and refidxL1 of the set having the smallest difference can be derived as refidxL0 and refidxL1 of the current block.
[0152] MVDL1 may be derived as -MVDL0. For example, the final MV of the current block may be derived as shown in Equation 1 below.
[0153] [Formula 1]
[0154]
[0155] Template Matching(TM)
[0156] Template matching (TM) is a motion vector derivation method performed at the decoder stage, and is a method of refining motion information of a current block by finding a template (hereinafter referred to as a "reference template") that is most similar to a template (hereinafter referred to as a "current template") adjacent to a current block (e.g., a current coding unit, a current CU) in a reference picture. The current template may be an upper neighboring block and / or a left neighboring block of the current block, or may be some of these neighboring blocks. In addition, the reference template may be determined to have the same size as the current template.
[0157] Fig.11 2 is a diagram for explaining an encoding / decoding method based on template matching according to the present disclosure.
[0158] like Fig.11 As shown, when the initial motion vector of the current block is derived, a search for a better motion vector can be performed in the surrounding area of the initial motion vector. For example, the range of the surrounding area where the search is performed can be within a [-8, +8] pixel search area centered on the initial motion vector. In addition, the size of the search step for performing the search can be determined based on the AMVR mode of the current block. In addition, template matching can be continuously performed in a bilateral matching process in a merge mode.
[0159] If the prediction mode of the current block is the AMVP mode, a motion vector predictor candidate (MVP candidate) may be determined based on a template matching cost. For example, a motion vector predictor candidate (MVP candidate) that minimizes an error between a current template and a reference template may be selected. Thereafter, template matching for refining a motion vector may be performed on the selected motion vector predictor candidate. At this time, template matching for refining a motion vector may not be performed on unselected motion vector predictor candidates.
[0160] In the present disclosure, template matching may be a process of searching for a reference template having the highest similarity to a current template. According to the present disclosure, a template matching cost may be calculated to measure similarity, and a cost function such as SAD may be used for this purpose. A high template matching cost may mean that the template matching error is large, and thus the similarity between the templates is low. Conversely, a small template matching cost may mean that the template matching error is small, and thus the similarity between the templates is high.
[0161] In the present disclosure, the cost function used to calculate the template matching cost may be a function using the difference between the sample value in the current template and the corresponding sample value in the reference template. Therefore, the cost function may be referred to as a "difference (error)-based function" or "(error)-based equation" between the corresponding samples in the two templates. In addition, the template matching cost calculated by the cost function may be referred to as a "difference (error)-based function value" or "difference (error)-based value" between the corresponding samples in the two templates.
[0162] Reference Picture Resampling (RPR)
[0163] According to the video compression technology, adaptive resolution change (ARC) of coding layer video sequence (CLVS) can be supported. If ARC is allowed, a reference picture having a resolution different from that of the current picture can be resampled. The reference picture can be a picture included in the same layer as the current layer including the current picture. The resampling can be referred to as reference picture resampling (RPR). For example, reference picture resampling can include scaling and interpolation of the reference picture.
[0164] When ARC is enabled, inter prediction can be performed based on reference pictures with different resolutions. The reference picture can have different brightness samples with different width and / or height than the current picture. For inter prediction, the reference picture can be resampled. The prediction samples of the current block in the current picture can be derived based on the motion vector of the current block and the resampled reference picture.
[0165] MVD Sign Prediction
[0166] If the prediction mode of the current block is AMVP mode, the possible MVD symbol combinations can be sorted based on the template matching cost, and the index corresponding to the actual MVD symbol can be derived and encoded by the context model. In the decoding stage, the MVD symbol can be derived as follows.
[0167] 1) Analyze the size of the MVD components.
[0168] 2) Parse the context-coded MVD symbol prediction index.
[0169] 3) Generate motion vector candidates by generating combinations between available signs and MVD absolute values and add them to the motion vector predictor.
[0170] 4) Derive the MVD sign prediction cost of each motion vector derived based on the template matching cost and the sorting.
[0171] 5) Use the MVD symbol prediction index to select the actual MVD symbol.
[0172] According to the above-mentioned prediction process, the MVD symbol is not directly signaled, but only the symbol combination index information indicating the symbol combination actually selected from the possible symbol combinations sorted based on the template matching cost is signaled. However, if the reference picture is resampled, the reference picture must be scaled and interpolated to correspond to the size of the current picture in order to calculate the template matching cost, and this process must be performed for all possible symbol combinations. As a result, there is a problem that the throughput increases and the accuracy decreases compared to the case of referring to the reference picture that has not been resampled.
[0173] In order to solve this problem, the present disclosure proposes an adaptive MVD symbol determination method based on whether the reference picture is resampled. The various embodiments of the present disclosure described below are only intended to illustrate representative aspects of the present disclosure and can be applied individually or in combination of two or more. Hereinafter, various embodiments of the present disclosure will be described with reference to the accompanying drawings.
[0174] Implementation Method 1
[0175] According to embodiment 1 of the present disclosure, in the decoding stage, the MVD symbol can be determined differently based on whether the reference picture is resampled. Specifically, if the reference picture of the current block is resampled, the MVD symbol prediction process is skipped (or bypassed), and the MVD symbol can be obtained directly through the bitstream. In contrast, if the reference picture of the current block is not resampled, the MVD symbol can be derived from the MVD symbol list through the MVD symbol prediction process.
[0176] Fig.12 is a flowchart illustrating a method of determining MVD according to an embodiment of the present disclosure. Fig.12 The various steps can be performed by the image decoding device 200.
[0177] Reference Fig.12 , the image decoding device 200 may determine the size of the MVD to derive the MVD of the current block in an inter prediction mode (eg, AMVP mode) (S1210). In one example, the size of the MVD may be determined based on information about the MVD size obtained from the mvd_coding syntax described below (eg, abs_mvd_greater0_flag, etc.).
[0178] The image decoding apparatus 200 may determine whether the reference picture is resampled to determine the sign of the MVD ( S1220 ).
[0179] The method of determining the MVD symbol may vary depending on whether the reference picture is resampled. Specifically, if the reference picture of the current block is resampled (S1220 is "yes"), the image decoding device 200 may obtain an MVD symbol flag (e.g., mvd_sign_flag) from the mvd_coding syntax described below, and determine the MVD symbol based on the obtained MVD symbol flag (S1230). In this case, the above-mentioned template matching-based MVD symbol prediction process is skipped. In contrast, if the reference picture of the current block is not resampled (S1220 is "no"), the image decoding device 200 may perform template matching-based MVD symbol prediction to derive the MVD symbol (S1240). As described above, template matching-based MVD symbol prediction may be performed as follows: template matching is performed to sort the MVD symbol list (or MVD symbol candidate list), and an MVD symbol candidate is selected from the sorted MVD symbol list based on the MVD symbol index (or MVD symbol prediction index) (e.g., mvd_sign_pair_idx).
[0180] The above MVD determination method can be performed separately for each reference picture list or prediction direction using the mvd_coding syntax. For example, in the case of bidirectional prediction, the MVD can be determined separately for each of the L0 direction and the L1 direction. As a result, whether the reference picture is resampled and whether MVD sign prediction is performed based thereon can also be determined differently according to the reference picture list or prediction direction.
[0181] Examples of the mvd_coding syntax structure applicable to Embodiment 1 of the present disclosure are shown in Tables 3 and 4 below.
[0182] [Table 3]
[0183]
[0184] Referring to Table 3, the mvd_coding syntax may include abs_mvd_greater0_flag, abs_mvd_greater1_flag, and abs_mvd_minus2 as information about the size of the MVD. In Table 3, [0] and [1] represent the corresponding components of the MVD, for example, in an x, y coordinate system, [0] may represent the x component of the MVD, and [1] may represent the y component of the MVD. The syntax element abs_mvd_greater0_flag may indicate whether the absolute values of the individual components of the MVD are greater than 0. In addition, the syntax element abs_mvd_greater1_flag may indicate whether the absolute values of the individual components of the MVD are greater than 1. If the absolute values of the individual components of the MVD are greater than 1, the syntax element abs_mvd_minus2 may be further signaled. The value obtained by adding 2 to the syntax element abs_mvd_minus2 may represent the absolute values of the individual components of the MVD.
[0185] In addition, the mvd_coding syntax may include mvd_sign_flag as information about the MVD sign. The syntax element mvd_sign_flag may (directly) indicate the sign of each component of the MVD. For example, if mvd_sign_flag[0] is 0, the x component of the MVD may have a positive value. In contrast, if mvd_sign_flag[0] is 1, the x component of the MVD may have a negative value.
[0186] Unlike the mvd_coding syntax described above with reference to Table 2, the syntax element mvd_sign_flag can be signaled only when the reference picture is resampled. That is, if the reference picture is resampled (i.e., isRPR(refList, ref_idx_lx) = true), mvd_sign_flag is signaled, and the MVD symbol can be directly obtained through mvd_sign_flag at the decoding stage. In contrast, if the reference picture is not resampled (i.e., isRPR(refList, ref_idx_lx) = false), mvd_sign_flag is not signaled, and the MVD symbol can be derived through the above-mentioned MVD symbol prediction process at the decoding stage.
[0187] [Table 4]
[0188]
[0189] Table 4 shows an example of an mvd_coding syntax structure including an MVD symbol index. Referring to Table 4, only when the reference picture of the current block is not resampled (ie, isRPR(refList, ref_idx_lx)==false), the syntax element mvd_sign_pair_idx indicating the MVD symbol of the current block among the MVD symbol candidates can be signaled.
[0190] The syntax element mvd_sign_pair_idx may be encoded / signaled based on fixed length coding (FLC), variable length coding (VLC), or arithmetic coding. Specifically, context-adaptive binary arithmetic coding (CABAC) based on arithmetic coding, Exp-Golomb coding based on variable length coding, and fixed length coding (FLC) may be applied.
[0191] Fig.13 A specific example of a method for determining MVD based on the grammatical structures of Tables 3 and 4 is illustrated in FIG. Fig.13 The various steps can be performed by the image decoding device 200.
[0192] Reference Fig.13 , the image decoding apparatus 200 may obtain inter prediction direction information of the current block from the bitstream (S1310) and determine the inter prediction direction of the current block based on the obtained information (S1312). Here, the inter prediction direction information refers to information indicating a prediction direction (e.g., L0 prediction, L1 prediction, or BI prediction) of the current block, and may be the syntax element inter_pred_idc described above with reference to Table 1.
[0193] If the obtained information indicates L0 prediction (S1312 is "0"), the image decoding device 200 may set the predetermined control variables startRefList and endRefList to 0, respectively (S1314). Alternatively, if the obtained information indicates L1 prediction (S1312 is "1"), the image decoding device 200 may set the control variables startRefList and endRefList to 1, respectively (S1316). Alternatively, if the obtained inter-frame prediction direction information indicates BI prediction (S1312 is "2"), the image decoding device 200 may set the control variable startRefList to 0 and the control variable endRefList to 1 (S1318).
[0194] The image decoding apparatus 200 initializes a variable refPicList representing a reference picture list of the current block to be equal to the value of the control variable startRefList (S1320), and determines whether the variable refPicList is less than or equal to the control variable endRefList (S1322) to determine whether to perform MVD symbol prediction. Here, the variable refPicList being greater than the control variable endRefList may mean that the MVD symbol has been determined for all reference picture lists or prediction directions of the current block.
[0195] As a result of the determination in step S1322, if the variable refPicList is less than or equal to the control variable endRefList (S1322 is "Yes"), the image decoding device 200 may obtain an MVP index indicating one of the candidates included in the predetermined MVP candidate list and a reference picture index (e.g., refPicIdx) from the bitstream (S1330), and obtain the above-mentioned information on the MVD size (e.g., abs_mvd_greater0_flag, etc.) from the bitstream with reference to Table 3 (S1332). Then, the image decoding device 200 may determine whether the reference picture of the current block indicated by the reference picture list and the reference picture index has been resampled (S1340).
[0196] As a result of the determination in step S1340, if the corresponding reference picture is resampled (e.g., isRPR(refPicList, refPicIdx) = true) (S1340 is "Yes"), the image decoding device 200 can skip the MVD symbol prediction processing and directly obtain the MVD symbol (e.g., mvd_sign_flag) from the bitstream (S1350).
[0197] In contrast, if the reference picture is not resampled (e.g., isRPR(refPicList, refPicIdx) = false) (S1340 is "No"), the image decoding device 200 can obtain an MVD symbol index (e.g., mvd_sign_pair_idx) indicating the MVD symbol of the current block among the MVD symbol candidates from the bitstream (S1360). The MVD symbol candidate can be represented as a combination of component symbols of the MVD, and can be any one of "(0,0), (0,1), (1,0) or (1,1) (where 0: positive symbol, 1: negative symbol)" according to the x, y coordinate system, for example.
[0198] Next, the image decoding device 200 may perform template matching to sort the MVD symbol list. Specifically, the image decoding device 200 may calculate the template matching costs of all MVD symbol candidates in the MVD symbol list (S1362) and sort the MVD symbol candidates based on the calculated template matching costs (S1364). In one example, the sorting may be performed in ascending order of the template matching costs. That is, a smaller index value may be assigned to a lower template matching cost in the MVD symbol list. In addition, for MVD symbol candidates with the same template matching cost, the original order may be applied unchanged, or a predefined order (e.g., (0,0)→(0,1)→(1,0)→(1,1)) may be applied.
[0199] The image decoding apparatus 200 may derive an MVD symbol of the current block by selecting an MVD symbol candidate from the sorted MVD symbol list based on the obtained MVD symbol index (eg, mvd_sign_pair_idx) (S1366).
[0200] In addition, despite Fig.13 It is shown that after obtaining the MVD symbol index (eg, mvd_sign_pair_idx) (S1360), the MVD symbol list is sorted based on the template matching cost (S1362 and S1364), but this order is only an example and the embodiments of the present disclosure are not limited thereto. Fig.13 Different from what is shown, the MVD symbol index can of course be obtained after sorting the MVD symbol list based on the template matching cost.
[0201] When the process ( S1330 to S1366 ) is completed, the image decoding apparatus 200 may return to step S1322 , and repeat the above process for the remaining reference picture lists after increasing the variable refPicList by 1 ( S1370 ).
[0202] In addition, as a result of the determination in step S1322, if the above-mentioned variable refPicList is greater than the control variable endRefList (S1322 is "No"), the image decoding device 200 can determine that the MVD symbol is determined for all reference picture lists or prediction directions of the current block, and terminate all the above-mentioned processing.
[0203] As described above, according to embodiment 1 of the present disclosure, MVD symbol prediction processing can be performed only when the reference picture of the current block is not resampled. Therefore, the problem of increased throughput and decreased accuracy caused by performing template matching-based MVD symbol prediction for RPR reference pictures can be solved. In some applications (e.g., low-latency applications), this advantageous effect can be more prominent.
[0204] Implementation Method 2
[0205] According to embodiment 2 of the present disclosure, when performing inter-frame prediction of the current block, whether to sort the MVD symbol list can be determined based on whether the reference picture is resampled. More specifically, the above-mentioned MVD symbol prediction process is performed regardless of whether the reference picture is resampled, but the sorting of the MVD symbol list based on template matching can be performed only when the corresponding reference picture is not resampled. That is, when the reference picture of the current block is resampled, the process of sorting the MVD symbol list based on template matching can be skipped, and in this case, the MVD symbol can be derived from the predefined MVD symbol list.
[0206] Fig.14 is a flowchart illustrating a method of determining MVD according to an embodiment of the present disclosure. Fig.14 The various steps can be performed by the image decoding device 200.
[0207] Reference Fig.14 , the image decoding device 200 may determine the size of the MVD to derive the MVD of the current block in an inter prediction mode (eg, AMVP mode) (S1410). In one example, the size of the MVD may be determined based on information about the MVD size obtained from the mvd_coding syntax described below (eg, abs_mvd_greater0_flag, etc.).
[0208] The image decoding apparatus 200 may determine whether to resample the reference picture to determine the MVD symbol prediction method ( S1420 ).
[0209] Whether to perform template matching may vary depending on whether the reference picture is resampled. Specifically, if the reference picture of the current block is resampled (S1420 is "yes"), the image decoding device 200 may derive the MVD symbol from the predefined MVD symbol list (S1430). In this case, the MVD symbol list sorting process based on template matching is skipped.
[0210] In contrast, if the reference picture of the current block is not resampled (S1420 is "No"), the image decoding device 200 may perform MVD symbol prediction based on template matching to derive the MVD symbol (S1440). The MVD symbol prediction based on template matching may be performed as described above: template matching is performed to sort the MVD symbol list, and the MVD symbol of the current block is selected from the sorted MVD symbol list based on the MVD symbol index (or MVD symbol prediction index) (e.g., mvd_sign_pair_idx).
[0211] and Fig.12Similarly, the above MVD determination method can be performed separately for each reference picture list or prediction direction using the mvd_coding syntax. An example of the mvd_coding syntax structure applicable to embodiment 2 of the present disclosure is shown in Table 5 below. Hereinafter, the description of the contents repeated with Tables 3 and 4 above will be omitted, and the differences will be mainly explained.
[0212] [Table 5]
[0213]
[0214] Referring to Table 5, unlike Table 3, the mvd_coding syntax may not include the syntax element mvd_sign_flag indicating the sign of each component of the MVD. This is because the MVD sign prediction process in Embodiment 2 of the present disclosure can be performed even when the reference picture is resampled.
[0215] The mvd_coding syntax may include a syntax element mvd_sign_pair_idx indicating the MVD symbol of the current block among the MVD symbol candidates. mvd_sign_pair_idx can be signaled only when at least one of the absolute values of the components of the MVD is greater than 0 (i.e., (abs_mvd_greater0_flag[1]||abs_mvd_greater0_flag[1])=true). In addition, unlike Table 4 above, mvd_sign_pair_idx can be signaled regardless of whether the reference picture is resampled (i.e., isRPR(refList,ref_idx_lx)). This is because the MVD symbol prediction processing using mvd_sign_pair_idx in embodiment 2 of the present disclosure can be performed even when the reference picture is resampled.
[0216] mvd_sign_pair_idx can be encoded based on fixed length coding (FLC), variable length coding (VLC), or arithmetic coding. In one embodiment, if the reference picture of the current block is resampled, only fixed length coding (FLC) can be limited to be used to encode mvd_sign_pair_idx. In addition, in one embodiment, mvd_sign_pair_idx can be assigned different numbers of coding bits according to the number of components greater than 0 among the absolute values of the components of the MVD. For example, if the absolute values of the x and y components of the MVD are both greater than 0, 2 bits can be allocated to mvd_sign_pair_idx to indicate one of the four MVD symbol candidates. In contrast, if only one of the absolute values of the x and y components of the MVD is greater than 0, 1 bit can be allocated to mvd_sign_pair_idx to indicate one of the two MVD symbol candidates for the component greater than 0. In this way, by adaptively controlling the number of coded bits of mvd_sign_pair_idx based on the absolute value (or size) of each component of MVD, the number of bits can be reduced and the coding efficiency can be further improved. An example of the mvd_coding syntax structure considering adaptive control of the number of coded bits is shown in Table 6 below.
[0217] [Table 6]
[0218]
[0219] Referring to Table 6, mvd_sign_pair_idx may be signaled separately for each component of the MVD. Then, based on the mvd_sign_pair_idx of each component of the MVD (i.e., mvd_sign_pair_idx[0] and mvd_sign_pair_idx[1]), one mvd_sign_pair_idx for MVD symbol prediction may be derived (e.g., mvd_sign_pair_idx=mvd_sign_pair_idx[0]+mvd_sign_pair_idx[1]).
[0220] A specific example of a method for determining MVD based on the grammatical structure of Table 5 or Table 6 is as follows: Fig.15 shown. Fig.15 The various steps can be performed by the image decoding device 200.
[0221] Reference Fig.15 , the image decoding apparatus 200 may obtain inter prediction direction information (eg, inter_pred_idc) of the current block from a bitstream ( S1510 ), and determine the inter prediction direction of the current block based on the obtained information ( S1512 ).
[0222] If the obtained information indicates L0 prediction (S1512 is "0"), the image decoding device 200 may set the variables startRefList and endRefList to 0, respectively (S1514). Alternatively, if the obtained information indicates L1 prediction (S1512 is "1"), the image decoding device 200 may set the control variables startRefList and endRefList to 1, respectively (S1516). Alternatively, if the obtained information indicates BI prediction (S1512 is "2"), the image decoding device 200 may set the control variable startRefList to 0 and the control variable endRefList to 1 (S1518).
[0223] The image decoding apparatus 200 initializes a variable refPicList representing a reference picture list of a current block to the same value as a control variable startRefList ( S1520 ), and determines whether the variable refPicList is less than or equal to a control variable endRefList ( S1522 ) to determine whether to perform subsequent processing.
[0224] As a result of the determination in step S1522, if the variable refPicList is less than or equal to the control variable endRefList (S1522 is "Yes"), the image decoding device 200 can obtain the MVP index indicating one candidate included in the MVP candidate list and the reference picture index (e.g., refPicIdx) from the bitstream (S1530), and obtain the above-mentioned information about the MVD size (e.g., abs_mvd_greater0_flag, etc.) from the bitstream with reference to Table 5 (S1532). In addition, the image decoding device 200 can obtain the above-mentioned MVD symbol index (e.g., mvd_sign_pair_idx) from the bitstream with reference to Table 5 (S1534). The MVD symbol index can be obtained from the bitstream regardless of whether the reference picture is resampled, and in this regard, it may be different from the MVD symbol determination method according to embodiment 1 of the present disclosure ( Fig.14 Then, the image decoding apparatus 200 may determine whether the reference picture of the current block specified by the reference picture list and the reference picture index has been resampled (S1540).
[0225] As a result of the determination in step S1540, if the corresponding reference picture is resampled (e.g., isRPR(refPicList, refPicIdx) = true) (S1540 is "yes"), the image decoding apparatus 200 may set the MVD symbol list to a predefined MVD symbol list (S1550). An example of the predefined MVD symbol list is shown in Table 7 below.
[0226] [Table 7]
[0227] index MVD symbol pair 0 (0,0) 1 (0,1) 2 (1,0) 3 (1,1)
[0228] In contrast, if the reference picture is not resampled (e.g., isRPR(refPicList, refPicIdx) = false) (S1540 is "No"), the image decoding device 200 may perform template matching to sort the MVD symbol list. Specifically, the image decoding device 200 may calculate the template matching costs of all MVD symbol candidates in the MVD symbol list (S1560) and sort the MVD symbol candidates based on the calculated template matching costs (S1564). In one example, the sorting may be performed in ascending order of the template matching costs. That is, a smaller index value may be assigned to a lower template matching cost in the MVD symbol list. In addition, for MVD symbol candidates having the same template matching cost, the original order may be applied unchanged, or a predefined order may be applied (e.g., (0,0)→(0,1)→(1,0)→(1,1)).
[0229] The image decoding apparatus 200 may derive the MVD symbol of the current block by selecting a candidate from the MVD symbol list based on the MVD symbol index (e.g., mvd_sign_pair_idx) obtained in step S1534 (S1570). If the reference picture is resampled, the MVD symbol list used to derive the MVD symbol may be the MVD symbol list set in step S1550. In contrast, if the reference picture is not resampled, the MVD symbol list used to derive the MVD symbol may be the MVD symbol list sorted in steps S1560 and S1562.
[0230] When the processes ( S1530 to S1570 ) are completed, the image decoding apparatus 200 may return to step S1522 and repeat the above-described processes for the remaining reference picture lists after increasing the variable refPicList by 1 ( S1580 ).
[0231] In addition, as a result of the determination in step S1522, if the above-mentioned variable refPicList is greater than the above-mentioned control variable endRefList (S1522 is "No"), the image decoding device 200 can determine that the MVD symbol is determined for all reference picture lists or prediction directions of the current block, and terminate all the above-mentioned processing.
[0232] As described above, according to Embodiment 2 of the present disclosure, even if the reference picture of the current block is resampled, MVD symbol prediction processing can still be performed. However, only when the corresponding reference picture is not resampled, MVD symbol list sorting based on template matching can be performed. Therefore, the problem of increased throughput and decreased accuracy caused by performing MVD symbol list sorting based on template matching for RPR reference pictures can be solved.
[0233] Below, refer to Fig.16 and Fig.17 , an image encoding / decoding method according to an embodiment of the present disclosure will be described in detail.
[0234] Fig.16 is a flowchart illustrating an image encoding method according to one embodiment of the present disclosure. Fig.16 The image encoding method can be Figure 2 The image encoding device 100 is executed.
[0235] Reference Fig.16 , the image encoding apparatus 100 may generate a prediction sample of the current block by deriving a motion vector and a reference picture of the current block and performing inter prediction based on the derived motion vector and the reference picture ( S1610 ).
[0236] In order to encode the inter prediction information of the current block, a motion vector difference (MVD) of the current block may be derived based on the motion vector and motion vector predictor (MVP) of the current block (S1620). Then, the inter prediction information including information about the size and sign of the derived MVD may be encoded in the bitstream (S1630).
[0237] The information about the sign of the MVD may be determined differently based on whether the reference picture is resampled.At least one of the various embodiments of the present disclosure may be applied to determine the information about the sign of the MVD.
[0238] In one embodiment, based on the reference picture of the current block being resampled (i.e., reference picture resampling (RPR) case), the information about the symbol of the MVD may include an MVD symbol flag (e.g., mvd_sign_flag) indicating the symbol of the MVD. Alternatively, based on the reference picture not being resampled (i.e., non-RPR case), the information about the symbol of the MVD may include an MVD symbol index (e.g., mvd_sign_pair_idx) indicating one of the MVD symbol candidates included in the MVD symbol list.
[0239] In another embodiment, the information about the symbol of the MVD may include an MVD symbol index indicating one of the MVD symbol candidates included in the MVD symbol list determined based on whether the reference picture is resampled. In this case, the MVD symbol candidates included in the MVD symbol list may have different sorting orders within the MVD symbol list based on whether the reference picture is resampled. Specifically, based on the reference picture of the current block being resampled (i.e., RPR case), the MVD symbol candidates may have a predefined first sorting order within the MVD symbol list. An example of the first sorting order is as described above with reference to Table 6. Alternatively, based on the reference picture of the current block not being resampled (i.e., non-RPR case), the MVD symbol candidates may have a second sorting order determined based on the template matching cost of each MVD symbol candidate within the MVD symbol list. Here, the MVD symbol candidates having the second sorting order may mean that the MVD symbol list is sorted based on template matching.
[0240] Fig.17 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure. Fig.17 The image decoding method can be Figure 3 The image decoding device 200 is executed.
[0241] Reference Fig.17 , the image decoding device 200 may determine a motion vector difference (MVD) of the current block (S1710), and derive a motion vector of the current block based on the determined MVD and a motion vector predictor (MVP) of the current block (S1720). Then, the image decoding device 200 may perform inter-frame prediction based on the derived motion vector and a reference picture of the current block, thereby generating a prediction sample of the current block (S1730).
[0242] The sign of the MVD may be determined differently based on whether the reference picture is resampled.At least one of the various embodiments of the present disclosure may be applied to determine the sign of the MVD.
[0243] In an embodiment, based on the reference picture of the current block being resampled (ie, RPR case), the sign of the MVD can be (directly) determined based on the MVD sign flag (e.g., mvd_sign_flag) obtained from the bitstream. Alternatively, based on the reference picture of the current block not being resampled (ie, non-RPR case), the sign of the MVD can be derived from a predetermined MVD symbol list.
[0244] In another embodiment, the code of the MVD may be derived from an MVD symbol list determined based on whether the reference picture is resampled. In this case, the MVD symbol candidates included in the MVD symbol list may have different sorting orders within the MVD symbol list based on whether the reference picture is resampled. Specifically, based on the reference picture of the current block being resampled (i.e., RPR case), the MVD symbol candidates may have a predefined first sorting order within the MVD symbol list. In contrast, based on the reference picture of the current block not being resampled (i.e., non-RPR case), the MVD symbol candidates may have a second sorting order determined based on the template matching cost of each MVD symbol candidate within the MVD symbol list.
[0245] As described above, according to the image encoding / decoding method according to the embodiment of the present disclosure, the MVD symbol and its related information can be adaptively determined based on whether the reference picture is resampled. Therefore, the problem of increased throughput and decreased accuracy in the prediction process of the MVD symbol can be solved.
[0246] Although for the sake of clarity of description, the exemplary method of the present disclosure described above is represented as a series of operations, it is not intended to limit the order of executing the steps, and these steps can be performed simultaneously or in different orders when necessary. In order to implement the method according to the present invention, the steps described may further include other steps, may include the remaining steps except some steps, or may include other additional steps except some steps.
[0247] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) may perform an operation (step) of confirming an execution condition or situation of the corresponding operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is met, the image encoding device or the image decoding device may perform the predetermined operation after determining whether the predetermined condition is met.
[0248] The various embodiments of the present disclosure are not a list of all possible combinations and are intended to describe representative aspects of the present disclosure, and matters described in the various embodiments may be applied independently or in combination of two or more.
[0249] Various embodiments of the present disclosure may be implemented in hardware, firmware, software or a combination thereof. In the case of implementing the present disclosure in hardware, the present disclosure may be implemented in an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a general purpose processor, a controller, a microcontroller, a microprocessor, etc.
[0250] In addition, the image decoding device and the image encoding device to which the embodiments of the present disclosure are applied may be included in a multimedia broadcast transmission and reception device, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camera, a video on demand (VoD) service provider, an OTT video (over the top video) device, an Internet streaming service provider, a three-dimensional (3D) video device, a video phone video device, a medical video device, etc., and may be used to process a video signal or a data signal. For example, an OTT video device may include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet PC, a digital video recorder (DVR), etc.
[0251] Fig.18 is a diagram showing a content streaming system to which an embodiment of the present disclosure is applicable.
[0252] like Fig.18 As shown, the content streaming system to which the embodiments of the present disclosure are applied may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.
[0253] The encoding server compresses the content input from a multimedia input device such as a smart phone, camera, or camcorder into digital data to generate a bitstream and sends the bitstream to the streaming server. As another example, when a multimedia input device such as a smart phone, camera, or camcorder directly generates a bitstream, the encoding server can be omitted.
[0254] The bitstream may be generated by the image encoding method or the image encoding device to which the embodiments of the present disclosure are applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0255] The streaming server sends multimedia data to the user device based on the user's request through the network server, and the network server is used as a medium to inform the user of the service. When the user requests the required service from the network server, the network server can deliver it to the streaming server, and the streaming server can send the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices in the content streaming system.
[0256] The streaming server may receive content from a media storage device and / or an encoding server. For example, when receiving content from an encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream within a predetermined time.
[0257] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, head-mounted displays), digital televisions, desktop computers, digital signage, etc.
[0258] Each server in the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.
[0259] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) for enabling operations of methods according to various embodiments to be performed on a device or computer, and non-transitory computer-readable media having such software or commands stored thereon and executable on a device or computer.
[0260] Industrial Applicability
[0261] The embodiments of the present disclosure may be used to encode or decode an image.
Claims
1. An image decoding method performed by an image decoding device, the image decoding method comprising the following steps: Determine the motion vector difference MVD of the current block; deriving a motion vector of the current block based on a motion vector predictor MVP of the current block and the determined MVD; as well as generating a prediction sample of the current block based on a reference picture of the current block and the derived motion vector, The sign of the MVD is determined based on whether the reference picture is resampled.
2. The image decoding method according to claim 1, wherein: The reference picture is resampled, and the sign of the MVD is determined based on an MVD sign flag obtained from a bitstream.
3. The image decoding method according to claim 1, wherein: The sign of the MVD is derived from a predetermined MVD symbol list based on the reference picture not being resampled.
4. The image decoding method according to claim 1, wherein: The sign of the MVD is derived from an MVD sign list determined based on whether the reference picture is resampled.
5. The image decoding method according to claim 4, wherein: MVD symbol candidates included in the MVD symbol list have different sorting orders within the MVD symbol list based on whether the reference picture is resampled.
6. The image decoding method according to claim 5, wherein: Based on the reference picture being resampled, the MVD symbol candidates have a predefined first sorting order within the MVD symbol list.
7. The image decoding method according to claim 5, wherein: Based on the fact that the reference picture is not resampled, the MVD symbol candidates have a second sorting order determined based on a template matching cost of each of the MVD symbol candidates in the MVD symbol list.
8. An image encoding method performed by an image encoding device, the image encoding method comprising the following steps: Generate a prediction sample of the current block based on a motion vector of the current block and a reference picture; Derivation of a motion vector difference MVD of the current block based on a motion vector predictor MVP of the current block and the motion vector; as well as encoding inter-frame prediction information including information about the magnitude and sign of the MVD, The information about the sign of the MVD is determined based on whether the reference picture is resampled.
9. The image encoding method according to claim 8, wherein: Based on the reference picture being resampled, the information about the sign of the MVD includes an MVD symbol flag indicating the sign of the MVD.
10. The image encoding method according to claim 8, wherein: Based on the reference picture not being resampled, the information about the symbol of the MVD includes an MVD symbol index indicating one of MVD symbol candidates included in a predetermined MVD symbol list.
11. The image encoding method according to claim 8, wherein: The information about the symbol of the MVD includes an MVD symbol index indicating one of MVD symbol candidates included in a predetermined MVD symbol list, and the MVD symbol list is determined based on whether the reference picture is resampled.
12. The image encoding method according to claim 11, wherein: The MVD symbol candidates have different sorting orders within the MVD symbol list based on whether the reference picture is resampled.
13. The image encoding method according to claim 12, wherein: Based on the reference picture being resampled, the MVD symbol candidates have a predefined first sorting order within the MVD symbol list.
14. The image encoding method according to claim 12, wherein: Based on the fact that the reference picture is not resampled, the MVD symbol candidates have a second sorting order determined based on a template matching cost of each of the MVD symbol candidates in the MVD symbol list. 15 . A non-transitory computer-readable recording medium for storing a bit stream generated by the image encoding method according to claim 14 .
16. A method for transmitting a bit stream generated by an image encoding method, the image encoding method comprising the steps of: Generate a prediction sample of the current block based on a motion vector of the current block and a reference picture; Derivation of a motion vector difference MVD of the current block based on a motion vector predictor MVP of the current block and the motion vector; as well as encoding inter-frame prediction information including information about the magnitude and sign of the MVD, The information about the sign of the MVD is determined based on whether the reference picture is resampled.
