Image encoding / decoding method and device based on wraparound motion compensation, and recording medium storing bitstream

By adopting wraparound motion compensation technology in image encoding and decoding, the problem of low encoding and decoding efficiency of high-resolution images is solved, and efficient encoding and decoding of high-resolution images is achieved, reducing transmission and storage costs.

JP7662876B2Active Publication Date: 2025-04-15LG ELECTRONICS INC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
JP2024076634
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-04-14
Filing Date
2024-05-09
Publication Date
2025-04-15
Estimated Expiration
2041-03-26

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently encode and decode high-resolution, high-quality images, resulting in increased transmission and storage costs.

Method used

An image encoding/decoding method based on wraparound motion compensation is adopted, by obtaining mutual prediction information and wrap-around information in the bitstream, a prediction block is generated, and motion compensation is performed on the boundary of the current sub-image and the reference image.

Benefits of technology

Improves image encoding/decoding efficiency, supports efficient encoding and decoding of independently encoded sub-images, and reduces transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007662876000019
    Figure 0007662876000019
  • Figure 0007662876000020
    Figure 0007662876000020
  • Figure 0007662876000021
    Figure 0007662876000021
Patent Text Reader

Abstract

To provide an image encoding / decoding method and device.SOLUTION: An image decoding method is provided, comprising the steps of: obtaining inter prediction information of a current block and wraparound information from a bitstream; and generating a prediction block of the current block on the basis of the inter prediction information and the wraparound information. The wraparound information may comprise a first flag indicating whether wraparound motion compensation is enabled for a current picture including the current block. On the basis of a fact that the first flag having a first value indicating that the wraparound motion compensation is enabled, the prediction block of the current block may be generated by the wraparound motion compensation, and the wraparound motion compensation may be performed on the basis of either boundaries of a current subpicture or boundaries of a reference picture of the current block, on the basis of whether the current subpicture including the current block is independently coded.SELECTED DRAWING: Figure 20
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to an image encoding / decoding method and apparatus, and more particularly to an image encoding / decoding method and apparatus based on wraparound motion compensation, as well as a recording medium storing a bitstream generated by the image encoding method / apparatus of the present disclosure. [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 wraparound motion compensation.

[0006] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus based on wraparound motion compensation for independently coded sub-pictures.

[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 a step of obtaining inter-prediction information and wrap-around information of a current block from a bitstream, and a step of generating a predictive block of the current block based on the inter-prediction information and the wrap-around information, wherein the wrap-around information includes a first flag indicating whether wrap-around motion compensation is available for a current picture including the current block, and the predictive block of the current block is generated by the wrap-around motion compensation based on the first flag having a first value indicating that wrap-around motion compensation is available, and the wrap-around motion compensation may be performed based on any one of a boundary of the current sub-picture and a boundary of a reference picture of the current block, depending on whether a current sub-picture including the current block is independently coded.

[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 obtains inter-prediction information and wrap-around information of a current block from a bitstream, and generates a predictive block of the current block based on the inter-prediction information and the wrap-around information, wherein the wrap-around information includes a first flag indicating whether wrap-around motion compensation is available for a current picture including the current block, and the predictive block of the current block is generated by the wrap-around motion compensation based on the first flag having a first value indicating that the wrap-around motion compensation is available, and the wrap-around motion compensation may be performed based on any one of a boundary of the current sub-picture and a boundary of a reference picture of the current block, depending on whether a current sub-picture including the current block is independently coded.

[0013] An image encoding method according to another aspect of the present disclosure includes a step of determining whether to apply wrap-around motion compensation to a current block, a step of generating a predicted block of the current block by performing inter prediction based on the decision, and a step of encoding inter prediction information of the current block and wrap-around information related to the wrap-around motion compensation, wherein the wrap-around information includes a first flag indicating whether wrap-around motion compensation is available for a current picture including the current block, and the wrap-around motion compensation may be performed based on any one of a boundary of the current sub-picture and a boundary of a reference picture of the current block, depending on whether a current sub-picture including the current block is independently coded.

[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] A transmission method according to another aspect of the present disclosure can transmit a bitstream generated by the image encoding device or image encoding method of the present disclosure.

[0016] The features described above in the brief summary of the present disclosure are merely exemplary embodiments of the detailed description of the present disclosure that follows and are not intended to limit the scope of the present disclosure. Effect of the Invention

[0017] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.

[0018] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus based on wraparound motion compensation can be provided.

[0019] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus based on wraparound motion compensation for independently coded sub-pictures can be provided.

[0020] 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.

[0021] 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.

[0022] In addition, the present disclosure may 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.

[0023] The effects obtained by the present disclosure are not limited to the effects described above, and other effects not described above will be clearly understood by those having ordinary skill in the art to which the present disclosure pertains from the following description. [Brief description of the drawings]

[0024] [Figure 1] FIG. 1 is a schematic diagram illustrating a video coding system to which an embodiment of the present disclosure can be applied. [Diagram 2] 1 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied; [Diagram 3] 1 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied; [Figure 4] 1 is a flowchart illustrating an outline of an image decoding procedure to which an embodiment of the present disclosure can be applied. [Diagram 5] 1 is a flowchart illustrating an outline of an image encoding procedure to which an embodiment of the present disclosure can be applied. [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. 2 is a diagram showing an example of a sub-picture. [Figure 9] A figure showing an example of an SPS including information about subpictures. [Figure 10] 1 is a diagram showing a method in which an image encoding device according to an embodiment of the present disclosure encodes an image using sub-pictures. [Figure 11] 1 is a diagram showing a method in which an image decoding device according to an embodiment of the present disclosure decodes an image using sub-pictures. [Figure 12] FIG. 2 is a diagram showing an example of a 360-degree image converted into a two-dimensional picture. [Figure 13] FIG. 2 illustrates an example of a horizontal wraparound motion compensation process. [Figure 14a] A figure showing an example of an SPS including information regarding wrap-around motion compensation. [Figure 14b] FIG. 13 is a diagram showing an example of a PPS including information regarding wrap-around motion compensation. [Figure 15]13 is a flowchart showing a method in which the image decoding apparatus performs wraparound motion compensation based on sub-picture attributes. [Figure 16] 11 is a flowchart illustrating a method for determining whether or not wrap-around motion compensation is available by an image encoding device according to an embodiment of the present disclosure. [Figure 17] 11 is a flowchart showing a method in which an image decoding apparatus according to an embodiment of the present disclosure performs wraparound motion compensation based on sub-picture attributes. [Figure 18] FIG. 2 illustrates an example of an SPS according to an embodiment of the present invention. [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] FIG. 1 is a diagram illustrating an example of a content streaming system to which an embodiment of the present disclosure can be applied. [Figure 22] FIG. 1 is a schematic diagram illustrating an architecture for providing 3D image / video services in which embodiments of the present disclosure can be utilized. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0025] The present disclosure will be described in detail below with reference to the accompanying drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein.

[0026] In describing the embodiments of the present disclosure, if it is determined that a specific description of a known configuration or function may make the gist of the present disclosure unclear, the detailed description thereof will be omitted. In addition, in the drawings, parts that are not related to the description of the present disclosure are omitted, and similar parts are denoted by similar reference numerals.

[0027] In the present disclosure, when a certain component is "connected," "coupled," or "connected" to another component, this includes not only a direct connection relationship, but also an indirect connection relationship in which another component exists between them. Furthermore, when a certain component is described as "including" or "having" another component, this does not mean that the other component is excluded, but that the other component can be further included, unless otherwise specified.

[0028] In this disclosure, terms such as "first" and "second" are used only for the purpose of distinguishing one component from another component, and do not limit the order or importance of the components unless otherwise specified. Therefore, within the scope of this disclosure, a first component in one embodiment may be called a second component in another embodiment, and similarly, a second component in one embodiment may be called a first component in another embodiment.

[0029] In this disclosure, components that are distinguished from one another are used to clearly describe the characteristics of each component, and do not necessarily mean that the components are separate. In other words, multiple components may be integrated and configured as a single hardware or software unit, or one component may be distributed and configured as multiple hardware or software units. Thus, even if not otherwise stated, such integrated or distributed embodiments are also included in the scope of the present disclosure.

[0030] In the present disclosure, the components described in the various embodiments are not necessarily essential components, and some may be optional components. Therefore, an embodiment consisting of a subset of the components described in one embodiment is also included in the scope of the present disclosure. In addition, an embodiment including other components in addition to the components described in the various embodiments is also included in the scope of the present disclosure.

[0031] The present disclosure relates to image encoding and decoding, and terms used in this disclosure may have ordinary meanings in the technical field to which the present disclosure belongs, unless they are newly defined in this disclosure.

[0032] In this disclosure, a "picture" generally means a unit indicating any one image in a particular time period, a slice / tile is a coding unit constituting a part of a picture, and one picture may be composed of one or more slices / tiles. Also, a slice / tile may include one or more coding tree units (CTUs).

[0033] In this disclosure, a "pixel" or a "pel" may refer to the smallest unit 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.

[0034] In this disclosure, a "unit" may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may be used interchangeably with terms such as "sample array," "block," or "area," depending on the case. In a general case, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.

[0035] In the present disclosure, a "current block" may refer to any one of a "current coding block," a "current coding unit," a "block to be coded," a "block to be decoded," or a "block to be processed." If prediction is performed, a "current block" may refer to a "current predicted block" or a "block to be predicted." If transformation (inverse transformation) / quantization (inverse quantization) is performed, a "current block" may refer to a "current transformed block" or a "block to be transformed." If filtering is performed, a "current block" may refer to a "block to be filtered."

[0036] Furthermore, in this disclosure, unless there is an explicit reference to a chroma block, a "current block" may refer to a block including both a luma component block and a chroma component block, or a "luma block of the current block." The luma component block of the current block may be expressed by explicitly including the reference to a luma component block, such as a "luma block" or a "current luma block." Furthermore, the chroma component block of the current block may be expressed by explicitly including the reference to a chroma component block, such as a "chroma block" or a "current chroma block."

[0037] In the present disclosure, " / " and "," can be interpreted as "and / or." For example, "A / B" and "A, B" can be interpreted as "A and / or B." Also, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."

[0038] In this disclosure, "or" can be interpreted as "and / or." For example, "A or B" can mean 1) only "A," 2) only "B," or 3) "A and B." Alternatively, in this disclosure, "or" can mean "additionally or alternatively."

[0039] Video Coding System Overview

[0040] FIG. 1 is a schematic diagram of a video coding system to which embodiments of the present disclosure can be applied.

[0041] A video coding system according to an embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 may transmit encoded video and / or image information or data to the decoding device 20 in a file or streaming format via a digital storage medium or a network.

[0042] The encoding device 10 according to an embodiment may include a video source generating unit 11, an encoding unit 12, and a transmitting unit 13. The decoding device 20 according to an embodiment may include a receiving unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 may be referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as a video / image decoding unit. The transmitting unit 13 may be included in the encoding unit 12. The receiving unit 21 may be included in the decoding unit 22. The rendering unit 23 may include a display unit, which may be configured as a separate device or an external component.

[0043] The video source generating unit 11 can obtain videos / images through a process of capturing, synthesizing, or generating videos / images. The video source generating unit 11 can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured videos / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate videos / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced by a process in which related data is generated.

[0044] The encoder 12 may encode the input video / image. The encoder 12 may perform a series of steps such as prediction, transformation, quantization, etc. for compression and encoding efficiency. The encoder 12 may output the encoded data (encoded video / image information) in a bitstream format.

[0045] The transmitting unit 13 may 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.

[0046] The decoding unit 22 can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding unit 12.

[0047] The rendering unit 23 can render the decoded video / images. The rendered video / images can be displayed via a display unit.

[0048] Overview of the image encoding device

[0049] FIG. 2 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied.

[0050] As shown in Fig. 2, the image coding device 100 may include an image division unit 110, a subtraction unit 115, a transformation unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse transformation unit 150, an addition unit 155, a filtering unit 160, a memory 170, an inter prediction unit 180, an intra prediction unit 185, and an entropy coding unit 190. The inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a "prediction unit." The transformation unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transformation unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115.

[0051] All or at least some of the components constituting the image encoding device 100 may be realized by a single hardware component (e.g., an encoder or a processor) depending on the embodiment. Also, the memory 170 may include a decoded picture buffer (DPB) and may be realized by a digital storage medium.

[0052] The image division unit 110 may divide an input image (or picture, frame) input to the image encoding device 100 into one or more processing units. As an example, the processing units may be called coding units (CUs). The coding units may be obtained by recursively dividing a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / Binary-tree / Ternal-tree) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. For dividing the coding units, a quad-tree structure may be applied first, and a binary-tree structure and / or a ternary-tree structure may be applied later. A coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. The maximum coding unit may be used as the final coding unit, and a lower depth coding unit obtained by dividing the maximum coding unit may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or restoration, which will be described later. As another example, a processing unit of the coding procedure may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit, respectively. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

[0053] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on a block to be processed (current block) and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of a current block or a CU. The prediction unit may generate various information related to prediction of the current block and transmit it to the entropy encoding unit 190. The information related to prediction may be encoded by the entropy encoding unit 190 and output in a bitstream format.

[0054] The intra prediction unit 185 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block according to an intra prediction mode and / or an intra prediction technique. The intra prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode may include, for example, a DC mode and a planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 185 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.

[0055] The inter prediction unit 180 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of a block, a sub-block, or a sample based on the correlation of motion information between a neighboring block and a current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different from each other. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 180 may generate information indicating which candidate is used to derive a motion vector and / or a reference picture index of the current block by forming a motion information candidate list based on neighboring blocks. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter prediction unit 180 may use motion information of neighboring blocks as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, the motion vector of the current block can be signaled by using the motion vector of a neighboring block as a motion vector predictor and encoding a motion vector difference and an indicator for the motion vector predictor. The motion vector difference can mean the difference between the motion vector of the current block and the motion vector predictor.

[0056] The prediction unit may generate a prediction signal based on various prediction methods and / or prediction techniques, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of the current block, and may simultaneously apply intra prediction and inter prediction. A prediction method that simultaneously applies intra prediction and inter prediction for prediction of the current block may be called combined inter and intra prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of the current block. Intra block copy can be used for content image / video coding such as games, for example, as in screen content coding (SCC). IBC is a method of predicting a current block using an already restored reference block in a current picture that is located a predetermined distance away from the current block. When IBC is applied, the position of the reference block in the current picture may be coded as a vector (block vector) corresponding to the predetermined distance. IBC is basically performed in the current picture, but may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure.

[0057] The prediction signal generated by the prediction unit may be used to generate a restored signal or a residual signal. The subtraction unit 115 may subtract the prediction signal (predicted block, prediction sample array) output from the prediction unit from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array). The generated residual signal may be transmitted to the conversion unit 120.

[0058] The transform unit 120 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is represented by a graph. The CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size, or may be applied to non-square, variable-sized blocks.

[0059] The quantization unit 130 may quantize the transform coefficients and transmit the quantized transform coefficients to the entropy coding unit 190. The entropy coding unit 190 may code the quantized signal (information on the quantized transform coefficients) and output the coded signal in a bitstream format. The information on the quantized transform coefficients may be referred to as residual information. The quantization unit 130 may rearrange the quantized transform coefficients in a block format into a one-dimensional vector format based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector format.

[0060] The entropy coding unit 190 may perform various coding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy coding unit 190 may also code information required for video / image restoration (e.g., values ​​of syntax elements, etc.) together or separately in addition to the quantized transform coefficients. The coded information (e.g., coded video / image information) may be transmitted or stored in a network abstraction layer (NAL) unit unit in a bitstream format. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may further include general constraint information. The signaling information, transmitted information and / or syntax elements referred to in this disclosure may be encoded through the above-mentioned encoding procedures and included in the bitstream.

[0061] The bitstream may be transmitted via a network or may be stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 190 and / or a storing unit (not shown) for storing the signal may be provided as an internal / external element of the image encoding device 100, or the transmitting unit may be provided as a component of the entropy encoding unit 190.

[0062] The quantized transform coefficients output from the quantization unit 130 can be used to generate a residual signal. For example, the quantized transform coefficients are subjected to inverse quantization and inverse transformation via the inverse quantization unit 140 and the inverse transformation unit 150, so that a residual signal (residual block or residual sample) can be restored.

[0063] The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to a prediction signal output from the inter prediction unit 180 or the intra prediction unit 185. When there is no residual for the current block to be processed, such as when a skip mode is applied, a predicted block may be used as a reconstructed block. The adder 155 may be referred to as a reconstruction unit or a reconstructed block generation unit. The generated reconstructed signal may be used for intra prediction of the next current block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering as described below.

[0064] The filtering unit 160 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, and the like. The filtering unit 160 may generate various information related to filtering, as will be described later in the description of each filtering method, and transmit the information to the entropy coding unit 190. The information related to filtering may be coded by the entropy coding unit 190 and output in a bitstream format.

[0065] The modified reconstructed picture transmitted to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied through this, the image encoding device 100 may avoid a prediction mismatch between the image encoding device 100 and the image decoding device, and may also improve encoding efficiency.

[0066] The DPB in the memory 170 may store modified reconstructed pictures to be used as reference pictures in the inter prediction unit 180. The memory 170 may store motion information of blocks from which motion information in the current picture is derived (or coded) and / or motion information of already reconstructed intra-picture blocks. The stored motion information may be transmitted to the inter prediction unit 180 to be used as motion information of spatial surrounding blocks or motion information of temporal surrounding blocks. The memory 170 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 185.

[0067] Overview of the image decoding device

[0068] FIG. 3 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied.

[0069] 3, the image decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265. The inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a "prediction unit." The inverse quantization unit 220 and the inverse transform unit 230 may be included in a residual processing unit.

[0070] All or at least some of the components constituting the image decoding device 200 may be realized by one hardware component (e.g., a decoder or a processor) depending on the embodiment. Also, the memory 170 may include a DPB and may be realized by a digital storage medium.

[0071] The image decoding device 200, which receives a bitstream including video / image information, can reconstruct an image by executing a process corresponding to the process performed by the image encoding device 100 of Fig. 2. For example, the image decoding device 200 can perform decoding using a processing unit applied in the image encoding device. Thus, the processing unit for decoding can be, for example, a coding unit. The coding unit can be obtained by dividing a coding tree unit or a maximum coding unit. Then, the reconstructed image signal decoded and output by the image decoding device 200 can be reproduced by a reproduction device (not shown).

[0072] The image decoding apparatus 200 may receive a signal output from the image encoding apparatus of FIG. 2 in the form of a bitstream. The received signal may be decoded via the entropy decoding unit 210. For example, the entropy decoding unit 210 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The image decoding apparatus may further use information on the parameter set and / or the general constraint information to decode an image. The signaling information, received information, and / or syntax elements referred to in the present disclosure may be obtained from the bitstream by being decoded via the decoding procedure. For example, the entropy decoding unit 210 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to the residual. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element from the bitstream, determine a context model using syntax element information to be decoded and decoded information of neighboring blocks and a block to be decoded, or information of a symbol / bin decoded in a previous step, predict the occurrence probability of the bin based on the determined context model, and perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model.Among the information decoded by the entropy decoding unit 210, information related to prediction is provided to a prediction unit (inter prediction unit 260 and intra prediction unit 265), and residual values ​​entropy-decoded by the entropy decoding unit 210, i.e., quantized transform coefficients and related parameter information, may be input to the inverse quantization unit 220. Also, among the information decoded by the entropy decoding unit 210, information related to filtering may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) for receiving a signal output from the image encoding device may be further provided as an internal / external element of the image decoding device 200, or the receiving unit may be provided as a component of the entropy decoding unit 210.

[0073] Meanwhile, the image decoding device according to the present disclosure may be called a video / image / picture decoding device. The image decoding device may include an information decoder (video / image / picture information decoder) and / or a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoding unit 210, and the sample decoder may include at least one of an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265.

[0074] The inverse quantization unit 220 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 220 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on a coefficient scan order performed in the image encoding device. The inverse quantization unit 220 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.

[0075] The inverse transform unit 230 can inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0076] The prediction unit may perform prediction on a current block and generate a predicted block including a prediction sample for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 210, and may determine a specific intra / inter prediction mode (prediction technique).

[0077] The prediction unit can generate a prediction signal based on various prediction methods (techniques) described below, as has been described in the explanation of the prediction unit of the image encoding device 100.

[0078] The intra prediction unit 265 may predict the current block by referring to samples in the current picture. The description of the intra prediction unit 185 may be similarly applied to the intra prediction unit 265.

[0079] The inter prediction unit 260 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 260 may configure a motion information candidate list based on the neighboring blocks, and derive a motion vector and / or a reference picture index for the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes (techniques), and the prediction information may include information indicating a mode (technique) of inter prediction for the current block.

[0080] The adder 235 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 260 and / or the intra prediction unit 265). When there is no residual for the current block, such as when a skip mode is applied, the predicted block can be used as the reconstructed block. The description of the adder 155 may also be applied to the adder 235. The adder 235 may also be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture via filtering, as described below.

[0081] The filtering unit 240 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 250, specifically, in the DPB of the memory 250. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.

[0082] The (modified) reconstructed picture stored in the DPB of the memory 250 may be used as a reference picture in the inter prediction unit 260. The memory 250 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial surrounding block or motion information of a temporal surrounding block. The memory 250 may store a reconstructed sample of a reconstructed block in the current picture and transmit it to the intra prediction unit 265.

[0083] In this specification, the embodiments described for the filtering unit 160, inter prediction unit 180 and intra prediction unit 185 of the image encoding device 100 can also be applied in a similar or corresponding manner to the filtering unit 240, inter prediction unit 260 and intra prediction unit 265 of the image decoding device 200, respectively.

[0084] Inter Prediction Overview

[0085] Inter prediction according to the present disclosure will be described below.

[0086] The prediction unit of the image encoding device / image decoding device according to the present disclosure may perform inter prediction on a block basis to derive a prediction sample. Inter prediction may indicate a prediction derived in a manner dependent on data elements (e.g., sample values ​​or motion information, etc.) of pictures other than the current picture. When inter prediction is applied to the current block, a predicted block (prediction block or prediction sample array) for the current block may be derived based on a reference block (reference sample array) identified by a motion vector on a reference picture indicated by a reference picture index. 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 predicted on a block, sub-block, or sample basis based on correlation between motion information of a neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter prediction is applied, the neighboring 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 peripheral block may be the same or different. The temporal peripheral block may be called a collocated reference block, a collocated CU (colCU), a col block, etc., and the reference picture including the temporal peripheral block may be called a collocated picture (colPic), a col picture, etc. For example, a motion information candidate list may be constructed based on the peripheral blocks of the current block, and a flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled.

[0087] Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the motion information of the current block may be the same as the motion information of the selected neighboring block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and a motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference. In this disclosure, the MVP mode may be used synonymously with AMVP (Advanced Motion Vector Prediction).

[0088] The motion information may include L0 motion information and / or L1 motion information based on an inter prediction type (such as L0 prediction, L1 prediction, Bi prediction, etc.). A motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and a motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. A prediction based on an L0 motion vector may be referred to as an L0 prediction, a prediction based on an L1 motion vector may be referred to as an L1 prediction, and a prediction based on both the L0 motion vector and the L1 motion vector may be referred to as a bi-prediction. Here, the L0 motion vector may indicate a motion vector associated with a reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector associated with a reference picture list L1 (L1). The reference picture list L0 may include pictures earlier in output order than the current picture as reference pictures, and the reference picture list L1 may include pictures later in output order than the current picture. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference picture). The reference picture list L0 may further include a picture subsequent to the current picture in output order as a reference picture. In this case, the previous picture may be indexed first in the reference picture list L0, and the subsequent picture may be indexed next. The reference picture list L1 may further include a picture prior to the current picture in output order as a reference picture. In this case, the subsequent picture may be indexed first in the reference picture list L1, and the previous picture may be indexed next. Here, the output order may correspond to a picture order count (POC) order.

[0089] FIG. 4 is a flow chart illustrating an inter-prediction based video / image coding method.

[0090] FIG. 5 is a diagram illustrating an example configuration of the inter prediction unit 180 according to the present disclosure.

[0091] 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.

[0092] 4 and 5, the image encoding apparatus may perform inter prediction for a current block (S410). The image encoding apparatus may derive an inter prediction mode and motion information of the current block, and generate a prediction sample for the current block. Here, the inter prediction mode determination, motion information derivation, and prediction sample generation procedures may be performed simultaneously, or 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 for the current block. For example, the inter prediction unit 180 of the image encoding device may search for a block similar to the current block within a certain region (search region) of a reference picture through motion estimation, and derive a reference block whose difference from the current block is minimum or equal to or less than a certain criterion. Based on this, a reference picture index indicating a reference picture in which the reference block is located may be derived, and a motion vector may be derived based on a position difference between the reference block and the current block. The image encoding device may determine a mode to be applied to the current block from among various prediction modes. The image encoding device may compare rate-distortion (RD) costs for the various prediction modes and determine an optimal prediction mode for the current block. However, the method in which the image encoding device determines a prediction mode for the current block is not limited to the above example, and various methods may be used.

[0093] 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.

[0094] As another example, when the MVP mode is applied to the current block, the image encoding apparatus may derive MVP (motion vector predictor) candidates from neighboring blocks of the current block, and may construct an MVP candidate list using the induced MVP candidates. The image encoding apparatus may use a motion vector of an MVP candidate selected from 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 the MVP mode is applied, the value of the reference picture index may be configured as reference picture index information and may be separately signaled to the image decoding apparatus.

[0095] 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.

[0096] 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 the 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. 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 on a quantized transform coefficient for the residual sample.

[0097] 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.

[0098] 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.

[0099] FIG. 6 is a flowchart illustrating an inter-prediction based video / image decoding method, and FIG. 7 is a diagram illustrating an example configuration of the inter prediction unit 260 according to the present disclosure.

[0100] 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.

[0101] 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.

[0102] 6 and 7, the image decoding apparatus may determine a prediction mode for the current block based on 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.

[0103] 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.

[0104] 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.

[0105] 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.

[0106] 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.

[0107] 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.

[0108] 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.

[0109] 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.

[0110] Subpicture Overview

[0111] Sub-pictures according to the present disclosure will now be described.

[0112] A picture can be divided into tiles, and each tile can be further divided into sub-pictures, each of which can include one or more slices and constitute a rectangular region within the picture.

[0113] FIG. 8 is a diagram showing an example of a sub-picture.

[0114] Referring to Figure 8, one picture may be divided into 18 tiles. 12 tiles may be arranged on the left side of the picture, and each of the tiles may include one sub-picture / slice consisting of 16 CTUs. Also, 6 tiles may be arranged on the right side of the picture, and each of the tiles may include two sub-pictures / slices consisting of four CTUs. As a result, the picture is divided into 24 sub-pictures, and each of the sub-pictures may include one slice.

[0115] Information about the sub-pictures (eg, the number and size of the sub-pictures) may be coded / signaled via higher level syntax, such as the SPS, PPS and / or slice header.

[0116] FIG. 9 is a diagram showing an example of an SPS including information about sub-pictures.

[0117] Referring to FIG. 9, the SPS may include a syntax element subpic_info_present_flag indicating the presence or absence of subpicture information for a coded layer video sequence (CLVS). For example, subpic_info_present_flag having a first value (e.g., 0) may indicate that there is no subpicture information for a CLVS and only one subpicture exists in each picture of the CLVS. In contrast, subpic_info_present_flag having a second value (e.g., 1) may indicate that there is subpicture information for a CLVS and one or more subpictures exist in each picture of the CLVS. In one example, if picture spatial resolution can be changed in a CLVS that references an SPS (e.g., res_change_in_clvs_allowed_flag==1), the value of subpic_info_present_flag may be limited to a first value (e.g., 0). On the other hand, if the bitstream contains only a subset of the sub-pictures of the input bitstream to the sub-bitstream extraction process as a result of the sub-bitstream extraction process, the value of subpic_info_present_flag may be limited to a second value (e.g., 1).

[0118] Also, the SPS may include a syntax element sps_num_subpics_minus1 indicating the number of subpictures. For example, a value of sps_num_subpics_inus1 plus 1 may indicate the number of subpictures included in each picture in the CLVS. In one example, the value of sps_num_subpics_minus1 may be restricted to have a range of 0 or more and Ceil(pic_width_max_in_luma_samples / CtbSizeY)*Ceil(pic_height_max_in_luma_samples / CtbSizeY) or less. Here, Ceil(x) may be a ceiling function that outputs the smallest integer value equal to or greater than x. Also, pic_width_max_in_luma_samples may mean the maximum width in luma sample units of each picture, pic_height_max_in_luma_samples may mean the maximum height in luma sample units of each picture, and CtbSizeY may mean the array size of each luma component CTB (coding tree block) in both width and height. Meanwhile, if sps_num_subpics_minus1 is not present, the value of sps_num_subpics_minus1 may be inferred to be a first value (e.g., 0).

[0119] The SPS may also include a syntax element sps_independent_subpics_flag indicating whether or not a subpicture boundary is treated as a picture boundary. For example, sps_independent_subpics_flag having a second value (e.g., 1) may indicate that all subpicture boundaries in the CLVS are treated as picture boundaries and that no loop filtering across the subpicture boundaries is performed. In contrast, sps_independent_subpics_flag having a first value (e.g., 0) may indicate that the above-mentioned constraints do not apply. Meanwhile, if sps_independent_subpics_flag is not present, the value of sps_independent_subpics_flag may be inferred to be the first value (e.g., 0).

[0120] The SPS may also include syntax elements subpic_ctu_top_left_x[i], subpic_ctu_top_left_y[i], subpic_width_minus1[i], and subpic_height_minus1[i] that indicate the position and size of the subpicture.

[0121] subpic_ctu_top_left_x[i] may represent the horizontal position of the top left CTU of the i-th subpicture in CtbSizeY units. In one example, the length of subpic_ctu_top_left_x[i] may be Ceil(Log2((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)) bits. On the other hand, if subpic_ctu_top_left_x[i] does not exist, the value of subpic_ctu_top_left_x[i] may be inferred to be a first value (e.g., 0).

[0122] subpic_ctu_top_left_y[i] may represent the vertical position of the top-left CTU of the i-th subpicture in CtbSizeY units. In one example, the length of subpic_ctu_top_left_y[i] may be Ceil(Log2((pic_height_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)) bits. On the other hand, if subpic_ctu_top_left_y[i] is not present, the value of subpic_ctu_top_left_y[i] may be inferred to be a first value (e.g., 0).

[0123] The value of subpic_width_minus1[i] plus 1 may represent the width of the i-th subpicture in CtbSizeY units. In one example, the length of subpic_width_minus1[i] may be Ceil(Log2((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)) bits. On the other hand, if subpic_width_minus1[i] is not present, the value of subpic_width_minus1[i] may be inferred to be ((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)-subpic_ctu_top_left_x[i]-1.

[0124] The value of subpic_height_minus1[i] plus 1 may represent the height of the i-th subpicture in CtbSizeY units. In one example, the length of subpic_height_minus1[i] may be Ceil(Log2((pic_height_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)) bits. On the other hand, if subpic_height_minus1[i] is not present, the value of subpic_height_minus1[i] may be inferred to be ((pic_height_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)-subpic_ctu_top_left_y[i]-1.

[0125] The SPS may also include subpic_treated_as_pic_flag[i], which indicates whether a subpicture is treated as one picture. For example, subpic_treated_as_pic_flag[i] having a first value (e.g., 0) may indicate that the i-th subpicture in each coded picture in the CLVS is not treated as one picture in the decoding process except for the in-loop filtering operation. In contrast, subpic_treated_as_pic_flag[i] having a second value (e.g., 1) may indicate that the i-th subpicture in each coded picture in the CLVS is treated as one picture in the decoding process except for the in-loop filtering operation. If subpic_treated_as_pic_flag[i] is not present, the value of subpic_treated_as_pic_flag[i] may be inferred to be the same value as sps_independent_subpics_flag described above. In one example, subpic_treated_as_pic_flag[i] may be coded / signaled only if the above-mentioned sps_independent_subpics_flag has a first value (e.g., 0) (i.e., the subpicture boundary is not treated as a picture boundary).

[0126] On the other hand, if subpic_treated_as_pic_flag[i] has a second value (e.g., 1), it may be a requirement for bitstream conformance that all of the following conditions be true for each output layer and its reference layers in an output layer set (OLS) that includes the layer containing the i-th subpicture as an output layer:

[0127] - (Condition 1) All pictures in the output layer and its reference layers must have the same value of pic_width_in_luma_samples and the same value of pic_height_in_luma_samples.

[0128] - (Condition 2) All SPSs referenced by the output layer and its reference layers must have the same value of sps_num_subpics_minus1, and the same values ​​of subpic_ctu_top_left_x[j], subpic_ctu_top_left_y[j], subpic_width_minus1[j], subpic_height_minus1[j], and loop_filter_across_subpic_enabled_flag[j], where j is in the range from 0 to sps_num_subpics_minus1.

[0129] The SPS may also include a syntax element loop_filter_across_subpic_enabled_flag[i] indicating whether an in-loop filtering operation across a subpicture boundary may be performed. For example, loop_filter_across_subpic_enabled_flag[i] having a first value (e.g., 0) may indicate that an in-loop filtering operation across the boundary of the i-th subpicture in each coded picture in the CLVS is not performed. In contrast, loop_filter_across_subpic_enabled_flag[i] having a second value (e.g., 1) may indicate that an in-loop filtering operation across the boundary of the i-th subpicture in each coded picture in the CLVS may be performed. If loop_filter_across_subpic_enabled_flag[i] is not present, the value of loop_filter_across_subpic_enabled_flag[i] may be inferred to be the same as 1-sps_independent_subpics_flag. In one example, loop_filter_across_subpic_enabled_flag[i] may be coded / signaled only if the above-mentioned sps_independent_subpics_flag has a first value (e.g., 0) (i.e., subpicture boundaries are not treated as picture boundaries). Meanwhile, as a requirement for bitstream compatibility, the subpicture shape must be such that when each subpicture is decoded, its entire left and upper boundaries are composed of picture boundaries or previously decoded subpicture boundaries.

[0130] FIG. 10 is a diagram showing a method in which an image encoding device according to an embodiment of the present disclosure encodes an image using sub-pictures.

[0131] The image coding device can code the current picture based on the sub-picture structure, or the image coding device can code at least one sub-picture constituting the current picture and output a (sub)bitstream including (coded) information on the (coded) at least one sub-picture.

[0132] Referring to Fig. 10, the image coding apparatus may divide an input picture into a plurality of sub-pictures (S1010). Then, the image coding apparatus may generate information about the sub-pictures (S1020). Here, the information about the sub-pictures may include, for example, information about the area of ​​the sub-pictures and / or information about grid spacing to be used for the sub-pictures. The information about the sub-pictures may also include information about whether each sub-picture can be treated as one picture and / or information about whether in-loop filtering can be performed across the boundaries of each sub-picture (boundary).

[0133] The image coding apparatus can code at least one subpicture based on information about the subpicture. For example, each subpicture can be coded independently based on information about the subpicture. Then, the image coding apparatus can code image information including information about the subpicture and output a bitstream (S1030). Here, the bitstream for the subpicture may be referred to as a substream or a sub-bitstream.

[0134] FIG. 11 is a diagram showing a method in which an image decoding device according to an embodiment of the present disclosure decodes an image using sub-pictures.

[0135] The image decoding device is capable of decoding at least one sub-picture contained in the current picture using (encoded) information about the at least one sub-picture obtained from a (sub)bitstream.

[0136] Referring to FIG. 11, the image decoding apparatus may obtain information about a sub-picture from a bitstream (S1110). Here, the bitstream may include a substream or sub-bitstream for the sub-picture. The information about the sub-picture may be configured in a higher level syntax of the bitstream. Then, the image decoding apparatus may derive at least one sub-picture based on the information about the sub-picture (S1120).

[0137] The image decoding apparatus may decode at least one sub-picture based on information about the sub-picture (S1130). For example, if a current sub-picture including a current block is treated as one picture, the current sub-picture may be decoded independently. Also, if in-loop filtering can be performed across a boundary of the current sub-picture, in-loop filtering (e.g., deblocking filtering) may be performed on a boundary of the current sub-picture and a boundary of an adjacent sub-picture adjacent to the boundary. Also, if a boundary of the current sub-picture coincides with a picture boundary, in-loop filtering across the boundary of the current sub-picture may not be performed. The image decoding apparatus may decode the sub-picture based on a CABAC method, a prediction method, a residual processing method (transformation, quantization), an in-loop filtering scheme, etc. Then, the image decoding apparatus may output the decoded at least one sub-picture, or output a current picture including at least one sub-picture. The decoded sub-picture may be output in the form of an output sub-picture set (OPS). For example, in the context of a 360-degree or omnidirectional image, when only a portion of the current picture is rendered, only a portion of all sub-pictures in the current picture may be decoded, and all or a portion of the decoded sub-pictures may be rendered according to the user's viewport.

[0138] Wraparound Overview

[0139] When inter prediction is applied to a current block, a prediction block of the current block may be derived based on a reference block identified by a motion vector of the current block. In this case, if at least one reference sample in the reference block is outside the boundary of the reference picture, the sample value of the reference sample may be replaced with a sample value of an adjacent sample existing on the boundary or the outermost edge of the reference picture. This is called padding, and the boundary of the reference picture may be extended through the padding.

[0140] On the other hand, when a reference picture is obtained from a 360-degree image, there may be continuity between the left and right boundaries of the reference picture. Thus, a sample adjacent to the left boundary (or right boundary) of the reference picture may have the same / similar sample value and / or motion information as a sample adjacent to the right boundary (or left boundary) of the picture. Based on this characteristic, at least one reference sample that falls outside the boundary of a reference picture in a reference block may be replaced with an adjacent sample in the reference picture that corresponds to the reference sample. This is called (horizontal) wrap-around motion compensation, and the motion vector of the current block may be adjusted to point to the inside of the reference picture through the wrap-around motion compensation.

[0141] Wrap-around motion compensation refers to a coding tool designed to improve the visual quality of a restored image / video, for example, a 360-degree image / video projected in ERP format. According to the existing motion compensation process, when the motion vector of the current block points to a sample that is out of the boundary of the reference picture, the sample value of the out-of-boundary sample can be derived by duplicating the sample value of the neighboring sample closest to the boundary through repeated padding. However, since a 360-degree image / video is acquired spherically and does not have an image boundary in nature, a reference sample that is out of the boundary of the reference picture on the projected domain (2D domain) can always be obtained from a neighboring sample that is adjacent to the reference sample on the old domain (3D domain). Therefore, repeated padding is incompatible with 360-degree images / videos and may induce visual artifacts called seam artifacts in the restored viewport image / video.

[0142] On the other hand, when the general projection method is applied, it may be difficult to obtain adjacent samples for wrap-around motion compensation on the old domain because 2D-to-3D and 3D-to-2D coordinate transformation is performed together with sample interpolation for fractional sample positions. However, when the ERP projection method is applied, the spherical adjacent samples that are out of the left boundary (or right boundary) of the reference picture can be relatively easily obtained from the samples in the right boundary (or left boundary) of the reference picture. Therefore, when considering the relative ease of implementation and the widespread use of the ERP projection method, wrap-around motion compensation may be more effective for 360-degree images / videos coded in the ERP format.

[0143] FIG. 12 is a diagram showing an example of a 360-degree image converted into a two-dimensional picture.

[0144] 12, a 360-degree image 1210 can be converted into a 2D picture 1230 through a projection process. The 2D picture 1230 can have various projection formats, such as an equi-rectangular projection (ERP) format or a padded ERP (PERP) format, depending on the projection method applied to the 360-degree image 1210.

[0145] The 360-degree image 1210 does not have an image boundary due to the image characteristics acquired from all directions. However, the 2D picture 1230 acquired from the 360-degree image 1210 has an image boundary due to the projection process. In this case, the left boundary LBd and the right boundary RBd of the 2D picture 1230 may abut each other forming a line RL in the 360-degree image 1210. Therefore, the similarity between samples adjacent to the left boundary LBd and the right boundary RBd in the 2D picture 1230 may be relatively high.

[0146] Meanwhile, a given region in the 360-degree image 1210 may correspond to an internal region or an external region of the 2D picture 1230 depending on a reference image boundary. For example, when the left boundary LBd of the 2D picture 1230 is used as a reference, the A region in the 360-degree image 1210 may correspond to the A1 region existing outside the 2D picture 1230. Conversely, when the right boundary RBd of the 2D picture 1230 is used as a reference, the A region in the 360-degree image 1210 may correspond to the A2 region existing inside the 2D picture 1230. The A1 region and the A2 region may have the same / similar sample attributes to each other in that they correspond to the same A region using the 360-degree image 1210 as a reference.

[0147] Based on this characteristic, an external sample outside the left boundary LBd of the 2D picture 1230 may be replaced with an internal sample of the 2D picture 1230 present at a position spaced a predetermined distance in the first direction DIR1 through wrap-around motion compensation. For example, an external sample of the 2D picture 1230 included in the A1 region may be replaced with an internal sample of the 2D picture 1230 included in the A2 region. Similarly, an external sample outside the right boundary RBd of the 2D picture 1230 may be replaced with an internal sample of the 2D picture 1230 present at a position spaced a predetermined distance in the second direction DIR2 through wrap-around motion compensation.

[0148] FIG. 13 is a diagram illustrating an example of a wrap-around motion compensation process.

[0149] Referring to FIG. 13, when inter prediction is applied to a current block 1310, a prediction block of the current block 1310 may be derived based on a reference block 1330.

[0150] The reference block 1330 may be identified by a motion vector 1320 of the current block 1310. In one example, the motion vector 1320 may point to an upper left position of the reference block 1330 with respect to an upper left position of a co-located block 1315 that is in the same position as the current block 1310 in the reference picture.

[0151] The reference block 1330 may include a first region 1335 that is off the left boundary of the reference picture, as shown in Figure 13. The first region 1335 is not available for inter prediction of the current block 1310, so it may be replaced by a second region 1340 in the reference picture via wrap-around motion compensation. The second region 1340 may correspond to the same region as the first region 1335 on the old domain (three-dimensional domain), and the position of the second region 1340 may be identified by adding a wrap-around offset to a predetermined position (e.g., the upper left position) of the first region 1335.

[0152] The wraparound offset may be set to the ERP width before padding of the current picture. Here, the ERP width may mean the width of an original picture (i.e., an ERP picture) in the ERP format obtained from a 360-degree image. A horizontal padding process may be performed on the left and right boundaries of the ERP picture. Thus, the width (PicWidth) of the current picture may be determined as a sum of the ERP width, the amount of padding on the left boundary of the ERP picture, and the amount of padding on the right boundary of the ERP picture. Meanwhile, the wraparound offset may be coded / signaled using a predetermined syntax element (e.g., pps_ref_wraparound_offset) in the upper level syntax. The syntax element is not affected by the amount of padding on the left and right boundaries of the ERP picture, and as a result, asymmetric padding on the original picture may be supported. That is, the amount of padding on the left boundary of an ERP picture (left padding) and the amount of padding on the right boundary of the ERP picture (right padding) may be different from each other.

[0153] Information regarding the wrap-around motion compensation described above (eg, whether activation is enabled, wrap-around offset, etc.) can be coded / signaled via higher level syntax, such as SPS and / or PPS.

[0154] FIG. 14a shows an example of an SPS including information regarding wraparound motion compensation.

[0155] Referring to FIG. 14a, the SPS may include a syntax element sps_ref_wraparound_enabled_flag indicating whether wraparound motion compensation is applied at a sequence level. For example, sps_ref_wraparound_enabled_flag having a first value (e.g., 0) may indicate that wraparound motion compensation is not applied to a current video sequence including the current block. In contrast, sps_ref_wraparound_enabled_flag having a second value (e.g., 1) may indicate that wraparound motion compensation is applied to a current video sequence including the current block. In one example, wraparound motion compensation for a current video sequence may be applied only if a picture width (e.g., pic_width_in_luma_samples) and a CTB width (CtbSizeY) satisfy the following conditions:

[0156] -(Condition)(CtbSizeY / MinCbSizeY+1)≧(pic_width_in_luma_samples / MinCbSizeY-1)

[0157] If the above condition is not satisfied, for example, if the value of (CtbSizeY / MinCbSizeY+1) is greater than the value of (pic_width_in_luma_samples / MinCbSizeY-1), sps_ref_wraparound_enabled_flag may be limited to a first value (for example, 0). Here, CtbSizeY may represent the width or height of the luma component CTB, and MinCbSizeY may represent the minimum width or height of the luma component CB (coding block). In addition, pic_width_max_in_luma_samples may represent the maximum width in luma sample units of each picture.

[0158] FIG. 14b shows an example of a PPS that includes information regarding wraparound motion compensation.

[0159] Referring to FIG. 14b, the PPS may include a syntax element pps_ref_wraparound_enabled_flag that indicates whether wraparound motion compensation is applied at the picture level.

[0160] Referring to FIG. 14b, the PPS may include a syntax element pps_ref_wraparound_enabled_flag indicating whether wraparound motion compensation is applied at a sequence level. For example, pps_ref_wraparound_enabled_flag having a first value (e.g., 0) may indicate that wraparound motion compensation is not applied to a current picture including a current block. In contrast, pps_ref_wraparound_enabled_flag having a second value (e.g., 1) may indicate that wraparound motion compensation is applied to a current picture including a current block. In one example, wraparound motion compensation for a current picture may be applied only if a picture width (e.g., pic_width_in_luma_samples) is greater than a CTB width (CtbSizeY). For example, if the value of (CtbSizeY / MinCbSizeY+1) is greater than the value of (pic_width_in_luma_samples / MinCbSizeY-1), then pps_ref_wraparound_enabled_flag may be limited to a first value (e.g., 0). In another example, if sps_ref_wraparoud_enabled_flag has a first value (e.g., 0), then the value of pps_ref_wraparound_enabled_flag may be limited to a first value (e.g., 0).

[0161] Furthermore, the PPS may include a syntax element pps_ref_wraparound_offset indicating an offset of wraparound motion compensation. For example, a value obtained by adding ((CtbSizeY / MinCbSizeY)+2) to pps_ref_wraparound_offset may indicate a wraparound offset for calculating a wraparound position in units of luma samples. The value of pps_ref_wraparound_offset may be greater than or equal to 0 and less than or equal to ((pic_width_in_luma_samples / MinCbSizeY)-(CtbSizeY / MinCbSizeY)-2). Meanwhile, the variable PpsRefWraparoundOffset may be set to a value equal to (pps_ref_wraparound_offset+(CtbSizeY / MinCbSizeY)+2). The variable PpsRefWraparoundOffset may be used in a process of clipping reference samples that are outside the boundaries of a reference picture.

[0162] On the other hand, if the current picture is divided into multiple sub-pictures, wrap-around motion compensation can be selectively performed based on the attributes of each sub-picture.

[0163] FIG. 15 is a flowchart showing a method in which the image decoding apparatus performs wraparound motion compensation based on sub-picture attributes.

[0164] Referring to FIG. 15, the image decoding apparatus may determine whether the current sub-picture is independently coded (S1510).

[0165] If the current sub-picture is independently coded (YES in S1510), the image decoding apparatus may clip the position of the reference sample with respect to the sub-picture boundary for motion compensation for the current block (S1520). The above operation may be performed using any one of a luma sample bilinear interpolation process, a luma sample interpolation filtering process, a luma integer sample fetching process, and a chroma sample interpolation process.

[0166] If the current sub-picture is not independently coded ("NO" in S1510), the image coding apparatus may determine whether wrap-around motion compensation is available for the current block (S1530).

[0167] Whether wraparound motion compensation is available for the current block may be determined based on a predetermined variable (e.g., refWraparoundEnabledFlag). For example, if refWraparoundEnabledFlag has a first value (e.g., 0), wraparound motion compensation may not be available for the current block. In contrast, if refWraparoundEnabledFlag has a second value (e.g., 1), wraparound motion compensation may be available for the current block. In one example, the value of refWraparoundEnabledFlag may be derived based on a predetermined flag (e.g., pps_ref_wraparound_enabled_flag) obtained from a higher level syntax, e.g., a picture parameter set.

[0168] If wraparound motion compensation is available for the current block ("YES" in S1530), the image decoding apparatus may modify the position of the reference sample using the wraparound offset (S1540). For example, the image decoding apparatus may modify the position of the reference sample by shifting the x coordinate of the reference sample in the positive or negative direction by the wraparound offset (e.g., PpsRefWraparoundOffset*MinCbSizeY). Then, the image decoding apparatus may clip the modified position of the reference sample with respect to the boundary of the reference picture for motion compensation for the current block (S1550).

[0169] Alternatively, if wraparound motion compensation is not available for the current block ("NO" in S1530), the image decoding apparatus may clip the position of the reference sample relative to the boundary of the reference picture for motion compensation for the current block (S1560).

[0170] Meanwhile, the above-mentioned clipping operation can be performed using a luma sample bilinear interpolation procedure, a specific example of which is shown in Table 1 below.

[0171] [Table 1]

[0172] Referring to Table 1, the luma position (xInti, yInti) of the reference sample in integer sample units can be adjusted to within the reference picture boundary or sub-picture boundary using a predetermined clipping function (Clip3, ClipH). Here, Clip3(x, y, z) means a function that outputs x if z is less than x, outputs y if z is greater than y, and outputs z otherwise. Also, ClipH(x, y, z) means a function that outputs z+x if z is less than 0, outputs zx if z is greater than y-1, and outputs z otherwise.

[0173] If the current subpicture is coded independently, process 1 may be performed. Specifically, a clipping operation based on the subpicture boundary may be performed on the x and y coordinates of the reference sample (A110, A120). In process 1, SubpicLeftBoundaryPos may indicate the subpicture left boundary, SubpicRightBoundaryPos may indicate the subpicture right boundary, SubpicTopBoundaryPos may indicate the subpicture top boundary, and SubpicBotBoundaryPos may indicate the subpicture bottom boundary.

[0174] If the current sub-picture is not independently coded, process 2 may be performed. Specifically, a wrap-around offset (e.g., PpsRefWraparoundOffset) may be selectively applied to the x coordinate of the reference sample depending on whether wrap-around motion compensation is available for the current block (e.g., refWraparoundEnabledFlag==1), and a clipping operation based on the reference picture boundary may be performed on the selectively applied x coordinate (A130). Differently, a clipping operation based on the reference picture boundary may be performed on the y coordinate of the reference sample regardless of whether the wrap-around motion compensation is available (A140). In process 2, picW may indicate the width of the reference picture, and picH may indicate the height of the reference picture.

[0175] Alternatively, the above clipping operation can be performed using a luma sample interpolation filtering procedure, a specific example of which is shown in Table 2 below.

[0176] [Table 2]

[0177] Referring to Table 2, the luma position (xInti, yInti) of the reference sample in integer sample units can be adjusted to within the reference picture boundary or sub-picture boundary using a predetermined clipping function (Clip3, ClipH). A duplicated explanation of Table 1 will be omitted.

[0178] Depending on whether the current subpicture is independently coded or not, process 1 or process 2 may be selectively performed. Also, wraparound motion compensation may be performed only on the x coordinate of the reference sample if the current subpicture is not independently coded (process 2) (A230).

[0179] Alternatively, the above clipping operation can be performed using a luma integer sample fetching procedure, a specific example of which is shown in Table 3 below.

[0180] [Table 3]

[0181] Referring to Table 3, the luma position (xInt, yInt) of the reference sample in integer sample units can be adjusted to within the reference picture boundary or sub-picture boundary using a predetermined clipping function (Clip3, ClipH). A duplicated explanation of Table 1 will be omitted.

[0182] Depending on whether the current subpicture is independently coded or not, process 1 or process 2 may be selectively performed. Also, wraparound motion compensation may be performed only on the x coordinate of the reference sample if the current subpicture is not independently coded (process 2) (A330).

[0183] The above clipping operation can be performed using a chroma sample interpolation procedure, a specific example of which is shown in Table 4 below.

[0184] [Table 4]

[0185] Referring to Table 4, the luma position (xInt, yInt) of the reference sample in integer sample units may be adjusted within the reference picture boundary or subpicture boundary using a predetermined clipping function (Clip3, ClipH). In this case, the reference picture boundary or subpicture boundary may be determined based on the chroma sample, unlike the method described above with reference to Tables 1 to 3. For example, SubWidthC and SubHeightC may indicate the width ratio and height ratio of the luma sample and the chroma sample, respectively. Then, based on the chroma sample, the subpicture left boundary may be determined as (SubpicLeftBoundaryPos / SubWidthC), the subpicture right boundary may be determined as (SubpicRightBoundaryPos / SubWidthC), the subpicture top boundary may be determined as (SubpicTopBoundaryPos / SubWidthC), and the subpicture bottom boundary may be determined as (SubpicBotBoundaryPos / SubWidthC).

[0186] Depending on whether the current subpicture is independently coded or not, process 1 or process 2 may be selectively performed. Also, wraparound motion compensation may be performed only on the x coordinate of the reference sample if the current subpicture is not independently coded (process 2) (A430).

[0187] On the other hand, the method of FIG. 15 can also be performed by an image coding device, which is obvious to one of ordinary skill in the art.

[0188] As described above, according to the method of Fig. 15, wraparound motion compensation for the current block can be performed only when the current sub-picture is not independently coded. As a result, a problem occurs in that wraparound-related coding tools cannot be used together with various sub-picture-related coding tools that assume independent coding of sub-pictures. This can act as a factor that reduces encoding / decoding performance for pictures with inter-boundary continuity such as ERP pictures or PERP pictures.

[0189] In order to solve this problem, according to an embodiment of the present disclosure, even when the current sub-picture is coded independently, wrap-around motion compensation may be performed according to a predetermined condition. Hereinafter, an embodiment of the present disclosure will be described in detail.

[0190] According to one embodiment of the present disclosure, if all independently coded sub-pictures in a current video sequence have the same width as the picture width, wrap-around motion compensation may be available for all sub-pictures in a current video sequence.

[0191] FIG. 16 is a flowchart showing a method in which an image encoding device according to an embodiment of the present disclosure determines whether or not wrap-around motion compensation is available.

[0192] Referring to FIG. 16, the image coding apparatus may determine whether there are one or more independently coded sub-pictures in the current video sequence (S1610).

[0193] If the determination result indicates that there is no one or more independently coded sub-pictures in the current video sequence ("NO" in S1610), the image coding apparatus may determine whether wraparound motion compensation is available for the current video sequence based on a predetermined wraparound constraint (S1640). In this case, the image coding apparatus may code flag information (e.g., sps_wraparound_enabled_flag) indicating whether wraparound motion compensation is available for the current video sequence to a first value (e.g., 0) or a second value (e.g., 1) based on the determination.

[0194] As an example of the wrap-around constraint, if wrap-around motion compensation is restricted for one or more output layer sets (OLSs) specified by a video parameter set (VPS), wrap-around motion compensation may be restricted to be unavailable for a current video sequence. As another example of the wrap-around constraint, if all sub-pictures in the current video sequence have discontinuous sub-picture boundaries, wrap-around motion compensation may be restricted to be unavailable for a current video sequence.

[0195] Alternatively, if there are one or more independently coded sub-pictures in the current video sequence ("YES" in S1610), the image coding device may determine whether any of the independently coded sub-pictures has a width different from the picture width (S1620).

[0196] In one embodiment, the picture width can be derived as shown in Equation 1 based on the maximum width that a picture can have in the current video sequence.

[0197]

number

[0198] Here, pic_width_max_in_luma_samples represents the maximum width of a picture in luma sample units, CtbSizeY represents the CTB (coding tree block) width in the picture in luma sample units, and CtbLog2SizeY may represent the log scale value of CtbSizeY.

[0199] If the determination result indicates that at least one of the independently coded sub-pictures has a width different from the picture width ("YES" in S1620), the image coding apparatus may determine that wraparound motion compensation is not available for the current video sequence (S1630). In this case, the image coding apparatus may code sps_ref_wraparound_enabled_flag to a first value (e.g., 0) based on the determination.

[0200] Alternatively, if all independently coded sub-pictures have the same width as the picture width ("NO" in S1620), the image coding apparatus may determine whether wraparound motion compensation is available for the current video sequence based on the wraparound constraint described above (S1640). In this case, the image coding apparatus may code sps_ref_wraparound_enabled_flag to a first value (e.g., 0) or a second value (e.g., 1) based on the determination.

[0201] 16, steps S1610 and S1620 are illustrated as being performed sequentially, but this is merely an example and does not limit the embodiments of the present disclosure. For example, step S1620 may be performed simultaneously with step S1610, or may be performed prior to step S1610.

[0202] Meanwhile, the sps_ref_wraparound_enabled_flag coded by the image coding apparatus may be stored in a bitstream and signaled to the image decoding apparatus, in which case the image decoding apparatus may determine whether wraparound motion compensation is available for the current video sequence based on the sps_ref_wraparound_enabled_flag obtained from the bitstream.

[0203] For example, when sps_ref_wraparound_enabled_flag has a first value (e.g., 0), the image decoding apparatus may determine that wraparound motion compensation is not available for the current video sequence and may not perform wraparound motion compensation on the current block. In this case, the reference sample position of the current block may be clipped with respect to a reference picture boundary or a sub-picture boundary, and motion compensation may be performed using the reference sample at the clipped position.

[0204] That is, the image decoding apparatus can perform correct motion compensation according to the present disclosure without separately determining whether or not there are one or more sub-pictures in the current video sequence that are independently coded and have a width different from the picture width. However, the operation of the image decoding apparatus is not limited thereto. For example, the image decoding apparatus can perform motion compensation based on the result of the determination after determining whether or not there are one or more sub-pictures in the current video sequence that are independently coded and have a width different from the picture width. More specifically, the image decoding apparatus can determine whether or not there are one or more sub-pictures in the current video sequence that are independently decoded and have a width different from the picture width, and if such sub-pictures exist, can regard sps_ref_wraparound_enabled_flag as a first value (e.g., 0) and not perform wraparound motion compensation.

[0205] Alternatively, if sps_ref_wraparound_enabled_flag has a second value (e.g., 1), the image decoding apparatus may determine that wraparound motion compensation is available for the current video sequence. In this case, the image decoding apparatus may additionally obtain a wraparound flag (e.g., pps_ref_wraparound_enabled_flag) indicating whether wraparound motion compensation is available for the current picture from the bitstream, and may determine whether to perform wraparound motion compensation for the current block based on the obtained wraparound flag information.

[0206] For example, if pps_ref_wraparound_enabled_flag has a first value (e.g., 0), the image decoding apparatus may not perform wraparound motion compensation on the current block. In this case, the reference sample position of the current block may be clipped with reference to a reference picture boundary or a sub-picture boundary, and motion compensation may be performed using the reference sample at the clipped position. In contrast, if pps_ref_wraparound_enabled_flag has a second value (e.g., 1), the image decoding apparatus may perform wraparound motion compensation on the current block.

[0207] As described above, if all independently coded sub-pictures in a current video sequence have the same width as the picture width, wrap-around motion compensation can be applied to all sub-pictures in the current video sequence, thereby enabling sub-picture-related coding tools and wrap-around motion compensation-related coding tools to be used together, thereby improving the efficiency of encoding / decoding.

[0208] FIG. 17 is a flowchart showing a method in which an image decoding apparatus according to an embodiment of the present disclosure performs wraparound motion compensation based on sub-picture attributes.

[0209] Referring to FIG. 17, the image decoding apparatus may determine whether the current sub-picture is independently coded (S1710). In one example, whether the current sub-picture is independently coded may be determined based on a higher level syntax, for example, a predetermined flag (e.g., subpic_treated_as_pic_flag) in the SPS. For example, if subpic_treated_as_pic_flag has a first value (e.g., 0), the current sub-picture may not be independently coded. In contrast, if subpic_treated_as_pic_flag has a second value (e.g., 1), the current sub-picture may be independently coded.

[0210] If the current sub-picture is independently coded ("YES" in S1710), the image decoding apparatus may determine whether wrap-around motion compensation is available for the current block (S1720).

[0211] Whether wraparound motion compensation is available for the current block may be determined based on a predetermined variable (e.g., refWraparoundEnabledFlag). For example, if refWraparoundEnabledFlag has a first value (e.g., 0), wraparound motion compensation may be unavailable for the current block. In contrast, if refWraparoundEnabledFlag has a second value (e.g., 1), wraparound motion compensation may be available for the current block. In one example, refWraparoundEnabledFlag may be set as shown in Equation 2 below.

[0212]

number

[0213] Here, pps_ref_wraparound_enabled_flag may indicate whether wraparound motion compensation is available for the current picture including the current block (1 means available, 0 means not available). pps_ref_wraparound_enabled_flag may be obtained via a higher level syntax, for example, a picture parameter set (PPS). Also, the variable refPicIsScaled may indicate whether reference picture scaling is performed (or whether reference picture scaling is required). For example, if reference picture scaling is performed, refPicIsScaled may have a first value (e.g., 0), and if reference picture scaling is not performed, refPicIsScale may have a second value (e.g., 1).

[0214] Referring to Equation 2, if wraparound motion compensation is not available for the current picture (e.g., pps_ref_wraparound_enabled_flag==0) or if reference picture scaling is performed (e.g., refPicIsScaled==1), refWraparoundEnabledFlag may have a first value (e.g., 0) indicating that wraparound motion compensation is not available for the current block. In contrast, if wraparound motion compensation is available for the current picture (e.g., pps_ref_wraparound_enabled_flag==1) and reference picture scaling is not performed (e.g., refPicIsScaled==0), refWraparoundEnabledFlag may have a second value (e.g., 1) indicating that wraparound motion compensation is available for the current block. In this way, wraparound motion compensation and reference picture scaling for the reference picture may be selectively performed.

[0215] In one embodiment, a variable SliceRefWraparoundEnabledFlag is defined relating to whether wraparound motion compensation is available or not, and can be derived as follows:

[0216] -SliceRefWraparoundEnabledFlag can be set to the same as the above-mentioned pps_ref_wrap_around_enabled_flag.

[0217] -If SliceRefWraparoundEnabledFlag has a second value (e.g., 1) and subpic_treated_as_pic_flag[i] for the current subpicture (i.e., the subpicture to which the current slice belongs) has a second value (e.g., 1) (i.e., if the current subpicture is independently coded), and the width of the current subpicture is different from the width of the picture, the value of SliceRefWraparoundEnabledFlag can be set to a first value (e.g., 0).

[0218] - When SliceRefWraparoundEnabledFlag has a second value (e.g., 1) and the reference picture is not scaled, SliceRefWraparoundEnabledFlag can be used to activate the aforementioned refWraparoundEnabledFlag (i.e., refWraparoundEnabledFlag=1).

[0219] The above-mentioned derivation process of SliceRefWraparoundEnabledFlag can be defined as semantics in the slice header. A specific example is shown in Table 5.

[0220] [Table 5]

[0221] Referring to Table 5, SliceRefWraparoundEnabledFlag may be set to the same value as pps_ref_wraparound_enabled_flag. If SliceRefWraparoundEnabledFlag has a second value (e.g., 1), subpic_treated_as_pic_flag[CurrSubpicIdx] has a second value (e.g., 1), and subpic_width_minus1[CurrSubpicIdx]+1 is less than Ceil(pic_width_in_luma_samples÷CtbSizeY), the value of SliceRefWraparoundEnabledFlag may be reset to the first value (e.g., 0).

[0222] If wrap-around motion compensation is available for the current block ("YES" in S1720), the image decoding apparatus may modify the position of the reference sample using the wrap-around offset (S1730).

[0223] The wrap-around offset may be set to the ERP width before padding of the current picture. Here, the ERP width may mean the width of an original picture (i.e., an ERP picture) in the ERP format obtained from a 360-degree image. The wrap-around offset may be determined based on a predetermined syntax element (e.g., pps_ref_wraparound_offset) obtained via a higher level syntax, for example, a picture parameter set (PPS). Then, the x coordinate of the reference sample may be shifted in a positive or negative direction using the wrap-around offset.

[0224] The image decoding apparatus may clip the positions of the modified reference samples with respect to the sub-picture boundary (S1740), thereby allowing the positions of the reference samples to be included within the sub-picture boundary.

[0225] Alternatively, if wraparound motion compensation is not available for the current block ("NO" in S1720), the image decoding apparatus may clip the position of the reference sample with respect to the sub-picture boundary (S1750), so that the position of the reference sample can be included within the sub-picture boundary.

[0226] As described above, when the current subpicture is independently coded, the clipping operation for the position of the reference sample can be performed with respect to the subpicture boundary regardless of whether wraparound motion compensation is available for the current block (S1740, S1750). This may be due to the fact that the independently coded subpicture has continuity with respect to the subpicture boundary, which is not the reference picture boundary.

[0227] Returning to step S1710 again, if the current sub-picture is not independently coded ("NO" in S1710), the image decoding apparatus may determine whether wraparound motion compensation is available for the current block (S1760). As described above, whether wraparound motion compensation is available for the current block may be determined based on a predetermined variable (e.g., refWraparoundEnabledFlag).

[0228] If wrap-around motion compensation is available for the current block ("YES" in S1760), the image decoding apparatus may modify the position of the reference sample using the wrap-around offset (S1770). Then, the image decoding apparatus may clip the modified position of the reference sample based on the reference picture boundary (S1780). This allows the position of the reference sample to be included within the reference picture boundary.

[0229] Alternatively, if wraparound motion compensation is not available for the current block ("NO" in S1760), the image decoding apparatus may clip the position of the reference sample relative to the reference picture boundary (S1790).

[0230] As described above, if the current sub-picture is not independently coded, the clipping operation for the position of the reference sample can be performed with reference to the reference picture boundary regardless of whether wrap-around motion compensation is available for the current block (S1780, S1790). This may be due to the fact that the sub-picture that is not independently coded has continuity with reference to the reference picture boundary that is not the sub-picture boundary.

[0231] Meanwhile, the above-mentioned clipping operation may be performed using any one of a luma sample bilinear interpolation procedure, a luma sample interpolation filtering procedure, a luma integer sample fetching procedure, and a chroma sample interpolation procedure. According to an embodiment of the present disclosure, even if the current sub-picture is independently coded, wrap-around motion compensation may be performed. Therefore, the above-mentioned Process 1 in Tables 1 to 4 may be modified as shown in the following Tables 6 to 9.

[0232] [Table 6]

[0233] [Table 7]

[0234] [Table 8]

[0235] [Table 9]

[0236] Referring to Tables 6 to 9, unlike existing clipping operations, even when a current sub-picture is independently coded, if wrap-around motion compensation is available, the position of the reference sample can be clipped based on the sub-picture boundary (A610 to A910).

[0237] Specifically, if the current sub-picture is coded independently, process 1 may be performed. Depending on whether wraparound motion compensation for the current block is available (e.g., refWraparoundEnabledFlag==1) for the x coordinate of the reference sample, a wraparound offset (e.g., PpsRefWraparoundOffset) may be selectively applied, and a clipping operation based on the sub-picture boundary may be performed for the selectively applied x coordinate. However, for the y coordinate of the reference sample, a general clipping operation (or padding operation) based on the sub-picture boundary may be performed, as described above with reference to Tables 1 to 4. This may mean that wraparound motion compensation is applied only to the left and right boundaries of the reference picture (i.e., horizontal wraparound motion compensation).

[0238] In Table 9, the wrap-around offset xOffset used in the wrap-around motion compensation using the chroma sample interpolation procedure (see Table 8) can be derived as shown in Equation 3 below.

[0239]

number

[0240] Referring to Equation 3, the wraparound offset (xOffset) can be calculated by multiplying offset information (PpsRefWraparoundOffset) obtained from a higher level syntax, for example, a picture parameter set (PPS), by the minimum width (MinCbSizeY) of a CB (coding block), and then dividing the result by the luma-chroma sample width ratio (SubWidthC).

[0241] In one embodiment, when the variable SliceRefWraparoundEnabledFlag is newly defined as described above, refWraparoundEnabledFlag in Tables 6 to 9 can be derived as shown in Equation 4 below without using pps_ref_wraparound_enabled_flag obtained from the PPS.

[0242]

number

[0243] Referring to Equation 4, if SliceRefWraparoundEnabledFlag has a first value (e.g., 0) or refPicIsScaled has a second value (e.g., 1), refWraparoundEnabledFlags may be set to a first value (e.g., 0). Conversely, if SliceRefWraparoundEnabledFlag has a second value (e.g., 1) and refPicIsScaled has a first value (e.g., 0), refWraparoundEnabledFlags may be set to a second value (e.g., 1).

[0244] In one embodiment, variables LeftBoundaryPos, RightBoundaryPos, TopBoundaryPos, and / or BottomBoundaryPos indicating subpicture boundaries may be newly defined. The new variables may indicate the positions of subpicture boundaries when subpic_treated_as_flag has a first value (e.g., 0) or a second value (e.g., 1). A specific example of a method for deriving the new variables is shown in Table 10.

[0245] [Table 10]

[0246] Referring to Table 10, the initial value of the variable LeftBoundaryPos may be set to 0. In addition, the initial value of the variable RightBoundaryPos may be set to pic_width_in_luma_samples-1. In addition, the initial value of the variable TopBoundaryPos may be set to 0. In addition, the initial value of the variable BottomBoundaryPos may be set to pic_height_in_luma_samples-1.

[0247] If the current subpicture is coded independently (i.e., subpic_treated_as_pic_flag[CurrSubpicIdx]==1), the values ​​of LeftBoundaryPos, RightBoundaryPos, TopBoundaryPos, and BottomBoundaryPos can be updated. Specifically, the value of LeftBoundaryPos can be updated to subpic_ctu_top_left_x[CurrSubpicIdx]*CtbSizeY. Also, the value of RightBoundaryPos can be updated to Min(pic_width_max_in_luma_samples-1, (subpic_ctu_top_left_x[CurrSubpicIdx]+subpic_width_minus1[CurrSubpicIdx]+1)*CtbSizeY-1). Here, Min(x,y) is a function that outputs the smaller value of x and y. Additionally, the value of TopBoundaryPos can be updated to subpic_ctu_top_left_y[CurrSubpicIdx]*CtbSizeY, and the value of BottomBoundaryPos can be updated to Min(pic_height_max_in_luma_samples-1, (subpic_ctu_top_left_y[CurrSubpicIdx]+subpic_height_minus1[CurrSubpicIdx]+1)*CtbSizeY-1).

[0248] The procedures in Tables 6 to 9 above can be modified as shown in Tables 11 to 14 below using new variables related to the sub-picture boundaries.

[0249] [Table 11]

[0250] [Table 12]

[0251] [Table 13]

[0252] [Table 14]

[0253] The procedures in Tables 11 to 14 are similar to those in Tables 6 to 9 except that new variables related to sub-picture boundaries are used, and therefore repeated explanations will be omitted. Meanwhile, a TMVP (temporal motion vector prediction) derivation procedure, a sub-block-based temporal merge candidate derivation procedure, and a restored affine control point motion vector merge candidate derivation procedure can also be performed using the new variables related to sub-picture boundaries.

[0254] 18 is a diagram showing an example of an SPS according to an embodiment of the present invention. Description overlapping with the SPS described above with reference to FIG. 9 and FIG. 14a will be omitted.

[0255] Referring to Figure 18, the SPS may include a flag sps_ref_wraparound_enabled_flag indicating whether wraparound motion compensation is available at the sequence level. For example, a first value (e.g., 0) of sps_ref_wraparound_enabled_flag may indicate that (horizontal) wraparound motion compensation is applied to inter prediction. In contrast, a second value (e.g., 1) of sps_ref_wraparound_enabled_flag may indicate that (horizontal) wraparound motion compensation is not applied.

[0256] If the value of the syntax element subpic_width_minus1[i] indicating the width of the i-th subpicture plus 1 is different from (pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY) for all subpictures in a picture, it may be a requirement for bitstream conformance that the value of sps_ref_wraparound_enabled_flag be forced to a first value (e.g., 0), where i may be greater than or equal to 0 and less than or equal to the value of the syntax element sps_num_subpics_minus1 indicating the number of subpictures in a picture.

[0257] In one embodiment, sps_ref_wraparound_enabled_flag may be signaled prior to syntax elements related to subpictures (e.g., subpic_info_present_flag, sps_num_subpics_minus1, etc.), and when sps_ref_wraparound_enabled_flag has a second value (e.g., 1), syntax elements related to the position and width of subpictures (e.g., subpic_ctu_top_left_x[i], subpic_ctu_top_left_y[i], and subpic_width_minus1[i]) may not be signaled.

[0258] In this case, the value of subpic_ctu_top_left_x[i], which is a syntax element representing the horizontal position of the top left CTU of the i-th subpicture in CtbSizeY units, can be inferred to be a first value (e.g., 0). Also, subpic_ctu_top_left_y[i], which is a syntax element representing the vertical position of the top left CTU of the i-th subpicture in CtbSizeY units, can be inferred to be subpic_ctu_top_left_y[i-1]+subpic_height_minus1[i-1]. Here, subpic_height_minus1[i-1] can indicate a value obtained by subtracting 1 from the height of the i-1-th subpicture. Also, the syntax element subpic_width_minus1[i] indicating the width of a subpicture can be inferred as ((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)-1, where pic_width_max_in_luma_samples indicates the maximum width of a picture in luma sample units, CtbSizeY indicates a coding tree block (CTB) width, and CtbLog2SizeY indicates a log scale value of the CTB width.

[0259] In another embodiment, the syntax elements relating to the position and width of the sub-pictures mentioned above can be restricted to be inferred to the above values ​​if sps_ref_wraparound_enabled_flag has a second value (eg, 1).

[0260] Continuing with reference to FIG. 18, subpic_ctu_top_left_x[i], subpic_ctu_top_left_y[i], and subpic_width_minus1[i] may be signaled only if sps_ref_wraparound_enabled_flag has a first value (e.g., 0) (1810).

[0261] subpic_ctu_top_left_x[i] may represent the horizontal position of the top-left CTU of the i-th subpicture in CtbSizeY units. The length of subpic_ctu_top_left_x[i] may be Ceil(Log2((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)) bits. If subpic_ctu_top_left_x[i] is not present in the bitstream (i.e., not signaled), the value of subpic_ctu_top_left_x[i] may be inferred to be 0.

[0262] Also, subpic_ctu_top_left_y[i] may represent the vertical position of the top-left CTU of the i-th subpicture in CtbSizeY units. The length of subpic_ctu_top_left_y[i] may be Ceil(Log2((pic_height_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)) bits. If subpic_ctu_top_left_y[i] is not present in the bitstream (i.e., it is not signaled), the following applies:

[0263] If the -i value is greater than 0 and sps_ref_wraparound_enabled_flag has a second value (e.g., 1), the value of subpic_ctu_top_left_y[i] can be inferred to be the same as (subpic_ctu_top_left_y[i-1] + subpic_height_minus1[i-1] + 1).

[0264] - Otherwise, the value of subpic_ctu_top_left_y[i] can be inferred to be the same as (((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)-subpic_ctu_top_left_x[i]-1).

[0265] Also, subpic_width_minus1[i] plus 1 may represent the width of the i-th subpicture in CtbSizeY units. The length of subpic_width_minus1[i] may be Ceil(Log2((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)) bits. If subpic_width_minus1[i] is not present in the bitstream (i.e., it is not signaled), the following applies:

[0266] If -sps_ref_wraparound_enabled_flag has a second value (e.g., 1), the value of subpic_width_minus1[i] can be inferred to be the same as (((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)-1).

[0267] - Otherwise, the value of subpic_width_minus1[i] can be inferred to be the same as (((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)-subpic_ctu_top_left_x[i]-1).

[0268] Meanwhile, according to another embodiment, the above-mentioned inference conditions of subpic_ctu_top_left_x[i], subpic_ctu_top_left_y[i], and subpic_width_minus1[i] may be enforced. For example, if sps_ref_wraparound_enabled_flag has a second value (e.g., 1), it may be a constraint for bitstream compatibility that the value of subpic_ctu_top_left_x[i] is inferred to be a first value (e.g., 0). Also, if sps_ref_wraparound_enabled_flag has a second value (e.g., 1), it may be a constraint for bitstream compatibility that subpic_ctu_top_left_y[i] is inferred to be subpic_ctu_top_left_y[i-1]+subpic_height_minus1[i-1]. Also, when sps_ref_wraparound_enabled_flag has a second value (e.g., 1), it may be a constraint for bitstream conformance that subpic_width_minus1[i] is inferred to be ((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)-1.

[0269] As described above, according to the embodiment of the present disclosure, wrap-around motion compensation can be applied to a current sub-picture regardless of whether the current sub-picture is independently coded. In this case, if the current sub-picture is independently coded, the wrap-around motion compensation can be performed based on a sub-picture boundary. In contrast, if the current sub-picture is not independently coded, the wrap-around motion compensation can be performed based on a reference picture boundary. As a result, since sub-picture-related coding tools and wrap-around motion compensation-related coding tools can be used together, the efficiency of encoding / decoding can be further improved.

[0270] Hereinafter, an image encoding / decoding method according to an embodiment of the present disclosure will be described in detail with reference to FIGS.

[0271] FIG. 19 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.

[0272] 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, and step S1930 may be performed by the entropy encoding unit 190.

[0273] Referring to FIG. 19, the image coding apparatus may determine whether to apply wrap-around motion compensation to a current block (S1910).

[0274] In one embodiment, the image coding apparatus may determine whether wrap-around motion compensation is available based on whether there are one or more sub-pictures that are independently coded and have a width different from the picture width in a current video sequence including the current block. For example, if there are one or more sub-pictures that are independently coded and have a width different from the picture width in the current video sequence, the image coding apparatus may determine that wrap-around motion compensation is not available. In contrast, if all independently coded sub-pictures in the current video sequence have the same width as the picture width, the image coding apparatus may determine that wrap-around motion compensation is available based on a predetermined wrap-around constraint. Here, an example of the wrap-around constraint is as described above with reference to FIGs. 16 to 18.

[0275] Then, the image coding apparatus may determine whether to apply wrap-around motion compensation to the current block based on the determination. For example, if wrap-around motion compensation is not available for the current picture, the image coding apparatus may determine not to perform wrap-around motion compensation on the current block. In contrast, if wrap-around motion compensation is available for the current picture, the image coding apparatus may determine to perform wrap-around motion compensation on the current block.

[0276] In one embodiment, the current sub-picture is coded independently and wraparound motion compensation for the current block can be skipped based on the width of the current sub-picture being different from the width of the current picture.

[0277] The image encoding apparatus can generate a predicted block of the current block by performing inter prediction based on the determination result of step S1910 (S1920).

[0278] In one embodiment, wrap-around motion compensation for the current block may be performed based on one of the boundaries of the current subpicture including the current block and the boundaries of the reference picture of the current block, depending on whether the current subpicture including the current block is independently coded. For example, if the current subpicture is independently coded (e.g., subpic_treated_as_pic_flag==1), wrap-around motion compensation for the current block may be performed based on the boundaries of the current subpicture. In contrast, if the current subpicture is not independently coded (e.g., subpic_treated_as_pic_flag==0), wrap-around motion compensation for the current block may be performed based on the boundaries of the reference picture.

[0279] In one embodiment, the wrap-around motion compensation for the current block may be performed by modifying an x-coordinate of a reference block identified by a motion vector of the current block in a reference picture of the current block based on a predetermined wrap-around offset. In one example, the wrap-around offset may be set to an ERP width before padding of the current picture. Here, the ERP width may refer to the width of an original picture (i.e., an ERP picture) in an ERP format obtained from a 360-degree image. The wrap-around motion compensation may be performed by clipping the x-coordinate of the modified reference block within any one of a boundary position of the current sub-picture and a boundary position of the reference picture.

[0280] In one embodiment, wrap-around motion compensation for the current block may be performed based on a left boundary position and a right boundary position that are set based on whether the current sub-picture is independently coded. For example, if the current sub-picture is independently coded, the left boundary position and the right boundary position may be set to a left boundary position and a right boundary position of the current sub-picture. In contrast, if the current sub-picture is not independently coded, the left boundary position and the right boundary position may be set to a left boundary position and a right boundary position of the reference picture. Then, wrap-around motion compensation for the current block may be performed based on the set left boundary position and the right boundary position. In this way, whether the current sub-picture is independently coded is reflected in a boundary position used for clipping the position of the reference block, so that it is not necessary to separately determine whether the current sub-picture is independently coded. This makes it possible to further simplify a motion compensation process for generating a prediction block for the current block. The image encoding apparatus may generate a bitstream by encoding inter prediction information of the current block and wrap-around information related to wrap-around motion compensation (S1930).

[0281] In one embodiment, the wraparound information may include a first flag (e.g., pps_ref_wraparound_enabled_flag) indicating whether wraparound motion compensation is available for the current picture. The first flag may have a first value (e.g., 0) indicating that wraparound motion compensation is not available for the current picture based on the wraparound motion compensation not being available for the current video sequence including the current block (e.g., sps_ref_wraparound_enabled_flag==0). The first flag may also have a first value (e.g., 0) indicating that wraparound motion compensation is not available for the current picture based on a predetermined condition related to a width of a coding tree block (CTB) in the current picture and a width of the current picture. For example, if a width of a CTB in the current picture (e.g., CtbSizeY) is greater than a width of the picture (e.g., pic_width_in_luma_samples), pps_ref_wraparound_enabled_flag may be limited to a first value (e.g., 0).

[0282] In one embodiment, the wraparound information may further include a wraparound offset (e.g., pps_ref_wraparound_offset) based on whether the wraparound motion compensation is available for the current picture. The image coding apparatus may perform wraparound motion compensation based on the wraparound offset.

[0283] FIG. 20 is a flowchart illustrating an image decoding method according to one embodiment of the present disclosure.

[0284] The image decoding method of Fig. 20 may be performed by the image decoding apparatus of Fig. 3. For example, steps S2010 and S2020 may be performed by the inter prediction unit 260.

[0285] Referring to FIG. 20, the image decoding apparatus may obtain inter prediction information and wrap-around information of a current block from a bitstream (S2010). Here, the inter prediction information of the current block may include motion information of the current block, such as a reference picture index and differential motion vector information. The wrap-around information may include a first flag (e.g., pps_ref_wraparound_enabled_flag) indicating whether wrap-around motion compensation is available for a current picture including the current block. The first flag may have a first value (e.g., 0) indicating that wrap-around motion compensation is not available for the current picture based on the fact that wrap-around motion compensation is not available for a current video sequence including the current block (e.g., sps_ref_wraparound_enabled_flag==0). In addition, the first flag may have a first value (e.g., 0) indicating that wrap-around motion compensation is not available for the current picture based on a predetermined condition related to a width of a coding tree block (CTB) in the current picture and a width of the current picture. For example, if the width of the CTB in the current picture (eg, CtbSizeY) is greater than the width of the picture (eg, pic_width_in_luma_samples), pps_ref_wraparound_enabled_flag may be limited to a first value (eg, 0).

[0286] In one embodiment, based on whether wraparound motion compensation is available for the current video sequence including the current block (e.g., sps_wraparound_enabled_flag==1), the top-left position and width of the current subpicture may be set (or inferred) to predetermined values. For example, the x coordinate of the top-left position of the current subpicture (e.g., subpic_ctu_top_left_x[i]) may be set to 0, and the y coordinate of the top-left position of the current subpicture (e.g., subpic_ctu_top_left_y[i]) may be set to the y coordinate (e.g., subpic_ctu_top_left_y[i-1]) of the first subpicture decoded before the current subpicture (e.g., subpic_height_minus1[i-1]) plus the height of the first subpicture. Also, the width of the current subpicture (eg, subpic_width_minus[i]) may be set to the same value as the width of the current picture (eg, ((pic_width_max_in_luma_samples+CtbSizeY-1)>>CtbLog2SizeY)-1).

[0287] The image decoding apparatus may generate a prediction block for the current block based on the inter prediction information and the wraparound information obtained from the bitstream (S2020).

[0288] In one embodiment, based on the above-mentioned first flag having a predetermined value (e.g., 1) indicating that wraparound motion compensation is available for the current picture, the predictive block of the current block can be generated by wraparound motion compensation.

[0289] In one embodiment, wrap-around motion compensation for a current block may be performed by modifying an x ​​coordinate of a reference block identified by a motion vector of the current block in a reference picture of the current block based on the wrap-around offset. The wrap-around motion compensation may be performed by clipping the modified x coordinate of the reference block within a range of any one of a boundary position of a current sub-picture and a boundary position of a reference picture. In this case, a boundary position serving as a reference for the clipping may be determined based on whether a current sub-picture including the current block is independently coded (e.g., subpic_treated_as_pic_flag). For example, if the current sub-picture is independently coded (e.g., subpic_treated_as_pic_flag==1), the x coordinate of the reference block may be clipped based on a boundary of the current sub-picture. In contrast, if the current sub-picture is not independently coded (e.g., subpic_treated_as_pic_flag==0), the x coordinate of the reference block may be clipped based on a boundary of a reference picture.

[0290] Meanwhile, in one embodiment, wraparound motion compensation for the current block may be skipped based on the reference picture of the current block being scaled, and wraparound motion compensation for the current block may be skipped based on the current sub-picture being independently coded and the width of the current sub-picture being different from the width of the current picture.

[0291] In one embodiment, wrap-around motion compensation for the current block may be performed based on a left boundary position and a right boundary position that are set based on whether the current sub-picture is independently coded. For example, if the current sub-picture is independently coded, the left boundary position and the right boundary position may be set to the left boundary position and the right boundary position of the current sub-picture. In contrast, if the current sub-picture is not independently coded, the left boundary position and the right boundary position may be set to the left boundary position and the right boundary position of the reference picture. Then, wrap-around motion compensation for the current block may be performed based on the set left boundary position and the right boundary position. In this way, whether the current sub-picture is independently coded is reflected in the boundary position used for clipping the reference block, so that it is not necessary to separately determine whether the current sub-picture is independently coded. This can further simplify a motion compensation process for generating a prediction block for the current block.

[0292] As described above, according to the image encoding / decoding method according to an embodiment of the present disclosure, even if the current sub-picture is coded independently, the wrap-around motion compensation can be used according to a predetermined condition, and thus the sub-picture-related coding tool and the wrap-around motion compensation-related coding tool can be used together, thereby improving the efficiency of encoding / decoding.

[0293] The names of syntax elements described in this disclosure may include information regarding the location where the syntax element is signaled. For example, a syntax element beginning with "sps_" may mean that the syntax element is signaled in a sequence parameter set (SPS). Furthermore, a syntax element beginning with "pps_", "ph_", "sh_", etc. may mean that the syntax element is signaled in a picture parameter set (PPS), a picture header, a slice header, etc., respectively.

[0294] 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.

[0295] 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.

[0296] 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.

[0297] 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.

[0298] 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.

[0299] FIG. 21 is a diagram illustrating a content streaming system to which an embodiment of the present disclosure can be applied.

[0300] As shown in FIG. 21, a content streaming system to which an embodiment of the present disclosure is applied may broadly include an encoding server, a streaming server, a Web server, a media storage, a user device, and a multimedia input device.

[0301] 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.

[0302] 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.

[0303] 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.

[0304] 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.

[0305] 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.

[0306] 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.

[0307] FIG. 22 is a schematic diagram illustrating an architecture for providing 3D image / video services in which embodiments of the present disclosure can be utilized.

[0308] 22 may show a 360-degree or omnidirectional video / image processing system. The system of FIG. 22 may be realized, for example, in an extended reality (XR) assistive device. That is, the system may provide a method for providing a virtual reality to a user.

[0309] Extended reality is a general term for Virtual Reality (VR), Augmented Reality (AR), and Mixed Reality (MR). VR technology provides real-world objects and backgrounds only as CG images, AR technology provides virtual CG images on top of real-world images, and MR technology is a computer graphics technology that combines and presents virtual objects in the real world.

[0310] MR technology is similar to AR technology in that it shows real and virtual objects together, but it differs in that in AR technology, virtual objects are used to complement real objects, whereas in MR technology, virtual objects and real objects are used with equal character.

[0311] XR technology can be applied to HMDs (Head-Mount Displays), HUDs (Head-Up Displays), mobile phones, tablet PCs, laptops, desktops, TVs, digital signage, etc., and a device to which XR technology is applied can be called an XR device. The XR device can include a first digital device and / or a second digital device, which will be described later.

[0312] The 360-degree content refers to content for realizing and providing VR in general, and may include 360-degree video and / or 360-degree audio. The 360-degree video may refer to video or image content that is captured or played in all directions (360 degrees or less) simultaneously, which is necessary for providing VR. Hereinafter, the 360-degree video may refer to 360-degree video. The 360-degree audio may also refer to spatial audio content, which is audio content for providing VR, and can be recognized as a sound source located in a specific three-dimensional space. The 360-degree content may be generated, processed, and transmitted to a user, and the user may consume a VR experience using the 360-degree content. The 360-degree video may be referred to as an omnidirectional video, and the 360-degree image may be referred to as an omnidirectional image. In addition, the following description will be based on the 360-degree video, and the embodiments of this document are not limited to VR, and may include processing of video / image content such as AR and MR. 360-degree video may refer to a video or image displayed in various forms of 3D space according to a 3D model. For example, 360-degree video may be displayed on a spherical surface.

[0313] This method particularly proposes a method for effectively providing 360-degree videos. To provide 360-degree videos, first, 360-degree videos can be captured through one or more cameras. The captured 360-degree videos are transmitted through a series of processes, and at the receiving end, the received data can be processed and rendered back into the original 360-degree videos. In this way, the 360-degree videos can be provided to users.

[0314] Specifically, the entire process for providing a 360-degree video may include a capture process, a preparation process, a transmission process, a processing process, a rendering process, and / or a feedback process.

[0315] The capture process may refer to a process of capturing images or videos for each of a plurality of viewpoints through one or more cameras. Image / video data such as 2210 in FIG. 22 may be generated by the capture process. Each plane in 2210 in FIG. 22 may refer to an image / video for each viewpoint. The captured images / videos may also be called raw data. Metadata related to the capture may be generated during the capture process.

[0316] For this capture, a special camera for VR can be used. In some embodiments, when providing a 360-degree video of a computer-generated virtual space, the capture via a real camera may not be performed. In this case, the capture process may be replaced by a process in which the relevant data is simply generated.

[0317] The preparation process may be a process of processing the captured image / video and metadata generated during the capture process. In the preparation process, the captured image / video may undergo a stitching process, a projection process, a region-wise packing process, and / or an encoding process.

[0318] First, each image / video may undergo a stitching process, which may be a process of connecting each captured image / video to create one panoramic image / video or a spherical image / video.

[0319] The stitched image / video may then undergo a projection process. In the projection process, the stitched image / video may be projected onto a 2D image. This 2D image may also be referred to as a 2D image frame depending on the context. Projecting as a 2D image may also be expressed as mapping onto a 2D image. The projected image / video data may be in the form of a 2D image such as 2220 in FIG. 22.

[0320] The video data projected onto the 2D image may undergo a region-wise packing process in order to improve video coding efficiency. The region-wise packing may refer to a process of dividing the video data projected onto the 2D image into regions and processing the divided regions. Here, the region may refer to an area into which the 2D image onto which the 360-degree video data is projected is divided. These regions may be divided by equally dividing the 2D image or may be divided arbitrarily, depending on the embodiment. Also, depending on the embodiment, these regions may be distinguished according to a projection scheme. The region-wise packing process is an optional process and may be omitted in the preparation process.

[0321] Depending on the embodiment, this process may include rotating or rearranging the regions in the 2D image to improve video coding efficiency, for example by rotating the regions so that certain edges of the regions are closer to each other to improve coding efficiency.

[0322] According to an embodiment, this process may include a process of increasing or decreasing the resolution for a particular region in order to differentiate the resolution for each region on the 360-degree video. For example, a region corresponding to a relatively more important region on the 360-degree video may have a higher resolution than other regions. The video data projected on the 2D image or the video data packed for each region may undergo an encoding process via a video codec.

[0323] Depending on the embodiment, the preparation process may further include an editing process, etc. In the editing process, editing of image / video data before and after projection may be further performed. Similarly, in the preparation process, metadata for stitching / projection / encoding / editing, etc. may be generated. In addition, metadata for an initial viewpoint or a Region of Interest (ROI) of the video data projected onto the 2D image may be generated.

[0324] The transmission process may be a process of processing and transmitting image / video data and metadata that have undergone a preparation process. Processing according to any transmission protocol may be performed for transmission. Data that has been processed for transmission may be transmitted via a broadcast network and / or broadband. These data may also be transmitted to a receiving side in an on-demand manner. The receiving side may receive the corresponding data via various routes.

[0325] The processing process may refer to a process of decoding the received data and re-projecting the projected image / video data onto a 3D model. In this process, the image / video data projected onto the 2D image may be re-projected onto the 3D space. This process may also be called mapping or projection depending on the context. In this case, the mapped 3D space may have different shapes depending on the 3D model. For example, the 3D model may be a sphere, a cube, a cylinder, or a pyramid.

[0326] Depending on the embodiment, the processing process may further include an editing process, an upscaling process, etc. In the editing process, editing of image / video data before and after reprojection may be further performed. If the image / video data is reduced, the size of the image / video data may be increased through upscaling of the sample in the upscaling process. If necessary, a task of reducing the size may be performed by downscaling.

[0327] The rendering process may refer to a process of rendering and displaying image / video data reprojected onto a 3D space. In some cases, reprojection and rendering may be combined to express rendering onto a 3D model. The image / video reprojected onto the 3D model (or rendered onto the 3D model) may have a form such as 2230 in FIG. 22. 2230 in FIG. 22 is a case where the image / video is reprojected onto a spherical 3D model. The user can view a portion of the rendered image / video through a VR display or the like. In this case, the area viewed by the user may have a form such as 2240 in FIG. 22.

[0328] The feedback process may refer to a process of transmitting various feedback information obtained in the display process to a transmitting side. Interactivity can be provided in 360-degree video consumption through the feedback process. Depending on the embodiment, head orientation information, viewport information indicating the area the user is currently viewing, etc. can be transmitted to the transmitting side in the feedback process. Depending on the embodiment, the user can interact with what is realized in the VR environment, and in this case, information related to the interaction can be transmitted to the transmitting side or the service provider side in the feedback process. Depending on the embodiment, the feedback process may not be performed.

[0329] Head orientation information may refer to information regarding the position, angle, movement, etc. of the user's head. Based on this information, information regarding the area the user is currently viewing in the 360-degree video, i.e., viewport information, may be calculated.

[0330] The viewport information may be information about the area the user is currently looking at in the 360-degree video. Accordingly, a gaze analysis may be performed to determine how the user consumes the 360-degree video and how much the user gazes at which area of ​​the 360-degree video. The gaze analysis may be performed on the receiving side and transmitted to the transmitting side via a feedback channel. A device such as a VR display may extract a viewport area based on the position / direction of the user's head, vertical or horizontal Field Of View (FOV) information supported by the device, etc.

[0331] Meanwhile, 360-degree videos / images can be processed based on sub-pictures. Projected or packed pictures including 2D images can be divided into sub-pictures, and processing can be performed on a sub-picture basis. For example, a specific sub-picture can be given a high resolution according to a user viewport, or only a specific sub-picture can be encoded and signaled to a receiving device (decoding device side). In this case, the decoding device can receive a sub-picture bitstream, restore / decode the specific sub-picture, and render it according to the user viewport.

[0332] According to an embodiment, the feedback information may be not only transmitted to the transmitting side but also consumed by the receiving side. That is, the receiving side may perform decoding, reprojection, rendering, etc., using the feedback information. For example, only the 360-degree video for the area currently viewed by the user may be preferentially decoded and rendered using head orientation information and / or viewport information.

[0333] Here, the viewport or viewport area may refer to the area where a user is looking in a 36-degree video. The viewpoint may refer to the center of the viewport area, which is the point where a user is looking in a 360-degree video. That is, the viewport is an area centered on the viewpoint, and the size and shape of the area may be determined by the FOV (Field Of View).

[0334] In the overall architecture for providing 360-degree video described above, image / video data that undergoes a series of processes of capture / projection / encoding / transmission / decoding / reprojection / rendering can be called 360-degree video data. The term 360-degree video data may also be used as a concept that includes metadata or signaling information related to such image / video data.

[0335] In order to store and transmit media data such as the above-mentioned audio or video, a standardized media file format can be defined. According to an embodiment, the media file may have a file format based on ISO BMFF (ISO base media file format).

[0336] 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]

[0337] The embodiments of the present disclosure can be used to encode / decode images.

Claims

1. An image decoding method performed by an image decoding device, comprising: obtaining inter prediction information and wraparound information of a current block from a bitstream; generating a prediction block of the current block based on the inter prediction information and the wraparound information; the wraparound information includes a first flag indicating whether wraparound motion compensation is available for a current picture that includes the current block; the first flag has a first value indicating that the wraparound motion compensation is not available for the current picture based on at least one sub-picture included in the current picture being treated as a picture and having a width different from a value derived based on information about a maximum width of a picture in a current video sequence that includes the current picture; based on the first flag having a second value indicating that the wraparound motion compensation is available for the current picture, the wraparound information further comprises a wraparound offset used to perform the wraparound motion compensation; 11. The image decoding method of claim 10, wherein, depending on whether a current sub-picture is treated as a picture, the wrap-around motion compensation is performed based on a boundary of the current sub-picture containing the current block or a boundary of a reference picture of the current block.

2. the wraparound motion compensation for the current block is performed based on the wraparound offset; The image decoding method according to claim 1 , wherein the wraparound offset is obtained from the bitstream based on the first flag having the second value.

3. the wraparound motion compensation for the current block is performed by modifying an x-coordinate of a reference block in the reference picture based on the wraparound offset; The image decoding method according to claim 2 , wherein the reference block is identified by a motion vector of the current block.

4. The image decoding method of claim 3 , wherein the wraparound motion compensation for the current block is performed by clipping the modified x-coordinate of the reference block within a boundary of the current sub-picture or the reference picture.

5. The image decoding method of claim 1 , wherein the wraparound motion compensation for the current block is skipped based on the reference picture being scaled.

6. The image decoding method of claim 1 , wherein the wraparound motion compensation for the current block is skipped based on the current sub-picture being independently coded and having a width different from a width of the current picture.

7. the wraparound motion compensation for the current block is performed based on a left boundary position and a right boundary position; The image decoding method of claim 1 , wherein the left and right boundary positions are set based on whether the current sub-picture is independently coded.

8. The image decoding method of claim 1 , wherein a top-left position and a width of the current sub-picture are set to predetermined values ​​based on the wrap-around motion compensation being available for a current video sequence that includes the current block.

9. An image coding method performed by an image coding device, comprising: determining whether wraparound motion compensation is applied to the current block; generating a predicted block of the current block by performing inter prediction based on the determination; encoding inter prediction information of the current block and wrap-around information related to the wrap-around motion compensation; the wraparound information includes a first flag indicating whether wraparound motion compensation is available for a current picture that includes the current block; the first flag has a first value indicating that the wraparound motion compensation is not available for the current picture based on at least one sub-picture included in the current picture being treated as a picture and having a width different from a value derived based on a maximum width of a picture in a current video sequence that includes the current picture; based on the first flag having a second value indicating that the wraparound motion compensation is available for the current picture, the wraparound information further comprises a wraparound offset used to perform the wraparound motion compensation; 11. A method for coding an image, wherein, depending on whether a current sub-picture is treated as a picture, the wrap-around motion compensation is performed based on a boundary of the current sub-picture containing the current block or a boundary of a reference picture of the current block.

10. the wraparound motion compensation for the current block is performed by modifying an x-coordinate of a reference block in the reference picture based on the wraparound offset; The image coding method according to claim 9 , wherein the reference block is identified by a motion vector of the current block.

11. The image coding method of claim 10 , wherein the wraparound motion compensation for the current block is performed by clipping the modified x-coordinate of the reference block within a boundary of the current sub-picture or the reference picture.

12. 10. The image coding method of claim 9, wherein the wraparound motion compensation for the current block is skipped based on the current sub-picture being independently coded and having a different width than a width of the current picture.

13. the wraparound motion compensation for the current block is performed based on a left boundary position and a right boundary position; The image encoding method of claim 9 , wherein the left and right boundary positions are set based on whether the current sub-picture is independently coded.

14. 1. A method for transmitting a bitstream, the method comprising: determining whether wraparound motion compensation is applied to the current block; generating a predicted block of the current block by performing inter prediction based on the determination; encoding inter prediction information of the current block and wrap-around information related to the wrap-around motion compensation in the bitstream; transmitting the bitstream to a receiving party; the wraparound information includes a first flag indicating whether wraparound motion compensation is available for a current picture that includes the current block; the first flag has a first value indicating that the wraparound motion compensation is not available for the current picture based on at least one sub-picture included in the current picture being treated as a picture and having a width different from a value derived based on a maximum width of a picture in a current video sequence that includes the current picture; based on the first flag having a second value indicating that the wraparound motion compensation is available for the current picture, the wraparound information further comprises a wraparound offset used to perform the wraparound motion compensation; A method according to claim 1, wherein, depending on whether a current subpicture is treated as a picture, the wraparound motion compensation is performed based on a boundary of the current subpicture containing the current block or a boundary of a reference picture of the current block.

Citation Information

Cited By

  • Image encoding / decoding method and device based on wrap-around motion compensation, and recording medium storing bitstream

    JP2025092737A