Video decoding method and apparatus based on CCLM prediction in a video coding system
The video decoding method using CCLM for intra prediction addresses the inefficiencies in high-resolution video coding by limiting sample selection, enhancing coding efficiency and reducing computational complexity.
Patent Information
- Application Number
- JP2023018282
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-09-27
- Filing Date
- 2023-02-09
- Publication Date
- 2024-08-21
- Estimated Expiration
- 2039-09-20
AI Technical Summary
The increasing demand for high-resolution, high-quality video has led to a surge in transmission and storage costs due to the increased amount of data, necessitating more efficient video coding techniques, particularly in intra prediction methods.
A video decoding method and apparatus that utilizes Cross Component Linear Model (CCLM) for intra prediction, limiting the number of adjacent samples used to derive linear model parameters, thereby reducing complexity and enhancing coding efficiency.
This approach increases video coding efficiency by optimizing intra prediction, reducing computational complexity, and minimizing hardware costs for decoding devices.
Smart Images

Figure 0007538267000055 
Figure 0007538267000064 
Figure 0007538267000071
Abstract
Description
[Technical field]
[0001] This document relates to video coding technology, and more particularly to a video decoding method and apparatus based on intra prediction by CCLM in a video coding system. [Background technology]
[0002] Recently, the demand for high-resolution, high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images is increasing in various fields. As the resolution and quality of image data increases, the amount of information or bits to be transmitted increases relatively compared to existing image data, so that when the image data is transmitted using a medium such as an existing wired or wireless broadband line or when the image data is stored using an existing storage medium, the transmission cost and storage cost increase.
[0003] Therefore, in order to effectively transmit, store and play back high-resolution, high-quality video information, a highly efficient video compression technique is required. Summary of the Invention [Problem to be solved by the invention]
[0004] The technical problem of this document is to provide a method and apparatus for increasing video coding efficiency.
[0005] Another technical problem of this document is to provide a method and apparatus for improving the efficiency of intra prediction.
[0006] Another technical problem of this document is to provide a method and apparatus for improving the efficiency of intra prediction based on CCLM (Cross Component Linear Model).
[0007] Another technical problem of this document is to provide an efficient encoding and decoding method for CCLM prediction, and an apparatus for performing said encoding and decoding method.
[0008] Another technical problem of this document is to provide a method and apparatus for selecting neighboring samples for deriving linear model parameters for CCLM. [Means for solving the problem]
[0009] According to an embodiment of the present disclosure, there is provided an image decoding method performed by a decoding device, the image decoding method comprising: selecting a CCLM (cross-component linear matrix) intra prediction mode for a current chroma block; the specific value being equal to the specific value; deriving a number of upper adjacent chroma samples of the current chroma block and a number of left adjacent chroma samples of the current chroma block that are equal to the specific value if the width and the height are equal to or greater than the specific value; deriving downsampled adjacent luma samples and downsampled luma samples of a current luma block, the adjacent luma samples corresponding to the upper adjacent chroma sample and the left adjacent chroma sample; deriving CCLM parameters based on the upper adjacent chroma sample, the left adjacent chroma sample, and the downsampled adjacent luma sample; deriving predicted samples for the current chroma block based on the CCLM parameters and the downsampled luma samples; and generating reconstructed samples for the current chroma block based on the predicted samples,
[0010] According to another embodiment of the present document, a decoding device for performing video decoding is provided. the decoding apparatus further comprises: a prediction unit configured to derive a cross-component linear model (CCLM) mode as an intra prediction mode of a current chroma block; derive a specific value for the current chroma block; compare a width and a height of the current chroma block with the specific value; and if the width and the height are equal to or greater than the specific value, derive an upper adjacent chroma sample of the current chroma block equal in number to the specific value and a left adjacent chroma sample of the current chroma block equal in number to the specific value; derive a downsampled adjacent luma sample and a downsampled luma sample of a current luma block, the adjacent luma samples corresponding to the upper adjacent chroma sample and the left adjacent chroma sample; derive CCLM parameters based on the upper adjacent chroma sample, the left adjacent chroma sample, and the downsampled adjacent luma sample;
[0011] According to another embodiment of the present document, there is provided a video encoding method performed by an encoding device, the method comprising: determining a specific value for the current chroma block from a specific prediction mode (prediction model) of the current chroma block; deriving a specific value for the current chroma block; comparing a width and a height of the current chroma block with the specific value; if the width and the height are equal to or greater than the specific value, deriving an upper neighboring chroma sample of the current chroma block in a number equal to the specific value and a left neighboring chroma sample in a number equal to the specific value; deriving downsampled neighboring luma samples and downsampled luma samples of a current luma block, the neighboring luma samples corresponding to the upper neighboring chroma sample and the left neighboring chroma sample; deriving CCLM parameters based on the upper neighboring chroma sample, the left neighboring chroma sample, and the downsampled neighboring luma sample; deriving prediction samples for the current chroma block based on the CCLM parameters and the downsampled luma samples;
[0012] According to another embodiment of the present document, there is provided a video encoding device, the encoding device being implemented using CCLM (cross-component linear memory). the specific value being equal to the specific value of upper adjacent chroma samples and the specific value being equal to the specific value of left adjacent chroma samples of the current chroma block if the width and the height are equal to or greater than the specific value; deriving downsampled adjacent luma samples and downsampled luma samples of a current luma block, the adjacent luma samples corresponding to the upper adjacent chroma sample and the left adjacent chroma sample; deriving CCLM parameters based on the upper adjacent chroma sample, the left adjacent chroma sample, and the downsampled adjacent luma sample; and deriving prediction samples for the current chroma block based on the CCLM parameters and the downsampled luma samples; and an entropy encoding unit encoding image information including prediction related information for the current chroma block, Effect of the Invention
[0013] According to the document, it can improve the overall image / video compression efficiency.
[0014] According to this document, the efficiency of intra prediction can be improved.
[0015] According to this document, intra prediction can be performed based on CCLM to improve video coding efficiency.
[0016] According to this document, the efficiency of intra prediction based on CCLM can be improved.
[0017] According to this document, the complexity of intra prediction can be reduced by limiting the number of neighboring samples selected to derive linear model parameters for CCLM to a specific number. [Brief description of the drawings]
[0018] [Figure 1] 1 illustrates generally an example of a video / image coding system in which embodiments of the present document can be applied; [Diagram 2] FIG. 2 is a diagram illustrating the configuration of a video / image encoding device to which the embodiments of this document can be applied. [Diagram 3] 1 is a diagram illustrating the configuration of a video / image decoding device to which an embodiment of this document can be applied. [Figure 4] 65 intra-directional modes of prediction directions are shown exemplarily. [Diagram 5] 4 is a diagram illustrating a process of deriving an intra prediction mode of a current chroma block according to an embodiment. [Figure 6] We present 2N reference samples for parameter calculation for the CCLM prediction described above. [Figure 7a] 11 is a diagram illustrating a process of performing CCLM prediction on a current chroma block according to an embodiment. [Figure 7b] 11 is a diagram illustrating a process of performing CCLM prediction on a current chroma block according to an embodiment. [Figure 8a] 11 is a diagram illustrating a process of performing CCLM prediction on a current chroma block according to an embodiment. [Figure 8b] 11 is a diagram illustrating a process of performing CCLM prediction on a current chroma block according to an embodiment. [Figure 9a] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 1 of the above embodiment. FIG. [Figure 9b]13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 1 of the above embodiment. FIG. [Figure 10a] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 2 of the above embodiment. FIG. [Figure 10b] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 2 of the above embodiment. FIG. [Figure 11a] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 3 of the above embodiment. FIG. [Figure 11b] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 3 of the above embodiment. FIG. [Figure 12a] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of the current chroma block derived by the method 4 of the above embodiment. FIG. [Figure 12b] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of the current chroma block derived by the method 4 of the above embodiment. FIG. [Figure 13a] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 1 of the above embodiment. FIG. [Figure 13b] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 1 of the above embodiment. FIG. [Figure 14a] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 2 of the above embodiment. FIG. [Figure 14b]13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 2 of the above embodiment. FIG. [Figure 15a] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 3 of the above embodiment. FIG. [Figure 15b] 13 is a diagram illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 3 of the above embodiment. FIG. [Figure 16] 13 shows an example of selecting neighboring reference samples for a chroma block. [Figure 17a] 10 illustrates an example of adjacent reference samples derived through conventional sub-sampling and adjacent reference samples derived through sub-sampling according to the present embodiment. [Figure 17b] 10 illustrates an example of adjacent reference samples derived through conventional sub-sampling and adjacent reference samples derived through sub-sampling according to the present embodiment. [Figure 17c] 10 illustrates an example of adjacent reference samples derived through conventional sub-sampling and adjacent reference samples derived through sub-sampling according to the present embodiment. [Figure 18] An example of performing CCLM prediction using subsampling using Equation 5 above will now be described. [Figure 19] 1 illustrates a schematic diagram of a video encoding method using an encoding device according to the present document. [Figure 20] 1 illustrates a schematic diagram of an encoding device for performing a video encoding method according to the present document; [Figure 21] 1 illustrates an outline of a video decoding method using a decoding device according to the present document. [Figure 22] 1 illustrates a schematic diagram of a decoding device for performing a video decoding method according to the present document. [Figure 23] 1 illustrates an exemplary structural diagram of a content streaming system to which the embodiments of this document are applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] This document may have various modifications and may have various embodiments, and a specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to a specific embodiment. Commonly used terms in this specification are used merely to describe a specific embodiment, and are not intended to limit the technical ideas of this document. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this specification, the terms "include" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0020] Meanwhile, each component in the drawings described in this document is illustrated independently for the convenience of explaining the different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components among each component may be combined to form one component, and one component may be divided into multiple components. An embodiment in which each component is integrated and / or separated is also included in the scope of this document as long as it does not deviate from the essence of this document.
[0021] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used to refer to the same components in the drawings, and duplicated descriptions of the same components may be omitted.
[0022] FIG. 1 illustrates a schematic diagram of an example of a video / image coding system in which embodiments of the present document can be applied.
[0023] As shown in Figure 1, the video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device in a file or streaming form via a digital storage medium or a network.
[0024] The source device may comprise a video source, an encoding device, and a sending unit. The receiving device may comprise a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / video encoding device, and the decoding device may be referred to as a video / video decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may comprise a display unit, which may be a separate device or an external component.
[0025] A video source may acquire video / images through a process of capturing, synthesizing, or generating video / images. A video source may include a video / image capture device and / or a video / image generation device. A video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device may include, for example, a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated via a computer, etc., in which case the video / image capture process may be replaced by a process in which related data is generated.
[0026] An encoding device may encode an input video / image. The encoding device may perform a series of steps such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) may be output in the form of a bitstream.
[0027] The transmitting unit may transmit the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit may include elements for generating a media file through a predetermined file format and may include elements for transmission via a broadcasting / communication network. The receiving unit may receive / extract the bitstream and transmit it to a decoding device.
[0028] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, and prediction that correspond to the operations of the encoding device.
[0029] The renderer may render the decoded video / image, and the rendered video / image may be displayed via a display unit.
[0030] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the versatile video coding (VVC) standard, the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation of audio video coding standard (AVS2), or next generation video / image coding standards (e.g., H.267 or H.268, etc.).
[0031] This document presents various embodiments relating to video / image coding, which embodiments may also be implemented in combination with each other, unless otherwise stated.
[0032] In this document, a video may mean a collection of a series of images over time. A picture generally means a unit showing one image at a specific time, and a slice / tile is a unit constituting a part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each of which consisting of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick.A brick scan can refer to a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set.The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture. A tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit. A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile.In this document, tile group and slice can be used interchangeably. For example, in this document, tile group / tile group header can be called slice / slice header.
[0033] A pixel or pel may refer to the smallest unit that constitutes one picture (or image). Also, a term corresponding to a pixel may be used as a "sample." A sample may generally indicate a pixel or a pixel value, may indicate only a pixel / pixel value of a luma component, or may indicate only a pixel / pixel value of a chroma component.
[0034] A unit may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. A unit may be used interchangeably with terms such as block or area depending on the case. In a general case, an M×N block may include samples (or sample arrays) consisting of M columns and N rows, or a set (or array) of transform coefficients.
[0035] In this document, the terms " / " and "," should be interpreted to indicate "and / or." For instance, the expression "A / B" may mean "A and / or B," and "A, B" may mean "A and / or B." Additionally, "A / B / C" means "at least one of A, B, and / or C." Also, "A, B, C" means "at least one of A, B, and / or C." (In this document, the term " / " and "," should be interpreted to indicate "and / or." For instance, the expression "A / B" may mean "A and / or B." Further, "A, B" may mean "A and / or B." Further, "A / B / C" may mean "at least one of A, B, and / or C." Also, "A / B / C" may mean "at least one of A, B, and / or C.")
[0036] Further, in the document, the term “or” should be interpreted to indicate “and / or.” For instance, the expression “A or B” may comprise 1) only A, 2) only B, and / or 3) both A and B. In other words, the term “or” in this document should be interpreted to indicate “additionally or alternatively.”
[0037] 2 is a diagram for illustrating a schematic configuration of a video / image encoding device to which an embodiment of the present document can be applied. Hereinafter, the video encoding device may include an image encoding device.
[0038] As shown in FIG. 2, the encoding apparatus 200 may be configured to include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image division unit 210, the prediction unit 220, the residual processing unit 230, the entropy encoding unit 240, the addition unit 250, and the filtering unit 260 may be configured with one or more hardware components (e.g., an encoder chip set or a processor) according to an embodiment. Also, the memory 270 may include a decoded picture buffer (DPB) and may be configured with a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0039] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree binary-tree ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, a quad-tree structure may be applied first, and a binary tree structure and / or a ternary structure may be applied later. Alternatively, a binary tree structure may be applied first. A coding procedure according to this document may be performed based on a final coding unit that is not further divided. In this case, the largest coding unit may be used as the final coding unit immediately based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as necessary, and a coding unit of an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be divided or partitioned from the final coding unit described above, respectively.The prediction unit is a unit of sample prediction, and the transform unit is a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0040] The unit may be used interchangeably with terms such as block or area. In general, an M×N block may refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally refer to a pixel or pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. A sample may be used as a term corresponding to a pixel or pel of a picture (or image).
[0041] The encoding apparatus 200 may generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input video signal (original block, original sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as illustrated, a unit that subtracts a prediction signal (predicted block, prediction sample array) from an input video signal (original block, original sample array) in the encoder 200 may be called a subtraction unit 231. The prediction unit may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including a prediction sample for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction information can be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0042] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on the prediction mode. In the intra prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode may include, for example, a DC mode and a planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 222 may also determine the prediction mode applied to the current block using the prediction mode applied to the neighboring block.
[0043] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between a neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 221 may generate information indicating which candidate is used to derive a motion vector and / or a reference picture index of the current block by forming a motion information candidate list based on neighboring blocks. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter prediction unit 221 may use motion information of a neighboring block as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, the motion vector of a neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0044] The prediction unit 220 may generate a prediction signal based on various prediction methods described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). In addition, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / moving image coding such as games, for example, as in screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be seen as an example of intra coding or intra prediction. When the palette mode is applied, a sample value within a picture may be signaled based on information regarding a palette table and a palette index.
[0045] The prediction signal generated through the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a restored signal or may be used to generate a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. The CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same square size, or may be applied to non-square, variable-sized blocks.
[0046] The quantizer 233 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoding unit 240, which may encode the quantized signal (information on the quantized transform coefficients) and output the quantized signal as a bitstream. The information on the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoding unit 240 may also encode information required for video / image restoration (e.g., values of syntax elements, etc.) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / picture information) may be transmitted or stored in the form of a bitstream in network abstraction layer (NAL) unit units. The video / picture information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / picture information may further include general constraint information. Information and / or syntax elements transmitted / signaled from an encoding device to a decoding device in this document may be included in the video / picture information.The video / image information may be encoded through the above-mentioned encoding procedure and included in the bitstream. The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding apparatus 200, or the transmitter may be included in the entropy encoding unit 240.
[0047] The quantized transform coefficients output from the quantizer 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be restored by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the current block, such as when a skip mode is applied, a predicted block may be used as a reconstructed block. The adder 250 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture after filtering, as described below.
[0048] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or restoration.
[0049] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240, as will be described later in the description of each filtering method. The filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0050] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 221. When inter prediction is applied through this, the encoding apparatus may avoid a prediction mismatch between the encoding apparatus 100 and the decoding apparatus, and may also improve encoding efficiency.
[0051] The memory 270DPB may store the modified reconstructed picture to be used as a reference picture in the inter prediction unit 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 221 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.
[0052] FIG. 3 is a diagram illustrating a schematic configuration of a video / image decoding device to which the embodiments of the present document can be applied.
[0053] As shown in FIG. 3, the decoding device 300 may be configured to include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter predictor 331 and an intra predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. The entropy decoding unit 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured as one hardware component (e.g., a decoder chipset or processor) according to an embodiment. Also, the memory 360 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.
[0054] When a bitstream including video / image information is input, the decoding apparatus 300 can restore an image corresponding to a process in which the video / image information is processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive a unit / block based on block division related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied in the encoding apparatus. Thus, the processing unit for decoding is, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximal coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the coding unit. And, the restored image signal decoded and output by the decoding apparatus 300 can be reproduced by a reproduction device.
[0055] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding apparatus may further decode pictures based on information on the parameter set and / or the general constraint information. Signaling / received information and / or syntax elements described later in this document may be obtained from the bitstream by being decoded via the decoding procedure. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration, quantized values of transform coefficients related to residuals, etc. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in a bitstream, determine a context model using information on a syntax element to be decoded and decoding information of adjacent and to-be-decoded blocks, or information on symbols / bins decoded in a previous step, predict the occurrence probability of a bin according to the determined context model, and perform arithmetic decoding of the bins to generate a symbol corresponding to the value of each syntax element.In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Prediction information from the information decoded by the entropy decoding unit 310 is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and the residual value entropy-decoded by the entropy decoding unit 310, i.e., the quantized transform coefficient and related parameter information, may be input to the residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, filtering information from the information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiving unit is a component of the entropy decoding unit 310. Meanwhile, the decoding device according to this document may be called a video / image / picture decoding device, and the decoding device may 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 the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.
[0056] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the rearrangement may be performed based on a coefficient scan order performed in the encoding apparatus. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0057] The inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0058] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information on the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0059] The prediction unit 320 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). In addition, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / moving image coding, such as, for example, SCC (screen content coding). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in that a reference block is derived within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be seen as an example of intra coding or intra prediction. When the palette mode is applied, information regarding a palette table and a palette index may be included in the video / image information and signaled.
[0060] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away depending on a prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block using a prediction mode applied to a neighboring block.
[0061] The inter prediction unit 332 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted from an inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 332 may configure a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on received candidate selection information. Inter prediction may be performed based on various prediction modes, and the information regarding the prediction may include information indicating a mode of inter prediction for the current block.
[0062] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for a current block, such as when a skip mode is applied, the predicted block may be used as a reconstructed block.
[0063] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in a current picture, and may be output after filtering as described below, or may be used for inter prediction of a next picture.
[0064] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during the picture decoding process.
[0065] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0066] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter prediction unit 332. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 331.
[0067] In this specification, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding apparatus 100 can also be applied identically or correspondingly to the filtering unit 350, inter prediction unit 332, and intra prediction unit 331 of the decoding apparatus 300, respectively.
[0068] Meanwhile, as described above, prediction is performed to improve compression efficiency when performing video coding. Through this, a predicted block including predicted samples for a current block, which is a block to be coded, can be generated. Here, the predicted block includes predicted samples in a spatial domain (or a pixel domain). The predicted block is derived in the same way by an encoding device and a decoding device, and the encoding device can improve video coding efficiency by signaling information (residual information) on the residual between the original block and the predicted block, not the original sample value of the original block itself, to the decoding device. The decoding device can derive a residual block including residual samples based on the residual information, combine the residual block and the predicted block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.
[0069] The residual information may be generated through a transform and quantization procedure. For example, the encoding apparatus may derive a residual block between the original block and the predicted block, perform a transform procedure on the residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and signal related residual information (through a bitstream) to a decoding apparatus. Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding apparatus may perform an inverse quantization / inverse transform procedure based on the residual information to derive a residual sample (or a residual block). The decoding apparatus may generate a reconstructed picture based on the predicted block and the residual block. The encoding apparatus may further derive a residual block by inverse quantizing / inverse transforming the quantized transform coefficients for reference for inter-prediction of a future picture, and generate a reconstructed picture based on the residual block.
[0070] FIG. 4 exemplarily shows intra-directional modes of 65 prediction directions.
[0071] As shown in Figure 4, intra prediction modes can be divided into intra prediction modes having horizontal directionality and intra prediction modes having vertical directionality, with intra prediction mode no. 34 having a left-up diagonal prediction direction as the center. H and V in Figure 4 respectively mean horizontal directionality and vertical directionality, and numbers from -32 to 32 indicate displacements in 1 / 32 units on a sample grid position. Intra prediction modes no. 2 to 33 have horizontal directionality, and intra prediction modes no. 34 to 66 have vertical directionality. The 18th intra prediction mode and the 50th intra prediction mode indicate a horizontal intra prediction mode (or horizontal mode) and a vertical intra prediction mode (or vertical mode), respectively, and the 2nd intra prediction mode can be called a left-down diagonal intra prediction mode, the 34th intra prediction mode can be called a left-up diagonal intra prediction mode, and the 66th intra prediction mode can be called a right-up diagonal intra prediction mode.
[0072] FIG. 5 is a diagram illustrating a process of deriving an intra prediction mode of a current chroma block according to an embodiment.
[0073] In this specification, the terms "chroma block", "chroma image", etc. may mean the same thing as a color difference block, a color difference image, etc., so that the terms "chroma" and "color difference" may be used interchangeably. Similarly, the terms "luma block", "luma image", etc. may mean the same thing as a luminance block, a luminance image, etc., so that the terms "luma" and "luminance" may be used interchangeably.
[0074] In this specification, a "current chroma block" may refer to a chroma component block of a current block that is a current coding unit, and a "current luma block" may refer to a luma component block of a current block that is a current coding unit. Thus, a current luma block and a current chroma block correspond to each other. However, the block types and the number of blocks of a current luma block and a current chroma block are not always the same, and may differ depending on the case. In some cases, a current chroma block may correspond to a current luma region, and in this case, the current luma region may be composed of at least one luma block.
[0075] In this specification, the term "reference sample template" may refer to a set of reference samples adjacent to a current chroma block for predicting the current chroma block. The reference sample template may be predefined, and information regarding the reference sample template may be signaled from the encoding apparatus 200 to the decoding apparatus 300.
[0076] As shown in Figure 5, a set of samples shaded in one line adjacent to a 4x4 block, which is a current chroma block, indicates a reference sample template. It can be seen from Figure 5 that the reference sample template is composed of one line of reference samples, whereas the reference sample area in the luma area corresponding to the reference sample template is composed of two lines.
[0077] In one embodiment, when performing intra-frame coding of a chroma image in the Joint Exploration TEST Model (JEM) used by the Joint Video Exploration Team (JVET), a Cross Component Linear Model (CCLM) can be used. CCLM is a method of predicting pixel values of a chroma image using pixel values of a restored luminance image, and is based on the characteristic of high correlation between a luminance image and a chroma image.
[0078] The CCLM prediction of Cb and Cr chroma images can be based on the following formula:
[0079]
number
[0080] Here, pred c (i, j) means the predicted Cb or Cr chroma image, and Rec L '(i, j) means the restored luminance image adjusted by the chroma block size, and (i, j) means the pixel coordinates. In the 4:2:0 color format, the size of the luminance image is twice that of the chrominance image, so the Rec of the chrominance block size is adjusted by downsampling. L Therefore, the color difference image pred c The pixels of the luminance image used for (i, j) can be used by taking into consideration not only RecL(2i, 2j) but also all the adjacent pixels. L ′(i,j) can be expressed in terms of downsampled luma samples.
[0081] For example, the Rec L '(i,j) can be derived using six adjacent pixels as follows:
[0082]
number
[0083] In addition, α and β indicate the cross-correlation and average value difference between the Cb or Cr chroma block neighboring template and the luminance block neighboring template, as shown in the shaded area of FIG. 3, and are, for example, as shown in Equation 3 below.
[0084]
number
[0085] Here, t L means the adjacent reference sample of the luma block corresponding to the current chroma image, and t C Here, m denotes the neighboring reference sample of the current chroma block to which the current coding is applied, (i, j) denotes the pixel position, and M(A) denotes the average of A pixels.
[0086] Meanwhile, samples for parameter calculation (ie, for example, α, β) for the above-mentioned CCLM prediction can be selected as follows.
[0087] If the current chroma block is an NxN sized chroma block, a total of 2N (N horizontal, N vertical) adjacent reference sample pairs (luminance and chrominance pairs) of the current chroma block can be selected.
[0088] If the current chroma block is an NxM or MxN chroma block (where N<=M), a total of 2N (N horizontal, N vertical) adjacent reference sample pairs of the current chroma block may be selected. Meanwhile, since M is greater than N (e.g., M=2N or 3N), N sample pairs may be selected through subsampling from among the M samples.
[0089] 6 shows 2N reference samples for parameter calculation for the above-mentioned CCLM prediction. As shown in FIG 6, 2N reference sample pairs derived for parameter calculation for the CCLM prediction may be shown. The 2N reference sample pairs may include 2N reference samples adjacent to the current chroma block and 2N reference samples adjacent to the current luma block.
[0090] As described above, 2N sample pairs can be derived, and when the CCLM parameters α and β are calculated using the sample pairs via the above-mentioned Equation 3, the following number of calculations as shown in Table 1 may be required.
[0091] [Table 1]
[0092] Referring to Table 1, for example, in the case of a chroma block of 4×4 size, 13 multiplication operations and 15 addition operations are required to calculate the CCLM parameters, and in the case of a chroma block of 32×32 size, 69 multiplication operations and 127 addition operations are required. That is, as the size of the chroma block increases, the amount of calculations required to calculate the CCLM parameters increases rapidly, which may directly lead to a delay problem when implementing the hardware. In particular, since the CCLM parameters must be derived through calculations in the decoding device as well, this may lead to a delay problem and increased implementation costs when implementing the hardware of the decoding device.
[0093] Therefore, the present embodiment can reduce the computational complexity for deriving the CCLM parameters, thereby reducing the hardware cost of the decoding device and the complexity and time of the decoding process.
[0094] As an example, in order to solve the problem of the increase in the amount of CCLM parameter calculations due to the increase in the chroma block size, the upper limit of adjacent sample selection N th After setting N, an embodiment can be proposed in which chroma block neighboring pixels are selected to calculate CCLM parameters, as described below. th can also be denoted as the maximum number of adjacent samples. For example, N th Can be set to =2, 4, 8, or 16.
[0095] The CCLM parameter calculation process according to this embodiment is as follows.
[0096] - When the current chroma block is a chroma block of size N×N and the N th >= N, a total of 2N (N horizontal and N vertical) adjacent reference sample pairs of the current chroma block can be selected.
[0097] - When the current chroma block is a chroma block of size N×N and the N th < N, a total of 2×N th pieces (N horizontal th pieces and N vertical th pieces) of adjacent reference sample pairs of the current chroma block can be selected.
[0098] - When the current chroma block is a chroma block of size N×M or M×N (where N <= M) and N th >= N, a total of 2N (N horizontal and N vertical) adjacent reference sample pairs of the current chroma block can be selected. Since M is larger than N (for example, M = 2N or 3N, etc.), among the M samples, N samples can be selected through subsampling.
[0099] - When the current chroma block is a chroma block of size N×M or M×N (where N <= M), N th < N, a total of 2×N th pieces (N horizontal th pieces and N vertical th pieces) of adjacent reference sample pairs of the current chroma block can be selected. Since M is larger than N (for example, M = 2N or 3N, etc.), among the M samples, N th samples can be selected through subsampling.
[0100] As described above, in this embodiment, the maximum number of adjacent samples to be selected is N th By setting, the number of adjacent reference samples for CCLM parameter calculation can be limited, and thus, even for a large chroma block, the CCLM parameters can be calculated through relatively few calculations.
[0101] In addition, the above-mentioned N th If is set to an appropriately small number (e.g., 4 or 8), worst-case operations (e.g., chroma blocks of 32×32 size) can be avoided during hardware implementation of CCLM parameter calculation, and therefore the number of hardware gates required compared to the worst case can be reduced, thereby achieving a reduction in hardware implementation costs.
[0102] For example, the above-mentioned N th When is 2, 4, and 8, the CCLM parameter calculation amount according to the chroma block size can be shown in the following table.
[0103] [Table 2]
[0104] On the other hand, the above N th N th It can be derived as a preset value in the encoding device and the decoding device without the need to transmit additional information indicating N th Additional information indicating N may be transmitted in units of CU (Coding Unit), slice, picture, or sequence. th N th The N th Additional information indicating N th The value of can be shown.
[0105] For example, N in CU th In the case where the additional information indicating the CCLM reduced sample flag is transmitted, when the intra prediction mode of the current chroma block is the CCLM mode, a method of parsing the syntax element cclm_reduced_sample_flag and performing a CCLM parameter calculation process as described below may be proposed. The cclm_reduced_sample_flag may indicate a syntax element of the CCLM reduced sample flag.
[0106] - If the cclm_reduced_sample_flag is 0 (false), calculate CCLM parameters via the existing CCLM adjacent sample selection method.
[0107] If the cclm_reduced_sample_flag is 1 (true), th = 2 and calculate CCLM parameters using the adjacent sample selection method proposed in the previous example.
[0108] Or N slices, pictures or sequences th If additional information indicating Nth is transmitted, the Nth value can be decoded based on the additional information transmitted via a high level syntax (HLS), as described below.
[0109] For example, the additional information signaled via the slice header may be shown in the following table.
[0110] [Table 3]
[0111] cclm_reduced_sample_num is the N th It is possible to indicate additional information syntax elements indicating:
[0112] Alternatively, for example, the additional information signaled via a Picture Parameter Set (PPS) may be shown as in the following table.
[0113] [Table 4]
[0114] Alternatively, for example, the additional information signaled via a Sequence Parameter Set (SPS) may be shown as in the following table.
[0115] [Table 5]
[0116] N derived based on the cclm_reduced_sample_num value (i.e., a value derived by decoding cclm_reduced_sample_num) transmitted via the slice header, the PPS, or the SPS th The values can be derived as in the table below.
[0117] [Table 6]
[0118] For example, referring to Table 6, the N th If the value of the cclm_reduced_sample_num is 0, the N th can be derived as 2, and when the value of the cclm_reduced_sample_num is 1, the N th can be derived as 4, and when the value of the cclm_reduced_sample_num is 2, the N thcan be derived as 8, and when the value of the cclm_reduced_sample_num is 3, the N th can be derived as 16.
[0119] On the other hand, when additional information indicating Nth is transmitted in units of a CU, slice, picture, or sequence, the encoding apparatus may th The value of N can be determined by the decoding device. th Denote the value of N th The additional information can be transmitted to
[0120] -When the additional information indicating the Nth value is transmitted in CU units, the encoding device can determine, via the RDO, which of the following two cases has better encoding efficiency when the intra prediction mode of the current chroma block is CCLM mode, and can transmit information on the determined method to the decoding device.
[0121] 1) If it is more efficient to perform CCLM parameter calculation using the existing CCLM reference sample selection method, send cclm_reduced_sample_flag with a value of 0 (false).
[0122] 2) If Nth=2 is set and the encoding efficiency is improved by performing CCLM parameter calculation through the CCLM reference sample method proposed in this embodiment, send cclm_reduced_sample_flag with a value of 1 (true).
[0123] Alternatively, when the additional information indicating the Nth value is transmitted in slice, picture, or sequence units, the encoding device may transmit the additional information indicating the Nth value by adding high level syntax (HLS) as shown in Table 3, Table 4, or Table 5. The encoding device may set the Nth value in consideration of the size of the input image or to match an encoding target bitrate.
[0124] 1) For example, if the input video is HD or above, the encoding device can set Nth=8, and if it is below that, it can set Nth=4.
[0125] 2) If high quality video encoding is required, the encoding device can set Nth=8; if normal quality video encoding is required, Nth=4; and if low quality video encoding is required, Nth=2.
[0126] Meanwhile, as shown in Table 2, when the method proposed in this embodiment is used, the amount of calculation required for CCLM parameter calculation does not increase even if the block size is large. For example, when the size of the current chroma block is 32×32, the amount of calculation for CCLM parameter calculation can be reduced by 86% using the method proposed in this embodiment (e.g., setting Nth=4).
[0127] The following table shows the experimental result data when the Nth is 2.
[0128] [Table 7]
[0129] In addition, the following table shows the experimental result data when Nth is 4.
[0130] [Table 8]
[0131] In addition, the following table shows the experimental result data when Nth is 8.
[0132] [Table 9]
[0133] In addition, the following table shows the experimental result data when Nth is 16.
[0134] [Table 10]
[0135] Tables 7 to 10 show the coding efficiency and the computational complexity when Nth is 2, 4, 8, and 16.
[0136] It can be seen from Tables 7 to 10 that the encoding efficiency remains almost unchanged even though the amount of calculation of the CCLM parameters is reduced. For example, from Table 8, when Nth is set to 4 (Nth=4), the encoding efficiency for each component is Y 0.04%, Cb 0.12%, and Cr 0.07%, which is almost unchanged from when Nth is not set, and the encoding and decoding complexities are reduced to 97% and 95%, respectively.
[0137] Also, referring to Tables 9 and 10, it can be seen that when the amount of CCLM parameter calculation is reduced (ie, Nth=8 or 16), the encoding efficiency is improved and the encoding and decoding complexity is reduced.
[0138] The method proposed in this embodiment can be used in CCLM mode, which is an intra prediction mode for chroma components, and the chroma blocks predicted via the CCLM mode can be used in an encoding device to derive a residual image via difference from an original image, or in a decoding device to derive a restored image via addition with a residual signal.
[0139] 7a and 7b are diagrams illustrating a process of performing CCLM prediction on a current chroma block according to an embodiment.
[0140] Referring to Fig. 7a, an encoding / decoding device may calculate CCLM parameters for the current block (S700). For example, the CCLM parameters may be calculated as shown in Fig. 7b.
[0141] FIG. 7b illustrates a specific embodiment of calculating the CCLM parameters. For example, referring to FIG. 7b, the encoding / decoding device calculates N th (S705). th is a preset value or is the N th It can be derived based on additional information for N th can be set to 2, 4, 8, or 16.
[0142] Thereafter, the encoding / decoding apparatus may determine whether the current chroma block is a square chroma block (S710).
[0143] If the current chroma block is a square chroma block, the encoding device / decoding device may th It can be determined whether it is greater than the specified value (S715).
[0144] The N is the N th If so, the encoding / decoding apparatus may use 2N th adjacent samples may be selected (S720).
[0145] The encoding / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference samples (S725).
[0146] In addition, the N th If not, the encoding / decoding apparatus may select 2N adjacent samples in a reference line adjacent to the current block as reference samples for the CCLM parameter calculation (S730). Thereafter, the encoding / decoding apparatus may derive parameters α and β for the CCLM prediction based on the selected reference samples (S725).
[0147] Meanwhile, if the current chroma block is not the square chroma block, the size of the current chroma block may be derived as M×N size or N×M size (S735), where M may be a value greater than N (N <M)。
[0148] Hereinafter, the encoding device / decoding device th It can be determined whether it is greater than the threshold (S740).
[0149] The N is the N th If so, the encoding / decoding apparatus may use 2N th adjacent samples can be selected (S745).
[0150] The encoding / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference samples (S725).
[0151] In addition, the N thIf not, the encoding / decoding apparatus may select 2N adjacent samples in a reference line adjacent to the current block as reference samples for the CCLM parameter calculation (S750). Thereafter, the encoding / decoding apparatus may derive parameters α and β for the CCLM prediction based on the selected reference samples (S725).
[0152] 7a again, when the parameters for CCLM prediction for the current chroma block are calculated, the encoding device / decoding device may perform CCLM prediction based on the parameters to generate predicted samples for the current chroma block (S760). For example, the encoding device / decoding device may generate predicted samples for the current chroma block based on the calculated parameters and Equation 1, in which reconstructed samples of the current luma block for the current chroma block are used.
[0153] Meanwhile, in this document, an embodiment different from the above-described embodiment can be proposed to reduce the computational complexity for deriving the CCLM parameters.
[0154] As an example, in order to solve the problem of the increase in the amount of CCLM parameter calculations due to the increase in the chroma block size, the upper limit of adjacent sample selection N th is adaptively set to the block size of the current chroma block, and the set N th An embodiment may be proposed in which neighboring pixels of the current chroma block are selected based on N th can also be denoted as the maximum number of adjacent samples.
[0155] For example, the N th can be set.
[0156] - For a current chroma block of size NxM (where, say, N<=M), and N<=TH, set Nth=2
[0157] - If the current chroma block is of size NxM (where, for example, N<=M) and N>TH, set Nth=4
[0158] In this case, for example, the reference samples used when calculating the CCLM parameters by the threshold TH can be selected as follows:
[0159] For example, when TH is 4 (TH=4), if N of the current chroma block is 2 or 4, two sample pairs for one side of the block may be used to calculate the CCLM parameters, and if N is 8, 16, or 32, four sample pairs for one side of the block may be used to calculate the CCLM parameters.
[0160] Also, for example, when TH is 8 (TH=8), if N of the current chroma block is 2, 4, or 8, two sample pairs for one side of the block may be used to calculate the CCLM parameters, and if N is 16 or 32, four sample pairs for one side of the block may be used to calculate the CCLM parameters.
[0161] As described above, in this embodiment, the N th A number of samples optimized for the block size can be selected by setting
[0162] For example, the existing CCLM reference sample selection method and the CCLM parameter calculation amount according to this embodiment can be shown in the following table.
[0163] [Table 11]
[0164] Here, N may represent the smaller value of the width and height of the current block. Referring to Table 11, when the CCLM reference sample selection method proposed in this embodiment is used, the amount of calculation required for CCLM parameter calculation does not increase even if the block size increases.
[0165] Meanwhile, the TH may be derived as a preset value in the encoding device and the decoding device without the need to transmit additional information indicating the TH. Alternatively, the additional information indicating the TH may be transmitted in units of a coding unit (CU), a slice, a picture, or a sequence, and the TH may be derived based on the additional information indicating the TH. The additional information indicating the TH may indicate a value of the TH.
[0166] For example, when additional information indicating TH is transmitted in units of CU, if the intra prediction mode of the current chroma block is CCLM mode, a method of parsing a syntax element cclm_reduced_sample_flag and performing a CCLM parameter calculation process as described below may be proposed. The cclm_reduced_sample_flag may indicate a syntax element of a CCLM reduced sample flag.
[0167] If the cclm_reduced_sample_flag is 0 (false), the N th = 4 and calculate CCLM parameters using the adjacent sample selection method of the embodiment proposed in FIG. 7.
[0168] If the cclm_reduced_sample_flag is 1 (true), set the TH to 4 and perform CCLM parameter calculation through the adjacent sample selection method proposed in the above embodiment.
[0169] Alternatively, if additional information indicating the TH is transmitted on a slice, picture or sequence basis, the TH value can be decoded based on the additional information transmitted via high level syntax (HLS), as described below.
[0170] For example, the additional information signaled via the slice header may be shown in the following table.
[0171] [Table 12]
[0172] cclm_reduced_sample_threshold may indicate a syntax element of additional information indicating the TH.
[0173] Alternatively, for example, the additional information signaled via a Picture Parameter Set (PPS) may be shown as in the following table.
[0174] [Table 13]
[0175] Alternatively, for example, the additional information signaled via a Sequence Parameter Set (SPS) may be shown as in the following table.
[0176] [Table 14]
[0177] The TH value derived based on the cclm_reduced_sample_threshold value (i.e., a value derived by decoding cclm_reduced_sample_threshold) transmitted via the slice header, the PPS, or the SPS can be derived as shown in the following table.
[0178] [Table 15]
[0179] For example, referring to Table 15, the TH may be derived based on the cclm_reduced_sample_threshold. If the value of the cclm_reduced_sample_threshold is 0, the TH may be derived as 4, and if the value of the cclm_reduced_sample_threshold is 1, the TH may be derived as 8.
[0180] On the other hand, when the TH is derived as a preset value in the encoding device and the decoding device without transmitting additional information, the encoding device can perform CCLM parameter calculation for the CCLM prediction as in the above-mentioned embodiment based on the preset TH value.
[0181] Alternatively, the encoding apparatus may determine whether the threshold value TH is available, and may transmit information indicating whether the TH is available and additional information indicating the TH value to the decoding apparatus as described below.
[0182] -When information indicating whether TH can be used on a CU basis is transmitted, when the intra prediction mode of the current chroma block is CCLM mode (i.e., when CCLM prediction is applied to the current chroma block), the one with better encoding efficiency can be determined via the RDO, and information on the determined method can be transmitted to the decoding device.
[0183] 1) For all blocks, th = 4, and if it is more efficient to calculate the CCLM parameters through the adjacent sample selection method of the embodiment proposed in FIG. 7, send cclm_reduced_sample_flag with a value of 0 (false).
[0184] 2) If it is more efficient to set TH=4 and calculate the CCLM parameters through the adjacent sample selection method proposed in the above embodiment, send cclm_reduced_sample_flag with a value of 1 (true).
[0185] Alternatively, when information indicating whether a TH can be used is transmitted in slice, picture, or sequence units, the encoding device may transmit the information indicating whether a TH can be used by adding high level syntax (HLS) as shown in Table 12, Table 13, or Table 14. The encoding device may set whether the TH can be used in consideration of the size of an input image or according to an encoding target bitrate.
[0186] 1) For example, if the input video is HD or above, the encoding device can be set to TH=8, and if it is below that, it can be set to TH=4.
[0187] 2) If high quality video encoding is required, the encoding device can be set to TH=8, and if low quality video encoding is required, it can be set to TH=4.
[0188] The method proposed in this embodiment can be used in CCLM mode, which is an intra prediction mode for chroma components, and the chroma blocks predicted via the CCLM mode can be used in an encoding device to derive a residual image via difference from an original image, or in a decoding device to derive a restored image via addition with a residual signal.
[0189] 8a and 8b are diagrams illustrating a process of performing CCLM prediction on a current chroma block according to an embodiment.
[0190] Referring to Fig. 8a, an encoding / decoding device may calculate CCLM parameters for the current block (S800). For example, the CCLM parameters may be calculated as shown in Fig. 8b.
[0191] 8b may exemplarily show a specific embodiment of calculating CCLM parameters. For example, referring to FIG. 8b, the encoding device / decoding device may set TH for the current chroma block (S805). The TH may be a preset value or may be derived based on additional information for the TH that is signaled. The TH may be set to 4 or 8.
[0192] Thereafter, the encoding / decoding apparatus may determine whether the current chroma block is a square chroma block (S810).
[0193] If the current chroma block is the square chroma block, the encoding / decoding apparatus may determine whether N, which is the width of the current block, is greater than TH (S815).
[0194] If N is greater than TH, the encoding / decoding apparatus may select 2N th 100, the N neighboring samples may be selected (S820). th is 4. That is, if the N is greater than the TH, the N th is 4.
[0195] The encoding / decoding device may derive parameters α and β for the CCLM prediction based on the selected reference samples (S825).
[0196] Also, if N is not greater than TH, the encoding / decoding apparatus may select 2N th N adjacent samples may be selected (S830). th is 2. That is, if the N is greater than the TH, the N th is 2. Thereafter, the encoding device / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference sample (S825).
[0197] Meanwhile, if the current chroma block is not the square chroma block, the size of the current chroma block may be derived as M×N size or N×M size (S835), where M may indicate a value greater than N (N <M)。
[0198] Thereafter, the encoding / decoding apparatus can determine whether N is greater than TH (S840).
[0199] If N is greater than TH, the encoding / decoding apparatus may select 2N th N adjacent samples may be selected (S845). th is 4. That is, if the N is greater than the TH, the N th is 4.
[0200] The encoding / decoding device may derive parameters α and β for the CCLM prediction based on the selected reference samples (S825).
[0201] Also, if N is not greater than TH, the encoding / decoding apparatus may select 2N th N adjacent samples may be selected (S850). th is 2. That is, if the N is greater than the TH, the N th is 2. Thereafter, the encoding device / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference sample (S825).
[0202] 8a again, when the parameters for CCLM prediction for the current chroma block are calculated, the encoding device / decoding device may perform CCLM prediction based on the parameters to generate predicted samples for the current chroma block (S860). For example, the encoding device / decoding device may generate predicted samples for the current chroma block based on the calculated parameters and Equation 1, in which reconstructed samples of the current luma block for the current chroma block are used.
[0203] Meanwhile, in this document, an embodiment different from the above-described embodiment can be proposed to reduce the computational complexity for deriving the CCLM parameters.
[0204] Specifically, this embodiment proposes a method for adaptively setting the pixel selection upper limit Nth to solve the problem of an increase in the amount of CCLM parameter calculations due to an increase in the block size of a chroma block. In addition, this embodiment proposes a method for adaptively setting Nth to prevent a worst-case calculation (a case in which all chroma blocks in a CTU are divided into 2×2 sizes and then CCLM prediction is performed on all chroma blocks) that occurs when N=2 (where N is the smaller value of the width and height of the chroma block), i.e., when CCLM prediction is performed on a chroma block of 2×2 size), and thus the amount of calculations for CCLM parameter calculation in the worst case can be reduced by about 40%.
[0205] For example, according to the present embodiment, the N th can be set.
[0206] -Proposed method 1 of this embodiment
[0207] - N if the current chroma block is of size NxM or MxN (where, for example, N<=M) and N<=2 th is set to 1 (N th =1)
[0208] - N if the current chroma block is of size NxM or MxN (where, for example, N<=M) and N=4 th is set to 2 (N th =2)
[0209] - N if the current chroma block is of size NxM or MxN (where, for example, N<=M) and N>4 th is set to 4 (N th =4)
[0210] Or, for example, according to the present embodiment, the N th can be set.
[0211] -Proposed method 2 of this embodiment
[0212] - N if the current chroma block is of size NxM or MxN (where, for example, N<=M) and N<=2 th is set to 1 (N th =1)
[0213] - N if the current chroma block is of size NxM or MxN (where, for example, N<=M) and N=4 th is set to 2 (N th =2)
[0214] - N if the current chroma block is of size NxM or MxN (where, for example, N<=M) and N=8 th is set to 4 (N th =4)
[0215] - N if the current chroma block is of size NxM or MxN (where, for example, N<=M) and N>8 th is set to 8 (N th =8)
[0216] Or, for example, according to the present embodiment, the N th can be set.
[0217] -Proposed method 3 of this embodiment
[0218] - N if the current chroma block is of size NxM or MxN (where, for example, N<=M) and N<=2 th is set to 1 (N th =1)
[0219] - N if the current chroma block is of size NxM or MxN (where, for example, N<=M) and N>2 th is set to 2 (N th =2)
[0220] Or, for example, according to the present embodiment, the N th can be set.
[0221] -Proposed method 4 of this embodiment
[0222] - N if the current chroma block is of size NxM or MxN (where, for example, N<=M) and N<=2 th is set to 1 (N th =1)
[0223] - N if the current chroma block is of size NxM or MxN (where, for example, N<=M) and N>2 th is set to 4 (N th =4)
[0224] The above-described methods 1 to 4 of this embodiment can reduce the worst-case complexity when N=2 by about 40%, and adaptively change N to each chroma block size. th In addition, the encoding loss can be minimized by applying the method 2. th 8, it is suitable for high quality encoding. th can be reduced to 4 or 2, greatly reducing the CCLM complexity and making it suitable for low or medium quality encoding.
[0225] As in the above-described methods 1 to 4, according to this embodiment, N th , whereby the number of reference samples for derivation of CCLM parameters optimized for the block size can be selected.
[0226] The encoding / decoding device selects adjacent samples using the upper limit N thAfter setting, the chroma block neighboring samples can be selected as described above to calculate the CCLM parameters.
[0227] When the above-described embodiment is applied, the amount of calculation required to calculate CCLM parameters according to the chroma block size can be shown in the following table.
[0228] [Table 16]
[0229] As shown in Table 16 above, when the method proposed in this embodiment is used, it can be seen that the amount of calculation required for CCLM parameter calculation does not increase even though the block size becomes larger.
[0230] On the other hand, in this embodiment, the promised value can be used in the encoding device and the decoding device without the need to transmit additional information, or the use of the proposed method and the N th Information indicating the value of can be transmitted.
[0231] For example, when information indicating whether the proposed method can be used on a CU basis is transmitted, when the intra prediction mode of the current chroma block is CCLM mode (i.e., when CCLM prediction is applied to the current chroma block), cclm_reduced_sample_flag can be parsed as follows and the above-mentioned embodiment can be executed.
[0232] If the value of the cclm_reduced_sample_flag is 0 (false), the N th = 4 and calculate CCLM parameters using the adjacent sample selection method of the embodiment proposed in FIG. 7.
[0233] If the value of the cclm_reduced_sample_flag is 1 (true), the CCLM parameter calculation is performed according to the method 3 of the present embodiment.
[0234] Alternatively, when information indicating a method to be applied on a slice, picture or sequence basis is transmitted, a method to be applied may be selected from the above-mentioned methods 1 to 4 based on the information transmitted via HLS (high level syntax) as described below, and the CCLM parameters may be calculated based on the selected method.
[0235] For example, the information indicating the applied method signaled via the slice header may be shown as in the table below.
[0236] [Table 17]
[0237] cclm_reduced_sample_threshold may indicate a syntax element of information indicating the method to be applied.
[0238] Alternatively, for example, the information indicating the applied method signaled via a Picture Parameter Set (PPS) may be represented as in the following table.
[0239] [Table 18]
[0240] Alternatively, for example, the information indicating the applied method signaled via a Sequence Parameter Set (SPS) may be shown as in the following table.
[0241] [Table 19]
[0242] The method selected based on the cclm_reduced_sample_threshold value (i.e., the value derived by decoding cclm_reduced_sample_threshold) transmitted via the slice header, the PPS or the SPS can be derived as shown in the following table.
[0243] [Table 20]
[0244] Referring to Table 20, if the value of the cclm_reduced_sample_threshold is 0, the method applied to the current chroma block can be selected as method 1, if the value of the cclm_reduced_sample_threshold is 1, the method applied to the current chroma block can be selected as method 2, if the value of the cclm_reduced_sample_threshold is 2, the method applied to the current chroma block can be selected as method 3, and if the value of the cclm_reduced_sample_threshold is 3, the method applied to the current chroma block can be selected as method 4.
[0245] The method proposed in this embodiment can be used in CCLM mode, which is an intra prediction mode for chroma components, and the chroma blocks predicted via the CCLM mode can be used in an encoding device to derive a residual image via difference from an original image, or in a decoding device to derive a restored image via addition with a residual signal.
[0246] On the other hand, when information indicating one of the methods is transmitted in units of CU, slice, picture, and sequence, the encoding device can determine one of methods 1 to 4 and then transmit the information to the decoding device as follows.
[0247] -When information indicating whether the method of the above-mentioned embodiment is applied is transmitted on a CU basis, when the intra prediction mode of the current chroma block is CCLM mode (i.e., when CCLM prediction is applied to the current chroma block), the one with better encoding efficiency can be determined via the RDO between the following two cases, and information on the determined method can be transmitted to the decoding device.
[0248] 1) For all blocks, th = 4, and if it is more efficient to calculate the CCLM parameters through the adjacent sample selection method of the embodiment proposed in FIG. 7, send cclm_reduced_sample_flag with a value of 0 (false).
[0249] 2) If it is determined that method 3 is to be applied and it is more efficient to calculate the CCLM parameters through the adjacent sample selection method proposed in the above embodiment, send cclm_reduced_sample_flag with a value of 1 (true).
[0250] Alternatively, when information indicating whether the method of the above-described embodiment is applied in slice, picture, or sequence units is transmitted, the encoding device may transmit information indicating one of the methods by adding high level syntax (HLS) as shown in Table 17, Table 18, or Table 19. The encoding device may set the method to be applied among the methods in consideration of the size of the input image or to match an encoding target bitrate.
[0251] 1) For example, if the input video is HD or higher, the encoding device uses the method 2 (N th = 1, 2, 4 or 8) can be applied, and if it is less than that, the above method 1 (N th =1, 2 or 4) can be applied.
[0252] 2) If high quality video encoding is required, the encoding device uses the method 2 (N th =1, 2, 4 or 8) can be applied, and if lower quality video encoding is required, method 3 (N th =1or2) or method 4 (N th =1or4) can be applied.
[0253] The method proposed in this embodiment can be used in CCLM mode, which is an intra prediction mode for chroma components, and the chroma blocks predicted via the CCLM mode can be used in an encoding device to derive a residual image via difference from an original image, or in a decoding device to derive a restored image via addition with a residual signal.
[0254] 9a and 9b are diagrams illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 1 according to the above-described embodiment.
[0255] Referring to Fig. 9a, an encoding / decoding apparatus may calculate CCLM parameters for the current block (S900). For example, the CCLM parameters may be calculated as shown in Fig. 9b.
[0256] 9B may exemplarily show a specific embodiment of calculating the CCLM parameters. For example, referring to FIG. 9B, the encoding device / decoding device may determine whether the current chroma block is a square chroma block (S905).
[0257] If the current chroma block is a square chroma block, the encoding / decoding device may set the width or height of the current block to N (S910) and determine whether N is less than 2 (N<2) (S915).
[0258] Alternatively, if the current chroma block is not the square chroma block, the size of the current chroma block may be derived as M×N size or N×M size (S920), and the encoding / decoding apparatus may determine whether N is less than 2 (S915). Here, M may indicate a value greater than N (N <M)。
[0259] If N is less than 2, the encoding / decoding apparatus may select 2N th N adjacent samples may be selected (S925). th is 1 (N th =1).
[0260] The encoding / decoding device may derive parameters α and β for the CCLM prediction based on the selected reference samples (S930).
[0261] On the other hand, if N is not less than 2, the encoding / decoding apparatus can determine whether N is less than or equal to 4 (N<=4) (S935).
[0262] If N is 4 or less, the encoding / decoding apparatus may select 2N th N adjacent samples may be selected (S940).th is 2 (N th = 2). Thereafter, the encoding / decoding apparatus can derive parameters α and β for the CCLM prediction based on the selected reference sample (S930).
[0263] Alternatively, if N is greater than 4, the encoding / decoding apparatus may select 2N th N adjacent samples may be selected (S945). th is 4 (N th = 4). Thereafter, the encoding / decoding apparatus can derive parameters α and β for the CCLM prediction based on the selected reference sample (S930).
[0264] 9a, when the parameters for CCLM prediction for the current chroma block are calculated, the encoding device / decoding device may perform CCLM prediction based on the parameters to generate predicted samples for the current chroma block (S950). For example, the encoding device / decoding device may generate predicted samples for the current chroma block based on the calculated parameters and Equation 1, in which reconstructed samples of the current luma block for the current chroma block are used.
[0265] 10a and 10b are diagrams illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 2 of the above embodiment.
[0266] Referring to Fig. 10a, an encoding / decoding device may calculate CCLM parameters for the current block (S1000). For example, the CCLM parameters may be calculated as shown in Fig. 10b.
[0267] 10B shows a specific example of calculating the CCLM parameters. For example, referring to FIG. 10B, the encoding device / decoding device may determine whether the current chroma block is a square chroma block (S1005).
[0268] If the current chroma block is a square chroma block, the encoding device / decoding device may set the width or height of the current block to N (S1010) and determine whether N is less than 2 (N<2) (S1015).
[0269] Alternatively, if the current chroma block is not the square chroma block, the size of the current chroma block may be derived as M×N size or N×M size (S1020), and the encoding / decoding apparatus may determine whether N is less than 2 (S1015). Here, M may indicate a value greater than N (N <M)。
[0270] If N is less than 2, the encoding / decoding apparatus may select 2N th number of adjacent samples can be selected (S1025). th is 1 (N th =1).
[0271] The encoding / decoding device may derive parameters α and β for the CCLM prediction based on the selected reference samples (S1030).
[0272] On the other hand, if N is not less than 2, the encoding / decoding apparatus can determine whether N is less than or equal to 4 (N<=4) (S1035).
[0273] If N is 4 or less, the encoding / decoding apparatus may select 2N th number of adjacent samples may be selected (S1040). th is 2 (N th = 2). Thereafter, the encoding / decoding apparatus can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1030).
[0274] On the other hand, if N is greater than 4, the encoding / decoding apparatus can determine whether N is less than or equal to 8 (N<=8) (S1045).
[0275] If N is equal to or less than 8, the encoding / decoding apparatus may select 2N th N adjacent samples may be selected (S1050). th is 4 (N th = 4). Thereafter, the encoding / decoding apparatus can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1030).
[0276] Alternatively, if N is greater than 8, the encoding / decoding apparatus may select 2N th N adjacent samples can be selected (S1055). th is 8 (Nth = 8). Thereafter, the encoding / decoding apparatus can derive parameters α and β for the CCLM prediction based on the selected reference samples (S1030).
[0277] 10a, when the parameters for CCLM prediction for the current chroma block are calculated, the encoding device / decoding device may perform CCLM prediction based on the parameters to generate predicted samples for the current chroma block (S1060). For example, the encoding device / decoding device may generate predicted samples for the current chroma block based on the calculated parameters and Equation 1, in which reconstructed samples of the current luma block for the current chroma block are used.
[0278] 11a and 11b are diagrams illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 3 of the above embodiment.
[0279] Referring to Fig. 11a, an encoding / decoding device may calculate CCLM parameters for the current block (S1100). For example, the CCLM parameters may be calculated as shown in Fig. 11b.
[0280] 11B shows a specific example of calculating the CCLM parameters. For example, referring to FIG. 11B, the encoding device / decoding device may determine whether the current chroma block is a square chroma block (S1105).
[0281] If the current chroma block is a square chroma block, the encoding device / decoding device may set the width or height of the current block to N (S1110) and determine whether N is less than 2 (N<2) (S1115).
[0282] Alternatively, if the current chroma block is not the square chroma block, the size of the current chroma block may be derived as M×N size or N×M size (S1120), and the encoding / decoding apparatus may determine whether N is less than 2 (S1115). Here, M may indicate a value greater than N (N <M)。
[0283] If N is less than 2, the encoding / decoding apparatus may select 2N th number of adjacent samples can be selected (S1125). th is 1 (N th =1).
[0284] The encoding / decoding device may derive parameters α and β for the CCLM prediction based on the selected reference sample (S1130).
[0285] On the other hand, if N is not smaller than 2, the encoding / decoding apparatus may select 2N th number of adjacent samples can be selected (S1135). th is 2 (N th = 2). Thereafter, the encoding device / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1130).
[0286] 11a, when the parameters for CCLM prediction for the current chroma block are calculated, the encoding device / decoding device may perform CCLM prediction based on the parameters to generate predicted samples for the current chroma block (S1140). For example, the encoding device / decoding device may generate predicted samples for the current chroma block based on the calculated parameters and Equation 1, in which reconstructed samples of the current luma block for the current chroma block are used.
[0287] 12a and 12b are diagrams illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 4 of the above embodiment.
[0288] Referring to Fig. 12a, an encoding / decoding device may calculate CCLM parameters for the current block (S1200). For example, the CCLM parameters may be calculated as shown in Fig. 12b.
[0289] 12B may exemplarily show a specific embodiment of calculating the CCLM parameters. For example, referring to FIG. 12B, the encoding device / decoding device may determine whether the current chroma block is a square chroma block (S1205).
[0290] If the current chroma block is a square chroma block, the encoding / decoding device may set the width or height of the current block to N (S1210) and determine whether N is less than 2 (N<2) (S1215).
[0291] Alternatively, if the current chroma block is not the square chroma block, the size of the current chroma block may be derived as M×N size or N×M size (S1220), and the encoding / decoding apparatus may determine whether N is less than 2 (S1215). Here, M may indicate a value greater than N (N <M)。
[0292] If N is less than 2, the encoding / decoding apparatus may select 2N th number of adjacent samples can be selected (S1225). th is 1 (N th =1).
[0293] The encoding / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1230).
[0294] On the other hand, if N is not smaller than 2, the encoding / decoding apparatus may select 2N th N adjacent samples can be selected (S1235). th is 4 (N th = 4). Thereafter, the encoding device / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1230).
[0295] Referring again to FIG. 12a, when the parameter for the CCLM prediction for the current chroma block is calculated, the encoding device / decoding device can perform a CCLM prediction based on the parameter to generate a predicted sample for the current chroma block (S1240). For example, the encoding device / decoding device can generate a predicted sample for the current chroma block based on the calculated parameter and the restored sample of the current luma block for the current chroma block according to the aforementioned formula 1.
[0296] On the other hand, in this document, an embodiment different from the aforementioned embodiment for reducing the computational complexity for CCLM parameter derivation in the CCLM parameter derivation can be proposed.
[0297] Specifically, this embodiment proposes a solution for adaptively setting the pixel selection upper limit line N th to solve the problem of increasing the CCLM parameter calculation amount due to an increase in the block size of the chroma block.
[0298] For example, according to this embodiment, the N th can be set adaptively to the block size as follows.
[0299] - Proposed method 1 of this embodiment
[0300] - When the current chroma block is a 2×2 size chroma block, N th is set to 1 (N th = 1)
[0301] - When the current chroma block is of size N×M or M×N (where, for example, N < M) and N = 2, N th is set to 2 (N th = 2)
[0302] - When the current chroma block is of size N×M or M×N (where, for example, N <= M) and N > 2, Nth is set to 4 (N th = 4)
[0303] Or, for example, according to this embodiment, the N can be adaptively set to the block size as follows th can be set.
[0304] - Method 2 of this embodiment (proposed method 2)
[0305] - When the current chroma block is a 2×2 chroma block, N th is set to 1 (N th = 1)
[0306] - When N = 2 for a current chroma block of size N×M or M×N (where, for example, N < M), N th is set to 2 (N th = 2)
[0307] - When N = 4 for a current chroma block of size N×M or M×N (where, for example, N <= M), N th is set to 2 (N th = 2)
[0308] - When N > 4 for a current chroma block of size N×M or M×N (where, for example, N <= M), N th is set to 4 (N th = 4)
[0309] Or, for example, according to this embodiment, the N can be adaptively set to the block size as follows th can be set.
[0310] - Method 3 of this embodiment (proposed method 3)
[0311] - When the current chroma block is a 2×2 chroma block, N th is set to 1 (N th = 1)
[0312] - When N = 2 in the current chroma block of size N×M or M×N (where, for example, N < M), N th is set to 2 (N th = 2)
[0313] - When N = 4 in the current chroma block of size N×M or M×N (where, for example, N <= M), N th is set to 4 (N th = 4)
[0314] - When N > 4 in the current chroma block of size N×M or M×N (where, for example, N <= M), N th is set to 8 (N th = 8)
[0315] The above-described Method 1 to Method 3 of this embodiment can reduce the worst-case complexity by about 40% when the current chroma block is a 2×2 size block, and N th can be adaptively applied to each chroma block size, so that the encoding loss can be minimized. Also, for example, the above-described Method 1 and Method 3 can apply N th to 4 when N > 2, so that it can be adapted to high-quality encoding, and the above-described Method 2 can also reduce N th to 2 when N = 4, so that the CCLM complexity can be greatly reduced. Therefore, it can be adapted to low-quality or medium-quality encoding.
[0316] According to this embodiment, like the above-described Method 1 to Method 3, N th can be adaptively set according to the block size, and through this, the number of reference samples for deriving the CCLM parameters optimized for the block size can be selected.
[0317] After setting the upper limit line N th for the adjacent sample selection, the chroma block adjacent samples can be selected as described above to calculate the CCLM parameters.
[0318] When the above-described embodiment is applied, the amount of calculation required to calculate CCLM parameters according to the chroma block size can be shown in the following table.
[0319] [Table 21]
[0320] As shown in Table 21 above, when the method proposed in this embodiment is used, it can be seen that the amount of calculation required for CCLM parameter calculation does not increase even though the block size becomes larger.
[0321] On the other hand, in this embodiment, the promised value can be used in the encoding device and the decoding device without the need to transmit additional information, or the use of the proposed method and the N th Information indicating the value of can be transmitted.
[0322] For example, when information indicating whether the proposed method can be used on a CU basis is transmitted, when the intra prediction mode of the current chroma block is CCLM mode (i.e., when CCLM prediction is applied to the current chroma block), cclm_reduced_sample_flag can be parsed as follows and the above-mentioned embodiment can be executed.
[0323] If the value of the cclm_reduced_sample_flag is 0 (false), the N th = 2 and calculate CCLM parameters using the adjacent sample selection method of the embodiment proposed in FIG. 7.
[0324] If the value of the cclm_reduced_sample_flag is 1 (true), the CCLM parameter calculation is performed according to the method 1 of the present embodiment.
[0325] Alternatively, when information indicating a method to be applied on a slice, picture or sequence basis is transmitted, a method to be applied may be selected from the above-mentioned methods 1 to 3 based on the information transmitted via HLS (high level syntax) as described below, and the CCLM parameters may be calculated based on the selected method.
[0326] For example, the information indicating the applied method signaled via the slice header may be shown as in the table below.
[0327] [Table 22]
[0328] cclm_reduced_sample_threshold may indicate a syntax element of information indicating the method to be applied.
[0329] Alternatively, for example, the information indicating the applied method signaled via a Picture Parameter Set (PPS) may be represented as in the following table.
[0330] [Table 23]
[0331] Alternatively, for example, the information indicating the applied method signaled via a Sequence Parameter Set (SPS) may be shown as in the following table.
[0332] [Table 24]
[0333] The method selected based on the cclm_reduced_sample_threshold value (i.e., the value derived by decoding cclm_reduced_sample_threshold) transmitted via the slice header, the PPS or the SPS can be derived as shown in the following table.
[0334] [Table 25]
[0335] Referring to Table 25, if the value of the cclm_reduced_sample_threshold is 0, the method of the above-mentioned embodiment may not be applied to the current chroma block, if the value of the cclm_reduced_sample_threshold is 1, the method applied to the current chroma block may be selected as method 1, if the value of the cclm_reduced_sample_threshold is 2, the method applied to the current chroma block may be selected as method 2, and if the value of the cclm_reduced_sample_threshold is 3, the method applied to the current chroma block may be selected as method 3.
[0336] The method proposed in this embodiment can be used in CCLM mode, which is an intra prediction mode for chroma components, and the chroma blocks predicted via the CCLM mode can be used in an encoding device to derive a residual image via difference from an original image, or in a decoding device to derive a restored image via addition with a residual signal.
[0337] On the other hand, when information indicating one of the methods is transmitted in units of CU, slice, picture, and sequence, the encoding device can determine one of methods 1 to 3 and then transmit the information to the decoding device as follows.
[0338] -When information indicating whether the method of the above-mentioned embodiment is applied is transmitted on a CU basis, when the intra prediction mode of the current chroma block is CCLM mode (i.e., when CCLM prediction is applied to the current chroma block), the one with better encoding efficiency can be determined via the RDO between the following two cases, and information on the determined method can be transmitted to the decoding device.
[0339] 1) For all blocks, th = 2, and if it is more efficient to calculate the CCLM parameters through the adjacent sample selection method of the embodiment proposed in FIG. 7, send cclm_reduced_sample_flag with a value of 0 (false).
[0340] 2) If it is determined that method 1 is to be applied and it is more efficient to calculate the CCLM parameters through the adjacent sample selection method proposed in the above embodiment, send cclm_reduced_sample_flag with a value of 1 (true).
[0341] Alternatively, when information indicating whether the method of the above-described embodiment is applied in slice, picture, or sequence units is transmitted, the encoding device may transmit information indicating one of the methods by adding high level syntax (HLS) as shown in Table 22, Table 23, or Table 24. The encoding device may set the method to be applied among the methods in consideration of the size of the input image or in accordance with an encoding target bitrate.
[0342] 1) For example, if the input video is HD or higher, the encoding device uses the method 3 (N th = 1, 2, 4 or 8) can be applied, and if it is less than that, the above method 1 (N th =1, 2 or 4) can be applied.
[0343] 2) If high quality video encoding is required, the encoding device may use the method 3 (N th = 1, 2, 4 or 8) can be applied, and if lower quality video encoding is required, method 2 (N th =1, 2, 2or4) or method 1 above (N th =1, 2 or 4) can be applied.
[0344] The method proposed in this embodiment can be used in CCLM mode, which is an intra prediction mode for chroma components, and the chroma blocks predicted via the CCLM mode can be used in an encoding device to derive a residual image via difference from an original image, or in a decoding device to derive a restored image via addition with a residual signal.
[0345] 13a and 13b are diagrams illustrating a process of performing CCLM prediction based on the CCLM parameters of a current chroma block derived by the method 1 of the above-described embodiment.
[0346] Referring to Fig. 13a, an encoding / decoding device may calculate CCLM parameters for the current block (S1300). For example, the CCLM parameters may be calculated as shown in Fig. 13b.
[0347] 13B may exemplarily show a specific embodiment of calculating the CCLM parameters. For example, referring to FIG. 13B, the encoding device / decoding device may determine whether the current chroma block is a square chroma block (S1305).
[0348] If the current chroma block is a square chroma block, the encoding device / decoding device may set the width or height of the current block to N (S1310) and may determine whether the size of the current chroma block is 2×2 size (S1315).
[0349] Alternatively, if the current chroma block is not the square chroma block, the size of the current chroma block may be derived as M×N size or N×M size (S1320), and the encoding / decoding apparatus may determine whether the size of the current chroma block is 2×2 size (S1315), where M may indicate a value greater than N (N <M)。
[0350] When the size of the current chroma block is 2×2, the encoding / decoding apparatus may select 2N neighboring reference lines from the current block as reference samples for the CCLM parameter calculation. th 1325, N adjacent samples may be selected. th is 1 (N th =1).
[0351] The encoding / decoding device may derive parameters α and β for the CCLM prediction based on the selected reference sample (S1330).
[0352] Meanwhile, if the size of the current chroma block is not 2×2, the encoding / decoding apparatus may determine whether N is 2 (N==2) (S1335).
[0353] If N is 2, the encoding / decoding apparatus may select 2N th1340, N adjacent samples may be selected. th is 2 (N th = 2). Thereafter, the encoding / decoding apparatus can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1330).
[0354] Alternatively, if N is not 2, the encoding / decoding apparatus may select 2N th N adjacent samples can be selected (S1345). th is 4 (N th = 4). Thereafter, the encoding device / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1330).
[0355] 13a, when the parameters for CCLM prediction for the current chroma block are calculated, the encoding device / decoding device may perform CCLM prediction based on the parameters to generate predicted samples for the current chroma block (S1350). For example, the encoding device / decoding device may generate predicted samples for the current chroma block based on the calculated parameters and Equation 1, in which reconstructed samples of the current luma block for the current chroma block are used.
[0356] 14a and 14b are diagrams illustrating a process of performing CCLM prediction based on the CCLM parameters of the current chroma block derived by the method 2 of the above embodiment.
[0357] Referring to Fig. 14a, the encoding / decoding apparatus may calculate CCLM parameters for the current block (S1400). For example, the CCLM parameters may be calculated as shown in Fig. 14b.
[0358] 14B may exemplarily show a specific embodiment of calculating the CCLM parameters. For example, referring to FIG. 14B, the encoding device / decoding device may determine whether the current chroma block is a square chroma block (S1405).
[0359] If the current chroma block is a square chroma block, the encoding device / decoding device may set the width or height of the current block to N (S1410) and may determine whether the size of the current chroma block is 2×2 size (S1415).
[0360] Alternatively, if the current chroma block is not the square chroma block, the size of the current chroma block may be derived as M×N size or N×M size (S1420), and the encoding / decoding apparatus may determine whether the size of the current chroma block is 2×2 size (S1415), where M may indicate a value greater than N (N <M)。
[0361] When the size of the current chroma block is 2×2, the encoding / decoding apparatus may select 2N neighboring reference lines from the current block as reference samples for the CCLM parameter calculation. th 1425, N adjacent samples can be selected. th is 1 (N th =1).
[0362] The encoding / decoding device may derive parameters α and β for the CCLM prediction based on the selected reference sample (S1430).
[0363] Meanwhile, if the size of the current chroma block is not 2×2, the encoding / decoding apparatus may determine whether N is 2 (N==2) (S1435).
[0364] If N is 2, the encoding / decoding apparatus may select 2N th N adjacent samples can be selected (S1440). th is 2 (N th = 2). Thereafter, the encoding device / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1430).
[0365] On the other hand, if N is not 2, the encoding / decoding apparatus may determine whether N is 4 (N==4) (S1445).
[0366] When N is 4, the encoding / decoding apparatus may select 2N th N adjacent samples may be selected (S1450). th is 2 (N th = 2). Thereafter, the encoding device / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1430).
[0367] Alternatively, if N is not 4, the encoding / decoding apparatus may select 2N th N adjacent samples can be selected (S1455). th is 4 (N th = 4). Thereafter, the encoding device / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1430).
[0368] 14a, when the parameters for CCLM prediction for the current chroma block are calculated, the encoding device / decoding device may perform CCLM prediction based on the parameters to generate predicted samples for the current chroma block (S1460). For example, the encoding device / decoding device may generate predicted samples for the current chroma block based on the calculated parameters and Equation 1, in which reconstructed samples of the current luma block for the current chroma block are used.
[0369] 15a and 15b are diagrams illustrating a process of performing CCLM prediction based on the CCLM parameters of the current chroma block derived by the method 3 of the above embodiment.
[0370] Referring to Fig. 15a, an encoding / decoding device may calculate CCLM parameters for the current block (S1500). For example, the CCLM parameters may be calculated as shown in Fig. 15b.
[0371] 15B may exemplarily show a specific embodiment of calculating the CCLM parameters. For example, referring to FIG. 15B, the encoding device / decoding device may determine whether the current chroma block is a square chroma block (S1505).
[0372] If the current chroma block is a square chroma block, the encoding device / decoding device may set the width or height of the current block to N (S1510) and may determine whether the size of the current chroma block is 2×2 size (S1515).
[0373] Alternatively, if the current chroma block is not the square chroma block, the size of the current chroma block may be derived as M×N size or N×M size (S1520), and the encoding / decoding apparatus may determine whether the size of the current chroma block is 2×2 size (S1515), where M may indicate a value greater than N (N <M)。
[0374] When the size of the current chroma block is 2×2, the encoding / decoding apparatus may select 2N neighboring reference lines from the current block as reference samples for the CCLM parameter calculation. th N adjacent samples can be selected (S1525). th is 1 (N th =1).
[0375] The encoding / decoding device may derive parameters α and β for the CCLM prediction based on the selected reference sample (S1530).
[0376] Meanwhile, if the size of the current chroma block is not 2×2, the encoding / decoding apparatus may determine whether N is 2 (N==2) (S1535).
[0377] If N is 2, the encoding / decoding apparatus may select 2N th N adjacent samples may be selected (S1540). th is 2 (N th = 2). Thereafter, the encoding / decoding apparatus can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1530).
[0378] On the other hand, if N is not 2, the encoding / decoding apparatus may determine whether N is 4 (N==4) (S1545).
[0379] When N is 4, the encoding / decoding apparatus may select 2N th 1550, N adjacent samples may be selected. th is 4 (N th = 4). Thereafter, the encoding device / decoding device can derive parameters α and β for the CCLM prediction based on the selected reference sample (S1530).
[0380] Alternatively, if N is not 4, the encoding / decoding apparatus may select 2N th N adjacent samples can be selected (S1555). th is 8 (Nth = 8). Thereafter, the encoding / decoding apparatus can derive parameters α and β for the CCLM prediction based on the selected reference samples (S1530).
[0381] 15a, when the parameters for CCLM prediction for the current chroma block are calculated, the encoding device / decoding device may perform CCLM prediction based on the parameters to generate predicted samples for the current chroma block (S1560). For example, the encoding device / decoding device may generate predicted samples for the current chroma block based on the calculated parameters and Equation 1, in which reconstructed samples of the current luma block for the current chroma block are used.
[0382] On the other hand, this document proposes an embodiment for selecting subsampling samples more efficiently when subsampling is required in deriving adjacent reference samples for CCLM parameter calculation.
[0383] FIG. 16 shows an example of selecting neighboring reference samples for a chroma block.
[0384] Referring to FIG. 16(a), for a chroma block (N=2) of size 2×2, CCLM parameters α and β for the chroma block can be calculated based on four adjacent reference samples. The adjacent reference samples can include four adjacent reference samples of the luma block and four adjacent reference samples of the chroma block. Also, as in the above embodiment, for a chroma block of size 2×2, CCLM parameters α and β can be calculated based on four adjacent reference samples of the luma block and four adjacent reference samples of the chroma block. th If is set to 1 (N th16(b), CCLM parameters α and β for the chroma block can be calculated based on two adjacent reference samples. However, when using adjacent reference samples subsampled in half as shown in FIG. 16, the adjacent reference samples are concentrated on the upper left side of the current chroma block, which causes a problem that the diversity of the adjacent reference samples cannot be taken into account when calculating the CCLM parameters, and this can cause a decrease in the accuracy of the CCLM parameters.
[0385] 17a to 17c exemplarily illustrate adjacent reference samples derived through conventional sub-sampling and adjacent reference samples derived through sub-sampling according to this embodiment.
[0386] As shown in Figures 17a and 17b, by preferentially selecting adjacent samples far from the upper left side of the current chroma block through sub-sampling according to this embodiment, more diverse sample values can be selected when calculating CCLM parameters.
[0387] In addition, this embodiment proposes subsampling for non-square chroma blocks such as n×2 size and 2×n size as shown in Fig. 17c, which selects from the farthest upper left side. This allows more diverse sample values to be selected when calculating CCLM parameters, thereby improving the accuracy of CCLM parameter calculation.
[0388] Meanwhile, conventional sub-sampling can be performed based on the following formula:
[0389]
number
[0390] Here, Idx_w may indicate an adjacent reference sample (or a position of an adjacent reference sample) adjacent to the upper side of the current chroma block derived through subsampling, Idx_h may indicate an adjacent reference sample (or a position of an adjacent reference sample) adjacent to the left side of the current chroma block derived through subsampling, width may indicate a width of the current chroma block, height may indicate a height of the current chroma block, and subsample_num may indicate the number of adjacent reference samples (the number of adjacent reference samples adjacent to one side) derived through subsampling.
[0391] For example, the sub-sampling performed based on Equation 4 can be performed as follows:
[0392] In Equation 4, x is a variable and may be increased from 0 to the number of reference samples of the upper neighboring reference sample of the current chroma block after subsampling. For example, when two upper neighboring reference samples are selected for a current chroma block having a width of 16, the width in Equation 4 is 16 and x may vary from 0 to 1. Also, since Subsample_num is 2, Idx_w values may be selected as 0 and 8. Therefore, when the x and y components of the upper left sample position of the current chroma block are 0, the upper neighboring reference sample with an x coordinate of 0 and the upper neighboring reference sample with an x coordinate of 8 may be selected from the upper neighboring reference samples through the subsampling.
[0393] Also, y in Equation 4 is a variable and may be increased from 0 to the number of reference samples of the left adjacent reference sample of the current chroma block after subsampling. For example, when four left adjacent reference samples are selected for a current chroma block having a height of 32, height in Equation 4 is 32 and y may vary from 0 to 3. Also, since Subsample_num is 4, Idx_h values of 0, 8, 16, and 24 may be selected. Therefore, when the x and y components of the top left sample position of the current chroma block are 0, the left adjacent reference sample having a y coordinate of 0, the left adjacent reference sample having a y coordinate of 8, the left adjacent reference sample having a y coordinate of 16, and the left adjacent reference sample having a y coordinate of 24 may be selected from the left adjacent reference samples through the subsampling.
[0394] Referring to Equation 4, only samples close to the upper left side of the current chroma block can be selected through sub-sampling.
[0395] Therefore, in this embodiment, sub-sampling may be performed based on a formula other than Equation 4. For example, the sub-sampling proposed in this embodiment may be performed based on the following formula:
[0396]
number
[0397] Here, subsample_num_width may indicate the number of upper adjacent reference samples derived through subsampling, and subsample_num_height may indicate the number of left adjacent reference samples derived through subsampling.
[0398] Also, x is a variable that can be increased from 0 to the number of reference samples of the upper neighboring reference sample of the current chroma block after subsampling, and y is a variable that can be increased from 0 to the number of reference samples of the left neighboring reference sample of the current chroma block after subsampling.
[0399] For example, referring to Equation 5, when two upper neighboring reference samples are selected for a current chroma block having a width of 16, the width in Equation 5 is 16 and x can vary from 0 to 1. Also, since the subsample_num_width is 2, Idx_w values of 15 and 7 can be selected. Therefore, when the x and y components of the upper left sample position of the current chroma block are 0, the upper neighboring reference sample having an x coordinate of 15 and the upper neighboring reference sample having an x coordinate of 7 can be selected from the upper neighboring reference samples through the subsampling. That is, the upper neighboring reference sample far from the upper left side of the current chroma block can be selected from the upper neighboring samples of the current chroma block.
[0400] For example, referring to Equation 5, when four left adjacent reference samples are selected from a current chroma block having a height of 32, the height in Equation 5 is 32 and y can vary from 0 to 3. Also, since the subsample_num_height is 4, the Idx_h values can be selected as 31, 23, 15, and 7. Therefore, when the x and y components of the top left sample position of the current chroma block are 0, the left adjacent reference sample having a y coordinate of 31, the left adjacent reference sample having a y coordinate of 23, the left adjacent reference sample having a y coordinate of 15, and the left adjacent reference sample having a y coordinate of 7 can be selected from the left adjacent reference samples through the subsampling.
[0401] Meanwhile, the subsample_num_width and the subsample_num_height in Equation 5 may be derived based on the size of the current chroma block. For example, the subsample_num_width and the subsample_num_height may be derived as shown in the following table.
[0402] [Table 26]
[0403] Referring to Table 26, subsampling may be performed on adjacent reference samples adjacent to the longer side of the current chroma block according to the shorter one of the width and height of the current chroma block. That is, the number of adjacent reference samples selected from the adjacent reference samples adjacent to the longer side may be derived as the smaller value of the width and height of the current chroma block. For example, subsample_num_width=subsample_num_height=min(width, height).
[0404] Or, for example, th is derived, the N th For example, the subsample_num_width and subsample_num_height can be derived based on the N th Based on this, the following table can be derived:
[0405] [Table 27]
[0406] Here, min(A,B) can indicate the smaller value of A and B.
[0407] Alternatively, sub-sampling may be performed to derive an optimal number of neighboring reference samples that fit the current chroma block based on a pre-defined look-up table (LUT). For example, the LUT may be derived as shown in the following table:
[0408] [Table 28]
[0409] Referring to Table 28, the number of adjacent reference samples selected from the above subsampling can be increased, thereby allowing CCLM parameters to be calculated with higher accuracy. In the above example, in the subsampling for deriving 6 adjacent reference samples, 6 positions (idx_w or idx_h) of the forward part can be selected from the subsampling for deriving 8 adjacent reference samples, and in the subsampling for deriving 12 or 14 adjacent reference samples, 12 or 14 positions of the forward part can be selected from the subsampling for deriving 16 adjacent reference samples. In addition, in the subsampling for deriving 24 or 28 adjacent reference samples, 24 or 28 positions of the forward part can be selected from the subsampling for deriving 32 adjacent reference samples.
[0410] Also, referring to Table 28, the number of reference samples to be selected in the encoding device and the decoding device is determined as follows.
[0411] For example, if the chroma block size of the current chroma block is 4x32, the subsample_num_width can be determined to be 4 and the subsample_num_height can be determined to be 28, and the subsample_num_width and subsample_num_height can be determined in the same manner for the remaining chroma block sizes.
[0412] Alternatively, sub-sampling may be performed to derive a simplified number of adjacent reference samples to prevent an increase in hardware complexity. In this case, for example, the LUT may be derived as shown in the following table.
[0413] [Table 29]
[0414] Referring to Table 29, the maximum value of the sum of the subsample_num_width and the subsample_num_height can be set to 8. This allows CCLM parameters to be calculated efficiently while reducing an increase in hardware complexity.
[0415] In the above example of sub-sampling for deriving six adjacent reference samples, six positions (idx_w or idx_h) of the front part can be selected from sub-sampling for deriving eight adjacent reference samples.
[0416] Also, referring to Table 29, the number of reference samples to be selected in the encoding device and the decoding device is determined as follows.
[0417] For example, if the chroma block size of the current chroma block is 4x32, the subsample_num_width can be determined to 2 and the subsample_num_height can be determined to 6, and the subsample_num_width and subsample_num_height can be determined in the same manner for the remaining chroma block sizes.
[0418] The proposed method can use the promised values in the encoder and decoder without the need to transmit additional information, or the proposed method availability and values can be transmitted in units of CU, slice, picture, and sequence.
[0419] When subsampling using the LUTs such as those in Tables 28 and 29 is performed, the encoding device and the decoding device can use the subsample_num_width and subsample_num_height numbers determined in the table (i.e., the LUT). th When N is used, th The subsample_num_width and subsample_num_height may be determined based on the value of Table 17. In other cases, the values derived in Table 17 may be used as the default subsample_num_width and subsample_num_height.
[0420] On the other hand, in the proposed method on a CU basis, i.e., when information indicating whether or not subsampling is applied using the above-mentioned Equation 5 is transmitted, a method can be proposed in which the decoding device parses cclm_subsample_flag as follows to perform CCLM prediction when the intra prediction mode of the current chroma block is CCLM mode.
[0421] If the cclm_subsample_flag is 0 (false), select adjacent reference samples and calculate CCLM parameters using the existing subsampling method (subsampling according to Equation 4 above).
[0422] If the cclm_subsample_flag is 1 (true), select adjacent reference samples and calculate CCLM parameters through the proposed subsampling method (subsampling based on Equation 5 above).
[0423] When information indicating whether the proposed method is applied in slice, picture, and sequence units is transmitted, the information may be transmitted via high level syntax (HLS) as follows: A decoding device may select a sub-sampling method to be performed based on the information.
[0424] For example, information indicating whether the proposed method is applied, signaled via a slice header, can be shown as in the following table.
[0425] [Table 30]
[0426] cclm_subsample_flag may indicate a syntax element of information indicating whether the proposed method is applied or not.
[0427] Alternatively, for example, information indicating whether the proposed method is applied, which is signaled via a Picture Parameter Set (PPS), may be represented as in the following table.
[0428] [Table 31]
[0429] Alternatively, for example, information indicating whether the proposed method is applied, which is signaled via a Sequence Parameter Set (SPS), may be shown as in the following table.
[0430] [Table 32]
[0431] The method selected based on the cclm_subsample_flag value (i.e., the value derived by decoding cclm_subsample_flag) transmitted via the slice header, the PPS or the SPS can be derived as shown in the following table.
[0432] [Table 33]
[0433] Referring to Table 33, when the value of the cclm_subsample_flag is 0, subsampling using Equation 4 can be performed, and when the value of the cclm_subsample_flag is 1, subsampling using Equation 5 can be performed.
[0434] On the other hand, if pre-set values are used in the encoding device and the decoding device without transmitting additional information, the encoding device can execute the above-mentioned embodiment in the same manner as the decoding device, and can perform CCLM parameter calculations calculated based on selected adjacent reference samples.
[0435] Alternatively, when information indicating whether the proposed sub-sampling method is applicable in units of CU, slice, picture, and sequence is transmitted, the encoding device can determine whether the proposed sub-sampling method is applicable as follows, and then transmit the information to the decoding device.
[0436] -When information indicating whether the proposed subsampling method is applicable on a CU basis is transmitted, when the intra prediction mode of the current chroma block is CCLM mode, the one with better encoding efficiency among the following two cases can be determined via the RDO, and the information of a value indicating the corresponding case can be transmitted to the decoding device.
[0437] 1) If it is more efficient to perform CCLM parameter calculation via existing reference sample subsampling (subsampling using Equation 4 above), send cclm_subsample_flag with a value of 0 (false).
[0438] 2) If it is more efficient to perform CCLM parameter calculation via the proposed subsampling (subsampling using Equation 5 above), send cclm_subsample_flag with a value of 1 (true).
[0439] When information indicating whether the proposed sub-sampling method is applicable in slice, picture, and sequence units is transmitted, the information can be transmitted by adding HLS (high level syntax) as shown in Tables 30, 31, and 32 above.
[0440] FIG. 18 shows an example of performing CCLM prediction using subsampling using Equation 5 above.
[0441] Referring to FIG. 18, an encoding / decoding device may calculate CCLM parameters for the current block (S1800).
[0442] Specifically, the encoding / decoding apparatus may determine whether sub-sampling is required for adjacent samples of the current chroma block (S1805).
[0443] For example, if a number of upper neighboring samples less than a width of the current chroma block are selected to derive CCLM parameters for the current chroma block, the sub-sampling needs to be performed on the upper neighboring samples of the current chroma block. Also, for example, if a number of left neighboring samples less than a height of the current chroma block are selected to derive CCLM parameters for the current chroma block, the sub-sampling needs to be performed on the left neighboring samples of the current chroma block.
[0444] If the sub-sampling is necessary, the encoding / decoding apparatus may select a certain number of adjacent samples by performing sub-sampling on adjacent samples using Equation 5 (S1810). Thereafter, the encoding / decoding apparatus may calculate CCLM parameters for the current chroma block based on the selected adjacent samples (S1815).
[0445] On the other hand, if the subsampling is not necessary, the encoding / decoding apparatus may select neighboring samples of the current chroma block without performing the subsampling (S1820), and then may calculate CCLM parameters for the current chroma block based on the selected neighboring samples (S1815).
[0446] When the CCLM parameters are derived, the encoding / decoding apparatus may perform CCLM prediction on the current chroma block based on the CCLM parameters to generate predicted samples of the current chroma block (S1825).
[0447] FIG. 19 illustrates an image encoding method by an encoding apparatus according to the present document. The method disclosed in FIG. 19 may be performed by the encoding apparatus disclosed in FIG. 2. Specifically, for example, S1900 to S1960 in FIG. 19 may be performed by a prediction unit of the encoding apparatus, and S1970 may be performed by an entropy encoding unit of the encoding apparatus. Although not illustrated, a process of deriving a residual sample for the current chroma block based on an original sample and a predicted sample for the current chroma block may be performed by a subtraction unit of the encoding apparatus, a process of deriving a reconstructed sample for the current chroma block based on a residual sample and a predicted sample for the current chroma block may be performed by an addition unit of the encoding apparatus, a process of generating information about the residual for the current chroma block based on the residual sample may be performed by a conversion unit of the encoding apparatus, and a process of encoding information about the residual may be performed by an entropy encoding unit of the encoding apparatus.
[0448] The encoding apparatus determines a cross-component linear model (CCLM) mode as an intra prediction mode of a current chroma block (S1900). For example, the encoding apparatus may determine the intra prediction mode of the current chroma block based on a rate-distortion cost (RD cost) (or RDO). Here, the RD cost may be derived based on a sum of absolute difference (SAD). The encoding apparatus may determine the CCLM mode as the intra prediction mode of the current chroma block based on the RD cost.
[0449] In addition, the encoding apparatus may encode information regarding an intra-prediction mode of the current chroma block, and the information regarding the intra-prediction mode may be signaled via a bitstream. The prediction-related information of the current chroma block may include information regarding the intra-prediction mode.
[0450] The encoding apparatus derives a specific value for the current chroma block (S1910).
[0451] The encoding apparatus may derive a specific value for the current chroma block. The specific value may be derived to derive a CCLM parameter for the current chroma block. For example, the specific value may be an upper limit of the number of adjacent samples or a maximum number of adjacent samples. The derived specific value may be 2. Or, the derived specific value may be 4, 8, or 16.
[0452] For example, the specific value may be derived as a preset value, i.e., the specific value may be derived as a value agreed upon between an encoding device and a decoding device, or in other words, the specific value may be derived as a preset value for the current chroma block to which the CCLM mode is applied.
[0453] Alternatively, for example, an encoding apparatus may encode video information including prediction related information and signal the video information including the prediction related information via a bitstream, where the prediction related information may include information indicating the specific value. The information indicating the specific value may be signaled in units of coding units (CUs), slices, PPSs, or SPSs.
[0454] Alternatively, for example, the encoding apparatus may encode video information including prediction-related information, and the prediction-related information may include flag information indicating whether to derive the number of neighboring reference samples based on the specific value. If the value of the flag information is 1, the flag information may indicate that the number of neighboring reference samples is derived based on the specific value, and if the value of the flag information is 0, the flag information may indicate that the number of neighboring reference samples is not derived based on the specific value. If the value of the flag information is 1, the prediction-related information may include information indicating the specific value. The flag information and / or the information indicating the specific value may be signaled in units of coding units (CUs), slices, PPSs, or SPSs.
[0455] Alternatively, for example, the specific value may be derived based on the size of the current block. As an example, the specific value may be derived based on whether the smaller of the width and height of the current block is greater than a specific threshold. For example, if the smaller of the width and height of the current block is greater than the specific threshold, the specific value may be derived as 4, and if the smaller of the width and height of the current block is not greater than the specific threshold, the specific value may be derived as 2. The specific threshold may be derived as a preset value. That is, the specific threshold may be derived as a value agreed between an encoding apparatus and a decoding apparatus. Alternatively, for example, an encoding apparatus may encode video information including prediction-related information, and the prediction-related information may include information indicating the specific threshold. In this case, the specific threshold may be derived based on the information indicating the specific threshold. For example, the derived specific threshold is 4 or 8.
[0456] The encoding apparatus compares the width and height of the current chroma block with the specific value (S1920). For example, the encoding apparatus may compare the width and height of the current chroma block with the specific value.
[0457] As an example, the encoding apparatus may compare the width of the current chroma block with the particular value, and may compare the height of the current chroma block with the particular value.
[0458] Alternatively, as an example, the encoding device may compare the smaller of the width and height of the current chroma block with the specific value, and may compare the height of the current chroma block with the specific value.
[0459] If the width and the height are equal to or greater than the specific value, the encoding apparatus derives the same number of upper adjacent chroma samples as the specific value of the current chroma block and the same number of left adjacent chroma samples as the specific value (S1930).
[0460] The encoding apparatus derives a downsampled neighboring luma sample and a downsampled luma sample of a current luma block (S1940). Here, the neighboring luma sample may correspond to the above neighboring chroma sample and the left neighboring chroma sample. The downsampled neighboring luma sample may include a downsampled above neighboring luma sample of the current luma block corresponding to the above neighboring chroma sample and a downsampled left neighboring luma sample of the current luma block corresponding to the left neighboring chroma sample.
[0461] When the number of upper adjacent chroma samples equal to the specific value is derived, the number of downsampled upper adjacent luma samples corresponding to the upper adjacent chroma samples may be derived, and when the number of upper adjacent chroma samples equal to the width value is derived, the number of downsampled upper adjacent luma samples corresponding to the upper adjacent chroma samples may be derived,
[0462] In addition, when the number of left adjacent chroma samples derived is equal to the specific value, the number of downsampled left adjacent luma samples corresponding to the left adjacent chroma samples may be derived, and when the number of left adjacent chroma samples derived is equal to the height value, the number of downsampled left adjacent luma samples corresponding to the left adjacent chroma samples may be derived,
[0463] The encoding apparatus derives CCLM parameters based on the above adjacent chroma sample, the left adjacent chroma sample, and the downsampled adjacent luma sample (S1950). The encoding apparatus may derive CCLM parameters based on the above adjacent chroma sample, the left adjacent chroma sample, and the downsampled adjacent luma sample. For example, the CCLM parameters may be derived based on Equation 3 above.
[0464] The encoding apparatus derives a prediction sample for the current chroma block based on the CCLM parameters and the downsampled luma sample (S1960). The encoding apparatus may derive the prediction sample for the current chroma block based on the CCLM parameters and the downsampled luma sample. The encoding apparatus may generate a prediction sample for the current chroma block by applying the CCLM derived as the CCLM parameters to the downsampled luma sample. That is, the encoding apparatus may perform CCLM prediction based on the CCLM parameters to generate a prediction sample for the current chroma block. For example, the prediction sample may be derived based on Equation 1 above.
[0465] The encoding apparatus encodes the image information including the prediction related information for the current chroma block (S1970). The encoding apparatus may encode the image information including the prediction related information for the current chroma block and signal the encoded information through a bitstream.
[0466] For example, the prediction related information may include information indicating the particular value. Further, for example, the prediction related information may include information indicating the particular threshold. Further, for example, the prediction related information may include flag information indicating whether to derive a number of neighboring reference samples based on the particular value. Further, for example, the prediction related information may include information indicating an intra prediction mode for the current chroma block.
[0467] Meanwhile, although not shown, an encoding apparatus may derive a residual sample for the current chroma block based on an original sample and a predicted sample for the current chroma block, generate information about the residual for the current chroma block based on the residual sample, and encode the information about the residual. The image information may include information about the residual. Also, the encoding apparatus may generate a reconstructed sample for the current chroma block based on the predicted sample and the residual sample for the current chroma block.
[0468] Meanwhile, the bitstream can be transmitted to the decoding device via a network or a (digital) storage medium, where the network can include a broadcasting network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
[0469] Figure 20 is a schematic diagram of an encoding device for performing a video encoding method according to the present document. The method disclosed in Figure 19 can be performed by the encoding device disclosed in Figure 20. Specifically, for example, a prediction unit of the encoding device of Figure 20 can perform S1900 to S1960 of Figure 19, and an entropy encoding unit of the encoding device of Figure 20 can perform S1970 of Figure 19. Also, although not shown in the figure, the process of deriving a residual sample for the current chroma block based on an original sample and a predicted sample for the current chroma block may be performed by a subtraction unit of the encoding device of Figure 20, the process of deriving a reconstructed sample for the current chroma block based on a predicted sample and a residual sample for the current chroma block may be performed by an addition unit of the encoding device of Figure 20, the process of generating information regarding the residual for the current chroma block based on the residual sample may be performed by a conversion unit of the encoding device of Figure 20, and the process of encoding information regarding the residual may be performed by an entropy encoding unit of the encoding device of Figure 20.
[0470] FIG. 21 illustrates an image decoding method by a decoding device according to the present document. The method disclosed in FIG. 21 may be performed by the decoding device disclosed in FIG. 3. Specifically, for example, S2100 to S2160 in FIG. 21 may be performed by a prediction unit of the decoding device, and S2170 may be performed by an adder of the decoding device. Although not shown, a process of obtaining information on the residual of the current block through a bitstream may be performed by an entropy decoding unit of the decoding device, and a process of deriving the residual sample for the current block based on the residual information may be performed by an inverse transform unit of the decoding device.
[0471] A decoding apparatus derives a cross-component linear model (CCLM) mode as an intra prediction mode of a current chroma block (S2100). The decoding apparatus may derive an intra prediction mode of the current chroma intra prediction mode. For example, the decoding apparatus may receive information on the intra prediction mode of the current chroma block via a bitstream, and may derive the CCLM mode as the intra prediction mode of the current chroma block based on the information on the intra prediction mode.
[0472] The decoding apparatus derives a specific value for the current chroma block (S2110). The decoding apparatus may derive a specific value for the current chroma block. The specific value may be derived to derive a CCLM parameter for the current chroma block. For example, the specific value may be an upper limit of the number of adjacent samples or a maximum number of adjacent samples. The derived specific value is 2. Or, the derived specific value is 4, 8, or 16.
[0473] For example, the specific value may be derived as a preset value, i.e., the specific value may be derived as a value agreed upon between an encoding device and a decoding device, or in other words, the specific value may be derived as a preset value for the current chroma block to which the CCLM mode is applied.
[0474] Alternatively, for example, the decoding device may obtain video information including prediction-related information through a bitstream, and the prediction-related information may include information indicating the specific value. In this case, the decoding device may derive the specific value based on the information indicating the specific value. The information indicating the specific value may be signaled in units of coding units (CUs), slices, PPSs, or SPSs.
[0475] Alternatively, for example, the decoding apparatus may obtain video information including prediction-related information through a bitstream, and the prediction-related information may include flag information indicating whether to derive the number of neighboring reference samples based on the specific value. If the value of the flag information is 1, the flag information may indicate that the number of neighboring reference samples is derived based on the specific value, and if the value of the flag information is 0, the flag information may indicate that the number of neighboring reference samples is not derived based on the specific value. If the value of the flag information is 1, the prediction-related information may include information indicating the specific value. In this case, the decoding apparatus may derive the specific value based on the information indicating the specific value. The flag information and / or the information indicating the specific value may be signaled in units of a coding unit (CU), a slice, a PPS, or an SPS.
[0476] Alternatively, for example, the specific value may be derived based on the size of the current block. As an example, the specific value may be derived based on whether the smaller value of the width and height of the current block is greater than a specific threshold. For example, if the smaller value of the width and height of the current block is greater than a specific threshold, the specific value may be derived as 4, and if the smaller value of the width and height of the current block is not greater than the specific threshold, the specific value may be derived as 2. The specific threshold may be derived as a preset value. That is, the specific threshold may be derived as a value agreed between an encoding apparatus and a decoding apparatus. Alternatively, for example, the decoding apparatus may obtain video information including prediction-related information through a bitstream, and the prediction-related information may include information indicating the specific threshold. In this case, the specific threshold may be derived based on the information indicating the specific threshold. For example, the derived specific threshold is 4 or 8.
[0477] The decoding apparatus compares the width and height of the current chroma block with the specific value (S2120). For example, the decoding apparatus may compare the width and height of the current chroma block with the specific value.
[0478] As an example, the decoding apparatus may compare the width of the current chroma block with the particular value, and may compare the height of the current chroma block with the particular value.
[0479] Alternatively, as an example, the decoding apparatus may compare the smaller of the width and height of the current chroma block with the specific value, and may compare the height of the current chroma block with the specific value.
[0480] If the width and the height are equal to or greater than the specific value, the decoding apparatus derives the same number of upper adjacent chroma samples of the current chroma block as the specific value and the same number of left adjacent chroma samples as the specific value (S2130).
[0481] For example, if the width and the height are equal to or greater than the particular value, the decoding apparatus may derive the same number of upper adjacent chroma samples as the particular value of the current chroma block and the same number of left adjacent chroma samples as the particular value.
[0482] Or, for example, if the width and the height are smaller than the particular value, the decoding device may derive the number of upper adjacent chroma samples equal to the width value of the current chroma block and the number of left adjacent chroma samples equal to the height value.
[0483] Or, for example, if the width is greater than or equal to the particular value and the height is less than the particular value, the decoding device may derive the same number of upper adjacent chroma samples as the particular value of the current chroma block and the same number of left adjacent chroma samples as the height value.
[0484] Or, for example, if the width is smaller than the particular value and the height is greater than or equal to the particular value, the decoding device may derive a number of upper adjacent chroma samples equal to the width value of the current chroma block and a number of left adjacent chroma samples equal to the particular value.
[0485] Meanwhile, the upper neighboring chroma sample is a neighboring chroma sample adjacent to an upper boundary of the current chroma block, and the left neighboring chroma sample is a neighboring chroma sample adjacent to a left boundary of the current chroma block.
[0486] In addition, when the number of upper adjacent chroma samples equal to the specific value is derived, among the upper adjacent chroma samples adjacent to the upper boundary of the current chroma block, upper adjacent chroma samples at positions derived based on Equation 4 may be derived as the number of upper adjacent chroma samples equal to the specific value. In addition, when the number of left adjacent chroma samples equal to the specific value is derived, among the left adjacent chroma samples adjacent to the left boundary of the current chroma block, upper adjacent chroma samples at positions derived based on Equation 4 may be derived as the number of left adjacent chroma samples equal to the specific value.
[0487] Alternatively, when the number of upper adjacent chroma samples equal to the specific value is derived, among the upper adjacent chroma samples adjacent to the upper boundary of the current chroma block, the upper adjacent chroma samples at positions derived based on Equation 5 may be derived as the number of upper adjacent chroma samples equal to the specific value. Also, when the number of left adjacent chroma samples equal to the specific value is derived, among the left adjacent chroma samples adjacent to the left boundary of the current chroma block, the upper adjacent chroma samples at positions derived based on Equation 5 may be derived as the number of left adjacent chroma samples equal to the specific value.
[0488] The decoding apparatus derives a downsampled neighboring luma sample and a downsampled luma sample of a current luma block (S2140). Here, the neighboring luma sample may correspond to the upper neighboring chroma sample and the left neighboring chroma sample. The downsampled neighboring luma sample may include a downsampled upper neighboring luma sample of the current luma block corresponding to the upper neighboring chroma sample and a downsampled left neighboring luma sample of the current luma block corresponding to the left neighboring chroma sample.
[0489] When the number of upper adjacent chroma samples equal to the specific value is derived, the number of downsampled upper adjacent luma samples corresponding to the upper adjacent chroma samples may be derived, and when the number of upper adjacent chroma samples equal to the width value is derived, the number of downsampled upper adjacent luma samples corresponding to the upper adjacent chroma samples may be derived,
[0490] In addition, when the number of left adjacent chroma samples derived is equal to the specific value, the number of downsampled left adjacent luma samples corresponding to the left adjacent chroma samples may be derived, and when the number of left adjacent chroma samples derived is equal to the height value, the number of downsampled left adjacent luma samples corresponding to the left adjacent chroma samples may be derived,
[0491] The decoding apparatus derives CCLM parameters based on the upper adjacent chroma sample, the left adjacent chroma sample, and the downsampled adjacent luma sample (S2150). The decoding apparatus may derive CCLM parameters based on the upper adjacent chroma sample, the left adjacent chroma sample, and the downsampled adjacent luma sample. For example, the CCLM parameters may be derived based on Equation 3 above.
[0492] The decoding apparatus derives a prediction sample for the current chroma block based on the CCLM parameters and the downsampled luma sample (S2160). The decoding apparatus may derive the prediction sample for the current chroma block based on the CCLM parameters and the downsampled luma sample. The decoding apparatus may generate a prediction sample for the current chroma block by applying the CCLM derived as the CCLM parameters to the downsampled luma sample. That is, the decoding apparatus may perform CCLM prediction based on the CCLM parameters to generate a prediction sample for the current chroma block. For example, the prediction sample may be derived based on Equation 1 above.
[0493] The decoding apparatus generates a reconstructed sample for the current chroma block based on the predicted sample (S2170). The decoding apparatus may generate the reconstructed sample based on the predicted sample. For example, the decoding apparatus may receive information about a residual for the current chroma block from the bitstream. The information about the residual may include a transform coefficient related to a (chroma) residual sample. The decoding apparatus may derive the residual sample (or a residual sample array) for the current chroma block based on the residual information. In this case, the decoding apparatus may generate the reconstructed sample based on the predicted sample and the residual sample. The decoding apparatus may derive a reconstructed block or a reconstructed picture based on the reconstructed sample. Hereinafter, as described above, the decoding apparatus may apply deblocking filtering and / or an in-loop filtering procedure such as an SAO procedure to the reconstructed picture to improve subjective / objective picture quality as necessary.
[0494] FIG 22 is a schematic diagram of a decoding device for performing the video decoding method according to the present document. The method disclosed in FIG 21 may be performed by the decoding device disclosed in FIG 22. Specifically, for example, a prediction unit of the decoding device of FIG 22 may perform S2100 to S2160 of FIG 21, and an adder of the decoding device of FIG 22 may perform S2170 of FIG 21. Although not shown, a process of obtaining video information including information on the residual of a current block through a bitstream may be performed by an entropy decoding unit of the decoding device of FIG 22, and a process of deriving the residual sample for the current block based on the information on the residual may be performed by an inverse transform unit of the decoding device of FIG 22.
[0495] According to the aforementioned document, intra prediction can be performed based on CCLM to improve video coding efficiency.
[0496] In addition, this document makes it possible to improve the efficiency of intra prediction based on CCLM.
[0497] This document also provides a method for reducing the complexity of intra prediction by limiting the number of neighboring samples selected to derive linear model parameters for CCLM to a specific number.
[0498] In the above embodiments, the method is described with reference to a flow chart as a series of steps or blocks, but this document is not limited to the order of steps, and certain steps may occur in a different order or simultaneously with other steps than those described above. Additionally, those skilled in the art will appreciate that the steps shown in the flow chart are not exclusive, and other steps may be included, or one or more steps of the flow chart may be omitted without affecting the scope of this document.
[0499] The embodiments described in this document may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored in a digital storage medium.
[0500] In addition, the decoding device and encoding device to which the embodiment of the present document is applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interactive device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, a transportation terminal (e.g., a vehicle terminal, an airplane terminal, a ship terminal, etc.), and a medical video device, and may be used to process a video signal or a data signal. For example, the over-the-top video (OTT) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.
[0501] In addition, the processing method to which the embodiments of this document are applied may be produced in the form of a program executed by a computer and may be stored in a computer-readable recording medium. Multimedia data having a data structure according to this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable recording medium may also include a medium embodied in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0502] Furthermore, the embodiments of the present document may be embodied in a computer program product by program code, the program code being executable by a computer in accordance with the embodiments of the present document. The program code may be stored on a computer readable carrier.
[0503] FIG. 23 exemplarily illustrates a structural diagram of a content streaming system to which the embodiments of this document are applied.
[0504] A content streaming system to which the embodiments of this document are applied can broadly include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.
[0505] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.
[0506] The bitstream may be generated by an encoding method or a bitstream generation method to which an embodiment of this document is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0507] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system may include a separate control server, and in this case, the control server controls commands / responses between devices in the content streaming system.
[0508] The streaming server can receive content from a media repository and / or an encoding server. For example, when the content is received from the encoding server, the content can be received in real time. In this case, the streaming server can store the bitstream for a certain period of time to provide a smooth streaming service.
[0509] Examples of the user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glass, head mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc. Each server in the content streaming system can be operated as a distributed server, and in this case, data received by each server can be processed in a distributed manner.
Claims
1. 1. A video decoding method performed by a decoding device, comprising: Deriving a cross-component linear model (CCLM) mode as an intra prediction mode of a current chroma block; deriving a specific value for the current chroma block; comparing a width and height of the current chroma block with the specific value; deriving a number of specific upper neighboring chroma samples of the current chroma block equal to the number of specific left neighboring chroma samples based on the width and the height being greater than the specific value; deriving a downsampled neighboring luma sample and a downsampled luma sample of a current luma block, the neighboring luma sample corresponding to the particular upper neighboring chroma sample and the particular left neighboring chroma sample; deriving CCLM parameters based on the identified upper neighboring chroma sample, the identified left neighboring chroma sample, and the downsampled neighboring luma sample; deriving a prediction sample for the current chroma block based on the CCLM parameters and the downsampled luma samples; generating a reconstructed sample for the current chroma block based on the predicted sample; the derived specific value is 2; if the width is greater than the particular value, a downsampled upper-neighboring luma sample at a particular upper position corresponding to the particular upper-neighboring chroma sample is derived; If the width of the current chroma block is 4, the specific top positions are (1,-1) and (3,-1); if the height is greater than the particular value, a downsampled left-neighboring luma sample at a particular left position corresponding to the particular left-neighboring chroma sample is derived; When the height of the current chroma block is 4, the specific left positions are (-1, 1) and (-1, 3).
2. 1. A video encoding method performed by an encoding device, comprising: determining a cross-component linear model (CCLM) mode as an intra prediction mode of a current chroma block; deriving a specific value for the current chroma block; comparing a width and height of the current chroma block with the specific value; deriving a number of specific upper neighboring chroma samples of the current chroma block equal to the number of specific left neighboring chroma samples based on the width and the height being greater than the specific value; deriving a downsampled neighboring luma sample and a downsampled luma sample of a current luma block, the downsampled neighboring luma sample corresponding to the particular upper neighboring chroma sample and the particular left neighboring chroma sample; deriving CCLM parameters based on the identified upper neighboring chroma sample, the identified left neighboring chroma sample, and the downsampled neighboring luma sample; deriving a prediction sample for the current chroma block based on the CCLM parameters and the downsampled luma samples; encoding image information including prediction related information for the current chroma block; the derived specific value is 2; if the width is greater than the particular value, a downsampled upper-neighboring luma sample at a particular upper position corresponding to the particular upper-neighboring chroma sample is derived; If the width of the current chroma block is 4, the specific top positions are (1,-1) and (3,-1); if the height is greater than the particular value, a downsampled left-neighboring luma sample at a particular left position corresponding to the particular left-neighboring chroma sample is derived; When the height of the current chroma block is 4, the specific left positions are (-1, 1) and (-1, 3).
3. A method for transmitting data for a video, comprising the steps of: generating a bitstream of video information including prediction related information for prediction samples for a current chroma block; transmitting the data including a bitstream of the video information including the prediction related information; The prediction samples for the current chroma block are derived based on cross-component linear model (CCLM) parameters and downsampled luma samples of the current luma block; the CCLM parameters are derived based on a particular upper neighboring chroma sample of the current chroma block, a particular left neighboring chroma sample of the current chroma block, and a downsampled neighboring luma sample of the current luma block corresponding to the particular upper neighboring chroma sample and the particular left neighboring chroma sample; selecting a number of the particular top-neighboring chroma samples of the current chroma block equal to the particular value and a number of the particular left-neighboring chroma samples equal to the particular value based on the width and height being greater than a particular value; The specific value for the current chroma block is derived as being equal to 2; if the width is greater than the particular value, a downsampled upper-neighboring luma sample at a particular upper position corresponding to the particular upper-neighboring chroma sample is derived; If the width of the current chroma block is 4, the specific top positions are (1,-1) and (3,-1); if the height is greater than the particular value, a downsampled left-neighboring luma sample at a particular left position corresponding to the particular left-neighboring chroma sample is derived; When the height of the current chroma block is 4, the specific left positions are (-1, 1) and (-1, 3).
Citation Information
Patent Citations
Image processing device and image processing method
JP2013034162A
Reference Pixel Reduction for Intra LM Prediction
US20130188703A1
