Method and apparatus for encoding / decoding an image based on intra prediction, and method for transmitting a bitstream

By using intra-frame prediction techniques based on DIMD and TIMD to generate intra-frame prediction blocks using template regions, the problem of low coding efficiency in high-resolution images is solved, achieving more efficient encoding and decoding, and reducing transmission and storage costs.

CN122122901APending Publication Date: 2026-05-29LG ELECTRONICS INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LG ELECTRONICS INC
Filing Date
2024-10-29
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies are inefficient in encoding high-resolution and high-quality images, leading to increased transmission and storage costs.

Method used

Intra-prediction techniques based on DIMD and TIMD are adopted. Intra-prediction blocks are generated by determining template regions, intra-prediction modes are derived using gradient or template cost methods, and prediction performance is optimized by combining weights.

Benefits of technology

It improves the efficiency of image encoding and decoding, enhances encoding quality and performance, and reduces transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122122901A_ABST
    Figure CN122122901A_ABST
Patent Text Reader

Abstract

Image encoding / decoding methods and apparatuses are provided. An image decoding method performed by an image decoding apparatus according to one embodiment of the disclosure includes determining a search region for prediction of a current block, and generating an intra prediction block based on the search region, wherein the intra prediction block is generated based on an intra prediction mode derived by using the search region, the intra prediction mode is derived based on derivation method information indicating an intra prediction mode derivation method, and the derivation method information indicates one of a method using gradients of the search region or a method using error values of the search region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to image encoding / decoding methods and apparatus, and more specifically, to image encoding / decoding methods and apparatus based on intra-frame prediction, and to a method for transmitting a bitstream generated by the image encoding method / apparatus of this disclosure. Background Technology

[0002] Recently, there has been an increasing demand for high-resolution and high-quality images, such as high-definition (HD) and ultra-high-definition (UHD) images, across various fields. With the increase in image data resolution and quality, the amount of information or bits transmitted increases relatively compared to existing image data. This increase in the amount of information or bits transmitted leads to increased transmission and storage costs.

[0003] Therefore, efficient image compression technology is needed to effectively send, store, and reproduce information about high-resolution and high-quality images. Summary of the Invention

[0004] Technical issues

[0005] The purpose of this disclosure is to provide a video encoding / decoding method and apparatus with improved encoding / decoding efficiency.

[0006] Another object of this disclosure is to provide image or video encoding / decoding methods and devices.

[0007] Another object of this disclosure is to provide an image coding technique using intra-frame prediction based on DIMD (decoder-side intra-frame mode derivation) and / or TIMD (substrate-based intra-frame mode derivation).

[0008] Another objective of this disclosure is to provide an image coding technique for executing signaling related to predictive patterns.

[0009] Another object of this disclosure is to provide a method or apparatus for transmitting a bitstream generated by a video encoding method or apparatus according to this disclosure.

[0010] Another object of this disclosure is to provide a recording medium for storing a bitstream generated by an image encoding method or apparatus according to this disclosure.

[0011] Another object of this disclosure is to provide a recording medium for storing a bitstream received, decoded, and used to reconstruct an image by an image decoding apparatus according to this disclosure.

[0012] The technical problems solved by this disclosure are not limited to those described above, and other technical problems not described herein will become apparent to those skilled in the art from the following description.

[0013] Technical solution

[0014] According to embodiments of this disclosure, a video decoding method includes the following steps: determining a template region for prediction of a current block; and generating an intra-prediction block based on the template region, wherein the intra-prediction block is generated according to an intra-prediction mode derived from the template region, and wherein the intra-prediction mode is derived based on derivation method information of a specified intra-prediction mode derivation method, and wherein the derivation method information may specify at least one of a gradient-based method or a template cost-based method based on the template region.

[0015] Furthermore, according to embodiments of this disclosure, the derivation method information may be obtained from a bitstream.

[0016] Furthermore, according to embodiments of this disclosure, the number of intra-frame prediction blocks can be determined based on specific conditions.

[0017] Furthermore, according to embodiments of this disclosure, specific conditions may be related to the magnitude of each intra-frame prediction mode based on gradients.

[0018] Furthermore, according to embodiments of this disclosure, specific conditions can be derived based on prediction mode condition information obtained from the bitstream.

[0019] Furthermore, according to embodiments of this disclosure, intra-frame prediction blocks may include prediction blocks generated based on planar patterns.

[0020] Furthermore, according to embodiments of this disclosure, whether to use a planar mode can be determined based on information obtained from the bitstream.

[0021] Furthermore, according to embodiments of this disclosure, the weight for an intra-prediction block can be determined based on the distance between the current block and samples in the template region.

[0022] Furthermore, according to embodiments of this disclosure, the weights can be determined for each sample line in the template region.

[0023] According to an embodiment of the present disclosure, a video coding method includes the following steps: determining a template region for prediction of a current block; and generating an intra-prediction block based on the template region, wherein the intra-prediction block is generated according to an intra-prediction mode derived based on the template region, and wherein the intra-prediction mode may be derived based on at least one of a gradient-based method or a template cost-based method based on the template region.

[0024] According to embodiments of this disclosure, a bitstream generated by a video encoding device or a video encoding method can be transmitted.

[0025] According to embodiments of this disclosure, a bitstream generated by a video encoding method can be stored or recorded on a computer-readable medium.

[0026] According to embodiments of this disclosure, a bitstream generated by a video encoding method can be sent by a bitstream transmission device.

[0027] The features briefly outlined above are merely exemplary aspects of the detailed description of this disclosure that will follow, and do not limit the scope of this disclosure.

[0028] Beneficial effects

[0029] According to this disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.

[0030] According to this disclosure, video encoding / decoding technologies with improved encoding quality and performance can be provided.

[0031] According to this disclosure, when an image or video is intra-frame encoded, prediction performance can be improved by combining multiple prediction blocks.

[0032] According to this disclosure, when an image or video is intra-coded, the intra-prediction mode can be efficiently derived on the decoder side.

[0033] According to this disclosure, intra-prediction modes can be efficiently derived by combining features of the decoder-side intra-prediction mode derivation method and the template region-based intra-prediction mode derivation method.

[0034] According to this disclosure, coding efficiency can be improved by using a method that derives intra-prediction modes more accurately by applying weights to costs associated with template regions.

[0035] According to this disclosure, a method or apparatus may be provided for transmitting a bitstream generated by a video encoding method or apparatus according to this disclosure.

[0036] According to this disclosure, a recording medium for storing a bitstream generated by an image encoding method or apparatus according to this disclosure can be provided.

[0037] According to this disclosure, a recording medium may be provided for storing a bitstream received, decoded, and used to reconstruct an image by an image decoding apparatus according to this disclosure.

[0038] Those skilled in the art will appreciate that the effects achievable through this disclosure are not limited to those specifically described above, and that other advantages of this disclosure will become clearer from the detailed description. Attached Figure Description

[0039] Figure 1 This is a view schematically illustrating a video encoding system to which embodiments of this disclosure are applicable.

[0040] Figure 2 This is a schematic view illustrating an image encoding apparatus to which embodiments of the present disclosure are applicable.

[0041] Figure 3 This is a schematic view illustrating an image decoding apparatus to which embodiments of the present disclosure are applicable.

[0042] Figure 4 The diagram schematically illustrates the TIMD (template-based intra-frame mode derivation) technique that can be applied according to embodiments of the present disclosure.

[0043] Figure 5 and Figure 6 The diagram schematically illustrates the DIMD (decoder-side intra-frame mode derivation) technique that can be applied according to embodiments of the present disclosure.

[0044] Figure 7 This is a diagram used to illustrate a video encoding method or a video decoding method according to embodiments of the present disclosure.

[0045] Figure 8 This is a diagram used to illustrate the template area of ​​the current block applicable to embodiments of this disclosure.

[0046] Figure 9 This is a diagram used to illustrate a video encoding method and / or a video decoding method according to embodiments of the present disclosure.

[0047] Figure 10 This is a diagram illustrating the process of obtaining a weight for the cost of a template region applicable to embodiments of this disclosure.

[0048] Figure 11 This is a diagram illustrating a video decoding method according to an embodiment of the present disclosure.

[0049] Figure 12 This is a diagram illustrating a video coding method according to an embodiment of the present disclosure.

[0050] Figure 13 This is a diagram illustrating an example of a content streaming system to which embodiments of the present disclosure can be applied. Detailed Implementation

[0051] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings to facilitate implementation by those skilled in the art. However, this disclosure can be implemented in various different forms and is not limited to the embodiments described herein.

[0052] In describing this disclosure, detailed descriptions of relevant known functions or constructions will be omitted if they unnecessarily obscure the scope of this disclosure. In the accompanying drawings, portions irrelevant to the description of this disclosure are omitted, and similar reference numerals are assigned to similar portions.

[0053] In this disclosure, when a component is "connected," "coupled," or "linked" to another component, it may include not only direct connections but also indirect connections where intermediate components exist. Furthermore, when a component "comprises" or "has" other components, unless otherwise stated, it means that other components may be included, not excluded.

[0054] In this disclosure, the terms first, second, etc., are used only for the purpose of distinguishing one component from other components and do not limit the order or importance of the components unless otherwise stated. Accordingly, within the scope of this disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly, a second component in one embodiment may be referred to as a first component in another embodiment.

[0055] In this disclosure, the components are distinguished from each other to clearly describe each feature, but this does not mean that the components must be separate. That is, multiple components may be integrated into a single hardware or software unit, or a single component may be distributed and implemented across multiple hardware or software units. Therefore, unless otherwise specified, implementations of these integrated or distributed components are included within the scope of this disclosure.

[0056] In this disclosure, the components described in the various embodiments are not necessarily essential components, and some components may be optional. Therefore, embodiments consisting of a subset of the components described in the embodiments are also included within the scope of this disclosure. Furthermore, embodiments that include other components in addition to those described in the various embodiments are also included within the scope of this disclosure.

[0057] This disclosure relates to the encoding and decoding of images. Unless redefined in this disclosure, the terms used herein may have the general meaning commonly used in the art to which this disclosure pertains.

[0058] In this disclosure, "image" generally refers to a unit representing an image within a specific time period, while a slice / tile is a coding unit that constitutes part of an image. An image can be composed of one or more slices / tiles. Furthermore, a slice / tile may include one or more coding tree units (CTUs).

[0059] In this disclosure, "pixel" or "pixel" can refer to the smallest single element that constitutes a picture (or image). Additionally, "sample" can be used as a term corresponding to a pixel. A sample can generally represent a pixel or a pixel value, or it can represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chrominance component.

[0060] In this disclosure, "unit" can refer to a basic unit of image processing. A unit may include at least one of a specific region of an image and information associated with that region. In some cases, the term "unit" may be used interchangeably with terms such as "sample array," "block," or "region." Generally, an M×N block may include a set (or array) of samples (or transform coefficients) with M columns and N rows.

[0061] In this disclosure, "current block" can mean one of "current coding block," "current coding unit," "coding target block," "decoding target block," or "processing target block." When performing prediction, "current block" can mean "current prediction block" or "prediction target block." When performing transform (inverse transform) / quantization (dequantization), "current block" can mean "current transform block" or "transform target block." When performing filtering, "current block" can mean "filter target block."

[0062] Furthermore, in this disclosure, unless explicitly stated as a chroma block, "current block" may mean "the luminance block of the current block". "The chroma block of the current block" can be expressed by including an explicit description of a chroma block such as "chroma block" or "current chroma block".

[0063] In this disclosure, the forward slash " / " or "," can be interpreted as indicating "and / or". For example, "A / B" and "A, B" can mean "A and / or B". Furthermore, "A / B / C" and "A / B / C" can mean "at least one of A, B and / or C".

[0064] In this disclosure, the term "or" should be interpreted to indicate "and / or". For example, the expression "A or B" may include 1) only "A", 2) only "B", or 3) both "A and B". In other words, in this disclosure, "or" should be interpreted to indicate "additionally or alternatively".

[0065] Video Coding System Overview

[0066] Figure 1 This is a schematic view of a video encoding system according to the present disclosure.

[0067] The video encoding system according to the embodiment may include an encoding device 10 and a decoding device 20. The encoding device 10 can deliver encoded video and / or image information or data to the decoding device 20 in the form of a file or stream via a digital storage medium or network.

[0068] The encoding apparatus 10 according to an embodiment may include a video source generator 11, an encoding unit 12, and a transmitter 13. The decoding apparatus 20 according to an embodiment may include a receiver 21, a decoding unit 22, and a renderer 23. The encoding unit 12 may be referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as a video / image decoding unit. The transmitter 13 may be included in the encoding unit 12. The receiver 21 may be included in the decoding unit 22. The renderer 23 may include a display, and the display may be configured as a separate device or an external component.

[0069] The video source generator 11 can acquire video / images through a process of capturing, compositing, or generating video / images. The video source generator 11 may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive including previously captured video / images, etc. The video / image generation device may include, for example, a computer, tablet computer, and smartphone, and can generate video / images (electronically). For example, virtual video / images can be generated by a computer, etc. In this case, the video / image capture process can be replaced by a process of generating related data.

[0070] The encoding unit 12 can encode the input video / image. For compression and encoding efficiency, the encoding unit 12 can perform a series of processes, such as prediction, transformation, and quantization. The encoding unit 12 can output encoded data (encoded video / image information) in the form of a bitstream.

[0071] The transmitter (13) can acquire encoded video / image information or data output in bitstream form and can transmit it to the receiver (21) of the decoding device (20) or another external object in the form of a file or stream via a digital storage medium or network. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter (13) may include elements for generating media files in a predetermined file format and may include elements for transmission via a broadcast / communication network. The transmitter (13) may be provided as a transmitting device separate from the encoding device (10), and in this case, the transmitting device may include: at least one processor that acquires encoded video / image information or data output in bitstream form; and a transmitter that transmits the encoded video / image information or data in the form of a file or stream. The receiver (21) can extract / receive the bitstream from the storage medium or network and can transmit it to the decoder (22).

[0072] The decoder (22) can decode video / images by performing a series of processes (such as dequantization, inverse transform and prediction) corresponding to the operations of the encoder (12).

[0073] The renderer (23) can render decoded video / images. The rendered video / images can be displayed on a monitor.

[0074] Overview of Image Encoding Devices

[0075] Figure 2 This is a schematic view illustrating an image encoding apparatus to which embodiments of the present disclosure are applicable.

[0076] like Figure 2 As shown, the image encoding apparatus 100 may include an image partitioner 110, a subtractor 115, a transformer 120, a quantizer 130, a dequantizer 140, an inverse transformer 150, an adder 155, a filter 160, a memory 170, an inter-frame prediction unit 180, an intra-frame prediction unit 185, and an entropy encoder 190. The inter-frame prediction unit 180 and the intra-frame prediction unit 185 may be collectively referred to as "prediction units". The transformer 120, quantizer 130, dequantizer 140, and inverse transformer 150 may be included in a residual processor. The residual processor may also include a subtractor 115.

[0077] In some implementations, all or at least some of the components configuring the image encoding apparatus 100 may be configured by a single hardware component (e.g., an encoder or a processor). Furthermore, the memory 170 may include a decoded image buffer (DPB) and may be configured by a digital storage medium.

[0078] Image partitioner 110 can partition an input image (or picture or frame) input to image encoding apparatus 100 into one or more processing units. For example, a processing unit may be called an encoding unit (CU). Encoding units can be obtained by recursively partitioning encoding tree units (CTUs) or maximum encoding units (LCUs) according to a quadtree / binary tree / tritree (QT / BT / TT) structure. For example, an encoding unit can be partitioned into multiple encoding units of greater depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. For partitioning encoding units, a quadtree structure can be applied first, followed by a binary tree structure and / or a ternary tree structure. The encoding process according to this disclosure can be performed based on the final encoding unit that is no longer partitioned. The maximum encoding unit can be used as the final encoding unit, or a deeper encoding unit obtained by partitioning the maximum encoding unit can be used as the final encoding unit. Here, the encoding process may include prediction, transformation, and reconstruction processes, which will be described later. As another example, the processing unit of the encoding process may be a prediction unit (PU) or a transformation unit (TU). Prediction and transform units can be segmented or partitioned from the final coding unit. The prediction unit can be a sample prediction unit, and the transform unit can be a unit for deriving transform coefficients and / or a unit for deriving the residual signal from the transform coefficients.

[0079] The prediction unit (inter-frame prediction unit 180 or intra-frame prediction unit 185) can perform prediction on the block to be processed (the current block) and generate a prediction block that includes prediction samples of the current block. The prediction unit can determine whether to apply intra-frame prediction or inter-frame prediction based on the current block or CU. The prediction unit can generate various information related to the prediction of the current block and transmit the generated information to the entropy encoder 190. The information about the prediction can be encoded in the entropy encoder 190 and output as a bitstream.

[0080] Intra-prediction unit 185 can predict the current block by referencing samples in the current image. Depending on the intra-prediction mode and / or intra-prediction technique, the reference samples may be located among the neighbors of the current block or may be placed separately. Intra-prediction modes may include multiple non-directional modes and multiple directional modes. Non-directional modes may include, for example, DC modes and planar modes. Depending on the level of detail in the prediction direction, directional modes may include, for example, 33 or 65 directional prediction modes. However, this is merely an example, and more or fewer directional prediction modes may be used depending on the settings. Intra-prediction unit 185 can determine the prediction mode to be applied to the current block by using prediction modes applied to neighboring blocks.

[0081] The inter-frame predictor (180) can derive a predicted block for the current block based on a reference block (reference sample array) specified by motion vectors on a reference image. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation between motion information between neighboring blocks and the current block. Motion information may include motion vectors and reference image indices. Motion information may also include inter-frame prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, neighboring blocks may include spatially adjacent blocks existing in the current image and temporally adjacent blocks existing in the reference image. The reference image including the reference block and the reference image including the temporally adjacent block may be the same as each other or may be different from each other. Temporally adjacent blocks may be referred to by names such as juxtaposed reference block (juxtaposed reference block) or juxtaposed CU (colCU). The reference image including the temporally adjacent block may be called the juxtaposed image (colPic). For example, the inter-frame predictor (180) can configure a motion information candidate list based on neighboring blocks and can generate information specifying which candidate to use to derive the motion vector and / or reference image index of the current block. Inter-frame prediction can be performed based on various prediction modes. For example, in skip mode and merge mode, the inter-frame predictor (180) can use the motion information of neighboring blocks as the motion information of the current block. In skip mode, unlike merge mode, residual signals may not be sent. In motion vector prediction (MVP) mode, the motion vectors of neighboring blocks can be used as motion vector predictors, and the motion vector of the current block can be signaled by encoding the motion vector difference and an indicator for the motion vector predictor. The motion vector difference can represent the difference between the motion vector of the current block and the motion vector predictor.

[0082] The prediction unit can generate a prediction signal based on various prediction methods and techniques described below. For example, the prediction unit can apply not only intra-frame prediction or inter-frame prediction, but also both intra-frame prediction and inter-frame prediction simultaneously to predict the current block. A prediction method that simultaneously applies both intra-frame prediction and inter-frame prediction to predict the current block can be called combined intra-frame and inter-frame prediction (CIIP). Furthermore, the prediction unit can perform intra-frame block copying (IBC) to predict the current block. Intra-frame block copying can be used for content image / video coding in games, for example, screen content coding (SCC). IBC is a method of predicting the current image using a previously reconstructed reference block in the current image at a predetermined distance from the current block. When IBC is applied, the position of the reference block in the current image can be encoded as a vector (block vector) corresponding to the predetermined distance. IBC essentially performs prediction in the current image, but can be performed similarly to inter-frame prediction because the reference block is derived within the current image. That is, IBC can use at least one of the inter-frame prediction techniques described in this disclosure. IBC essentially performs prediction within the current image, but it can be performed similarly to inter-frame prediction because a reference block is derived within the current image. That is, IBC can use at least one of the inter-frame prediction techniques described in this disclosure.

[0083] The prediction signal generated by the prediction unit can be used to generate a reconstructed signal or a residual signal. Subtractor 115 can generate a residual signal (residual block or residual sample array) by subtracting the prediction signal (prediction block or prediction sample array) output from the prediction unit from the input image signal (original block or original sample array). The generated residual signal can be transmitted to converter 120.

[0084] Transformer 120 can generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), Karhunen-Loève Transform (KLT), Graph-Based Transform (GBT), or Conditional Nonlinear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is represented graphically. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. Furthermore, the transform process can be applied to square pixel blocks of the same size or to blocks of variable size instead of square.

[0085] Quantizer 130 quantizes the transform coefficients and transmits them to entropy encoder 190. Entropy encoder 190 encodes the quantized signal (information about the quantized transform coefficients) and outputs a bitstream. The information about the quantized transform coefficients can be referred to as residual information. Quantizer 130 can rearrange the block-form quantized transform coefficients into a one-dimensional vector form based on the coefficient scan order, and generate information about the quantized transform coefficients based on the one-dimensional vector form of the quantized transform coefficients.

[0086] The entropy encoder 190 can perform various encoding methods, such as exponential Columbus coding, context-adaptive variable-length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoder 190 can encode, together or separately, the information required for video / image reconstruction (e.g., values ​​of syntax elements, etc.), excluding quantization transform coefficients. The encoded information (e.g., encoded video / image information) can be transmitted or stored in bitstream form at the Network Abstraction Layer (NAL) level. The video / image information may also include information about various parameter sets, such as adaptive parameter sets (APS), picture parameter sets (PPS), sequence parameter sets (SPS), or video parameter sets (VPS). Furthermore, the video / image information may also include general constraint information. The signaled information, transmitted information, and / or syntax elements described in this disclosure can be encoded and included in the bitstream through the above encoding process.

[0087] The bitstream can be transmitted over a network or stored in a digital storage medium. The network may include broadcast networks and / or communication networks, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. A transmitter (not shown) for transmitting the signal output from the entropy encoder 190 and / or a storage unit (not shown) for storing the signal may be included as internal / external components of the image encoding apparatus 100. Alternatively, a transmitter may be provided as a component of the entropy encoder 190.

[0088] The quantized transform coefficients output from quantizer 130 can be used to generate residual signals. For example, the residual signals (residual blocks or residual samples) can be reconstructed by applying dequantization and inverse transform to the quantized transform coefficients using dequantizer 140 and inverse transformer 150.

[0089] Adder 155 adds the reconstructed residual signal to the prediction signal output from inter-frame prediction unit 180 or intra-frame prediction unit 185 to generate a reconstructed signal (reconstructed image, reconstructed block, reconstructed sample array). If the block to be processed has no residual, such as in the case of applying a skip mode, the prediction block can be used as a reconstructed block. Adder 155 can be referred to as a reconstructor or reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current image, and can be used for inter-frame prediction of the next image by filtering as described below.

[0090] Filter 160 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, filter 160 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image and store the modified reconstructed image in memory 170, specifically in the DPB of memory 170. Various filtering methods may include, for example, deblocking filtering, sample adaptive shifting, adaptive loop filtering, bilateral filtering, etc. Filter 160 can generate various filtering-related information and transmit the generated information to entropy encoder 190, as described later in the description of each filtering method. The filtering-related information can be encoded by entropy encoder 190 and output as a bitstream.

[0091] The modified reconstructed image transferred to the memory (170) can be used as a reference image in the inter-frame predictor (180). Thus, when applying inter-frame prediction, the image coding device (100) can avoid prediction mismatch between the image coding device (100) and the image decoding device, and can also improve coding efficiency.

[0092] The DPB in memory (170) can store modified reconstructed images for use as reference images in the inter-frame predictor (180). Memory (170) can store motion information of blocks in the current image for which motion information has been derived (or encoded) and / or motion information of blocks in reconstructed images. The stored motion information can be transmitted to the inter-frame predictor (180) for use as motion information of spatially adjacent blocks or temporally adjacent blocks. Memory (170) can store reconstructed samples of reconstructed blocks in the current image and can transmit them to the intra-frame predictor (185).

[0093] Image Decoding Device Overview

[0094] Figure 3 This is a schematic view illustrating an image decoding apparatus to which embodiments of the present disclosure may be applied.

[0095] like Figure 3As shown, the image decoding device 200 may include an entropy decoder 210, a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 260, and an intra-frame prediction unit 265. The inter-frame prediction unit 260 and the intra-frame prediction unit 265 may be collectively referred to as "prediction units". The dequantizer 220 and the inverse transformer 230 may be included in a residual processor.

[0096] According to an embodiment, all or at least some of the components of the image decoding device 200 can be configured by hardware components (e.g., a decoder or a processor). Furthermore, the memory 170 may include a decoded image buffer (DPB) or may be configured by a digital storage medium.

[0097] The image decoding device 200, having received a bitstream including video / image information, can perform operations related to... Figure 2 The image is reconstructed by processing corresponding to the processing performed by the image encoding apparatus 100. For example, the image decoding apparatus 200 can use a processing unit applied in the image encoding apparatus to perform decoding. Therefore, the decoding processing unit can be, for example, an encoding unit. The encoding unit can be obtained by a partitioned coding tree unit or a maximum coding unit. The reconstructed image signal decoded and output by the image decoding apparatus 200 can be reproduced by a reproduction apparatus (not shown).

[0098] Image decoding device 200 can receive data in bitstream form from... Figure 2The signal output by the image encoding apparatus. The received signal can be decoded by the entropy decoder 210. For example, the entropy decoder 210 can parse the bitstream to derive the information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as adaptive parameter sets (APS), picture parameter sets (PPS), sequence parameter sets (SPS), or video parameter sets (VPS). In addition, the video / image information may also include general constraint information. The image decoding apparatus can also decode the picture based on the parameter set information and / or general constraint information. The information and / or syntax elements notified / received by signals described in this disclosure can be decoded and obtained from the bitstream through the decoding process. For example, the entropy decoder 210 decodes the information in the bitstream based on encoding methods such as exponential Golomb coding, CAVLC, or CABAC, and outputs the values ​​of the syntax elements required for image reconstruction and the quantized values ​​of the transform coefficients of the residuals. More specifically, the CABAC entropy decoding method can receive bins corresponding to each syntax element in the bitstream, determine the context model using information about the target syntax element, decoding information of neighboring blocks and the target block, or information about symbols / bins decoded in the previous stage, and perform arithmetic decoding on the bins based on the determined context model by predicting the occurrence probability of the bins, generating symbols corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method can update the context model after determining the context model by using the information of the decoded symbols / bins for the context model of the next symbol / bin. The prediction-related information in the information decoded by the entropy decoder 210 can be provided to the prediction units (inter-frame prediction unit 260 and intra-frame prediction unit 265), and the residual values ​​of the entropy decoding performed in the entropy decoder 210, i.e., the quantized transform coefficients and related parameter information, can be input to the dequantizer 220. In addition, the filtering information in the information decoded by the entropy decoder 210 can be provided to the filter 240. Meanwhile, the receiver (not shown) for receiving the signal output from the image encoding device can be further configured as an internal / external element of the image decoding device 200, or the receiver can be a component of the entropy decoder 210.

[0099] Furthermore, the image decoding apparatus according to this disclosure can be referred to as a video / image / picture decoding apparatus. The image decoding apparatus can be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 210. The sample decoder may include at least one of a dequantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame prediction unit 160, or an intra-frame prediction unit 265.

[0100] The dequantizer 220 can dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 220 can rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement can be performed based on the coefficient scan order performed in the image encoding device. The dequantizer 220 can obtain the transform coefficients by performing dequantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information).

[0101] The inverse transformer 230 can perform inverse transformation on the transformation coefficients to obtain the residual signal (residual block, residual sample array).

[0102] The prediction unit can perform prediction on the current block and generate a prediction block that includes prediction samples of the current block. The prediction unit can determine whether to apply intra-frame prediction or inter-frame prediction to the current block based on information about the prediction output from the entropy decoder 210, and can determine a specific intra-frame / inter-frame prediction mode (prediction technique).

[0103] Similar to that described in the prediction unit of the image coding apparatus 100, the prediction unit can generate a prediction signal based on various prediction methods (techniques) described later.

[0104] Intra-prediction unit 265 can predict the current block by referring to samples in the current image. The description of intra-prediction unit 185 also applies to intra-prediction unit 265.

[0105] The inter-frame predictor (260) can derive a prediction block for the current block based on a reference block (reference sample array) specified by motion vectors on a reference image. In this case, to reduce the amount of motion information transmitted in the inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation between motion information between neighboring blocks and the current block. Motion information may include motion vectors and reference image indices. Motion information may also include inter-frame prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, neighboring blocks may include spatially adjacent blocks existing in the current image and temporally adjacent blocks existing in the reference image. For example, the inter-frame predictor (260) can configure a motion information candidate list based on neighboring blocks and can derive the motion vector and / or reference image index of the current block based on the received candidate selection information. Inter-frame prediction can be performed based on various prediction modes (techniques), and the information related to the prediction may include information specifying the mode (technique) of the inter-frame prediction on the current block.

[0106] Adder 235 generates a reconstructed block by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including inter-frame prediction unit 260 and / or intra-frame prediction unit 265). If the block to be processed has no residual, such as when a skip mode is applied, the prediction block can be used as a reconstructed block. The description of adder 155 also applies to adder 235. Adder 235 may be referred to as a reconstructor or reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current image, and can be used for inter-frame prediction of the next image by filtering as described below.

[0107] Filter 240 can improve the quality of subjective / objective images by applying filtering to the reconstructed signal. For example, filter 240 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image and store the modified reconstructed image in memory 250, specifically in the DPB of memory 250. Various filtering methods may include, for example, deblocking filtering, adaptive sample shifting, adaptive loop filtering, bilateral filtering, etc.

[0108] The (modified) reconstructed image stored in the DPB of memory 250 can be used as a reference image in inter-frame prediction unit 260. Memory 250 can store motion information of blocks from which motion information in the current image is derived (or decoded) and / or motion information of already reconstructed blocks in the image. The stored motion information can be transmitted to inter-frame prediction unit 260 to be used as motion information for spatially or temporally neighboring blocks. Memory 250 can store reconstructed samples of reconstructed blocks in the current image and transmit the reconstructed samples to intra-frame prediction unit 265.

[0109] In this disclosure, the embodiments described in the filter 160, inter-frame prediction unit 180 and intra-frame prediction unit 185 of the image encoding apparatus 100 can be applied equally or correspondingly to the filter 240, inter-frame prediction unit 260 and intra-frame prediction unit 265 of the image decoding apparatus 200.

[0110] CTU's zoning overview

[0111] As described above, coding units can be obtained by recursively partitioning coding tree units (CTUs) or maximum coding units (LCUs) according to a quadtree / binary tree / tritree (QT / BT / TT) structure. For example, a CTU can first be partitioned into a quadtree structure. Subsequently, the leaf nodes of the quadtree structure can be further partitioned using multiple tree structure types.

[0112] Partitioning according to a quadtree means that the current CU (or CTU) is divided into four equal parts. By partitioning according to a quadtree, the current CU can be partitioned into four CUs with the same width and height. When the current CU is no longer partitioned into a quadtree structure, it corresponds to a leaf node of the quadtree structure. CUs corresponding to leaf nodes of the quadtree structure can be left unpartitioned and can be used as the final coding unit described above. Alternatively, CUs corresponding to leaf nodes of the quadtree structure can be further partitioned using multiple tree structures.

[0113] MPM candidate list configuration

[0114] Typically, when performing block segmentation on an image, the current block to be encoded and its neighboring blocks have similar image characteristics. Therefore, the current block and its neighboring blocks are likely to have the same or similar intra-prediction modes. Thus, the encoder can use the intra-prediction modes of neighboring blocks to encode the intra-prediction mode of the current block.

[0115] For example, the encoder / decoder can configure a list of most probable modes (MPMs) for the current block. The MPM list can also be called an MPM candidate list. Here, considering the similarity between the current block and neighboring blocks, the MPM can represent a mode used to improve coding efficiency in intra-frame prediction mode coding. As mentioned above, the MPM list can be configured to include planar modes or to exclude planar modes. For example, when the MPM list includes planar modes, the number of candidates in the MPM list can be 6. Furthermore, when the MPM list does not include planar modes, the number of candidates in the MPM list can be 5.

[0116] The encoder / decoder can be configured with an MPM list that includes 6 MPMs.

[0117] To configure the MPM list, consider the types of patterns that will be described later.

[0118] - Default intra-frame mode

[0119] - Neighbor In-Frame Mode

[0120] - Intra-frame mode derived from adjacent inter-frame mode (IPM mode)

[0121] - DIMD (Decoder-Side Intra-Frame Mode Derivation) mode

[0122] - Derived intra-frame mode

[0123] For adjacent intra-frame modes, adjacent blocks can be considered, namely, the left adjacent block, the top adjacent block, the bottom left adjacent block, the top right adjacent block, the top left adjacent block, etc. When adjacent intra-frame modes are used as MPMs, the input order can vary based on the size information of the current block. For example, when the block height is greater than or equal to the block width, the intra-frame mode of the top adjacent block can be considered first, followed by the intra-frame mode of the left adjacent block.

[0124] Even when adjacent blocks are encoded in inter-frame mode instead of intra-frame mode, intra-frame mode information can still be obtained from the IPM buffer. When the position specified by the motion vector of an adjacent inter-frame block is in intra-frame mode, the corresponding intra-frame mode can be stored in the IPM buffer. The intra-frame mode stored in the IPM buffer can be used as the MPM mode of adjacent blocks.

[0125] MPM candidates can be configured from DIMD. When the current block is not in DIMD mode, the intra-frame mode derived from DIMD can be used as an MPM candidate.

[0126] As mentioned above, when the MPM list is configured not to include flat patterns, flat patterns can be excluded from the list, and the number of candidates in the MPM list can be set to 5.

[0127] When the MIP is not applied to the current block, the method described above for configuring the MPM list can be used. For example, the method described above for configuring the MPM list can be used to derive the intra-prediction mode used in LIP, PDPC, MRL, ISP intra-prediction, or normal intra-prediction. Furthermore, the left or upper adjacent block can be encoded based on the MIP described above. That is, the MIP can be applied when encoding the left or upper adjacent block. In this case, it is inappropriate to use the MIP intra-prediction mode number of the adjacent block (left / upper) in the MPM list where the MIP is applied, as is, for the current block where the MIP is not applied. Therefore, in this case, as an example, the intra-prediction mode of the adjacent block (left / upper) where the MIP is applied can be considered as DC mode or plane mode. Alternatively, as another example, the intra-prediction mode of the adjacent block (left / upper) where the MIP is applied can be mapped to the normal intra-prediction mode based on a mapping table and used for configuring the MPM list. In this case, the mapping can be performed based on the block size type of the current block. For example, the mapping table can be represented as follows.

[0128] [Table 1]

[0129] Here, MIP IntraPredMode[xNbX][yNbX] represents the MIP intra-prediction mode of the adjacent blocks (left adjacent block / top adjacent block), and the block size type MipSizeId represents the block size type of the adjacent block or the current block. The numbers under the block size type values ​​0, 1, and 2 indicate the normal intra-prediction mode to which the MIP intra-prediction mode is mapped for each block size type.

[0130] For example, when the block size type of the current block is 0 and the MIP intra-prediction mode number of the adjacent block is 10, the mapped normal intra-prediction mode number can be 18.

[0131] However, the mapping is just an example and can be changed.

[0132] Furthermore, when a MIP is applied to the current block, a separate MPM list can be configured for that current block where the MIP has been applied. The MPM list can be referred to by various names such as the MIP MPM list (or the MPM list for MIP, candMipModeList) to distinguish it from the MPM list used when the MIP is not applied to the current block. In the following text, it will be referred to as the MIP MPM list for distinction, but it can also be called the MPM list.

[0133] The MIP MPM list can include n candidates, and for example, n can be 3. The MIP MPM list can be configured based on the left and top neighbor blocks of the current block. Here, the left neighbor block can refer to the topmost block among the neighboring blocks adjacent to the left boundary of the current block. Furthermore, the top neighbor block can refer to the leftmost block among the neighboring blocks adjacent to the top boundary of the current block.

[0134] For example, when a MIP is applied to the left neighboring block (and when the block size type of the left neighboring block is the same as the block size type of the current block), the first candidate intra-prediction mode (or candMipModeA) can be set to the same MIP intra-prediction mode as the left neighboring block. Furthermore, for example, when a MIP is applied to the upper neighboring block (and when the block size type of the upper neighboring block is the same as the block size type of the current block), the second candidate intra-prediction mode (or candMipModeB) can be set to the same MIP intra-prediction mode as the upper neighboring block. Additionally, the left neighboring block or the upper neighboring block can be encoded based on intra-prediction other than MIP. That is, when the left neighboring block or the upper neighboring block is encoded, intra-prediction types other than MIP can be applied. In this case, it is inappropriate to use the normal intra-prediction mode number of the neighboring block (left neighboring block / upper neighboring block) that does not apply MIP as the candidate intra-prediction mode for the current block that applies MIP. Therefore, in this case, as an example, the MIP intra-prediction mode of neighboring blocks (left neighboring block / top neighboring block) without MIP application can be considered as a MIP intra-prediction mode with a specific value (e.g., 0, 1, or 2). Alternatively, as another example, the normal intra-prediction mode of neighboring blocks (left neighboring block / top neighboring block) without MIP application can be mapped to the MIP intra-prediction mode based on a mapping table, and can be used for configuring the MIP MPM list. In this case, the mapping can be performed based on the block size type of the current block. For example, the mapping table can be represented as follows.

[0135] [Table 2]

[0136] Here, IntraPredModeY[xNbX][yNbX] represents the intra prediction mode of adjacent blocks (left adjacent block / top adjacent block). The intra prediction mode of adjacent blocks can be an intra prediction mode for the luma component (sample), that is, a luma intra prediction mode. Block size type MipSizeId represents the block size type of the adjacent block or the current block. The numbers under block size type values ​​0, 1, and 2 indicate the MIP intra prediction mode to which the normal intra prediction mode is mapped for each block size type.

[0137] Furthermore, adjacent blocks (e.g., left adjacent block / top adjacent block) may be unavailable (e.g., located outside the current image, outside the current tile / slice, etc.), or even when applying MIP, a MIP intra-prediction mode that is unavailable for the current block may have already been used depending on the block size type. In this case, a specific MIP intra-prediction mode predefined for the first and / or second candidate can be used as the first candidate intra-prediction mode or the second candidate intra-prediction mode. Additionally, a specific MIP intra-prediction mode predefined for the third candidate can be used as the third candidate intra-prediction mode.

[0138] For example, a specific predefined MIP intra-prediction mode can be represented as shown in the table below. This specific predefined MIP intra-prediction mode can be called the MIP default candidate mode.

[0139] [Table 3]

[0140] The MIP MPM list can be configured based on the first candidate intra-prediction mode and the second candidate intra-prediction mode. For example, when the first candidate intra-prediction mode and the second candidate intra-prediction mode are different from each other, the first candidate intra-prediction mode can be placed in the 0th candidate of the MIP MPM list (e.g., candMipModeList[0]), and the second candidate intra-prediction mode can be placed in the 1st candidate of the MIP MPM list (e.g., candMipModeList[1]). For the 2nd candidate of the MIP MPM list (e.g., candMipModeList[2]), the above-mentioned specific predefined MIP intra-prediction mode can be used.

[0141] Alternatively, when the first candidate intra-prediction mode and the second candidate intra-prediction mode are the same, one of the first candidate intra-prediction mode and the second candidate intra-prediction mode can be placed in the 0th candidate of the MIP MPM list (e.g., candMipModeList[0]), and for the 1st candidate (e.g., candMipModeList[1]) and the 2nd candidate (e.g., candMipModeList[2]) of the MIP MPM list, the above-mentioned specific predefined MIP intra-prediction mode can be used.

[0142] As described above, the MIP intra-prediction mode for the current block can be derived based on the MIP MPM list. In this case, as mentioned above, the MPM flag that can be included in the intra-prediction mode information for the MIP can be called `intra_mip_mpm_flag`, the MPM index can be called `intra_mip_mpm_idx`, and the remaining intra-prediction mode information can be called `intra_mip_mpm_remainder`. The process of deriving the MIP intra-prediction mode from the MIP MPM list can be performed as described above.

[0143] Configuration of the secondary MPM candidate list

[0144] The encoder / decoder can configure a secondary MPM (Secondary Most Probable Mode) list for the current block. This secondary MPM list can also be called a secondary MPM candidate list. Furthermore, the secondary MPM list can be configured by excluding duplicate intra-frame modes from the MPM candidate list. For example, if the MPM list includes mode No. 50, the secondary MPM list may exclude mode No. 50.

[0145] The encoder / decoder can be configured with M auxiliary MPM lists, and M can be 16.

[0146] To configure the secondary MPM list, consider the types of patterns that will be described later.

[0147] - Default intra-frame mode

[0148] - Neighbor In-Frame Mode

[0149] - Intra-prediction mode derived from adjacent inter-frame mode (IPM mode)

[0150] - DIMD (Decoder-Side Intra-Frame Mode Derivation) mode

[0151] - Derived intra-frame mode

[0152] For adjacent intra-frame modes, adjacent blocks can be considered, namely, the left adjacent block, the top adjacent block, the bottom left adjacent block, the top right adjacent block, the top left adjacent block, etc. When adjacent intra-frame modes are used as secondary MPMs, the input order can change according to the size information of the current block. For example, when the block height is greater than or equal to the block width, the intra-frame mode of the top adjacent block can be considered first, and then the intra-frame mode of the left adjacent block can be considered.

[0153] Even when adjacent blocks are encoded in inter-frame mode instead of intra-frame mode, intra-frame mode information can still be obtained from the IPM buffer. When the position specified by the motion vector of an adjacent inter-frame block is in intra-frame mode, the corresponding intra-frame mode can be stored in the IPM buffer. The intra-frame mode stored in the IPM buffer can be used as the secondary MPM mode for adjacent blocks.

[0154] Template-based intra-frame mode derivation (TIMD)

[0155] Figure 4 This is a diagram illustrating the templates and reference samples used in TIMD. According to... Figure 4 For IPM intra-modes of adjacent intra-blocks and inter-blocks, after obtaining the SATD (Sum of Absolute Transform Differences) between the predicted block predicted from the template region and the actual reconstructed sample, the mode with the smallest SATD can be selected as the intra-mode of the current block. Alternatively, after selecting the two modes with the smallest SATD, the predicted blocks for the two prediction modes can be mixed by a weighted sum method, and this can be used as the prediction block of the current block.

[0156] When conditions such as the following are met, a method that combines the two modes can be applied.

[0157] [Formula 1]

[0158] When the above conditions are met, prediction blocks can be generated by mixing the two modes; otherwise, only the mode with the smallest SATD value can be selected. The weight ratio used to mix the two prediction blocks can be expressed by the following formula.

[0159] [Equation 2]

[0160] Decoder-side intra-frame mode derivation (DIMD)

[0161] Figure 5 This is a schematic illustration of a HoG (Histogram of Gradients) graph, and Figure 6 This is a diagram that schematically illustrates the configuration of the prediction blocks when the DIMD mode is applied.

[0162] In DIMD mode, intra-frame prediction mode information can be derived and used by the encoder and decoder without being sent directly. First, the horizontal and vertical gradients can be obtained from the columns and rows of the second adjacent samples, from which a HoG (Gradient Histogram) can be configured. This can be done as follows: Figure 5 The HoG configuration is shown. HoG can be obtained by applying a Sobel filter that uses an L-shaped row and column of 3 pixels surrounding the current block. When the block boundary exists in a different CTU, it is not used for texture analysis.

[0163] After that, as Figure 6As shown, after selecting two intra-frame modes with the largest histogram magnitude (histogram amplitude), the final prediction block can be configured by mixing prediction blocks predicted by the mode and the planar mode. Weights can be derived from the histogram amplitude. Furthermore, DIMD flags can be sent based on the block to identify whether DIMD has been used.

[0164] Implementation

[0165] As can be seen in DIMD and TIMD technologies, prediction blocks generated through various modes can be combined to generate a final prediction block, and such combined blocks can improve intra-frame prediction performance. For example, response prediction blocks can be generated using a mode, a first intra-frame mode, a second intra-frame mode, etc., and then combined to improve intra-frame prediction performance.

[0166] Both DIMD and TIMD can effectively predict intra-prediction modes on the decoder side. According to this disclosure, as can be seen in DIMD and TIMD techniques, prediction blocks generated from various modes can be combined to generate a final prediction block, and such combined blocks can improve intra-prediction performance. This disclosure proposes techniques to effectively derive intra-prediction modes by combining and applying features of DIMD and TIMD modes, or to more accurately derive intra-prediction modes by assigning weights to error values ​​in template regions (e.g., template regions), thereby improving coding performance and quality.

[0167] Furthermore, when implementing the method as described above, the technical features applicable to the decoder-side intra-prediction mode derivation method can also be applied to the template region-based intra-prediction mode derivation method, as long as they do not conflict with the features of the template region-based intra-prediction mode derivation method. Similarly, the technical features applicable to the template region-based intra-prediction mode derivation method can also be applied to the decoder-side intra-prediction mode derivation method, as long as they do not conflict with the features of the decoder-side intra-prediction mode derivation method.

[0168] In the following, embodiments of this application will be described in detail with reference to the accompanying drawings.

[0169] Figure 7 This is a diagram illustrating a video encoding or video decoding method according to embodiments of the present disclosure. It may be changed or omitted. Figure 7 Each step.

[0170] As an example, it can be first determined whether to use the intra-prediction mode derivation method at the image decoding device (i.e., on the decoder side) (S701). This step may include determining whether to perform DIMD (decoder-based intra-prediction mode derivation). In other words, it can be determined whether to derive the intra-prediction mode at the decoder without separate signaling. It can be determined whether to perform intra-prediction mode derivation on the decoder side without decoding adjacent blocks used to determine the prediction mode. Furthermore, as an example, in the case of a video decoding method, step S701 can be determined based on information signaled from the bitstream. As another example, in the case of a video coding method, step S701 can be performed at the image encoder, and thereafter information related to the intra-prediction mode derivation method on the decoder side can be encoded and signaled. In this case, the information can be signaled in specific units (e.g., tiles, slices, blocks (e.g., CTU (coding tree unit), CU (coding unit) etc.) etc.). In other words, when a unit (e.g., CTU) signals information related to the application of the decoder-side intra-prediction mode derivation method, the decoder-side intra-prediction mode derivation method can be applied to all lower-level blocks in the unit (e.g., CTU).

[0171] However, as another example, in step S701, it can be determined whether to use the decoder-side intra-prediction mode derivation method based on another parameter or other information, without encoding the corresponding information and signaling it on the encoder side; that is, without signaling specific information on the decoder side. For example, it can be determined whether to use the decoder-side intra-prediction mode derivation based on the block's size, shape, width, height, and / or dimensions. For example, in the case of non-square blocks, the DIMD mode can always be used. As another example, when the block's width is greater than its height, for example, when the width is greater than or equal to twice the height (i.e., width >= 2), the method can be used. When considering the height, it can be determined that the decoder-side intra-prediction mode derivation method is always applied. Alternatively, when considering the area of ​​the current block (e.g., width)... height, that is, width When the height is greater than a specific value (e.g., 1024), it can be deduced that the decoder-side intra-prediction mode derivation method should not be applied. Furthermore, these examples only mention block size, shape, etc., as conditions for applying the decoder-side intra-prediction mode derivation method, but this is merely an implementation of this disclosure, and the disclosure is not limited thereto. That is, to determine the application of the mode derivation method, it can be extended to values ​​of other parameters, variables, syntax, and / or other conditions, and this is also included in the implementation of this disclosure.

[0172] Furthermore, as an implementation considering all the above embodiments, information related to the application of the decoder-side intra-prediction mode derivation method can be signaled at a specific unit (e.g., CTU), and for a block in the unit (e.g., CTU), the application of the decoder-side intra-prediction mode derivation method can be determined, or it can be determined that the decoder-side intra-prediction mode derivation method is not applied only under predefined conditions (e.g., block size, dimensions, and / or shape, etc.).

[0173] As an example, when determining the method for directly deriving the prediction mode on the decoder side, a template region can be determined (S702). As an example, the template region may also be called the template region and / or reconstruction region, and can be a region adjacent to the current block. For example, the template region can be a region adjacent to the left and / or top of the current block. As an example, the template region can be as follows: Figure 8 As shown. Figure 8 This is a diagram illustrating the template area of ​​the current block applicable to embodiments of this disclosure. The template area may include an upper area A, a left area L, and / or an upper left area AL. For example... Figure 8 As shown, HA is the height of the template region of region A, HL is the height of the template region of region L, WA is the width of the template region of region A, and WL is the width of the template region of region L. The template region can be used to determine the intra-frame prediction mode and the mixing weights that can be used for prediction blocks. Information related to the template region that can be used to determine the template region (e.g., the position, size, shape, etc. of the template region) can be predefined between the encoder and decoder without separate signaling, or can be explicitly notified by signaling by being included in the bitstream.

[0174] Furthermore, the size, shape, and form of the template region can vary depending on the size, shape, and form of the current block. In other words, the template region can be based on the current block. As an example, in the case of a 4×4 block, the size of the template region can be defined as WA=3, HA=3, WL=3, and HL=3. As an example, in the case of blocks other than 4×4, the size of the template region can be defined as WA=W, HA=3, WL=3, and HL=H. However, the template region defined in this paper is merely an example and can vary depending on the encoder / decoder definition. Additionally, the template region can be defined based on the size of the current block, allowing for the use of template regions with relatively small areas in the case of small blocks, thereby reducing the computational complexity required per pixel, since the computational complexity required during the application of the decoder-side intra-frame prediction mode derivation method is directly related to the size of the template region. Furthermore, template regions that span the boundaries of slices, tiles, blocks (e.g., CTUs), spontaneous boundaries, etc., can be avoided to maintain independence for each slice, tile, and block (e.g., CTU).

[0175] Furthermore, the dimensions, size, and shape of the block, for example, taking into account the ratio of width to height, can be used to determine the appropriate dimensions. Figure 8 The sizes of regions A, L, and AL are related to the sizes of HA and WL. For example, in the case of a 32×4 block, the size of the template region can be adjusted so that the HA value is used relatively small and the WL value is used relatively large to minimize the computational complexity and memory increase required during decoder-side intra-prediction mode derivation. Furthermore, a method can be used to determine the combined sizes of regions A, L, and AL, as well as the template region, based on the intra-prediction modes used for regions adjacent to the current block to be encoded / decoded. For example, when the intra-prediction modes used for the left and upper adjacent regions of the current block are configured with a mode having a vertical orientation and / or an orientation adjacent to the vertical orientation, region A can be determined as the template region, or the size of the template region in the direction of region A can be set to a relatively large value and used to perform decoder-side intra-prediction mode derivation.

[0176] On the other hand, when the intra-prediction mode for the upper adjacent region of the current block is configured by a mode having a horizontal direction and / or a directionality adjacent to the horizontal direction, it can be determined that the correlation between region A and the current block is low, and region A can be excluded from the template region, or the size of the template region in the direction of region A can be set to small and can be used to perform decoder-side intra-prediction mode derivation.

[0177] Similarly, when the intra-prediction mode for the left adjacent region (e.g., region L) of the current block is configured with a mode having a horizontal orientation and / or a mode adjacent to the horizontal orientation, it can be determined that region L is used as a template region, or the size of the template region in the direction of region L can be set to large and can be used to perform decoder-side intra-prediction mode derivation.

[0178] On the other hand, when the intra-prediction mode for the left adjacent region (e.g., region L) of the current block is configured by a mode having a vertical direction and / or a mode having a directionality adjacent to the vertical direction, it can be determined that the correlation between region L and the current block is low, and region L can be excluded from the template region, or the size of the template region in the direction of region L can be set to small and can be used to perform decoder-side intra-prediction mode derivation.

[0179] Furthermore, when the intra-prediction mode for the upper-left adjacent region (e.g., region AL, etc.) of the current block is configured with a mode having a directionality from upper-left to lower-right prediction and / or its adjacent directional mode, it can be determined that region AL is used as a template region, or the size of the template region in the direction of region AL can be set to large and can be used to perform decoder-side intra-prediction mode derivation.

[0180] On the other hand, when the intra-prediction mode for the upper-left adjacent region (e.g., region AL, etc.) of the current block is configured with a mode having a directionality of prediction from upper right to lower left or from lower left to upper right and / or its adjacent directional mode, it can be determined that the correlation between region AL and the current block is low, and region AL can be excluded from the template region, or the size of the template region in the direction of region AL can be set to small and can be used to perform decoder-side intra-prediction mode derivation.

[0181] Furthermore, the size of region A, region L, and region AL and / or template region can be determined based on the intra-prediction mode used for the region adjacent to the current block. As described above, the relationship between the upper adjacent region, left adjacent region, upper left adjacent region, and region A, region L, and region AL can be defined separately, or this relationship can be defined by combining them. For example, when the intra-prediction mode frequently used in the adjacent regions has a vertical direction and / or a directional mode adjacent to the vertical direction (where there is no distinction between adjacent regions (e.g., regions A, L, and AL)), the template region can be primarily configured with region A or region A and region AL, and the size of the template region in the corresponding direction can be adjusted to be relatively large.

[0182] On the other hand, when the intra-prediction mode frequently used in adjacent regions has a horizontal direction and / or a directional mode adjacent to the horizontal direction, the template region can be mainly configured with region L or region L and region AL, or the size of the template region in the corresponding direction can be adjusted to be relatively large.

[0183] As another example, when the intra-prediction mode frequently used in adjacent regions has a directionality of prediction from top left to bottom right, or is configured through its adjacent directional mode, the template region can be mainly configured with region AL or regions A, L and AL, or the size of the template region in the corresponding direction can be adjusted to be relatively large.

[0184] As an example, when a template region is determined, an intra-prediction mode can be derived (S703). One or more intra-prediction modes can be derived, and prediction blocks can be generated based on the derived intra-prediction modes. As an example, a method for deriving the intra-prediction modes can be determined first. When deriving the intra-prediction modes, methods using the gradient of the template region, methods using the error value of the template region, etc., can be used. When using the gradient of the template region, a HoG (Histogram of Gradients) based method can be used. As an example, the HoG method can include performing a given differential filter on the pixel values ​​in the template region to determine whether the distribution of pixel values ​​in the template region is similar in direction to each intra-prediction mode and the degree of similarity. In this process, the most similar intra-prediction mode can be determined based on the gradient of the pixel value, which is obtained based on the ratio between the change in the horizontal direction and the change in the vertical direction, and the magnitude value corresponding to the gradient (that is, the sum of the magnitudes of the change in the horizontal direction and the vertical direction) can be assigned to the intra-prediction mode. When this process is applied while moving horizontally and vertically relative to pixel values ​​within a template region, a cumulative amplitude value for the corresponding intra-prediction mode is ultimately obtained, and the process of obtaining such a value can be included in the HoG (Histogram of Gradients) method for each intra-prediction mode. Furthermore, the HoG-based intra-prediction mode derivation method can include the process of applying a differential filter to the determined template region. As an example, the differential filter can be a Sobel filter, but other differential filters can also be used. Similarly, HoG can have directional and / or non-directional information about the template region, as well as the size (i.e., amplitude) of each template region. Furthermore, as an example, the process of applying the differential filter in obtaining HoG values ​​can include deriving the amplitude value while moving one pixel at a time within the template region in the vertical and / or horizontal directions. However, since the orientation within a given template region is more likely to exist as the same orientation among pixels within a certain group, rather than being precisely determined on a pixel-by-pixel basis, a differential filter can be applied on a per-pixel basis to obtain the amplitude (magnitude, size, Amplitude) in the horizontal or vertical directions to reduce unnecessary computational complexity. Here, the template region ( Figure 8 The regions A, L, and AL can be used to determine the units for applying the differential filter. For example, the differential filter can be applied on a unit of two pixels in regions A and L, and the amplitude value can be derived by applying the differential filter on a unit of one pixel in region AL.

[0185] Furthermore, in the case of a derivation method based on template error values ​​as another example, the error value between the predicted block predicted from the template region and the actual reconstructed sample can be derived for the intra-prediction mode. Here, the intra-prediction mode can represent all / some directional intra-prediction modes and non-directional intra-prediction modes. Some intra-prediction modes can represent the aforementioned MPM modes or the aforementioned auxiliary MPM candidates. Furthermore, this can represent the intra-prediction modes stored in intra-prediction blocks and inter-prediction blocks adjacent to the periphery of the current block. Here, to obtain the error value, error calculation methods such as SAD (sum of differences), SATD (sum of transformed differences), SSE (sum of squared errors), MR-SAD (sum of differences after removing the average), MR-SSE (sum of squared errors after removing the average), and MR-SATD (sum of transformed differences after removing the average) can be used. Furthermore, before applying the above methods, a sharpening filter and / or gradient filter can be applied to the previously reconstructed pixels of the template region. For example, in HoG-based intra-prediction mode derivation methods, during the process of obtaining HoG, a gradient filter can be applied after a sharpening filter is applied to the pixel, or only a gradient filter can be applied. In the case of derivation methods based on template error values, the error value can be derived after a sharpening filter is applied to the pixel. For example, the following sharpening filter F can be applied.

[0186] [Formula 3]

[0187] As another example, the following gradient filter M can be applied. x M y .

[0188] [Formula 4]

[0189] Furthermore, as another example, the following gradient filter M can be applied. x M y .

[0190] [Formula 5]

[0191] or

[0192] However, the sharpening filter and gradient filter described above are merely embodiments of this disclosure, and the filter size and filter coefficients can be varied. Furthermore, combinations of the above filters can be applied to pre-reconstructed or reconstructed pixels in the template region. Here, whether to apply a gradient filter can be indicated by a signal, or it can be applied without signal indication through an agreement between the encoder and decoder. As an example, when determining the application of a gradient filter between the encoder and decoder without signal indication of specific information, other syntax, parameters, variables, etc., can be used as conditions. Furthermore, the derived intra-prediction mode can be an intra-prediction mode candidate, and one or more intra-prediction modes can be configured. Here, the number of intra-prediction mode candidates can be determined, and a weight value for each intra-prediction mode candidate can be determined (S704). As an example, intra-prediction mode candidates can be used to generate prediction blocks, and a weight value for the prediction blocks can be determined.

[0193] Furthermore, when using the HoG method to derive intra-prediction modes, the amplitude values ​​derived by HoG can be sorted in descending order, and the M largest intra-prediction modes can be selected. The final prediction block can be generated by applying weights to the prediction blocks for the corresponding prediction modes and summing them. In this case, the weight values ​​can be calculated as weight ratios proportional to the amplitude for each intra-prediction mode. Here, the number of selected intra-prediction modes can be a predefined positive integer.

[0194] As another example, when using a template region-based error value method to derive intra-prediction modes, after deriving the error value between the predicted block and the pre-reconstructed block generated for each template region, the error values ​​can be sorted in ascending order, and N intra-prediction modes with the smallest error values ​​can be selected. Prediction blocks can be generated based on the selected intra-prediction modes, and the final prediction block can be generated by applying weights to the prediction blocks and then summing them. In this case, the weight values ​​can be calculated as weight ratios that are inversely proportional to the error value of each intra-prediction mode. For example, the weight ratio when two prediction blocks are weighted and summed can be as follows. Here, N can be a predefined positive integer.

[0195] [Formula 6]

[0196] - costMode1: The error value of the intra-frame mode with the first minimum error value.

[0197] - costMode2: Error value of the intra-frame mode with the second minimum error value

[0198] - Weight1: Weight ratio of the intra-frame mode with the minimum error value

[0199] - Weight2: Weight ratio of the intra-frame mode with the second minimum error value

[0200] As shown in Equation 6, each weight can be derived based on the error value, and the sum of the corresponding weights can be set to a specific value (e.g., 1).

[0201] Furthermore, Equation 6 is used to illustrate an example of selecting only two intra-prediction modes. Therefore, when selecting two or more intra-prediction modes, the corresponding equation can be further modified.

[0202] Furthermore, when generating the final prediction block, it can be generated by weighted summation, and must include the prediction block generated in planar mode. As an example, the weight values ​​for the planar mode can be assigned fixed weights regardless of the amplitude or error values. For example, approximately 1 / 3 or 1 / 4 weight values ​​can be assigned to the planar prediction block. However, since this is an implementation of the present disclosure, the planar prediction block can have weight values ​​determined based on the ratio of the amplitude or error values, as in another prediction block.

[0203] Furthermore, as an example, the number of prediction blocks used for weighted summation can be determined based on specific conditions. For instance, when using the HoG method, suppose the M intra-prediction modes with the largest amplitudes are selected. In this case, the M prediction modes can be included as intra-prediction mode candidates when the following conditions are met. The final prediction block can then be configured by weighted summation of the prediction blocks predicted using the intra-prediction mode candidates and the planar prediction blocks.

[0204] [Formula 7]

[0205] Here, Amp1 can represent the amplitude value of the mode with the maximum amplitude. k This can represent the amplitude value of the pattern with the k-th largest amplitude. m is any real number, and can be, for example, 2. m is any positive integer, and can be, for example, 5.

[0206] As another example, the number (M or N) of patterns used for the weighted addition of the aforementioned prediction blocks can be determined differently depending on the size (such as width or height) or shape of the current block. A relatively large number can be used when the current block has a size equal to or greater than a specific value, and a smaller number of prediction patterns can be used for weighted addition in the case of small blocks. This is to properly account for the fact that the amount of variation in pixel values ​​differs depending on the size of each block. For example, in the case of a 32×32 block, the value of M (or N) can be set to 5, and in the case of an 8×4 block, the value of M (or N) can be set to 1 or 2.

[0207] As another example, it can be based on Amp k The distribution of values ​​determines the number of modes to be used in the weighted addition. For example, suppose Amp1 is the largest amplitude value among the amplitude values ​​used for intra-prediction modes. In this case, when compared with other amplitude values, the corresponding value is compared with another amplitude (Amp1). k When the amplitude values ​​have a large difference (e.g., n times the other amplitude values), the number (M or N) of intra-prediction modes used for weighted addition can be determined to be 1. Alternatively, as another example, when the sum of the top P amplitude values ​​is equal to or greater than a certain ratio compared to the sum of all amplitude values ​​sorted in descending order, the number (M or N) of modes used for weighted addition can be determined to be P, where P can be a natural number. For example, if Amp1+Amp2+Amp3 is equal to or greater than a certain ratio compared to the sum of all amplitude values, the number (M or N) of modes used for weighted addition can be determined to be 3. In this case, said certain ratio can be a predefined value between the encoder and decoder, and can, for example, represent a value corresponding to half of the sum of all amplitude values. According to the method of such implementation, the number of intra-mode candidates can be varied.

[0208] As an example, information related to the above implementation method can be notified by signals, as shown in the table below.

[0209] [Table 4]

[0210] In the embodiments related to the table above, the signaling of information has been described as being executed in units of coding units. However, this is only one embodiment of this disclosure. Therefore, the signaling can also be executed in various units, such as various blocks that include coding units, slices, and tiles.

[0211] As an example, to derive an intra-prediction mode, information indicating whether or not to use a decoder-side intra-prediction mode derivation method can be signaled. This information can be called first information, and can be represented as dimFlag. When the value of first information is a specific value (e.g., 0), this indicates that the decoder-side intra-prediction mode derivation method is not used. Conversely, when the value of first information is a specific value (e.g., 1), this indicates that the decoder-side intra-prediction mode derivation method is used.

[0212] In the following text, based on the first information, other information (e.g., second information, etc.) can be signaled. As an example, when applying a decoder-side intra-prediction mode derivation method, other information can be signaled. For instance, when applying a decoder-side intra-prediction mode derivation method, information specifying whether to use a condition for determining the number of intra-prediction modes used in weighted addition can be signaled. As an example, this information can be called the second information, can be denoted as IsCondition, and can be signaled when the value of the first information is a specific value (e.g., 1).

[0213] As another example, without signaling second information, for the adjacent pre-reconstruction or reconstruction sample regions of the current block, each prediction block can be generated, the error value between the corresponding prediction block and the pre-reconstruction sample can be obtained, and prediction blocks can be generated by selecting those with smaller error values. As an example, as mentioned above, to obtain the error value, error calculation methods such as SAD (sum of differences), SATD (sum of transformed differences), SSE (sum of squared errors), MR-SAD (sum of differences after removing the mean), MR-SSE (sum of squared errors after removing the mean), and MR-SATD (sum of transformed differences after removing the mean) can be used.

[0214] Furthermore, pre-reconstructed sample regions can be defined (predefined) through conventions between the encoder and decoder. For example, the pre-reconstructed sample region can be the same as the template region described above. As another example, when the width and height of the current block are W and H, the top sample region of the current block can be defined as a W×P region, and the left sample region can be defined as a Q×H region. P and Q are arbitrary natural numbers, and can be, for example, 1. The above pre-reconstructed sample region is merely an example, and as mentioned above, in addition to the left sample region or the top sample region, various adjacent reconstruction regions can also be used, for example, by using the top-left sample region of the current block.

[0215] Furthermore, when deriving intra-frame prediction modes, prediction blocks generated using a specific mode (e.g., a planar mode) can be restricted to being used to generate the final prediction block. However, according to another embodiment of this disclosure, it is not mandatory to generate blocks associated with the use of a planar mode. In other words, planar prediction blocks may not necessarily be used. Therefore, it is necessary to consider both the case where prediction blocks generated in a planar prediction mode are used in the final prediction block and the case where they are not used. Therefore, as an implementation, a signal can be used to indicate whether a planar prediction mode is used. For example, the signaling can be executed as follows.

[0216] [Table 7]

[0217] In the embodiments related to the table above, the signaling of information has been described as being executed on a unit-by-unit basis. However, this is merely an embodiment of this disclosure, and therefore the signaling can also be executed in various units, such as various blocks including units, slices, and tiles. As an example, to derive an intra-prediction mode, information specifying whether a decoder-side intra-prediction mode derivation method is used can be signaled. As an example, this information can be referred to as first information, and the first information can be represented as dimFlag. Since other descriptions are the same as above, repeated descriptions will be omitted.

[0218] Subsequently, based on the first information, other information (e.g., third information, etc.) can be signaled. As an example, when applying a decoder-side intra-prediction mode derivation method, other information can be signaled. For instance, when applying a decoder-side intra-prediction mode derivation method, information regarding whether a specified planar prediction block is used to generate the final prediction block can be signaled. As an example, this information can be called third information, can be represented as IsPlanarMode, and can be signaled when the value of the first information is a specific value (e.g., 1).

[0219] On the other hand, in the above embodiments, specific information is explicitly signaled to determine whether a planar prediction block is used to generate the final prediction block. However, without signaling third information, signaling for determining whether to use the specific information of the planar prediction block can be omitted. For example, for adjacent pre-reconstruction sample regions of the current block, error values ​​with pre-reconstruction samples can be obtained for each of the final prediction block using the planar prediction block and the final prediction block not using the planar prediction block. By determining whether to use the planar prediction mode using a method with a smaller error value, the final prediction block can be generated without signaling separate information.

[0220] Furthermore, when deriving the intra-prediction mode, as an implementation method, a signal can be used to indicate whether the intra-prediction mode is derived using gradients (e.g., by using the HoG method) or whether the intra-prediction mode is derived based on the error value of the template region. For example, the signaling can be executed as follows.

[0221] [Table 8]

[0222] In the embodiments related to the table above, the signaling of information has been described as being executed on a unit-by-unit basis. However, this is merely an embodiment of this disclosure, and therefore the signaling can also be executed in various units, such as various blocks including units, slices, and tiles. As an example, to derive an intra-prediction mode, information specifying whether a decoder-side intra-prediction mode derivation method is used can be signaled. As an example, this information can be referred to as first information, and the first information can be represented as dimFlag. Since other descriptions are the same as above, repeated descriptions will be omitted.

[0223] Subsequently, based on the first information, other information (e.g., fourth information, etc.) can be signaled. As an example, when applying a decoder-side intra-prediction mode derivation method, other information can be signaled. For instance, when applying a decoder-side intra-prediction mode derivation method, information specifying the intra-prediction mode derivation method can be signaled. As an example, this information can be called fourth information, can be represented as `derivationMethod`, and can be signaled when the value of the first information is a specific value (e.g., 1).

[0224] As another example, without signaling fourth information, for the adjacent pre-reconstruction sample regions of the current block, error values ​​with pre-reconstruction samples can be obtained for each of the prediction blocks generated by inferring intra-frame modes using HoG and the prediction blocks generated by inferring intra-frame modes based on template error values, and prediction blocks can be generated without signaling by using a method with smaller error values.

[0225] Furthermore, the implementation methods described above can be used independently or in combination with each other, so the final prediction block can be generated based on the combination of implementation methods.

[0226] For example, as described in the above embodiments, the intra-prediction mode derivation method based on gradient (HoG-based), the intra-prediction mode derivation method based on template region error values, the method of including planar prediction blocks in the final prediction block, the method of not including planar prediction blocks in the final prediction block, and the method in the absence of amplitude-related conditions (e.g., Amp1 < m) Amp kMethods for determining intra-prediction mode candidates under certain conditions and / or based on amplitude-related conditions (e.g., Amp1 < m) Amp k Methods for determining intra-prediction mode candidates can be used in combination, as long as they do not conflict with each other, and this combination can be determined by an agreement between the encoder and decoder or by signaling specific information.

[0227] For example, methods can be derived based on gradient-based (HoG-based) intra-prediction modes, methods that include planar prediction blocks in the final prediction block, and methods that do not have amplitude-dependent conditions (e.g., Amp1 < m). Amp k In the case of determining intra-prediction mode candidates, the final intra-prediction block is generated. However, as another example, the final intra-prediction block can be generated based on gradient-based (HoG-based) intra-prediction mode derivation methods, methods that include planar prediction blocks in the final prediction block, and methods based on amplitude-related conditions (e.g., Amp1 < m). Amp k The method for determining intra-prediction mode candidates generates the final intra-prediction block.

[0228] As another example, methods can be derived based on gradient-based (HoG-based) intra-prediction modes, methods that do not include planar prediction blocks in the final prediction block, and methods that do not have amplitude-dependent conditions (e.g., Amp1 < m). Amp k The final intra-prediction block can be generated by a method that determines intra-prediction mode candidates under certain conditions. However, it is also possible to generate the final intra-prediction block based on gradient-based (HoG-based) intra-prediction mode derivation methods, methods that do not include planar prediction blocks in the final prediction block, and methods based on amplitude-related conditions (e.g., Amp1 < m). Amp k The method for determining intra-prediction mode candidates generates the final intra-prediction block.

[0229] As another example, methods can be used based on intra-frame mode derivation based on template region error values, methods that include planar prediction blocks in the final prediction block, and methods that do not have amplitude-related conditions (e.g., Amp1 < m). Amp k In the case of determining intra-prediction mode candidates, the final intra-prediction block is generated. However, as another example, the final intra-prediction block can be generated based on intra-prediction methods based on template region error values, methods that include planar prediction blocks in the final prediction block, and methods based on amplitude-related conditions (e.g., Amp1 < m). Amp k The method for determining intra-prediction mode candidates generates the final intra-prediction block.

[0230] As another example, this can be achieved using intra-frame mode derivation based on template region error values, methods that do not include planar prediction blocks in the final prediction block, and methods that do not have amplitude-related conditions (e.g., Amp1 < m). Amp k The final intra-prediction block can be generated by determining intra-prediction mode candidates under certain conditions. However, it is also possible to generate the final intra-prediction block based on intra-prediction mode derivation based on template region error values, methods that do not include planar prediction blocks in the final prediction block, and methods based on amplitude-related conditions (e.g., Amp1 < m). Amp k The method for determining intra-prediction mode candidates generates the final intra-prediction block.

[0231] Furthermore, in the embodiments described above with reference to Tables 7 and 8, all information disclosed in the embodiments, or a combination thereof, can be notified entirely by signals; some information can be notified by signals and the remaining information can be deduced; or all information can be deduced without signaling. Table 9 below is a table illustrating an embodiment of notifying all information in Tables 6 to 8 by signals.

[0232] [Table 9]

[0233] In the embodiments related to the table above, the signaling of information has been described as being executed on a unit-by-unit basis. However, this is merely an embodiment of this disclosure, and therefore the signaling can also be executed in various units, such as various blocks including units, slices, and tiles. As an example, to derive an intra-prediction mode, information specifying whether a decoder-side intra-prediction mode derivation method is used can be signaled. As an example, this information can be referred to as first information, and the first information can be represented as dimFlag. Since other descriptions are the same as above, repeated descriptions will be omitted.

[0234] Subsequently, based on the first information, other information (e.g., second, third, and fourth information) can be signaled. The second information (specifying whether to use conditions for determining the number of intra-prediction modes for weighted summation), the third information (specifying whether to use planar prediction blocks to generate the final prediction block), and the fourth information (specifying the intra-prediction mode derivation method) can all be signaled. Since the content of the corresponding information is the same as described above, repeated descriptions will be omitted.

[0235] Alternatively, some of the aforementioned information can be signaled, and only one of the second to fourth pieces of information can be signaled, or only two pieces of information can be signaled. For example, only the fourth piece of information can be signaled, and the remaining information can be derived through an agreement between the encoder and decoder.

[0236] Furthermore, when deriving residual information through the conventions between the encoder and decoder, and when deriving the intra-prediction mode based on gradients (HoG), it can be determined that the final predicted block always includes a planar prediction block. As another example, when deriving the intra-prediction mode based on the error values ​​of the template region, it can be determined that amplitude-related conditions (e.g., Amp1 < m) are always applied. Amp k ).

[0237] As an example, depending on the intra-prediction mode derivation method, the number of intra-prediction mode candidates used to generate the final prediction block can vary. For instance, a gradient-based (HoG-based) intra-prediction mode derivation method can have at most n (e.g., 6) intra-prediction mode candidates. Furthermore, an intra-prediction mode derivation method based on template region error values ​​can have at most n (e.g., 2) intra-prediction mode candidates.

[0238] Furthermore, regarding the above embodiments, whether or not the gradient filter is applied to derive the intra-prediction mode can be combined with the above embodiments. For example, among the second to fourth information and the information related to whether or not the gradient filter is applied described in the above embodiments, some information can be notified by signals, and some information can be derived through the agreement between the encoder and decoder. Alternatively, all information can be notified by signals. Alternatively, all information can be derived through the agreement between the encoder and decoder without signaling.

[0239] Furthermore, the aforementioned information can be signaled in higher-level parameters such as VPS (Video Parameter Set), SPS (Sequence Parameter Set), APS (Adaptive Parameter Set), PPS (Picture Parameter Set), Picture Header, and Patch Header, or it can be signaled in units of patches or blocks (e.g., coding tree units, coding units, etc.). The corresponding information can be signaled at higher levels, and information with similar meaning can be signaled at lower levels based on the specific value of the corresponding information.

[0240] Figure 9 This is a diagram illustrating a video encoding method and / or a video decoding method according to embodiments of the present disclosure. It may be changed or omitted. Figure 9 Each step.

[0241] Furthermore, after obtaining the error value between the predicted block generated based on the template region and the actual reconstructed sample, the prediction mode with the smallest error value can be selected as the intra-prediction mode for the current block. In this process, the error value is calculated by applying the same weight to each reconstructed sample in the template region. However, as the reconstructed sample becomes farther away from the current block, the correlation may decrease, potentially leading to inaccurate intra-prediction mode derivation and degraded coding performance. Therefore, in reference... Figure 10 In the implementation, a method is proposed to determine the weights applied to the error value based on the distance between the sample in the template region and the current block. This method can more accurately calculate the intra-frame prediction mode and improve prediction performance.

[0242] As an example, it can be determined whether to perform template region-based intra-prediction mode derivation (S901). This step may include determining whether to perform TIMD (template-based intra-prediction mode) derivation. In this case, it can be determined whether to perform template region-based intra-prediction mode derivation based on information signaled regarding whether to perform template region-based intra-prediction mode derivation. However, as another example, it can also be determined whether to perform template region-based intra-prediction mode derivation based on an agreement between the encoder and decoder without having separate information signaling. For example, it can be determined whether to perform template region-based intra-prediction mode derivation based on the size, shape, form, size, etc. of the current block without having separate information signaling. As an example, when the size or area of ​​the current block is equal to or greater than a specific value (e.g., when the width...), the determination can be made... When the height is greater than 1024, it can be determined that intra-prediction mode derivation based on template region will not be performed. This is just an example, and other values ​​and / or other conditions can be used through conventions between the encoder and decoder.

[0243] Subsequently, the template region can be determined (S902). The template region can be used to determine the intra-frame prediction mode and blending weights. Based on the above reference... Figure 8 In the described implementation, the upper adjacent region A, the left region L, and / or the upper left region AL of the current block can be used as template regions. Furthermore, combinations of the aforementioned regions can also be used as template regions. Additionally, template regions can be predefined in the encoder / decoder without signaling, or specific template regions can be determined via signaling of relevant information.

[0244] As mentioned above Figure 8 As described, the size of the template region can vary depending on the size of the current block. For example, when the current block size is small, the template region can also be applied in a smaller manner. As an example, in the case of a 4×4 block, the size of the template region can be defined as W. A =2、H A=2、W L =2 and H L =2. When the current block size is large, the stencil region size can also be larger. As an example, outside of a 4x4 block, the stencil region size can be defined as W. A =W、H A =H、W L =4 and H L =H. The template region defined in this paper is merely an example and can vary depending on the encoder / decoder definition. Furthermore, since the size of the template region, based on the current block size, is closely related to the increased computational complexity required during the application of template region-based intra-prediction mode derivation, it needs to be defined so that, in the case of small blocks, a template region with a relatively small area can be used to reduce the computational complexity required per pixel.

[0245] As mentioned above Figure 8 The template region described can be used without using boundaries across slices, tiles, blocks (e.g., CTU, CU, etc.) and virtual boundaries, etc., to maintain the independence of each slice, tile, block (e.g., CTU, CU, etc.).

[0246] As mentioned above Figure 8 As described, considering the size, shape, dimensions, and form of the blocks (e.g., the width-to-height ratio), the value of H used to determine the size of regions A, L, and AL can be determined differently. A and W L The size. For example, in the case of a 32×4 block, in order to minimize the computational complexity and memory increase required in this process, H A The value of W can be used to be relatively small, and W L The value can be used as relatively large.

[0247] As mentioned above Figure 8 The described method involves determining the size of combined region A, region L, and region AL, as well as the template region, based on the intra-prediction mode used for regions adjacent to the current block to be encoded / decoded. (See above for reference.) Figure 8 As described, the correlation with each region can be derived based on the direction of the intra-prediction mode (e.g., vertical or horizontal direction, etc.), and the size of each region can be adjusted and used to perform template region-based intra-prediction mode derivation.

[0248] Subsequently, intra-prediction mode candidates can be derived (S903). Each candidate can be derived based on intra-prediction modes stored in neighboring intra-prediction blocks and inter-frame blocks surrounding the current block. As mentioned above, this can include MPM or secondary MPM mode candidates. Furthermore, arbitrary intra-prediction mode candidates can be configured using a method defined by convention between the encoder and decoder. For example, intra-prediction mode candidates can be derived by merging MPMs, secondary MPMs, and intra-prediction modes stored in neighboring intra-prediction blocks and inter-frame blocks surrounding the current block. In this case, intra-prediction mode candidates can be derived by assigning priorities to intra-prediction modes based on a specific method among MPMs, secondary MPMs, and intra-prediction modes stored in neighboring blocks surrounding the current block, and the priorities within the corresponding modes can follow a commonly predefined order in the encoder and decoder.

[0249] At this point, for intra-prediction mode candidates, the error value between the predicted block and the actual reconstructed sample can be obtained based on the template region, and the error value of the intra-prediction mode candidate can be derived. As mentioned above, in order to obtain the error value, error calculation methods such as SAD (sum of differences), SATD (sum of transformed differences), SSE (sum of squared errors), MR-SAD (sum of differences without mean), MR-SSE (sum of squared errors without mean), and MR-SATD (sum of transformed differences without mean) can be used.

[0250] Subsequently, the weight values ​​to be applied to each prediction block and the number of intra-prediction mode candidates can be determined (S904). In this case, the error value can be derived based on each intra-prediction mode, the error values ​​can be sorted in ascending order, any N intra-prediction modes with the minimum error value can be selected, and a prediction block can be generated based on the selected intra-prediction modes. The corresponding blocks can be weighted to generate the final prediction block. As an example, Equation 8 below can be used as a condition for adding any N modes in a weighted manner.

[0251] [Formula 8]

[0252] In Equation 8, costMode1 represents the error value of the intra-frame mode with the minimum error value. k Let m represent the error value of the intra-frame mode with the k-th minimum error value. m is any real number, and can be, for example, 2. N is any real number, and can be, for example, 2. Weight values ​​can be calculated to have a weight ratio that is inversely proportional to the error value of each intra-frame prediction mode. For example, since the weight ratio when two prediction blocks are weighted and added is the same as described above with reference to Equation 6, the repeated description will be omitted.

[0253] Furthermore, as described above, according to the implementation, the weights for error values ​​can be determined differently based on the sample distance between samples in the template region and the current block. Here, the weights are used for error values ​​and are intended to fairly assign priority among samples in the template region based on their distance to the current block. For example, relatively high weights can be applied to error values ​​for samples close to the current block, and relatively low weights can be applied to error values ​​for samples far from the current block. This will be referred to... Figure 10 Detailed description. Figure 10 This is a diagram illustrating the process of obtaining weights for error values ​​of a template region applicable to embodiments of this disclosure.

[0254] For example, refer to Figure 10 The weights can be applied only to the error value of the first line adjacent to the current block among the sample lines in the partially reconstructed region (i.e., the template region). The error value can be derived based on Equation 9 below.

[0255] [Formula 9]

[0256] As shown in Equation 9 above, the error values ​​of the sample lines for the template region can be updated. According to the implementation of Equation 9, the update is performed on the error value of the first line, thus updating the error values ​​of the template region corresponding to the intra-frame prediction mode. In Equation 9, k can represent the weight value. This can represent the reconstructed sample of the α-th line. This can represent the predicted sample of the α-th line. It can represent the reconstructed sample of the last line of the template region, and This can represent the predicted sample of the last line in the template region. For example, k can be any value, such as 2. The error (a, b) is an error calculation function of a and b, and various error calculation methods can be used to obtain the error value, such as SAD (sum of differences), SATD (sum of transformed differences), SSE (sum of squared errors), MR-SAD (sum of differences after removing the mean), MR-SSE (sum of squared errors after removing the mean), and MR-SATD (sum of transformed differences after removing the mean). Furthermore, Equation 9 is only an example of applying the weight only to the error value of the first line in the template region. Therefore, when the weight is applied only to the error value of one or more sample lines, the equation can be modified as follows: Where m can be any positive value, and k can be greater than or equal to m. Here, the sample lines in the template region can be predetermined by an agreement between the encoder and decoder. Furthermore, as another example, weights can be applied only to the error value of the first line, only to the error value corresponding to the sample line corresponding to half of the template region, applied to all lines except the last sample line, or applied to all lines. In this case, weights can be applied differently, and the weight value can decrease as the distance from the current block increases.

[0257] More specifically, the sample lines to which weights are applied can vary based on the block size. For example, for a 4×4 block, weights can be applied only to the error values ​​of the first line. Furthermore, for blocks outside the 4×4 block, weights can be applied only to the error values ​​of the sample lines corresponding to half of the template region. Additionally, the weight values ​​applied to the error values ​​can be predetermined by an agreement between the encoder and decoder. For example, a fixed weight value k can be applied to the weighted sample lines. In this example, k can be 2.

[0258] Furthermore, for multiple sample lines with applied weights, different weight values ​​(such as k, ..., j) can be applied, such that the weight value decreases as the distance from the current block increases. For example, assuming the template region consists of four sample lines, weights of 8, 6, 5, and 3 can be applied sequentially to the lines closest to the current block. In other words, when a sample line is closer to the current block, a higher weight can be applied to the error value of the corresponding sample line.

[0259] As described above, by calculating the error value by applying weights to each sample line and sorting the error values ​​of the derived intra-prediction modes in ascending order, m intra-prediction modes with the smallest error values ​​can be selected. Since the subsequent process is the same as described above, its redundant description will be omitted.

[0260] Furthermore, although the relevance of samples typically decreases with increasing distance from the current block, there may be samples where this does not hold true. Therefore, it is necessary to consider blocks with decreasing relevance and blocks with no decreasing relevance. Depending on the implementation, a method of applying weights to the error values ​​can be selectively applied. This can be performed via signaling of explicit information as shown in Table 10 below.

[0261] [Table 10]

[0262] In the embodiments related to the table above, information is communicated using signals based on coding units. However, since this corresponds to embodiments of this disclosure, information can also be communicated using signals in various units, such as various blocks including coding units, slices, and tiles.

[0263] As an example, to derive an intra-prediction mode, a signal can be used to indicate whether a template region-based intra-prediction mode derivation method is used. This signal can be called the fifth information, and can be represented as `timdFlag`. When the value of the fifth information is a specific value (e.g., 0), this specifies that the template region-based intra-prediction mode derivation method is not used. Conversely, when the value of the fifth information is a specific value (e.g., 1), this specifies that the template region-based intra-prediction mode derivation method is used.

[0264] Subsequently, based on the fifth information, other information (e.g., the sixth information, etc.) can be signaled. For example, when applying a template region-based intra-prediction mode derivation method, other information can be signaled. For instance, when applying a template region-based intra-prediction mode derivation method, information indicating whether to apply weights to the error values ​​for the template region can be signaled. For example, this information can be called the sixth information and can be represented as IsErrorWeight, and can be signaled when the value of the fifth information is a specific value (e.g., 1). For example, when the value of the sixth information is a specific value (e.g., 1), as in the above embodiment, the encoder and decoder can apply weights to the error values ​​of specific sample lines within a predetermined template region. In this case, as described above, the weights can be different for the corresponding sample lines. On the other hand, when the value of the sixth information is a specific value (e.g., 0), no weights can be applied to the error values, or the same weights can be applied to the corresponding sample lines.

[0265] As another example, without signaling the sixth information, whether to apply weights to the error value can be deduced based on specific conditions (such as the size, shape, or dimensions of the current block). For example, when the current block is smaller than a certain size, such as in the case of a 4×4 block, the sixth information could always have a specific value (e.g., 0) without signaling, such that no weight is applied to the error value, or the same weight could be applied to the corresponding sample line. Alternatively, the method of applying weights to the error value could always be applied without a separate condition, such as regardless of the size of the current block.

[0266] Furthermore, the aforementioned information can be signaled in higher-level parameters such as VPS (Video Parameter Set), SPS (Sequence Parameter Set), APS (Adaptive Parameter Set), PPS (Picture Parameter Set), picture headers, and tile headers, and can also be signaled in units of tiles or blocks (e.g., coding tree units, coding units, etc.). Information can be signaled at higher levels, and based on the specific values ​​of the information, similar information with the same meaning can be signaled at lower levels.

[0267] Due to the above reference Figures 7 to 10 The video encoding and / or video decoding methods described correspond to embodiments of this disclosure, and therefore some steps may be changed or some steps may be removed, and the order of some steps may be changed, and such embodiments are also included in embodiments of this disclosure.

[0268] Figure 11 This is a diagram illustrating a video decoding method according to an embodiment of the present disclosure. Figure 11 The video decoding method can be executed by the aforementioned video decoding device (decoder), and can be based on the above-mentioned references including Figures 7 to 10 The various embodiments described in the accompanying drawings are shown. Therefore, descriptions that overlap with the descriptions of the embodiments described above will be omitted.

[0269] As an example, a template region for prediction of the current block can be determined (S1101). As mentioned above, the template region can be a reconstruction region adjacent to the current block, and can be adjacent to the left and / or the top.

[0270] Subsequently, intra-prediction blocks can be generated based on the determined template region (S1102). Intra-prediction blocks can be generated based on the determined template region using a decoder-side intra-prediction mode derivation method and / or a template region-based intra-prediction mode derivation method. As an example, one or more intra-prediction blocks can be generated. That is, multiple intra-prediction blocks can be generated. Furthermore, the intra-prediction modes applied to the respective intra-prediction blocks can be different from each other, and selected intra-prediction mode candidates can be used to generate prediction blocks. To determine the template region and generate intra-prediction blocks, this process can be based on first information and / or fifth information, and the first information and / or fifth information can be signaled from the bitstream.

[0271] Subsequently, although not shown in the figure, as described above, the weights applicable to the corresponding intra-prediction blocks can be determined. By applying the weights to the corresponding intra-prediction blocks, the weights can be used to generate the final intra-prediction block.

[0272] Furthermore, as described above, an intra-prediction block is generated based on an intra-prediction mode derived using a template region, and the intra-prediction mode is derived based on derivation method information specifying the intra-prediction mode derivation method. The derivation method information can specify at least one of a method based on the gradient of the template region or a method based on the error value of the template region. Here, the intra-prediction mode can be derived based on at least one of the first to seventh information mentioned above.

[0273] Furthermore, derivation method information for a specified intra-prediction mode derivation method can be obtained from the bitstream. In other words, the derivation method information can be information encoded by the encoder and signaled. However, as mentioned above, the derivation method can also be determined based on a predetermined agreement between the encoder and decoder.

[0274] Furthermore, as mentioned above, the number of intra-prediction blocks used to generate the final intra-prediction block can be determined based on specific conditions. For example, these specific conditions can be related to the magnitude of each intra-prediction mode based on gradients (e.g., HoG). Additionally, these specific conditions can be derived based on prediction mode condition information obtained from the bitstream. However, as mentioned above, these specific conditions can also be determined based on a predetermined agreement between the encoder and decoder.

[0275] Furthermore, as mentioned above, intra-frame prediction blocks may include prediction blocks generated based on a planar mode. Here, the generation of the final prediction block can be constrained to include a planar prediction block, and whether to use a planar mode can be determined based on information obtained from the bitstream. This information may include third-party information.

[0276] Furthermore, as mentioned above, the intra-frame prediction mode can be derived based on the error value weights determined by the sample distance between the current block and the template region, and the error value weights can be determined for each sample line in the template region. Moreover, the error value weights can be determined as different values ​​for the corresponding sample lines.

[0277] Due to the above reference Figure 11 The video decoding method described corresponds to the embodiments of this disclosure, and therefore some steps may be changed or some steps may be removed, and the order of some steps may be changed, and such embodiments are also included in the embodiments of this disclosure.

[0278] Figure 12 This is a diagram illustrating a video coding method according to an embodiment of the present disclosure. Figure 12 The video encoding method can be executed by the aforementioned video encoding device (encoder), and can be based on the above-mentioned references including Figures 7 to 10 The various embodiments are described in the accompanying drawings.

[0279] As an example, a template region for prediction of the current block can be determined (S1201). As mentioned above, the template region can be a reconstruction region adjacent to the current block, and can be adjacent to the left and / or the top.

[0280] Subsequently, intra-prediction blocks can be generated based on the determined template region (S1202). On the video coding side, that is, also on the encoder side, intra-prediction blocks can be generated based on the determined template region using the decoder-side intra-prediction mode derivation method and / or the template region-based intra-prediction mode derivation method. Here, one or more intra-prediction blocks can be generated. That is, multiple intra-prediction blocks can be generated. Furthermore, the intra-prediction modes applied to the respective intra-prediction blocks can be different from each other, and selected intra-prediction mode candidates can be used to generate prediction blocks. In order for the decoder to determine the template region and generate intra-prediction blocks, the encoder can encode a series of information required for this, including first information and / or fifth information, and can signal the first information and / or fifth information via a bitstream.

[0281] Subsequently, although not shown in the figure, as described above, the weights applicable to the corresponding intra-prediction block can be determined. By applying the weights to the corresponding intra-prediction block, the weights can be used to generate the final intra-prediction block. Information about the weights can also be transmitted from the encoder side to the decoder side via signals.

[0282] Furthermore, as described above, intra-prediction blocks can be generated based on intra-prediction modes derived using template regions, and derivation method information specifying the method used to derive the intra-prediction modes can be generated. The derivation method information can specify at least one of a method based on the gradient of the template region or a method based on the error value of the template region. The derivation method information can be encoded in the bitstream and communicated via signals. However, as described above, the derivation method can also be determined based on a predetermined agreement between the encoder and decoder.

[0283] Furthermore, as mentioned above, the number of intra-prediction blocks used to generate the final intra-prediction block can be determined based on specific conditions. For example, the specific conditions can be related to the magnitude of each intra-prediction mode based on gradients (e.g., HoG). Moreover, the specific conditions can be encoded in the bitstream and signaled as prediction mode condition information. However, as mentioned above, the specific conditions can also be determined based on a predetermined agreement between the encoder and decoder.

[0284] Furthermore, as mentioned above, the intra-frame prediction block may also include a prediction block generated based on a planar pattern. Here, the generation of the final prediction block can be constrained to include a planar prediction block, but whether or not a planar pattern is used can also be explicitly signaled by encoding it in the bitstream. This information may include third-party information.

[0285] Furthermore, as mentioned above, the intra-frame prediction mode can be derived based on the error value weights determined by the sample distance between the current block and the template region, and the error value weights can be determined for each sample line in the template region. Moreover, the error value weights can be determined as different values ​​for the corresponding sample lines.

[0286] Due to the above reference Figure 12 The video encoding method described corresponds to the embodiments of this disclosure, therefore some steps may be changed or some steps may be removed, and the order of some steps may be changed, and such embodiments are also included in the embodiments of this disclosure.

[0287] According to this disclosure, when an image or video is intra-coded, the intra-prediction mode can be efficiently derived on the decoder side. The intra-prediction mode can be efficiently derived by combining features of the decoder-side intra-prediction mode derivation method and the template region-based intra-prediction mode derivation method. Furthermore, coding efficiency can be improved by using a method that derives the intra-prediction mode more accurately by applying weights to error values ​​associated with the template region.

[0288] The various embodiments of this disclosure can be used alone or in combination with other embodiments.

[0289] Although the exemplary method of this disclosure described above is represented as a series of operations for clarity, it is not intended to limit the order in which the steps are performed, and the steps may be performed simultaneously or in different orders as needed. To implement the method according to the invention, the described steps may further include other steps, including remaining steps in addition to some of the steps, or additional steps in addition to some of the steps.

[0290] In this disclosure, the image encoding device or image decoding device that performs a predetermined operation (step) can perform an operation (step) that confirms the execution conditions or circumstances of the corresponding operation (step). For example, if it is described that a predetermined operation is performed when predetermined conditions are met, the image encoding device or image decoding device can perform the predetermined operation after determining whether the predetermined conditions are met.

[0291] The various embodiments of this disclosure are not a list of all possible combinations and are intended to describe representative aspects of this disclosure; the matters described in the various embodiments may be applied independently or in combination of two or more.

[0292] Various embodiments of this disclosure can be implemented in hardware, firmware, software, or a combination thereof. When this disclosure is implemented in hardware, it can be implemented using application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, etc.

[0293] Furthermore, the image decoding and image encoding apparatuses applying the embodiments of this disclosure can be included in multimedia broadcasting transmission and receiving devices, mobile communication terminals, home theater video devices, digital cinema video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, cameras, video-on-demand (VoD) service providers, OTT video (over-the-top video) devices, Internet streaming service providers, three-dimensional (3D) video devices, video telephony devices, medical video devices, etc., and can be used to process video signals or data signals. For example, OTT video devices can include game consoles, Blu-ray players, Internet access televisions, home theater systems, smartphones, tablet PCs, digital video recorders (DVRs), etc.

[0294] Figure 11 This is a diagram illustrating an example of a content streaming system to which embodiments of the present disclosure can be applied.

[0295] like Figure 11 As shown, a content streaming system applying the embodiments of this disclosure typically includes an encoding server, a streaming server, a web server, a media storage device, a user device, and a multimedia input device.

[0296] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data to generate a bitstream and then sends the bitstream to the streaming server. As another example, when multimedia input devices such as smartphones, cameras, and camcorders generate the bitstream directly, the encoding server can be omitted.

[0297] The bitstream can be generated by an image encoding method or image encoding apparatus that applies the embodiments of this disclosure, and the streaming server can temporarily store the bitstream during the sending or receiving of the bitstream.

[0298] A streaming server sends multimedia data to a user device based on a user's request through a web server, and the web server acts as a medium for notifying the user of services. When a user requests a desired service from the web server, the web server can deliver it to the streaming server, and the streaming server can send the multimedia data to the user. In this scenario, the content streaming system may include a separate control server. In this case, the control server acts as a command / response controller between devices within the content streaming system.

[0299] A streaming server can receive content from media storage and / or encoding servers. For example, when content is received from an encoding server, it can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a predetermined period of time.

[0300] Examples of user devices may include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, tablet PCs, tablet computers, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, head-mounted displays), digital televisions, desktop computers, digital signage, etc.

[0301] In a content streaming system, each server can operate as a distributed server, in which case the data received from each server can be distributed.

[0302] The scope of this disclosure includes software or executable commands (e.g., operating systems, applications, firmware, programs, etc.) for enabling the operation of methods according to various embodiments to be executed on a device or computer, and a non-transitory computer-readable medium having such software or commands stored thereon and executable on a device or computer.

[0303] Industrial applicability

[0304] The embodiments disclosed herein can be used to encode or decode images.

Claims

1. A method for video decoding, the method comprising the following steps: Determine the template region for prediction of the current block; as well as Intra-prediction blocks are generated based on the template region. The intra-prediction block is generated based on an intra-prediction mode derived from the template region, and The intra-frame prediction mode is derived based on the derivation method information of the specified intra-frame prediction mode derivation method. The derivation method information specifies at least one of a method based on the gradient of the template region or a method based on the template cost of the template region.

2. The method according to claim 1, in, The derivation method information is obtained from the bit stream.

3. The method according to claim 1, in, The number of intra-frame prediction blocks is determined based on specific conditions.

4. The method according to claim 3, in, The specific condition is related to the magnitude of each intra-frame prediction mode based on the gradient.

5. The method according to claim 3, in, The specific conditions are derived based on the prediction pattern condition information obtained from the bitstream.

6. The method according to claim 1, in, The intra-frame prediction block includes prediction blocks generated based on planar patterns.

7. The method according to claim 6, in, Whether to use the plane mode is determined based on information obtained from the bitstream.

8. The method according to claim 1, in, The intra-frame prediction mode is derived based on template cost weights, which are determined based on the distance between the current block and the samples in the template region.

9. The method according to claim 8, in, The template cost weight is determined for each sample line in the template region.

10. A video encoding method, the method comprising the following steps: Determine the template region for prediction of the current block; as well as Intra-prediction blocks are generated based on the template region. The intra-prediction block is generated based on an intra-prediction mode derived from the template region, and The intra-frame prediction mode is derived based on at least one of a method based on the gradient of the template region or a method based on the template cost of the template region.

11. A medium for storing a bitstream generated by a video coding method, wherein, The video encoding method includes the following steps: Determine the template region for prediction of the current block; and Intra-prediction blocks are generated based on the template region. The intra-prediction block is generated based on an intra-prediction mode derived from the template region, and The intra-frame prediction mode is derived based on at least one of a method based on the gradient of the template region or a method based on the template cost of the template region.

12. A bit stream transmission method, the bit stream transmission method comprising the following steps: Send the bitstream generated by the video encoding method. The video encoding method includes the following steps: Determine the template region for prediction of the current block; and Intra-prediction blocks are generated based on the template region. The intra-prediction block is generated based on an intra-prediction mode derived from the template region, and The intra-frame prediction mode is derived based on at least one of a method based on the gradient of the template region or a method based on the template cost of the template region.