[go: up one dir, main page]

WO2025150789A1 - Intra prediction-based image coding method, and device therefor - Google Patents

Intra prediction-based image coding method, and device therefor

Info

Publication number
WO2025150789A1
WO2025150789A1 PCT/KR2025/000175 KR2025000175W WO2025150789A1 WO 2025150789 A1 WO2025150789 A1 WO 2025150789A1 KR 2025000175 W KR2025000175 W KR 2025000175W WO 2025150789 A1 WO2025150789 A1 WO 2025150789A1
Authority
WO
WIPO (PCT)
Prior art keywords
intra prediction
smpm
mpm list
mode
group
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
PCT/KR2025/000175
Other languages
French (fr)
Korean (ko)
Inventor
변지영
이진욱
김영준
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
LX Semicon Co Ltd
Original Assignee
LX Semicon Co Ltd
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 LX Semicon Co Ltd filed Critical LX Semicon Co Ltd
Priority claimed from KR1020250000974A external-priority patent/KR20250108525A/en
Publication of WO2025150789A1 publication Critical patent/WO2025150789A1/en
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • 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/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • a highly efficient image/video compression technology is required to effectively compress, transmit, store, and play back information of high-resolution, high-quality images/videos with various characteristics as described above.
  • a device for transmitting video/video data including a bitstream generated by a video/video encoding method according to at least one of the embodiments of the present disclosure.
  • an efficient intra prediction mode candidate list for intra prediction mode signaling can be constructed.
  • Figure 1 schematically illustrates an example of a video/image coding system to which embodiments of the present disclosure can be applied.
  • FIG. 3 is a drawing schematically illustrating the configuration of a video/image decoding device to which embodiments of the present disclosure can be applied.
  • Figure 4 illustrates an intra prediction procedure as an example.
  • Figure 6 shows examples of intra prediction based video/image decoding methods.
  • Figure 10 exemplarily shows DIMD-based modes and intra prediction modes derived from surrounding blocks.
  • FIG. 12 schematically illustrates a video/image encoding method according to an embodiment(s) of the present disclosure.
  • each component in the drawings described in the present disclosure is independently depicted for the convenience of explaining different characteristic functions, and does not mean that each component is implemented with separate hardware or separate software.
  • two or more components among each component may be combined to form one component, or one component may be divided into multiple components.
  • Embodiments in which each component is integrated and/or separated are also included in the scope of the present disclosure as long as they do not deviate from the essence of the present disclosure.
  • a or B can mean “only A”, “only B”, or “both A and B”.
  • a or B in this disclosure can be interpreted as “A and/or B”.
  • A, B or C in this disclosure can mean “only A”, “only B”, “only C”, or "any combination of A, B and C”.
  • the slash (/) or comma used in this disclosure can mean “and/or”.
  • A/B can mean “A and/or B”.
  • A/B can mean "only A”, “only B”, or “both A and B”.
  • A, B, C can mean "A, B, or C”.
  • “at least one of A, B and C” can mean “only A,” “only B,” “only C,” or “any combination of A, B and C.” Additionally, “at least one of A, B or C” or “at least one of A, B and/or C” can mean “at least one of A, B and C.”
  • parentheses used in the present disclosure may mean “for example”. Specifically, when it is indicated as “prediction (intra prediction)", “intra prediction” may be suggested as an example of “prediction”. In other words, “prediction” in the present disclosure is not limited to “intra prediction”, and “intra prediction” may be suggested as an example of “prediction”. In addition, even when it is indicated as “prediction (i.e., intra prediction)", “intra prediction” may be suggested as an example of "prediction”.
  • the present disclosure relates to video/image coding.
  • the method/embodiment described in the present disclosure can be applied to a method disclosed in the enhanced compression model (ECM) or H.267 standard.
  • ECM enhanced compression model
  • the method/embodiment disclosed in this disclosure can be applied to a method disclosed in the AV2 (AOMedia Video 2) standard, or a next-generation video/image coding standard (e.g. H.268, H.269, etc.).
  • coding may include encoding and/or decoding.
  • image coding may be interchangeably used with video coding.
  • a unit may represent a basic unit of image processing.
  • a unit may include at least one of a specific region of a picture and information related to the region.
  • One unit may include one luma block and two chroma (ex. cb, cr) blocks.
  • a unit may be used interchangeably with terms such as block or area.
  • an MxN block may include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows.
  • Figure 1 schematically illustrates an example of a video/image coding system to which embodiments of the present disclosure can be applied.
  • a video/image coding system may include a first device (an encoding device) and a second device (a decoding device).
  • the first device may transmit encoded video/image information or data to the second device through a digital storage medium or a network in the form of a file or streaming.
  • the video/image coding system may further include a video/image acquisition device and a video/image renderer.
  • the video/image acquisition device may be included in the encoding device, or may be configured as a separate device or an external component.
  • the video/image renderer may be included in the decoding device, or may be configured as a separate device or an external component.
  • the first device may include the transmission unit as an internal component, or as a separate device or external component.
  • the second device may include the receiver as an internal component, or may include it as a separate device or external component.
  • the encoder may be referred to as an encoding device, and the decoder may be referred to as a decoding device.
  • the transmitting unit may be included in the encoding device.
  • the receiving unit may be included in the decoding device.
  • the renderer may include a display unit, and the display unit may be comprised of a separate device or an external component.
  • the decoding device and the encoding device to which the embodiment(s) of the present disclosure are applied may be included in a multimedia broadcasting transmitting/receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT video (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a VR (virtual reality) device, an AR (agumented reality) device, a video phone video device, a transportation terminal (ex.
  • a multimedia broadcasting transmitting/receiving device a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium
  • the OTT video (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), and the like.
  • the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.
  • the streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as a medium that informs the user of any available services.
  • the web server transmits it to the streaming server, and the streaming server transmits multimedia data to the user.
  • the content streaming system may include a separate control server, and in this case, the control server serves to control commands/responses between each device within the content streaming system.
  • the encoding device (200) may be configured to include an image partitioner (210), a prediction unit (predictor) 220, a residual processor (residual processor) 230, an entropy encoder (entropy encoder) 240, an adder (adder) 250, a filter (filter) 260, and a memory (memory) 270.
  • the prediction unit (220) may include an inter prediction unit and an intra prediction unit.
  • the residual processor (230) may include a transformer (transformer) 232, a quantizer (quantizer) 233, a dequantizer (dequantizer) 234, and an inverse transformer (inverse transformer) 235.
  • the residual processor (230) may further include a subtractor (subtractor) 231.
  • the quad-tree structure may be applied first and the binary tree structure and/or the ternary structure may be applied later.
  • the binary tree structure may be applied first.
  • the coding procedure according to the present disclosure may be performed based on a final coding unit that is no longer segmented. In this case, based on coding efficiency according to image characteristics, etc., the maximum coding unit can be used as the final coding unit, or, if necessary, the coding unit can be recursively divided into coding units of lower depths, and the coding unit of the optimal size can be used as the final coding unit.
  • the coding procedure may include procedures such as prediction, transformation, and restoration described below.
  • the processing unit may further include a prediction unit (PU) or a transformation unit (TU).
  • the prediction unit and the transformation unit may be divided or partitioned from the final coding unit described above, respectively.
  • the prediction unit may be a unit for sample prediction
  • the transformation unit may be a unit for deriving a transform coefficient and/or a unit for deriving a residual signal from a transform coefficient.
  • the prediction unit can determine whether intra prediction or inter prediction is applied per current block or CU unit.
  • the prediction unit can generate various information about prediction, such as prediction mode information, as described later in the description of each prediction mode, and transmit it to the entropy encoding unit (240).
  • the information about prediction can be encoded in the entropy encoding unit (240) and output in the form of a bitstream.
  • the motion vector of the neighboring blocks may be used as a motion vector predictor, and the motion vector of the current block may be indicated by signaling a motion vector difference.
  • MVP motion vector prediction
  • the prediction signal generated through the prediction unit (220) can be used to generate a restoration signal or to generate a residual signal.
  • the transform unit (232) can apply a transform technique to the residual signal to generate transform coefficients.
  • the transform technique can include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loe've Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-linear Transform (CNT).
  • DCT Discrete Cosine Transform
  • DST Discrete Sine Transform
  • KLT Karhunen-Loe've Transform
  • GBT Graph-Based Transform
  • CNT Conditionally Non-linear Transform
  • the quantization unit (233) quantizes the transform coefficients and transmits them to the entropy encoding unit (240), and the entropy encoding unit (240) can encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream.
  • the information about the quantized transform coefficients can be called residual information.
  • the quantization unit (233) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and can also generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
  • the entropy encoding unit (240) can perform various encoding methods, such as, for example, exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).
  • the entropy encoding unit (240) may encode, together or separately, information necessary for video/image restoration (e.g., values of syntax elements, etc.) in addition to quantized transform coefficients.
  • the encoded information (e.g., encoded video/image information) may be transmitted or stored in the form of a bitstream in the form of a network abstraction layer (NAL) unit.
  • NAL network abstraction layer
  • the video/image information may further include information about various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS).
  • the video/image information may further include general constraint information.
  • information and/or syntax elements transmitted/signaled from an encoding device to a decoding device may be included in the video/image information.
  • the video/image information may be encoded through the above-described encoding procedure and included in the bitstream.
  • the bitstream may be transmitted through a network or stored in a digital storage medium.
  • the network may include a broadcasting network and/or a communication network
  • the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
  • the signal output from the entropy encoding unit (240) may be configured as an internal/external element of the encoding device (200) by a transmitting unit (not shown) and/or a storing unit (not shown), or the transmitting unit may be included in the entropy encoding unit (240).
  • the quantized transform coefficients output from the quantization unit (233) can be used to generate a prediction signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (234) and the inverse transform unit (235), a residual signal (residual block or residual samples) can be reconstructed.
  • the addition unit (250) can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the prediction unit. When there is no residual for the target block to be processed, such as when the skip mode is applied, the predicted block can be used as the reconstructed block.
  • the addition unit (250) can be called a reconstructed unit or a reconstructed block generation unit.
  • the generated reconstructed signal can be used for intra prediction of the next target block in the current picture, and can also be used for inter prediction of the next picture after filtering as described below.
  • LMCS luma mapping with chroma scaling
  • the filtering unit (260) can apply filtering to the restoration signal to improve subjective/objective picture quality.
  • the filtering unit (260) can apply various filtering methods to the restoration picture to generate a modified restoration picture and store the modified restoration picture in the memory (270), specifically, in the DPB of the memory (270).
  • the various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
  • the filtering unit (260) can generate information about the filtering and transmit it to the entropy encoding unit (240).
  • the information about the filtering can be encoded by the entropy encoding unit (240) and output in the form of a bitstream.
  • the modified restored picture transmitted to the memory (270) can be used as a reference picture in the inter prediction unit.
  • the encoding device can avoid prediction mismatch between the encoding device (200) and the decoding device when inter prediction is applied, and can also improve encoding efficiency.
  • the memory (270) DPB can store the modified restored picture to be used as a reference picture in the inter prediction unit.
  • the memory (270) can store motion information of a block from which motion information in the current picture is derived (or encoded) and/or motion information of blocks in a picture that has already been restored.
  • the stored motion information can be transferred to the inter prediction unit to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block.
  • the memory (270) can store restored samples of restored blocks in the current picture and transfer them to the intra prediction unit.
  • FIG. 3 is a drawing schematically illustrating the configuration of a video/image decoding device to which embodiments of the present disclosure may be applied.
  • the decoding device hereinafter may include an image decoding device and/or a video decoding device.
  • the residual processing unit (320) can derive a residual signal (residual block, residual samples, residual sample array).
  • information regarding filtering among the information decoded by the entropy decoding unit (310) can be provided to the filtering unit (350).
  • the inverse quantization unit (321) can inverse quantize the quantized transform coefficients and output the transform coefficients.
  • the inverse quantization unit (321) can rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scan order performed in the encoding device.
  • the inverse quantization unit (321) can perform inverse quantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain transform coefficients.
  • the inter prediction unit (332) can configure a motion information candidate list based on neighboring blocks, and derive a motion vector and/or a reference picture index of the current block based on the received candidate selection information.
  • Inter prediction can be performed based on various prediction modes, and information about the prediction can include information indicating a mode of inter prediction for the current block.
  • the addition unit (340) can generate a restoration signal (restored picture, restored block, restored sample array) by adding the acquired residual signal to the prediction signal (predicted block, predicted sample array) output from the prediction unit (330).
  • a restoration signal stored picture, restored block, restored sample array
  • the prediction signal predicted block, predicted sample array
  • the addition unit (340) may be called a restoration unit or a restoration block generation unit.
  • the generated restoration signal may be used for intra prediction of the next processing target block within the current picture, may be output after filtering as described below, or may be used for inter prediction of the next picture.
  • LMCS luma mapping with chroma scaling
  • the (corrected) reconstructed picture stored in the DPB of the memory (360) can be used as a reference picture in the inter prediction unit.
  • the memory (360) can store motion information of a block from which motion information in the current picture is derived (or decoded) and/or motion information of blocks in a picture that has already been reconstructed.
  • the stored motion information can be transferred to the inter prediction unit to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block.
  • the memory (360) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit.
  • the embodiments described in the filtering unit (260) and the prediction unit (220) of the encoding device (200) can be applied identically or correspondingly to the filtering unit (350) and the prediction unit (330) of the decoding device (300).
  • a predicted block including prediction samples for a current block which is a coding target block
  • the predicted block includes prediction samples in a spatial domain (or pixel domain).
  • the predicted block is derived identically from an encoding device and a decoding device, and the encoding device can increase image coding efficiency by signaling information (residual information) about a residual between the original block and the predicted block, rather than the original sample value of the original block itself, to a decoding device.
  • the decoding device can derive a residual block including residual samples based on the residual information, and generate a reconstructed block including reconstructed samples by combining the residual block and the predicted block, and can generate a reconstructed picture including the reconstructed blocks.
  • the residual information can be generated through a transformation and quantization procedure.
  • the encoding device can derive a residual block between the original block and the predicted block, perform a transformation procedure on residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and signal related residual information to a decoding device (via a bitstream).
  • the residual information can include information such as value information of the quantized transform coefficients, position information, transformation technique, transformation kernel, and quantization parameter.
  • the decoding device can perform an inverse quantization/inverse transformation procedure based on the residual information to derive residual samples (or residual block).
  • the decoding device can generate a reconstructed picture based on the predicted block and the residual block.
  • the encoding device can also inversely quantize/inversely transform the quantized transform coefficients to derive a residual block for reference in inter prediction of a subsequent picture, and generate a restored picture based on the residual block.
  • At least one of quantization/dequantization and/or transform/inverse transform may be omitted. If the quantization/dequantization is omitted, the quantized transform coefficient may be called a transform coefficient. If the transform/inverse transform is omitted, the transform coefficient may be called a coefficient or a residual coefficient, or may still be called a transform coefficient for the sake of uniformity of expression.
  • the quantized transform coefficients and the transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively.
  • the residual information may include information about the transform coefficient(s), and the information about the transform coefficient(s) may be signaled via residual coding syntax.
  • Transform coefficients may be derived based on the residual information (or the information about the transform coefficient(s)), and scaled transform coefficients may be derived through inverse transformation (scaling) on the transform coefficients.
  • Residual samples may be derived based on inverse transformation (transformation) on the scaled transform coefficients. This may be similarly applied/expressed in other parts of the present disclosure.
  • Intra prediction may represent a prediction that generates prediction samples for a current block based on reference samples in a picture to which the current block belongs (hereinafter, the current picture).
  • peripheral reference samples to be used for intra prediction of the current block may be derived.
  • the peripheral reference samples of the current block may include H+W samples located at the left of a current block of a size W ⁇ H, W+H samples located at the top of the current block, and at least one sample neighboring the top-left of the current block.
  • the peripheral reference samples of the current block may include upper peripheral samples of multiple rows and left peripheral samples of multiple columns.
  • the decoder can construct surrounding reference samples to be used for prediction by padding or substituting the unavailable samples with the available samples.
  • the prediction samples of the current block can be derived based on the surrounding reference samples and the intra prediction mode/type information.
  • the intra prediction mode can represent one of the non-directional prediction modes and the directional prediction modes that indicate spatial correlation for intra prediction.
  • the directional prediction mode can be called an angular prediction mode
  • the non-directional prediction mode can be called a non-angular prediction mode.
  • the intra prediction type can represent various prediction types for performing intra prediction.
  • the intra prediction type may include, for example, MRL (multi-reference line), ISP (intra sub-partitions), PDPC (Position dependent intra prediction), MIP (matrix weighted intra prediction or matrix based intra prediction), CCLM (cross-component linear model), MMLM (multi-model linear model), DIMD (Decoder side intra mode derivation), fusion of chroma intra prediction modes, intra template matching, TIMD (fusion for template-based intra mode derivation), intra prediction fusion, CCCM (cross-component convolutional model), CCP (cross-component prediction), SGPM (spatial geometric partitioning mode), etc.
  • the intra prediction mode and/or the intra prediction type may be used to perform intra prediction.
  • Figure 4 illustrates an intra prediction procedure as an example.
  • the intra prediction procedure as described above may include an intra prediction mode/type determination step, a reference sample derivation step, and an intra prediction performance (prediction sample generation) step.
  • the intra prediction procedure may be performed in an encoding device and a decoding device as described above.
  • An encoding device can determine an intra prediction mode/type applied to the current block from among various intra prediction modes/types described in the present disclosure, and can generate prediction-related information.
  • the prediction-related information can include intra prediction mode information indicating an intra prediction mode applied to the current block and/or intra prediction type information indicating an intra prediction type applied to the current block.
  • a decoding device can determine an intra prediction mode/type applied to the current block based on the prediction-related information.
  • the intra prediction mode to be applied to the current block can be determined using the intra prediction mode of the surrounding block.
  • the coding device can select one of the MPM candidates in the MPM (most probable mode) list derived based on the intra prediction mode of the surrounding block (e.g., the left and/or upper surrounding block) of the current block and/or additional candidate modes based on the received index information, or can select one of the remaining intra prediction modes not included in the MPM candidates based on MPM remind information (remaining intra prediction mode information).
  • the MPM list can be configured to include or not include the planar mode as a candidate.
  • the intra prediction mode for the current block can be determined only among the MPM candidates, and in this case, the MPM flag may not be encoded/signaled.
  • the decoding device can estimate that the MPM flag is 1 without being separately signaled the MPM flag.
  • Figure 5 shows examples of intra prediction based video/image encoding methods.
  • S500 may be performed by a prediction unit of an encoding device
  • S505 may be performed by a residual processing unit of the encoding device
  • S510 or S515 may be performed by an entropy encoding unit of the encoding device.
  • the prediction-related information may be derived by the prediction unit and encoded by the entropy encoding unit.
  • the residual information may be derived by the residual processing unit and encoded by the entropy encoding unit.
  • the residual information is information about the residual samples.
  • the residual information may include information about quantized transform coefficients for the residual samples.
  • the residual samples may be derived as transform coefficients through the transform unit of the encoding device, and the transform coefficients may be derived as quantized transform coefficients through the quantization unit.
  • the information about the quantized transform coefficients may be encoded in the entropy encoding unit through a residual coding procedure.
  • the encoding device performs intra prediction on the current block (S500).
  • the encoding device can derive an intra prediction mode/type for the current block, derive reference samples of the current block, and generate prediction samples in the current block based on the intra prediction mode/type and the reference samples.
  • the intra prediction mode/type determination, surrounding reference sample derivation, and prediction sample generation procedures may be performed simultaneously, or one procedure may be performed before the other procedure.
  • the encoding device can determine a mode/type applied to the current block among a plurality of intra prediction modes/types.
  • the encoding device can compare RD costs for the intra prediction modes/types and determine an optimal intra prediction mode/type for the current block.
  • the encoding device may also perform a prediction sample filtering procedure.
  • the prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.
  • the encoding device generates residual samples for the current block based on the prediction samples (S505).
  • the encoding device can compare the prediction samples with the original samples of the current block based on phase and derive the residual samples.
  • the residual information may include a residual coding syntax element.
  • An encoding device may transform/quantize the residual samples to derive quantized transform coefficients.
  • the residual information may include information about the quantized transform coefficients.
  • the decoding device can perform operations corresponding to the operations performed in the encoding device.
  • a video/image decoding procedure based on intra prediction may include, for example, the following.
  • Figure 6 shows examples of intra prediction based video/image decoding methods.
  • the intra prediction mode information and/or the intra prediction type information can be encoded/decoded through the binarization and coding method described in the present disclosure.
  • the intra prediction mode information and/or the intra prediction type information can be binarized through fixed-length binarization, truncated Rice binarization, truncated unary binarization, etc.
  • the intra prediction mode information and/or the intra prediction type information can be encoded/decoded through entropy coding (ex. CABAC, CAVLC) coding.
  • Fig. 7 shows examples of directional intra prediction modes.
  • Fig. 7 can show an example of a case including 65 directional intra prediction modes.
  • the directional intra prediction modes may include directional intra prediction modes of mode #2 to mode #65.
  • mode #50 may represent a vertical intra prediction mode
  • mode #18 may represent a horizontal intra prediction mode.
  • mode #0 may represent an intra planar prediction mode (planner mode)
  • mode #1 may represent an intra DC prediction mode (DC mode).
  • mode numbers can be assigned, for example, as shown in the following table.
  • an intra prediction mode can be derived based on a DIMD (Decoder side intra mode derivation) technique.
  • DIMD can be referred to as a DIMD type.
  • Figure 8 shows an example of template-based HoG computation in DIMD.
  • a Histogram of Gradient can be calculated using a template that includes surrounding samples of a current block.
  • a HoG can be calculated using a horizontal/vertical Sobel filter based on a line template of n (ex. 3) surrounding samples.
  • horizontal and vertical Sobel filters can be applied to calculate the HoG. If the template is located in a different CTU, the Sobel filter may not be applied to the upper CTU boundary, or the DIMD technique may not be applied to the current block.
  • the filter applied for HoG calculation may be determined differently based on the block size. For example, when the block size is 4x4, 4x8, or 8x4, a 2x2 kernel filter may be applied instead of a 3x3 Sobel filter for HoG calculation.
  • an adaptive number of (surrounding) reference samples can be used for the HoG calculation of DIMD.
  • the number of sample lines in the DIMD template can be 4 or more.
  • Information about intra prediction can be signaled, for example, as follows.
  • Information about intra prediction can include one or more syntax elements. The same applies hereinafter.
  • smpm_idc may be used instead of smpm_flag and/or smpm_group_flag (or smpm_group_idx).
  • variable-length binarization can be performed considering the best case
  • fixed-length binarization can be performed considering the worst case
  • the above smpm_idx can be context-based coded (e.g. CABAC), in which case the context index (or context index increment) of bin 0 can be set differently depending on the case.
  • the context model of smpm_idx can be determined differently based on the size of the current block and/or the smpm_idc value.
  • the context index (or context index increment) of bin 0 of smpm_idx can be set differently based on smpm_idc (or smpm_group_idx or smpm_group_flag).
  • a context model can be adaptively allocated to information related to intra prediction modes, and entropy coding efficiency can be efficiently increased.
  • FIG. 12 schematically illustrates a video/image encoding method according to an embodiment(s) of the present disclosure.
  • the method disclosed in FIG. 12 may be performed by the encoding device disclosed in FIG. 2.
  • S1200 to S1220 of FIG. 12 may be performed by the prediction unit (220) of the encoding device (200)
  • S1230 of FIG. 12 may be performed by the entropy encoding unit (240) of the encoding device (200).
  • the method disclosed in FIG. 12 may include the embodiments described above in the present disclosure.
  • the encoding device derives an MPM list for the current block (S1200).
  • the above MPM list may include intra prediction mode candidates for the current block.
  • the MPM list may include a first MPM list, a second MPM list, and a third MPM list.
  • the second MPM list and the first MPM list may not overlap each other, and the second MPM list and the third MPM list may overlap each other.
  • candidates included in the second MPM list may not be included in the first MPM list, and candidates included in the second MPM list may be included in the third MPM list.
  • the first MPM list may be called a PMPM list.
  • the second MPM list may be called an SMPM list.
  • the third MPM list may be called a GMPM list.
  • the above MPM list is derived based on a first intra prediction mode group and a second intra prediction mode group, wherein the first intra prediction mode group includes intra prediction modes of surrounding blocks of the current block, and the second intra prediction mode group includes DIMD (decoder side intra mode derivation) based intra prediction modes for the current block.
  • DIMD decoder side intra mode derivation
  • the intra prediction mode of the second intra prediction mode group may have a higher priority than the intra prediction mode of the first intra prediction mode group and may be assigned earlier in the MPM list.
  • An overlapping mode between the intra prediction modes of the first intra prediction mode group and the intra prediction modes of the second intra prediction mode group can be derived.
  • the overlapping mode has a higher priority than the non-overlapping mode and can be allocated to the front of the MPM list.
  • the above MPM list can be further derived based on a third intra prediction mode group.
  • the third intra prediction mode group can include history-based intra prediction modes within a history-based intra prediction mode (HIPM) buffer.
  • HIPM history-based intra prediction mode
  • the HIPM buffer may include intra prediction modes of previously decoded blocks of a specific area where the current block is located and which are not adjacent to the current block.
  • the intra prediction modes in the HIPM buffer may be reordered based on the occurrence frequency of the intra prediction modes in the specific area.
  • the intra prediction mode of an unavailable block in the specific area may be set to be the same as a predetermined intra prediction mode or a DIMD-based intra prediction mode for the specific block.
  • the intra prediction mode of a specific block coded based on inter prediction or IBC (intra block copy) prediction in the specific area may be set to be the same as a predetermined intra prediction mode or a DIMD-based intra prediction mode for the specific block.
  • the predetermined intra prediction mode may be a planar mode or a DC mode.
  • the HIPM buffer may be initialized in units of CTU rows.
  • the HIPM buffer may also be initialized in units of CTU, multiple CTU rows, slices, or tiles.
  • the binarization method of the above SMPM mode index can be determined differently based on the value of the above SMPM group index.
  • the above-described embodiment(s) it is possible to efficiently indicate the prediction mode applied to the current block, and reduce the amount of data of side information.
  • the decoding device obtains prediction-related information through the bitstream (S1300).
  • the decoding device can obtain image information including the prediction-related information through the bitstream.
  • the image information may further include residual information as described above.
  • the binarization method of the above SMPM mode index can be determined differently based on the value of the above SMPM group index.
  • the decoding device derives the MPM list for the current block (S1310).
  • the above MPM list may include intra prediction mode candidates for the current block.
  • the MPM list may include a first MPM list, a second MPM list, and a third MPM list.
  • the second MPM list and the first MPM list may not overlap each other, and the second MPM list and the third MPM list may overlap each other.
  • candidates included in the second MPM list may not be included in the first MPM list, and candidates included in the second MPM list may be included in the third MPM list.
  • the first MPM list may be called a PMPM list.
  • the second MPM list may be called an SMPM list.
  • the third MPM list may be called a GMPM list.
  • the above MPM list is derived based on a first intra prediction mode group and a second intra prediction mode group, wherein the first intra prediction mode group includes intra prediction modes of surrounding blocks of the current block, and the second intra prediction mode group includes DIMD (decoder side intra mode derivation) based intra prediction modes for the current block.
  • DIMD decoder side intra mode derivation
  • the intra prediction mode of the second intra prediction mode group may have a higher priority than the intra prediction mode of the first intra prediction mode group and may be assigned earlier in the MPM list.
  • An overlapping mode between the intra prediction modes of the first intra prediction mode group and the intra prediction modes of the second intra prediction mode group can be derived.
  • the overlapping mode has a higher priority than the non-overlapping mode and can be allocated to the front of the MPM list.
  • Overlapping modes between the intra prediction modes of the first intra prediction mode group and the intra prediction modes of the second intra prediction mode group can be derived.
  • the priority between the overlapping modes can be based on the priority between the DIMD-based intra prediction modes.
  • the above MPM list can be further derived based on a third intra prediction mode group.
  • the third intra prediction mode group can include history-based intra prediction modes within a history-based intra prediction mode (HIPM) buffer.
  • HIPM history-based intra prediction mode
  • the decoding device derives the intra prediction mode of the current block (S1320).
  • the decoding device can derive the intra prediction mode of the current block based on the MPM list and the prediction-related information.
  • the decoding device generates prediction samples based on the derived intra prediction mode (S1330). For example, the decoding device may generate the prediction samples for the current block based on the derived intra prediction modes and surrounding reference samples. In this case, as described above, a prediction sample filtering procedure may be further performed on all or part of the prediction samples of the current block, depending on the case.
  • the decoding device can generate restoration samples based on prediction samples of the current block. For example, the decoding device can generate restoration samples for the current block based on residual samples for the current block and the prediction samples. The residual samples for the current block can be generated based on received residual information. In addition, the decoding device can generate a restoration picture including the restoration samples, for example. As described above, an in-loop filtering procedure, etc. can be further applied to the restoration picture.
  • the methods are described based on a flow chart as a series of steps or blocks, but the embodiments are not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Furthermore, those skilled in the art will appreciate that the steps depicted in the flow chart are not exclusive, and other steps may be included or one or more of the steps in the flow chart may be deleted without affecting the scope of the embodiments of the present disclosure.
  • the above-described embodiments of the present disclosure may also be implemented in the form of a recording medium containing computer-executable (program) instructions, such as program modules, executed by a computer.
  • the modules may be stored in a memory and executed by a processor.
  • the memory may be internal or external to the processor and may be connected to the processor by various means known in the art.
  • the computer-readable medium may be any available medium that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media.
  • the computer-readable medium may include both computer storage media and communication media.
  • the above-described embodiments of the present disclosure may be implemented as a computer program (or a computer program product) including instructions executable by a computer.
  • the computer program includes programmable machine instructions processed by a processor, and may be implemented in a high-level programming language, an object-oriented programming language, an assembly language, or a machine language.
  • the computer program may be recorded in a tangible computer-readable recording medium (e.g., a memory, a hard disk, a magnetic/optical medium, or a solid-state drive (SSD)).
  • SSD solid-state drive
  • the above-described embodiment of the present disclosure can be implemented by executing the computer program as described above by a computing device.
  • the computing device can include at least some of a processor, a memory, a storage device, a high-speed interface connecting the memory and a high-speed expansion port, and a low-speed interface connecting the low-speed bus and the storage device.
  • a processor can include at least some of a processor, a memory, a storage device, a high-speed interface connecting the memory and a high-speed expansion port, and a low-speed interface connecting the low-speed bus and the storage device.
  • Each of these components is connected to each other using various buses, and can be mounted on a common motherboard or mounted in another suitable manner.
  • the processor may process instructions within the computing device, such as instructions stored in a memory or storage device for displaying graphical information for providing a GUI (Graphical User Interface) on an external input/output device, such as a display connected to a high-speed interface.
  • instructions stored in a memory or storage device for displaying graphical information for providing a GUI (Graphical User Interface) on an external input/output device, such as a display connected to a high-speed interface.
  • GUI Graphic User Interface
  • multiple processors and/or multiple buses may be utilized, as appropriate, together with multiple memories and memory types.
  • the processor may be implemented as a chipset comprising multiple independent analog and/or digital processors.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

An image decoding method according to an embodiment of the present disclosure comprises the steps of: acquiring prediction-related information through a bitstream; deriving a most probable mode (MPM) list for the current block; deriving an intra prediction mode of the current block on the basis of the MPM list and the prediction-related information; and generating prediction samples for the current block on the basis of the derived intra prediction mode, wherein the MPM list includes a first MPM list, a second MPM list and a third MPM list, the first MPM list not including candidates included in the second MPM list, and the third MPM list including candidates included in the second MPM list.

Description

인트라 예측 기반 영상 코딩 방법 및 그 장치Intra prediction based image coding method and device thereof

본 개시는 영상/비디오 코딩 방법 및 그 장치에 관한 것이다.The present disclosure relates to an image/video coding method and a device therefor.

영상/비디오 코딩은 디지털 저장 미디어, 텔레비전 브로드캐스팅, 비디오 스트리밍 서비스, 리얼타임 통신 등 다양한 어플리케이션들에 활용되고 있으며, 최근 고해상도, 고품질의 영상/비디오에 대한 수요가 다양한 분야에서 증가하고 있다.Image/video coding is used in various applications such as digital storage media, television broadcasting, video streaming services, and real-time communications, and recently, the demand for high-resolution, high-quality images/videos is increasing in various fields.

영상/비디오가 고해상도, 고품질이 될수록 영상/비디오의 데이터 사이즈가 커지며, 상대적으로 전송되는 정보량 또는 비트량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 영상/비디오 데이터를 저장하는 경우, 전송 비용과 저장 비용이 증가된다.As the image/video becomes higher resolution and higher quality, the data size of the image/video increases, and the amount of information or bits transmitted relatively increases. Therefore, when transmitting image data using media such as existing wired/wireless broadband lines or storing image/video data using existing storage media, the transmission cost and storage cost increase.

또한, 최근 VR(virtual reality), AR(artificial reality), MR(mixed reality) 컨텐츠나 홀로그램 등의 실감 미디어(immersive media)에 대한 관심 및 수요가 증가하고 있으며, 게임, 교육, 의료, 부동산, 마케팅 등에서 실감 미디어를 이용해 몰입감 있는 경험을 제공하려는 시도가 늘어나고 있다.In addition, interest in and demand for immersive media such as VR (virtual reality), AR (artificial reality), MR (mixed reality) content and holograms have been increasing recently, and attempts to provide immersive experiences using immersive media in games, education, medicine, real estate, marketing, etc. are increasing.

이에 따라, 상기와 같은 다양한 특성을 갖는 고해상도 고품질의 영상/비디오의 정보를 효과적으로 압축하여 전송하거나 저장하고, 재생하기 위해 고효율의 영상/비디오 압축 기술이 요구된다.Accordingly, a highly efficient image/video compression technology is required to effectively compress, transmit, store, and play back information of high-resolution, high-quality images/videos with various characteristics as described above.

본 개시(disclosure)의 일 실시예에 따르면, 비디오/영상 코딩 효율을 높이는 방법 및 장치를 제공한다.According to one embodiment of the present disclosure, a method and device for improving video/image coding efficiency are provided.

본 개시의 일 실시예에 따르면, 인트라 예측 기반 비디오/영상 코딩 방법 및 장치를 제공한다. According to one embodiment of the present disclosure, a method and device for intra prediction-based video/image coding are provided.

본 개시의 일 실시예에 따르면, 디코딩 장치에 의하여 수행되는 영상 디코딩 방법을 제공한다. 상기 방법은 비트스트림을 통하여 예측 관련 정보를 획득하는 단계, 현재 블록에 대한 MPM(most probable mode) 리스트를 도출하는 단계, 상기 MPM 리스트 및 상기 예측 관련 정보를 기반으로 상기 현재 블록의 인트라 예측 모드를 도출하는 단계, 및 상기 도출된 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 생성하는 단계를 포함하고, 상기 MPM 리스트는 제1 MPM 리스트, 제2 MPM 리스트 및 제3 MPM 리스트를 포함하고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제1 MPM 리스트에 포함되지 않고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제3 MPM 리스트에 포함되는 것을 특징으로 한다.According to one embodiment of the present disclosure, a video decoding method performed by a decoding device is provided. The method includes the steps of obtaining prediction-related information through a bitstream, deriving an MPM (most probable mode) list for a current block, deriving an intra prediction mode of the current block based on the MPM list and the prediction-related information, and generating prediction samples for the current block based on the derived intra prediction mode, wherein the MPM list includes a first MPM list, a second MPM list, and a third MPM list, and candidates included in the second MPM list are not included in the first MPM list, and candidates included in the second MPM list are included in the third MPM list.

본 개시의 일 실시예에 따르면, 인코딩 장치에 의하여 수행되는 영상 인코딩 방법을 제공한다. 상기 방법은 현재 블록에 대한 MPM(most probable mode) 리스트를 도출하는 단계, 및 상기 현재 블록의 인트라 예측 모드를 도출하는 단계, 상기 MPM 리스트를 기반으로 상기 현재 블록의 인트라 예측 모드를 지시하기 위한 예측 관련 정보를 생성하는 단계, 및 상기 예측 관련 정보를 포함하는 영상 정보를 인코딩하는 단계를 포함하고, 상기 MPM 리스트는 제1 MPM 리스트, 제2 MPM 리스트 및 제3 MPM 리스트를 포함하고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제1 MPM 리스트에 포함되지 않고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제3 MPM 리스트에 포함되는 것을 특징으로 한다.According to one embodiment of the present disclosure, a video encoding method performed by an encoding device is provided. The method includes the steps of deriving an MPM (most probable mode) list for a current block, and the step of deriving an intra prediction mode of the current block, the step of generating prediction-related information for indicating the intra prediction mode of the current block based on the MPM list, and the step of encoding video information including the prediction-related information, wherein the MPM list includes a first MPM list, a second MPM list, and a third MPM list, and candidates included in the second MPM list are not included in the first MPM list, and candidates included in the second MPM list are included in the third MPM list.

본 개시의 일 실시예에 따르면, 영상 디코딩을 위한 디코딩 장치를 제공한다. 상기 디코딩 장치는 장치는 메모리 및 상기 메모리에 연결된 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는 비트스트림을 통하여 예측 관련 정보를 획득하는 단계, 현재 블록에 대한 MPM(most probable mode) 리스트를 도출하는 단계, 상기 MPM 리스트 및 상기 예측 관련 정보를 기반으로 상기 현재 블록의 인트라 예측 모드를 도출하는 단계, 및 상기 도출된 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 생성하는 단계를 수행하도록 구성되고, 상기 MPM 리스트는 제1 MPM 리스트, 제2 MPM 리스트 및 제3 MPM 리스트를 포함하고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제1 MPM 리스트에 포함되지 않고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제3 MPM 리스트에 포함되는 것을 특징으로 한다.According to one embodiment of the present disclosure, a decoding device for image decoding is provided. The decoding device includes a memory and at least one processor connected to the memory, and the at least one processor is configured to perform the steps of obtaining prediction-related information through a bitstream, deriving an MPM (most probable mode) list for a current block, deriving an intra-prediction mode of the current block based on the MPM list and the prediction-related information, and generating prediction samples for the current block based on the derived intra-prediction mode, wherein the MPM list includes a first MPM list, a second MPM list, and a third MPM list, and candidates included in the second MPM list are not included in the first MPM list, and candidates included in the second MPM list are included in the third MPM list.

본 개시의 일 실시예에 따르면, 영상 인코딩을 위한 인코딩 장치를 제공한다. 상기 인코딩 장치는 장치는 메모리 및 상기 메모리에 연결된 적어도 하나의 프로세서를 포함하고, 상기 적어도 하나의 프로세서는 현재 블록에 대한 MPM(most probable mode) 리스트를 도출하는 단계, 및 상기 현재 블록의 인트라 예측 모드를 도출하는 단계, 상기 MPM 리스트를 기반으로 상기 현재 블록의 인트라 예측 모드를 지시하기 위한 예측 관련 정보를 생성하는 단계, 및 상기 예측 관련 정보를 포함하는 영상 정보를 인코딩하는 단계를 수행하도록 구성되고, 상기 MPM 리스트는 제1 MPM 리스트, 제2 MPM 리스트 및 제3 MPM 리스트를 포함하고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제1 MPM 리스트에 포함되지 않고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제3 MPM 리스트에 포함되는 것을 특징으로 한다.According to one embodiment of the present disclosure, an encoding device for video encoding is provided. The encoding device includes a memory and at least one processor connected to the memory, and the at least one processor is configured to perform the steps of deriving an MPM (most probable mode) list for a current block, deriving an intra prediction mode of the current block, generating prediction-related information for indicating the intra prediction mode of the current block based on the MPM list, and encoding video information including the prediction-related information, wherein the MPM list includes a first MPM list, a second MPM list, and a third MPM list, and candidates included in the second MPM list are not included in the first MPM list, and candidates included in the second MPM list are included in the third MPM list.

본 개시의 일 실시예에 따르면, 본 개시의 실시예들 중 적어도 하나에 따른 비디오/영상 인코딩 방법에 따라 생성된 비트스트림을 포함하는 비디오/영상 데이터를 전송하는 방법을 제공한다.According to one embodiment of the present disclosure, a method of transmitting video/video data including a bitstream generated by a video/video encoding method according to at least one of the embodiments of the present disclosure is provided.

본 개시의 일 실시예에 따르면, 본 개시의 실시예들 중 적어도 하나에 따른 비디오/영상 인코딩 방법에 따라 생성된 비트스트림을 포함하는 비디오/영상 데이터를 전송하는 장치를 제공한다.According to one embodiment of the present disclosure, a device is provided for transmitting video/video data including a bitstream generated by a video/video encoding method according to at least one of the embodiments of the present disclosure.

본 개시의 일 실시예에 따르면, 본 개시의 실시예들 중 적어도 하나에 따른 방법을 수행하기 위한 프로그램이 저장된 컴퓨터 판독 가능한 저장매체를 제공할 수 있다.According to one embodiment of the present disclosure, a computer-readable storage medium having stored thereon a program for performing a method according to at least one of the embodiments of the present disclosure may be provided.

본 개시의 일 실시예에 따르면, 본 개시의 실시예들 중 적어도 하나에 따른 비디오/영상 인코딩 방법에 따라 생성된 인코딩된 비디오/영상 정보가 저장된 컴퓨터 판독 가능한 디지털 저장 매체를 제공한다. According to one embodiment of the present disclosure, a computer-readable digital storage medium storing encoded video/video information generated by a video/video encoding method according to at least one of the embodiments of the present disclosure is provided.

본 개시의 일 실시예에 따르면, 디코딩 장치에 의하여 본 개시의 실시예들 중 적어도 하나에 따른 비디오/영상 디코딩 방법을 수행하도록 야기하는 인코딩된 정보 또는 인코딩된 비디오/영상 정보가 저장된 컴퓨터 판독 가능한 디지털 저장 매체를 제공한다.According to one embodiment of the present disclosure, a computer-readable digital storage medium is provided having encoded information or encoded video/image information stored thereon, which causes a decoding device to perform a video/image decoding method according to at least one of the embodiments of the present disclosure.

본 개시의 일 실시예에 따르면, 전반적인 비디오/영상 압축 효율을 높일 수 있다.According to one embodiment of the present disclosure, the overall video/image compression efficiency can be improved.

본 개시의 일 실시예에 따르면, 현재 블록에 대한 예측 성능을 높일 수 있다.According to one embodiment of the present disclosure, prediction performance for a current block can be improved.

본 개시의 일 실시예에 따르면, 인트라 예측 모드 시그널링을 위한 효율적인 인트라 예측 모드 후보 리스트를 구성할 수 있다.According to one embodiment of the present disclosure, an efficient intra prediction mode candidate list for intra prediction mode signaling can be constructed.

도 1은 본 개시의 실시예들이 적용될 수 있는 비디오/영상 코딩 시스템의 예를 개략적으로 나타낸다.Figure 1 schematically illustrates an example of a video/image coding system to which embodiments of the present disclosure can be applied.

도 2는 본 개시의 실시예들이 적용될 수 있는 비디오/영상 인코딩 장치의 구성을 개략적으로 설명하는 도면이다. FIG. 2 is a drawing schematically illustrating the configuration of a video/image encoding device to which embodiments of the present disclosure can be applied.

도 3은 본 개시의 실시예들이 적용될 수 있는 비디오/영상 디코딩 장치의 구성을 개략적으로 설명하는 도면이다.FIG. 3 is a drawing schematically illustrating the configuration of a video/image decoding device to which embodiments of the present disclosure can be applied.

도 4는 인트라 예측 절차를 예시적으로 나타낸다.Figure 4 illustrates an intra prediction procedure as an example.

도 5는 인트라 예측 기반 비디오/영상 인코딩 방법의 예들을 나타낸다.Figure 5 shows examples of intra prediction based video/image encoding methods.

도 6은 인트라 예측 기반 비디오/영상 디코딩 방법의 예들을 나타낸다.Figure 6 shows examples of intra prediction based video/image decoding methods.

도 7은 방향성 인트라 예측 모드들의 예를 나타낸다. Figure 7 shows examples of directional intra prediction modes.

도 8은 DIMD에서 템플릿 기반 HoG 계산의 예를 나타낸다.Figure 8 shows an example of template-based HoG computation in DIMD.

도 9는 MPM 리스트 도출을 위한 주변 블록들의 예를 나타낸다.Figure 9 shows examples of peripheral blocks for deriving the MPM list.

도 10은 DIMD 기반 모드들 및 주변 블록들로부터 도출된 인트라 예측 모드들을 예시적으로 나타낸다.Figure 10 exemplarily shows DIMD-based modes and intra prediction modes derived from surrounding blocks.

도 11은 일정 영역 내 이전 블록들의 인트라 예측 모드들을 예시적으로 나타낸다.Figure 11 exemplarily shows intra prediction modes of previous blocks within a certain area.

도 12는 본 개시의 실시예(들)에 따른 비디오/영상 인코딩 방법을 개략적으로 나타낸다. FIG. 12 schematically illustrates a video/image encoding method according to an embodiment(s) of the present disclosure.

도 13은 본 개시의 실시예(들)에 따른 비디오/영상 디코딩 방법을 개략적으로 나타낸다.FIG. 13 schematically illustrates a video/image decoding method according to an embodiment(s) of the present disclosure.

본 개시(disclosure)는 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 개시의 실시예들을 특정 실시예에 한정하려고 하는 것이 아니다. 본 개시에서 상용하는 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 개시의 기술적 사상을 한정하려는 의도로 사용되는 것은 아니다. 본 개시에서 사용되는 단수형식은 문맥이 명확하게 다르게 나타내지 않는 한 복수형식도 포함하도록 의도된다. 본 개시에서 사용되는 용어 "및/또는"은 관련 목록 항목 중 어느 하나 또는 둘 이상의 조합을 포함한다. 본 명세서에서 사용되는 용어 "포함한다", "구성한다" 및 "보유한다"는 명시된 특징, 숫자, 동작, 요소, 구성요소 및/또는 이들의 조합의 존재를 명시하지만, 하나 이상의 다른 특징, 숫자, 동작, 요소, 구성요소 및/또는 이들의 조합의 존재 또는 추가를 배제하지 않는다. 본 개시에서 예시 또는 실시예(예를 들어, 예시 또는 실시예가 무엇을 포함하거나 구현할 수 있는지에 대하여)와 관련하여 "할 수 있다"라는 용어를 사용하는 것은 이러한 특징이 포함되거나 구현되는 적어도 하나의 예시 또는 실시예가 존재함을 의미하지만, 모든 예가 이에 한정되는 것은 아니며 해당 특징 또는 구성이 생략될 수도 있다.This disclosure is susceptible to various modifications and embodiments, and thus specific embodiments are illustrated and described in detail by way of illustration in the drawings. However, this is not intended to limit the embodiments of the disclosure to the specific embodiments. The terminology used herein is only used to describe specific embodiments, and is not intended to be limiting of the technical idea of the disclosure. The singular forms "a" and "an" as used herein are intended to include the plural forms as well, unless the context clearly indicates otherwise. The term "and/or" as used herein includes any one or a combination of two or more of the associated listed items. The terms "comprises," "consists," and "contains" as used herein specify the presence of stated features, numbers, operations, elements, components, and/or combinations thereof, but do not preclude the presence or addition of one or more other features, numbers, operations, elements, components, and/or combinations thereof. The use of the term "can" or "may" in connection with an example or embodiment (e.g., what the example or embodiment can include or implement) in this disclosure means that there is at least one example or embodiment that includes or implements such feature, but not all examples are limited thereto and such feature or configuration may be omitted.

한편, 본 개시에서 설명되는 도면 상의 각 구성들은 서로 다른 특징적인 기능들에 관한 설명의 편의를 위해 독립적으로 도시된 것으로서, 각 구성들이 서로 별개의 하드웨어나 별개의 소프트웨어로 구현된다는 것을 의미하지는 않는다. 예컨대, 각 구성 중 두 개 이상의 구성이 합쳐져 하나의 구성을 이룰 수도 있고, 하나의 구성이 복수의 구성으로 나뉘어질 수도 있다. 각 구성이 통합 및/또는 분리된 실시예도 본 개시의 본질에서 벗어나지 않는 한 본 개시의 권리범위에 포함된다.Meanwhile, each component in the drawings described in the present disclosure is independently depicted for the convenience of explaining different characteristic functions, and does not mean that each component is implemented with separate hardware or separate software. For example, two or more components among each component may be combined to form one component, or one component may be divided into multiple components. Embodiments in which each component is integrated and/or separated are also included in the scope of the present disclosure as long as they do not deviate from the essence of the present disclosure.

본 개시에서 "A 또는 B(A or B)"는 "오직 A", "오직 B" 또는 "A와 B 모두"를 의미할 수 있다. 달리 표현하면, 본 개시에서 "A 또는 B(A or B)"는 "A 및/또는 B(A and/or B)"으로 해석될 수 있다. 예를 들어, 본 개시에서 "A, B 또는 C(A, B or C)"는 "오직 A", "오직 B", "오직 C", 또는 "A, B 및 C의 임의의 모든 조합(any combination of A, B and C)"를 의미할 수 있다.In this disclosure, "A or B" can mean "only A", "only B", or "both A and B". In other words, "A or B" in this disclosure can be interpreted as "A and/or B". For example, "A, B or C" in this disclosure can mean "only A", "only B", "only C", or "any combination of A, B and C".

본 개시에서 사용되는 슬래쉬(/)나 쉼표(comma)는 "및/또는(and/or)"을 의미할 수 있다. 예를 들어, "A/B"는 "A 및/또는 B"를 의미할 수 있다. 이에 따라 "A/B"는 "오직 A", "오직 B", 또는 "A와 B 모두"를 의미할 수 있다. 예를 들어, "A, B, C"는 "A, B 또는 C"를 의미할 수 있다.The slash (/) or comma used in this disclosure can mean "and/or". For example, "A/B" can mean "A and/or B". Accordingly, "A/B" can mean "only A", "only B", or "both A and B". For example, "A, B, C" can mean "A, B, or C".

본 개시에서 "적어도 하나의 A 및 B(at least one of A and B)"는, "오직 A", "오직 B" 또는 "A와 B 모두"를 의미할 수 있다. 또한, 본 개시에서 "적어도 하나의 A 또는 B(at least one of A or B)"나 "적어도 하나의 A 및/또는 B(at least one of A and/or B)"라는 표현은 "적어도 하나의 A 및 B(at least one of A and B)"와 동일하게 해석될 수 있다. In this disclosure, "at least one of A and B" can mean "only A", "only B" or "both A and B". Additionally, in this disclosure, the expressions "at least one of A or B" or "at least one of A and/or B" can be interpreted identically to "at least one of A and B".

또한, 본 개시에서 "적어도 하나의 A, B 및 C(at least one of A, B and C)"는, "오직 A", "오직 B", "오직 C", 또는 "A, B 및 C의 임의의 모든 조합(any combination of A, B and C)"를 의미할 수 있다. 또한, "적어도 하나의 A, B 또는 C(at least one of A, B or C)"나 "적어도 하나의 A, B 및/또는 C(at least one of A, B and/or C)"는 "적어도 하나의 A, B 및 C(at least one of A, B and C)"를 의미할 수 있다. Additionally, in the present disclosure, “at least one of A, B and C” can mean “only A,” “only B,” “only C,” or “any combination of A, B and C.” Additionally, “at least one of A, B or C” or “at least one of A, B and/or C” can mean “at least one of A, B and C.”

또한, 본 개시에서 사용되는 괄호는 "예를 들어(for example)"를 의미할 수 있다. 구체적으로, "예측(인트라 예측)"로 표시된 경우, "예측"의 일례로 "인트라 예측"이 제안된 것일 수 있다. 달리 표현하면 본 개시의 "예측"은 "인트라 예측"으로 제한(limit)되지 않고, "인트라 예측"이 "예측"의 일례로 제안될 것일 수 있다. 또한, "예측(즉, 인트라 예측)"으로 표시된 경우에도, "예측"의 일례로 "인트라 예측"이 제안된 것일 수 있다.In addition, parentheses used in the present disclosure may mean "for example". Specifically, when it is indicated as "prediction (intra prediction)", "intra prediction" may be suggested as an example of "prediction". In other words, "prediction" in the present disclosure is not limited to "intra prediction", and "intra prediction" may be suggested as an example of "prediction". In addition, even when it is indicated as "prediction (i.e., intra prediction)", "intra prediction" may be suggested as an example of "prediction".

본 개시에서 하나의 도면 내에서 개별적으로 설명되는 기술적 특징은, 개별적으로 구현될 수도 있고, 동시에 구현될 수도 있다.Technical features individually described in a single drawing in this disclosure may be implemented individually or simultaneously.

본 개시는 비디오/영상 코딩에 관한 것이다. 예를 들어 본 개시에서 설명된 방법/실시예는 ECM(enhanced compression model) 또는 H.267 표준에 개시되는 방법에 적용될 수 있다. 또한, 이 개시에서 개시된 방법/실시예는 AV2 (AOMedia Video 2) 표준, 또는 차세대 비디오/영상 코딩 표준(ex. H.268, H.269 등)에 개시되는 방법에 적용될 수 있다.The present disclosure relates to video/image coding. For example, the method/embodiment described in the present disclosure can be applied to a method disclosed in the enhanced compression model (ECM) or H.267 standard. In addition, the method/embodiment disclosed in this disclosure can be applied to a method disclosed in the AV2 (AOMedia Video 2) standard, or a next-generation video/image coding standard (e.g. H.268, H.269, etc.).

본 개시에서 코딩은 인코딩 및/또는 디코딩을 포함할 수 있다. 본 개시에서 영상 코딩은 비디오 코딩과 혼용될 수 있다.In the present disclosure, coding may include encoding and/or decoding. In the present disclosure, image coding may be interchangeably used with video coding.

본 개시에서 비디오(video)는 시간의 흐름에 따른 일련의 영상(image)들의 집합을 의미할 수 있다. 픽처(picture)는 일반적으로 특정 시간대의 하나의 영상을 나타내는 단위를 의미하며, 슬라이스(slice)/타일(tile)은 코딩에 있어서 픽처의 일부를 구성하는 단위이다. 슬라이스/타일은 하나 이상의 CTU(coding tree unit)을 포함할 수 있다. 하나의 픽처는 하나 이상의 슬라이스/타일로 구성될 수 있다. 타일은 픽처 내 특정 타일 행 및 특정 타일 열 내부의 CTU들의 사각 영역을 나타낼 수 있다. In the present disclosure, a video may mean a collection of a series of images over time. A picture generally means a unit representing one image of a specific time period, and a slice/tile is a unit that constitutes a part of a picture in coding. A slice/tile may include one or more CTUs (coding tree units). A picture may be composed of one or more slices/tiles. A tile may represent a rectangular area of CTUs within a specific tile row and a specific tile column within a picture.

한편, 하나의 픽처는 둘 이상의 서브픽처로 구분될 수 있다. 서브픽처는 픽처 내 하나 이상의 슬라이스들의 사각 리전일 수 있다(an rectangular region of one or more slices within a picture).Meanwhile, a picture may be divided into two or more subpictures. A subpicture may be a rectangular region of one or more slices within a picture.

픽셀(pixel) 또는 펠(pel)은 하나의 픽처(또는 영상)를 구성하는 최소의 단위를 의미할 수 있다. 또한, 픽셀에 대응하는 용어로서 '샘플(sample)'이 사용될 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 루마(luma) 성분의 픽셀/픽셀값만을 나타낼 수도 있고, 크로마(chroma) 성분의 픽셀/픽셀 값만을 나타낼 수도 있다. A pixel or pel can mean the smallest unit that constitutes a picture (or image). Also, a 'sample' can be used as a term corresponding to a pixel. A sample can generally represent a pixel or a pixel value, and can represent only the pixel/pixel value of the luma component, or only the pixel/pixel value of the chroma component.

유닛(unit)은 영상 처리의 기본 단위를 나타낼 수 있다. 유닛은 픽처의 특정 영역 및 해당 영역에 관련된 정보 중 적어도 하나를 포함할 수 있다. 하나의 유닛은 하나의 루마 블록 및 두개의 크로마(ex. cb, cr) 블록을 포함할 수 있다. 유닛은 경우에 따라서 블록(block) 또는 영역(area) 등의 용어와 혼용하여 사용될 수 있다. 일반적인 경우, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들(또는 샘플 어레이) 또는 변환 계수(transform coefficient)들의 집합(또는 어레이)을 포함할 수 있다.A unit may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. One unit may include one luma block and two chroma (ex. cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as block or area. In general, an MxN block may include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows.

이하, 첨부한 도면들을 참조하여, 본 개시의 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면 상의 동일한 구성 요소에 대해서는 동일한 참조 부호를 사용할 수 있고, 동일한 구성 요소에 대해서 중복된 설명은 생략될 수 있다.Hereinafter, with reference to the attached drawings, embodiments of the present disclosure will be described in more detail. Hereinafter, the same reference numerals may be used for the same components in the drawings, and redundant descriptions of the same components may be omitted.

도 1은 본 개시의 실시예들이 적용될 수 있는 비디오/영상 코딩 시스템의 예를 개략적으로 나타낸다.Figure 1 schematically illustrates an example of a video/image coding system to which embodiments of the present disclosure can be applied.

도 1을 참조하면, 비디오/영상 코딩 시스템은 제1 장치(인코딩 장치) 및 제2 장치(디코딩 장치)를 포함할 수 있다. 제1 장치는 인코딩된 비디오(video)/영상(image) 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 제2 장치로 전달할 수 있다. Referring to FIG. 1, a video/image coding system may include a first device (an encoding device) and a second device (a decoding device). The first device may transmit encoded video/image information or data to the second device through a digital storage medium or a network in the form of a file or streaming.

비디오/영상 코딩 시스템은 비디오/영상 획득 장치 및 비디오/영상 렌더러를 더 포함할 수 있다. 비디오/영상 획득 장치는 인코딩 장치에 포함될 수도 있고, 별개의 디바이스 또는 외부 컴포넌트로 구성될 수도 있다. 비디오/영상 렌더러는 디코딩 장치에 포함될 수도 있고, 별개의 디바이스 또는 외부 컴포넌트로 구성될 수도 있다. The video/image coding system may further include a video/image acquisition device and a video/image renderer. The video/image acquisition device may be included in the encoding device, or may be configured as a separate device or an external component. The video/image renderer may be included in the decoding device, or may be configured as a separate device or an external component.

상기 제1 장치는 전송부를 내부 컴포넌트로 포함할 수 있고, 또는 별개의 디바이스 또는 외부 컴포넌트로 포함할 수도 있다. The first device may include the transmission unit as an internal component, or as a separate device or external component.

상기 제2 장치는 수신부를 내부 컴포넌트로 포함할 수 있고, 또는 별개의 디바이스 또는 외부 컴포넌트로 포함할 수도 있다.The second device may include the receiver as an internal component, or may include it as a separate device or external component.

인코더는 인코딩 장치라고 불릴 수 있고, 상기 디코더는 디코딩 장치라고 불릴 수 있다. 전송부는 인코딩 장치에 포함될 수 있다. 수신부는 디코딩 장치에 포함될 수 있다. 렌더러는 디스플레이부를 포함할 수도 있고, 디스플레이부는 별개의 디바이스 또는 외부 컴포넌트로 구성될 수도 있다. The encoder may be referred to as an encoding device, and the decoder may be referred to as a decoding device. The transmitting unit may be included in the encoding device. The receiving unit may be included in the decoding device. The renderer may include a display unit, and the display unit may be comprised of a separate device or an external component.

본 개시의 실시예(들)이 적용되는 디코딩 장치 및 인코딩 장치는 멀티미디어 방송 송수신 장치, 모바일 통신 단말, 홈 시네마 비디오 장치, 디지털 시네마 비디오 장치, 감시용 카메라, 비디오 대화 장치, 비디오 통신과 같은 실시간 통신 장치, 모바일 스트리밍 장치, 저장 매체, 캠코더, 주문형 비디오(VoD) 서비스 제공 장치, OTT 비디오(Over the top video) 장치, 인터넷 스트리밍 서비스 제공 장치, 3차원(3D) 비디오 장치, VR(virtual reality) 장치, AR(agumented reality) 장치, 화상 전화 비디오 장치, 운송 수단 단말 (ex. 차량(자율주행차량 포함) 단말, 비행기 단말, 선박 단말 등) 및 의료용 비디오 장치 등에 포함될 수 있으며, 비디오 신호 또는 데이터 신호를 처리하기 위해 사용될 수 있다. 예를 들어, OTT 비디오(Over the top video) 장치로는 게임 콘솔, 블루레이 플레이어, 인터넷 접속 TV, 홈시어터 시스템, 스마트폰, 태블릿 PC, DVR(Digital Video Recorder) 등을 포함할 수 있다.The decoding device and the encoding device to which the embodiment(s) of the present disclosure are applied may be included in a multimedia broadcasting transmitting/receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT video (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a VR (virtual reality) device, an AR (agumented reality) device, a video phone video device, a transportation terminal (ex. a vehicle (including an autonomous vehicle) terminal, an airplane terminal, a ship terminal, etc.), a medical video device, and the like, and may be used to process a video signal or a data signal. For example, the OTT video (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), and the like.

비디오/영상 획득 장치는 비디오/영상 소스를 획득할 수 있다. 비디오/영상 획득 장치는 비디오/영상의 캡쳐, 합성 또는 생성 과정 등을 통하여 비디오/영상을 획득할 수 있다. 비디오/영상 획득 장치는 비디오/영상 캡쳐 디바이스 및/또는 비디오/영상 생성 디바이스를 포함할 수 있다. 비디오/영상 캡쳐 디바이스는 예를 들어, 하나 이상의 카메라, 이전에 캡쳐된 비디오/영상을 포함하는 비디오/영상 아카이브 등을 포함할 수 있다. 비디오/영상 생성 디바이스는 예를 들어 캠코더, 컴퓨터, 타블렛 및 스마트폰 등을 포함할 수 있으며 (전자적으로) 비디오/영상을 생성할 수 있다. 예를 들어, 컴퓨터 등을 통하여 가상의 비디오/영상이 생성될 수 있으며, 이 경우 관련 데이터가 생성되는 과정으로 비디오/영상 캡쳐 과정이 갈음될 수 있다. 비디오/영상 소스는 최적화된 비디오/영상을 인코더로 입력하기 위하여 비디오/영상 전처리 과정을 수행할 수도 있다.A video/image capture device can capture a video/image source. The video/image capture device can capture the video/image through a process of capturing, synthesizing, or generating the video/image. The video/image capture device can include a video/image capture device and/or a video/image generation device. The video/image capture device can include, for example, one or more cameras, a video/image archive containing previously captured video/image, etc. The video/image generation device can include, for example, a camcorder, a computer, a tablet, a smart phone, etc., and can (electronically) generate the video/image. For example, a virtual video/image can be generated through a computer, etc., in which case the video/image capture process can be replaced with a process of generating related data. The video/image source can also perform a video/image preprocessing process in order to input an optimized video/image to an encoder.

인코딩 장치는 입력 비디오/영상을 인코딩할 수 있다. 인코딩 장치는 압축 및 코딩 효율을 위하여 예측, 변환, 양자화 등 일련의 절차를 수행할 수 있다. 인코딩된 데이터(인코딩된 비디오/영상 정보)는 비트스트림(bitstream) 형태로 출력될 수 있다.The encoding device can encode input video/image. The encoding device can perform a series of procedures such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video/image information) can be output in the form of a bitstream.

전송부는 비트스트림 형태로 출력된 인코딩된 비디오/영상 정보 또는 데이터를 파일 또는 스트리밍 형태로 네트워크를 통하여 수신 디바이스의 수신부로 전달할 수 있다. 비트스트림 형태로 출력된 인코딩된 비디오/영상 정보 또는 데이터는 스트리밍 서버를 통하여 수신부로 전달될 수도 있다. 디지털 저장 매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장 매체를 포함할 수 있다. 전송부는 미리 정해진 파일 포멧을 통하여 미디어 파일을 생성하기 위한 엘리먼트를 포함할 수 있고, 방송/통신 네트워크를 통한 전송을 위한 엘리먼트를 포함할 수 있다. 수신부는 상기 비트스트림을 수신/추출하여 디코딩 장치로 전달할 수 있다.The transmission unit can transmit encoded video/image information or data output in the form of a bitstream to the reception unit of the receiving device through the network in the form of a file or streaming. The encoded video/image information or data output in the form of a bitstream can also be transmitted to the reception unit through a streaming server. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit can include an element for generating a media file through a predetermined file format and can include an element for transmission through a broadcasting/communication network. The reception unit can receive/extract the bitstream and transmit it to a decoding device.

상기 스트리밍 서버는 상기 비트스트림을 전송 또는 수신하는 과정에서 일시적으로 상기 비트스트림을 저장할 수 있다. 상기 스트리밍 서버는 웹 서버를 통한 사용자 요청에 기초하여 멀티미디어 데이터를 사용자 장치에 전송하고, 상기 웹 서버는 사용자에게 어떠한 서비스가 있는지를 알려주는 매개체 역할을 한다. 사용자가 상기 웹 서버에 원하는 서비스를 요청하면, 상기 웹 서버는 이를 스트리밍 서버에 전달하고, 상기 스트리밍 서버는 사용자에게 멀티미디어 데이터를 전송한다. 이때, 상기 컨텐츠 스트리밍 시스템은 별도의 제어 서버를 포함할 수 있고, 이 경우 상기 제어 서버는 상기 컨텐츠 스트리밍 시스템 내 각 장치 간 명령/응답을 제어하는 역할을 한다.The streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream. The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as a medium that informs the user of any available services. When a user requests a desired service from the web server, the web server transmits it to the streaming server, and the streaming server transmits multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server serves to control commands/responses between each device within the content streaming system.

상기 스트리밍 서버는 미디어 저장소 및/또는 인코딩 장치로부터 컨텐츠를 수신할 수 있다. 예를 들어, 상기 인코딩 장치로부터 컨텐츠를 수신하게 되는 경우, 상기 컨텐츠를 실시간으로 수신할 수 있다. 이 경우, 원활한 스트리밍 서비스를 제공하기 위하여 상기 스트리밍 서버는 상기 비트스트림을 일정 시간동안 저장할 수 있다.The above streaming server can receive content from a media storage and/or an encoding device. For example, when receiving content from the encoding device, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.

디코딩 장치는 인코딩 장치의 동작에 대응하는 역양자화, 역변환, 예측 등 일련의 절차를 수행하여 비디오/영상을 디코딩할 수 있다. The decoding device can decode the video/image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding device.

렌더러는 디코딩된 비디오/영상을 렌더링할 수 있다. 렌더링된 비디오/영상은 디스플레이부를 통하여 디스플레이될 수 있다.The renderer can render the decoded video/image. The rendered video/image can be displayed through the display unit.

도 2는 본 개시의 실시예들이 적용될 수 있는 비디오/영상 인코딩 장치의 구성을 개략적으로 설명하는 도면이다. 이하 인코딩 장치라 함은 영상 인코딩 장치 및/또는 비디오 인코딩 장치를 포함할 수 있다. FIG. 2 is a drawing schematically illustrating the configuration of a video/image encoding device to which embodiments of the present disclosure may be applied. The encoding device hereinafter may include an image encoding device and/or a video encoding device.

도 2를 참조하면, 인코딩 장치(200)는 영상 분할부(image partitioner, 210), 예측부(predictor, 220), 레지듀얼 처리부(residual processor, 230), 엔트로피 인코딩부(entropy encoder, 240), 가산부(adder, 250), 필터링부(filter, 260) 및 메모리(memory, 270)를 포함하여 구성될 수 있다. 예측부(220)는 인터 예측부 및 인트라 예측부를 포함할 수 있다. 레지듀얼 처리부(230)는 변환부(transformer, 232), 양자화부(quantizer 233), 역양자화부(dequantizer 234), 역변환부(inverse transformer, 235)를 포함할 수 있다. 레지듀얼 처리부(230)은 감산부(subtractor, 231)를 더 포함할 수 있다. 가산부(250)는 복원부(reconstructor) 또는 복원 블록 생성부(recontructged block generator)로 불릴 수 있다. 상술한 영상 분할부(210), 예측부(220), 레지듀얼 처리부(230), 엔트로피 인코딩부(240), 가산부(250) 및 필터링부(260)는 실시예에 따라 하나 이상의 하드웨어 컴포넌트(예를 들어 인코더 칩셋 또는 프로세서)에 의하여 구성될 수 있다. 또한 메모리(270)는 DPB(decoded picture buffer)를 포함할 수 있고, 디지털 저장 매체에 의하여 구성될 수도 있다. 상기 하드웨어 컴포넌트는 메모리(270)를 내/외부 컴포넌트로 더 포함할 수도 있다.Referring to FIG. 2, the encoding device (200) may be configured to include an image partitioner (210), a prediction unit (predictor) 220, a residual processor (residual processor) 230, an entropy encoder (entropy encoder) 240, an adder (adder) 250, a filter (filter) 260, and a memory (memory) 270. The prediction unit (220) may include an inter prediction unit and an intra prediction unit. The residual processor (230) may include a transformer (transformer) 232, a quantizer (quantizer) 233, a dequantizer (dequantizer) 234, and an inverse transformer (inverse transformer) 235. The residual processor (230) may further include a subtractor (subtractor) 231. The addition unit (250) may be called a reconstructor or a reconstructed block generator. The image segmentation unit (210), the prediction unit (220), the residual processing unit (230), the entropy encoding unit (240), the addition unit (250), and the filtering unit (260) described above may be configured by one or more hardware components (e.g., an encoder chipset or a processor) according to an embodiment. In addition, the memory (270) may include a DPB (decoded picture buffer) and may be configured by a digital storage medium. The hardware component may further include the memory (270) as an internal/external component.

영상 분할부(210)는 인코딩 장치(200)에 입력된 입력 영상(또는, 픽쳐, 프레임)를 하나 이상의 처리 유닛(processing unit)으로 분할할 수 있다. 일 예로, 상기 처리 유닛은 코딩 유닛(coding unit, CU)이라고 불릴 수 있다. 이 경우 코딩 유닛은 코딩 트리 유닛(coding tree unit, CTU) 또는 최대 코딩 유닛(largest coding unit, LCU)으로부터 QTBTTT (Quad-tree binary-tree ternary-tree) 구조에 따라 재귀적으로(recursively) 분할될 수 있다. 예를 들어, 하나의 코딩 유닛은 쿼드 트리 구조, 바이너리 트리 구조, 및/또는 터너리 구조를 기반으로 하위(deeper) 뎁스의 복수의 코딩 유닛들로 분할될 수 있다. 이 경우 예를 들어 쿼드 트리 구조가 먼저 적용되고 바이너리 트리 구조 및/또는 터너리 구조가 나중에 적용될 수 있다. 또는 바이너리 트리 구조가 먼저 적용될 수도 있다. 더 이상 분할되지 않는 최종 코딩 유닛을 기반으로 본 개시에 따른 코딩 절차가 수행될 수 있다. 이 경우 영상 특성에 따른 코딩 효율 등을 기반으로, 최대 코딩 유닛이 바로 최종 코딩 유닛으로 사용될 수 있고, 또는 필요에 따라 코딩 유닛은 재귀적으로(recursively) 보다 하위 뎁스의 코딩 유닛들로 분할되어 최적의 사이즈의 코딩 유닛이 최종 코딩 유닛으로 사용될 수 있다. 여기서 코딩 절차라 함은 후술하는 예측, 변환, 및 복원 등의 절차를 포함할 수 있다. 다른 예로, 상기 처리 유닛은 예측 유닛(PU: Prediction Unit) 또는 변환 유닛(TU: Transform Unit)을 더 포함할 수 있다. 이 경우 상기 예측 유닛 및 상기 변환 유닛은 각각 상술한 최종 코딩 유닛으로부터 분할 또는 파티셔닝될 수 있다. 상기 예측 유닛은 샘플 예측을 위한 단위일 수 있고, 상기 변환 유닛은 변환 계수를 유도하는 단위 및/또는 변환 계수로부터 레지듀얼 신호(residual signal)를 유도하는 단위일 수 있다. The image segmentation unit (210) can segment an input image (or, picture, frame) input to the encoding device (200) into one or more processing units. For example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively segmented from a coding tree unit (CTU) or a largest coding unit (LCU) according to a QTBTTT (Quad-tree binary-tree ternary-tree) structure. For example, one coding unit may be segmented into a plurality of coding units of deeper depth based on a quad-tree structure, a binary tree structure, and/or a ternary structure. In this case, for example, the quad-tree structure may be applied first and the binary tree structure and/or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present disclosure may be performed based on a final coding unit that is no longer segmented. In this case, based on coding efficiency according to image characteristics, etc., the maximum coding unit can be used as the final coding unit, or, if necessary, the coding unit can be recursively divided into coding units of lower depths, and the coding unit of the optimal size can be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration described below. As another example, the processing unit may further include a prediction unit (PU) or a transformation unit (TU). In this case, the prediction unit and the transformation unit may be divided or partitioned from the final coding unit described above, respectively. The prediction unit may be a unit for sample prediction, and the transformation unit may be a unit for deriving a transform coefficient and/or a unit for deriving a residual signal from a transform coefficient.

유닛은 경우에 따라서 블록(block) 또는 영역(area) 등의 용어와 혼용하여 사용될 수 있다. 일반적인 경우, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들 또는 변환 계수(transform coefficient)들의 집합을 나타낼 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 휘도(luma) 성분의 픽셀/픽셀값만을 나타낼 수도 있고, 채도(chroma) 성분의 픽셀/픽셀 값만을 나타낼 수도 있다. 샘플은 하나의 픽처(또는 영상)을 픽셀(pixel) 또는 펠(pel)에 대응하는 용어로서 사용될 수 있다.The term unit may be used interchangeably with terms such as block or area, depending on the case. In general, an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and may represent only a pixel/pixel value of a luma component, or only a pixel/pixel value of a chroma component. A sample can be used as a term corresponding to a pixel or pel in a picture (or image).

인코딩 장치(200)는 입력 영상 신호(원본 블록, 원본 샘플 어레이)에서 예측부로부터 출력된 예측 신호(예측된 블록, 예측 샘플 어레이)를 감산하여 레지듀얼 신호(residual signal, 잔여 블록, 잔여 샘플 어레이)를 생성할 수 있고, 생성된 레지듀얼 신호는 변환부(232)로 전송된다. 이 경우 도시된 바와 같이 인코더(200) 내에서 입력 영상 신호(원본 블록, 원본 샘플 어레이)에서 예측 신호(예측 블록, 예측 샘플 어레이)를 감산하는 유닛은 감산부(231)라고 불릴 수 있다. 예측부는 처리 대상 블록(이하, 현재 블록이라 함)에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부는 현재 블록 또는 CU 단위로 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있다. 예측부는 각 예측모드에 대한 설명에서 후술하는 바와 같이 예측 모드 정보 등 예측에 관한 다양한 정보를 생성하여 엔트로피 인코딩부(240)로 전달할 수 있다. 예측에 관한 정보는 엔트로피 인코딩부(240)에서 인코딩되어 비트스트림 형태로 출력될 수 있다. The encoding device (200) can generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction sample array) output from a prediction unit from an input image signal (original block, original sample array), and the generated residual signal is transmitted to a conversion unit (232). In this case, as illustrated, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input image signal (original block, original sample array) within the encoder (200) may be called a subtraction unit (231). The prediction unit can perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied per current block or CU unit. The prediction unit can generate various information about prediction, such as prediction mode information, as described later in the description of each prediction mode, and transmit it to the entropy encoding unit (240). The information about prediction can be encoded in the entropy encoding unit (240) and output in the form of a bitstream.

인트라 예측부는 현재 픽처 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 상기 참조되는 샘플들은 예측 모드에 따라 상기 현재 블록의 주변(neighbor)에 위치할 수 있고, 또는 떨어져서 위치할 수도 있다. 인트라 예측에서 예측 모드들은 복수의 비방향성 모드와 복수의 방향성 모드를 포함할 수 있다. 비방향성 모드는 예를 들어 DC 모드 및 플래너 모드(Planar 모드)를 포함할 수 있다. 방향성 모드는 예측 방향의 세밀한 정도에 따라 예를 들어 33개의 방향성 예측 모드 또는 65개의 방향성 예측 모드를 포함할 수 있다. 다만, 이는 예시로서 설정에 따라 그 이상 또는 그 이하의 개수의 방향성 예측 모드들이 사용될 수 있다. 인트라 예측부는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.The intra prediction unit can predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from it depending on the prediction mode. In the intra prediction, the prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, a DC mode and a planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the degree of detail of the prediction direction. However, this is only an example, and a number of directional prediction modes more or less than that may be used depending on the setting. The intra prediction unit may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

인터 예측부는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측된 블록을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 줄이기 위해 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기초하여 움직임 정보를 블록, 서브블록 또는 샘플 단위로 예측할 수 있다. 상기 움직임 정보는 움직임 벡터 및 참조 픽처 인덱스를 포함할 수 있다. 상기 움직임 정보는 인터 예측 방향(L0 예측, L1 예측, Bi 예측 등) 정보를 더 포함할 수 있다. 인터 예측의 경우에, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 상기 참조 블록을 포함하는 참조 픽처와 상기 시간적 주변 블록을 포함하는 참조 픽처는 동일할 수도 있고, 다를 수도 있다. 상기 시간적 주변 블록은 동일 위치 참조 블록(collocated reference block), 동일 위치 CU(colCU) 등의 이름으로 불릴 수 있으며, 상기 시간적 주변 블록을 포함하는 참조 픽처는 동일 위치 픽처(collocated picture, colPic)라고 불릴 수도 있다. 예를 들어, 인터 예측부는 주변 블록들을 기반으로 움직임 정보 후보 리스트를 구성하고, 상기 현재 블록의 움직임 벡터 및/또는 참조 픽처 인덱스를 도출하기 위하여 어떤 후보가 사용되는지를 지시하는 정보를 생성할 수 있다. 다양한 예측 모드를 기반으로 인터 예측이 수행될 수 있으며, 예를 들어 스킵 모드와 머지 모드의 경우에, 인터 예측부는 주변 블록의 움직임 정보를 현재 블록의 움직임 정보로 이용할 수 있다. 스킵 모드의 경우, 머지 모드와 달리 레지듀얼 신호가 전송되지 않을 수 있다. 움직임 정보 예측(motion vector prediction, MVP) 모드의 경우, 주변 블록의 움직임 벡터를 움직임 벡터 예측자(motion vector predictor)로 이용하고, 움직임 벡터 차분(motion vector difference)을 시그널링함으로써 현재 블록의 움직임 벡터를 지시할 수 있다.An inter prediction unit can derive a predicted block for a current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in an inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include information on an inter prediction direction (such as L0 prediction, L1 prediction, or Bi prediction). In the case of inter prediction, neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. A reference picture including the reference block and a reference picture including the temporal neighboring blocks may be the same or different. The above temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and a reference picture including the temporal neighboring blocks may be called a collocated picture (colPic). For example, the inter prediction unit may configure a motion information candidate list based on the neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and/or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of the skip mode and the merge mode, the inter prediction unit may use the motion information of the neighboring blocks as the motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted. In the case of the motion vector prediction (MVP) mode, the motion vector of the neighboring blocks may be used as a motion vector predictor, and the motion vector of the current block may be indicated by signaling a motion vector difference.

예측부(220)는 후술하는 다양한 예측 방법을 기반으로 예측 신호를 생성할 수 있다. 예를 들어, 예측부는 하나의 블록에 대한 예측을 위하여 인트라 예측 또는 인터 예측을 적용할 수 있을 뿐 아니라, 인트라 예측과 인터 예측을 동시에 적용할 수 있다. 이는 combined inter and intra prediction (CIIP)라고 불릴 수 있다. 또한, 예측부는 블록에 대한 예측을 위하여 인트라 블록 카피(intra block copy, IBC) 예측 모드에 기반할 수도 있고 또는 팔레트 모드(palette mode)에 기반할 수도 있다. 상기 IBC 예측 모드 또는 팔레트 모드는 예를 들어 SCC(screen content coding)을 위하여 사용될 수 있다. IBC는 기본적으로 현재 픽처 내에서 예측을 수행하나 현재 픽처 내에서 블록 벡터를 기반으로 참조 블록을 도출하는 점에서 인터 예측과 유사하게 수행될 수 있다. 즉, IBC는 본 개시에서 설명되는 인터 예측 기법들 중 적어도 하나를 이용할 수 있다 The prediction unit (220) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit can apply intra prediction or inter prediction for prediction of one block, and can also apply intra prediction and inter prediction at the same time. This can be called combined inter and intra prediction (CIIP). In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for SCC (screen content coding), for example. IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block based on a block vector within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in the present disclosure.

예측부(220)를 통해 생성된 예측 신호는 복원 신호를 생성하기 위해 이용되거나 레지듀얼 신호를 생성하기 위해 이용될 수 있다. 변환부(232)는 레지듀얼 신호에 변환 기법을 적용하여 변환 계수들(transform coefficients)를 생성할 수 있다. 예를 들어, 변환 기법은 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT(Karhunen-Loe`ve Transform), GBT(Graph-Based Transform), 또는 CNT(Conditionally Non-linear Transform) 중 적어도 하나를 포함할 수 있다. The prediction signal generated through the prediction unit (220) can be used to generate a restoration signal or to generate a residual signal. The transform unit (232) can apply a transform technique to the residual signal to generate transform coefficients. For example, the transform technique can include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loe've Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-linear Transform (CNT).

양자화부(233)는 변환 계수들을 양자화하여 엔트로피 인코딩부(240)로 전송되고, 엔트로피 인코딩부(240)는 양자화된 신호(양자화된 변환 계수들에 관한 정보)를 인코딩하여 비트스트림으로 출력할 수 있다. 상기 양자화된 변환 계수들에 관한 정보는 레지듀얼 정보라고 불릴 수 있다. 양자화부(233)는 계수 스캔 순서(scan order)를 기반으로 블록 형태의 양자화된 변환 계수들을 1차원 벡터 형태로 재정렬할 수 있고, 상기 1차원 벡터 형태의 양자화된 변환 계수들을 기반으로 상기 양자화된 변환 계수들에 관한 정보를 생성할 수도 있다. 엔트로피 인코딩부(240)는 예를 들어 지수 골롬(exponential Golomb), CAVLC(context-adaptive variable length coding), CABAC(context-adaptive binary arithmetic coding) 등과 같은 다양한 인코딩 방법을 수행할 수 있다. 엔트로피 인코딩부(240)는 양자화된 변환 계수들 외 비디오/이미지 복원에 필요한 정보들(예컨대 신택스 요소들(syntax elements)의 값 등)을 함께 또는 별도로 인코딩할 수도 있다. 인코딩된 정보(ex. 인코딩된 비디오/영상 정보)는 비트스트림 형태로 NAL(network abstraction layer) 유닛 단위로 전송 또는 저장될 수 있다. 상기 비디오/영상 정보는 어댑테이션 파라미터 세트(APS), 픽처 파라미터 세트(PPS), 시퀀스 파라미터 세트(SPS) 또는 비디오 파라미터 세트(VPS) 등 다양한 파라미터 세트에 관한 정보를 더 포함할 수 있다. 또한 상기 비디오/영상 정보는 일반 제한 정보(general constraint information)을 더 포함할 수 있다. 본 개시에서 인코딩 장치에서 디코딩 장치로 전달/시그널링되는 정보 및/또는 신택스 요소들은 비디오/영상 정보에 포함될 수 있다. 상기 비디오/영상 정보는 상술한 인코딩 절차를 통하여 인코딩되어 상기 비트스트림에 포함될 수 있다. 상기 비트스트림은 네트워크를 통하여 전송될 수 있고, 또는 디지털 저장매체에 저장될 수 있다. 여기서 네트워크는 방송망 및/또는 통신망 등을 포함할 수 있고, 디지털 저장매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장매체를 포함할 수 있다. 엔트로피 인코딩부(240)로부터 출력된 신호는 전송하는 전송부(미도시) 및/또는 저장하는 저장부(미도시)가 인코딩 장치(200)의 내/외부 엘리먼트로서 구성될 수 있고, 또는 전송부는 엔트로피 인코딩부(240)에 포함될 수도 있다.The quantization unit (233) quantizes the transform coefficients and transmits them to the entropy encoding unit (240), and the entropy encoding unit (240) can encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream. The information about the quantized transform coefficients can be called residual information. The quantization unit (233) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and can also generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit (240) can perform various encoding methods, such as, for example, exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoding unit (240) may encode, together or separately, information necessary for video/image restoration (e.g., values of syntax elements, etc.) in addition to quantized transform coefficients. The encoded information (e.g., encoded video/image information) may be transmitted or stored in the form of a bitstream in the form of a network abstraction layer (NAL) unit. The video/image information may further include information about various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video/image information may further include general constraint information. In the present disclosure, information and/or syntax elements transmitted/signaled from an encoding device to a decoding device may be included in the video/image information. The video/image information may be encoded through the above-described encoding procedure and included in the bitstream. The bitstream may be transmitted through a network or stored in a digital storage medium. Here, the network may include a broadcasting network and/or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The signal output from the entropy encoding unit (240) may be configured as an internal/external element of the encoding device (200) by a transmitting unit (not shown) and/or a storing unit (not shown), or the transmitting unit may be included in the entropy encoding unit (240).

양자화부(233)로부터 출력된 양자화된 변환 계수들은 예측 신호를 생성하기 위해 이용될 수 있다. 예를 들어, 양자화된 변환 계수들에 역양자화부(234) 및 역변환부(235)를 통해 역양자화 및 역변환을 적용함으로써 레지듀얼 신호(레지듀얼 블록 혹은 레지듀얼 샘플들)를 복원할 수 있다. 가산부(250)는 복원된 레지듀얼 신호를 예측부로부터 출력된 예측 신호에 더함으로써 복원(reconstructed) 신호(복원 픽처, 복원 블록, 복원 샘플 어레이)가 생성될 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼이 없는 경우, 예측된 블록이 복원 블록으로 사용될 수 있다. 가산부(250)는 복원부 또는 복원 블록 생성부라고 불릴 수 있다. 생성된 복원 신호는 현재 픽처 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 다음 픽처의 인터 예측을 위하여 사용될 수도 있다. The quantized transform coefficients output from the quantization unit (233) can be used to generate a prediction signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (234) and the inverse transform unit (235), a residual signal (residual block or residual samples) can be reconstructed. The addition unit (250) can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the prediction unit. When there is no residual for the target block to be processed, such as when the skip mode is applied, the predicted block can be used as the reconstructed block. The addition unit (250) can be called a reconstructed unit or a reconstructed block generation unit. The generated reconstructed signal can be used for intra prediction of the next target block in the current picture, and can also be used for inter prediction of the next picture after filtering as described below.

한편 픽처 인코딩 및/또는 복원 과정에서 LMCS (luma mapping with chroma scaling)가 적용될 수도 있다.Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture encoding and/or restoration process.

필터링부(260)는 복원 신호에 필터링을 적용하여 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어 필터링부(260)은 복원 픽처에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽처를 생성할 수 있고, 상기 수정된 복원 픽처를 메모리(270), 구체적으로 메모리(270)의 DPB에 저장할 수 있다. 상기 다양한 필터링 방법은 예를 들어, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset), 적응적 루프 필터(adaptive loop filter), 양방향 필터(bilateral filter) 등을 포함할 수 있다. 필터링부(260)은 필터링에 관한 정보를 생성하여 엔트로피 인코딩부(240)로 전달할 수 있다. 필터링에 관한 정보는 엔트로피 인코딩부(240)에서 인코딩되어 비트스트림 형태로 출력될 수 있다. The filtering unit (260) can apply filtering to the restoration signal to improve subjective/objective picture quality. For example, the filtering unit (260) can apply various filtering methods to the restoration picture to generate a modified restoration picture and store the modified restoration picture in the memory (270), specifically, in the DPB of the memory (270). The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (260) can generate information about the filtering and transmit it to the entropy encoding unit (240). The information about the filtering can be encoded by the entropy encoding unit (240) and output in the form of a bitstream.

메모리(270)에 전송된 수정된 복원 픽처는 인터 예측부에서 참조 픽처로 사용될 수 있다. 인코딩 장치는 이를 통하여 인터 예측이 적용되는 경우, 인코딩 장치(200)와 디코딩 장치에서의 예측 미스매치를 피할 수 있고, 부호화 효율도 향상시킬 수 있다. The modified restored picture transmitted to the memory (270) can be used as a reference picture in the inter prediction unit. Through this, the encoding device can avoid prediction mismatch between the encoding device (200) and the decoding device when inter prediction is applied, and can also improve encoding efficiency.

메모리(270) DPB는 수정된 복원 픽처를 인터 예측부에서의 참조 픽처로 사용하기 위해 저장할 수 있다. 메모리(270)는 현재 픽처 내 움직임 정보가 도출된(또는 인코딩된) 블록의 움직임 정보 및/또는 이미 복원된 픽처 내 블록들의 움직임 정보를 저장할 수 있다. 상기 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 활용하기 위하여 인터 예측부에 전달할 수 있다. 메모리(270)는 현재 픽처 내 복원된 블록들의 복원 샘플들을 저장할 수 있고, 인트라 예측부에 전달할 수 있다. The memory (270) DPB can store the modified restored picture to be used as a reference picture in the inter prediction unit. The memory (270) can store motion information of a block from which motion information in the current picture is derived (or encoded) and/or motion information of blocks in a picture that has already been restored. The stored motion information can be transferred to the inter prediction unit to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (270) can store restored samples of restored blocks in the current picture and transfer them to the intra prediction unit.

도 3은 본 개시의 실시예들이 적용될 수 있는 비디오/영상 디코딩 장치의 구성을 개략적으로 설명하는 도면이다. 이하 디코딩 장치라 함은 영상 디코딩 장치 및/또는 비디오 디코딩 장치를 포함할 수 있다.FIG. 3 is a drawing schematically illustrating the configuration of a video/image decoding device to which embodiments of the present disclosure may be applied. The decoding device hereinafter may include an image decoding device and/or a video decoding device.

도 3을 참조하면, 디코딩 장치(300)는 엔트로피 디코딩부(entropy decoder, 310), 레지듀얼 처리부(residual processor, 320), 예측부(predictor, 330), 가산부(adder, 340), 필터링부(filter, 350) 및 메모리(memoery, 360)를 포함하여 구성될 수 있다. 예측부(330)는 인터 예측부 및 인트라 예측부를 포함할 수 있다. 레지듀얼 처리부(320)는 역양자화부(dequantizer, 321) 및 역변환부(inverse transformer, 321)를 포함할 수 있다. 상술한 엔트로피 디코딩부(310), 레지듀얼 처리부(320), 예측부(330), 가산부(340) 및 필터링부(350)는 실시예에 따라 하나의 하드웨어 컴포넌트(예를 들어 디코더 칩셋 또는 프로세서)에 의하여 구성될 수 있다. 또한 메모리(360)는 DPB(decoded picture buffer)를 포함할 수 있고, 디지털 저장 매체에 의하여 구성될 수도 있다. 상기 하드웨어 컴포넌트는 메모리(360)을 내/외부 컴포넌트로 더 포함할 수도 있다.Referring to FIG. 3, the decoding device (300) may be configured to include an entropy decoder (310), a residual processor (320), a predictor (330), an adder (340), a filter (350), and a memory (360). The predictor (330) may include an inter prediction unit and an intra prediction unit. The residual processor (320) may include a dequantizer (321) and an inverse transformer (321). The entropy decoding unit (310), residual processing unit (320), prediction unit (330), adding unit (340), and filtering unit (350) described above may be configured by one hardware component (e.g., decoder chipset or processor) according to an embodiment. In addition, the memory (360) may include a DPB (decoded picture buffer) and may be configured by a digital storage medium. The hardware component may further include the memory (360) as an internal/external component.

비디오/영상 정보를 포함하는 비트스트림이 입력되면, 디코딩 장치(300)는 도 2의 인코딩 장치에서 비디오/영상 정보가 처리된 프로세스에 대응하여 영상을 복원할 수 있다. 예를 들어, 디코딩 장치(300)는 상기 비트스트림으로부터 획득한 블록 분할 관련 정보를 기반으로 유닛들/블록들을 도출할 수 있다. 디코딩 장치(300)는 인코딩 장치에서 적용된 처리 유닛을 이용하여 디코딩을 수행할 수 있다. 따라서 디코딩의 처리 유닛은 예를 들어 코딩 유닛일 수 있고, 코딩 유닛은 코딩 트리 유닛 또는 최대 코딩 유닛으로부터 쿼드 트리 구조, 바이너리 트리 구조 및/또는 터너리 트리 구조를 따라서 분할될 수 있다. 코딩 유닛으로부터 하나 이상의 변환 유닛이 도출될 수 있다. 그리고, 디코딩 장치(300)를 통해 디코딩 및 출력된 복원 영상 신호는 재생 장치를 통해 재생될 수 있다.When a bitstream including video/image information is input, the decoding device (300) can restore the image corresponding to the process in which the video/image information is processed in the encoding device of FIG. 2. For example, the decoding device (300) can derive units/blocks based on block division related information obtained from the bitstream. The decoding device (300) can perform decoding using a processing unit applied in the encoding device. Therefore, the processing unit of decoding can be, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and/or a ternary tree structure. One or more transform units can be derived from the coding unit. Then, the restored image signal decoded and output by the decoding device (300) can be reproduced through a reproduction device.

디코딩 장치(300)는 인코딩 장치로부터 출력된 신호를 비트스트림 형태로 수신할 수 있고, 수신된 신호는 엔트로피 디코딩부(310)를 통해 디코딩될 수 있다. 예를 들어, 엔트로피 디코딩부(310)는 상기 비트스트림을 파싱하여 영상 복원(또는 픽처 복원)에 필요한 정보(ex. 비디오/영상 정보)를 도출할 수 있다. 상기 비디오/영상 정보는 어댑테이션 파라미터 세트(APS), 픽처 파라미터 세트(PPS), 시퀀스 파라미터 세트(SPS) 또는 비디오 파라미터 세트(VPS) 등 다양한 파라미터 세트에 관한 정보를 더 포함할 수 있다. 또한 상기 비디오/영상 정보는 일반 제한 정보(general constraint information)을 더 포함할 수 있다. 디코딩 장치는 상기 파라미터 세트에 관한 정보 및/또는 상기 일반 제한 정보를 더 기반으로 픽처를 디코딩할 수 있다. 본 개시에서 후술되는 시그널링/수신되는 정보 및/또는 신택스 요소들은 상기 디코딩 절차를 통하여 디코딩되어 상기 비트스트림으로부터 획득될 수 있다. 예컨대, 엔트로피 디코딩부(310)는 지수 골롬 부호화, CAVLC 또는 CABAC 등의 코딩 방법을 기초로 비트스트림 내 정보를 디코딩하고, 영상 복원에 필요한 신택스 엘리먼트의 값, 레지듀얼에 관한 변환 계수의 양자화된 값 들을 출력할 수 있다. 보다 상세하게, CABAC 엔트로피 디코딩 방법은, 비트스트림에서 각 구문 요소에 해당하는 빈을 수신하고, 디코딩 대상 구문 요소 정보와 주변 및 디코딩 대상 블록의 디코딩 정보 혹은 이전 단계에서 디코딩된 심볼/빈의 정보를 이용하여 문맥(context) 모델을 결정하고, 결정된 문맥 모델에 따라 빈(bin)의 발생 확률을 예측하여 빈의 산술 디코딩(arithmetic decoding)를 수행하여 각 구문 요소의 값에 해당하는 심볼을 생성할 수 있다. 이때, CABAC 엔트로피 디코딩 방법은 문맥 모델 결정 후 다음 심볼/빈의 문맥 모델을 위해 디코딩된 심볼/빈의 정보를 이용하여 문맥 모델을 업데이트할 수 있다. 엔트로피 디코딩부(310)에서 디코딩된 정보 중 예측에 관한 정보는 예측부(330)로 제공되고, 엔트로피 디코딩부(310)에서 엔트로피 디코딩이 수행된 레지듀얼 값, 즉 양자화된 변환 계수들 및 관련 파라미터 정보는 레지듀얼 처리부(320)로 입력될 수 있다. 레지듀얼 처리부(320)는 레지듀얼 신호(레지듀얼 블록, 레지듀얼 샘플들, 레지듀얼 샘플 어레이)를 도출할 수 있다. 또한, 엔트로피 디코딩부(310)에서 디코딩된 정보 중 필터링에 관한 정보는 필터링부(350)으로 제공될 수 있다. 한편, 인코딩 장치로부터 출력된 신호를 수신하는 수신부(미도시)가 디코딩 장치(300)의 내/외부 엘리먼트로서 더 구성될 수 있고, 또는 수신부는 엔트로피 디코딩부(310)의 구성요소일 수도 있다. 한편, 본 개시에 따른 디코딩 장치는 비디오/영상/픽처 디코딩 장치라고 불릴 수 있고, 상기 디코딩 장치는 정보 디코더(비디오/영상/픽처 정보 디코더) 및 샘플 디코더(비디오/영상/픽처 샘플 디코더)로 구분할 수도 있다. 상기 정보 디코더는 상기 엔트로피 디코딩부(310)를 포함할 수 있고, 상기 샘플 디코더는 상기 역양자화부(321), 역변환부(322), 가산부(340), 필터링부(350), 메모리(360) 및 예측부(330) 중 적어도 하나를 포함할 수 있다.The decoding device (300) can receive a signal output from the encoding device in the form of a bitstream, and the received signal can be decoded through the entropy decoding unit (310). For example, the entropy decoding unit (310) can parse the bitstream to derive information (e.g., video/image information) necessary for image restoration (or picture restoration). The video/image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video/image information may further include general constraint information. The decoding device can decode the picture further based on the information on the parameter set and/or the general constraint information. The signaling/received information and/or syntax elements described later in the present disclosure can be obtained from the bitstream by being decoded through the decoding procedure. For example, the entropy decoding unit (310) can decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients for residuals. More specifically, the CABAC entropy decoding method receives a bin corresponding to each syntax element in the bitstream, determines a context model by using information of a syntax element to be decoded and decoding information of surrounding and decoding target blocks or information of symbols/bins decoded in a previous step, and predicts an occurrence probability of a bin according to the determined context model to perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. At this time, the CABAC entropy decoding method can update the context model by using information of the decoded symbol/bin for the context model of the next symbol/bin after determining the context model. Among the information decoded by the entropy decoding unit (310), information regarding prediction is provided to the prediction unit (330), and the residual values on which entropy decoding is performed by the entropy decoding unit (310), that is, quantized transform coefficients and related parameter information, can be input to the residual processing unit (320). The residual processing unit (320) can derive a residual signal (residual block, residual samples, residual sample array). In addition, information regarding filtering among the information decoded by the entropy decoding unit (310) can be provided to the filtering unit (350). Meanwhile, a receiving unit (not shown) that receives a signal output from an encoding device may be further configured as an internal/external element of the decoding device (300), or the receiving unit may be a component of the entropy decoding unit (310). Meanwhile, the decoding device according to the present disclosure may be called a video/video/picture decoding device, and the decoding device may be divided into an information decoder (video/video/picture information decoder) and a sample decoder (video/video/picture sample decoder). The information decoder may include the entropy decoding unit (310), and the sample decoder may include at least one of the inverse quantization unit (321), the inverse transformation unit (322), the adding unit (340), the filtering unit (350), the memory (360), and the prediction unit (330).

역양자화부(321)에서는 양자화된 변환 계수들을 역양자화하여 변환 계수들을 출력할 수 있다. 역양자화부(321)는 양자화된 변환 계수들을 2차원의 블록 형태로 재정렬할 수 있다. 이 경우 상기 재정렬은 인코딩 장치에서 수행된 계수 스캔 순서를 기반하여 재정렬을 수행할 수 있다. 역양자화부(321)는 양자화 파라미터(예를 들어 양자화 스텝 사이즈 정보)를 이용하여 양자화된 변환 계수들에 대한 역양자화를 수행하고, 변환 계수들(transform coefficient)를 획득할 수 있다. The inverse quantization unit (321) can inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit (321) can rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scan order performed in the encoding device. The inverse quantization unit (321) can perform inverse quantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain transform coefficients.

역변환부(322)에서는 변환 계수들를 역변환하여 레지듀얼 신호(레지듀얼 블록, 레지듀얼 샘플 어레이)를 획득하게 된다. In the inverse transform unit (322), the transform coefficients are inversely transformed to obtain a residual signal (residual block, residual sample array).

예측부는 현재 블록에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부는 엔트로피 디코딩부(310)로부터 출력된 상기 예측에 관한 정보를 기반으로 상기 현재 블록에 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있고, 구체적인 인트라/인터 예측 모드를 결정할 수 있다. The prediction unit can perform a prediction on the current block and generate a predicted block including prediction samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied to the current block based on the information about the prediction output from the entropy decoding unit (310), and can determine a specific intra/inter prediction mode.

예측부(330)는 후술하는 다양한 예측 방법을 기반으로 예측 신호를 생성할 수 있다. 예를 들어, 예측부는 하나의 블록에 대한 예측을 위하여 인트라 예측 또는 인터 예측을 적용할 수 있을 뿐 아니라, 인트라 예측과 인터 예측을 동시에 적용할 수 있다. 이는 combined inter and intra prediction (CIIP)라고 불릴 수 있다. 또한, 예측부는 블록에 대한 예측을 위하여 인트라 블록 카피(intra block copy, IBC) 예측 모드에 기반할 수도 있고 또는 팔레트 모드(palette mode)에 기반할 수도 있다. 상기 IBC 예측 모드 또는 팔레트 모드는 예를 들어 SCC(screen content coding)을 위하여 사용될 수 있다. IBC는 기본적으로 현재 픽처 내에서 예측을 수행하나 현재 픽처 내에서 블록 벡터를 기반으로 참조 블록을 도출하는 점에서 인터 예측과 유사하게 수행될 수 있다. 즉, IBC는 본 개시에서 설명되는 인터 예측 기법들 중 적어도 하나를 이용할 수 있다 The prediction unit (330) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit can apply intra prediction or inter prediction for prediction of one block, and can also apply intra prediction and inter prediction at the same time. This can be called combined inter and intra prediction (CIIP). In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for SCC (screen content coding), for example. IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block based on a block vector within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in the present disclosure.

인트라 예측부는 현재 픽처 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 상기 참조되는 샘플들은 예측 모드에 따라 상기 현재 블록의 주변(neighbor)에 위치할 수 있고, 또는 떨어져서 위치할 수도 있다. 인트라 예측에서 예측 모드들은 복수의 비방향성 모드와 복수의 방향성 모드를 포함할 수 있다. 인트라 예측부는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.The intra prediction unit can predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from it depending on the prediction mode. In the intra prediction, the prediction modes may include multiple non-directional modes and multiple directional modes. The intra prediction unit may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

인터 예측부는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측된 블록을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 줄이기 위해 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기초하여 움직임 정보를 블록, 서브블록 또는 샘플 단위로 예측할 수 있다. 상기 움직임 정보는 움직임 벡터 및 참조 픽처 인덱스를 포함할 수 있다. 상기 움직임 정보는 인터 예측 방향(L0 예측, L1 예측, Bi 예측 등) 정보를 더 포함할 수 있다. 인터 예측의 경우에, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 예를 들어, 인터 예측부(332)는 주변 블록들을 기반으로 움직임 정보 후보 리스트를 구성하고, 수신한 후보 선택 정보를 기반으로 상기 현재 블록의 움직임 벡터 및/또는 참조 픽처 인덱스를 도출할 수 있다. 다양한 예측 모드를 기반으로 인터 예측이 수행될 수 있으며, 상기 예측에 관한 정보는 상기 현재 블록에 대한 인터 예측의 모드를 지시하는 정보를 포함할 수 있다. The inter prediction unit can derive a predicted block for a current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include information on an inter prediction direction (such as L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit (332) can configure a motion information candidate list based on neighboring blocks, and derive a motion vector and/or a reference picture index of the current block based on the received candidate selection information. Inter prediction can be performed based on various prediction modes, and information about the prediction can include information indicating a mode of inter prediction for the current block.

가산부(340)는 획득된 레지듀얼 신호를 예측부(330)로부터 출력된 예측 신호(예측된 블록, 예측 샘플 어레이)에 더함으로써 복원 신호(복원 픽처, 복원 블록, 복원 샘플 어레이)를 생성할 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼이 없는 경우, 예측된 블록이 복원 블록으로 사용될 수 있다.The addition unit (340) can generate a restoration signal (restored picture, restored block, restored sample array) by adding the acquired residual signal to the prediction signal (predicted block, predicted sample array) output from the prediction unit (330). When there is no residual for the target block to be processed, such as when skip mode is applied, the predicted block can be used as the restoration block.

가산부(340)는 복원부 또는 복원 블록 생성부라고 불릴 수 있다. 생성된 복원 신호는 현재 픽처 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 출력될 수도 있고 또는 다음 픽처의 인터 예측을 위하여 사용될 수도 있다. The addition unit (340) may be called a restoration unit or a restoration block generation unit. The generated restoration signal may be used for intra prediction of the next processing target block within the current picture, may be output after filtering as described below, or may be used for inter prediction of the next picture.

한편, 픽처 디코딩 과정에서 LMCS (luma mapping with chroma scaling)가 적용될 수도 있다.Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture decoding process.

필터링부(350)는 복원 신호에 필터링을 적용하여 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어 필터링부(350)는 복원 픽처에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽처를 생성할 수 있고, 상기 수정된 복원 픽처를 메모리(360), 구체적으로 메모리(360)의 DPB에 전송할 수 있다. 상기 다양한 필터링 방법은 예를 들어, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset), 적응적 루프 필터(adaptive loop filter), 양방향 필터(bilateral filter) 등을 포함할 수 있다. The filtering unit (350) can apply filtering to the restoration signal to improve subjective/objective image quality. For example, the filtering unit (350) can apply various filtering methods to the restoration picture to generate a modified restoration picture, and transmit the modified restoration picture to the memory (360), specifically, the DPB of the memory (360). The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

메모리(360)의 DPB에 저장된 (수정된) 복원 픽처는 인터 예측부에서 참조 픽쳐로 사용될 수 있다. 메모리(360)는 현재 픽처 내 움직임 정보가 도출된(또는 디코딩된) 블록의 움직임 정보 및/또는 이미 복원된 픽처 내 블록들의 움직임 정보를 저장할 수 있다. 상기 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 활용하기 위하여 인터 예측부에 전달할 수 있다. 메모리(360)는 현재 픽처 내 복원된 블록들의 복원 샘플들을 저장할 수 있고, 인트라 예측부에 전달할 수 있다.The (corrected) reconstructed picture stored in the DPB of the memory (360) can be used as a reference picture in the inter prediction unit. The memory (360) can store motion information of a block from which motion information in the current picture is derived (or decoded) and/or motion information of blocks in a picture that has already been reconstructed. The stored motion information can be transferred to the inter prediction unit to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (360) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit.

본 명세서에서, 인코딩 장치(200)의 필터링부(260), 예측부(220)에서 설명된 실시예들은 각각 디코딩 장치(300)의 필터링부(350), 예측부(330)에도 동일 또는 대응되도록 적용될 수 있다.In this specification, the embodiments described in the filtering unit (260) and the prediction unit (220) of the encoding device (200) can be applied identically or correspondingly to the filtering unit (350) and the prediction unit (330) of the decoding device (300).

상술한 바와 같이, 비디오 코딩을 수행함에 있어 압축 효율을 높이기 위하여 예측을 수행한다. 이를 통하여 코딩 대상 블록인 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록을 생성할 수 있다. 여기서 상기 예측된 블록은 공간 도메인(또는 픽셀 도메인)에서의 예측 샘플들을 포함한다. 상기 예측된 블록은 인코딩 장치 및 디코딩 장치에서 동일하게 도출되며, 상기 인코딩 장치는 원본 블록의 원본 샘플 값 자체가 아닌 상기 원본 블록과 상기 예측된 블록 간의 레지듀얼에 대한 정보(레지듀얼 정보)를 디코딩 장치로 시그널링함으로써 영상 코딩 효율을 높일 수 있다. 디코딩 장치는 상기 레지듀얼 정보를 기반으로 레지듀얼 샘플들을 포함하는 레지듀얼 블록을 도출하고, 상기 레지듀얼 블록과 상기 예측된 블록을 합하여 복원 샘플들을 포함하는 복원 블록을 생성할 수 있고, 복원 블록들을 포함하는 복원 픽처를 생성할 수 있다. As described above, prediction is performed in order to increase compression efficiency when performing video coding. Through this, a predicted block including prediction samples for a current block, which is a coding target block, can be generated. Here, the predicted block includes prediction samples in a spatial domain (or pixel domain). The predicted block is derived identically from an encoding device and a decoding device, and the encoding device can increase image coding efficiency by signaling information (residual information) about a residual between the original block and the predicted block, rather than the original sample value of the original block itself, to a decoding device. The decoding device can derive a residual block including residual samples based on the residual information, and generate a reconstructed block including reconstructed samples by combining the residual block and the predicted block, and can generate a reconstructed picture including the reconstructed blocks.

상기 레지듀얼 정보는 변환 및 양자화 절차를 통하여 생성될 수 있다. 예를 들어, 인코딩 장치는 상기 원본 블록과 상기 예측된 블록 간의 레지듀얼 블록을 도출하고, 상기 레지듀얼 블록에 포함된 레지듀얼 샘플들(레지듀얼 샘플 어레이)에 변환 절차를 수행하여 변환 계수들을 도출하고, 상기 변환 계수들에 양자화 절차를 수행하여 양자화된 변환 계수들을 도출하여 관련된 레지듀얼 정보를 (비트스트림을 통하여) 디코딩 장치로 시그널링할 수 있다. 여기서 상기 레지듀얼 정보는 상기 양자화된 변환 계수들의 값 정보, 위치 정보, 변환 기법, 변환 커널, 양자화 파라미터 등의 정보를 포함할 수 있다. 디코딩 장치는 상기 레지듀얼 정보를 기반으로 역양자화/역변환 절차를 수행하고 레지듀얼 샘플들(또는 레지듀얼 블록)을 도출할 수 있다. 디코딩 장치는 예측된 블록과 상기 레지듀얼 블록을 기반으로 복원 픽처를 생성할 수 있다. 인코딩 장치는 또한 이후 픽처의 인터 예측을 위한 참조를 위하여 양자화된 변환 계수들을 역양자화/역변환하여 레지듀얼 블록을 도출하고, 이를 기반으로 복원 픽처를 생성할 수 있다. The residual information can be generated through a transformation and quantization procedure. For example, the encoding device can derive a residual block between the original block and the predicted block, perform a transformation procedure on residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and signal related residual information to a decoding device (via a bitstream). Here, the residual information can include information such as value information of the quantized transform coefficients, position information, transformation technique, transformation kernel, and quantization parameter. The decoding device can perform an inverse quantization/inverse transformation procedure based on the residual information to derive residual samples (or residual block). The decoding device can generate a reconstructed picture based on the predicted block and the residual block. The encoding device can also inversely quantize/inversely transform the quantized transform coefficients to derive a residual block for reference in inter prediction of a subsequent picture, and generate a restored picture based on the residual block.

본 개시에서 양자화/역양자화 및/또는 변환/역변환 중 적어도 하나는 생략될 수 있다. 상기 양자화/역양자화가 생략되는 경우, 상기 양자화된 변환 계수는 변환 계수라고 불릴 수 있다. 상기 변환/역변환이 생략되는 경우, 상기 변환 계수는 계수 또는 레지듀얼 계수라고 불릴 수도 있고, 또는 표현의 통일성을 위하여 변환 계수라고 여전히 불릴 수도 있다. In the present disclosure, at least one of quantization/dequantization and/or transform/inverse transform may be omitted. If the quantization/dequantization is omitted, the quantized transform coefficient may be called a transform coefficient. If the transform/inverse transform is omitted, the transform coefficient may be called a coefficient or a residual coefficient, or may still be called a transform coefficient for the sake of uniformity of expression.

또한, 본 개시에서 양자화된 변환 계수 및 변환 계수는 각각 변환 계수 및 스케일링된(scaled) 변환 계수라고 지칭될 수 있다. 이 경우, 레지듀얼 정보는 변환 계수(들)에 관한 정보를 포함할 수 있고, 상기 변환 계수(들)에 관한 정보는 레지듀얼 코딩 신택스를 통하여 시그널링될 수 있다. 상기 레지듀얼 정보(또는 상기 변환 계수(들)에 관한 정보)를 기반으로 변환 계수들이 도출될 수 있고, 상기 변환 계수들에 대한 역변환(스케일링)을 통하여 스케일링된 변환 계수들이 도출될 수 있다. 상기 스케일링된 변환 계수들에 대한 역변환(변환)을 기반으로 레지듀얼 샘플들이 도출될 수 있다. 이는 본 개시의 다른 부분에서도 마찬가지로 적용/표현될 수 있다.In addition, in the present disclosure, the quantized transform coefficients and the transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, the residual information may include information about the transform coefficient(s), and the information about the transform coefficient(s) may be signaled via residual coding syntax. Transform coefficients may be derived based on the residual information (or the information about the transform coefficient(s)), and scaled transform coefficients may be derived through inverse transformation (scaling) on the transform coefficients. Residual samples may be derived based on inverse transformation (transformation) on the scaled transform coefficients. This may be similarly applied/expressed in other parts of the present disclosure.

인트라 예측은 현재 블록이 속하는 픽처(이하, 현재 픽처) 내의 참조 샘플들을 기반으로 현재 블록에 대한 예측 샘플들을 생성하는 예측을 나타낼 수 있다. 현재 블록에 인트라 예측이 적용되는 경우, 현재 블록의 인트라 예측에 사용할 주변 참조 샘플들이 도출될 수 있다. 상기 현재 블록의 주변 참조 샘플들은 WХH 크기의 현재 블록의 좌측(left)에 위치하는 H+W 개의 샘플들, 현재 블록의 상측(top)에 위치하는 W+H 개의 샘플들 및 현재 블록의 좌상측(top-left)에 이웃하는 적어도 하나의 샘플을 포함할 수 있다. 또는, 상기 현재 블록의 주변 참조 샘플들은 복수행의 상측 주변 샘플들 및 복수열의 좌측 주변 샘플들을 포함할 수도 있다. Intra prediction may represent a prediction that generates prediction samples for a current block based on reference samples in a picture to which the current block belongs (hereinafter, the current picture). When intra prediction is applied to the current block, peripheral reference samples to be used for intra prediction of the current block may be derived. The peripheral reference samples of the current block may include H+W samples located at the left of a current block of a size WХH, W+H samples located at the top of the current block, and at least one sample neighboring the top-left of the current block. Alternatively, the peripheral reference samples of the current block may include upper peripheral samples of multiple rows and left peripheral samples of multiple columns.

현재 블록의 주변 참조 샘플들 중 일부는 아직 디코딩되지 않았거나, 이용 가능하지 않을 수 있다. 이 경우, 디코더는 이용 가능한 샘플들로 이용 가능하지 않은 샘플들을 패딩(padding) 또는 대체(substitution)하여 예측에 사용할 주변 참조 샘플들을 구성할 수 있다. Some of the surrounding reference samples of the current block may not be decoded yet or may not be available. In this case, the decoder can construct surrounding reference samples to be used for prediction by padding or substituting the unavailable samples with the available samples.

주변 참조 샘플들이 도출된 경우, 상기 주변 참조 샘플들 및 인트라 예측 모드/타입 정보를 기반으로 상기 현재 블록의 예측 샘플들을 도출할 수 있다. 여기서 인트라 예측 모드는 인트라 예측을 위한 공간적 상관관계를 나타내는 비방향성(non-directional) 예측 모드들 및 방향성 예측 모드들 중 하나를 나타낼 수 있다. 여기서 방향성 예측 모드는 각도성(angular) 예측 모드라고 불리 수 있고, 비방향성 예측 모드는 비각도성(non-angular) 예측 모드라고 불릴 수 있다. 인트라 예측 타입은 인트라 예측을 수행하기 위한 다양한 예측 타입을 나타낼 수 있다. 인트라 예측 타입은 예를 들어, MRL (multi-reference line), ISP(intra sub-partitions), PDPC(Position dependent intra prediction), MIP(matrix weighted intra prediction 또는 matrix based intra prediction), CCLM(cross-component linear model), MMLM(multi-model linear model), DIMD(Decoder side intra mode derivation), 크로마 인트라 예측 모드들의 퓨젼, 인트라 템플릿 매칭, TIMD(fusion for template-based intra mode derivation), 인트라 예측 퓨젼(intra prediction fusion), CCCM(cross-component convolutional model), CCP(cross-component prediction), SGPM(spatial geometric partitioning mode) 등을 포함할 수 있다. 경우에 따라 인트라 예측을 수행하기 위하여 인트라 예측 모드 및/또는 인트라 예측 타입이 사용될 수 있다. When the surrounding reference samples are derived, the prediction samples of the current block can be derived based on the surrounding reference samples and the intra prediction mode/type information. Here, the intra prediction mode can represent one of the non-directional prediction modes and the directional prediction modes that indicate spatial correlation for intra prediction. Here, the directional prediction mode can be called an angular prediction mode, and the non-directional prediction mode can be called a non-angular prediction mode. The intra prediction type can represent various prediction types for performing intra prediction. The intra prediction type may include, for example, MRL (multi-reference line), ISP (intra sub-partitions), PDPC (Position dependent intra prediction), MIP (matrix weighted intra prediction or matrix based intra prediction), CCLM (cross-component linear model), MMLM (multi-model linear model), DIMD (Decoder side intra mode derivation), fusion of chroma intra prediction modes, intra template matching, TIMD (fusion for template-based intra mode derivation), intra prediction fusion, CCCM (cross-component convolutional model), CCP (cross-component prediction), SGPM (spatial geometric partitioning mode), etc. In some cases, the intra prediction mode and/or the intra prediction type may be used to perform intra prediction.

구체적으로, 인트라 예측 절차는 인트라 예측 모드/타입 결정 단계, 참조 샘플 도출 단계, 인트라 예측 모드/타입 기반 예측 샘플 도출 단계를 포함할 수 있다. 또한, 필요에 따라서 도출된 예측 샘플에 대한 후처리 필터링(post-filtering) 단계가 수행될 수도 있다.Specifically, the intra prediction procedure may include an intra prediction mode/type determination step, a reference sample derivation step, and an intra prediction mode/type-based prediction sample derivation step. In addition, a post-filtering step may be performed on the derived prediction sample as needed.

도 4는 인트라 예측 절차를 예시적으로 나타낸다.Figure 4 illustrates an intra prediction procedure as an example.

도 4를 참조하면, 상술한 바와 같이 인트라 예측 절차는 인트라 예측 모드/타입 결정 단계, 참조 샘플들 도출 단계, 인트라 예측 수행(예측 샘플 생성) 단계를 포함할 수 있다. 상기 인트라 예측 절차는 상술한 바와 같이 인코딩 장치 및 디코딩 장치에서 수행될 수 있다. Referring to FIG. 4, the intra prediction procedure as described above may include an intra prediction mode/type determination step, a reference sample derivation step, and an intra prediction performance (prediction sample generation) step. The intra prediction procedure may be performed in an encoding device and a decoding device as described above.

코딩 장치는 인트라 예측 모드/타입을 결정한다(S400). 코딩 장치는 상술한 바와 같이 인코딩 장치 및/또는 디코딩 장치를 포함할 수 있다.The coding device determines the intra prediction mode/type (S400). The coding device may include an encoding device and/or a decoding device as described above.

인코딩 장치는 본 개시에서 설명된 다양한 인트라 예측 모드/타입들 중 상기 현재 블록에 적용되는 인트라 예측 모드/타입을 결정할 수 있고, 예측 관련 정보를 생성할 수 있다. 상기 예측 관련 정보는 상기 현재 블록에 적용되는 인트라 예측 모드를 나타내는 인트라 예측 모드 정보 및/또는 상기 현재 블록에 적용되는 인트라 예측 타입을 나타내는 인트라 예측 타입 정보를 포함할 수 있다. 디코딩 장치는 상기 예측 관련 정보를 기반으로 상기 현재 블록에 적용되는 인트라 예측 모드/타입을 결정할 수 있다.An encoding device can determine an intra prediction mode/type applied to the current block from among various intra prediction modes/types described in the present disclosure, and can generate prediction-related information. The prediction-related information can include intra prediction mode information indicating an intra prediction mode applied to the current block and/or intra prediction type information indicating an intra prediction type applied to the current block. A decoding device can determine an intra prediction mode/type applied to the current block based on the prediction-related information.

예를 들어, 인트라 예측이 적용되는 경우, 주변 블록의 인트라 예측 모드를 이용하여 현재 블록에 적용되는 인트라 예측 모드가 결정될 수 있다. 예를 들어, 코딩 장치는 현재 블록의 주변 블록(ex. 좌측 및/또는 상측 주변 블록)의 인트라 예측 모드 및/또는 추가적인 후보 모드들을 기반으로 도출된 MPM(most probable mode) 리스트 내 MPM 후보들 중 하나를 수신된 인덱스 정보를 기반으로 선택할 수 있으며, 또는 상기 MPM 후보들에 포함되지 않은 나머지 인트라 예측 모드들 중 하나를 MPM 리메인더 정보 (리메이닝 인트라 예측 모드 정보)를 기반으로 선택할 수 있다. 상기 MPM 리스트는 플래너 모드를 후보로 포함하거나 포함하지 않도록 구성될 수 있다. For example, when intra prediction is applied, the intra prediction mode to be applied to the current block can be determined using the intra prediction mode of the surrounding block. For example, the coding device can select one of the MPM candidates in the MPM (most probable mode) list derived based on the intra prediction mode of the surrounding block (e.g., the left and/or upper surrounding block) of the current block and/or additional candidate modes based on the received index information, or can select one of the remaining intra prediction modes not included in the MPM candidates based on MPM remind information (remaining intra prediction mode information). The MPM list can be configured to include or not include the planar mode as a candidate.

코딩 장치 현재 블록에 대한 MPM(most probable modes) 리스트를 구성할 수 있다. 상기 MPM 리스트는 MPM 후보 리스트라고 나타낼 수도 있다. 여기서, MPM이라 함은 인트라 예측 모드 코딩시 현재 블록과 주변 블록의 유사성을 고려하여 코딩 효율을 향상시키기 위해 이용되는 모드를 의미할 수 있다. The coding device can construct an MPM (most probable modes) list for the current block. The MPM list may also be expressed as an MPM candidate list. Here, MPM may mean a mode used to improve coding efficiency by considering the similarity between the current block and surrounding blocks during intra prediction mode coding.

인코딩 장치는 다양한 인트라 예측 모드들을 기반으로 예측을 수행할 수 있고, 이에 기반한 RDO (rate-distortion optimization)을 기반으로 최적의 인트라 예측 모드를 결정할 수 있다. 인코딩 장치는 이 경우 상기 MPM 리스트에 구성된 MPM 후보들을 이용하여 상기 최적의 인트라 예측 모드를 결정할 수도 있고, 또는 상기 MPM 리스트에 구성된 MPM 후보들 외의 나머지 인트라 예측 모드들을 이용하여 상기 최적의 인트라 예측 모드를 결정할 수도 있다. 구체적으로 예를 들어, 만약 상기 현재 블록의 인트라 예측 타입이 노멀 인트라 예측 타입이 아닌 특정 타입 (예를 들어 DIMD, TIMD, MRL 또는 ISP)인 경우에는 인코딩 장치는 상기 MPM 후보들만을 상기 현재 블록에 대한 인트라 예측 모드 후보들로 고려하여 상기 최적의 인트라 예측 모드를 결정할 수 있다. 즉, 이 경우에는 상기 현재 블록에 대한 인트라 예측 모드는 상기 MPM 후보들 중에서만 결정될 수 있으며, 이 경우에는 MPM 플래그를 인코딩/시그널링하지 않을 수 있다. 디코딩 장치는 이 경우에는 MPM 플래그를 별도로 시그널링 받지 않고도 MPM 플래그가 1인 것으로 추정할 수 있다. The encoding device can perform prediction based on various intra prediction modes, and determine an optimal intra prediction mode based on RDO (rate-distortion optimization) based on the prediction. In this case, the encoding device can determine the optimal intra prediction mode using MPM candidates configured in the MPM list, or can determine the optimal intra prediction mode using the remaining intra prediction modes other than the MPM candidates configured in the MPM list. Specifically, for example, if the intra prediction type of the current block is not a normal intra prediction type but a specific type (e.g., DIMD, TIMD, MRL or ISP), the encoding device can determine the optimal intra prediction mode by considering only the MPM candidates as intra prediction mode candidates for the current block. That is, in this case, the intra prediction mode for the current block can be determined only among the MPM candidates, and in this case, the MPM flag may not be encoded/signaled. In this case, the decoding device can estimate that the MPM flag is 1 without being separately signaled the MPM flag.

한편, 일반적으로 상기 현재 블록의 인트라 예측 모드가 플래너 모드가 아니고 상기 MPM 리스트 내에 있는 MPM 후보들 중 하나인 경우, 인코딩 장치는 상기 MPM 후보들 중 하나를 가리키는 mpm 인덱스(mpm idx)를 생성한다. 만약, 상기 현재 블록의 인트라 예측 모드가 상기 MPM 리스트 내에도 없는 경우에는 상기 MPM 리스트(및 플래너 모드)에 포함되지 않은 나머지 인트라 예측 모드들 중에서 상기 현재 블록의 인트라 예측 모드와 같은 모드를 가리키는 MPM 리메인더 정보 (리메이닝 인트라 예측 모드 정보)를 생성한다. 상기 MPM 리메인더 정보는 예를 들어 intra_luma_mpm_remainder 신텍스 요소를 포함할 수 있다.Meanwhile, in general, if the intra prediction mode of the current block is not a planar mode but one of the MPM candidates in the MPM list, the encoding device generates an mpm index (mpm idx) pointing to one of the MPM candidates. If the intra prediction mode of the current block is not in the MPM list either, the encoding device generates MPM reminder information (remaining intra prediction mode information) pointing to a mode same as the intra prediction mode of the current block among the remaining intra prediction modes not included in the MPM list (and the planar mode). The MPM reminder information may include, for example, an intra_luma_mpm_remainder syntax element.

디코딩 장치는 비트스트림으로부터 인트라 예측 모드 정보를 획득한다. 상기 인트라 예측 모드 정보는 상술한 바와 같이 MPM 플래그, MPM 인덱스, MPM 리메인더 정보(리메이닝 인트라 예측 모드 정보) 중 적어도 하나를 포함할 수 있다. 디코딩 장치는 MPM 리스트를 구성할 수 있다. 상기 MPM 리스트는 상기 인코딩 장치에서 구성된 MPM 리스트와 동일하게 구성된다. 즉, 상기 MPM 리스트는 주변 블록의 인트라 예측 모드를 포함할 수도 있고, 미리 정해진 방법에 따라 특정 인트라 예측 모드들을 더 포함할 수도 있다. A decoding device obtains intra prediction mode information from a bitstream. The intra prediction mode information may include at least one of an MPM flag, an MPM index, and MPM remind information (remaining intra prediction mode information) as described above. The decoding device may configure an MPM list. The MPM list is configured in the same manner as the MPM list configured in the encoding device. That is, the MPM list may include intra prediction modes of surrounding blocks, and may further include specific intra prediction modes according to a predetermined method.

디코딩 장치는 상기 MPM 리스트 및 상기 인트라 예측 모드 정보를 기반으로 현재 블록의 인트라 예측 모드를 결정할 수 있다. 일 예로, 상기 MPM 플래그의 값이 1인 경우, 디코딩 장치는 상기 MPM 리스트 내의 MPM 후보들 중에서 상기 MPM 인덱스가 가리키는 후보를 상기 현재 블록의 인트라 예측 모드로 도출할 수 있다. The decoding device can determine the intra prediction mode of the current block based on the MPM list and the intra prediction mode information. For example, when the value of the MPM flag is 1, the decoding device can derive a candidate indicated by the MPM index among the MPM candidates in the MPM list as the intra prediction mode of the current block.

다른 예로, 상기 MPM 플래그의 값이 0인 경우, 디코딩 장치는 나머지 인트라 예측 모드들 중에서 상기 리메이닝 인트라 예측 모드 정보(mpm remainder 정보라 불릴 수 있다)가 가리키는 인트라 예측 모드를 상기 현재 블록의 인트라 예측 모드로 도출할 수 있다. As another example, when the value of the MPM flag is 0, the decoding device can derive the intra prediction mode indicated by the remaining intra prediction mode information (which may be called mpm remainder information) from among the remaining intra prediction modes as the intra prediction mode of the current block.

코딩 장치는 현재 블록의 참조 샘플들을 도출한다(S410). 상기 참조 샘플들은 상기 현재 블록의 주변 참조 샘플들을 포함할 수 있다. 상기 현재 블록의 주변 참조 샘플들은 WХH 크기의 현재 블록의 좌측(left)에 위치하는 H+W 개의 샘플들, 현재 블록의 상측(top)에 위치하는 W+H 개의 샘플들 및 현재 블록의 좌상측(top-left)에 이웃하는 적어도 하나의 샘플을 포함할 수 있다. 또는, 상기 현재 블록의 주변 참조 샘플들은 복수행의 상측 주변 샘플들 및 복수열의 좌측 주변 샘플들을 포함할 수도 있다. The coding device derives reference samples of the current block (S410). The reference samples may include peripheral reference samples of the current block. The peripheral reference samples of the current block may include H+W samples located at the left of a current block of a size WХH, W+H samples located at the top of the current block, and at least one sample neighboring the top-left of the current block. Alternatively, the peripheral reference samples of the current block may include upper peripheral samples of multiple rows and left peripheral samples of multiple columns.

코딩 장치는 현재 블록에 인트라 예측을 수행하여 예측 샘플들 도출한다(S1220). 코딩 장치는 상기 인트라 예측 모드/타입 및 상기 참조 샘플들을 기반으로 상기 예측 샘플들을 도출할 수 있다. 코딩 장치는 현재 블록의 참조 샘플들 중 상기 현재 블록의 인트라 예측 모드에 따른 참조 샘플을 도출할 수 있고, 상기 참조 샘플을 기반으로 상기 현재 블록의 예측 샘플을 도출할 수 있다.The coding device performs intra prediction on the current block to derive prediction samples (S1220). The coding device can derive the prediction samples based on the intra prediction mode/type and the reference samples. The coding device can derive a reference sample according to the intra prediction mode of the current block among the reference samples of the current block, and derive a prediction sample of the current block based on the reference sample.

인트라 예측에 기반한 인코딩 절차는 개략적으로 예를 들어 다음을 포함할 수 있다.An encoding procedure based on intra prediction may roughly include, for example:

도 5는 인트라 예측 기반 비디오/영상 인코딩 방법의 예들을 나타낸다.Figure 5 shows examples of intra prediction based video/image encoding methods.

도 5를 참조하면, S500은 인코딩 장치의 예측부에 의하여 수행될 수 있고, S505은 인코딩 장치의 레지듀얼 처리부에 의하여 수행될 수 있고, S510 또는 S515는 인코딩 장치의 엔트로피 인코딩부에 의하여 수행될 수 있다. 구체적으로 상기 예측 관련 정보는 예측부에 의하여 도출되고, 엔트로피 인코딩부에 의하여 인코딩될 수 있다. 상기 레지듀얼 정보는 레지듀얼 처리부에 의하여 도출되고, 엔트로피 인코딩부에 의하여 인코딩될 수 있다. 상기 레지듀얼 정보는 상기 레지듀얼 샘플들에 관한 정보이다. 상기 레지듀얼 정보는 상기 레지듀얼 샘플들에 대한 양자화된 변환 계수들에 관한 정보를 포함할 수 있다. 상술한 바와 같이 상기 레지듀얼 샘플들은 인코딩 장치의 변환부를 통하여 변환 계수들로 도출되고, 상기 변환 계수들은 양자화부를 통하여 양자화된 변환 계수들로 도출될 수 있다. 상기 양자화된 변환 계수들에 관한 정보가 레지듀얼 코딩 절차를 통하여 엔트로피 인코딩부에서 인코딩될 수 있다. Referring to FIG. 5, S500 may be performed by a prediction unit of an encoding device, S505 may be performed by a residual processing unit of the encoding device, and S510 or S515 may be performed by an entropy encoding unit of the encoding device. Specifically, the prediction-related information may be derived by the prediction unit and encoded by the entropy encoding unit. The residual information may be derived by the residual processing unit and encoded by the entropy encoding unit. The residual information is information about the residual samples. The residual information may include information about quantized transform coefficients for the residual samples. As described above, the residual samples may be derived as transform coefficients through the transform unit of the encoding device, and the transform coefficients may be derived as quantized transform coefficients through the quantization unit. The information about the quantized transform coefficients may be encoded in the entropy encoding unit through a residual coding procedure.

인코딩 장치는 현재 블록에 대한 인트라 예측을 수행한다(S500). 인코딩 장치는 현재 블록에 대한 인트라 예측 모드/타입을 도출하고, 현재 블록의 참조 샘플들을 도출할 수 있고, 상기 인트라 예측 모드/타입 및 상기 참조 샘플들을 기반으로 상기 현재 블록 내 예측 샘플들을 생성한다. 여기서 인트라 예측 모드/타입 결정, 주변 참조 샘플들 도출 및 예측 샘플들 생성 절차는 동시에 수행될 수도 있고, 어느 한 절차가 다른 절차보다 먼저 수행될 수도 있다. 인코딩 장치는 복수의 인트라 예측 모드/타입들 중 상기 현재 블록에 대하여 적용되는 모드/타입을 결정할 수 있다. 인코딩 장치는 상기 인트라 예측 모드/타입들에 대한 RD cost를 비교하고 상기 현재 블록에 대한 최적의 인트라 예측 모드/타입을 결정할 수 있다. The encoding device performs intra prediction on the current block (S500). The encoding device can derive an intra prediction mode/type for the current block, derive reference samples of the current block, and generate prediction samples in the current block based on the intra prediction mode/type and the reference samples. Here, the intra prediction mode/type determination, surrounding reference sample derivation, and prediction sample generation procedures may be performed simultaneously, or one procedure may be performed before the other procedure. The encoding device can determine a mode/type applied to the current block among a plurality of intra prediction modes/types. The encoding device can compare RD costs for the intra prediction modes/types and determine an optimal intra prediction mode/type for the current block.

한편, 인코딩 장치는 예측 샘플 필터링 절차를 수행할 수도 있다. 예측 샘플 필터링은 포스트 필터링이라 불릴 수 있다. 상기 예측 샘플 필터링 절차에 의하여 상기 예측 샘플들 중 일부 또는 전부가 필터링될 수 있다. 경우에 따라 상기 예측 샘플 필터링 절차는 생략될 수 있다. Meanwhile, the encoding device may also perform a prediction sample filtering procedure. The prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.

인코딩 장치는 예측 샘플들을 기반으로 상기 현재 블록에 대한 레지듀얼 샘플들을 생성한다(S505). 인코딩 장치는 현재 블록의 원본 샘플들에서 상기 예측 샘플들을 위상 기반으로 비교하고, 상기 레지듀얼 샘플들을 도출할 수 있다. The encoding device generates residual samples for the current block based on the prediction samples (S505). The encoding device can compare the prediction samples with the original samples of the current block based on phase and derive the residual samples.

인코딩 장치는 상기 인트라 예측에 관한 정보(예측 관련 정보) 및/또는 상기 레지듀얼 샘플들에 관한 정보(레지듀얼 정보)를 포함하는 영상/비디오 정보를 인코딩할 수 있다(S510 또는 S515). 상기 예측 관련 정보는 상기 인트라 예측 모드 정보, 상기 인트라 예측 타입 정보를 포함할 수 있다. 인코딩 장치는 인코딩된 영상/비디오 정보를 비트스트림 형태로 출력될 수 있다. 출력된 비트스트림은 저장매체 또는 네트워크를 통하여 디코딩 장치로 전달될 수 있다. The encoding device can encode image/video information including information about the intra prediction (prediction-related information) and/or information about the residual samples (residual information) (S510 or S515). The prediction-related information can include the intra prediction mode information and the intra prediction type information. The encoding device can output the encoded image/video information in the form of a bitstream. The output bitstream can be transmitted to a decoding device via a storage medium or a network.

상기 레지듀얼 정보는 레지듀얼 코딩 신택스 요소를 포함할 수 있다. 인코딩 장치는 상기 레지듀얼 샘플들을 변환/양자화하여 양자화된 변환 계수들을 도출할 수 있다. 상기 레지듀얼 정보는 상기 양자화된 변환 계수들에 대한 정보를 포함할 수 있다. The residual information may include a residual coding syntax element. An encoding device may transform/quantize the residual samples to derive quantized transform coefficients. The residual information may include information about the quantized transform coefficients.

한편, 상술한 바와 같이 인코딩 장치는 복원 픽처(복원 샘플들 및 복원 블록 포함)를 생성할 수 있다. 이를 위하여 인코딩 장치는 상기 상기 양자화된 변환 계수들을 다시 역양자화/역변환 처리하여 (수정된) 레지듀얼 샘플들을 도출할 수 있다. 이와 같이 레지듀얼 샘플들을 변환/양자화 후 다시 역양자화/역변환을 수행하는 이유는 상술한 바와 같이 디코딩 장치에서 도출되는 레지듀얼 샘플들과 동일한 레지듀얼 샘플들을 도출하기 위함이다. 인코딩 장치는 상기 예측 샘플들과 상기 (수정된) 레지듀얼 샘플들을 기반으로 상기 현재 블록에 대한 복원 샘플들을 포함하는 복원 블록을 생성할 수 있다. 상기 복원 블록을 기반으로 상기 현재 픽처에 대한 복원 픽처가 생성될 수 있다. 상기 복원 픽처에 인루프 필터링 절차 등이 더 적용될 수 있음은 상술한 바와 같다.Meanwhile, as described above, the encoding device can generate a restored picture (including restored samples and restored blocks). To this end, the encoding device can perform inverse quantization/inverse transformation on the quantized transform coefficients again to derive (corrected) residual samples. The reason for performing inverse quantization/inverse transformation on the residual samples after transforming/quantizing them in this way is to derive residual samples that are identical to the residual samples derived from the decoding device as described above. The encoding device can generate a restored block including restored samples for the current block based on the prediction samples and the (corrected) residual samples. A restored picture for the current picture can be generated based on the restored block. As described above, an in-loop filtering procedure, etc. can be further applied to the restored picture.

디코딩 장치는 상기 인코딩 장치에서 수행된 동작과 대응되는 동작을 수행할 수 있다. 인트라 예측에 기반한 비디오/영상 디코딩 절차는 예를 들어 다음을 포함할 수 있다.The decoding device can perform operations corresponding to the operations performed in the encoding device. A video/image decoding procedure based on intra prediction may include, for example, the following.

도 6은 인트라 예측 기반 비디오/영상 디코딩 방법의 예들을 나타낸다.Figure 6 shows examples of intra prediction based video/image decoding methods.

도 6을 참조하면, S600은 디코딩 장치의 엔트로피 디코딩부에 의하여 수행될 수 있고, S610은 디코딩 장치의 예측부에 의하여 수행될 수 있고, S615는 디코딩 장치의 레지듀얼 처리부에 의하여 수행될 수 있고, S620은 디코딩 장치의 가산기 혹은 복원부에 의하여 수행될 수 있다. Referring to FIG. 6, S600 may be performed by an entropy decoding unit of a decoding device, S610 may be performed by a prediction unit of the decoding device, S615 may be performed by a residual processing unit of the decoding device, and S620 may be performed by an adder or restoration unit of the decoding device.

구체적으로 디코딩 장치는 비트스트림으로부터 영상/비디오 정보를 획득한다(S600). 상기 영상/비디오 정보는 예측 관련 정보 및/또는 레지듀얼 정보를 포함할 수 있다.Specifically, the decoding device obtains image/video information from the bitstream (S600). The image/video information may include prediction-related information and/or residual information.

디코딩 장치는 예측 관련 정보를 기반으로 인트라 예측을 수행한다(S610). 디코딩 장치는 예측 관련 정보를 기반으로 현재 블록에 대한 인트라 예측 모드/타입을 도출하고, 현재 블록의 참조 샘플들을 도출할 수 있고, 상기 인트라 예측 모드/타입 및 상기 참조 샘플들을 기반으로 상기 현재 블록 내 예측 샘플들을 생성할 수 있다. 이 경우 디코딩 장치는 예측 샘플 필터링 절차를 수행할 수 있다. 예측 샘플 필터링은 포스트 필터링이라 불릴 수 있다. 상기 예측 샘플 필터링 절차에 의하여 상기 예측 샘플들 중 일부 또는 전부가 필터링될 수 있다. 경우에 따라 예측 샘플 필터링 절차는 생략될 수 있다. The decoding device performs intra prediction based on prediction-related information (S610). The decoding device may derive an intra prediction mode/type for a current block based on the prediction-related information, derive reference samples of the current block, and generate prediction samples in the current block based on the intra prediction mode/type and the reference samples. In this case, the decoding device may perform a prediction sample filtering procedure. The prediction sample filtering may be referred to as post filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.

디코딩 장치는 레지듀얼 정보를 기반으로 레지듀얼 처리를 수행한다(S615). 디코딩 장치는 상기 레지듀얼 정보를 기반으로 현재 블록에 대한 레지듀얼 샘플들을 도출할 수 있다. 구체적으로 상기 레지듀얼 처리부의 역양자화부는 상기 레지듀얼 정보를 기반으로 도출된 양자화된 변환 계수들을 기반으로, 역양자화를 수행하여 변환 계수들을 도출하고, 상기 레지듀얼 처리부의 역변환부는 상기 변환 계수들에 대한 역변환을 수행하여 상기 현재 블록에 대한 레지듀얼 샘플들을 도출할 수 있다. The decoding device performs residual processing based on the residual information (S615). The decoding device can derive residual samples for the current block based on the residual information. Specifically, the inverse quantization unit of the residual processing unit performs inverse quantization based on the quantized transform coefficients derived based on the residual information to derive transform coefficients, and the inverse transform unit of the residual processing unit can perform inverse transformation on the transform coefficients to derive residual samples for the current block.

디코딩 장치는 복원된 블록/픽처를 생성한다(S620). 디코딩 장치는 상기 예측 샘플들 및/또는 상기 레지듀얼 샘플들을 기반으로 상기 현재 블록에 대한 복원 샘플들을 생성하고, 상기 복원 샘플들을 포함하는 복원 블록을 도출할 수 있다. 상기 복원 블록을 기반으로 상기 현재 픽처에 대한 복원 픽처가 생성될 수 있다. 상기 복원 픽처에 인루프 필터링 절차 등이 더 적용될 수 있음은 상술한 바와 같다.The decoding device generates a restored block/picture (S620). The decoding device can generate restored samples for the current block based on the prediction samples and/or the residual samples, and derive a restored block including the restored samples. A restored picture for the current picture can be generated based on the restored block. As described above, an in-loop filtering procedure, etc. can be further applied to the restored picture.

상기 인트라 예측 모드 정보 및/또는 상기 인트라 예측 타입 정보는 본 개시에서 설명하는 이진화 및 코딩 방법을 통하여 인코딩/디코딩될 수 있다. 예를 들어, 상기 인트라 예측 모드 정보 및/또는 상기 인트라 예측 타입 정보는 고정 길이 이진화, 트런케이티드 라이스 이진화, 트런케이티드 유너리 이진화 등을 통하여 이진화될 수 있다. 예를 들어, 상기 인트라 예측 모드 정보 및/또는 상기 인트라 예측 타입 정보는 엔트로피 코딩(ex. CABAC, CAVLC) 코딩을 통하여 인코딩/디코딩될 수 있다.The intra prediction mode information and/or the intra prediction type information can be encoded/decoded through the binarization and coding method described in the present disclosure. For example, the intra prediction mode information and/or the intra prediction type information can be binarized through fixed-length binarization, truncated Rice binarization, truncated unary binarization, etc. For example, the intra prediction mode information and/or the intra prediction type information can be encoded/decoded through entropy coding (ex. CABAC, CAVLC) coding.

도 7은 방향성 인트라 예측 모드들의 예를 나타낸다. 도 7은 65개의 방향성 인트라 예측 모드들을 포함하는 경우의 예를 나타낼 수 있다.Fig. 7 shows examples of directional intra prediction modes. Fig. 7 can show an example of a case including 65 directional intra prediction modes.

도 7을 참조하면, 방향성 인트라 예측 모드들은 모드#2 내지 모드#65의 방향성 인트라 예측 모드들을 포함할 수 있다. 이 경우, 모드# 50은 수직 인트라 예측 모드, 모드#18은 수평 인트라 예측 모드를 나타낼 수 있다. 한편, 이는 예시로서 후보 인트라 예측 모들의 개수 및 타입은 변경될 수 있다. 한편, 하나 이상의 비방향성 인트라 예측 모드가 고려될 수 있으며, 예를 들어, 모드#0은 인트라 플래너 예측 모드(플래너 모드), 모드#1은 인트라 DC 예측 모드(DC 모드)를 나타낼 수 있다.Referring to FIG. 7, the directional intra prediction modes may include directional intra prediction modes of mode #2 to mode #65. In this case, mode #50 may represent a vertical intra prediction mode, and mode #18 may represent a horizontal intra prediction mode. Meanwhile, this is just an example, and the number and types of candidate intra prediction modes may be changed. Meanwhile, one or more non-directional intra prediction modes may be considered, for example, mode #0 may represent an intra planar prediction mode (planner mode), and mode #1 may represent an intra DC prediction mode (DC mode).

인트라 예측 모드들에 대하여, 예를 들어 다음 표와 같이 모드 번호가 할당될 수 있다.For intra prediction modes, mode numbers can be assigned, for example, as shown in the following table.

Intra prediction modeIntra prediction mode Associated nameAssociated name 00 INTRA_PLANARINTRA_PLANAR 11 INTRA_DCINTRA_DC 2...662...66 INTRA_ANGULAR2...INTRA_ANGULAR66INTRA_ANGULAR2...INTRA_ANGULAR66 81...8381...83 INTRA_LT_CCLM, INTRA_L_CCLM, INTRA_T_CCLMINTRA_LT_CCLM, INTRA_L_CCLM, INTRA_T_CCLM

본 개시에 따르면, 현재 블록의 인트라 예측을 위하여 다양한 인트라 예측 모드가 사용될 수 있다. 일 예로, DIMD(Decoder side intra mode derivation) 기법을 기반으로 인트라 예측 모드가 도출될 수 있다. DIMD는 DIMD 타입으로 불릴 수 있다. According to the present disclosure, various intra prediction modes can be used for intra prediction of a current block. For example, an intra prediction mode can be derived based on a DIMD (Decoder side intra mode derivation) technique. DIMD can be referred to as a DIMD type.

도 8은 DIMD에서 템플릿 기반 HoG 계산의 예를 나타낸다.Figure 8 shows an example of template-based HoG computation in DIMD.

도 8을 참조하면, DIMD에서는 현재 블록의 주변 샘플들을 포함하는 템플릿을 이용하여 HoG(Histogram of Gradient)를 계산할 수 있다. 예를 들어, 주변 샘플 n(ex. 3)개 라인 템플릿 기반으로 수평/수직 소벨 필터(sobel filter)를 이용하여 HoG 계산할 수 있다. 이 경우, HoG 계산을 위하여 수평 및 수직 소벨 필터(sobel filter)가 적용될 수 있다. 만약 상기 템플릿이 다른 CTU에 위치하는 경우, 상측 CTU 경계에서는 소벨 필터를 적용 안하거나, 상기 DIMD 기법을 현재 블록에 적용하지 않을 수 있다.Referring to Fig. 8, in DIMD, a Histogram of Gradient (HoG) can be calculated using a template that includes surrounding samples of a current block. For example, a HoG can be calculated using a horizontal/vertical Sobel filter based on a line template of n (ex. 3) surrounding samples. In this case, horizontal and vertical Sobel filters can be applied to calculate the HoG. If the template is located in a different CTU, the Sobel filter may not be applied to the upper CTU boundary, or the DIMD technique may not be applied to the current block.

한편, 블록 사이즈 기반으로 HoG 계산을 위하여 적용되는 필터가 다르게 결정될 수 있다. 예를 들어, 블록 사이즈가 4x4, 4x8 또는 8x4 블록인 경우에는 HoG 계산을 위하여 3x3 소벨 필터 대신 2x2 커널 필터가 적용될 수도 있다.Meanwhile, the filter applied for HoG calculation may be determined differently based on the block size. For example, when the block size is 4x4, 4x8, or 8x4, a 2x2 kernel filter may be applied instead of a 3x3 Sobel filter for HoG calculation.

한편, DIMD의 HoG 계산을 위하여 적응적 개수의 (주변) 참조 샘플들이 사용될 수 있다. 이 경우 DIMD 템플릿의 샘플 라인 개수는 4개 이상일 수 있다.Meanwhile, an adaptive number of (surrounding) reference samples can be used for the HoG calculation of DIMD. In this case, the number of sample lines in the DIMD template can be 4 or more.

후보 인트라 예측 모드들에 대하여, 상기 HoG 계산을 통하여 가장 높은 히스토그램 값을 갖는 n개의 인트라 예측 모드들을 선택/추출할 수 있다. 이 경우, 상기 n개의 인트라 예측 모드들을 이용하여 상기 현재 블록에 대한 예측 블록을 도출할 수 있다. 또한, 이 경우 상기 n개의 인트라 예측 모드들 및 비방향성 모드(ex. 플래너 모드 또는 DC 모드)를 이용하여 상기 예측 블록을 도출할 수 있다. 이 경우 각 인트라 예측 모드에 따른 프리딕터를 도출하고, 이를 가중합/가중평균하여 상기 예측 블록을 도출할 수 있다. 다시 말하면, 예측 퓨전(prediction fusion)으로, 상기 선택/추출된 n개(ex. 5개)의 인트라 예측 모드의 프리딕터들과 플래너(planar) 모드의 프리딕터가 퓨전될 수 있다.For the candidate intra prediction modes, n intra prediction modes having the highest histogram values can be selected/extracted through the HoG calculation. In this case, the prediction block for the current block can be derived using the n intra prediction modes. In addition, in this case, the prediction block can be derived using the n intra prediction modes and a non-directional mode (e.g., planar mode or DC mode). In this case, a predictor according to each intra prediction mode can be derived, and the prediction block can be derived by weighting and summing/weighting averaging them. In other words, the predictors of the n (e.g., 5) selected/extracted intra prediction modes and the predictor of the planar mode can be fused through prediction fusion.

예를 들어, 상기 n은 5일 수 있다. 이 경우, 상기 HoG가 가장 높은 5개의 도출 모드(derived mode)가 도출될 수 잇다. 상기 도출 모드는 DIMD 기반 모드 혹은 DIMD 도출 모드라고 불릴 수 있다. 예를 들어, 상기 n의 개수는 블록 사이즈 기반으로 다르게 결정될 수 있다. 예를 들어, 블록의 W*H가 128 이상인 경우에는 n은 7이고, 그 외의 경우에는 n은 5일 수 있다. For example, the above n can be 5. In this case, five derived modes with the highest HoG can be derived. The derived mode can be called a DIMD-based mode or a DIMD derived mode. For example, the number of the above n can be determined differently based on the block size. For example, when the W*H of the block is 128 or more, n can be 7, and in other cases, n can be 5.

한편, DIMD의 HoG 계산을 위하여, 특정 블록 벡터가 사용될 수 있다. 예를 들어, 상기 블록 벡터는 주변 블록의 움직임 벡터 혹은 블록 벡터를 기반으로 도출될 수 있다. 상기 현재 블록의 위치를 기반으로 특정 블록 벡터를 이용하여 이동한 위치의 참조 영역을 도출하고, 참조 영역 내의 (복원) 참조 샘플들을 이용하여 HoG를 계산할 수 있다. 이 경우 상기 템플릿은 상기 참조 영역에 위치할 수 있고 또는 상기 참조 영역의 상측/좌측 주변에 위치할 수 있다. 이 경우, 상기 참조 영역의 사이즈는 상기 현재 블록의 사이즈와 같을 수 있다. 한편, 상기 참조 영역의 사이즈는 상기 현재 블록의 사이즈와 다를 수 있다. 예를 들어, 상기 참조 영역의 너비는 상기 현재 블록의 너비의 절반일 수 있고, 및/또는 상기 참조 영역의 높이는 상기 현재 블록의 높이의 절반일 수 있다. 이 경우, 상기 템플릿의 사이즈 또한 상기 참조 영역의 너비 및 높이 범위 내로 변경될 수 있다.Meanwhile, for the HoG calculation of DIMD, a specific block vector may be used. For example, the block vector may be derived based on a motion vector or a block vector of a surrounding block. A reference area of a moved position may be derived using a specific block vector based on the position of the current block, and the HoG may be calculated using (restored) reference samples within the reference area. In this case, the template may be located in the reference area or may be located on the upper/left periphery of the reference area. In this case, the size of the reference area may be the same as the size of the current block. Meanwhile, the size of the reference area may be different from the size of the current block. For example, the width of the reference area may be half of the width of the current block, and/or the height of the reference area may be half of the height of the current block. In this case, the size of the template may also be changed within the range of the width and height of the reference area.

상기 DIMD를 통하여 도출된 n개의 인트라 모드는 DIMD 도출 모드 또는 DIMD 기반 모드라고 불릴 수 있다. 상기 DIMD 도출 모드는 상기 MPM 리스트(ex. PMPM 리스트)의 후보로 들어갈 수 있다. The n intra modes derived through the above DIMD can be called DIMD derived modes or DIMD-based modes. The above DIMD derived modes can be included as candidates in the above MPM list (e.g. PMPM list).

현재 블록에 DIMD 기법(혹은 타입)이 적용되는 경우, 상기 DIMD로 도출된 첫번째 인트라 모드는 대상 블록의 인트라 모드로 저장될 수 있고, 이후 블록의 MPM 리스트 구성 등에서 참조될 수 있다. When the DIMD technique (or type) is applied to the current block, the first intra mode derived by the DIMD can be stored as the intra mode of the target block and can be referenced in configuring the MPM list of the subsequent block.

현재 블록에 DIMD 기법(혹은 타입)이 적용되는 경우, 상기 DIMD로 도출된 첫번째 인트라 모드는 변환 커널 (혹은 변환 세트) 선택을 위한 모드로 참조될 수 있다. When the DIMD technique (or type) is applied to the current block, the first intra mode derived by the DIMD can be referred to as the mode for selecting the transformation kernel (or transformation set).

한편, 상기 가중합/가중평균 또는 예측 퓨전을 위하여, 예측자들간 가중치가 필요하다. 본 개시의 실시예에 따르면, 가중치 도출에 LUT(look-up table)을 사용할 수 있다. 기존의 풀(full) HoG를 이용하여 dimdModei를 계산하되, Habove, Hleft를 별도로 계산하여 dimdModei이 상측 템플릿 또는 좌측 템플릿 중 어디에 의존성이 높은지, 즉 위치 의존적(location-dependent)인지 계산할 수 있다.Meanwhile, for the above weighted sum/weighted average or prediction fusion, weights between predictors are required. According to an embodiment of the present disclosure, a look-up table (LUT) can be used to derive weights. While calculating dimdMode i using the existing full HoG, Habove and Hleft can be calculated separately to calculate whether dimdMode i is highly dependent on the upper template or the left template, that is, whether it is location-dependent.

만약, 위치 의존적이지 않은 경우, 기존과 같이 HoG 크기 기반으로 가중치(wDimdi, wPlanar) 결정할 수 있다.If it is not position dependent, the weights (wDimd i , wPlanar) can be determined based on the HoG size as before.

만약, 위치 의존적인 경우, 샘플기반 블렌딩(sample-based blending)을 적용할 수 있다. 이 경우, 샘플 단위로 가중치가 다르게 적용될 수 있다. If position-dependent, sample-based blending can be applied, in which case weights can be applied differently on a sample-by-sample basis.

만약, 상측 HoG(ex. Habove)이 좌측 HoG(ex. Hleft)의 두배와 같거나 그 이상인 경우, 가중치는 다음 수학식에 기반할 수 있다. If the upper HoG (ex. Habove) is equal to or greater than twice the left HoG (ex. Hleft), the weights can be based on the following mathematical formula:

여기서 Δi는 상측 HoG 및 좌측 HoG의 차분 혹은 그 절대값을 나타낼 수 있다.Here, Δ i can represent the difference or its absolute value between the upper HoG and the left HoG.

만약, 좌측 HoG(ex. Hleft)이 상측 HoG(ex. Habove)의 두배와 같거나 그 이상인 경우, 가중치는 다음 수학식에 기반할 수 있다. If the left HoG (ex. Hleft) is equal to or greater than twice the upper HoG (ex. Habove), the weights can be based on the following mathematical formula:

여기서 Δi는 좌측 HoG 및 상측 HoG의 차분 혹은 그 절대값을 나타낼 수 있다.Here, Δ i can represent the difference or its absolute value between the left HoG and the upper HoG.

한편, DIMD를 위한 주변 참조 샘플들로 우상측이 가용한 경우 추가 W열, 좌하측이 가용한 경우 추가 H행을 사용할 수 있다. 즉, HOG 계산을 위한 주변 (복원) 샘플들을 포함하는 템플릿의 영역은 주변 (복원) 샘플들의 가용성에 기반할 수 있다. Meanwhile, additional W columns can be used if the upper right side is available as surrounding reference samples for DIMD, and additional H rows can be used if the lower left side is available. That is, the region of the template containing surrounding (reconstruction) samples for HOG computation can be based on the availability of the surrounding (reconstruction) samples.

한편, DIMD에서 n 인트라 (예측) 모드가 도출되면, n개의 인트라 모드 프리딕터 및 플래너 프리딕터가 컴바인되나, 만약 DIMD에서 하나의 인트라 모드가 도출되는 경우 해당 하나의 인트라 모드만 사용될 수 있다. 혹은 DIMD에서 하나의 인트라 모드가 도출되는 경우에도 플래너 모드 프리딕터와 컴바인할 수 있다. 예를 들어, DIMD에서 가장 높은 HoG를 갖는 인트라 모드의 HoG 값이 임계값과 같거나 임계값보다 큰 경우, 상기 하나의 인트라 모드만 도출될 수 있다. 다른 예로, DIMD에서 가장 높은 HoG를 갖는 인트라 모드의 제1 HoG 값이, 두번째로 높은 HoG를 갖는 인트라 모드의 제2 HoG 값보다 일정 값 이상 큰 경우, 상기 하나의 인트라 모드만 도출될 수 있다. 또한, 상기 DIMD 도출 모드들 중 일정 임계값 이상의 HoG를 갖는 n개의 인트라 예측 모드가 선택될 수도 있다.Meanwhile, if n intra (prediction) modes are derived from DIMD, n intra mode predictors and planner predictors are combined, but if one intra mode is derived from DIMD, only the one intra mode can be used. Or, even if one intra mode is derived from DIMD, it can be combined with the planner mode predictor. For example, if the HoG value of the intra mode having the highest HoG in DIMD is equal to or greater than a threshold value, only the one intra mode can be derived. As another example, if the first HoG value of the intra mode having the highest HoG in DIMD is greater than the second HoG value of the intra mode having the second highest HoG by a predetermined value or more, only the one intra mode can be derived. In addition, n intra prediction modes having HoGs greater than a predetermined threshold value among the DIMD derived modes may be selected.

한편, DIMD가 적용된 블록에 대하여 DIMD 도출 첫번째 모드가 현재 블록의 인트라 예측 모드로 저장될 수 있다. 상기 저장된 모드는 이후 블록의 인트라 예측 모드 도출에 참조되는 주변 블록의 모드 및/또는 변환 커널 (혹은 변환 세트) 선택을 위한 모드로 참조될 수 있다. Meanwhile, for a block to which DIMD is applied, the first mode derived from DIMD can be stored as the intra prediction mode of the current block. The stored mode can be referenced as a mode of a surrounding block and/or a mode for selecting a transformation kernel (or transformation set) to be referenced for deriving the intra prediction mode of a subsequent block.

한편, DIMD 도출 첫번째 모드가 현재 블록의 실제 예측 모드(혹은 현재 블록과 가장 상관관계가 높은 최적의 예측 모드)와 같지 않은 경우가 발생할 수 있다. 따라서, DIMD로 도출된 첫번째 인트라 예측 모드 이외에 현재 블록의 인트라 예측 모드로 저장할 수 있는 모드에 대한 검토가 필요하다. 예를 들어, DIMD 도출 첫번째 모드의 HoG가 일정 임계값보다 큰 경우 첫번째 모드를 현재 블록의 인트라 예측 모드로 저장할 수 있고, 그렇지 않은 경우 플래너 혹은 DC 모드를 현재 블록의 인트라 예측 모드로 저장할 수 있다. 혹은, DIMD로 생성된 상기 현재 블록의 제1 예측자(제1 예측 샘플들)와 DIMD 도출 첫번째 모드로 생성된 제2 예측자(제2 예측 샘플들)를 비교하여 일정 SAD/SATD 이내인 경우, 상기 DIMD 도출 첫번째 모드를 현재 블록의 인트라 예측 모드로 저장할 수 있고, 그렇지 않은 경우 플래너 혹은 DC 모드를 현재 블록의 인트라 예측 모드로 저장할 수 있다.Meanwhile, there may be cases where the DIMD-derived first mode is not the same as the actual prediction mode of the current block (or the optimal prediction mode most correlated with the current block). Therefore, it is necessary to review modes that can be stored as the intra prediction mode of the current block other than the first intra prediction mode derived by DIMD. For example, if the HoG of the DIMD-derived first mode is greater than a certain threshold, the first mode can be stored as the intra prediction mode of the current block, otherwise, the planner or DC mode can be stored as the intra prediction mode of the current block. Alternatively, if the first predictor (first prediction samples) of the current block generated by DIMD and the second predictor (second prediction samples) generated by the DIMD-derived first mode are compared and are within a certain SAD/SATD, the DIMD-derived first mode can be stored as the intra prediction mode of the current block, otherwise, the planner or DC mode can be stored as the intra prediction mode of the current block.

다른 예로, DIMD로 도출된 m개의 인트라 예측 모드들로 후보 리스트를 구성하고, 상기 후보 리스트 중 어느 하나를 저장할 수 있다. 여기서 m은 n과 같을 수 있고, 또는 m은 2 또는 3일 수 있다. 이 경우, DIMD로 생성된 상기 현재 블록의 제1 예측자(제1 예측 샘플들)와 상기 m개의 인트라 예측 모드들 각각에 따른 예측자들을 비교하고, 상기 m개의 인트라 예측 모드들 중 가장 낮은 SAD/SATD를 갖는 인트라 예측 모드를 상기 현재 블록의 인트라 예측 모드로 저장할 수 있다.As another example, a candidate list may be constructed with m intra prediction modes derived by DIMD, and one of the candidate lists may be stored. Here, m may be equal to n, or m may be 2 or 3. In this case, the first predictor (first prediction samples) of the current block generated by DIMD may be compared with predictors according to each of the m intra prediction modes, and the intra prediction mode having the lowest SAD/SATD among the m intra prediction modes may be stored as the intra prediction mode of the current block.

혹은 DIMD 기법으로 도출된 제1 예측자(제1 예측 샘플들)에 대하여 DIMD 기법 기반으로 도출되는 첫번째 인트라 예측 모드(즉, 예측 샘플들에 소벨 필터 기반 HoG를 다시 도출하고, 이를 기반으로 가장 높은 HoG를 갖는 인트라 예측 모드(첫번째 인트라 예측 모드))를 상기 현재 블록의 인트라 예측 모드로 저장할 수 있다. 이 경우, 현재 블록의 템플릿 기반으로 도출된 첫번째 인트라 예측 모드와 현재 블록의 예측자 기반으로 도출된 첫번째 인트라 예측 모드는 다를 수 있다.Alternatively, for the first predictor (first prediction samples) derived by the DIMD technique, the first intra prediction mode derived based on the DIMD technique (i.e., the intra prediction mode (the first intra prediction mode) having the highest HoG based on the Sobel filter-based HoG derived from the prediction samples) may be stored as the intra prediction mode of the current block. In this case, the first intra prediction mode derived based on the template of the current block and the first intra prediction mode derived based on the predictor of the current block may be different.

상기 DIMD를 위하여 DIMD 관련 정보가 시그널링될 수 있다. 상기 DIMD 관련 정보는 DIMD 가용 플래그, DIMD 적용 플래그 및/또는 DIMD 플래그 중 적어도 하나를 포함할 수 있다.For the above DIMD, DIMD related information may be signaled. The DIMD related information may include at least one of a DIMD availability flag, a DIMD application flag, and/or a DIMD flag.

DIDM 가용 플래그(dimd_enabeld_flag)는 상위 레벨 신택스(ex. SPS)에서 시그널링될 수 있다. 상기 DIMD 가용 플래그의 값이 1인 경우, 상기 DIMD 적용 플래그(dimd_applied_flag) 및/또는 DIMD 플래그(dimd_flag)가 시그널링될 수 있다.The DIDM enabled flag (dimd_enabeld_flag) can be signaled in higher level syntax (e.g. SPS). When the value of the DIMD enabled flag is 1, the DIMD applied flag (dimd_applied_flag) and/or the DIMD flag (dimd_flag) can be signaled.

상기 DIMD 적용 플래그는 PPS, PH(picture header), SH(slice header) 또는 CTU 레벨에서 시그널링될 수 있다. DIMD가 가용한 경우에도, 상기 DIMD 적용 플래그를 통하여 DIMD를 픽처, 슬라이스 또는 CTU 레벨에서 on/off할 수 있다. 상기 DIMD 플래그는 CU, PU 또는 TU 단위에서 시그널링될 수 있다. 상기 DIMD 플래그는 MPM 플래그 (또는 PMPM 플래그) 전에 시그널링될 수 있다.The above DIMD application flag can be signaled at the PPS, PH (picture header), SH (slice header) or CTU level. Even when DIMD is available, DIMD can be turned on/off at the picture, slice or CTU level through the DIMD application flag. The DIMD flag can be signaled at the CU, PU or TU level. The DIMD flag can be signaled before the MPM flag (or PMPM flag).

상기 DIMD 관련 정보의 시그널링은 예를 들어 다음을 포함할 수 있다.Signaling of the above DIMD related information may include, for example:

DIMD 플래그(dimd_flag)는 PMPM 플래그(pmpm_flag)보다 먼저 시그널링될 수 있다. 이 경우, PMPM 플래그는 DIMD 플래그의 값이 0인 경우에 시그널되고, DIMD 플래그의 값이 1인 경우에 시그널링이 생략될 수 있다. 이는 예를 들어 다음 표와 같이 표현될 수 있다.The DIMD flag (dimd_flag) can be signaled before the PMPM flag (pmpm_flag). In this case, the PMPM flag is signaled when the value of the DIMD flag is 0, and signaling can be omitted when the value of the DIMD flag is 1. This can be expressed, for example, as shown in the following table.

한편, DIMD 플래그(dimd_flag)는 참조 라인 인덱스(intra_luma_ref_idx) 앞에서(파싱 순서상) 시그널링될 수 있다. 참조 라인 인덱스는 현재 블록의 인트라 예측을 위하여 복수의 주변 참조 샘플 라인들이 사용되는 경우, 복수의 주변 참조 샘플 라인들 중 하나 이상을 가리키는 정보이다. 상기 참조 라인 인덱스는 DIMD 플래그가 1이 아닌 경우에 시그널링될 수 있다. 상기 PMPM 플래그는 상기 DIMD 플래그가 1이 아니고, 참조 샘플 라인 인덱스가 0을 가리키는 경우 시그널링될 수 있다. 이는 예를 들어 다음 표와 같이 표현될 수 있다.Meanwhile, the DIMD flag (dimd_flag) can be signaled before (in the parsing order) the reference line index (intra_luma_ref_idx). The reference line index is information indicating one or more of a plurality of surrounding reference sample lines when the plurality of surrounding reference sample lines are used for intra prediction of the current block. The reference line index can be signaled when the DIMD flag is not 1. The PMPM flag can be signaled when the DIMD flag is not 1 and the reference sample line index indicates 0. This can be expressed, for example, as shown in the following table.

한편, DIMD 플래그(dimd_flag)는 참조 라인 인덱스(intra_luma_ref_idx) 뒤에서(파싱 순서상) 시그널링될 수 있다. 상기 DIMD 플래그는 상기 참조 라인 인덱스의 값이 0인 경우에 시그널링될 수 있다. 상기 PMPM 플래그는 상기 DIMD 플래그가 1이 아니고, 참조 샘플 라인 인덱스가 0을 가리키는 경우 시그널링될 수 있다. 이는 예를 들어 다음 표와 같이 표현될 수 있다.Meanwhile, the DIMD flag (dimd_flag) can be signaled after the reference line index (in the parsing order) (in the intra_luma_ref_idx). The DIMD flag can be signaled when the value of the reference line index is 0. The PMPM flag can be signaled when the DIMD flag is not 1 and the reference sample line index points to 0. This can be expressed, for example, as shown in the following table.

한편, 상술한 바와 같이 현재 블록의 인트라 예측 모드를 효율적으로 시그널링하기 위하여 MPM 리스트가 구성될 수 있다. 본 개시의 일 실시예에 따른 방법에서는, 복수의 MPM 리스트가 구성될 수 있다. 상기 복수의 MPM 리스트는 제1 MPM 리스트 및 제2 MPM 리스트를 포함할 수 있다. 상기 제1 MPM 리스트는 PMPM(primary MPM) 리스트라고 불릴 수 있고, 상기 제2 MPM 리스트는 SMPM(secondary MPM) 리스트라고 불릴 수 있다.Meanwhile, as described above, an MPM list may be configured to efficiently signal the intra prediction mode of the current block. In a method according to one embodiment of the present disclosure, a plurality of MPM lists may be configured. The plurality of MPM lists may include a first MPM list and a second MPM list. The first MPM list may be called a PMPM (primary MPM) list, and the second MPM list may be called an SMPM (secondary MPM) list.

상기 제1 MPM 리스트 및 상기 제2 MPM 리스트는 미리 정해진 기준에 따라 구성될 수 있다. 예를 들어, k개의 후보를 포함하는 일반(general) MPM 리스트가 먼저 구성되고, 상기 일반 MPM 리스트의 처음 n개의 후보가 제1 MPM 리스트에 포함되고, 나머지 m개의 후보가 제2 MPM 리스트에 포함될 수 있다. 일 예로, 상기 k는 22, n은 6 및/또는 m은 16일 수 있다. 일 예로, 상기 일반 MPM 리스트의 첫번째 후보(첫번째 엔트리의 후보)는 항상 플래너 모드일 수 있다. 다른 예로, 플래너 모드가 별도의 플래너 플래그(혹은 not_planar_flag) 기반으로 시그널링되는 경우 등에는, 상기 k는 21, n은 5 및/또는 m은 16일 수도 있다. The above first MPM list and the second MPM list can be configured according to predetermined criteria. For example, a general MPM list including k candidates may be configured first, and the first n candidates of the general MPM list may be included in the first MPM list, and the remaining m candidates may be included in the second MPM list. As an example, k may be 22, n may be 6, and/or m may be 16. As an example, the first candidate (the candidate of the first entry) of the general MPM list may always be the planar mode. As another example, when the planar mode is signaled based on a separate planar flag (or not_planar_flag), k may be 21, n may be 5, and/or m may be 16.

플래너 모드를 제외한 나머지 후보들 중 적어도 하나는 주변 블록들로부터 도출될 수 있다.At least one of the remaining candidates, excluding the planar mode, can be derived from the surrounding blocks.

도 9는 MPM 리스트 도출을 위한 주변 블록들의 예를 나타낸다.Figure 9 shows examples of peripheral blocks for deriving the MPM list.

도 9를 참조하면, 상기 주변 블록들은 현재 블록의 좌측 주변 블록(L), 좌하측 주변 블록(BL), 상측 주변 블록(A), 우상측 주변 블록(AR) 및/또는 좌상측 주변 블록(AL) 중 적어도 하나를 포함할 수 있다.Referring to FIG. 9, the surrounding blocks may include at least one of a left surrounding block (L), a lower left surrounding block (BL), an upper surrounding block (A), an upper right surrounding block (AR), and/or an upper left surrounding block (AL) of the current block.

또한, 나머지 후보들은 DIMD 기반 모드들(DIMD 기반으로 도출된 인트라 예측 모드들)을 포함할 수 있다. 예를 들어, 주변 블록들로부터 도출된 인트라 예측 모드들 및 DIMD 기반 모드들(DIMD 기반으로 도출된 인트라 예측 모드들)을 SAD 코스트 기반으로 SAD 코스트가 적은 순서대로 소팅한 후(이하, 소팅된(sorted) 인트라 예측 모드라 불릴 수 있다), 상기 일반 MPM 리스트 혹은 상기 제1 MPM 리스트에 추가할 수 있다. 이 경우, 소팅된 인트라 예측 모드들을 소정의 개수 p개까지만 추출하여, 상기 일반 MPM 리스트 혹은 상기 제1 MPM 리스트에 추가할 수 있다. 여기서 SAD 코스트는 현재 블록의 템플릿의 복원 샘플들 및 템플릿에 대하여 후보 모드를 적용하여 도출되는 예측자(predictor) 기반으로 계산될 수 있다. 상기 소팅된 인트라 예측 모드들 중 방향성 예측 모드들은 소팅된 방향성 모드라고 불릴 수 있다. 상기 p는 예를 들어, 5 혹은 6일 수 있다. 혹은 상기 p는 7 혹은 8일 수 있다. 상기 DIMD 기반 모드들에서 플래너 모드 및/또는 DC 모드는 제외될 수 있다. 이하 마찬가지이다. DIMD 기반 모드는 DIMD 도출 모드라고 불릴 수 있다.In addition, the remaining candidates may include DIMD-based modes (intra prediction modes derived based on DIMD). For example, intra prediction modes derived from surrounding blocks and DIMD-based modes (intra prediction modes derived based on DIMD) may be sorted in order of decreasing SAD cost based on SAD cost (hereinafter, referred to as sorted intra prediction modes) and added to the general MPM list or the first MPM list. In this case, only a predetermined number p of sorted intra prediction modes may be extracted and added to the general MPM list or the first MPM list. Here, the SAD cost may be calculated based on a predictor derived by applying the candidate mode to the restored samples of the template of the current block and the template. Directional prediction modes among the sorted intra prediction modes may be referred to as sorted directional modes. The p may be, for example, 5 or 6. Alternatively, the p may be 7 or 8. In the above DIMD-based modes, the planar mode and/or the DC mode may be excluded. The same applies hereinafter. The DIMD-based mode may be called a DIMD derivation mode.

예를 들어, k개의 엔트리가 다 찰 때까지 상기 소팅된 예측 모드들, (추출된) 소팅된 방향성 모드들에 오프셋을 더하거나 뺀 모드들, 소정의 디폴트 모드들을 추가할 수 있다.For example, one could add the sorted prediction modes, modes with offsets added or subtracted from the (extracted) sorted directional modes, and some default modes until all k entries are filled.

다른 예로, DIMD 기반 모드들 중 일부 또는 전부에 대하여는 소팅 절차를 생략할 수 있다. 이는 DIMD 기반 모드들의 경우 현재 블록과 높은 상관성을 갖기 때문이다. 따라서, DIMD 기반 모드들 중 일부 또는 전부에 대하여는 소팅 절차를 생략하고, MPM 리스트(ex. 일반 MPM 리스트 또는 제1 MPM 리스트)의 앞쪽으로 우선할당할 수 있다. 이 경우, 플래너 모드가 가장 앞에 위치하고, 플래너 모드 뒤쪽에 DIMD 기반 모드들 중 일부 또는 전부가 할당될 수 있다. 또는 플래너 모드가 MPM 리스트에 포함되지 않는 경우, DIMD 기반 모드들 중 일부 또는 전부가 가장 앞쪽으로 할당될 수 있다. 또는, DIMD 기반 모드들과 주변 블록으로부터 도출된 인트라 예측 모드들을 비교하고, 서로 중첩되는 모드들은 현재 블록과 높은 상관성을 가지기 때문에, MPM 리스트의 앞쪽으로 우선할당할 수 있다. 즉, 프루닝 절차와 소팅 절차를 병합할 수 있다. 예를 들어, 앞선 방법에 따르면, 주변 블록들로부터 도출된 인트라 예측 모드들 (제1 그룹) 및 DIMD 기반 모드들 (제2 그룹) 간 중복 제거를 위한 프루닝 절차와 소팅 절차가 각각 수행되어야 하나, 본 방법에 따르면, 중복 체크를 하면서 중복된 모드들에 대하여는 우선 순위를 할당하여 소팅 절차를 생략할 수 있다. As another example, the sorting procedure may be omitted for some or all of the DIMD-based modes. This is because the DIMD-based modes have a high correlation with the current block. Therefore, the sorting procedure may be omitted for some or all of the DIMD-based modes, and they may be assigned to the front of the MPM list (e.g., the general MPM list or the first MPM list). In this case, the planner mode may be positioned at the front, and some or all of the DIMD-based modes may be assigned behind the planner mode. Alternatively, if the planner mode is not included in the MPM list, some or all of the DIMD-based modes may be assigned to the front. Alternatively, the DIMD-based modes may be compared with intra prediction modes derived from neighboring blocks, and modes that overlap each other may be assigned to the front of the MPM list since they have a high correlation with the current block. In other words, the pruning procedure and the sorting procedure may be combined. For example, according to the previous method, a pruning procedure and a sorting procedure must be performed respectively to remove duplication between intra prediction modes derived from surrounding blocks (first group) and DIMD-based modes (second group), but according to the present method, the sorting procedure can be omitted by assigning priorities to duplicated modes while performing a duplication check.

도 10은 DIMD 기반 모드들 및 주변 블록들로부터 도출된 인트라 예측 모드들을 예시적으로 나타낸다.Figure 10 exemplarily shows DIMD-based modes and intra prediction modes derived from surrounding blocks.

도 10을 참조하면, 모드 B, 모드 C가 두 그룹 간 중복되는 경우, 해당 모드 B, 모드 C에 대하여는 우선순위를 줘서 MPM 리스트에 할당할 수 있다. 예를 들어, 이 경우 모드 B 및 모드 C는 MPM 리스트의 제일 앞 또는 플래너 모드의 (바로) 뒤쪽에 할당될 수 있다.Referring to Fig. 10, when mode B and mode C overlap between two groups, the modes B and C can be assigned priority in the MPM list. For example, in this case, mode B and mode C can be assigned to the very front of the MPM list or (immediately) behind the planner mode.

이 경우, 예를 들어, 모드 B, 모드 C 간의 우선순위는 DIMD 기반 모드들 간의 우선순위에 기반할 수 있다. DIMD 기반 모드들의 경우 HoG 기반으로 우선순위가 이미 도출되었기 때문에 별도의 SAD 기반 소팅 절차를 거치지 않고 우선순위를 판단할 수 있다.In this case, for example, the priority between mode B and mode C can be based on the priority between DIMD-based modes. In the case of DIMD-based modes, since the priority has already been derived based on HoG, the priority can be determined without going through a separate SAD-based sorting procedure.

한편, 히스토리 기반으로 일정 영역 내에서 이전 블록들 코딩시 사용된 인트라 예측 모드들을 저장하고, 이를 재활용할 수 있다. 이는 HIPM (history-based intra prediction mode)라고 불릴 수 있다. 상기 HIPM은 HMPM(history-based MPM), 히스토리 기반 후보 모드 등 다양한 이름으로 불릴 수 있다. 상기 일정 영역은 예를 들어, CTU, CTU 행, 복수의 CTU 행, 슬라이스, 타일 등을 포함할 수 있다. 상기 복수의 CTU 행은 예를 들어, 현재 블록이 위치하는 n번째 CTU 행 및 n-1번째 CTU 행을 포함할 수 있다. 이 경우, HIPM 리스트는 인트라 예측 모드의 빈도수를 기반으로 리오더링을 수행할 수 있다. 즉, 일정 영역 내에서 발생 빈도가 높은 인트라 예측 모드는 발생 빈도가 낮은 인트라 예측 모드보다 높은 우선순위를 가지고, 상기 리스트의 더 앞쪽에 할당될 수 있다. 리스트의 앞쪽에 할당되는 경우, 더 낮은 인덱스 값으로 해당 모드를 지시할 수 있다. Meanwhile, intra prediction modes used in coding previous blocks within a certain region based on history can be stored and reused. This can be called HIPM (history-based intra prediction mode). The HIPM can be called by various names such as HMPM (history-based MPM), history-based candidate mode, etc. The certain region can include, for example, a CTU, a CTU row, a plurality of CTU rows, a slice, a tile, etc. The plurality of CTU rows can include, for example, an n-th CTU row and an n-1-th CTU row where a current block is located. In this case, the HIPM list can perform reordering based on the frequency of the intra prediction mode. That is, an intra prediction mode with a high occurrence frequency within a certain region has a higher priority than an intra prediction mode with a low occurrence frequency, and can be allocated to the front of the list. When allocated to the front of the list, the mode can be indicated with a lower index value.

도 11은 일정 영역 내 이전 블록들의 인트라 예측 모드들을 예시적으로 나타낸다.Figure 11 exemplarily shows intra prediction modes of previous blocks within a certain area.

도 11을 참조하면, 특정 모드(ex. Mode #50)이 가장 많은 빈도수를 갖는 경우 해당 특정 모드가 높은 우선순위를 갖도록 HIPM 리스트가 구성될 수 있다. 상기 리스트는 버퍼라고 불릴 수 있다. 이 경우, 예를 들어, Mode #28은 그 다음으로 높은 빈도수를 갖기에 Mode #50 다음 위치에 할당될 수 있다.Referring to Fig. 11, the HIPM list can be configured such that a specific mode (e.g. Mode #50) has the highest frequency and thus has a high priority. The list can be called a buffer. In this case, for example, Mode #28 can be assigned to the next position after Mode #50 since it has the next highest frequency.

상기 HIPM 리스트를 구성함에 있어서, 상기 일정 영역 내 이전 블록의 인트라 예측 모드가 불가용할 수 있다. 이는 예를 들어, 상기 이전 블록이 인터 예측 기반으로 코딩된 경우(인터 코딩된 경우)일 수 있다. 이 경우, 상기 이전 블록의 인트라 예측 모드는 플래너 모드 또는 DC 모드로 간주될 수 있다. 혹은, 상기 이전 블록의 인트라 예측 모드는 상기 HIPM 리스트 구성시 생략될 수 있다. In constructing the above HIPM list, the intra prediction mode of the previous block within the predetermined area may be unavailable. This may be, for example, when the previous block is coded based on inter prediction (inter coded). In this case, the intra prediction mode of the previous block may be considered as a planar mode or a DC mode. Alternatively, the intra prediction mode of the previous block may be omitted when constructing the HIPM list.

상기 HIPM 리스트는 상기 MPM 리스트 구성을 위하여 사용될 수 있다. 예들 들어, 상기 MPM 리스트는 상기 HIPM 리스트의 후보들 중 우선순위에 따른 x개의 후보들을 기반으로 구성될 수 있다. 즉, 상기 MPM 리스트는 상기 HIPM 리스트의 후보들 중 우선순위에 따른 x개의 후보들을 포함할 수 있다. 혹은, 주변 블록들로부터 도출된 인트라 예측 모드들 (제1 그룹) 및 DIMD 기반 모드들 (제2 그룹) 및/또는 HIPM 리스트의 후보들 (제3 그룹)의 후보들을 기반으로 상기 MPM 리스트의 후보들을 도출할 수 있다. 이 경우 프루닝 및 소팅 절차가 수행될 수 있고, 소팅 절차를 통하여 앞선 p개까지만 추출할 수도 있다.The above HIPM list can be used to construct the MPM list. For example, the MPM list can be constructed based on x candidates in order of priority among the candidates of the HIPM list. That is, the MPM list can include x candidates in order of priority among the candidates of the HIPM list. Alternatively, the candidates of the MPM list can be derived based on the intra prediction modes (first group) and DIMD-based modes (second group) derived from the surrounding blocks and/or the candidates of the HIPM list (third group). In this case, a pruning and sorting procedure can be performed, and only the preceding p can be extracted through the sorting procedure.

한편, 상술한 바와 같이 일반 MPM 리스트, 제1 MPM 리스트 및/또는 제2 MPM 리스트가 존재할 수 있다. 상기 제2 MPM 리스트는 4개의 그룹으로 나누어질 수 있다. 이 경우, 예를 들어, PMPM 플래그가 먼저 시그널링되고, PMPM 플래그가 1인 경우, PMPM 인덱스가 시그널링될 수 있다. 여기서, PMPM 플래그는 상기 현재 블록의 인트라 예측 모드가 제1 MPM 리스트에 존재하는지 여부를 지시할 수 있다. 예를 들어, 상기 PMPM 플래그보다 먼저 GMPM 플래그가 시그널링될 수 있다. 이 경우, PMPM 플래그 및 후술하는 SMPM 플래그는 상기 GMPM 플래그가 1인 경우에 시그널링될 수 있다. PMPM 플래그가 0인 경우, SMPM 플래그가 먼저 시그널링되고, SMPM 플래그가 1인 경우, 제2 MPM 리스트에 대한 그룹 인덱스(SMPM 그룹 인덱스)가 먼저 파싱/시그널링되고, 모드 인덱스(SMPM 모드 인덱스)가 이후 시그널링/파싱될 수 있다. 인트라 예측 모드에 관한 정보(ex. GMPM 플래그, PMPM 플래그, PMPM 인덱스, SMPM 플래그, SMPM 그룹 인덱스 및/또는 SMPM 모드 인덱스)는 CU 신택스를 통하여 시그널링될 수 있다. GMPM 플래그가 0인 경우, 상기 PMPM 플래그 및 SMPM 플래그는 시그널링/코딩 없이 그 값이 0으로 도출될 수 있다. GMPM 플래그는 단순하게 MPM 플래그라고 불릴 수도 있다. GMPM 플래그는 경우에 따라 생략될 수 있다. Meanwhile, as described above, there may be a general MPM list, a first MPM list, and/or a second MPM list. The second MPM list may be divided into four groups. In this case, for example, the PMPM flag may be signaled first, and when the PMPM flag is 1, the PMPM index may be signaled. Here, the PMPM flag may indicate whether the intra prediction mode of the current block exists in the first MPM list. For example, the GMPM flag may be signaled before the PMPM flag. In this case, the PMPM flag and the SMPM flag described below may be signaled when the GMPM flag is 1. When the PMPM flag is 0, the SMPM flag may be signaled first, and when the SMPM flag is 1, the group index (SMPM group index) for the second MPM list may be parsed/signaled first, and the mode index (SMPM mode index) may be signaled/parsed later. Information about intra prediction mode (e.g., GMPM flag, PMPM flag, PMPM index, SMPM flag, SMPM group index and/or SMPM mode index) can be signaled via CU syntax. When the GMPM flag is 0, the PMPM flag and SMPM flag can be derived as 0 without signaling/coding. The GMPM flag can also be simply called the MPM flag. The GMPM flag can be omitted in some cases.

인트라 예측에 관한 정보는 예를 들어 다음과 같이 시그널링될 수 있다. 인트라 예측에 관한 정보는 하나 이상의 신택스 요소들을 포함할 수 있다. 이하 마찬가지이다.Information about intra prediction can be signaled, for example, as follows. Information about intra prediction can include one or more syntax elements. The same applies hereinafter.

이 경우, 일 예로, smpm_group_idx는 고정 길이 이진화될 수 있고, smpm_mode_idx는 고정 길이 이진화될 수 있다. In this case, for example, smpm_group_idx can be fixed-length binarized, and smpm_mode_idx can be fixed-length binarized.

다른 예로, smpm_group_idx는 트런케이티드 라이스 (혹은 트런케이티드 유너리) 이진화될 수 있다. 이 경우, smpm_mode_idx는 고정 길이 이진화될 수 있다. 또는 smpm_mode_idx는 smpm_group_idx 값에 따라 이진화 방법을 결정할 수 있다. 예를 들어, smpm_group_idx 값이 0 또는 1인 경우에는 트런케이티드 라이스 (혹은 트런케이티드 유너리) 이진화되고, 나머지 경우에는 고정 길이 이진화될 수 있다. smpm_mode_idx는 컨택스트 모델 기반 코딩될 수 있으며, 이 경우 smpm_mode_idx의 컨택스트 모델은 현재 블록의 사이즈 및/또는 smpm_group_idx 값을 기반으로 다르게 결정될 수 있다. 예를 들어, 컨택스트 모델은 컨택스트 인덱스 증분(ctxInc)를 기반으로 지시될 수 있으며, smpm_mode_idx의 빈(bin)에 대한 ctxInc는 예를 들어 다음과 같이 smpm_group_idx 값을 기반으로 다르게 결정될 수 있다. 후술하는 바와 같이 smpm_group_idx는 smpm_group_flag로 대체될 수 있다. As another example, smpm_group_idx can be truncated rice (or truncated unary) binarized. In this case, smpm_mode_idx can be fixed-length binarized. Or, smpm_mode_idx can determine a binarization method depending on the smpm_group_idx value. For example, if the smpm_group_idx value is 0 or 1, it can be truncated rice (or truncated unary) binarized, and in other cases, it can be fixed-length binarized. smpm_mode_idx can be context model-based coding, and in this case, the context model of smpm_mode_idx can be determined differently based on the size of the current block and/or the smpm_group_idx value. For example, the context model can be directed based on the context index increment (ctxInc), and the ctxInc for a bin of smpm_mode_idx can be determined differently based on the smpm_group_idx value, for example, as follows. As described below, smpm_group_idx can be replaced with smpm_group_flag.

제2 MPM 리스트는 2개의 그룹으로 나누어질 수 있다. 이 경우 제1 그룹의 후보 개수는 제2 그룹의 후보 개수와 같을 수 있고, 혹은 다를 수 있다. 예를 들어, 제2 MPM 리스트의 후보 수는 16개, 12개 혹은 8개일 수 있다. 이 경우 제1 그룹에는 4개 혹은 8개의 후보가 포함되고, 제2 그룹에는 8개의 후보가 포함될 수 있다.The second MPM list can be divided into two groups. In this case, the number of candidates in the first group can be the same as or different from the number of candidates in the second group. For example, the number of candidates in the second MPM list can be 16, 12, or 8. In this case, the first group can contain 4 or 8 candidates, and the second group can contain 8 candidates.

일 예로, smpm_group_idx 대신 smpm_group_flag가 사용될 수 있다. smpm_group_flag는 제2 MPM 리스트의 후보 그룹중 현재 블록의 인트라 예측 모드가 제2 후보 그룹에 포함되는지 여부를 나타낼 수 있다. smpm_mode_idx는 smpm_group_flag 값에 따라 이진화 방법을 결정할 수 있다. 예를 들어, smpm_group_flag 값이 첫번째 그룹을 가리키는 경우(ex. value 1)에는 트런케이티드 라이스 (혹은 트런케이티드 유너리) 이진화되고, 나머지 경우에는 고정 길이 이진화될 수 있다.For example, smpm_group_flag can be used instead of smpm_group_idx. smpm_group_flag can indicate whether the intra prediction mode of the current block is included in the second candidate group among the candidate groups of the second MPM list. smpm_mode_idx can determine a binarization method according to the smpm_group_flag value. For example, if the smpm_group_flag value points to the first group (ex. value 1), truncated rice (or truncated unary) binarization is performed, and in other cases, fixed-length binarization can be performed.

이 경우, 예를 들어, 인트라 예측에 관한 정보는 예를 들어 다음과 같이 시그널링될 수 있다.In this case, for example, information about intra prediction can be signaled as follows:

한편, smpm_flag 및/또는 smpm_group_flag(혹은 smpm_group_idx) 대신 smpm_idc가 사용될 수도 있다.Alternatively, smpm_idc may be used instead of smpm_flag and/or smpm_group_flag (or smpm_group_idx).

이 경우, 예를 들어, 인트라 예측에 관한 정보는 예를 들어 다음과 같이 시그널링될 수 있다.In this case, for example, information about intra prediction can be signaled as follows:

smpm_idc는 현재 블록의 인트라 예측 모드가 제2 MPM 리스트에 포함되는지 여부 및 포함되는 경우 어떤 그룹에 포함되는지 여부를 나타낼 수 있다. smpm_idc는 트런케이티드 라이스 (혹은 트런케이티드 유너리) 기반 이진화될 수 있다.smpm_idc can indicate whether the intra prediction mode of the current block is included in the second MPM list and, if so, in which group it is included. smpm_idc can be binarized based on truncated rice (or truncated unary).

다음 표는 smpm_idc의 이진화를 예시적으로 나타낸다.The following table shows an example of binarization of smpm_idc.

smpm_idcsmpm_idc DescriptionDescription BinarizationBinarization 00 Not includedNot included 00 11 In First groupIn First group 1010 22 In Second groupIn the second group 1111

smpm_mode_idx는 smpm_idx로 불릴 수 있다. smpm_idx는 트런케이티드 라이스 (혹은 트런케이티드 유너리) 기반 이진화될 수 있다.smpm_mode_idx can be called smpm_idx. smpm_idx can be binarized based on truncated rice (or truncated unary).

다음 표는 smpm_idx의 이진화를 예시적으로 나타낸다.The following table shows an example of binarization of smpm_idx.

smpm_idxsmpm_idx DescriptionDescription BinarizationBinarization 00 First candidateFirst candidate 00 11 Second candidateSecond candidate 1010 22 Third candidateThird candidate 110110 33 Fourth candidateFourth candidate 111111

혹은, smpm_idx의 이진화는 smpm 그룹에 기반할 수 있다. 예를 들어, smpm_idx의 이진화는 smpm_idc 값에 기반할 수 있다. 예를 들어, smpm_idc 값이 1인 경우, smpm_idx는 트런케이티드 라이스 (혹은 트런케이티드 유너리) 기반 이진화되고, smpm_idc 값이 2인 경우, smpm_idx는 고정 길이 이진화될 수 있다. 이 경우 예를 들어, 제1 그룹의 후보 개수는 4개이고, 제2 그룹의 후보 개수는 8개일 수 있다. 이를 통하여 워스트 케이스에 대한 이진화 최대 빈 개수를 맞출 수 있다.Alternatively, the binarization of smpm_idx can be based on smpm groups. For example, the binarization of smpm_idx can be based on smpm_idc value. For example, when smpm_idc value is 1, smpm_idx can be binarized based on truncated rice (or truncated unary), and when smpm_idc value is 2, smpm_idx can be binarized based on fixed length. In this case, for example, the number of candidates in the first group can be 4, and the number of candidates in the second group can be 8. Through this, the maximum number of bins for the binarization for the worst case can be matched.

smpm_idx (for first group)smpm_idx (for first group) DescriptionDescription BinarizationBinarization 00 First candidateFirst candidate 00 11 Second candidateSecond candidate 1010 22 Third candidateThird candidate 110110 33 Fourth candidateFourth candidate 111111

smpm_idx (for non-first group)smpm_idx (for non-first group) DescriptionDescription BinarizationBinarization 00 First candidateFirst candidate 000000 11 Second candidateSecond candidate 001001 22 Third candidateThird candidate 010010 33 Fourth candidateFourth candidate 011011 44 Fifth candidateFifth candidate 100100 55 Sixth candidateSixth candidate 101101 66 Seventh candidateSeventh candidate 110110 77 Eighth candidateEighth candidate 111111

상기와 같이 제2 MPM 리스트의 제1 그룹의 경우 현재 블록과 상관성이 높기에 베스트 케이스를 고려하여 가변 길이 이진화를 하고, 제2 MPM 리스트의 제2 그룹의 경우 현재 블록과 상관성이 상대적으로 낮기에 워스트 케이스를 고려하여 고정 길이 이진화를 할 수 있다.As described above, for the first group of the second MPM list, since the correlation with the current block is high, variable-length binarization can be performed considering the best case, and for the second group of the second MPM list, since the correlation with the current block is relatively low, fixed-length binarization can be performed considering the worst case.

상기 smpm_idx는 컨택스트 기반 코딩(ex. CABAC)될 수 있으며, 이 경우 0번 빈의 컨택스트 인덱스 (혹은 컨택스트 인덱스 증분)은 경우에 따라 다르게 설정될 수 있다. smpm_idx의 컨택스트 모델은 현재 블록의 사이즈 및/또는 smpm_idc 값을 기반으로 다르게 결정될 수 있다. 예를 들어, smpm_idx의 0번 빈의 컨택스트 인덱스(혹은 컨택스트 인덱스 증분)는 smpm_idc (혹은 smpm_group_idx 혹은 smpm_group_flag)를 기반으로 다르게 설정될 수 있다.The above smpm_idx can be context-based coded (e.g. CABAC), in which case the context index (or context index increment) of bin 0 can be set differently depending on the case. The context model of smpm_idx can be determined differently based on the size of the current block and/or the smpm_idc value. For example, the context index (or context index increment) of bin 0 of smpm_idx can be set differently based on smpm_idc (or smpm_group_idx or smpm_group_flag).

예를 들어, smpm_idc (혹은 smpm_group_idx 혹은 smpm_group_flag)의 값이 1보다 큰 경우, smpm_idx의 0번 빈의 컨택스트 인덱스 증분은 1일 수 있다. smpm_idc (혹은 smpm_group_idx 혹은 smpm_group_flag)의 값이 1인 경우, smpm_idx의 0번 빈의 컨택스트 인덱스 증분은 0일 수 있다. 혹은 그 반대일 수도 있다. 하기 표들에서 smpm_idc는 smpm_group_idx 혹은 smpm_group_flag로 대체될 수 있다. 이 경우 조건이 되는 smpm_group_idx 혹은 smpm_group_flag의 값은 smpm_idc의 값보다 1 작게 설정될 수 있다.For example, if the value of smpm_idc (or smpm_group_idx or smpm_group_flag) is greater than 1, the context index increment of bin 0 of smpm_idx can be 1. If the value of smpm_idc (or smpm_group_idx or smpm_group_flag) is 1, the context index increment of bin 0 of smpm_idx can be 0. Or vice versa. In the tables below, smpm_idc can be replaced with smpm_group_idx or smpm_group_flag. In this case, the value of smpm_group_idx or smpm_group_flag, which is the condition, can be set to 1 less than the value of smpm_idc.

상기와 같은 컨택스트 기반 코딩을 통하여, 인트라 예측 모드 관련 정보에 대하여 적응적으로 컨택스트 모델을 할당하고, 효율적으로 엔트로피 코딩 효율을 높일 수 있다.Through context-based coding as described above, a context model can be adaptively allocated to information related to intra prediction modes, and entropy coding efficiency can be efficiently increased.

도 12는 본 개시의 실시예(들)에 따른 비디오/영상 인코딩 방법을 개략적으로 나타낸다. 도 12에서 개시된 방법은 도 2에서 개시된 인코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 12의 S1200 내지 S1220은 인코딩 장치(200)의 예측부(220)에 의하여 수행될 수 있고, 도 12의 S1230은 인코딩 장치(200)의 엔트로피 인코딩부(240)에 의하여 수행될 수 있다. 도 12에서 개시된 방법은 본 개시에서 상술한 실시예들을 포함할 수 있다.FIG. 12 schematically illustrates a video/image encoding method according to an embodiment(s) of the present disclosure. The method disclosed in FIG. 12 may be performed by the encoding device disclosed in FIG. 2. Specifically, for example, S1200 to S1220 of FIG. 12 may be performed by the prediction unit (220) of the encoding device (200), and S1230 of FIG. 12 may be performed by the entropy encoding unit (240) of the encoding device (200). The method disclosed in FIG. 12 may include the embodiments described above in the present disclosure.

도 12를 참조하면, 인코딩 장치는 현재 블록에 대한 MPM 리스트를 도출한다(S1200).Referring to FIG. 12, the encoding device derives an MPM list for the current block (S1200).

상기 MPM 리스트는 상기 현재 블록에 대한 인트라 예측 모드 후보들을 포함할 수 있다. 상기 MPM 리스트는 제1 MPM 리스트, 제2 MPM 리스트 및 제3 MPM 리스트를 포함할 수 있다. 이 경우, 상기 제2 MPM 리스트와 상기 제1 MPM 리스트는 서로 중첩되지 않고, 상기 제2 MPM 리스트와 상기 제3 MPM 리스트는 서로 중첩될 수 있다. 예를 들어, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제1 MPM 리스트에 포함되지 않고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제3 MPM 리스트에 포함될 수 있다. 상기 제1 MPM 리스트는 PMPM 리스트라고 불릴 수 있다. 상기 제2 MPM 리스트는 SMPM 리스트라고 불릴 수 있다. 상기 제3 MPM 리스트는 GMPM 리스트라고 불릴 수 있다. The above MPM list may include intra prediction mode candidates for the current block. The MPM list may include a first MPM list, a second MPM list, and a third MPM list. In this case, the second MPM list and the first MPM list may not overlap each other, and the second MPM list and the third MPM list may overlap each other. For example, candidates included in the second MPM list may not be included in the first MPM list, and candidates included in the second MPM list may be included in the third MPM list. The first MPM list may be called a PMPM list. The second MPM list may be called an SMPM list. The third MPM list may be called a GMPM list.

상기 MPM 리스트는 제1 인트라 예측 모드 그룹 및 제2 인트라 예측 모드 그룹을 기반으로 도출되고, 상기 제1 인트라 예측 모드 그룹은 상기 현재 블록의 주변 블록들의 인트라 예측 모드들을 포함하고, 상기 제2 인트라 예측 모드 그룹은 상기 현재 블록에 대한 DIMD(decoder side intra mode derivation) 기반 인트라 예측 모드들을 포함할 수 있다.The above MPM list is derived based on a first intra prediction mode group and a second intra prediction mode group, wherein the first intra prediction mode group includes intra prediction modes of surrounding blocks of the current block, and the second intra prediction mode group includes DIMD (decoder side intra mode derivation) based intra prediction modes for the current block.

상기 제2 인트라 예측 모드 그룹의 인트라 예측 모드는 상기 제1 인트라 예측 모드 그룹의 인트라 예측 모드보다 더 높은 우선순위를 갖고 상기 MPM 리스트의 더 앞쪽에 할당될 수 있다.The intra prediction mode of the second intra prediction mode group may have a higher priority than the intra prediction mode of the first intra prediction mode group and may be assigned earlier in the MPM list.

상기 제1 인트라 예측 모드 그룹의 인트라 예측 모드들 및 제2 인트라 예측 모드 그룹의 인트라 예측 모드들 간의 중첩되는 모드가 도출될 수 있다. 이 경우, 상기 중첩되는 모드는 중첩되지 않는 모드보다 더 높은 우선순위를 갖고 상기 MPM 리스트의 더 앞쪽에 할당될 수 있다.An overlapping mode between the intra prediction modes of the first intra prediction mode group and the intra prediction modes of the second intra prediction mode group can be derived. In this case, the overlapping mode has a higher priority than the non-overlapping mode and can be allocated to the front of the MPM list.

상기 제1 인트라 예측 모드 그룹의 인트라 예측 모드들 및 제2 인트라 예측 모드 그룹의 인트라 예측 모드들 간의 중첩되는 모드들이 도출될 수 있다. 상기 중첩되는 모드들이 복수인 경우, 상기 중첩되는 모드들 간의 우선순위는 상기 DIMD 기반 인트라 예측 모드들 간의 우선순위에 기반할 수 있다.Overlapping modes between the intra prediction modes of the first intra prediction mode group and the intra prediction modes of the second intra prediction mode group can be derived. When there are multiple overlapping modes, the priority between the overlapping modes can be based on the priority between the DIMD-based intra prediction modes.

상기 MPM 리스트는 제3 인트라 예측 모드 그룹을 더 기반으로 도출될 수 있다. 상기 제3 인트라 예측 모드 그룹은 HIPM(history-based intra prediction mode) 버퍼 내 히스토리 기반 인트라 예측 모드들을 포함할 수 있다.The above MPM list can be further derived based on a third intra prediction mode group. The third intra prediction mode group can include history-based intra prediction modes within a history-based intra prediction mode (HIPM) buffer.

상기 HIPM 버퍼는 상기 현재 블록이 위치하는 특정 영역의 이전에 디코딩되고 현재 블록에 인접하지 않는 블록들의 인트라 예측 모드를 포함할 수 있다. 상기 HIPM 버퍼 내의 인트라 예측 모드들은 상기 특정 영역 내 인트라 예측 모드의 발생 빈도를 기반으로 리오더링될 수 있다. 상기 특정 영역 내의 가용하지 않은 블록의 인트라 예측 모드는 소정의 인트라 예측 모드 또는 상기 특정 블록에 대한 DIMD 기반 인트라 예측 모드와 같게 설정될 수 있다. 상기 특정 영역 내의 인터 예측 또는 IBC(intra block copy) 예측 기반으로 코딩된 특정 블록의 인트라 예측 모드는 소정의 인트라 예측 모드 또는 상기 특정 블록에 대한 DIMD 기반 인트라 예측 모드와 같게 설정될 수 있다. 상기 소정의 인트라 예측 모드는 플래너 모드 또는 DC 모드일 수 있다. 상기 HIPM 버퍼는 CTU 행 단위로 초기화될 수 있다. 상기 HIPM 버퍼는 CTU, 복수의 CTU 행, 슬라이스 또는 타일 단위로 초기화될 수도 있다.The HIPM buffer may include intra prediction modes of previously decoded blocks of a specific area where the current block is located and which are not adjacent to the current block. The intra prediction modes in the HIPM buffer may be reordered based on the occurrence frequency of the intra prediction modes in the specific area. The intra prediction mode of an unavailable block in the specific area may be set to be the same as a predetermined intra prediction mode or a DIMD-based intra prediction mode for the specific block. The intra prediction mode of a specific block coded based on inter prediction or IBC (intra block copy) prediction in the specific area may be set to be the same as a predetermined intra prediction mode or a DIMD-based intra prediction mode for the specific block. The predetermined intra prediction mode may be a planar mode or a DC mode. The HIPM buffer may be initialized in units of CTU rows. The HIPM buffer may also be initialized in units of CTU, multiple CTU rows, slices, or tiles.

인코딩 장치는 현재 블록의 인트라 예측 모드를 도출한다(S1210). 인코딩 장치는 RD 코스트를 기반으로 인트라 예측 모드들 중에서 상기 현재 블록에 적용되는 인트라 예측 모드를 도출할 수 있다.The encoding device derives an intra prediction mode of the current block (S1210). The encoding device can derive an intra prediction mode to be applied to the current block from among intra prediction modes based on the RD cost.

인코딩 장치는 예측 관련 정보를 생성한다(S1220). 인코딩 장치는 상기 도출된 인트라 예측 모드 및 상기 MPM 리스트를 기반으로 상기 예측 관련 정보를 생성할 수 있다.The encoding device generates prediction-related information (S1220). The encoding device can generate the prediction-related information based on the derived intra prediction mode and the MPM list.

일 예로, 상기 예측 관련 정보는 PMPM 플래그, PMPM 인덱스, SMPM 플래그, SMPM 그룹 인덱스 또는 SMPM 모드 인덱스 중 적어도 하나를 포함할 수 있다. 이 경우, 상기 PMPM 플래그는 상기 현재 블록의 인트라 예측 모드가 상기 제1 MPM 리스트에 존재하는지 여부를 지시하고, 상기 PMPM 인덱스는 상기 제1 MPM 리스트 내에서 후보를 지시하기 위한 인덱스이고, 상기 SMPM 플래그는 상기 현재 블록의 상기 인트라 예측 모드가 상기 제2 MPM 리스트에 존재하는지 여부를 지시하고, 상기 SMPM 그룹 인덱스는 상기 제2 MPM 리스트 내에서 SMPM 그룹을 지시하기 위한 인덱스이고, 상기 SMPM 모드 인덱스는 상기 SMPM 그룹 내 후보를 지시하기 위한 인덱스일 수 있다. 상기 SMPM 그룹 인덱스 및 상기 SMPM 모드 인덱스는 상기 SMPM 플래그의 값이 1인 경우에 시그널링될 수 있다.For example, the prediction related information may include at least one of a PMPM flag, a PMPM index, an SMPM flag, an SMPM group index, or an SMPM mode index. In this case, the PMPM flag indicates whether the intra prediction mode of the current block exists in the first MPM list, the PMPM index is an index for indicating a candidate within the first MPM list, the SMPM flag indicates whether the intra prediction mode of the current block exists in the second MPM list, the SMPM group index is an index for indicating an SMPM group within the second MPM list, and the SMPM mode index is an index for indicating a candidate within the SMPM group. The SMPM group index and the SMPM mode index may be signaled when the value of the SMPM flag is 1.

상기 SMPM 모드 인덱스의 이진화 방법은 상기 SMPM 그룹 인덱스의 값을 기반으로 다르게 결정될 수 있다.The binarization method of the above SMPM mode index can be determined differently based on the value of the above SMPM group index.

상기 SMPM 모드 인덱스는 컨택스트 모델 기반으로 인코딩되고, 상기 SMPM 모드 인덱스의 컨택스트 모델은 상기 SMPM 그룹 인덱스의 값을 기반으로 결정될 수 있다.The above SMPM mode index is encoded based on a context model, and the context model of the SMPM mode index can be determined based on the value of the SMPM group index.

상기 SMPM 그룹 인덱스는 제1 SMPM 그룹 또는 제2 SMPM 그룹을 가리키고, 상기 제1 SMPM 그룹의 후보 개수는 상기 제2 SMPM 그룹의 후보 개수와 다를 수 있다. 예를 들어, 상기 제2 SMPM 그룹의 후보 개수는 상기 제1 SMPM 그룹의 후보 개수의 2배일 수 있다.The above SMPM group index points to a first SMPM group or a second SMPM group, and the number of candidates of the first SMPM group may be different from the number of candidates of the second SMPM group. For example, the number of candidates of the second SMPM group may be twice the number of candidates of the first SMPM group.

다른 예로, 상기 예측 관련 정보는 PMPM 플래그, PMPM 인덱스, SMPM 플래그, SMPM 그룹 플래그 또는 SMPM 모드 인덱스 중 적어도 하나를 포함할 수 있다. 상기 PMPM 플래그는 상기 현재 블록의 인트라 예측 모드가 상기 제1 MPM 리스트에 존재하는지 여부를 지시하고, 상기 PMPM 인덱스는 상기 제1 MPM 리스트 내에서 후보를 지시하기 위한 인덱스이고, 상기 SMPM 플래그는 상기 현재 블록의 상기 인트라 예측 모드가 상기 제2 MPM 리스트에 존재하는지 여부를 지시하고, 상기 SMPM 그룹 플래그는 상기 제2 MPM 리스트 내에서 SMPM 그룹을 지시하기 위한 인덱스이고, 상기 SMPM 모드 인덱스는 상기 SMPM 그룹 내 후보를 지시하기 위한 인덱스일 수 있다. 상기 SMPM 그룹 플래그 및 상기 SMPM 모드 인덱스는 상기 SMPM 플래그의 값이 1인 경우에 시그널링될 수 있다. 상술한 바와 같이 상기 SMPM 플래그 및 SMPM 그룹 플래그 중 적어도 하나는 SMPM 지시(smpm_idc) 정보로 대체될 수 있다. As another example, the prediction related information may include at least one of a PMPM flag, a PMPM index, an SMPM flag, an SMPM group flag, or an SMPM mode index. The PMPM flag indicates whether the intra prediction mode of the current block exists in the first MPM list, the PMPM index is an index for indicating a candidate within the first MPM list, the SMPM flag indicates whether the intra prediction mode of the current block exists in the second MPM list, the SMPM group flag is an index for indicating an SMPM group within the second MPM list, and the SMPM mode index is an index for indicating a candidate within the SMPM group. The SMPM group flag and the SMPM mode index may be signaled when the value of the SMPM flag is 1. As described above, at least one of the SMPM flag and the SMPM group flag may be replaced with SMPM indication (smpm_idc) information.

상기 SMPM 모드 인덱스의 이진화 방법은 상기 SMPM 그룹 플래그의 값을 기반으로 다르게 결정될 수 있다. 예를 들어, 상기 SMPM 그룹 플래그의 값이 1인 경우를 기반으로, 상기 SMPM 모드 인덱스는 트런케이티드 유너리 기반으로 이진화되고, 상기 SMPM 그룹 플래그의 값이 0인 경우를 기반으로, 상기 SMPM 모드 인덱스는 고정 길이 기반으로 이진화될 수 있다. The binarization method of the above SMPM mode index can be determined differently based on the value of the SMPM group flag. For example, based on the case where the value of the SMPM group flag is 1, the SMPM mode index can be binarized based on a truncated unary basis, and based on the case where the value of the SMPM group flag is 0, the SMPM mode index can be binarized based on a fixed length basis.

상기 SMPM 모드 인덱스는 컨택스트 모델 기반으로 인코딩되고, 상기 SMPM 모드 인덱스의 컨택스트 모델은 상기 SMPM 그룹 플래그의 값을 기반으로 결정될 수 있다.The above SMPM mode index is encoded based on a context model, and the context model of the above SMPM mode index can be determined based on the value of the SMPM group flag.

인코딩 장치는 예측 관련 정보를 포함하는 영상 정보를 인코딩한다(S1230). 예를 들어, 상기 예측 관련 정보는 상기 현재 블록에 대한 CU 신택스를 포함할 수 있다. 상기 영상 정보는 비디오 정보로 불릴 수 있다.The encoding device encodes image information including prediction-related information (S1230). For example, the prediction-related information may include CU syntax for the current block. The image information may be referred to as video information.

또한, 상기 영상 정보는 본 개시의 실시예에 따른 다양한 정보를 포함할 수 있다. 예를 들어, 상기 영상 정보는 상술한 표들 중 적어도 하나에서 개시된 정보를 포함할 수 있다. Additionally, the image information may include various information according to an embodiment of the present disclosure. For example, the image information may include information disclosed in at least one of the tables described above.

한편, 상기 영상 정보는 레지듀얼 정보를 포함할 수 있다. 상기 레지듀얼 정보는 레지듀얼 샘플들에 관한 정보이다. 상기 레지듀얼 정보는 상기 레지듀얼 샘플들에 대한 양자화된 변환 계수들에 관한 정보를 포함할 수 있다.Meanwhile, the image information may include residual information. The residual information is information about residual samples. The residual information may include information about quantized transform coefficients for the residual samples.

인코딩된 영상 정보는 비트스트림 형태로 출력될 수 있다. 상기 비트스트림은 네트워크 또는 저장매체를 통하여 디코딩 장치로 전송될 수 있다. 예를 들어, 상기 비트스트림를 포함하는 영상 데이터는 전송 장치(혹은 전송부)에 의하여 디코딩 장치로 전송될 수 있다. 이 경우, 상기 비트스트림을 포함하는 상기 영상 데이터는 스트리밍 서버를 통하여 상기 디코딩 장치로 전송될 수 있다.The encoded image information can be output in the form of a bitstream. The bitstream can be transmitted to a decoding device via a network or storage medium. For example, the image data including the bitstream can be transmitted to a decoding device via a transmission device (or transmission unit). In this case, the image data including the bitstream can be transmitted to the decoding device via a streaming server.

또한, 상술한 바와 같이 인코딩 장치는 상기 참조 샘플들 및 상기 레지듀얼 샘플들을 기반으로 복원 픽처(복원 샘플들 및 복원 블록 포함)를 생성할 수 있다. 이는 디코딩 장치에서 수행되는 것과 동일한 예측 결과를 인코딩 장치에서 도출하기 위함이며, 이를 통하여 코딩 효율을 높일 수 있기 때문이다. 따라서, 인코딩 장치는 복원 픽처(또는 복원 샘플들, 복원 블록)를 메모리에 저장하고, 인터 예측을 위한 참조 픽처로 활용할 수 있다. 상기 복원 픽처에 인루프 필터링 절차 등이 더 적용될 수 있음은 상술한 바와 같다.In addition, as described above, the encoding device can generate a restored picture (including restored samples and restored blocks) based on the reference samples and the residual samples. This is to derive the same prediction result as performed in the decoding device from the encoding device, and thereby increase coding efficiency. Accordingly, the encoding device can store the restored picture (or restored samples, restored blocks) in memory and utilize it as a reference picture for inter prediction. As described above, an in-loop filtering procedure, etc. can be further applied to the restored picture.

상술한 실시예(들)에 따르면, 현재 블록에 적용되는 예측 모드를 효율적으로 지시할 수 있고, 사이드 정보의 데이터량을 줄일 수 있다. 또한, 주변 블록들과의 상관성(correlation) 뿐 아니라 주변 복원 샘플들과의 상관성을 같이 고려하여 MPM 리스트를 구성할 수 있고, 현재 블록의 인트라 예측 모드가 MPM 리스트의 상위 후보로 구성될 확률을 높일 수 있고, 인트라 예측 모드의 시그널링 효율을 높일 수 있다. According to the above-described embodiment(s), it is possible to efficiently indicate the prediction mode applied to the current block, and reduce the amount of data of side information. In addition, it is possible to construct an MPM list by considering not only the correlation with the surrounding blocks but also the correlation with the surrounding restoration samples, and it is possible to increase the probability that the intra prediction mode of the current block is constructed as a top candidate of the MPM list, and it is possible to increase the signaling efficiency of the intra prediction mode.

도 13은 본 개시의 실시예(들)에 따른 비디오/영상 디코딩 방법을 개략적으로 나타낸다. 도 13에서 개시된 방법은 도 3에서 개시된 디코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 13의 S1300은 디코딩 장치(300)의 엔트로피 디코딩부(310)에 의하여 수행될 수 있고, S1310 내지 S1330은 디코딩 장치(300)의 예측부(330)에 의하여 수행될 수 있다. 도 13에서 개시된 방법은 본 개시에서 상술한 실시예들을 포함할 수 있다. FIG. 13 schematically illustrates a video/image decoding method according to an embodiment(s) of the present disclosure. The method disclosed in FIG. 13 may be performed by the decoding device disclosed in FIG. 3. Specifically, for example, S1300 of FIG. 13 may be performed by the entropy decoding unit (310) of the decoding device (300), and S1310 to S1330 may be performed by the prediction unit (330) of the decoding device (300). The method disclosed in FIG. 13 may include the embodiments described above in the present disclosure.

도 13을 참조하면, 디코딩 장치는 비트스트림을 통하여 예측 관련 정보를 획득한다(S1300). 디코딩 장치는 비트스트림을 통하여 상기 예측 관련 정보를 포함하는 영상 정보를 획득할 수 있다. 상기 영상 정보는 상술한 바와 같이 레지듀얼 정보를 더 포함할 수 있다.Referring to FIG. 13, the decoding device obtains prediction-related information through the bitstream (S1300). The decoding device can obtain image information including the prediction-related information through the bitstream. The image information may further include residual information as described above.

일 예로, 상기 예측 관련 정보는 PMPM 플래그, PMPM 인덱스, SMPM 플래그, SMPM 그룹 인덱스 또는 SMPM 모드 인덱스 중 적어도 하나를 포함할 수 있다. 이 경우, 상기 PMPM 플래그는 상기 현재 블록의 인트라 예측 모드가 상기 제1 MPM 리스트에 존재하는지 여부를 지시하고, 상기 PMPM 인덱스는 상기 제1 MPM 리스트 내에서 후보를 지시하기 위한 인덱스이고, 상기 SMPM 플래그는 상기 현재 블록의 상기 인트라 예측 모드가 상기 제2 MPM 리스트에 존재하는지 여부를 지시하고, 상기 SMPM 그룹 인덱스는 상기 제2 MPM 리스트 내에서 SMPM 그룹을 지시하기 위한 인덱스이고, 상기 SMPM 모드 인덱스는 상기 SMPM 그룹 내 후보를 지시하기 위한 인덱스일 수 있다. 상기 SMPM 그룹 인덱스 및 상기 SMPM 모드 인덱스는 상기 SMPM 플래그의 값이 1인 경우에 시그널링될 수 있다.For example, the prediction related information may include at least one of a PMPM flag, a PMPM index, an SMPM flag, an SMPM group index, or an SMPM mode index. In this case, the PMPM flag indicates whether the intra prediction mode of the current block exists in the first MPM list, the PMPM index is an index for indicating a candidate within the first MPM list, the SMPM flag indicates whether the intra prediction mode of the current block exists in the second MPM list, the SMPM group index is an index for indicating an SMPM group within the second MPM list, and the SMPM mode index is an index for indicating a candidate within the SMPM group. The SMPM group index and the SMPM mode index may be signaled when the value of the SMPM flag is 1.

상기 SMPM 모드 인덱스의 이진화 방법은 상기 SMPM 그룹 인덱스의 값을 기반으로 다르게 결정될 수 있다.The binarization method of the above SMPM mode index can be determined differently based on the value of the above SMPM group index.

상기 SMPM 모드 인덱스는 컨택스트 모델 기반으로 디코딩되고, 상기 SMPM 모드 인덱스의 컨택스트 모델은 상기 SMPM 그룹 인덱스의 값을 기반으로 결정될 수 있다.The above SMPM mode index is decoded based on a context model, and the context model of the above SMPM mode index can be determined based on the value of the above SMPM group index.

상기 SMPM 그룹 인덱스는 제1 SMPM 그룹 또는 제2 SMPM 그룹을 가리키고, 상기 제1 SMPM 그룹의 후보 개수는 상기 제2 SMPM 그룹의 후보 개수와 다를 수 있다. 예를 들어, 상기 제2 SMPM 그룹의 후보 개수는 상기 제1 SMPM 그룹의 후보 개수의 2배일 수 있다.The above SMPM group index points to a first SMPM group or a second SMPM group, and the number of candidates of the first SMPM group may be different from the number of candidates of the second SMPM group. For example, the number of candidates of the second SMPM group may be twice the number of candidates of the first SMPM group.

다른 예로, 상기 예측 관련 정보는 PMPM 플래그, PMPM 인덱스, SMPM 플래그, SMPM 그룹 플래그 또는 SMPM 모드 인덱스 중 적어도 하나를 포함할 수 있다. 상기 PMPM 플래그는 상기 현재 블록의 인트라 예측 모드가 상기 제1 MPM 리스트에 존재하는지 여부를 지시하고, 상기 PMPM 인덱스는 상기 제1 MPM 리스트 내에서 후보를 지시하기 위한 인덱스이고, 상기 SMPM 플래그는 상기 현재 블록의 상기 인트라 예측 모드가 상기 제2 MPM 리스트에 존재하는지 여부를 지시하고, 상기 SMPM 그룹 플래그는 상기 제2 MPM 리스트 내에서 SMPM 그룹을 지시하기 위한 인덱스이고, 상기 SMPM 모드 인덱스는 상기 SMPM 그룹 내 후보를 지시하기 위한 인덱스일 수 있다. 상기 SMPM 그룹 플래그 및 상기 SMPM 모드 인덱스는 상기 SMPM 플래그의 값이 1인 경우에 시그널링될 수 있다. 상술한 바와 같이 상기 SMPM 플래그 및 SMPM 그룹 플래그 중 적어도 하나는 SMPM 지시(smpm_idc) 정보로 대체될 수 있다. As another example, the prediction related information may include at least one of a PMPM flag, a PMPM index, an SMPM flag, an SMPM group flag, or an SMPM mode index. The PMPM flag indicates whether the intra prediction mode of the current block exists in the first MPM list, the PMPM index is an index for indicating a candidate within the first MPM list, the SMPM flag indicates whether the intra prediction mode of the current block exists in the second MPM list, the SMPM group flag is an index for indicating an SMPM group within the second MPM list, and the SMPM mode index is an index for indicating a candidate within the SMPM group. The SMPM group flag and the SMPM mode index may be signaled when the value of the SMPM flag is 1. As described above, at least one of the SMPM flag and the SMPM group flag may be replaced with SMPM indication (smpm_idc) information.

상기 SMPM 모드 인덱스의 이진화 방법은 상기 SMPM 그룹 플래그의 값을 기반으로 다르게 결정될 수 있다. 예를 들어, 상기 SMPM 그룹 플래그의 값이 1인 경우를 기반으로, 상기 SMPM 모드 인덱스는 트런케이티드 유너리 기반으로 이진화되고, 상기 SMPM 그룹 플래그의 값이 0인 경우를 기반으로, 상기 SMPM 모드 인덱스는 고정 길이 기반으로 이진화될 수 있다. The binarization method of the above SMPM mode index can be determined differently based on the value of the SMPM group flag. For example, based on the case where the value of the SMPM group flag is 1, the SMPM mode index can be binarized based on a truncated unary basis, and based on the case where the value of the SMPM group flag is 0, the SMPM mode index can be binarized based on a fixed length basis.

상기 SMPM 모드 인덱스는 컨택스트 모델 기반으로 디코딩되고, 상기 SMPM 모드 인덱스의 컨택스트 모델은 상기 SMPM 그룹 플래그의 값을 기반으로 결정될 수 있다.The above SMPM mode index is decoded based on a context model, and the context model of the above SMPM mode index can be determined based on the value of the SMPM group flag.

디코딩 장치는 현재 블록에 대한 MPM 리스트를 도출한다(S1310).The decoding device derives the MPM list for the current block (S1310).

상기 MPM 리스트는 상기 현재 블록에 대한 인트라 예측 모드 후보들을 포함할 수 있다. 상기 MPM 리스트는 제1 MPM 리스트, 제2 MPM 리스트 및 제3 MPM 리스트를 포함할 수 있다. 이 경우, 상기 제2 MPM 리스트와 상기 제1 MPM 리스트는 서로 중첩되지 않고, 상기 제2 MPM 리스트와 상기 제3 MPM 리스트는 서로 중첩될 수 있다. 예를 들어, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제1 MPM 리스트에 포함되지 않고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제3 MPM 리스트에 포함될 수 있다. 상기 제1 MPM 리스트는 PMPM 리스트라고 불릴 수 있다. 상기 제2 MPM 리스트는 SMPM 리스트라고 불릴 수 있다. 상기 제3 MPM 리스트는 GMPM 리스트라고 불릴 수 있다. The above MPM list may include intra prediction mode candidates for the current block. The MPM list may include a first MPM list, a second MPM list, and a third MPM list. In this case, the second MPM list and the first MPM list may not overlap each other, and the second MPM list and the third MPM list may overlap each other. For example, candidates included in the second MPM list may not be included in the first MPM list, and candidates included in the second MPM list may be included in the third MPM list. The first MPM list may be called a PMPM list. The second MPM list may be called an SMPM list. The third MPM list may be called a GMPM list.

상기 MPM 리스트는 제1 인트라 예측 모드 그룹 및 제2 인트라 예측 모드 그룹을 기반으로 도출되고, 상기 제1 인트라 예측 모드 그룹은 상기 현재 블록의 주변 블록들의 인트라 예측 모드들을 포함하고, 상기 제2 인트라 예측 모드 그룹은 상기 현재 블록에 대한 DIMD(decoder side intra mode derivation) 기반 인트라 예측 모드들을 포함할 수 있다.The above MPM list is derived based on a first intra prediction mode group and a second intra prediction mode group, wherein the first intra prediction mode group includes intra prediction modes of surrounding blocks of the current block, and the second intra prediction mode group includes DIMD (decoder side intra mode derivation) based intra prediction modes for the current block.

상기 제2 인트라 예측 모드 그룹의 인트라 예측 모드는 상기 제1 인트라 예측 모드 그룹의 인트라 예측 모드보다 더 높은 우선순위를 갖고 상기 MPM 리스트의 더 앞쪽에 할당될 수 있다.The intra prediction mode of the second intra prediction mode group may have a higher priority than the intra prediction mode of the first intra prediction mode group and may be assigned earlier in the MPM list.

상기 제1 인트라 예측 모드 그룹의 인트라 예측 모드들 및 제2 인트라 예측 모드 그룹의 인트라 예측 모드들 간의 중첩되는 모드가 도출될 수 있다. 이 경우, 상기 중첩되는 모드는 중첩되지 않는 모드보다 더 높은 우선순위를 갖고 상기 MPM 리스트의 더 앞쪽에 할당될 수 있다.An overlapping mode between the intra prediction modes of the first intra prediction mode group and the intra prediction modes of the second intra prediction mode group can be derived. In this case, the overlapping mode has a higher priority than the non-overlapping mode and can be allocated to the front of the MPM list.

상기 제1 인트라 예측 모드 그룹의 인트라 예측 모드들 및 제2 인트라 예측 모드 그룹의 인트라 예측 모드들 간의 중첩되는 모드들이 도출될 수 있다. 상기 중첩되는 모드들이 복수인 경우, 상기 중첩되는 모드들 간의 우선순위는 상기 DIMD 기반 인트라 예측 모드들 간의 우선순위에 기반할 수 있다.Overlapping modes between the intra prediction modes of the first intra prediction mode group and the intra prediction modes of the second intra prediction mode group can be derived. When there are multiple overlapping modes, the priority between the overlapping modes can be based on the priority between the DIMD-based intra prediction modes.

상기 MPM 리스트는 제3 인트라 예측 모드 그룹을 더 기반으로 도출될 수 있다. 상기 제3 인트라 예측 모드 그룹은 HIPM(history-based intra prediction mode) 버퍼 내 히스토리 기반 인트라 예측 모드들을 포함할 수 있다.The above MPM list can be further derived based on a third intra prediction mode group. The third intra prediction mode group can include history-based intra prediction modes within a history-based intra prediction mode (HIPM) buffer.

상기 HIPM 버퍼는 상기 현재 블록이 위치하는 특정 영역의 이전에 디코딩되고 현재 블록에 인접하지 않는 블록들의 인트라 예측 모드를 포함할 수 있다. 상기 HIPM 버퍼 내의 인트라 예측 모드들은 상기 특정 영역 내 인트라 예측 모드의 발생 빈도를 기반으로 리오더링될 수 있다. 상기 특정 영역 내의 가용하지 않은 블록의 인트라 예측 모드는 소정의 인트라 예측 모드 또는 상기 특정 블록에 대한 DIMD 기반 인트라 예측 모드와 같게 설정될 수 있다. 상기 특정 영역 내의 인터 예측 또는 IBC(intra block copy) 예측 기반으로 코딩된 특정 블록의 인트라 예측 모드는 소정의 인트라 예측 모드 또는 상기 특정 블록에 대한 DIMD 기반 인트라 예측 모드와 같게 설정될 수 있다. 상기 소정의 인트라 예측 모드는 플래너 모드 또는 DC 모드일 수 있다. 상기 HIPM 버퍼는 CTU 행 단위로 초기화될 수 있다. 상기 HIPM 버퍼는 CTU, 복수의 CTU 행, 슬라이스 또는 타일 단위로 초기화될 수도 있다.The HIPM buffer may include intra prediction modes of previously decoded blocks of a specific area where the current block is located and which are not adjacent to the current block. The intra prediction modes in the HIPM buffer may be reordered based on the occurrence frequency of the intra prediction modes in the specific area. The intra prediction mode of an unavailable block in the specific area may be set to be the same as a predetermined intra prediction mode or a DIMD-based intra prediction mode for the specific block. The intra prediction mode of a specific block coded based on inter prediction or IBC (intra block copy) prediction in the specific area may be set to be the same as a predetermined intra prediction mode or a DIMD-based intra prediction mode for the specific block. The predetermined intra prediction mode may be a planar mode or a DC mode. The HIPM buffer may be initialized in units of CTU rows. The HIPM buffer may also be initialized in units of CTU, multiple CTU rows, slices, or tiles.

디코딩 장치는 상기 현재 블록의 인트라 예측 모드를 도출한다(S1320). 디코딩 장치는 상기 MPM 리스트 및 상기 예측 관련 정보를 기반으로 상기 현재 블록의 인트라 예측 모드를 도출할 수 있다.The decoding device derives the intra prediction mode of the current block (S1320). The decoding device can derive the intra prediction mode of the current block based on the MPM list and the prediction-related information.

디코딩 장치는 도출된 인트라 예측 모드를 기반으로 예측 샘플들을 생성한다(S1330). 예를 들어, 디코딩 장치는 도출된 인트라 예측 모드들 및 주변 참조 샘플들을 기반으로 상기 현재 블록에 대한 상기 예측 샘플들을 생성할 수 있다. 이 경우 상술한 바와 같이 경우에 따라 상기 현재 블록의 예측 샘플들 중 전부 또는 일부에 대한 예측 샘플 필터링 절차가 더 수행될 수 있다.The decoding device generates prediction samples based on the derived intra prediction mode (S1330). For example, the decoding device may generate the prediction samples for the current block based on the derived intra prediction modes and surrounding reference samples. In this case, as described above, a prediction sample filtering procedure may be further performed on all or part of the prediction samples of the current block, depending on the case.

디코딩 장치는 현재 블록의 예측 샘플들을 기반으로 복원 샘플들을 생성할 수 있다. 예를 들어, 디코딩 장치는 상기 현재 블록에 대한 레지듀얼 샘플들과 상기 예측 샘플들을 기반으로 상기 현재 블록에 대한 상기 복원 샘플들을 생성할 수 있다. 상기 현재 블록에 대한 상기 레지듀얼 샘플들은 수신된 레지듀얼 정보를 기반으로 생성될 수 있다. 또한, 디코딩 장치는 일예로, 상기 복원 샘플들을 포함하는 복원 픽처를 생성할 수 있다. 이후 상기 복원 픽처에 인루프 필터링 절차 등이 더 적용될 수 있음은 상술한 바와 같다. The decoding device can generate restoration samples based on prediction samples of the current block. For example, the decoding device can generate restoration samples for the current block based on residual samples for the current block and the prediction samples. The residual samples for the current block can be generated based on received residual information. In addition, the decoding device can generate a restoration picture including the restoration samples, for example. As described above, an in-loop filtering procedure, etc. can be further applied to the restoration picture.

상술한 실시예(들)에 따르면, 현재 블록에 적용되는 예측 모드를 효율적으로 지시할 수 있고, 사이드 정보의 데이터량을 줄일 수 있다. 또한, 주변 블록들과의 상관성(correlation) 뿐 아니라 주변 복원 샘플들과의 상관성을 같이 고려하여 MPM 리스트를 구성할 수 있고, 현재 블록의 인트라 예측 모드가 MPM 리스트의 상위 후보로 구성될 확률을 높일 수 있고, 인트라 예측 모드의 시그널링 효율을 높일 수 있다. According to the above-described embodiment(s), it is possible to efficiently indicate the prediction mode applied to the current block, and reduce the amount of data of side information. In addition, it is possible to construct an MPM list by considering not only the correlation with the surrounding blocks but also the correlation with the surrounding restoration samples, and it is possible to increase the probability that the intra prediction mode of the current block is constructed as a top candidate of the MPM list, and it is possible to increase the signaling efficiency of the intra prediction mode.

상술한 실시예에서, 방법들은 일련의 단계 또는 블록으로써 순서도를 기초로 설명되고 있지만, 해당 실시예는 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당업자라면 순서도에 나타내어진 단계들이 배타적이지 않고, 다른 단계가 포함되거나 순서도의 하나 또는 그 이상의 단계가 본 개시의 실시예들의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.In the above-described embodiments, the methods are described based on a flow chart as a series of steps or blocks, but the embodiments are not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps than those described above. Furthermore, those skilled in the art will appreciate that the steps depicted in the flow chart are not exclusive, and other steps may be included or one or more of the steps in the flow chart may be deleted without affecting the scope of the embodiments of the present disclosure.

상술한 본 개시의 실시예들에 따른 방법은 소프트웨어 형태로 구현될 수 있으며, 본 개시에 따른 인코딩 장치 및/또는 디코딩 장치는 예를 들어 TV, 컴퓨터, 스마트폰, 셋톱박스, 디스플레이 장치 등의 영상 처리를 수행하는 장치에 포함될 수 있다.The method according to the embodiments of the present disclosure described above may be implemented in the form of software, and the encoding device and/or the decoding device according to the present disclosure may be included in a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.

상술한 본 개시의 실시예는 컴퓨터에 의해 실행되는 프로그램 모듈과 같은 컴퓨터에 의해 실행가능한 (프로그램) 명령어를 포함하는 기록 매체의 형태로도 구현될 수 있다. 모듈은 메모리에 저장되고, 프로세서에 의해 실행될 수 있다. 메모리는 프로세서 내부 또는 외부에 있을 수 있고, 잘 알려진 다양한 수단으로 프로세서와 연결될 수 있다. 컴퓨터 판독 가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용 매체일 수 있고, 휘발성 및 비휘발성 매체, 분리형 및 비분리형 매체를 모두 포함한다. 또한, 컴퓨터 판독가능 매체는 컴퓨터 저장 매체 및 통신 매체를 모두 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보의 저장을 위한 임의의 방법 또는 기술로 구현된 휘발성 및 비휘발성, 분리형 및 비분리형 매체를 모두 포함한다. 통신 매체는 전형적으로 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈, 또는 반송파와 같은 변조된 데이터 신호의 기타 데이터, 또는 기타 전송 메커니즘을 포함하며, 임의의 정보 전달 매체를 포함한다. The above-described embodiments of the present disclosure may also be implemented in the form of a recording medium containing computer-executable (program) instructions, such as program modules, executed by a computer. The modules may be stored in a memory and executed by a processor. The memory may be internal or external to the processor and may be connected to the processor by various means known in the art. The computer-readable medium may be any available medium that can be accessed by a computer and includes both volatile and nonvolatile media, removable and non-removable media. In addition, the computer-readable medium may include both computer storage media and communication media. The computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer-readable instructions, data structures, program modules, or other data. The communication media typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave, or other transport mechanism, and includes any information delivery media.

또한 상술한 본 개시의 실시예는 컴퓨터에 의해 실행 가능한 명령어를 포함하는 컴퓨터 프로그램(또는 컴퓨터 프로그램 제품)으로 구현될 수도 있다. 컴퓨터 프로그램은 프로세서에 의해 처리되는 프로그래밍 가능한 기계 명령어를 포함하고, 고레벨 프로그래밍 언어(High-level Programming Language), 객체지향 프로그래밍 언어(Object-oriented Programming Language), 어셈블리 언어 또는 기계 언어 등으로 구현될 수 있다. 또한 컴퓨터 프로그램은 유형의 컴퓨터 판독가능 기록매체(예를 들어, 메모리, 하드디스크, 자기/광학 매체 또는 SSD(Solid-State Drive) 등)에 기록될 수 있다. In addition, the above-described embodiments of the present disclosure may be implemented as a computer program (or a computer program product) including instructions executable by a computer. The computer program includes programmable machine instructions processed by a processor, and may be implemented in a high-level programming language, an object-oriented programming language, an assembly language, or a machine language. In addition, the computer program may be recorded in a tangible computer-readable recording medium (e.g., a memory, a hard disk, a magnetic/optical medium, or a solid-state drive (SSD)).

따라서 상술한 본 개시의 실시예는 상술한 바와 같은 컴퓨터 프로그램이 컴퓨팅 장치에 의해 실행됨으로써 구현될 수 있다. 컴퓨팅 장치는 프로세서와, 메모리와, 저장 장치와, 메모리 및 고속 확장포트에 접속하고 있는 고속 인터페이스와, 저속 버스와 저장 장치에 접속하고 있는 저속 인터페이스 중 적어도 일부를 포함할 수 있다. 이러한 성분들 각각은 다양한 버스를 이용하여 서로 접속되어 있으며, 공통 머더보드에 탑재되거나 다른 적절한 방식으로 장착될 수 있다.Accordingly, the above-described embodiment of the present disclosure can be implemented by executing the computer program as described above by a computing device. The computing device can include at least some of a processor, a memory, a storage device, a high-speed interface connecting the memory and a high-speed expansion port, and a low-speed interface connecting the low-speed bus and the storage device. Each of these components is connected to each other using various buses, and can be mounted on a common motherboard or mounted in another suitable manner.

여기서 프로세서는 컴퓨팅 장치 내에서 명령어를 처리할 수 있는데, 이런 명령어로는, 예컨대 고속 인터페이스에 접속된 디스플레이처럼 외부 입력, 출력 장치상에 GUI(Graphic User Interface)를 제공하기 위한 그래픽 정보를 표시하기 위해 메모리나 저장 장치에 저장된 명령어를 들 수 있다. 다른 실시예로서, 다수의 프로세서 및/또는 다수의 버스가 적절히 다수의 메모리 및 메모리 형태와 함께 이용될 수 있다. 또한 프로세서는 독립적인 다수의 아날로그 및(또는) 디지털 프로세서를 포함하는 칩들이 이루는 칩셋으로 구현될 수 있다.Here, the processor may process instructions within the computing device, such as instructions stored in a memory or storage device for displaying graphical information for providing a GUI (Graphical User Interface) on an external input/output device, such as a display connected to a high-speed interface. In other embodiments, multiple processors and/or multiple buses may be utilized, as appropriate, together with multiple memories and memory types. Additionally, the processor may be implemented as a chipset comprising multiple independent analog and/or digital processors.

또한 메모리는 컴퓨팅 장치 내에서 정보를 저장한다. 일례로, 메모리는 휘발성 메모리 유닛 또는 그들의 집합으로 구성될 수 있다. 다른 예로, 메모리는 비휘발성 메모리 유닛 또는 그들의 집합으로 구성될 수 있다. 또한 메모리는 예컨대, 자기 혹은 광 디스크와 같이 다른 형태의 컴퓨터 판독 가능한 매체일 수도 있다.Memory also stores information within a computing device. For example, memory may be comprised of volatile memory units or a collection thereof. For another example, memory may be comprised of nonvolatile memory units or a collection thereof. Memory may also be another form of computer-readable media, such as, for example, a magnetic or optical disk.

그리고 저장장치는 컴퓨팅 장치에게 대용량의 저장공간을 제공할 수 있다. 저장 장치는 컴퓨터 판독 가능한 매체이거나 이런 매체를 포함하는 구성일 수 있으며, 예를 들어 SAN(Storage Area Network) 내의 장치들이나 다른 구성도 포함할 수 있고, 플로피 디스크 장치, 하드 디스크 장치, 광 디스크 장치, 혹은 테이프 장치, 플래시 메모리, 그와 유사한 다른 반도체 메모리 장치 혹은 장치 어레이일 수 있다.And the storage device can provide a large amount of storage space to the computing device. The storage device can be a computer-readable medium or a configuration including such a medium, and can include, for example, devices within a storage area network (SAN) or other configurations, and can be a floppy disk device, a hard disk device, an optical disk device, a tape device, flash memory, or other similar semiconductor memory device or array of devices.

또한, 네트워크는 근거리 통신망(Local Area Network; LAN), 광역 통신망(Wide Area Network; WAN) 또는 부가가치 통신망(Value Added Network; VAN) 등과 같은 유선 네트워크나 이동 통신망(mobile radio communication network) 또는 위성 통신망 등과 같은 다양한 종류의 무선 네트워크로 구현될 수 있다.Additionally, the network can be implemented as a wired network such as a Local Area Network (LAN), a Wide Area Network (WAN), or a Value Added Network (VAN), or as various types of wireless networks such as a mobile radio communication network or a satellite communication network.

이상에서 살펴본 본 개시는 도면에 도시된 실시예들을 참고로 하여 설명하였으나 이는 예시적인 것에 불과하며 당해 분야에서 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 실시예의 변형이 가능하다는 점을 이해할 것이다. 즉, 본 개시의 권리범위는 상술된 구현예에 한정되지 않으며 다음의 청구범위에서 정의하고 있는 구현예의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 구현예의 권리범위에 속하는 것이다. 따라서, 본 개시의 진정한 기술적 보호범위는 첨부된 청구범위의 기술적 사상에 의해서 정해져야 할 것이다.The present disclosure discussed above has been described with reference to the embodiments illustrated in the drawings, but this is merely exemplary, and those skilled in the art will understand that various modifications and variations of the embodiments are possible from this. That is, the scope of the present disclosure is not limited to the above-described implementation examples, and various modifications and improvements made by those skilled in the art using the basic concept of the implementation examples defined in the following claims also fall within the scope of the implementation examples. Therefore, the true technical protection scope of the present disclosure should be determined by the technical idea of the appended claims.

Claims (20)

디코딩 장치에 의하여 수행되는 영상 디코딩 방법에 있어서,In a video decoding method performed by a decoding device, 비트스트림을 통하여 예측 관련 정보를 획득하는 단계;A step of obtaining prediction-related information through a bitstream; 현재 블록에 대한 MPM(most probable mode) 리스트를 도출하는 단계;A step for deriving a list of most probable modes (MPMs) for the current block; 상기 MPM 리스트 및 상기 예측 관련 정보를 기반으로 상기 현재 블록의 인트라 예측 모드를 도출하는 단계; 및A step of deriving an intra prediction mode of the current block based on the above MPM list and the above prediction-related information; and 상기 도출된 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 생성하는 단계를 포함하고,A step of generating prediction samples for the current block based on the derived intra prediction mode is included. 상기 MPM 리스트는 제1 MPM 리스트, 제2 MPM 리스트 및 제3 MPM 리스트를 포함하고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제1 MPM 리스트에 포함되지 않고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제3 MPM 리스트에 포함되는 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the MPM list includes a first MPM list, a second MPM list, and a third MPM list, and candidates included in the second MPM list are not included in the first MPM list, and candidates included in the second MPM list are included in the third MPM list. 제1항에 있어서,In the first paragraph, 상기 MPM 리스트는 제1 인트라 예측 모드 그룹 및 제2 인트라 예측 모드 그룹을 기반으로 도출되고,The above MPM list is derived based on the first intra prediction mode group and the second intra prediction mode group, 상기 제1 인트라 예측 모드 그룹은 상기 현재 블록의 주변 블록들의 인트라 예측 모드들을 포함하고,The above first intra prediction mode group includes intra prediction modes of surrounding blocks of the current block, 상기 제2 인트라 예측 모드 그룹은 상기 현재 블록에 대한 DIMD(decoder side intra mode derivation) 기반 인트라 예측 모드들을 포함하는 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the second intra prediction mode group includes DIMD (decoder side intra mode derivation) based intra prediction modes for the current block. 제2항에 있어서In the second paragraph 상기 제2 인트라 예측 모드 그룹의 인트라 예측 모드는 상기 제1 인트라 예측 모드 그룹의 인트라 예측 모드보다 더 높은 우선순위를 갖고 상기 MPM 리스트의 더 앞쪽에 할당되는 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the intra prediction mode of the second intra prediction mode group has a higher priority than the intra prediction mode of the first intra prediction mode group and is allocated to a higher position in the MPM list. 제2항에 있어서In the second paragraph 상기 제1 인트라 예측 모드 그룹의 인트라 예측 모드들 및 제2 인트라 예측 모드 그룹의 인트라 예측 모드들 간의 중첩되는 모드를 도출하는 단계를 더 포함하고,Further comprising a step of deriving an overlapping mode between the intra prediction modes of the first intra prediction mode group and the intra prediction modes of the second intra prediction mode group, 상기 중첩되는 모드는 중첩되지 않는 모드보다 더 높은 우선순위를 갖고 상기 MPM 리스트의 더 앞쪽에 할당되는 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the overlapping mode has a higher priority than the non-overlapping mode and is allocated to a higher position in the MPM list. 제2항에 있어서,In the second paragraph, 상기 제1 인트라 예측 모드 그룹의 인트라 예측 모드들 및 제2 인트라 예측 모드 그룹의 인트라 예측 모드들 간의 중첩되는 모드들을 도출하는 단계를 더 포함하고,Further comprising a step of deriving overlapping modes between intra prediction modes of the first intra prediction mode group and intra prediction modes of the second intra prediction mode group, 상기 중첩되는 모드들이 복수인 경우, 상기 중첩되는 모드들 간의 우선순위는 상기 DIMD 기반 인트라 예측 모드들 간의 우선순위에 기반하는 것을 특징으로 하는, 영상 디코딩 방법.An image decoding method, characterized in that when there are multiple overlapping modes, the priority between the overlapping modes is based on the priority between the DIMD-based intra prediction modes. 제1항에 있어서,In the first paragraph, 상기 MPM 리스트는 제3 인트라 예측 모드 그룹을 더 기반으로 도출되고,The above MPM list is derived further based on the third intra prediction mode group, 상기 제3 인트라 예측 모드 그룹은 HIPM(history-based intra prediction mode) 버퍼 내 히스토리 기반 인트라 예측 모드들을 포함하는 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the third intra prediction mode group includes history-based intra prediction modes within a HIPM (history-based intra prediction mode) buffer. 제6항에 있어서,In Article 6, 상기 HIPM 버퍼는 상기 현재 블록이 위치하는 특정 영역의 이전에 디코딩되고 현재 블록에 인접하지 않는 블록들의 인트라 예측 모드를 포함하는 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the HIPM buffer includes intra prediction modes of blocks that were previously decoded in a specific area where the current block is located and are not adjacent to the current block. 제7항에 있어서,In Article 7, 상기 HIPM 버퍼 내의 인트라 예측 모드들은 상기 특정 영역 내 인트라 예측 모드의 발생 빈도를 기반으로 리오더링되는 것을 특징으로 하는, 영상 디코딩 방법.An image decoding method, characterized in that the intra prediction modes within the HIPM buffer are reordered based on the occurrence frequency of the intra prediction mode within the specific region. 제7항에 있어서,In Article 7, 상기 특정 영역 내의 인터 예측 또는 IBC(intra block copy) 예측 기반으로 코딩된 특정 블록의 인트라 예측 모드는 소정의 인트라 예측 모드 또는 상기 특정 블록에 대한 DIMD 기반 인트라 예측 모드와 같게 설정되는 것을 특징으로 하는, 영상 디코딩 방법 An image decoding method, characterized in that the intra prediction mode of a specific block coded based on inter prediction or IBC (intra block copy) prediction within the specific region is set to be the same as a predetermined intra prediction mode or a DIMD-based intra prediction mode for the specific block. 제6항에 있어서In Article 6 상기 HIPM 버퍼는 CTU 행 단위로 초기화되는 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the above HIPM buffer is initialized in units of CTU rows. 제1항에 있어서, In the first paragraph, 상기 예측 관련 정보는 PMPM 플래그, PMPM 인덱스, SMPM 플래그, SMPM 그룹 인덱스 또는 SMPM 모드 인덱스 중 적어도 하나를 포함하고,The above prediction related information includes at least one of a PMPM flag, a PMPM index, an SMPM flag, an SMPM group index, or an SMPM mode index, 상기 PMPM 플래그는 상기 현재 블록의 인트라 예측 모드가 상기 제1 MPM 리스트에 존재하는지 여부를 지시하고,The above PMPM flag indicates whether the intra prediction mode of the current block exists in the first MPM list, 상기 PMPM 인덱스는 상기 제1 MPM 리스트 내에서 후보를 지시하기 위한 인덱스이고,The above PMPM index is an index for indicating a candidate within the first MPM list, 상기 SMPM 플래그는 상기 현재 블록의 상기 인트라 예측 모드가 상기 제2 MPM 리스트에 존재하는지 여부를 지시하고,The above SMPM flag indicates whether the intra prediction mode of the current block exists in the second MPM list, 상기 SMPM 그룹 인덱스는 상기 제2 MPM 리스트 내에서 SMPM 그룹을 지시하기 위한 인덱스이고,The above SMPM group index is an index for indicating an SMPM group within the second MPM list, 상기 SMPM 모드 인덱스는 상기 SMPM 그룹 내 후보를 지시하기 위한 인덱스이며,The above SMPM mode index is an index for indicating a candidate within the above SMPM group. 상기 SMPM 그룹 인덱스 및 상기 SMPM 모드 인덱스는 상기 SMPM 플래그의 값이 1인 경우에 시그널링되는 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the SMPM group index and the SMPM mode index are signaled when the value of the SMPM flag is 1. 제11항에 있어서In Article 11 상기 SMPM 모드 인덱스의 이진화 방법은 상기 SMPM 그룹 인덱스의 값을 기반으로 다르게 결정되는 것을 특징으로 하는, 영상 디코딩 방법.An image decoding method, characterized in that the binarization method of the above SMPM mode index is determined differently based on the value of the above SMPM group index. 제11항에 있어서In Article 11 상기 SMPM 모드 인덱스는 컨택스트 모델 기반으로 디코딩되고,The above SMPM mode index is decoded based on the context model, 상기 SMPM 모드 인덱스의 컨택스트 모델은 상기 SMPM 그룹 인덱스의 값을 기반으로 결정되는 것을 특징으로 하는, 영상 디코딩 방법.An image decoding method, characterized in that the context model of the above SMPM mode index is determined based on the value of the above SMPM group index. 제11항에 있어서In Article 11 상기 SMPM 그룹 인덱스는 제1 SMPM 그룹 또는 제2 SMPM 그룹을 가리키고,The above SMPM group index points to the first SMPM group or the second SMPM group, 상기 제1 SMPM 그룹의 후보 개수는 상기 제2 SMPM 그룹의 후보 개수와 다른 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the number of candidates of the first SMPM group is different from the number of candidates of the second SMPM group. 제1항에 있어서, In the first paragraph, 상기 예측 관련 정보는 PMPM 플래그, PMPM 인덱스, SMPM 플래그, SMPM 그룹 플래그 또는 SMPM 모드 인덱스 중 적어도 하나를 포함하고,The above prediction related information includes at least one of a PMPM flag, a PMPM index, an SMPM flag, an SMPM group flag or an SMPM mode index, 상기 PMPM 플래그는 상기 현재 블록의 인트라 예측 모드가 상기 제1 MPM 리스트에 존재하는지 여부를 지시하고,The above PMPM flag indicates whether the intra prediction mode of the current block exists in the first MPM list, 상기 PMPM 인덱스는 상기 제1 MPM 리스트 내에서 후보를 지시하기 위한 인덱스이고,The above PMPM index is an index for indicating a candidate within the first MPM list, 상기 SMPM 플래그는 상기 현재 블록의 상기 인트라 예측 모드가 상기 제2 MPM 리스트에 존재하는지 여부를 지시하고,The above SMPM flag indicates whether the intra prediction mode of the current block exists in the second MPM list, 상기 SMPM 그룹 플래그는 상기 제2 MPM 리스트 내에서 SMPM 그룹을 지시하기 위한 인덱스이고,The above SMPM group flag is an index for indicating an SMPM group within the second MPM list, 상기 SMPM 모드 인덱스는 상기 SMPM 그룹 내 후보를 지시하기 위한 인덱스이며,The above SMPM mode index is an index for indicating a candidate within the above SMPM group. 상기 SMPM 그룹 플래그 및 상기 SMPM 모드 인덱스는 상기 SMPM 플래그의 값이 1인 경우에 시그널링되는 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the SMPM group flag and the SMPM mode index are signaled when the value of the SMPM flag is 1. 제15항에 있어서In Article 15 상기 SMPM 모드 인덱스의 이진화 방법은 상기 SMPM 그룹 플래그의 값을 기반으로 다르게 결정되는 것을 특징으로 하는, 영상 디코딩 방법.An image decoding method, characterized in that the binarization method of the above SMPM mode index is determined differently based on the value of the above SMPM group flag. 제16항에 있어서,In Article 16, 상기 SMPM 그룹 플래그의 값이 1인 경우를 기반으로, 상기 SMPM 모드 인덱스는 트런케이티드 유너리 기반으로 이진화되고,Based on the case where the value of the above SMPM group flag is 1, the above SMPM mode index is binarized based on truncated unitary, 상기 SMPM 그룹 플래그의 값이 0인 경우를 기반으로, 상기 SMPM 모드 인덱스는 고정 길이 기반으로 이진화되는 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the SMPM mode index is binarized based on a fixed length when the value of the above SMPM group flag is 0. 제15항에 있어서In Article 15 상기 SMPM 모드 인덱스는 컨택스트 모델 기반으로 디코딩되고,The above SMPM mode index is decoded based on the context model, 상기 SMPM 모드 인덱스의 컨택스트 모델은 상기 SMPM 그룹 플래그의 값을 기반으로 결정되는 것을 특징으로 하는, 영상 디코딩 방법.A video decoding method, characterized in that the context model of the above SMPM mode index is determined based on the value of the above SMPM group flag. 인코딩 장치에 의하여 수행되는 영상 인코딩 방법에 있어서,In a video encoding method performed by an encoding device, 현재 블록에 대한 MPM(most probable mode) 리스트를 도출하는 단계; 및A step for deriving a list of most probable modes (MPMs) for the current block; and 상기 현재 블록의 인트라 예측 모드를 도출하는 단계; A step of deriving an intra prediction mode of the current block; 상기 MPM 리스트를 기반으로 상기 현재 블록의 인트라 예측 모드를 지시하기 위한 예측 관련 정보를 생성하는 단계; 및A step of generating prediction-related information for indicating an intra prediction mode of the current block based on the above MPM list; and 상기 예측 관련 정보를 포함하는 영상 정보를 인코딩하는 단계를 포함하고,Comprising a step of encoding image information including the above prediction-related information, 상기 MPM 리스트는 제1 MPM 리스트, 제2 MPM 리스트 및 제3 MPM 리스트를 포함하고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제1 MPM 리스트에 포함되지 않고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제3 MPM 리스트에 포함되는 것을 특징으로 하는, 영상 인코딩 방법.A video encoding method, characterized in that the MPM list includes a first MPM list, a second MPM list, and a third MPM list, and candidates included in the second MPM list are not included in the first MPM list, and candidates included in the second MPM list are included in the third MPM list. 영상 데이터에 대한 전송 방법에 있어서,In a transmission method for image data, 영상 인코딩 방법에 의하여 생성된 비트스트림을 획득하되, 상기 영상 인코딩 방법은 현재 블록에 대한 MPM(most probable mode) 리스트를 도출하는 단계, 및 상기 현재 블록의 인트라 예측 모드를 도출하는 단계, 상기 MPM 리스트를 기반으로 상기 현재 블록의 인트라 예측 모드를 지시하기 위한 예측 관련 정보를 생성하는 단계, 및 상기 예측 관련 정보를 포함하는 영상 정보를 인코딩하는 단계를 포함하는 단계; 및Obtaining a bitstream generated by an image encoding method, wherein the image encoding method comprises the steps of: deriving a most probable mode (MPM) list for a current block; deriving an intra prediction mode of the current block; generating prediction-related information for indicating the intra prediction mode of the current block based on the MPM list; and encoding image information including the prediction-related information; and 상기 비트스트림을 포함하는 영상 데이터를 전송하는 단계를 포함하고,Comprising a step of transmitting image data including the above bitstream, 상기 MPM 리스트는 제1 MPM 리스트, 제2 MPM 리스트 및 제3 MPM 리스트를 포함하고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제1 MPM 리스트에 포함되지 않고, 상기 제2 MPM 리스트에 포함된 후보들은 상기 제3 MPM 리스트에 포함되는 것을 특징으로 하는, 전송 방법.A transmission method, characterized in that the MPM list includes a first MPM list, a second MPM list, and a third MPM list, and candidates included in the second MPM list are not included in the first MPM list, and candidates included in the second MPM list are included in the third MPM list.
PCT/KR2025/000175 2024-01-08 2025-01-03 Intra prediction-based image coding method, and device therefor Pending WO2025150789A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR10-2024-0003092 2024-01-08
KR20240003092 2024-01-08
KR1020250000974A KR20250108525A (en) 2024-01-08 2025-01-03 Intra prediction based image coding method and apparatus therefor
KR10-2025-0000974 2025-01-03

Publications (1)

Publication Number Publication Date
WO2025150789A1 true WO2025150789A1 (en) 2025-07-17

Family

ID=96387104

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2025/000175 Pending WO2025150789A1 (en) 2024-01-08 2025-01-03 Intra prediction-based image coding method, and device therefor

Country Status (1)

Country Link
WO (1) WO2025150789A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180008797A (en) * 2015-06-15 2018-01-24 엘지전자 주식회사 Intra prediction mode based image processing method and apparatus therefor
KR20180043149A (en) * 2016-10-19 2018-04-27 에스케이텔레콤 주식회사 Apparatus and Method for Video Encoding or Decoding
KR102398642B1 (en) * 2011-10-24 2022-05-17 유한회사 제이에이치스트림 Method and apparatus for encoding intra prediction information
WO2022271756A1 (en) * 2021-06-21 2022-12-29 Beijing Dajia Internet Information Technology Co., Ltd. Video coding using multi-direction intra prediction
KR102540190B1 (en) * 2018-10-05 2023-06-08 엘지전자 주식회사 Intra prediction-based image coding method and apparatus using mpm list

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102398642B1 (en) * 2011-10-24 2022-05-17 유한회사 제이에이치스트림 Method and apparatus for encoding intra prediction information
KR20180008797A (en) * 2015-06-15 2018-01-24 엘지전자 주식회사 Intra prediction mode based image processing method and apparatus therefor
KR20180043149A (en) * 2016-10-19 2018-04-27 에스케이텔레콤 주식회사 Apparatus and Method for Video Encoding or Decoding
KR102540190B1 (en) * 2018-10-05 2023-06-08 엘지전자 주식회사 Intra prediction-based image coding method and apparatus using mpm list
WO2022271756A1 (en) * 2021-06-21 2022-12-29 Beijing Dajia Internet Information Technology Co., Ltd. Video coding using multi-direction intra prediction

Similar Documents

Publication Publication Date Title
WO2020071830A1 (en) Image coding method using history-based motion information, and device therefor
WO2020246849A1 (en) Transform-based image coding method and device for same
WO2020256389A1 (en) Bdpcm-based image decoding method and device for same
WO2020218793A1 (en) Bdpcm-based image coding method and device therefor
WO2020141879A1 (en) Affine motion prediction-based video decoding method and device using subblock-based temporal merge candidate in video coding system
WO2021040400A1 (en) Image or video coding based on palette mode
WO2020231140A1 (en) Adaptive loop filter-based video or image coding
WO2021040402A1 (en) Image or video coding based on palette coding
WO2020167097A1 (en) Derivation of inter-prediction type for inter prediction in image coding system
WO2021137597A1 (en) Image decoding method and device using dpb parameter for ols
WO2020235960A1 (en) Image decoding method using bdpcm and device therefor
WO2021125700A1 (en) Prediction weighted table-based image/video coding method and apparatus
WO2021091252A1 (en) Method and device for processing image information for image/video coding
WO2021040398A1 (en) Image or video coding based on palette escape coding
WO2023128705A1 (en) Method and device for coding intra prediction mode
WO2023128703A1 (en) Intra-prediction method and device based on intra-prediction mode derivation
WO2020256345A1 (en) Context coding for information on transform kernel set in image coding system
WO2020149616A1 (en) Method and device for decoding image on basis of cclm prediction in image coding system
WO2020076028A1 (en) Transform coefficient coding method and device
WO2021101066A1 (en) Image coding method based on entry point-related information in video or image coding system
WO2021091256A1 (en) Image/video coding method and device
WO2021034160A1 (en) Matrix intra prediction-based image coding apparatus and method
WO2024043745A1 (en) Intra prediction mode-based image encoding/decoding method and apparatus using multi reference line (mrl), and recording medium for storing bitstream
WO2023132679A1 (en) Inter prediction method and device using secondary list
WO2023182634A1 (en) Image decoding method and device

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: 25738864

Country of ref document: EP

Kind code of ref document: A1