Video signal processing method and apparatus
By parsing MMVD activation information and modifying motion vectors, the method enhances video signal coding efficiency in decoding processes.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- WILUS INSTITUTE OF STANDARDS & TECHNOLOGY INC
- Filing Date
- 2026-05-07
- Publication Date
- 2026-07-29
AI Technical Summary
Existing video signal processing methods lack efficiency in coding, particularly in handling video compression tasks.
The method involves parsing higher-level MMVD activation information, generating merge candidate lists, and modifying motion vectors based on MMVD-related information to enhance decoding efficiency, including steps for obtaining and applying MMVD offsets and scaling based on reference picture types.
This approach increases the coding efficiency of video signals by optimizing motion vector decoding processes.
Smart Images

Figure 2026123263000001_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a method and apparatus for processing video signals, and more particularly, to a method and apparatus for encoding or decoding video signals.
Background Art
[0002] Compression encoding refers to a series of signal processing techniques for transmitting digitized information via a communication line or storing it in a form suitable for a storage medium. The targets of compression encoding include audio, video, characters, etc. In particular, the technique of performing compression encoding on video is called video compression. Compression encoding of video signals is performed by removing redundant information in consideration of spatial correlation, temporal correlation, probabilistic correlation, etc. However, with the development of various recent media and data transmission media, a more efficient video signal processing method and apparatus are desired.
Summary of the Invention
Problems to be Solved by the Invention
[0003] An object of the present disclosure is to improve the coding efficiency of video signals.
Means for Solving the Problems
[0004] A method for decoding a video signal according to one embodiment of the present disclosure includes the steps of: parsing from a bitstream higher-level MMVD activation information (sps_mmvd_enabled_flag) indicating whether or not a higher-level MMVD (Merge with MVD) including the current block is used; parsing from a bitstream MMVD merge information (mmvd_merge_flag) indicating whether or not an MMVD is used in the current block if the higher-level MMVD activation information indicates MMVD activation; parsing information related to the distance of the MMVD (mmvd_distance_idx) and information related to the direction of the MMVD (mmvd_direction_idx) if the MMVD merge information indicates that an MMVD is used in the current block; and obtaining MMVD-related information (mMvdLX) based on the MMVD-related information and the MMVD-related information, wherein the MMVD-related information is greater than or equal to -2^17 and less than or equal to 2^17-1.
[0005] A method for decoding a video signal according to one embodiment of the present disclosure is characterized in that the higher level is one of a coding tree unit, slice, tile, tile group, picture, or sequence unit.
[0006] A method for decoding a video signal according to one embodiment of the present disclosure further includes the steps of: generating a merge candidate list for the current block; selecting a motion vector from the merge candidate list based on a merge index parsed from a bitstream; adding information about MMVD to the motion vector to obtain a modified motion vector when MMVD merge information indicates that MMVD should be used for the current block; and restoring the current block based on the modified motion vector, characterized in that the modified motion vector is greater than or equal to -2^17 and less than or equal to 2^17-1.
[0007] A method for decoding a video signal according to one embodiment of the present disclosure, wherein the steps of obtaining MMVD information (mMvdLX) include: obtaining an MMVD offset based on information relating to the distance of the MMVD and information relating to the direction of the MMVD; obtaining, when a first reference list and a second reference list are used, the difference in POC (Picture Order Count) between the current picture including the current block and the first reference picture based on the first reference list as the first POC difference, and obtaining the difference in POC (Picture Order Count) between the current picture and the second reference picture based on the second reference list as the second POC difference; and obtaining information relating to the first MMVD related to the first reference list and information relating to the second MMVD related to the second reference list based on at least one of the MMVD offset, the first POC difference, and the second POC difference, wherein the MVD information includes information relating to the first MMVD and information relating to the second MMVD.
[0008] A method for decoding a video signal according to one embodiment of the present disclosure is characterized by including the steps of obtaining the MMVD offset as information about the first MMVD and obtaining the MMVD offset as information about the second MMVD when the first POC difference and the second POC difference are the same.
[0009] A method for decoding a video signal according to one embodiment of the present disclosure is characterized by including the steps of: obtaining an MMVD offset as information about the first MMVD when the absolute value of the first POC difference is greater than or equal to the absolute value of the second POC difference; scaling the information about the first MMVD to obtain information about the second MMVD when the first reference picture is not a long-term reference picture and the second reference picture is not a long-term reference picture; and obtaining information about the second MMVD without scaling the absolute value of the information about the first MMVD when the first reference picture is a long-term reference picture or the second reference picture is a long-term reference picture.
[0010] A method for decoding a video signal according to one embodiment of the present disclosure is characterized by including the steps of: acquiring an MMVD offset as information about the second MMVD when the absolute value of the first POC difference is smaller than the absolute value of the second POC difference; scaling the information about the second MMVD to acquire information about the first MMVD when the first reference picture is not a long-term reference picture and the second reference picture is not a long-term reference picture; and acquiring information about the first MMVD without scaling the absolute value of the information about the second MMVD when the first reference picture is a long-term reference picture or the second reference picture is a long-term reference picture.
[0011] A method for decoding a video signal according to one embodiment of the present disclosure, characterized in that the steps of acquiring MMVD information (mMvdLX) include: acquiring an MMVD offset based on information relating to the distance of the MMVD and information relating to the direction of the MMVD; acquiring the MMVD offset without scaling it and as information relating to a first MMVD associated with the first reference list when only a first reference list is used; and acquiring the MMVD offset without scaling it and as information relating to a second MMVD associated with the second reference list when only a second reference list is used.
[0012] A method for decoding a video signal according to one embodiment of the present disclosure is characterized by including the steps of: obtaining chroma component format information from a higher-level bitstream; obtaining information regarding width (SubWidthC) and height (SubHeightC) based on the chroma component format information; obtaining x-axis scale information based on the width information or information regarding the color components of the current block; obtaining y-axis scale information based on the height information or information regarding the color components of the current block; determining the position of the left block based on the y-axis scale information; determining the position of the upper block based on the x-axis scale information; determining a weight value based on the left block and the upper block; obtaining a first sample predicting the current block to be in merge mode; obtaining a second sample predicting the current block to be in intra mode; and obtaining a combined prediction sample for the current block based on the weight value, the first sample, and the second sample.
[0013] A method for decoding a video signal according to one embodiment of the present disclosure is characterized in that the steps for determining the weight value include setting code information (isIntraCodedNeighbourA) relating to the left block to TRUE when the left block is available and the prediction mode of the left block is intraprediction; setting code information relating to the left block to FALSE when the left block is not available or the prediction mode of the left block is not intraprediction; setting code information (isIntraCodedNeighbourB) relating to the upper block to TRUE when the upper block is available and the prediction mode of the upper block is intraprediction; and setting code information relating to the upper block to FALSE when the upper block is not available or the prediction mode of the upper block is not intraprediction.
[0014] A method for decoding a video signal according to one embodiment of the present disclosure, characterized in that the steps for determining the weight value include: determining the weight value to be 3 when both the code information for the left block and the code information for the upper block are TRUE; determining the weight value to be 1 when both the code information for the left block and the code information for the upper block are FALSE; and determining the weight value to be 2 when only one of the code information for the left block and the code information for the upper block is TRUE.
[0015] In a method for decoding a video signal according to one embodiment of the present disclosure, the step of obtaining a combination prediction sample includes a step of predicting the current block based on predSamplesComb[x][y]=(w*predSamplesIntra[x][y]+(4-w)*predSamplesInter[x][y]+2)>>2, where predSamplesComb means a combination prediction sample, w means a weighted value, predSamplesIntra means a second sample, predSamplesInter means a first sample, [x] means the x-axis coordinate of the sample included in the current block, and [y] means the y-axis coordinate of the sample included in the current block.
[0016] A method for decoding a video signal according to one embodiment of the present disclosure, characterized in that the step of acquiring x-axis scale information includes the step of determining the x-axis scale information to be 0 when the current color component of the block is 0 or the information regarding the width is 1, and the step of determining the x-axis scale information to be 1 when the current color component of the block is not 0 and the information regarding the width is not 1, and the step of acquiring y-axis scale information includes the step of determining the y-axis scale information to be 0 when the current color component of the block is 0 or the information regarding the height is 1, and the step of determining the y-axis scale information to be 1 when the current color component of the block is not 0 and the information regarding the height is not 1.
[0017] In a method for decoding a video signal according to an embodiment of the present disclosure, the position of the left block is (xCb - 1, yCb - 1+(cbHeight << scallFactHeight)), where xCb is the x-axis coordinate of the upper left sample of the current luma block, yCb is the y-axis coordinate of the upper left sample of the current luma block, cbHeight is the size of the height of the current block, scallFactHeight is the scale information of the y-axis, the position of the upper block is (xCb - 1+(cbWidth << scallFactWidth), yCb - 1), where xCb is the x-axis coordinate of the upper left sample of the current luma block, yCb is the y-axis coordinate of the upper left sample of the current luma block, cbWidth is the size of the width of the current block, and scallFactWidth is the scale information of the x-axis.
[0018] An apparatus for decoding a video signal according to an embodiment of the present disclosure includes a processor and a memory. The processor parses from a bit stream a higher-level MMVD (Merge with MVD) active information (sps_mmvd_enabled_flag) indicating whether a higher-level MMVD used for a current block is used based on an instruction word stored in the memory. When the higher-level MMVD active information indicates the activation of MMVD, the processor parses from the bit stream an MMVD merge information (mmvd_merge_flag) indicating whether to use MMVD for the current block. When the MMVD merge information indicates using MMVD for the current block, the processor parses information related to the distance of MMVD (mmvd_distance_idx) and information related to the direction of MMVD (mmvd_direction_idx), and obtains information regarding MMVD (mMvdLX) based on the information related to the distance of MMVD and the information related to the direction of MMVD. The information regarding MMVD is greater than or equal to -2^17 and less than or equal to 2^17 - 1.
[0019] In a device for decoding a video signal according to one embodiment of the present disclosure, the higher level is characterized by being one of a coding tree unit, slice, tile, tile group, picture, or sequence unit.
[0020] In a device for decoding a video signal according to one embodiment of the present disclosure, the processor generates a list of merge candidates for the current block based on instruction words stored in memory, selects a motion vector from the merge candidate list based on a merge index parsed from a bitstream, adds information about MMVD to the motion vector when MMVD merge information indicates that MMVD should be used for the current block, obtains a modified motion vector, restores the current block based on the modified motion vector, and the modified motion vector is greater than or equal to -2^17 and less than or equal to 2^17-1.
[0021] In a device for decoding a video signal according to one embodiment of the present disclosure, the processor obtains an MMVD offset based on an instruction word stored in memory, based on information related to the distance of the MMVD and information related to the direction of the MMVD, and when a first reference list and a second reference list are used, obtains the difference in POC (Picture Order Count) between the current picture including the current block and the first reference picture based on the first reference list as the first POC difference, and obtains the difference in POC (Picture Order Count) between the current picture and the second reference picture based on the second reference list as the second POC difference, and obtains information relating to the first MMVD and information relating to the second MMVD related to the second reference list based on at least one of the MMVD offset, the first POC difference, and the second POC difference, wherein the MMVD information includes information relating to the first MMVD and information relating to the second MMVD.
[0022] In a device for decoding a video signal according to one embodiment of the present disclosure, the processor is characterized in that, based on an instruction word stored in memory, when the first POC difference and the second POC difference are the same, it acquires the MMVD offset as information about the first MMVD and acquires the MMVD offset as information about the second MMVD.
[0023] In a device for decoding a video signal according to one embodiment of the present disclosure, the processor acquires an MMVD offset as information about the first MMVD when the absolute value of the first POC difference is greater than or equal to the absolute value of the second POC difference, based on an instruction word stored in memory; scales the information about the first MMVD to acquire information about the second MMVD when the first reference picture is not a long-term reference picture and the second reference picture is not a long-term reference picture; and acquires information about the second MMVD without scaling the absolute value of the information about the first MMVD when the first reference picture is a long-term reference picture or the second reference picture is a long-term reference picture.
[0024] In a device for decoding a video signal according to one embodiment of the present disclosure, the processor acquires the MMVD offset as information about the second MMVD when the absolute value of the first POC difference is smaller than the absolute value of the second POC difference, based on an instruction word stored in memory; scales the information about the second MMVD to acquire information about the first MMVD when the first reference picture is not a long-term reference picture and the second reference picture is not a long-term reference picture; and acquires information about the first MMVD without scaling the absolute value of the information about the second MMVD when the first reference picture is a long-term reference picture or the second reference picture is a long-term reference picture.
[0025] In an apparatus for decoding a video signal according to an embodiment of the present disclosure, a processor obtains an MMVD offset based on information related to the distance of the MMVD and information related to the direction of the MMVD based on instruction words stored in a memory, and when only the first reference list is used, does not scale the MMVD offset and obtains it as information related to a first MMVD related to the first reference list, and when only the second reference list is used, does not scale the MMVD offset and obtains it as information related to a second MMVD related to the second reference list.
[0026] An apparatus for decoding a video signal according to an embodiment of the present disclosure includes a processor and a memory. The processor obtains chroma component format information from a higher-level bitstream based on instruction words stored in the memory, obtains information related to width (SubWidthC) and information related to height (SubHeightC) based on the chroma component format information, obtains x-axis scale information based on the information related to width or information related to the color component of the current block, obtains y-axis scale information based on the information related to height or information related to the color component of the current block, determines the position of the left block based on the y-axis scale information, determines the position of the upper block based on the x-axis scale information, determines a weighting value based on the left block and the upper block, obtains a first sample in which the current block is predicted in the merge mode, obtains a second sample in which the current block is predicted in the intra mode, and obtains a combined prediction sample for the current block based on the weighting value, the first sample, and the second sample.
[0027] In a device for decoding a video signal according to one embodiment of the present disclosure, the processor sets the code information (isIntraCodedNeighbourA) relating to the left block to TRUE when the left block is available and the prediction mode of the left block is intra-prediction, based on the instruction words stored in memory, sets the code information relating to the left block to FALSE when the left block is unavailable or the prediction mode of the left block is not intra-prediction, sets the code information relating to the upper block (isIntraCodedNeighbourB) to TRUE when the upper block is available and the prediction mode of the upper block is intra-prediction, and sets the code information relating to the upper block to FALSE when the upper block is unavailable or the prediction mode of the upper block is not intra-prediction.
[0028] In a device for decoding a video signal according to one embodiment of the present disclosure, the processor determines a weight value of 3 when both the code information for the left block and the code information for the upper block are TRUE, based on the instruction words stored in memory, determines a weight value of 1 when both the code information for the left block and the code information for the upper block are FALSE, and determines a weight value of 2 when only one of the code information for the left block and the code information for the upper block is TRUE.
[0029] In an apparatus for decoding a video signal according to an embodiment of the present disclosure, a processor predicts a current block based on predSamplesComb[x][y] = (w * predSamplesIntra[x][y] + (4 - w) * predSamplesInter[x][y] + 2) >> 2 based on instruction words stored in a memory, where predSamplesComb means combined prediction samples, w means a weighting value, predSamplesIntra means second samples, predSamplesInter means first samples, [x] means the x-axis coordinate of a sample included in the current block, and [y] means the y-axis coordinate of a sample included in the current block.
[0030] In an apparatus for decoding a video signal according to an embodiment of the present disclosure, a processor determines that the scale information of the x-axis is 0 when the color component of the current block is 0 or the information regarding the width is 1, determines that the scale information of the x-axis is 1 when the color component of the current block is not 0 and the information regarding the width is not 1, determines that the scale information of the y-axis is 0 when the color component of the current block is 0 or the information regarding the height is 1, and determines that the scale information of the y-axis is 1 when the color component of the current block is not 0 and the information regarding the height is not 1, based on instruction words stored in a memory.
[0031] The position of the left block of the apparatus for decoding a video signal according to an embodiment of the present disclosure is (xCb - 1, yCb - 1+(cbHeight << scallFactHeight)), where xCb is the x-axis coordinate of the upper left sample of the current luma block, yCb is the y-axis coordinate of the upper left sample of the current luma block, cbHeight is the size of the height of the current block, scallFactHeight is the scale information of the y-axis, the position of the upper block is (xCb - 1+(cbWidth << scallFactWidth), yCb - 1), where xCb is the x-axis coordinate of the upper left sample of the current luma block, yCb is the y-axis coordinate of the upper left sample of the current luma block, cbWidth is the size of the width of the current block, and scallFactWidth is the scale information of the x-axis, which is characterized by the above.
[0032] A method for encoding a video signal according to an embodiment of the present disclosure includes generating information (mMvdLX) regarding the MMVD of the current block, generating information related to the distance of the MMVD and information related to the direction of the MMVD based on the information (mMvdLX) regarding the MMVD, generating MMVD merge information (mmvd_merge_flag) indicating whether to use the MMVD for the current block, generating upper level MMVD activation information (sps_mmvd_enabled_flag) indicating whether to use the upper level MMVD (Merge with MVD) including the current block, and generating a bitstream based on the information related to the distance of the MMVD, the information related to the direction of the MMVD, the MMVD merge information (mmvd_merge_flag), and the upper level MMVD activation information (sps_mmvd_enabled_flag), where the information regarding the MMVD is greater than or equal to -2^17 and less than or equal to 2^17 - 1, which is characterized by the above.
[0033] An apparatus for encoding a video signal according to one embodiment of the present disclosure includes a processor and memory, wherein the processor generates information (mMvdLX) about the current block's MMVD based on an instruction word stored in memory, generates information related to the distance of the MMVD and information related to the direction of the MMVD based on the MMVD information (mMvdLX), generates MMVD merge information (mmvd_merge_flag) indicating whether or not to use an MMVD in the current block, generates higher-level MMVD activation information (sps_mmvd_enabled_flag) indicating whether or not to use a higher-level MMVD (Merge with MVD) including the current block, generates a bitstream based on the information related to the distance of the MMVD, the information related to the direction of the MMVD, the MMVD merge information (mmvd_merge_flag), and the higher-level MMVD activation information (sps_mmvd_enabled_flag), wherein the MMVD information is greater than or equal to -2^17 and less than or equal to 2^17-1.
[0034] A method for encoding a video signal according to one embodiment of the present disclosure is characterized by including the steps of: generating higher-level chroma component format information; obtaining width information (SubWidthC) and height information (SubHeightC) based on the chroma component format information; obtaining x-axis scale information based on width information or color component information of the current block; obtaining y-axis scale information based on height information or color component information of the current block; determining the position of the left block based on the y-axis scale information; determining the position of the upper block based on the x-axis scale information; determining weight values based on the left block and the upper block; obtaining a first sample predicting the current block as merge mode; obtaining a second sample predicting the current block as intra mode; and obtaining a combined prediction sample for the current block based on weight values, the first sample, and the second sample.
[0035] An apparatus for encoding a video signal according to one embodiment of the present disclosure includes a processor and memory, wherein the processor generates higher-level chroma component format information based on instruction words stored in memory, obtains width information (SubWidthC) and height information (SubHeightC) based on the chroma component format information, obtains x-axis scale information based on the width information or the color component information of the current block, obtains y-axis scale information based on the height information or the color component information of the current block, determines the position of the left block based on the y-axis scale information, determines the position of the upper block based on the x-axis scale information, determines a weight value based on the left block and the upper block, obtains a first sample predicting the current block to be in merge mode, obtains a second sample predicting the current block to be in intra mode, and obtains a combined prediction sample for the current block based on the weight value, the first sample, and the second sample. [Effects of the Invention]
[0036] According to embodiments of the present invention, the coding efficiency of video signals can be increased. [Brief explanation of the drawing]
[0037] [Figure 1] This is a schematic block diagram of a video signal encoding device according to one embodiment of the present disclosure. [Figure 2] This is a schematic block diagram of a video signal decoding device according to one embodiment of the present disclosure. [Figure 3] This figure shows an example in which a coding tree unit is divided into coding units within a picture. [Figure 4] This figure shows one embodiment of a method for signaling the splitting of quad trees and multi-type trees. [Figure 5] This figure more specifically illustrates the intra-prediction method according to an embodiment of the present disclosure. [Figure 6]This figure more specifically illustrates the intra-prediction method according to an embodiment of the present disclosure. [Figure 7] This figure shows an inter-prediction method according to one embodiment of the present disclosure. [Figure 8] This figure shows how the motion vector of a block is currently signaled according to one embodiment of the present disclosure. [Figure 9] This figure shows how the motion vector difference value of a block is currently signaled according to one embodiment of the present disclosure. [Figure 10] This figure shows adaptive motion vector resolution signaling according to one embodiment of the present disclosure. [Figure 11] This figure shows the inter-prediction related syntax according to one embodiment of the present disclosure. [Figure 12] This figure shows a multi-hypothesis prediction according to one embodiment of the present disclosure. [Figure 13] This figure shows the multi-hypothesis prediction-related syntax according to one embodiment of the present disclosure. [Figure 14] This figure shows the multi-hypothesis prediction-related syntax according to one embodiment of the present disclosure. [Figure 15] This figure shows the multi-hypothesis prediction-related syntax according to one embodiment of the present disclosure. [Figure 16] This figure shows a method for determining a multi-hypothesis prediction mode according to one embodiment of the present disclosure. [Figure 17] This figure shows a method for generating a candidate list according to one embodiment of the present disclosure. [Figure 18] This figure shows the peripheral position referenced in the multi-hypothesis prediction according to one embodiment of the present disclosure. [Figure 19] This figure shows a method for referencing peripheral modes according to one embodiment of the present disclosure. [Figure 20] This figure shows a method for generating a candidate list according to one embodiment of the present disclosure. [Figure 21]This figure shows a method for generating a candidate list according to one embodiment of the present disclosure. [Figure 22] This figure shows the peripheral position referenced in the multi-hypothesis prediction according to one embodiment of the present disclosure. [Figure 23] This figure shows a method for referencing peripheral modes according to one embodiment of the present disclosure. [Figure 24] This figure shows the use of peripheral samples according to one embodiment of the present disclosure. [Figure 25] This figure shows a transform mode according to one embodiment of the present disclosure. [Figure 26] This figure shows the relationship between multi-hypothesis prediction and transformation mode according to one embodiment of the present disclosure. [Figure 27] This figure shows the relationship between color components according to one embodiment of the present disclosure. [Figure 28] This figure shows the relationship of color components according to one embodiment of the present disclosure. [Figure 29] This figure shows the peripheral reference position according to one embodiment of the present disclosure. [Figure 30] This figure shows a weighted sample prediction process according to one embodiment of the present disclosure. [Figure 31] This figure shows the peripheral reference position according to one embodiment of the present disclosure. [Figure 32] This figure shows a weighted sample prediction process according to one embodiment of the present disclosure. [Figure 33] This figure shows a weighted sample prediction process according to one embodiment of the present disclosure. [Figure 34] This figure shows a weighted sample prediction process according to one embodiment of the present disclosure. [Figure 35] This figure shows the CIIP weight derivation according to one embodiment of the present disclosure. [Figure 36] This figure shows the CIIP process according to one embodiment of the present disclosure. [Figure 37] This figure shows the scope of MV and MVD according to one embodiment of the present disclosure. [Figure 38] This figure shows an MMVD according to one embodiment of the present disclosure. [Figure 39] This figure shows the MVD derivation of MMVD according to one embodiment of the present disclosure. [Figure 40] This figure shows the derivation of MVD and MV according to one embodiment of the present disclosure. [Figure 41] This figure shows the derivation of MV and CPMV according to one embodiment of the present disclosure. [Figure 42] This figure shows the scope of MV and MVD according to one embodiment of the present disclosure. [Figure 43] This figure shows the MVD derivation of MMVD according to one embodiment of the present disclosure. [Modes for carrying out the invention]
[0038] The terminology used herein has been selected, to the greatest extent possible, to be common and widely used terms, taking into account the function described herein, although this may change depending on the intent, convention, or emergence of new technologies of the articulate persons. In certain cases, the applicant may have arbitrarily selected terms, in which case their meaning will be described in the relevant description of the invention. It is therefore clear that the terminology used herein should be interpreted not merely as a set of terms, but based on the substantive meaning of the terms and the context of this specification as a whole.
[0039] In this specification, some terms may be interpreted as follows: Coding may be interpreted as encoding or decoding, depending on the context. In this specification, a device that encodes a video signal to generate a video signal bitstream is referred to as an encoding device or encoder, and a device that decodes a video signal bitstream to restore a video signal is referred to as a decoding device or decoder. In this specification, video signal processing device is used as a conceptual term that includes both encoders and decoders. Information is a term that includes values, parameters, coefficients, and elements, and may be interpreted differently depending on the context, and this disclosure is not limited thereto. Unit is used to refer to a basic unit of image processing or a specific location in a picture, and refers to an image region that includes both luma and chroma components. Block refers to an image region that includes a specific component of the luma and chroma components (i.e., Cb and Cr). However, in some embodiments, terms such as "unit," "block," "partition," and "region" may be used interchangeably. Furthermore, in this specification, "unit" may be used to encompass any of the following concepts: coding units, prediction units, or transformation units. "Picture" refers to a field or frame, and these terms may be used interchangeably in some embodiments.
[0040] Figure 1 is a schematic block diagram of a video signal encoding device according to one embodiment of the present disclosure. Referring to Figure 1, the encoding device 100 of the present disclosure includes a conversion unit 110, a quantization unit 115, an inverse quantization unit 120, an inverse conversion unit 125, a filtering unit 130, a prediction unit 150, and an entropy coding unit 160.
[0041] The conversion unit 110 converts the residual signal, which is the difference between the received video signal and the predicted signal generated by the prediction unit 150, to obtain conversion coefficient values. For example, discrete cosine transform (DCT), discrete sine transform (DST), or wavelet transform may be used. Discrete cosine transform and discrete sine transform divide the input picture signal into block form and perform the transformation. In the transformation, the coding efficiency may vary depending on the distribution and characteristics of the values within the transformation domain. The quantization unit 115 quantizes the conversion coefficient values output from the conversion unit 110.
[0042] To improve coding efficiency, instead of directly encoding the picture signal, a prediction unit 150 predicts the picture using already encoded regions, and then the restored picture is obtained by adding the residual values of the original picture and the predicted picture to the predicted picture. To prevent mismatches between the encoder and decoder, the encoder must use information that is also available to the decoder when performing predictions. For this purpose, the encoder performs a process of restoring the currently encoded block. The inverse quantization unit 120 inversely quantizes the conversion coefficient values, and the inverse transformation unit 125 restores the residual values using the inversely quantized conversion coefficient values. Meanwhile, the filtering unit 130 performs filtering operations to improve the quality of the restored picture and enhance coding efficiency. For example, this may include a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter. The filtered picture is either output or stored in a decoded picture buffer (DPB) 156 for use as a reference picture.
[0043] The prediction unit 150 includes an intra-prediction unit 152 and an inter-prediction unit 154. The intra-prediction unit 152 performs intra-prediction within the current picture, and the inter-prediction unit 154 performs inter-prediction, predicting the current picture using a reference picture stored in the decoded picture buffer 156. The intra-prediction unit 152 performs intra-prediction from the restored sample in the current picture and transmits intra-coded information to the entropy coding unit 160. The intra-coded information may include at least one of the intra-prediction mode, MPM (Most Probable Mode) flag, and MPM index. The intra-coded information may include information about the reference sample. The inter-prediction unit 154 may include a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains motion vector values for the current region by referring to a specific region of the restored reference picture. The motion estimation unit 154a transmits a set of motion information (reference picture index, motion vector information, etc.) related to the reference region to the entropy coding unit 160. The motion compensation unit 154b performs motion compensation using the motion vector values transmitted from the motion estimation unit 154a. The inter-prediction unit 154 transmits inter-encoded information, which includes motion information related to the reference region, to the entropy coding unit 160.
[0044] In a further embodiment, the prediction unit 150 may include an intrablock copy (BC) prediction unit (not shown). The intraBC prediction unit performs intraBC prediction from the restored samples in the current picture and transmits the intraBC encoded information to the entropy coding unit 160. The intraBC prediction unit refers to a specific region in the current picture and obtains a block vector value indicating a reference region used for prediction of the current region. The intraBC prediction unit can perform intraBC prediction using the obtained block vector value. The intraBC prediction unit transmits the intraBC encoded information to the entropy coding unit 160. The intraBC encoded information may include block vector information.
[0045] When picture prediction as described above is performed, the conversion unit 110 converts the residual value between the original picture and the predicted picture to obtain a conversion coefficient value. At this time, the conversion may be performed in units of specific blocks within the picture, and the size of the specific block may be variable within a previously set range. The quantization unit 115 quantizes the conversion coefficient value generated by the conversion unit 110 and transmits it to the entropy coding unit 160.
[0046] The entropy coding unit 160 generates a video signal bitstream by entropy coding information indicating quantized conversion coefficients, intra-coded information, and inter-coded information. The entropy coding unit 160 may use variable length coding (VLC) or arithmetic coding. Variable length coding (VLC) converts input symbols into a sequence of codewords, but the length of the codewords may be variable. For example, frequently occurring symbols can be represented by short codewords, and less frequently occurring symbols can be represented by long codewords. Context-based adaptive variable length coding (CAVLC) may be used as the variable length coding method. Arithmetic coding converts a sequence of data symbols into a single prime number, and arithmetic coding can obtain the optimal number of prime bits necessary to represent each symbol. Context-based adaptive binary arithmetic code (CABAC) may be used as the arithmetic coding method. For example, the entropy coding unit 160 can binary-code information indicating quantized transformation coefficients. Furthermore, the entropy coding unit 160 can arithmetically encode the binary-coded information to generate a bitstream.
[0047] The generated bitstream is encapsulated using Network Abstraction Layer (NAL) units as the basic unit. Each NAL unit contains an encoded integer coding tree unit. To decode the bitstream with a video decoder, the bitstream must first be separated into NAL units, and then each separated NAL unit must be decoded. On the other hand, the information necessary for decoding the video signal bitstream may be transmitted in a higher-level set of Raw Byte Sequence Payload (RBSP), such as a Picture Parameter Set (PPS), Sequence Parameter Set (SPS), or Video Parameter Set (VPS).
[0048] On the other hand, the block diagram in Figure 1 shows an encoding device 100 according to one embodiment of the present disclosure, where the separately displayed blocks logically distinguish and show the elements of the encoding device 100. Therefore, the elements of the encoding device 100 described above may be mounted as one chip or as multiple chips depending on the device design. According to one embodiment, the operation of each element of the encoding device 100 described above may be performed by a processor (not shown).
[0049] Figure 2 is a schematic block diagram of a video signal decoding device 200 according to one embodiment of the present disclosure. Referring to Figure 2, the decoding device 200 of the present disclosure includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transformation unit 225, a filtering unit 230, and a prediction unit 250.
[0050] The entropy decoding unit 210 entropy decodes the video signal bitstream and extracts conversion coefficient information, intra-encoded information, inter-encoded information, etc., for each region. For example, the entropy decoding unit 210 can obtain binary-coded conversion coefficient information for a specific region from the video signal bitstream. The entropy decoding unit 210 also performs inverse binary-coded conversion of the binary-coded conversion coefficient to obtain quantized conversion coefficients. The inverse quantization unit 220 inverse quantizes the quantized conversion coefficients, and the inverse conversion unit 225 restores the residual value using the inverse quantized conversion coefficient. The video signal processing device 200 adds the residual value obtained from the inverse conversion unit 225 with the predicted value obtained from the prediction unit 250 to restore the original pixel value.
[0051] Meanwhile, the filtering unit 230 improves image quality by filtering the picture. This may include a deblocking filter to reduce block distortion and / or an adaptive loop filter to remove distortion from the entire picture. The filtered picture is either output or stored in the decoded picture buffer (DPB) 256 for use as a reference picture for the next picture.
[0052] The prediction unit 250 includes an intra-prediction unit 252 and an inter-prediction unit 254. The prediction unit 250 generates a predicted picture using the encoding type decoded by the entropy decoding unit 210 described above, the conversion coefficients for each region, intra / inter-encoded information, etc. To reconstruct the current block being decoded, the current picture containing the current block or the decoded region of another picture may be used. A picture (or tile / slice) that uses only the current picture for reconstruction, i.e., performs only intra-prediction (or intra-prediction and intra-BC prediction), is called an intra-picture or I-picture (or tile / slice), and a picture (or tile / slice) that can perform both intra-prediction and inter-prediction is called an inter-picture (or tile / slice). Among interpictures (or tiles / slice), a picture (or tile / slice) that uses up to one motion vector and a reference picture index to predict the sample value of each block is called a predictive picture or P-picture (or tile / slice), and a picture (or tile / slice) that uses up to two motion vectors and a reference picture index is called a bi-predictive picture or B-picture (or tile / slice). In other words, a P-picture (or tile / slice) uses up to one motion information set to predict each block, and a B-picture (or tile / slice) uses up to two motion information sets to predict each block. Here, a motion information set includes one or more motion vectors and one reference picture index.
[0053] The intra-prediction unit 252 generates a prediction block using intra-encoded information and the recovered sample in the current picture. As described above, the intra-encoded information may include at least one of the intra-prediction mode, the MPM (Most Probable Mode) flag, and the MPM index. The intra-prediction unit 252 predicts the sample value of the current block using the recovered sample located to the left and / or above the current block as a reference sample. In this disclosure, the recovered sample, the reference sample, and the sample of the current block may represent pixels. The sample value may also represent a pixel value.
[0054] In one embodiment, the reference sample may be a sample included in the surrounding blocks of the current block. For example, the reference sample may be a sample adjacent to the left boundary and / or adjacent to the upper boundary of the current block. Alternatively, the reference sample may be a sample in the surrounding blocks of the current block that lies on a line within a predetermined distance from the left boundary of the current block and / or a sample that lies on a line within a predetermined distance from the upper boundary of the current block. In this case, the surrounding blocks of the current block may include at least one of the left (L) block, upper (A) block, below left (BL) block, above right (AR) block, or above left (AL) block adjacent to the current block.
[0055] The interprediction unit 254 generates a prediction block using the reference picture and inter-encoded information stored in the decoded picture buffer 256. The inter-encoded information may include a set of motion information for the current block relative to the reference block (reference picture index, motion vector information, etc.). Interpretation can be L0 prediction, L1 prediction, or bi-prediction. L0 prediction is a prediction using one reference picture included in the L0 picture list, and L1 prediction is a prediction using one reference picture included in the L1 picture list. For this, one set of motion information (e.g., motion vector and reference picture index) may be required. In the bi-prediction method, up to two reference regions can be used, and these two reference regions may reside in the same reference picture or in different pictures. That is, in the bi-prediction method, up to two sets of motion information (e.g., motion vector and reference picture index) may be used, and the two motion vectors may correspond to the same reference picture index or to different reference picture indexes. In this case, the reference picture may be displayed (or output) either before or after the current picture in terms of time. Also, in the dual prediction method, the two reference regions may exist in two reference picture lists.
[0056] The interpretation unit 254 can obtain a reference block for the current block using the motion vector and the reference picture index. The reference block resides within the reference picture corresponding to the reference picture index. Furthermore, the sample value of the block identified by the motion vector, or its interpolated value, may be used as the predictor for the current block. For motion prediction with sub-pel pixel accuracy, for example, an 8-tap interpolation filter may be used for the luma signal, and a 4-tap interpolation filter for the chroma signal. However, the interpolation filter for sub-pel motion prediction is not limited to this. In this way, the interpretation unit 254 performs motion compensation, predicting the texture of the current unit from a previously restored picture. At this time, the interpretation unit can use a motion information set.
[0057] In a further embodiment, the prediction unit 250 may include an intra-BC prediction unit (not shown). The intra-BC prediction unit performs intra-BC prediction from the recovered samples in the current picture and transmits the intra-BC encoded information to the entropy coding unit 160. The intra-BC prediction unit obtains a block vector value of the current region that indicates a specific region in the current picture. The intra-BC prediction unit can perform intra-BC prediction using the obtained block vector value. The intra-BC prediction unit transmits the intra-BC encoded information to the entropy coding unit 160. The intra-BC encoded information may include block vector information.
[0058] The predicted values output from the intra-prediction unit 252 or the inter-prediction unit 254 and the residual values output from the inverse conversion unit 225 are added together to generate a restored video picture. In other words, the video signal decoding device 200 restores the current block using the predicted block generated by the prediction unit 250 and the residual obtained from the inverse conversion unit 225.
[0059] On the other hand, the block diagram in Figure 2 shows a decoding device 200 according to one embodiment of the present disclosure, where the separately displayed blocks logically distinguish and represent the elements of the decoding device 200. Therefore, the elements of the decoding device 200 described above may be mounted as one chip or multiple chips depending on the device design. According to one embodiment, the operation of each element of the decoding device 200 described above may be performed by a processor (not shown).
[0060] Figure 3 shows an example in which a Coding Tree Unit (CTU) is divided into Coding Units (CUs) within a picture. In the coding process of a video signal, the picture may be divided into a sequence of Coding Tree Units (CTUs). A Coding Tree Unit consists of two blocks: an NXN block of luma samples and a corresponding chroma sample. A Coding Tree Unit may be divided into multiple Coding Units. A Coding Tree Unit may also become a leaf node without being divided. In this case, the Coding Tree Unit itself can become a Coding Unit. A Coding Unit refers to a basic unit for processing a picture in the video signal processing process described above, i.e., intra / inter prediction, transformation, quantization and / or entropy coding. The size and shape of a Coding Unit within a single picture do not have to be constant. A Coding Unit may have a square or rectangular shape. A rectangular Coding Unit (or rectangular block) includes a vertical Coding Unit (or vertical block) and a horizontal Coding Unit (or horizontal block). In this specification, a vertical block is a block whose height is greater than its width, and a horizontal block is a block whose width is greater than its height. In this specification, a non-square block may represent a rectangular block, but this disclosure is not limited thereto.
[0061] Referring to Figure 3, the coding tree unit is first divided into a quad tree (QT) structure. That is, one node with a size of 2N × 2N in the quad tree structure may be divided into four nodes with a size of N × N. In this specification, a quad tree can also be called a quaternary tree. The quad tree division may be performed recursively, and it is not necessary for all nodes to be divided to the same depth.
[0062] On the other hand, the leaf nodes of the aforementioned quad tree may be further divided into a multi-type tree (MTT) structure. According to embodiments of this disclosure, in a multi-type tree structure, one node may be divided into a binary or ternary tree structure with horizontal or vertical partitioning. That is, there are four partitioning structures in a multi-type tree structure: vertical binary partitioning, horizontal binary partitioning, vertical ternary partitioning, and horizontal ternary partitioning. According to embodiments of this disclosure, in each of the tree structures, the width and height of the nodes may both be powers of 2. For example, in a binary tree (BT) structure, a 2N × 2N node may be divided into two N × 2N nodes by vertical binary partitioning and into two 2N × N nodes by horizontal binary partitioning. Furthermore, in a Ternary Tree (TT) structure, a 2N×2N node may be divided into (N / 2)×2N, N×2N, and (N / 2)×2N nodes by vertical ternary partitioning, and into 2N×(N / 2), 2N×N, and 2N×(N / 2) nodes by horizontal binary partitioning. Such multi-type tree partitioning may be performed recursively.
[0063] In a multi-type tree, leaf nodes can be coding units. If no division is instructed for a coding unit, or if the coding unit is not larger than the maximum transformation length, the coding unit is used as the unit of prediction and transformation without further division. On the other hand, in the quad-tree and multi-type tree described above, at least one of the following parameters may be predefined or transmitted in a higher-level set of RBSP such as PPS, SPS, or VPS: 1) CTU size: the size of the root node of the quad-tree, 2) MinQtSize: the minimum allowed QT leaf node size, 3) MaxBtSize: the maximum allowed BT root node size, 4) MaxTtSize: the maximum allowed TT root node size, 5) MaxMttDepth: the maximum allowed depth of MTT division from the leaf nodes of the QT, 6) MinBtSize: the minimum allowed BT leaf node size, 7) MinTtSize: the minimum allowed TT leaf node size.
[0064] Figure 4 shows one example of a method for signaling the splitting of quad trees and multi-type trees. The flags already set may be used to signal the splitting of quad trees and multi-type trees as described above. Referring to Figure 4, at least one of the following may be used: 'qt_split_flag', which indicates whether or not a quad tree node will be split; 'mtt_split_flag', which indicates whether or not a multi-type tree node will be split; 'mtt_split_vertical_flag', which indicates the splitting direction of a multi-type tree node; or 'mtt_split_binary_flag', which indicates the splitting shape of a multi-type tree node.
[0065] According to embodiments of this disclosure, a coding tree unit is the root node of a quad tree and may first be split into a quad tree structure. In the quad tree structure, a 'qt_split_flag' is signaled for each node 'QT_node'. If the value of 'qt_split_flag' is 1, the node is split into four square nodes, and if the value of 'qt_split_flag' is 0, the node becomes a leaf node 'QT_leaf_node' of the quad tree.
[0066] Each quadtree leaf node 'QT_leaf_node' may be further divided into a multitype tree structure. In the multitype tree structure, a 'mtt_split_flag' is signaled for each node 'MTT_node'. If the value of 'mtt_split_flag' is 1, the node is divided into multiple rectangular nodes, and if the value of 'mtt_split_flag' is 0, the node becomes a leaf node 'MTT_leaf_node' in the multitype tree. When a multitype tree node 'MTT_node' is divided into multiple rectangular nodes (i.e., when the value of 'mtt_split_flag' is 1), 'mtt_split_vertical_flag' and 'mtt_split_binary_flag' may be further signaled for the node 'MTT_node'. A value of 'mtt_split_vertical_flag' of 1 indicates a vertical split of node 'MTT_node', and a value of 'mtt_split_vertical_flag' of 0 indicates a horizontal split of node 'MTT_node'. Additionally, a value of 'mtt_split_binary_flag' of 1 splits node 'MTT_node' into two rectangular nodes, and a value of 'mtt_split_binary_flag' of 0 splits node 'MTT_node' into three rectangular nodes.
[0067] Picture prediction (motion compensation) for coding is performed on coding units that cannot be further subdivided (i.e., leaf nodes in the coding unit tree). The basic unit for performing such predictions is referred to below as a prediction unit or prediction block.
[0068] Hereinafter, the term "unit" as used herein may be used as a substitute for the prediction unit, which is the basic unit for making predictions. However, this disclosure is not limited thereto, and may be understood more broadly as a concept including the coding unit.
[0069] Figures 5 and 6 further illustrate the intra-prediction method according to an embodiment of the present disclosure. As described above, the intra-prediction unit predicts the sample value of the current block using the restored sample located to the left and / or above the current block as a reference sample.
[0070] First, Figure 5 shows an example of a reference sample used for predicting the current block in intra-prediction mode. In this example, the reference sample may be a sample adjacent to the left boundary and / or the upper boundary of the current block. As shown in Figure 5, when the size of the current block is W×H and a single reference line sample adjacent to the current block is used for intra-prediction, the reference sample may be set using up to 2W+2H+1 peripheral samples located to the left and / or above the current block.
[0071] According to further embodiments of the present disclosure, samples on multiple reference lines may be used for intra-prediction of the current block. The multiple reference lines may consist of n lines located within a predetermined distance from the boundary of the current block. In this case, another reference line information indicating at least one reference line used for intra-prediction of the current block may be signaled. Specifically, the reference line information may include an index indicating any one of the multiple reference lines.
[0072] Furthermore, if at least some of the samples used as reference samples have not yet been restored, the intra-prediction unit can perform a reference sample padding process to obtain reference samples. The intra-prediction unit can also perform a reference sample filtering process to reduce the error of the intra-prediction. That is, it can filter the peripheral samples and / or the reference samples obtained through the reference sample padding process to obtain filtered reference samples. The intra-prediction unit uses the reference samples thus obtained to predict the samples of the current block. The intra-prediction unit uses either the unfiltered or filtered reference samples to predict the samples of the current block. In this disclosure, peripheral samples may include samples on at least one reference line. For example, peripheral samples may include adjacent samples on lines adjacent to the boundary of the current block.
[0073] Next, Figure 6 shows an example of a prediction mode used for intra-prediction. For intra-prediction, intra-prediction mode information indicating the intra-prediction direction may be signaled. The intra-prediction mode information indicates one of several intra-prediction modes that constitute an intra-prediction mode set. When the current block is an intra-prediction block, the decoder receives the intra-prediction mode information for the current block from the bitstream. The intra-prediction unit of the decoder performs intra-prediction for the current block based on the extracted intra-prediction mode information.
[0074] According to embodiments of this disclosure, an intra-prediction mode set may include all intra-prediction modes used for intra-prediction (e.g., a total of 67 intra-prediction modes). More specifically, an intra-prediction mode set may include a planar mode, a DC mode, and a plurality of (e.g., 65) angular modes (i.e., directional modes). Each intra-prediction mode may be indicated by a pre-defined index (i.e., an intra-prediction mode index). For example, as shown in Figure 6, intra-prediction mode index 0 indicates a planar mode, and intra-prediction mode index 1 indicates a DC mode. Intra-prediction mode indices 2 to 66 may each indicate different angular modes. Each angular mode indicates a different angle within a pre-defined angular range. For example, an angular mode may indicate an angle within an angular range of 45° to -135° in a clockwise direction (i.e., a first angular range). The angular modes may be defined relative to the 12 o'clock direction. At this time, intra-prediction mode index 2 indicates horizontal diagonal (HDIA) mode, intra-prediction mode index 18 indicates horizontal (HOR) mode, intra-prediction mode index 34 indicates diagonal (DIA) mode, intra-prediction mode index 50 indicates vertical (VER) mode, and intra-prediction mode index 66 indicates vertical diagonal (VDIA) mode.
[0075] On the other hand, the already set angle range may be set differently depending on the shape of the block. For example, if the block is currently a rectangular block, a wide-angle mode may be used that shows angles greater than 45° or less than -135° in the clockwise direction. If the block is currently a horizontal block, the angle mode can show angles within the angle range of (45+offset1)° to (-135+offset1)° in the clockwise direction (i.e., a second angle range). In this case, angle modes 67 to 80, which are outside the first angle range, may be used. Also, if the block is currently a vertical block, the angle mode can show angles within the angle range of (45-offset2)° to (-135-offset2)° in the clockwise direction (i.e., a third angle range). In this case, angle modes -10 to -1, which are outside the first angle range, may be used. According to embodiments of this disclosure, the values of offset1 and offset2 may be determined individually by the ratio of the width to the height of the rectangular block. Furthermore, offset1 and offset2 may be positive numbers.
[0076] According to further embodiments of the present disclosure, the set of intra-predictive modes may include a base angle mode and an extended angle mode. The extended angle mode may be determined based on the base angle mode.
[0077] According to one embodiment, the basic angle mode may be a mode corresponding to the angle used in the intra-prediction of the existing HEVC (High Efficiency Video Coding) standard, and the extended angle mode may be a mode corresponding to the angle newly added in the intra-prediction of the next-generation video codec standard. More specifically, the basic angle mode may be an angle mode corresponding to one of the intra-prediction modes {2, 4, 6, ..., 66}, and the extended angle mode may be an angle mode corresponding to one of the intra-prediction modes {3, 5, 7, ..., 65}. That is, the extended angle mode may be an angle mode between the basic angle modes within a first angle range. Therefore, the angle indicated by the extended angle mode may be determined based on the angle indicated by the basic angle mode.
[0078] In other embodiments, the basic angle mode may be a mode corresponding to an angle within a previously set first angle range, and the extended angle mode may be a wide-angle mode outside the first angle range. That is, the basic angle mode may be an angle mode corresponding to one of the intra-prediction modes {2,3,4,…,66}, and the extended angle mode may be an angle mode corresponding to one of the intra-prediction modes {-10,-9,…,-1} and {67,68,…,76}. The angle represented by the extended angle mode may be determined as the opposite angle of the angle represented by the corresponding basic angle mode. Therefore, the angle represented by the extended angle mode may be determined based on the angle represented by the basic angle mode. On the other hand, the number of extended angle modes is not limited thereto, and further extended angles may be defined by the size and / or shape of the block. For example, the extended angle mode may be defined as an angle mode corresponding to one of the intra-prediction modes {-14,-13,…,-1} and {67,68,…,80}. On the other hand, the total number of intra-prediction modes included in the intra-prediction mode set may vary depending on the configuration of the basic angle mode and extended angle mode described above.
[0079] In the above embodiment, the intervals between extended angle modes may be set based on the intervals between corresponding basic angle modes. For example, the interval between extended angle modes {3, 5, 7, ..., 65} may be determined based on the intervals between corresponding basic angle modes {2, 4, 6, ..., 66}. Also, the interval between extended angle modes {-10, -9, ..., -1} may be determined based on the intervals between the corresponding opposite basic angle modes {56, 57, ..., 65}, and the interval between extended angle modes {67, 68, ..., 76} may be determined based on the intervals between the corresponding opposite basic angle modes {3, 4, ..., 12}. The angle intervals between extended angle modes may be set to be the same as the angle intervals between corresponding basic angle modes. Furthermore, the number of extended angle modes in an intra-prediction mode set may be set to be less than or equal to the number of basic angle modes.
[0080] According to embodiments of the present disclosure, extended angle modes may be signaled based on basic angle modes. For example, a wide-angle mode (i.e., an extended angle mode) can substitute for at least one angle mode (i.e., a basic angle mode) within a first angle range. The substitute basic angle mode may be an angle mode corresponding to the opposite side of the wide-angle mode. That is, the substitute basic angle mode is an angle mode corresponding to an angle in the opposite direction to the angle shown by the wide-angle mode, or an angle that is off by a pre-set offset index from the angle in the opposite direction. According to embodiments of the present disclosure, the pre-set offset index is 1. The intra-predictive mode index corresponding to the substitute basic angle mode can be remapped to a wide-angle mode to signal the wide-angle mode. For example, wide-angle modes {-10, -9, ..., -1} may be signaled by intra-predictive mode indices {57, 58, ..., 66}, respectively, and wide-angle modes {67, 68, ..., 76} may be signaled by intra-predictive mode indices {2, 3, ..., 11}, respectively. Thus, by having the intra-prediction mode index for the basic angle mode signal the extended angle mode, the same set of intra-prediction mode indices can be used for signaling the intra-prediction mode even if the configuration of the angle modes used for intra-prediction in each block differs from one another. Therefore, the signaling overhead due to changes in the intra-prediction mode configuration can be minimized.
[0081] On the other hand, whether or not the extended angle mode is used may be determined based on at least one of the current block's shape and size. In one embodiment, if the current block's size is larger than a previously set size, the extended angle mode may be used for intra-prediction of the current block; otherwise, only the basic angle mode may be used for intra-prediction of the current block. In another embodiment, if the current block is not a square block, the extended angle mode may be used for intra-prediction of the current block; if the current block is a square block, only the basic angle mode may be used for intra-prediction of the current block.
[0082] The intra-prediction unit determines the reference sample and / or interpolated reference sample to be used for intra-prediction of the current block based on the intra-prediction mode information of the current block. When the intra-prediction mode index indicates a specific angle mode, the reference sample or interpolated reference sample corresponding to the specific angle from the current sample of the current block is used for predicting the current sample. Therefore, different sets of reference samples and / or interpolated reference samples may be used for intra-prediction depending on the intra-prediction mode. Once intra-prediction of the current block has been performed using the reference sample and intra-prediction mode information, the decoder adds the current block's residual signal obtained from the inverse transformer unit to the current block's intra-predicted value to restore the current block's sample value.
[0083] An interpretation method according to one embodiment of the present disclosure will be described below with reference to Figure 7. In the present disclosure, the interpretation method may include a general interpretation method optimized for translation motion and an affine model-based interpretation method. The motion vector may also include at least one of a general motion vector for motion compensation by the general interpretation method and a control point motion vector for affine motion compensation.
[0084] Figure 7 shows an inter-prediction method according to one embodiment of the present disclosure. As described above, the decoder can predict the current block by referring to a restored sample of another decoded picture. Referring to Figure 7, the decoder obtains a reference block 702 in reference picture 720 based on the motion information set of the current block 701. The motion information set may include a reference picture index and a motion vector 703. The reference picture index indicates the reference picture 720 in the reference picture list that contains the reference block for inter-prediction of the current block. In one embodiment, the reference picture list may include at least one of the L0 picture list or L1 picture list described above. The motion vector 703 indicates the offset between the coordinate values of the current block 701 in the current picture 710 and the coordinate values of the reference block 702 in reference picture 720. The decoder obtains a predictor of the current block 701 based on the sample values of the reference block 702 and uses the predictor to restore the current block 701.
[0085] Specifically, the encoder can search for a block similar to the current block from the picture that is restored earlier, and obtain the aforementioned reference block. For example, the encoder can search for a reference block within a pre-set search area that minimizes the sum of the differences between the current block and the sample values. At this time, at least one of SAD (Sum of Absolute Difference) or SATD (Sum of Hadamard Transformed Difference) may be used to measure the similarity between the samples of the current block and the reference block. Here, SAD may be the sum of all the absolute values of the differences between the sample values contained in the two blocks. SATD may be the sum of all the absolute values of the Hadamard Transform coefficients obtained by performing a Hadamard Transform on the differences between the sample values contained in the two blocks.
[0086] On the other hand, the current block may be predicted using one or more reference regions. As mentioned above, the current block may be interpreted by a dual prediction scheme using two or more reference regions. In one embodiment, the decoder can obtain two reference blocks based on two sets of motion information of the current block. The decoder can also obtain a first predictor and a second predictor of the current block based on the sample values of the two obtained reference blocks. The decoder can then reconstruct the current block using the first and second predictors. For example, the decoder can reconstruct the current block based on the sample-by-sample average of the first and second predictors.
[0087] As mentioned above, one or more motion information sets may be signaled for motion compensation of the current block. In this case, the similarity between the motion information sets for the motion compensation of multiple blocks may be used. For example, the motion information set used for predicting the current block may be derived from the motion information set used for predicting one of the other samples that have already been restored. This allows the encoder and decoder to reduce signaling overhead.
[0088] For example, there may be multiple candidate blocks that could have been predicted based on motion information sets identical or similar to the motion information set of the current block. The decoder can generate a merge candidate list. The decoder can generate a merge candidate list based on the multiple candidate blocks in question. Here, the merge candidate list may include candidates corresponding to samples that were restored before the current block and that could have been predicted based on motion information sets related to the motion information set of the current block. The merge candidate list may include spatial or temporal candidates. The merge candidate list may be generated based on the positions of samples restored before the current block. Samples restored before the current block may be adjacent blocks to the current block. Adjacent blocks to the current block can mean blocks adjacent to the current block. The encoder and decoder can construct a merge candidate list for the current block according to predefined rules. In this case, the merge candidate lists constructed by the encoder and decoder may be identical to each other. For example, the encoder and decoder can construct a merge candidate list for the current block based on the position of the current block in the current picture. In this disclosure, the position of a particular block refers to the relative position of the top-left sample of the particular block within the picture containing the particular block.
[0089] Figure 8 shows how the motion vector of the current block is signaled according to one embodiment of the present disclosure. According to one embodiment of the present disclosure, the motion vector of the current block may be derived from a motion vector predictor (MVP) of the current block. According to one embodiment, the motion vector predictor referenced to derive the motion vector of the current block may be obtained using a motion vector predictor (MVP) candidate list. The MVP candidate list may contain a set number of MVP candidates (Candidate1, Candidate2, ..., Candidate N).
[0090] In one embodiment, the MVP candidate list may include at least one of either spatial or temporal candidates. A spatial candidate may be a set of motion information used to predict surrounding blocks within a certain range from the current block in the current picture. The spatial candidate may be constructed based on available surrounding blocks of the current block. A temporal candidate may be a set of motion information used to predict blocks in the current picture and other pictures. For example, a temporal candidate may be constructed based on a specific block corresponding to the position of the current block in a specific reference picture. In this case, the position of the specific block represents the position of the top-left sample of the specific block in the reference picture. In a further embodiment, the MVP candidate list may include zero motion vectors. In a further embodiment, a rounding process may be performed on the MVP candidates included in the MVP candidate list for the current block. In this case, the resolution of the motion vector difference value of the current block, as described later, may be used. For example, each MVP candidate for the current block may be rounded based on the resolution of the motion vector difference value of the current block.
[0091] In this disclosure, the MVP candidate list may include a list of improved temporal motion vector prediction (ATMVP, or subblock-based temporal motion vector prediction, SbTMVP), a list of merge candidates for merge inter prediction, a list of control point motion vector candidates for affine motion compensation, a list of subblock-based temporal motion vector prediction (STMVP) for subblock-based motion compensation, and combinations thereof.
[0092] In one embodiment, the encoder 810 and decoder 820 can construct an MVP candidate list for motion compensation of the current block. For example, there may be candidates corresponding to samples recovered before the current block that could have been predicted based on a motion information set identical or similar to the motion information set of the current block. The encoder 810 and decoder 820 can construct an MVP candidate list for the current block based on the multiple candidate blocks in question. In this case, the encoder 810 and decoder 820 can construct the MVP candidate list according to rules predefined between the encoder 810 and decoder 820. That is, the MVP candidate lists constructed in the encoder 810 and decoder 820 may be identical to each other.
[0093] Furthermore, the predefined rules may differ depending on the prediction mode of the current block. For example, if the prediction mode of the current block is an affine model-based affine prediction mode, the encoder and decoder may construct the MVP candidate list for the current block using a first method based on the affine model. The first method may be a method for obtaining a control point motion vector candidate list. On the other hand, if the prediction mode of the current block is a general interpretation mode not based on the affine model, the encoder and decoder may construct the MVP candidate list for the current block using a second method not based on the affine model. In this case, the first and second methods may be different from each other.
[0094] The decoder 820 can derive the motion vector of the current block based on one of at least one MVP candidate included in the current block's MVP candidate list. For example, the encoder 810 can signal an MVP index (index) indicating a motion vector predictor to be referenced to derive the motion vector of the current block. Signaling means that the encoder generates the signal as a bitstream and the decoder 820 parses from the bitstream. The MVP index may include a merge index for a merge candidate list. The decoder 820 can obtain the motion vector predictor of the current block based on the signaled MVP index. The decoder 820 can derive the motion vector of the current block using the motion vector predictor. In one embodiment, the decoder 820 can use a motion vector predictor obtained from the MVP candidate list as the motion vector of the current block without another motion vector difference value. For example, the decoder 820 can select a motion vector from a merge list based on a merge index.
[0095] The decoder 820 can reconstruct the current block based on the motion vector of the current block. The inter-prediction mode in which the motion vector predictor obtained from the MVP candidate list is used as the motion vector of the current block without another motion vector difference value can be called the merge mode.
[0096] In another embodiment, the decoder 820 can obtain another motion vector difference value for the motion vector of the current block. The decoder 820 can obtain the motion vector of the current block by summing the motion vector predictor obtained from the MVP candidate list with the motion vector difference value of the current block. In this case, the encoder 810 can signal a motion vector difference value (MV difference) representing the difference between the motion vector of the current block and the motion vector predictor. The method by which the motion vector difference value is signaled will be specifically explained with reference to Figure 9. Based on the motion vector difference value (MV difference), the decoder 820 can obtain the motion vector of the current block. Based on the motion vector of the current block, the decoder 820 can reconstruct the current block.
[0097] Furthermore, a reference picture index for motion compensation of the current block may be signaled. Encoder 810 can signal a reference picture index indicating a reference picture containing the reference block. Based on the signaled reference picture index, decoder 820 can obtain the POC of the reference picture referenced for restoring the current block. At this time, the POC of the reference picture may differ from the POC of the reference picture corresponding to the MVP referenced to induce the motion vector of the current block. In this case, decoder 820 can perform motion vector scaling. That is, decoder 820 can scale the MVP to obtain MVP'. At this time, motion vector scaling may be performed based on the POC of the current picture, the POC of the signaled reference picture of the current block, and the POC of the reference picture corresponding to the MVP. Decoder 820 can also use MVP' as a motion vector predictor for the current block.
[0098] As mentioned above, the motion vector of the current block can be obtained by summing the motion vector predictor and the motion vector difference value of the current block. At this time, the motion vector difference value may be signaled by an encoder. The encoder can encode the motion vector difference value to generate information indicating the motion vector difference value and signal it. Below, a method by which the motion vector difference value is signaled according to one embodiment of this disclosure will be described.
[0099] Figure 9 shows how the motion vector difference value of the current block is signaled according to one embodiment of the present disclosure. According to one embodiment, the information indicating the motion vector difference value may include at least one of the absolute value information of the motion vector difference value or the sign information of the motion vector difference value. The absolute value and sign of the motion vector difference value may be encoded separately.
[0100] In one embodiment, the absolute value of the motion vector difference value does not have to be signaled by the value itself. The encoder can reduce the size of the signaled value by using at least one flag that indicates the characteristics of the absolute value of the motion vector difference value. The decoder can derive the absolute value of the motion vector difference value from the signaled value using at least one flag.
[0101] For example, at least one flag may include a first flag indicating whether the absolute value of the motion vector difference is greater than N. N may be an integer. If the absolute value of the motion vector difference is greater than N, the value (absolute value of motion vector difference - N) may be signaled along with the activated first flag. The activated flag can then indicate that the absolute value of the motion vector difference is greater than N. The decoder can then obtain the absolute value of the motion vector difference based on the activated first flag and the signaled value.
[0102] Referring to Figure 9, a second flag (abs_mvd_greater0_flag) may be signaled, indicating whether the absolute value of the motion vector difference is greater than '0'. If the second flag (abs_mvd_greater0_flag[]) indicates that the absolute value of the motion vector difference is not greater than '0', then the absolute value of the motion vector difference may be '0'. Also, if the second flag (abs_mvd_greater0_flag) indicates that the absolute value of the motion vector difference is greater than '0', the decoder can obtain the absolute value of the motion vector difference using other information about the motion vector difference.
[0103] In one embodiment, a third flag (abs_mvd_greater1_flag) indicating whether the absolute value of the motion vector difference is greater than '1' may be signaled. If the third flag (abs_mvd_greater1_flag) indicates that the absolute value of the motion vector difference is not greater than '1', the decoder can determine that the absolute value of the motion vector difference is '1'.
[0104] Conversely, if the third flag (abs_mvd_greater1_flag) indicates that the absolute value of the motion vector difference is greater than '1', the decoder can use other information about the motion vector difference to obtain its absolute value. For example, the value (absolute value of motion vector difference - 2) (abs_mvd_minus2) may be signaled, because if the absolute value of the motion vector difference is greater than '1', the absolute value of the motion vector difference can be 2 or greater.
[0105] As mentioned above, the absolute value of the current block's motion vector difference may be transformed into at least one flag. For example, the transformed absolute value of the motion vector difference can be represented by the size of the motion vector difference, i.e., (absolute value of motion vector difference - N). In one embodiment, the transformed absolute value of the motion vector difference may be signaled by at least one bit. In this case, the number of bits signaled to indicate the transformed absolute value of the motion vector difference may be variable. The encoder can encode the transformed absolute value of the motion vector difference using a variable-length binary method. For example, the encoder can use at least one of the following variable-length binary methods: truncated unary binary, unary binary, truncated rice, or exp-Golomb binary.
[0106] Furthermore, the sign of the motion vector difference value may be signaled by a sign flag (mvd_sign_flag). Alternatively, the sign of the motion vector difference value may be implicitly signaled by sign-bit hiding.
[0107] Furthermore, in Figure 9, [0] and [1] can represent component indices. For example, they can represent x-component and y-component.
[0108] Figure 10 shows adaptive motion vector resolution signaling according to one embodiment of the present disclosure.
[0109] According to one embodiment of this disclosure, the resolution representing a motion vector or motion vector difference can vary. In other words, the resolution to which a motion vector or motion vector difference is encoded can vary. For example, the resolution can be represented based on pixels (pel). For example, a motion vector or motion vector difference can be signaled in units such as 1 / 4 (quarter), 1 / 2 (half), 1 (integer), 2, or 4 pixels. For example, to represent 16, if the unit is 1 / 4, it can be coded as 64 (1 / 4 * 64 = 16); if the unit is 1, it can be coded as 16 (1 * 16 = 16); and if the unit is 4, it can be coded as 4 (4 * 4 = 16). That is, the value can be determined as follows.
[0110] valueDetermined=resolution*valuePerResolution
[0111] Here, valueDetermined is the value to be transmitted, which in this embodiment may be a motion vector or a motion vector difference value. Also, valuePerResolution may be a value expressed in [ / resolution] units.
[0112] In this case, if the value signaled by the motion vector or motion vector difference is not divisible by the resolution, rounding or other methods may cause an inaccurate value to be sent instead of the motion vector or motion vector difference that provides the best prediction performance. Using a high resolution can reduce inaccuracy, but it may use more bits because the encoded value is large, while using a low resolution may increase inaccuracy, but it may use fewer bits because the encoded value is small.
[0113] Furthermore, the resolution can be set individually for units such as blocks, CUs, and slices. Therefore, the resolution can be applied adaptively according to the unit.
[0114] The resolution may be signaled from the encoder to the decoder. In this case, the signaling for the resolution may be binary signaling of the variable length as described above. In such a case, signaling with the index corresponding to the smallest value (the first value) reduces the signaling overhead.
[0115] As one example, the signaling index can be matched in order from high resolution (fine signaling) to low resolution.
[0116] Figure 10 shows the signaling for three resolutions. In this case, the three signalings can be 0, 10, and 11, and each of the three signalings can correspond to resolution 1, resolution 2, and resolution 3. One bit is required to signal resolution 1, and two bits are required to signal the remaining resolutions, thus the signaling overhead is low when signaling resolution 1. In the example in Figure 10, resolutions 1, 2, and 3 are 1 / 4, 1, and 4pel, respectively.
[0117] In the following invention, motion vector resolution can mean the resolution of the motion vector difference value.
[0118] Figure 11 shows the inter-prediction related syntax according to one embodiment of the present disclosure.
[0119] According to one embodiment of this disclosure, the inter-prediction method may include skip mode, merge mode, inter-mode, etc. According to one embodiment, in skip mode, the residual signal does not need to be transmitted. Also, an MV determination method such as merge mode can be used in skip mode. Whether or not skip mode is used may be determined by a skip flag. Referring to Figure 11, whether or not skip mode is used may be determined by the cu_skip_flag value.
[0120] In one embodiment, in merge mode, it is not necessary to use the motion vector difference value. The motion vector can be determined based on the motion vector index. Whether or not merge mode is used may be determined by the merge flag. Referring to Figure 11, whether or not merge mode is used may be determined by the merge_flag value. Also, it is possible to use merge mode when skip mode is not used.
[0121] In skip mode or merge mode, it is possible to selectively use one or more candidate list types. For example, merge candidates or subblock merge candidates can be used. Merge candidates can also include spatial neighboring candidates, temporal candidates, etc. Merge candidates can also include candidates that use motion vectors for the entire current block (CU). That is, candidates can include those where the motion vectors of each subblock belonging to the current block are the same. Subblock merge candidates can also include subblock-based temporal MV, affine merge candidates, etc. Subblock merge candidates can also include candidates that allow different motion vectors to be used for each subblock of the current block (CU). Afine merge candidates may be methods created by determining the control point motion vectors of affine motion prediction without using motion vector difference values. Subblock merge candidates can also include methods for determining motion vectors on a subblock basis in the current block. For example, subblock merge candidates can include not only the subblock-based temporal MV and affine merge candidates mentioned above, but also planar MV, regression-based MV, STMVP, and others.
[0122] In one embodiment, motion vector difference values can be used in intermode. A motion vector predictor can be determined based on the motion vector index, and a motion vector can be determined based on the motion vector predictor and the motion vector difference value. Whether or not intermode is used may be determined by whether or not other modes are used. In yet another embodiment, whether or not intermode is used may be determined by a flag. Figure 11 shows an example in which intermode is used when other modes, skip mode and merge mode, are not used.
[0123] The intermode may include AMVP mode, affine intermode, etc. The intermode may be a mode that determines motion vectors based on motion vector predictors and motion vector difference values. The affine intermode may be a method that uses motion vector difference values when determining the control point motion vectors of affine motion prediction.
[0124] Referring to Figure 11, after determining whether to use skip mode or merge mode, it is possible to decide whether to use subblock merge candidates or merge candidates. For example, merge_subblock_flag, which indicates whether to use subblock merge candidates when certain conditions are met, can be parsed. These specific conditions may be related to block size. For example, they may be conditions related to width, height, area, etc., and these can be used in combination. Referring to Figure 11, for example, the condition may be when the width and height of the current block (CU) are greater than or equal to a certain value. When parsing merge_subblock_flag, its value can be inferred to be 0. For example, if merge_subblock_flag is 1, subblock merge candidates may be used, and if it is 0, merge candidates may be used. When using subblock merge candidates, the candidate index merge_subblock_idx can be parsed, and when using merge candidates, the candidate index merge_idx can be parsed. In this case, if the maximum number of items in the candidate list is 1, parsing is not required. If merge_subblock_idx or merge_idx is not parsed, it can be inferred as 0.
[0125] Figure 11 shows the coding_unit function, but the intra-prediction-related content is omitted, and Figure 11 should show the case where inter-prediction is determined.
[0126] Figure 12 shows a multi-hypothesis prediction according to one embodiment of the present disclosure.
[0127] As described above, the data can be encoded and decoded based on prediction blocks. According to one embodiment of this disclosure, prediction blocks can be generated based on a number of predictions. This can be called multi-hypothesis (MH) prediction. The prediction can mean a block generated by a certain prediction method. The prediction method in the number of predictions can include methods such as intra-prediction and inter-prediction. Alternatively, the prediction method in the number of predictions can be further subdivided to mean merge mode, AMVP mode, specific modes of intra-prediction, etc.
[0128] Furthermore, as a method for generating prediction blocks based on a large number of predictions, it is possible to perform a weighted sum of the predictions.
[0129] Alternatively, the maximum number of multiple predictions may already be set. For example, the maximum number of multiple predictions may be 2. Therefore, in the case of uni prediction, it is possible to generate prediction blocks from 2 predictions, and in the case of bi prediction, it is possible to generate prediction blocks from 2 predictions (when using multiple predictions only for predictions from one reference list) or 4 predictions (when using multiple predictions for predictions from two reference lists).
[0130] Alternatively, a set of prediction modes usable in multiple predictions may already be configured. Alternatively, a set of prediction mode combinations usable in multiple predictions may already be configured. For example, predictions generated by interpretation and intrapretation can be used. In this case, only some modes of interpretation or intrapretation can be used for multi-hypothesis prediction. For example, only the merge mode of interpretation can be used for multi-hypothesis prediction. Alternatively, only the merge modes other than subblock merge of interpretation can be used for multi-hypothesis prediction. Alternatively, only specific intra-modes of intrapretation can be used for multi-hypothesis prediction. For example, only the modes of intrapretation that include planar, DC, vertical, and horizontal modes can be used for multi-hypothesis prediction.
[0131] Therefore, for example, it is possible to generate prediction blocks based on the merge mode and predictions for intra-prediction. In this case, only planar, DC, vertical, and horizontal modes are allowed for intra-prediction.
[0132] Referring to Figure 12, prediction blocks are generated based on prediction 1 and prediction 2. At this time, prediction blocks are generated by a weighted sum of prediction 1 and prediction 2, and the weights of prediction 1 and prediction 2 are w1 and w2, respectively.
[0133] Furthermore, according to one embodiment of the present disclosure, when generating a prediction block based on a number of predictions, the weights of the number of predictions may be based on their positions within the block. Alternatively, the weights of the number of predictions may be based on the mode in which the predictions are generated.
[0134] For example, if one of the modes generating the prediction is intra-prediction, the weighting can be determined based on the prediction mode. For instance, if one of the modes generating the prediction is intra-prediction and is a directional mode, the weighting can be increased for locations farther from the reference sample. More specifically, if one of the modes generating the prediction is intra-prediction and is a directional mode, and the other mode generating the prediction is inter-prediction, the weighting can be increased for predictions generated based on the intra-prediction on the far side of the reference sample. This is because, in the case of inter-prediction, motion compensation can be performed based on spatial neighbor candidates, in which case there is a probability that the motion of the current block and the spatial neighbor block referenced for MC are identical or similar, and the prediction of the area containing the object with motion in the neighborhood of the spatial neighbor block is more accurate than other parts. Then, there may be more residual signal near the opposite side of the spatial neighbor block than other parts, but this can be offset by using intra-prediction in multi-hypothesis prediction. The reference sample position for intra-prediction can be near the spatial neighbor candidate for inter-prediction, so the weighting can be increased on the far side from there.
[0135] As yet another example, if one of the modes generating predictions is intra-prediction and the other is direction mode, the weighting of locations closer to the reference sample can be increased. More specifically, if one of the modes generating predictions is intra-prediction and the other is direction mode, the weighting of predictions generated based on intra-predictions closer to the reference sample can be increased. This is because intra-prediction can have high prediction accuracy in the vicinity of the reference sample.
[0136] As yet another example, if one of the modes generating the prediction is an intra-prediction and not a directional mode (for example, a planar or DC mode), then the weighting can be constant regardless of the position in the block.
[0137] Furthermore, in multi-hypothesis prediction, the weighting for prediction 2 can be determined based on the weighting for prediction 1.
[0138] The following is an example formula showing how to determine the predicted sample pbSamples based on a large number of predictions.
[0139] pbSamples[ x ][ y ] = Clip3( 0, ( 1 << bitDepth ) - 1, ( w * predSamples [ x ][ y ] + (8- w) * predSamplesIntra [ x ][ y ] ) >> 3 )
[0140] In the above equation, x and y can represent the coordinates of the sample within the block and may be within the following ranges: x = 0..nCbW-1 and y = 0..nCbH-1. Also, nCbW and nCbH may be the current width and height of the block, respectively. Furthermore, predSamples may be the blocks / samples generated by interpretation, and predSamplesIntra may be the blocks / samples generated by intrapretation. The weighted value w may be determined as follows.
[0141] - If predModeIntra is INTRA_PLANAR or INTRA_DC or nCbW < 4 or nCbH < 4 or cIdx > 0, w is set equal to 4.
[0142] - Otherwise, if predModeIntra is INTRA_ANGULAR50 and y < (nCbH / 4), w is set equal to 6.
[0143] - Otherwise, if predModeIntra is INTRA_ANGULAR50 and (nCbH / 4) <= y < (nCbH / 2), w is set equal to 5.
[0144] - Otherwise, if predModeIntra is INTRA_ANGULAR50 and (nCbH / 2) <= y < (3 * nCbH / 4), w is set equal to 4.
[0145] - Otherwise, if predModeIntra is INTRA_ANGULAR50 and (3 * nCbH / 4) <= y < nCbH, w is set equal to 3.
[0146] - Otherwise, if predModeIntra is INTRA_ANGULAR18 and x < (nCbW / 4), w is set equal to 6.
[0147] - Otherwise, if predModeIntra is INTRA_ANGULAR18 and (nCbW / 4) <= x < (nCbW / 2), w is set equal to 5.
[0148] - Otherwise, if predModeIntra is INTRA_ANGULAR18 and (nCbW / 2) <= x < (3 * nCbW / 4), w is set equal to 4.
[0149] - Otherwise, if predModeIntra is INTRA_ANGULAR18 and (3 * nCbW / 4) <= x < nCbW, w is set equal to 3.
[0150] Figure 13 shows a multi-hypothesis prediction-related syntax according to one embodiment of the present disclosure.
[0151] Referring to Figure 13, mh_intra_flag may be a flag indicating whether or not multi-hypothesis prediction is used. In one embodiment, multi-hypothesis prediction can be used only if mh_conditions are met, and if mh_conditions are not met, it is possible to infer that mh_intra_flag is 0 without parsing it. For example, mh_conditions may include conditions regarding block size. Also, mh_conditions may include conditions regarding whether or not to use a specific mode. For example, it is possible to parse mh_intra_flag when merge_flag is 1 and subblock_merge_flag is 0.
[0152] Furthermore, according to one embodiment of this disclosure, in order to determine the mode in multi-hypothesis prediction, it is possible to divide the candidate modes into a number of lists and signal which list to use. Referring to Figure 13, mh_intra_luma_mpm_flag may be a flag indicating which of the many lists to use. If mh_intra_luma_mpm_flag does not exist, it is possible to infer that it is 1. Also, in one embodiment of this disclosure, the number of lists may be MPM lists and non-MPM lists.
[0153] Furthermore, according to one embodiment of this disclosure, an index can be signaled to indicate which index candidate should be used for which list among the numerous lists. Referring to Figure 13, mh_intra_luma_mpm_idx may be that index. Also, in one embodiment, the index can be signaled only when a specific list is selected. Referring to Figure 13, mh_intra_luma_mpm_idx can be parsed only when any list is determined by mh_intra_luma_mpm_flag.
[0154] For example, as shown in the embodiment described in Figure 12, multi-hypothesis prediction can be performed based on predictions generated by inter-prediction and predictions generated by intra-prediction. Furthermore, multi-hypothesis prediction can be performed only when signaled to use inter-prediction. Alternatively, multi-hypothesis prediction can be performed only when signaled to use a specific mode of inter-prediction, such as merge mode. In this case, separate signaling for inter-prediction is not required. Also, in one embodiment, when generating predictions with intra-prediction, there may be a total of four candidate modes. These four candidate modes can then be divided into List1 (3) and List2 (1). In this case, if List2 is selected, the index does not need to be signaled. If List1 is selected, the index can be signaled, but since List1 contains three candidates, it may require variable-length coding for signaling, and 1 or 2 bits may be needed for index signaling.
[0155] Figure 14 shows a multi-hypothesis prediction-related syntax according to one embodiment of the present disclosure.
[0156] As explained in Figure 13, there may be signaling that indicates which list to use, and in Figures 13-14, mh_intra_luma_mpm_flag may be that.
[0157] According to one embodiment of this disclosure, the signaling indicating which list to use may be explicitly signaled only in specific cases. Furthermore, if it is not explicitly signaled, the signaling value can be inferred in a previously configured manner. Referring to Figure 14, if the condition mh_mpm_infer_condition is met, there may be no explicit signaling; if the condition is not met, there may be explicit signaling. Also, if the mh_mpm_infer_condition is met, and mh_intra_luma_mpm_flag does not exist, it can be inferred to be 1. That is, it can be inferred that an MPM list is being used.
[0158] Figure 15 shows a multi-hypothesis prediction-related syntax according to one embodiment of the present disclosure.
[0159] As explained in Figures 13 and 14, there may be signaling that indicates which list to use, and its value can be inferred if certain conditions are met.
[0160] According to one embodiment of the present disclosure, the conditions for inferring a signaling value indicating which list to use may be based on the current block size. For example, they may be based on the width and height of the current block. More specifically, the signaling value can be inferred if the larger of the width and height of the current block is greater than n times the smaller of the width and height. For example, n may be 2.
[0161] Referring to Figure 15, the condition for inferring the signaling value indicating which list to use is that the larger of the current block's width and height is greater than twice the smaller of the two. If the current block's width and height are cbWidth and cbHeight, respectively, the Abs(Log2(cbWidth / cbHeight)) value is 0 when cbWidth and cbHeight are the same, and 1 when the difference is twice as much. Therefore, when the difference between cbWidth and cbHeight is greater than twice, the Abs(Log2(cbWidth / cbHeight)) value will be greater than 1 (2 or more).
[0162] Figure 16 shows a multi-hypothesis prediction mode determination method according to one embodiment of the present disclosure.
[0163] As explained in Figures 13 to 15, mode determination may be based on a number of lists. The mode can mean an intra-mode that generates predictions based on intra-predictions. The number of lists can include List1 and List2. Referring to Figure 16, List1_flag can be used to determine whether or not to use List1. There may be many candidates that belong to List1, and only one candidate that belongs to List2. The number of lists may consist of two lists.
[0164] If List1_flag is inferred, its value can be inferred to indicate that List1 will be used. In that case, List1_index, which is an index indicating which candidate in List1 will be used, can be parsed. Also, if List1_flag is not inferred, List1_flag can be parsed. If List1_flag is 1, List1_index can be parsed, and if List1_flag is not 1, the index does not need to be parsed. Also, if List1_flag is 1, the mode to be actually used can be determined from the candidate modes in List1 based on the index. Also, if List1_flag is not 1, the mode to be actually used can be determined from the candidate modes in List2 without an index. In other words, the mode in List1 may be determined based on the flag and the index, and the mode in List2 may be determined based on the flag.
[0165] Figure 17 shows a candidate list generation method according to one embodiment of the present disclosure.
[0166] According to one embodiment of this disclosure, when coding a variable-length index for determining candidate modes in a list, a method may exist to determine the order of modes included in the candidate list in order to improve coding efficiency. For example, a method may exist to determine the order of modes included in List1. In this case, the modes around the current block can be referenced to determine the mode order. Alternatively, List2 can be determined without referencing the modes around the current block. For example, List1 can be generated by referencing the modes around the current block, and modes not included in List1 can be included in List2.
[0167] Furthermore, List1 may be an MPM mode, and List2 may be a non-MPM mode. Also, there are a total of 4 candidate modes, and List1 may contain 3 modes and List2 may contain 1 mode.
[0168] Referring to Figure 17, there may be a signaling element called List1_flag that indicates whether or not List1 is used. If List1 is used, List1 may be generated and a mode in List1 may be selected. In this case, the order in which List1 is generated and whether or not List1 is used does not matter. However, in situations where List1 is used, List1 may be generated before or after confirming whether or not List1 is used. Also, if List1 is used, the process of generating List2 does not need to be performed. If List1 is not used, List2 may be generated and a mode in List2 may be selected. In this case, it is possible to generate List1 in order to generate List2. And it is possible to include in List2 any candidate modes that are not included in List1.
[0169] Furthermore, according to one embodiment of this disclosure, the method for generating List1 may be the same regardless of whether List1 is used or not (List1_flag value), whether or not List1 is used or not, etc.
[0170] In this case, List signaling and mode signaling can be implemented according to the embodiments described above, as shown in Figure 16.
[0171] Next, the method for generating multiple lists, as described in Figures 16 and 17, will be further explained. These multiple lists may include List1 and List2. Furthermore, these multiple lists may be lists specifically used in a multi-hypothesis prediction process.
[0172] According to one embodiment of this disclosure, a large number of lists can be generated by referring to the modes around the current block. Furthermore, intraprediction can be performed using the mode selected from the large number of lists, and the intraprediction can be combined with interprediction (multi-hypothesis prediction) and used as a prediction block. In one embodiment, the modes that may be included in the large number of lists (candidate modes) may be the planar mode, DC mode, vertical mode, and horizontal mode of the intraprediction method. The vertical mode may be the mode at index 50 in Figure 6, and the horizontal mode may be the mode at index 18 in Figure 6. The planar mode and DC mode may be at index 0 and 1, respectively.
[0173] According to one embodiment of this disclosure, a candModeList can be generated by referring to the mode around the current block. The candModeList may be List1 as described in the previous embodiment. In one embodiment, there may be a candIntraPredModeX which is the mode around the current block or a mode based on the mode around the current block. Here, X may be a character such as A or B that indicates a specific location around the current block.
[0174] As one embodiment, a candModeList can be generated based on whether multiple candIntraPredModeX values match or not. For example, candIntraPredModeX may exist for two positions, which can be represented as candIntraPredModeA and candIntraPredModeB. If candIntraPredModeA and candIntraPredModeB are identical, candModeList can include both planar modes and DC modes.
[0175] If candIntraPredModeA and candIntraPredModeB are the same and their values indicate either planar mode or DC mode, the modes indicated by candIntraPredModeA and candIntraPredModeB can be added to candModeList. In this case, any mode among planar mode and DC mode that is not indicated by candIntraPredModeA and candIntraPredModeB can be added to candModeList. In this case, a mode that has already been set, rather than planar mode or DC mode, can be added to candModeList. In one embodiment, the order of planar mode, DC mode, and the previously set mode within candModeList may already be set. For example, the order may be planar, DC, and the previously set mode. That is, candModeList[0] = planar mode, candModeList[1] = DC mode, and candModeList[2] = the previously set mode. The previously set mode may be vertical mode. In yet another embodiment, in this case, the modes indicated by candIntraPredModeA and candIntraPredModeB among the planar mode, DC mode, and the previously set modes may be positioned at the top of candModeList, the modes not indicated by candIntraPredModeA and candIntraPredModeB among the planar mode and DC mode may be positioned after candModeList, and the previously set modes may be positioned after that.
[0176] Furthermore, if candIntraPredModeA and candIntraPredModeB are identical and their values do not indicate planar mode or DC mode, the modes indicated by candIntraPredModeA and candIntraPredModeB can be added to candModeList. Planar mode and DC mode may also be added to candModeList. In this case, the order of the modes indicated by candIntraPredModeA and candIntraPredModeB, the planar mode, and the DC mode within candModeList may already be set. The already set order may be the mode indicated by candIntraPredModeA and candIntraPredModeB, the planar mode, and the DC mode. That is, candModeList[0]=candIntraPredModeA, candModeList[1]=planar mode, and candModeList[2]=DC mode.
[0177] Furthermore, if candIntraPredModeA and candIntraPredModeB are different, both candIntraPredModeA and candIntraPredModeB can be added to candModeList. Also, candIntraPredModeA and candIntraPredModeB may be included in candModeList in a specific order. For example, they may be included in candModeList in the order candIntraPredModeA, candIntraPredModeB. In addition, there may be an already established order among the candidate modes, and modes other than candIntraPredModeA and candIntraPredModeB from among the modes that follow the already established order can be added to candModeList. Furthermore, the modes other than candIntraPredModeA and candIntraPredModeB may be located after candIntraPredModeA and candIntraPredModeB in candModeList. Also, the already established order may be planar mode, DC mode, and vertical mode. Alternatively, the previously set order may be planar mode, DC mode, vertical mode, horizontal mode. That is, candModeList[0] = candIntraPredModeA, candModeList[1] = candIntraPredModeB, and candModeList[2] may be the first mode among planar mode, DC mode, and vertical mode that is neither candIntraPredModeA nor candIntraPredModeB.
[0178] Furthermore, among the candidate modes, any mode not included in candModeList may become candIntraPredModeC. Also, candIntraPredModeC may be included in List2. Moreover, this allows candIntraPredModeC to be determined when the signaling indicating whether or not List1 is used indicates that it will not be used.
[0179] Furthermore, when using List1, the mode can be determined by the index within candModeList, and when not using List1, the mode of List2 can be used.
[0180] Furthermore, as explained, a process of modifying candModeList may be added after it has been generated. For example, depending on the current block size condition, the modification process may or may not be performed. For example, the current block size condition may be based on the width and height of the current block. For example, if the larger of the width and height of the current block is greater than n times the smaller of the two, the modification process may be performed. n may be 2.
[0181] Furthermore, the aforementioned modification process may be a process of substituting any mode included in candModeList with another mode. For example, if candModeList includes the vertical mode, the horizontal mode can be added to candModeList instead of the vertical mode. Or, if candModeList includes the vertical mode, candIntraPredModeC can be added to candModeList instead of the vertical mode. However, when the aforementioned candModeList is generated, the planar mode and DC mode may always be included in candModeList, in which case candIntraPredModeC may be the horizontal mode. Also, the use of such a modification process may be inferred when the height of the block is greater than n times the width. For example, n may be 2. This is because when the height is greater than the width, the lower part of the block is far from the reference sample for intra-prediction, which can result in lower accuracy for the vertical mode. Alternatively, the use of such a modification process may be inferred when using List1.
[0182] As yet another example of the aforementioned modification process, when candModeList contains horizontal mode, vertical mode can be added to candModeList instead of horizontal mode. Alternatively, when candModeList contains horizontal mode, candIntraPredModeC can be added to candModeList instead of horizontal mode. However, when generating the aforementioned candModeList, planar mode and DC mode may always be included in candModeList, in which case candIntraPredModeC may be vertical mode. Furthermore, such modification processes may be used when the width of the block is currently greater than n times its height. For example, n may be 2. This is because when the width is greater than the height, the accuracy of the horizontal mode may be lower because the right side of the block is farther from the reference sample for intra-prediction. Alternatively, such modification processes may be used when inferred using List1.
[0183] The above-mentioned example of list setting method is described again below. In the following, IntraPredModeY may be the mode used for intra prediction in multi-hypothesis prediction. This may also be the mode of the luma component. As one example, in multi-hypothesis prediction, the intra prediction mode of the chroma component may follow the mode of the luma component. Also, mh_intra_luma_mpm_flag may be a signaling indicating which list to use. That is, for example, mh_intra_luma_mpm_flag in Figures 13-15 and List1_flag in Figures 16-17. Also, mh_intra_luma_mpm_idx may be an index indicating which candidate in the list to use. That is, for example, mh_intra_luma_mpm_idx in Figures 13-15 and List1_index in Figure 16. Furthermore, xCb and yCb may be the x and y coordinates of the top-left edge of the block. Also, cbWidth and cbHeight may be the width and height of the block.
[0184] The candModeList[ x ] with x = 0..2 is derived as follows:
[0185] A. If candIntraPredModeB is equal to candIntraPredModeA, the following applies:
[0186] a. If candIntraPredModeA is less than 2 (i.e., equal to INTRA_PLANAR or INTRA_DC), candModeList[ x ] with x = 0..2 is derived as follows:
[0187] candModeList
[0000] = INTRA_PLANAR
[0188] candModeList
[0001] = INTRA_DC
[0189] candModeList
[0002] = INTRA_ANGULAR50
[0190] b. Otherwise, candModeList[ x ] with x = 0..2 is derived as follows:
[0191] candModeList
[0000] = candIntraPredModeA
[0192] candModeList
[0001] = INTRA_PLANAR
[0193] candModeList
[0002] = INTRA_DC
[0194] B. Otherwise (candIntraPredModeB is not equal to candIntraPredModeA), the following applies:
[0195] a. candModeList
[0000] and candModeList
[0001] are derived as follows:
[0196] candModeList
[0000] = candIntraPredModeA
[0197] candModeList
[0001] = candIntraPredModeB
[0198] b. If neither of candModeList
[0000] and candModeList
[0001] is equal to INTRA_PLANAR, candModeList
[0002] is set equal to INTRA_PLANAR,
[0199] c. Otherwise, if neither of candModeList
[0000] and candModeList
[0001] is equal to INTRA_DC, candModeList
[0002] is set equal to INTRA_DC,
[0200] d. Otherwise, candModeList
[0002] is set equal to INTRA_ANGULAR50.
[0201] IntraPredModeY[ xCb ][ yCb ] is derived by applying the following procedure:
[0202] A. If mh_intra_luma_mpm_flag[ xCb ][ yCb ] is equal to 1, the IntraPredModeY[ xCb ][ yCb ] is set equal to candModeList[ intra_luma_mpm_idx[ xCb ][ yCb ] ].
[0203] B. Otherwise, IntraPredModeY[ xCb ][ yCb ] is set to equal to candIntraPredModeC, derived by applying the following steps:
[0204] a. If neither of candModeList[ x ], x = 0..2 is equal to INTRA_PLANAR, candIntraPredModeC is set equal to INTRA_PLANAR,
[0205] b. Otherwise, if neither of candModeList[ x ], x = 0..2 is equal to INTRA_DC, candIntraPredModeC is set equal to INTRA_DC,
[0206] c. Otherwise, if neither of candModeList[ x ], x = 0..2 is equal to INTRA_ANGULAR50, candIntraPredModeC is set equal to INTRA_ANGULAR50,
[0207] d. Otherwise, if neither of candModeList[ x ], x = 0..2 is equal to INTRA_ANGULAR18. candIntraPredModeC is set equal to INTRA_ANGULAR18,
[0208] The variable IntraPredModeY[ x ][ y ] with x = xCb..xCb + cbWidth - 1 and y = yCb..yCb + cbHeight - 1 is set to be equal to IntraPredModeY[ xCb ][ yCb ]. One additional setting is when cbHeight is larger than double of cbWidth, mh_intra_luma_mpm_flag[ xCb ][ yCb ] is inferred to be 1 and if candModeList[ x ], x = 0..2 is equal to INTRA_ANGULAR50, candModeList[ x ] is replaced with candIntraPredModeC. Another additional setting is when cbWidth is larger than double of cbHeight, mh_intra_luma_mpm_flag[ xCb ][ yCb ] is inferred to be 1 and if candModeList[ x ], x = 0..2 is equal to INTRA_ANGULAR18, candModeList[ x ] is replaced with candIntraPredModeC.
[0209] Figure 18 shows the peripheral locations referenced in a multi-hypothesis prediction according to one embodiment of the present disclosure.
[0210] As mentioned above, surrounding locations can be referenced in the process of creating a candidate list for multi-hypothesis predictions. For example, the aforementioned candIntraPredModeX may be necessary. In this case, the positions of A and B around the current block that are referenced may be NbA and NbB as shown in Figure 18. That is, they may be immediately to the left and immediately above the upper left edge of the current block. If the position of the upper left edge of the current block is Cb as shown in Figure 18, and its coordinates are (xCb, yCb), then NbA may be (xNbA, yNbA) = (xCb-1, yCb) and NbB may be (xNbB, yNbB) = (xCb, yCb-1).
[0211] Figure 19 shows a method for referencing peripheral modes according to one embodiment of the present disclosure.
[0212] As mentioned above, surrounding locations can be referenced during the process of creating a candidate list for multi-hypothesis prediction. Furthermore, it is possible to generate a list using the surrounding modes directly or using modes based on the surrounding modes. The mode obtained by referencing surrounding locations may be candIntraPredModeX.
[0213] As one embodiment, if the peripheral position is unavailable, candIntraPredModeX may be in a previously set mode. Unavailability may include cases where the peripheral position uses interpretation, or where mode determination has not been made due to the defined decoding and encoding order.
[0214] Alternatively, if multi-hypothesis prediction is not used for the surrounding location, candIntraPredModeX may be in the already set mode.
[0215] Alternatively, if the surrounding location is above the CTU to which the current block belongs, candIntraPredModeX may be in a previously set mode. As yet another example, if the surrounding location is outside the CTU to which the current block belongs, candIntraPredModeX may be in a previously set mode.
[0216] In another embodiment, the previously set mode may be a DC mode. In yet another embodiment, the previously set mode may be a planar mode.
[0217] Furthermore, candIntraPredModeX can be set depending on whether the mode of the surrounding position exceeds the threshold angle or whether the index of the mode of the surrounding position exceeds the threshold. For example, if the index of the mode of the surrounding position is greater than the diagonal mode index, candIntraPredModeX can be set to the vertical mode index. Also, if the index of the mode of the surrounding position is less than or equal to the diagonal mode index and is a directional mode, candIntraPredModeX can be set to the horizontal mode index. The diagonal mode index may be mode 34 in Figure 6.
[0218] Furthermore, if the mode of the surrounding position is planar mode or DC mode, candIntraPredModeX may be left as is and set to planar mode or DC mode.
[0219] Referring to Figure 19, mh_intra_flag may be a signaling indicating whether or not multi-hypothesis prediction is used. Also, the intra prediction mode used by the neighboring block may be X. Furthermore, the current block can use multi-hypothesis prediction and can generate a candidate list using candIntraPredMode based on the mode of the surrounding block, but the surrounding block does not use multi-hypothesis prediction, so candIntraPredMode can be set to the already set mode, DC mode, regardless of the intra prediction mode of the surrounding block, and regardless of whether or not the surrounding block used intra prediction.
[0220] The aforementioned example of the peripheral mode referencing method is described again below.
[0221] For X being replaced by either A or B, the variables candIntraPredModeX are derived as follows:
[0222] 1. The availability derivation process for a block as specified in Neighbouring blocks availability checking process is invoked with the location ( xCurr, yCurr ) set equal to ( xCb, yCb ) and the neighbouring location ( xNbY, yNbY ) set equal to ( xNbX, yNbX ) as inputs, and the output is assigned to availableX.
[0223] 2. The candidate intra prediction mode candIntraPredModeX is derived as follows:
[0224] A. If one or more of the following conditions are true, candIntraPredModeX is set equal to INTRA_DC.
[0225] a. The variable availableX is equal to FALSE.
[0226] b. mh_intra_flag[ xNbX ][ yNbX ] is not equal to 1.
[0227] c. X is equal to B and yCb - 1 is less than ( ( yCb >> CtbLog2SizeY ) << CtbLog2SizeY ).
[0228] B. Otherwise, if IntraPredModeY[ xNbX ][ yNbX ] > INTRA_ANGULAR34, candIntraPredModeX is set equal to INTRA_ANGULAR50.
[0229] C. Otherwise, if IntraPredModeY[ xNbX ][ yNbX ] <= INTRA_ANGULAR34 and IntraPredModeY[ xNbX ][ yNbX ] > INTRA_DC, candIntraPredModeX is set equal to INTRA_ANGULAR18.
[0230] D. Otherwise, candIntraPredModeX is set equal to IntraPredModeY[ xNbX ][ yNbX ].
[0231] In the list setting method described above, candIntraPredModeX may be determined by the peripheral mode reference method described above.
[0232] Figure 20 shows a candidate list generation method according to one embodiment of the present disclosure.
[0233] According to the List1 and List2 generation method described in Figures 13 to 17, List1 can be generated by referencing the modes around the current block, and modes not included in List1 from the candidate modes can be placed in List2. Because there is spatial similarity in the picture, modes that reference surrounding modes may have higher priority. That is, List1 may have higher priority than List2. However, according to the List1 and List2 signaling method described in Figures 13 to 17, if the signaling to determine the list is not inferred, the modes of List1 are used, so flags and indices are used for signaling, and if the modes of List2 are used, only flags can be used. That is, relatively fewer bits can be used for the signaling of List2. However, using a relatively large number of bits for signaling the modes of a higher-priority list can be undesirable in terms of coding efficiency. Therefore, there may be a method, such as the one disclosed here, that uses relatively fewer bits for signaling the higher-priority lists and modes.
[0234] According to one embodiment of this disclosure, the method for generating the candidate list may differ depending on whether only List1 is available or not. Whether only List1 is available or not can indicate whether a signaling indicating the list to be used is inferred or not. For example, if there is a candidate mode and a List3 that is generated by a pre-configured method, List3 can be divided into List1 and List2. For example, the List3 and generation method that are generated by a pre-configured method may be the candModeList and its generation method described above. If a signaling indicating the list to be used is inferred, only List1 can be used, in which case the beginning of List3 can be filled into List1. Also, if a signaling indicating the list to be used is not inferred, either List1 or List2 may be used, in which case the beginning of List3 can be filled into List2, and the remainder into List1. In this case, when filling List1, it is also possible to fill it in the order of List3. In other words, candIntraPredModeX can be placed in the candidate list by referring to the mode around the current block, and candIntraPredModeX can be placed in List1 if a signaling indicating a list is inferred, and in List2 if it is not inferred. The size of List2 may be 1, in which case candIntraPredModeA can be placed in List1 if a signaling indicating a list is inferred, and in List2 if it is not inferred. candIntraPredModeA may be List3[0], which is the first mode in List3. Therefore, in this disclosure, candIntraPredModeA, which is a mode based on the surrounding mode, may be placed in both List1 and List2 as is, depending on the case. On the other hand, in the method described in Figures 13 to 17, candIntraPredModeA could only be placed in List1. Also, in this disclosure, the method for generating List1 differs depending on whether or not a signaling indicating the list to be used is inferred.
[0235] Referring to Figure 20, the candidate modes may be candidates that can be used to generate intra-predictions for multi-hypothesis prediction. The method of generating the candidate list may differ depending on whether or not the signaling List1_flag, which indicates the list to use, is inferred. If it is inferred, it may be inferred that List1 should be used, and only List1 can be used, so the top-ranking items in List3 can be placed in List1. When generating List3, modes based on surrounding modes can be placed at the top. Also, if it is not inferred, both List1 and List2 are used, so the top-ranking items in List3 can be placed in List2, which has fewer signaling. And when List1 is needed, for example, when it is signaled that List1 should be used, items from List3 that are not included in List2 can be placed in List1.
[0236] Although this disclosure uses List3 for explanation, this is merely a conceptual explanation, and it is actually possible to generate List1 and List2 without saving List3.
[0237] The embodiment below demonstrates that the method for creating candidate lists and the method for creating candidate lists described in Figures 16-17 can be used depending on the situation. For example, one of the two methods for creating candidate lists can be selected depending on whether or not signaling indicating which list to use is inferred. This may also apply to multi-hypothesis prediction. Furthermore, List1 below may contain three modes, and List2 may contain one mode. In addition, as explained in Figures 13-16, the mode signaling method allows for signaling the modes in List1 with flags and indices, and the modes in List2 with flags.
[0238] As one embodiment, when candIntraPredModeA and candIntraPredModeB are the same, and candIntraPredModeA is in planar mode or DC mode, then List2[0] = planar mode, List1[0] = DC mode, List1[1] = vertical mode, and List1[2] = horizontal mode may be.
[0239] In yet another embodiment, candIntraPredModeA and candIntraPredModeB are the same, and when candIntraPredModeA is in planar mode or DC mode, then List2[0]=candIntraPredModeA, List1[0]=!candIntraPredModeA, List1[1]=vertical mode, and List1[2]=horizontal mode.
[0240] In one embodiment, candIntraPredModeA and candIntraPredModeB are the same, and when candIntraPredModeA is in directional mode, List2[0]=candIntraPredModeA, List1[0]=planar mode, List1[1]=DC mode, and List1[2]=vertical mode.
[0241] As one embodiment, if candIntraPredModeA and candIntraPredModeB are different, then List2[0]=candIntraPredModeA and List1[0]=candIntraPredModeB may be used. List1[1] and List1[2] can be filled in from the planar mode, DC mode, vertical mode, and horizontal mode that are not candIntraPredModeA or candIntraPredModeB.
[0242] Figure 21 is a diagram showing a candidate list generation method according to one embodiment of the present disclosure.
[0243] In the previous embodiment, a method for determining the mode based on multiple lists was described. In the invention shown in Figure 21, the mode can be determined based on a single list instead of multiple lists.
[0244] Referring to Figure 21, as shown in Figure 21(a), a single candidate list containing all candidate modes for multi-hypothesis prediction can be generated. Since there is only one candidate list, referring to Figure 21(b), there is no signaling to select a list, and there may be index signaling to indicate which mode from the candidate list to use. Therefore, when mh_intra_flag, which indicates whether or not multi-hypothesis prediction is used, is 1, the candidate index mh_intra_luma_idx can be parsed.
[0245] According to one embodiment, the method for generating a candidate list for multi-hypothesis prediction may be based on the MPM list generation method used in existing intra-prediction.
[0246] According to one embodiment, the method for generating a list of candidate lists for multi-hypothesis prediction may be in the form of concatenating List1 and List2 in the order described in the List1 and List2 generation method shown in Figure 17 above.
[0247] In other words, if the candidate list for multi-hypothesis prediction is denoted as candModeList, then in this embodiment, the size of candModeList may be 4. If candIntraPredModeA and candIntraPredModeB are the same and are either planar mode or DC mode, candModeList may be determined by the order that has already been set. For example, candModeList[0] = planar mode, candModeList[1] = DC mode, candModeList[2] = vertical mode, candModeList[3] = horizontal mode.
[0248] As yet another example, if candIntraPredModeA and candIntraPredModeB are the same and are in planar mode or DC mode, then candModeList[0]=candIntraPredModeA, candModeList[1]=!candIntraPredModeA, candModeList[2]=vertical mode, and candModeList[3]=horizontal mode.
[0249] If candIntraPredModeA and candIntraPredModeB are the same and are directional modes, then candModeList[0] = candIntraPredModeA, candModeList[1] = planar mode, candModeList[2] = DC mode, and candModeList[3] = candIntraPredModeA, planar mode, and modes other than DC mode.
[0250] If candIntraPredModeA and candIntraPredModeB are different, candModeList[0] = candIntraPredModeA and candModeList[1] = candIntraPredModeB may be used. Also, candModeList[2] and candModeList[3] can sequentially contain modes other than candIntraPredModeA and candIntraPredModeB according to the already set order of the candidate modes. The already set order may be planar mode, DC mode, vertical mode, and horizontal mode.
[0251] According to one embodiment of the present disclosure, the candidate list may differ depending on the block size condition. For example, if the relatively larger of the block width and height is more than n times the remaining value, the candidate list may be shorter. For example, if the width is more than n times the height, the horizontal mode can be removed from the candidate list as shown in Figure 21, and the next mode can be moved up to fill it. Similarly, if the height is more than n times the width, the vertical mode can be removed from the candidate list as shown in Figure 21, and the next mode can be moved up to fill it. Therefore, if the width is more than n times the height, the candidate list size may be 3. Furthermore, if the width is more than n times the height, the size of the candidate list may be smaller or the same as in other cases.
[0252] According to one embodiment of the present disclosure, the candidate index in the embodiment of Figure 21 may be variable-length coded. This may be done to improve signaling efficiency by filling the beginning of the list with modes that are relatively likely to be used.
[0253] Furthermore, according to other embodiments, the candidate indices in the embodiment shown in Figure 21 may be subjected to fixed-length coding. The number of modes used in multi-hypothesis prediction may be a power of 2. For example, as mentioned above, it can be used from among the four intra-prediction modes. In this case, since no values will be left unassigned even with fixed-length coding, no unnecessary parts will be generated in the signaling. Also, when fixed-length coding is performed, the number of elements in the list construction may be just one. This is because the number of bits is the same regardless of which index is signaled.
[0254] In one embodiment, the candidate index may be coded using variable-length coding or fixed-length coding depending on the circumstances. For example, as in the previous embodiment, the candidate list size may vary depending on the circumstances. In one embodiment, the candidate index may be coded using variable-length coding or fixed-length coding depending on the candidate list size. For example, if the candidate list size is a power of 2, it may be coded using fixed-length coding, and if it is not a power of 2, it may be coded using variable-length coding. In other words, according to the previous embodiment, the coding method may change depending on the block size condition.
[0255] According to the embodiments of this disclosure, when using DC mode in multi-hypothesis prediction, the weights among the numerous predictions are the same for the entire block, so this may be equivalent to adjusting the weights of the prediction block. Therefore, DC mode can be excluded in multi-hypothesis prediction.
[0256] As one embodiment, it is possible to use only one of the following modes in multi-hypothesis prediction: planar mode, vertical mode, or horizontal mode. In this case, as shown in Figure 21, it is possible to signal multi-hypothesis prediction using a single list. Variable-length coding can also be used for index signaling. As one embodiment, the list can be generated in a fixed order. For example, it may be in the order of planar mode, vertical mode, horizontal mode. As yet another embodiment, the list can be generated by referring to the mode around the current block. For example, if candIntraPredModeA and candIntraPredModeB are the same, candModeList[0] = candIntraPredModeA. If candIntraPredModeA and candIntraPredModeB are the same and candIntraPredModeA is planar mode, candModeList[1] and candModeList[2] can be set according to the already set order. If candIntraPredModeA and candIntraPredModeB are the same, and candIntraPredModeA is not planar mode, then candModeList[1] may be a mode other than planar mode, instead of candModeList[2] being planar mode and candModeList[3] being candIntraPredModeA. If candIntraPredModeA and candIntraPredModeB are different, then candModeList[0] may be a mode other than candIntraPredModeB, instead of candModeList[1] being candIntraPredModeB and candModeList[2] being candIntraPredModeA.
[0257] In yet another embodiment, it is possible to use only one of the three modes in multi-hypothesis prediction. The three modes may include the planar mode and the DC mode. The three modes may also conditionally include either the vertical mode or the horizontal mode. The condition may be a condition related to the block size. For example, it is possible to determine whether to include the horizontal mode or the vertical mode depending on whether the width or height of the block is greater. For example, the vertical mode may be included if the width of the block is greater than the height. The horizontal mode may be included if the height of the block is greater than the width. If the height and width of the block are the same, the promised mode from either the vertical mode or the horizontal mode may be included.
[0258] As one embodiment, a list can be generated in a fixed order. For example, the order may be planar mode, DC mode, vertical or horizontal mode. As yet another embodiment, a list can be generated by referring to the mode around the current block. For example, if candIntraPredModeA and candIntraPredModeB are the same, candModeList[0] = candIntraPredModeA. If candIntraPredModeA and candIntraPredModeB are the same and candIntraPredModeA is not a direction mode, candModeList[1] and candModeList[2] can be set according to the already set order. If candIntraPredModeA and candIntraPredModeB are the same and candIntraPredModeA is a direction mode, candModeList[1] = planar mode and candModeList[2] = DC mode. If candIntraPredModeA and candIntraPredModeB are different, then candModeList[0]=candIntraPredModeA, candModeList[1]=candIntraPredModeB, and candModeList[2]=candIntraPredModeA is not necessarily true; it may be a mode other than candIntraPredModeB.
[0259] According to yet another embodiment of this disclosure, it is possible to use only one of two modes in multi-hypothesis prediction. The two modes may include a planar mode. The two modes may also conditionally include either a vertical mode or a horizontal mode. The condition may be a condition related to the block size. For example, it is possible to determine whether to include a horizontal mode or a vertical mode depending on whether the width or height of the block is greater. For example, if the width of the block is greater than the height, the vertical mode may be included. If the height of the block is greater than the width, the horizontal mode may be included. If the height and width of the block are the same, it may include a promised mode from either the vertical mode or the horizontal mode. In this case, a flag may be signaled to indicate which mode to use in multi-hypothesis prediction. According to one embodiment, a specific mode can be excluded by block size. For example, a specific mode can be excluded if the block size is small. For example, if the block size is small, it is possible to use only the planar mode in multi-hypothesis prediction. If a specific mode is excluded, it is possible to omit or reduce the mode signaling.
[0260] According to yet another embodiment of this disclosure, it is possible to use only one mode in multi-hypothesis prediction. The one mode may be a planar mode. In yet another embodiment, the one mode may be determined from among a vertical mode and a horizontal mode based on the block size. For example, it may be determined from among a vertical mode and a horizontal mode depending on whether the width or height of the block is larger. For example, if the width of the block is greater than the height, it may be determined as a vertical mode, and if the height of the block is greater than the width, it may be determined as a horizontal mode. If the width and height of the block are the same, it may be determined as a mode that has already been set. If the width and height of the block are the same, it may be determined as a mode that has already been set from among a horizontal mode or a vertical mode. If the width and height of the block are the same, it may be determined as a mode that has already been set from among a planar mode or a DC mode.
[0261] Furthermore, according to embodiments of this disclosure, there may be a flipping signaling that flips the predictions generated by multi-hypothesis prediction. This allows flipping to eliminate the opposite residual even if only one mode is selected in multi-hypothesis prediction. This also has the effect of reducing the number of candidate modes available in multi-hypothesis prediction. More specifically, for example, in the embodiments described above, flipping can be used when only one mode is used. This can improve prediction performance. The flipping can mean flipping with respect to the x-axis, flipping with respect to the y-axis, or flipping with respect to both the x and y axes. In one embodiment, the flipping direction can be determined based on the mode selected in multi-hypothesis prediction. For example, if the mode selected in multi-hypothesis prediction is a planar mode, it can be determined that the flipping is with respect to both the x and y axes. Also, flipping with respect to both the x and y axes may be due to a block shape. For example, if the block is not a square, it can be determined that there is no flipping with respect to both the x and y axes. For example, if the mode selected in multi-hypothesis prediction is a horizontal mode, it can be determined that the flipping is with respect to the x-axis. For example, in multi-hypothesis prediction, if the selected mode is a vertical mode, it can be determined that there is flipping with respect to the y-axis. Also, if the selected mode in multi-hypothesis prediction is a DC mode, it can be determined that there is no flipping, and an explicit signal is not necessary.
[0262] Furthermore, in multi-hypothesis prediction, the DC mode may have an effect similar to illumination compensation. Therefore, according to one embodiment of this disclosure, if either the DC mode or the illumination compensation method is used in multi-hypothesis prediction, the other does not need to be used.
[0263] Furthermore, multi-hypothesis prediction may have an effect similar to that of generalized bi-prediction (GBi). For example, in multi-hypothesis prediction, the DC mode may have an effect similar to that of GBi. GBi may be a method for adjusting the weighting value between two reference blocks of bi-prediction in block units or CU units. Therefore, according to one embodiment of the present disclosure, using either multi-hypothesis prediction (or the DC mode in multi-hypothesis prediction) or the GBi method may eliminate the need to use the other. Also, this may be the case when including those that are bi-predictions among the predictions of multi-hypothesis prediction. For example, when the selected merge candidate of multi-hypothesis prediction is a bi-prediction, it may not be necessary to use GBi. In these embodiments, the relationship between multi-hypothesis prediction and GBi may be limited to when using a specific mode of multi-hypothesis prediction, for example, the DC mode. Or when GBi-related signaling exists prior to multi-hypothesis prediction-related signaling, using GBi may eliminate the need to use multi-hypothesis prediction or a specific mode of multi-hypothesis prediction.
[0264] Not using a certain method may mean not signaling for that certain method and not parsing the related syntax.
[0265] FIG. 22 is a diagram showing peripheral positions referred to in multi-hypothesis prediction according to an embodiment of the present disclosure.
[0266] As described above, the peripheral positions can be referred to in the process of creating the candidate list for multi-hypothesis prediction. For example, the aforementioned candIntraPredModeX may be necessary. At this time, the positions of A and B in the periphery of the current block to be referred to may be NbA and NbB shown in FIG. 22. If the upper left end position of the current block is Cb as shown in FIG. 18 and its coordinates are (xCb, yCb), then NbA may be (xNbA, yNbA) = (xCb - 1, yCb + cbHeight - 1), and NbB may be (xNbB, yNbB) = (xCb + cbWidth - 1, yCb - 1). Here, cbWidth and cbHeight may be the width and height of the current block, respectively. Also, in the process of creating the candidate list for multi-hypothesis prediction, the peripheral positions may be the same as the peripheral positions referred to in the generation of the MPM list for intra prediction.
[0267] As another example, the peripheral positions referred to in the process of creating the candidate list for multi-hypothesis prediction may be near the center of the left side and the center of the upper side of the current block. For example, NbA and NbB may be (xCb - 1, yCb + cbHeight / 2 - 1), (xCb + cbWidth / 2 - 1, yCb - 1). Or, NbA and NbB may be (xCb - 1, yCb + cbHeight / 2), (xCb + cbWidth / 2, yCb - 1).
[0268] FIG. 23 is a diagram showing a method of referring to the peripheral mode according to an embodiment of the present disclosure.
[0269] As described above, the peripheral positions can be referred to in the process of creating the candidate list for multi-hypothesis prediction. However, in the embodiment of FIG. 19, when the peripheral positions do not use multi-hypothesis prediction, candIntraPredModeX is set to a previously set mode. This is because the mode of the peripheral positions may not directly become candIntraPredModeX when setting candIntraPredModeX.
[0270] Therefore, according to one embodiment of the present disclosure, even if the peripheral position does not use multi-hypothesis prediction, if the mode used by the peripheral position is a mode used for multi-hypothesis prediction, candIntraPredModeX can be set to the mode used by the peripheral position. The mode used for multi-hypothesis prediction may be a planar mode, a DC mode, a vertical mode, or a horizontal mode.
[0271] Alternatively, even if the surrounding location does not use multi-hypothesis prediction, if the mode used by the surrounding location is a specific mode, candIntraPredModeX can be set to the mode used by the surrounding location.
[0272] Alternatively, even if the surrounding location is not using multi-hypothesis prediction, if the mode used by the surrounding location is vertical mode or height mode, candIntraPredModeX can be set to the mode used by the surrounding location. Or, if the surrounding location is currently on the upper side of the block and the surrounding location is not using multi-hypothesis prediction, candIntraPredModeX can be set to the mode used by the surrounding location if the mode used by the surrounding location is vertical mode. Furthermore, if the surrounding location is currently on the left side of the block and the surrounding location is not using multi-hypothesis prediction, candIntraPredModeX can be set to the mode used by the surrounding location if the mode used by the surrounding location is horizontal mode.
[0273] Referring to Figure 23, mh_intra_flag may be a signaling indicating whether or not multi-hypothesis prediction is used. Also, the intra-prediction mode used by the adjacent block may be horizontal mode. Furthermore, even if the current block can use multi-hypothesis prediction and can generate a candidate list using candIntraPredMode based on the mode of the surrounding block, candIntraPredMode can be set to horizontal mode because the surrounding block's intra-prediction mode is a specific mode, such as horizontal mode.
[0274] The example of the peripheral mode referencing method described above is again described below in conjunction with another embodiment shown in Figure 19.
[0275] For X being replaced by either A or B, the variables candIntraPredModeX are derived as follows:
[0276] 1. The availability derivation process for a block as specified in Neighboring blocks availability checking process is invoked with the location ( xCurr, yCurr ) set equal to ( xCb, yCb ) and the neighboring location ( xNbY, yNbY ) set equal to ( xNbX, yNbX ) as inputs, and the output is assigned to availableX.
[0277] 2. The candidate intra prediction mode candIntraPredModeX is derived as follows:
[0278] A. If one or more of the following conditions are true, candIntraPredModeX is set equal to INTRA_DC.
[0279] a. The variable availableX is equal to FALSE.
[0280] b. mh_intra_flag[ xNbX ][ yNbX ] is not equal to 1, and IntraPredModeY[ xNbX ][ yNbX ] is neither INTRA_ANGULAR50 nor INTRA_ANGULAR18.
[0281] c. X is equal to B and yCb - 1 is less than ( ( yCb >> CtbLog2SizeY ) << CtbLog2SizeY ).
[0282] B. Otherwise, if IntraPredModeY[ xNbX ][ yNbX ] > INTRA_ANGULAR34, candIntraPredModeX is set equal to INTRA_ANGULAR50.
[0283] C. Otherwise, if IntraPredModeY[ xNbX ][ yNbX ] <= INTRA_ANGULAR34 and IntraPredModeY[ xNbX ][ yNbX ] > INTRA_DC, candIntraPredModeX is set equal to INTRA_ANGULAR18.
[0284] D. Otherwise, candIntraPredModeX is set equal to IntraPredModeY[ xNbX ][ yNbX ].
[0285] Next is another example.
[0286] For X being replaced by either A or B, the variables candIntraPredModeX are derived as follows:
[0287] 1. The availability derivation process for a block as specified in Neighbouring blocks availability checking process is invoked with the location ( xCurr, yCurr ) set equal to ( xCb, yCb ) and the neighbouring location ( xNbY, yNbY ) set equal to ( xNbX, yNbX ) as inputs, and the output is assigned to availableX.
[0288] 2. The candidate intra prediction mode candIntraPredModeX is derived as follows:
[0289] A. If one or more of the following conditions are true, candIntraPredModeX is set equal to INTRA_DC.
[0290] a. The variable availableX is equal to FALSE.
[0291] b. mh_intra_flag[ xNbX ][ yNbX ] is not equal to 1, and IntraPredModeY[ xNbX ][ yNbX ] is neither INTRA_PLANAR, INTRA_DC, INTRA_ANGULAR50 nor INTRA_ANGULAR18.
[0292] c. X is equal to B and yCb - 1 is less than ( ( yCb >> CtbLog2SizeY ) << CtbLog2SizeY ).
[0293] B. Otherwise, if IntraPredModeY[ xNbX ][ yNbX ] > INTRA_ANGULAR34, candIntraPredModeX is set equal to INTRA_ANGULAR50.
[0294] C. Otherwise, if IntraPredModeY[ xNbX ][ yNbX ] <= INTRA_ANGULAR34 and IntraPredModeY[ xNbX ][ yNbX ] > INTRA_DC, candIntraPredModeX is set equal to INTRA_ANGULAR18.
[0295] D. Otherwise, candIntraPredModeX is set equal to IntraPredModeY[ xNbX ][ yNbX ].
[0296] In the list setting method described above, candIntraPredModeX may be determined by the peripheral mode reference method described above.
[0297] Figure 24 shows the use of peripheral samples according to one embodiment of the present disclosure.
[0298] As mentioned earlier, when using multi-hypothesis prediction, it is possible to combine intra-predictions with other predictions. Therefore, when using multi-hypothesis prediction, intra-predictions can be generated using samples around the current block as reference samples.
[0299] According to one embodiment of this disclosure, when using multi-hypothesis prediction, a mode using a reconstructed sample can be used. Conversely, when not using multi-hypothesis prediction, the mode using a reconstructed sample does not need to be used. The reconstructed sample may be a reconstructed sample from around the current block.
[0300] One example of a mode that uses the aforementioned reconstruction samples is template matching. A reconstruction sample at a position already set relative to a certain block can be defined as a template. Template matching may be an operation that compares the cost of the template of the block to be compared with the current block's template and searches for a block with a smaller cost. In this case, the cost can be defined as the sum of the absolute difference values of the templates, the sum of the squares of the difference values, etc. For example, it is possible to use template matching between the current block and the reference picture block to search for a block that is expected to be similar to the current block, and based on this, a motion vector can be set or the motion vector can be refined.
[0301] Examples of modes that use the aforementioned reconstructed samples include motion compensation and motion vector refinement using the reconstructed samples.
[0302] To use reconstructed samples around the current block, decoding of the current block must wait for the decoding of the surrounding blocks to be completed. In this case, parallel processing of the current block and surrounding blocks may be difficult. Therefore, when not using multi-hypothesis prediction, it is not necessary to use the mode that uses reconstructed samples around the current block to enable parallel processing. Also, when using multi-hypothesis prediction, intra-predictions can be generated using reconstructed samples around the current block, so other modes that use reconstructed samples around the current block can also be used.
[0303] Furthermore, according to one embodiment of this disclosure, even when using multi-hypothesis prediction, the use of reconstructed samples around the current block may or may not be used depending on the candidate index. In one embodiment, reconstructed samples around the current block may be used when the candidate index is smaller than the threshold. If the candidate index is small, the number of candidate index signaling bits is small and the candidate accuracy may be high, but it is possible to further improve accuracy by using reconstructed samples for those with high coding efficiency. In another embodiment, reconstructed samples around the current block may be used when the candidate index is larger than the threshold. If the candidate index is large, the number of candidate index signaling bits is large and the candidate accuracy may be low, but accuracy can be compensated for by using reconstructed samples around the current block for candidates with low accuracy.
[0304] According to one embodiment of the present disclosure, when using multi-hypothesis prediction, it is possible to generate inter-predictions using reconstructed samples around the current block, and to generate prediction blocks by combining the inter-predictions with the intra-predictions of the multi-hypothesis prediction.
[0305] Referring to Figure 24, the mh_intra_flag value, which is a signaling that indicates whether the current block uses multi-hypothesis prediction, is 1. Since the current block uses multi-hypothesis prediction, we can use the mode that uses reconstructed samples around the current block.
[0306] Figure 25 shows a transform mode according to one embodiment of the present disclosure.
[0307] According to one embodiment of this disclosure, there may be a transformation mode that transforms only the sub-parts of a block. Such a transformation mode may be called a sub-block transform (SBT) or a spatially varying transform (SVT). For example, a CU or PU may be divided into a number of TUs, and only a portion of the number of TUs may be transformed. For example, only one of the number of TUs may be transformed. The TUs that are not transformed may have a resistivity of 0.
[0308] Referring to Figure 25, there are two types of SVT-V and SVT-H for dividing one CU or PU into multiple TUs. SVT-V may be a type in which the height of the multiple TUs is the same as the height of the CU or PU, and the width of the multiple TUs is different from the width of the CU or PU. SVT-H may be a type in which the height of the multiple TUs is different from the height of the CU or PU, and the width of the multiple TUs is the same as the width of the CU or PU. In one embodiment, the width and position of the TUs to be converted by SVT-V may be signaled. Also, the height and position of the TUs to be converted by SVT-H may be signaled.
[0309] According to one embodiment, the SVT type and a conversion kernel based on position, width, or height may already be set.
[0310] Thus, the existence of a mode that converts only a portion of the CU or PU is because, after prediction, residuals may primarily reside in a portion of the CU or PU.
[0311] In other words, SBT has the same concept as the skip mode for TU. Existing skip modes may be skip modes for CU.
[0312] Referring to Figure 25, for each SVT-V and SVT-H type, there are defined as two conversion locations marked "A," with a width or height defined as 1 / 2 or 1 / 4 of the width or height of the CU. In addition, the area outside the region marked "A" can have its resistive value set to 0.
[0313] Furthermore, there may be conditions under which SBT can be used. For example, the conditions under which SBT is possible may include conditions related to block size, or signaling values indicating whether or not it is used with higher-level syntax (e.g., sequence, slice, tile, etc.).
[0314] Figure 26 shows the relationship between multi-hypothesis prediction and transformation modes according to one embodiment of the present disclosure.
[0315] According to one embodiment of this disclosure, there may be a correlation between multi-hypothesis prediction and transformation modes. For example, whether one mode is used or not may determine whether the other mode is used. Or, whether one mode is used or not may determine whether the other mode is used. Or, whether one mode is used or not may determine whether the other mode is used.
[0316] As one embodiment, the conversion mode may be SVT as described in Figure 25. That is, whether or not SVT is used may be determined by whether or not multi-hypothesis prediction is used. Alternatively, whether or not multi-hypothesis prediction is used may be determined by whether or not SVT is used. This is because multi-hypothesis prediction improves the prediction performance for the entire block, and the phenomenon of resistances concentrating in only a part of the block is less likely to occur.
[0317] According to one embodiment of this disclosure, the position of the TU transformed by the SVT may be restricted depending on whether or not multi-hypothesis prediction is used or the mode of multi-hypothesis prediction. Alternatively, the width (SVT-V) or height (SVT-H) of the TU transformed by the SVT may be restricted depending on whether or not multi-hypothesis prediction is used or the mode of multi-hypothesis prediction. Thus, signaling related to position, width, or height can be reduced. For example, the position of the TU transformed by the SVT may not be on the side where the weighted value of the intra-prediction is likely to be large in multi-hypothesis prediction. This is because the resistance on the side with the larger weight can be reduced by multi-hypothesis prediction. Therefore, when using multi-hypothesis prediction, there may be no mode in the SVT that transforms the side with the larger weight. For example, when using the horizontal mode or the vertical mode in multi-hypothesis prediction, position 1 in Figure 25 can be omitted. In yet another embodiment, the position of the TU transformed by the SVT may be restricted when using the planar mode in multi-hypothesis prediction. For example, when using the planar mode in multi-hypothesis prediction, position 0 in Figure 25 can be omitted. This is because, when using planar mode in multi-hypothesis prediction, the portion of the intra-prediction near the reference sample may yield values similar to the reference sample value, resulting in a small residual near the reference sample.
[0318] As another example, when using multi-hypothesis prediction, the possible width or height values of TUs to be SVT-transformed may change. Or, when using a specific mode in multi-hypothesis prediction, the possible width or height values of TUs to be SVT-transformed may change. For example, when using multi-hypothesis prediction, large values for the width or height of TUs to be SVT-transformed may be excluded so that a large portion of the block does not retain many residuals. Or, when using multi-hypothesis prediction, values for the width or height of TUs to be SVT-transformed that are the same as the units in which the weights change in multi-hypothesis prediction may be excluded.
[0319] Referring to Figure 26, there may be a cu_sbt_flag indicating whether SBT is used or not, and an mh_intra_flag indicating whether multi-hypothesis prediction is used or not. Referring to the figure, if mh_intra_flag is 0, cu_sbt_flag can be parsed. Also, if cu_sbt_flag does not exist, it can be inferred to be 0.
[0320] In multi-hypothesis prediction, both combining intra-prediction and SBT aim to solve the problem where a large amount of residuals may remain in only a portion of the CU or PU when the relevant technology is not used. Therefore, since there may be a correlation between the two technologies, it is possible to decide whether or not to use one technology, or whether or not to use a specific mode of one technology, based on the other technology.
[0321] Furthermore, as shown in Figure 26, sbtblockConditions can indicate the conditions under which SBT is possible. These conditions may include conditions related to block size, signaling values indicating whether or not it is used at higher levels of syntax (e.g., sequence, slice, tile, etc.), etc.
[0322] Figure 27 is a diagram showing the relationship between color components according to one embodiment of the present disclosure.
[0323] Referring to Figure 27, the color format may be indicated by chroma_format_idc, Chroma format, separate_colour_plane_flag, etc.
[0324] If the image is monochromatic, only one sample array may exist. Furthermore, both SubWidthC and SubHeightC may be 1.
[0325] If the sampling ratio is 4:2:0, there may be two chroma arrays. Furthermore, the chroma array may be half the width and half the height of the chroma array. The width information (SubWidthC) and height information (SubHeightC) may both be 2.
[0326] The width information (SubWidthC) and height information (SubHeightC) can indicate the size of the chroma array compared to the luma array. If the width or height of the chroma array is half the size of the luma array, the width information (SubWidthC) or height information (SubHeightC) is 2, and if the width or height of the chroma array is the same size as the luma array, the width information (SubWidthC) or height information (SubHeightC) may be 1.
[0327] If the sampling ratio is 4:2:2, there may be two chroma arrays. Furthermore, the chroma array may have half the width and the same height as the chroma array. SubWidthC and SubHeightC may be 2 and 1, respectively.
[0328] If the sampling ratio is 4:4:4, the chroma array may have the same width and height as the luma array. SubWidthC and SubHeightC may both be 1. In this case, the processing may differ based on separate_colour_plane_flag. If separate_colour_plane_flag is 0, the chroma array may have the same width and height as the luma array. If separate_colour_plane_flag is 1, the three color planes (luma, Cb, Cr) can each be processed separately. If the sampling ratio is 4:4:4 regardless of separate_colour_plane_flag, SubWidthC and SubHeightC may both be 1.
[0329] If separate_colour_plane_flag is 1, then a slice can contain only one color component. If separate_colour_plane_flag is 0, then a slice can contain multiple color components.
[0330] Referring to Figure 27, SubWidthC and SubHeightC can be different only when the aspect ratio is 4:2:2. Therefore, when the aspect ratio is 4:2:2, the relationship between the luma reference width and height, and the relationship between the chroma reference width and height, may be different.
[0331] For example, if the luma sample reference width is width L and the chroma sample reference width is width C, and assuming that widths L and C are corresponding, the relationship between them can be as follows.
[0332] widthC = widthL / SubWidthC
[0333] That is, widthL = widthC * SubWidthC
[0334] Similarly, if the reference height for the luma sample is heightL and the reference height for the chroma sample is heightC, and assuming that heightL and heightC are corresponding, the relationship between them can be as follows.
[0335] heightC = heightL / SubHeightC
[0336] That is, heightL = heightC * SubHeightC
[0337] Furthermore, there may be values that indicate color components. For example, cIdx can indicate a color component. For example, cIdx may be a color component index. If cIdx is 0, it can indicate the luma component. If cIdx is not 0, it can indicate the chroma component. If cIdx is 1, it can indicate the chroma Cb component. If cIdx is 2, it can indicate the chroma Cr component.
[0338] Figure 28 is a diagram showing the relationship of color components according to one embodiment of the present disclosure.
[0339] Figures 28(a), (b), and (c) show the cases of 4:2:0, 4:2:2, and 4:4:4, respectively.
[0340] Referring to Figure 28(a), in the horizontal direction, one chromatic sample (one Cb and one Cr) may be positioned for every two luma samples. Also, in the vertical direction, one chromatic sample (one Cb and one Cr) may be positioned for every two luma samples.
[0341] Referring to Figure 28(b), in the horizontal direction, one chromatic sample (one Cb and one Cr) may be positioned for every two luma samples. Also, in the vertical direction, one chromatic sample (one Cb and one Cr) may be positioned for every one luma sample.
[0342] Referring to Figure 28(c), one chromatic sample (one Cb and one Cr) may be positioned for each luma sample in the horizontal direction. Also, one chromatic sample (one Cb and one Cr) may be positioned for each luma sample in the vertical direction.
[0343] As mentioned above, SubWidthC and SubHeightC, as explained in Figure 27, can be determined by this relationship, and conversions between luma-sample criteria and chroma-sample criteria can be performed based on SubWidthC and SubHeightC.
[0344] Figure 29 is a diagram showing the peripheral reference position according to one embodiment of the present disclosure.
[0345] According to embodiments of this disclosure, surrounding locations can be referenced when making predictions. For example, as described above, surrounding locations can be referenced when performing CIIP. CIIP may be the multi-hypothesis prediction described above. CIIP may be a combined inter-picture merge and intra-picture prediction. That is, CIIP may be a prediction method that combines inter-prediction (e.g., merge-mode inter-prediction) and intra-prediction.
[0346] According to embodiments of this disclosure, it is possible to combine interpretations and intrapretations by referring to the surrounding location. For example, it is possible to determine the ratio of interpretations to intrapretations by referring to the surrounding location. Alternatively, it is possible to determine weights when combining interpretations and intrapretations by referring to the surrounding location. Alternatively, it is possible to determine weights when performing a weighted sum (weighted average) of interpretations and intrapretations by referring to the surrounding location.
[0347] According to embodiments of this disclosure, the peripheral location to be referenced may include NbA and NbB. The coordinates of NbA and NbB may be (xNbA, yNbA) and (xNbB, yNbB), respectively.
[0348] Furthermore, NbA may be the leftmost position of the current block. More specifically, if the top-left coordinates of the current block are (xCb, yCb) and the width and height of the current block are cbWidth and cbHeight respectively, then NbA may be (xCb-1, yCb+cbHeight-1). The top-left coordinates of the current block (xCb, yCb) may be values based on the luma sample. Alternatively, the top-left coordinates of the current block (xCb, yCb) may be the top-left sample luma position of the current luma coding block relative to the top-left luma sample of the current picture. Furthermore, cbWidth and cbHeight may be values based on the corresponding color component. The coordinates mentioned above may be relative to the luma component (luma block). For example, cbWidth and cbHeight may be values based on the luma component.
[0349] Furthermore, NbB may be the position above the current block. More specifically, if the coordinates of the top left edge of the current block are (xCb, yCb) and the width and height of the current block are cbWidth and cbHeight respectively, then NbB may be (xCb + cbWidth - 1, yCb - 1). The coordinates of the top left edge of the current block (xCb, yCb) may be a value based on the luma sample. Alternatively, the coordinates of the top left edge of the current block (xCb, yCb) may be the top left sample luma position of the current luma coding block relative to the top left luma sample of the current picture. Furthermore, cbWidth and cbHeight may be values based on the corresponding color component. The coordinates mentioned above may be relative to the luma component (luma block). For example, cbWidth and cbHeight may be values based on the luma component.
[0350] Referring to Figure 29, the coordinates of the top left corner, NbA, NbB, etc., are indicated for the block labeled "Luma Block" at the top.
[0351] Furthermore, NbA may be the leftmost position of the current block. More specifically, if the top-left coordinates of the current block are (xCb, yCb) and the width and height of the current block are cbWidth and cbHeight, respectively, then NbA may be (xCb-1, yCb+2*cbHeight-1). The top-left coordinates of the current block (xCb, yCb) may be values based on the chroma sample. Alternatively, the top-left coordinates of the current block (xCb, yCb) may be the top-left sample chroma position of the current chroma coding block relative to the top-left chroma sample of the current picture. Furthermore, cbWidth and cbHeight may be values based on the corresponding color component. The aforementioned coordinates may be relative to the chroma component (chroma block). For example, cbWidth and cbHeight may be values based on the chroma component. Also, these coordinates may apply to the 4:2:0 format.
[0352] Furthermore, NbB may be the position above the current block. More specifically, if the coordinates of the top left edge of the current block are (xCb, yCb) and the width and height of the current block are cbWidth and cbHeight respectively, then NbB may be (xCb + 2 * cbWidth - 1, yCb - 1). The coordinates of the top left edge of the current block (xCb, yCb) may be values based on the luma sample. Alternatively, the coordinates of the top left edge of the current block (xCb, yCb) may be the top left sample luma position of the current luma coding block relative to the top left luma sample of the current picture. Furthermore, cbWidth and cbHeight may be values based on the corresponding color component. The coordinates mentioned above may be relative to the chroma component (chroma block). For example, cbWidth and cbHeight may be values based on the chroma component. Furthermore, these coordinates may be in 4:2:0 or 4:2:2 format.
[0353] Referring to Figure 29, the coordinates of the top left corner, NbA, NbB, etc., are indicated for the block labeled "Chroma Block" at the bottom.
[0354] Figure 30 shows a weighted sample prediction process according to one embodiment of the present disclosure.
[0355] The embodiment in Figure 30 may relate to a method for combining two or more prediction signals. Furthermore, the embodiment in Figure 30 is applicable when using CIIP. Additionally, the embodiment in Figure 30 may include the peripheral position referencing method described in Figure 29.
[0356] Referring to the equation (8-838) in Figure 30, the scale information (scallFact) can be explained as follows.
[0357] scallFact = (cIdx == 0) ? 0 : 1
[0358] In other words, if the information regarding the color components of the block (cIdx) is currently 0, the scale information (scallFact) can be set to 0, and if the information regarding the color components of the block (cIdx) is not 0, the scale information (scallFact) can be set to 1. In the embodiments of this disclosure, x?y:z can indicate the y value when x is true or not 0, and the z value otherwise (when x is false (or when x is 0)).
[0359] Also, the coordinates (xNbA, yNbA) and (xNbB, yNbB) of the surrounding positions NbA and NbB to be referred to can be set. According to the embodiment described in FIG. 29, for the luma component, (xNbA, yNbA) and (xNbB, yNbB) are (xCb - 1, yCb + cbHeight - 1) and (xCb + cbWidth - 1, yCb - 1) respectively, and for the chroma component, (xNbA, yNbA) and (xNbB, yNbB) may be (xCb - 1, yCb + 2 * cbHeight - 1) and (xCb + 2 * cbWidth - 1, yCb - 1) respectively. Also, the operation of multiplying by 2^n may be the same as left-shifting n bits. For example, the operation of multiplying by 2 may be the same as left-shifting 1 bit. Also, left-shifting x by n bits can be expressed as "x << n". Also, the operation of dividing by 2^n may be the same as right-shifting n bits. Also, the operation of dividing by 2^n and discarding the decimal part may be the same as right-shifting n bits. For example, the operation of dividing by 2 may be the same as right-shifting 1 bit. Also, right-shifting x by n bits can be expressed as "x >> n". Therefore, (xCb - 1, yCb + 2 * cbHeight - 1) and (xCb + 2 * cbWidth - 1, yCb - 1) can be expressed as (xCb - 1, yCb + (cbHeight << 1) - 1) and (xCb + (cbWidth << 1) - 1, yCb - 1). Therefore, when representing both the coordinates for the above-mentioned luma component and the coordinates for the chroma component, it may be as follows.
[0360] (xNbA, yNbA) = (xCb - 1, yCb + (cbHeight << scallFact) - 1)
[0361] (xNbB, yNbB) = (xCb + (cbWidth<<scallFact) - 1, yCb - 1)
[0362] Here, the scale information (scallFact) may be (cIdx==0)?0:1, as mentioned above. In this case, cbWidth and cbHeight may be shown based on each color component. For example, when the width and height based on the luma component are cbWidthL and cbHeightL, respectively, cbWidth and cbHeight may be cbWidthL and cbHeightL when performing a weighted sample prediction process for the luma component. Also, when the width and height based on the luma component are cbWidthL and cbHeightL, respectively, cbWidth and cbHeight may be cbWidthL / SubWidthC and cbHeightL / SubHeightC when performing a weighted sample prediction process for the chroma component.
[0363] Furthermore, according to one embodiment, the prediction mode of a given location can be determined by referring to the surrounding location. For example, it can be determined whether the prediction mode is intra prediction or not. The prediction mode may also be indicated by CuPredMode. When CuPredMode is MODE_INTRA, intra prediction may be used. The CuPredMode value may also be MODE_INTRA, MODE_INTER, MODE_IBC, or MODE_PLT. When CuPredMode is MODE_INTER, intra prediction may be used. When CuPredMode is MODE_IBC, intra block copy (IBC) may be used. When CuPredMode is MODE_PLT, palette mode may be used. Furthermore, CuPredMode may also be indicated by the channel type (chType) and location. For example, it may be denoted as CuPredMode[chType][x][y], where this value is the CuPredMode value for the channel type chType at position (x,y). Also, chType may be based on the tree type. For example, the tree type (treeType) may be set to values such as SINGLE_TREE, DUAL_TREE_LUMA, or DUAL_TREE_CHROMA. In the case of SINGLE_TREE, there may be a portion where the block partitioning of the luma and chroma components is shared. For example, in the case of SINGLE_TREE, the block partitioning of the luma and chroma components may be identical. Or, in the case of SINGLE_TREE, the block partitioning of the luma and chroma components may be identical or partially identical.Alternatively, if it is a SINGLE_TREE, the block partitioning of the luma and chroma components may be performed using the same syntax element value. Also, if it is a DUAL TREE, the block partitioning of the luma and chroma components may be independent. Alternatively, if it is a DUAL TREE, the block partitioning of the luma and chroma components may be performed using separate syntax element values. Also, if it is a DUAL TREE, the treeType value may be DUAL_TREE_LUMA or DUAL_TREE_CHROMA. If treeType is DUAL_TREE_LUMA, DUAL TREE can be used to indicate that the processing is for the luma component. If treeType is DUAL_TREE_CHROMA, DUAL TREE can be used to indicate that the processing is for the chroma component. Also, chType may be determined based on whether or not the tree type is DUAL_TREE_CHROMA. For example, chType may be set to 1 if treeType is DUAL_TREE_CHROMA, and to 0 if treeType is not DUAL_TREE_CHROMA. Therefore, referring to Figure 30, the CuPredMode[0][xNbX][yNbY] value can be determined. X may be replaced with A and B. That is, the CuPredMode value for the NbA and NbB positions can be determined.
[0364] Furthermore, the isIntraCodedNeighbourX value can be set based on the determination of the prediction mode for the surrounding location. For example, the isIntraCodedNeighbourX value can be set depending on whether the CuPredMode for the surrounding location is MODE_INTRA or not. If the CuPredMode for the surrounding location is MODE_INTRA, the isIntraCodedNeighbourX value can be set to TRUE, and if the CuPredMode for the surrounding location is not MODE_INTRA, the isIntraCodedNeighbourX value can be set to FALSE. As described above, in the disclosure described later, X may be replaced with A or B, etc. Also, anything written as X can indicate that it corresponds to location X.
[0365] Furthermore, according to one embodiment, it is possible to determine whether a given location is available by referring to its surrounding locations. The value of availableX can be set based on whether the location is available or not. Additionally, isIntraCodedNeighbourX can be set based on availableX. For example, if availableX is TRUE, isIntraCodedNeighbourX can be set to TRUE, and if availableX is FALSE, isIntraCodedNeighbourX can be set to FALSE. Referring to Figure 30, whether a given location is available or not may be determined by "The derivation process for neighboring block availability". Furthermore, whether a given location is available or not can be determined based on whether the location is currently inside the picture. If the location is (xNbY, yNbY), and xNbY or yNbY is less than 0, it is currently outside the picture, and availableX can be set to FALSE. Also, if xNbY is greater than or equal to the picture width, it is currently outside the picture, and availableX can be set to FALSE. The picture width may be indicated by pic_width_in_luma_samples. Also, if yNbY is greater than or equal to the picture height, it is currently outside the picture, and availableX may be set to FALSE. The picture height may be indicated by pic_height_in_luma_samples. Also, if the location is in a different brick or slice than the current block, availableX may be set to FALSE. Also, if the reconstruction of the location is not yet complete, availableX may be set to FALSE. Whether or not the reconstruction is complete may be indicated by IsAvailable[cIdx][xNbY][yNbY].Therefore, in short, if any one of the following conditions is met, availableX can be set to FALSE, and if none of the following conditions are met, availableX can be set to TRUE.
[0366] Condition 1: xNbY<0
[0367] Condition 2: yNbY < 0
[0368] Condition 3:xNbY>=pic_width_in_luma_samples
[0369] Condition 4:yNbY>=pic_height_in_luma_samples
[0370] Condition 5: IsAvailable[cIdx][xNbY][yNbY]==FALSE
[0371] Condition 6: If the relevant location (neighboring location (xNbY, yNbY)) belongs to a different brick (or slice) than the current block.
[0372] Additionally, an option allows you to determine whether the current location and the location in question are in the same CuPredMode and set availableX accordingly.
[0373] The two conditions described can be combined to set isIntraCodedNeighbourX. For example, isIntraCodedNeighbourX can be set to TRUE if all of the following conditions are met, and to FALSE otherwise (if any one of the following conditions is not met).
[0374] Condition 1: availableX==TRUE
[0375] Condition 2: CuPredMode[0][xNbX][yNbX]==MODE_INTRA
[0376] Furthermore, according to embodiments of this disclosure, the weighting of CIIP can be determined based on a number of code information (isIntraCodedNeighbourX). For example, the weighting can be determined when combining interpretation and intraprediction based on a number of code information (isIntraCodedNeighbourX). For example, it can be determined based on code information for the left block (isIntraCodedNeighbourA) and code information for the upper block (isIntraCodedNeighbourB). According to one embodiment, the weight value (w) can be set to 3 when both the code information for the left block (isIntraCodedNeighbourA) and the code information for the upper block (isIntraCodedNeighbourB) are TRUE. For example, the weight value (w) may be the weight of CIIP or a value that determines the weighting. Also, when both the code information for the left block (isIntraCodedNeighbourA) and the code information for the upper block (isIntraCodedNeighbourB) are FALSE, w can be set to 1. Furthermore, if either the code information for the left block (isIntraCodedNeighbourA) or the code information for the upper block (isIntraCodedNeighbourB) is FALSE (similar to the case where one of the two is TRUE), the weight (w) can be set to 2. In other words, the weight (w) may be set based on whether the surrounding position was predicted by intra prediction or to what extent the surrounding position was predicted by intra prediction.
[0377] Furthermore, the weighting (w) may be the weighting corresponding to intra-prediction. Also, the weighting corresponding to inter-prediction may be determined based on the weighting (w). For example, the weighting corresponding to inter-prediction may be (4-w). Referring to equation (8-840) in Figure 30, when combining two or more prediction signals, the following can be done.
[0378] predSampleComb[x][y] = (w*predSamplesIntra[x][y] + (4-w)*predSamplesInter[x][y] + 2 ) >> 2
[0379] Here, the second sample (predSamplesIntra) and the first sample (predSamplesInter) may be prediction signals. For example, the second sample (predSamplesIntra) and the first sample (predSamplesInter) may be prediction signals predicted by intra-prediction and inter-prediction (e.g., merge mode, more specifically regular merge mode), respectively. Also, the combined prediction sample (predSampleComb) may be a prediction signal used in CIIP.
[0380] Furthermore, the process may include updating the pre-coupling prediction signal before performing equation (8-840) in Figure 30. For example, this update can be performed using a process like that shown in equation (8-839) in Figure 30. For instance, the process of updating the prediction signal may be the process of updating the inter-prediction signal of the CIIP.
[0381] Figure 31 is a diagram showing the peripheral reference position according to one embodiment of the present disclosure.
[0382] Figures 29 to 30 illustrate the peripheral reference positions, but using these positions in all cases (for example, all chroma blocks) can cause problems, which are explained in Figure 31.
[0383] The embodiment in Figure 31 shows a chroma block. In Figures 29 to 30, the NbA and NbB coordinates relative to the chroma block, with respect to the luma sample, were (xCb-1, yCb+2*cbHeight-1) and (xCb+2*cbWidth-1, yCb-1), respectively. However, when SubWidthC or SubHeightC is 1, it may show a different position in Figure 31 than the position shown in Figure 29. In the above coordinates, multiplying cbWidth and cbHeight by 2 means that cbWidth and cbHeight are shown with respect to each color component (chroma component in this embodiment), and the coordinates are shown with respect to luma, so this may be to compensate for the number of luma samples versus chroma samples in the case of 4:2:0. That is, it may be to show the coordinates in relation to luma when there is one chroma sample corresponding to two luma samples with respect to the x-axis, and one chroma sample corresponding to two luma samples with respect to the y-axis. Therefore, when SubWidthC or SubHeightC is 1, it may indicate a different position. Consequently, always using the (xCb-1, yCb+2*cbHeight-1) and (xCb+2*cbWidth-1, yCb-1) positions for chroma blocks in this way may refer to a position far from the current chroma block. In this case, the relative position used in the chroma block of the current block may not match the relative position used in the chroma block. Furthermore, because it refers to a different position for the chroma block, it may refer to a position with little relevance to the current block when setting weights, or decoding / reconstruction may not occur due to the block decoding order.
[0384] Referring to Figure 31, the position of the chroma reference coordinates described above is shown when the aspect ratio is 4:4:4, i.e., when both SubWidthC and SubHeightC are 1. NbA and NbB may be located at positions far from the chroma block shown by the solid line.
[0385] Figure 32 shows a weighted sample prediction process according to one embodiment of the present disclosure.
[0386] The embodiment shown in Figure 32 may be an embodiment for solving the problems described in Figures 29 to 31. Furthermore, the previously mentioned details may be omitted.
[0387] In Figure 30, the surrounding position is set based on the scale information (scallFact), and as explained in Figure 31, the scale information (scallFact) was a value used to convert the position when SubWidthC and SubHeightC are 2.
[0388] However, as mentioned above, problems can arise depending on the color format, and the ratio of chroma sample to luma sample may differ horizontally and vertically. Therefore, according to the embodiments of this disclosure, the scale information (scallFact) can be separated into horizontal (width) and vertical (height).
[0389] According to the embodiments of this disclosure, x-axis scale information (scallFactWidth) and y-axis scale information (scallFactHeight) may exist, and the peripheral position can be set based on the x-axis scale information (scallFactWidth) and y-axis scale information (scallFactHeight). Furthermore, the peripheral position may be set based on the luma sample (luma block).
[0390] The video signal processing device can perform the step of acquiring information regarding width (SubWidthC) and information regarding height (SubHeightC) based on chroma format information (chroma_format_idc). Here, the chroma format information (chroma_format_idc) may be signaled in the form of one of the following units: coding tree unit, slice, tile, tile group, picture, or sequence.
[0391] Based on the table shown in Figure 27, the video signal processing device can obtain information regarding width (SubWidthC) and height (SubHeightC) based on chroma format information (chroma_format_idc).
[0392] The video signal processing device can perform the step (8-838) of acquiring x-axis scale information (scallFactWidth) based on width information (SubWidthC) or color component information of the current block (cIdx). More specifically, the x-axis scale information (scallFactWidth) may be set based on the color component information of the current block (cIdx) and the width information (SubWidthC). For example, if the color component information of the current block (cIdx) is 0 or the width information (SubWidthC) is 1, the x-axis scale information (scallFactWidth) can be set to 0, and if not (if the color component information of the current block (cIdx) is not 0 and the width information (SubWidthC) is not 1 (if SubWidthC is 2)), the x-axis scale information (scallFactWidth) can be set to 1. Referring to the equation (8-838) in Figure 32, this can be shown as follows.
[0393] scallFactWidth = ( cIdx == 0 || SubWidthC == 1) ? 0 : 1
[0394] Furthermore, the video signal processing device can perform the step (8-839) of acquiring y-axis scale information (scallFactHeight) based on height information (SubHeightC) or information on the color components of the current block (cIdx).
[0395] Furthermore, the y-axis scale information (scallFactHeight) can be set based on the current block's color component information (cIdx) and height information (SubHeightC). For example, if the current block's color component information (cIdx) is 0 or the height information (SubHeightC) is 1, the y-axis scale information (scallFactHeight) can be set to 0. Otherwise (if the current block's color component information (cIdx) is not 0 and the height information (SubHeightC) is not 1 (i.e., SubHeightC is 2)), the y-axis scale information (scallFactHeight) can be set to 1. Referring to equation (8-839) in Figure 32, this can be shown as follows.
[0396] scallFactHeight = ( cIdx == 0 || SubHeightC == 1) ? 0 : 1
[0397] Furthermore, the x-coordinates of the surrounding positions can be indicated based on the x-axis scale information (scallFactWidth), and the y-coordinates of the surrounding positions can be indicated based on the y-axis scale information (scallFactHeight). The video signal processing device can perform the step of determining the position of the left block (NbA) based on the y-axis scale information (scallFactHeight). The video signal processing device can also perform the step of determining the position of the upper block (NbB) based on the x-axis scale information (scallFactWidth). For example, the coordinates of the upper block (NbB) can be set based on the x-axis scale information (scallFactWidth). For example, the coordinates of the left block (NbA) can be set based on the y-axis scale information (scallFactHeight). Also, as mentioned above, here, being based on the x-axis scale information (scallFactWidth) may mean being based on width information (SubWidthC), and being based on the y-axis scale information (scallFactHeight) may mean being based on height information (SubHeightC). For example, the surrounding position coordinates can be as follows:
[0398] (xNbA, yNbA) = (xCb - 1, yCb + (cbHeight << scallFactHeight) - 1)
[0399] (xNbB, yNbB) = (xCb + (cbWidth< <scallFactWidth) - 1, yCb - 1)
[0400] (xCb, yCb) may be the upper-leftmost sample luma position of the current luma block (luma coding block) relative to the upper-leftmost luma sample of the current picture. cbWidth and cbHeight may be the width and height of the current block, respectively. In this case, xCb and yCb may be the coordinates shown based on the luma sample as described above. Also, cbWidth and cbHeight may be shown based on each color component.
[0401] Therefore, if it is a chroma block and SubWidthC is 1, then (xNbB, yNbB) = (xCb + cbWidth - 1, yCb - 1) may be true. That is, in this case, the NbB coordinate for the chroma block and the NbB coordinate for the chroma block may be the same. Also, if it is a chroma block and SubHeightC is 1, then (xNbA, yNbA) = (xCb - 1, yCb + cbHeight - 1) may be true. That is, in this case, the NbA coordinate for the chroma block and the NbA coordinate for the chroma block may be the same.
[0402] Therefore, the embodiment in Figure 32 can set the same peripheral coordinates as the embodiments in Figures 29 to 30 when using the 4:2:0 format, and can set different peripheral coordinates than the embodiments in Figures 29 to 30 when using the 4:2:2 format or 4:4:4 format.
[0403] The video signal processing device can perform the step of determining the weight value (w) based on the left block (NbA) and the upper block (NbB). Figure 32 may be similar to the one described in Figure 30. That is, the prediction mode or availability can be determined based on the surrounding position coordinates described in Figure 32, and the weighting of the CIIP can be determined. Some of the explanation of Figure 32 that overlaps with Figure 30 may be omitted.
[0404] Referring to Figure 32, the video signal processing device can set the code information (isIntraCodedNeighbourX) by combining two conditions. For example, the code information (isIntraCodedNeighbourX) can be set to TRUE if all of the following conditions are met, and to FALSE otherwise (if at least one of the following conditions is not met).
[0405] Condition 1: availableX==TRUE
[0406] Condition 2: CuPredMode[0][xNbX][yNbX]==MODE_INTRA
[0407] More specifically, referring to line 3210, the video signal processing device may take the step of setting the code information for the left block (isIntraCodedNeighbourA) to TRUE if the left block is available (availableA == TRUE) and the prediction mode of the left block is intra-prediction (CuPredMode[0][xNbA][yNbA] is equal to MODE_INTRA).
[0408] Furthermore, the video signal processing device may perform the step of setting the code information for the left block to FALSE if the left block is unavailable or the prediction mode for the left block is not intra-prediction.
[0409] Furthermore, the video signal processing device can perform the step of setting the code information for the upper block (isIntraCodedNeighbourB) to TRUE if the upper block is available (availableB==TRUE) and the prediction mode of the upper block is intra prediction (CuPredMode[0][xNbB][yNbB]is equal to MODE_INTRA).
[0410] Furthermore, the video signal processing device may perform the step of setting the code information for the upper block to FALSE if the upper block is unavailable or the prediction mode for the upper block is not intra-prediction.
[0411] Referring to line 3220, if both the code information for the left block (isIntraCodedNeighbourA) and the code information for the upper block (isIntraCodedNeighbourB) are TRUE, the video signal processing unit can proceed to determine the weight value (w) to be 3. Also, if both the code information for the left block (isIntraCodedNeighbourA) and the code information for the upper block (isIntraCodedNeighbourB) are FALSE, the video signal processing unit can proceed to determine the weight value (w) to be 1. Also, if only one of the code information for the left block (isIntraCodedNeighbourA) and the code information for the upper block (isIntraCodedNeighbourB) is TRUE, the video signal processing unit can proceed to determine the weight value (w) to be 2.
[0412] The video signal processing unit can perform the step of acquiring a first sample (predSamplesInter) in which it predicts the current block is in merge mode. The video signal processing unit can also perform the step of acquiring a second sample (predSamplesIntra) in which it predicts the current block is in intra mode.
[0413] The video signal processing device can perform the step (8-841) of obtaining a combinational prediction sample (predSampleComb) for the current block based on a weighted value (w), a first sample (predSamplesInter), and a second sample (predSamplesIntra). For example, the video signal processing device can obtain a combinational prediction sample (predSampleComb) based on the following formula.
[0414] predSampleComb[x][y] = (w*predSamplesIntra[x][y] + (4-w)*predSamplesInter[x][y] + 2 ) >> 2
[0415] Here, predSamplesComb represents the combination of predicted samples, w represents the weighted value, predSamplesIntra represents the second sample, predSamplesInter represents the first sample, [x] represents the x-axis coordinate of the sample currently included in the block, and [y] represents the y-axis coordinate of the sample currently included in the block.
[0416] In this disclosure, the terms "peripheral position" and "peripheral position coordinates" may be used interchangeably.
[0417] Figure 33 shows a weighted sample prediction process according to one embodiment of the present disclosure.
[0418] The embodiment in Figure 33 represents the surrounding position coordinates described in Figure 32 using a different method. Therefore, any content that overlaps with what has been described above may be omitted.
[0419] As mentioned above, bit shifts can be represented by multiplication. Figure 32 may be shown using bit shifts, and Figure 33 may be shown using multiplication.
[0420] In one embodiment, the x-axis scale information (scallFactWidth) can be set based on the current block's color component information (cIdx) and width information (SubWidthC). For example, if the current block's color component information (cIdx) is 0 or the width information (SubWidthC) is 1, the x-axis scale information (scallFactWidth) can be set to 1. Otherwise (if cIdx is not 0 and the width information (SubWidthC) is not 1 (if SubWidthC is 2)), the x-axis scale information (scallFactWidth) can be set to 2. Referring to equation (8-838) in Figure 33, this can be shown as follows.
[0421] scallFactWidth = ( cIdx == 0 || SubWidthC == 1) ? 1 : 2
[0422] Furthermore, the y-axis scale information (scallFactHeight) can be set based on the current block's color component information (cIdx) and height information (SubHeightC). For example, if the current block's color component information (cIdx) is 0 or the height information (SubHeightC) is 1, the y-axis scale information (scallFactHeight) can be set to 1. Otherwise (if cIdx is not 0 and the height information (SubHeightC) is not 1 (i.e., SubHeightC is 2)), the y-axis scale information (scallFactHeight) can be set to 2. Referring to equation (8-839) in Figure 33, this can be shown as follows.
[0423] scallFactHeight = ( cIdx == 0 || SubHeightC == 1) ? 1 : 2
[0424] Furthermore, the x-coordinates of the surrounding positions can be shown based on the x-axis scale information (scallFactWidth), and the y-coordinates of the surrounding positions can be shown based on the y-axis scale information (scallFactHeight). For example, the coordinates of NbB can be set based on the x-axis scale information (scallFactWidth). For example, the coordinates of NbA can be set based on the y-axis scale information (scallFactHeight). Also, as mentioned above, basing on the x-axis scale information (scallFactWidth) here may be based on SubWidthC, and basing on the y-axis scale information (scallFactHeight) may be based on SubHeightC. For example, the surrounding position coordinates may be as follows.
[0425] (xNbA, yNbA) = (xCb - 1, yCb + (cbHeight * scallFactHeight) - 1)
[0426] (xNbB, yNbB) = (xCb + (cbWidth * scallFactWidth) - 1, yCb - 1)
[0427] In this case, xCb and yCb may be the coordinates shown based on the Luma sample, as mentioned above. Also, cbWidth and cbHeight may be shown based on each color component.
[0428] Figure 34 shows a weighted sample prediction process according to one embodiment of the present disclosure.
[0429] In the embodiments shown in Figures 30, 32, and 33, the availability of a given location was determined by referring to its surrounding location. At this time, the index cIdx, which indicates the color component, was set to 0 (chroma component). Furthermore, when determining whether a given location is available, the information regarding the color component of the current block (cIdx) can be used to determine whether the reconstruction of the corresponding location cIdx is complete. That is, when determining whether a given location is available, cIdx can be used to determine the IsAvailable[cIdx][xNbY][yNbY] value. However, when performing a weighted sample prediction process for a chroma block, referring to the IsAvailable value corresponding to cIdx0 may lead to an incorrect judgment. For example, if the reconstruction of the chroma component of a block including the surrounding location is not yet complete, but the reconstruction of the chroma component is complete, then when cIdx is 0, IsAvailable[0][xNbY][yNbY] may be FALSE, and IsAvailable[cIdx][xNbY][yNbY] may be TRUE. Therefore, there are cases where the surrounding location is actually available but is judged as unavailable. In the embodiment of Figure 34, to solve this problem, when determining whether a location is available by referring to the surrounding location, the cIdx of the currently coded block can be used as input. That is, when invoking "the derivation process for neighboring block availability", the cIdx of the currently coded block can be used as the input cIdx.
[0430] Furthermore, the information explained in Figures 32 and 33 may be omitted.
[0431] Furthermore, when determining the prediction mode for the surrounding location as described above, CuPredMode[0][xNbX][yNbY], which corresponds to chType0, was referenced. However, if the chType for the current block does not match, an incorrect parameter may be referenced. Therefore, according to the embodiment of this disclosure, when determining the prediction mode for the surrounding location, CuPredMode[chType][xNbX][yNbY] corresponding to the chType value for the current block can be referenced.
[0432] Figure 35 shows the CIIP weight derivation according to one embodiment of the present disclosure.
[0433] The CIIP weighting derivation process is explained in the embodiments described in Figures 29 to 34, and the aforementioned details may be omitted in these embodiments.
[0434] Furthermore, in the embodiment described in Figures 29 to 34, it was possible to determine the weights used in CIIP based on the same relative positions for multiple color components. Therefore, this means that the weights used in CIIP can be determined for chroma components based on the neighboring locations described for luma components. Furthermore, this means that the weights used in CIIP can be determined for multiple color components based on the neighboring locations described for luma components. Furthermore, this means that the weights used in CIIP can be determined for multiple color components based on the same neighboring locations. Furthermore, this means that the weights used in CIIP are the same for multiple color components. As mentioned above, this may refer to the prediction mode of the neighboring position. Or, the prediction modes at the same relative positions to the color component field may be the same. More specifically, if the prediction modes corresponding to the already set positions for each color component are the same with respect to the color component field, then the weights used in CIIP may be the same for multiple color components. Furthermore, when interpretation is available, the prediction mode corresponding to the already set position for each color component may be the same for the color component field. Alternatively, when it is a P-slice or B-slice, the prediction mode corresponding to the already set position for each color component may be the same for the color component field. This is because it can be SINGLE_TREE when it is a P-slice or B-slice.
[0435] Furthermore, as mentioned above, the adjacent positions described for the Luma component may be as follows.
[0436] (xNbA, yNbA) = (xCb - 1, yCb + cbHeight - 1)
[0437] (xNbB, yNbB) = (xCb + cbWidth - 1, yCb - 1)
[0438] In short, according to the embodiments of this disclosure, the weighting used in CIIP for multiple color components may be the same. More specifically, the weighting used in CIIP derived for the luma component can be used for the chroma component. This may be to prevent the process of deriving weightings for multiple color components from being performed many times. Furthermore, weighting values based on (xNbA,yNbA) and (xNbB,yNbB) can also be used for the chroma component. In this case, cbHeight and cbWidth in (xNbA,yNbA) and (xNbB,yNbB) may be values based on the luma sample. Also, the xCb and yCb values in (xNbA,yNbA) and (xNbB,yNbB) may be values based on the luma sample. In other words, for the chroma component as well, it is possible to use a weighting value determined based on the width, height, and adjacent position based on the coordinates of the luma sample in CIIP.
[0439] Referring to Figure 35, the derived weighting values are used for all color components, namely Y, Cb, and Cr. In other words, the same weighting value is used for CIIP for all color components.
[0440] Figure 36 shows the CIIP process according to one embodiment of the present disclosure.
[0441] The embodiment in Figure 36 may be related to the embodiment described in Figure 35. Furthermore, the embodiment in Figure 36 can illustrate the structure of the embodiment described in Figure 35. Also, the details described in Figures 29 to 35 may be omitted in the embodiment in Figure 36.
[0442] As explained in Figure 35, when using CIIP for each color component, it is possible to use the same weighting value.
[0443] Referring to Figure 36, ciip_flag may be a signaling indicating whether or not CIIP is used. If CIIP is used, the process described in Figure 36 can be performed. If CIIP is used, the weighting value derivation process can be performed. In this case, the weighting value derivation process can be performed regardless of the color components. The weighting value derivation process can include the process described in Figure 30. In this case, adjacent positions can be determined independently of the color components. For example, the following adjacent positions can be used.
[0444] (xNbA, yNbA) = (xCb - 1, yCb + cbHeight - 1)
[0445] (xNbB, yNbB) = (xCb + cbWidth - 1, yCb - 1)
[0446] Furthermore, referring to Figure 36, the inputs xCb, yCb, cbWidth, and cbHeight in the weighting value derivation process, as well as the xCb, yCb, cbWidth, and cbHeight of the adjacent positions, may be component criteria that have already been set, regardless of the color component currently being processed. For example, they may be values based on the luma sample criteria. That is, when performing the weighting value derivation process for the chroma component, the values can be obtained based on the xCb, yCb, cbWidth, and cbHeight of the luma sample criteria. More specifically, when performing the weighting value derivation process for the chroma component, adjacent positions can be set based on the xCb, yCb, cbWidth, and cbHeight of the luma sample criteria, and the weighting value can be determined based on these positions.
[0447] The weighted value w can be set based on the weighted value derivation process. The weighted value derivation process in Figure 36 may be the process for setting the weighted value w as described in Figure 30. In this case, as explained, adjacent positions unrelated to color components can be used.
[0448] Furthermore, referring to Figure 36, when using CIIP, a general intra-sample prediction process and a weighted sample prediction process can be performed. This can also be performed for each color component field. The weighted sample prediction process may include a process of combining the intra-prediction and the inter-prediction using the weighting described in Figure 30. For example, the weighted sample prediction process may include a process of combining them using equation (8-840) in Figure 30. Furthermore, according to the embodiments of this disclosure, the weighted sample prediction process can be performed based on a weighting value, and the same weighting value can be used for multiple color component fields. The weighting value used in the weighted sample prediction may be a weighting value w determined based on the weighting value derivation process described above.
[0449] Furthermore, referring to Figure 36, the width and height of the coding block, which is the input to the weighted sample prediction process, may be the values shown based on each color component. Referring to Figure 36, if it is a luma component (when cIdx is 0), the width and height may be cbWidth and cbHeight, respectively, and if it is a chroma component (when cIdx is not 0; when cIdx is 1 or 2), the width and height may be cbWidth / SubWidthC and cbHeight / SubHeightC, respectively.
[0450] In other words, a weighted sample prediction process can be performed using a weighting value determined for a certain color component based on other color components, and using a width and height based on the aforementioned color component. Alternatively, a weighted sample prediction process can be performed using a weighting value determined for a certain color component based on a width and height based on other color components, and using a width and height based on the aforementioned color component. In this case, the aforementioned color component may be a chroma component, and the other color component may be a luma component. In yet another embodiment, the aforementioned color component may be a luma component, and the other color component may be a chroma component.
[0451] This may be done simply to simplify implementation. For example, the process shown in Figure 36 may be performed separately for each color component, but by performing the weighted value derivation process independently of the color components, the implementation of the weighted value derivation process can be simplified. Alternatively, this may be done to avoid performing repetitive processes.
[0452] Figure 37 shows the range of MV and MVD according to one embodiment of the present disclosure.
[0453] According to the embodiments of this disclosure, there may be numerous methods for generating or determining MVDs. The MVD may be the motion vector difference value described above. Furthermore, there may be numerous methods for generating or determining motion vectors (MVs).
[0454] For example, the MVD determination method may include a method that determines it from the values of syntax elements. For instance, the MVD can be determined based on syntax elements as illustrated in Figure 9. This is further illustrated in Figure 40.
[0455] Furthermore, the MVD determination method may include a method for determining the MVD when using MMVD (merge with MVD) mode. For example, there may be an MVD to be used when using merge mode. This will be further explained in Figures 38 and 39.
[0456] In embodiments of this disclosure, MV or MVD may include those for control point motion vectors (CPMV) for performing affine motion compensation. That is, MV and MVD may include CPMV and CPMVD, respectively.
[0457] According to one embodiment of the present disclosure, the range that an MV or MVD can represent may be limited. This allows for the representation and storage of an MV or MVD using limited resources and a limited number of bits, and enables calculations using an MV or MVD. In the embodiments of the present disclosure, the range that an MV or MVD can represent may be referred to as the MV range and the MVD range, respectively.
[0458] In one embodiment, the MV range or MVD range may be from -2^N to (2^N-1). In this case, the range may include both -2^N and (2^N-1). In yet another embodiment, the MV range or MVD range may be from (-2^N+1) to 2^N. In this case, the range may include both (-2^N+1) and 2^N. In this embodiment, N may be an integer, for example, a positive integer. More specifically, N may be 15 or 17. In this case, the MV range or MVD range can be represented using N+1 bits.
[0459] Furthermore, clipping and modulus operations can be performed to realize the restricted MV range or restricted MVD range described above. For example, the MV or MVD at a certain stage (e.g., before the final stage) can be clipped or modulused so that values within the MV range or MVD range are derived. Alternatively, the binary evolution representation range of the syntax element representing the MV or MVD can be restricted to realize the restricted MV range or restricted MVD range.
[0460] According to one embodiment of this disclosure, the MV range and the MVD range may be different. Furthermore, there may be many methods for determining the MVD, and MVD1 and MVD2 may be MVDs determined by different methods. According to yet another embodiment of this disclosure, the MVD1 range and the MVD2 range may be different. Using different ranges may be for using different resources or different numbers of bits, thereby avoiding the need to indicate an unnecessarily wide range for a given element.
[0461] In one embodiment, MVD1 may be the MVD described in Figure 40 or Figure 9. Alternatively, MVD1 may be an AMVP, intermode, or affine intermode MVD. Alternatively, MVD1 may be an MVD when merge mode is not used. Whether or not merge mode is used may be indicated by merge_flag or general_merge_flag. For example, if merge_flag or general_merge_flag is 1, merge mode may be used, and if it is 0, merge mode may not be used.
[0462] In one embodiment, MVD2 may be the MVD described in Figures 38-39. Alternatively, MVD2 may be the MVD in MMVD mode. Alternatively, MVD2 may be the MVD when using merge mode.
[0463] In one embodiment, MV may be the MV used for final motion compensation or prediction. Alternatively, MV may be an MV included in a candidate list. Alternatively, MV may be a collocated motion vector (temporal motion vector). Alternatively, MV may be the value obtained by adding MVD to MVP. Alternatively, MV may be CPMV. Alternatively, MV may be the value obtained by adding CPMVD to CPMVP. Alternatively, MV may be the MV for each subblock in affine MC. The MV for the said subblock may be an MV derived from CPMV. Alternatively, MV may be the MV of MMVD.
[0464] According to embodiments of this disclosure, the MVD2 range may be narrower than the MVD1 range or the MV range. Also, the MVD1 range and the MV range may be the same. According to one embodiment, the MVD1 range and the MV range may be inclusive from -2^17 to (2^17-1). Also, the MVD2 range may be inclusive from -2^15 to (2^15-1).
[0465] Referring to Figure 37, the dotted rectangles represent the MV range or MVD range. The inner rectangle may represent the MVD2 range. The outer rectangle may represent the MVD1 range or MV range. In other words, the MVD2 range may be different from the MVD1 range or MV range. The range in the drawing may represent the vector range that can be shown from the points in the drawing. For example, as mentioned above, the MVD2 range may be from -2^15 to (2^15-1) (inclusive). Also, the MVD1 range or MV range may be from -2^17 to (2^17-1) (inclusive). If MV or MVD is a value in x-pel units, the value that MV or MVD represents may actually be (MV*x) or (MVD*x) pixels. For example, if the value is in 1 / 16-pel units, it may represent (MV / 16) or (MVD / 16) pixels. In this embodiment, for the MVD2 range, the maximum absolute value is 32768, and if this is a value in 1 / 16-pel units, the value of (MVD2 value) / 16 will be a maximum of 2048 pixels. Therefore, it will not be possible to fully cover an 8K picture. For the MVD1 range or MV range, the maximum absolute value is 131072, and when using 1 / 16-pel units, it can represent a maximum of 8192 pixels. Therefore, it can fully cover an 8K picture. An 8K resolution can represent a resolution where the width (or the length of the longer of the width or height) is 7680 pixels or 8192 pixels. For example, a picture such as 7680×4320 may be an 8K resolution.
[0466] Figure 38 shows an MMVD according to one embodiment of the present disclosure.
[0467] According to embodiments of this disclosure, MMVD may be a merge mode with MVD, a merge with MVD, or a method of using MVD as the merge mode. For example, an MV can be generated based on the merge candidate and the MVD. Also, the range that can be represented by the MVD of MMVD may be limited compared to the MVD in Figure 9 or Figure 40, or the aforementioned MVD1. For example, the MVD of MMVD may have only one of either a horizontal component or a vertical component. Also, the absolute values of the values that can be represented by the MVD of MMVD may not be equally spaced. Figure 38(a) shows the points that can be represented by the MVD of MMVD from a point on a central point line.
[0468] Figure 38(b) shows the MMVD-related syntax. In one embodiment, there may be a higher-level signaling indicating whether or not MMVD is used. Here, signaling can mean parsing from the bitstream. The higher level may be a unit including the current block, the current coding block, for example, a slice, sequence, tile, tile group, CTU, etc. The higher-level signaling indicating whether or not MMVD is used may be a higher-level MMVD activation information (sps_mmvd_enabled_flag). If the higher-level MMVD activation information (sps_mmvd_enabled_flag) is 1, it can indicate that MMVD is activated, and if the higher-level MMVD activation information (sps_mmvd_enabled_flag) is 0, it can indicate that MMVD is not activated. However, this is not the only way to do so. It is also possible to show that MMVD is activated when the higher-level MMVD activation information (sps_mmvd_enabled_flag) is 0, and that MMVD is not activated when the higher-level MMVD activation information (sps_mmvd_enabled_flag) is 1.
[0469] If the higher-level signaling indicator (sps_mmvd_enabled_flag), which indicates whether or not MMVD is used, is 1, then additional signaling can be used to indicate whether or not MMVD is used in the current block. That is, if the higher-level signaling indicator (sps_mmvd_enabled_flag) indicates MMVD activation, the video signal processing device can parse MMVD merge information (mmvd_merge_flag), which indicates whether or not MMVD is used in the current block, from the bitstream. The signaling indicator indicating whether or not MMVD is used may be MMVD merge information (mmvd_merge_flag). If MMVD merge information (mmvd_merge_flag) is 1, it means that MMVD is used for the current block. If MMVD merge information (mmvd_merge_flag) is 0, it means that MMVD is not used for the current block. However, this is not the only way to interpret it; a value of 0 for the MMVD merge information (mmvd_merge_flag) means that MMVD will be used for the current block, and a value of 1 for the MMVD merge information (mmvd_merge_flag) means that MMVD will not be used for the current block.
[0470] If the MMVD merge information (mmvd_merge_flag) is 1 (a value indicating use), then MMVD-related syntax elements can be parsed. MMVD-related syntax elements can include at least one of the following: mmvd_cand_flag, information related to MMVD distance (mmvd_distance_idx), or information related to MMVD direction (mmvd_direction_idx).
[0471] As an example, mmvd_cand_flag can indicate the MVP to be used in MMVD mode. Alternatively, mmvd_cand_flag can indicate the merge candidate to be used in MMVD mode. Furthermore, the MVD of an MMVD may be determined based on distance-related information (mmvd_distance_idx) and direction-related information (mmvd_direction_idx) of the MMVD. Here, the MVD of an MMVD can indicate information about the MVD (mMvdLX). For example, distance-related information (mmvd_distance_idx) can indicate a value related to the absolute value of the MVD of the MMVD, and direction-related information (mmvd_direction_idx) can indicate a value related to the direction of the MVD of the MMVD.
[0472] Figure 39 shows the MVD derivation of MMVD according to one embodiment of the present disclosure.
[0473] Referring to the left side of Figure 39, the video signal processing device can determine whether or not an MMVD is used in the current block based on the MMVD merge information (mmvd_merge_flag). Furthermore, if an MMVD is used in the current block, the MVD derivation process can be performed. The MVD derivation process may be as shown in 8.5.2.7 on the right side of Figure 39. The MVD, which is the output of 8.5.2.7, may be the MVD of the MMVD, or it may be information about the MMVD (mMvdLX). As already explained, the information about the MMVD (mMvdLX) can be obtained based on information related to the distance of the MMVD (mmvd_distance_idx) and information related to the direction of the MMVD (mmvd_direction_idx). Here, X may be replaced with 0 or 1, which may correspond to reference list L0 and reference list L1, respectively.
[0474] Also, as shown in FIG. 39, information (mMvdLX) regarding the MVD of MMVD or MMVD can be added to mvLX, which is the motion vector (MV) derived in the previous process ((8-281), (8-282)). Here, X may be replaced with 0, 1, etc., and may correspond to the first reference list (reference list L0) and the second reference list (reference list L1), respectively. Also, here, the MVD of MMVD can indicate information (mMvdLX) regarding MMVD. Also, the video signal processing apparatus can perform a process of restricting the range of the modified motion vector (mvLX) to which the MVD is added. For example, clipping can be performed ((8-283), (8-284)). For example, it can be restricted to the above-described MV range. For example, it can be restricted to from -2^17 to (2^17 - 1) (inclusive).
[0475] In the present disclosure, Clip3(x, y, z) may indicate clipping. For example, the result of Clip3(x, y, z) can be 1) x when z < x, 2) y when z > y, and 3) z in other cases. Therefore, the range of the result of Clip3(x, y, z), the result, may be x <= result <= y.
[0476] In the present embodiment, in mvLX[0][0][comp] and mMvdLX[comp], comp can indicate the x-component or the y-component. For example, they may indicate the horizontal component and the vertical component, respectively.
[0477] Also, the video signal processing apparatus can predict the current block based on the modified motion vector (mvLX). Also, the video signal processing apparatus can restore the current block based on the modified motion vector (mvLX). As already described, the modified motion vector (mvLX) may be a value obtained by adding information (mMvdLX) regarding MMVD to mvLX, which is the motion vector (MV).
[0478] Furthermore, the MVD derivation process for MMVD may be the same as that shown on the right side of Figure 39. The MMVD offset (MmvdOffset) in the drawing may be a value based on the MMVD-related syntax elements described above. For example, the MMVD offset (MmvdOffset) may be a value based on information related to the distance of the MMVD (mmvd_distance_idx) and information related to the direction of the MMVD (mmvd_direction_idx). In short, the MMVD offset (MmvdOffset) may be obtained based on at least one of the distance-related information (mmvd_distance_idx) and the direction-related information (mmvd_direction_idx). Also, information about the MMVD (mMvdLX) may be derived based on the MMVD offset (MmvdOffset).
[0479] According to one embodiment, in the case of biprediction (where predFlagLX can indicate which reference list to use, X may be replaced with 0 or 1, and L0 and L1 may correspond to the first reference list (reference list L0) and the second reference list (reference list L1), respectively), it is possible to determine whether to use the MMVD offset (MmvdOffset) as is as the MVD of the MMVD based on the POC (picture order count), or to use a value calculated based on the MMVD offset (MmvdOffset), or to use the MMVD offset (MmvdOffset) as is for a value for a certain reference list, or to use a value calculated based on the MMVD offset (MmvdOffset) for a value for a certain reference list.
[0480] In one embodiment, an MMVD offset (MmvdOffset) may be used to obtain the MVD for both the first reference list (reference list L0) and the second reference list (reference list L1) ((8-350)~(8-353)). For example, the first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1) may be the same. The POC difference (currPocDiffLX) may be the difference between the POC of the current picture and the POC of the reference picture in reference list LX, where X may be substituted with 0 or 1. The first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1) may be determined by (8-348) and (8-349) in Figure 39, respectively. DiffPicOrderCnt can be calculated as follows.
[0481] DiffPicOrderCnt( picA, picB ) = PicOrderCnt( picA ) - PicOrderCnt( picB )
[0482] PicOrderCnt(picX) may represent the POC value of picture picX.
[0483] Furthermore, in Figure 39, currPic may represent the current picture. Also, RefPicList[X][refIdxLX] may represent the referenced picture when refIdxLX is used in the reference list LX.
[0484] In one embodiment, the MVD for the second reference list (reference list L1) may be calculated using a value based on MmvdOffset ((8-354)~(8-363)). In this case, the MMVD offset (MmvdOffset) value can be used directly as the MVD for the first reference list (reference list L0). In this case, Abs(currPocDiffL0) may be the same as or greater than Abs(currPocDiffL1). Alternatively, Abs(currPocDiffL0) may be greater than Abs(currPocDiffL1).
[0485] In one embodiment, the MVD for the first reference list (reference list L0) may be a value calculated based on the MMVD offset (MmvdOffset) ((8-364)~(8-373)). In this case, the MMVD offset (MmvdOffset) value can be used directly as the MVD for the second reference list (reference list L1). In this case, Abs(currPocDiffL0) may be smaller than Abs(currPocDiffL1). Alternatively, Abs(currPocDiffL0) may be smaller than or the same as Abs(currPocDiffL1).
[0486] According to one embodiment, calculation based on the MMVD offset (MmvdOffset) may represent MV scaling. MV scaling may be (8-356) to (3-361) or (8-366) to (3-371) in Figure 39. The former is scaling based on information about the first MMVD (mMvdL0) or the MMVD offset (MmvdOffset), and may be a process to create information about the second MMVD (mMvdL1), which is a scaled MV. The latter is scaling based on information about the second MMVD (mMvdL1) or the MMVD offset (MmvdOffset), and may be a process to create information about the first MMVD (mMvdL0), which is a scaled motion vector (MV). MV scaling may be an operation based on a scale factor (distScaleFactor((8-359), (8-369))) which is a value based on the first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1). Alternatively, MV scaling may be an operation based on a value obtained by multiplying the scale factor (distScaleFactor) by the scaling MV ((8-360), (8-361), (8-370), (8-371)). Furthermore, MV scaling may include a process to limit the MV range. For example, the range limiting process may be included in (8-360), (8-361), (8-370), and (8-371) in Figure 39. For example, MV scaling may include a clipping process. According to the embodiments of this disclosure, the aforementioned MVD2 range can be used in this case. For example, the range can be limited to (inclusive) from -2^15 to (2^15-1). In other words, the MVD range of MMVD can be restricted to -2^15 to (2^15-1) (inclusive). For example, the MVD derivation process of MMVD can include a process that restricts the value based on the product of distScaleFactor and the scaling MV to -2^15 to (2^15-1) (inclusive). For example, the Clip3(-2^15,2^15-1,x) process may be included in the MVD derivation process of MMVD.More specifically, mMvdLX may be determined as follows:
[0487] mmvdLX = Clip3(-2^15, 2^15 - 1, (distScaleFactor*mMvdLY + 128 - (distScaleFactor*mMvdLY >=0 )) >> 8 )
[0488] In this case, Y may be 0 or 1, or !X. Also, mMvdLY may be MmvdOffset. distScaleFactor may be the value shown in (8-359) or (8-369), and may be a value based on currPocDiffL0 and currPocDiffL1. However, the range of the MVD of MMVD, the information about MMVD (mMvdLX), or the scaled MV is not limited to -2^15 to (2^15-1). The range of the MVD of MMVD, the information about MMVD (mMvdLX), or the scaled MV may be from -2^17 to (2^17-1). This is explained in Figure 43.
[0489] This process can be performed when neither the reference picture for L0 nor L1 is a long-term reference picture.
[0490] According to one embodiment, the calculation based on the MMVD offset (MmvdOffset) may be an MMVD offset (MmvdOffset) or a negative MMVD offset (-MmvdOffset) based on the first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1) ((8-362), (8-363), (8-372), (8-373)). This process can be performed if at least one of the reference pictures for L0 and L1 is a long-term reference picture.
[0491] Furthermore, if uni-prediction is used, it is possible to use MmvdOffset directly in mMvdLX ((8-374), (8-375)).
[0492] Figure 40 shows the MVD and MV derivation according to one embodiment of the present disclosure.
[0493] The embodiment in Figure 40 may be an example using the MV range or MVD1 range in Figure 37. The embodiment in Figure 40 may be an example using the range from -2^17 to (2^17-1) (inclusive).
[0494] Referring to Figure 40, lMvd can be derived based on the syntax elements explained in Figure 9, etc. (7-161). Furthermore, lMvd may be inclusive, ranging from -2^17 to (2^17-1). Also, values such as MvdLX and MvdCpLX may be set to lMvd. Furthermore, lMvd, MvdLX, MvdCpLX, etc. may be the MVD1 mentioned above.
[0495] Furthermore, when using AMVP, intermode, etc., the MV range can be restricted to -2^17 to (2^17-1) (inclusive). In this case, merge mode may not be used. Referring to Figure 40, (8-264) to (8-267) can include the MV range restriction process. Referring to the figure, uLX may be a value based on the sum of MVP (mvpLX) and MVD (mvdLX). Also, based on ULX, the final MV, mvLX, can be calculated. Figure 40 includes a modulus operation, but the value shown by this operation may be restricted to be representable with a certain number of bits or less. For example, by calculating (%2^18), it can be represented with 18 bits. Therefore, the MV range can be restricted to -2^17 to (2^17-1) (inclusive). (8-265) and (8-267) can play a role in resolving the overflow that may occur when adding MVP and MVD together.
[0496] Figure 41 shows the MV and CPMV derivation according to one embodiment of the present disclosure.
[0497] The embodiment in Figure 41 may be an example using the MV range or MVD1 range in Figure 37. The embodiment in Figure 40 may be an example using the range from -2^17 to (2^17-1) (inclusive).
[0498] Figure 41(a) may show a method for deriving a collated motion vector (temporal motion vector). This process may include MV scaling. In this case, it may include an operation to clip a value based on the scaled MV (mvCol) with respect to distScaleFactor ((8-398)). In this case, the clipping can be set to produce results in the range (inclusive) of -131072 and 131071. -131072 is the same value as -2^17. 131071 is the same value as 2^17-1.
[0499] Figure 41(b) shows part of the process for deriving CPMV(cpMvLX). Similarly, a clipping process to limit the range may be included. In this case, the range may be inclusive, from -2^17 to (2^17-1).
[0500] Figure 41(c) shows part of the process for deriving a subblock-based MV. The subblock-based MV may be the MV when using affine MC, subblock-based temporal MV prediction, etc. In this case as well, a clipping process to limit the range may be included. In this case, the range may be from -2^17 to (2^17-1) (inclusive). xSbIdx and ySbIdx in the figure can represent the subblock index on the x axis and the subblock index on the y axis, respectively.
[0501] Figure 42 shows the scope of MV and MVD according to one embodiment of the present disclosure.
[0502] The parts mentioned above can be omitted from this embodiment.
[0503] As mentioned above, there can be numerous methods for generating or determining the MVD. The MVD may be the motion vector difference value mentioned above. Furthermore, there can be numerous methods for generating or determining the MV.
[0504] In this case, according to one embodiment of the present disclosure, the range that MV or MVD can represent may be limited.
[0505] In one embodiment of this disclosure, the MV range and the MVD range may be the same. Alternatively, an MVD generation method may exist, where the MVD generated by MVD generation method 1 is MVD1, and the MVD generated by MVD generation method 2 is MVD2. In this case, the MVD1 range and the MVD2 range may be the same. Furthermore, the MV range, MVD range, MVD1 range, and MVD2 range may range from -2^N to (2^N-1). In this case, the range may include -2^N and (2^N-1). In yet another embodiment, the MV range or MVD range may range from (-2^N+1) to 2^N. In this case, the range may include (-2^N+1) and 2^N. In these embodiments, N may be an integer, for example, a positive integer. More specifically, N may be 17. Also, in this case, the MV range or MVD range can be represented using N+1 bits. Therefore, the MV range, MVD range, MVD1 range, and MVD2 range can all be from -2^17 to (2^17-1).
[0506] Furthermore, as explained in the previous diagram, MV, MVD1, MVD2, etc., may be defined. That is, MV can mean the MV used for final motion compensation or prediction, and the explanation in Figure 37 can be found therein. Also, MVD1 may be the MVD explained in Figure 40 or Figure 9. Alternatively, MVD1 may be the MVD for AMVP, intermode, affine intermode, or when merge mode is not used, and the explanation in Figure 37 can be found therein. Also, MVD2 may be the MVD explained in Figures 38 to 39, or the MVD for MMVD mode, and the explanation in Figure 37 can be found therein. Here, the MVD for MMVD mode may be information about MMVD (mMvdLX).
[0507] Therefore, according to one embodiment, the MVD of AMVP, intermode, affine intermode, and MMVD may all have the same range. Furthermore, the final MV may also have the same range. More specifically, the MVD of AMVP, intermode, affine intermode, and MMVD may all have a range from -2^17 to (2^17-1) (inclusive). Furthermore, the final MV may also have a range from -2^17 to (2^17-1) (inclusive).
[0508] This allows MV and MVD to completely cover a picture of a certain size. Furthermore, if there is a range that an MV or MVD1 can represent, MVD2 can also represent the same range. Therefore, for example, using MVD2 does not have to be as restrictive as other methods due to limitations in the range of representation. Also, when MV, MVD1, etc. can represent any range, ensuring that MVD2 represents the same range does not require additional hardware or software resources. If the MVD of MVD2 or MMVD can represent from -2^17 to (2^17-1) (inclusive), the maximum absolute value is 131072, and if this is a value in 1 / 16-pel units, it can represent up to 8192 pixels. Therefore, it can completely cover an 8K picture.
[0509] Referring to Figure 42, the outer dotted lines show the ranges that MV, MVD1, and MVD2 can represent from the central point. The MV range, MVD1 range, and MVD2 range can all be the same. For example, the MV range, MVD1 range, and MVD2 range can be inclusive, ranging from -2^17 to (2^17-1). Furthermore, this range can include the entire 8K picture. In other words, even in the worst-case scenario, where the picture is shown from edge to edge, the MV, MVD1, and MVD2 ranges can represent this. Therefore, it is possible to represent better motion vectors, resulting in better motion compensation, reduced residuals, and increased coding efficiency.
[0510] Figure 43 shows the MVD derivation of MMVD according to one embodiment of the present disclosure.
[0511] Figure 43 may be a modified version of Figure 39. In the embodiment of Figure 43, the content described in Figure 39 may be omitted. Alternatively, the content mentioned above may be omitted.
[0512] When using MMVD, the MVD derivation process can be performed. The MVD derivation process may be as shown in Figure 43, section 8.5.2.7. The MVD output of 8.5.2.7 may be the MVD of MMVD, or it may be information about MMVD (mMvdLX). As already explained, the information about MMVD (mMvdLX) may be obtained based on information related to the distance of MMVD (mmvd_distance_idx) and information related to the direction of MMVD (mmvd_direction_idx).
[0513] This will be explained in more detail with reference to Figure 43. Referring to Figure 43, the video signal processing unit can obtain the MMVD offset (MmvdOffset). The video signal processing unit can obtain the MMVD offset (MmvdOffset) in order to obtain information about the MMVD (mMvdLX). The MMVD offset (MmvdOffset) may be a value based on the MMVD-related syntax elements mentioned above. For example, the MMVD offset (MmvdOffset) may be a value based on information related to the distance of the MMVD (mmvd_distance_idx) and information related to the direction of the MMVD (mmvd_direction_idx).
[0514] According to one embodiment, a video signal processing device can determine whether the current block is predicted by biprediction based on predFlagLX. predFlagLX can indicate which reference list to use. Here, X may be replaced by 0 or 1, and L0 and L1 may correspond to reference lists L0 and L1, respectively. If predFlagL0 is 1, it can indicate that the first reference list is used. If predFlagL0 is 0, it can indicate that the first reference list is not used. If predFlagL1 is 1, it can indicate that the second reference list is used. If predFlagL1 is 0, it can indicate that the second reference list is not used.
[0515] In Figure 43, when both predFlagL0 and predFlagL1 are 1, a dual prediction can be shown. A dual prediction can indicate that both the first and second reference lists are used. When both the first and second reference lists are used, the video signal processing device can perform the step (8-348) of obtaining the difference in POC (Picture Order Count) between the current picture (currPic) containing the current block and the first reference picture (RefPicList[0][refIdxL0]) based on the first reference list as the first POC difference (currPocDiffL0). Furthermore, when both the first and second reference lists are used, the video signal processing device can perform the step (8-349) of obtaining the difference in POC (Picture Order Count) between the current picture (currPic) and the second reference picture (RefPicList[1][refIdxL1]) based on the first list as the second POC difference (currPocDiffL1).
[0516] The POC difference (currPocDiffLX) may be the difference between the POC of the current picture and the POC of the reference picture in the reference list (reference list LX), where X may be replaced by 0 or 1. The first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1) may be determined by (8-348) and (8-349) in Figure 43, respectively. DiffPicOrderCnt can be calculated as follows.
[0517] DiffPicOrderCnt( picA, picB ) = PicOrderCnt( picA ) - PicOrderCnt( picB )
[0518] PicOrderCnt(picX) may represent the POC value of picture picX.
[0519] The video signal processing device can perform the step of acquiring information about the first MMVD associated with the first reference list (mMvdL0) and information about the second MMVD associated with the second reference list (mMvdL1) based on at least one of the MMVD offset (MmvdOffset), the first POC difference (currPocDiffL0), and the second POC difference (currPocDiffL1). Here, the MMVD information (mMvdLX) can include the information about the first MMVD (mMvdL0) and the information about the second MMVD (mMvdL1). The process by which the video signal processing device acquires the information about the first MMVD (mMvdL0) and the information about the second MMVD (mMvdL1) will be described in detail below.
[0520] The video signal processing device can determine, based on the picture order count (POC), whether to use the MMVD offset (MmvdOffset) directly as the MVD of the MMVD, or to use a value calculated based on the MMVD offset (MmvdOffset), or whether to use the MMVD offset directly for a reference list, or to use a value calculated based on the MMVD offset for a reference list.
[0521] If the first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1) are the same, the video signal processing device can perform the step of acquiring the MMVD offset (MmvdOffset) as information about the first MMVD (mMvdL0) (8-350, 8-351). Also, if the first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1) are the same, the video signal processing device can perform the step of acquiring the MMVD offset (MmvdOffset) as information about the second MMVD (mMvdL1) (8-352, 8-353).
[0522] The video signal processing device can determine whether the absolute value of the first POC difference (Abs(currPocDiffL0)) is greater than the absolute value of the second POC difference (Abs(currPocDiffL1)). Furthermore, if the absolute value of the first POC difference (Abs(currPocDiffL0)) is greater than or equal to the absolute value of the second POC difference (Abs(currPocDiffL1)), the video signal processing device can perform the step (8-354, 8-355) of acquiring the MMVD offset (MmvdOffset) as information about the first MMVD (mMvdL0).
[0523] If the first reference picture (RefPicList[0][refIdxL0]) is not a long-term reference picture and the second reference picture (RefPicList[1][refIdxL1]) is not a long-term reference picture, the video signal processing device may perform the step (8-356~8-361) of scaling the information about the first MMVD (mMvdL0) to obtain the information about the second MMVD (mMvdL1). A scale factor (distScaleFactor) may be used for scaling. The scale factor (distScaleFactor) may be obtained based on at least one of the first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1).
[0524] If the first reference picture is a long-term reference picture, or if the second reference picture is a long-term reference picture, the video signal processing device can perform the step (8-362, 8-363) of acquiring information about the second MMVD (mMvdL1) without scaling the absolute value of the information about the first MMVD (mMvdL0). Here, not scaling means not changing the absolute value of the information about the first MMVD (mMvdL0). That is, the video signal processing device can acquire information about the second MMVD (mMvdL1) with or without changing the sign of the information about the first MMVD (mMvdL0). The video signal processing device can set the information about the second MMVD (mMvdL1) to the information about the first MMVD (mMvdL0) if the signs of the first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1) are the same. Furthermore, if the signs of the first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1) are different, the video signal processing device can set the information regarding the second MMVD (mMvdL1) by changing the sign of the information regarding the first MMVD (mMvdL0).
[0525] The video signal processing device can determine whether the absolute value of the first POC difference (Abs(currPocDiffL0)) is smaller than the absolute value of the second POC difference (Abs(currPocDiffL1)). If the absolute value of the first POC difference (Abs(currPocDiffL0)) is smaller than the absolute value of the second POC difference (Abs(currPocDiffL1)), the video signal processing device can perform the step (8-364, 8-365) of acquiring the MMVD offset (MmvdOffset) as information about the second MMVD (mMvdL1).
[0526] If the first reference picture (RefPicList[0][refIdxL0]) is not a long-term reference picture and the second reference picture (RefPicList[1][refIdxL1]) is not a long-term reference picture, the video signal processing device may perform the steps (8-366~8-371) of scaling the information about the second MMVD (mMvdL1) and obtaining the information about the first MMVD (mMvdL0). A scale factor (distScaleFactor) may be used for scaling. The scale factor (distScaleFactor) may be obtained based on at least one of the first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1).
[0527] If the first reference picture (RefPicList[0][refIdxL0]) is a long-term reference picture, or if the second reference picture (RefPicList[1][refIdxL1]) is a long-term reference picture, the video signal processing device can perform the step (8-372, 8-373) of acquiring information about the first MMVD (mMvdL0) without scaling the absolute value of the information about the second MMVD (mMvdL1). Here, not scaling may mean not changing the absolute value of the information about the second MMVD (mMvdL1). In other words, the video signal processing device can acquire information about the first MMVD (mMvdL0) with or without changing the sign of the information about the second MMVD (mMvdL1). The video signal processing device can set the information regarding the first MMVD (mMvdL0) to the information regarding the second MMVD (mMvdL1) if the signs of the first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1) are the same. Alternatively, if the signs of the first POC difference (currPocDiffL0) and the second POC difference (currPocDiffL1) are different, the video signal processing device can set the information regarding the first MMVD (mMvdL0) by changing the sign of the information regarding the second MMVD (mMvdL1).
[0528] In Figure 43, a uni-prediction can be shown when at least one of predFlagL0 and predFlagL1 is not 1. In the case of a uni-prediction, the MMVD offset (MmvdOffset) can be used directly as information about MMVD (mMvdLX) ((8-374), (8-375)).
[0529] As already explained, the video signal processing device can perform the step of obtaining an MMVD offset based on information related to the distance of the MMVD and information related to the direction of the MMVD in order to obtain information about the MMVD (mMvdLX).
[0530] When only the first reference list is used (predFlagL0==1), the video signal processing device can perform the step (8-374, 8-375) of acquiring the MMVD information (mMvdL0) associated with the first MMVD, without scaling the MMVD offset (MmvdOffset).
[0531] When only the second reference list is used (predFlagL1==1), the video signal processing device may perform the step (8-374, 8-375) of acquiring the MMVD information (mMvdL1) related to the second MMVD, without scaling the MMVD offset (MmvdOffset).
[0532] As mentioned above, the range of the MVD of the MMVD may be restrictive. Here, the MVD of the MMVD may be information about the MMVD (mMvdLX). According to embodiments of this disclosure, the range of the MVD of the MMVD may be the same as the range of an MVD determined by other means (for example, an MVD based on the syntax elements in Figure 9). Also, the range of the MVD of the MMVD may be the same as the range of the final MV. According to embodiments of this disclosure, the range of the MVD range of the MMVD or the range of information about the MMVD (mMvdLX) may be from -2^17 to 2^17-1, in which case the range may include -2^17 and 2^17-1.
[0533] Furthermore, as mentioned above, the MVD derivation process of MMVD may include an MV scaling process. In addition, the MVD derivation process of MMVD may include a clipping operation to limit the range.
[0534] Referring to Figure 43, the MMVD information (mMvdLX) may be based on the clipping operation. In this case, X may be replaced with 0 or 1, which may correspond to the first reference list (reference list L0) and the second reference list (reference list L1), respectively. For example, the MMVD information (mMvdLX) may be based on the Clip3 operation. For example, the MMVD information (mMvdLX) may be based on Clip3(-2^17,2^17-1,x). In this case, x may be a value based on the first POC difference (currPocDiffL0), the second POC difference (currPocDiffL1), or the MMVD offset (MmvdOffset). For example, x may be a value based on the scale element (distScaleFactor) and the MMVD offset (MmvdOffset). Figures 43 (8-360), (8-361), (8-370), and (8-371) include clipping operations to limit the MVD range.
[0535] As a further embodiment, in Figures 42-43, the unified range between MV, MVD, MVD1, and MVD2, and the MVD range for MVD and MMVD generated by multiple MVD generation methods, may be from -2^N+1 to 2^N, in which case the range may include -2^N+1 and 2^N. More specifically, N may be 17. That is, the unified range between MV, MVD, MVD1, and MVD2, and the MVD range for MVD and MMVD generated by multiple MVD generation methods, may be from -2^17+1 to 2^17, in which case the range may include -2^17+1 and 2^17. In this case, MVD can be represented with 18 bits.
[0536] According to one embodiment of this disclosure, the range of chroma MV may differ from the range of luma MV. For example, chroma MV may have a higher resolution than luma MV. That is, one unit of chroma MV can represent a pixel smaller than one unit of luma MV. For example, luma MV may be in units of 1 / 16-pel, and chroma MV may be in units of 1 / 32-pel.
[0537] Furthermore, ChromaMV may be based on LumaMV. For example, ChromaMV may be determined by multiplying LumaMV by any value. The aforementioned values may be 2 / SubWidthC for the horizontal component and 2 / SubHeightC for the vertical component. The 2 included in any of the aforementioned values may be included because the resolution of ChromaMV is twice as high as the resolution of LumaMV. Also, SubWidthC and SubHeightC may be values determined by the color format. Furthermore, SubWidthC and SubHeightC may be values for chorma sample sampling. For example, SubWidthC and SubHeightC may be values relating to how many chroma samples are present relative to the luma samples. Also, SubWidthC and SubHeightC may be 1 or 2.
[0538] According to embodiments of this disclosure, when the resolution of chromaMV is higher than the resolution of lumaMV, the range of chromaMV may be wider than the range of lumaMV. This may be so that chromaMV also covers the region covered by lumaMV. For example, the range of chromaMV may be twice the range of lumaMV. For example, the range of chromaMV may be from -2^18 to 2^18-1, in which case it may be a range that includes -2^18 and 2^18-1. Also, the range of lumaMV may be from -2^17 to 2^17-1, in which case it may be a range that includes -2^17 and 2^17-1.
[0539] Furthermore, the range of chromaMV may be variable depending on the color format. For example, when SubWidthC or SubHeightC is 1, the range of chromaMV may differ from the range of lumaMV. In this case, the range of chromaMV may be twice the range of lumaMV. For example, the range of chromaMV may be from -2^18 to 2^18-1, and in this case, it may be a range that includes -2^18 and 2^18-1, and the range of lumaMV may be from -2^17 to 2^17-1, and in this case, it may be a range that includes -2^17 and 2^17-1. Also, when SubWidthC and SubHeightC are 2, the range of chromaMV may be the same as the range of lumaMV. In this case, the range may be from -2^17 to 2^17-1, and in this case, it may be a range that includes -2^17 and 2^17-1. This is to unify the ranges that chromaMV and lumaMV can represent.
[0540] In the embodiments of this disclosure, if the format is 4:2:0, SubWidthC and SubHeightC may be 2 and 2, respectively. If the format is 4:2:2, SubWidthC and SubHeightC may be 2 and 1, respectively. If the format is 4:4:4, SubWidthC and SubHeightC may be 1 and 1, respectively.
[0541] The embodiments of the present disclosure described above may be embodied by various means. For example, the embodiments of the present disclosure may be embodied by hardware, firmware, software, or a combination thereof.
[0542] In hardware implementation, the methods according to the embodiments of this disclosure may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSPDs (Digital Signal Processing Devices), PLDs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), processors, controllers, microcontrollers, microprocessors, etc.
[0543] In firmware or software implementations, the methods according to the embodiments of this disclosure may be implemented in the form of modules, procedures, or functions that perform the functions or operations described above. The software code may be stored in memory and driven by a processor. The memory may be located inside or outside the processor and can exchange data with the processor by various already known means.
[0544] The descriptions of this disclosure set forth herein are illustrative, and a person with ordinary skill in the art to which this disclosure pertains will understand that it can be readily adapted to other specific forms without altering the technical idea or essential features of this disclosure. Accordingly, the embodiments described above should be interpreted as illustrative and not limiting in any way. For example, each component described as a single type may be implemented in a distributed manner, and similarly, components described as distributed may be implemented in a combined manner.
[0545] The scope of this disclosure is indicated by the claims set forth below, rather than by the detailed description above, and any changes or modifications derived from the meaning and scope of the claims, and the concept of equivalents thereof, should be construed as being included within the scope of this disclosure. [Explanation of Symbols]
[0546] 110 Conversion Unit 115 Quantization section 120 Inverse quantization section 125 Inverse Transform Section 130 Filtering section 150 Prediction Section 152 Intra Prediction Unit 154 Interpretation Unit 154a Motion Estimation Unit 154b Motion compensation unit 160 Entropy coding section 210 Entropy Decoding Unit 220 Inverse quantization section 225 Inverse Transform Section 230 Filtering section 250 Prediction Section 252 Intra Prediction Unit 254 Interpretation Unit 810 Encoder 820 Decoder
Claims
1. The stage of obtaining chroma component format information from a higher-level bitstream; A step of obtaining information regarding width (SubWidthC) and information regarding height (SubHeightC) based on the chroma component format information; A step of obtaining x-axis scale information based on the aforementioned width information or information on the color components of the current block; A step of obtaining y-axis scale information based on the aforementioned height information or information on the color components of the current block; A step in which the position of the left block is determined based on the scale information of the y-axis; A step in which the position of the upper block is determined based on the x-axis scale information; A step of determining a weighted value based on the left block and the upper block; A step of obtaining a first sample by predicting the current block in merge mode; A step of acquiring a second sample by predicting the current block in intra mode; and A method for decoding a video signal, characterized by including the step of obtaining a combination prediction sample for the current block based on the weighted value, the first sample, and the second sample.
2. The step of determining the weighted value is: The step of setting the code information (isIntraCodedNeighbourA) relating to the left block to TRUE, provided that the left block is available and the prediction mode of the left block is intra prediction; The step of setting the code information for the left-hand block to FALSE if the left-hand block is unavailable or the prediction mode for the left-hand block is not intra-prediction; The step of setting the code information (isIntraCodedNeighbourB) relating to the upper block to TRUE when the upper block is available and the prediction mode of the upper block is intra prediction; and A method for decoding a video signal according to claim 1, characterized by including the step of setting the code information relating to the upper block to FALSE when the upper block is unavailable or the prediction mode of the upper block is not intra-prediction.
3. The step of determining the weighted value is: The step of determining the weight value to be 3 when both the code information relating to the left block and the code information relating to the upper block are TRUE; The step of determining the weight value to be 1 when both the code information for the left block and the code information for the upper block are FALSE; and A method for decoding a video signal according to claim 2, characterized in that it includes the step of determining the weighting value to be 2 when only one of the code information relating to the left block and the code information relating to the upper block is TRUE.
4. The step of obtaining the aforementioned combination prediction sample is: predSamplesComb[x][y] = (w*predSamplesIntra[x][y]+(4-w)*predSamplesInter[x][y]+2)>>2 This includes the stage of predicting the current block based on the following: A method for decoding a video signal according to claim 1, characterized in that, here, predSamplesComb means the combination prediction sample, w means the weight value, predSamplesIntra means the second sample, predSamplesInter means the first sample, [x] means the x-axis coordinate of the sample included in the current block, and [y] means the y-axis coordinate of the sample included in the current block.
5. The step of obtaining the x-axis scale information is as follows: The step of determining the x-axis scale information to be 0 when the information regarding the color component of the current block is 0 or the information regarding the width is 1; and The step includes determining the x-axis scale information to be 1 if the information regarding the color component of the current block is not 0 and the information regarding the width is not 1, The step of acquiring the scale information of the y-axis is as follows: The step of determining the y-axis scale information to be 0 when the information regarding the color component of the current block is 0, or the information regarding the height is 1; and A method for decoding a video signal according to claim 1, characterized by including the step of determining the y-axis scale information to be 1 when the information regarding the color component of the current block is not 0 and the information regarding the height is not 1.
6. The position of the left-hand block is, (xCb-1, yCb-1+(cbHeight<<scaleFactHeight)), xCb is the x-axis coordinate of the top-left sample of the current Luma block, yCb is the y-axis coordinate of the top-left sample of the current Luma block, cbHeight is the height of the current block, and scaleFactHeight is the scale information of the y-axis. The position of the upper block is (xCb-1 + (cbWidth << scallFactWidth), yCb-1), A method for decoding a video signal according to claim 1, characterized in that xCb is the x-axis coordinate of the upper left sample of the current Luma block, yCb is the y-axis coordinate of the upper left sample of the current Luma block, cbWidth is the width of the current block, and scaleFactWidth is the scale information of the x axis.
7. A device for decoding video signals includes a processor and memory. The processor, based on the instruction words stored in the memory, Chroma component format information is obtained from a higher-level bitstream, Based on the chroma component format information, information regarding width (SubWidthC) and information regarding height (SubHeightC) are obtained. Based on the information regarding the width or the information regarding the color components of the current block, the x-axis scale information is obtained. Based on the aforementioned height information or the information regarding the color components of the current block, the y-axis scale information is obtained. Based on the scale information of the y-axis, the position of the left block is determined. Based on the x-axis scale information, the position of the upper block is determined. The weighted value is determined based on the left block and the upper block, The first sample is obtained by predicting the current block in merge mode. A second sample is obtained by predicting the current block in intra mode. A device for decoding a video signal, characterized by obtaining a combination prediction sample for the current block based on the weighted value, the first sample, and the second sample.
8. The processor, based on the instruction words stored in the memory, If the left-hand block is available and the prediction mode of the left-hand block is intra-prediction, set the code information (isIntraCodedNeighbourA) for the left-hand block to TRUE. If the left-hand block is unavailable, or if the prediction mode of the left-hand block is not intra-prediction, the code information for the left-hand block is set to FALSE. If the upper block is available and the prediction mode of the upper block is intra prediction, set the code information (isIntraCodedNeighbourB) for the upper block to TRUE. The device for decoding a video signal according to claim 7, characterized in that, if the upper block is unavailable or the prediction mode of the upper block is not intra-prediction, the code information relating to the upper block is set to FALSE.
9. The processor, based on the instruction words stored in the memory, If both the code information for the left block and the code information for the upper block are TRUE, the weight value is determined to be 3. If both the code information for the left block and the code information for the upper block are FALSE, the weighted value is determined to be 1. The video signal decoding device according to claim 8, characterized in that the weighting value is determined to be 2 when only one of the code information relating to the left block and the code information relating to the upper block is TRUE.
10. The processor, based on the instruction words stored in the memory, predSamplesComb[x][y] = (w*predSamplesIntra[x][y]+(4-w)*predSamplesInter[x][y]+2)>>2 Based on this, we predict the current block, The apparatus for decoding a video signal according to claim 7, wherein predSamplesComb means the combination prediction sample, w means the weight value, predSamplesIntra means the second sample, predSamplesInter means the first sample, [x] means the x-axis coordinate of the sample included in the current block, and [y] means the y-axis coordinate of the sample included in the current block.
11. The processor, based on the instruction words stored in the memory, If the information regarding the color component of the current block is 0, or if the information regarding the width is 1, the scale information of the x-axis is determined to be 0. If the information regarding the color component of the current block is not 0 and the information regarding the width is not 1, then the scale information of the x-axis is determined to be 1. If the information regarding the color component of the current block is 0, or if the information regarding the height is 1, the scale information for the y-axis is determined to be 0. The device for decoding a video signal according to claim 7, characterized in that, if the information regarding the color component of the current block is not 0 and the information regarding the height is not 1, the scale information of the y-axis is determined to be 1.
12. The position of the left-hand block is (xCb-1, yCb-1 + (cbHeight << scallFactHeight)), xCb is the x-axis coordinate of the top-left sample of the current Luma block, yCb is the y-axis coordinate of the top-left sample of the current Luma block, cbHeight is the height of the current block, and scaleFactHeight is the scale information of the y-axis. The position of the upper block is (xCb-1 + (cbWidth << scallFactWidth), yCb-1), The apparatus for decoding a video signal according to claim 7, characterized in that xCb is the x-axis coordinate of the upper left sample of the current Luma block, yCb is the y-axis coordinate of the upper left sample of the current Luma block, cbWidth is the width of the current block, and scaleFactWidth is the scale information of the x axis.
13. The stage of generating higher-level chroma component format information; A step of obtaining information regarding width (SubWidthC) and information regarding height (SubHeightC) based on the chroma component format information; A step of obtaining x-axis scale information based on the aforementioned width information or information on the color components of the current block; A step of obtaining y-axis scale information based on the aforementioned height information or information on the color components of the current block; A step in which the position of the left block is determined based on the scale information of the y-axis; A step in which the position of the upper block is determined based on the x-axis scale information; A step of determining a weighted value based on the left block and the upper block; The first step is to obtain the first sample by predicting the current block in merge mode; A step of acquiring a second sample by predicting the current block in intra mode; A method for encoding a video signal, characterized by including the step of obtaining a combination prediction sample for the current block based on the weighted value, the first sample, and the second sample.