Method and apparatus for encoding / decoding image on basis of picture header including information related to co-located picture, and method for transmitting bitstream
The image encoding/decoding method improves efficiency by using a picture header with co-located picture information for high-resolution images, addressing the cost and data volume challenges of high-quality image transmission and storage.
Patent Information
- Application Number
- JP2024118464
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-12-06
- Filing Date
- 2024-07-24
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2040-12-04
AI Technical Summary
The increasing demand for high-resolution, high-quality images leads to higher transmission and storage costs due to increased data volume, necessitating more efficient image compression techniques.
An image encoding/decoding method and apparatus that utilizes a picture header containing information about co-located pictures for improved encoding/decoding efficiency and signaling mechanism, particularly through temporal motion vector prediction.
Enhances encoding/decoding efficiency and reduces signaling overhead by leveraging co-located picture information, facilitating effective transmission and storage of high-resolution images.
Smart Images

Figure 2024133397000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an image encoding / decoding method, apparatus, and method for transmitting a bitstream based on a picture header including information about a co-located picture, and more particularly to an image encoding / decoding method, apparatus, and method for transmitting a bitstream generated by the image encoding method / apparatus of the present disclosure that performs inter prediction based on a picture header including identification information of a co-located picture. [Background technology]
[0002] Recently, the demand for high-resolution, high-quality images, for example, HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various fields. As the resolution and quality of image data increases, the amount of information or bits transmitted increases relatively compared to conventional image data. The increase in the amount of information or bits transmitted leads to an increase in transmission costs and storage costs.
[0003] This requires a highly efficient image compression technique for effectively transmitting, storing, and reproducing high-resolution, high-quality image information. Summary of the Invention [Problem to be solved by the invention]
[0004] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.
[0005] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus based on a picture header that includes information about co-located pictures.
[0006] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved efficiency of the signaling mechanism for TMVP.
[0007] Another object of the present disclosure is to provide a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0008] Another object of the present disclosure is to provide a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0009] Another object of the present disclosure is to provide a recording medium storing a bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.
[0010] The technical problems to be solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described above will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the following description. [Means for solving the problem]
[0011] An image decoding method according to one aspect of the present disclosure includes the steps of: deriving a temporal motion vector predictor for a current block based on a co-located picture for the current block; deriving a motion vector for the current block based on the temporal motion vector predictor; and generating a predictive block for the current block based on the motion vector, wherein the co-located picture is determined based on identification information of the co-located picture included in a slice header of a current slice including the current block, but if the slice header does not include identification information of the co-located picture, the co-located picture can be determined based on identification information of the co-located picture included in a picture header of a current picture including the current block.
[0012] An image decoding device according to another aspect of the present disclosure includes a memory and at least one processor, wherein the at least one processor derives a temporal motion vector predictor for a current block based on a co-located picture for the current block, derives a motion vector for the current block based on the temporal motion vector predictor, and generates a predictive block for the current block based on the motion vector, wherein the co-located picture is determined based on identification information of the co-located picture included in a slice header of a current slice including the current block, but if the slice header does not include identification information of the co-located picture, the co-located picture may be determined based on identification information of the co-located picture included in a picture header of a current picture including the current block.
[0013] An image encoding method according to another aspect of the present disclosure includes the steps of generating a predictive block of a current block based on a motion vector of the current block, deriving a temporal motion vector predictor for the current block based on a co-located picture for the current block, and encoding a motion vector of the current block based on the temporal motion vector predictor, wherein identification information of the co-located picture is encoded in a slice header of a current slice including the current block, but if the identification information of the co-located picture is not encoded in the slice header, the identification information of the co-located picture may be encoded in a picture header of a current picture including the current block.
[0014] A computer-readable recording medium according to another aspect of the present disclosure can store a bitstream generated by the image encoding method or image encoding device of the present disclosure.
[0015] The features described above in the brief summary of the present disclosure are merely exemplary embodiments of the detailed description of the present disclosure that follows and are not intended to limit the scope of the present disclosure. Effect of the Invention
[0016] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.
[0017] In addition, according to the present disclosure, an image encoding / decoding method and apparatus based on a picture header including information about co-located pictures can be provided.
[0018] In addition, according to the present disclosure, an image encoding / decoding method and apparatus can be provided that improves the efficiency of the signaling mechanism for TMVP.
[0019] According to the present disclosure, there can also be provided a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.
[0020] According to the present disclosure, a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure can be provided.
[0021] Furthermore, according to the present disclosure, it is possible to provide a recording medium storing a bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.
[0022] The effects obtained by the present disclosure are not limited to the effects described above, and other effects not described above will be clearly understood by those having ordinary skill in the art to which the present disclosure pertains from the following description. [Brief description of the drawings]
[0023] [Figure 1] FIG. 1 is a schematic diagram illustrating a video coding system to which an embodiment of the present disclosure can be applied. [Diagram 2] 1 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied; [Diagram 3] 1 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied; [Figure 4] 1 is a flowchart illustrating an inter-prediction based video / image coding method. [Diagram 5] 13 is a diagram illustrating an example configuration of an inter prediction unit 180 according to the present disclosure. [Figure 6] 1 is a flowchart illustrating an inter-prediction based video / image decoding method. [Figure 7] 13 is a diagram illustrating an example configuration of an inter prediction unit 260 according to the present disclosure. [Figure 8] FIG. 13 illustrates an example of neighboring blocks used as spatial merging candidates. [Figure 9] FIG. 2 is a schematic diagram illustrating a merge candidate list construction method according to an example of the present disclosure. [Figure 10] FIG. 13 illustrates candidate pairs for redundancy checking performed on spatial candidates. [Figure 11] FIG. 13 is a diagram for explaining a method of scaling motion vectors of temporal candidates. [Figure 12] FIG. 13 is a diagram for explaining a position to which a time candidate is guided; [Figure 13] FIG. 2 is a diagram illustrating a motion vector predictor candidate list construction method according to an example of the present disclosure; [Figure 14a] A figure showing an example of a picture header including information about TMVP. [Figure 14b] A figure showing an example of a slice header including information about TMVP. [Figure 15] FIG. 2 illustrates an example of a picture header according to an embodiment of the present disclosure. [Figure 16] FIG. 2 illustrates an example of a picture header according to an embodiment of the present disclosure. [Figure 17] FIG. 2 illustrates an example of a picture header according to an embodiment of the present disclosure. [Figure 18]FIG. 2 illustrates an example of a picture header according to an embodiment of the present disclosure. [Figure 19] 1 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure. [Figure 20] 1 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure. [Figure 21] 1 is a flowchart illustrating a method for determining a co-located picture according to an embodiment of the present disclosure. [Figure 22] FIG. 1 is a diagram illustrating an example of a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0024] The present disclosure will be described in detail below with reference to the accompanying drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein.
[0025] In describing the embodiments of the present disclosure, if it is determined that a specific description of a known configuration or function may make the gist of the present disclosure unclear, the detailed description thereof will be omitted. In addition, in the drawings, parts that are not related to the description of the present disclosure are omitted, and similar parts are denoted by similar reference numerals.
[0026] In the present disclosure, when a certain component is "connected," "coupled," or "connected" to another component, this includes not only a direct connection relationship, but also an indirect connection relationship in which another component exists between them. Furthermore, when a certain component is described as "including" or "having" another component, this does not exclude another component, but means that the component can further include another component, unless otherwise specified to the contrary.
[0027] In this disclosure, terms such as "first" and "second" are used only for the purpose of distinguishing one component from another component, and do not limit the order or importance of the components unless otherwise specified. Therefore, within the scope of this disclosure, a first component in one embodiment may be called a second component in another embodiment, and similarly, a second component in one embodiment may be called a first component in another embodiment.
[0028] In this disclosure, components that are distinguished from one another are used to clearly describe the characteristics of each component, and do not necessarily mean that the components are separate. In other words, multiple components may be integrated and configured as a single hardware or software unit, or one component may be distributed and configured as multiple hardware or software units. Thus, even if not otherwise stated, such integrated or distributed embodiments are also included in the scope of the present disclosure.
[0029] In the present disclosure, the components described in the various embodiments are not necessarily essential components, and some may be optional components. Therefore, an embodiment consisting of a subset of the components described in one embodiment is also included in the scope of the present disclosure. In addition, an embodiment including other components in addition to the components described in the various embodiments is also included in the scope of the present disclosure.
[0030] The present disclosure relates to image encoding and decoding, and terms used in this disclosure may have ordinary meanings in the technical field to which the present disclosure belongs, unless they are newly defined in this disclosure.
[0031] In this disclosure, a "picture" generally means a unit indicating any one image in a particular time period, a slice / tile is a coding unit constituting a part of a picture, and one picture may be composed of one or more slices / tiles. Also, a slice / tile may include one or more coding tree units (CTUs).
[0032] In this disclosure, a "pixel" or a "pel" may refer to the smallest unit constituting one picture (or image). A term corresponding to a pixel may be a "sample." A sample may generally indicate a pixel or a pixel value, may indicate only a pixel / pixel value of a luma component, or may indicate only a pixel / pixel value of a chroma component.
[0033] In this disclosure, a "unit" may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may be used interchangeably with terms such as "sample array," "block," or "area," depending on the case. In a general case, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0034] In the present disclosure, a "current block" may refer to any one of a "current coding block," a "current coding unit," a "block to be coded," a "block to be decoded," or a "block to be processed." If prediction is performed, a "current block" may refer to a "current predicted block" or a "block to be predicted." If transformation (inverse transformation) / quantization (inverse quantization) is performed, a "current block" may refer to a "current transformed block" or a "block to be transformed." If filtering is performed, a "current block" may refer to a "block to be filtered."
[0035] In this disclosure, unless there is an explicit mention of 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 expressed by explicitly including the explicit mention of a luma component block, such as a "luma block" or a "current luma block." In addition, the chroma component block of the current block may be expressed by explicitly including the explicit mention of a chroma component block, such as a "chroma block" or a "current chroma block."
[0036] In the present disclosure, " / " and "," can be interpreted as "and / or." For example, "A / B" and "A, B" can be interpreted as "A and / or B." Also, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."
[0037] In this disclosure, "or" can be interpreted as "and / or." For example, "A or B" can mean 1) only "A," 2) only "B," or 3) "A and B." Or, in this disclosure, "or" can mean "additionally or alternatively."
[0038] Video Coding System Overview
[0039] FIG. 1 is a diagram illustrating a video coding system according to this disclosure.
[0040] A video coding system according to an embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may transmit encoded video and / or image information or data to the decoding device 20 in a file or streaming format via a digital storage medium or a network.
[0041] The encoding device 10 according to an embodiment may include a video source generating unit 11, an encoding unit 12, and a transmitting unit 13. The decoding device 20 according to an embodiment may include a receiving unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 may be referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as a video / image decoding unit. The transmitting unit 13 may be included in the encoding unit 12. The receiving unit 21 may be included in the decoding unit 22. The rendering unit 23 may include a display unit, which may be configured as a separate device or an external component.
[0042] The video source generating unit 11 can obtain the video / images through a process of capturing, synthesizing, or generating the video / images. The video source generating unit 11 can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured videos / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate the video / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced by a process in which the associated data is generated.
[0043] The encoder 12 may encode the input video / image. The encoder 12 may perform a series of steps such as prediction, transformation, quantization, etc. for compression and encoding efficiency. The encoder 12 may output the encoded data (encoded video / image information) in a bitstream format.
[0044] The transmitting unit 13 may transmit the encoded video / image information or data output in a bitstream format to the receiving unit 21 of the decoding device 20 via a digital storage medium or a network in a file or streaming format. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit 13 may include an element for generating a media file via a predetermined file format and may include an element for transmitting via a broadcasting / communication network. The receiving unit 21 may extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit 22.
[0045] The decoding unit 22 can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding unit 12.
[0046] The rendering unit 23 can render the decoded video / images. The rendered video / images can be displayed via a display unit.
[0047] Overview of the image encoding device
[0048] FIG. 2 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied.
[0049] As shown in Fig. 2, the image coding device 100 may include an image division unit 110, a subtraction unit 115, a transformation unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse transformation unit 150, an addition unit 155, a filtering unit 160, a memory 170, an inter prediction unit 180, an intra prediction unit 185, and an entropy coding unit 190. The inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a "prediction unit." The transformation unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transformation unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115.
[0050] All or at least some of the components constituting the image encoding device 100 may be realized by a single hardware component (e.g., an encoder or a processor) depending on the embodiment. Also, the memory 170 may include a decoded picture buffer (DPB) and may be realized by a digital storage medium.
[0051] The image division unit 110 may divide an input image (or picture, frame) input to the image encoding device 100 into one or more processing units. As an example, the processing units may be called coding units (CUs). The coding units may be obtained by recursively dividing a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / Binary-tree / Ternal-tree) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. For dividing the coding units, a quad-tree structure may be applied first, and a binary-tree structure and / or a ternary-tree structure may be applied later. A coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. The maximum coding unit may be used as the final coding unit, and a lower depth coding unit obtained by dividing the maximum coding unit may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or restoration, which will be described later. As another example, a processing unit of the coding procedure may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit, respectively. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0052] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on a block to be processed (current block) and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of a current block or a CU. The prediction unit may generate various information related to prediction of the current block and transmit it to the entropy encoding unit 190. The information related to prediction may be encoded by the entropy encoding unit 190 and output in a bitstream format.
[0053] The intra prediction unit 185 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block according to an intra prediction mode and / or an intra prediction technique. The intra prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, a DC mode and a Planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 185 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.
[0054] The inter prediction unit 180 may derive a predicted block for a 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 a block, a sub-block, or a sample based on the correlation of motion information between a neighboring block and a current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different from each other. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), or the like. The reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 180 may generate information indicating which candidate is used to derive a motion vector and / or a reference picture index of the current block by forming a motion information candidate list based on neighboring blocks. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit 180 may use motion information of neighboring blocks as motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, the motion vector of the current block can be signaled by using the motion vector of a neighboring block as a motion vector predictor and encoding a motion vector difference and an indicator for the motion vector predictor. The motion vector difference can mean the difference between the motion vector of the current block and the motion vector predictor.
[0055] The prediction unit may generate a prediction signal based on various prediction methods and / or prediction techniques, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of the current block, and may simultaneously apply intra prediction and inter prediction. A prediction method that simultaneously applies intra prediction and inter prediction for prediction of the current block may be called combined inter and intra prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of the current block. Intra block copy can be used for content image / video coding such as games, for example, as in screen content coding (SCC). IBC is a method of predicting a current block using an already restored reference block in a current picture that is located a predetermined distance away from the current block. When IBC is applied, the position of the reference block in the current picture may be coded as a vector (block vector) corresponding to the predetermined distance. IBC is basically performed in the current picture, but may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure.
[0056] The prediction signal generated by the prediction unit may be used to generate a restored signal or a residual signal. The subtraction unit 115 may subtract the prediction signal (predicted block, prediction sample array) output from the prediction unit from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array). The generated residual signal may be transmitted to the conversion unit 120.
[0057] The transform unit 120 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. The CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size, or may be applied to non-square, variable-sized blocks.
[0058] The quantization unit 130 may quantize the transform coefficients and transmit the quantized transform coefficients to the entropy coding unit 190. The entropy coding unit 190 may code the quantized signal (information on the quantized transform coefficients) and output the coded signal in a bitstream format. The information on the quantized transform coefficients may be referred to as residual information. The quantization unit 130 may rearrange the quantized transform coefficients in a block format into a one-dimensional vector format based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector format.
[0059] The entropy coding unit 190 can perform various coding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy coding unit 190 may also code information required for video / image restoration (e.g., syntax elements (values of syntax elements, etc.) together or separately) in addition to the quantized transform coefficients. The coded information (e.g., coded video / image information) may be transmitted or stored in a bitstream format in network abstraction layer (NAL) unit units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may also include general constraint information. The signaling information, information to be transmitted, and / or syntax elements mentioned in the present disclosure may be coded through the above-mentioned coding procedures and included in the bitstream.
[0060] The bitstream may be transmitted via a network or may be stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 190 and / or a storing unit (not shown) for storing the signal may be provided as an internal / external element of the image encoding device 100, or the transmitting unit may be provided as a component of the entropy encoding unit 190.
[0061] The quantized transform coefficients output from the quantization unit 130 can be used to generate a residual signal. For example, the quantized transform coefficients are subjected to inverse quantization and inverse transformation via the inverse quantization unit 140 and the inverse transformation unit 150, so that a residual signal (residual block or residual sample) can be restored.
[0062] The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to a prediction signal output from the inter prediction unit 180 or the intra prediction unit 185. When there is no residual for the current block to be processed, such as when a skip mode is applied, a predicted block may be used as a reconstructed block. The adder 155 may be referred to as a reconstruction unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next current block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering as described below.
[0063] The filtering unit 160 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, and the like. The filtering unit 160 may generate various information related to filtering, as will be described later in the description of each filtering method, and transmit the information to the entropy coding unit 190. The information related to filtering may be coded by the entropy coding unit 190 and output in a bitstream format.
[0064] The modified reconstructed picture transmitted to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied through this, the image encoding device 100 may avoid a prediction mismatch between the image encoding device 100 and the image decoding device, and may also improve encoding efficiency.
[0065] The DPB in the memory 170 may store modified reconstructed pictures to be used as reference pictures in the inter prediction unit 180. The memory 170 may store motion information of blocks from which motion information in the current picture is derived (or coded) and / or motion information of already reconstructed intra-picture blocks. The stored motion information may be transmitted to the inter prediction unit 180 to be used as motion information of spatial surrounding blocks or motion information of temporal surrounding blocks. The memory 170 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 185.
[0066] Overview of the image decoding device
[0067] FIG. 3 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied.
[0068] 3, the image decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265. The inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a "prediction unit." The inverse quantization unit 220 and the inverse transform unit 230 may be included in a residual processing unit.
[0069] All or at least some of the components constituting the image decoding device 200 may be realized by one hardware component (e.g., a decoder or a processor) depending on the embodiment. Also, the memory 170 may include a DPB and may be realized by a digital storage medium.
[0070] The image decoding device 200, which receives a bitstream including video / image information, can reconstruct an image by executing a process corresponding to the process performed by the image encoding device 100 of Fig. 2. For example, the image decoding device 200 can perform decoding using a processing unit applied in the image encoding device. Thus, the processing unit for decoding can be, for example, a coding unit. The coding unit can be obtained by dividing a coding tree unit or a maximum coding unit. Then, the reconstructed image signal decoded and output by the image decoding device 200 can be reproduced by a reproduction device (not shown).
[0071] The image decoding apparatus 200 may receive a signal output from the image encoding apparatus of FIG. 2 in the form of a bitstream. The received signal may be decoded via the entropy decoding unit 210. For example, the entropy decoding unit 210 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The image decoding apparatus may further use information on the parameter set and / or the general constraint information to decode an image. The signaling information, received information, and / or syntax elements referred to in the present disclosure may be obtained from the bitstream by being decoded via the decoding procedure. For example, the entropy decoding unit 210 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to the residual. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element from the bitstream, determine a context model using syntax element information to be decoded and decoded information of neighboring blocks and a block to be decoded, or information of a symbol / bin decoded in a previous step, predict the occurrence probability of the bin based on the determined context model, and perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model.Among the information decoded by the entropy decoding unit 210, information related to prediction is provided to a prediction unit (inter prediction unit 260 and intra prediction unit 265), and residual values entropy-decoded by the entropy decoding unit 210, i.e., quantized transform coefficients and related parameter information, may be input to the inverse quantization unit 220. Also, among the information decoded by the entropy decoding unit 210, information related to filtering may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) for receiving a signal output from the image encoding device may be further provided as an internal / external element of the image decoding device 200, or the receiving unit may be provided as a component of the entropy decoding unit 210.
[0072] Meanwhile, the image decoding device according to the present disclosure may be called a video / image / picture decoding device. The image decoding device may include an information decoder (video / image / picture information decoder) and / or a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoding unit 210, and the sample decoder may include at least one of an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265.
[0073] The inverse quantization unit 220 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 220 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on a coefficient scan order performed in the image encoding device. The inverse quantization unit 220 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0074] The inverse transform unit 230 can inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0075] The prediction unit may perform prediction on a current block and generate a predicted block including a prediction sample for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 210, and may determine a specific intra / inter prediction mode (prediction technique).
[0076] The prediction unit can generate a prediction signal based on various prediction methods (techniques) described below, as has been described in the explanation of the prediction unit of the image encoding device 100.
[0077] The intra prediction unit 265 may predict the current block by referring to samples in the current picture. The description of the intra prediction unit 185 may be similarly applied to the intra prediction unit 265.
[0078] The inter prediction unit 260 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 260 may configure a motion information candidate list based on the neighboring blocks, and derive a motion vector and / or a reference picture index for the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes (techniques), and the prediction information may include information indicating a mode (technique) of inter prediction for the current block.
[0079] The adder 235 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 260 and / or the intra prediction unit 265). When there is no residual for a current block to be processed, such as when a skip mode is applied, the predicted block may be used as a reconstructed block. The description of the adder 155 may be similarly applied to the adder 235. The adder 235 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of a next current block to be processed in a current picture, and may also be used for inter prediction of a next picture after filtering as described below.
[0080] The filtering unit 240 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 250, specifically, in the DPB of the memory 250. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0081] The (modified) reconstructed picture stored in the DPB of the memory 250 may be used as a reference picture in the inter prediction unit 260. The memory 250 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial surrounding block or motion information of a temporal surrounding block. The memory 250 may store a reconstructed sample of a reconstructed block in the current picture and transmit it to the intra prediction unit 265.
[0082] In this specification, the embodiments described for the filtering unit 160, inter prediction unit 180 and intra prediction unit 185 of the image encoding device 100 can also be applied in a similar or corresponding manner to the filtering unit 240, inter prediction unit 260 and intra prediction unit 265 of the image decoding device 200, respectively.
[0083] Inter Prediction Overview
[0084] The image encoding / decoding apparatus may perform inter prediction on a block-by-block basis to derive a prediction sample. Inter prediction may refer to a prediction technique derived in a manner dependent on data elements of pictures other than the current picture. When inter prediction is applied to the current block, a prediction block for the current block may be derived based on a reference block identified by a motion vector on the reference picture.
[0085] At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information of the current block may be derived based on correlation of motion information between neighboring blocks and the current block, and motion information may be derived in units of blocks, sub-blocks, or samples. At this time, the motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction type information. Here, the inter prediction type information may mean direction information of inter prediction. The inter prediction type information may indicate that the current block is predicted using any one of L0 prediction, L1 prediction, and Bi prediction.
[0086] When inter prediction is applied to a current block, the neighboring blocks of the current block may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in a reference picture. In this case, a reference picture including a reference block for the current block and a reference picture including the temporal neighboring blocks may be the same or different. A temporal neighboring block may be called a collocated reference block, a collocated coding unit (colCU), etc., and a reference picture including the temporal neighboring block may be called a collocated picture (colPic).
[0087] Meanwhile, a motion information candidate list can be constructed based on neighboring blocks of the current block, and at this time, flag or index information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block can be signaled.
[0088] The motion information may include L0 motion information and / or L1 motion information based on an inter prediction type. A motion vector in an L0 direction may be defined as an L0 motion vector or MVL0, and a motion vector in an L1 direction may be defined as an L1 motion vector or MVL1. A prediction based on an L0 motion vector may be defined as an L0 prediction, a prediction based on an L1 motion vector may be defined as an L1 prediction, and a prediction based on both the L0 motion vector and the L1 motion vector may be defined as bi-prediction. Here, an L0 motion vector may mean a motion vector associated with a reference picture list L0, and an L1 motion vector may mean a motion vector associated with a reference picture list L1.
[0089] The reference picture list L0 may include pictures earlier in the output order than the current picture as reference pictures, and the reference picture list L1 may include pictures later in the output order than the current picture. In this case, the earlier pictures may be defined as forward (reference) pictures, and the later pictures may be defined as backward (reference) pictures. Meanwhile, the reference picture list L0 may further include pictures later in the output order than the current picture. In this case, the earlier pictures may be indexed first in the reference picture list L0, and the later pictures may be indexed next. The reference picture list L1 may further include pictures earlier in the output order than the current picture. In this case, the later pictures may be indexed first in the reference picture list L1, and the earlier pictures may be indexed next. Here, the output order may correspond to a POC (picture order count) order.
[0090] FIG. 4 is a flow chart illustrating an inter-prediction based video / image coding method.
[0091] FIG. 5 is a diagram illustrating an example configuration of the inter prediction unit 180 according to the present disclosure.
[0092] The encoding method of FIG. 4 may be performed by the image encoding device of FIG. 2. Specifically, step S410 may be performed by the inter prediction unit 180, and step S420 may be performed by the residual processing unit. Specifically, step S420 may be performed by the subtraction unit 115. Step S430 may be performed by the entropy encoding unit 190. The prediction information of step S430 may be derived by the inter prediction unit 180, and the residual information of step S430 may be derived by the residual processing unit. The residual information is information on the residual sample. The residual information may include information on quantized transform coefficients for the residual sample. As described above, the residual sample may be derived as a transform coefficient via the transform unit 120 of the image encoding device, and the transform coefficient may be derived as a quantized transform coefficient via the quantization unit 130. The information on the quantized transform coefficient may be coded in the entropy encoding unit 190 through a residual coding procedure.
[0093] The image encoding apparatus may perform inter prediction on a current block (S410). The image encoding apparatus may derive an inter prediction mode and motion information of a current block, and generate a prediction sample of the current block. Here, the inter prediction mode determination, motion information derivation, and prediction sample generation procedures may be performed simultaneously, or any one procedure may be performed prior to the other procedures. For example, as shown in FIG. 5, the inter prediction unit 180 of the image encoding apparatus 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 a prediction mode for the current block, the motion information derivation unit 182 may derive motion information of the current block, and the prediction sample derivation unit 183 may derive a prediction sample of the current block. For example, the inter prediction unit 180 of the image encoding apparatus may search for a block similar to the current block within a certain area (search area) of a reference picture through motion estimation, and derive a reference block whose difference with the current block is minimum or equal to or less than a certain criterion. Based on this, a reference picture index indicating a reference picture in which the reference block is located may be derived, and a motion vector may be derived based on a difference in position between the reference block and the current block. The image encoding apparatus may determine a mode to be applied to the current block from among various inter prediction modes. The image encoding apparatus may compare rate-distortion (RD) costs for the various prediction modes and determine an optimal inter prediction mode for the current block. However, the method in which the image encoding apparatus determines the inter prediction mode for the current block is not limited to the above example, and various methods may be used.
[0094] For example, the inter prediction mode for the current block can be determined to be at least one of a merge mode, a merge skip mode, a Motion Vector Prediction mode (MVP mode), a Symmetric Motion Vector Difference (SMVD mode), an affine mode, a subblock-based merge mode, an Adaptive Motion Vector Resolution mode (AMVR mode), a History-based Motion Vector Predictor mode (HMVP mode), a Pair-wise average merge mode, a Merge mode with Motion Vector Differences mode (MMVD mode), a Decoder side Motion Vector Refinement mode (DMVR mode), a Combined Inter and Intra Prediction mode (CIIP mode), and a Geometric Partitioning mode (GPM).
[0095] For example, when a skip mode or a merge mode is applied to a current block, the image encoding apparatus may derive merge candidates from neighboring blocks of the current block and construct a merge candidate list using the induced merge candidates. The image encoding apparatus may also derive a reference block whose difference from the current block is minimum or equal to or less than a certain criterion among reference blocks indicated by merge candidates included in the merge candidate list. In this case, a merge candidate 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 image decoding apparatus. Motion information of the current block may be derived using motion information of the selected merge candidate.
[0096] As another example, when an MVP mode is applied to the current block, the image encoding apparatus may derive motion vector predictor (MVP) candidates from neighboring blocks of the current block, and may construct an MVP candidate list using the induced MVP candidates. Also, the image encoding apparatus may use a motion vector of an MVP candidate selected from among the MVP candidates included in the MVP candidate list as an MVP of the current block. In this case, for example, a motion vector indicating a reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and an MVP candidate having a motion vector with the smallest difference from the motion vector of the current block among the MVP candidates may become the selected MVP candidate. A motion vector difference (MVD), which is a difference obtained by subtracting the MVP from the motion vector of the current block, may be derived. In this case, index information indicating the selected MVP candidate and information regarding the MVD may be signaled to the image decoding apparatus. Also, when an MVP mode is applied, a value of the reference picture index may be configured as reference picture index information and separately signaled to the image decoding apparatus.
[0097] The image encoding apparatus may derive a residual sample based on the predicted sample (S420). The image encoding apparatus may derive the residual sample by comparing an original sample of the current block with the predicted sample. For example, the residual sample may be derived by subtracting a corresponding predicted sample from an original sample.
[0098] The image encoding apparatus may encode image information including prediction information and residual information (S430). The image encoding apparatus may output the encoded image information in a bitstream format. The prediction information may include prediction mode information (e.g., a skip flag, a merge flag, or a mode index) and information on motion information, which are information related to the prediction procedure. The skip flag of the prediction mode information is information indicating whether a skip mode is applied to the current block, and the merge flag is information indicating whether a merge mode is applied to the current block. Alternatively, the prediction mode information may be information indicating one of a plurality of prediction modes, such as a mode index. If the skip flag and the merge flag are each 0, it may be determined that the MVP mode is applied to the current block. The information on the motion information may include candidate selection information (e.g., a merge index, an MVP flag, or an MVP index) which is information for deriving a motion vector. The merge index of the candidate selection information may be signaled when a merge mode is applied to the current block, and may be information for selecting one of merge candidates included in a merge candidate list. Among the candidate selection information, the MVP flag or MVP index may be signaled when the MVP mode is applied to the current block, and may be information for selecting one of the MVP candidates included in the MVP candidate list. Specifically, the MVP flag may be signaled using a syntax element mvp_l0_flag or mvp_l1_flag. In addition, the information on the motion information may include the above-mentioned information on the MVD and / or reference picture index information. In addition, the information on the motion information may include information indicating whether L0 prediction, L1 prediction, or Bi-prediction is applied. The residual information is information on the residual sample.The residual information may include information regarding quantized transform coefficients for the residual samples.
[0099] The output bitstream may be stored on a (digital) storage medium and transmitted to the image decoding device, or may be transmitted to the image decoding device via a network.
[0100] Meanwhile, as described above, the image coding apparatus can generate a reconstructed picture (a picture including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is because the image coding apparatus derives the same prediction result as that performed by the image decoding apparatus, thereby improving coding efficiency. Therefore, the image coding apparatus can store the reconstructed picture (or reconstructed samples, reconstructed blocks) in a memory and use it as a picture for inter prediction. As described above, an in-loop filtering procedure can be further applied to the reconstructed picture.
[0101] FIG. 6 is a flow chart illustrating an inter-prediction based video / image decoding method.
[0102] FIG. 7 is a diagram illustrating an example configuration of the inter prediction unit 260 according to the present disclosure.
[0103] The image decoding apparatus may perform operations corresponding to those performed by the image encoding apparatus, and may perform prediction for a current block based on received prediction information to derive predicted samples.
[0104] The decoding method of FIG. 6 may be performed by the image decoding apparatus of FIG. 3. Steps S610 to S630 may be performed by the inter prediction unit 260, and the prediction information of step S610 and the residual information of step S640 may be obtained from a bitstream by the entropy decoding unit 210. The residual processing unit of the image decoding apparatus may derive a residual sample for a current block based on the residual information (S640). Specifically, the inverse quantization unit 220 of the residual processing unit may derive a transform coefficient by performing inverse quantization based on the quantized transform coefficient derived based on the residual information, and the inverse transform unit 230 of the residual processing unit may derive a residual sample for the current block by performing inverse transform on the transform coefficient. Step S650 may be performed by the adder 235 or a reconstruction unit.
[0105] Specifically, the image decoding apparatus may determine a prediction mode for the current block based on the received prediction information (S610). The image decoding apparatus may determine which inter prediction mode is applied to the current block based on prediction mode information in the prediction information.
[0106] For example, it may be determined whether the skip mode is applied to the current block based on the skip flag. Also, it may be determined whether the merge mode or the MVP mode is applied to the current block based on the merge flag. Or, it may select one of various inter prediction mode candidates based on the mode index. The inter prediction mode candidates may include skip mode, merge mode, and / or MVP mode, or may include various inter prediction modes described below.
[0107] The image decoding apparatus may derive motion information of the current block based on the determined inter prediction mode (S620). For example, when a skip mode or a merge mode is applied to the current block, the image decoding apparatus may form a merge candidate list (described later) and select one of the merge candidates included in the merge candidate list. The selection may be performed based on the candidate selection information (merge index) described above. The motion information of the current block may be derived using motion information of the selected merge candidate. For example, the motion information of the selected merge candidate may be used as motion information of the current block.
[0108] As another example, when the MVP mode is applied to the current block, the image decoding apparatus may construct an MVP candidate list, and may use a motion vector of an MVP candidate selected from among the MVP candidates included in the MVP candidate list as the MVP of the current block. The selection may be performed based on the above-mentioned candidate selection information (mvp flag or mvp index). In this case, the MVD of the current block may be derived based on information on the MVD, and the motion vector of the current block may be derived based on the MVP of the current block and the MVD. Also, the reference picture index of the current block may be derived based on the reference picture index information. A picture pointed to by the reference picture index in the associated reference picture list for the current block may be derived as a reference picture referenced for inter prediction of the current block.
[0109] The image decoding apparatus may generate a prediction sample for the current block based on the motion information of the current block (S630). In this case, the reference picture may be derived based on a reference picture index of the current block, and the prediction sample of the current block may be derived using a sample of a reference block to which the motion vector of the current block points on the reference picture. Depending on the case, a prediction sample filtering procedure may be further performed on all or some of the prediction samples of the current block.
[0110] For example, as shown in Fig. 7, the inter prediction unit 260 of the image decoding apparatus may include a prediction mode determination unit 261, a motion information derivation unit 262, and a prediction sample derivation unit 263. The inter prediction unit 260 of the image decoding apparatus may determine a prediction mode for the current block based on prediction mode information received from the prediction mode determination unit 261, derive motion information (such as a motion vector and / or a reference picture index) of the current block based on information on the motion information received from the motion information derivation unit 262, and derive a prediction sample of the current block in the prediction sample derivation unit 263.
[0111] The image decoding apparatus may generate a residual sample for the current block based on the received residual information (S640). The image decoding apparatus may generate a reconstructed sample for the current block based on the predicted sample and the residual sample, and generate a reconstructed picture based on the reconstructed sample (S650). Thereafter, an in-loop filter procedure or the like may be further applied to the reconstructed picture, as described above.
[0112] As described above, the inter prediction procedure may include an inter prediction mode determination step, a motion information derivation step according to the determined prediction mode, and a prediction execution step (generation of a prediction sample) based on the derived motion information. The inter prediction procedure may be performed in an image encoding device and an image decoding device as described above.
[0113] The motion information derivation step according to the prediction mode will be described in more detail below.
[0114] As described above, inter prediction may be performed using motion information of a current block. The image coding apparatus may derive optimal motion information for a current block through a motion estimation procedure. For example, the image coding apparatus may search for a similar reference block with high correlation using an original block in an original picture for the current block in a fractional pixel unit within a determined search range in the reference picture, thereby deriving motion information. The similarity of the blocks may be calculated based on a sum of absolute differences (SAD) between the current block and the reference block. In this case, the motion information may be derived based on a reference block with the smallest SAD in the search range. The derived motion information may be signaled to the image decoding apparatus by various methods based on the inter prediction mode.
[0115] When a merge mode is applied to a current block, the motion information of the current block is not directly transmitted, but is derived using the motion information of the neighboring blocks. Thus, the motion information of the current prediction block can be indicated by transmitting flag information indicating that the merge mode is used and candidate selection information (e.g., merge index) indicating which neighboring block is used as a merge candidate. In this disclosure, since the current block is a unit of prediction execution, the current block can be used in the same sense as the current prediction block, and the neighboring block can be used in the same sense as the neighboring prediction block.
[0116] The image encoding apparatus may search for a merge candidate block used to derive motion information of a current block to perform a merge mode. For example, but not limited to, up to 5 merge candidate blocks may be used. The maximum number of merge candidate blocks may be transmitted from a slice header or a tile group header, but is not limited to this. After finding the merge candidate blocks, the image encoding apparatus may generate a merge candidate list, and may select a merge candidate block having the smallest RD cost as a final merge candidate block.
[0117] The present disclosure provides various embodiments for the merge candidate blocks constituting the merge candidate list. The merge candidate list may use, for example, five merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate may be used.
[0118] FIG. 8 is a diagram illustrating neighboring blocks that can be used as spatial merging candidates.
[0119] FIG. 9 is a diagram illustrating a merge candidate list construction method according to an example of the present disclosure.
[0120] The image encoding device / image decoding device may insert the spatial merge candidates derived by searching the spatial peripheral blocks of the current block into the merge candidate list (S910). For example, the spatial peripheral blocks may include a lower left corner peripheral block A0, a left side peripheral block A1, a top right corner peripheral block B0, a top side peripheral block B1, and a top left corner peripheral block B2 of the current block as shown in FIG. 8. However, this is merely an example, and additional peripheral blocks such as a right side peripheral block, a bottom side peripheral block, and a bottom right side peripheral block may be used as the spatial peripheral blocks in addition to the spatial peripheral blocks described above. The image encoding device / image decoding device may search the spatial peripheral blocks based on a priority order to detect available blocks and derive motion information of the detected blocks as the spatial merge candidates. For example, the image encoding device / image decoding device may search the five blocks shown in FIG. 8 in the order of A1, B1, B0, A0, and B2, and sequentially index the available candidates to construct the merge candidate list.
[0121] The image encoding apparatus / image decoding apparatus may insert a derived temporal merge candidate into the merge candidate list by searching for a temporal peripheral block of the current block (S920). The temporal peripheral block may be located on a reference picture that is a different picture from the current picture in which the current block is located. The reference picture in which the temporal peripheral block is located may be called a collocated picture or col picture. The temporal peripheral block may be searched in the order of a lower right corner peripheral block and a lower right center block of a colocated block with respect to the current block on the col picture. Meanwhile, when motion data compression is applied to reduce memory load, specific motion information may be stored as representative motion information for each certain storage unit for the col picture. In this case, it is not necessary to store motion information for all blocks in the certain storage unit, and thus a motion data compression effect can be obtained. In this case, the certain storage unit may be predetermined, for example, in 16x16 sample units or 8x8 sample units, or size information for the certain storage unit may be signaled from the image encoding device to the image decoding device. When the motion data compression is applied, the motion information of the temporal peripheral block may be replaced with representative motion information of the certain storage unit in which the temporal peripheral block is located. That is, in this case, from the viewpoint of implementation, the temporal merge candidate may be derived based on the motion information of a prediction block that covers a position arithmetically shifted left after arithmetically shifting a certain value based on the coordinates (upper left sample position) of the temporal peripheral block, rather than based on a prediction block located at the coordinates of the temporal peripheral block. For example, if the certain storage unit is 2 n ×2 nWhen it is in sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb >> n) << n), (yTnb >> n) << n)) can be used for the temporal merge candidate. Specifically, for example, when the fixed storage unit is 16×16 sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb >> 4) << 4), (yTnb >> 4) << 4)) can be used for the temporal merge candidate. Or, for example, when the fixed storage unit is 8×8 sample units, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb >> 3) << 3), (yTnb >> 3) << 3)) can be used for the temporal merge candidate.
[0122] Referring to FIG. 9 again, the image encoding device / image decoding device can check whether the number of current merge candidates is smaller than the number of maximum merge candidates (S930). The number of the maximum merge candidates can be predefined or signaled from the image encoding device to the image decoding device. For example, the image encoding device can generate information regarding the number of the maximum merge candidates, encode it, and transmit it to the image decoding device in the form of a bit stream. When all of the number of the maximum merge candidates are satisfied, the subsequent candidate addition process (S940) cannot be performed.
[0123] If it is determined in step S930 that the number of the current merge candidates is smaller than the maximum number of merge candidates, the image encoding / decoding apparatus may derive additional merge candidates based on a predetermined method and insert the additional merge candidates into the merge candidate list (S940). The additional merge candidates may include at least one of history based merge candidate(s), pair-wise average merge candidate(s), ATMVP, combined bi-predictive merge candidate (if the slice / tile group type of the current slice / tile group is type B), and / or zero vector merge candidate.
[0124] As a result of the check in step S930, if the number of the current merging candidates is not smaller than the maximum number of merging candidates, the image encoding device / image decoding device may end construction of the merging candidate list. In this case, the image encoding device may select an optimal merging candidate from among the merging candidates constituting the merging candidate list based on an RD cost, and may signal candidate selection information (e.g., a merge candidate index) indicating the selected merging candidate to the image decoding device. The image decoding device may select the optimal merging candidate based on the merging candidate list and the candidate selection information.
[0125] As described above, the motion information of the selected merging candidate may be used as the motion information of the current block, and a predicted sample of the current block may be derived based on the motion information of the current block. The image encoding apparatus may derive a residual sample of the current block based on the predicted sample, and may signal residual information regarding the residual sample to an image decoding apparatus. As described above, the image decoding apparatus may generate a reconstructed sample based on the residual sample derived based on the residual information and the predicted sample, and generate a reconstructed picture based on the reconstructed sample.
[0126] When a skip mode is applied to a current block, motion information of the current block can be derived in the same manner as when a merge mode is applied to the previous block. However, when the skip mode is applied, the residual signal for the block is omitted. Therefore, the predicted samples can be used immediately as reconstructed samples. The skip mode can be applied, for example, when the value of cu_skip_flag is 1.
[0127] Hereinafter, a method for deriving spatial candidates in the merge mode and / or skip mode will be described. The spatial candidates may indicate the spatial merge candidates described above.
[0128] The derivation of spatial candidates may be performed based on spatially neighboring blocks. For example, up to four spatial candidates may be derived from the candidate blocks present at the positions shown in FIG. 8. The order of derivation of spatial candidates may be A1->B1->B0->A0->B2. However, the order of derivation of spatial candidates is not limited to the above order, and may be, for example, B1->A1->B0->A0->B2. The last position in the order (position B2 in the above example) may be considered when at least one of the preceding four positions (A1, B1, B0, and A0 in the above example) is unavailable. In this case, the fact that a block at a certain position is unavailable may include a case where the block belongs to a different slice or a different tile from the current block, or the block is an intra-predicted block. When a spatial candidate is derived from the first position in the order (A1 or B1 in the above example), a redundancy check may be performed on the spatial candidates at the subsequent positions. For example, if the motion information of a subsequent spatial candidate is the same as the motion information of a spatial candidate already included in the merge candidate list, the subsequent spatial candidate is not included in the merge candidate list, thereby improving coding efficiency. Redundancy checks performed on subsequent spatial candidates are not performed on all candidate pairs as much as possible, but are performed only on some candidate pairs, thereby reducing computational complexity.
[0129] FIG. 10 is a diagram illustrating candidate pairs for redundancy checking performed on spatial candidates.
[0130] In the example shown in Fig. 10, a redundancy check for spatial candidates at B0 position can only be performed for spatial candidates at A0 position. Also, a redundancy check for spatial candidates at B1 position can only be performed for spatial candidates at B0 position. Also, a redundancy check for spatial candidates at A1 position can only be performed for spatial candidates at A0 position. Finally, a redundancy check for spatial candidates at B2 position can only be performed for spatial candidates at A0 and B0 positions.
[0131] The example shown in Fig. 10 is an example in which the order of deriving spatial candidates is A0->B0->B1->A1->B2. However, the present invention is not limited to this, and even if the order of deriving spatial candidates is changed, redundancy check can be performed only for some candidate pairs as in the example shown in Fig. 10.
[0132] In the following, a method for deriving temporal candidates in the case of merge mode and / or skip mode will be described. The temporal candidates may indicate the above-mentioned temporal merge candidates. In addition, the motion vectors of the temporal candidates may correspond to the temporal candidates in the MVP mode.
[0133] Only one temporal candidate may be included in the merge candidate list. In the process of deriving a temporal candidate, the motion vector of the temporal candidate may be scaled. For example, the scaling may be performed based on a co-located block (Cu) (hereinafter referred to as a "col block") belonging to a co-located reference picture (colPic) (hereinafter referred to as a "col picture"). The reference picture list used to derive the col block may be explicitly signaled in the slice header.
[0134] FIG. 11 is a diagram for explaining a method of scaling motion vectors of temporal candidates.
[0135] In FIG. 11, curr_CU and curr_pic indicate a current block and a current picture, and col_CU and col_pic indicate a col block and a col picture. Furthermore, curr_ref indicates a reference picture of the current block, and col_ref indicates a reference picture of the col block. Furthermore, tb indicates a distance between the reference picture of the current block and the current picture, and td indicates a distance between the reference picture of the col block and the col picture. The tb and td may be expressed as a value corresponding to a difference in POC (Picture Order Count) between pictures. Scaling of a motion vector of a temporal candidate may be performed based on tb and td. Furthermore, a reference picture index of a temporal candidate may be set to 0.
[0136] FIG. 12 is a diagram for explaining positions to which time candidates are guided.
[0137] In FIG. 12, a block with a thick solid line indicates a current block. A temporal candidate may be derived from a block in a col picture corresponding to a C0 position (lower right position) or a C1 position (center position) in FIG. 12. First, it is determined whether the C0 position is available, and if the C0 position is available, a temporal candidate may be derived based on the C0 position. If the C0 position is not available, a temporal candidate may be derived based on the C1 position. For example, if a block in a col picture at the C0 position is an intra-predicted block or exists outside the current CTU row, it may be determined that the C0 position is not available.
[0138] As described above, when motion data compression is applied, the motion vector of the col block can be stored for each predetermined unit block. In this case, the C0 position or the C1 position can be modified to derive the motion vector of the block covering the C0 position or the C1 position. For example, when the predetermined unit block is an 8×8 block and the C0 position or the C1 position is (xColCi, yColCi), the position for deriving the temporal candidate can be modified to ((xColCi>>3)<<3, (yColCi)>>3)<<3).
[0139] Hereinafter, a method for deriving a history-based candidate in the case of the merge mode and / or the skip mode will be described. The history-based candidate can be expressed as a history-based merge candidate.
[0140] History-based candidates may be added to the merge candidate list after spatial and temporal candidates are added to the merge candidate list. For example, motion information of a previously encoded / decoded block is stored in a table and can be used as a history-based candidate for a current block. The table can store a number of history-based candidates during the encoding / decoding process. The table can be initialized when a new CTU row begins. Initializing the table can mean that all history-based candidates stored in the table are deleted and the table becomes empty. Whenever there is an inter-predicted block, associated motion information can be added to the table as the last entry. In this case, the inter-predicted block may not be a block predicted based on a sub-block. The motion information added to the table can be used as a new history-based candidate.
[0141] The table of history-based candidates may have a predetermined size. For example, the size may be 5. In this case, the table may store up to 5 history-based candidates. When a new candidate is added to the table, a limited first-in-first-out (FIFO) rule may be applied, in which a redundancy check is first performed to see if an identical candidate exists in the table. If an identical candidate already exists in the table, the identical candidate may be removed from the table and the positions of all subsequent history-based candidates may be moved forward.
[0142] The history-based candidates can be used in the process of constructing a merge candidate list. In this case, the history-based candidates most recently included in the table are checked in sequence and can be included in the merge candidate list at a position after the temporal candidate. When the history-based candidate is included in the merge candidate list, a redundancy check with the spatial or temporal candidates already included in the merge candidate list can be performed. If the history-based candidate overlaps with a spatial or temporal candidate already included in the merge candidate list, the history-based candidate may not be included in the merge candidate list. The redundancy check can be simplified as follows to reduce the amount of calculation.
[0143] The number of history-based candidates used to generate the merge candidate list may be set to (N<=4)?M:(8-N), where N indicates the number of candidates already included in the merge candidate list, and M indicates the number of available history-based candidates stored in the table. That is, when the merge candidate list includes four or fewer candidates, the number of history-based candidates used to generate the merge candidate list is M, and when the merge candidate list includes N candidates, which is greater than four, the number of history-based candidates used to generate the merge candidate list may be set to (8-N).
[0144] When the total number of available merge candidates reaches (maximum allowed number of merge candidates minus 1), construction of the merge candidate list using history-based candidates can be terminated.
[0145] Hereinafter, a method for deriving pair-wise average candidates in the merge mode and / or skip mode will be described. The pair-wise average candidates can be expressed as pair-wise average merge candidates or pair-wise candidates.
[0146] Pair-wise average candidates can be generated by obtaining already-defined candidate pairs from candidates included in the merge candidate list and averaging them. The already-defined candidate pairs are {(0,1), (0,2), (1,2), (0,3), (1,3), (2,3)}, and the numbers constituting each candidate pair can be an index of the merge candidate list. That is, the already-defined candidate pair (0,1) means a pair of index 0 candidate and index 1 candidate in the merge candidate list, and the pair-wise average candidate can be generated by averaging the index 0 candidate and index 1 candidate. Pair-wise average candidates can be derived in the order of the already-defined candidate pairs. That is, after deriving a pair-wise average candidate for the candidate pair (0,1), a pair-wise average candidate derivation process can be performed in the order of the candidate pair (0,2) and the candidate pair (1,2). The pair-wise average candidate derivation process can be performed until the construction of the merge candidate list is completed. For example, the pair-wise average candidate derivation process may be performed until the number of merging candidates included in the merging candidate list reaches the maximum number of merging candidates.
[0147] Pair-wise average candidates can be calculated separately for each reference picture list. If two motion vectors are available for one reference picture list (L0 list or L1 list), the average of these two motion vectors can be calculated. In this case, the average of the two motion vectors can be calculated even if the two motion vectors point to different reference pictures. If only one motion vector is available for one reference picture list, the available motion vector can be used as the motion vector of the pair-wise average candidate. If not all two motion vectors are available for one reference picture list, the reference picture list can be determined to be invalid.
[0148] If the construction of the merge candidate list is not complete even after the pair-wise average candidates are included in the merge candidate list, zero vectors can be added to the merge candidate list until the maximum number of merge candidates is reached.
[0149] When the MVP mode is applied to the current block, a motion vector predictor (MVP) candidate list can be generated using the motion vector of the restored spatial surrounding block (e.g., the surrounding block shown in FIG. 8) and / or the motion vector corresponding to the temporal surrounding block (or Col block). That is, the motion vector of the restored spatial surrounding block and / or the motion vector corresponding to the temporal surrounding block can be used as a motion vector predictor candidate of the current block. When bi-prediction is applied, an MVP candidate list for deriving L0 motion information and an MVP candidate list for deriving L1 motion information can be generated and used separately. Prediction information (or prediction information) for the current block can include candidate selection information (e.g., an MVP flag or an MVP index) indicating an optimal motion vector predictor candidate selected from the motion vector predictor candidates included in the MVP candidate list. In this case, the prediction unit can select a motion vector predictor of the current block from the motion vector predictor candidates included in the MVP candidate list using the candidate selection information. The prediction unit of the image encoding device may obtain a motion vector difference (MVD) between a motion vector of a current block and a motion vector predictor, and may encode the obtained motion vector difference and output the motion vector difference in a bitstream format. That is, the MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block. The prediction unit of the image decoding device may obtain a motion vector difference included in information related to 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 image decoding device may obtain or induce a reference picture index indicating a reference picture, etc., from information related to the prediction.
[0150] FIG. 13 is a diagram illustrating a motion vector predictor candidate list construction method according to an example of the present disclosure.
[0151] First, the spatial candidate blocks of the current block are searched, and available candidate blocks can be inserted into the MVP candidate list (S1310). Then, it is determined whether the MVP candidate list contains less than two MVP candidates (S1320). If there are two, the construction of the MVP candidate list can be completed.
[0152] In step S1320, if there are less than two spatial candidate blocks available, the temporal candidate blocks of the current block may be searched for and the available candidate blocks may be inserted into the MVP candidate list (S1330). If no temporal candidate blocks are available, the construction of the MVP candidate list may be completed by inserting a zero motion vector into the MVP candidate list (S1340).
[0153] On the other hand, when the MVP mode is applied, the reference picture index may be explicitly signaled. In this case, a picture index (refidxL0) for L0 prediction and a reference picture index (refidxL1) for L1 prediction may be signaled separately. For example, when the MVP mode is applied and bi-prediction (BI prediction) is applied, information on refidxL0 and information on refidxL1 may both be signaled.
[0154] As described above, when the MVP mode is applied, information on the MVD derived from the image coding apparatus may be signaled to the image decoding apparatus. The information on the MVD may include, for example, information indicating x, y components for the MVD absolute value and the sign. In this case, information indicating whether the MVD absolute value is greater than 0 and greater than 1, and the rest of the MVD may be signaled stepwise. For example, information indicating whether the MVD absolute value is greater than 1 may be signaled only when the value of flag information indicating whether the MVD absolute value is greater than 0 is 1.
[0155] Overview of TMVP (temporal motion vector predictor) signaling
[0156] As described above, a temporal motion vector predictor (TMVP) used as a temporal merge candidate or a temporal MVP candidate for inter prediction of the current block may be derived. The TMVP may be derived based on temporal neighboring blocks in a collocated (reference) picture (colPic). Here, the temporal neighboring blocks may include a collocated reference block (colCb) of the current block.
[0157] The information / syntax element indicating the co-located reference block (colCb) can be signaled via a high level syntax (HLS) such as a picture header. To encode / decode the bitstream, a TMVP coding tool can be used. The signaling mechanism for TMVP is as follows:
[0158] TMVP can be used for picture coding in a coded layer video sequence (CLVS). Whether TMVP is available for a picture in a CLVS can be determined based on certain flag information (e.g., sps_temporal_mvp_enabled_flag) in a sequence parameter set (SPS). For example, sps_temporal_mvp_enabled_flag having a first value (e.g., 0) can indicate that TMVP is not available for a picture in a CLVS, and sps_temporal_mvp_enabled_flag having a second value (e.g., 1) can indicate that TMVP is available for a picture in a CLVS.
[0159] When TMVP is available for a picture in the CLVS, whether TMVP is available for each picture may be determined based on predetermined flag information (e.g., pic_temporal_mvp_enabled_flag) in a picture header. For example, pic_temporal_mvp_enabled_flag having a first value (e.g., 0) may indicate that TMVP is not available for inter prediction for a slice in a picture associated with the picture header. In this case, syntax elements for slices in a picture associated with the picture header may be restricted so that TMVP is not used for slice decoding. Differently, pic_temporal_mvp_enabled_flag having a second value (e.g., 1) may indicate that TMVP is available for inter prediction for a slice in a picture associated with the picture header. On the other hand, if pic_temporal_mvp_enabled_flag is not signaled, the value of pic_temporal_mvp_enabled_flag may be inferred to be the first value (e.g., 0). Meanwhile, if there is no reference picture having the same spatial resolution as the current picture in a decoded picture buffer (DPB), the value of pic_temporal_mvp_enabled_flag may be limited to a first value (eg, 0).
[0160] If TMVP is available for a given picture, then for each slice within that picture, information about TMVP, such as the identity of the co-located picture (colPic), can be signaled.
[0161] FIG. 14a shows an example of a picture header including information about TMVP.
[0162] 14a, whether TMVP is available at the sequence level can be determined based on predetermined flag information (e.g., sps_temporal_mvp_enabled_flag) at the sequence level. For example, sps_temporal_mvp_enabled_flag having a first value (e.g., 0) can indicate that TMVP is not available at the sequence level. In contrast, sps_temporal_mvp_enabled_flag having a second value (e.g., 1) can indicate that TMVP is available at the sequence level.
[0163] If TMVP is available at the sequence level, pic_temporal_mvp_enabled_flag may be signaled via the picture header. For example, pic_temporal_mvp_enabled_flag with a first value (e.g., 0) may indicate that TMVP is not available at the picture level. In contrast, pic_temporal_mvp_enabled_flag with a second value (e.g., 1) may indicate that TMVP is available at the picture level.
[0164] FIG. 14b shows an example of a slice header including information about TMVP.
[0165] Referring to FIG. 14b, num_ref_idx_active_override_flag may indicate the presence or absence of num_ref_idx_active_minus1[i]. For example, num_ref_idx_active_override_flag having a first value (e.g., 0) may indicate that num_ref_idx_active_minus1[0] and num_ref_idx_active_minus1[1] do not exist. In contrast, num_ref_idx_active_override_flag having a second value (e.g., 1) may indicate that num_ref_idx_active_minus1[0] exists for P slices and B slices, and that num_ref_idx_active_minus1[1] exists for B slices. Meanwhile, if num_ref_idx_active_override_flag is not signaled, the value of num_ref_idx_active_override_flag may be inferred to be the second value (e.g., 1).
[0166] num_ref_idx_active_minus1[i] may be used to derive a variable NumRefIdxActive[i], where a value obtained by subtracting 1 from the variable NumRefIdxActive[i] may indicate the maximum reference index of the i-th (where i is 0 or 1) reference picture list (RPL) used in decoding the current slice. In one example, the value of num_ref_idx_active_minus1[i] may be 0 to 14 inclusive.
[0167] If the current slice is a B slice, num_ref_idx_active_override_flag has a second value (e.g., 1), and num_ref_idx_active_minus1[i] is not present, the value of num_ref_idx_active_minus1[i] can be inferred to be a first value (e.g., 0). Alternatively, if the current slice is a P slice, num_ref_idx_active_override_flag has a second value (e.g., 1), and num_ref_idx_active_minus1[0] is not present, the value of num_ref_idx_active_minus1[0] can be inferred to be a first value (e.g., 0).
[0168] Based on the value of num_ref_idx_active_minus1[i], the variable NumRefIdxActive[i] can be derived as shown in Table 1 below.
[0169] [Table 1]
[0170] In Table 1, NumRefIdxActive[i] having a first value (e.g., 0) may indicate that the current slice cannot be decoded based on a reference index in the i-th (where i is 0 or 1) reference picture list.
[0171] In one example, if the current slice is a P slice, the value of NumRefIdxActive[0] may be greater than 0. Also, if the current slice is a B slice, the values of NumRefIdxActive[0] and NumRefIdxActive[1] may be greater than 0.
[0172] Continuing to refer to FIG. 14b, collocated_from_l0_flag may indicate from which of the reference picture lists L0 and L1 a co-located picture (colPic) for TMVP is derived (i.e., direction information of the co-located picture (colPic)). For example, collocated_from_l0_flag having a first value (e.g., 0) may indicate that the co-located picture (colPic) is derived from the reference picture list L1. Differently, collocated_from_l0_flag having a second value (e.g., 1) may indicate that the co-located picture (colPic) is derived from the reference picture list L0. On the other hand, if collocated_from_l0_flag is not signaled and the slice type is not a B slice, the value of collocated_from_l0_flag may be inferred to be the second value (e.g., 1). Alternatively, if collocated_from_l0_flag is not signaled and the slice type is a B slice, the value of collocated_from_l0_flag can be inferred to be pps_collocated_from_l0_idc minus 1. Here, pps_collocated_from_l0_idc can indicate whether collocated_from_l0_flag is present in the slice header. For example, if collocated_from_l0_flag is present in the slice header, pps_collocated_from_l0_idc can have a first value (e.g., 0). Alternatively, if collocated_from_l0_flag is not present in the slice header, pps_collocated_from_l0_idc can have a second value (e.g., 1) or a third value (e.g., 2).
[0173] collocated_ref_idx may indicate a reference picture index of a co-located picture (colPic) for TMVP. For example, if the slice type is a P slice or a B slice (i.e., the value of NumRefIdxActive[0] is greater than 0) and collocated_from_l0_flag has a second value (e.g., 1), collocated_ref_idx may point to a reference picture in the reference picture list L0. Here, the value of collocated_ref_idx may be greater than or equal to 0 and less than or equal to NumRefIdxActive[0] minus 1. Or, if the slice type is a B slice (i.e., the value of NumRefIdxActive[1] is greater than 0) and collocated_from_l0_flag has a first value (e.g., 0), collocated_ref_idx may point to a reference picture in the reference picture list L1. Here, the value of collocated_ref_idx may be greater than or equal to 0 and less than or equal to NumRefIdxActive[1] minus 1. On the other hand, if collocated_ref_idx is not signaled, the value of collocated_ref_idx may be inferred to be a first value (eg, 0).
[0174] In one example, it may be a constraint for bitstream compatibility that the reference pictures identified by collocated_ref_idx are identical to each other for all slices related to the coded picture. In another example, it may be a constraint for bitstream compatibility that the resolutions of the reference picture identified by collocated_ref_idx and the current picture are identical to each other and the value of RefPicIsScaled[collocated_from_l0_flag?0:1][collocated_ref_idx] is a first value (e.g., 0).
[0175] In the signaling mechanism for TMVP described above with reference to Figures 14a and 14b, information about the co-located picture (colPic), for example, identification information of the co-located picture (colPic) (for example, collocated_from_l0_flag and collocated_ref_idx), can be signaled only via the slice header. However, when the same co-located picture (colPic) is applied to all slices in a picture, the signaling mechanism for TMVP described above requires that information about the co-located picture (colPic) must be signaled for each slice, which may cause a problem of increased signaling overhead.
[0176] To solve such problems, according to an embodiment of the present disclosure, information regarding co-located pictures (colPic) for TMVP can be signaled via a slice header or can be signaled via a higher level syntax, such as a picture header.
[0177] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
[0178] 15 to 18 are diagrams illustrating an example of a picture header according to an embodiment of the present disclosure.
[0179] First, referring to FIG. 15, the picture header is information regarding a colPic for TMVP, and may include pic_collocated_from_l0_flag and pic_collocated_ref_idx.
[0180] pic_collocated_from_l0_flag and pic_collocated_ref_idx can only be signaled if TMVP is available at the picture level (e.g., pic_temporal_mvp_enabled_flag==1).
[0181] The pic_collocated_from_l0_flag may indicate from which of reference picture list, reference picture list 0 (RPL0) and reference picture list 1 (RPL1), a co-located picture (colPic) for TMVP is derived (i.e., direction information of the co-located picture (colPic)). For example, pic_collocated_from_l0_flag having a first value (e.g., 0) may indicate that the co-located picture (colPic) is derived from reference picture list 1 (RPL1). Differently, pic_collocated_from_l0_flag having a second value (e.g., 1) may indicate that the co-located picture (colPic) is derived from reference picture list 0 (RPL0). On the other hand, if pic_collocated_from_l0_flag is not signaled and the number of entries in reference picture list 1 (RPL1) (e.g., num_ref_entries[1][RplsIdx[1]]) is 0, the value of pic_collocated_from_l0_flag can be inferred to be a second value (e.g., 1), i.e., the co-located picture (colPic) can be derived from reference picture list 0 (RPL0).
[0182] If pic_collocated_from_l0_flag has a second value (e.g., 1) and the number of entries in reference picture list 0 (RPL0) is greater than 1 (e.g., num_ref_entries[0][RplsIdx[0]]>1), pic_collocated_ref_idx may be signaled. Alternatively, if pic_collocated_from_l0_flag has a first value (e.g., 0) and the number of entries in reference picture list 1 (RPL1) is greater than 1 (e.g., num_ref_entries[1][RplsIdx[1]]>1), pic_collocated_ref_idx may be signaled.
[0183] pic_collocated_ref_idx may indicate a reference picture index of a co-located picture (colPic) for TMVP. For example, if pic_collocated_from_l0_flag has a second value (e.g., 1) and pic_collocated_ref_idx indicates one of the entries in Reference Picture List 0 (RPL0), the value of pic_collocated_ref_idx may be greater than or equal to 0 and less than or equal to the number of entries in Reference Picture List 0 (RPL0) minus 1. In contrast, if pic_collocated_from_l0_flag has a first value (e.g., 0) and pic_collocated_ref_idx indicates one of the entries in Reference Picture List 1 (RPL1), the value of pic_collocated_ref_idx may be greater than or equal to 0 and less than or equal to the number of entries in Reference Picture List 1 (RPL1) minus 1. On the other hand, if pic_collocated_ref_idx is not signaled, the value of pic_collocated_ref_idx can be inferred to be a first value (eg, 0).
[0184] In one example, information about the co-located picture (colPic) may be signaled in both the picture header and the slice header. For example, information about the co-located picture (colPic) may be signaled via the picture header, but also via the slice header for at least some of the slices associated with the picture header. In this case, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) signaled via the slice header (e.g., collocated_from_l0_flag and collocated_ref_idx).
[0185] In another example, information on the co-located picture (colPic) may be selectively signaled via a picture header or a slice header. In this case, whether information on the co-located picture (colPic) is signaled via a picture header (or a slice header) may be determined based on predetermined signaling information (e.g., pps_rpl_info_in_ph_flag) in the picture header (and / or slice header). For example, if the signaling information has a second value (e.g., 1), information on the co-located picture (colPic) may be signaled via a picture header. In contrast, if the signaling information has a first value (e.g., 0), information on the co-located picture (colPic) may be signaled via a slice header. The signaling information may configure a signaling condition of pic_collocated_from_l0_flag together with pic_temporal_mvp_enabled_flag. In addition, the signaling information may configure a signaling condition of collocated_from_l0_flag together with pic_temporal_mvp_enabled_flag in the slice header described above with reference to FIG. 14b.
[0186] When information about the co-located picture (colPic) is signaled through a slice header, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) obtained through the slice header. In contrast, when information about the co-located picture (colPic) is signaled only through a picture header, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) obtained through the picture header. For example, when collocated_ref_idx is not signaled through the slice header described above with reference to FIG. 14b (e.g., pps_rpl_info_in_ph_flag==1), the value of collocated_ref_idx may be inferred to be the same value as pic_collocated_ref_idx obtained through a picture header. When pic_collocated_ref_idx is not signaled through either the slice header or the picture header, the value of collocated_ref_idx may be inferred to be a first value (e.g., 0).
[0187] On the other hand, it may be a restriction for bitstream compatibility that the co-located picture (colPic) for TMVP is an already reconstructed picture different from the current picture.
[0188] Another example of a picture header according to an embodiment of the present disclosure is as shown in FIG.
[0189] Referring to FIG. 16, the picture header may include col_ref_delta_poc_val, which is information regarding the co-located picture (colPic) for TMVP.
[0190] col_ref_delta_poc_val can only be signaled if TMVP is available for the current picture (eg, pic_temporal_mvp_enabled_flag==1).
[0191] col_ref_delta_poc_val may indicate a POC (picture order count) difference between the current picture and the co-located picture (colPic) for TMVP. For example, col_ref_delta_poc_val may have a value obtained by subtracting the POC of the co-located picture (colPic) from the POC of the current picture. Alternatively, col_ref_delta_poc_val may have a value obtained by subtracting the POC of the co-located picture (colPic) from the POC of the current picture. col_ref_delta_poc_val may have a positive sign (+) or a negative sign (-) and may be expressed as a signed integer type.
[0192] In one example, information about the co-located picture (colPic) may be signaled in both the picture header and the slice header. For example, information about the co-located picture (colPic) may be signaled via the picture header, but also via the slice header for at least some of the slices associated with the picture header. In this case, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) signaled via the slice header (e.g., collocated_from_l0_flag and collocated_ref_idx).
[0193] In another example, information on the co-located picture (colPic) may be selectively signaled via a picture header or a slice header. In this case, whether information on the co-located picture (colPic) is signaled via a picture header (or a slice header) may be determined based on predetermined signaling information (e.g., pps_rpl_info_in_ph_flag) in the picture header (and / or slice header). For example, if the signaling information has a second value (e.g., 1), information on the co-located picture (colPic) may be signaled via a picture header. In contrast, if the signaling information has a first value (e.g., 0), information on the co-located picture (colPic) may be signaled via a slice header.
[0194] When information about the co-located picture (colPic) is signaled via a slice header, in an image decoding step, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) obtained via the slice header (e.g., collocated_from_l0_flag and collocated_ref_idx). In contrast, when information about the co-located picture (colPic) is signaled only via a picture header, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) obtained via the picture header (e.g., col_ref_delta_poc_val).
[0195] On the other hand, it may be a restriction for bitstream compatibility that the co-located picture (colPic) for TMVP is an already reconstructed picture different from the current picture.
[0196] Another example of a picture header according to one embodiment of the present disclosure is as shown in FIG.
[0197] Referring to FIG. 17, the picture header includes information regarding the co-located picture (colPic) for TMVP, which may include col_ref_abs_delta_poc_val and col_ref_abs_delta_poc_sign_flag.
[0198] col_ref_abs_delta_poc_val and col_ref_abs_delta_poc_sign_flag can only be signaled if TMVP is available at the picture level (e.g., pic_temporal_mvp_enabled_flag==1).
[0199] col_ref_abs_delta_poc_val may indicate an absolute value of a POC (picture order count) difference between a current picture and a co-located picture (colPic) for TMVP. For example, col_ref_abs_delta_poc_val may have an absolute value of a value obtained by subtracting the POC of the co-located picture (colPic) from the POC of the current picture. Alternatively, col_ref_abs_delta_poc_val may have an absolute value of a value obtained by subtracting the POC of the current picture from the POC of the co-located picture (colPic). col_ref_abs_delta_poc_val indicates an absolute value of a POC difference between a current picture and a co-located picture (colPic), and may be expressed as an unsigned integer type, unlike col_ref_delta_poc_val in FIG. 16.
[0200] col_ref_abs_delta_poc_sign_flag may indicate the sign of the POC difference between the current picture and the co-located picture (colPic) for TMVP. For example, if the POC of the current picture is greater than the POC of the co-located picture (colPic) (or vice versa), col_ref_abs_delta_poc_sign_flag may have a second value (e.g., 1) indicating a positive sign (+). In contrast, if the POC of the current picture is equal to or less than the POC of the co-located picture (colPic) (or vice versa), col_ref_abs_delta_poc_sign_flag may have a first value (e.g., 0) indicating a negative sign (-).
[0201] In one example, information about the co-located picture (colPic) may be signaled in both the picture header and the slice header. For example, information about the co-located picture (colPic) may be signaled via the picture header, but also via the slice header for at least some of the slices associated with the picture header. In this case, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) signaled via the slice header (e.g., collocated_from_l0_flag and collocated_ref_idx).
[0202] In another example, information on the co-located picture (colPic) may be selectively signaled via a picture header or a slice header. In this case, whether information on the co-located picture (colPic) is signaled via a picture header (or a slice header) may be determined based on predetermined signaling information in the picture header (and / or slice header). For example, when the signaling information has a second value (e.g., 1), information on the co-located picture (colPic) may be signaled via a picture header. Differently, when the signaling information has a first value (e.g., 0), information on the co-located picture (colPic) may be signaled via a slice header.
[0203] When information about the co-located picture (colPic) is signaled via a slice header, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) obtained via the slice header (e.g., collocated_from_l0_flag and collocated_ref_idx). In contrast, when information about the co-located picture (colPic) is signaled only via a picture header, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) obtained via the picture header (e.g., col_ref_abs_delta_poc_val and col_ref_abs_delta_poc_sign_flag).
[0204] On the other hand, it may be a restriction for bitstream compatibility that the co-located picture (colPic) for TMVP is an already reconstructed picture different from the current picture.
[0205] Another example of a picture header according to one embodiment of the present disclosure is as shown in FIG.
[0206] Referring to FIG. 18, the picture header may include information regarding the co-located picture (colPic) for TMVP, such as col_ref_abs_delta_poc_val_minus1 and col_ref_abs_delta_poc_sign_flag.
[0207] col_ref_abs_delta_poc_val_minus1 and col_ref_abs_delta_poc_sign_flag can only be signaled if TMVP mode is available at the picture level (e.g., pic_temporal_mvp_enabled_flag==1).
[0208] col_ref_abs_delta_poc_val_minus1 may indicate a value obtained by subtracting 1 from the absolute value of the POC (picture order count) difference between the current picture and the co-located picture (colPic) for TMVP.
[0209] col_ref_delta_poc_sign_flag may indicate whether or not a value obtained by adding 1 to col_ref_abs_delta_poc_val_minus1 is greater than 0. For example, col_ref_abs_delta_poc_sign_flag having a first value (e.g., 0) may indicate that a value obtained by adding 1 to col_ref_abs_delta_poc_val_minus1 is less than 0. Differently, col_ref_abs_delta_poc_sign_flag having a second value (e.g., 1) may indicate that a value obtained by adding 1 to col_ref_abs_delta_poc_val_minus1 is greater than 0.
[0210] In one example, information about the co-located picture (colPic) may be signaled in both the picture header and the slice header. For example, information about the co-located picture (colPic) may be signaled via the picture header, but also via the slice header for at least some of the slices associated with the picture header. In this case, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) signaled via the slice header (e.g., collocated_from_l0_flag and collocated_ref_idx).
[0211] In another example, information on the co-located picture (colPic) may be selectively signaled via a picture header or a slice header. In this case, whether information on the co-located picture (colPic) is signaled via a picture header (or a slice header) may be determined based on predetermined signaling information (e.g., pps_rpl_info_in_ph_flag) in the picture header (and / or slice header). For example, if the signaling information has a second value (e.g., 1), information on the co-located picture (colPic) may be signaled via a picture header. In contrast, if the signaling information has a first value (e.g., 0), information on the co-located picture (colPic) may be signaled via a slice header.
[0212] When information about the co-located picture (colPic) is signaled via a slice header, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) obtained via the slice header (e.g., collocated_from_l0_flag and collocated_ref_idx). In contrast, when information about the co-located picture is signaled only via a picture header, the co-located picture (colPic) for the current block may be determined based on information about the co-located picture (colPic) obtained via the picture header (e.g., col_ref_abs_delta_poc_val_minus1 and col_ref_abs_delta_poc_sign_flag).
[0213] On the other hand, the fact that the co-located picture (colPic) for TMVP is a picture that has already been reconstructed and is different from the current picture may be a restriction for bitstream compatibility. The fact that the co-located picture (colPic) is a picture that has already been reconstructed and is different from the current picture can be realized by signaling col_ref_abs_delta_poc_val_minus1, which makes the POC difference between the current picture and the co-located picture (colPic) always greater than 0.
[0214] The picture header according to the embodiment of the present disclosure described above with reference to Figures 15 to 18 may include information about the co-located picture (colPic) for TMVP, for example, identification information of the co-located picture (colPic). As a result, for multiple slices that refer to the same co-located picture (colPic), information about the co-located picture (colPic) can be signaled only once via the picture header, thereby reducing signaling overhead for TMVP and improving the efficiency of the signaling mechanism.
[0215] Hereinafter, an image encoding / decoding method according to an embodiment of the present disclosure will be described in detail with reference to FIGS.
[0216] FIG. 19 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.
[0217] The image encoding method of Fig. 19 may be performed by the image encoding apparatus of Fig. 2. For example, steps S1910 and S1920 may be performed by the inter prediction unit 180. Also, step S1930 may be performed by the entropy encoding unit 190.
[0218] Referring to FIG. 19, when an inter prediction mode is applied to a current block, the image encoding apparatus may generate a prediction block of the current block based on a motion vector of the current block (S1910).
[0219] The inter prediction mode for the current block may be determined to be one of various inter prediction modes (e.g., merge mode, skip mode, Motion Vector Prediction mode (MVP mode), Symmetric Motion Vector Difference (SMVD mode), affine mode, etc.). For example, the image encoding device may compare rate-distortion (RD) costs for various inter prediction modes to select an optimal inter prediction mode, and determine the selected optimal inter prediction mode as the inter prediction mode for the current block.
[0220] The image encoding apparatus may search for blocks similar to the current block within a certain region (search region) of a reference picture for the current block through motion estimation, and derive a reference block whose difference with the current block is minimum or equal to or less than a certain criterion. The image encoding apparatus may derive a motion vector of the current block based on a position difference between the derived reference block and the current block.
[0221] For example, when a merge mode or a skip mode is applied to the current block, the image encoding apparatus may derive merge candidates from neighboring blocks of the current block and construct a merge candidate list using the induced merge candidates. Here, the neighboring blocks of the current block may include spatial neighboring blocks and / or temporal neighboring blocks. The image encoding apparatus may derive a reference block whose difference with the current block is minimum or equal to or less than a certain criterion among reference blocks estimated according to motion information of the merge candidates included in the merge candidate list. In this case, the motion vector of the current block may be derived using the motion vector of the merge candidate related to the derived reference block.
[0222] In another example, when the MVP mode is applied to the current block, the image encoding apparatus may derive motion vector predictor (MVP) candidates from neighboring blocks of the current block, and may construct an MVP candidate list using the induced MVP candidates. Here, the neighboring blocks of the current block may include spatial neighboring blocks and / or temporal neighboring blocks. In this case, for example, a motion vector indicating a reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and among the MVP candidates, an MVP candidate having a motion vector having a minimum difference with the motion vector of the current block may be selected as the MVP for the current block.
[0223] The image coding apparatus may derive a temporal motion vector predictor (TMVP) for the current block based on the co-located picture (colPic) (S1920).
[0224] The co-located picture (colPic) may be determined at a slice level or a picture level. For example, when the co-located picture (colPic) is determined at a slice level, different co-located pictures (colPic) may be selected for at least some of the slices in the current picture. In this case, information about the co-located picture (colPic), for example, identification information of the co-located picture (colPic), may be signaled to the image decoding apparatus via a slice header. In contrast, when the co-located picture (colPic) is determined at a picture level, co-located pictures (colPic) that are identical to each other may be selected for all slices in the current picture. In this case, information about the co-located picture (colPic), for example, identification information of the co-located picture (colPic), may be signaled to the image decoding apparatus via a picture header.
[0225] In one example, information about the co-located picture (colPic) may be selectively signaled via a picture header or a slice header based on predetermined signaling information (e.g., pps_rpl_info_in_ph_flag). For example, if the signaling information has a first value (e.g., 1), information about the co-located picture (colPic) may be signaled via a picture header. In contrast, if the signaling information has a second value (e.g., 0), information about the co-located picture (colPic) may be signaled via a slice header.
[0226] The TMVP for the current block can be derived based on the temporal neighboring blocks within the same-position picture (colPic). The temporal neighboring blocks can include the co-located block (colCb) for the current block. Here, the co-located block (colCb) can be meant to be a block having the same position and / or the same size as the current block within the same-position picture (colPic).
[0227] In one example, the co-located block (colCb) can be determined as a luma coding block that covers the modified position from the first position (xColBr, yColBr) corresponding to the right-bottom corner of the current block within the same-position picture (colPic). Here, the first position (xColBr, yColBr) can be meant to be the position (xCb + cbWidth, yCb + cbHeight) moved by the width (cbWidth) and height (cbHeight) of the current block from the position (xCb, yCb) corresponding to the upper-left corner of the current block within the same-position picture. The first position (xColBr, yColBr) can be modified using an arithmetic shift operation for motion data compression. For example, the first position (xColBr, yColBr) can be modified to ((xColBr >> n) << n, (yColBr >> n) << n). Here, n can be an integer greater than or equal to 0.
[0228] In another example, the same-position block (colCb) can be determined as a luma coding block covering a modified position from the second position (xColCtr, yColCtr) corresponding to the bottom-right sample (centeral right-bottom sample) among the four samples at the center of the current block within the same-position picture. Here, the second position (xColCtr, yColCtr) can mean a position (xCb+(cbWidth>>1), yCb+(cbHeight>>1)) moved by half of the width (cbWidth) and height (cbHeight) of the current block respectively from the position (xCb, yCb) corresponding to the upper-left corner of the current block within the same-position picture. The second position (xColCtr, yColCtr) can be modified using an arithmetic shift operation for motion data compression. For example, the second position (xColCtr, yColCtr) can be modified to ((xColCtr>>n)<<n, (yColCtr>>n)<<n). Here, n can be an integer greater than or equal to 0.
[0229] In the above example, n used in the arithmetic shift operation can mean a storage unit for storing the motion information of the temporal neighboring blocks. For example, when n is 3, the storage unit for storing the motion information of the temporal neighboring blocks can be an 8×8 sample unit. Alternatively, when n is 4, the storage unit for storing the motion information of the temporal neighboring blocks can be a 16×16 sample unit.
[0230] Alternatively, n used in the arithmetic shift operation can mean a reading unit for reading the motion information of the temporal neighboring blocks. For example, when n is 3, the reading unit for reading the motion information of the temporal neighboring blocks can be an 8×8 sample unit. In this case, the image coding device can identify an 8×8 sample unit including the first position ((xColBr>>n)<<n, (yColBr>>n)<<n) or the second position ((xColCtr>>n)<<n, (yColCtr>>n)<<n) modified based on the arithmetic shift operation, and read the motion information of the identified 8×8 sample unit.
[0231] 19, step S1920 is illustrated as being performed after step S1910, but the embodiment of the present disclosure is not limited thereto. For example, step S1920 may be performed before step S1910, or step S1920 may be performed simultaneously with step S1910.
[0232] The image coding apparatus can code the motion vector of the current block based on the TMVP for the current block (S1930).
[0233] For example, when a merge mode or a skip mode is applied to the current block, the TMVP for the current block may be included in the merge candidate list as a temporal merge candidate. The temporal merge candidates may include a plurality of candidates including the TMVP. When the temporal merge candidate is selected for the current block, the image coding apparatus may code a motion vector of the current block by coding merge index information that points to the temporal merge candidate.
[0234] In another example, when the MVP mode is applied to the current block, the TMVP for the current block may be included in the MVP candidate list as a temporal MVP candidate. The temporal MVP candidates may also include a plurality of candidates including the TMVP. When the temporal MVP candidate is selected for the current block, the image encoding apparatus may encode the motion vector of the current block based on the TMVP of the temporal MVP candidate. For example, the image encoding apparatus may derive a motion vector difference (MVD), which is a difference obtained by subtracting the TMVP from the motion vector of the current block, and encode information on the MVD and MVP index information indicating the temporal MVP candidate, thereby encoding the motion vector of the current block.
[0235] As described above, according to an embodiment of the present disclosure, information on the co-located picture (colPic) may be selectively signaled via a picture header or a slice header. For example, information on the co-located picture (colPic) may be signaled only once via a picture header, or may be adaptively signaled via a slice header. Alternatively, information on the co-located picture (colPic) may be signaled in both a picture header and a slice header. For example, information on the co-located picture (colPic) may be signaled via a picture header, but may also be signaled via a slice header for at least some of the slices associated with the picture header. In this case, the co-located picture (colPic) for the current block may be determined based on information on the co-located picture (colPic) signaled via a slice header. This may reduce signaling overhead for TMVP and improve the efficiency of the signaling mechanism.
[0236] FIG. 20 is a flowchart illustrating an image decoding method according to one embodiment of the present disclosure.
[0237] The image decoding method of Fig. 20 may be performed by the image decoding apparatus of Fig. 3. For example, step S2010 may be performed by the entropy decoding unit 210. Also, steps S2020 and S2030 may be performed by the inter prediction unit 260.
[0238] Referring to FIG. 20, when an inter prediction mode is applied to a current block, the image decoding apparatus may derive a temporal motion vector predictor (TMVP) for the current block based on a co-located picture (colPic) (S2010).
[0239] The co-located picture (colPic) may be determined based on information about the co-located picture (colPic) obtained from a picture header or a slice header. A specific method for determining the co-located picture (colPic) is shown in FIG. 21.
[0240] FIG. 21 is a flow chart illustrating a method for determining co-located pictures according to one embodiment of the present disclosure.
[0241] Referring to FIG. 21, the image decoding apparatus may determine whether information on a co-located picture (colPic) is obtained from a slice header (S2110).
[0242] If information on the co-located picture (colPic), for example, identification information of the co-located picture (colPic), is obtained from the slice header ('Yes' in S2110), the image decoding apparatus may determine the co-located picture (colPic) for the current block based on the slice header (S2120). For example, the co-located picture (colPic) for the current block may be determined based on the identification information (e.g., collocated_from_l0_flag and collocated_ref_idx) of the co-located picture (colPic) obtained from the slice header described above with reference to FIG. 14b.
[0243] Alternatively, when information on the co-located picture (colPic) is not obtained from the slice header ('NO' in S2110), the image decoding apparatus may determine the co-located picture (colPic) for the current block based on the picture header (S2130). For example, the co-located picture (colPic) for the current block may be determined based on identification information (e.g., pic_collocated_from_l0_flag and pic_collocated_ref_idx) of the co-located picture (colPic) obtained from the picture header described above with reference to FIG. 15. Alternatively, the co-located picture (colPic) for the current block may be determined based on identification information (e.g., col_ref_delta_poc_val, col_ref_abs_delta_poc_val, col_ref_abs_delta_poc_sign_flag, etc.) of the co-located picture (colPic) obtained from the picture header described above with reference to FIG. 16 to FIG. 18.
[0244] In one example, whether information on the co-located picture (colPic) is obtained through a picture header (or a slice header) may be determined based on predetermined signaling information (e.g., pps_rpl_info_in_ph_flag) in the picture header (and / or slice header). For example, if the signaling information has a first value (e.g., 0), information on the co-located picture (colPic) may be obtained through a slice header. In this case, different co-located pictures (colPic) may be applied to at least some of the slices in the current picture. In contrast, if the signaling information has a second value (e.g., 1), information on the co-located picture (colPic) may be obtained through a picture header. In this case, the same co-located picture (colPic) may be applied to all slices in the current picture.
[0245] Referring again to FIG. 20, the image decoding apparatus may derive a temporal motion vector predictor (TMVP) for the current block based on the co-located picture (colPic).
[0246] The TMVP can be derived based on temporal neighboring blocks in a co-located picture (colPic). The temporal neighboring blocks can include co-located blocks (colCb) that have the same position and / or size as the current block in the co-located picture (colPic).
[0247] In one example, the co-location block (colCb) may be determined as a luma coding block covering a modified position from a first position (xColBr, yColBr) corresponding to the right-bottom corner of the current block in the co-location picture (colPic). Here, the first position (xColBr, yColBr) may mean a position (xCb+cbWidth, yCb+cbHeight) shifted by the width (cbWidth) and height (cbHeight) of the current block from a position (xCb, yCb) corresponding to the upper-left corner of the current block in the co-location picture (colPic). Meanwhile, the first position (xColBr, yColBr) may be changed using an arithmetic shift operation for motion data compression. For example, the first position (xColBr, yColBr) can be modified to ((xColBr>>3)<<3,(yColBr>>3)<<3).
[0248] In another example, the co-located block (colCb) may be determined as a luma coding block covering a position modified from a second position (xColCtr, yColCtr) corresponding to the central right-bottom sample of the four samples of the current block in the co-located picture (colPic). Here, the second position (xColCtr, yColCtr) may mean a position (xCb+(cbWidth>>1), yCb+(cbHeight>>1)) shifted by half the width (cbWidth) and height (cbHeight) of the current block from a position (xCb, yCb) corresponding to the upper left corner of the current block in the co-located picture (colPic). Meanwhile, the second position (xColCtr, yColCtr) may be changed using an arithmetic shift operation for motion data compression. For example, the second position (xColCtr, yColCtr) can be modified to ((xColCtr>>3)<<3,(yColCtr>>3)<<3).
[0249] The image decoding apparatus can derive a motion vector for the current block based on the TMVP for the current block (S2020).
[0250] For example, when merge mode or skip mode is applied to the current block, the image decoding device can construct a merge candidate list and derive a motion vector of a temporal merge candidate in the merge candidate list that includes a TMVP for the current block as the motion vector of the current block.
[0251] In another example, when the MVP mode is applied to the current block, the image decoding apparatus may construct an MVP candidate list and derive a motion vector of a temporal MVP candidate in the MVP candidate list, which includes a TMVP for the current block, as the MVP of the current block. In this case, the image decoding apparatus may derive an MVD (motion vector difference) of the current block based on information about the MVD obtained from the bitstream, and may derive a motion vector of the current block by adding the MVP to the MVD.
[0252] The image decoding apparatus may generate a prediction block of the current block based on the motion vector of the current block (S2030). For example, the image decoding apparatus may derive a reference picture of the current block based on reference picture index information obtained from a bitstream, and generate a prediction block of the current block using samples of the reference block to which the motion vector of the current block points on the reference picture. In one example, a prediction sample filtering procedure may be further performed on all or a portion of the samples in the prediction block of the current block.
[0253] Meanwhile, the image decoding apparatus may generate a residual block of the current block based on residual information obtained from a bitstream, and reconstruct the current block by adding the residual block to the prediction block. In one example, an in-loop filtering procedure may be further performed on the reconstructed image.
[0254] As described above, according to an embodiment of the present disclosure, information on the co-located picture (colPic) may be selectively signaled via a picture header or a slice header. For example, information on the co-located picture (colPic) may be signaled only once via a picture header, or may be adaptively signaled via a slice header. Alternatively, information on the co-located picture (colPic) may be signaled in both a picture header and a slice header. For example, information on the co-located picture (colPic) may be signaled via a picture header, but may also be signaled via a slice header for at least some of the slices associated with the picture header. In this case, the co-located picture (colPic) for the current block may be determined based on information on the co-located picture (colPic) signaled via a slice header. This may reduce signaling overhead for TMVP and improve the efficiency of the signaling mechanism.
[0255] Although the exemplary method of the present disclosure is expressed as a series of operations for clarity of explanation, this is not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order, if necessary. To realize the method according to the present disclosure, the steps illustrated may include other steps, some steps may be omitted and the remaining steps may be omitted, or some steps may be omitted and additional steps may be included.
[0256] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) can perform the operation (step) to check the execution conditions or circumstances of the operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is satisfied, the image encoding device or the image decoding device can perform the predetermined operation after performing an operation to check whether the predetermined condition is satisfied or not.
[0257] The various embodiments of the present disclosure are not intended to enumerate all possible combinations, but are intended to describe representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.
[0258] Additionally, various embodiments of the present disclosure may be implemented using hardware, firmware, software, or a combination thereof, etc. In the case of a hardware implementation, the implementation may be implemented using one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general processors, controllers, microcontrollers, microprocessors, etc.
[0259] 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 transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, and a medical video device, and may be used to process a video signal or a data signal. For example, the over-the-top video (OTT) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), and the like.
[0260] FIG. 22 is a diagram illustrating an example of a content streaming system to which an embodiment of the present disclosure can be applied.
[0261] As shown in FIG. 22, a content streaming system to which an embodiment of the present disclosure is applied may broadly include an encoding server, a streaming server, a Web server, a media storage, a user device, and a multimedia input device.
[0262] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, video camera, etc. directly generates a bitstream, the encoding server can be omitted.
[0263] The bitstream may be generated by an image encoding method and / or image encoding device to which an embodiment of the present disclosure is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0264] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server can transmit the multimedia data to the user. At this time, the content streaming system can include a separate control server, and in this case, the control server can control commands / responses between devices in the content streaming system.
[0265] The streaming server may receive the content from a media storage and / or an encoding server. For example, when receiving the content from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a certain period of time in order to provide a smooth streaming service.
[0266] Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices such as smartwatches, smart glass, head mounted displays (HMDs), digital TVs, desktop computers, and digital signage.
[0267] Each server in the content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.
[0268] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of the various embodiments to be performed on a device or computer, and non-transitory computer-readable medium on which such software or commands can be stored and executed on a device or computer. [Industrial Applicability]
[0269] The embodiments according to the present disclosure can be used to encode / decode images.
Claims
1. An image decoding method performed by an image decoding device, comprising: deriving a temporal motion vector predictor for a current block based on a co-located picture for the current block; deriving a motion vector differential for the current block based on information about the motion vector differential; deriving a motion vector for the current block based on the temporal motion vector predictor and the motion vector differential; generating a prediction block of the current block based on the motion vector; the co-located picture is determined based on identification information of the co-located picture, the identification information of the co-located picture including reference index information indicating the co-located picture in a reference picture list for the current block; 20. A method of decoding an image, comprising: based on the temporal motion vector predictor being valid for a current picture that contains the current block, the identification information of the co-located picture is obtained from a picture header for the current picture.
2. An image coding method performed by an image coding device, comprising: generating a prediction block for the current block based on a motion vector of the current block; deriving a temporal motion vector predictor for the current block based on a co-located picture for the current block; deriving a motion vector differential for the current block based on the motion vector and the temporal motion vector predictor; encoding a motion vector of the current block based on the temporal motion vector predictor and the motion vector differential; the identification information of the co-located picture is encoded, the identification information of the co-located picture including reference index information indicating the co-located picture in a reference picture list for the current block; 13. A method of encoding an image, comprising: based on the temporal motion vector predictor being valid for a current picture that contains the current block, the identification of the co-located picture is encoded in a picture header for the current picture.
3. A method for transmitting a bitstream generated by an image coding method, comprising the steps of: The image encoding method includes: generating a prediction block for the current block based on a motion vector of the current block; deriving a temporal motion vector predictor for the current block based on a co-located picture for the current block; deriving a motion vector differential for the current block based on the motion vector and the temporal motion vector predictor; encoding a motion vector of the current block based on the temporal motion vector predictor and the motion vector differential; the identification information of the co-located picture is encoded, the identification information of the co-located picture including reference index information indicating the co-located picture in a reference picture list for the current block; 20. A bitstream transmission method, comprising: based on the temporal motion vector predictor being valid for a current picture that contains the current block, the identification information of the co-located picture is encoded in a picture header for the current picture.
