WO2023234681A1 - 영상 부호화/복호화 방법 및 장치 - Google Patents

영상 부호화/복호화 방법 및 장치 Download PDF

Info

Publication number
WO2023234681A1
WO2023234681A1 PCT/KR2023/007397 KR2023007397W WO2023234681A1 WO 2023234681 A1 WO2023234681 A1 WO 2023234681A1 KR 2023007397 W KR2023007397 W KR 2023007397W WO 2023234681 A1 WO2023234681 A1 WO 2023234681A1
Authority
WO
WIPO (PCT)
Prior art keywords
reference sample
sample
interpolation filter
line
intra prediction
Prior art date
Application number
PCT/KR2023/007397
Other languages
English (en)
French (fr)
Inventor
임성원
Original Assignee
주식회사 케이티
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 케이티 filed Critical 주식회사 케이티
Publication of WO2023234681A1 publication Critical patent/WO2023234681A1/ko

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • the present invention relates to a video signal processing method and device.
  • High-resolution, high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images
  • UHD Ultra High Definition
  • Video data becomes higher resolution and higher quality
  • the amount of data increases relative to existing video data. Therefore, when video data is transmitted using media such as existing wired or wireless broadband lines or stored using existing storage media, transmission costs and Storage costs increase.
  • High-efficiency video compression technologies can be used to solve these problems that arise as video data becomes higher resolution and higher quality.
  • Inter-screen prediction technology that predicts the pixel value included in the current picture from pictures before or after the current picture using video compression technology
  • intra-screen prediction technology that predicts the pixel value included in the current picture using pixel information in the current picture
  • entropy coding technology which assigns short codes to values with a high frequency of occurrence and long codes to values with a low frequency of occurrence.
  • the purpose of the present disclosure is to provide a method and device for generating a prediction sample by interpolating reference samples belonging to different reference sample lines when encoding/decoding a video signal.
  • the purpose of the present disclosure is to provide a method and device for selecting one of a first direction interpolation filter and a second direction interpolation filter when encoding/decoding a video signal.
  • An image decoding method includes determining an intra prediction mode of a current block; Based on the intra prediction mode, selecting a first reference sample belonging to a first reference sample line; And it may include obtaining a prediction sample of the current block based on the first reference sample. At this time, the prediction sample may be derived by selectively applying one of a first direction interpolation filter or a second direction interpolation filter to the first reference sample.
  • An image encoding method includes determining an intra prediction mode of a current block; Based on the intra prediction mode, selecting a first reference sample belonging to a first reference sample line; And it may include obtaining a prediction sample of the current block based on the first reference sample. At this time, the prediction sample may be derived by selectively applying one of a first direction interpolation filter or a second direction interpolation filter to the first reference sample.
  • the first directional interpolation filter is applied to the first reference sample and a second reference sample adjacent to the first reference sample while belonging to the first reference sample line
  • the second directional interpolation filter may be applied to the first reference sample and a third reference sample belonging to a second reference sample line different from the first reference sample line.
  • the number of taps of the second direction interpolation filter may be determined based on a position projected from the prediction sample along the angle line of the intra prediction mode.
  • One of a one-way interpolation filter and the second direction interpolation filter may be selected.
  • whether the second direction interpolation filter is available may be determined based on at least one of the intra prediction mode or the index of the first reference sample line.
  • the prediction sample when the second direction interpolation filter is not available, the prediction sample may be derived based on the first direction interpolation filter.
  • the second directional interpolation filter has a position projected from the prediction sample along the angle line of the intra prediction mode, the first reference sample line and the first reference sample. It may be available only if it is between a second reference sample line adjacent to the line.
  • one of the first direction interpolation filter and the second direction interpolation filter may be selected based on a flag decoded from a bitstream.
  • a computer-readable recording medium that stores a bitstream encoded by the video encoding method according to the present disclosure may be provided.
  • encoding/decoding efficiency can be improved by generating a prediction sample by interpolating reference samples belonging to different reference sample lines.
  • prediction accuracy can be improved by selectively using one of the first direction interpolation filter and the second direction interpolation filter.
  • FIG. 1 is a block diagram showing a video encoding device according to an embodiment of the present disclosure.
  • Figure 2 is a block diagram showing a video decoding device according to an embodiment of the present disclosure.
  • FIG. 3 illustrates an image encoding/decoding method performed by the image encoding/decoding device according to the present disclosure.
  • Figures 4 and 5 show an example of a plurality of intra prediction modes according to the present disclosure.
  • Figure 6 illustrates a planar mode-based intra prediction method according to the present disclosure.
  • Figure 7 shows a DC mode-based intra prediction method according to the present disclosure.
  • Figure 8 illustrates a directional mode-based intra prediction method according to the present disclosure.
  • Figure 9 shows a method for deriving samples of fractional positions.
  • Figures 10 and 11 show that the tangent value for the angle is scaled by 32 times for each intra prediction mode.
  • Figure 12 is a diagram illustrating an intra prediction aspect when the directional mode is one of modes 34 to 49.
  • Figure 13 is a diagram for explaining an example of generating an upper reference sample by interpolating left reference samples.
  • Figure 14 shows an example in which intra prediction is performed using reference samples arranged in a 1D array.
  • Figure 15 shows an example of interpolating reference samples.
  • Figure 16 shows an example in which at least one of the location or number of reference sample lines is determined according to the intra prediction mode of the current block.
  • FIG. 17 is a diagram illustrating the minimum number of reference sample lines required to derive a second fractional position reference sample for each intra prediction mode.
  • FIG. 18 is a diagram illustrating positions projected from a position to be predicted to each of a plurality of reference samples.
  • first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another.
  • a first component may be named a second component, and similarly, the second component may also be named a first component without departing from the scope of the present invention.
  • the term and/or includes any of a plurality of related stated items or a combination of a plurality of related stated items.
  • Figure 1 is a block diagram showing a video encoding device according to an embodiment of the present invention.
  • the image encoding device 100 includes a picture segmentation unit 110, prediction units 120 and 125, a conversion unit 130, a quantization unit 135, a reordering unit 160, and an entropy encoding unit ( 165), an inverse quantization unit 140, an inverse transform unit 145, a filter unit 150, and a memory 155.
  • each component shown in FIG. 1 is shown independently to represent different characteristic functions in the video encoding device, and does not mean that each component is comprised of separate hardware or a single software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two of each component can be combined to form one component, or one component can be divided into a plurality of components to perform a function, and each of these components can be divided into a plurality of components. Integrated embodiments and separate embodiments of the constituent parts are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.
  • some components may not be essential components that perform essential functions in the present invention, but may simply be optional components to improve performance.
  • the present invention can be implemented by including only essential components for implementing the essence of the present invention excluding components used only to improve performance, and a structure including only essential components excluding optional components used only to improve performance. is also included in the scope of rights of the present invention.
  • the picture division unit 110 may divide the input picture into at least one processing unit.
  • the processing unit may be a prediction unit (PU), a transformation unit (TU), or a coding unit (CU).
  • the picture division unit 110 divides one picture into a combination of a plurality of coding units, prediction units, and transformation units, and combines one coding unit, prediction unit, and transformation unit based on a predetermined standard (for example, a cost function). You can encode the picture by selecting .
  • one picture may be divided into a plurality of coding units.
  • a recursive tree structure such as the Quad Tree Structure can be used. Coding is split into other coding units with one image or the largest coding unit as the root.
  • a unit can be divided into child nodes equal to the number of divided coding units.
  • a coding unit that is no longer divided according to certain restrictions becomes a leaf node. That is, assuming that only square division is possible for one coding unit, one coding unit can be divided into up to four different coding units.
  • the coding unit may be used to mean a unit that performs encoding, or may be used to mean a unit that performs decoding.
  • a prediction unit may be divided into at least one square or rectangular shape of the same size within one coding unit, and any one of the prediction units divided within one coding unit may be a prediction unit of another prediction unit. It may be divided to have a different shape and/or size than the unit.
  • intra prediction can be performed without dividing the prediction unit into a plurality of prediction units NxN.
  • the prediction units 120 and 125 may include an inter prediction unit 120 that performs inter prediction and an intra prediction unit 125 that performs intra prediction. It is possible to determine whether to use inter prediction or intra prediction for a prediction unit, and determine specific information (eg, intra prediction mode, motion vector, reference picture, etc.) according to each prediction method. At this time, the processing unit in which the prediction is performed and the processing unit in which the prediction method and specific contents are determined may be different. For example, the prediction method and prediction mode are determined in prediction units, and prediction may be performed in transformation units. The residual value (residual block) between the generated prediction block and the original block may be input to the conversion unit 130. Additionally, prediction mode information, motion vector information, etc.
  • the entropy encoder 165 may be encoded in the entropy encoder 165 together with the residual value and transmitted to the decoding device.
  • the inter prediction unit 120 may predict a prediction unit based on information on at least one picture among the pictures before or after the current picture, and in some cases, prediction based on information on a partially encoded region within the current picture. Units can also be predicted.
  • the inter prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
  • the reference picture interpolation unit may receive reference picture information from the memory 155 and generate pixel information of an integer number of pixels or less from the reference picture.
  • a DCT-based 8-tap interpolation filter with different filter coefficients can be used to generate pixel information of an integer pixel or less in 1/4 pixel units.
  • a DCT-based 4-tap interpolation filter with different filter coefficients can be used to generate pixel information of an integer pixel or less in 1/8 pixel units.
  • the motion prediction unit may perform motion prediction based on a reference picture interpolated by the reference picture interpolation unit.
  • Various methods such as FBMA (Full search-based Block Matching Algorithm), TSS (Three Step Search), and NTS (New Three-Step Search Algorithm) can be used to calculate the motion vector.
  • the motion vector may have a motion vector value in units of 1/2 or 1/4 pixels based on the interpolated pixels.
  • the motion prediction unit can predict the current prediction unit by using a different motion prediction method.
  • various methods such as the skip method, the merge method, the Advanced Motion Vector Prediction (AMVP) method, and the intra block copy method can be used.
  • AMVP Advanced Motion Vector Prediction
  • the intra prediction unit 125 may generate a prediction unit based on reference pixel information around the current block, which is pixel information in the current picture. If the neighboring block of the current prediction unit is a block on which inter prediction has been performed and the reference pixel is a pixel on which inter prediction has been performed, the reference pixel included in the block on which inter prediction has been performed is the reference pixel of the block on which intra prediction has been performed. It can be used in place of information. That is, when a reference pixel is not available, the unavailable reference pixel information can be replaced with at least one reference pixel among available reference pixels.
  • the prediction mode can include a directional prediction mode that uses reference pixel information according to the prediction direction and a non-directional mode that does not use directional information when performing prediction.
  • the mode for predicting luminance information and the mode for predicting chrominance information may be different, and intra prediction mode information used to predict luminance information or predicted luminance signal information may be used to predict chrominance information.
  • intra prediction when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are the same, intra prediction for the prediction unit is made based on the pixel on the left, the pixel on the top left, and the pixel on the top of the prediction unit. can be performed. However, when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are different, intra prediction can be performed using a reference pixel based on the transformation unit. Additionally, intra prediction using NxN partitioning can be used only for the minimum coding unit.
  • the intra prediction method can generate a prediction block after applying an Adaptive Intra Smoothing (AIS) filter to the reference pixel according to the prediction mode.
  • AIS Adaptive Intra Smoothing
  • the type of AIS filter applied to the reference pixel may be different.
  • the intra prediction mode of the current prediction unit can be predicted from the intra prediction mode of prediction units existing around the current prediction unit.
  • predetermined flag information is used to predict the current prediction unit and neighboring prediction units.
  • Information that the prediction modes of are the same can be transmitted, and if the prediction modes of the current prediction unit and neighboring prediction units are different, entropy encoding can be performed to encode the prediction mode information of the current block.
  • a residual block may be generated that includes residual information that is the difference between the prediction unit on which prediction was performed and the original block of the prediction unit.
  • the generated residual block may be input to the conversion unit 130.
  • the transform unit 130 transforms the residual block, including the original block and the residual value information of the prediction unit generated through the prediction units 120 and 125, into DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT and It can be converted using the same conversion method. Whether to apply DCT, DST, or KLT to transform the residual block can be determined based on intra prediction mode information of the prediction unit used to generate the residual block.
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • KLT Discrete Sine Transform
  • the quantization unit 135 may quantize the values converted to the frequency domain by the conversion unit 130.
  • the quantization coefficient may change depending on the block or the importance of the image.
  • the value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the realignment unit 160.
  • the rearrangement unit 160 may rearrange coefficient values for the quantized residual values.
  • the rearrangement unit 160 can change the coefficients in a two-dimensional block form into a one-dimensional vector form through a coefficient scanning method.
  • the realignment unit 160 can scan from DC coefficients to coefficients in the high frequency region using a zig-zag scan method and change it into a one-dimensional vector form.
  • a vertical scan that scans the two-dimensional block-type coefficients in the column direction or a horizontal scan that scans the two-dimensional block-type coefficients in the row direction may be used instead of the zig-zag scan. That is, depending on the size of the transformation unit and the intra prediction mode, it can be determined which scan method among zig-zag scan, vertical scan, and horizontal scan will be used.
  • the entropy encoding unit 165 may perform entropy encoding based on the values calculated by the reordering unit 160.
  • Entropy coding can use various coding methods, such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
  • the entropy encoding unit 165 receives the residual value coefficient information and block type information of the coding unit, prediction mode information, division unit information, prediction unit information and transmission unit information, and motion information from the reordering unit 160 and the prediction units 120 and 125.
  • Various information such as vector information, reference frame information, block interpolation information, and filtering information can be encoded.
  • the entropy encoding unit 165 may entropy encode the coefficient value of the coding unit input from the reordering unit 160.
  • the inverse quantization unit 140 and the inverse transformation unit 145 inversely quantize the values quantized in the quantization unit 135 and inversely transform the values transformed in the transformation unit 130.
  • the residual value generated in the inverse quantization unit 140 and the inverse transform unit 145 is restored by combining the prediction units predicted through the motion estimation unit, motion compensation unit, and intra prediction unit included in the prediction units 120 and 125. You can create a block (Reconstructed Block).
  • the filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • a deblocking filter may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • ALF adaptive loop filter
  • the deblocking filter can remove block distortion caused by boundaries between blocks in the restored picture. To determine whether to perform deblocking, it is possible to determine whether to apply a deblocking filter to the current block based on the pixels included in several columns or rows included in the block. When applying a deblocking filter to a block, a strong filter or a weak filter can be applied depending on the required deblocking filtering strength. Additionally, when applying a deblocking filter, horizontal filtering and vertical filtering can be processed in parallel when vertical filtering and horizontal filtering are performed.
  • the offset correction unit may correct the offset of the deblocked image from the original image in pixel units.
  • the pixels included in the image are divided into a certain number of areas, then the area to perform offset is determined and the offset is applied to that area, or the offset is performed by considering the edge information of each pixel. You can use the method of applying .
  • Adaptive Loop Filtering can be performed based on a comparison between the filtered restored image and the original image. After dividing the pixels included in the image into predetermined groups, filtering can be performed differentially for each group by determining one filter to be applied to that group. Information related to whether to apply ALF may be transmitted for each coding unit (CU), and the shape and filter coefficients of the ALF filter to be applied may vary for each block. Additionally, an ALF filter of the same type (fixed type) may be applied regardless of the characteristics of the block to which it is applied.
  • ALF Adaptive Loop Filtering
  • the memory 155 may store a reconstructed block or picture calculated through the filter unit 150, and the stored reconstructed block or picture may be provided to the prediction units 120 and 125 when inter prediction is performed.
  • FIG. 2 is a block diagram showing an image decoding device according to an embodiment of the present invention.
  • the image decoding device 200 includes an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, 235, and a filter unit ( 240) and memory 245 may be included.
  • the input bitstream can be decoded in a procedure opposite to that of the video encoding device.
  • the entropy decoding unit 210 may perform entropy decoding in a procedure opposite to the procedure in which entropy encoding is performed in the entropy encoding unit of the video encoding device. For example, various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) may be applied in response to the method performed in the image encoding device.
  • various methods such as Exponential Golomb, CAVLC (Context-Adaptive Variable Length Coding), and CABAC (Context-Adaptive Binary Arithmetic Coding) may be applied in response to the method performed in the image encoding device.
  • the entropy decoder 210 can decode information related to intra prediction and inter prediction performed by the encoding device.
  • the reordering unit 215 may rearrange the bitstream entropy-decoded by the entropy decoding unit 210 based on the method in which the encoder rearranges the bitstream. Coefficients expressed in the form of a one-dimensional vector can be restored and rearranged as coefficients in the form of a two-dimensional block.
  • the reordering unit 215 may receive information related to coefficient scanning performed by the encoder and perform reordering by reverse scanning based on the scanning order performed by the encoder.
  • the inverse quantization unit 220 may perform inverse quantization based on the quantization parameters provided by the encoding device and the coefficient values of the rearranged blocks.
  • the inverse transform unit 225 may perform inverse transform, that is, inverse DCT, inverse DST, and inverse KLT, on the transform performed by the transformer, that is, DCT, DST, and KLT, on the quantization result performed by the image encoding device. Inverse transformation may be performed based on the transmission unit determined by the video encoding device.
  • the inverse transform unit 225 of the video decoding device may selectively perform a transformation technique (eg, DCT, DST, KLT) according to a plurality of information such as a prediction method, the size of the current block, and the prediction direction.
  • a transformation technique eg, DCT, DST, KLT
  • the prediction units 230 and 235 may generate a prediction block based on prediction block generation-related information provided by the entropy decoder 210 and previously decoded block or picture information provided by the memory 245.
  • Intra prediction of the prediction unit is performed based on existing pixels, but when performing intra prediction, if the size of the prediction unit and the size of the transformation unit are different, intra prediction is performed using a reference pixel based on the transformation unit. can do. Additionally, intra prediction using NxN partitioning only for the minimum coding unit can be used.
  • the prediction units 230 and 235 may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit.
  • the prediction unit discriminator receives various information such as prediction unit information input from the entropy decoder 210, prediction mode information of the intra prediction method, and motion prediction-related information of the inter prediction method, distinguishes the prediction unit from the current coding unit, and makes predictions. It is possible to determine whether a unit performs inter-prediction or intra-prediction.
  • the inter prediction unit 230 uses the information required for inter prediction of the current prediction unit provided by the video encoding device to determine the current prediction unit based on the information included in at least one of the pictures before or after the current picture including the current prediction unit. Inter prediction can be performed on prediction units. Alternatively, inter prediction may be performed based on information on a pre-restored partial region within the current picture including the current prediction unit.
  • the motion prediction method of the prediction unit included in the coding unit is Skip Mode, Merge Mode, AMVP Mode, and Intra Block Copy Mode. You can judge whether it is a certain method or not.
  • the intra prediction unit 235 may generate a prediction block based on pixel information in the current picture. If the prediction unit is a prediction unit that has performed intra prediction, intra prediction may be performed based on intra prediction mode information of the prediction unit provided by the video encoding device.
  • the intra prediction unit 235 may include an Adaptive Intra Smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter.
  • AIS filter is a part that performs filtering on the reference pixels of the current block, and can be applied by determining whether or not to apply the filter according to the prediction mode of the current prediction unit.
  • AIS filtering can be performed on the reference pixel of the current block using the prediction mode and AIS filter information of the prediction unit provided by the video encoding device. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
  • the reference pixel interpolator may interpolate the reference pixel to generate a reference pixel in pixel units of an integer value or less. If the prediction mode of the current prediction unit is a prediction mode that generates a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated.
  • the DC filter can generate a prediction block through filtering when the prediction mode of the current block is DC mode.
  • the restored block or picture may be provided to the filter unit 240.
  • the filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
  • the deblocking filter of the video decoding device receives information related to the deblocking filter provided by the video encoding device, and the video decoding device can perform deblocking filtering on the corresponding block.
  • the offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding and offset value information.
  • ALF can be applied to the coding unit based on ALF application availability information, ALF coefficient information, etc. provided from the coding device. This ALF information may be included and provided in a specific parameter set.
  • the memory 245 can store the restored picture or block so that it can be used as a reference picture or reference block, and can also provide the restored picture to an output unit.
  • the term coding unit is used as a coding unit for convenience of explanation, but it may also be a unit that performs not only encoding but also decoding.
  • the current block represents an encoding/decoding target block and, depending on the encoding/decoding stage, is a coding tree block (or coding tree unit), a coding block (or coding unit), a transform block (or transform unit), or a prediction block. (or prediction unit), etc.
  • 'unit' may represent a basic unit for performing a specific encoding/decoding process
  • 'block' may represent a pixel array of a predetermined size.
  • ‘block’ and ‘unit’ can be used with the same meaning.
  • a coding block (coding block) and a coding unit (coding unit) may be understood to have equivalent meanings.
  • FIG. 3 illustrates an image encoding/decoding method performed by the image encoding/decoding device according to the present disclosure.
  • a reference line for intra prediction of the current block can be determined (S300).
  • the current block may use one or more of a plurality of reference line candidates pre-defined in the video encoding/decoding device as a reference line for intra prediction.
  • the plurality of pre-defined reference line candidates may include a neighboring reference line adjacent to the current block to be decoded and N non-neighboring reference lines that are 1-sample to N-sample away from the boundary of the current block.
  • N may be an integer of 1, 2, 3, or more.
  • the plurality of reference line candidates available for the current block consists of a neighboring reference line candidate and three non-neighboring reference line candidates, but is not limited thereto. That is, of course, the plurality of reference line candidates available for the current block may include four or more non-neighboring reference line candidates.
  • the video encoding device can determine an optimal reference line candidate among a plurality of reference line candidates and encode an index for specifying it.
  • the video decoding device can determine the reference line of the current block based on the index signaled through the bitstream.
  • the index may specify one of a plurality of reference line candidates.
  • the reference line candidate specified by the index can be used as the reference line of the current block.
  • the number of indices signaled to determine the reference line of the current block may be 1, 2, or more.
  • the current block may perform intra prediction using only a single reference line candidate specified by the signaled index among a plurality of reference line candidates.
  • the current block may perform intra prediction using a plurality of reference line candidates specified by a plurality of indices among a plurality of reference line candidates.
  • the intra prediction mode of the current block can be determined (S310).
  • the intra prediction mode of the current block may be determined from a plurality of intra prediction modes predefined in the video encoding/decoding device.
  • the plurality of pre-defined intra prediction modes will be examined with reference to FIGS. 4 and 5.
  • Figure 4 shows an example of a plurality of intra prediction modes according to the present disclosure.
  • a plurality of intra prediction modes pre-defined in the video encoding/decoding device may be comprised of a non-directional mode and a directional mode.
  • the non-directional mode may include at least one of planar mode or DC mode.
  • the directional mode may include directional modes numbered 2 to 66.
  • the directional mode may be expanded further than shown in FIG. 4.
  • Figure 5 shows an example in which the directional mode is expanded.
  • modes -1 to -14 and modes 67 to 80 are illustrated as being added. These directional modes may be referred to as wide angle intra prediction modes. Whether to use the wide angle intra prediction mode can be determined depending on the type of the current block. For example, if the current block is a non-square block with a width greater than the height, some directional modes (eg, 2 to 15) may be converted to wide angle intra prediction modes 67 to 80. On the other hand, if the current block is a non-square block with a height greater than the width, some directional modes (e.g., numbers 53 to 66) may be converted to wide angle intra prediction modes between -1 and -14. there is.
  • some directional modes e.g., numbers 53 to 66
  • the range of available wide-angle intra prediction modes can be adaptively determined depending on the width-to-height ratio of the current block.
  • Table 1 shows the range of available wide-angle intra prediction modes according to the width and height ratio of the current block.
  • K candidate modes (most probable mode, MPM) can be selected.
  • a candidate list including the selected candidate mode may be created.
  • An index indicating one of the candidate modes belonging to the candidate list may be signaled.
  • the intra prediction mode of the current block may be determined based on the candidate mode indicated by the index.
  • the candidate mode indicated by the index may be set as the intra prediction mode of the current block.
  • the intra prediction mode of the current block may be determined based on the value of the candidate mode indicated by the index and a predetermined difference value.
  • the difference value may be defined as the difference between the value of the intra prediction mode of the current block and the value of the candidate mode indicated by the index.
  • the difference value may be signaled through a bitstream.
  • the difference value may be a value pre-defined in the video encoding/decoding device.
  • the intra prediction mode of the current block may be a flag indicating whether a mode identical to the intra prediction mode of the current block exists in the candidate list. It can be decided based on. For example, when the flag is the first value, the intra prediction mode of the current block may be determined from the candidate list. In this case, an index indicating one of a plurality of candidate modes belonging to the candidate list may be signaled. The candidate mode indicated by the index may be set as the intra prediction mode of the current block. On the other hand, when the flag is the second value, one of the remaining intra prediction modes may be set as the intra prediction mode of the current block.
  • the remaining intra prediction modes may refer to modes excluding candidate modes belonging to the candidate list among a plurality of pre-defined intra prediction modes.
  • an index indicating one of the remaining intra prediction modes may be signaled.
  • the intra prediction mode indicated by the signaled index may be set as the intra prediction mode of the current block.
  • the intra prediction mode of the chroma block may be selected from among the intra prediction mode candidates of a plurality of chroma blocks. To this end, index information indicating one of the intra prediction mode candidates of the chroma block can be explicitly encoded and signaled through a bitstream. Table 2 illustrates intra prediction mode candidates for chroma block.
  • Luma Mode 0 Luma mode: 50 Luma Mode: 18 Luma Mode: 1 etc 0 66 0 0 0 0 One 50 66 50 50 50 2 18 18 66 18 18 3 One One One 66 One 4 DM
  • Direct Mode means setting the intra prediction mode of the luma block existing at the same location as the chroma block to the intra prediction mode of the chroma block.
  • the intra prediction mode of the chroma block may be determined to be the horizontal mode (number 18).
  • the intra prediction mode of the chroma block may be determined to be planar mode (no. 0).
  • the intra prediction mode of the chroma block can also be set to one of the intra prediction modes shown in FIG. 4 or FIG. 5.
  • the intra prediction mode of the current block may be used to determine the reference line of the current block, in which case step S310 may be performed before step S300.
  • intra prediction may be performed on the current block based on the reference line and intra prediction mode of the current block (S320).
  • Figure 6 illustrates a planar mode-based intra prediction method according to the present disclosure.
  • T represents a reference sample located at the upper right corner of the current block
  • L represents a reference sample located at the lower left corner of the current block.
  • P1 can be generated through horizontal interpolation.
  • P1 can be generated by interpolating T with a reference sample located on the same horizontal line as P1.
  • P2 can be generated through interpolation in the vertical direction.
  • P2 can be generated by interpolating L with a reference sample located on the same vertical line as P2.
  • the current sample in the current block can be predicted through the weighted sum of P1 and P2, as shown in Equation 1 below.
  • the weights ⁇ and ⁇ can be determined considering the width and height of the current block. Depending on the width and height of the current block, weights ⁇ and ⁇ may have the same value or different values. If the width and height of the current block are the same, the weights ⁇ and ⁇ can be set to be the same, and the prediction sample of the current sample can be set to the average value of P1 and P2. If the width and height of the current block are not the same, the weights ⁇ and ⁇ may have different values. For example, if the width is greater than the height, a smaller value can be set to the weight corresponding to the width of the current block, and a larger value can be set to the weight corresponding to the height of the current block.
  • the weight corresponding to the width of the current block may mean ⁇
  • the weight corresponding to the height of the current block may mean ⁇ .
  • Figure 7 shows a DC mode-based intra prediction method according to the present disclosure.
  • the average value of neighboring samples adjacent to the current block can be calculated, and the calculated average value can be set as the predicted value of all samples in the current block.
  • the surrounding samples may include the top reference sample and the left reference sample of the current block.
  • the average value may be calculated using only the top reference sample or the left reference sample. For example, if the width of the current block is greater than the height, the average value can be calculated using only the top reference sample of the current block. Alternatively, if the ratio of the width and height of the current block is greater than or equal to a predetermined threshold, the average value can be calculated using only the top reference sample of the current block.
  • the average value can be calculated using only the upper reference sample of the current block.
  • the width of the current block is smaller than the height, the average value can be calculated using only the left reference sample of the current block.
  • the ratio of the width and height of the current block is less than or equal to a predetermined threshold, the average value can be calculated using only the left reference sample of the current block.
  • the ratio of the width and height of the current block is greater than or equal to a predetermined threshold, the average value can be calculated using only the left reference sample of the current block.
  • Figure 8 illustrates a directional mode-based intra prediction method according to the present disclosure.
  • the intra prediction mode of the current block is a directional mode
  • projection can be performed to a reference line according to the angle of the directional mode.
  • the reference sample can be set as the prediction sample of the current sample.
  • a sample corresponding to the projected position may be generated using one or more surrounding samples adjacent to the projected position. As an example, interpolation may be performed based on two or more neighboring samples in both directions based on the projected position, thereby generating a sample corresponding to the projected position.
  • one surrounding sample adjacent to the projected position can be set as the sample corresponding to the projected position. At this time, among a plurality of neighboring samples adjacent to the projected position, the neighboring sample closest to the projected position may be used.
  • the sample corresponding to the projected position can be set as the predicted sample of the current sample.
  • a reference sample exists at the projected position (i.e., a reference sample at an integer position, R3 ).
  • the reference sample of the projected position can be set as the predicted sample of the current sample B.
  • the reference sample A when projection is performed from that position to the reference line according to the angle of the intra prediction mode, there is no reference sample (i.e., reference sample at the integer position) at the projected position.
  • interpolation may be performed based on surrounding samples (e.g., R2 and R3) neighboring the projected position to generate a sample (r) of the fractional position.
  • the sample (r) at the generated fractional position can be set as the predicted sample of the current sample A.
  • Figure 9 shows a method for deriving samples of fractional positions.
  • variable h means the vertical distance (i.e., vertical distance) from the position of the predicted sample A to the reference sample line
  • variable w means the horizontal distance from the position of the predicted sample A to the fractional position sample. (i.e., horizontal distance).
  • variable ⁇ refers to an angle predefined according to the directionality of the intra prediction mode
  • variable x refers to the fractional position.
  • variable w can be derived as in Equation 2 below.
  • Fractional position samples can be generated by interpolating adjacent integer position reference samples.
  • the integer position reference sample R2 and the integer position reference sample R3 may be interpolated to generate a fractional position reference sample at the x position.
  • a scaling factor can be used to avoid real numbers.
  • the scaling factor f is set to 32
  • the distance between neighboring integer reference samples may be set to 32 instead of 1, as in the example shown in (b) of FIG. 8.
  • the tangent value for the angle ⁇ determined according to the directionality of the intra prediction mode can also be scaled up using the same scaling factor (eg, 32).
  • Figures 10 and 11 show that the tangent value for the angle is scaled by 32 times for each intra prediction mode.
  • FIG. 10 shows the scaled results of tangent values for the non-wide angle intra prediction mode
  • FIG. 11 shows the scaled results of the tangent values for the wide angle intra prediction mode.
  • tangent value (tan ⁇ ) to the angle value in intra prediction mode is positive, reference samples belonging to the top line of the current block (i.e., top reference samples) or reference samples belonging to the left line of the current block (i.e., left Intra prediction can be performed using only one of the reference samples. Meanwhile, when the tangent value for the angle value of the intra prediction mode is negative, both the reference samples located at the top and the reference samples located on the left are used.
  • the left reference samples are projected upward, or the upper reference samples are projected to the left, the reference samples are arranged in a 1D array, and intra prediction is performed using the reference samples in the 1D array. You may.
  • Figure 12 is a diagram illustrating an intra prediction aspect when the directional mode is one of modes 34 to 49.
  • intra prediction mode of the current block is one of modes 34 to 49
  • intra prediction is performed using not only the top reference samples of the current block but also the left reference samples.
  • the reference sample located on the left of the current block can be copied to the position of the top line, or the reference samples located on the left can be interpolated to generate the reference sample of the top line.
  • projection can be performed from the A position on the top line to the left line of the current block.
  • the projected position is called a
  • the value corresponding to the position a can be copied, or a fractional position value corresponding to a can be created and set as the value of the A position.
  • the position a is an integer position
  • the value of the position A can be generated by copying the integer position reference sample.
  • the reference sample located above the a position and the reference sample located below the a position can be interpolated, and the interpolated value can be set as the value of the A position.
  • the direction projected to the left line of the current block may be parallel to and opposite to the direction of the intra prediction mode of the current block.
  • Figure 13 is a diagram for explaining an example of generating an upper reference sample by interpolating left reference samples.
  • variable h represents the horizontal distance between the position A on the top line and the position A on the left line.
  • variable w represents the vertical distance between the position A on the top line and the position A on the left line.
  • variable ⁇ refers to an angle predefined according to the directionality of the intra prediction mode, and the variable x refers to the fractional position.
  • variable h can be derived as in Equation 3 below.
  • a scaling factor can be used to avoid real numbers.
  • the tangent value for variable ⁇ can be scaled using the scaling factor f1.
  • the scaled tangent value shown in FIGS. 10 and 11 may be used.
  • Equation 3 When the scaling factor f1 is applied, Equation 3 can be modified and used as shown in Equation 4 below.
  • a 1D reference sample array can be constructed only with reference samples belonging to the top line.
  • intra prediction for the current block can be performed using only the upper reference samples composed of a 1D array.
  • Figure 14 shows an example in which intra prediction is performed using reference samples arranged in a 1D array.
  • prediction samples of the current block can be obtained using only reference samples belonging to the top line.
  • the top reference sample may be projected onto the left line to form a 1D reference sample array using only reference samples belonging to the left line.
  • the reference samples belonging to the upper line are projected to the left line to generate the left reference sample.
  • One of a plurality of reference sample lines may be selected, and a prediction sample within the current block may be obtained using reference samples belonging to the selected reference sample line.
  • the number of reference sample line candidates that can be selected may be 2, 3, or 4. Additionally, each of the reference sample line candidates may be assigned a different index.
  • a reference sample line for the current block can be selected by encoding and signaling a reference sample line index that identifies one of the reference sample line candidates.
  • the index of each reference sample line candidate may be determined.
  • the reference sample line to which index N is assigned is a row with a vertical distance of (N+1) from the top row of the current block and a column with a horizontal distance of (N+1) from the leftmost column of the current block. It may be configured.
  • a prediction sample of the current block can be obtained based on reference samples belonging to the selected reference sample line. At this time, if the angle line according to the intra prediction mode of the current block does not pass through an integer position, a prediction sample can be generated by interpolating integer position reference samples belonging to the selected reference sample line.
  • Predicted samples can be obtained by performing interpolation based on two or more neighboring samples in both directions based on the projected position.
  • reference samples used for interpolation may belong to the same reference sample line.
  • a fractional position sample may be derived by interpolating reference samples belonging to the selected reference sample line. Accordingly, as in the examples shown in FIGS. 8 and 9, for the top reference samples, a horizontal interpolation filter is applied to derive fractional position samples, while for the left reference samples, vertical interpolation is applied. Filters can be applied to derive fractional position samples.
  • the prediction sample of the current block may be obtained by interpolating reference samples belonging to different reference sample lines. For example, when a first reference sample line is selected, a first reference sample belonging to the second reference sample line and a second reference sample belonging to the second reference sample line may be interpolated to derive a fractional position sample. That is, the prediction sample of the current block can be derived by interpolating the top reference samples arranged up and down, or the prediction sample of the current block can be derived by interpolating the left reference samples arranged left and right.
  • first direction interpolation interpolation of reference samples belonging to the same reference sample line
  • second direction interpolation interpolation of reference samples belonging to different reference sample lines
  • the first direction interpolation when interpolating reference samples located at the top of the current block, the first direction interpolation may be to apply an interpolation filter in the horizontal direction, and the second direction interpolation may be to apply an interpolation filter in the vertical direction.
  • the first direction interpolation when interpolating reference samples located to the left of the current block, the first direction interpolation may apply an interpolation filter in the vertical direction, and the second direction interpolation may apply an interpolation filter in the horizontal direction.
  • Figure 15 shows an example of interpolating reference samples.
  • the first fractional position sample may be obtained by applying a first directional interpolation filter (ie, a horizontal interpolation filter) to reference samples belonging to the same reference sample line. Specifically, using the position to be predicted as the starting point, if the position projected on the reference sample line along the angle line of the intra prediction mode passes between reference sample A and reference sample B, reference sample A and reference sample B are interpolated, A first fractional position sample may be generated.
  • a first directional interpolation filter ie, a horizontal interpolation filter
  • the second fractional position sample may be obtained by applying a second directional interpolation filter (ie, a vertical interpolation filter) to reference samples belonging to different reference sample lines.
  • a second directional interpolation filter ie, a vertical interpolation filter
  • the position projected onto the reference sample line and the adjacent reference sample line along the angle line of the intra prediction mode is included in the reference sample B included in the reference sample line and the adjacent reference sample line.
  • reference sample B and reference sample C can be interpolated to generate a second fractional position sample.
  • the distance y from the integer position reference sample B to the second fractional position sample must be derived.
  • the distance y can be derived according to based on Equation 5 and Equation 6 below.
  • ceil() means a rounding operation.
  • the output value of ceil(3.14) may be set to 4.
  • Equation 6 h represents the vertical distance from the position P to be predicted to the reference sample line, and w represents the horizontal distance from the position P to be predicted to the first fractional position sample. w can be derived according to Equation 2. h1 represents the vertical distance from the position P to be predicted to the second fractional position sample.
  • the distance y from the reference sample B to the second fractional position sample can be derived.
  • scaling operations can be used.
  • the scaling factor f is set to 32, as described through (b) of FIG. 9, the distance between reference samples is scaled by 32 times, and the distance between the reference sample and the second fractional position is scaled from 0 to 32. It can be expressed as an integer value between.
  • reference sample B and reference sample C can be interpolated to derive the second fractional position sample.
  • One of the first fractional position sample and the second fractional position sample may be set as the prediction sample. At this time, which of the first fractional position sample and the second fractional position sample will be set as the prediction sample may be predefined in the encoder and decoder.
  • set the first fractional position sample as the prediction sample based on at least one of the size/shape of the current block, the position of the sample to be predicted, the intra prediction mode, the index of the reference sample line, or whether intra sub-partitioning is applied. It may be determined whether or not to set the second fractional position sample as the prediction sample.
  • a prediction sample when the index of the reference sample line is smaller than the threshold, a prediction sample can be derived using the second fractional position sample.
  • the prediction sample when the index of the reference sample line is greater than or equal to the threshold, the prediction sample can be derived using the first fractional position sample.
  • the threshold may be an integer such as 0, 1, 2, or 3.
  • the reference position reference sample may mean a reference sample (reference sample B in FIG. 15) to which the first direction interpolation filter and the second direction interpolation filter are commonly applied.
  • information indicating the interpolation direction may be encoded and signaled.
  • the information may be a 1-bit flag. For example, the value of the flag being 0 indicates that the prediction sample is derived based on the first fractional position sample derived by applying the first direction interpolation filter, and the value of the flag being 1 indicates that the prediction sample is derived based on the second direction interpolation filter. It indicates that the prediction sample is derived based on the second fractional position sample derived by applying the filter.
  • the information may be encoded and signaled in CTU, CU, TU, or PU units.
  • the interpolation direction may be determined by comparing the absolute value of the difference between reference samples to which the first direction interpolation filter is applied and the absolute value of the difference between reference samples to which the second direction interpolation filter is applied.
  • , and reference sample B to which the second direction interpolation filter is applied and reference Compare the absolute value
  • prediction samples can be derived using a first direction interpolation filter. Otherwise, the prediction sample can be derived using a second directional interpolation filter.
  • a prediction sample can be derived using a first direction interpolation filter.
  • the prediction sample can be derived using a second directional interpolation filter.
  • the prediction sample may be derived based on an average operation or a weighted sum operation of the first fractional position sample and the second fractional position sample.
  • the weight applied to the first fractional position sample and the second fractional position sample may be determined based on at least one of an intra prediction mode or a distance from a standard reference sample.
  • the second reference sample line may be adjacent to the first reference sample line.
  • the index of the second reference sample line may be (m+1) or (m-1).
  • the index of the second reference sample line may be determined based on at least one of the index of the first reference sample line or the intra prediction mode of the current block. As an example, if the index of the first reference sample line is the smallest (i.e., the first (i.e., index 0) reference sample line), the reference sample line with index 1 is selected as the second reference sample line, and the first reference sample line is selected as the second reference sample line. When the index of the sample line is the largest (i.e., the last reference sample line), a reference sample line with an index 1 smaller than the first reference sample line may be selected as the second reference sample line.
  • the second reference sample line may be selected according to the intra prediction mode of the current block. For example, if the index of the intra prediction mode of the current block is larger than that of the vertical mode or smaller than that of the horizontal mode, a reference sample line with an index 1 larger than the first reference sample line may be selected as the second reference sample line. . On the other hand, if the index of the intra prediction mode of the current block is smaller than that of the vertical mode and larger than that of the horizontal mode, a reference sample line with an index 1 smaller than the first reference sample line may be selected as the second reference sample line.
  • the encoder and decoder it may be defined to set a reference sample line with an index 1 larger than the first reference sample line as the second reference sample line. At this time, if the first reference sample line is the last reference sample line, deriving the second fractional position pixel may be omitted and the first fractional position pixel may be set as the prediction sample.
  • a reference sample line with an index 1 greater than the first reference sample line may be defined to be set as the second reference sample line. At this time, if the first reference sample line is the first reference sample line, deriving the second fractional position pixel may be omitted and the first fractional position pixel may be set as the prediction sample.
  • a reference sample line that is not adjacent to the first reference sample may be set as the second reference sample line. That is, the second fractional position pixel can be generated by interpolating the first reference sample belonging to the first reference sample line and the second reference sample whose vertical or horizontal distance from the first reference sample is greater than 1.
  • Fractional position pixels can also be generated using a directional interpolation filter with a number of taps greater than 2.
  • a directional interpolation filter with a number of taps greater than 2 when an interpolation filter with the number of taps (m+1) is used, m reference samples included in m reference sample lines (e.g., from reference sample line N to reference sample line (N+m)) are interpolated. Thus, fractional position samples can be generated.
  • At least one of the location or number of reference sample lines may be adaptively determined based on the intra prediction mode of the current block.
  • Figure 16 shows an example in which at least one of the location or number of reference sample lines is determined according to the intra prediction mode of the current block.
  • the intra prediction mode of the current block is close to the vertical direction. As the number increases, the position projected from the position P to be predicted becomes farther away from the current block when following the angle line of the intra prediction mode.
  • the number of reference sample lines to which the second direction interpolation filter is applied can be increased.
  • the projected position from the position P to be predicted passes between reference sample line 0 and reference sample line 1, using two reference sample lines, i.e., reference sample line 0 and reference sample line 1, A 2-tap second direction interpolation filter can be used.
  • the prediction sample P can be derived.
  • the prediction sample P can be derived by interpolating reference sample a, reference sample b, and reference sample c.
  • the second direction interpolation filter of the (N+1)-tap is used. Fractional position samples can be obtained.
  • the number of taps of the second direction interpolation filter may be fixed to 2 taps, but two reference sample lines may be selected according to the projected position. For example, if the projected position from the position P to be predicted passes between the reference sample line (N-1) and the reference sample line N, the first reference sample and the reference sample line belonging to the reference sample line (N-1) By interpolating the second reference sample belonging to N, the second fractional position sample can be obtained.
  • the number or type of intra prediction modes that can use the second direction interpolation filter may be limited.
  • use of the second directional interpolation filter may be limited to only the intra prediction mode in which the second fractional position sample can be used only from the available reference sample lines.
  • FIG. 17 is a diagram illustrating the minimum number of reference sample lines required to derive a second fractional position reference sample for each intra prediction mode.
  • tan( ⁇ 1), tan( ⁇ 2), and tan( ⁇ 3) have values of 1, 1/2, and 1/3, respectively.
  • the intra prediction mode corresponding to each can be determined.
  • FIG. 10 it can be seen that the above three tangent values scaled up by 32 times match intra prediction modes 66, 60, and 57, respectively.
  • the intra prediction mode of the current block is between numbers 60 and 66, it can be expected that the position projected from the position P to be predicted will be between reference sample line 0 and reference sample line 1.
  • the intra prediction mode of the current block is between numbers 57 and 60, it can be expected that the position projected from the position P to be predicted will be between reference sample line 1 and reference sample line 2.
  • the second directional interpolation filter is used only when the intra prediction mode of the current block is greater than 60. It may be available.
  • the second directional interpolation filter only if the intra prediction mode of the current block is greater than 57 may be available.
  • the number of intra prediction modes that can use the second direction interpolation filter may increase.
  • the prediction sample of the current block can be derived using the first direction interpolation filter.
  • a second fractional position pixel may be generated by applying a second direction interpolation filter to reference samples located to the left of the current block.
  • the first direction interpolation filter is for interpolating reference samples adjacent up and down, that is, left reference samples belonging to the same reference sample line
  • the second direction interpolation filter may be used to interpolate left and right adjacent reference samples, that is, left reference samples belonging to different reference sample lines.
  • the above-described embodiments can be applied as is by transposing the reference samples. .
  • Whether the second directional interpolation filter is available may be determined based on at least one of the size, shape, intra prediction mode, or index of the reference sample line of the current block.
  • the second directional interpolation filter may be set as available only when the intra prediction mode of the current block is the same as one of a plurality of candidate modes included in the candidate list (eg, MPM list).
  • a second directional interpolation filter when it is determined that a second directional interpolation filter is used for the current block, encoding/decoding of a flag indicating whether the intra prediction mode of the current block is the same as one of a plurality of candidate modes is omitted, An index indicating one of a plurality of candidate modes may be encoded and signaled. That is, when the second directional interpolation filter is used in the current block, all intra predictions of the current block may be set to the same value as one of a plurality of candidate modes included in the candidate list.
  • the second direction interpolation filter may be set to be available only when the index of the reference sample line of the current block is less than or equal to a threshold.
  • the threshold may be an integer such as 0, 1, 2, or 3.
  • encoding/decoding of the information indicating the index of the reference sample line of the current block is omitted, or the maximum of the information indicating the index of the reference sample line is omitted. It can be set so that the value does not exceed the threshold. For example, after omitting the encoding/decoding of information indicating the index of the reference sample line of the current block, a reference sample line adjacent to the current block (i.e., reference sample line 0) may be selected as the reference sample line of the current block. .
  • information indicating whether the second directional interpolation filter is applied to the current block may be encoded/decoded.
  • the position projected along the intra prediction mode from the position to be predicted is the reference sample line and the reference sample line adjacent to the reference sample line.
  • Whether or not to use the second direction interpolation filter may be determined based on whether or not the second direction interpolation filter is present.
  • the index of the intra prediction mode of the current block is between numbers 50 and 60
  • the position projected from the position P to be predicted is reference sample line 1 and reference sample line It is located at 2. Accordingly, it may be determined that the second direction interpolation filter is available only when reference sample line 1 or reference sample line 2 is selected as the reference sample line of the current block.
  • the position projected on the first reference sample line among the plurality of reference sample lines is a fractional position.
  • the position projected on the second reference sample line among the plurality of reference sample lines is an integer position.
  • FIG. 18 is a diagram illustrating positions projected from a position to be predicted to each of a plurality of reference samples.
  • the position projected onto reference sample line 0 from the position P to be predicted is the fractional position between reference sample A and reference sample B, while the position projected onto reference sample line 1 is the fractional position between reference sample C, In other words, it points to an integer position.
  • the integer position reference sample C can be set as the prediction sample. That is, when it is necessary to select one of a fractional position reference sample and an integer position reference sample as the prediction sample of the current block, the integer position reference sample can be preferentially set as the prediction sample.
  • an interpolation filter i.e., a first direction interpolation filter and a second direction interpolation filter
  • one of the first fractional position sample and the integer position reference sample C derived by interpolating the reference sample A and reference sample B may be selected according to a predetermined criterion, and the selected one may be set as the prediction sample.
  • it is used to derive a first fractional position reference sample, which is the difference (i.e.,
  • the difference between reference samples A and B, which are horizontally adjacent to each other
  • an integer position reference sample C which is vertically adjacent to each other.
  • a reference sample e.g., B or D
  • one of the first fractional position sample and the integer position reference sample C can be set as the prediction sample.
  • the first fractional position sample is predicted to be the first fractional position sample. It can be set to . Otherwise, the integer position reference sample C can be set as the prediction sample. Alternatively, contrary to the example above, the one with the larger difference may be selected as the prediction sample.
  • one of a plurality of reference samples (eg, B and D) adjacent to the integer position reference sample C in the vertical direction may be selected to derive the difference.
  • the preset condition may be at least one of the sizes of reference samples or the size of the difference with the integer position reference sample C.
  • the preset condition may be at least one of the sizes of reference samples or the size of the difference with the integer position reference sample C.
  • the difference between reference samples may be derived using the reference position reference sample.
  • the fiducial position reference sample may be one of the reference samples (e.g., reference sample A and reference sample B) used to derive the first fractional position sample that lies on the same vertical line as the integer position reference sample (e.g., reference sample C). there is.
  • reference sample B may be set as the reference position reference sample.
  • One of the first fractional position sample and the integer position reference sample C can be selected.
  • the distance from the reference position reference sample B to the reference sample A, which is horizontally adjacent to the reference position reference sample, and the distance from the upright position reference sample B to the reference sample D, which is adjacent to the integer position reference sample C are different.
  • a comparison operation may be performed by assigning a weight to one of the difference between reference sample A and reference sample B and the difference between reference sample B and reference sample D.
  • give high priority to the difference between reference sample A and reference sample B i.e.,
  • a weight that reduces the difference value e.g., a weight less than 1
  • a weight that increases the difference value e.g., a weight greater than 1
  • the precision of fractional position samples may be compared to determine whether to apply an interpolation filter in the first direction or an interpolation filter in the second direction.
  • one of the first fractional position sample and the second fractional position sample can be selected.
  • those with a precision close to a 1/2 position or those with a precision close to an integer position can be used to derive a prediction sample.
  • each of the components (e.g., units, modules, etc.) constituting the block diagram may be implemented as a hardware device or software, and a plurality of components may be combined to form a single hardware device or software. It may be implemented.
  • the above-described embodiments may be implemented in the form of program instructions that can be executed through various computer components and recorded on a computer-readable recording medium.
  • the computer-readable recording medium may include program instructions, data files, data structures, etc., singly or in combination.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, and magneto-optical media such as floptical disks. media), and hardware devices specifically configured to store and perform program instructions, such as ROM, RAM, flash memory, etc.
  • the hardware device may be configured to operate as one or more software modules to perform processing according to the invention and vice versa.
  • Embodiments described in this disclosure may be applied to electronic devices that encode or decode images.

Abstract

본 발명에 따른 영상 부호화/복호화 방법은, 현재 블록의 인트라 예측 모드를 결정하는 단계; 상기 인트라 예측 모드에 기반하여, 제1 참조 샘플 라인에 속하는 제1 참조 샘플을 선택하는 단계; 및 상기 제1 참조 샘플에 기반하여 상기 현재 블록의 예측 샘플을 획득하는 단계를 포함한다. 이때, 상기 예측 샘플은, 상기 제1 참조 샘플에 제1 방향 보간 필터 또는 제2 방향 보간 필터 중 하나를 선택적으로 적용하여, 유도될 수 있다.

Description

영상 부호화/복호화 방법 및 장치
본 발명은 영상 신호 처리 방법 및 장치에 관한 것이다.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 고효율의 영상 압축 기술들이 활용될 수 있다.
영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 화면 간 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 화면 내 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.
한편, 고해상도 영상에 대한 수요가 증가함과 함께, 새로운 영상 서비스로서 입체 영상 컨텐츠에 대한 수요도 함께 증가하고 있다. 고해상도 및 초고해상도의 입체 영상 콘텐츠를 효과적으로 제공하기 위한 비디오 압축 기술에 대하여 논의가 진행되고 있다.
본 개시는 영상 신호를 부호화/복호화함에 있어서, 상이한 참조 샘플 라인에 속한 참조 샘플들을 보간하여 예측 샘플을 생성하는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 개시는 영상 신호를 부호화/복호화함에 있어서, 제1 방향 보간 필터와 제2 방향 보간 필터 중 하나를 선택하는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 개시에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
본 개시에 따른 영상 복호화 방법은, 현재 블록의 인트라 예측 모드를 결정하는 단계; 상기 인트라 예측 모드에 기반하여, 제1 참조 샘플 라인에 속하는 제1 참조 샘플을 선택하는 단계; 및 상기 제1 참조 샘플에 기반하여 상기 현재 블록의 예측 샘플을 획득하는 단계를 포함할 수 있다. 이때, 상기 예측 샘플은, 상기 제1 참조 샘플에 제1 방향 보간 필터 또는 제2 방향 보간 필터 중 하나를 선택적으로 적용하여, 유도될 수 있다.
본 개시에 따른 영상 부호화 방법은, 현재 블록의 인트라 예측 모드를 결정하는 단계; 상기 인트라 예측 모드에 기반하여, 제1 참조 샘플 라인에 속하는 제1 참조 샘플을 선택하는 단계; 및 상기 제1 참조 샘플에 기반하여 상기 현재 블록의 예측 샘플을 획득하는 단계를 포함할 수 있다. 이때, 상기 예측 샘플은, 상기 제1 참조 샘플에 제1 방향 보간 필터 또는 제2 방향 보간 필터 중 하나를 선택적으로 적용하여, 유도될 수 있다.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 제1 방향 보간 필터는, 상기 제1 참조 샘플 및 상기 제1 참조 샘플 라인에 속하면서 상기 제1 참조 샘플에 인접하는 제2 참조 샘플에 적용되고, 상기 제2 방향 보간 필터는, 상기 제1 참조 샘플 및 상기 제1 참조 샘플 라인과 상이한 제2 참조 샘플 라인에 속하는 제3 참조 샘플에 적용될 수 있다.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 제2 방향 보간 필터의 탭수는, 상기 예측 샘플로부터 상기 인트라 예측 모드의 각도선을 따라 프로젝션되는 위치를 기반으로 결정될 수 있다.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 제1 참조 샘플 및 상기 제2 참조 샘플 사이의 차분 및 상기 제1 참조 샘플 및 상기 제3 참조 샘플 사이의 차분의 비교 결과에 기초하여, 상기 제1 방향 보간 필터 및 상기 제2 방향 보간 필터 중 하나가 선택될 수 있다.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 제2 방향 보간 필터가 이용 가능한지 여부는, 상기 인트라 예측 모드 또는 상기 제1 참조 샘플 라인의 인덱스 중 적어도 하나를 기반으로 결정될 수 있다.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 제2 방향 보간 필터가 이용 불가능한 경우, 상기 제1 방향 보간 필터를 기반으로 상기 예측 샘플이 유도될 수 있다.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 상기 제2 방향 보간 필터는, 상기 예측 샘플로부터 상기 인트라 예측 모드의 각도선을 따라 프로젝션되는 위치가, 상기 제1 참조 샘플 라인 및 상기 제1 참조 샘플 라인에 인접하는 제2 참조 샘플 라인 사이인 경우에 한하여, 이용 가능할 수 있다.
본 개시에 따른 영상 복호화/부호화 방법에 있어서, 비트스트림으로부터 복호화된 플래그에 기반하여, 상기 제1 방향 보간 필터 및 상기 제2 방향 보간 필터 중 하나가 선택될 수 있다.
본 개시에 따른 영상 부호화 방법에 의해 부호화된 비트스트림을 저장하는 컴퓨터로 판독가능한 기록 매체가 제공될 수 있다.
본 개시에 의하면, 상이한 참조 샘플 라인에 속한 참조 샘플들 보간하여 예측 샘플을 생성함으로써, 부호화/복호화 효율을 향상시킬 수 있다.
본 개시에 의하면, 제1 방향 보간 필터 및 제2 방향 보간 필터 중 하나를 선택적으로 사용함으로써, 예측 정확도를 향상시킬 수 있다.
본 개시에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
도 1은 본 개시의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 2는 본 개시의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 3은 본 개시에 따른 영상 부호화/복호화 장치에 의해 수행되는 영상 부호화/복호화 방법을 도시한 것이다.
도 4 및 도 5는 본 개시에 따른 복수의 인트라 예측 모드의 일예를 도시한 것이다.
도 6은 본 개시에 따른 플래너 모드 기반의 인트라 예측 방법을 도시한 것이다.
도 7은 본 개시에 따른 DC 모드 기반의 인트라 예측 방법을 도시한 것이다.
도 8은 본 개시에 따른 방향성 모드 기반의 인트라 예측 방법을 도시한 것이다.
도 9는 분수 위치의 샘플을 유도하는 방법을 도시한 것이다.
도 10 및 도 11은 인트라 예측 모드별, 각도에 대한 탄젠트 값이 32배 스케일링된 것을 도시한 것이다.
도 12는 방향성 모드가 34번 내지 49번 모드 중 하나인 경우, 인트라 예측 양상을 예시한 도면이다.
도 13은 좌측 참조 샘플들을 보간하여 상단 참조 샘플을 생성하는 예를 설명하기 위한 도면이다.
도 14는 1D 어레이로 배열된 참조 샘플들을 이용하여, 인트라 예측이 수행되는 예를 나타낸 것이다.
도 15는 참조 샘플들을 보간하는 예를 나타낸 것이다.
도 16은 현재 블록의 인트라 예측 모드에 따른, 참조 샘플 라인들의 위치 또는 개수 중 적어도 하나가 결정되는 예를 나타낸 것이다.
도 17은 인트라 예측 모드별, 제2 분수 위치 참조 샘플을 유도하는데 필요한 최소 참조 샘플 라인들의 개수를 설명하기 위한 도면이다.
도 18은 예측하고자 하는 위치로부터 복수의 참조 샘플들 각각에 프로젝션된 위치를 예시한 도면이다.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.
이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.
도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 1을 참조하면, 영상 부호화 장치(100)는 픽쳐 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.
도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.
또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.
픽쳐 분할부(110)는 입력된 픽쳐를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 픽쳐 분할부(110)에서는 하나의 픽쳐에 대해 복수의 부호화 단위, 예측 단위 및 변환 단위의 조합으로 분할하고 소정의 기준(예를 들어, 비용 함수)으로 하나의 부호화 단위, 예측 단위 및 변환 단위 조합을 선택하여 픽쳐를 부호화 할 수 있다.
예를 들어, 하나의 픽쳐는 복수개의 부호화 단위로 분할될 수 있다. 픽쳐에서 부호화 단위를 분할하기 위해서는 쿼드 트리 구조(Quad Tree Structure)와 같은 재귀적인 트리 구조를 사용할 수 있는데 하나의 영상 또는 최대 크기 부호화 단위(largest coding unit)를 루트로 하여 다른 부호화 단위로 분할되는 부호화 유닛은 분할된 부호화 단위의 개수만큼의 자식 노드를 가지고 분할될 수 있다. 일정한 제한에 따라 더 이상 분할되지 않는 부호화 단위는 리프 노드가 된다. 즉, 하나의 코딩 유닛에 대하여 정방형 분할만이 가능하다고 가정하는 경우, 하나의 부호화 단위는 최대 4개의 다른 부호화 단위로 분할될 수 있다.
이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.
예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수도 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태 및/또는 크기를 가지도록 분할된 것일 수도 있다.
부호화 단위를 기초로 인트라 예측을 수행하는 예측 단위를 생성시 최소 부호화 단위가 아닌 경우, 복수의 예측 단위 NxN으로 분할하지 않고 인트라 예측을 수행할 수 있다.
예측부(120, 125)는 인터 예측을 수행하는 인터 예측부(120)와 인트라 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화 장치에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(120, 125)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.
인터 예측부(120)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 인터 예측부(120)는 참조 픽쳐 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다.
참조 픽쳐 보간부에서는 메모리(155)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.
모션 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 모션 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 모션 벡터값을 가질 수 있다. 모션 예측부에서는 모션 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 모션 예측 방법으로 스킵(Skip) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법, 인트라 블록 카피(Intra Block Copy) 방법 등 다양한 방법이 사용될 수 있다.
인트라 예측부(125)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 인터 예측을 수행한 블록이어서, 참조 픽셀이 인터 예측을 수행한 픽셀일 경우, 인터 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 인트라 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.
인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.
인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행할 수 있다. 그러나 인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수 있다.
인트라 예측 방법은 예측 모드에 따라 참조 화소에 AIS(Adaptive Intra Smoothing) 필터를 적용한 후 예측 블록을 생성할 수 있다. 참조 화소에 적용되는 AIS 필터의 종류는 상이할 수 있다. 인트라 예측 방법을 수행하기 위해 현재 예측 단위의 인트라 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 인트라 예측 모드로부터 예측할 수 있다. 주변 예측 단위로부터 예측된 모드 정보를 이용하여 현재 예측 단위의 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 인트라 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이하면 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다.
또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다.
변환부(130)에서는 원본 블록과 예측부(120, 125)를 통해 생성된 예측 단위의 잔차값(residual)정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT와 같은 변환 방법을 사용하여 변환시킬 수 있다. 잔차 블록을 변환하기 위해 DCT를 적용할지, DST를 적용할지 또는 KLT를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드 정보를 기초로 결정할 수 있다.
양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.
재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.
재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 지그-재그 스캔(Zig-Zag Scan)방법을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.
엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.
엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다.
엔트로피 부호화부(165)에서는 재정렬부(160)에서 입력된 부호화 단위의 계수값을 엔트로피 부호화할 수 있다.
역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부(120, 125)에 포함된 움직임 추정부, 움직임 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다.
필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.
디블록킹 필터는 복원된 픽쳐에서 블록 간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.
오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.
ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다.
메모리(155)는 필터부(150)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 인터 예측을 수행 시 예측부(120, 125)에 제공될 수 있다.
도 2는 본 발명의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 2를 참조하면, 영상 복호화 장치(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230, 235), 필터부(240), 메모리(245)가 포함될 수 있다.
영상 부호화 장치에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 부호화 장치와 반대의 절차로 복호화될 수 있다.
엔트로피 복호화부(210)는 영상 부호화 장치의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화 장치에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다.
엔트로피 복호화부(210)에서는 부호화 장치에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.
재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)에서는 부호화부에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 해당 부호화부에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통해 재정렬을 수행할 수 있다.
역양자화부(220)는 부호화 장치에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다.
역변환부(225)는 영상 부호화 장치에서 수행한 양자화 결과에 대해 변환부에서 수행한 변환 즉, DCT, DST, 및 KLT에 대해 역변환 즉, 역 DCT, 역 DST 및 역 KLT를 수행할 수 있다. 역변환은 영상 부호화 장치에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 복호화 장치의 역변환부(225)에서는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT, DST, KLT)이 선택적으로 수행될 수 있다.
예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다.
전술한 바와 같이 영상 부호화 장치에서의 동작과 동일하게 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수도 있다.
예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 인터 예측부(230)는 영상 부호화 장치에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽쳐 내에서 기-복원된 일부 영역의 정보를 기초로 인터 예측을 수행할 수도 있다.
인터 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode), 인트라 블록 카피 모드 중 어떠한 방법인지 여부를 판단할 수 있다.
인트라 예측부(235)는 현재 픽쳐 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 인트라 예측을 수행한 예측 단위인 경우, 영상 부호화 장치에서 제공된 예측 단위의 인트라 예측 모드 정보를 기초로 인트라 예측을 수행할 수 있다. 인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화 장치에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.
참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.
복원된 블록 또는 픽쳐는 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.
영상 부호화 장치로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화 장치의 디블록킹 필터에서는 영상 부호화 장치에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화 장치에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다.
오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.
ALF는 부호화 장치로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.
메모리(245)는 복원된 픽쳐 또는 블록을 저장하여 참조 픽쳐 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽쳐를 출력부로 제공할 수 있다.
전술한 바와 같이 이하, 본 발명의 실시예에서는 설명의 편의상 코딩 유닛(Coding Unit)을 부호화 단위라는 용어로 사용하지만, 부호화 뿐만 아니라 복호화를 수행하는 단위가 될 수도 있다.
또한, 현재 블록은, 부호화/복호화 대상 블록을 나타내는 것으로, 부호화/복호화 단계에 따라, 코딩 트리 블록(또는 코딩 트리 유닛), 부호화 블록(또는 부호화 유닛), 변환 블록(또는 변환 유닛) 또는 예측 블록(또는 예측 유닛) 등을 나타내는 것일 수 있다. 본 명세서에서, '유닛'은 특정 부호화/복호화 프로세스를 수행하기 위한 기본 단위를 나타내고, '블록'은 소정 크기의 화소 어레이를 나타낼 수 있다. 별도의 구분이 없는 한, '블록'과 '유닛'은 동등한 의미로 사용될 수 있다. 예컨대, 후술되는 실시예에서, 부호화 블록(코딩 블록) 및 부호화 유닛(코딩 유닛)은 상호 동등한 의미인 것으로 이해될 수 있다.
도 3은 본 개시에 따른 영상 부호화/복호화 장치에 의해 수행되는 영상 부호화/복호화 방법을 도시한 것이다.
도 3을 참조하면, 현재 블록의 인트라 예측을 위한 참조 라인을 결정할 수 있다(S300).
현재 블록은 영상 부호화/복호화 장치에 기-정의된 복수의 참조 라인 후보 중 하나 또는 그 이상을 인트라 예측을 위한 참조 라인으로 이용할 수 있다. 여기서, 기-정의된 복수의 참조 라인 후보는, 복호화 대상인 현재 블록에 인접한 이웃 참조 라인과 현재 블록의 경계로부터 1-샘플 내지 N-샘플만큼 떨어진 N개의 비-이웃 참조 라인을 포함할 수 있다. N은 1, 2, 3, 또는 그 이상의 정수일 수 있다. 이하, 설명의 편의를 위해, 현재 블록이 이용 가능한 복수의 참조 라인 후보는, 이웃 참조 라인 후보과 3개의 비-이웃 참조 라인 후보로 구성됨을 가정하나, 이에 한정되지 아니한다. 즉, 현재 블록이 이용 가능한 복수의 참조 라인 후보는 4개 또는 그 이상의 비-이웃 참조 라인 후보를 포함할 수 있음은 물론이다.
영상 부호화 장치는, 복수의 참조 라인 후보 중 최적의 참조 라인 후보를 결정하고, 이를 특정하기 위한 인덱스를 부호화할 수 있다. 영상 복호화 장치는, 비트스트림을 통해 시그날링되는 인덱스에 기초하여, 현재 블록의 참조 라인을 결정할 수 있다. 상기 인덱스는, 복수의 참조 라인 후보 중 어느 하나를 특정할 수 있다. 상기 인덱스에 의해 특정된 참조 라인 후보가 현재 블록의 참조 라인으로 이용될 수 있다.
현재 블록의 참조 라인을 결정하기 위해 시그날링되는 인덱스의 개수는 1개일 수도 있고, 2개 또는 그 이상일 수도 있다. 일 예로, 상기 시그날링되는 인덱스의 개수가 1개인 경우, 현재 블록은 복수의 참조 라인 후보 중에서 상기 시그날링된 인덱스에 의해 특정되는 단일의 참조 라인 후보만을 이용하여 인트라 예측을 수행할 수 있다. 또는, 상기 시그날링되는 인덱스의 개수가 2개 이상인 경우, 현재 블록은 복수의 참조 라인 후보 중에서 복수개의 인덱스에 의해 특정되는 복수의 참조 라인 후보를 이용하여 인트라 예측을 수행할 수 있다.
도 3을 참조하면, 현재 블록의 인트라 예측 모드를 결정할 수 있다(S310).
현재 블록의 인트라 예측 모드는 영상 부호화/복호화 장치에 기-정의된 복수의 인트라 예측 모드 중에서 결정될 수 있다. 상기 기-정의된 복수의 인트라 예측 모드는 도 4 및 도 5를 참조하여 살펴보기로 한다.
도 4는 본 개시에 따른 복수의 인트라 예측 모드의 일예를 도시한 것이다.
도 4를 참조하면, 영상 부호화/복호화 장치에 기-정의된 복수의 인트라 예측 모드는, 비방향성 모드와 방향성 모드로 구성될 수 있다. 비방향성 모드는, 플래너 모드 또는 DC 모드 중 적어도 하나를 포함할 수 있다. 방향성 모드는, 2번 내지 66번의 방향성 모드를 포함할 수 있다.
도 4에 도시된 것보다, 방향성 모드를 더 확장할 수도 있다. 도 5는 방향성 모드가 확장된 예를 나타낸다.
도 5에서는, -1번부터 -14번 모드와 67번부터 80번 모드가 추가된 것으로 예시되었다. 이들 방향성 모드는 와이드 앵글 인트라 예측 모드라 호칭될 수 있다. 와이드 앵글 인트라 예측 모드를 이용할 것인지 여부는, 현재 블록의 형태에 따라, 결정될 수 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방 형태의 블록인 경우, 일부 방향성 모드(예컨대, 2번부터 15번)가 67번부터 80번 사이의 와이드 앵글 인트라 예측 모드로 전환될 수 있다. 반면, 현재 블록이 높이가 너비보다 큰 비정방 형태의 블록인 경우, 일부 방향성 모드(예컨대, 53번부터 66번)가, -1번부터 -14번 사이의 와이드 앵글 인트라 예측 모드로 전환될 수 있다.
이용 가능한 와이드 앵글 인트라 예측 모드들의 범위는, 현재 블록의 너비와 높이 비율에 따라, 적응적으로 결정될 수 있다. 표 1은 현재 블록의 너비 및 높이 비율에 따른, 이용 가능한 와이드 앵글 인트라 예측 모드들의 범위를 나타낸 것이다.
너비/높이 이용 가능한 와이드 앵글 인트라 예측 모드 범위
W/H = 16 67~80
W/H = 8 67~78
W/H = 4 67~76
W/H = 2 67~74
W/H = 1 없음
W/H = 1/2 -1~-8
W/H = 1/4 -1~-10
W/H = 1/8 -1~-12
W/H = 1/16 -1~-14
상기 복수의 인트라 예측 모드 중에서 K개의 후보 모드(most probable mode, MPM)를 선택할 수 있다. 선택된 후보 모드를 포함한 후보 리스트가 생성될 수 있다. 후보 리스트에 속한 후보 모드 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 상기 인덱스에 의해 지시된 후보 모드에 기초하여 현재 블록의 인트라 예측 모드가 결정될 수 있다. 일 예로, 상기 인덱스에 의해 지시된 후보 모드가 현재 블록의 인트라 예측 모드로 설정될 수 있다. 또는, 현재 블록의 인트라 예측 모드는, 상기 인덱스에 의해 지시된 후보 모드의 값과 소정의 차분값에 기초하여 결정될 수도 있다. 상기 차분값은, 상기 현재 블록의 인트라 예측 모드의 값과 상기 인덱스에 의해 지시된 후보 모드의 값 간의 차이로 정의될 수 있다. 상기 차분값은 비트스트림을 통해 시그날링될 수 있다. 또는, 상기 차분값은 영상 부호화/복호화 장치에 기-정의된 값일 수도 있다.또는, 현재 블록의 인트라 예측 모드는, 상기 후보 리스트에 현재 블록의 인트라 예측 모드와 동일한 모드가 존재하는지 여부를 나타내는 플래그에 기초하여 결정될 수 있다. 일 예로, 상기 플래그가 제1 값인 경우, 현재 블록의 인트라 예측 모드는 상기 후보 리스트로부터 결정될 수 있다. 이 경우, 후보 리스트에 속한 복수의 후보 모드 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 상기 인덱스에 의해 지시된 후보 모드가 현재 블록의 인트라 예측 모드로 설정될 수 있다. 반면, 상기 플래그가 제2 값인 경우, 나머지 인트라 예측 모드 중 어느 하나가 현재 블록의 인트라 예측 모드로 설정될 수 있다. 상기 나머지 인트라 예측 모드는, 기-정의된 복수의 인트라 예측 모드 중 상기 후보 리스트에 속한 후보 모드를 제외한 모드를 의미할 수 있다. 상기 플래그가 제2 값인 경우, 상기 나머지 인트라 예측 모드 중 어느 하나를 지시하는 인덱스가 시그날링될 수 있다. 시그날링된 인덱스에 의해 지시된 인트라 예측 모드가 현재 블록의 인트라 예측 모드로 설정될 수 있다.크로마 블록의 인트라 예측 모드는, 복수의 크로마 블록의 인트라 예측 모드 후보들 중에서 선택될 수 있다. 이를 위해, 크로마 블록의 인트라 예측 모드 후보들 중 하나를 지시하는 인덱스 정보가 명시적으로 부호화되어 비트스트림을 통해 시그날링될 수 있다. 표 2는 크로마 블록의 인트라 예측 모드 후보들을 예시한 것이다.
인덱스 크로마 블록을 위한 인트라 예측 모드 후보
루마모드:0 루마모드:50 루마모드:18 루마모드:1 그외
0 66 0 0 0 0
1 50 66 50 50 50
2 18 18 66 18 18
3 1 1 1 66 1
4 DM
표 2의 예에서, DM(Direct Mode)는, 크로마 블록과 동일 위치에 존재하는 루마 블록의 인트라 예측 모드를, 크로마 블록의 인트라 예측 모드로 설정하는 것을 의미한다.
일 예로, 루마 블록의 인트라 예측 모드(루마 모드)가 0번(평면모드)이고, 인덱스가 2번을 가리킨다면, 크로마 블록의 인트라 예측 모드는, 수평 모드(18번)로 결정될 수 있다.
일 예로, 루마 블록의 인트라 예측 모드(루마 모드)가 1번(DC모드)이고, 인덱스가 0번을 가리킨다면, 크로마 블록의 인트라 예측 모드는 플래너 모드(0번)로 결정될 수 있다.
결과적으로, 크로마 블록의 인트라 예측 모드도 도 4 또는 도 5에 도시된 인트라 예측 모드들 중 하나로 설정될 수 있다. 현재 블록의 인트라 예측 모드는 현재 블록의 참조 라인을 결정하기 위해 이용될 수도 있으며, 이 경우 S310 단계는 S300 단계 전에 수행될 수도 있다.
도 3을 참조하면, 현재 블록의 참조 라인과 인트라 예측 모드에 기초하여 현재 블록에 대해 인트라 예측을 수행할 수 있다(S320).
이하, 도 6 내지 도 8을 참조하여 인트라 예측 모드 별 인트라 예측 방법에 대해서 자세히 살펴보기로 한다. 다만, 설명의 편의를 위해, 현재 블록의 인트라 예측을 위해 단일 참조 라인이 이용됨을 가정하나, 복수의 참조 라인이 이용되는 경우에도 후술하는 인트라 예측 방법이 동일/유사하게 적용될 수 있다.
도 6은 본 개시에 따른 플래너 모드 기반의 인트라 예측 방법을 도시한 것이다.
도 6을 참조하면, T는 현재 블록의 우상단 코너에 위치하는 참조 샘플을, L은 현재 블록의 좌하단 코너에 위치하는 참조 샘플을 나타낸다. P1은 수평 방향의 보간을 통해 생성될 수 있다. 일 예로, P1은 P1과 동일한 수평 라인에 위치한 참조 샘플과 T를 보간하여 생성될 수 있다. P2는 수직 방향의 보간을 통해 생성될 수 있다. 일 예로, P2는 P2와 동일한 수직 라인에 위치한 참조 샘플과 L을 보간하여 생성될 수 있다. 현재 블록 내 현재 샘플은, 다음 수학식 1과 같이, P1과 P2의 가중합을 통해 예측될 수 있다.
Figure PCTKR2023007397-appb-img-000001
수학식 1에서, 가중치 α와 β는, 현재 블록의 너비와 높이를 고려하여 결정될 수 있다. 현재 블록의 너비와 높이에 따라, 가중치 α와 β는 동일한 값을 가질 수도 있고, 서로 상이한 값을 가질 수도 있다. 만약 현재 블록의 너비와 높이가 같다면, 가중치 α와 β를 동일하게 설정할 수 있고, 현재 샘플의 예측 샘플은 P1과 P2의 평균값으로 설정될 수 있다. 현재 블록의 너비와 높이가 같지 않은 경우, 가중치 α와 β는 서로 상이한 값을 가질 수 있다. 일 예로, 너비가 높이보다 큰 경우, 현재 블록의 너비에 대응하는 가중치에 더 작은 값을 설정하고, 현재 블록의 높이에 대응하는 가중치에 더 큰 값을 설정할 수 있다. 역으로, 너비가 높이보다 큰 경우, 현재 블록의 너비에 대응하는 가중치에 더 큰 값을 설정하고, 현재 블록의 높이에 대응하는 가중치에 더 작은 값을 설정할 수 있다. 여기서, 현재 블록의 너비에 대응하는 가중치는 β를 의미하고, 현재 블록의 높이에 대응하는 가중치는 α를 의미할 수 있다.
도 7은 본 개시에 따른 DC 모드 기반의 인트라 예측 방법을 도시한 것이다.
도 7을 참조하면, 현재 블록에 인접한 주변 샘플의 평균값을 산출하고, 산출된 평균값을 현재 블록 내 모든 샘플의 예측값으로 설정할 수 있다. 여기서, 주변 샘플은, 현재 블록의 상단 참조 샘플과 좌측 참조 샘플을 포함할 수 있다. 다만, 현재 블록의 형태에 따라, 상단 참조 샘플 또는 좌측 참조 샘플만을 이용하여 평균값을 산출할 수도 있다. 일 예로, 현재 블록의 너비가 높이보다 큰 경우, 현재 블록의 상단 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 크거나 같은 경우, 현재 블록의 상단 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 작거나 같은 경우, 현재 블록의 상단 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 반면, 현재 블록의 너비가 높이보다 작은 경우, 현재 블록의 좌측 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 작거나 같은 경우, 현재 블록의 좌측 참조 샘플만을 이용하여 평균값을 산출할 수 있다. 또는, 현재 블록의 너비와 높이의 비율이 소정의 문턱값보다 크거나 같은 경우, 현재 블록의 좌측 참조 샘플만을 이용하여 평균값을 산출할 수 있다.
도 8은 본 개시에 따른 방향성 모드 기반의 인트라 예측 방법을 도시한 것이다.
현재 블록의 인트라 예측 모드가 방향성 모드인 경우, 해당 방향성 모드의 각도에 따라 참조 라인으로 프로젝션(projection)을 수행할 수 있다. 프로젝션된 위치에 참조 샘플이 존재하면, 해당 참조 샘플을 현재 샘플의 예측 샘플로 설정할 수 있다. 만약 프로젝션된 위치에 참조 샘플이 존재하지 않으면, 프로젝션된 위치에 이웃한 하나 또는 그 이상의 주변 샘플을 이용하여 프로젝션된 위치에 대응하는 샘플을 생성할 수 있다. 일 예로, 프로젝션된 위치를 기준으로 양방향으로 이웃한 2개 또는 그 이상의 주변 샘플을 기반으로 보간을 수행하여, 프로젝션된 위치에 대응하는 샘플을 생성할 수 있다. 또는, 프로젝션된 위치에 이웃한 하나의 주변 샘플을 프로젝션된 위치에 대응하는 샘플로 설정할 수 있다. 이때, 프로젝션된 위치에 이웃한 복수의 주변 샘플 중 프로젝션된 위치에 가장 가까운 주변 샘플이 이용될 수 있다. 프로젝션된 위치에 대응하는 샘플을 현재 샘플의 예측 샘플로 설정할 수 있다.
도 8을 참조하면, 현재 샘플 B의 경우, 해당 위치에서 인트라 예측 모드의 각도에 따라 참조 라인으로 프로젝션을 수행할 경우, 프로젝션된 위치에 참조 샘플이 존재한다(즉, 정수 위치의 참조 샘플, R3). 이 경우, 프로젝션된 위치의 참조 샘플을 현재 샘플 B의 예측 샘플로 설정할 수 있다. 현재 샘플 A의 경우, 해당 위치에서 인트라 예측 모드의 각도에 따라 참조 라인으로 프로젝션을 수행할 경우, 프로젝션된 위치에 참조 샘플(즉, 정수 위치의 참조 샘플)이 존재하지 않는다. 이 경우, 프로젝션된 위치에 이웃한 주변 샘플(예를 들어, R2와 R3)을 기반으로 보간을 수행하여 분수 위치의 샘플(r)을 생성할 수 있다. 생성된 분수 위치의 샘플(r)을 현재 샘플 A의 예측 샘플로 설정할 수 있다.
도 9는 분수 위치의 샘플을 유도하는 방법을 도시한 것이다.
도 9의 예에서, 변수 h는 예측 샘플 A의 위치와 참조 샘플 라인 까지의 수직 방향거리(즉, 세로 거리)를 의미하고, 변수 w는 예측 샘플 A의 위치와 분수 위치 샘플 까지의 수평 방향 거리(즉, 가로 거리)를 의미한다. 또한, 변수 θ는, 인트라 예측 모드의 방향성에 따라 미리 정의된 각도를 의미하고, 변수 x는, 분수 위치를 의미한다.
변수 w는 다음의 수학식 2와 같이 유도될 수 있다.
Figure PCTKR2023007397-appb-img-000002
이후, 변수 w에서, 정수 위치를 제거하면, 최종적으로, 분수 위치가 유도될 수 있다.
분수 위치 샘플은 인접하는 정수 위치 참조 샘플들을 보간하여 생성될 수 있다. 일 예로, 정수 위치 참조 샘플 R2 및 정수 위치 참조 샘플 R3를 보간하여, x 위치의 분수 위치 참조 샘플을 생성할 수 있다.
분수 위치 샘플을 유도함에 있어서, 실수 연산을 피하기 위해, 스케일링 팩터를 사용할 수 있다. 일 예로, 스케일링 팩터 f가 32로 설정된 경우, 도 8의 (b)에 도시된 예에서와 같이, 이웃하는 정수 참조 샘플들 사이의 거리가 1이 아닌 32로 설정될 수 있다.
또한, 인트라 예측 모드의 방향성에 따라 결정되는 각도 θ에 대한 탄젠트 값도 동일한 스케일링 팩터(예컨대, 32)를 이용하여 스케일업할 수 있다.
도 10 및 도 11은 인트라 예측 모드별, 각도에 대한 탄젠트 값이 32배 스케일링된 것을 도시한 것이다.
도 10은, 비-와이드 앵글 인트라 예측 모드에 대한, 탄젠트 값의 스케일링된 결과를 나타낸 것이고, 도 11은 와이드 앵글 인트라 예측 모드에 대한, 탄젠트 값의 스케일링된 결과를 나타낸 것이다.
인트라 예측 모드의 각도 값에 대한 탄젠트 값(tanθ)이 양수인 경우, 현재 블록의 상단 라인에 속하는 참조 샘플들(즉, 상단 참조 샘플들) 또는 현재 블록의 좌측 라인에 속하는 참조 샘플들(즉, 좌측 참조 샘플들) 중 한쪽만을 사용하여 인트라 예측이 수행될 수 있다. 한편, 인트라 예측 모드의 각도 값에 대한 탄젠트값이 음수인 경우, 상단에 위치하는 참조 샘플들과 좌측에 위치하는 참조 샘플들이 모두 이용된다.
이때, 구현의 간소화를 위해, 좌측 참조 샘플들을 위쪽으로 프로젝션 하거나, 상단 참조 샘플들을 좌측으로 프로젝션 하여, 참조 샘플들을 1D 어레이 형태로 배열하고, 1D 어레이 형태의 참조 샘플들을 이용하여 인트라 예측을 수행하도록 할 수도 있다.
도 12는 방향성 모드가 34번 내지 49번 모드 중 하나인 경우, 인트라 예측 양상을 예시한 도면이다.
현재 블록의 인트라 예측 모드가 34번 내지 49번 모드 중 하나인 경우, 현재 블록의상단 참조 샘플들 뿐만 아니라, 좌측 참조 샘플들을 이용하여 인트라 예측이 수행된다. 이때, 도 12에 도시된 예에서와 같이, 현재 블록의 좌측에 위치하는 참조 샘플을 상단 라인의 위치로 복사하거나, 좌측에 위치하는 참조 샘플들을 보간하여 상단 라인의 참조 샘플을 생성할 수 있다.
일 예로, 현재 블록 상단의 A 위치에 대한 참조 샘플을 획득하고자 하는 경우, 현재 블록의 인트라 예측 모드의 방향성을 고려하여, 상단 라인의 A 위치에서, 현재 블록의 좌측 라인에 프로젝션을 수행할 수 있다. 프로젝션된 위치를 a라 할 경우, a 위치에 대응하는 값을 복사하거나, a에 대응하는 분수 위치 값을 생성하여, A 위치의 값으로 설정할 수 있다. 일 예로, a 위치가 정수 위치인 경우, 정수 위치 참조 샘플을 복사하여 A 위치의 값을 생성할 수 있다. 반면, a 위치가 분수 위치인 경우, a 위치의 상측에 위치하는 참조 샘플 및 a 위치의 하측에 위치하는 참조 샘플을 보간하고, 보간된 값을 A 위치의 값으로 설정할 수 있다. 한편, 현재 블록 상단의 A 위치에서, 현재 블록의 좌측 라인으로 프로젝션되는 방향은, 현재 블록의 인트라 예측 모드의 방향과 평행이면서, 반대 방향일 수 있다.
도 13은 좌측 참조 샘플들을 보간하여 상단 참조 샘플을 생성하는 예를 설명하기 위한 도면이다.
도 13에서, 변수 h는, 상단 라인의 A 위치와 좌측 라인의 a 위치 사이의 수평 방향 거리를 나타낸다. 변수 w는, 상단 라인의 A 위치와 좌측 라인의 a 위치 사이의 수직 방향 거리를 나타낸다. 또한, 변수 θ는, 인트라 예측 모드의 방향성에 따라 미리 정의된 각도를 의미하고, 변수 x는, 분수 위치를 의미한다.
변수 h는 다음의 수학식 3과 같이 유도될 수 있다.
Figure PCTKR2023007397-appb-img-000003
이후, 변수 h에서, 정수 위치를 제거하면, 최종적으로, 분수 위치가 유도될 수 있다.
분수 위치 샘플을 유도함에 있어서, 실수 연산을 피하기 위해, 스케일링 팩터를 사용할 수 있다. 일 예로, 변수 θ에 대한 탄젠트 값을 스케일링 팩터 f1을 이용하여 스케일링할 수 있다. 여기서, 좌측 라인으로 프로젝션되는 방향은, 방향성 예측 모와 평행이면서 반대이므로, 도 10 및 도 11에 도시된 스케일된 탄젠트 값을 사용할 수도 있다.
스케일링 팩터 f1이 적용된 경우, 수학식 3은, 다음의 수학식 4와 같이, 변형 사용될 수 있다.
Figure PCTKR2023007397-appb-img-000004
위와 같은 방식으로, 상단 라인에 속하는 참조 샘플들만으로 1D 참조 샘플 어레이를 구성할 수 있다. 이 결과, 1D 어레이로 구성된 상단 참조 샘플들만을 이용하여, 현재 블록에 대한 인트라 예측을 수행할 수 있다.
도 14는 1D 어레이로 배열된 참조 샘플들을 이용하여, 인트라 예측이 수행되는 예를 나타낸 것이다.
도 14에 도시된 예에서와 같이, 좌측 참조 샘플들을 프로젝션하여, 상단 참조 샘플들을 생성함으로써, 상단 라인에 속하는 참조 샘플들만을 이용하여 현재 블록의 예측 샘플들이 획득될 수 있다.
도 12 및 도 14에 도시된 것과 반대로, 상단 참조 샘플을 좌측 라인에 프로젝션하여, 좌측 라인에 속하는 참조 샘플들만으로 1D 참조 샘플 어레이를 구성할 수도 있다. 구체적으로, 방향성 모드의 각도에 대한 탄젠트 값(tanθ)이 음수인 방향성 모드들 중 19번 내지 33번 모드들에 대해서는, 상단 라인에 속한 참조 샘플들을 좌측 라인으로 프로젝션 하여, 좌측 참조 샘플을 생성할 수 있다.
복수의 참조 샘플 라인들 중 하나를 선택하고, 선택된 참조 샘플 라인에 속하는 참조 샘플들을 이용하여, 현재 블록 내 예측 샘플을 획득할 수 있다. 이때, 선택 가능한 참조 샘플 라인 후보들의 개수는, 2개, 3개 또는 4개일 수 있다. 또한, 참조 샘플 라인 후보들 각각에는 상이한 인덱스가 할당되어 있을 수 있다. 참조 샘플 라인 후보들 중 하나를 식별하는 참조 샘플 라인 인덱스를 부호화하여 시그날링함으로써, 현재 블록에 대한 참조 샘플 라인을 선택할 수 있다.
참조 샘플 라인 후보와 현재 블록의 거리에 기반하여, 참조 샘플 라인 후보들 각각의 인덱스가 결정될 수 있다. 일 예로, 인덱스 N이 할당된 참조 샘플 라인은, 현재 블록의 최상단 행과의 수직 방향 거리가 (N+1)인 행 및 현재 블록의 최좌측 열과의 수평 방향 거리가 (N+1)인 열로 구성되어 있을 수 있다.
참조 샘플 라인을 선택한 뒤, 선택된 참조 샘플 라인에 속하는 참조 샘플들을 기초로 현재 블록의 예측 샘플을 획득할 수 있다. 이때, 현재 블록의 인트라 예측 모드에 의한 각도선이, 정수 위치를 지나지 않는 경우, 선택된 참조 샘플 라인에 속한 정수 위치 참조 샘플들을 보간하여 예측 샘플을 생성할 수 있다.
일 예로, 도 8, 도 9, 도 12 및 도 13을 통해 설명한 바와 같이, 인트라 예측 모드에 의한 각도선을 따라, 예측 샘플로부터 참조 샘플 라인으로 프로젝션된 위치가 참조 샘플의 정수 위치가 아닌 경우, 프로젝션된 위치를 기준으로 양방향으로 이웃한 2개 또는 그 이상의 주변 샘플을 기반으로 보간을 수행하여 예측 샘플을 획득할 수 있다. 한편, 상술한 실시예들에서, 보간에 이용되는 참조 샘플들은, 동일한 참조 샘플 라인에 속하는 것일 수 있다.
일 예로, 복수의 참조 샘플 라인 후보들 중에서 하나가 선택된 경우, 선택된 참조 샘플 라인에 속하는 참조 샘플들을 보간하여, 분수 위치 샘플을 유도할 수 있다. 이에 따라, 도 8 및 도 9에 도시된 예에서와 같이, 상단 참조 샘플들에 대해서는, 가로 방향의 보간 필터를 적용하여 분수 위치 샘플을 유도하는 한편, 좌측 참조 샘플들에 대해서는, 세로 방향의 보간 필터를 적용하여 분수 위치 샘플을 유도할 수 있다.
상술한 예와 달리, 상이한 참조 샘플 라인에 속한 참조 샘플들을 보간하여, 현재 블록의 예측 샘플을 획득할 수도 있다. 일 예로, 제1 참조 샘플 라인이 선택된 경우, 제2 참조 샘플 라인에 속한 제1 참조 샘플과, 제2 참조 샘플 라인에 속한 제2 참조 샘플을 보간하여, 분수 위치 샘플을 유도할 수 있다. 즉, 상하로 배치된 상단 참조 샘플들을 보간하여 현재 블록의 예측 샘플을 유도하거나, 좌우로 배치된 좌측 참조 샘플들을 보간하여 현재 블록의 예측 샘플을 유도할 수 있다.
설명의 편의를 위해, 동일한 참조 샘플 라인에 속하는 참조 샘플들을 보간하는 것을, 제1 방향 보간이라 명명하고, 상이한 참조 샘플 라인들에 속한 참조 샘플들을 보간하는 것을, 제2 방향 보간이라 명명하기로 한다.
일 예로, 현재 블록의 상단에 위치하는 참조 샘플들을 보간하는 경우, 제1 방향 보간은, 가로 방향으로 보간 필터를 적용하는 것이고, 제2 방향 보간은, 세로 방향으로 보간 필터를 적용하는 것일 수 있다. 반면, 현재 블록의 좌측에 위치하는 참조 샘플들을 보간하는 경우, 제1 방향 보간은, 세로 방향으로 보간 필터를 적용하는 것이고, 제2 방향 보간은, 가로 방향으로 보간 필터를 적용하는 것일 수 있다.
도 15는 참조 샘플들을 보간하는 예를 나타낸 것이다.
도 15에 도시된 예에서, 제1 분수 위치 샘플은, 동일한 참조 샘플 라인에 속하는 참조 샘플들에 제1 방향 보간 필터(즉, 가로 방향 보간 필터)를 적용하여 획득된 것일 수 있다. 구체적으로, 예측하고자 하는 위치을 시작점으로 하여, 인트라 예측 모드의 각도선을 따라 참조 샘플 라인에 프로젝션되는 위치가 참조 샘플 A 및 참조 샘플 B 사이를 지나는 경우, 참조 샘플 A 및 참조 샘플 B를 보간하여, 제1 분수 위치 샘플을 생성할 수 있다.
반면, 제2 분수 위치 샘플은, 상이한 참조 샘플 라인에 속하는 참조 샘플들에 제2 방향 보간 필터(즉, 세로 방향 보간 필터)를 적용하여 획득된 것일 수 있다. 구체적으로, 예측하고자 하는 위치를 시작점으로 하여, 인트라 예측 모드의 각도선을 따라 참조 샘플 라인 및 인접하는 참조 샘플 라인에 프로젝션되는 위치가 참조 샘플 라인에 포함된 참조 샘플 B 및 인접 참조 샘플 라인에 포함된 참조 샘플 C 사이를 지나는 경우, 참조 샘플 B 및 참조 샘플 C를 보간하여, 제2 분수 위치 샘플을 생성할 수 있다.
이때, 제2 분수 위치 샘플을 유도하기 위해, 정수 위치 참조 샘플 B로부터 제2 분수 위치 샘플 까지의 거리 y를 유도하여야 한다. 거리 y는 다음의 수학식 5 및 수학식 6에 기반하여 에 따라 유도될 수 있다.
Figure PCTKR2023007397-appb-img-000005
Figure PCTKR2023007397-appb-img-000006
수학식 5에서, ceil()는, 올림 연산을 의미한다. 일 예로, ceil(3.14)의 출력값은, 4로 설정될 수 있다.
수학식 6에서, h는 예측하고자 하는 위치 P에서, 참조 샘플 라인까지의 수직 방향 거리를 나타내고, w는, 예측하고자 하는 위치 P에서, 제1 분수 위치 샘플까지의 수평 방향 거리를 나타낸다. w는, 수학식 2에 따라, 유도될 수 있다. h1은, 예측하고자 하는 위치 P에서, 제2 분수 위치 샘플까지의 수직 방향 거리를 나타낸다.
이후, h1에서, h을 차분하여, 참조 샘플 B로부터 제2 분수 위치 샘플 까지의 거리 y를 유도할 수 있다.
이때, 실수 연산을 피하기 위해, 스케일링 연산을 이용할 수 있다. 일 예로, 스케일링 팩터 f가 32로 설정된 경우, 도 9의 (b)를 통해 설명한 바와 같이, 참조 샘플들 간의 거리를 32배 스케일링하고, 참조 샘플과 제2 분수 위치 사이의 거리를, 0부터 32 사이의 정수 값으로 표현할 수 있다.
참조 샘플 B로부터 제2 분수 위치 샘플 까지의 거리 y가 유도되면, 참조 샘플 B 및 참조 샘플 C를 보간하여, 제2 분수 위치 샘플을 유도할 수 있다.
제1 분수 위치 샘플 및 제2 분수 위치 샘플 중 하나가, 예측 샘플로 설정될 수 있다. 이때, 제1 분수 위치 샘플 및 제2 분수 위치 샘플 중 어느 것을 예측 샘플로 설정할 것인지가, 부호화기 및 복호화기에서 기 정의되어 있을 수 있다.
또는, 현재 블록의 크기/형태, 예측하고자 하는 샘플의 위치, 인트라 예측 모드, 참조 샘플 라인의 인덱스 또는 인트라 서브 파티셔닝이 적용되는지 여부 중 적어도 하나에 기반하여, 제1 분수 위치 샘플을 예측 샘플로 설정할 것인지 또는 제2 분수 위치 샘플을 예측 샘플로 설정할 것인지 여부가 결정될 수 있다.
일 예로, 참조 샘플 라인의 인덱스가 문턱값보다 작은 경우에는, 제2 분수 위치 샘플을 이용하여, 예측 샘플을 유도할 수 있다. 반면, 참조 샘플 라인의 인덱스가 문턱값 이상인 경우에는, 제1 분수 위치 샘플을 이용하여, 예측 샘플을 유도할 수 있다. 여기서, 문턱값은, 0, 1, 2 또는 3과 같은 정수일 수 있다.
또는, 기준 위치 참조 샘플로부터, 제1 분수 위치 화소 까지의 거리 및 제2 분수 위치 화소 까지의 거리를 비교하여, 제1 분수 위치 화소를 예측 샘플로 설정할 것인지 또는 제2 분수 위치 샘플을 예측 샘플로 설정할 것인지 여부가 결정될 수도 있다. 여기서, 기준 위치 참조 샘플은, 제1 방향 보간 필터 및 제2 방향 보간 필터가 공통적으로 적용되는 참조 샘플(도 15에서 참조 샘플 B)을 의미할 수 있다.
또는, 보간 방향을 나타내는 정보가 부호화되어 시그날링될 수 있다. 상기 정보는 1비트의 플래그일 수 있다. 일 예로, 상기 플래그의 값이 0인 것은, 제1 방향 보간 필터를 적용하여 유도된 제1 분수 위치 샘플을 기반으로 예측 샘플이 유도됨을 나타내고, 상기 플래그의 값이 1인 것은, 제2 방향 보간 필터를 적용하여 유도된 제2 분수 위치 샘플을 기반으로 예측 샘플이 유도됨을 나타낸다. 상기 정보는, CTU, CU, TU 또는 PU 단위로 부호화되어 시그날링될 수 있다.
또는, 제1 방향 보간 필터가 적용되는 참조 샘플들 간의 차분의 절대값 및 제2 방향 보간 필터가 적용되는 참조 샘플들 간의 차분의 절대값을 비교하여, 보간 방향을 결정할 수도 있다.
일 예로, 도 15에 도시된 예에서, 제1 방향 보간 필터가 적용되는 참조 샘플 A 및 참조 샘플 B 사이의 차분의 절대값 |A-B|와, 제2 방향 보간 필터가 적용되는 참조 샘플 B 및 참조 샘플 C 사이의 차분의 절대값 |B-C|를 비교한다. 이후, 비교 결과에 따라, 제1 방향 보간 필터 및 제2 방향 보간 필터 중 하나가 선택될 수 있다. 일 예로, 제1 방향 보간 필터가 적용되는 참조 샘플들의 차분의 크기(즉, |A-B|)가, 제2 방향 보간 필터가 적용되는 참조 샘플들의 차분의 크기(즉, |B-C|)보다 작다면, 제1 방향 보간 필터를 이용하여, 예측 샘플을 유도할 수 있다. 그렇지 않은 경우에는, 제2 방향 보간 필터를 이용하여, 예측 샘플을 유도할 수 있다.
또는, 위 예시와 반대로, 제1 방향 보간 필터가 적용되는 참조 샘플들의 차분의 크기(즉, |A-B|)가, 제2 방향 보간 필터가 적용되는 참조 샘플들의 차분의 크기(즉, |B-C|)보다 크다면, 제1 방향 보간 필터를 이용하여, 예측 샘플을 유도할 수 있다. 그렇지 않은 경우에는, 제2 방향 보간 필터를 이용하여, 예측 샘플을 유도할 수 있다.
또는, 제1 분수 위치 샘플 및 제2 분수 위치 샘플의 평균 연산 또는 가중합 연산에 기반하여, 예측 샘플을 유도할 수도 있다. 이때, 제1 분수 위치 샘플 및 제2 분수 위치 샘플에 적용되는 가중치는, 인트라 예측 모드 또는 기준 참조 샘플로부터의 거리 중 적어도 하나를 기반으로 결정될 수 있다.
제2 참조 샘플 라인은, 제1 참조 샘플 라인에 인접하는 것일 수 있다. 일 예로, 제1 참조 샘플 라인의 인덱스가 m인 경우, 제2 참조 샘플 라인의 인덱스는 (m+1) 또는 (m-1)일 수 있다.
제1 참조 샘플 라인의 인덱스 또는 현재 블록의 인트라 예측 모드 중 적어도 하나에 기초하여, 제2 참조 샘플 라인의 인덱스가 결정될 수 있다. 일 예로, 제1 참조 샘플 라인의 인덱스가 가장 작은 경우(즉, 첫번째(즉, 인덱스 0) 참조 샘플 라인인 경우), 인덱스 1인 참조 샘플 라인이 제2 참조 샘플 라인으로 선택되고, 제1 참조 샘플 라인의 인덱스가 가장 큰 경우(즉, 마지막 참조 샘플 라인인 경우), 제1 참조 샘플 라인보다 인덱스가 1 작은 참조 샘플 라인이 제2 참조 샘플 라인으로 선택될 수 있다.
제1 참조 샘플 라인이 첫번째 또는 마지막 참조 샘플 라인이 아닌 경우에는, 현재 블록의 인트라 예측 모드에 따라, 제2 참조 샘플 라인이 선택될 수 있다. 일 예로, 현재 블록의 인트라 예측 모드의 인덱스가 수직 방향 모드보다 크거나, 수평 방향 모드보다 작은 경우, 제1 참조 샘플 라인보다 인덱스가 1 큰 참조 샘플 라인이 제2 참조 샘플 라인으로 선택될 수 있다. 반면, 현재 블록의 인트라 예측 모드의 인덱스가 수직 방향 모드보다 작고, 수평 방향 모드보다 큰 경우, 제1 참조 샘플 라인보다 인덱스가 1 작은 참조 샘플 라인이 제2 참조 샘플 라인으로 선택될 수 있다.
또는, 부호화기 및 복호화기에서, 제1 참조 샘플 라인보다 인덱스가 1 큰 참조 샘플 라인을 제2 참조 샘플 라인으로 설정하도록 정의되어 있을 수도 있다. 이때, 제1 참조 샘플 라인이 마지막 참조 샘플 라인인 경우, 제2 분수 위치 화소를 유도하는 것을 생략하고, 제1 분수 위치 화소를 예측 샘플로 설정할 수 있다.
반대로, 부호화기 및 복호화기에서, 제1 참조 샘플 라인보다 인덱스가 1 큰 참조 샘플 라인을 제2 참조 샘플 라인으로 설정하도록 정의되어 있을 수도 있다. 이때, 제1 참조 샘플 라인이 첫번째 참조 샘플 라인인 경우, 제2 분수 위치 화소를 유도하는 것을 생략하고, 제1 분수 위치 화소를 예측 샘플로 설정할 수 있다.
설명한 바와 달리, 제1 참조 샘플에 인접하지 않는 참조 샘플 라인을 제2 참조 샘플 라인으로 설정할 수도 있다. 즉, 제1 참조 샘플 라인에 속하는 제1 참조 샘플 및 제1 참조 샘플로부터의 수직 방향 또는 수평 방향 거리가 1보다 큰 제2 참조 샘플을 보간하여, 제2 분수 위치 화소를 생성할 수 있다.
탭수가 2보다 큰 방향 보간 필터를 이용하여, 분수 위치 화소를 생성할 수도 있다. 일 예로, 탭수가 (m+1)인 보간 필터가 이용되는 경우, m개의 참조 샘플 라인들(예컨대, 참조 샘플 라인 N 부터 참조 샘플 라인 (N+m))에 포함된 m개의 참조 샘플들을 보간하여, 분수 위치 샘플을 생성할 수 있다.
참조 샘플 라인들의 위치 또는 개수 중 적어도 하나가 현재 블록의 인트라 예측 모드에 기반하여 적응적으로 결정될 수도 있다.
도 16은 현재 블록의 인트라 예측 모드에 따른, 참조 샘플 라인들의 위치 또는 개수 중 적어도 하나가 결정되는 예를 나타낸 것이다.
도 16에 도시된 예에서와 같이, 수직 방향 내지 우상단 대각 방향 사이의 인트라 예측 모드들 중 하나가 현재 블록의 인트라 예측 모드로 설정되는 것으로 가정하였을 때, 현재 블록의 인트라 예측 모드가 수직 방향에 가까워질수록, 인트라 예측 모드의 각도선을 따를 때, 예측하고자 하는 위치 P로부터 프로젝션되는 위치가, 현재 블록으로부터 멀어지게 된다.
이를 고려하여, 현재 블록의 인트라 예측 모드가 수직 방향에 가까워질수록, 제2 방향 보간 필터가 적용되는 참조 샘플 라인의 개수를 증가시킬 수 있다. 일 예로, 예측하고자 하는 위치 P로부터의 프로젝션된 위치가, 참조 샘플 라인 0 및 참조 샘플 라인 1 사이를 지나는 경우, 2개의 참조 샘플 라인들, 즉, 참조 샘플 라인 0 및 참조 샘플 라인 1을 이용하는, 2-탭의 제2 방향 보간 필터를 이용할 수 있다. 구체적으로, 참조 샘플 a 및 참조 샘플 b를 보간하여, 예측 샘플 P가 유도될 수 있다.
반면, 예측하고자 하는 위치 P로부터의 프로젝션된 위치가, 참조 샘플 라인 1 및 참조 샘플 라인 2 사이를 지나는 경우, 3개의 참조 샘플 라인들, 즉, 참조 샘플 라인 0, 참조 샘플 라인 1 및 참조 샘플 라인 2을 이용하는, 3-탭의 제2 방향 보간 필터를 이용할 수 있다. 구체적으로, 참조 샘플 a, 참조 샘플 b 및 참조 샘플 c를 보간하여, 예측 샘플 P가 유도될 수 있다.
즉, 예측하고자 하는 위치 P로부터의 프로젝션된 위치가 참조 샘플 라인 (N-1) 및 참조 샘플 라인 N 사이를 지나는 경우, (N+1)-탭의 제2 방향 보간 필터를 이용하여, 제2 분수 위치 샘플을 획득할 수 있다.
또는, 제2 방향 보간 필터의 탭수를 2-탭으로 고정하되, 프로젝션된 위치에 따라, 2개의 참조 샘플 라인들을 선택할 수도 있다. 일 예로, 예측하고자 하는 위치 P로부터의 프로젝션된 위치가 참조 샘플 라인 (N-1) 및 참조 샘플 라인 N 사이를 지나는 경우, 참조 샘플 라인 (N-1)에 속하는 제1 참조 샘플 및 참조 샘플 라인 N에 속하는 제2 참조 샘플을 보간하여, 제2 분수 위치 샘플을 획득할 수 있다.
다른 예로, 참조 샘플 라인 후보들의 개수를 기 정의한 뒤, 제2 방향 보간 필터를 이용할 수 있는 인트라 예측 모드의 개수 또는 종류를 제한할 수도 있다.
구체적으로, 도 16을 통해 설명한 바와 같이, 현재 블록의 인트라 예측 모드가 수직 방향에 가까워질수록, 인트라 예측 모드의 각도선을 따를 때, 예측하고자 하는 위치 P로부터 프로젝션되는 위치가, 현재 블록으로부터 멀어지게된다. 이에 따라, 현재 블록의 인트라 예측 모드가 수직 방향과 가까워질수록, 현재 블록과 거리가 먼 참조 샘플 라인에 속하는 참조 샘플을 이용하여 제2 보간 필터를 적용하여야 하고, 이는, 라인 버퍼의 개수를 증가시키는 문제를 야기한다.
이에 따라, 이용 가능한 참조 샘플 라인들의 개수를 기 정의한 뒤, 이용 가능한 참조 샘플 라인들만으로 제2 분수 위치 샘플을 이용할 수 있는 인트라 예측 모드에 대해서만, 제2 방향 보간 필터를 이용하도록 제한할 수도 있다.
도 17은 인트라 예측 모드별, 제2 분수 위치 참조 샘플을 유도하는데 필요한 최소 참조 샘플 라인들의 개수를 설명하기 위한 도면이다.
도 17의 (a) 내지 (c)에서, tan(θ1), tan(θ2), 및 tan(θ3)은 각각 1, 1/2, 및 1/3의 값을 가진다. 각 탄젠트 값들을 스케일업함으로써, 각각에 대응하는 인트라 예측 모드를 결정할 수 있다. 일 예로, 도 10을 참조하면, 위 3개의 탄젠트 값들을 32배 스케일업 한 값은, 각각 66번, 60번 및 57번의 인트라 예측 모드에 매칭되는 것을 확인할 수 있다.
이 결과, 현재 블록의 인트라 예측 모드가 60번 내지 66번 사이에 존재하는 경우, 예측하고자 하는 위치 P로부터 프로젝션되는 위치는, 참조 샘플 라인 0 및 참조 샘플 라인 1 사이에 존재할 것임을 예상할 수 있다. 반면, 현재 블록의 인트라 예측 모드가 57번 내지 60번 사이인 경우에는, 예측하고자 하는 위치 P로부터 프로젝션되는 위치는, 참조 샘플 라인 1 및 참조 샘플 라인 2 사이에 존재할 것임을 예상할 수 있다.
위 결과값에 따라, 2개의 참조 샘플 라인들, 즉, 참조 샘플 라인 0 및 참조 샘플 라인 1만이 이용 가능한 경우, 현재 블록의 인트라 예측 모드가 60번보다 큰 경우에 한하여, 제2 방향 보간 필터가 이용 가능할 수 있다.
반면, 3개의 참조 샘플 라인들, 즉, 참조 샘플 라인 0, 참조 샘플 라인 1 및 참조 샘플 라인 2가 이용 가능한 경우, 현재 블록의 인트라 예측 모드가 57번보다 큰 경우에 한하여, 제2 방향 보간 필터가 이용 가능할 수 있다.
즉, 이용 가능한 참조 샘플 라인들의 개수가 증가할수록, 제2 방향 보간 필터를 이용할 수 있는 인트라 예측 모드의 개수가 증가할 수 있다.
현재 블록의 인트라 예측 모드가 제2 방향 보간 필터가 이용 가능하지 않은 것일 경우, 제1 방향 보간 필터를 이용하여 현재 블록의 예측 샘플을 유도할 수 있다.
한편, 좌상단 대각 방향(즉, 도 5의 34번 모드) 부터 수직 방향 모드(도 5의 50번 모드)들에 대해서도, 동일한 방법으로, 제2 방향 보간 필터의 이용 가부를 결정할 수 있다. 이때, 예측하고자 하는 위치로부터 참조 샘플로 향하는 선분 및 상기 참조 샘플로부터 수직 방향을 향하는 선분이 형성하는 각도에 대한 탄젠트 값에 음의 부호를 할당하여, 각 각도에 대응하는 인트라 예측 모드를 결정할 수 있다.
상술한 예에서는, 현재 블록의 상단에 위치하는 참조 샘플들에 대해, 제2 방향 보간 필터를 적용하는 예들을 설명하였다.
도시된 예들과 달리, 현재 블록의 좌측에 위치하는 참조 샘플들에 대해, 제2 방향 보간 필터를 적용하여, 제2 분수 위치 화소를 생성할 수도 있다. 현재 블록의 좌측에 위치하는 참조 샘플들을 이용하는 경우, 제1 방향 보간 필터는, 상하로 인접하는 참조 샘플들, 즉, 동일한 참조 샘플 라인에 속하는 좌측 참조 샘플들을 보간하기 위한 것이고, 제2 방향 보간 필터는, 좌우로 인접하는 참조 샘플들, 즉, 상이한 참조 샘플 라인에 속하는 좌측 참조 샘플들을 보간하기 위한 것일 수 있다.
좌측 참조 샘플을 이용하는 인트라 예측 모드들(즉, 도 5의 34번 모드보다 인덱스가 작은 방향성 예측 모드들)에 대해서는, 참조 샘플들을 트랜스 포즈(transpose)하여, 상술한 실시예들을 그대로 적용할 수 있다.
제2 방향 보간 필터가 이용 가능한지 여부는, 현재 블록의 크기, 형태, 인트라 예측 모드 또는 참조 샘플 라인의 인덱스 중 적어도 하나에 기초하여 결정될 수 있다.
일 예로, 현재 블록의 인트라 예측 모드가 후보 리스트(예컨대, MPM 리스트)에 포함된 복수의 후보 모드들 중 하나와 동일한 경우에 한하여, 제2 방향 보간 필터가 이용 가능한 것으로 설정될 수 있다.
일 예로, 현재 블록에 대해, 제2 방향 보간 필터가 이용되는 것으로 결정된 경우, 현재 블록의 인트라 예측 모드가 복수의 후보 모드들 중 하나와 동일한지 여부를 나타내는 플래그의 부호화/복호화를 생략하는 한편, 복수의 후보 모드들 중 하나를 지시하는 인덱스가 부호화되어 시그날링될 수 있다. 즉, 현재 블록에 제2 방향 보간 필터가 이용되는 경우, 현재 블록의 인트라 예측 모든, 후보 리스트에 포함된 복수의 후보 모드들 중 하나와 동일한 값으로 설정될 수 있다.
또는, 현재 블록의 인트라 예측 모드가 복수의 후보 모드들 중 하나와 동일한지 여부를 나타내는 플래그가 참인 경우에만, 현재 블록에 대해 제2 방향 보간 필터가 적용되는지 여부를 나타내는 정보, 예컨대, 1비트의 플래그를 부호화/복호화할 수도 있다.
다른 예로, 현재 블록의 참조 샘플 라인의 인덱스가 문턱값 이하인 경우에 한하여, 제2 방향 보간 필터가 이용 가능한 것으로 설정될 수 있다. 여기서, 문턱값은, 0, 1, 2 또는 3과 같은 정수일 수 있다.
일 예로, 현재 블록에 대해, 제2 방향 보간 필터가 이용되는 것으로 결정된 경우, 현재 블록의 참조 샘플 라인의 인덱스를 나타내는 정보의 부호화/복호화를 생략하거나, 상기 참조 샘플 라인의 인덱스를 나타내는 정보의 최대값이 문턱값을 초과하지 않도록 설정할 수 있다. 일 예로, 현재 블록의 참조 샘플 라인의 인덱스를 나타내는 정보의 부호화/복호화를 생략한 뒤, 현재 블록에 인접하는 참조 샘플 라인(즉, 참조 샘플 라인 0)를 현재 블록의 참조 샘플 라인으로 선택할 수 있다.
또는, 현재 블록의 참조 샘플 라인의 인덱스가 문턱값 이하인 경우에만, 현재 블록에 대해 제2 방향 보간 필터가 적용되는지 여부를 나타내는 정보, 예컨대, 1비트의 플래그를 부호화/복호화할 수도 있다.
다른 예로, 복수의 참조 샘플 라인 후보들 중에서 현재 블록의 참조 샘플 라인을 선택한 뒤, 예측하고자 하는 위치로부터 인트라 예측 모드를 따라 프로젝션된 위치가, 상기 참조 샘플 라인 및 상기 참조 샘플 라인에 인접하는 참조 샘플 라인 사이에 존재하는지 여부에 기반하여, 제2 방향 보간 필터의 이용 여부가 결정될 수도 있다.
일 예로, 도 17에 도시된 예에서, 현재 블록의 인트라 예측 모드의 인덱스가 50번 내지 60번 사이에 존재하는 경우, 예측하고자 하는 위치 P로부터 프로젝션되는 위치는, 참조 샘플 라인 1 및 참조 샘플 라인 2에 위치한다. 이에 따라, 현재 블록의 참조 샘플 라인으로 참조 샘플 라인 1 또는 참조 샘플 라인 2가 선택된 경우에 한하여, 제2 방향 보간 필터가 이용 가능한 것으로 결정될 수 있다.
한편, 예측하고자 하는 위치로부터 인트라 예측 모드의 각도선을 따라 복수의 참조 샘플 라인들 각각에 프로젝션된다고 가정할 경우, 복수의 참조 샘플 라인들 중 제1 참조 샘플 라인 상에 프로젝션된 위치는 분수 위치인 반면, 복수의 참조 샘플 라인들 중 제2 참조 샘플 라인 상에 프로젝션된 위치는 정수 위치인 경우가 존재할 수 있다.
도 18은 예측하고자 하는 위치로부터 복수의 참조 샘플들 각각에 프로젝션된 위치를 예시한 도면이다.
도 18에 도시된 예에서, 예측하고자 하는 위치 P로부터 참조 샘플 라인 0에 프로젝션되는 위치는 참조 샘플 A 및 참조 샘플 B 사이의 분수 위치인 반면, 참조 샘플 라인 1에 프로젝션되는 위치는 참조 샘플 C, 즉, 정수 위치를 가리킨다.
이 경우, 보간 필터(즉, 제1 방향 보간 필터 및 제2 방향 보간 필터)를 적용하는 대신, 정수 위치 참조 샘플 C를 예측 샘플로 설정할 수 있다. 즉, 현재 블록의 예측 샘플로, 분수 위치 참조 샘플 및 정수 위치 참조 샘플 중 하나를 선택해야 하는 경우에는, 우선적으로, 정수 위치 참조 샘플을 예측 샘플로 설정할 수 있다.
또는, 소정의 기준에 따라, 참조 샘플 A 및 참조 샘플 B를 보간하여 유도된 제1 분수 위치 샘플 및 정수 위치 참조 샘플 C 중 하나를 선택하고, 선택된 것을, 예측 샘플로 설정할 수도 있다. 일 예로, 제1 분수 위치 참조 샘플을 유도하는데 이용되며, 상호 수평 방향으로 인접하는 참조 샘플 A 및 참조 샘플 B 사이의 차분(즉, |A-B|)과, 정수 위치 참조 샘플 C와 수직 방향으로 인접하는 참조 샘플(예컨대, B 또는 D)와의 차분(즉, |B-C| 또는 |B-D|)를 비교하여, 제1 분수 위치 샘플 및 정수 위치 참조 샘플 C 중 하나를 예측 샘플로 설정할 수 있다. 일 예로, 참조 샘플 A 및 참조 샘플 B 사이의 차분(즉, |A-B|)이, 정수 위치 참조 샘플 C와 수직 방향으로 인접하는 참조 샘플 사이의 차분보다 작다면, 제1 분수 위치 샘플을 예측 샘플로 설정할 수 있다. 그렇지 않다면, 정수 위치 참조 샘플 C를 예측 샘플로 설정할 수 있다. 또는, 위 예와 반대로, 차분의 크기가 큰 쪽을 예측 샘플로 선택할 수도 있다.
이때, 기 설정된 조건에 따라, 정수 위치 참조 샘플 C에 수직 방향으로 인접하는 복수의 참조 샘플들(예컨대, B 및 D) 중 하나를 선택하여, 차분을 유도할 수 있다. 여기서, 기 설정된 조건은, 참조 샘플들의 크기 또는 정수 위치 참조 샘플 C와의 차분의 크기 중 적어도 하나일 수 있다. 일 예로, 참조 샘플 B 및 참조 샘플 D 중 값이 작은 것과, 정수 위치 참조 샘플 C 사이의 차분을 유도한 뒤, 제1 분수 위치 샘플을 예측 샘플로 설정할 것인지 또는 정수 위치 참조 샘플 C를 예측 샘플로 설정할 것인지를 결정할 수 있다. 또는, 참조 샘플 B 및 참조 샘플 D 중 값이 큰 것과, 정수 위치 참조 샘플 C 사이의 차분을 유도한 뒤, 제1 분수 위치 샘플을 예측 샘플로 설정할 것인지 또는 정수 위치 참조 샘플 C를 예측 샘플로 설정할 것인지를 결정할 수 있다.
또는, 기준 위치 참조 샘플을 이용하여, 참조 샘플들간의 차분을 유도할 수도 있다. 기준 위치 참조 샘플은, 제1 분수 위치 샘플을 유도하는데 이용되는 참조 샘플들(예컨대, 참조 샘플 A 및 참조 샘플 B) 중 정수 위치 참조 샘플(예컨대, 참조 샘플 C)과 동일한 수직선상에 놓인 것일 수 있다. 일 예로, 도 18에 도시된 예에서, 참조 샘플 B 가 기준 위치 참조 샘플로 설정될 수 있다.
이 경우, 참조 샘플 A 및 참조 샘플 B 사이의 차분(즉, |A-B|)와 참조 샘플 B 및 정수 위치 참조 샘플 C에 인접하는 참조 샘플 D 사이의 차분(즉, |B-D|)를 비교하여, 제1 분수 위치 샘플 및 정수 위치 참조 샘플 C 중 하나를 선택할 수 있다. 한편, 기준 위치 참조 샘플 B로부터 상기 기준 위치 참조 샘플에 수평 방향으로 인접하는 참조 샘플 A 까지의 거리와, 기중 위치 참조 샘플 B로부터, 정수 위치 참조 샘플 C에 인접하는 참조 샘플 D 까지의 거리는 상이하다. 이를 고려하여, 참조 샘플 A 및 참조 샘플 B 사이의 차분 및 참조 샘플 B 및 참조 샘플 D 사이의 차분 중 한쪽에 가중치를 부여하여, 비교 연산을 수행할 수도 있다. 일 예로, 참조 샘플 A 및 참조 샘플 B 사이의 차분(즉, |A-B|)에 높은 우선순위를 부여하거나, 참조 샘플 B 및 참조 샘플 D 사이의 차분, (즉, |B-D|)에 높은 우선순위를 부여할 수 있다. 높은 우선 순위가 부여된 쪽에 차분값을 작게 해주는 가중치(예컨대, 1보다 작은 가중치)를 적용하거나, 낮은 우선 순위가 부여된 쪽에 차분값을 크게 해주는 가중치(예컨대, 1보다 큰 가중치)를 적용할 수 있다.
상술한 예와 달리, 분수 위치 샘플들의 정밀도를 비교하여, 제1 방향의 보간 필터를 적용할 것인지 또는 제2 방향의 보간 필터를 적용할 것인지 여부를 결정할 수도 있다.
일 예로, 동일한 참조 샘플 라인에 속하는 두 참조 샘플들 사이에 프로젝션되는 제1 분수 위치 샘플의 정밀도와, 각각이 상이한 참조 샘플 라인에 속하는 두 참조 샘플들 사이에 프로젝션되는 제2 분수 위치 샘플의 정밀도를 비교하여, 제1 분수 위치 샘플 및 제2 분수 위치 샘플 중 하나를 선택할 수 있다. 일 예로, 제1 분수 위치 샘플 및 제2 분수 위치 샘플 중, 정밀도가 1/2 위치에 가까운 것 또는 정수 위치에 가까운 것을, 예측 샘플을 유도하는데 이용할 수 있다.
상술한 실시예들에서 사용된 신택스들의 명칭은, 설명의 편의를 위해 명명된 것에 불과하다.
복호화 과정 또는 부호화 과정을 중심으로 설명된 실시예들을, 부호화 과정 또는 복호화 과정에 적용하는 것은, 본 발명의 범주에 포함되는 것이다. 소정의 순서로 설명된 실시예들을, 설명된 것과 상이한 순서로 변경하는 것 역시, 본 발명의 범주에 포함되는 것이다.
상술한 실시예는 일련의 단계 또는 순서도를 기초로 설명되고 있으나, 이는 발명의 시계열적 순서를 한정한 것은 아니며, 필요에 따라 동시에 수행되거나 다른 순서로 수행될 수 있다. 또한, 상술한 실시예에서 블록도를 구성하는 구성요소(예를 들어, 유닛, 모듈 등) 각각은 하드웨어 장치 또는 소프트웨어로 구현될 수도 있고, 복수의 구성요소가 결합하여 하나의 하드웨어 장치 또는 소프트웨어로 구현될 수도 있다. 상술한 실시예는 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.
본 개시에서 설명한 실시예들은, 영상을 부호화 또는 복호화하는 전자 장치에 적용될 수 있다.

Claims (15)

  1. 현재 블록의 인트라 예측 모드를 결정하는 단계;
    상기 인트라 예측 모드에 기반하여, 제1 참조 샘플 라인에 속하는 제1 참조 샘플을 선택하는 단계; 및
    상기 제1 참조 샘플에 기반하여 상기 현재 블록의 예측 샘플을 획득하는 단계를 포함하되,
    상기 예측 샘플은, 상기 제1 참조 샘플에 제1 방향 보간 필터 또는 제2 방향 보간 필터 중 하나를 선택적으로 적용하여, 유도되는 것을 특징으로 하는, 영상 복호화 방법.
  2. 제1 항에 있어서,
    상기 제1 방향 보간 필터는, 상기 제1 참조 샘플 및 상기 제1 참조 샘플 라인에 속하면서 상기 제1 참조 샘플에 인접하는 제2 참조 샘플에 적용되고,
    상기 제2 방향 보간 필터는, 상기 제1 참조 샘플 및 상기 제1 참조 샘플 라인과 상이한 제2 참조 샘플 라인에 속하는 제3 참조 샘플에 적용되는 것을 특징으로 하는, 영상 복호화 방법.
  3. 제2 항에 있어서,
    상기 제2 방향 보간 필터의 탭수는, 상기 예측 샘플로부터 상기 인트라 예측 모드의 각도선을 따라 프로젝션되는 위치를 기반으로 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  4. 제2 항에 있어서,
    상기 제1 참조 샘플 및 상기 제2 참조 샘플 사이의 차분 및 상기 제1 참조 샘플 및 상기 제3 참조 샘플 사이의 차분의 비교 결과에 기초하여, 상기 제1 방향 보간 필터 및 상기 제2 방향 보간 필터 중 하나가 선택되는 것을 특징으로 하는, 영상 복호화 방법.
  5. 제1 항에 있어서,
    상기 제2 방향 보간 필터가 이용 가능한지 여부는, 상기 인트라 예측 모드 또는 상기 제1 참조 샘플 라인의 인덱스 중 적어도 하나를 기반으로 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  6. 제5 항에 있어서,
    상기 제2 방향 보간 필터가 이용 불가능한 경우, 상기 제1 방향 보간 필터를 기반으로 상기 예측 샘플이 유도되는 것을 특징으로 하는, 영상 복호화 방법.
  7. 제5 항에 있어서,
    상기 제2 방향 보간 필터는, 상기 예측 샘플로부터 상기 인트라 예측 모드의 각도선을 따라 프로젝션되는 위치가, 상기 제1 참조 샘플 라인 및 상기 제1 참조 샘플 라인에 인접하는 제2 참조 샘플 라인 사이인 경우에 한하여, 이용 가능한 것을 특징으로 하는, 영상 복호화 방법.
  8. 제1 항에 있어서,
    비트스트림으로부터 복호화된 플래그에 기반하여, 상기 제1 방향 보간 필터 및 상기 제2 방향 보간 필터 중 하나가 선택되는 것을 특징으로 하는, 영상 복호화 방법.
  9. 현재 블록의 인트라 예측 모드를 결정하는 단계;
    상기 인트라 예측 모드에 기반하여, 제1 참조 샘플 라인에 속하는 제1 참조 샘플을 선택하는 단계; 및
    상기 제1 참조 샘플에 기반하여 상기 현재 블록의 예측 샘플을 획득하는 단계를 포함하되,
    상기 예측 샘플은, 상기 제1 참조 샘플에 제1 방향 보간 필터 또는 제2 방향 보간 필터 중 하나를 선택적으로 적용하여, 유도되는 것을 특징으로 하는, 영상 부호화 방법.
  10. 제9 항에 있어서,
    상기 제1 방향 보간 필터는, 상기 제1 참조 샘플 및 상기 제1 참조 샘플 라인에 속하면서 상기 제1 참조 샘플에 인접하는 제2 참조 샘플에 적용되고,
    상기 제2 방향 보간 필터는, 상기 제1 참조 샘플 및 상기 제1 참조 샘플 라인과 상이한 제2 참조 샘플 라인에 속하는 제3 참조 샘플에 적용되는 것을 특징으로 하는, 영상 부호화 방법.
  11. 제10 항에 있어서,
    상기 제2 방향 보간 필터의 탭수는, 상기 예측 샘플로부터 상기 인트라 예측 모드의 각도선을 따라 프로젝션되는 위치를 기반으로 결정되는 것을 특징으로 하는, 영상 부호화 방법.
  12. 제10 항에 있어서,
    상기 제1 참조 샘플 및 상기 제2 참조 샘플 사이의 차분 및 상기 제1 참조 샘플 및 상기 제3 참조 샘플 사이의 차분의 비교 결과에 기초하여, 상기 제1 방향 보간 필터 및 상기 제2 방향 보간 필터 중 하나가 선택되는 것을 특징으로 하는, 영상 부호화 방법.
  13. 제9 항에 있어서,
    상기 제2 방향 보간 필터가 이용 가능한지 여부는, 상기 인트라 예측 모드 또는 상기 제1 참조 샘플 라인의 인덱스 중 적어도 하나를 기반으로 결정되는 것을 특징으로 하는, 영상 부호화 방법.
  14. 제13 항에 있어서,
    상기 제2 방향 보간 필터가 이용 불가능한 경우, 상기 제1 방향 보간 필터를 기반으로 상기 예측 샘플이 유도되는 것을 특징으로 하는, 영상 부호화 방법.
  15. 현재 블록의 인트라 예측 모드를 결정하는 단계;
    상기 인트라 예측 모드에 기반하여, 제1 참조 샘플 라인에 속하는 제1 참조 샘플을 선택하는 단계; 및
    상기 제1 참조 샘플에 기반하여 상기 현재 블록의 예측 샘플을 획득하는 단계를 포함하되,
    상기 예측 샘플은, 상기 제1 참조 샘플에 제1 방향 보간 필터 또는 제2 방향 보간 필터 중 하나를 선택적으로 적용하여, 유도되는 것을 특징으로 하는, 영상 부호화 방법에 의해 생성된 비트스트림을 저장하는 기록 매체.
PCT/KR2023/007397 2022-05-30 2023-05-30 영상 부호화/복호화 방법 및 장치 WO2023234681A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20220066250 2022-05-30
KR10-2022-0066250 2022-05-30

Publications (1)

Publication Number Publication Date
WO2023234681A1 true WO2023234681A1 (ko) 2023-12-07

Family

ID=89025142

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2023/007397 WO2023234681A1 (ko) 2022-05-30 2023-05-30 영상 부호화/복호화 방법 및 장치

Country Status (2)

Country Link
KR (1) KR20230166956A (ko)
WO (1) WO2023234681A1 (ko)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180098160A (ko) * 2017-02-24 2018-09-03 주식회사 케이티 비디오 신호 처리 방법 및 장치
US20200359018A1 (en) * 2016-05-04 2020-11-12 Microsoft Technology Licensing, Llc Intra-picture prediction using non-adjacent reference lines of sample values
KR20200139763A (ko) * 2018-09-10 2020-12-14 텐센트 아메리카 엘엘씨 다중 라인 인트라 예측을 위한 인트라 보간 필터
US20210127110A1 (en) * 2018-09-07 2021-04-29 Huawei Technologies Co., Ltd. Method and apparatus for interpolation filtering for intra- and inter-prediction in video coding
KR20220047824A (ko) * 2019-09-19 2022-04-19 엘지전자 주식회사 참조 샘플 필터링을 이용하는 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200359018A1 (en) * 2016-05-04 2020-11-12 Microsoft Technology Licensing, Llc Intra-picture prediction using non-adjacent reference lines of sample values
KR20180098160A (ko) * 2017-02-24 2018-09-03 주식회사 케이티 비디오 신호 처리 방법 및 장치
US20210127110A1 (en) * 2018-09-07 2021-04-29 Huawei Technologies Co., Ltd. Method and apparatus for interpolation filtering for intra- and inter-prediction in video coding
KR20200139763A (ko) * 2018-09-10 2020-12-14 텐센트 아메리카 엘엘씨 다중 라인 인트라 예측을 위한 인트라 보간 필터
KR20220047824A (ko) * 2019-09-19 2022-04-19 엘지전자 주식회사 참조 샘플 필터링을 이용하는 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법

Also Published As

Publication number Publication date
KR20230166956A (ko) 2023-12-07

Similar Documents

Publication Publication Date Title
WO2018212577A1 (ko) 비디오 신호 처리 방법 및 장치
WO2017222325A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018212578A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018066959A1 (ko) 비디오 신호 처리 방법 및 장치
WO2017188652A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2018106047A1 (ko) 비디오 신호 처리 방법 및 장치
WO2017179835A1 (ko) 인트라 예측 기반의 비디오 신호 처리 방법 및 장치
WO2018221817A1 (ko) 영상 코딩 시스템에서 인트라 예측에 따른 영상 디코딩 방법 및 장치
WO2017039256A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018008904A2 (ko) 비디오 신호 처리 방법 및 장치
WO2018044088A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018236031A1 (ko) 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2018008905A1 (ko) 비디오 신호 처리 방법 및 장치
WO2019117639A1 (ko) 변환에 기반한 영상 코딩 방법 및 그 장치
WO2018212579A1 (ko) 비디오 신호 처리 방법 및 장치
WO2013154366A1 (ko) 블록 정보에 따른 변환 방법 및 이러한 방법을 사용하는 장치
WO2018044089A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020096425A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2019078664A1 (ko) 비디오 신호 처리 방법 및 장치
WO2019235891A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018066958A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018164504A1 (ko) 비디오 신호 처리 방법 및 장치
WO2016122251A1 (ko) 비디오 신호 처리 방법 및 장치
WO2014098374A1 (ko) Mpm을 이용한 계층적 영상 복호화 방법 및 이러한 방법을 사용하는 장치
WO2021118309A1 (ko) 비디오 신호 처리 방법 및 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23816342

Country of ref document: EP

Kind code of ref document: A1