Image encoding / decoding method and apparatus, and recording medium storing bitstreams
The adaptive interpolation filter technique in video encoding and decoding improves coding efficiency by selecting optimal filters from a candidate list, addressing the challenge of matching video sequence characteristics and reducing complexity in high-resolution video compression.
Patent Information
- Application Number
- PCT/KR2024/004870
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-13
- Filing Date
- 2024-04-11
- Publication Date
- 2024-10-17
AI Technical Summary
Current video encoding and decoding technologies face challenges in efficiently compressing high-resolution video data, particularly in selecting optimal interpolation filters that match the characteristics of video sequences, leading to suboptimal coding efficiency and increased complexity.
The method and device adaptively determine an interpolation filter based on a candidate list, using index information signaled from a bitstream to select from a set of interpolation filter candidates, thereby improving motion compensation and reducing unnecessary signaling and operational complexity.
This approach enhances coding efficiency by selecting interpolation filters that better match video sequence characteristics, improving prediction quality and reducing bit transmission complexity, while preventing excessive smoothing in inter-prediction blocks.
Smart Images

Figure KR2024004870_17102024_PF_FP_ABST
Abstract
Description
Video encoding / decoding method and device, and recording medium storing bitstream
[0001] The present invention relates to a video encoding / decoding method and device, and a recording medium storing a bitstream.
[0002] Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various application fields, and accordingly, high-efficiency image compression technologies are being discussed.
[0003] There are various technologies for image compression, such as inter prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture, intra prediction technology that predicts pixel values included in the current picture using pixel information in the current picture, and entropy encoding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance, and these technologies can be used to effectively compress and transmit or store image data.
[0004] The present disclosure provides a method and device for adaptively determining an interpolation filter based on a candidate list.
[0005] The present disclosure provides a method and device for constructing a candidate list for an adaptive interpolation filter technique.
[0006] The present disclosure provides a method and device for signaling / deriving information for adaptively utilizing an adaptive interpolation filter technique.
[0007] The present disclosure provides a method and device for propagating interpolation filter related information in an adaptive interpolation filter technique.
[0008] A video decoding method and device according to the present disclosure can determine an interpolation filter of a current block, generate a prediction sample of the current block based on the interpolation filter of the current block, and reconstruct the current block based on the prediction sample of the current block. Based on the resolution of a motion vector difference (MVD) for the current block, the interpolation filter can be determined based on a candidate list including a plurality of interpolation filter candidates.
[0009] In the image decoding method and device according to the present disclosure, the current block may be a block encoded in affine AMVP mode or IBC prediction mode.
[0010] In the video decoding method and device according to the present disclosure, the interpolation filter can be determined based on index information signaled from a bitstream, and the index information can specify any one of a plurality of interpolation filter candidates belonging to the candidate list.
[0011] In the video decoding method and device according to the present disclosure, the index information may be signaled based on an AMVR flag of the current block, and the AMVR flag may indicate whether the resolution of the motion vector difference of the current block is 1 / 4-pel.
[0012] In the video decoding method and device according to the present disclosure, the index information may be signaled based on an AMVR flag and an AMVR index of the current block. The AMVR flag may indicate whether the resolution of the motion vector difference of the current block is 1 / 4-pel, and the AMVR index may specify any one of the resolutions of a plurality of motion vector differences available to the current block.
[0013] In the video decoding method and device according to the present disclosure, the interpolation filter may be determined based on index information specifying any one of a plurality of interpolation filter candidates belonging to the candidate list, and the index information may be derived based on the inter prediction mode of the current block.
[0014] In the video decoding method and device according to the present disclosure, the interpolation filter can be determined based on index information specifying any one of a plurality of interpolation filter candidates belonging to the candidate list, and the index information can be derived based on any one of a plurality of merge candidates belonging to the merge candidate list of the current block.
[0015] In the video decoding method and device according to the present disclosure, the index information can be derived based on a merge candidate list in which the plurality of merge candidates are rearranged.
[0016] In the video decoding method and device according to the present disclosure, when the inter prediction mode of the current block corresponds to a pre-defined mode, the interpolation filter may be restricted from being determined from a candidate list including the plurality of interpolation filter candidates.
[0017] The video encoding method and device according to the present disclosure can determine an interpolation filter of a current block and generate a prediction sample of the current block based on the interpolation filter of the current block. Based on the resolution of a motion vector difference (MVD) for the current block, the interpolation filter can be determined based on a candidate list including a plurality of interpolation filter candidates.
[0018] A computer-readable digital storage medium is provided having encoded video / image information stored thereon, which causes a decoding device according to the present disclosure to perform a video decoding method.
[0019] A computer-readable digital storage medium storing video / image information generated by a video encoding method according to the present disclosure is provided.
[0020] A method and device for transmitting video / image information generated by a video encoding method according to the present disclosure are provided.
[0021] According to the present disclosure, encoding efficiency in a motion compensation process can be improved by selectively using an interpolation filter that matches the characteristics of a video sequence based on a candidate list including a plurality of interpolation filter candidates.
[0022] According to the present disclosure, by using interpolation filter candidates having various filter types and filter lengths, an interpolation filter that better suits the characteristics of a video sequence can be selected.
[0023] According to the present disclosure, by limiting the signaling / induction conditions of flags for adaptively utilizing the adaptive interpolation filter technique, unnecessary flag signaling can be eliminated and the complexity of the operation can be controlled.
[0024] According to the present disclosure, the encoding efficiency of inter prediction can be improved by considering or reusing information about a candidate list or interpolation filter used in a pre-encoded / decoded picture, slice, or block in a subsequent encoding / decoding process.
[0025] According to the present disclosure, one of various interpolation filters can be selected using template-based cost without signaling additional bits, thereby performing improved motion compensation and obtaining the effect of bit reduction.
[0026] According to the present disclosure, index information for an adaptive interpolation filter can be effectively signaled or derived.
[0027] According to the present disclosure, by preventing excessive smoothing for inter-prediction blocks, the quality of prediction blocks can be improved and the complexity of the decoder and transmission of bits related to the adaptive interpolation filter can be reduced.
[0028] FIG. 1 illustrates a video / image coding system according to the present disclosure.
[0029] FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video / image signal is performed.
[0030] FIG. 3 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and in which decoding of a video / image signal is performed.
[0031] FIG. 4 illustrates an inter prediction method performed by a decoding device (300) as an embodiment according to the present disclosure.
[0032] FIG. 5 illustrates a schematic configuration of an inter prediction unit (332) that performs an inter prediction method according to the present disclosure.
[0033] FIG. 6 illustrates an inter prediction method performed by an encoding device (200) as an embodiment according to the present disclosure.
[0034] Fig. 7 illustrates a schematic configuration of an inter prediction unit (221) that performs an inter prediction method according to the present disclosure.
[0035] FIG. 8 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.
[0036] The present disclosure may be modified in various ways and encompasses numerous embodiments. Specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present disclosure to specific embodiments, but rather to encompass all modifications, equivalents, and alternatives falling within the spirit and technical scope of the present disclosure. Similar reference numerals have been used to designate similar components throughout the description of each drawing.
[0037] While terms such as "first" and "second" may be used to describe various components, these components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present disclosure, a first component could be referred to as a "second component," and similarly, a second component could also be referred to as a "first component." The term "and / or" includes a combination of multiple related items described herein or any of multiple related items described herein.
[0038] When a component is referred to as being "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that there may be other components intervening. Conversely, when a component is referred to as being "directly connected" or "connected" to another component, it should be understood that there are no other components intervening.
[0039] The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present disclosure. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms "comprise" or "have" indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not preclude the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0040] The present disclosure relates to video / image coding. For example, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the versatile video coding (VVC) standard. In addition, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation of audio video coding standard (AVS2), or the next generation of video / image coding standards (e.g., H.267 or H.268).
[0041] This specification presents various embodiments of video / image coding, and unless otherwise stated, the embodiments may be performed in combination with each other.
[0042] In this specification, a video may refer to a set of images over time. A picture generally refers to a unit representing one image at a specific time point, and a slice / tile is a unit that constitutes part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A tile is a rectangular area consisting of multiple CTUs within a specific tile column and a specific tile row of a picture. A tile column is a rectangular area of CTUs that has a height equal to the height of the picture and a width specified by the syntax requirements of the picture parameter set. A tile row is a rectangular area of CTUs that has a height specified by the picture parameter set and a width equal to the width of the picture. CTUs within a tile are arranged consecutively according to the CTU raster scan, while tiles within a picture may be arranged consecutively according to the tile raster scan. A slice may contain an integer number of complete tiles or an integer number of contiguous complete CTU rows within a picture, which may be exclusively contained within a single NAL unit. Meanwhile, a picture may be divided into two or more subpictures. A subpicture may be a rectangular region of one or more slices within a picture.
[0043] A pixel, or pel, can refer to the smallest unit that constitutes a picture (or image). Additionally, the term "sample" can be used as a counterpart to a pixel. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chrominance component.
[0044] A unit may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. In some cases, the term "unit" may be used interchangeably with terms such as "block" or "area." In general, an MxN block may include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows.
[0045] As used herein, "A or B" can mean "only A," "only B," 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 "only A," "only B," "only C," or "any combination of A, B and C."
[0046] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Accordingly, "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C."
[0047] In this specification, "at least one of A and B" may mean "only A", "only B" or "both A and B". Additionally, in this specification, the expressions "at least one of A or B" or "at least one of A and / or B" may be interpreted identically to "at least one of A and B".
[0048] Additionally, in this specification, “at least one of A, B and C” can mean “only A,” “only B,” “only C,” or “any combination of A, B and C.” Additionally, “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.”
[0049] Additionally, parentheses used herein may mean "for example." Specifically, when "prediction (intra-prediction)" is indicated, "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, even when "prediction (i.e., intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction."
[0050] Technical features individually described in a single drawing in this specification may be implemented individually or simultaneously.
[0051] FIG. 1 illustrates a video / image coding system according to the present disclosure.
[0052] Referring to FIG. 1, a video / image coding system may include a first device (source device) and a second device (receiving device).
[0053] 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 device. The receiving device may include a receiving device, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as 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, and the display unit may be configured as a separate device or an external component.
[0054] A video source may obtain video / images through a process of capturing, synthesizing, or generating video / images. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include one or more cameras, a video / image archive containing previously captured video / images, etc. The video / image generation device may include a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated through a computer, etc., in which case the video / image capture process may be replaced by a process of generating related data.
[0055] An encoding device can encode input video / images. The encoding device can perform a series of procedures, such as prediction, transformation, and quantization, to improve compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0056] The transmission unit can transmit encoded video / image information or data output in the form of a bitstream to the receiving unit of a receiving device via a digital storage medium or 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 transmission unit can include an element for generating a media file via a predetermined file format and an element for transmission via a broadcasting / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.
[0057] The decoding device can decode the video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding device.
[0058] The renderer can render decoded video / images. The rendered video / images can be displayed through the display unit.
[0059] FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video / image signal is performed.
[0060] Referring to FIG. 2, the encoding device (200) may be configured to include an image partitioner (210), a prediction unit (predictor) 220, a residual processor (residual processor) 230, an entropy encoder (entropy encoder) 240, an adder (adder) 250, a filter (filter) 260, and a memory (memory) 270. The prediction unit (220) may include an inter prediction unit (221) and an intra prediction unit (222). The residual processor (230) may include a transformer (transformer) 232, a quantizer (quantizer) 233, a dequantizer (dequantizer) 234, and an inverse transformer (inverse transformer) 235. The residual processing unit (230) may further include a subtractor (231). The addition unit (250) may be called a reconstructor or a recontructed block generator. The image segmentation unit (210), the prediction unit (220), the residual processing unit (230), the entropy encoding unit (240), the addition unit (250), and the filtering unit (260) described above may be configured by one or more hardware components (e.g., an encoding device chipset or processor) according to an embodiment. In addition, the memory (270) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (270) as an internal / external component.
[0061] The image segmentation unit (210) can segment an input image (or picture, frame) input to the encoding device (200) into one or more processing units. For example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively segmented from a coding tree unit (CTU) or a largest coding unit (LCU) according to a QTBTTT (Quad-tree binary-tree ternary-tree) structure.
[0062] For example, a single coding unit may be split into multiple coding units with deeper depths based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied before the quad-tree structure. The coding procedure according to the present specification may be performed based on the final coding unit that is no longer split. In this case, based on coding efficiency according to image characteristics, etc., the largest coding unit may be used directly as the final coding unit, or, if necessary, the coding unit may be recursively split 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.
[0063] 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 each be split or partitioned from the final coding unit described above. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from a transform coefficient.
[0064] The term "unit" may be used interchangeably with terms such as "block" or "area" depending on the case. In general, an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chrominance component. A sample can be used as a term corresponding to a pixel or pel in a picture (or image).
[0065] The encoding device (200) can generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (prediction block, prediction sample array) output from an inter prediction unit (221) or an intra prediction unit (222) from an input video signal (original block, original sample array), and the generated residual signal is transmitted to a conversion unit (232). In this case, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input video signal (original block, original sample array) within the encoding device (200) may be called a subtraction unit (231).
[0066] The prediction unit (220) can perform a prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit (220) can determine whether intra prediction or inter prediction is applied on a current block or CU basis. The prediction unit (220) can generate various information related to prediction, such as prediction mode information, as described later in the description of each prediction mode, and transmit the information to the entropy encoding unit (240). The information related to prediction can be encoded by the entropy encoding unit (240) and output in the form of a bitstream.
[0067] The intra prediction unit (222) can predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The non-directional mode may include at least one of a DC mode or a planar mode. The directional mode may include 33 directional modes or 65 directional modes depending on the degree of detail in the prediction direction. However, this is only an example, and a greater or lesser number of directional modes may be used depending on the settings. The intra prediction unit (222) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0068] The inter prediction unit (221) can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring block can include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The above temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and the reference pictures including the temporal neighboring blocks may be called collocated pictures (colPic). For example, the inter prediction unit (221) may construct a motion information candidate list based on the neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit (221) may use the motion information of the neighboring blocks as the motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the motion vector prediction (MVP) mode, the motion vector of the surrounding blocks is used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0069] The prediction unit (220) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode. In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described herein. Palette mode can be viewed as an example of intra coding or intra prediction. When the palette mode is applied, sample values within a picture can be signaled based on information about the palette table and palette index. The prediction signal generated through the prediction unit (220) can be used to generate a restoration signal or a residual signal.
[0070] The transform unit (232) can apply a transform technique to the residual signal to generate transform coefficients. For example, the transform technique can include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-linear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. CNT refers to a transform obtained based on generating a prediction signal using all previously restored pixels. In addition, the transform process can be applied to a pixel block having a square size and the same size, or can be applied to a block of a non-square variable size.
[0071] The quantization unit (233) quantizes the transform coefficients and transmits them to the entropy encoding unit (240), and the entropy encoding unit (240) can encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream. The information about the quantized transform coefficients can be called residual information. The quantization unit (233) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on the coefficient scan order, and can also generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
[0072] 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 also encode information necessary for video / image restoration (e.g., values of syntax elements, etc.) together or separately from quantized transform coefficients.
[0073] Encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in units of NAL (network abstraction layer) units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. In the present specification, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / image information. The video / image information may be encoded through the above-described encoding procedure and included in the bitstream. The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media, such as a USB, SD, CD, DVD, Blu-ray, HDD, or SSD. The signal output from the entropy encoding unit (240) may be configured as an internal / external element of the encoding device (200) by a transmitting unit (not shown) and / or a storing unit (not shown), or the transmitting unit may be included in the entropy encoding unit (240).
[0074] The quantized transform coefficients output from the quantization unit (233) can be used to generate a prediction signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (234) and the inverse transform unit (235), a residual signal (residual block or residual samples) can be restored. The addition unit (250) can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit (221) or the intra prediction unit (222). When there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as a reconstructed block. The addition unit (250) may be called a restoration unit or a reconstructed block generation unit. The generated restoration signal can be used for intra prediction of the next processing target block within the current picture, and can also be used for inter prediction of the next picture after filtering as described below. Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture encoding and / or restoration process.
[0075] The filtering unit (260) can improve subjective / objective picture quality by applying filtering to the restoration signal. For example, the filtering unit (260) can apply various filtering methods to the restoration picture to generate a modified restoration picture, and store the modified restoration picture in the memory (270), specifically, in the DPB of the memory (270). The various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (260) can generate various information regarding filtering and transmit it to the entropy encoding unit (240). The information regarding filtering can be encoded by the entropy encoding unit (240) and output in the form of a bitstream.
[0076] The modified restored picture transmitted to the memory (270) can be used as a reference picture in the inter prediction unit (221). Through this, when inter prediction is applied, the encoding device can avoid prediction mismatch between the encoding device (200) and the decoding device, and can also improve encoding efficiency.
[0077] The DPB of the memory (270) can store the modified restored picture to be used as a reference picture in the inter prediction unit (221). The memory (270) can store motion information of a block from which motion information is derived (or encoded) within the current picture and / or motion information of blocks within a picture that has already been restored. The stored motion information can be transferred to the inter prediction unit (221) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (270) can store restored samples of restored blocks within the current picture and transfer them to the intra prediction unit (222).
[0078] FIG. 3 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and in which decoding of a video / image signal is performed.
[0079] Referring to FIG. 3, the decoding device (300) may be configured to include an entropy decoder (310), a residual processor (320), a predictor (330), an adder (340), a filter (350), and a memory (360). The predictor (330) may include an inter-prediction unit (332) and an intra-prediction unit (331). The residual processor (320) may include a dequantizer (321) and an inverse transformer (321).
[0080] The entropy decoding unit (310), residual processing unit (320), prediction unit (330), addition unit (340), and filtering unit (350) described above may be configured by a single hardware component (e.g., a decoding device chipset or processor) depending on the embodiment. In addition, the memory (360) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (360) as an internal / external component.
[0081] When a bitstream including video / image information is input, the decoding device (300) can restore the image corresponding to the process in which the video / image information is processed in the encoding device of FIG. 2. For example, the decoding device (300) can derive units / blocks based on block division-related information obtained from the bitstream. The decoding device (300) can perform decoding using a processing unit applied in the encoding device. Accordingly, the processing unit for decoding may be a coding unit, and the coding unit 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 ternary tree structure. One or more transform units may be derived from the coding unit. Then, the restored image signal decoded and output by the decoding device (300) can be reproduced through a reproduction device.
[0082] The decoding device (300) can receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal can be decoded through the entropy decoding unit (310). For example, the entropy decoding unit (310) can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding device can decode the picture further based on the information on the parameter set and / or the general constraint information. The signaling / received information and / or syntax elements described later in this specification can be decoded through the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit (310) can decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of syntax elements required for image restoration and the quantized values of transform coefficients for residuals. More specifically, the CABAC entropy decoding method receives a bin corresponding to each syntax element in the bitstream, determines a context model using information of the syntax element to be decoded and decoding information of the surrounding and decoding target blocks or information of symbols / bins decoded in the previous step, and predicts the occurrence probability of the bin according to the determined context model to perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element.At this time, the CABAC entropy decoding method can update the context model using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information regarding prediction among the information decoded by the entropy decoding unit (310) is provided to the prediction unit (inter prediction unit (332) and intra prediction unit (331)), and residual values on which entropy decoding is performed by the entropy decoding unit (310), i.e., quantized transform coefficients and related parameter information, can be input to the residual processing unit (320). The residual processing unit (320) can derive a residual signal (residual block, residual samples, residual sample array). In addition, information regarding filtering among the information decoded by the entropy decoding unit (310) can be provided to the filtering unit (350). Meanwhile, a receiving unit (not shown) that receives a signal output from an encoding device may be further configured as an internal / external element of a decoding device (300), or the receiving unit may be a component of an entropy decoding unit (310).
[0083] Meanwhile, a decoding device according to the present specification may be called a video / video / picture decoding device, and the decoding device may be divided into an information decoding device (video / video / picture information decoding device) and a sample decoding device (video / video / picture sample decoding device). The information decoding device may include the entropy decoding unit (310), and the sample decoding device may include at least one of the inverse quantization unit (321), the inverse transformation unit (322), the addition unit (340), the filtering unit (350), the memory (360), the inter prediction unit (332), and the intra prediction unit (331).
[0084] The inverse quantization unit (321) can inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit (321) can rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scanning order performed in the encoding device. The inverse quantization unit (321) can perform inverse quantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain transform coefficients.
[0085] In the inverse transform unit (322), the transform coefficients are inversely transformed to obtain a residual signal (residual block, residual sample array).
[0086] The prediction unit (320) can perform a prediction on the current block and generate a predicted block including prediction samples for the current block. The prediction unit (320) can determine whether intra-prediction or inter-prediction is applied to the current block based on the information regarding the prediction output from the entropy decoding unit (310), and can determine a specific intra / inter-prediction mode.
[0087] The prediction unit (320) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit (320) can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode. In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described herein. Palette mode can be viewed as an example of intra coding or intra prediction. When palette mode is applied, information about the palette table and palette index may be included and signaled in the video / image information.
[0088] The intra prediction unit (331) can predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The intra prediction unit (331) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0089] The inter prediction unit (332) can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit (332) can construct a motion information candidate list based on the neighboring blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction can be performed based on various prediction modes, and information about the prediction can include information indicating an inter prediction mode for the current block.
[0090] The addition unit (340) can generate a restoration signal (restored picture, restoration block, restoration sample array) by adding the acquired residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-prediction unit (332) and / or intra-prediction unit (331)). When there is no residual for the block to be processed, such as when skip mode is applied, the prediction block can be used as the restoration block.
[0091] The addition unit (340) may be referred to as a restoration unit or restoration block generation unit. The generated restoration signal may be used for intra prediction of the next processing target block within the current picture, may be output after filtering as described below, or may be used for inter prediction of the next picture. Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture decoding process.
[0092] The filtering unit (350) can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit (350) can apply various filtering methods to the restored picture to generate a modified restored picture, and transmit the modified restored picture to the memory (360), specifically, to the DPB of the memory (360). The various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0093] The (corrected) reconstructed picture stored in the DPB of the memory (360) can be used as a reference picture in the inter prediction unit (332). The memory (360) can store motion information of a block from which motion information is derived (or decoded) in the current picture and / or motion information of blocks in a picture that has already been reconstructed. The stored motion information can be transferred to the inter prediction unit (332) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (360) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (331).
[0094] In this specification, the embodiments described in the filtering unit (260), the inter prediction unit (221), and the intra prediction unit (222) of the encoding device (200) can be applied to the filtering unit (350), the inter prediction unit (332), and the intra prediction unit (331) of the decoding device (300) in the same or corresponding manner, respectively.
[0095] FIG. 4 illustrates an inter prediction method performed by a decoding device (300) as an embodiment according to the present disclosure.
[0096] Referring to Fig. 4, the interpolation filter of the current block can be determined (S400).
[0097] The interpolation filter of the current block can be derived from a candidate list including a plurality of pre-defined interpolation filter candidates in the decoding device. The filter types of the plurality of pre-defined interpolation filter candidates can include at least one of a DCT-based interpolation filter (DCT-IF), a Gaussian interpolation filter (Gaussian IF), or a sharpening interpolation filter (Sharpening IF). Even if they have the same filter type, interpolation filters having different numbers of filter taps and / or filter coefficients can be included in the candidate list.
[0098] Specifically, the candidate list may include at least one of an 8-tap DCT-IF, a 12-tap DCT-IF, an 8-tap Gaussian interpolation filter, or a 12-tap Gaussian interpolation filter. For example, the candidate list may be defined as shown in Table 1 below.
[0099] Idx interpolation filter candidate 0DCT-IF, 8-tap 1DCT-IF, 12-tap 2Gaussian interpolation filter, 8-tap 3Gaussian interpolation filter, 12-tap
[0100] Table 1 defines interpolation filter candidates by index (Idx). However, the index in Table 1 is only for distinguishing the interpolation filter candidates and does not limit the position of the interpolation filter candidate corresponding to the index. That is, the position of the interpolation filter candidate in the candidate list may be different from Table 1. In addition, the candidate list may further include at least one of a 4-tap DCT-IF, a 4-tap Gaussian interpolation filter, a 16-tap DCT-IF, a 16-tap Gaussian interpolation filter, a 4-tap sharpening interpolation filter, an 8-tap sharpening interpolation filter, a 12-tap sharpening interpolation filter, or a 16-tap sharpening interpolation filter.
[0101] Below, we will look specifically at a method for determining the interpolation filter of the current block based on the above candidate list.
[0102] Cost-based decision-making method
[0103] From the decoding device perspective, a cost can be calculated for each interpolation filter candidate in the candidate list. Based on the interpolation filter candidates, one interpolation filter candidate with the minimum cost can be selected. The selected interpolation filter candidate can be set as the interpolation filter of the current block.
[0104] Here, the cost may be calculated for all interpolation filter candidates in the candidate list, or only for the top N interpolation filter candidates in the candidate list. N is an integer of 2, 3, 4, or more, and may be smaller than the total number of interpolation filter candidates in the candidate list.
[0105] The above cost can be calculated as the sum of absolute difference (SAD) between one or more samples in the template area of the current block and one or more samples in the template area of the reference block.
[0106] Specifically, if the current block is encoded with unidirectional prediction, the current block may have a reference block in either the L0 or L1 direction. In this case, the SAD may be calculated based on a template region adjacent to the reference block in the L0 or L1 direction and a template region adjacent to the current block. The samples of the template region may be generated by applying a corresponding interpolation filter candidate to the restored samples of the reference picture.
[0107] Alternatively, if the current block is encoded with bidirectional prediction, the current block may have a reference block in the L0 direction and a reference block in the L1 direction. In this case, the SAD may be calculated based on a template region adjacent to the reference block in the L0 direction, a template region adjacent to the reference block in the L1 direction, and a template region adjacent to the current block. The samples of the template regions in the L0 and L1 directions may be generated by applying corresponding interpolation filter candidates to the reconstructed samples of the reference pictures in the L0 and L1 directions, respectively. For example, the SAD may be calculated as in the following mathematical expression 1.
[0108] [Mathematical Formula 1]
[0109] tP = (tP0 + tP1 + offset) >> (shift)
[0110] SAD = ∑|tC - tP|
[0111] In mathematical expression 1, tP0 and tP1 represent sample values of the template area in the L0 direction and sample values of the template area in the L1 direction, respectively, and tC may represent sample values of the template area of the current block. Offset and shift may each be set to 1.
[0112] Alternatively, when a weighted sum is applied between reference blocks in the L1 and L1 directions, the weights for the weighted sum can be applied equally to tP0 and tP1, and the offset and shift can be set based on the sum of the weights. For example, when the sum of the weights is 16, the offset can be set to (1 << (1+3)) and the shift can be set to (1+4).
[0113] As described above, the final template area can be generated by taking the average or weighted sum between the sample values of the template area in the L0 direction and the sample values of the template area in the L1 direction, and the SAD between the template area of the current block and the final template area can be calculated.
[0114] The above SAD can be modified and applied in various ways, such as MRSAD (Mean Reduced SAD), High-frequency removed SAD, etc. More specifically, MRSAD can be calculated as shown in the following mathematical expression 2.
[0115] [Equation 2]
[0116] tP = (tP0 + tP1 + offset) >> shift
[0117] delta = (∑ (tC - tP)) / (W x H)
[0118] SAD = ∑ | (tC - tP) - delta |
[0119] In Equation 2, tP0, tP1, tC, offset, and shift are the same as those discussed in Equation 1, and any duplicate explanations will be omitted here. W and H can represent the width and height, respectively, of the template area used to calculate the cost.
[0120] Additionally, the high-frequency removed SAD can be calculated as shown in the following mathematical expression 3.
[0121] [Equation 3]
[0122] tmp = (2 * tC) - tP0 - tP1
[0123] SAD = ∑| tmp |
[0124] In mathematical expression 3, tP0, tP1 and tC are the same as those discussed in mathematical expression 1, and any duplicate explanations will be omitted here.
[0125] Alternatively, even if the current block is encoded with bidirectional prediction, the SAD may be derived based on a template region adjacent to the reference block in either the L0 or L1 direction and a template region adjacent to the current block. Either of the L0 or L1 directions may be a direction predefined identically for the encoding device and the decoding device.
[0126] The template area for calculating the above cost may be a peripheral area adjacent to the current block and / or the reference block. For example, the template area may include at least one of the upper peripheral area, the left peripheral area, the upper left peripheral area, the lower left peripheral area, or the upper right peripheral area.
[0127] The template region may be a region that is identically predefined for the encoding device and the decoding device to calculate the cost. Alternatively, the template region may be variably determined based on information specifying the location of the template region. In this case, the information specifying the location of the template region may be signaled through a bitstream. Alternatively, the location and / or size of the template region may be determined based on at least one of whether the current block is located at the boundary of at least one of a picture, a slice, a tile, or a coding tree unit, the size of the current block (e.g., width, height, a ratio of width and height, a product of width and height), the shape of the current block, the segmentation type of the current block, the prediction mode of a neighboring region, or the availability of a neighboring region.
[0128] For example, if the current block is located at the top boundary of a coding tree unit, at least one of the top peripheral region, the top left peripheral region, or the top right peripheral region of the current block may not be referenced for cost calculation. If the width of the current block is greater than the height, the top peripheral region may be referenced for cost calculation, and the left peripheral region may not be referenced for cost calculation. Conversely, if the width of the current block is less than the height, the left peripheral region may be referenced for cost calculation, and the top peripheral region may not be referenced for cost calculation. If the current block is generated through horizontal block division, the top peripheral region may not be referenced for cost calculation. Conversely, if the current block is generated through vertical block division, the left peripheral region may not be referenced for cost calculation. If the peripheral region of the current block is encoded in intra mode, the peripheral region may not be referenced for cost calculation. However, this is not limited thereto, and the peripheral region may be referenced for cost calculation regardless of the prediction mode of the peripheral region.
[0129] The template region may be composed of M sample lines. Here, M may be an integer of 1, 2, 3, 4, or more. The number of sample lines constituting the template region may be the same regardless of the location of the aforementioned peripheral region, or may vary depending on the location of the peripheral region. The cost may be calculated based on all samples belonging to the template region. Alternatively, the cost may be calculated using only sample lines at a predetermined location within the template region. Alternatively, the cost may be calculated based on all or some samples belonging to a sample line at the predetermined location. The locations of sample lines and / or samples used for cost calculation within the template region may be determined based on at least one of whether the current block is located at the boundary of a picture, slice, tile, or coding tree unit, the size of the current block, the shape of the current block, the partitioning type of the current block, the prediction mode of the peripheral region, or the availability of the peripheral region. Alternatively, information for specifying the locations of sample lines for cost calculation may be signaled through a bitstream.
[0130] Decision method based on rearranged candidate list and index information
[0131] From the decoding device's perspective, a cost can be calculated for each interpolation filter candidate in the candidate list. The cost is the same as discussed in the "cost-based decision method" described above, and a detailed description thereof will be omitted here.
[0132] Interpolation filter candidates in the candidate list can be reordered in ascending order of the calculated cost. The interpolation filter of the current block can be determined based on the reordered candidate list and index information. The index information is encoded based on the reordered candidate list and can be signaled via a bitstream. The index information can indicate any one of the interpolation filter candidates in the reordered candidate list.
[0133] For example, assume that the candidate list includes three interpolation filter candidates, i.e., first to third interpolation filter candidates, and that indices 0 to 2 are assigned to the first to third interpolation filter candidates, respectively.
[0134] For the first to third interpolation filter candidates, costs of cost0 to cost2 can be calculated, respectively. At this time, when the calculated costs are sorted in ascending order, it is assumed that they are sorted in the order of cost1, cost2, and cost0. In this case, when the interpolation filter candidates are rearranged in ascending order of costs, the candidate list can be rearranged in the order of the second interpolation filter candidate, the third interpolation filter candidate, and the first interpolation filter candidate. In other words, an index of 0 can be assigned to the second interpolation filter candidate, an index of 1 can be assigned to the third interpolation filter candidate, and an index of 2 can be assigned to the first interpolation filter candidate.
[0135] The value of the above index information is an integer in the range of 0 to 2, and an interpolation filter candidate indicated by the index information can be set as the interpolation filter of the current block. That is, when the value of the above index information is 0, a second interpolation filter candidate assigned with an index of 0 in the reordered candidate list can be set as the interpolation filter of the current block. Alternatively, when the value of the above index information is 1, a third interpolation filter candidate assigned with an index of 1 in the reordered candidate list can be set as the interpolation filter of the current block. Alternatively, when the value of the above index information is 2, a first interpolation filter candidate assigned with an index of 2 in the reordered candidate list can be set as the interpolation filter of the current block.
[0136] Alternatively, assume that the candidate list includes five interpolation filter candidates, i.e., the first to fifth interpolation filter candidates, and the first to fifth interpolation filter candidates are each assigned indices of 0 to 4.
[0137] For the first to fifth interpolation filter candidates, costs of cost0 to cost4 can be calculated, respectively. At this time, when the calculated costs are sorted in ascending order, it is assumed that they are sorted in the order of cost1, cost2, cost0, cost3, and cost4. In this case, when the interpolation filter candidates are rearranged in ascending order of the costs, the candidate list can be rearranged in the order of the second interpolation filter candidate, the third interpolation filter candidate, the first interpolation filter candidate, the fourth interpolation filter candidate, and the fifth interpolation filter candidate. In other words, an index of 0 can be assigned to the second interpolation filter candidate, an index of 1 can be assigned to the third interpolation filter candidate, an index of 2 can be assigned to the first interpolation filter candidate, an index of 3 can be assigned to the fourth interpolation filter candidate, and an index of 4 can be assigned to the fifth interpolation filter candidate.
[0138] The above index information may be encoded for the top N interpolation filter candidates in the reordered candidate list. If N is 3, the value of the index information is an integer in the range of 0 to 2, and may indicate any one of the top three interpolation filter candidates in the reordered candidate list. The interpolation filter candidate indicated by the index information may be set as the interpolation filter of the current block. However, this is only an example, and N may be 2 or 4.
[0139] Alternatively, costs may be calculated for the top N interpolation filter candidates among the five interpolation filter candidates in the above candidate list, and no costs may be calculated for the remaining interpolation filter candidates. For convenience of explanation, it is assumed below that N is 3, but the present invention is not limited thereto, and N may be 2 or 4.
[0140] For the top three interpolation filter candidates, i.e., the first to third interpolation filter candidates, costs of cost0 to cost2 can be calculated respectively. At this time, when the calculated costs are sorted in ascending order, it is assumed that they are sorted in the order of cost1, cost2, and cost0. In this case, when the interpolation filter candidates are rearranged in ascending order of the costs, the candidate list can be rearranged in the order of the second interpolation filter candidate, the third interpolation filter candidate, the first interpolation filter candidate, the fourth interpolation filter candidate, and the fifth interpolation filter candidate.
[0141] The above index information may be encoded for the top N interpolation filter candidates for which the cost has been calculated. If N is 3, the value of the index information is an integer in the range of 0 to 2, and may indicate any one of the top three interpolation filter candidates in the reordered candidate list. The interpolation filter candidate indicated by the above index information may be set as the interpolation filter of the current block.
[0142] Decision-making method based on index information
[0143] In the present embodiment, the index information may be encoded based on an index of a candidate list that is identically pre-defined for the encoding device and the decoding device, rather than a rearranged candidate list. In this case, the process of calculating a cost for each interpolation filter candidate in the candidate list and the process of rearranging the interpolation filter candidates in the candidate list based on the calculated cost may be omitted. The index information may indicate any one of a plurality of interpolation filter candidates in the candidate list. The interpolation filter candidate indicated by the index information may be set as the interpolation filter of the current block.
[0144] An interpolation filter of a current block can be determined by selectively using any one of a plurality of pre-defined decision methods in a decoding device. The plurality of pre-defined decision methods may include at least one of the aforementioned cost-based decision method, the reordered candidate list and index information-based decision method, or the index information-based decision method. For the selective use, information specifying any one of the plurality of decision methods may be used. Here, the information may be explicitly signaled through a bitstream, or may be implicitly derived based on parameters of the current block. The parameters may include at least one of position, size, shape, partition type, component type, type of inter prediction mode, or whether the block is encoded with bidirectional prediction.
[0145] The interpolation filter determined through the above-described method can be applied identically to generate a reference block in the L0 direction and a reference block in the L1 direction of the current block. Alternatively, as described below, the interpolation filter can be determined separately for each reference picture list, and in this case, the above-described method can be applied identically / similarly, and duplicate descriptions will be omitted. Here, the reference picture list can include reference picture list 0 (L0) and reference picture list 1 (L1).
[0146] Cost-based decision-making method
[0147] For each of the L0 and L1 directions, costs corresponding to interpolation filter candidates in the candidate list can be calculated. Specifically, for the L0 direction, the cost can be calculated based on the template region adjacent to the reference block in the L0 direction and the template region adjacent to the current block. The interpolation filter candidate with the minimum cost among the calculated costs can be set as the interpolation filter for generating the reference block in the L0 direction of the current block. Similarly, for the L1 direction, the cost can be calculated based on the template region adjacent to the reference block in the L1 direction and the template region adjacent to the current block. The interpolation filter candidate with the minimum cost among the calculated costs can be set as the interpolation filter for generating the reference block in the L1 direction of the current block. This allows different interpolation filters to be used for the L0 and L1 directions of the current block.
[0148] The above cost can be defined as SAD as described above and can be calculated as shown in the following mathematical expression 4. However, this is only an example, and it can be modified and applied in various ways, such as the above-mentioned MRSAD (Mean Reduced SAD) and High-frequency removed SAD.
[0149] [Equation 4]
[0150] SAD_L0 = ∑| tC - tP0 |
[0151] SAD_L1 = ∑| tC - tP1 |
[0152] In Equation 4, SAD_L0 and SAD_L1 represent the SAD in the L0 direction and the SAD in the L1 direction, respectively. tP0 represents a sample value of the template area in the L0 direction, and tP1 represents a sample value of the template area in the L1 direction. tC represents a sample value of the template area of the current block.
[0153] Alternatively, the interpolation filter for the L1 direction may be determined based on the pre-determined L0 direction interpolation filter through the above-described method. For example, as in the following mathematical expression 5, the corrected sample value (tmp) of the template region of the current block may be calculated based on the sample value (tC) of the template region of the current block and the sample value (tP0) of the template region in the L0 direction. Here, tP0 may be generated based on the pre-determined L0 direction interpolation filter. The SAD (SAD_L1) in the L1 direction may be calculated based on the difference between the corrected sample value (tmp) and the sample value (tP1) of the template region in the L1 direction. The sample value (tP1) of the template region in the L1 direction may be calculated for each interpolation filter candidate belonging to the candidate list. Similarly, the SAD in the L1 direction (SAD_L1) is also calculated for each interpolation filter candidate in the candidate list, and the interpolation filter candidate with the minimum SAD_L1 among them can be set as the interpolation filter in the L1 direction of the current block.
[0154] [Equation 5]
[0155] tmp = (2tC - tP0)
[0156] SAD_L1 = ∑| tmp - tP1 |
[0157] Alternatively, for the L0 direction, costs corresponding to interpolation filter candidates in the candidate list may be calculated, and the interpolation filter candidate with the minimum cost among them may be set as the interpolation filter in the L0 direction of the current block. Meanwhile, the interpolation filter candidates in the candidate list may be rearranged in ascending order of the costs calculated for the L0 direction. For the L1 direction, costs corresponding to the top N interpolation filter candidates in the rearranged candidate list may be calculated, and costs may not be calculated for the remaining interpolation filter candidates. The interpolation filter candidate with the minimum cost among the costs corresponding to the top N interpolation filter candidates may be set as the interpolation filter in the L1 direction of the current block.
[0158] Decision method based on rearranged candidate list and index information
[0159] As previously discussed, for each of the L0 and L1 directions, costs corresponding to all or some of the interpolation filter candidates in the candidate list can be calculated.
[0160] The interpolation filter candidates in the candidate list can be reordered in ascending order of the costs calculated in the L0 direction. Similarly, the interpolation filter candidates in the candidate list can be reordered in ascending order of the costs calculated in the L1 direction.
[0161] An interpolation filter for the current block can be determined based on the reordered candidate list and index information. The index information is encoded based on the reordered candidate list and can be signaled via the bitstream. The index information can indicate one of the interpolation filter candidates in the reordered candidate list.
[0162] For example, the index information may be signaled for the L0 direction and the L1 direction, respectively. That is, the interpolation filter in the L0 direction may be determined based on the reordered candidate list in the L0 direction and the index information in the L0 direction. Here, the index information in the L0 direction is encoded based on the index of the reordered candidate list in the L0 direction and may indicate any one of the interpolation filter candidates in the reordered candidate list in the L0 direction. Similarly, the interpolation filter in the L1 direction may be determined based on the reordered candidate list in the L1 direction and the index information in the L1 direction. Here, the index information in the L1 direction is encoded based on the index of the reordered candidate list in the L1 direction and may indicate any one of the interpolation filter candidates in the reordered candidate list in the L1 direction.
[0163] Alternatively, the index information may indicate one of the index sets pre-defined for the decoding device. Each index set may be composed of an index indicating an interpolation filter in the L0 direction and an index indicating an interpolation filter in the L1 direction. Here, the index information may be encoded based on the index of a rearranged candidate list. If the candidate list consists of three interpolation filter candidates, the index sets may be defined as shown in Table 2 below.
[0164] Idx012345678CandIdx_L0001101222CandIdx_L1010122012
[0165] Referring to Table 2, Idx represents index information, and CandIdx_L0 and CandIdx_L1 may represent indices indicating an interpolation filter in the L0 direction and an interpolation filter in the L1 direction, respectively. When the candidate list consists of three interpolation filter candidates, up to nine index sets may be defined. Based on the index information, one of the nine index sets is indicated, and based on the rearranged candidate lists for each of the L0 and L1 directions and the indicated index sets, an interpolation filter may be determined for each of the L0 and L1 directions of the current block.
[0166] For example, if the value of the signaled index information is 1, the index set of (0, 1) can be selected. In this case, the interpolation filter candidate with an index of 0 in the reordered candidate list for the L0 direction can be set as the interpolation filter in the L0 direction of the current block, and the interpolation filter candidate with an index of 1 in the reordered candidate list for the L1 direction can be set as the interpolation filter in the L1 direction of the current block.
[0167] Decision-making method based on index information
[0168] Index information may be signaled for each of the L0 and L1 directions of the current block. In the present embodiment, the index information may be encoded based on an index of a candidate list that is identically pre-defined for the encoding device and the decoding device, rather than a rearranged candidate list. In this case, for each of the L0 and L1 directions, the process of calculating costs corresponding to interpolation filter candidates belonging to the candidate list and the process of rearranging the interpolation filter candidates in the candidate list based on the calculated costs may be omitted.
[0169] Specifically, the interpolation filter in the L0 direction can be determined based on a pre-defined candidate list and index information in the L0 direction. Here, the index information in the L0 direction can indicate any one of the interpolation filter candidates in the pre-defined candidate list. For example, an interpolation filter candidate having an index with the same value as the index information in the L0 direction can be set as the interpolation filter in the L0 direction of the current block.
[0170] Similarly, the interpolation filter in the L1 direction can be determined based on a pre-defined candidate list and index information in the L1 direction. Here, the index information in the L1 direction can indicate another one of the interpolation filter candidates in the pre-defined candidate list. For example, an interpolation filter candidate having an index of the same value as the index information in the L1 direction can be set as the interpolation filter in the L1 direction of the current block. However, when the value of the index information in the L1 direction is greater than or equal to the value of the index information in the L0 direction, an interpolation filter candidate corresponding to a value obtained by adding 1 to the value of the index information in the L1 direction can be set as the interpolation filter in the L1 direction of the current block.
[0171] Based on the above candidate list, the interpolation filter of the current block can be adaptively determined, and this will be referred to as an adaptive interpolation filter technique hereinafter. The adaptive interpolation filter technique can be adaptively used based on a predetermined variable (UseAdaptiveFilter). Here, UseAdaptiveFilter can indicate whether the adaptive interpolation filter technique is used for the current block. For example, if UseAdaptiveFilter is 1, the adaptive interpolation filter technique can be used for the current block. In this case, the interpolation filter of the current block can be determined based on the candidate list through the above-described method. On the other hand, if UseAdaptiveFilter is 0, the adaptive interpolation filter technique may not be used for the current block. In this case, the interpolation filter of the current block can be determined as a default interpolation filter that is identically pre-defined for the encoding device and the decoding device. The default interpolation filter can be any one of the interpolation filter candidates included in the candidate list. For example, the default interpolation filter may be identical to the interpolation filter candidate with an index of 0 in the candidate list. Alternatively, the default interpolation filter may be defined separately from the candidate list and may not be among the interpolation filter candidates in the candidate list.
[0172] UseAdaptiveFilter can be derived based on flag information (adaptive_filter_flag) signaled at the coding unit (CU) level. For example, if the value of adaptive_filter_flag is 1, UseAdaptiveFilter can be derived as 1, and if the value of adaptive_filter_flag is 0, UseAdaptiveFilter can be derived as 0.
[0173] The above adaptive_filter_flag may be signaled via a bitstream when a predetermined condition is satisfied. The predetermined condition may include at least one of conditions 1 to 4 described below. The above adaptive_filter_flag may be limited to be signaled when all of the predetermined conditions are satisfied, or may be signaled when any one of the predetermined conditions is satisfied.
[0174] The above adaptive_filter_flag may be signaled based on whether an adaptive interpolation filter technique is allowed (condition 1). Whether an adaptive interpolation filter technique is allowed may be determined based on a flag signaled in at least one unit among a video sequence, a picture, a sub-picture, a slice, or a coding tree unit. If the adaptive interpolation filter technique is allowed according to the flag, the adaptive_filter_flag may be signaled, and if not, the adaptive_filter_flag may not be signaled.
[0175] For example, adaptive_filter_flag can be signaled as shown in Table 3 below.
[0176] if( sps_adaptive_filter_enabled_flag ) adaptive_if_flag[ x0 ][ y0 ]ae(v)
[0177] Referring to Table 3, sps_adaptive_filter_enabled_flag can indicate whether the adaptive interpolation filter technique is allowed for the video sequence. Alternatively, sps_adaptive_filter_enabled_flag can also indicate whether adaptive_if_flag exists in the coding unit syntax. According to Table 3, when sps_adaptive_filter_enabled_flag is 1, adaptive_if_flag is signaled, and when sps_adaptive_filter_enabled_flag is 0, adaptive_if_flag is not signaled. When adaptive_if_flag is not signaled, adaptive_if_flag can be driven to 0.
[0178] The above adaptive_filter_flag may be signaled based on whether a predetermined quantization parameter is greater than a threshold (condition 2). The quantization parameter may mean a quantization parameter (SliceQpY) of a slice to which the current block belongs. Alternatively, the quantization parameter may mean a quantization parameter of the current block, which is a coding unit, or a quantization parameter of a block decoded before the current block. The threshold may be a value predefined identically in the encoding device and the decoding device. When the quantization parameter is less than or equal to the threshold, adaptive_if_flag may be signaled, and when the quantization parameter is greater than the threshold, adaptive_if_flag may not be signaled. When the adaptive_if_flag is not signaled, adaptive_if_flag may be induced to 0.
[0179] For example, adaptive_filter_flag can be signaled as shown in Table 4 below.
[0180] if(SliceQp Y<= 33)adaptive_if_flag[x0][y0]ae(v)
[0181] Referring to Table 4, adaptive_if_flag can be signaled based on the quantization parameter (SliceQpY) of the slice to which the current block belongs. That is, if SliceQpY is less than or equal to 33, adaptive_if_flag is signaled, and if SliceQpY is greater than 33, adaptive_if_flag is not signaled. The threshold of 33 in Table 4 is only an example, and thresholds of 28, 38, or 43 can also be used.
[0182] The adaptive_filter_flag may be signaled based on whether the size of the current block is smaller than a threshold size (condition 3). Here, the size of the current block may be expressed by at least one of the width, the height, the sum of the width and the height, the product of the width and the height, the minimum / maximum value of the width and the height, or the ratio of the width and the height of the current block. The threshold size may be a size that is predefined equally for the encoding device and the decoding device. The threshold size may be an integer of 16, 32, 64, 128, 256, or more. If the size of the current block is larger than or equal to the threshold size, the adaptive_filter_flag may be signaled, and if the size of the current block is smaller than the threshold size, the adaptive_filter_flag may not be signaled. If the above adaptive_filter_flag is not signaled, adaptive_filter_flag can be driven to 0.
[0183] For example, adaptive_filter_flag can be signaled as shown in Table 5 below.
[0184] if(cbWidth * cbHeight >= 256 ) adaptive_if_flag[ x0 ][ y0 ]ae(v)
[0185] Referring to Table 5, cbWidth and cbHeight can represent the width and height of the current block, respectively. If the product of the width and height of the current block is greater than or equal to a threshold of 256, the adaptive_filter_flag is signaled, and if the product of the width and height of the current block is less than the threshold of 256, the adaptive_filter_flag is not signaled. Alternatively, if the width and height of the current block are greater than or equal to a threshold of 16, the adaptive_filter_flag may be signaled, and if either the width or height of the current block is less than the threshold of 16, the adaptive_filter_flag may not be signaled.
[0186] The above adaptive_filter_flag may be signaled based on whether the inter prediction mode of the current block is a preset mode (condition 4). Here, the preset mode may be at least one of a merge mode, an AMVP mode, an affine merge mode, an affine AMVP mode, or a sub-block-based merge mode. If the inter prediction mode of the current block corresponds to a preset mode, the adaptive_filter_flag may be signaled, and if not, the adaptive_filter_flag may not be signaled. If the adaptive_filter_flag is not signaled, the adaptive_filter_flag may be set to 0.
[0187] For example, adaptive_filter_flag can be signaled as shown in Table 6 below.
[0188] if(inter_affine_flag[ x0 ][ y0 ] == 0)adaptive_if_flag[ x0 ][ y0 ]ae(v)
[0189] In Table 6, inter_affine_flag can indicate whether the inter prediction mode of the current block is the affine AMVP mode (i.e., whether affine model-based motion compensation is used for the current block). For example, if inter_affine_flag is 0, this may indicate that the inter prediction mode of the current block is not the affine AMVP mode. In this case, the inter prediction mode of the current block may be the merge mode, the AMVP mode, the affine merge mode, or the sub-block-based merge mode. On the other hand, if inter_affine_flag is 1, this may indicate that the inter prediction mode of the current block is the affine AMVP mode. Referring to Table 6, when inter_affine_flag is 0, the adaptive_filter_flag is signaled, and when inter_affine_flag is 1, the adaptive_filter_flag is not signaled.
[0190] The above UseAdaptiveFilter may be implicitly derived based on whether a predetermined condition is satisfied, without signaling the adaptive_filter_flag. Here, the predetermined condition may include at least one of the conditions 1 to 4 described above. For example, UseAdaptiveFilter may be derived as 1 if all of the predetermined conditions are satisfied, and may be derived as 0 if any of the predetermined conditions are not satisfied. Alternatively, UseAdaptiveFilter may be derived as 1 if any of the predetermined conditions are satisfied, and may be derived as 0 if any of the predetermined conditions are not satisfied.
[0191] Alternatively, whether to use the adaptive interpolation filter technique may be determined on a per-picture and / or per-slice basis. For this purpose, at least one of pic_adaptive_if_flag on a per-picture basis or slice_adaptive_if_flag on a per-slice basis may be signaled. Here, pic_adaptive_if_flag may indicate whether the adaptive interpolation filter technique is used for the picture to which the current block belongs, and slice_adaptive_if_flag may indicate whether the adaptive interpolation filter technique is used for the slice to which the current block belongs.
[0192] For example, when pic_adaptive_if_flag is 1, it may indicate that an adaptive interpolation filter technique is used for all coding blocks belonging to the picture, and when pic_adaptive_if_flag is 0, it may indicate that an adaptive interpolation filter technique is not used for at least one coding block belonging to the picture. Alternatively, when pic_adaptive_if_flag is 1, it may indicate that an adaptive interpolation filter technique is used for at least one coding block belonging to the picture, and when pic_adaptive_if_flag is 0, it may indicate that an adaptive interpolation filter technique is not used for all coding blocks belonging to the picture.
[0193] For example, when slice_adaptive_if_flag is 1, it may indicate that an adaptive interpolation filter technique is used for all coding blocks belonging to the slice, and when slice_adaptive_if_flag is 0, it may indicate that an adaptive interpolation filter technique is not used for at least one coding block belonging to the slice. Alternatively, when slice_adaptive_if_flag is 1, it may indicate that an adaptive interpolation filter technique is used for at least one coding block belonging to the slice, and when slice_adaptive_if_flag is 0, it may indicate that an adaptive interpolation filter technique is not used for all coding blocks belonging to the slice.
[0194] The above pic_adaptive_if_flag and / or slice_adaptive_if_flag may be signaled if the adaptive interpolation filter technique is allowed for the video sequence according to sps_adaptive_filter_enabled_flag as seen in Table 3.
[0195] Even if the above pic_adaptive_if_flag or slice_adaptive_if_flag indicates that the adaptive interpolation filter technique is used, it is possible to determine whether the adaptive interpolation filter technique is used for each coding block. Here, whether the adaptive interpolation filter technique is used can be determined based on the aforementioned UseAdaptiveFilter. As described above, UseAdaptiveFilter can be derived based on the adaptive_filter_flag that is explicitly signaled, or can be implicitly derived based on whether a predetermined condition is satisfied. The condition here can include at least one of the aforementioned conditions 2 to 4.
[0196] In the case of existing video codecs, adaptive motion vector resolution (AMVR) is applied and a separate interpolation filter is used in response to cases where the phase is half-pel, but the adaptive interpolation filter technique according to the present disclosure can be applied regardless of whether adaptive motion vector resolution is used and / or whether the phase is half-pel.
[0197] The aforementioned candidate list may be any one selected from a plurality of candidate lists predefined identically for the encoding device and the decoding device. The number of predefined candidate lists for the decoding device is L, and each candidate list may include M interpolation filter candidates. Here, L may be an integer of 2, 3, 4, or more, and M may be an integer of 1, 2, 3, 4, or more. The predefined candidate lists may include the same number of interpolation filter candidates. Alternatively, the number of interpolation filter candidates belonging to one of the predefined candidate lists may be different from the number of interpolation filter candidates belonging to another of the predefined candidate lists.
[0198] For example, the pre-defined candidate lists may include three candidate lists, namely, a first candidate list, a second candidate list, and a third candidate list. Here, the first candidate list may include at least one of an 8-tap Gaussian interpolation filter, a 12-tap Gaussian interpolation filter, an 8-tap sharpening interpolation filter, or a 12-tap sharpening interpolation filter. The second candidate list may include at least one of an 8-tap DCT-IF, a 12-tap DCT-IF, an 8-tap sharpening interpolation filter, or a 12-tap sharpening interpolation filter. The third candidate list may include at least one of an 8-tap DCT-IF, a 12-tap DCT-IF, an 8-tap Gaussian interpolation filter, or a 12-tap Gaussian interpolation filter. However, this is only an example and is not limited thereto. That is, at least one of the interpolation filter candidates of the first candidate list may have a filter length of 4-tap, 6-tap, 10-tap, 14-tap or 16-tap. At least one of the interpolation filter candidates of the second candidate list may have a filter length of 4-tap, 6-tap, 10-tap, 14-tap or 16-tap. At least one of the interpolation filter candidates of the third candidate list may have a filter length of 4-tap, 6-tap, 10-tap, 14-tap or 16-tap. Alternatively, one candidate list may include interpolation filter candidates having the same filter length and may not include interpolation filter candidates having different filter lengths. A single candidate list may include interpolation filter candidates with the same filter type and may not include interpolation filter candidates with different filter types.
[0199] Table 7 below illustrates a case where the number of predefined candidate lists is three, and the candidate lists contain four interpolation filter candidates. According to Table 7, each candidate list may contain heterogeneous filter types and interpolation filter candidates of the same filter type with different filter lengths.
[0200] Idx1st candidate list2nd candidate list3rd candidate list0Gaussian IF, 8-tapDCT-IF, 8-tapDCT-IF, 8-tap1Gussian IF, 12-tapDCT-IF, 12-tapDCT-IF, 12-tap2Sharpening IF, 8-tapSharpening IF, 8-tapGaussian IF, 8-tap3Sharpening IF, 12-tapSharpening IF, 12-tapGussian IF, 12-tap
[0201] At the unit of a picture and / or slice, index information specifying one of the plurality of pre-defined candidate lists may be signaled based on a flag indicating whether an adaptive interpolation filter technique is used. For example, if an adaptive interpolation filter technique is used for the corresponding picture according to pic_adaptive_if_flag, the index information may be additionally signaled. Alternatively, if an adaptive interpolation filter technique is used for the corresponding slice according to slice_adaptive_if_flag, the index information may be additionally signaled. One candidate list specified based on the index information may be shared by coding blocks belonging to the corresponding picture or slice.
[0202] A flag indicating whether the above adaptive interpolation filter technique is used and a single index information that integrates the above index information may be signaled. For example, when the value of the index information is 0, a candidate list consisting of a default interpolation filter (hereinafter referred to as a default candidate list) may be selected. The default candidate list may be any one of the multiple pre-defined candidate lists described above. The default candidate list is defined separately from the multiple pre-defined candidate lists and may not belong to the multiple pre-defined candidate lists. On the other hand, when the value of the index information is greater than 0, a candidate list corresponding to the index information may be selected from among the multiple pre-defined candidate lists.
[0203] Based on at least one of whether the picture and / or slice is a P slice, whether the picture and / or slice is a B slice, or the distance between the current picture and the reference picture, one of the pre-defined plurality of candidate lists may be implicitly determined. For example, if the distance between the current picture and the reference picture is greater than a pre-defined threshold distance equally for the encoding device and the decoding device, the third candidate list may be selected, otherwise, the second candidate list may be selected. Here, the distance between the current picture and the reference picture may be defined as a POC difference (diffPOC) between the current picture and the reference picture. The diffPOC may be defined as at least one of a first POC difference between the current picture and the reference picture in the L0 direction, a second POC difference between the current picture and the reference picture in the L1 direction, a minimum value of the first POC difference and the second POC difference, or a maximum value of the first POC difference and the second POC difference. The above threshold distance may be an integer of 2, 3, 4, or more.
[0204] Based on the quantization parameters of the picture and / or slice, one of a plurality of predefined candidate lists can be implicitly determined. For example, if the quantization parameter (sliceQP) of the slice to which the current block belongs is less than a predetermined threshold, the first candidate list can be selected, and otherwise, the second candidate list can be selected.
[0205] As a unit of coding units, any one of a plurality of pre-defined candidate lists may be selectively utilized. To this end, index information specifying any one of a plurality of pre-defined candidate lists may be signaled as a unit of coding units. Here, the coding unit may refer to a coding unit that is no longer divided into smaller coding units (i.e., the current block), a coding tree unit to which the current block belongs, or a coding unit of a predetermined size that shares the index information.
[0206] Considering at least one of the inter prediction mode of the current block or the size of the current block, any one of a plurality of pre-defined candidate lists may be selected. In the case of the affine mode, since the affine model-based motion compensation is performed in units of small blocks such as 4x4 blocks, an interpolation filter with a relatively short filter length can be used. On the other hand, in the case of general inter modes such as the merge mode and the AMVP mode, since the translational motion compensation is performed, an interpolation filter with a relatively long filter length can be used. In addition, in the case of the general inter mode, an interpolation filter with different filter lengths and / or filter types can be used depending on the size of the current block.
[0207] For example, if the inter prediction mode of the current block is affine mode, the candidate list for the current block may include at least one of a 6-tap DCT-IF, an 8-tap DCT-IF, a 6-tap Gaussian interpolation filter, or an 8-tap Gaussian interpolation filter. However, this is merely an example, and at least one of the interpolation filter candidates in the candidate list may have a 4-tap filter length. If the inter prediction mode of the current block is general inter mode, the candidate list for the current block may include at least one of an 8-tap DCT-IF, a 12-tap DCT-IF, an 8-tap sharpening interpolation filter, or a 12-tap sharpening interpolation filter. However, this is merely an example, and at least one of the interpolation filter candidates in the candidate list may have a 6-tap or 10-tap filter length. Alternatively, if the inter prediction mode of the current block is a general inter mode, the candidate list for the current block may include at least one of a 12-tap DCT-IF, a 12-tap Gaussian interpolation filter, or a 12-tap sharpening interpolation filter. However, this is merely an example, and at least one of the interpolation filter candidates in the candidate list may have a filter length of 10-tap, 14-tap, or 16-tap.
[0208] Meanwhile, if the size of the current block is less than or equal to a predetermined threshold size, the candidate list for the current block may include at least one of an 8-tap DCT-IF, a 12-tap DCT-IF, an 8-tap sharpening interpolation filter, or a 12-tap sharpening interpolation filter. However, this is merely an example, and at least one of the interpolation filter candidates in the candidate list may have a filter length of 6-tap or 10-tap. On the other hand, if the size of the current block is greater than the threshold size, the candidate list for the current block may include at least one of a 12-tap DCT-IF, a 12-tap Gaussian interpolation filter, or a 12-tap sharpening interpolation filter. However, this is only an example, and at least one of the interpolation filter candidates in the candidate list may have a filter length of 10-tap, 14-tap, or 16-tap. The size of the current block may be expressed by at least one of the width, height, sum of width and height, product of width and height, minimum / maximum of width and height, or ratio of width and height of the current block. The threshold size may be an integer of 16, 32, 64, 128, 256, 512, or higher.
[0209] Alternatively, a single candidate list may include interpolation filter candidates with the same filter length and not include interpolation filter candidates with different filter lengths. A single candidate list may include interpolation filter candidates with the same filter type and not include interpolation filter candidates with different filter types.
[0210] Table 8 below shows a list of candidates based on the interpolation mode and size of the current block. This is only an example, and conditions regarding block size, filter type, filter length, and number of interpolation filter candidates may be changed.
[0211] indexAffine modeGeneral inter mode(WxH <= 512)General inter mode(WxH > 512)0DCT-IF, 6-tapDCT-IF, 8-tapDCT-IF, 12-tap1DCT-IF, 8-tapDCT-IF, 12-tapGaussian IF, 12-tap2Gaussian IF, 6-tapSharpening IF, 8-tapSharpening IF, 12-tap3Gaussian IF, 8-tapSharpening IF, 12-tap-
[0212] Through the above-described embodiment, the interpolation filter of the luminance component of the current block can be determined, and the interpolation filter of the chrominance component of the current block can be determined based on the interpolation filter pre-determined for the luminance component. For example, the interpolation filter of the chrominance component can have the same filter type as the interpolation filter of the luminance component. The filter length of the interpolation filter of the chrominance component can be half of the filter length of the interpolation filter of the luminance component. Alternatively, through the above-described embodiment, the interpolation filter of the chrominance component can be determined independently from the interpolation filter of the luminance component.
[0213] As described above, in determining the interpolation filter of the current block, at least one of index information (hereinafter referred to as “first index information”) that specifies one of a plurality of interpolation filter candidates belonging to one candidate list or index information (hereinafter referred to as “second index information”) that specifies one of a plurality of pre-defined candidate lists may be used. Such index information may be stored in the current block so as to be propagated to blocks decrypted after the current block. For example, the first index information may be stored in the current block for propagation to the next block, and the second index information may not be stored in the current block. Alternatively, the first index information may not be stored in the current block, and the second index information may be stored in the current block for propagation to the next block. Alternatively, both the first and second index information may be stored in the current block for propagation to the next block.
[0214] If the interpolation filter of the current block is determined based on the reordered candidate list, the first index information may be encoded based on the index of the reordered candidate list. This may be different from the index assigned to the corresponding interpolation filter candidate within the unreordered candidate list. Here, the corresponding interpolation filter candidate may mean an interpolation filter candidate having the same index as the first index information within the reordered candidate list. If the first index information encoded based on the index of the reordered candidate list is stored as is and propagated to the next block, the next block may use a filter other than the interpolation filter used in the block in which the first index information is stored. Therefore, separately from the first index information, the index assigned to the corresponding interpolation filter candidate within the unreordered candidate list may be stored for propagation to the next block.
[0215] As previously discussed, the interpolation filter can be determined on a per-picture and / or per-slice basis, and in this case, the interpolation filter for the current picture / slice can be determined by considering the interpolation filter of the picture / slice decoded before the current picture / slice.
[0216] For example, the interpolation filter can be propagated in units of pictures and / or slices. The interpolation filter of the currently decoded picture / slice can be determined by considering the interpolation filter most frequently used in the previously decoded picture / slice. In units of pictures and / or slices, when any one of a plurality of candidate lists is selected, the plurality of candidate lists for the current picture / slice can be reconstructed including the candidate list selected in the previous picture / slice. In units of pictures and / or slices, when any one of a plurality of interpolation filter candidates belonging to a candidate list is selected, the candidate list for the current picture / slice can be reconstructed including the interpolation filter candidate selected in the previous picture / slice. In units of coding units, when any one of a plurality of candidate lists is selected, the plurality of candidate lists for the current block can be reconstructed including the candidate list selected in the previous picture / slice. In units of coding units, when any one of multiple interpolation filter candidates belonging to one candidate list is selected, the candidate list for the current block can be reconstructed including the interpolation filter candidate selected in the previous picture / slice.
[0217] The adaptive interpolation filter technique described above can be applied based on the motion vector resolution of the current block.
[0218] For example, if adaptive motion vector resolution (AMVR) is applied to the current block, the interpolation filter of the current block may be determined based on the adaptive interpolation filter technique. If adaptive motion vector resolution (AMVR) is not applied to the current block, the interpolation filter of the current block may be determined using a predefined default interpolation filter.
[0219] Alternatively, if the variable (AmvrShift) for the current block indicates half-pel (1 / 2-pel), the interpolation filter of the current block may be determined based on an adaptive interpolation filter technique. If the variable (AmvrShift) for the current block does not indicate half-pel (1 / 2-pel), the interpolation filter of the current block may be determined by a pre-defined default interpolation filter. The variable (AmvrShift) may represent the resolution of the motion vector difference of the current block, or may be used to adjust the resolution of the pre-induced motion vector difference for the current block.
[0220] Alternatively, the resolutions of the plurality of pre-defined or available motion vector differences can be divided into a plurality of groups. The resolutions of the plurality of motion vector differences can include at least two of 1 / 16-pel, 1 / 8-pel, 1 / 4-pel, 1 / 2-pel, 1-pel, or 4-pel. A first group of the plurality of groups can include at least one of 1 / 16-pel, 1 / 8-pel, 1 / 2-pel, 1-pel, or 4-pel. A second group of the plurality of groups can include at least one of the resolutions of the motion vector differences that do not belong to the first group. The second group can include 1 / 4-pel. When the resolution of the motion vector difference indicated by the variable (AmvrShift) for the current block belongs to the first group, the interpolation filter of the current block can be determined based on an adaptive interpolation filter technique. If the resolution of the motion vector difference indicated by the variable (AmvrShift) for the current block does not belong to the first group, the interpolation filter of the current block can be determined by a pre-defined default interpolation filter.
[0221] The above variable (AmvrShift) can be derived based on at least one of an AMVR flag (amvr_flag), an AMVR index (amvr_precision_idex), or an inter prediction mode of the current block. Here, the AMVR flag can specify a resolution of a motion vector difference. When the value of the AMVR flag is 0, the resolution of the motion vector difference can be derived by 1 / 4-pel. When the value of the AMVR flag is 1, the resolution of the motion vector difference can be derived based on the AMVR index. The AMVR flag can be signaled through the bitstream when a motion vector difference exists for the current block. However, when the AMVR flag is not signaled through the bitstream, the AMVR flag can be derived based on whether the inter prediction mode of the current block is an IBC prediction mode. That is, if the inter prediction mode of the current block is the IBC prediction mode, the AMVR flag can be induced to 1, and if the inter prediction mode of the current block is not the IBC prediction mode, the AMVR flag can be induced to 0. The AMVR index can specify any one of the resolutions of multiple motion vector differences available for each inter prediction mode of the current block. The AMVR index can be signaled through the bitstream when the value of the AMVR flag is 1.
[0222] For example, the variable (AmvrShift) can be derived as shown in Table 9 below.
[0223] amvr_flagamvr_precision_idxAmvrShiftinter_affine_flag[ sample)-2 (1 / 4 luma sample)100 (1 / 16 luma sample)4 (1 luma sample)3 (1 / 2 luma sample)114 (1 luma sample)6 (4 luma samples)4 (1 luma sample)12--6 (4 luma samples)
[0224] If the inter prediction mode of the current block is the affine AMVP mode (i.e., inter_affine_flag=1), the resolutions of the motion vector differences available to the current block may include 1 / 4-pel, 1 / 16-pel, and 1-pel. In this case, if the value of the AMVR flag (amvr_flag) is 0, the variable (AmvrShift) may be derived as 2, which indicates that the resolution of the motion vector difference for the current block is determined as 1 / 4-pel. If the value of the AMVR flag (amvr_flag) is 1, the variable (AmvrShift) may be derived as 0 or 4 based on the AMVR index (amvr_precision_idx). At this time, a variable (AmvrShift) of 0 indicates that the resolution of the motion vector difference for the current block is determined as 1 / 16-pel, and a variable (AmvrShift) of 4 indicates that the resolution of the motion vector difference for the current block is determined as 1-pel.
[0225] When the inter prediction mode of the current block is the IBC prediction mode (MODE_IBC), the resolution of the motion vector difference available to the current block may include 1-pel and 4-pel. When the value of the AMVR flag (amvr_flag) is 1, the variable (AmvrShift) may be derived as 4 or 6 based on the AMVR index (amvr_precision_idx). At this time, the variable (AmvrShift) being 4 indicates that the resolution of the motion vector difference for the current block is determined as 1-pel, and the variable (AmvrShift) being 6 indicates that the resolution of the motion vector difference for the current block is determined as 4-pel.
[0226] If the inter prediction mode of the current block is neither the affine AMVP mode (i.e., inter_affine_flag=0) nor the IBC prediction mode, the resolutions of the motion vector differences available to the current block may include 1 / 4-pel, 1 / 2-pel, 1-pel, and 4-pel. In this case, if the value of the AMVR flag (amvr_flag) is 0, the variable (AmvrShift) may be derived as 2, which indicates that the resolution of the motion vector difference for the current block is determined as 1 / 4-pel. If the value of the AMVR flag (amvr_flag) is 1, the variable (AmvrShift) may be derived as 3, 4, or 6 based on the AMVR index (amvr_precision_idx). Here, the 3-bit variable (AmvrShift) indicates that the resolution of the motion vector difference for the current block is determined as 1 / 2-pel, the 4-bit variable (AmvrShift) indicates that the resolution of the motion vector difference for the current block is determined as 1-pel, and the 6-bit variable (AmvrShift) indicates that the resolution of the motion vector difference for the current block is determined as 4-pel.
[0227] The adaptive interpolation filter technique can also be applied to the affine AMVP mode. To this end, in addition to the 1 / 16-pel, 1 / 4-pel, and 1-pel modes, a 1 / 2-pel mode can be additionally applied. The variable (AmvrShift) for the affine AMVP mode can be defined as shown in Table 10 below.
[0228] amvr_flagamvr_precision_idxAmvrShiftinter_affine_flag[ sample)-2 (1 / 4 luma sample)100 (1 / 16 luma sample)4 (1 luma sample)3 (1 / 2 luma sample)114 (1 luma sample)6 (4 luma samples)4 (1 luma sample)123 (1 / 2 luma sample)-6 (4 luma samples)
[0229] Referring to Table 10, when the inter prediction mode of the current block is the affine AMVP mode (i.e., inter_affine_flag=1), the resolutions of the motion vector differences available to the current block may include 1 / 4-pel, 1 / 16-pel, 1-pel, and 1 / 2-pel. In this case, when the value of the AMVR flag (amvr_flag) is 0, the variable (AmvrShift) may be derived as 2. This indicates that the resolution of the motion vector difference for the current block is determined as 1 / 4-pel. When the value of the AMVR flag (amvr_flag) is 1, the variable (AmvrShift) may be derived as 0, 4, or 3 based on the AMVR index (amvr_precision_idx). Specifically, when the AMVR index is 0, the variable (AmvrShift) may be derived as 0. A variable (AmvrShift) equal to 0 can indicate that the resolution of the motion vector difference for the current block is determined as 1 / 16-pel. If the AMVR index is 1, the variable (AmvrShift) can be derived as 4. A variable (AmvrShift) equal to 4 can indicate that the resolution of the motion vector difference for the current block is determined as 1-pel. If the AMVR index is 2, the variable (AmvrShift) can be derived as 3. A variable (AmvrShift) equal to 3 can indicate that the resolution of the motion vector difference for the current block is determined as 1 / 2-pel.
[0230] Additionally, the bits of the AMVR index (amvr_precision_idx) for the affine AMVP mode can be allocated as shown in Table 11 below.
[0231] amvr_flagamvr_precision_idxBit allocation0-010 (1 / 16 luma sample)1011 (1 luma sample)11012 (1 / 2 luma sample)111
[0232] The bit allocation in Table 11 is only an example and can be changed depending on the occurrence probability of 1 / 16-pel, 1 / 4-pel, 1 / 2-pel, and 1-pel. For example, if the occurrence probability of 1 / 2-pel is higher than that of 1 / 16-pel, the mapping relationship between the AMVR index and the variable (AmvrShift) can be defined as in Table 12 below, and in this case, the bit allocation of the AMVR index can be as in Table 13 below.
[0233] amvr_flagamvr_precision_idxAmvrShiftinter_affine_flag[ sample)-2 (1 / 4 luma sample)103 (1 / 2 luma sample)4 (1 luma sample)3 (1 / 2 luma sample)110 (1 / 16 luma sample)6 (4 luma samples)4 (1 luma sample)124 (1 luma sample)-6 (4 luma samples)
[0234] Referring to Table 12, when the inter prediction mode of the current block is the affine AMVP mode (i.e., inter_affine_flag=1), the resolutions of the motion vector differences available to the current block may include 1 / 4-pel, 1 / 16-pel, 1-pel, and 1 / 2-pel. In this case, when the value of the AMVR flag (amvr_flag) is 0, the variable (AmvrShift) may be derived as 2. This indicates that the resolution of the motion vector difference for the current block is determined as 1 / 4-pel. When the value of the AMVR flag (amvr_flag) is 1, the variable (AmvrShift) may be derived as 3, 0, or 4 based on the AMVR index (amvr_precision_idx). Specifically, when the AMVR index is 0, the variable (AmvrShift) may be derived as 3. A variable (AmvrShift) of 3 can indicate that the resolution of the motion vector difference for the current block is determined as 1 / 2-pel. If the AMVR index is 1, the variable (AmvrShift) can be derived as 0. A variable (AmvrShift) of 0 can indicate that the resolution of the motion vector difference for the current block is determined as 1 / 16-pel. If the AMVR index is 2, the variable (AmvrShift) can be derived as 4. A variable (AmvrShift) of 4 can indicate that the resolution of the motion vector difference for the current block is determined as 1-pel.
[0235] amvr_flagamvr_precision_idxBit allocation0-010 (1 / 16 luma sample)11011 (1 luma sample)11112 (1 / 2 luma sample)10
[0236] Adaptive interpolation filtering techniques can also be applied to IBC prediction mode. For this purpose, in addition to integer pel-level motion compensation, fractional pel-level motion compensation can be allowed for IBC prediction mode. For example, in addition to 1-pel and 4-pel, at least one of 1 / 2-pel or 1 / 4-pel can be additionally applied for IBC prediction mode.
[0237] If the inter prediction mode of the current block is the IBC prediction mode, a motion vector difference can be derived for the current block. If the derived motion vector difference is not 0, an AMVR flag can be signaled for the current block. However, if the AMVR flag is not signaled through the bitstream, the value of the AMVR flag can be derived as 0. If the value of the AMVR flag is 1, an AMVR index can be signaled. Based on at least one of the AMVR flag or the AMVR index, a resolution of the motion vector difference of 1 / 4-pel or 1 / 2-pel can be applied for the current block. A variable (AmvrShift) for the IBC prediction mode can be defined as shown in Table 14 below.
[0238] amvr_flagamvr_precision_idxAmvrShiftinter_affine_flag[ x0 ][ y0 ] = = 1CuPredMode[ chType ][ x0 ][ y0 ] = = MODE_IBC )inter_affine_flag[ x0 ][ y0 ] = =0 &&CuPredMode[ chType ][ x0 ][ y0 ] != MODE_IBC0-2 (1 / 4 front sample)2 (1 / 4 front sample)2 (1 / 4 front sample)100 (1 / 16 front sample)4 (1 front sample)3 (1 / 2 front sample)114 (1 front sample)6 (4 front samples)4 (1 front sample)12-3 (1 / 2 front sample)6 (4 front samples)
[0239] Referring to Table 14, when the inter prediction mode of the current block is the IBC prediction mode (MODE_IBC), the resolution of the motion vector difference available to the current block may include 1 / 4-pel, 1-pel, 4-pel, and 1 / 2-pel. In this case, when the value of the AMVR flag (amvr_flag) is 0, the variable (AmvrShift) may be derived as 2. This indicates that the resolution of the motion vector difference for the current block is determined as 1 / 4-pel. When the value of the AMVR flag (amvr_flag) is 1, the variable (AmvrShift) may be derived as 4, 6, or 3 based on the AMVR index (amvr_precision_idx). Specifically, when the AMVR index is 0, the variable (AmvrShift) may be derived as 4. A variable (AmvrShift) of 4 can indicate that the resolution of the motion vector difference for the current block is determined by 1-pel. When the AMVR index is 1, the variable (AmvrShift) can be derived as 6. A variable (AmvrShift) of 6 can indicate that the resolution of the motion vector difference for the current block is determined by 4-pel. When the AMVR index is 2, the variable (AmvrShift) can be derived as 3. A variable (AmvrShift) of 3 can indicate that the resolution of the motion vector difference for the current block is determined by 1 / 2-pel.
[0240] Additionally, the bits of the AMVR index (amvr_precision_idx) for the IBC prediction mode can be allocated as shown in Table 15 below.
[0241] amvr_flagamvr_precision_idxBit allocation0- (1 / 4 luma sample)010 (1 luma sample)1011 (4 luma samples)11012 (1 / 2 luma sample)111
[0242] The bit allocation in Table 15 is only an example and can be changed depending on the occurrence probability of 1 / 4-pel, 1-pel, 4-pel, and 1 / 2-pel. For example, if the occurrence probability of integer pel is higher than that of prime pel, the mapping relationship between AMVR index and variable (AmvrShift) can be defined as in Table 16 below, and in this case, the bit allocation of AMVR index can be as in Table 17 below.
[0243] amvr_flagamvr_precision_idxAmvrShiftinter_affine_flag[ sample)4 (1 luma sample)2 (1 / 4 luma sample)100 (1 / 16 luma sample)6 (4 luma samples)3 (1 / 2 luma sample)114 (1 luma sample)2 (1 / 4 luma sample)4 (1 luma sample)12-3 (1 / 2 luma sample)6 (4 luma samples)
[0244] Referring to Table 16, when the inter prediction mode of the current block is the IBC prediction mode (MODE_IBC), the resolution of the motion vector difference available to the current block may include 1 / 4-pel, 1-pel, 4-pel, and 1 / 2-pel. In this case, when the value of the AMVR flag (amvr_flag) is 0, the variable (AmvrShift) may be derived as 4. This indicates that the resolution of the motion vector difference for the current block is determined as 1-pel. When the value of the AMVR flag (amvr_flag) is 1, the variable (AmvrShift) may be derived as 6, 2, or 3 based on the AMVR index (amvr_precision_idx). Specifically, when the AMVR index is 0, the variable (AmvrShift) may be derived as 6. A variable (AmvrShift) of 6 can indicate that the resolution of the motion vector difference for the current block is determined as 4-pel. When the AMVR index is 1, the variable (AmvrShift) can be derived as 2. A variable (AmvrShift) of 2 can indicate that the resolution of the motion vector difference for the current block is determined as 1 / 4-pel. When the AMVR index is 2, the variable (AmvrShift) can be derived as 3. A variable (AmvrShift) of 3 can indicate that the resolution of the motion vector difference for the current block is determined as 1 / 2-pel.
[0245] amvr_flagamvr_precision_idxBit allocation0- (1 luma sample)010 (4 luma samples)1011 (1 / 4 luma sample)11012 (1 / 2 luma sample)111
[0246] If the variable (AmvrShift) is induced to 3 (i.e., the resolution of the motion vector difference is 1 / 2-pel), the interpolation filter of the current block can be determined based on the adaptive interpolation filter technique. If the variable (AmvrShift) is not induced to 3, the interpolation filter of the current block can be determined by the default interpolation filter.
[0247] Alternatively, even if the variable (AmvrShift) is not derived to 3, the adaptive interpolation filter technique can be adaptively used based on the aforementioned variable (UseAdaptiveFilter). Alternatively, even if the variable (AmvrShift) is not derived to 3, the interpolation filter can be adaptively determined based on the aforementioned rearranged candidate list and index information. Alternatively, even if the variable (AmvrShift) is not derived to 3, the interpolation filter can be determined by selectively using any one of the aforementioned multiple candidate lists. Alternatively, even if the variable (AmvrShift) is not derived to 3, the interpolation filter can be adaptively determined for each reference picture list. The method for determining the interpolation filter for each reference picture list is as described above, and a duplicate description will be omitted here. Depending on whether the resolution of the motion vector difference for the current block is 1 / 2-pel, the candidate list for the current block can be configured differently. That is, depending on whether the resolution of the motion vector difference for the current block is 1 / 2-pel, at least one of the number of interpolation filter candidates in the candidate list, the tap size of the interpolation filter candidates, or the filter coefficients of the interpolation filter candidates may be different.
[0248] When an adaptive interpolation filter technique is applied, the interpolation filter of the current block can be determined from a candidate list including a plurality of interpolation filter candidates. The plurality of interpolation filter candidates can include at least one of the following interpolation filter candidates.
[0249] FilterIdx 0 (6-tap): [0, 3, 9, 20, 20, 9, 3, 0]
[0250] FilterIdx 1 (6-tap): [0, -3, 4, 31, 31, 4, -3, 0]
[0251] FilterIdx 2 (8-tap): [-1, 4, -11, 40, 40, -11, 4, -1]
[0252] FilterIdx 3 (8-tap): [3, 6, 10, 13, 13, 10, 6, 3]
[0253] FilterIdx 4 (8-tap): [-1, -1, 9, 25, 25, 9, -1, -1]
[0254] Depending on the inter prediction mode of the current block, the candidate list may be configured differently. That is, depending on the inter prediction mode of the current block, at least one of the number of interpolation filter candidates in the candidate list, the tap size of the interpolation filter candidates, or the filter coefficients of the interpolation filter candidates may be different. For example, the candidate list for the general inter mode may be different from the candidate list for the affine AMVP mode. The candidate list for the general inter mode may be different from the candidate list for the IBC prediction mode. The candidate list for the affine AMVP mode may be different from the candidate list for the IBC prediction mode.
[0255] According to the present disclosure, when the resolution of the motion vector difference is 1 / 2-pel, the decoder can select any one of various interpolation filters using a template-based cost without receiving additional bits, thereby performing improved motion compensation as well as obtaining the effect of bit reduction.
[0256] Interpolation filters can also be determined by signaling index information. Here, the index information can identify one of multiple interpolation filter candidates in a candidate list. Below, we will examine the signaling method for index information in detail.
[0257] For example, index information can be signaled in the coding unit syntax of the current block. The index information can be signaled based on the inter prediction mode of the current block. For example, the index information can be signaled when the inter prediction mode of the current block is AMVP mode. The index information can be signaled when the inter prediction mode of the current block is not merge mode. The index information can be signaled when the inter prediction mode of the current block is not IBC prediction mode. The index information can be signaled as shown in Table 18 below.
[0258] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...general_merge_flag[ x0 ][ y0 ]ae(v)if( general_merge_flag[ x0 ][ y0 ] )merge_data( ][ y0 ] = = MODE_IBC ) {...} else {adaptive_if_idx[ x0 ][ y0 ]ae(v)}...}
[0259] According to Table 18, the index information (adaptive_if_idx) can be signaled when the inter prediction mode of the current block is not the merge mode (general_merge_flag=0). In addition, the index information (adaptive_if_idx) can be signaled when the inter prediction mode of the current block is not the IBC prediction mode (MODE_IBC).
[0260] Alternatively, the index information may be signaled based on whether adaptive motion vector resolution (AMVR) is applied to the current block. For example, the index information may be signaled if adaptive motion vector resolution (AMVR) is applied to the current block. The index information may not be signaled if adaptive motion vector resolution (AMVR) is not applied to the current block. In other words, the index information may be signaled if the value of the AMVR flag is 1 (i.e., the resolution of the motion vector difference for the current block is not 1 / 4-pel). The index information may not be signaled if the value of the AMVR flag is 0 (i.e., the resolution of the motion vector difference for the current block is 1 / 4-pel).
[0261] Table 19 below shows the signaling method of index information for general inter mode and affine AMVP mode.
[0262] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( ( sps_amvr_enabled_flag && inter_affine_flag[ x0 ][ y0 ] = = 0 &&( MvdL0[ x0 ][ y0 ][ 0 ] != 0 | | MvdL0[ x0 ][ y0 ][ 1 ] != 0 | | MvdL1[ x0 ][ y0 ][ 0 ] != 0 | | MvdL1[ x0 ][ y0 ][ 1 ] != 0 ) ) | | ( sps_affine_amvr_enabled_flag && inter_affine_flag[ x0 ][ y0 ] = = 1 && ( MvdCpL0[ x0 ][ y0 ][ 0 ][ 0 ] != 0 | | MvdCpL0[ x0 ][ y0 ][ 0 ][ 1 ] != 0 | |MvdCpL1[ x0 ][ y0 ][ 0 ][ 0 ] != 0 | | MvdCpL1[ x0 ][ y0 ][ 0 ][ 1 ] != 0 | |MvdCpL0[ x0 ][ y0 ][ 1 ][ 0 ] != 0 | | MvdCpL0[ x0 ][ y0 ][ 1 ][ 1 ] != 0 | |MvdCpL1[ x0 ][ y0 ][ 1 ][ 0 ] != 0 | | MvdCpL1[ x0 ][ y0 ][ 1 ][ 1 ] != 0 | |MvdCpL0[ x0 ][ y0 ][ 2 ][ 0 ] != 0 | | MvdCpL0[ x0 ][ y0 ][ 2 ][ 1 ] != 0 | |MvdCpL1[ x0 ][ y0 ][ 2 ][ 0 ] != 0 | | MvdCpL1[ x0 ][ y0 ][ 2 ][ 1 ] != 0 ) ) ) {amvr_flag[ x0 ][ y0 ]ae(v)if( amvr_flag[ x0 ][ y0 ] ){amvr_precision_idx[ x0 ][ y0 ]ae(v)adaptive_if_idx[ x0 ][ y0 ]ae(v)}...}
[0263] Referring to Table 19, index information (adaptive_if_idx) may be signaled based on the AMVR flag (amvr_flag). Specifically, adaptive_if_idx may be signaled when the value of amvr_flag is 1, and may not be signaled when the value of amvr_flag is 0.
[0264] The amvr_flag may be signaled when the inter prediction mode of the current block is not the affine AMVP mode (inter_affine_flag=0) and the motion vector difference of the current block is not 0. Alternatively, the amvr_flag may be signaled when the inter prediction mode of the current block is the affine AMVP mode (inter_affine_flag=1) and at least one control point vector difference for the current block is not 0.
[0265] Table 20 below shows the signaling method of index information for IBC prediction mode.
[0266] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...general_merge_flag[ x0 ][ y0 ]ae(v)if( general_merge_flag[ x0 ][ y0 ] )merge_data( ][ y0 ] = = MODE_IBC ) {mvd_coding( x0, y0, 0, 0 )if( MaxNumIbcMergeCand > 1 )mvp_l0_flag[ ][ 0 ] != 0 | | MvdL0[ x0 ][ y0 ][ 1 ] != 0 ) )amvr_flag[ x0 ][ y0 ]ae(v)if( amvr_flag[ x0 ][ y0 ] ){amvr_precision_idx[
[0267] Referring to Table 20, the index information (adaptive_if_idx) may be signaled based on the AMVR flag (amvr_flag). Specifically, adaptive_if_idx may be signaled when the value of amvr_flag is 1, and may not be signaled when the value of amvr_flag is 0.
[0268] The above amvr_flag can be signaled when the inter prediction mode of the current block is the IBC prediction mode (MODE_IBC) and the motion vector difference of the current block is not 0.
[0269] Alternatively, the index information may be signaled based on whether adaptive motion vector resolution (AMVR) is applied to the current block and / or the resolution of the motion vector difference of the current block. For example, the index information may be signaled if 1 / 2-pel-level adaptive motion vector resolution (AMVR) is applied to the current block (i.e., AMVR is applied to the current block and the AMVR index or AmvrShift indicates the resolution of the motion vector difference of 1 / 2-pel). On the other hand, the index information may not be signaled if AMVR is not applied to the current block. Alternatively, even if AMVR is applied to the current block, the index information may not be signaled if the AMVR index or AmvrShift does not indicate the resolution of the motion vector difference of 1 / 2-pel. If the index information is not signaled, the index information may be deduced to 0.
[0270] Table 21 below shows the signaling method of index information for general inter mode and affine AMVP mode.
[0271] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( ( sps_amvr_enabled_flag && inter_affine_flag[ x0 ][ y0 ] = = 0 &&( MvdL0[ x0 ][ y0 ][ 0 ] != 0 | | MvdL0[ x0 ][ y0 ][ 1 ] != 0 | |MvdL1[ x0 ][ y0 ][ 0 ] != 0 | | MvdL1[ x0 ][ y0 ][ 1 ] != 0 ) ) | |( sps_affine_amvr_enabled_flag && inter_affine_flag[ x0 ][ y0 ] = = 1 &&( MvdCpL0[ x0 ][ y0 ][ 0 ][ 0 ] != 0 | | MvdCpL0[ x0 ][ y0 ][ 0 ][ 1 ] != 0 | |MvdCpL1[ x0 ][ y0 ][ 0 ][ 0 ] != 0 | | MvdCpL1[ x0 ][ y0 ][ 0 ][ 1 ] != 0 | |MvdCpL0[ x0 ][ y0 ][ 1 ][ 0 ] != 0 | | MvdCpL0[ x0 ][ y0 ][ 1 ][ 1 ] != 0 | |MvdCpL1[ x0 ][ y0 ][ 1 ][ 0 ] != 0 | | MvdCpL1[ x0 ][ y0 ][ 1 ][ 1 ] != 0 | |MvdCpL0[ x0 ][ y0 ][ 2 ][ 0 ] != 0 | | MvdCpL0[ x0 ][ y0 ][ 2 ][ 1 ] != 0 | |MvdCpL1[ x0 ][ y0 ][ 2 ][ 0 ] != 0 | | MvdCpL1[ x0 ][ y0 ][ 2 ][ 1 ] != 0 ) ) ) {amvr_flag[ x0 ][ y0 ]ae(v)if( amvr_flag[ x0 ][ y0 ] ){amvr_precision_idx[ x0 ][ y0 ]ae(v)if(AmvrShift = = 3)adaptive_if_idx[ x0 ][ y0 ]}ae(v)...}
[0272] Referring to Table 21, the index information (adaptive_if_idx) can be signaled based on at least one of the AMVR flag (amvr_flag) or the variable (AmvrShift). Specifically, adaptive_if_idx can be signaled when the value of amvr_flag is 1 and the value of AmvrShift is 3. Here, an AmvrShift of 3 can indicate that the resolution of the motion vector difference for the current block is 1 / 2-pel. On the other hand, when the value of amvr_flag is 0 or the value of AmvrShift is not 3, the adaptive_if_idx may not be signaled. Here, the signaling method of amvr_flag is as described with reference to Table 19.
[0273] Table 22 below shows the signaling method of index information for IBC prediction mode.
[0274] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...general_merge_flag[ x0 ][ y0 ]ae(v)if( general_merge_flag[ x0 ][ y0 ] )merge_data( ][ y0 ] = = MODE_IBC ) {mvd_coding( x0, y0, 0, 0 )if( MaxNumIbcMergeCand > 1 )mvp_l0_flag[ ][ 0 ] != 0 | | MvdL0[ x0 ][ y0 ][ 1 ] != 0 ) )amvr_flag[ x0 ][ y0 ]ae(v)if( amvr_flag[ x0 ][ y0 ] ){amvr_precision_idx[ {...}...}
[0275] Referring to Table 22, the index information (adaptive_if_idx) can be signaled based on at least one of the AMVR flag (amvr_flag) or variable (AmvrShift). Specifically, adaptive_if_idx can be signaled when the value of amvr_flag is 1 and the value of AmvrShift is 3. Here, an AmvrShift of 3 can indicate that the resolution of the motion vector difference for the current block is 1 / 2-pel. On the other hand, when the value of amvr_flag is 0 or the value of AmvrShift is not 3, the adaptive_if_idx may not be signaled. Here, the signaling method of amvr_flag is as described with reference to Table 20.
[0276] According to the present disclosure, by selecting one of various interpolation filter candidates based on signaled index information, more accurate motion compensation can be performed to improve the quality of a video.
[0277] The present disclosure relates to a method for deriving an interpolation filter in merge mode. Here, the merge mode may mean at least one of a regular merge mode, a merge mode with motion vector difference (MMVD), a merge mode based on geometric partitioning mode (GPM), a CIIP mode (combined inter and intra prediction), an affine merge mode, an affine merge mode with motion vector difference, a GPM-based MMVD, a CIIP mode with motion vector difference, or a GPM-based intra / inter mode.
[0278] In merge mode, a merge candidate list including multiple merge candidates may be constructed. The multiple merge candidates may include at least one of a spatial candidate, a temporal candidate, a history-based candidate, a combined candidate for bidirectional prediction, an average candidate, or a zero motion vector candidate. The spatial candidate may include a merge candidate derived from a neighboring block that is spatially adjacent to the current block (i.e., an adjacent spatial candidate). The spatial candidate may include a merge candidate derived from a block that is not spatially adjacent to the current block (i.e., a non-adjacent spatial candidate). The temporal candidate may include a merge candidate derived from a neighboring block that is temporally adjacent to the current block. Here, the temporally adjacent neighboring block may be defined as a block at the same location as the current block or a block at a location shifted by a predetermined offset from the current block. The history-based candidate may be added to the merge candidate list for the general merge mode or to the merge candidate list for the affine merge mode. The average candidate can be added to the merge candidate list for the normal merge mode or the merge candidate list for the affine merge mode. Furthermore, the merge candidate list for the affine merge mode can include a regression-based affine candidate. The control point motion vector of the regression-based affine candidate can be derived using the subblock motion fields of the blocks encoded in the affine merge mode prior to the current block and the motion vectors of the neighboring subblocks adjacent to the current block as inputs to the regression process.
[0279] Index information (or interpolation filter) for the current block can be derived based on any one of the multiple merge candidates in the merge candidate list. To this end, a merge index that specifies any one of the multiple merge candidates can be signaled for the current block. Below, we will examine a method for deriving index information for each merge candidate.
[0280] Index information for merge candidates in the general merge mode can be derived as follows. The index information of an adjacent spatial candidate can be set to the index information of a corresponding adjacent block having motion information of the adjacent spatial candidate. The index information of a non-adjacent spatial candidate can be set to the index information of a corresponding non-adjacent block having motion information of the non-adjacent spatial candidate. The index information of a temporal candidate can be set to 0. The index information of a history-based candidate can be set to the index information stored for a block having a motion vector of the history-based candidate. The index information of an average candidate can be set to 0. The index information of a zero motion vector candidate can be set to 0.
[0281] Index information for a merge candidate in the affine merge mode can be derived as follows. The index information of a temporal candidate can be set to 0. The index information of an adjacent spatial candidate can be set to the index information of a corresponding adjacent block having motion information of the adjacent spatial candidate. The index information of a non-adjacent spatial candidate can be set to the index information of a corresponding non-adjacent block having motion information of the non-adjacent spatial candidate. The index information of a regression-based affine candidate can be set to the index information of an adjacent or non-adjacent block encoded in the affine merge mode before the current block. The index information of a constructed candidate can be derived based on the index information of at least one of the neighboring blocks used to derive the constructed candidate. At this time, the index information of the constructed candidate can be derived based on whether the index information between the neighboring blocks is the same. The index information of an average candidate can be set to 0. The index information of a zero motion vector candidate can be set to 0.
[0282] In the case of the merge mode with motion vector difference or the affine merge mode with motion vector difference, the index information of the current block can be derived based on the index information of a base candidate that serves as a reference point for the motion vector difference. Here, the base candidate can mean a merge candidate specified by a merge index. In the case of the GPM mode, the index information of the current block can be set to 0.
[0283] Since history-based candidates are stored in a buffer and used for blocks that are subsequently decrypted, they can have high similarity with adjacent and non-adjacent blocks. Therefore, in at least one of the general merge mode and the affine merge mode, the index information of the history-based candidates may be set to 0. This method enables the configuration of various candidates and saves memory because the index information of the history-based candidates does not need to be stored in the buffer.
[0284] The constructed candidate of the affine merge mode may have an affine motion model generated by combining motion information of neighboring blocks adjacent to the current block. Here, the neighboring blocks may have different AMVR-related information (e.g., AMVR flag, AMVR index, AmvrShift) or index information. The index information of the constructed candidate may be derived based on whether the AMVR-related information and / or index information is identical between the control points of the current block.
[0285] For example, if the index information at the control points of the current block is the same, the corresponding index information can be stored / used. That is, if the index information at the control points of the current block is the same, the index information of the constructed candidate can be set to be the same as the index information at the control points. On the other hand, if the index information at the control points of the current block is not the same, the index information of the constructed candidate can be set to 0. Alternatively, if the index information at the control points of the current block is not the same, the index information of the constructed candidate can be set to the index information at the control point at a pre-defined location.
[0286] The following mathematical expression 6 shows a method for deriving index information of a constructed candidate when a 4-parameter affine motion model is applied.
[0287] [Equation 6]
[0288] filterIdx = (filterIdxC0 == filterIdxC1) ? filterIdxC0:0
[0289] In mathematical expression 6, filterIdx represents index information of the constructed candidate, and filterIdxC0 and filterIdxC1 represent index information at control points of the current block, respectively. For example, filterIdxC0 may represent index information at the upper left control point of the current block, and filterIdxC1 may represent index information at the upper right control point of the current block. According to mathematical expression 6, when filterIdxC0 and filterIdxC1 are the same, the index information (filterIdx) of the constructed candidate may be set to filterIdxC0. On the other hand, when filterIdxC0 and filterIdxC1 are not the same, the index information (filterIdx) of the constructed candidate may be set to 0.
[0290] The following mathematical expression 7 shows a method for deriving index information of a constructed candidate when a 6-parameter affine motion model is applied.
[0291] [Equation 7]
[0292] filterIdx = ((filterIdxC0 == filterIdxC1) && (filterIdxC0 == filterIdxC2)) ? filterIdxC0:0
[0293] In mathematical expression 7, filterIdx represents index information of a constructed candidate, and filterIdxC0 to filterIdxC2 represent index information at control points of the current block, respectively. For example, filterIdxC0 may represent index information at the upper left control point of the current block, filterIdxC1 may represent index information at the upper right control point of the current block, and filterIdxC2 may represent index information at the lower left control point of the current block. According to mathematical expression 7, when filterIdxC0 and filterIdxC1 are the same and filterIdxC0 and filterIdxC2 are the same, the index information (filterIdx) of the constructed candidate may be set to filterIdxC0. On the other hand, when filterIdxC0 and filterIdxC1 are not the same, or filterIdxC0 and filterIdxC2 are not the same, the index information (filterIdx) of the constructed candidate may be set to 0.
[0294] Alternatively, the index information of the constructed candidate can be derived based on whether the AMVR indices at the control points of the current block are the same. That is, if the AMVR indices at the control points of the current block are the same, the index information of the constructed candidate can be set to be the same as the index information of any one of the control points of the current block. Here, any one of the control points of the current block can mean the upper left control point of the current block. On the other hand, if the AMVR indices at the control points of the current block are not the same, the index information of the constructed candidate can be set to 0.
[0295] The following mathematical expression 8 shows a method for deriving index information of a constructed candidate when a 4-parameter affine motion model is applied.
[0296] [Equation 8]
[0297] filterIdx = ((precIdxC0 == half-pel) && (precIdxC0 == precIdxC1)) ? filterIdxC0:0
[0298] In Equation 8, filterIdx represents index information of the constructed candidate. precIdxC0 and precIdxC1 represent AMVR indices at control points of the current block, respectively. For example, precIdxC0 may represent the AMVR index at the upper left control point of the current block, and precIdxC1 may represent the AMVR index at the upper right control point of the current block. filterIdxC0 may represent index information at the upper left control point of the current block. According to Equation 8, when precIdxC0 represents the resolution of the motion vector difference of 1 / 2-pel, and precIdxC0 and precIdxC1 are the same, the index information (filterIdx) of the constructed candidate may be set to filterIdxC0. On the other hand, if precIdxC0 does not represent the resolution of the motion vector difference of 1 / 2-pel, or if precIdxC0 and precIdxC1 are not the same, the index information (filterIdx) of the constructed candidate may be set to 0.
[0299] The following mathematical expression 9 shows a method for deriving index information of a constructed candidate when a 6-parameter affine motion model is applied.
[0300] [Equation 9]
[0301] filterIdx = ((precIdxC0 == half-pel) && (precIdxC0 == precIdxC1) && (precIdxC0 == precIdxC2)) ? filterIdxC0:0
[0302] In Equation 9, filterIdx represents index information of the constructed candidate. precIdxC0 to precIdxC2 represent AMVR indices at control points of the current block, respectively. For example, precIdxC0 may represent an AMVR index at the upper left control point of the current block, precIdxC1 may represent an AMVR index at the upper right control point of the current block, and precIdxC2 may represent an AMVR index at the lower left control point of the current block. filterIdxC0 may represent index information at the upper left control point of the current block. According to Equation 9, when precIdxC0 represents the resolution of the motion vector difference of 1 / 2-pel, and precIdxC0 and precIdxC1 are the same, and precIdxC0 and precIdxC2 are the same, the index information (filterIdx) of the constructed candidate may be set to filterIdxC0. On the other hand, if precIdxC0 does not represent the resolution of the motion vector difference of 1 / 2-pel, or if precIdxC0 and precIdxC1 are not equal, or if precIdxC0 and precIdxC2 are not equal, the index information (filterIdx) of the constructed candidate may be set to 0.
[0303] Alternatively, the index information of the constructed candidate can be derived based on whether the variables (AmvrShift) at the control points of the current block are the same. That is, if the AmvrShift at the control points of the current block are the same, the index information of the constructed candidate can be set to be the same as the index information of any one of the control points of the current block. Here, any one of the control points of the current block can mean the upper left control point of the current block. On the other hand, if the AmvrShift at the control points of the current block are not the same, the index information of the constructed candidate can be set to 0.
[0304] The following mathematical expression 10 shows a method for deriving index information of a constructed candidate when a 4-parameter affine motion model is applied.
[0305] [Equation 10]
[0306] filterIdx = ((AmvrShiftC0 == half-pel) && (AmvrShiftC0 == AmvrShiftC1)) ? filterIdxC0:0
[0307] In Equation 10, filterIdx represents index information of the constructed candidate. AmvrShiftC0 and AmvrShiftC1 represent AmvrShift at the control points of the current block, respectively. For example, AmvrShiftC0 may represent AmvrShift at the upper left control point of the current block, and AmvrShiftC1 may represent AmvrShift at the upper right control point of the current block. filterIdxC0 may represent index information at the upper left control point of the current block. According to Equation 10, when AmvrShiftC0 represents the resolution of the motion vector difference of 1 / 2-pel, and AmvrShiftC0 and AmvrShiftC1 are the same, the index information (filterIdx) of the constructed candidate may be set to filterIdxC0. On the other hand, if AmvrShiftC0 does not represent the resolution of the difference of the motion vectors of 1 / 2-pel, or if AmvrShiftC0 and AmvrShiftC1 are not the same, the index information (filterIdx) of the constructed candidate may be set to 0.
[0308] The following mathematical expression 11 shows a method for deriving index information of a constructed candidate when a 6-parameter affine motion model is applied.
[0309] [Equation 11]
[0310] filterIdx = ((AmvrShiftC0 == half-pel) && (AmvrShiftC0 == AmvrShiftC1) && (AmvrShiftC0 == AmvrShiftC2)) ? filterIdxC0:0
[0311] In Equation 11, filterIdx represents index information of the constructed candidate. AmvrShiftC0 to AmvrShiftC2 represent AmvrShift at the control points of the current block, respectively. For example, AmvrShiftC0 may represent AmvrShift at the upper left control point of the current block, AmvrShiftC1 may represent AmvrShift at the upper right control point of the current block, and AmvrShiftC2 may represent AmvrShift at the lower left control point of the current block. filterIdxC0 may represent index information at the upper left control point of the current block. According to Equation 11, when AmvrShiftC0 represents the resolution of the motion vector difference of 1 / 2-pel, and AmvrShiftC0 and AmvrShiftC1 are the same, and AmvrShiftC0 and AmvrShiftC2 are the same, the index information (filterIdx) of the constructed candidate may be set to filterIdxC0. On the other hand, if AmvrShiftC0 does not represent the resolution of the difference in motion vectors of 1 / 2-pel, or AmvrShiftC0 and AmvrShiftC1 are not equal, or AmvrShiftC0 and AmvrShiftC2 are not equal, the index information (filterIdx) of the constructed candidate may be set to 0.
[0312] The process for determining an interpolation filter according to the present disclosure may include the decoding process described below. This is not limited to the general merge mode, and may also be applied to other inter prediction modes (e.g., affine merge mode, IBC prediction mode).
[0313] For example, the interpolation filter of the current block can be determined based on the merge candidate list in which reordering of merge candidates for MMVD is performed.
[0314] Specifically, a list of merge candidates for the current block can be constructed.
[0315] If reordering of multiple merge candidates in a merge candidate list is allowed, reordering of the merge candidates may be performed based on a flag (mmvd_merge_flag) indicating whether MMVD is applied. If MMVD is applied to the current block (mmvd_merge_flag=1), reordering may be performed on merge candidates for MMVD. The merge candidates for MMVD may refer to the top N merge candidates in ascending order of merge index among the multiple merge candidates in the merge candidate list. Here, N may be an integer of 2, 3, or more. On the other hand, if MMVD is not applied to the current block (mmvd_merge_flag=0), reordering may be performed on multiple merge candidates in the merge candidate list.
[0316] Any one of the merge candidates in the above merge candidate list or the reordered merge candidate list may be selected. To this end, a merge index specifying any one of the merge candidates may be signaled.
[0317] If it is determined that an adaptive interpolation filter technique is to be applied to the current block, the interpolation filter of the current block can be determined from a candidate list including multiple interpolation filter candidates. For example, if the AMVR index of the selected merge candidate indicates a resolution of the motion vector difference of 1 / 2-pel, it can be determined that an adaptive interpolation filter technique is to be applied to the current block.
[0318] Alternatively, the interpolation filter of the current block may be determined based on the merge candidate list after reordering of the merge candidates.
[0319] Specifically, a list of merge candidates for the current block can be constructed.
[0320] If reordering of multiple merge candidates in a merge candidate list is permitted, reordering may be performed on multiple merge candidates in the merge candidate list. Here, reordering may be performed when MMVD is not applied to the current block (mmvd_merge_flag=0).
[0321] Any one of the merge candidates in the above merge candidate list or the reordered merge candidate list may be selected. To this end, a merge index specifying any one of the merge candidates may be signaled.
[0322] If it is determined that an adaptive interpolation filter technique is to be applied to the current block, the interpolation filter of the current block can be determined from a candidate list including multiple interpolation filter candidates. For example, if the AMVR index of the selected merge candidate indicates a resolution of the motion vector difference of 1 / 2-pel, it can be determined that an adaptive interpolation filter technique is to be applied to the current block.
[0323] If reordering of multiple merge candidates in a merge candidate list is allowed, reordering may be performed on merge candidates for MMVD in the merge candidate list. The merge candidates for MMVD may refer to the top N merge candidates in ascending order of merge index among the multiple merge candidates in the merge candidate list. Here, N may be an integer of 2, 3, or more. Here, the reordering may be performed when MMVD is applied to the current block (mmvd_merge_flag=1). In addition, the reordering of merge candidates for MMVD may be performed after the interpolation filter of the current block is determined.
[0324] Alternatively, the interpolation filter of the current block may be determined based on the merge candidate list without any reordering of the merge candidates.
[0325] Specifically, a list of merge candidates for the current block can be constructed.
[0326] An interpolation filter (or index information) may be determined for each of the merge candidates in the above merge candidate list. At this time, if it is determined that an adaptive interpolation filter technique is to be applied to each of the merge candidates, the interpolation filter of the corresponding merge candidate may be determined from a candidate list including multiple interpolation filter candidates. For example, if the AMVR index of the corresponding merge candidate indicates the resolution of the motion vector difference of 1 / 2-pel, it may be determined that an adaptive interpolation filter technique is to be applied to the corresponding merge candidate.
[0327] If reordering of multiple merge candidates in a merge candidate list is allowed, reordering of the merge candidates may be performed based on a flag (mmvd_merge_flag) indicating whether MMVD is applied. If MMVD is applied to the current block (mmvd_merge_flag=1), reordering may be performed on merge candidates for MMVD. The merge candidates for MMVD may refer to the top N merge candidates in ascending order of merge index among the multiple merge candidates in the merge candidate list. Here, N may be an integer of 2, 3, or more. On the other hand, if MMVD is not applied to the current block (mmvd_merge_flag=0), reordering may be performed on multiple merge candidates in the merge candidate list.
[0328] Any one of the merge candidates in the above merge candidate list or the reordered merge candidate list may be selected. To this end, a merge index specifying any one of the merge candidates may be signaled. The interpolation filter of the current block may be determined based on the interpolation filter of the selected merge candidate.
[0329] When the adaptive interpolation filter technique according to the present disclosure is applied, a filter having a smoothing characteristic can be used as an interpolation filter candidate. However, since the CIIP mode is a method for generating a final prediction block based on a weighted sum between an inter-prediction block and an intra-prediction block, a prediction block having a relatively smoothed characteristic can be generated. Since the Overlapped Block Motion Compensation (OBMC) mode is a method for weighted-predicting boundary samples of a current block (or a current sub-block) based on motion information of a neighboring block, the final prediction block through the OBMC mode can have a relatively smoothed characteristic. Since the Multi-hypothesis Prediction (MHP) mode is a method for generating a final prediction block based on a weighted sum of an existing prediction block and an additional prediction block, a final prediction block having a smoothed characteristic can likewise be generated.
[0330] For a block to which at least one of the CIIP mode, OBMC mode, or MHP mode is applied, the adaptive interpolation filter technique described above may not be applied to the block. For a block to which at least one of the CIIP mode, OBMC mode, or MHP mode is applied, the index information (filterIdx) for the block may be derived as 0. For a block to which at least one of the CIIP mode, OBMC mode, or MHP mode is applied, even if the AMVR index of the block indicates a resolution of a motion vector difference of 1 / 2-pel, a pre-defined default interpolation filter may be used. Here, the default interpolation filter may mean an interpolation filter defined for a resolution of 1 / 2-pel in the AMVP mode, affine AMVP mode, or IBC prediction mode. Alternatively, the default interpolation filter may mean an interpolation filter defined for a resolution other than 1 / 2-pel in the AMVP mode, affine AMVP mode, or IBC prediction mode.
[0331] As discussed above, by preventing excessive smoothing for blocks to which at least one of the CIIP mode, OBMC mode, or MHP mode is applied, the quality of the predicted block can be improved and the complexity of the decoder and the bit transmission associated with the adaptive interpolation filter can be reduced.
[0332] Referring to FIG. 4, a prediction sample of the current block can be generated based on the interpolation filter of the current block (S410).
[0333] Specifically, a sample of a reference block of the current block can be generated by applying an interpolation filter of the current block to restored samples within a reference picture of the current block. The sample of the reference block generated above can be used as a prediction sample of the current block.
[0334] If the current block is encoded with bidirectional prediction, the interpolation filter of the current block may be applied equally to the reference picture in the L0 direction and the reference picture in the L1 direction of the current block. Alternatively, the interpolation filter of the current block may be determined separately for the L0 direction and the L1 direction, in which case the interpolation filter in the L0 direction may be applied to the reference picture in the L0 direction, and the interpolation filter in the L1 direction may be applied to the reference picture in the L1 direction.
[0335] By applying the interpolation filter of the current block to reference pictures in the L0 and L1 directions, reference blocks in the L0 and L1 directions can be generated, respectively, and a prediction sample of the current block can be generated based on a weighted sum between the samples of the reference block in the L1 direction and the samples of the reference block in the L1 direction.
[0336] The weight for the above weighted sum may be determined as any one of a plurality of weights belonging to a pre-defined weight set. For this purpose, an index (hereinafter referred to as a BCW index) specifying any one of the plurality of weights may be signaled. Alternatively, reordering may be performed on the plurality of weights belonging to the weight set. Here, the reordering may be performed based on a predetermined cost. The cost may be calculated as the SAD between a template area adjacent to the reference block in the L0 direction and a template area adjacent to the reference block in the L1 direction. The cost may be calculated for each of the plurality of weights, and the plurality of weights may be reordered within the weight set in ascending order of the costs. The weight for the weighted sum may be determined based on the reordered weight set and the BCW index.
[0337] FIG. 5 illustrates a schematic configuration of an inter prediction unit (332) that performs an inter prediction method according to the present disclosure.
[0338] Referring to FIG. 5, the inter prediction unit (332) may include an interpolation filter decision unit (500) and a prediction sample generation unit (510).
[0339] The interpolation filter determination unit (500) can determine the interpolation filter of the current block. The interpolation filter of the current block can be derived from a candidate list including a plurality of interpolation filter candidates pre-defined in the decoding device. The method for constructing the candidate list is as described with reference to FIG. 4.
[0340] The interpolation filter decision unit (500) can decide the interpolation filter of the current block based on any one of the cost-based decision method, the reordered candidate list and index information-based decision method, or the index information-based decision method as discussed with reference to FIG. 4.
[0341] Alternatively, the interpolation filter decision unit (500) may selectively use any one of a plurality of pre-defined decision methods in the decoding device to determine the interpolation filter of the current block. Here, the plurality of pre-defined decision methods may include at least one of the aforementioned cost-based decision method, the reordered candidate list and index information-based decision method, or the index information-based decision method. For the selective use, information specifying any one of the plurality of decision methods may be explicitly signaled, or the information may be implicitly derived based on parameters of the current block.
[0342] The interpolation filter determined through the aforementioned method can be applied equally to generate a reference block in the L0 direction and a reference block in the L1 direction of the current block. Alternatively, the interpolation filter determination unit (500) can determine an interpolation filter for each reference picture list, which has been described in detail with reference to FIG. 4, and a detailed description thereof will be omitted here.
[0343] In the interpolation filter decision unit (500), the adaptive interpolation filter technique can be adaptively used based on a predetermined variable (UseAdaptiveFilter). The UseAdaptiveFilter is a variable indicating whether the adaptive interpolation filter technique is used for the current block. If UseAdaptiveFilter is 1, the adaptive interpolation filter technique is used for the current block, and if UseAdaptiveFilter is 0, the adaptive interpolation filter technique may not be used for the current block. The method of deriving UseAdaptiveFilter is as described in Fig. 4.
[0344] The interpolation filter decision unit (500) can select any one candidate list from among multiple candidate lists that are identically pre-defined for the encoding device and the decoding device. The method for configuring the multiple pre-defined candidate lists and the method for selecting any one of the candidate lists are as described in FIG. 4.
[0345] The interpolation filter determination unit (500) may determine an interpolation filter for the luminance component of the current block according to the above-described embodiment, and may determine an interpolation filter for the chrominance component based on the interpolation filter for the luminance component. Alternatively, the interpolation filter determination unit (500) may independently determine the interpolation filter for the luminance component and the interpolation filter for the chrominance component according to the above-described embodiment.
[0346] The interpolation filter decision unit (500) may consider at least one of the candidate list or interpolation filter candidates used in the previous picture / slice when deciding the interpolation filter for the current picture / slice or the current block.
[0347] The interpolation filter determination unit (500) can apply an adaptive interpolation filter technique to the current block based on the motion vector resolution of the current block. The interpolation filter determination unit (500) can determine the interpolation filter based on signaled index information, and the signaling method of the index information is as described with reference to FIG. 4. Alternatively, the interpolation filter determination unit (500) can derive index information for applying an adaptive interpolation filter technique to a merge candidate and / or the current block according to the inter prediction mode of the current block, and this is as described with reference to FIG. 4.
[0348] The prediction sample generation unit (510) can generate a prediction sample of the current block based on the interpolation filter of the current block. At this time, the interpolation filter of the current block can be applied equally to the reference picture in the L0 direction and the reference picture in the L1 direction of the current block. Alternatively, when the interpolation filters of the current block are determined respectively for the L0 direction and the L1 direction, the prediction sample generation unit (510) can apply the interpolation filter in the L0 direction to the reference picture in the L0 direction and apply the interpolation filter in the L1 direction to the reference picture in the L1 direction.
[0349] The prediction sample generation unit (510) can generate a final prediction block through a weighted sum between a reference block in the L0 direction and a reference block in the L1 direction. Here, the weight for the weighted sum can be determined based on a (rearranged) weight set and a BCW index.
[0350] FIG. 6 illustrates an inter prediction method performed by an encoding device (200) as an embodiment according to the present disclosure.
[0351] Referring to Fig. 6, the interpolation filter of the current block can be determined (S600).
[0352] The interpolation filter of the current block can be determined from a candidate list including multiple interpolation filter candidates pre-defined in the encoding device. The method for constructing the candidate list is as described with reference to FIG. 4, and a redundant description will be omitted here.
[0353] Below, we will look specifically at a method for determining the interpolation filter of the current block based on the above candidate list.
[0354] Cost-based decision-making method
[0355] From the encoding device perspective, a cost can be calculated for each interpolation filter candidate in the candidate list. Based on the interpolation filter candidates, one interpolation filter candidate with the minimum cost can be selected among the calculated costs. The selected interpolation filter candidate can be set as the interpolation filter of the current block. This has been described with reference to FIG. 4, and a duplicate description will be omitted here.
[0356] Decision method based on reordered candidate list and index information encoding
[0357] From the encoding device perspective, a cost can be calculated for each interpolation filter candidate in the candidate list. The interpolation filter candidates in the candidate list can be reordered in ascending order of the calculated cost. The optimal interpolation filter candidate can be determined from the reordered candidate list, and index information indicating the interpolation filter candidate can be encoded and inserted into the bitstream. Here, the index information can be encoded based on an index in the reordered candidate list.
[0358] For example, assume that the candidate list includes three interpolation filter candidates, i.e., first to third interpolation filter candidates, and that indices 0 to 2 are assigned to the first to third interpolation filter candidates, respectively.
[0359] For the first to third interpolation filter candidates, costs of cost0 to cost2 can be calculated, respectively. At this time, when the calculated costs are sorted in ascending order, it is assumed that they are sorted in the order of cost1, cost2, and cost0. In this case, when the interpolation filter candidates are rearranged in ascending order of costs, the candidate list can be rearranged in the order of the second interpolation filter candidate, the third interpolation filter candidate, and the first interpolation filter candidate. In other words, an index of 0 can be assigned to the second interpolation filter candidate, an index of 1 can be assigned to the third interpolation filter candidate, and an index of 2 can be assigned to the first interpolation filter candidate.
[0360] If the third interpolation filter candidate assigned an index of 1 within the rearranged candidate list is determined to be the optimal interpolation filter candidate, the interpolation filter of the current block is set to the third interpolation filter candidate, and index information with a value of 1 can be encoded.
[0361] Alternatively, assume that the candidate list includes five interpolation filter candidates, i.e., the first to fifth interpolation filter candidates, and the first to fifth interpolation filter candidates are each assigned indices of 0 to 4.
[0362] For the first to fifth interpolation filter candidates, costs of cost0 to cost4 can be calculated, respectively. At this time, when the calculated costs are sorted in ascending order, it is assumed that they are sorted in the order of cost1, cost2, cost0, cost3, and cost4. In this case, when the interpolation filter candidates are rearranged in ascending order of the costs, the candidate list can be rearranged in the order of the second interpolation filter candidate, the third interpolation filter candidate, the first interpolation filter candidate, the fourth interpolation filter candidate, and the fifth interpolation filter candidate. In other words, an index of 0 can be assigned to the second interpolation filter candidate, an index of 1 can be assigned to the third interpolation filter candidate, an index of 2 can be assigned to the first interpolation filter candidate, an index of 3 can be assigned to the fourth interpolation filter candidate, and an index of 4 can be assigned to the fifth interpolation filter candidate.
[0363] Any one of the top N interpolation filter candidates in the reordered candidate list can be set as the interpolation filter of the current block. Index information can be encoded for the top N interpolation filter candidates in the reordered candidate list. If N is 3, the value of the index information is an integer in the range of 0 to 2, and can indicate any one of the top three interpolation filter candidates in the reordered candidate list.
[0364] Alternatively, costs may be calculated for the top N interpolation filter candidates among the five interpolation filter candidates in the above candidate list, and no costs may be calculated for the remaining interpolation filter candidates. For convenience of explanation, it is assumed below that N is 3, but the present invention is not limited thereto, and N may be 2 or 4.
[0365] For the top three interpolation filter candidates, i.e., the first to third interpolation filter candidates, costs of cost0 to cost2 can be calculated respectively. At this time, when the calculated costs are sorted in ascending order, it is assumed that they are sorted in the order of cost1, cost2, and cost0. In this case, when the interpolation filter candidates are rearranged in ascending order of the costs, the candidate list can be rearranged in the order of the second interpolation filter candidate, the third interpolation filter candidate, the first interpolation filter candidate, the fourth interpolation filter candidate, and the fifth interpolation filter candidate.
[0366] Any one of the top N interpolation filter candidates for which the cost has been calculated can be set as the interpolation filter of the current block. Index information can be encoded for the top N interpolation filter candidates for which the cost has been calculated. If N is 3, the value of the index information is an integer in the range of 0 to 2, and can indicate any one of the top three interpolation filter candidates in the reordered candidate list.
[0367] Decision method based on index information encoding
[0368] In the present embodiment, the index information may be encoded based on an index of a candidate list that is identically pre-defined for the encoding device and the decoding device, rather than a rearranged candidate list. In this case, the process of calculating a cost for each interpolation filter candidate in the candidate list and the process of rearranging the interpolation filter candidates in the candidate list based on the calculated cost may be omitted. That is, any one of the plurality of interpolation filter candidates in the candidate list may be set as the interpolation filter of the current block, and index information indicating any one of the plurality of interpolation filter candidates may be encoded and inserted into the bitstream.
[0369] An interpolation filter of a current block may be determined by selectively using any one of a plurality of pre-defined decision methods in an encoding device. The plurality of pre-defined decision methods may include at least one of the aforementioned cost-based decision method, the decision method based on a reordered candidate list and index information encoding, or the decision method based on index information encoding. Information specifying any one of the plurality of decision methods selected may be encoded and inserted into a bitstream. Alternatively, any one of the plurality of decision methods may be implicitly determined based on a parameter of the current block. The parameter may include at least one of a position, a size, a shape, a partition type, a component type, a type of an inter prediction mode, or whether the block is encoded with bidirectional prediction.
[0370] The interpolation filter determined through the above-described method can be applied identically to generate a reference block in the L0 direction and a reference block in the L1 direction of the current block. Alternatively, as described below, the interpolation filter can be determined separately for each reference picture list, and in this case, the above-described method can be applied identically / similarly, and duplicate descriptions will be omitted.
[0371] Cost-based decision-making method
[0372] For each of the L0 and L1 directions, costs corresponding to interpolation filter candidates in the candidate list can be calculated. Based on the calculated costs, interpolation filters can be determined for each of the L0 and L1 directions. This has been described with reference to Figure 4, and any redundant description will be omitted here.
[0373] Decision method based on reordered candidate list and index information encoding
[0374] For each of the L0 and L1 directions, costs corresponding to all or some of the interpolation filter candidates in the candidate list can be calculated. The interpolation filter candidates in the candidate list can be reordered in ascending order of the costs calculated for the L0 direction. Similarly, the interpolation filter candidates in the candidate list can be reordered in ascending order of the costs calculated for the L1 direction.
[0375] The interpolation filter of the current block can be determined as one of the interpolation filter candidates included in the reordered candidate list. Index information indicating one of the interpolation filter candidates included in the reordered candidate list can be encoded and inserted into the bitstream. The index information can be encoded based on an index of the reordered candidate list.
[0376] For example, the index information may be encoded for the L0 direction and the L1 direction, respectively. The index information in the L0 direction may be encoded based on an index of a reordered candidate list for the L0 direction and may indicate any one of the interpolation filter candidates in the reordered candidate list for the L0 direction. The index information in the L1 direction may be encoded based on an index of a reordered candidate list for the L1 direction and may indicate any one of the interpolation filter candidates in the reordered candidate list for the L1 direction.
[0377] Alternatively, the index information may indicate one of the index sets pre-defined in the encoding device. Each index set may be composed of an index indicating an interpolation filter in the L0 direction and an index indicating an interpolation filter in the L1 direction. Here, the index information may be encoded based on an index of a reordered candidate list. For example, referring to Table 2, if an interpolation filter candidate having an index of 0 in the reordered candidate list for the L0 direction is determined as an interpolation filter in the L0 direction of the current block, and an interpolation filter candidate having an index of 1 in the reordered candidate list for the L1 direction is determined as an interpolation filter in the L1 direction of the current block, index information having a value of 1 indicating an index set of (0,1) may be encoded.
[0378] Decision method based on index information encoding
[0379] Index information may be encoded for each of the L0 and L1 directions of the current block. In the present embodiment, the index information may be encoded based on an index of a candidate list that is identically pre-defined for an encoding device and a decoding device, rather than a rearranged candidate list. In this case, for each of the L0 and L1 directions, the process of calculating costs corresponding to interpolation filter candidates belonging to the candidate list and the process of rearranging interpolation filter candidates in the candidate list based on the calculated costs may be omitted.
[0380] Specifically, the interpolation filter in the L0 direction may be determined as one of the interpolation filter candidates in a pre-defined candidate list, and index information in the L0 direction indicating one of the interpolation filter candidates may be encoded. Similarly, the interpolation filter in the L1 direction may be determined as another of the interpolation filter candidates in the pre-defined candidate list, and index information in the L1 direction indicating another of the interpolation filter candidates may be encoded. However, when the value of the index information in the L1 direction to be encoded is greater than the value of the index information in the L0 direction, a value obtained by subtracting 1 from the value of the index information in the L1 direction to be encoded may be encoded.
[0381] Based on the above candidate list, the interpolation filter of the current block can be adaptively determined, and this will be referred to as an adaptive interpolation filter technique hereinafter. The adaptive interpolation filter technique can be adaptively used based on a predetermined variable (UseAdaptiveFilter). Here, UseAdaptiveFilter can indicate whether the adaptive interpolation filter technique is used for the current block. For example, if UseAdaptiveFilter is 1, the adaptive interpolation filter technique can be used for the current block. In this case, the interpolation filter of the current block can be determined based on the candidate list through the above-described method. On the other hand, if UseAdaptiveFilter is 0, the adaptive interpolation filter technique may not be used for the current block. In this case, the interpolation filter of the current block can be determined as a default interpolation filter that is identically pre-defined for the encoding device and the decoding device.
[0382] UseAdaptiveFilter can be derived based on flag information (adaptive_filter_flag) encoded at the coding unit (CU) level. The adaptive_filter_flag can be encoded and inserted into the bitstream if certain conditions are satisfied. This has been discussed with reference to Figure 4, and a detailed description thereof will be omitted here.
[0383] Alternatively, UseAdaptiveFilter can be implicitly derived based on whether a certain condition is satisfied, as discussed with reference to Fig. 4, and a detailed explanation thereof will be omitted here.
[0384] Alternatively, whether or not to use the adaptive interpolation filter technique is determined in units of pictures and / or slices, and at least one of pic_adaptive_if_flag in picture units or slice_adaptive_if_flag in slice units can be encoded. In addition, even if the pic_adaptive_if_flag or slice_adaptive_if_flag indicates that the adaptive interpolation filter technique is used, whether or not the adaptive interpolation filter technique is used can be determined for each coding block. This has been described with reference to FIG. 4, and a detailed description thereof will be omitted here.
[0385] The aforementioned candidate list may be any one selected from among multiple candidate lists that are identically predefined for the encoding device and the decoding device. The method for constructing multiple candidate lists and selecting any one of the multiple candidate lists are described in FIG. 4, and any duplicate description will be omitted here.
[0386] In units of pictures and / or slices, index information specifying one of the plurality of pre-defined candidate lists may be encoded based on a flag indicating whether an adaptive interpolation filter technique is used. For example, if an adaptive interpolation filter technique is used for the corresponding picture according to pic_adaptive_if_flag, the index information may be additionally encoded. Alternatively, if an adaptive interpolation filter technique is used for the corresponding slice according to slice_adaptive_if_flag, the index information may be additionally encoded. Any one of the plurality of pre-defined candidate lists may be shared by coding blocks belonging to the corresponding picture or slice. Alternatively, a single index information that integrates the flag indicating whether the adaptive interpolation filter technique is used and the index information may be encoded. Alternatively, one of a plurality of pre-defined candidate lists may be implicitly determined based on at least one of whether the picture and / or slice is a P slice, whether the picture and / or slice is a B slice, or a distance between the current picture and a reference picture. One of a plurality of pre-defined candidate lists may be implicitly determined based on a quantization parameter of the picture and / or slice.
[0387] For each coding unit, any one of a plurality of pre-defined candidate lists may be selectively utilized. For each coding unit, index information specifying any one of the plurality of pre-defined candidate lists may be encoded. Alternatively, any one of the plurality of pre-defined candidate lists may be selected based on at least one of the inter prediction mode of the current block or the size of the current block.
[0388] Through the above-described embodiment, the interpolation filter of the luminance component of the current block can be determined, and the interpolation filter of the chrominance component of the current block can be determined based on the interpolation filter pre-determined for the luminance component. Alternatively, through the above-described embodiment, the interpolation filter of the chrominance component can be determined independently from the interpolation filter of the luminance component.
[0389] In the process of determining the interpolation filter of the current block, at least one of index information (hereinafter referred to as “first index information”) that specifies one of a plurality of interpolation filter candidates belonging to one candidate list or index information (hereinafter referred to as “second index information”) that specifies one of a plurality of pre-defined candidate lists may be encoded / derived. Such index information may be stored in the current block so that it can be propagated to blocks encoded after the current block.
[0390] If the interpolation filter of the current block is determined based on the reordered candidate list, the index in the unreordered candidate list may be stored for propagation to the next block.
[0391] As previously discussed, the interpolation filter can be determined on a per-picture and / or per-slice basis, and in this case, the interpolation filter for the current picture / slice can be determined by considering the interpolation filters of pictures / slices encoded before the current picture / slice.
[0392] An adaptive interpolation filter technique may be applied to the current block based on the motion vector resolution of the current block. For example, an adaptive interpolation filter technique may be applied to the current block based on whether adaptive motion vector resolution (AMVR) is applied to the current block, whether a variable (AmvrShift) for the current block indicates half-pel (1 / 2-pel), or whether the resolution of the motion vector difference indicated by the variable (AmvrShift) for the current block belongs to the first group. This is as described with reference to FIG. 4.
[0393] When an adaptive interpolation filter technique is applied, the interpolation filter of the current block can be determined from a candidate list including multiple interpolation filter candidates. The candidate list may be configured differently depending on the inter prediction mode of the current block. Index information specifying one of the multiple interpolation filter candidates included in the candidate list can be encoded. The encoding method of the index information is as described with reference to FIG. 4.
[0394] Index information can be derived for each of a plurality of merge candidates included in the merge candidate list, as described with reference to FIG. 4. In addition, index information (or interpolation filter) of a current block can be derived based on any one of the plurality of merge candidates included in the merge candidate list. For the current block, a merge index specifying any one of the plurality of merge candidates can be encoded. Alternatively, index information of the current block can also be derived based on an inter prediction mode of the current block, as described with reference to FIG. 4.
[0395] The decision process of the interpolation filter according to the present disclosure may include the same encoding process as the decoding process described above, and redundant descriptions thereof will be omitted here.
[0396] If the current block is encoded in at least one of the CIIP mode, the OBMC mode, or the MHP mode, the adaptive interpolation filter technique described above may be restricted from being applied to the block.
[0397] Referring to FIG. 6, a prediction sample of the current block can be generated based on the interpolation filter of the current block (S610).
[0398] Specifically, a sample of a reference block of the current block can be generated by applying an interpolation filter of the current block to restored samples within a reference picture of the current block. The sample of the reference block generated above can be used as a prediction sample of the current block.
[0399] When the current block is encoded with bidirectional prediction, the interpolation filter of the current block may be applied equally to the reference picture in the L0 direction and the reference picture in the L1 direction of the current block. Alternatively, the interpolation filter of the current block may be determined separately for the L0 direction and the L1 direction, in which case the interpolation filter in the L0 direction may be applied to the reference picture in the L0 direction, and the interpolation filter in the L1 direction may be applied to the reference picture in the L1 direction.
[0400] By applying the interpolation filter of the current block to reference pictures in the L0 and L1 directions, reference blocks in the L0 and L1 directions can be generated, respectively, and a prediction sample of the current block can be generated based on a weighted sum between the samples of the reference block in the L1 direction and the samples of the reference block in the L1 direction.
[0401] The weight for the above weighted sum may be determined as any one of a plurality of weights belonging to a pre-defined weight set. An index (hereinafter referred to as a BCW index) specifying any one of the plurality of weights may be encoded. Alternatively, as described with reference to FIG. 4, reordering may be performed on the plurality of weights belonging to the weight set, and the weight for the weighted sum may be determined based on the reordered weight set.
[0402] Fig. 7 illustrates a schematic configuration of an inter prediction unit (221) that performs an inter prediction method according to the present disclosure.
[0403] Referring to FIG. 7, the inter prediction unit (221) may include an interpolation filter decision unit (700) and a prediction sample generation unit (710).
[0404] The interpolation filter determination unit (700) can determine the interpolation filter of the current block. The interpolation filter of the current block can be determined from a candidate list including a plurality of interpolation filter candidates pre-defined in the encoding device. The method for constructing the candidate list is as described with reference to FIG. 4.
[0405] The interpolation filter decision unit (700) can decide the interpolation filter of the current block based on any one of the cost-based decision method, the reordered candidate list and index information encoding-based decision method, or the index information encoding-based decision method as discussed with reference to FIG. 6.
[0406] Alternatively, the interpolation filter decision unit (700) may selectively use any one of a plurality of pre-defined decision methods in the encoding device to determine the interpolation filter of the current block. Here, the plurality of pre-defined decision methods may include at least one of the aforementioned cost-based decision method, the reordered candidate list and index information encoding-based decision method, or the index information encoding-based decision method.
[0407] The interpolation filter determined through the aforementioned method can be applied equally to generate a reference block in the L0 direction and a reference block in the L1 direction of the current block. Alternatively, the interpolation filter determination unit (700) can determine an interpolation filter for each reference picture list, as described in detail with reference to FIG. 6.
[0408] In the interpolation filter decision unit (700), the adaptive interpolation filter technique can be adaptively used based on a predetermined variable (UseAdaptiveFilter). The UseAdaptiveFilter is a variable indicating whether the adaptive interpolation filter technique is used for the current block. If UseAdaptiveFilter is 1, the adaptive interpolation filter technique is used for the current block, and if UseAdaptiveFilter is 0, the adaptive interpolation filter technique may not be used for the current block. The method of deriving UseAdaptiveFilter is as described in Fig. 6.
[0409] The interpolation filter decision unit (700) can select one candidate list from among multiple candidate lists that are identically pre-defined for the encoding device and the decoding device. The method for configuring the multiple pre-defined candidate lists and the method for selecting one of the candidate lists are as described in FIG. 4.
[0410] The interpolation filter determination unit (700) may determine an interpolation filter for the luminance component of the current block according to the above-described embodiment, and may determine an interpolation filter for the chrominance component based on the interpolation filter for the luminance component. Alternatively, the interpolation filter determination unit (700) may independently determine the interpolation filter for the luminance component and the interpolation filter for the chrominance component according to the above-described embodiment.
[0411] The interpolation filter decision unit (700) may consider at least one of the candidate list or interpolation filter candidates used in the previous picture / slice when deciding the interpolation filter for the current picture / slice or the current block.
[0412] The interpolation filter determination unit (700) can apply an adaptive interpolation filter technique to the current block based on the motion vector resolution of the current block. The interpolation filter determination unit (700) can determine the interpolation filter based on signaled index information, and the signaling method of the index information is as described with reference to FIG. 4. Alternatively, the interpolation filter determination unit (700) can derive index information for applying an adaptive interpolation filter technique to a merge candidate and / or the current block according to the inter prediction mode of the current block, as described with reference to FIG. 4.
[0413] The prediction sample generation unit (710) can generate a prediction sample of the current block by equally applying the interpolation filter of the current block to the reference picture in the L0 direction and the reference picture in the L1 direction of the current block. Alternatively, if the interpolation filters of the current block are determined for the L0 and L1 directions, respectively, the prediction sample generation unit (710) can generate a prediction sample of the current block by applying the interpolation filter in the L0 direction and the interpolation filter in the L1 direction to the reference picture in the L0 direction and the reference picture in the L1 direction, respectively.
[0414] In the embodiments described above, the methods are described based on a flowchart as a series of steps or blocks. However, the embodiments are not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will understand that the steps depicted in the flowchart are not exclusive, and other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the embodiments of this document.
[0415] The method according to the embodiments of the present document described above can be implemented in the form of software, and the encoding device and / or decoding device according to the present document can be included in a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.
[0416] When the embodiments in this document are implemented as software, the above-described method can be implemented as a module (process, function, etc.) that performs the above-described function. The module can be stored in memory and executed by a processor. The memory can be internal or external to the processor and can be connected to the processor by various well-known means. The processor can include an application-specific integrated circuit (ASIC), another chipset, logic circuit, and / or data processing device. The memory can include a read-only memory (ROM), a random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described in this document can be implemented and performed on a processor, a microprocessor, a controller, or a chip. For example, the functional units illustrated in each drawing can be implemented and performed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information for implementation (e.g., information on instructions) or an algorithm can be stored on a digital storage medium.
[0417] In addition, the decoding device and encoding device to which the embodiment(s) of the present specification are applied may be included in a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a VR (virtual reality) device, an AR (argumente reality) device, a video phone video device, a transportation terminal (ex. a vehicle (including an autonomous vehicle) terminal, an airplane terminal, a ship terminal, etc.), and a medical video device, and may be used to process a video signal or a data signal. For example, the OTT (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), etc.
[0418] In addition, the processing method to which the embodiment(s) of the present specification are applied can be produced in the form of a computer-executable program and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiment(s) of the present specification can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium can 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. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by an encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0419] Additionally, the embodiments of the present disclosure may be implemented as a computer program product by program code, and the program code may be executed on a computer by the embodiments of the present disclosure. The program code may be stored on a computer-readable carrier.
[0420] FIG. 8 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.
[0421] Referring to FIG. 8, a content streaming system to which the embodiment(s) of the present specification are applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0422] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data, generates a bitstream, and transmits it to the streaming server. Alternatively, if multimedia input devices such as smartphones, cameras, and camcorders directly generate bitstreams, the encoding server may be omitted.
[0423] The above bitstream can be generated by an encoding method or a bitstream generation method to which the embodiment(s) of the present specification are applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0424] 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, and the streaming server transmits the multimedia data to the user. At this time, the content streaming system may include a separate control server, in which case the control server controls commands / responses between each device within the content streaming system.
[0425] The streaming server can receive content from a media repository and / or an encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.
[0426] Examples of the user devices may include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, HMDs), digital TVs, desktop computers, digital signage, etc.
[0427] Each server within the above content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.
[0428] The claims set forth in this specification may be combined in various ways. For example, the technical features of the method claims of this specification may be combined and implemented as a device, and the technical features of the device claims of this specification may be combined and implemented as a method. Furthermore, the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a device, and the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a method.
Claims
1. Step of determining the interpolation filter of the current block; generating a prediction sample of the current block based on an interpolation filter of the current block; and A step of restoring the current block based on a prediction sample of the current block, A video decoding method, wherein the interpolation filter is determined based on a candidate list including a plurality of interpolation filter candidates, based on the resolution of the motion vector difference (MVD) for the current block.
2. In paragraph 1, A method for decoding an image, wherein the current block is a block encoded in affine AMVP mode or IBC prediction mode.
3. In paragraph 1, The above interpolation filter is determined based on index information signaled from the bitstream, A video decoding method, wherein the above index information specifies one of a plurality of interpolation filter candidates belonging to the above candidate list.
4. In paragraph 3, The above index information is signaled based on the AMVR flag of the current block, A video decoding method wherein the AMVR flag indicates whether the resolution of the motion vector difference of the current block is 1 / 4-pel.
5. In paragraph 3, The above index information is signaled based on the AMVR flag and AMVR index of the current block, A video decoding method, wherein the AMVR flag indicates whether the resolution of the motion vector difference of the current block is 1 / 4-pel, and the AMVR index specifies one of the resolutions of a plurality of motion vector differences available to the current block.
6. In paragraph 1, The above interpolation filter is determined based on index information that specifies one of a plurality of interpolation filter candidates belonging to the candidate list, A video decoding method, wherein the above index information is derived based on the inter prediction mode of the current block.
7. In paragraph 1, The above interpolation filter is determined based on index information that specifies one of a plurality of interpolation filter candidates belonging to the candidate list, A video decoding method, wherein the above index information is derived based on any one of a plurality of merge candidates belonging to the merge candidate list of the current block.
8. In paragraph 7, A video decoding method, wherein the above index information is derived based on a merge candidate list in which the plurality of merge candidates are rearranged.
9. In paragraph 1, A video decoding method, wherein if the inter prediction mode of the current block corresponds to a pre-defined mode, the interpolation filter is restricted from being determined from a candidate list including the plurality of interpolation filter candidates.
10. A step of determining the interpolation filter of the current block; and A step of generating a prediction sample of the current block based on an interpolation filter of the current block, A video encoding method, wherein the interpolation filter is determined based on a candidate list including a plurality of interpolation filter candidates, based on the resolution of the motion vector difference (MVD) for the current block.
11. A computer-readable storage medium storing a bitstream generated by the video encoding method according to Article 10.
12. A step of obtaining a bitstream for image information; wherein the bitstream is generated based on a step of determining an interpolation filter of a current block and a step of generating a prediction sample of the current block based on the interpolation filter of the current block, and Including a step of transmitting data including the above bitstream, A data transmission method, wherein the interpolation filter is determined based on a candidate list including a plurality of interpolation filter candidates, based on the resolution of the motion vector difference (MVD) for the current block.
Citation Information
Patent Citations
Sub-region based decision of motion information refinement
JP2022530516A
Reference Picture Interpolation Method and Apparatus and Video Coding Method and Apparatus Using Same
KR101678968B1
Lead-free incinerator
KR1020230064357A
Oil pump drive hub device of torque converter
KR102189476B1
Film Manufacturing Method thereof
KR102476784B1
Cited By
Method and computer-readable storage medium
WO2026089492A1
