Video encoding / decoding method and apparatus, and recording medium storing bitstreams
The method optimizes video decoding by generating predicted samples and deriving residual samples using sub-block transforms, addressing inefficiencies in inter and intra prediction modes to enhance coding efficiency and reduce encoding bits.
Patent Information
- Application Number
- JP2025538253
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-12-29
- Filing Date
- 2023-12-29
- Publication Date
- 2026-01-08
AI Technical Summary
Existing video compression techniques face challenges in efficiently deriving inter prediction modes, intra prediction modes, and signaling information related to geometric partition merge modes, leading to sub-optimal coding efficiency.
The method and apparatus enhance video decoding by generating predicted samples based on inter prediction modes, deriving residual samples using sub-block transforms, and reconstructing blocks based on these transforms, while omitting unnecessary signaling of information based on prediction modes.
This approach improves coding efficiency by optimizing inter prediction modes and reducing the number of bits required for encoding, particularly in merge and skip modes, and enhances intra prediction modes through weighted values and geometric partition merge modes.
Smart Images

Figure 2026500738000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a video encoding / decoding method and apparatus, and a recording medium storing a bitstream. [Background technology]
[0002] 2. Description of the Related Art In recent years, the demand for high-resolution, high-quality images such as high-definition (HD) images and ultra-high-definition (UHD) images has increased in various application fields, and as a result, highly efficient image compression techniques have been discussed.
[0003] There are various video compression techniques, such as inter-prediction techniques that predict pixel values contained in a current picture from pictures before or after the current picture, intra-prediction techniques that predict pixel values contained in a current picture using pixel information within the current picture, and entropy coding techniques that assign short codes to values that occur frequently and long codes to values that occur less frequently. Using these video compression techniques, video data can be effectively compressed and transmitted or stored. Summary of the Invention [Problem to be solved by the invention]
[0004] The present disclosure seeks to provide a method and apparatus for deriving inter prediction modes in merge mode or skip mode.
[0005] The present disclosure seeks to provide a method and apparatus for deriving intra prediction modes and / or weights in CIIP mode.
[0006] The present disclosure seeks to provide a method and apparatus for signaling information related to GPM mode.
[0007] The present disclosure seeks to provide methods and apparatus for signaling / deriving information regarding sub-block transforms based on inter prediction modes in merge or skip modes. [Means for solving the problem]
[0008] The video decoding method and apparatus according to the present disclosure may generate a predicted sample of a current block based on a predetermined inter prediction mode, derive a residual sample of the current block based on information about a sub-block transform, and reconstruct the current block based on the predicted sample and the residual sample of the current block. Here, at least one of information about the sub-block transform (SBT) may be derived based on the inter prediction mode, and the information about the SBT may include at least one of an SBT flag, an SBT magnitude flag, an SBT direction flag, or an SBT position flag.
[0009] In the video decoding method and apparatus according to the present disclosure, when the inter prediction mode of the current block is a CIIP mode, the sub-block transform may be allowed for the current block.
[0010] In the video decoding method and apparatus according to the present disclosure, when the inter prediction mode of the current block is a CIIP mode, at least one of the pieces of information regarding the SBT may be induced without being signaled based on the intra prediction mode for the CIIP mode.
[0011] In the video decoding method and apparatus according to the present disclosure, the intra prediction mode of the current block may be induced to one of one or more candidate modes belonging to a candidate list.
[0012] In the video decoding method and apparatus according to the present disclosure, when the inter prediction mode of the current block is a CIIP mode, at least one of the pieces of information regarding the SBT may be induced without being signaled based on the weight value for the CIIP mode.
[0013] In the video decoding method and apparatus according to the present disclosure, the weighting value may be determined based on at least one of the intra prediction mode of the current block, the position of the sub-region to which the prediction sample of the current block belongs, or a weighting value index.
[0014] In the video decoding method and apparatus according to the present disclosure, the CIIP mode may be allowed regardless of a flag indicating whether the current block is a block coded in skip mode.
[0015] In the video decoding method and apparatus according to the present disclosure, when the inter prediction mode of the current block is a geometric partition merge mode, the sub-block transform may be allowed for the current block.
[0016] In the video decoding method and apparatus according to the present disclosure, when the inter prediction mode of the current block is a geometric partition merge mode, at least one of information about the SBT may be induced without being signaled based on at least one of the angle of a boundary line due to geometric partitioning of the current block or the distance from the center position of the current block to the boundary line.
[0017] The video encoding method and apparatus according to the present disclosure may generate a predicted sample of a current block based on a predetermined inter prediction mode, derive a residual sample of the current block based on the predicted sample of the current block, determine information on a sub-block transform for encoding the residual sample of the current block, encode the residual sample of the current block to generate residual information, and encode the residual information of the current block to generate a bitstream. Here, at least one of information on the sub-block transform (SBT) may be derived based on the inter prediction mode, and the information on the SBT may include at least one of an SBT flag, an SBT magnitude flag, an SBT direction flag, or an SBT position flag.
[0018] A computer-readable digital storage medium is provided having encoded video / image information stored thereon that enables a video decoding method to be performed by a decoding device according to the present disclosure.
[0019] A computer-readable digital storage medium is provided having stored thereon video / image information generated by the video encoding method according to the present disclosure.
[0020] A method and apparatus for transmitting video / image information generated by a video encoding method according to the present disclosure is provided. [Effects of the Invention]
[0021] According to the present disclosure, the coding efficiency of inter prediction can be improved by defining inter prediction modes available in merge mode or skip mode and signaling them efficiently.
[0022] According to the present disclosure, the coding efficiency of the CIIP mode can be improved by determining the optimal intra prediction mode and weighting value for the CIIP mode.
[0023] According to the present disclosure, by more effectively signaling information about geometric partition merge modes, the number of bits required to encode that information can be reduced.
[0024] According to the present disclosure, coding efficiency can be improved by omitting signaling of all or part of information related to sub-block transformation and guiding it to a specific value depending on the inter prediction mode in merge mode or skip mode. [Brief explanation of the drawings]
[0025] [Figure 1] 1 illustrates a video / image coding system according to the present disclosure. [Figure 2] 1 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied, in which video / image signals are encoded. [Figure 3] 1 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied, in which video / image signals are decoded. [Figure 4] 1 is a diagram illustrating an image decoding method performed by a decoding device (300) according to an embodiment of the present disclosure. [Figure 5] FIG. 10 is a diagram illustrating intra-prediction modes and their prediction directions according to the present disclosure. [Figure 6] FIG. 10 is a diagram illustrating the angle of the boundary line corresponding to each angleIdx according to the present disclosure. [Figure 7] 1 is a diagram showing a schematic configuration of a decoding device (300) that performs a video decoding method according to the present disclosure. [Figure 8] 1 is a diagram illustrating a video encoding method performed by an encoding device (200) according to an embodiment of the present disclosure. [Figure 9] 1 is a diagram showing a schematic configuration of an encoding device (200) that performs a video encoding method according to the present disclosure. [Figure 10]FIG. 1 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied. DETAILED DESCRIPTION OF THE INVENTION
[0026] While the present disclosure may be modified in various ways and may have various embodiments, specific embodiments are illustrated in the drawings and described in detail. However, this is not intended to limit the present disclosure to the specific embodiments, and it should be understood that the present disclosure includes all modifications, equivalents, and alternatives within the spirit and technical scope of the present disclosure. In the description of each figure, similar reference numerals are used to refer to similar components.
[0027] Terms such as "first," "second," etc. may be used to describe various components, but these components should not be limited by such terms. These terms are used merely to distinguish one component from another. For example, a first component could be termed a second component, and similarly, a second component could be termed a first component, without departing from the scope of this disclosure. The term "and / or" includes a combination of multiple associated listed items or any item of multiple associated listed items.
[0028] When a component is referred to as being "coupled" or "connected" to another component, it should be understood that the component may be directly coupled or connected to the other component, and that there may be additional components in between. On the other hand, when a component is referred to as being "directly coupled" or "directly connected" to another component, it should be understood that there are no additional components in between.
[0029] The terms used in this application are merely for the purpose of describing particular embodiments and are not intended to limit the present disclosure. The singular terms also include the plural terms unless the context clearly dictates otherwise. In this application, terms such as "comprise" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood as not precluding the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0030] The present disclosure relates to video / image coding. For example, the methods / embodiments disclosed herein may be applied to methods disclosed in the versatile video coding (VVC) standard. The methods / embodiments disclosed herein may also be applied to methods disclosed in the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation audio video coding standard (AVS2), or next-generation video / image coding standards (e.g., H.267 or H.268).
[0031] This specification presents various embodiments relating to video / image coding, and unless otherwise stated, the above embodiments may be performed in combination with each other.
[0032] In this specification, video may refer to a collection of a series of images over time. A picture generally refers to a unit representing an image at a specific time period, and a slice / tile is a unit constituting part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). One picture may be composed of one or more slices / tiles. A tile is a rectangular area composed of multiple CTUs in a specific tile column and a specific tile row of a picture. A tile column is a rectangular area of CTUs having the same height as the picture and a width specified by the syntax requirements of the picture parameter set. A tile row is a rectangular area of CTUs having the same height as the picture and a width specified by the picture parameter set. CTUs within a tile may be arranged consecutively by CTU raster scanning, while tiles within a picture may be arranged consecutively by tile raster scanning. A slice may contain an integer number of complete tiles or an integer number of consecutive complete CTU rows within the tiles of a picture that may be contained exclusively in a single NAL unit, while a picture may be partitioned into two or more sub-pictures, which may be rectangular regions of one or more slices in a picture.
[0033] A picture element, pixel, or pel can refer to the smallest unit that makes up a picture (or an image). A "sample" can also be used as a term corresponding to a pixel. A sample can generally indicate a pixel or a pixel value, and may indicate only a pixel / pixel value of a luminance (luma) component, or may indicate only a pixel / pixel value of a chrominance (chroma) component.
[0034] 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 that region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. The term unit may sometimes be used interchangeably with terms such as block or area. In general, an MxN block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0035] As used herein, "A or B" can mean "A only," "B only," or "both A and B." In other words, as used herein, "A or B" can be interpreted as "A and / or B." For example, as used herein, "A, B, or C" can mean "A only," "B only," "C only," or "any combination of A, B, and C."
[0036] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Thus, "A / B" can mean "A only," "B only," or "both A and B." For example, "A, B, C" can mean "A, B, or C."
[0037] As used herein, "at least one of A and B" can mean "A only," "B only," or "both A and B." Furthermore, as used herein, the expressions "at least one of A or B" or "at least one of A and / or B" may be interpreted as being the same as "at least one of A and B."
[0038] Furthermore, in this specification, "at least one of A, B, and C" can mean "A only," "B only," "C only," or "any combination of A, B, and C." Furthermore, "at least one of A, B, or C" or "at least one of A, B, and / or C" can mean "at least one of A, B, and C."
[0039] Furthermore, parentheses used in this specification may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" may be suggested as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra prediction," and "intra prediction" may be suggested as an example of "prediction." Furthermore, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" may be suggested as an example of "prediction."
[0040] In this specification, technical features individually described in the same drawing may be embodied individually or simultaneously.
[0041] FIG. 1 is a diagram illustrating a video / image coding system according to this disclosure.
[0042] Referring to FIG. 1, a video / image coding system may include a first device (a source device) and a second device (a receiving device).
[0043] A source device can transmit encoded video / image information or data to a receiving device via a digital storage medium or a network in the form of a file or streaming. The source device may include a video source, an encoding device, and a transmitting unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be called a video / image encoding device, and the decoding device may be called a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, which may be a separate device or an external component.
[0044] A video source can acquire video / images through a video / image capture, synthesis, or generation process. A video source can include a video / image capture device and / or a video / image generation device. A video / image capture device can include one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device can include a computer, tablet, smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced by a process in which the associated data is generated.
[0045] An encoding device may encode input video / images. The encoding device may perform a series of steps such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video / image information) may be output in the form of a bitstream.
[0046] The transmitting unit can transmit the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit can include elements for generating a media file according to a predetermined file format and elements for transmission via a broadcasting / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.
[0047] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transform, and prediction, which correspond to the operations of the encoding device.
[0048] The renderer can render the decoded video / image, and the rendered video / image can be displayed on a display unit.
[0049] FIG. 2 is a schematic block diagram of an encoding device to which the embodiments of the present disclosure can be applied, in which video / image signals are encoded.
[0050] Referring to FIG. 2, the encoding apparatus 200 may include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter-prediction unit 221 and an intra-prediction unit 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The above-described image divider 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filterer 260 may be configured by one or more hardware components (e.g., an encoding device chipset or processor) depending on the embodiment. In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0051] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided into coding tree units (CTUs) or largest coding units (LCUs) according to a QTBTTT (Quad-tree, Binary-tree, Ternary-tree) structure.
[0052] For example, one coding unit may be divided into multiple coding units having deeper depths based on a quadtree structure, a binary tree structure, and / or a tertiary structure. In this case, for example, the quadtree structure may be applied first, and then the binary tree structure and / or the tertiary structure may be applied later. Alternatively, the binary tree structure may be applied before the quadtree structure. The coding procedure according to the present specification may be performed based on a final coding unit that is not further divided. In this case, based on coding efficiency according to video characteristics, the largest coding unit may be immediately used as the final coding unit, or, if necessary, the coding unit may be recursively divided into coding units of lower depths, and the coding unit with the optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later.
[0053] As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be divided or partitioned from the final coding unit. 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.
[0054] The term "unit" may be used interchangeably with terms such as "block" or "area." In general, an MxN block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luma component or only a pixel / pixel value of a chroma component. A sample may be used in terms corresponding to one picture (or image), pixel, or pel.
[0055] The encoding apparatus 200 may subtract a prediction signal (prediction block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input video signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, a unit in the encoding apparatus 200 that subtracts the prediction signal (prediction block, prediction sample array) from the input video signal (original block, original sample array) may be referred to as a subtraction unit 231.
[0056] The prediction unit 220 may perform prediction on a current block (hereinafter referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit 220 may determine whether intra prediction or inter prediction is applied to the current block or CU. The prediction unit 220 may generate various information related to prediction, such as prediction mode information, as will be described later in the description of each prediction mode, and transmit the information related to prediction to the entropy encoding unit 240. The entropy encoding unit 240 may encode the information related to prediction and output it in the form of a bitstream.
[0057] The intra prediction unit 222 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 at a certain distance from the current block depending on the prediction mode. In intra prediction, prediction modes may include one or more non-directional modes and multiple directional modes. The non-directional modes may include at least one of DC mode and planar mode. The directional modes may include 33 directional modes or 65 directional modes depending on the granularity of the prediction direction. However, this is merely an example, and more or less directional modes may be used depending on the settings. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.
[0058] The inter prediction unit 221 may derive a prediction block for a current block based on a reference block (reference sample array) identified by a motion vector in a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction information (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring blocks may be the same or different. The temporal neighboring blocks may be called collocated reference blocks, collocated control units (colCUs), etc., and the reference picture including the temporal neighboring blocks may be called collocated pictures (colPic). For example, the inter prediction unit 221 may configure a motion information candidate list based on neighboring blocks and generate information indicating which candidates are used to derive a motion vector and / or a reference picture index for the current block. Inter prediction may be performed based on various prediction modes. For example, in the case of a skip mode or a merge mode, the inter prediction unit 221 may use motion information of neighboring blocks as motion information for the current block. In the case of the skip mode, unlike in the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the current block can be indicated by using the motion vector of a neighboring block as a motion vector predictor and signaling the motion vector difference.
[0059] The prediction unit 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for predicting a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as a combined inter and intra prediction (CIIP) mode. The prediction unit may also use an intra block copy (IBC) prediction mode or a palette mode for predicting a block. The IBC prediction mode or palette mode may be used for coding content images / videos, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be similar to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, a sample value within the picture may be signaled based on information about a palette table and a palette index. The predicted signal generated by the prediction unit 220 may be used to generate a reconstructed signal or a residual signal.
[0060] The transform unit 232 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), and a Conditionally Non-Linear Transform (CNT). Here, GBT refers to a transform obtained from a graph representing inter-pixel relationship information. CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to square pixel blocks of the same size, or to non-square blocks of variable sizes.
[0061] The quantization unit 233 quantizes the transform coefficients and transmits the quantized signal to the entropy encoding unit 240. The entropy encoding unit 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantization unit 233 rearranges the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and generates information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
[0062] The entropy encoding unit 240 can perform various encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoding unit 240 can encode information necessary for video / image restoration (e.g., values of syntax elements) together with or separately from the quantized transform coefficients.
[0063] Encoded information (e.g., encoded video / video information) may be transmitted or stored in the form of a bitstream in network abstraction layer (NAL) units. The video / video 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 / video information may also include general constraint information. In this specification, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / video information. The video / video information may be encoded using the encoding procedure described above and included in the bitstream. The bitstream may be transmitted over a network or stored in a digital storage medium. Here, the network may include a broadcast 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. The signal output from the entropy encoding unit 240 may be transmitted to a transmitting unit (not shown) and / or stored to a storing unit (not shown) configured as an internal / external element of the encoding device 200, or the transmitting unit may be included in the entropy encoding unit 240.
[0064] The quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal. For example, the inverse quantization unit 234 and the inverse transform unit 235 may apply inverse quantization and inverse transform to the quantized transform coefficients to reconstruct a residual signal (residual block or residual sample). The adder 250 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 221 or the intra prediction unit 222. When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as the reconstructed block. The adder 250 may 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 block to be processed in the current picture, or may be used for inter prediction of the next picture after filtering, as described below. Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.
[0065] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture and store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240. The information related to filtering may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0066] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 221. This allows the encoding apparatus to avoid prediction mismatch between the encoding apparatus 200 and the decoding apparatus when inter prediction is applied, and also improves coding efficiency.
[0067] The DPB of the memory 270 may store the modified reconstructed picture to be used as a reference picture in the inter predictor 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter predictor 221 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 222.
[0068] FIG. 3 is a schematic block diagram of a decoding device to which the embodiments of the present disclosure can be applied, in which video / image signals are decoded.
[0069] 3, the decoding device 300 may include an entropy decoding unit (entropy decoder 310), a residual processor (residual processor 320), a predictor (predictor 330), an adder (adder 340), a filter (filter 350), and a memory (memory 360). The predictor 330 may include an inter predictor 331 and an intra predictor 332. The residual processor 320 may include a dequantizer (dequantizer 321) and an inverse transformer (inverse transformer 322).
[0070] The entropy decoding unit 310, residual processing unit 320, prediction unit 330, addition unit 340, and filtering unit 350 may be configured as a single hardware component (e.g., a decoding device chipset or processor) depending on the embodiment. Also, the memory 360 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The hardware component may further include the memory 360 as an internal / external component.
[0071] When a bitstream including video / image information is input, the decoding apparatus 300 can reconstruct an image corresponding to the process by which the video / image information was processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive units / blocks based on block division-related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied by the encoding apparatus. Accordingly, the processing unit for decoding may be a coding unit, which may be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and / or a tertiary tree structure. One or more transform units may be derived from the coding unit. The reconstructed image signal decoded and output by the decoding apparatus 300 may be played back by a playback device.
[0072] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded by the entropy decoding unit 310. For example, the entropy decoding unit 310 may parse the bitstream and derive information (e.g., video / video information) necessary for video restoration (or picture restoration). The video / video 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 / video information may also include general constraint information. The decoding apparatus may decode pictures further based on the information on the parameter sets and / or the general constraint information. Signal / received information and / or syntax elements described later in this specification may be decoded by the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 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 residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using information on the syntax element to be decoded, decoding information on neighboring and current blocks, or information on symbols / bins decoded in previous steps, predicts the occurrence probability of the bins based on the determined context model, and generates symbols corresponding to the values of each syntax element by performing arithmetic decoding of the bins. In this case, after determining the context model, the CABAC entropy decoding method may update the context model using information on the decoded symbols / bins for the context model of the next symbol / bin.Information related to prediction among the information decoded by the entropy decoding unit 310 may be provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to a residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, information related to filtering among the information decoded by the entropy decoding unit 310 may be provided to a filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding apparatus may be further configured as an internal / external element of the decoding apparatus 300, or the receiving unit may be a component of the entropy decoding unit 310.
[0073] Meanwhile, the decoding apparatus according to the present specification may be referred to as a video / image / picture decoding apparatus, and the decoding apparatus may be divided into an information decoding apparatus (video / image / picture information decoding apparatus) and a sample decoding apparatus (video / image / picture sample decoding apparatus). The information decoding apparatus may include the entropy decoding unit 310, and the sample decoding apparatus may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.
[0074] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding apparatus. The inverse quantization unit 321 may inverse quantize the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0075] The inverse transform unit 322 performs inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0076] The prediction unit 320 may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit 320 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 310, and may determine a specific intra / inter prediction mode.
[0077] The prediction unit 320 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit 320 may apply intra prediction or inter prediction for predicting a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as a combined inter and intra prediction (CIIP) mode. The prediction unit may also use an intra block copy (IBC) prediction mode or a palette mode for predicting a block. The IBC prediction mode or palette mode may be used for content video / movie coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be similar to inter prediction in that it derives a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, information about a palette table and a palette index may be included in the video / picture information and signaled.
[0078] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located in the neighborhood of the current block or at a certain distance from the current block depending on the prediction mode. In intra prediction, prediction modes may include one or more non-directional modes and multiple directional modes. The intra prediction unit 331 may determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.
[0079] The inter prediction unit 332 may derive a prediction block for a current block based on a reference block (reference sample array) identified by a motion vector in a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction information (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks in the current picture and temporal neighboring blocks in the reference picture. For example, the inter prediction unit 332 may construct 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 received candidate selection information. Inter prediction may be performed based on various prediction modes, and the prediction information may include information indicating the inter prediction mode for the current block.
[0080] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (prediction block, prediction sample array) output from a prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for the current block, such as when the skip mode is applied, the prediction block may be used as the reconstructed block.
[0081] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in a current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture. Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture decoding.
[0082] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0083] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter predictor 332. The memory 360 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 predictor 260 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 331.
[0084] In this specification, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding device 200 may also be applied identically or correspondingly to the filtering unit 350, inter prediction unit 332, and intra prediction unit 331 of the decoding device 300, respectively.
[0085] FIG. 4 illustrates a video decoding method performed in the video decoding device according to the present disclosure.
[0086] Referring to FIG. 4, a prediction sample of a current block may be generated based on a predetermined inter-prediction mode (S400).
[0087] If the current block is encoded in the merge mode, one of a plurality of inter prediction modes predefined in the video decoding apparatus may be set as the inter prediction mode of the current block. In this case, the plurality of inter prediction modes may include at least one of a sub-block merge mode, a merge mode with motion vector difference (MMVD) mode, a regular merge mode, a combined inter and intra prediction (CIIP) mode, or a geometric partition merge mode (GPM mode).
[0088] The sub-block merge mode divides a current block into a plurality of sub-blocks and derives motion information from spatial / temporal neighboring blocks in units of sub-blocks. Prediction samples for the current block can be generated based on the induced motion information. The sub-block merge mode can be adaptively used based on a merge sub-block flag (merge_subblock_flag) that indicates whether sub-block-based motion information is derived from neighboring blocks for the current block.
[0089] The MMVD mode derives motion information based on the general merge mode, but can correct the motion vector of the motion information based on the signaled motion vector difference (MVD). Prediction samples for the current block can be generated based on the motion information. The MMVD mode can be adaptively used based on the MMVD flag (mmvd_merge_flag) that indicates whether MMVD is used for the current block.
[0090] The CIIP mode may derive a predicted sample based on a weighted sum of inter-predicted samples and intra-predicted samples. The CIIP mode may be adaptively used based on a CIIP flag (ciip_flag) indicating whether the CIIP mode is applied to the current block. The CIIP flag may be signaled in the bitstream. The CIIP flag may be induced to 1 if a predetermined condition is met, and may be induced to 0 otherwise. Here, the predetermined condition may include at least one of the following conditions:
[0091] - sps_ciip_enabled_flag is 1, i.e. CIIP mode is available.
[0092] - general_merge_flag is 1, i.e., the current block is coded in merge mode.
[0093] - merge_subblock_flag is 0, that is, the inter prediction mode of the current block is not the subblock merge mode.
[0094] - regular_merge_flag is 1, that is, the motion information of the current block is derived based on the general merge mode or the MMVD mode.
[0095] - cu_skip_flag is 0, i.e., the current block is not a block coded in skip mode.
[0096] - The current block width and height are less than 128.
[0097] - The product of the current block's width and height is greater than or equal to 64.
[0098] The GPM mode is a prediction mode based on geometric partitioning and may be divided into a GPM-INTRA-based merge mode and a GPM-based merge mode. The GPM-INTRA-based merge mode divides a current block into two partitions (P0, P1) according to a geometric partitioning mode (GPM), derives an inter-predicted block and an intra-predicted block corresponding to the two partitions, respectively, and generates a predicted block for the current block based on a weighted sum of the inter-predicted block and the intra-predicted block. Here, the inter-predicted block may be derived based on a general merge mode. The intra-predicted block may be derived based on a predetermined intra-prediction mode, which may be set to one of one or more candidate modes belonging to a candidate list. To this end, a mode index identifying one of a plurality of candidate modes belonging to the candidate list may be signaled. The one or more candidate modes may include at least one of a parallel mode parallel to a boundary between partitions in the current block, a perpendicular mode perpendicular to the boundary between the partitions, or a planar mode. The GPM-INTRA based merge mode may be adaptively used based on a flag (gpm_intra_flag) indicating whether the GPM-INTRA based merge mode is applied to the current block.
[0099] The GPM-based merge mode divides a current block into two partitions (P0, P1) according to a geometric partitioning mode (GPM), derives a first inter-predicted block and a second inter-predicted block corresponding to the two partitions, respectively, and generates a predicted block of the current block based on a weighted sum of the first and second inter-predicted blocks. Here, the first and second inter-predicted blocks may be derived based on a general merge mode. The GPM-based merge mode may be adaptively used based on a flag (gpm_intra_flag) indicating whether the GPM-INTRA-based merge mode is applied to the current block. The GPM-based merge mode may be adaptively used based on a flag (MergeGpmFlag) indicating whether the GPM-based merge mode is applied to the current block. MergeGpmFlag may be set to 1 if a predetermined condition is met, and may be set to 0 if not. Here, the predetermined condition may include at least one of the following conditions:
[0100] - sps_gpm_enabled_flag is 1, i.e. GPM-based merge mode is available.
[0101] - The slice type to which the current block belongs is a B slice.
[0102] - general_merge_flag is 1, i.e., the current block is coded in merge mode.
[0103] - The current block's width and height are greater than or equal to 8.
[0104] - cbWidth is less than (8*cbHeight), where cbWidth and cbHeight represent the width and height of the current block, respectively.
[0105] - cbHeight is less than (8*cbWidth).
[0106] - regular_merge_flag is 0, i.e., the motion information of the current block is not derived based on the general merge mode or MMVD mode.
[0107] - merge_subblock_flag is 0, that is, the inter prediction mode of the current block is not the subblock merge mode.
[0108] - ciip_flag is 0, i.e., CIIP mode is not applied to the current block.
[0109] When the current block is coded in the merge mode, the inter prediction mode of the current block may be sequentially checked according to the priority of the inter prediction modes. For example, first, it may be checked whether the inter prediction mode of the current block is the sub-block merge mode. If merge_subblock_flag is 1, the inter prediction mode of the current block may be determined to be the sub-block merge mode. If merge_subblock_flag is 0, it may be checked whether the inter prediction mode of the current block is the general merge mode based on regular_merge_flag. If regular_merge_flag is 1, it may be checked whether the inter prediction mode of the current block is the MMVD mode based on mmvd_merge_flag. If mmvd_merge_flag is 1, the inter prediction mode of the current block may be determined to be the MMVD mode. If mmvd_merge_flag is 0, the inter prediction mode of the current block may be determined to be the general merge mode. When regular_merge_flag is 0, it may be checked whether the inter prediction mode of the current block is the CIIP mode based on ciip_flag. When ciip_flag is 1, the inter prediction mode of the current block may be determined to be the CIIP mode. When ciip_flag is 0, it may be checked whether the inter prediction mode of the current block is the GPM-INTRA-based merge mode based on gpm_intra_flag. When gpm_intra_flag is 1, the inter prediction mode of the current block may be determined to be the GPM-INTRA-based merge mode, and when gpm_intra_flag is 0, the inter prediction mode of the current block may be determined to be the GPM-INTRA-based merge mode.
[0110] When the current block is coded in skip mode, a predicted sample of the current block may be generated based on one of the above-mentioned inter prediction modes, and the generated predicted sample may be set as a reconstructed sample. However, when the current block is coded in skip mode, there may be a restriction that the CIIP mode is not applied. That is, when the current block is coded in skip mode and regular_merge_flag for the current block is 0, ciip_flag is not signaled but is set to 0, and the inter prediction mode of the current block may be determined to be the GPM-based merge mode or the GPM-INTRA-based merge mode.
[0111] Alternatively, restricting the application of the CIIP mode to a current block coded in skip mode presupposes that the intra-predicted block in CIIP mode has a sufficiently large number of residual signals. If the compression efficiency of the CIIP mode improves, forcing the constant transmission of unnecessary residual signals may actually cause a decrease in compression performance. Therefore, similar to the merge mode described above, the application of the CIIP mode to the current block may be permitted even if the current block is coded in skip mode.
[0112] For example, regular_merge_flag may be signaled if a predetermined condition is met, and not signaled otherwise. Here, the predetermined condition may include at least one of the following conditions:
[0113] - The current block width and height are less than 128.
[0114] - sps_ciip_enabled_flag is 1 and the product of the width and height of the current block is greater than or equal to 64, regardless of cu_skip_flag.
[0115] - sps_gpm_enabled_flag is 1, the slice type to which the current block belongs is a B slice, the width (cbWidth) and height (cbHeight) of the current block are greater than or equal to 8, cbWidth is less than (8*cbHeight), and cbHeight is less than (8*cbWidth).
[0116] ciip_flag may be signaled if a predetermined condition is met, regardless of whether the current block is a block coded in skip mode (i.e., cu_skip_flag). In this way, by skipping signaling of residual information in CIIP mode, compression efficiency can be increased, and complexity can be reduced by reducing the number of condition checks in the process of signaling / parsing ciip_flag. The predetermined condition may include at least one of the following conditions:
[0117] - sps_ciip_enabled_flag is 1.
[0118] - sps_gpm_enabled_flag is 1.
[0119] - The slice type to which the current block belongs is a B slice.
[0120] - The width (cbWidth) and height (cbHeight) of the current block are greater than or equal to 8.
[0121] - cbWidth is smaller than (8*cbHeight).
[0122] - cbHeight is less than (8*cbWidth).
[0123] - The current block width and height are less than 128.
[0124] If the predetermined condition is not met, ciip_flag may not be signaled. In this case, ciip_flag may be induced to 0 or 1 according to the above-mentioned ciip_flag induction condition. However, the condition related to cu_skip_flag may be excluded from the above-mentioned ciip_flag induction condition.
[0125] An intra-prediction sample according to the CIIP mode may be derived based on a predetermined intra-prediction mode. The predetermined intra-prediction mode may be at least one of intra-prediction modes predefined for both the encoding device and the decoding device. FIG. 5 illustrates predefined intra-prediction modes and their prediction directions according to the present disclosure. Referring to FIG. 5, the predefined intra-prediction modes may include a planar mode (mode 0), a DC mode (mode 1), directional modes (modes 2 to 66), and wide-angle modes (modes -1 to -14, modes 67 to 80). A candidate list for the current block may be constructed using one or more of the predefined intra-prediction modes as candidate modes, and the intra-prediction mode of the current block may be derived based on one or more candidate modes included in the candidate list. To this end, a mode index (ciip_mpm_idx) identifying one of a plurality of candidate modes included in the candidate list may be signaled. The candidate list may include at least one of a planar mode, a DC mode, or a directional mode, and if the current block is a non-square block, the candidate list may further include at least one of a wide-angle mode.
[0126] Alternatively, the predefined intra prediction modes may be classified into a plurality of groups. A group to which the intra prediction mode of the current block belongs may be determined based on a group index (ciip_group_idx) identifying one of the plurality of groups. A candidate list may be constructed using one or more intra prediction modes belonging to the determined group as candidate modes. The intra prediction mode of the current block may be determined based on a mode index identifying one of the one or more candidate modes belonging to the candidate list.
[0127] For example, the predefined intra prediction modes may be classified into a first group including at least one of a planar mode, a DC mode, or a wide-angle mode, a second group including at least one of directional modes having horizontal directionality (modes 2 to 34), and a third group including at least one of directional modes having vertical directionality (modes 35 to 66). A group index of 0 may identify the first group, a group index of 1 may identify the second group, and a group index of 2 may identify the third group.
[0128] When the CIIP mode is applied to the current block, the predicted samples of the current block may be generated based on a weighted sum between inter-predicted samples and intra-predicted samples, where a weight for the weighted sum may be determined based on at least one of the intra-prediction mode of the current block, the position of the sub-region to which the predicted samples belong, or a weight index.
[0129] The weighting value may be applied equally to the entire region of the inter-predicted block and the intra-predicted block of the current block. Alternatively, the current block may be divided into a plurality of sub-regions. For example, the current block may be divided into a plurality of sub-regions having the same size based on symmetric division. Alternatively, the current block may be divided into a plurality of sub-regions having different sizes based on asymmetric division. The division direction of the current block may be determined based on information signaled to indicate the division direction or based on predetermined coding parameters. Here, the coding parameters may include at least one of the intra-prediction mode of the current block (e.g., mode value, whether or not it is a non-directional mode, directionality, angle, etc.) or the positions of neighboring blocks coded in the intra-prediction mode. The weighting value applied to one of the plurality of sub-regions may be different from the weighting value applied to at least one other sub-region. To this end, at least two weighting values may be determined for the current block. A weighting value may be applied to one of the plurality of sub-regions, and no weighting value may be applied to at least one other sub-region. Hereinafter, weights may be expressed as (w0, w1), where w0 refers to a first weight applied to an intra-predicted sample, and w1 refers to a second weight applied to an inter-predicted sample.
[0130] Specifically, the weighting value for the weighted sum may be determined based on the intra prediction mode of the current block (e.g., the value of the intra prediction mode, the direction of the intra prediction mode, or the range to which the intra prediction mode belongs).
[0131] For example, the weight may be determined to be at least one of a plurality of predefined weight candidates, where the plurality of weight candidates may include at least one of (3,1), (2,2), or (1,3), or the plurality of weight candidates may include at least one of (7,1), (6,2), (5,3), (4,4), (3,5), (6,2), or (1,7).
[0132] If the intra prediction mode of the current block is a non-directional mode (e.g., planar mode or DC mode), the same weight may be applied to the entire region of the current block, and the weight may be determined to be one of the above-mentioned multiple candidate weights.
[0133] When the intra prediction mode of the current block is a horizontal directionality mode, the left sub-region and the right sub-region of the current block may have different weights. Here, the horizontal directionality mode may be defined as a mode belonging to the range of modes 2 to 34, or may be defined as a mode belonging to the range of modes 13 to 23. When the intra prediction mode of the current block is a vertical directionality mode, the top sub-region and the bottom sub-region of the current block may have different weights. Here, the vertical directionality mode may be defined as a mode belonging to the range of modes 35 to 66, or may be defined as a mode belonging to the range of modes 45 to 55.
[0134] When the intra prediction mode of the current block is a wide-angle mode, the same weight may be applied to the entire region of the current block, and the weight may be determined to be one of the above-mentioned multiple candidate weights.
[0135] The weights may be determined based on signaled weight indexes. For example, when the CIIP mode is applicable (AvailableCiip=1), ciip_flag may be signaled. When ciip_flag is 1, at least one of a merge index for inter prediction (merge_idx), a mode index for intra prediction (ciip_mpm_idx), or a weight index for weighted sum (weight_idx) may be signaled. The variable AvailableCiip may be set to 1 if the above-mentioned signaling condition of ciip_flag is met, and may be set to 0 otherwise.
[0136] As an example, a weighted value of 0 may indicate index (2,2), a weighted value of 1 may indicate (3,1), and a weighted value of 2 may indicate (1,3).
[0137] Alternatively, the weighting value may be a weighting value applied to a specific region within the current block as shown in Table 1. That is, the region where the weighted sum between inter-predicted samples and intra-predicted samples is performed may vary depending on the intra-prediction mode of the current block.
[0138] [Table 1]
[0139] In Table 1, "Left mode" can refer to a horizontal mode (i.e., mode 18) or a horizontal directional mode. The horizontal directional mode can be defined as a mode belonging to the range of modes 2 to 34, or as a mode belonging to the range of modes 13 to 23. The above mode can refer to a vertical mode (i.e., mode 50) or a vertical directional mode. The vertical directional mode can be defined as a mode belonging to the range of modes 35 to 66, or as a mode belonging to the range of modes 45 to 55. "(Left mode! & Above mode!)" can refer to a mode that is neither Left mode nor Above mode. "(Left mode! & Above mode!)" can include non-directional modes such as planar mode and / or DC mode. "(Left mode! & Above mode!)" can include a wide-angle mode as a directional mode.
[0140] In Table 1, "Whole region" may indicate that the weight is applied to the entire region of the current block. "Left region" may indicate that the weight is applied to the left sub-region of the current block. "Above region" may indicate that the weight is applied to the top sub-region of the current block. For example, the current block may be divided into two sub-regions in the vertical direction, and the left sub-region of the two sub-regions may correspond to the "Left region." Similarly, the current block may be divided into two sub-regions in the horizontal direction, and the top sub-region of the two sub-regions may correspond to the "Above region." Hereinafter, one of the two sub-regions to which the weight is applied (i.e., the "Left region" or the "Above region") will be referred to as "Sub-region 0 (R0)," and the other sub-region will be referred to as "Sub-region 1 (R1)."
[0141] For sub-region 0 (R0), a weighted sum may be performed based on the weight indicated by the weight index (weight_idx). For sub-region 1 (R1), a predefined prediction sample may be set as the prediction sample of the current block. Here, the predefined prediction sample may be an inter prediction sample or an intra prediction sample. For example, the prediction sample for each sub-region may be derived as shown in Equation 1 below.
[0142] [Formula 1]
number
[0143] Alternatively, for sub-region 0 (R0), a weighted sum may be performed based on a weight indicated by a weight index (weight_idx). For sub-region 1 (R1), a weighted sum may be performed based on a predetermined weight. Here, the predetermined weight may be derived based on the weight indicated by the weight index (weight_idx). The predetermined weight may be derived by adding / subtracting a predetermined offset (α) to / from the weight indicated by the weight index (weight_idx). α may be an integer greater than or equal to -w0 and less than or equal to w1. As an example, prediction samples for each sub-region may be derived as shown in Equation 2 below.
[0144] [Formula 2]
number
[0145] Alternatively, the current block may be divided into four sub-regions. The four sub-regions may be represented as sub-regions 0 to 3, i.e., R0 to R3. The current block may be divided horizontally into four sub-regions based on three horizontal lines. The current block may be divided vertically into four sub-regions based on four vertical lines. The current block may be divided into four sub-regions by one horizontal line and one vertical line that cross the center of the current block.
[0146] For sub-region 0 (R0), a weighted sum may be calculated based on a weight indicated by a weight index (weight_idx). For sub-regions 1 to 3 (R1 to R3), a weighted sum may be calculated based on predetermined weights. Here, the weight for sub-region 1 may be derived by adding / subtracting a predetermined offset (α) to / from the weight indicated by the weight index (weight_idx). The weight for sub-region 2 may be derived by adding / subtracting a predetermined offset (β) to / from the weight indicated by the weight index (weight_idx). The weight for sub-region 3 may be derived by adding / subtracting a predetermined offset (δ) to / from the weight indicated by the weight index (weight_idx). The offsets (α, β, δ) are integers greater than or equal to -w0 and less than or equal to w1, and may not be 0. α, β, and δ may be different values. For example, the prediction samples for each sub-region may be derived as shown in Equation 3 below.
[0147] [Formula 3]
number
[0148] Alternatively, directionality-based intra prediction utilizes the characteristics of spatial proximity between samples, and thus can uniformly increase weights as the distance from a reference sample increases. Specifically, for subregion 0 (R0), a weighted sum may be performed based on a weight indicated by a weight index (weight_idx). For subregions 1 to 3 (R1 to R3), a weighted sum may be performed based on predetermined weights. Here, the weight for subregion 1 may be derived by adding / subtracting a predetermined offset (α) to / from the weight indicated by the weight index (weight_idx). The weight for subregion 2 may be derived by adding / subtracting a predetermined offset (2α) to / from the weight indicated by the weight index (weight_idx). The weight for subregion 3 may be derived by adding / subtracting a predetermined offset (3α) to / from the weight indicated by the weight index (weight_idx). α is an integer greater than or equal to −w0 and less than or equal to w1, and may not be 0. As an example, the prediction samples for each sub-region may be derived as shown in Equation 4 below.
[0149] [Formula 4]
number
[0150] Information about the GPM according to the present disclosure may include at least one of information for a GPM-INTRA-based merge mode or information for a GPM-based merge mode. The information about the GPM may include at least one of a partition index (merge_gpm_partition_idx) identifying a partition type or partition form of the GPM, a flag (gpm_intra_flag0) indicating whether a first partition (P0) of a current block is predicted based on an intra mode, a mode index (gpm_intra_mode_idx0) identifying an intra prediction mode for the first partition from a candidate list, a merge index (merge_gpm_idx0) identifying a merge candidate for the first partition of the current block from a merge candidate list, a flag (gpm_intra_flag1) indicating whether a second partition (P1) of the current block is predicted based on an intra mode, a mode index (gpm_intra_mode_idx1) identifying an intra prediction mode for the second partition from a candidate list, or a merge index (merge_gpm_idx1) identifying a merge candidate for the second partition of the current block from a merge candidate list.
[0151] For example, gpm_intra_flag0 set to 1 may indicate that the first partition is predicted based on the intra mode. gpm_intra_flag0 set to 0 may indicate that the first partition is not predicted based on the intra mode. Alternatively, gpm_intra_flag0 set to 0 may indicate that motion information of the first partition is derived based on the merge mode. Thus, when gpm_intra_flag0 is set to 1, gpm_intra_mode_idx0 may be signaled. An intra prediction mode for the first partition may be derived based on gpm_intra_mode_idx0, and an intra prediction block corresponding to the first partition may be generated based on the derived intra prediction mode. On the other hand, when gpm_intra_flag0 is set to 0, merge_gpm_idx0 may be signaled. A merge candidate for the first partition may be determined from a merge candidate list of the current block based on merge_gpm_idx0, and motion information of the first partition may be derived based on motion information of the determined merge candidate. An inter-predicted block corresponding to the first partition may be generated based on the derived motion information.
[0152] gpm_intra_flag1 equal to 1 may indicate that the second partition is predicted based on intra mode. gpm_intra_flag1 equal to 0 may indicate that the second partition is not predicted based on intra mode. Alternatively, gpm_intra_flag1 equal to 0 may indicate that the motion information of the second partition is derived based on merge mode. gpm_intra_flag1 may be signaled when gpm_intra_flag0 is 0.
[0153] When gpm_intra_flag1 is 1, gpm_intra_mode_idx1 may be signaled. An intra prediction mode for the second partition may be derived based on gpm_intra_mode_idx1, and an intra prediction block corresponding to the second partition may be generated based on the derived intra prediction mode. On the other hand, when gpm_intra_flag1 is 0, merge_gpm_idx1 may be signaled. A merge candidate for the second partition may be determined from the merge candidate list of the current block based on merge_gpm_idx1, and motion information of the second partition may be derived based on motion information of the determined merge candidate. An inter prediction block corresponding to the second partition may be generated based on the derived motion information.
[0154] The CIIP mode can generate a final predicted block using a weighted sum between an intra-predicted block and an inter-predicted block. The GPM-INTRA-based merge mode can divide a current block into two partitions and generate a predicted block for one of them based on the intra-mode. Both modes have in common that they generate intra-predicted blocks. This disclosure relates to a method for signaling residual information for the CIIP mode and the GPM-INTRA-based merge mode, and a method for harmonization between the two modes.
[0155] According to the above example, the CIIP mode may be allowed when the current block is not coded in skip mode. That is, when the CIIP mode is applied to the current block, signaling of residual information for the current block is not skipped. Similarly, the GPM-INTRA-based merge mode may be restricted to be allowed when the current block is not coded in skip mode. Conversely, when the current block is coded in skip mode, the GPM-INTRA-based merge mode may not be allowed.
[0156] To this end, at least one of the above-mentioned information regarding the GPM may be adaptively signaled based on a flag (cu_skip_flag) indicating whether the current block is a block coded in skip mode. For example, if cu_skip_flag is 0, gpm_intra_flag0 may be signaled, and if cu_skip_flag is 1, gpm_intra_flag0 may not be signaled. If gpm_intra_flag0 and cu_skip_flag are 0, gpm_intra_flag1 may be signaled, and if at least one of gpm_intra_flag0 or cu_skip_flag is 1, gpm_intra_flag1 may not be signaled.
[0157] Referring to FIG. 4, residual samples of a current block can be derived based on information about a subblock transform (SBT) (S410).
[0158] The sub-block transform may divide a current block into a plurality of sub-blocks, perform residual coding on some of the sub-blocks, and skip residual coding on the remaining sub-blocks. Here, the residual coding may include at least one of 1) deriving transform coefficients based on residual information, 2) inverse quantization of the transform coefficients, or 3) inverse transform of the transform coefficients.
[0159] For example, when a sub-block transform is used for a current block, the current block may be divided into two sub-blocks. Residual coding may be performed on one of the two sub-blocks to derive a residual sample. Residual coding may be skipped for the other sub-block, and the residual sample of the other sub-block may be induced to 0.
[0160] The information related to the sub-block transform according to the present disclosure may include at least one of an SBT flag (cu_sbt_flag), an SBT magnitude flag (cu_sbt_quad_flag), an SBT direction flag (cu_sbt_horizontal_flag), or an SBT position flag (cu_sbt_pos_flag).
[0161] Specifically, the SBT flag (cu_sbt_flag) may indicate whether sub-block transform is used for the current block. For example, an SBT flag of 1 may indicate that sub-block transform is used for the current block, and an SBT flag of 0 may indicate that sub-block transform is not used for the current block.
[0162] The SBT flag may be signaled if a predetermined first condition is met, and may otherwise be set to 0. The predetermined first condition may include at least one of the following conditions:
[0163] - sps_sbt_enabled_flag is 1, i.e. sub-block transforms are available.
[0164] - cbWidth is less than or equal to MaxTbSizeY, i.e., the width of the current block (cbWidth) is less than or equal to the maximum transform block size (MaxTbSizeY).
[0165] - cbHeight is less than or equal to MaxTbSizeY, i.e., the height of the current block (cbHeight) is less than or equal to the maximum transform block size (MaxTbSizeY).
[0166] - The current block's width and height are greater than or equal to 8.
[0167] As in the above condition, the SBT flag may be signaled regardless of the ciip_flag. By allowing sub-block transformation in CIIP mode, signaling of residual information for some sub-blocks in the current block can be omitted, thereby improving compression performance.
[0168] Alternatively, the SBT flag may be signaled if a predetermined second condition is met, and may be set to 0 if not. The predetermined second condition may include at least one of the following conditions:
[0169] - sps_sbt_enabled_flag is 1, i.e. sub-block transforms are available.
[0170] - ciip_flag is 0, i.e. CIIP mode is not applied to the current block.
[0171] - cbWidth is less than or equal to MaxTbSizeY, i.e., the width of the current block (cbWidth) is less than or equal to the maximum transform block size (MaxTbSizeY).
[0172] - cbHeight is less than or equal to MaxTbSizeY, i.e., the height of the current block (cbHeight) is less than or equal to the maximum transform block size (MaxTbSizeY).
[0173] - The current block's width and height are greater than or equal to 8.
[0174] As in the above condition, the SBT flag may be signaled regardless of the flag (gpm_intra_flag) indicating whether the GPM-Intra based merge mode is applied to the current block. By allowing sub-block transformation in the GPM-Intra based merge mode, signaling of residual information for some sub-blocks in the current block can be omitted, thereby improving compression performance.
[0175] The SBT size flag (cu_sbt_quad_flag) may indicate the size of sub-blocks on which residual coding is performed. For example, an SBT size flag of 1 may indicate that residual coding is performed on sub-blocks that are 1 / 4 the size of the current block, and an SBT size flag of 0 may indicate that residual coding is performed on sub-blocks that are 1 / 2 the size of the current block.
[0176] The SBT size flag may be signaled if a predetermined condition is met, and may be set to 0 if not. The predetermined condition may include at least one of the following conditions:
[0177] - The width or height of the current block is greater than or equal to 8.
[0178] - The width or height of the current block is greater than or equal to 16.
[0179] The SBT direction flag (cu_sbt_horizontal_flag) may indicate whether the current block is divided horizontally. For example, an SBT direction flag of 1 may indicate that the current block is divided horizontally into two sub-blocks, and an SBT direction flag of 0 may indicate that the current block is divided vertically into two sub-blocks.
[0180] The SBT direction flag may be signaled when a predetermined condition is met. The predetermined condition may be one of the following conditions:
[0181] - cu_sbt_quad_flag is 1 and the current block width and height are greater than or equal to 16.
[0182] - cu_sbt_quad_flag is 0 and the current block width and height are greater than or equal to 8.
[0183] The SBT direction flag may not be signaled if the above-mentioned conditions are not met. However, the SBT direction flag may be induced based on the SBT size flag and / or the width of the current block. As an example, when cu_sbt_quad_flag is 1, if the width of the current block is greater than or equal to 16, cu_sbt_horizontal_flag may be induced to 1; otherwise (i.e., if the width of the current block is less than 16), cu_sbt_horizontal_flag may be induced to 0. When cu_sbt_quad_flag is 0, if the width of the current block is greater than or equal to 8, cu_sbt_horizontal_flag may be induced to 1; otherwise (i.e., if the width of the current block is less than 8), cu_sbt_horizontal_flag may be induced to 0.
[0184] The SBT position flag (cu_sbt_pos_flag) may indicate the position of a sub-block on which residual coding is performed. For example, an SBT position flag of 1 may indicate that residual coding is performed on the second sub-block of two sub-blocks in the current block, and an SBT position flag of 0 may indicate that residual coding is performed on the first sub-block of two sub-blocks. Depending on the division direction of the current block, the second sub-block may refer to the right or bottom sub-block, and the first sub-block may refer to the left or top sub-block.
[0185] All or part of the information related to sub-block transform may be derived using characteristics of the CIIP mode, thereby reducing the number of bits required for signaling information related to sub-block transform. Intra prediction is characterized in that prediction performance improves as the distance to a reference sample decreases. Therefore, all or part of the information related to sub-block transform may be derived taking into account the directionality of the intra prediction mode for the current block. Depending on the intra prediction mode of the current block, cu_sbt_flag may be induced to a specific value without being signaled. Depending on the intra prediction mode of the current block, cu_sbt_quad_flag may be induced to a specific value without being signaled. Depending on the intra prediction mode of the current block, cu_sbt_horizontal_flag may be induced to a specific value without being signaled. Depending on the intra prediction mode of the current block, cu_sbt_pos_flag may be induced to a specific value without being signaled.
[0186] As an example, Table 2 shows examples in which cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_horizontal_flag, and cu_sbt_pos_flag are signaled or mapped to specific values depending on the characteristics of the intra prediction mode for the CIIP mode.
[0187] [Table 2]
[0188] Referring to Table 2, if the intra prediction mode of the current block corresponds to a non-directional mode or a wide-angle mode, this may mean that the similarity between the current block and neighboring samples is relatively low. In this case, cu_sbt_flag for the current block may be set to 0 without being signaled. If the intra prediction mode of the current block belongs to a first range, this may mean that the similarity between the current block and neighboring samples is relatively low. For example, the first range may include at least one of a range of modes 2 to 12, a range of modes 24 to 44, or a range of modes 56 to 80. In this case, cu_sbt_flag for the current block may be set to 0 without being signaled. If the intra prediction mode of the current block belongs to a second range, cu_sbt_flag for the current block may be set to 1 without being signaled. For example, the second range may include at least one of a range of modes 13 to 23, or a range of modes 45 to 55. Furthermore, if the intra prediction mode of the current block belongs to the second range, cu_sbt_quad_flag for the current block may be set to 0 without being signaled. If the intra prediction mode of the current block corresponds to a horizontal directional mode (e.g., if the intra prediction mode of the current block belongs to the range of modes 13 to 23), cu_sbt_horizontal_flag for the current block may be set to 0. If the intra prediction mode of the current block corresponds to a vertical directional mode (e.g., if the intra prediction mode of the current block belongs to the range of modes 45 to 55), cu_sbt_horizontal_flag for the current block may be set to 1. If the intra prediction mode of the current block belongs to the second range, cu_sbt_pos_flag for the current block may be set to 1 without being signaled.
[0189] In other words, if the current block has a horizontal or vertical directionality mode, it may be determined that a sub-block transform is applied to the current block. If the current block has a horizontal or vertical directionality mode, it may be determined that the current block is divided into two sub-blocks having the same size. If the current block has a horizontal directionality mode, it may be determined that the current block is divided vertically, taking into account the distance between the current block and its neighboring samples. If the current block has a vertical directionality mode, it may be determined that the current block is divided horizontally, taking into account the distance between the current block and its neighboring samples. In this case, it may be determined that the residual information of the first sub-block, which is closer to the reference sample, is not signaled, and the residual information of the second sub-block, which is farther from the reference sample, is signaled.
[0190] Table 3 shows how information about sub-block transformation is signaled / derived based on the range to which the intra-prediction mode of the current block belongs.
[0191] [Table 3]
[0192] Referring to Table 3, the predefined intra prediction modes may be classified into three ranges. Specifically, the predefined intra prediction modes may be classified into a first range of modes 2 to 34, a second range of modes 34 to 66, and a third range including at least one of a non-directional mode and a wide-angle mode. If the intra prediction mode of the current block corresponds to a directional mode (e.g., if the intra prediction mode of the current block belongs to the first or second range), cu_sbt_flag for the current block may be set to 1 without being signaled. If the intra prediction mode of the current block corresponds to a directional mode (e.g., if the intra prediction mode of the current block belongs to the first or second range), cu_sbt_quad_flag for the current block may be set to 1 without being signaled. If the intra prediction mode of the current block corresponds to a horizontal directional mode (e.g., if the intra prediction mode of the current block belongs to the first range), cu_sbt_horizontal_flag for the current block may be set to 0. If the intra prediction mode of the current block corresponds to a vertical directional mode (e.g., if the intra prediction mode of the current block belongs to the second range), cu_sbt_horizontal_flag for the current block may be set to 1. If the intra prediction mode of the current block corresponds to a directional mode (e.g., if the intra prediction mode of the current block belongs to the first or second range), cu_sbt_pos_flag for the current block may be set to 1 without being signaled. On the other hand, if the intra prediction mode of the current block corresponds to a non-directional mode or a wide-angle mode (e.g., if the intra prediction mode of the current block belongs to the third range), information regarding sub-block transform for the current block may be signaled in the bitstream.
[0193] In other words, if the current block has a horizontal or vertical directionality mode, it may be determined that a sub-block transform is applied to the current block. If the current block has a horizontal or vertical directionality mode, it may be determined that the current block is divided into two sub-blocks having 1 / 4 and 3 / 4 of the size of the current block. If the current block has a horizontal directionality mode, it may be determined that the current block is divided vertically, taking into account the distance between the current block and its neighboring samples. If the current block has a vertical directionality mode, it may be determined that the current block is divided horizontally, taking into account the distance between the current block and its neighboring samples. In this case, it may be determined that the residual information of the first sub-block, which is closer to the reference sample, is not signaled, and the residual information of the second sub-block, which is farther from the reference sample, is signaled.
[0194] Table 4 shows how some of the information about the sub-block transform is signaled and the other part is derived based on the range to which the intra-prediction mode of the current block belongs.
[0195] [Table 4]
[0196] Referring to Table 4, the predefined intra prediction modes may be classified into three ranges. Specifically, the predefined intra prediction modes may be classified into a first range of modes 2 to 34, a second range of modes 34 to 66, and a third range including at least one of a non-directional mode and a wide-angle mode. If the intra prediction mode of the current block corresponds to a directional mode (e.g., if the intra prediction mode of the current block belongs to the first or second range), cu_sbt_flag for the current block may be set to 1 without being signaled. On the other hand, if the intra prediction mode of the current block does not correspond to a directional mode (e.g., if the intra prediction mode of the current block belongs to the third range), cu_sbt_flag for the current block may be set to 0 without being signaled. cu_sbt_quad_flag may be signaled regardless of the intra prediction mode of the current block (or the range to which the intra prediction mode of the current block belongs). If the intra prediction mode of the current block corresponds to a horizontal directionality mode (e.g., if the intra prediction mode of the current block belongs to the first range), cu_sbt_horizontal_flag for the current block may be set to 0. If the intra prediction mode of the current block corresponds to a vertical directionality mode (e.g., if the intra prediction mode of the current block belongs to the second range), cu_sbt_horizontal_flag for the current block may be set to 1. cu_sbt_pos_flag may be signaled regardless of the intra prediction mode of the current block (or the range to which the intra prediction mode of the current block belongs).
[0197] In other words, if the current block has a directional mode, it may be determined that a sub-block transform is applied to the current block, and if not, it may be determined that a sub-block transform is not applied to the current block.If the current block has a horizontal directional mode, it may be determined that the current block is divided vertically taking into account the distance between the current block and its neighboring samples.If the current block has a vertical directional mode, it may be determined that the current block is divided horizontally taking into account the distance between the current block and its neighboring samples.
[0198] The above-described method for signaling / inducing information about sub-block transform may be applied when the intra prediction mode of the current block is induced before information about sub-block transform is signaled. Alternatively, even if the intra prediction mode of the current block is not induced before information about sub-block transform is signaled, the above-described method may be applied when a range to which the intra prediction mode of the current block belongs can be induced using a simplified prediction method.
[0199] The simplified prediction method may determine the range to which the intra prediction mode of the current block belongs, the directionality of the intra prediction mode of the current block, etc., based on gradients (or a histogram of the amount of change or gradients) between reference samples in neighboring regions (or template regions) of the current block. Alternatively, the simplified prediction method may determine the range to which the intra prediction mode of the current block belongs, the directionality of the intra prediction mode of the current block, etc., based on statistical information (e.g., mode, minimum, maximum, average, median, etc.) regarding intra prediction modes in neighboring regions of the current block.
[0200] The above method is merely an example, and the type of information regarding the sub-block transformation to be induced, the specific value to be induced, etc. may be changed. Furthermore, the range for distinguishing predefined intra prediction modes may be defined more finely, and for this purpose, the size and / or shape of the current block may be taken into consideration.
[0201] When a CIIP mode is applied to a current block, at least one of the information regarding sub-block transformation may be induced to a specific value without being signaled based on at least one of the weighting value (or weighting value index) in the CIIP mode, the intra prediction mode, the range of the area to which the weighting value is applied, or the position of the sub-area to which the weighting value is applied.
[0202] Specifically, cu_sbt_flag may be induced to a specific value without being signaled depending on the weight for the weighted sum in CIIP mode. cu_sbt_quad_flag may be induced to a specific value without being signaled depending on the weight for the weighted sum in CIIP mode. cu_sbt_horizontal_flag may be induced to a specific value without being signaled depending on the weight for the weighted sum in CIIP mode. cu_sbt_pos_flag may be induced to a specific value without being signaled depending on the application range of the signaled / induced weight for the weighted sum in INTRA mode and INTER mode. cu_sbt_quad_flag may be induced to a specific value without being signaled depending on the range of the area to which the weight for the weighted sum in CIIP mode is applied. Depending on the range of the area to which the weights for the weighted sum in the CIIP mode are applied, cu_sbt_horizontal_flag may be unsignaled and induced to a specific value. Depending on the range of the area to which the weights for the weighted sum in the CIIP mode are applied, cu_sbt_pos_flag may be unsignaled and induced to a specific value. Depending on the intra prediction mode for the CIIP mode, cu_sbt_flag may be unsignaled and induced to a specific value. Depending on the intra prediction mode for the CIIP mode, cu_sbt_quad_flag may be unsignaled and induced to a specific value. Depending on the intra prediction mode for the CIIP mode, cu_sbt_horizontal_flag may be unsignaled and induced to a specific value. Depending on the intra prediction mode for the CIIP mode, cu_sbt_pos_flag may be unsignaled and induced to a specific value.
[0203] As an example, Table 5 shows an example in which all or part of the information regarding sub-block transformation is induced to a specific value based on at least one of the weighting value (or weighting value index) for weighted sum in CIIP mode or intra prediction mode.
[0204] [Table 5]
[0205] In Table 5, Left mode, Above mode, (Left mode! & Above mode!) are as explained in Table 1, and redundant explanations will be omitted here.
[0206] Whether a sub-block transform is applied to a current block may be determined based on a weight index (weight_idx). For example, if the weight index is 0 or 2, it may be determined that a sub-block transform is applied to the current block. In this case, cu_sbt_flag may be unsignaled and induced to 1. If the weight index is 1, it may be determined that a sub-block transform is not applied to the current block. In this case, cu_sbt_flag may be unsignaled and induced to 0. Alternatively, if a first weight (w0) applied to an intra-predicted sample is less than or equal to a second weight (w1) applied to an inter-predicted sample, it may be determined that a sub-block transform is applied to the current block. In this case, cu_sbt_flag may be unsignaled and induced to 1. If a first weight (w0) applied to an intra-predicted sample is greater than a second weight (w1) applied to an inter-predicted sample, it may be determined that a sub-block transform is not applied to the current block. In this case, cu_sbt_flag may be driven to 0 rather than signaled.
[0207] When it is determined that a sub-block transform is applied to the current block, at least one of cu_sbt_quad_flag, cu_sbt_horizontal_flag, or cu_sbt_pos_flag may be set to a specific value based on the intra prediction mode of the current block. SBT information may be set to a specific value depending on the classification of each INTRA mode. For example, if the intra prediction mode of the current block does not correspond to Left mode or Above mode, this may mean that the similarity between the current block and neighboring samples is relatively low. In this case, it may be determined that the current block is divided into two sub-blocks having 1 / 4 and 3 / 4 of the size of the current block, and cu_sbt_quad_flag may be set to 1 without being signaled. On the other hand, when the intra prediction mode of the current block corresponds to Left mode or Above mode, it may be determined that the current block is divided into two sub-blocks having the same size, and cu_sbt_quad_flag may be set to 0 without being signaled. Here, if the intra prediction mode of the current block does not correspond to Left mode or Above mode, it may mean that the intra prediction mode of the current block corresponds to a non-directional mode such as planar mode or DC mode. If the intra prediction mode of the current block does not correspond to Left mode or Above mode, it may mean that the intra prediction mode of the current block belongs to a wide-angle mode (modes -14 to -1, modes 67 to 80). If the intra prediction mode of the current block does not correspond to Left mode or Above mode, it may mean that the intra prediction mode belongs to a predetermined directional mode (e.g., modes 2 to 12, modes 24 to 44, modes 56 to 66).
[0208] The division direction of the current block may be determined based on the distance to the reference sample (or the position of the reference sample) for intra prediction of the current block. If the intra prediction mode of the current block corresponds to Left mode, this may mean that the reference sample of the current block is located on the left side of the current block. In this case, it may be determined that the current block is divided vertically, and cu_sbt_horizontal_flag may be set to 0 without being signaled. If the intra prediction mode of the current block corresponds to Above mode, this may mean that the reference sample of the current block is located at the top edge of the current block. In this case, it may be determined that the current block is divided horizontally, and cu_sbt_horizontal_flag may be set to 1 without being signaled. If the intra prediction mode of the current block does not correspond to Left mode or Above mode, it may be determined that the current block is divided in a predefined direction (e.g., horizontally or vertically), and cu_sbt_horizontal_flag may be set to 1 or 0 without being signaled. If the intra prediction mode of the current block does not correspond to the Left mode or Above mode, the cu_sbt_horizontal_flag for the current block may be signaled.
[0209] It may be determined that the residual information of the first sub-block of the current block that is closer to the reference sample is not signaled, and the residual information of the second sub-block that is farther from the reference sample is signaled, i.e., cu_sbt_pos_flag may be set to 1 without being signaled.
[0210] Alternatively, as in Table 6, whether information about the sub-block transform is signaled and / or how to derive the information about the sub-block transform may be determined based on the weight index.
[0211] [Table 6]
[0212] In Table 6, Left mode, Above mode, (Left mode! & Above mode!) are as explained in Table 1, and redundant explanations will be omitted here.
[0213] Whether information regarding the sub-block transform of the current block is signaled may be determined based on the weight index (weight_idx). For example, if the weight index is 1, information regarding the sub-block transform of the current block may be signaled. If the weight index is 0 or 2, at least one piece of information regarding the sub-block transform of the current block may be induced to a specific value. Alternatively, if the first weight (w0) applied to the intra-predicted sample is greater than the second weight (w1) applied to the inter-predicted sample, information regarding the sub-block transform of the current block may be signaled. If the first weight (w0) applied to the intra-predicted sample is less than or equal to the second weight (w1) applied to the inter-predicted sample, at least one piece of information regarding the sub-block transform of the current block may be induced.
[0214] Meanwhile, based on at least one of the weight index or the intra prediction mode, at least one of cu_sbt_flag, cu_sbt_quad_flag, cu_sbt_horizontal_flag, or cu_sbt_pos_flag may be induced to a specific value, as described with reference to Table 5.
[0215] The above-described method for signaling / inducing information about sub-block transform may be applied when the intra prediction mode of the current block is induced before information about sub-block transform is signaled. Alternatively, even if the intra prediction mode of the current block is not induced before information about sub-block transform is signaled, the above-described method may be applied when the range to which the intra prediction mode of the current block belongs can be induced using the above-described simplified prediction method.
[0216] When a GPM mode is applied to a current block, sub-block transformation may be allowed for the current block. Based on information about the GPM for the current block, at least one of the information about the sub-block transformation may be induced to a specific value without being signaled.
[0217] At least one of the information related to the sub-block transformation may be induced to a specific value without being signaled based on the partition index (merge_gpm_partition_idx) that specifies the geometric partition type. cu_sbt_flag may be induced to a specific value without being signaled based on merge_gpm_partition_idx. cu_sbt_quad_flag may be induced to a specific value without being signaled based on merge_gpm_partition_idx. cu_sbt_horizontal_flag may be induced to a specific value without being signaled based on merge_gpm_partition_idx. cu_sbt_pos_flag may be induced to a specific value without being signaled based on merge_gpm_partition_idx.
[0218] Table 7 below shows angleIdx and distanceIdx mapped to merge_gpm_partition_idx. angleIdx represents the angle of the boundary line according to the geometric division, and the angle of the boundary line corresponding to each angleIdx is as shown in Figure 6. distanceIdx may indicate the distance from the center position of the current block to the boundary line.
[0219] [Table 7]
[0220] Referring to Table 7, cu_sbt_flag may be induced to a specific value without being signaled depending on angleIdx. Specifically, when angleIdx indicates an angle corresponding to the vertical direction (e.g., angleIdx=0,16), it may be determined that a sub-block transform is applied to the current block, and cu_sbt_flag may be induced to 1. When angleIdx indicates an angle corresponding to the horizontal direction (e.g., angleIdx=8,24), it may be determined that a sub-block transform is applied to the current block, and cu_sbt_flag may be induced to 1. When angleIdx indicates an angle adjacent in the vertical direction (e.g., angleIdx=2,14,18,30), it may be determined that a sub-block transform is applied to the current block, and cu_sbt_flag may be induced to 1. When angleIdx indicates any other angle, it may be determined that a sub-block transform is not applied to the current block, and cu_sbt_flag may be induced to 0.
[0221] The above vertically adjacent angles are merely an example. If angleIdx corresponds to at least one of 3, 5, 11, 13, 19, 21, 27, or 29, it may also be determined that a sub-block transform is applied to the current block, and cu_sbt_flag may be set to 1. If angleIdx indicates an angle corresponding to the vertical and horizontal directions (i.e., angleIdx=0, 16, 8, 24), cu_sbt_flag may be set to 1; otherwise, cu_sbt_flag may be set to 0.
[0222] The predefined angleIdx (or angles defined by angleIdx) in the encoding device and the decoding device may be divided into a plurality of groups. For example, the predefined angleIdx may be divided into at least two groups: a first group consisting of angleIdx having a vertical directionality, a second group consisting of angleIdx having a horizontal directionality, or a third group consisting of the remaining angleIdx. Here, the angleIdx having a vertical directionality may refer to a vertical angleIdx (i.e., 0, 16). Alternatively, the angleIdx having a vertical directionality may refer to a vertical angleIdx and one or more adjacent angleIdx (i.e., at least one of 2, 3, 4, 12, 13, 14, 18, 19, 20, 28, 29, or 30). The angleIdx having a horizontal directionality may refer to a horizontal angleIdx (i.e., 8, 24). Alternatively, angleIdx having a horizontal direction may refer to angleIdx in the horizontal direction and one or more angleIdx adjacent thereto (i.e., at least one of 4, 5, 11, 12, 20, 21, 27, or 28).
[0223] The information about the sub-block transformation may be derived to a specific value based on the direction of angleIdx according to the partition index of the current block. As an example, Table 8 shows a method for deriving the information about the sub-block transformation based on the group to which angleIdx according to the partition index of the current block belongs.
[0224] [Table 8]
[0225] In Table 8, VER may correspond to a first group consisting of angleIdx with vertical directionality. HOR may correspond to a second group consisting of angleIdx with horizontal directionality. (!VER && !HOR) may correspond to a third group consisting of the remaining angleIdx.
[0226] If angleIdx for the current block belongs to the first or second group (i.e., angleIdx corresponds to an angle having a vertical or horizontal orientation), it may be determined that a sub-block transform is applied to the current block, and cu_sbt_flag may be set to 1. Otherwise, it may be determined that a sub-block transform is not applied to the current block, and cu_sbt_flag may be set to 0.
[0227] If it is determined that a sub-block transform is applied to the current block, it may be determined that the current block is divided into two sub-blocks having the same size, and cu_sbt_quad_flag may be set to 0. However, this is only an example, and the size of the sub-blocks may be determined based on the signaled cu_sbt_quad_flag.
[0228] When it is determined that a sub-block transform is applied to the current block, a division direction of the current block may be determined based on the angleIdx of the current block (or the group to which the angleIdx belongs). For example, when the angleIdx of the current block belongs to the first group, it may be determined that the current block is divided vertically, and cu_sbt_horizontal_flag may be set to 0. When the angleIdx of the current block belongs to the second group, it may be determined that the current block is divided horizontally, and cu_sbt_horizontal_flag may be set to 1. However, this is merely an example, and the division direction may be determined based on the signaled cu_sbt_horizontal_flag.
[0229] It may be determined that the residual information of the first of two sub-blocks in the current block is not signaled, and the residual information of the second sub-block is signaled. The cu_sbt_pos_flag of the current block may be set to 1 without being signaled. However, this is only an example, and the position of the sub-block whose residual information is signaled may be determined based on the signaled cu_sbt_pos_flag.
[0230] In GPM mode, at least one of information about sub-block transformation may be derived to a specific value without being signaled based on at least one of angleIdx or distanceIdx. As an example, Table 9 shows how information about sub-block transformation is derived based on the group to which angleIdx belongs and distanceIdx according to the division index of the current block.
[0231] [Table 9]
[0232] If angleIdx for the current block belongs to the first or second group (i.e., angleIdx corresponds to an angle having a vertical or horizontal orientation), it may be determined that a sub-block transform is applied to the current block, and cu_sbt_flag may be set to 1. Otherwise, it may be determined that a sub-block transform is not applied to the current block, and cu_sbt_flag may be set to 0.
[0233] When it is determined that a sub-block transform is applied to the current block, the size of the sub-block may be determined based on distanceIdx, which is determined by the partition index of the current block. As an example, when distanceIdx is 0 or 1, it may be determined that the current block is partitioned into two sub-blocks having the same size, and cu_sbt_quad_flag may be set to 0. When distanceIdx is 2 or 3, it may be determined that the current block is partitioned into two sub-blocks having 1 / 4 and 3 / 4 of the size of the current block, and cu_sbt_quad_flag may be set to 1. When distanceIdx is 0 or 1, this may mean that the blended region at the partition boundary is close to half the current block. In such a case, it may be determined that the current block is partitioned into sub-blocks having the same size. On the other hand, when distanceIdx is 2 or 3, this may mean that the blended region at the partition boundary is close to 1 / 4 of the current block. In such a case, it may be decided to divide the current block into two sub-blocks having 1 / 4 and 3 / 4 of the size of the current block.
[0234] The division direction for the sub-block transform may be determined in a direction similar to the division direction of the GPM mode. For example, if the angleIdx of the current block belongs to the first group, it may be determined that the current block is divided vertically, and cu_sbt_horizontal_flag may be set to 0. If the angleIdx of the current block belongs to the second group, it may be determined that the current block is divided horizontally, and cu_sbt_horizontal_flag may be set to 1. However, this is merely an example, and the division direction may be determined based on the signaled cu_sbt_horizontal_flag.
[0235] It may be determined that the residual information of the first of two sub-blocks in the current block is not signaled, and the residual information of the second sub-block is signaled. The cu_sbt_pos_flag of the current block may be set to 1 without being signaled. However, this is only an example, and the position of the sub-block whose residual information is signaled may be determined based on the signaled cu_sbt_pos_flag.
[0236] Alternatively, signaling of residual information for a sub-block with statistically less residual information may be skipped. When the GPM-INTRA based merge mode is applied to the current block, a sub-block that includes a relatively large number of partitions from which motion information is derived may be determined based on the merge mode, and signaling of residual information for the sub-block may be skipped.
[0237] As described above, when the GPM mode is applied to the current block, at least one of the information regarding the sub-block transform may be derived based on at least one of the angleIdx or distanceIdx according to the partition index. Also, when the GPM-INTRA based merge mode is applied to the current block, at least one of the information regarding the sub-block transform may be derived to a specific value without being signaled based on the intra prediction mode for the current block, as in the above-described method, and detailed description thereof will be omitted here.
[0238] It is needless to say that the above-mentioned step S410 may be performed when the current block is coded in the merge mode, and may be omitted when the current block is coded in the skip mode.
[0239] Referring to FIG. 4, the current block can be reconstructed based on the predicted samples and residual samples of the current block (S420).
[0240] Specifically, if the current block is a block coded in merge mode, reconstructed samples of the current block may be generated based on predicted samples and residual samples of the current block. If the current block is a block coded in skip mode, residual samples for the current block are not coded and signaled, so predicted samples of the current block may be set as reconstructed samples of the current block.
[0241] FIG. 7 shows a schematic configuration of a decoding device 300 that performs the video decoding method according to the present disclosure.
[0242] Referring to FIG. 7, the decoding apparatus 300 may include a predicted sample generating unit 700, a residual sample deriving unit 710, and a reconstruction unit 720.
[0243] The prediction sample generator 700 may be configured in the inter predictor 332 of Figure 3. The prediction sample generator 700 may generate a prediction sample of a current block based on a predetermined inter prediction mode.
[0244] Specifically, when the current block is encoded in the merge mode, the prediction sample generation unit 700 may set one of a plurality of inter prediction modes predefined in the video decoding apparatus as the inter prediction mode of the current block. In this case, the plurality of inter prediction modes may include at least one of a sub-block merge mode, a merge mode with motion vector difference (MMVD) mode, a regular merge mode, a combined inter and intra prediction (CIIP) mode, or a GPM mode. This has been described with reference to FIG. 4.
[0245] Alternatively, if the current block is encoded in skip mode, the prediction sample generation unit 700 may generate a prediction sample of the current block based on one of the above-described inter prediction modes. These generated prediction samples may be set as reconstructed samples. However, if the current block is encoded in skip mode, the CIIP mode may be restricted from being applied. Alternatively, similar to the merge mode described above, the CIIP mode may be allowed to be applied to the current block even if the current block is encoded in skip mode. If the current block is encoded in skip mode, the GPM-INTRA-based merge mode may not be allowed.
[0246] The method of generating a prediction sample in a predetermined inter prediction mode has been described with reference to FIG. 4, and a detailed description thereof will be omitted here.
[0247] The residual sample directing unit 710 may be configured in the residual processing unit 320 in Figure 3. The residual sample directing unit 710 may direct a residual sample of a current block based on information about the sub-block transform. Here, the information about the sub-block transform may include at least one of an SBT flag (cu_sbt_flag), an SBT magnitude flag (cu_sbt_quad_flag), an SBT direction flag (cu_sbt_horizontal_flag), or an SBT position flag (cu_sbt_pos_flag), as described with reference to Figure 4.
[0248] Also, as described with reference to FIG. 4, when the CIIP mode is applied to the current block, all or part of the information related to sub-block transform may be derived using characteristics of the CIIP mode. When the CIIP mode is applied to the current block, at least one of the information related to sub-block transform may be derived to a specific value without being signaled, based on at least one of the weights (or weight indexes) in the CIIP mode, the intra prediction mode, the range of the region to which the weights are applied, or the position of the sub-region to which the weights are applied. When the GPM mode is applied to the current block, sub-block transform may be permitted for the current block, and at least one of the information related to sub-block transform may be derived to a specific value without being signaled, based on information related to the GPM for the current block.
[0249] The reconstruction unit 720 may be configured as the adder 340 in Fig. 3. The reconstruction unit 720 may reconstruct the current block based on the predicted samples and residual samples of the current block.
[0250] FIG. 8 illustrates a video encoding method performed by the encoding device according to the present disclosure.
[0251] Referring to FIG. 8, a prediction sample of a current block may be generated based on a predetermined inter-prediction mode (S800).
[0252] When the current block is encoded in the merge mode, one of a plurality of inter prediction modes predefined in the video encoding apparatus may be set as the inter prediction mode of the current block. In this case, the plurality of inter prediction modes may include at least one of a sub-block merge mode, an MMVD mode, a general merge mode, a CIIP mode, or a GPM mode, as described with reference to FIG.
[0253] When the current block is coded in the merge mode, the inter prediction mode of the current block may be sequentially checked according to the priority of the inter prediction modes. For example, it may be first determined whether the inter prediction mode of the current block is the sub-block merge mode. If the inter prediction mode of the current block is determined to be the sub-block merge mode, merge_subblock_flag may be coded as 1. If the inter prediction mode of the current block is not determined to be the sub-block merge mode, merge_subblock_flag may be coded as 0.
[0254] If the inter prediction mode of the current block is not determined to be the sub-block merge mode, it may be determined whether the inter prediction mode of the current block is the general merge mode. If the inter prediction mode of the current block is determined to be the general merge mode, regular_merge_flag is coded to 1, and it may be further determined whether the inter prediction mode of the current block is the MMVD mode. If the inter prediction mode of the current block is determined to be the MMVD mode, mmvd_merge_flag may be coded to 1. If the inter prediction mode of the current block is not determined to be the MMVD mode, mmvd_merge_flag is coded to 0, and the inter prediction mode of the current block may be determined to be the general merge mode.
[0255] If the inter prediction mode of the current block is not determined to be the general merge mode, it may be determined whether the inter prediction mode of the current block is the CIIP mode. If the inter prediction mode of the current block is determined to be the CIIP mode, ciip_flag may be coded to 1. If the inter prediction mode of the current block is not determined to be the CIIP mode, ciip_flag may be coded to 0, and it may be further determined whether the inter prediction mode of the current block is the GPM-INTRA-based merge mode. If the inter prediction mode of the current block is determined to be the GPM-INTRA-based merge mode, gpm_intra_flag may be coded to 1. If the inter prediction mode of the current block is not determined to be the GPM-INTRA-based merge mode, gpm_intra_flag may be coded to 0, and the inter prediction mode of the current block may be determined to be the GPM-INTRA-based merge mode.
[0256] When the current block is encoded in skip mode, a predicted sample of the current block may be generated based on one of the above-mentioned inter prediction modes, and the generated predicted sample may be set as a reconstructed sample. However, when the current block is encoded in skip mode, the CIIP mode may be restricted from being applied. Alternatively, similar to the above-mentioned merge mode, the CIIP mode may be allowed to be applied to the current block even when the current block is encoded in skip mode. This is as described with reference to FIG.
[0257] Intra prediction samples according to the CIIP mode may be derived based on one of predefined intra prediction modes. A candidate list may be constructed to derive the intra prediction mode of the current block, and at least one of a mode index (ciip_mpm_idx) or a group index (ciip_group_idx) for identifying the intra prediction mode of the current block may be coded, as described with reference to FIG.
[0258] When the CIIP mode is applied to the current block, a weighting value for a weighted sum between inter-predicted samples and intra-predicted samples of the current block may be determined. The weighting value may be determined based on at least one of the intra-prediction mode of the current block or the position of the sub-region to which the predicted sample belongs. Alternatively, the video encoding apparatus may determine an optimal weighting value from predefined weighting value candidates and encode a weighting value index indicating the optimal weighting value. The method of determining and applying the weighting value has been described with reference to FIG. 4.
[0259] The information related to the GPM according to the present disclosure may include at least one of information for a GPM-INTRA based merge mode or information for a GPM based merge mode. As described with reference to FIG. 4, the information related to the GPM may include at least one of merge_gpm_partition_idx, gpm_intra_flag0, gpm_intra_mode_idx0, merge_gpm_idx0, gpm_intra_flag1, gpm_intra_mode_idx1, or merge_gpm_idx1.
[0260] It may determine whether the first partition in the current block is predicted based on the intra mode, and gpm_intra_flag0 may be coded based on the determination. If gpm_intra_flag0 is coded to 1, the intra prediction mode for the first partition may be determined, and gpm_intra_mode_idx0 indicating the intra prediction mode may be coded. On the other hand, if gpm_intra_flag0 is coded to 0, a merge candidate for the first partition may be determined from the merge candidate list of the current block, and merge_gpm_idx0 indicating the merge candidate may be coded.
[0261] Similarly, it may determine whether the second partition in the current block is predicted based on the intra mode, and gpm_intra_flag1 may be coded based on the determination. If gpm_intra_flag1 is coded to 1, the intra prediction mode for the second partition may be determined, and gpm_intra_mode_idx1 indicating the intra prediction mode may be coded. On the other hand, if gpm_intra_flag1 is coded to 0, a merge candidate for the second partition may be determined from the merge candidate list of the current block, and merge_gpm_idx1 indicating the merge candidate may be coded.
[0262] The CIIP mode may be allowed when the current block is not coded in skip mode. Similarly, the GPM-INTRA-based merge mode may be restricted to be allowed when the current block is not coded in skip mode. That is, if the current block is coded in skip mode, the GPM-INTRA-based merge mode may not be allowed for the current block. To this end, at least one of the above-mentioned information regarding the GPM may be adaptively signaled based on a flag (cu_skip_flag) indicating whether the current block is coded in skip mode, as described with reference to FIG. 4.
[0263] Referring to FIG. 8, a residual sample of a current block can be derived based on a predicted sample of the current block (S810).
[0264] Residual samples of the current block may be derived by subtracting predicted samples of the current block from original samples of the current block.
[0265] Referring to FIG. 8, information on sub-block transform for encoding residual samples of a current block can be determined (S820).
[0266] The information related to the sub-block transform according to the present disclosure may include at least one of an SBT flag (cu_sbt_flag), an SBT magnitude flag (cu_sbt_quad_flag), an SBT direction flag (cu_sbt_horizontal_flag), or an SBT position flag (cu_sbt_pos_flag), as described with reference to FIG.
[0267] When the CIIP mode is applied to the current block, all or part of the information related to the sub-block transform may be derived using the characteristics of the CIIP mode, thereby reducing the number of bits for signaling the information related to the sub-block transform, as described with reference to FIG.
[0268] When the CIIP mode is applied to the current block, at least one of information regarding sub-block transformation may be induced to a specific value without being signaled based on at least one of a weight (or weight index) in the CIIP mode, an intra prediction mode, a range of the region to which the weight is applied, or a position of the sub-region to which the weight is applied, as described with reference to FIG.
[0269] When the GPM mode is applied to the current block, sub-block transformation may be permitted for the current block. At least one of the information regarding the sub-block transformation may be induced to a specific value without being signaled based on the information regarding the GPM mode for the current block, as described with reference to FIG.
[0270] 8, residual samples of a current block may be encoded to generate residual information (S830). Here, encoding the residual samples may include at least one of 1) transforming the residual samples, 2) quantizing the transform coefficients, or 3) determining residual information related to the quantized transform coefficients.
[0271] 8, residual information of a current block may be coded to generate a bitstream (S840). The bitstream may further include information specifying an inter-prediction mode of the current block. The bitstream may further include all or part of information related to sub-block transformation of the current block.
[0272] FIG. 9 shows a schematic configuration of an encoding device 200 that performs the video encoding method according to the present disclosure.
[0273] Referring to FIG. 9, the encoding apparatus 200 may include a predicted sample generating unit 900, a residual sample deriving unit 910, an SBT information determining unit 920, a residual information generating unit 930, and a residual information encoding unit 940.
[0274] The predicted sample generator 900 may be configured in the inter predictor 220 of Figure 2. The predicted sample generator 900 may generate predicted samples of a current block based on a predetermined inter prediction mode. The method of determining / signaling the inter prediction mode of a current block and the method of generating predicted samples accordingly are the same as those described with reference to Figures 4 and 8.
[0275] The residual sample deriving unit 910, the SBT information determining unit 920, and the residual information generating unit 930 may be configured in the residual processing unit 230 of FIG. 2. The residual sample deriving unit 910 may derive a residual sample of a current block based on a predicted sample of the current block. The SBT information determining unit 920 may determine information related to sub-block transform for encoding a residual sample of the current block. Methods for signaling / deriving information related to sub-block transform are as described with reference to FIGS. 4 and 8. The residual information generating unit 930 may generate residual information by encoding a residual sample of the current block.
[0276] The residual information encoding unit 940 may be configured as the entropy encoding unit 240 of Fig. 2. The residual information encoding unit 940 may encode the residual information of the current block to generate a bitstream.
[0277] In the above-described embodiments, the method is described based on a flowchart with a series of steps or blocks, but the embodiment is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and other steps may be included, or one or more steps of the flowchart may be deleted without affecting the scope of the embodiments of this document.
[0278] The methods according to the embodiments of the present document described above may be implemented in the form of software, and the encoding device and / or decoding device according to the present document may be included in a device that performs video processing, such as a TV, a computer, a smartphone, a set-top box, or a display device.
[0279] When embodiments in this document are embodied as software, the methods described above may be embodied as modules (processes, functions, etc.) that perform the functions described above. The modules may be stored in memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor by various known means. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include read-only memory (ROM), random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described herein may be embodied and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in the figures may be embodied and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for the implementation may be stored on a digital storage medium.
[0280] In addition, the decoding device and encoding device to which the embodiments of the present specification 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 video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top (OTT) video (over-the-top) device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality (VR) device, an augmented reality (AR) device, a video telephone video device, a vehicle terminal (e.g., a vehicle terminal (including an autonomous vehicle), an airplane terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process video signals or data signals. For example, over-the-top (OTT) video (over-the-top) video devices 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), etc.
[0281] In addition, a processing method to which the embodiments of the present specification are applied may be produced in the form of a program executed by a computer and stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiments of the present specification may also be stored in a computer-readable recording medium. The computer-readable recording medium may include any type of storage device or distributed storage device in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable recording medium may also include media embodied in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0282] Furthermore, the embodiments of the present specification may be embodied as a computer program product using program code, which may be executed by a computer according to the embodiments of the present specification. The program code may be stored on a computer-readable carrier.
[0283] FIG. 10 shows an example of a content streaming system to which the embodiments of the present disclosure can be applied.
[0284] Referring to FIG. 8, a content streaming system to which the embodiments of the present specification are applied may broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0285] 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, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.
[0286] The bitstream may be generated by an encoding method or a bitstream generation method to which the embodiments of this specification are applied, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0287] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary 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, which then transmits the multimedia data to the user. In this case, the content streaming system may include a separate control server, which controls commands and responses between devices in the content streaming system.
[0288] The streaming server can receive content from a media storage and / or encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, the streaming server can store the bitstream for a certain period of time to provide a smooth streaming service.
[0289] Examples of the user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, and head-mounted displays (HMDs)), digital TVs, desktop computers, and digital signage.
[0290] Each server in the content streaming system may be operated as a distributed server, in which case data received by each server may be processed in a distributed manner.
[0291] The claims described herein may be combined in various ways. For example, technical features of method claims herein may be combined and embodied as an apparatus, and technical features of apparatus claims herein may be combined and embodied as a method. Furthermore, technical features of method claims herein and technical features of apparatus claims herein may be combined and embodied as an apparatus, and technical features of method claims herein and technical features of apparatus claims herein may be combined and embodied as a method.
Claims
1. generating a predicted sample of a current block based on a predetermined inter-prediction mode; deriving residual samples of the current block based on information about a sub-block transform; reconstructing the current block based on the predicted sample and the residual sample of the current block; At least one of information regarding the sub-block transform (SBT) is derived based on the inter prediction mode; The information about the SBT includes at least one of an SBT flag, an SBT size flag, an SBT direction flag, or an SBT position flag.
2. The video decoding method of claim 1 , wherein the sub-block transformation is allowed for the current block if an inter-prediction mode of the current block is a CIIP mode.
3. The image decoding method of claim 2, wherein, when the inter prediction mode of the current block is a CIIP mode, at least one of the information regarding the SBT is induced without being signaled based on the intra prediction mode for the CIIP mode.
4. The image decoding method of claim 3, wherein the intra prediction mode of the current block is induced to one of one or more candidate modes belonging to a candidate list.
5. The image decoding method of claim 2, wherein, when the inter prediction mode of the current block is a CIIP mode, at least one of the information regarding the SBT is induced without being signaled based on the weight value for the CIIP mode.
6. The image decoding method of claim 5, wherein the weight is determined based on at least one of an intra prediction mode of the current block, a position of a sub-region to which the predicted sample of the current block belongs, or a weight index.
7. The image decoding method of claim 5, wherein the CIIP mode is allowed regardless of a flag indicating whether the current block is a block coded in skip mode.
8. The video decoding method of claim 1 , wherein the sub-block transform is allowed for the current block when an inter prediction mode of the current block is a geometric partition merge mode.
9. 9. The image decoding method of claim 8, wherein, when the inter prediction mode of the current block is a geometric partition merge mode, at least one of the information about the SBT is induced without being signaled based on at least one of the angle of the boundary line due to the geometric partition of the current block or the distance from the center position of the current block to the boundary line.
10. generating a predicted sample of a current block based on a predetermined inter-prediction mode; deriving residual samples of the current block based on predicted samples of the current block; determining information about a sub-block transform for encoding residual samples of the current block; encoding residual samples of the current block to generate residual information; encoding residual information of the current block to generate a bitstream; At least one of information regarding the sub-block transform (SBT) is derived based on the inter prediction mode; The information about the SBT includes at least one of an SBT flag, an SBT size flag, an SBT direction flag, or an SBT position flag.
11. A computer-readable recording medium storing a bitstream generated by the video encoding method of claim 10.
12. obtaining a bitstream for video information, the bitstream being generated by generating a predicted sample of a current block based on a predetermined inter prediction mode, deriving a residual sample of the current block based on the predicted sample of the current block, determining information on a sub-block transform for encoding the residual sample of the current block, encoding the residual sample of the current block to generate residual information, and encoding the residual information of the current block; transmitting data including the bitstream; At least one of information regarding the sub-block transform (SBT) is derived based on the inter prediction mode; The information about the SBT includes at least one of an SBT flag, an SBT size flag, an SBT direction flag, or an SBT position flag.