Image encoding / decoding method and apparatus, and recording medium storing bitstream thereon

By using a linear model derived from neighbor reconstruction samples in image compression for intra prediction and selecting a linear model in combination with template matching, the problem of insufficient intra prediction accuracy and compression performance in the prior art is solved, and more efficient image compression is achieved.

CN119895868APending Publication Date: 2025-04-25LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380066316.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-07-25
Filing Date
2023-07-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve the accuracy and compression performance of intra prediction in image compression.

Method used

Linear models are derived by derived from neighbor reconstruction samples and using these linear models for intra prediction, and appropriate linear models are selected in combination with template matching to improve prediction accuracy.

Benefits of technology

Improve the intra prediction accuracy and compression performance in image compression, reduce signaling overhead, and improve compression efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119895868A_ABST
    Figure CN119895868A_ABST
Patent Text Reader

Abstract

An image decoding / encoding method and apparatus according to the present disclosure may configure a reference sample for linear model prediction of a current block based on a reconstructed neighbor sample of the current block, derive a linear model of the current block based on the reference sample, generate a prediction sample of the current block based on the linear model, and decode the current block based on the prediction sample. And decoding / encoding the current block based on the prediction sample of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to an image encoding / decoding method and apparatus and a recording medium having a bit stream stored therein. Background Art

[0002] Recently, demands for high-resolution and high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images have been increasing in various application fields, and therefore, efficient image compression technology is being discussed.

[0003] There are various technologies, such as inter-frame prediction technology that uses video compression technology to predict pixel values ​​included in the current picture from pictures before or after the current picture, intra-frame prediction technology that predicts pixel values ​​included in the current picture by using pixel information in the current picture, entropy coding technology that assigns short symbols to values ​​with high occurrence frequency and assigns long symbols to values ​​with low occurrence frequency, etc., and these image compression technologies can be used to effectively compress image data and transmit or store it. Summary of the invention

[0004] Technical issues

[0005] The present disclosure provides a method and apparatus for deriving a linear model based on neighbor reconstruction samples and performing intra prediction using the derived linear model.

[0006] The present disclosure provides a method and apparatus for constructing a reference sample for deriving a linear model.

[0007] The present disclosure provides a method and apparatus for designing various linear models to improve prediction accuracy.

[0008] The present disclosure provides an efficient signaling method and apparatus for linear model intra-frame prediction.

[0009] The present disclosure provides a method and apparatus for selecting / deriving a linear model based on template matching.

[0010] Technical Solution

[0011] According to the image decoding method and device of the present disclosure, reference samples for linear model prediction of the current block can be constructed based on the reconstructed neighbor samples of the current block, the linear model of the current block can be derived based on the reference samples, and the predicted samples of the current block can be generated based on the linear model.

[0012] In the image decoding method and apparatus according to the present disclosure, the linear model of the current block may be derived using the coordinate information of the reference sample and the value of the reference sample.

[0013] In the image decoding method and device according to the present disclosure, the reference sample may include at least one of the following items: a reference sample included in a left sample line adjacent to the current block, a reference sample included in an upper sample line adjacent to the current block, or an upper-left reference sample adjacent to the current block.

[0014] The image decoding method and apparatus according to the present disclosure may derive horizontal component parameters and vertical component parameters of a linear model using coordinate information of reference samples and values ​​of reference samples.

[0015] In the image decoding method and apparatus according to the present disclosure, the horizontal component parameter or the vertical component parameter may be set to zero.

[0016] In the image decoding method and apparatus according to the present disclosure, a predetermined weight may be applied to a horizontal component parameter or a vertical component parameter.

[0017] According to the image decoding method and apparatus of the present disclosure, a first flag may be obtained, where the first flag indicates whether linear model prediction is applied to the current block.

[0018] In the image decoding method and apparatus according to the present disclosure, when the first flag indicates that linear model prediction is applied to the current block, a second flag may be obtained, the second flag indicating whether directional linear model prediction is applied to the current block.

[0019] In the image decoding method and apparatus according to the present disclosure, when the second flag indicates that directional linear model prediction is applied to the current block, a third flag may be obtained, the third flag indicating whether horizontal linear model prediction or vertical linear model prediction is applied to the current block.

[0020] In the image decoding method and apparatus according to the present disclosure, a linear model to be applied to a current block may be determined from among a plurality of linear models based on template matching.

[0021] According to the image encoding method and apparatus disclosed herein, reference samples for linear model prediction of the current block can be constructed based on reconstructed neighbor samples of the current block; a linear model of the current block can be derived based on the reference samples; and predicted samples of the current block can be generated based on the linear model.

[0022] In the image encoding method and apparatus according to the present disclosure, the linear model of the current block may be derived using coordinate information of the reference sample and the value of the reference sample.

[0023] In the image encoding method and device according to the present disclosure, the reference sample includes at least one of the following items: a reference sample included in a left sample line adjacent to the current block, a reference sample included in an upper sample line adjacent to the current block, or an upper-left reference sample adjacent to the current block.

[0024] The image encoding method and apparatus according to the present disclosure may derive horizontal component parameters and vertical component parameters of a linear model using coordinate information of a reference sample and a value of the reference sample.

[0025] In the image encoding method and apparatus according to the present disclosure, the horizontal component parameter or the vertical component parameter may be set to zero.

[0026] The image encoding method and apparatus according to the present disclosure may apply a predetermined weight to a horizontal component parameter or a vertical component parameter.

[0027] In the image encoding method and apparatus according to the present disclosure, a first flag may be obtained, the first flag indicating whether linear model prediction is applied to the current block.

[0028] In the image encoding method and apparatus according to the present disclosure, when the first flag indicates that linear model prediction is applied to the current block, a second flag may be obtained, the second flag indicating whether directional linear model prediction is applied to the current block.

[0029] In the image encoding method and apparatus according to the present disclosure, when the second flag indicates that directional linear model prediction is applied to the current block, a third flag may be obtained, the third flag indicating whether horizontal linear model prediction or vertical linear model prediction is applied to the current block.

[0030] The image encoding method and apparatus according to the present disclosure may determine a linear model to be applied to a current block from among a plurality of linear models based on template matching.

[0031] A computer-readable digital storage medium storing encoded video / image information is provided, wherein the encoded video / image information enables a decoding device according to the present disclosure to perform an image decoding method.

[0032] A computer-readable digital storage medium is provided, which stores video / image information generated according to the image encoding method of the present disclosure.

[0033] A method and apparatus for transmitting video / image information generated based on the image encoding method according to the present disclosure are provided.

[0034] Beneficial Effects

[0035] According to the present disclosure, by guiding a linear model based on neighbor reconstructed samples and performing intra prediction using the derived linear model, it is possible to consider more different prediction methods for prediction and improve compression performance.

[0036] According to the present disclosure, by providing various linear model design methods and devices, prediction accuracy can be increased.

[0037] The present disclosure can improve prediction accuracy by providing design methods and devices for various linear models.

[0038] The present disclosure may improve compression efficiency by efficiently signaling information about linear model intra prediction.

[0039] The present disclosure can reduce signaling overhead and improve compression efficiency by selecting / deriving linear models based on template matching. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A video / image encoding system according to the present disclosure.

[0041] Figure 2 is a rough block diagram of an encoding device to which embodiments of the present disclosure can be applied and which performs encoding of a video / image signal.

[0042] Figure 3 is a rough block diagram of a decoding device to which embodiments of the present disclosure can be applied and which performs decoding of a video / image signal.

[0043] Figure 4 is a diagram illustrating an intra prediction method performed by the decoding apparatus 300 according to an embodiment of the present disclosure.

[0044] Figures 5 to 7 2 is a diagram illustrating a linear model determination method based on template matching according to an embodiment of the present disclosure.

[0045] Figure 8 is a diagram illustrating a schematic configuration of an intra predictor 331 for performing an intra prediction method according to the present disclosure.

[0046] Fig. 9 is a diagram illustrating an intra prediction method performed by the encoding apparatus 200 according to an embodiment of the present disclosure.

[0047] Fig.10 2 is a diagram illustrating a schematic configuration of the intra predictor 222 for performing the intra prediction method according to the present disclosure.

[0048] Fig.11 is an example of a content streaming system to which embodiments of the present disclosure can be applied. DETAILED DESCRIPTION

[0049] Because the present disclosure can make various changes and has several embodiments, specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, it is not intended to limit the present disclosure to specific embodiments, and it should be understood to include all changes, equivalents and substitutes included in the spirit and technical scope of the present disclosure. While describing each of the accompanying drawings, similar reference numerals are used for similar components.

[0050] Terms such as first, second, etc. can be used to describe various components, but components should not be limited by these terms. These terms are only used to distinguish one component from other components. For example, without departing from the scope of the present disclosure, a first component can be referred to as a second component, and similarly, a second component can also be referred to as a first component. Terms and / or combinations of any one or more related statement items in a plurality of related statement items are included.

[0051] When a component is referred to as being "connected" or "linked" to another component, it should be understood that it can be directly connected or linked to another component, but another component may also exist in between. On the other hand, when a component is referred to as being "directly connected" or "directly linked" to another component, it should be understood that another component does not exist in between.

[0052] The terms used in this application are only used to describe specific embodiments and are not intended to limit the present disclosure. Unless the context clearly indicates otherwise, singular expressions include plural expressions. In this application, it should be understood that terms such as "including" or "having" are intended to designate the existence of features, numbers, steps, operations, components, parts or combinations thereof described in the specification, but do not exclude the possibility of existing or adding one or more other features, numbers, steps, operations, components, parts or combinations thereof in advance.

[0053] The present disclosure relates to video / image coding. For example, the methods / implementations disclosed herein may be applied to methods disclosed in the general video coding (VVC) standard. In addition, the methods / implementations disclosed herein may be applied to methods disclosed in the basic video coding (EVC) standard, the AOMedia video 1 (AV1) standard, the second generation audio video coding standard (AVS2), or the next generation video / image coding standard (e.g., H.267 or H.268, etc.).

[0054] This specification proposes various embodiments of video / image coding, and unless otherwise stated, these embodiments may be performed in combination with each other.

[0055] Here, video may refer to a collection of a series of images over time. A picture generally refers to a unit representing an image within a specific time period, and a slice / tile is a unit that forms a part of a picture in coding. A slice / tile may include at least one coding tree unit (CTU). A picture may be composed of at least one slice / tile. A tile is a rectangular area consisting of a plurality of CTUs within a specific tile column and a specific tile row of a picture. A tile column is a rectangular area of ​​a CTU having the same height as the picture and a width assigned by the syntax requirements of the picture parameter set. A tile row is a rectangular area of ​​a CTU having a height assigned by the picture parameter set and the same width as the width of the picture. The CTU within a tile may be arranged continuously according to a CTU raster scan, and the tiles within a picture may be arranged continuously according to a raster scan of the tile. A slice may include an integer number of complete tiles or an integer number of continuous complete CTU rows within a tile of a picture that may be exclusively included in a single NAL unit. At the same time, a picture may be divided into at least two sub-pictures. A sub-picture may be a rectangular area of ​​at least one slice within a picture.

[0056] A pixel or a picture element may refer to the smallest unit constituting a picture (or image). In addition, a "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luminance component, or only a pixel / pixel value of a chrominance component.

[0057] A unit may be a basic unit of image processing. A unit may include at least one of a specific region of a picture and information associated with the corresponding region. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as a block or region. In general, an MxN block may include a set (or array) of transform coefficients or samples (or sample arrays) consisting of M columns and N rows.

[0058] Here, "A or B" may refer to "only A", "only B", or "both A and B". In other words, here, "A or B" may be interpreted as "A and / or B". For example, here, "A, B or C" may refer to "only A", "only B", "only C", or "any combination of A, B, and C".

[0059] As used herein, a slash ( / ) or a comma may mean "and / or". For example, "A / B" may mean "A and / or B". Thus, "A / B" may mean "only A", "only B", or "both A and B". For example, "A, B, C" may mean "A, B, or C".

[0060] Here, "at least one of A and B" may refer to "only A", "only B", or "both A and B". In addition, herein, expressions such as "at least one of A or B" or "at least one of A and / or B" can be interpreted in the same manner as "at least one of A and B".

[0061] In addition, herein, “at least one of A, B, and C” may refer to “only A”, “only B”, “only C”, or “any combination of A, B, and C”. In addition, “at least one of A, B, or C” or “at least one of A, B and / or C” may refer to “at least one of A, B, and C”.

[0062] In addition, the brackets used herein may refer to "for example". Specifically, when the indication is "prediction (intra-frame prediction)", "intra-frame prediction" may be proposed as an example of "prediction". In other words, the "prediction" here is not limited to "intra-frame prediction", and "intra-frame prediction" may be proposed as an example of "prediction". In addition, even when the indication is "prediction (ie, intra-frame prediction)", "intra-frame prediction" may be proposed as an example of "prediction".

[0063] Here, technical features described individually in one drawing may be implemented individually or simultaneously.

[0064] Figure 1 A video / image compilation system according to the present disclosure is shown.

[0065] Reference Figure 1 , a video / image coding system may include a first device (source device) and a second device (receiving device).

[0066] The source device may send the encoded video / image information or data to the receiving device in the form of a file or stream transmission through a digital storage medium or a network. The source device may include a video source, an encoding device, and a transmitting unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, and the display unit may be composed of a separate device or an external component.

[0067] The video source may acquire the video / image by a process of capturing, synthesizing or generating the video / image. The video source may include a device for capturing the video / image and a device for generating the video / image. The device for capturing the video / image may include at least one camera, a video / image archive including previously captured videos / images, etc. The device for generating the video / image may include a computer, a tablet computer, a smart phone, etc., and may (electronically) generate the video / image. For example, a virtual video / image may be generated by a computer, etc., and in this case, the process of capturing the video / image may be replaced by a process of generating the relevant data.

[0068] The encoding device can encode the input video / image. The encoding device can perform a series of processes such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bit stream.

[0069] The sending unit may send the encoded video / image information or data output in the form of a bit stream to the receiving unit of the receiving device in the form of a file or stream transmission through a digital storage medium or a network. The digital storage medium may include various storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The sending unit may include an element for generating a media file in a predetermined file format and may include an element for transmission through a broadcast / communication network. The receiving unit may receive / extract a bit stream and send it to a decoding device.

[0070] The decoding device may decode the video / image by performing a series of processes corresponding to the operations of the encoding device, such as inverse quantization, inverse transformation, prediction, etc.

[0071] The renderer may render the decoded video / image. The rendered video / image may be displayed through a display unit.

[0072] Figure 2 A rough block diagram of an encoding device to which embodiments of the present disclosure can be applied and to perform encoding of a video / image signal is shown.

[0073] Reference Figure 2, the encoding device 200 may be composed of an image segmenter 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-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, an inverse quantizer 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. According to an embodiment, the above-mentioned image segmenter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250, and the filter 260 may be configured by at least one hardware component (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include a memory 270 as an internal / external component.

[0074] The image divider 210 may divide the input image (or picture, frame) input to the encoding device 200 into at least one processing unit. As an example, the processing unit may be referred to as a coding unit (CU). In this case, the coding unit may be recursively divided from a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure.

[0075] For example, one coding unit may be segmented into a plurality of coding units having a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quadtree structure may be applied first, and the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied before the quadtree structure. The coding process according to this specification may be performed based on a final coding unit that is no longer segmented. In this case, based on coding efficiency according to image characteristics, etc., the maximum coding unit may be directly used as the final coding unit, or if necessary, the coding unit may be recursively segmented into coding units of a deeper depth, and the coding unit with the optimal size may be used as the final coding unit. Here, the coding process may include processes such as prediction, transformation, and reconstruction described later.

[0076] 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 above-mentioned final coding unit, respectively. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.

[0077] In some cases, a unit may be used interchangeably with terms such as a block or region. In general, an MxN block may represent a set of transform coefficients or samples consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luma component, or only a pixel / pixel value of a chroma component. A sample may be used as a term to make a picture (or image) correspond to a pixel or a picture element.

[0078] The encoding device 200 may subtract the prediction signal (prediction block, prediction sample array) output from the inter predictor 221 or the intra predictor 222 from the input image signal (original block, original sample array) to generate a residual signal (residual signal, residual sample array), and the generated residual signal is sent to the transformer 232. In this case, the unit that subtracts the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) within the encoding device 200 may be referred to as a subtractor 231.

[0079] The predictor 220 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 predictor 220 may determine whether intra prediction or inter prediction is applied in units of the current block or CU. The predictor 220 may generate various information about the prediction, such as prediction mode information, and send it to the entropy encoder 240, as described later in the description of each prediction mode. The information about the prediction may be encoded in the entropy encoder 240 and output in the form of a bitstream.

[0080] The intra-frame predictor 222 can predict the current block by referring to the samples in the current picture. According to the prediction mode, the referenced sample can be located near the current block or can be located at a specific distance away from the current block. In intra-frame prediction, the prediction mode may include at least one non-directional mode and multiple directional modes. The non-directional mode may include at least one of the DC mode or the plane mode. According to the detail level of the prediction direction, the directional mode may include 33 directional modes or 65 directional modes. However, this is just an example, and more or less directional modes can be used according to the configuration. The intra-frame predictor 222 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

[0081] The inter-frame predictor 221 may derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the 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-frame prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). For inter-frame prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks 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 referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter-frame predictor 221 may configure a motion information candidate list based on the neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, for skip mode and merge mode, the inter predictor 221 may use motion information of a neighboring block as motion information of a current block. For skip mode, unlike merge mode, a residual signal may not be sent. For motion vector prediction (MVP) mode, a motion vector of a neighboring block is used as a motion vector predictor, and a motion vector difference is signaled to indicate a motion vector of the current block.

[0082] The predictor 220 may generate a prediction signal based on various prediction methods described later. For example, the predictor may not only apply intra prediction or inter prediction to predict a block, but may also apply intra prediction and inter prediction at the same time. It may be referred to as a combined inter and intra prediction (CIIP) mode. In addition, the predictor may be based on an intra block copy (IBC) prediction mode or may be based on a palette mode for prediction of a block. The IBC prediction mode or the palette mode may be used for content image / video coding of games, such as screen content coding (SCC), etc. IBC basically performs prediction within the current picture, but it may be performed similarly to inter prediction because it derives a reference block within the current picture. In other words, IBC may use at least one of the inter prediction techniques described herein. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, the sample values ​​within the picture may be signaled based on information about the palette table and the palette index. The prediction signal generated by the predictor 220 may be used to generate a reconstruction signal or a residual signal.

[0083] The transformer 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 conditional nonlinear transform (CNT). Here, GBT refers to a transform obtained from a graph when relationship information between pixels is expressed as a graph. CNT refers to a transform obtained based on generating a prediction signal using all previously reconstructed pixels. In addition, the transform process may be applied to square pixel blocks of the same size or may be applied to non-square blocks of variable size.

[0084] The quantizer 233 may quantize the transform coefficients and send them to the entropy encoder 240, and the entropy encoder 240 may encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients in the form of blocks into a one-dimensional vector form based on the coefficient scanning order, and may generate information about the quantized transform coefficients based on the quantized transform coefficients in the form of the one-dimensional vector.

[0085] The entropy encoder 240 may perform various encoding methods such as Exponential Golomb, Context Adaptive Variable Length Coding (CAVLC), Context Adaptive Binary Arithmetic Coding (CABAC), etc. The entropy encoder 240 may encode information necessary for video / video image reconstruction (e.g., values ​​of syntax elements, etc.) in addition to transform coefficients quantized together or individually.

[0086] The encoded information (e.g., encoded video / image information) can be transmitted or stored in units of network abstraction layer (NAL) units in the form of a bitstream. The video / image information may further include information about various parameter sets such as an adaptive 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. Here, information and / or syntax elements sent from the encoding device / signaled to the decoding device may be included in the video / image information. The video / image information may be encoded and included in the bitstream through the above-mentioned encoding process. The bitstream may be transmitted through a network or may be stored in a digital storage medium. Here, the network may include a broadcast network and / or a communication network, etc., and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmission unit (not shown) for transmission and / or a storage unit (not shown) for storing a signal output from the entropy encoder 240 may be configured as an internal / external element of the encoding device 200, or the transmission unit may also be included in the entropy encoder 240.

[0087] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transform to the quantized transform coefficients through the inverse quantizer 234 and the inverse transformer 235. The adder 250 can add the reconstructed residual signal to the prediction signal output from the inter-frame predictor 221 or the intra-frame predictor 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). When there is no residual of the block to be processed, such as when the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can also be used for inter-frame prediction of the next picture through filtering described later. At the same time, luminance mapping with chroma scaling (LMCS) can be applied in the picture encoding and / or reconstruction process.

[0088] The filter 260 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and the modified reconstructed picture can be stored in the memory 270, specifically in the DPB of the memory 270. Various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various information about filtering and send it to the entropy encoder 240. The information about filtering can be encoded in the entropy encoder 240 and output in the form of a bit stream.

[0089] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter predictor 221. When inter prediction is applied therethrough, the encoding apparatus can avoid prediction mismatch in the encoding apparatus 200 and the decoding apparatus, and can also improve encoding efficiency.

[0090] The DPB of the memory 270 may store the modified reconstructed picture to be used as a reference picture in the inter-frame predictor 221. The memory 270 may store the motion information of the block from which the motion information in the current picture is derived (or encoded) and / or the motion information of the block in the pre-reconstructed picture. The stored motion information may be sent to the inter-frame predictor 221 to be used as the motion information of the spatial neighbor block or the motion information of the temporal neighbor block. The memory 270 may store the reconstructed samples of the reconstructed block in the current picture and send them to the intra-frame predictor 222.

[0091] Figure 3 A rough block diagram of a decoding device to which embodiments of the present disclosure can be applied and which performs decoding of a video / image signal is shown.

[0092] Reference Figure 3 , the decoding device 300 may be configured by including 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-frame predictor 332 and an intra-frame predictor 331. The residual processor 320 may include an inverse quantizer 321 and an inverse transformer 322.

[0093] According to an embodiment, the above entropy decoder 310, the residual processor 320, the predictor 330, the adder 340 and the filter 350 may be configured by one hardware component (e.g., a decoder chipset or a processor). In addition, the memory 360 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory 360 as an internal / external component.

[0094] When a bit stream including video / image information is input, the decoding device 300 may respond to the Figure 2 The image is reconstructed by a process of processing video / image information in an encoding device. For example, the decoding device 300 can derive a unit / block based on relevant information of block segmentation obtained from a bitstream. The decoding device 300 can perform decoding by using a processing unit applied in the encoding device. Therefore, the processing unit of decoding can be a coding unit, and the coding unit can be divided from a coding tree unit or a maximum coding unit according to a quadtree structure, a binary tree structure and / or a ternary tree structure. At least one transform unit can be derived from the coding unit. And, the reconstructed image signal decoded and output by the decoding device 300 can be played by a playback device.

[0095] The decoding device 300 may receive the bit stream from Figure 2 The signal output by the encoding device of the video image processing apparatus 310, and the received signal can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information (e.g., video / image information) necessary for image reconstruction (or picture reconstruction). The video / image information may further include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding device may further decode the picture based on the information about the parameter set and / or the general constraint information. The information sent / received by the signal and / or the syntax elements described later in this document may be decoded and obtained from the bitstream by a decoding process. For example, the entropy decoder 310 may decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, CABAC, etc., and output the values ​​of the syntax elements necessary for image reconstruction and the quantized values ​​of the transform coefficients of the residual. In more detail, the CABAC entropy decoding method can receive a bin corresponding to each syntax element from a bitstream, determine a context model by using information of syntax elements to be decoded, decoding information of neighboring blocks and blocks to be decoded, or information of symbols / bins decoded in the previous step, and perform arithmetic decoding on the bins by predicting the probability of occurrence of the bins according to the determined context model, and generate symbols corresponding to the values ​​of each syntax element. In this case, after determining the context model, the CABAC entropy decoding method can update the context model by using information about the decoded symbols / bins of the context model for the next symbol / bin. Among the information decoded in the entropy decoder 310, information about prediction is provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and the residual value, i.e., the quantized transform coefficient and related parameter information, which is entropy decoded in the entropy decoder 310, can be input to the residual processor 320. The residual processor 320 can derive a residual signal (residual block, residual sample, residual sample array). In addition, information about filtering among the information decoded in the entropy decoder 310 can be provided to the filter 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 may be a component of the entropy decoder 310 .

[0096] Meanwhile, the decoding device according to this specification may be referred to as 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 an entropy decoder 310, and the sample decoder may include at least one of an inverse quantizer 321, an inverse transformer 322, an adder 340, a filter 350, a memory 360, an inter-frame predictor 332, and an intra-frame predictor 331.

[0097] The inverse quantizer 321 may inverse quantize the quantized transform coefficient and output the transform coefficient. The inverse quantizer 321 may rearrange the quantized transform coefficient into a two-dimensional block form. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding device. The inverse quantizer 321 may perform inverse quantization on the quantized transform coefficient by using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficient.

[0098] The inverse transformer 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0099] The predictor 320 may perform prediction on the current block and generate a prediction block including prediction samples for the current block. The predictor 320 may determine whether to apply intra prediction or inter prediction to the current block based on the information on prediction output from the entropy decoder 310, and determine a specific intra / inter prediction mode.

[0100] The predictor 320 can generate a prediction signal based on various prediction methods described later. For example, the predictor 320 can not only apply intra prediction or inter prediction to predict a block, but also apply intra prediction and inter prediction at the same time. It can be called a combined inter and intra prediction (CIIP) mode. In addition, the predictor can be based on an intra block copy (IBC) prediction mode or can be based on a palette mode for prediction of a block. The IBC prediction mode or the palette mode can be used for content image / video coding of games, such as screen content coding (SCC), etc. IBC basically performs prediction within the current picture, but it can be performed similarly to inter prediction because it derives a reference block within the current picture. In other words, IBC can use at least one of the inter prediction techniques described herein. The palette mode can be considered as an example of intra coding or intra prediction. When the palette mode is applied, information about the palette table and the palette index can be included in the video / image information and sent with a signal.

[0101] The intra-frame predictor 331 can predict the current block by referring to samples within the current picture. Depending on the prediction mode, the referenced sample can be located near the current block or can be located at a specific distance away from the current block. In intra-frame prediction, the prediction mode can include at least one non-directional mode and multiple directional modes. The intra-frame predictor 331 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

[0102] The inter-frame predictor 332 may derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the 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-frame prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). For inter-frame 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-frame predictor 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 the received candidate selection information. Inter-frame prediction may be performed based on various prediction modes, and information about the prediction may include information indicating an inter-frame prediction mode for the current block.

[0103] The adder 340 may add the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 332 and / or the intra-frame predictor 331) to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). When there is no residual of the block to be processed, such as when the skip mode is applied, the prediction block may be used as the reconstructed block.

[0104] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, may be output by filtering described later, or may be used for inter prediction of the next picture. At the same time, luminance mapping with chroma scaling (LMCS) may be applied during picture decoding.

[0105] The filter 350 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and send the modified reconstructed picture to the memory 360, specifically the DPB of the memory 360. The various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0106] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter-frame predictor 332. The memory 360 can be derived from the motion information in its current picture (or decoded) The motion information of the block and / or the motion information of the block in the pre-reconstructed picture. The stored motion information can be sent to the inter-frame predictor 332 to be used as the motion information of the spatial neighbor block or the motion information of the temporal neighbor block. The memory 360 can store the reconstructed samples of the reconstructed block in the current picture and send them to the intra-frame predictor 331.

[0107] Here, the embodiments described in the filter 260, the inter-frame predictor 221, and the intra-frame predictor 222 of the encoding device 200 may also be equally or correspondingly applied to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300, respectively.

[0108] Figure 4 is a diagram illustrating an intra prediction method performed by the decoding device 300 according to an embodiment of the present disclosure.

[0109] An embodiment of the present disclosure provides a method for deriving a linear model based on neighbor reconstructed samples of a current block and performing intra-frame prediction using the derived linear model. When describing the embodiments of the present disclosure, the intra-frame prediction method using a linear model is referred to as linear model prediction, but is of course not limited to this name. In the present disclosure, linear model prediction may also be referred to as linear model intra-frame prediction, linear prediction, linear intra-frame prediction, model prediction, model intra-frame prediction, linear model-based prediction, linear model-based intra-frame prediction, position-based linear prediction, position-based linear model prediction, position-based linear model intra-frame prediction, etc.

[0110] Reference Figure 4 , the decoding device can construct reference samples for linear model intra prediction based on neighbor reconstructed samples of the current block (S400), and derive linear model parameters (or variables) based on the constructed reference samples (S410). In other words, the decoding device can construct reference samples for linear model intra prediction based on neighbor reconstructed samples of the current block, and derive (or determine) the linear model based on the constructed reference samples. The linear model for linear model intra prediction can be derived based on the linear model parameters derived in operation S410. Hereinafter, various embodiments of the intra prediction method based on the linear model will be described in detail.

[0111] According to an embodiment of the present disclosure, a linear model can be derived based on neighbor reconstructed samples of the current block. Specifically, the linear model parameters can be derived using the values ​​and / or coordinate information (or position information) of the neighbor reconstructed samples, and the linear model can be determined based on the derived linear model parameters. In the present disclosure, a linear model may also be referred to as a linear formula or a linear equation. Assuming that the current block is N×N, the following equation 1 can be used to generate (or calculate and derive) a predicted sample at position (x, y). In other words, a linear model such as the following equation 1 can be defined, and a linear model such as the following equation 1 can be used to generate a predicted sample at position (x, y).

[0112] [Equation 1]

[0113] Pred (x,y) =ax+by+c

[0114] In the above equation 1, a, b and c represent linear model parameters (or variables). In the present disclosure, c is a constant, which may be referred to as a linear model parameter or an offset. The linear model may be determined based on the linear model parameters. In addition, a and b may be referred to as horizontal (horizontal component) parameters and vertical (vertical component) parameters, respectively. Because the linear model is determined based on the linear model parameters, the linear model parameters may be a linear model, or may be referred to simply as a linear model. In order to derive the parameters a, b and c of the above equation 1, the values ​​and coordinate information (or position information) of the samples that have been reconstructed around the current block may be used.

[0115] Specifically, an equation for minimizing the error between the predicted sample and the reconstructed sample may be derived by using an equation expressing the correlation between the reconstructed pixel value and the pixel coordinates through the following Equation 2. As described above, the term "sample" may be used to refer to a pixel in the present disclosure.

[0116] [Equation 2]

[0117]

[0118] In the above equation 2, L refers to the number of neighbor reconstruction samples. As an embodiment, L = 4N + 1, and as in the following embodiments, L may be defined as various other numbers. In this case, as shown in the above equation 1, since Pred = ax + by + c and the minimum value of the square error is 0, the following equation 3 can be derived by performing partial differentiation on a, b, c with respect to the above equation 2.

[0119] [Equation 3]

[0120]

[0121] The above equation 3 can be organized into a matrix of a, b, c, as shown in the following equation 4.

[0122] [Equation 4]

[0123]

[0124] When the matrix According to Cramer's law, The solution of can be expressed as the following Equation 5.

[0125] [Equation 5]

[0126]

[0127] In equation 5 above, Matrix A can be calculated using only coordinate information. In addition, matrices B0, B1 and B2 can be calculated using coordinate information and reconstructed sample values ​​of neighboring blocks.

[0128] As an example, assuming that 1) the current block is a 4×4 block, 2) the value of the upper left reference sample adjacent to the upper left sample (or corner) of the current block is 533, 3) the reference sample values ​​included in the upper reference sample line adjacent to the right side of the upper left reference sample are {514, 487, 456, 470, 535, 533, 527, 525} in order from the left, and 4) the reference sample values ​​included in the left reference sample line adjacent to the bottom of the upper left reference sample are {540, 528, 504, 489, 489, 489, 489, 489} in order from the top. In this case, the linear model parameters a, b, and c can be derived as shown in Equation 6 below.

[0129] [Equation 6]

[0130]

[0131] Thereafter, the linear model according to the above equation 1 may be determined based on the calculated parameter values ​​a, b, and c. As an example, the values ​​of the linear model parameters calculated based on the reconstructed reference samples according to an embodiment of the present disclosure may be values ​​approximated by methods such as scaling, shift operations, fixed-point operations, and integer operations. Based on the derived linear model, the predicted samples may be calculated based on the positions of the samples in the current block. As an example, the predicted samples (or predicted blocks) of the 4×4 current block may be determined as shown in Table 1 below.

[0132] [Table 1]

[0133] 509 510 510 510 506 507 507 507 503 503 504 504 500 500 501 501

[0134] Referring to Table 1, the prediction sample of the current sample can be calculated based on the linear model to be derived and the position of the current sample in the current block. In other words, the prediction sample can be calculated sample by sample (ie, pixel by pixel) based on the derived linear model and the sample position.

[0135] In the above embodiments, description has been made based on the assumption that when the current block is N×N, a linear model (i.e., linear model parameters) is derived using 4N+1 reference samples (i.e., 1 upper left reference sample, 2N reference samples of the upper sample line, and 2N reference samples of the left sample line). In the following embodiments, methods of deriving a linear model using reference samples of various numbers or at various positions are described, but are not limited thereto.

[0136] According to an embodiment of the present invention, a linear model may be determined using a predefined specific number of reference samples and / or reference samples at specific positions. In other words, according to an embodiment of the present disclosure, the number and / or positions of reference samples for deriving linear model parameters may be predefined. The linear model parameter values ​​of the linear model according to the above equation 1 may vary depending on which samples are used in the neighbor reference samples of the current block.

[0137] As an implementation, when the current block is N×N, a total of 2N+1 reference samples including 1 upper left reference sample, N reference samples of the upper sample line, and N reference samples of the left sample line may be used to derive linear model parameters. For example, the N reference samples of the upper sample line may represent N reference samples that are continuously adjacent to the right side of the upper left reference sample adjacent to the current block. In addition, the N reference samples of the left sample line may represent N reference samples that are continuously adjacent to the bottom of the upper left reference sample adjacent to the current block.

[0138] As in the above embodiment, when the reference sample values ​​included in the upper reference sample line adjacent to the right side of the upper left reference sample are {514, 487, 456, 470} in order from the left, and the reference sample values ​​included in the left reference sample line adjacent to the bottom of the upper left reference sample are {540, 528, 504, 489} in order from the top, the linear model parameters a, b and c can be calculated as -21.3228, -10.3905 and 505.8571 respectively. The derived linear model can be used to generate a prediction block as shown in Table 2 below.

[0139] [Table 2]

[0140] 506 485 464 442 496 475 453 432 486 464 443 422 475 454 433 411

[0141] In addition, as an embodiment, when the current block is N×N, a total of 2N reference samples including N reference samples of the upper sample line and N reference samples of the left sample line may be used to derive linear model parameters. For example, the N reference samples of the upper sample line may be N reference samples that are continuously adjacent to the right side of the upper left reference sample adjacent to the current block. In addition, the N reference samples of the left sample line may be N reference samples that are continuously adjacent to the bottom of the upper left reference sample adjacent to the current block.

[0142] As in the above embodiment, when the reference sample values ​​included in the upper reference sample line adjacent to the right side of the upper left reference sample are {514, 487, 456, 470} in order from the left, and the reference sample values ​​included in the left reference sample line adjacent to the lower side of the upper left reference sample are {540, 528, 504, 489} in order from the top, the linear model parameters a, b, and c can be calculated as -22.4667, -11.5333, and 507, respectively. The derived linear model can be used to generate a prediction block as shown in Table 3 below.

[0143] [Table 3]

[0144] 507 485 463 440 496 473 451 429 484 462 439 417 473 450 428 405

[0145] In addition, as an embodiment, when the current block is N×N, a total of 2N+2 reference samples including N+1 reference samples of the upper sample line and N+1 reference samples of the left sample line may be used to derive linear model parameters. In this case, the N+1 reference samples of the upper sample line may be the N+1 reference samples that are continuously adjacent to the right side of the upper left reference sample adjacent to the current block. In addition, the N+1 reference samples of the left sample line may be the N+1 reference samples that are continuously adjacent to the bottom of the upper left reference sample adjacent to the current block. In this embodiment, the reference samples used to derive linear model parameters may be the same as the neighbor reference samples used in the planar prediction mode of VVC.

[0146] As in the above embodiment, when the reference sample values ​​included in the upper reference sample line adjacent to the right side of the upper left reference sample are {514, 487, 456, 470, 535} in order from the left, and the reference sample values ​​included in the left reference sample line adjacent to the bottom of the upper left reference sample are {540, 528, 504, 489, 489} in order from the top, the linear model parameters a, b, and c can be calculated as 8.08446, -6.30264, and 509.3226, respectively. The derived linear model can be used to generate a prediction block, as shown in Table 4 below.

[0147] [Table 4]

[0148] 510 502 494 486 504 495 487 479 497 489 481 473 491 483 475 467

[0149] In addition, as an embodiment, the linear model parameters may be derived using even-numbered or odd-numbered pixels (rather than consecutive pixels) in the reference samples. In other words, the linear model parameters may be derived using only even-numbered or odd-numbered pixels in the reference samples included in the upper reference sample line in the order starting from the left, and the linear model parameters may be derived using only even-numbered or odd-numbered pixels in the reference samples included in the left reference sample line in the order starting from the top.

[0150] In addition, as an embodiment, the number of pixels used to derive linear model parameters can be variably determined according to the block size. For example, when the block is less than or equal to the predefined size, the A reference sample can be used to determine the linear model, and when the block is larger than the predefined size, the B reference sample and the linear sample can be used to determine the linear model. A and B can each be a specific number according to any one of the above-mentioned embodiments. For example, in a block where the number of pixels is less than or equal to 16×16, the above-mentioned 4N+1 reference samples can be used to determine the linear model, and in a block with a number of pixels exceeding 16×16, 2N reference samples can be used to determine the linear model. The above-mentioned predefined size can be the maximum or minimum size used for linear model prediction. In addition, the number of reference samples according to the block size can be defined in various combinations.

[0151] In addition, according to an embodiment of the present disclosure, a linear model may be derived using a portion of the derived parameters. In other words, the linear model is derived using the coordinate information of the reconstructed pixels and pixels around the current block, but the linear model may be determined using only some of the derived linear model parameters. As an example, a horizontal linear model and a vertical linear model may be derived by a method that does not use parameters of the x-coordinate or y-coordinate, and a prediction block may be generated based on the derived horizontal linear model and vertical linear model.

[0152] Recalling the above equation 1, parameter a is a parameter of the x-axis, and b is a parameter of the y-axis. In other words, parameter a is a parameter of the horizontal direction, and b is a parameter of the vertical direction. In the present embodiment, a horizontal linear model and / or a vertical linear model can be defined by forcing (or setting) a or b parameter to 0. When describing the embodiments of the present disclosure, a linear model in which some of the derived linear model parameters are set to 0 is referred to as a horizontal / vertical linear model, but is certainly not limited to this name. In the present disclosure, a horizontal / vertical linear model may also be referred to as a horizontal / vertical constraint model, a horizontal / vertical constraint linear model, a first / second constraint linear model, a horizontal / vertical approximate model, a horizontal / vertical approximate linear model, a first / second approximate linear model, a constraint model, a constraint linear model, an approximate model, an approximate linear model.

[0153] That is, according to the present embodiment, after the linear model parameters of Equation 1 are derived based on the neighbor reference samples according to the above embodiment, the horizontal / vertical linear model can be finally determined by setting a or b to 0. The finally derived horizontal / vertical linear models can be expressed as the following Equations 7, respectively.

[0154] [Equation 7]

[0155] HorPred (x,y) =by+c

[0156] VerPred (x,y) =ax+c

[0157] Referring to Equation 7, since HorPred has the same predicted sample value in the horizontal direction and VerPred has the same predicted sample value in the vertical direction, HorPred can be called a horizontal linear model and VerPred can be called a vertical linear model. On the other hand, since HorPred has the parameters related to the horizontal change set to 0 so that the parameters related to the vertical change are retained, and VerPred has the parameters related to the vertical change set to 0 so that the parameters related to the horizontal change are retained, HorPred can be called a vertical linear model and VerPred can be called a horizontal linear model. In other words, HorPred / VerPred in the above Equation 7 can be respectively referred to as a horizontal / vertical linear model or a vertical / horizontal linear model, but in the following embodiments, HorPred / VerPred in Equation 7 will be respectively referred to as a horizontal / vertical linear model.

[0158] As an example, the prediction block may be generated using the vertical linear model or the horizontal linear model in Equation 7. Alternatively, as an example, two prediction blocks (or prediction samples) may be generated using the vertical linear model and the horizontal linear model, and the two generated prediction blocks may be weighted summed to generate a final prediction block (or prediction sample). The two prediction blocks generated using the corresponding models may be referred to as initial prediction blocks or temporary prediction blocks.

[0159] Alternatively, as an example, the prediction sample may be mixed (or weighted summed) with the prediction block generated by the linear model described in Equation 1 in a certain ratio to be derived as the final prediction sample. For example, the final prediction block may be calculated in the form of FinalPred = (3*HorPred + Pred) / 4. Alternatively, the final prediction block may be calculated in the form of FinalPred = (3*VerPred + Pred) / 4. Here, Pred represents the prediction sample (or prediction block) generated by the linear model described in Equation 1.

[0160] Alternatively, the prediction block generated by the vertical linear model or the horizontal linear model may be mixed with the prediction block generated by the planar mode in a certain ratio to be derived as the final prediction sample. For example, the final prediction block may have a form such as FinalPred=(3*HorPred+Planar) / 4. Alternatively, the final prediction block may have a form such as FinalPred=(3*VerPred+Planar) / 4. Here, Planar represents the prediction sample generated by the planar mode.

[0161] In addition, according to an embodiment of the present disclosure, weights may be applied to parameters in a specific direction. That is, a linear model may be derived by applying weights to some of the derived parameters. In other words, a linear model may be derived by using reconstructed pixels around a current block and coordinate information of these pixels, and a linear model may be determined by applying weights to some of the derived linear model parameters. As an example, a horizontal linear model and a vertical linear model may be derived by applying weighted parameters as parameters for an x-coordinate or a y-coordinate, and a prediction block may be generated based on this derivation.

[0162] That is, according to the present embodiment, after the linear model parameters of equation 1 are derived based on the neighbor reference samples described in the above embodiment, the horizontal / vertical linear model can be finally determined by applying weights to a or b. The finally derived horizontal / vertical linear models can be expressed as the following equations 8, respectively.

[0163] [Equation 8]

[0164] HorPred (x,y) =wxax+by+c

[0165] VerPred (x,y) =ax+wbby+c

[0166] In Equation 8, the weight w x and w b Respectively represent the weights for the change amount a on the x-axis and the change amount b on the y-axis. The vertical linear model and the horizontal linear model of equation 8 can be used as a single prediction block. That is, as an example, the vertical linear model or the horizontal linear model of equation 8 can be used to generate a prediction block. Alternatively, as an example, two prediction blocks (or prediction samples) can be generated using the vertical linear model and the horizontal linear model, and the two generated prediction blocks are weighted and summed to generate a final prediction block (or prediction sample). The two prediction blocks generated using the corresponding models can be called initial prediction blocks or temporary prediction blocks.

[0167] Alternatively, as an example, a prediction sample may be generated using a vertical linear model or a horizontal linear model, and the generated prediction block may be mixed (or weighted summed) with the prediction block generated by the linear model described in Equation 1 in a certain ratio to derive as a final prediction sample. For example, the final prediction block may be calculated in the form of FinalPred=(3*HorPred+Pred) / 4. Alternatively, for example, the final prediction block may have a form such as FinalPred=(3*VerPred+Planar) / 4.

[0168] Alternatively, the prediction block generated from the vertical linear model or the horizontal linear model of Equation 8 may be mixed with the prediction block generated by the planar mode in a certain ratio to be derived as the final prediction sample. For example, the final prediction block may have a form such as FinalPred=(3*HorPred+Planar) / 4. Or, for example, the final prediction block may have a form such as FinalPred=(3*VerPred+Planar) / 4. Here, Planar represents the prediction sample generated by the planar mode.

[0169] In the following, a method for signaling information related to the above-mentioned linear model prediction method is described. The above-mentioned linear model prediction method may be previously described in Figure 4 According to an embodiment, a separate flag indicating the above linear model prediction method as an intra prediction mode may be signaled.

[0170] [Table 5]

[0171] coding_unit(x0,y0,cbWidth,cbHeight,cqtDepth,treeType,modeType){ Descriptors … linear_model_intra_pred_mode[x0][y0] ae(v) …

[0172] For example, as shown in Table 5, at the coding unit level, a flag indicating the linear model prediction mode as an independent new intra prediction mode instead of the most probable mode (MPM) and the intra directional mode may be signaled. In Table 5, linear_model_intra_pred_mode is a syntax element indicating whether linear model prediction (or linear model prediction mode) is applied to the current coding unit.

[0173] In another embodiment, syntax for signaling a flag as an intra prediction mode and simultaneously signaling the embodiments previously described with reference to Equations 7 and 8 may be defined as shown in Table 6 below.

[0174] [Table 6]

[0175]

[0176] Referring to Table 6, linear_model_intra_pred_mode is a syntax element indicating whether linear model prediction is applied (or used) to the current coding unit. When linear_model_intra_pred_mode indicates application of linear model prediction, a syntax element indicating a linear model to be applied to the current coding unit among multiple linear models may be signaled.

[0177] That is, when linear_model_intra_pred_mode indicates that linear model prediction is applied, plane_linear_mode_flag indicating whether general linear model prediction is applied may be signaled. General linear model prediction may represent the linear model previously described with reference to Equation 1. In the present disclosure, general linear model prediction may be referred to as plane linear model prediction or non-directional linear model prediction.

[0178] When plane_linear_mode_flag indicates that general linear model prediction is not applied to the current coding unit, directional linear model prediction may be applied to the current coding unit. Directional linear model prediction may represent the linear model described previously with reference to Equation 7 and Equation 8.

[0179] In this case, a syntax element for specifying a directional linear model prediction to be applied to the current coding unit may be additionally signaled. linear_dir_flag represents a syntax element specifying a vertical linear model or a horizontal linear model.

[0180] In another embodiment, the proposed linear prediction method may be used only for blocks of a specific size. For example, the syntax shown in Table 7 below may be defined.

[0181] [Table 7]

[0182]

[0183] The syntax elements to be signaled and included in the syntax of Table 7 may be the same as the syntax elements previously described with reference to Tables 5 and 6. Redundant descriptions related thereto are omitted. Referring to Table 7, when the width and height of the current coding block are greater than or equal to a predefined size, the linear model prediction proposed in the present disclosure may be applied to the coding block. The predefined size may be defined as a variable. MinLinPredSize represents the minimum size to which linear model prediction is applied. MinLinPredSize may be defined as an integer greater than or equal to 0. For example, MinLinPredSize may be 4, 8, or 16.

[0184] An embodiment of signaling a linear model prediction mode has been described above. Hereinafter, a method of determining a linear model prediction mode using a template matching method will be described.

[0185] According to an embodiment of the present disclosure, multiple linear models may be available, and template matching may be used to determine a linear model to be applied to a current block among the multiple linear models. As an embodiment, as previously described with reference to Table 5, a flag indicating whether a linear model prediction is used for the current block may be signaled. When the flag indicates that a linear model prediction is used for the current block, template matching may be used to determine a linear model to be applied to the current block among the multiple linear models. The multiple linear models may include the above-mentioned general linear model prediction and directional general linear model prediction. That is, the general linear model prediction may represent the linear model previously described with reference to Equation 1. The directional linear model prediction may represent the linear model previously described with reference to Equations 7 and 8.

[0186] A template region may be defined within a reconstruction region around the current block, and a linear model may be determined based on the defined template region. Figures 5 to 7 to describe the specific reference area.

[0187] Figures 5 to 7 2 is a diagram illustrating a linear model determination method based on template matching according to an embodiment of the present disclosure.

[0188] Reference Figure 5 , the linear model of the current block (or current compiled block) can be determined as one of multiple linear models using template matching. The template area can be determined as an area adjacent to the left and / or top of the current block. In this case, the size of the template area can be predefined. For example, Figure 5 The size of the template area may be a predefined fixed integer value. Alternatively, for example, Figure 5 The size of the template area can be determined based on the width or height of the current block.

[0189] In this embodiment, the general linear model and the directional linear model (vertical / horizontal linear model) can be determined based on the cost of the template region of the current block. In this case, the cost can be calculated based on the difference between the predicted sample (or predicted block) predicted from the template region and the reconstructed sample. For example, the sum of absolute differences (SAD) and the sum of absolute transform differences (SATD) can be used for cost calculation.

[0190] like Figure 5As shown, first, multiple linear models can be derived using the reference area of ​​the current block. That is, a general linear model, a vertical linear model, and a horizontal linear model can be derived using the reference area of ​​the current block. The derived general linear model, vertical linear model, and horizontal linear model can be used to derive prediction samples of the template area. Based on this derivation, a linear model with the minimum cost among the derived general linear model, vertical linear model, and horizontal linear model can be selected. That is, the linear model type with the minimum cost can be determined as the intra-frame mode of the current block. Thereafter, the reference area of ​​the current block and the selected linear model can be used to generate prediction samples of the current block.

[0191] exist Figure 5 In, an implementation of deriving a linear model using a reference region of the current block and calculating the cost of the template region is described. On the other hand, Figure 6 An embodiment of deriving a linear model using a reference region of a template region and calculating a cost of the template region is illustrated.

[0192] Reference Figure 6 , multiple linear models can be derived using the reference area of ​​the template area. The linear model with the minimum cost among the derived general linear model, vertical linear model and horizontal linear model can be selected. The linear model type with the minimum cost of the template area is determined, and the linear model of the determined linear model type (general, vertical or horizontal) can be derived again using the reference area of ​​the current block. That is, the linear model parameters of the current block can be derived using the selected linear model type and the reference area of ​​the current block. The finally derived linear model can be used to generate the prediction sample of the current block.

[0193] Reference Figure 7 , multiple linear models can be derived using the reference area of ​​the template area. The linear model with the minimum cost among the derived general linear model, vertical linear model and horizontal linear model can be selected. The linear model type with the minimum cost of the template area is determined, and the linear model of the determined linear model type (general, vertical or horizontal) can be used to generate the prediction sample of the current block. That is, among the multiple linear models derived using the reference area of ​​the template area, the linear model selected based on the template matching cost is directly used to generate the prediction sample of the current block.

[0194] In addition, in another embodiment, the linear model prediction modes are sorted in the order of lowest cost using the above-mentioned template matching, and information indicating the linear model prediction mode of the linear model used to predict the current block can be signaled. That is, information about whether the linear prediction method is applied and which linear prediction mode is used is sent, but the order of the candidates can be sorted in the order of lowest cost by the template-based SATD, and the mode of the current block can be signaled based on the sorted candidate list.

[0195] Hereinafter, a method for signaling information related to the above-mentioned linear model prediction method is described. The above-mentioned linear model prediction method may be previously described in Figures 4 to 7 The linear model prediction method described in the embodiment of the invention. According to the embodiment, the linear model prediction mode can be compiled as part of the extended mode of the planar mode. The following table 8 can be defined.

[0196] [Table 8]

[0197]

[0198] Referring to Table 8, when intra_luma_not_planar_flag indicates that the planar mode is applied to the current block, a flag indicating a linear model prediction mode may be signaled. In Table 8, linear_model_intra_pred_mode is a syntax element indicating whether linear model prediction (or linear model prediction mode) is applied to the current coding unit.

[0199] In another embodiment, syntax for signaling a flag as an intra prediction mode and simultaneously signaling the embodiments described with reference to Equations 7 and 8 may be defined as shown in Table 9 below.

[0200] [Table 9]

[0201]

[0202] Referring to Table 9, linear_model_intra_pred_mode is a syntax element indicating whether linear model prediction is applied (or used) to the current coding unit. When linear_model_intra_pred_mode indicates application of linear model prediction, a syntax element indicating a linear model to be applied to the current coding unit among multiple linear models may be signaled.

[0203] That is, when linear_model_intra_pred_mode indicates that linear model prediction is applied, plane_linear_mode_flag indicating whether general linear model prediction is applied may be signaled. General linear model prediction may represent the linear model previously described with reference to Equation 1. In the present disclosure, general linear model prediction may be referred to as plane linear model prediction or non-directional linear model prediction.

[0204] When plane_linear_mode_flag indicates that general linear model prediction is not applied to the current coding unit, directional linear model prediction may be applied to the current coding unit. Directional linear model prediction may represent the linear model described previously with reference to Equation 7 and Equation 8.

[0205] In this case, a syntax element for specifying a directional linear model prediction to be applied to the current coding unit may be additionally signaled. linear_dir_flag represents a syntax element specifying either a vertical linear model or a horizontal linear model.

[0206] In another embodiment, the proposed linear prediction method may be used only for blocks of a specific size. For example, a syntax as shown in Table 10 below may be defined.

[0207] [Table 10]

[0208]

[0209] The syntax elements to be signaled and included in the syntax of Table 10 may be the same as the syntax elements previously described with reference to Tables 8 and 9. Redundant descriptions related thereto are omitted. Referring to Table 10, when the width and height of the current coding block are greater than or equal to a predefined size, the linear model prediction proposed in the present disclosure may be applied. The predefined size may be defined as a variable. MinLinPredSize represents the minimum size to which linear model prediction is applied. MinLinPredSize may be defined as an integer greater than or equal to 0. For example, MinLinPredSize may be 4, 8, or 16.

[0210] Figure 8 is a diagram illustrating a schematic configuration of an intra predictor 331 for performing an intra prediction method according to the present disclosure.

[0211] Reference Figure 8 , the intra predictor 331 may include a reference sample constructor 800 , a linear model deriver 810 , and a prediction sample generator 820 .

[0212] Specifically, the reference sample constructor 800 may construct reference samples for linear model intra prediction based on neighbor reconstructed samples of the current block. The linear model deriver 810 may derive a linear model based on the constructed reference samples. In other words, the reference sample constructor 800 may construct reference samples for linear model intra prediction based on neighbor reconstructed samples of the current block, and the linear model deriver 810 may derive (or determine) a linear model based on the constructed reference samples. The linear model for linear model intra prediction may be derived according to the linear model parameters derived by the linear model deriver 810. Figures 4 to 7 Various embodiments of the intra prediction method based on the linear model have been described, and repeated descriptions thereof will be omitted.

[0213] As described above, the linear model deriver 810 can derive a linear model based on the neighbor reconstructed samples of the current block. Specifically, the linear model deriver 810 can be derived using the values ​​and / or coordinate information (or position information) of the neighbor reconstructed samples, and the linear model can be determined based on the derived linear model parameters. In this case, a linear model such as the above equation 1 can be defined, and a linear model such as equation 1 can be used to generate a prediction sample at a position (x, y).

[0214] In addition, as described above, the linear model may be determined using a predefined specific number of reference samples and / or reference samples at specific positions. In other words, according to an embodiment of the present invention, the number and / or position of reference samples used to derive linear model parameters may be predefined. The linear model parameter values ​​of the linear model according to the above equation 1 may vary depending on which sample among the neighbor reference samples of the current block is utilized.

[0215] In addition, as described above, the linear model deriver 810 can derive a linear model based on available reference pixels in the reconstructed pixels around the current block. In other words, the linear model parameter deriver 810 can derive a linear model using only pixels with valid values ​​among the neighboring pixels of the current block.

[0216] In addition, as described above, the linear model parameter deriver 810 may derive the linear model using some of the derived parameters. In other words, the linear model deriver 810 may derive the linear equation using the coordinate information of the reconstructed pixels and pixels around the current block, but may determine the linear model using only some of the derived linear model parameters. As an example, the horizontal linear model and the vertical linear model may be derived by a method that does not use parameters for the x-coordinate or the y-coordinate, and a prediction block may be generated based on the horizontal linear model and the vertical linear model.

[0217] In addition, as described above, the embodiments previously described with reference to Tables 5 to 10 may be applied in substantially the same manner. That is, information related to linear model intra prediction may be signaled using the method previously described with reference to Tables 5 to 10. Redundant descriptions related thereto are omitted.

[0218] Furthermore, as described above, a linear model to be applied to the current block may be determined from among a plurality of linear models based on template matching.

[0219] The prediction sample generator 820 may generate a prediction sample of the current block based on the linear model parameters. In other words, the prediction sample generator 820 may perform intra prediction for the current block based on the derived linear model parameters (or linear model). Based on the derived linear model, a prediction sample may be generated in units of samples according to the position of the current sample within the current block.

[0220] Fig. 9 is a diagram illustrating an intra prediction method performed by the encoding device 200 according to an embodiment of the present disclosure.

[0221] In an embodiment of the present disclosure, a linear model intra prediction method performed by an encoding device is described. The encoding device may derive a linear model based on neighboring reconstructed samples of the current block, and perform intra prediction using the derived linear model. Figures 4 to 8 The described embodiments can be applied to linear model intra prediction in substantially the same manner, and a redundant description thereof will be omitted.

[0222] Reference Fig. 9 , the encoding device may construct reference samples for linear model intra prediction based on neighbor reconstructed samples of the current block (S900), and derive a linear model based on the constructed reference samples (S910). In other words, the encoding device may construct reference samples for linear model intra prediction based on neighbor reconstructed samples of the current block, and derive (or determine) a linear model based on the constructed reference samples. The linear model for linear model intra prediction may be derived based on the linear model parameters derived in operation S910.

[0223] The encoding device may derive a linear model based on neighbor reconstructed samples of the current block. Specifically, linear model parameters may be derived using values ​​and / or coordinate information (or position information) of neighbor reconstructed samples, and the linear model may be determined based on the derived linear model parameters. In this case, a linear model such as the above equation 1 may be defined, and a linear model such as equation 1 may then be used to generate a prediction sample at a position (x, y).

[0224] In addition, as described above, the linear model may be determined using a predefined specific number of reference samples and / or reference samples at a specific position. In other words, according to an embodiment of the present invention, the number and / or position of the reference samples used to derive the linear model parameters may be predefined. The linear model parameter values ​​of the linear model according to the above equation 1 may vary depending on which sample among the neighbor reference samples of the current block is utilized.

[0225] In addition, as described above, the encoding device can derive a linear model based on available reference pixels among the reconstructed pixels around the current block. In other words, the encoding device can derive a linear model using only pixels with valid values ​​among the neighboring pixels of the current block.

[0226] In addition, as described above, the encoding device may derive a linear model using some of the derived parameters. In other words, the encoding device may derive a linear equation using coordinate information of reconstructed pixels and pixels around the current block, but may determine a linear model using only some of the derived parameters. As an example, a horizontal linear model and a vertical linear model may be derived by a method that does not use parameters for an x-coordinate or a y-coordinate, and a prediction block may be generated based on the horizontal linear model and the vertical linear model.

[0227] Furthermore, as described above, the previous reference can be applied in substantially the same manner. Figures 4 to 8 That is, the previously described embodiments can be used Figures 4 to 8 The described method signals information related to linear model intra prediction.

[0228] Furthermore, as described above, a linear model to be applied to the current block may be determined from among a plurality of linear models based on template matching.

[0229] The encoding device may generate a prediction sample of the current block based on the linear model (S920). In other words, the encoding device may perform intra-frame prediction on the current block based on the derived linear model parameters (or linear model). Based on the derived linear model, a prediction sample may be generated in units of samples according to the position of the current sample within the current block.

[0230] Fig.10 2 is a diagram illustrating a schematic configuration of the intra predictor 222 for performing the intra prediction method of the present disclosure.

[0231] Reference Fig.10 , the intra predictor 222 may include a reference sample constructor 1000 , a linear model deriver 1010 , and a prediction sample generator 1020 .

[0232] Specifically, the reference sample constructor 1000 may construct reference samples for linear model intra prediction based on neighbor reconstructed samples of the current block. The linear model deriver 1010 may derive linear model parameters (or variables) based on the constructed reference samples. In other words, the reference sample constructor 1000 may construct reference samples for linear model intra prediction based on neighbor reconstructed samples of the current block, and the linear model deriver 1010 may derive (or determine) a linear model based on the constructed reference samples. The linear model for linear model intra prediction may be derived according to the linear model parameters derived by the linear model deriver 1010. Figures 4 to 7 Various embodiments of the intra prediction method based on the linear model have been described, and repeated descriptions thereof will be omitted.

[0233] As described above, the linear model exporter 1010 can derive a linear model based on the neighbor reconstructed samples of the current block. Specifically, the linear model exporter 1010 can derive linear model parameters using the values ​​and / or coordinate information (or position information) of the neighbor reconstructed samples, and can determine the linear model based on the derived linear model parameters. In this case, a linear model such as the above equation 1 can be defined, and a prediction sample at a position (x, y) can be generated using the linear model such as equation 1.

[0234] In addition, as described above, the linear model may be determined using a predefined specific number of reference samples and / or reference samples at specific positions. In other words, according to an embodiment of the present invention, the number and / or position of reference samples used to derive linear model parameters may be predefined. The linear model parameter values ​​of the linear model according to the above equation 1 may vary depending on which sample among the neighbor reference samples of the current block is utilized.

[0235] In addition, as described above, the linear model deriver 1010 can derive a linear model based on available reference pixels among the reconstructed pixels around the current block. In other words, the linear model deriver 1010 can derive a linear model using only pixels with valid values ​​among the neighboring pixels of the current block.

[0236] In addition, as described above, the linear model deriver 1010 may derive a linear model using some of the derived parameters. In other words, the linear model deriver 1010 may derive a linear equation using the coordinate information of the reconstructed pixels and pixels around the current block, but may determine the linear model using only some of the derived linear model parameters. For example, a horizontal linear model and a vertical linear model may be derived by a method that does not use parameters for the x-coordinate or the y-coordinate, and a prediction block may be generated based on the horizontal linear model and the vertical linear model.

[0237] In addition, as described above, the embodiments previously described with reference to Tables 5 to 10 may be applied in substantially the same manner. That is, information related to linear model intra prediction may be signaled using the method previously described with reference to Tables 5 to 10. Redundant descriptions related thereto are omitted.

[0238] Furthermore, as described above, a linear model to be applied to the current block may be determined from among a plurality of linear models based on template matching.

[0239] The prediction sample generator 820 may generate a prediction sample of the current block based on the linear model parameters. In other words, the prediction sample generator 820 may perform intra prediction on the current block based on the derived linear model parameters (or linear model). Based on the derived linear model, a prediction sample may be generated in units of samples according to the position of the current sample in the current block.

[0240] In the above embodiments, the method is described as a series of steps or boxes based on the flowchart, but the corresponding embodiments are not limited to the order of the steps, and some steps may occur simultaneously or in a different order than other steps described above. In addition, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and other steps may be included or one or more steps in the flowchart may be deleted without affecting the scope of the embodiments of the present disclosure.

[0241] The above-mentioned method according to the embodiment of the present disclosure can be implemented in the form of software, and the encoding device and / or decoding device according to the present disclosure can be included in a device that performs image processing, such as a TV, a computer, a smart phone, a set-top box, a display device, etc.

[0242] In the present disclosure, when the embodiment is implemented as software, the above method can be implemented as a module (process, function, etc.) that performs the above functions. The module can be stored in a memory and can be executed by a processor. The memory can be located inside or outside the processor and can be connected to the processor by various well-known means. The processor may include an application-specific integrated circuit (ASIC), another chipset, a logic circuit and / or a data processing device. The memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium and / or other storage devices. In other words, the embodiments described herein can be implemented on a processor, a microprocessor, a controller or a chip to perform. For example, the functional unit shown in each of the accompanying drawings can be implemented on a computer, a processor, a microprocessor, a controller or a chip to perform. In this case, information (e.g., information about instructions) or an algorithm for implementation can be stored in a digital storage medium.

[0243] In addition, the decoding device and encoding device of the embodiment of the present disclosure can be included in a multimedia broadcast sending and receiving device, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video conversation device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camera, a device for providing a video on demand (VoD) service, an over-the-top video (OTT) device, a device for providing an Internet streaming service, a three-dimensional (3D) video device, a virtual reality (VR) device, an augmented reality (AR) device, a video phone video device, a transportation tool terminal (e.g., a vehicle (including an autonomous vehicle) terminal, an aircraft terminal, a ship terminal, etc.) and a medical video device, etc., and can be used to process a video signal or a data signal. For example, an over-the-top video (OTT) device may include a game console, a Blu-ray player, a networked TV, a home theater system, a smart phone, a tablet computer, a digital video recorder (DVR), and the like.

[0244] In addition, the processing method of the embodiment of the present disclosure can be generated in the form of a program executed by a computer and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to an embodiment of the present disclosure can also be stored in a computer-readable recording medium. Computer-readable recording media include all types of storage devices and distributed storage devices that store computer-readable data. Computer-readable recording media may include, for example, Blu-ray discs (BD), universal serial buses (USB), ROMs, PROMs, EPROMs, EEPROMs, RAMs, CD-ROMs, magnetic tapes, floppy disks, and optical media storage devices. In addition, computer-readable recording media include media implemented in the form of carrier waves (e.g., transmitted via the Internet). In addition, the bit stream generated by the encoding method may be stored in a computer-readable recording medium or may be sent via a wired or wireless communication network.

[0245] In addition, the embodiments of the present disclosure may be implemented by a computer program product through a program code, and the program code may be executed on a computer by the embodiments of the present disclosure. The program code may be stored on a computer-readable carrier.

[0246] Fig.11 is an example of a content streaming system to which embodiments of the present disclosure can be applied.

[0247] Reference Fig.11 The content streaming transmission system to which the embodiments of the present disclosure are applied may mainly include an encoding server, a streaming transmission server, a web server, a media storage, a user device, and a multimedia input device.

[0248] The encoding server generates a bitstream by compressing content input from a multimedia input device such as a smartphone, a camera, a camcorder, etc. into digital data and transmits it to the streaming server. As another example, when a multimedia input device such as a smartphone, a camera, a camcorder, etc. directly generates a bitstream, the encoding server may be omitted.

[0249] A bitstream may be generated by applying the encoding method or the bitstream generating method of the embodiment of the present disclosure, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0250] The streaming server sends multimedia data to the user device through the web server based on the user's request, and the web server serves as a medium to inform the user what services are available. When the user requests the required service from the web server, the web server delivers it to the streaming server, and the streaming server sends the 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 the command / response between each device in the content streaming system.

[0251] The streaming server may receive content from a media storage and / or encoding server. For example, when receiving content from an encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a certain period of time.

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

[0253] Each server in the content streaming system may be operated as a distributed server, and in this case, data received from each server may be distributed and processed.

[0254] The claims set forth herein can be combined in various ways. For example, the technical features of the method claims of the present disclosure can be combined and implemented as a device, and the technical features of the device claims of the present disclosure can be combined and implemented as a method. In addition, the technical features of the method claims of the present disclosure and the technical features of the device claims can be combined and implemented as a device, and the technical features of the method claims of the present disclosure and the technical features of the device claims can be combined and implemented as a method.

Claims

1. A method for decoding an image, the method comprising the following steps: Constructing reference samples for linear model prediction of the current block based on reconstructed neighbor samples of the current block; deriving a linear model of the current block based on the reference samples; as well as Generate prediction samples of the current block based on the linear model.

2. The image decoding method according to claim 1, wherein: The linear model of the current block is derived using coordinate information of the reference sample and a value of the reference sample.

3. The image decoding method according to claim 2, wherein: The reference sample includes at least one of the following items: a reference sample included in a left sample line adjacent to the current block, a reference sample included in an upper sample line adjacent to the current block, or an upper-left reference sample adjacent to the current block.

4. The image decoding method according to claim 2, wherein: The step of deriving the linear model of the current block includes the step of deriving horizontal component parameters and vertical component parameters of the linear model using the coordinate information of the reference sample and the value of the reference sample.

5. The image decoding method according to claim 4, wherein: The step of deriving the linear model of the current block comprises the following steps: setting the horizontal component parameter or the vertical component parameter to zero.

6. The image decoding method according to claim 4, wherein: The step of deriving the linear model of the current block includes the step of applying a predetermined weight to the horizontal component parameter or the vertical component parameter.

7. The image decoding method according to claim 1, comprising the following steps: A first flag is obtained, where the first flag indicates whether to apply the linear model prediction to the current block.

8. The image decoding method according to claim 7, comprising the following steps: When the first flag indicates that the linear model prediction is applied to the current block, a second flag is obtained, the second flag indicating whether directional linear model prediction is applied to the current block.

9. The image decoding method according to claim 8, comprising the following steps: When the second flag indicates that the directional linear model prediction is applied to the current block, a third flag is obtained, the third flag indicating whether horizontal linear model prediction or vertical linear model prediction is applied to the current block.

10. The image decoding method according to claim 1, comprising the following steps: A linear model to be applied to the current block is determined from among a plurality of linear models based on template matching.

11. A method for encoding an image, comprising the following steps: Constructing reference samples for linear model prediction of the current block based on reconstructed neighbor samples of the current block; deriving a linear model of the current block based on the reference samples; as well as Generate prediction samples of the current block based on the linear model. 12 . A computer-readable storage medium configured to store a bit stream generated by the image encoding method according to claim 11 .

13. A method for transmitting data of image information, the method comprising the following steps: Constructing reference samples for linear model prediction of the current block based on reconstructed neighbor samples of the current block; deriving a linear model of the current block based on the reference samples; Generate a prediction sample of the current block based on the linear model; generating a bitstream by encoding the current block based on the prediction samples; as well as Data including the bit stream is transmitted.