Intra prediction-based image encoding / decoding method and device, and recording medium for storing bitstream
Patent Information
- Application Number
- PCT/KR2024/013596
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-08
- Filing Date
- 2024-09-09
- Publication Date
- 2025-03-13
Smart Images

Figure KR2024013596_13032025_PF_FP_ABST
Abstract
Description
Video encoding / decoding method and device based on intra prediction and recording medium for storing bitstream
[0001] The present disclosure relates to a video encoding / decoding method, a device, and a recording medium for storing a bitstream, and more particularly, to a video encoding / decoding method and device based on intra prediction, and a recording medium for storing a bitstream generated by the video encoding method / device of the present disclosure.
[0002] Recently, demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, has been increasing across various fields. As image data becomes higher resolution and higher quality, the amount of information transmitted, or bits, increases relative to conventional image data. This increase in information or bits transmitted leads to increased transmission and storage costs.
[0003] Accordingly, a highly efficient image compression technology is required to effectively transmit, store, and play high-resolution, high-quality image information.
[0004] The present disclosure aims to provide a video encoding / decoding method and device with improved encoding / decoding efficiency.
[0005] In addition, the present disclosure aims to provide an image encoding / decoding method and device that effectively performs intra prediction.
[0006] In addition, the present disclosure aims to provide a video encoding / decoding method and device that effectively performs intra prediction by predicting a current block using a previously restored block.
[0007] In addition, the present disclosure aims to provide a video encoding / decoding method and device that effectively performs intra prediction by making predictions using a pre-restored block coded in an intraTMP (intra template matching prediction) mode.
[0008] In addition, the present disclosure aims to provide a non-transitory computer-readable recording medium that stores a bitstream generated by an image encoding method or device according to the present disclosure.
[0009] In addition, the present disclosure aims to provide a non-transitory computer-readable recording medium that stores a bitstream received and decoded by an image decoding device according to the present disclosure and used for restoring an image.
[0010] In addition, the present disclosure aims to provide a method for transmitting a bitstream generated by an image encoding method or device according to the present disclosure.
[0011] The technical problems to be achieved in the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned can be clearly understood by a person having ordinary skill in the technical field to which the present disclosure belongs from the description below.
[0012] According to one embodiment of the present disclosure, there is provided an image decoding method performed by an image decoding device, comprising: a step of configuring an intraTMP (intra template matching prediction) merge candidate list for generating a prediction block of a current block; a step of rearranging the intraTMP merge candidate list; a step of obtaining a candidate index indicating one candidate included in the rearranged intraTMP merge candidate list; and a step of generating a final prediction block of the current block by performing intra prediction based on the candidate indicated by the candidate index, wherein the intraTMP merge candidate list may be configured with prediction information of a previously reconstructed block predicted in an intraTMP mode.
[0013] According to one embodiment of the present disclosure, the intraTMP mode may be one of a default mode, a filtered mode, an intra fusion mode, an error value based fusion mode, a fixed value based fusion mode, or a filter based fusion mode.
[0014] According to one embodiment of the present disclosure, the prediction information of the reconstructed block may include at least one of one or more block vector information, filter coefficients, one or more intra prediction modes or one or more weights used in the weighted sum used in the reconstructed block.
[0015] According to one embodiment of the present disclosure, the step of generating the final prediction block based on whether the candidate indicated by the candidate index is one of an intra-fusion mode, an error value-based fusion mode, a fixed value-based fusion mode, or a filter-based fusion mode may include the steps of generating a first prediction block based on the candidate indicated by the candidate index, generating a second prediction block based on an intra-prediction mode, and generating the final prediction block by weighting the first prediction block and the second prediction block.
[0016] According to one embodiment of the present disclosure, the intra prediction mode may be one of a DC mode, a Planar mode, or a directional mode.
[0017] According to one embodiment of the present disclosure, the shape of the template area used in the intraTMP mode may be one of an L-shape template, an Above shape template, or a Left shape template.
[0018] According to one embodiment of the present disclosure, the number of sample lines of the template area used in the intraTMP mode is N, and N may be a natural number.
[0019] According to one embodiment of the present disclosure, the step of constructing the intraTMP merge candidate list further includes the step of searching neighboring blocks of the current block, wherein the neighboring blocks may include at least one of neighboring blocks adjacent to the current block or non-adjacent blocks not adjacent to the current block.
[0020] According to one embodiment of the present disclosure, the search of the surrounding blocks may be performed in the following order: intraTMP mode of the upper left adjacent block of the current block, intraTMP mode of the upper adjacent block, intraTMP mode of the upper right adjacent block, intraTMP mode of the lower left adjacent block, intraTMP mode of the left adjacent block, and intraTMP mode of the non-adjacent block.
[0021] According to one embodiment of the present disclosure, the intraTMP merge candidate list is reordered based on an error value between a template region of a reference block and a template region of the current block, and the reference block may be a neighboring block of the current block used to construct the intraTMP merge candidate list.
[0022] According to one embodiment of the present disclosure, the intraTMP merge candidate list can be constructed based on flag information indicating whether the prediction mode of the current block is the intraTMP merge mode.
[0023] According to one embodiment of the present disclosure, the candidate index can be obtained based on the flag information indicating that the prediction mode of the current block is intraTMP merge mode.
[0024] According to one embodiment of the present disclosure, there is provided a video encoding method performed by a video encoding device, comprising the steps of: configuring a candidate list for generating a prediction block of a current block; rearranging the candidate list; generating a final prediction block of the current block by performing intra prediction based on one candidate included in the rearranged candidate list; and encoding a candidate index indicating the one candidate used in generating the final prediction block, wherein the candidate list may be configured with prediction information of a previously reconstructed block predicted in an intraTMP (intra template matching prediction) mode.
[0025] According to one embodiment of the present disclosure, there may be a computer-readable recording medium storing a bitstream generated by an image encoding method.
[0026] According to one embodiment of the present disclosure, a method for transmitting a bitstream generated by an image encoding method includes the steps of: configuring a candidate list for generating a prediction block of a current block; reordering the candidate list; generating a final prediction block of the current block by performing intra prediction based on one candidate included in the reordered candidate list; and encoding a candidate index indicating the one candidate used in generating the final prediction block, wherein the candidate list may be configured with prediction information of a previously reconstructed block predicted in an intraTMP (intra template matching prediction) mode.
[0027] According to the present disclosure, a video encoding / decoding method and device with improved encoding / decoding efficiency can be provided.
[0028] In addition, according to the present disclosure, an image encoding / decoding method and device that effectively perform intra prediction can be provided.
[0029] In addition, according to the present disclosure, a method and device for encoding / decoding an image can be provided that effectively performs intra prediction by predicting a current block using a pre-restored block.
[0030] In addition, according to the present disclosure, a video encoding / decoding method and device that effectively perform intra prediction by predicting using a pre-restored block coded in an intraTMP (intra template matching prediction) mode can be provided.
[0031] In addition, according to the present disclosure, a non-transitory computer-readable recording medium for storing a bitstream generated by an image encoding method or device according to the present disclosure can be provided.
[0032] In addition, according to the present disclosure, a non-transitory computer-readable recording medium can be provided that stores a bitstream received and decoded by an image decoding device according to the present disclosure and used for restoring an image.
[0033] Additionally, according to the present disclosure, a method for transmitting a bitstream generated by an image encoding method or device according to the present disclosure can be provided.
[0034] The effects that can be obtained from the present disclosure are not limited to the effects mentioned above, and other effects that are not mentioned will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the description below.
[0035] FIG. 1 is a diagram schematically illustrating a video coding system to which an embodiment according to the present disclosure can be applied.
[0036] FIG. 2 is a schematic diagram of an image encoding device to which an embodiment according to the present disclosure can be applied.
[0037] FIG. 3 is a schematic diagram illustrating an image decoding device to which an embodiment according to the present disclosure can be applied.
[0038] Figure 4 is a flowchart illustrating an intra prediction-based video / image encoding method.
[0039] FIG. 5 is a diagram exemplarily illustrating the configuration of an intra prediction unit according to the present disclosure.
[0040] Fig. 6 is a flowchart illustrating an intra prediction-based video / image decoding method.
[0041] FIG. 7 is a diagram exemplarily illustrating the configuration of an intra prediction unit according to the present disclosure.
[0042] FIG. 8 is a diagram illustrating a template area used in a TIMD (Template-based Intra Mode Derivation) mode according to the present disclosure.
[0043] FIG. 9 is a diagram for explaining a template matching-based encoding / decoding method according to the present disclosure.
[0044] FIG. 10 is a diagram illustrating a search area used for intraTMP (intra template matching prediction) according to one embodiment of the present disclosure.
[0045] FIG. 11 is a diagram for explaining a method for deriving an intraTMP block vector in an intra block copy (IBC) mode according to one embodiment of the present disclosure.
[0046] FIG. 12 is a prediction flowchart utilizing the intraTMP merge mode according to one embodiment of the present disclosure.
[0047] FIG. 13 is a diagram illustrating an intraTMP mode search area according to one embodiment of the present disclosure.
[0048] FIG. 14 is a diagram illustrating a reference area used for calculating a filter model according to one embodiment of the present disclosure.
[0049] FIG. 15 is a diagram illustrating template areas of a current block and a reference block according to one embodiment of the present disclosure.
[0050] FIG. 16 is a drawing illustrating the shape of a template area according to one embodiment of the present disclosure.
[0051] FIG. 17 is a diagram illustrating adjacent samples and non-adjacent samples according to one embodiment of the present disclosure.
[0052] FIG. 18 is a flowchart of an encoding method according to one embodiment of the present disclosure.
[0053] FIG. 19 is a flowchart of a decryption method according to one embodiment of the present disclosure.
[0054] FIG. 20 is a diagram illustrating an example of a content streaming system to which an embodiment according to the present disclosure can be applied.
[0055] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the attached drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be implemented in various different forms and is not limited to the embodiments described herein.
[0056] In describing embodiments of the present disclosure, detailed descriptions of known configurations or functions will be omitted if they are deemed to obscure the gist of the present disclosure. Furthermore, portions unrelated to the description of the present disclosure in the drawings have been omitted, and similar portions have been designated with similar reference numerals.
[0057] In the present disclosure, when a component is said to be "connected," "coupled," or "connected" to another component, this may include not only a direct connection, but also an indirect connection in which another component exists in between. Furthermore, when a component is said to "include" or "have" another component, unless otherwise specifically stated, this does not exclude the other component, but rather implies that the other component may be included.
[0058] In this disclosure, terms such as first, second, etc. are used solely to distinguish one component from another, and do not limit the order or importance of components unless specifically stated otherwise. Accordingly, within the scope of this disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly, a second component in one embodiment may be referred to as a first component in another embodiment.
[0059] In this disclosure, distinct components are used to clearly illustrate their respective characteristics, and do not necessarily imply that the components are separated. That is, multiple components may be integrated into a single hardware or software unit, or a single component may be distributed into multiple hardware or software units. Therefore, even if not specifically mentioned, such integrated or distributed embodiments are also included within the scope of this disclosure.
[0060] In the present disclosure, the components described in various embodiments are not necessarily essential components, and some may be optional components. Therefore, embodiments comprising a subset of the components described in one embodiment are also within the scope of the present disclosure. Furthermore, embodiments including other components in addition to the components described in various embodiments are also within the scope of the present disclosure.
[0061] The present disclosure relates to encoding and decoding of images, and terms used in the present disclosure may have their usual meanings commonly used in the technical field to which the present disclosure belongs, unless newly defined in the present disclosure.
[0062] In the present disclosure, “video” may mean a set of images over time.
[0063] In the present disclosure, a "picture" generally refers to a unit representing one image of a specific time period, and a slice / tile is a coding unit that constitutes a part of a picture, and a single picture may be composed of one or more slices / tiles. In addition, a slice / tile may include one or more coding tree units (CTUs).
[0064] In the present disclosure, "pixel" or "pel" may refer to the smallest unit that constitutes a picture (or image). Additionally, "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 luma component or only a pixel / pixel value of a chroma component.
[0065] In the present disclosure, a "unit" may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. In some cases, the term "unit" may be used interchangeably with terms such as "sample array," "block," or "area." In general, an MxN block may include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows.
[0066] In the present disclosure, the "current block" may mean one of the following: a "current coding block," a "current coding unit," a "block to be encoded," a "block to be decoded," or a "block to be processed." When prediction is performed, the "current block" may mean a "current prediction block" or a "block to be predicted." When transformation (inverse transformation) / quantization (inverse quantization) is performed, the "current block" may mean a "current transformation block" or a "block to be transformed." When filtering is performed, the "current block" may mean a "block to be filtered."
[0067] In the present disclosure, a "current block" may mean a block that includes both a luma component block and a chroma component block, or a "luma block of the current block," unless explicitly described as a chroma block. The luma component block of the current block may be explicitly expressed by including an explicit description of the luma component block, such as "luma block" or "current luma block." Additionally, the chroma component block of the current block may be explicitly expressed by including an explicit description of the chroma component block, such as "chroma block" or "current chroma block."
[0068] In this disclosure, " / " and "," can be interpreted as "and / or". For example, "A / B" and "A, B" can be interpreted as "A and / or B". Additionally, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."
[0069] In this disclosure, "or" may be interpreted as "and / or." For example, "A or B" may mean 1) "A" only, 2) "B" only, or 3) "A and B." Alternatively, "or" in this disclosure may mean "additionally or alternatively."
[0070] In this disclosure, "at least one of A, B, and C" may mean "only A," "only B," "only C," or "any and all combinations of A, B, and C." Additionally, "at least one of A, B, or C" or "at least one of A, B, and / or C" may mean "at least one of A, B, and C."
[0071] The parentheses used in this disclosure may mean "for example." For example, when "prediction (intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction." In other words, "prediction" in this disclosure is not limited to "intra-prediction," and "intra-prediction" may be suggested as an example of "prediction." Furthermore, even when "prediction (i.e., intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction."
[0072] Overview of Video Coding Systems
[0073] FIG. 1 is a diagram schematically illustrating a video coding system to which an embodiment according to the present disclosure can be applied.
[0074] A video coding system according to one embodiment may include an encoding device (10) and a decoding device (20). The encoding device (10) may transmit encoded video and / or image information or data to the decoding device (20) in the form of a file or streaming through a digital storage medium or a network.
[0075] An encoding device (10) according to one embodiment may include a video source generation unit (11), an encoding unit (12), and a transmission unit (13). A decoding device (20) according to one embodiment may include a reception unit (21), a decoding unit (22), and a rendering unit (23). The encoding unit (12) may be referred to as a video / image encoding unit, and the decoding unit (22) may be referred to as a video / image decoding unit. The transmission unit (13) may be included in the encoding unit (12). The reception unit (21) may be included in the decoding unit (22). The rendering unit (23) may include a display unit, and the display unit may be configured as a separate device or an external component.
[0076] The video source generation unit (11) can obtain video / images through a process of capturing, synthesizing, or generating video / images. The video source generation unit (11) can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive including previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced with a process of generating related data.
[0077] The encoding unit (12) can encode input video / images. The encoding unit (12) can perform a series of procedures such as prediction, transformation, and quantization to improve compression and encoding efficiency. The encoding unit (12) can output encoded data (encoded video / image information) in the form of a bitstream.
[0078] The transmission unit (13) can obtain encoded video / image information or data output in the form of a bitstream, and transmit it to the reception unit (21) of the decoding device (20) or another external object through a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit (13) may include an element for generating a media file through a predetermined file format, and may include an element for transmission through a broadcasting / communication network. The transmission unit (13) may be provided as a separate transmission device from the encoding unit (120), and in this case, the transmission device may include at least one processor for obtaining encoded video / image information or data output in the form of a bitstream, and a transmission unit for transmitting it in the form of a file or streaming. The reception unit (21) can extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit (22).
[0079] The decoding unit (22) can decode video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding unit (12).
[0080] The rendering unit (23) can render the decrypted video / image. The rendered video / image can be displayed through the display unit.
[0081] Overview of the video encoding device
[0082] FIG. 2 is a schematic diagram illustrating an image encoding device to which an embodiment according to the present disclosure can be applied.
[0083] As illustrated in FIG. 2, the image encoding device (100) may include an image segmentation unit (110), a subtraction unit (115), a transformation unit (120), a quantization unit (130), an inverse quantization unit (140), an inverse transformation unit (150), an addition unit (155), a filtering unit (160), a memory (170), an inter prediction unit (180), an intra prediction unit (185), and an entropy encoding unit (190). The inter prediction unit (180) and the intra prediction unit (185) may be collectively referred to as a “prediction unit.” The transformation unit (120), the quantization unit (130), the inverse quantization unit (140), and the inverse transformation unit (150) may be included in a residual processing unit. The residual processing unit may further include a subtraction unit (115).
[0084] All or at least some of the plurality of components constituting the video encoding device (100) may be implemented as a single hardware component (e.g., an encoder or a processor) according to an embodiment. In addition, the memory (170) may include a decoded picture buffer (DPB) and may be implemented by a digital storage medium.
[0085] The image segmentation unit (110) can segment an input image (or picture, frame) input to the image encoding device (100) into one or more processing units. For example, the processing unit may be called a coding unit (CU). The coding unit may be obtained by recursively segmenting a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / binary-tree / ternary-tree) structure. For example, one coding unit may be segmented into a plurality of coding units of deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. For segmenting the coding unit, the quad-tree structure may be applied first, and the binary-tree structure and / or the ternary-tree structure may be applied later. The coding procedure according to the present disclosure may be performed based on the final coding unit that is no longer segmented. The maximum coding unit can be used directly as the final coding unit, and the coding unit of the lower depth obtained by dividing the maximum coding unit can be used as the final concatenated unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or restoration described below. As another example, the processing unit of the coding procedure may be a prediction unit (PU) or a transformation unit (TU). The prediction unit and the transformation unit may each be divided or partitioned from the final coding unit. The prediction unit may be a unit of sample prediction, and the transformation unit may be a unit that derives a transform coefficient and / or a unit that derives a residual signal from a transform coefficient.
[0086] The prediction unit (inter-prediction unit (180) or intra-prediction unit (185)) can perform prediction on a block to be processed (current block) and generate a predicted block including prediction samples for the current block. The prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block or CU unit. The prediction unit can generate various information regarding the prediction of the current block and transmit the information to the entropy encoding unit (190). The information regarding the prediction can be encoded by the entropy encoding unit (190) and output in the form of a bitstream.
[0087] The intra prediction unit (185) can predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from it, depending on the intra prediction mode and / or intra prediction technique. The intra prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, a DC mode and a planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes, depending on the degree of detail in the prediction direction. However, this is merely an example, and a greater or lesser number of directional prediction modes may be used depending on the settings. The intra prediction unit (185) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.
[0088] The inter prediction unit (180) can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include information on the inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring block can include a spatial neighboring block existing in the current picture and a temporal neighboring block existing 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 from each other. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), etc. A reference picture including the above temporal neighboring blocks may be called a collocated picture (colPic). For example, the inter prediction unit (180) may construct a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit (180) may use the motion information of neighboring blocks as the motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the motion vector prediction (MVP) mode, the motion vector of the current block can be signaled by using the motion vector of the surrounding blocks as the motion vector predictor and encoding the motion vector difference and an indicator for the motion vector predictor. The motion vector difference can mean the difference between the motion vector of the current block and the motion vector predictor.
[0089] The prediction unit can generate a prediction signal based on various prediction methods and / or prediction techniques described below. For example, the prediction unit can apply intra prediction or inter prediction to predict the current block, and can also apply intra prediction and inter prediction simultaneously. A prediction method that simultaneously applies intra prediction and inter prediction to predict the current block may be called combined inter and intra prediction (CIIP). In addition, the prediction unit may perform intra block copy (IBC) to predict the current block. Intra block copy can be used for video / image coding of content such as games, such as screen content coding (SCC). IBC is a method of predicting the current block using a previously restored reference block within the current picture located at a predetermined distance from the current block. When IBC is applied, the location of the reference block within the current picture can be encoded as a vector (block vector) corresponding to the predetermined distance. IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives reference blocks within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in the present disclosure.
[0090] The prediction signal generated through the prediction unit can be used to generate a restoration signal or a residual signal. The subtraction unit (115) can generate a residual signal (residual block, residual sample array) by subtracting the prediction signal (predicted block, predicted sample array) output from the prediction unit from the input image signal (original block, original sample array). The generated residual signal can be transmitted to the conversion unit (120).
[0091] The transform unit (120) can apply a transform technique to the residual signal to generate transform coefficients. For example, the transform technique can include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-linear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the 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. The transform process can be applied to a pixel block having a square equal size, or can be applied to a block of a non-square variable size.
[0092] The quantization unit (130) can quantize the transform coefficients and transmit them to the entropy encoding unit (190). The entropy encoding unit (190) can encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream. The information about the quantized transform coefficients can be called residual information. The quantization unit (130) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and can also generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.
[0093] The entropy encoding unit (190) can perform various encoding methods, such as, for example, exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoding unit (190) can also encode, together or separately, information necessary for video / image restoration (e.g., values of syntax elements) in addition to quantized transform coefficients. The encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in the form of a network abstraction layer (NAL) unit. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The signaling information, transmitted information and / or syntax elements mentioned in the present disclosure may be encoded through the encoding procedure described above and included in the bitstream.
[0094] The above bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmission unit (not shown) for transmitting the signal output from the entropy encoding unit (190) and / or a storage unit (not shown) for storing the signal may be provided as an internal / external element of the video encoding device (100), or the transmission unit may be provided as a component of the entropy encoding unit (190).
[0095] The quantized transform coefficients output from the quantization unit (130) can be used to generate a residual signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (140) and inverse transformation unit (150), a residual signal (residual block or residual samples) can be restored.
[0096] The addition unit (155) can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit (180) or the intra prediction unit (185). When there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the reconstructed block. The addition unit (155) can be called a reconstructor or a reconstructed block generation unit. The generated reconstructed signal can be used for intra prediction of the next block to be processed within the current picture, and can also be used for inter prediction of the next picture after filtering as described below.
[0097] Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture encoding and / or restoration process.
[0098] The filtering unit (160) can improve subjective / objective picture quality by applying filtering to the restoration signal. For example, the filtering unit (160) can apply various filtering methods to the restoration picture to generate a modified restoration picture, and store the modified restoration picture in the memory (170), specifically, in the DPB of the memory (170). The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (160) can generate various information regarding filtering and transmit the information to the entropy encoding unit (190), as described later in the description of each filtering method. The information regarding filtering may be encoded by the entropy encoding unit (190) and output in the form of a bitstream.
[0099] The modified restored picture transmitted to the memory (170) can be used as a reference picture in the inter prediction unit (180). Through this, when inter prediction is applied, the image encoding device (100) can avoid prediction mismatch between the image encoding device (100) and the image decoding device, and can also improve encoding efficiency.
[0100] The DPB in the memory (170) can store a modified reconstructed picture to be used as a reference picture in the inter prediction unit (180). The memory (170) can store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of blocks in a picture that has already been reconstructed. The stored motion information can be transferred to the inter prediction unit (180) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (170) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (185).
[0101] Video Decryption Device Overview
[0102] FIG. 3 is a schematic diagram illustrating an image decoding device to which an embodiment according to the present disclosure can be applied.
[0103] As illustrated in FIG. 3, the image decoding device (200) may be configured to include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an addition unit (235), a filtering unit (240), a memory (250), an inter prediction unit (260), and an intra prediction unit (265). The inter prediction unit (260) and the intra prediction unit (265) may be collectively referred to as a “prediction unit.” The inverse quantization unit (220) and the inverse transformation unit (230) may be included in a residual processing unit.
[0104] All or at least some of the plurality of components constituting the video decoding device (200) may be implemented as a single hardware component (e.g., a decoder or processor) depending on the embodiment. In addition, the memory (170) may include a DPB and may be implemented by a digital storage medium.
[0105] The video decoding device (200) that receives a bitstream including video / image information can restore the image by performing a process corresponding to the process performed in the video encoding device (100) of FIG. 2. For example, the video decoding device (200) can perform decoding using a processing unit applied in the video encoding device. Therefore, the processing unit for decoding may be, for example, a coding unit. The coding unit may be a coding tree unit or may be obtained by dividing a maximum coding unit. In addition, the restored image signal decoded and output by the video decoding device (200) can be reproduced through a reproduction device (not shown).
[0106] The video decoding device (200) can receive a signal output from the video encoding device of FIG. 2 in the form of a bitstream. The received signal can be decoded through the entropy decoding unit (210). For example, the entropy decoding unit (210) can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The video decoding device may additionally use information on the parameter set and / or the general constraint information to decode the image. The signaling information, received information, and / or syntax elements mentioned in the present disclosure can be obtained from the bitstream by being decoded through the decoding procedure. For example, the entropy decoding unit (210) can decode information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of syntax elements required for image restoration and the quantized values of transform coefficients for residuals. More specifically, the CABAC entropy decoding method receives a bin corresponding to each syntax element in the bitstream, determines a context model using information of the syntax element to be decoded and the decoding information of the surrounding block and the decoding target block or the information of the symbol / bin decoded in the previous step, and predicts the occurrence probability of the bin according to the determined context model to perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element.At this time, the CABAC entropy decoding method can update the context model using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information regarding prediction among the information decoded by the entropy decoding unit (210) is provided to the prediction unit (inter prediction unit (260) and intra prediction unit (265)), and the residual value on which entropy decoding is performed by the entropy decoding unit (210), i.e., quantized transform coefficients and related parameter information, can be input to the inverse quantization unit (220). In addition, information regarding filtering among the information decoded by the entropy decoding unit (210) can be provided to the filtering unit (240). Meanwhile, a receiving unit (not shown) that receives a signal output from an image encoding device may be additionally provided as an internal / external element of the image decoding device (200), or the receiving unit may be provided as a component of an entropy decoding unit (210).
[0107] Meanwhile, the video decoding device according to the present disclosure may be referred to as a video / video / picture decoding device. The video decoding device may include an information decoder (video / video / picture information decoder) and / or a sample decoder (video / video / picture sample decoder). The information decoder may include an entropy decoding unit (210), and the sample decoder may include at least one of an inverse quantization unit (220), an inverse transformation unit (230), an addition unit (235), a filtering unit (240), a memory (250), an inter prediction unit (260), and an intra prediction unit (265).
[0108] The inverse quantization unit (220) can inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit (220) can rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scanning order performed in the image encoding device. The inverse quantization unit (220) can perform inverse quantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain transform coefficients.
[0109] In the inverse transform unit (230), the transform coefficients can be inversely transformed to obtain a residual signal (residual block, residual sample array).
[0110] The prediction unit can perform a prediction on the current block and generate a predicted block containing prediction samples for the current block. The prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block based on the prediction information output from the entropy decoding unit (210), and can determine a specific intra / inter-prediction mode (prediction technique).
[0111] The fact that the prediction unit can generate a prediction signal based on various prediction methods (techniques) described below is the same as that mentioned in the description of the prediction unit of the image encoding device (100).
[0112] The intra prediction unit (265) can predict the current block by referring to samples within the current picture. The description of the intra prediction unit (185) can be equally applied to the intra prediction unit (265).
[0113] The inter prediction unit (260) can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include information on the inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit (260) can construct a motion information candidate list based on the neighboring blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction can be performed based on various prediction modes (techniques), and the information about the prediction can include information indicating the mode (technique) of inter prediction for the current block.
[0114] The addition unit (235) can generate a restoration signal (restored picture, restoration block, restoration sample array) by adding the acquired residual signal to the prediction signal (predicted block, prediction sample array) output from the prediction unit (including the inter prediction unit (260) and / or the intra prediction unit (265)). When there is no residual for the block to be processed, such as when the skip mode is applied, the predicted block can be used as the restoration block. The description of the addition unit (155) can be equally applied to the addition unit (235). The addition unit (235) can be called a restoration unit or a restoration block generation unit. The generated restoration signal can be used for intra prediction of the next block to be processed within the current picture, and can also be used for inter prediction of the next picture after going through filtering as described below.
[0115] The filtering unit (240) can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit (240) can apply various filtering methods to the restored picture to generate a modified restored picture, and store the modified restored picture in the memory (250), specifically, in the DPB of the memory (250). The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.
[0116] The (modified) reconstructed picture stored in the DPB of the memory (250) can be used as a reference picture in the inter prediction unit (260). The memory (250) can store motion information of a block from which motion information is derived (or decoded) within the current picture and / or motion information of blocks within a picture that has already been reconstructed. The stored motion information can be transferred to the inter prediction unit (260) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (250) can store reconstructed samples of reconstructed blocks within the current picture and transfer them to the intra prediction unit (265).
[0117] In this specification, the embodiments described in the filtering unit (160), the inter prediction unit (180), and the intra prediction unit (185) of the image encoding device (100) can be applied to the filtering unit (240), the inter prediction unit (260), and the intra prediction unit (265) of the image decoding device (200) in the same or corresponding manner, respectively.
[0118] Overview of Intra Prediction
[0119] Hereinafter, intra prediction according to the present disclosure is described.
[0120] Intra prediction may refer to a prediction that generates prediction samples for a current block based on reference samples within a picture to which the current block belongs (hereinafter, referred to as the current picture). When intra prediction is applied to a current block, neighboring reference samples to be used for intra prediction of the current block may be derived. The neighboring reference samples of the current block may include a sample adjacent to the left boundary of the current block of a size nWxnH and a total of 2xnH samples adjacent to the bottom-left, a sample adjacent to the top boundary of the current block and a total of 2xnW samples adjacent to the top-right, and one sample adjacent to the top-left of the current block. Alternatively, the neighboring reference samples of the current block may include upper neighboring samples of multiple columns and left neighboring samples of multiple rows. Additionally, the surrounding reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nWxnH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.
[0121] However, some of the surrounding reference samples of the current block may not yet be decoded or available. In this case, the decoder can construct the surrounding reference samples to be used for prediction by substituting the unavailable samples with available samples. Alternatively, the decoder can construct the surrounding reference samples to be used for prediction by interpolating the available samples.
[0122] When neighboring reference samples are derived, (i) a prediction sample can be derived based on an average or interpolation of neighboring reference samples of the current block, and (ii) the prediction sample can be derived based on a reference sample existing in a specific (prediction) direction with respect to the prediction sample among the neighboring reference samples of the current block. The case of (i) can be called a non-directional mode or a non-angular mode, and the case of (ii) can be called a directional mode or an angular mode.
[0123] In addition, the prediction sample may be generated through interpolation between a first surrounding sample located in the prediction direction of the intra prediction mode of the current block and a second surrounding sample located in the opposite direction based on the prediction target sample of the current block among the surrounding reference samples. The above-described case may be referred to as linear interpolation intra prediction (LIP).
[0124] Additionally, chroma prediction samples can be generated based on luma samples using a linear model. This case may be called LM (Linear Model) mode.
[0125] In addition, a temporary prediction sample of the current block may be derived based on filtered peripheral reference samples, and a prediction sample of the current block may be derived by weighting at least one reference sample derived according to the intra prediction mode among the existing peripheral reference samples, i.e., unfiltered peripheral reference samples, with the temporary prediction sample. This case may be called PDPC (Position dependent intra prediction).
[0126] In addition, a reference sample line with the highest prediction accuracy among the surrounding multiple reference sample lines of the current block can be selected, and a prediction sample can be derived using the reference samples located in the prediction direction of the selected line. At this time, information about the used reference sample line (e.g., intra_luma_ref_idx) can be encoded and signaled in the bitstream. This case may be called multi-reference line intra prediction (MRL) or MRL-based intra prediction. If MRL is not applied, reference samples can be derived from reference sample lines directly adjacent to the current block, and in this case, information about the reference sample line may not be signaled.
[0127] In addition, the current block can be divided into vertical or horizontal subpartitions, and intra prediction can be performed based on the same intra prediction mode for each subpartition. At this time, surrounding reference samples for intra prediction can be derived for each subpartition unit. That is, the reconstructed sample of the previous subpartition in the encoding / decoding order can be used as the surrounding reference sample of the current subpartition. In this case, the intra prediction mode for the current block is applied equally to the subpartitions, and by deriving and using surrounding reference samples for each subpartition unit, the intra prediction performance can be improved in some cases. This prediction method can be called intra sub-partitions (ISP) or ISP-based intra prediction.
[0128] The intra prediction techniques described above may be referred to by various terms, such as intra prediction types or additional intra prediction modes, to distinguish them from directional or non-directional intra prediction modes. For example, the intra prediction technique (intra prediction type or additional intra prediction mode, etc.) may include at least one of the above-described LIP, LM, PDPC, MRL, and ISP. A general intra prediction method excluding specific intra prediction types such as the above-described LIP, LM, PDPC, MRL, and ISP may be referred to as a normal intra prediction type. The normal intra prediction type may be generally applied when the above-described specific intra prediction types are not applied, and prediction may be performed based on the above-described intra prediction mode. Meanwhile, post-processing filtering may be performed on the derived prediction samples, if necessary.
[0129] Specifically, the intra prediction procedure may include an intra prediction mode / type determination step, a surrounding reference sample derivation step, and an intra prediction mode / type-based prediction sample derivation step. Additionally, a post-processing filtering step may be performed on the derived prediction samples, if necessary.
[0130] Meanwhile, in addition to the intra prediction types described above, affine linear weighted intra prediction (ALWIP) may be used. The ALWIP may also be called linear weighted intra prediction (LWIP) or matrix weighted intra prediction (MIP or matrix based intra prediction). When the MIP is applied to the current block, prediction samples for the current block may be derived by i) performing a matrix-vector-multiplication procedure using surrounding reference samples on which an averaging procedure has been performed, ii) further performing a horizontal / vertical interpolation procedure as necessary. The intra prediction modes used for the MIP may be configured differently from the intra prediction modes used in the LIP, PDPC, MRL, ISP intra prediction, or normal intra prediction described above. The intra prediction mode for the MIP may be called a MIP intra prediction mode, a MIP prediction mode, or a MIP mode. For example, the metrics and offsets used in the matrix vector multiplication may be set differently depending on the intra prediction mode for the MIP. Here, the metrics may be referred to as (MIP) weight metrics, and the offset may be referred to as (MIP) offset vectors or (MIP) bias vectors. A specific MIP method will be described later.
[0131] The block restoration procedure based on intra prediction and the intra prediction unit within the encoding device are described below with reference to FIGS. 4 and 5.
[0132] Figure 4 is a flowchart illustrating an intra prediction-based video / image encoding method.
[0133] The encoding method of FIG. 4 can be performed by the video encoding device of FIG. 2. Specifically, step S410 can be performed by the intra prediction unit (185), and step S420 can be performed by the residual processing unit. Specifically, step S420 can be performed by the subtraction unit (115). Step S430 can be performed by the entropy encoding unit (190). The prediction information of step S430 is derived by the intra prediction unit (185), and the residual information of step S430 can be derived by the residual processing unit. The residual information is information about the residual samples. The residual information can include information about quantized transform coefficients for the residual samples. As described above, the residual samples are derived as transform coefficients through the transform unit (120) of the image encoding device, and the transform coefficients can be derived as quantized transform coefficients through the quantization unit (130). Information about the quantized transform coefficients can be encoded in the entropy encoding unit (190) through a residual coding procedure.
[0134] An image encoding device can perform intra prediction on a current block (S410). The image encoding device can determine an intra prediction mode / type for the current block, derive peripheral reference samples of the current block, and then generate prediction samples within the current block based on the intra prediction mode / type and the peripheral reference samples. Here, the procedures of determining the intra prediction mode / type, deriving peripheral reference samples, and generating prediction samples may be performed simultaneously, or one procedure may be performed before the other.
[0135] FIG. 5 is a diagram exemplarily illustrating the configuration of an intra prediction unit (185) according to the present disclosure.
[0136] As illustrated in FIG. 5, the intra prediction unit (185) of the video encoding device may include an intra prediction mode / type determination unit (186), a reference sample derivation unit (187), and / or a prediction sample derivation unit (188). The intra prediction mode / type determination unit (186) may determine an intra prediction mode / type for the current block. The reference sample derivation unit (187) may derive surrounding reference samples of the current block. The prediction sample derivation unit (188) may derive prediction samples of the current block. Meanwhile, although not illustrated, when a prediction sample filtering procedure described below is performed, the intra prediction unit (185) may further include a prediction sample filtering unit (not illustrated).
[0137] The video encoding device can determine a mode / type to be applied to the current block among a plurality of intra prediction modes / types. The video encoding device can compare rate distortion costs (RD costs) for the intra prediction modes / types and determine an optimal intra prediction mode / type for the current block.
[0138] Meanwhile, the video encoding device may also perform a predictive sample filtering procedure. Predictive sample filtering may be referred to as post-filtering. Some or all of the predictive samples may be filtered through the predictive sample filtering procedure. In some cases, the predictive sample filtering procedure may be omitted.
[0139] Referring again to FIG. 4, the video encoding device can generate residual samples for the current block based on the predicted samples or the filtered predicted samples (S420). The video encoding device can derive the residual samples by subtracting the predicted samples from the original samples of the current block. In other words, the video encoding device can derive the residual sample value by subtracting the corresponding predicted sample value from the original sample value.
[0140] The video encoding device can encode video information including information about the intra prediction (prediction information) and residual information about the residual samples (S430). The prediction information can include the intra prediction mode information and / or the intra prediction technique information. The video encoding device can output the encoded video information in the form of a bitstream. The output bitstream can be transmitted to the video decoding device via a storage medium or a network.
[0141] The residual information may include the residual coding syntax described below. The video encoding device may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information about the quantized transform coefficients.
[0142] Meanwhile, as described above, the video encoding device can generate a restored picture (including restored samples and restored blocks). To this end, the video encoding device can inversely quantize / inversely transform the quantized transform coefficients to derive (corrected) residual samples. The reason for performing inverse quantization / inverse transformation on the residual samples after transforming / quantizing them in this way is to derive residual samples that are identical to the residual samples derived from the video decoding device. The video encoding device can generate a restored block including restored samples for the current block based on the predicted samples and the (corrected) residual samples. A restored picture for the current picture can be generated based on the restored block. As described above, an in-loop filtering procedure, etc. can be further applied to the restored picture.
[0143] Fig. 6 is a flowchart illustrating an intra prediction-based video / image decoding method.
[0144] The image decoding device can perform an operation corresponding to an operation performed by the image encoding device.
[0145] The decoding method of FIG. 6 can be performed by the image decoding device of FIG. 3. Steps S610 to S630 can be performed by the intra prediction unit (265), and the prediction information of step S610 and the residual information of step S640 can be obtained from the bitstream by the entropy decoding unit (210). The residual processing unit of the image decoding device can derive residual samples for the current block based on the residual information (S640). Specifically, the inverse quantization unit (220) of the residual processing unit can derive transform coefficients by performing inverse quantization based on the quantized transform coefficients derived based on the residual information, and the inverse transform unit (230) of the residual processing unit can derive residual samples for the current block by performing inverse transformation on the transform coefficients. Step S650 can be performed by the addition unit (235) or the restoration unit.
[0146] Specifically, the video decoding device can derive an intra prediction mode / type for the current block based on the received prediction information (intra prediction mode / type information) (S610). In addition, the video decoding device can derive surrounding reference samples of the current block (S620). The video decoding device can generate prediction samples within the current block based on the intra prediction mode / type and the surrounding reference samples (S630). In this case, the video decoding device can perform a prediction sample filtering procedure. The prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.
[0147] The video decoding device can generate residual samples for the current block based on the received residual information (S640). The video decoding device can generate reconstructed samples for the current block based on the prediction samples and the residual samples, and derive a reconstructed block including the reconstructed samples (S650). A reconstructed picture for the current picture can be generated based on the reconstructed block. As described above, an in-loop filtering procedure, etc. can be further applied to the reconstructed picture.
[0148] FIG. 7 is a diagram exemplarily illustrating the configuration of an intra prediction unit (265) according to the present disclosure.
[0149] As illustrated in FIG. 7, the intra prediction unit (265) of the video decoding apparatus may include an intra prediction mode / type determination unit (266), a reference sample derivation unit (267), and a prediction sample derivation unit (268). The intra prediction mode / type determination unit (266) determines the intra prediction mode / type for the current block based on intra prediction mode / type information generated and signaled by the intra prediction mode / type determination unit (186) of the video encoding apparatus, and the reference sample derivation unit (266) may derive surrounding reference samples of the current block from a reconstructed reference region within the current picture. The prediction sample derivation unit (268) may derive prediction samples of the current block. Meanwhile, although not illustrated, when the above-described prediction sample filtering procedure is performed, the intra prediction unit (265) may further include a prediction sample filtering unit (not illustrated).
[0150] The intra prediction mode information may include flag information (e.g., intra_luma_mpm_flag) indicating, for example, whether the most probable mode (MPM) or the remaining mode is applied to the current block, and when the MPM is applied to the current block, the intra prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be configured as an MPM candidate list or an MPM list. In addition, when the MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The image decoding device may determine the intra prediction mode of the current block based on the intra prediction mode information.
[0151] In addition, the intra prediction technique information may be implemented in various forms. For example, the intra prediction technique information may include intra prediction technique index information indicating one of the intra prediction techniques. As another example, the intra prediction technique information may include at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if so, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating a split type of subpartitions if the ISP is applied, flag information indicating whether PDPC is applied, or flag information indicating whether LIP is applied. In addition, the intra prediction type information may include a MIP flag indicating whether MIP is applied to the current block. In the present disclosure, the ISP flag information may be referred to as an ISP application indicator.
[0152] The intra prediction mode information and / or the intra prediction technique information may be encoded / decoded using the coding method described in the present disclosure. For example, the intra prediction mode information and / or the intra prediction technique information may be encoded / decoded using entropy coding (e.g., CABAC, CAVLC) based on a truncated (rice) binary code.
[0153] Meanwhile, the intra prediction mode may further include a CCLM (cross-component linear model) mode for chroma samples in addition to the PLANAR mode, DC mode, and directional intra prediction modes. The CCLM mode may be divided into L_CCLM, T_CCLM, and LT_CCLM depending on whether left samples, upper samples, or both are considered for deriving CCLM parameters, and may only be applied to chroma components.
[0154] Intra prediction modes can be indexed, for example, as shown in Table 1 below.
[0155]
[0156] Meanwhile, the intra prediction type (or additional intra prediction mode, etc.) may include at least one of the above-described LIP, PDPC, MRL, ISP, and MIP. The intra prediction type may be indicated based on intra prediction type information, and the intra prediction type information may be implemented in various forms. For example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if so, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating a split type of subpartitions if the ISP is applied, flag information indicating whether PDCP is applied, or flag information indicating whether LIP is applied. Additionally, the intra prediction type information may include a MIP flag (or may be called intra_mip_flag) indicating whether MIP is applied to the current block.
[0157] Overview of TIMD (Template-based intra mode derivation)
[0158] FIG. 8 is a diagram illustrating a template region used in the TIMD mode according to the present disclosure. For the intra prediction mode (IPM) of adjacent intra blocks and inter blocks in the surrounding area, as shown in FIG. 8, the SATD (sum of absolute transformed differences) between the predicted block predicted from the template region and the actual restored sample is calculated, and then the mode with the smallest SATD can be selected as the intra mode of the current block.
[0159] That is, the first two intra prediction modes with the minimum SATD are selected as the TIMD modes. These two TIMD modes are fused with weights, and this weighted intra prediction is used to encode the current CU. Position-dependent intra prediction combination (PDPC) can be included in the derivation of the TIMD mode.
[0160] The costs of the two selected modes are compared with a threshold, and the two cost factors are applied in the test as follows.
[0161] costMode2 < 2*costMode1
[0162] If the above conditions are true, fusion is applied, otherwise only mode 1 is used.
[0163] The weights of the modes are calculated by their SATD costs as follows:
[0164] weight1 = costMode2 / (costMode1+ costMode2)
[0165] weight2 = 1 - weight1
[0166] Template matching(TM)
[0167] FIG. 9 is a diagram for explaining a template matching-based encoding / decoding method according to the present disclosure.
[0168] Template Matching (TM) is a motion vector derivation method performed at the decoder stage. It is a method that can refine the motion information of the current block by finding a template (hereinafter referred to as a “reference template”) within a reference picture that is most similar to a template (hereinafter referred to as a “current template”) adjacent to the current block (e.g., current coding unit, current CU). The current template may be an upper neighboring block and / or a left neighboring block of the current block, or a part of these neighboring blocks. In addition, the reference template may be determined to have the same size as the current template.
[0169] As illustrated in Fig. 9, once the initial motion vector of the current block is derived, a search for a better motion vector can be performed in a surrounding area of the initial motion vector. For example, the range of the surrounding area where the search is performed can be within a [-8, +8]-pel search area centered on the initial motion vector. In addition, the size of the search step for performing the search can be determined based on the AMVR mode of the current block. In addition, template matching can also be performed continuously with the bilateral matching process in merge mode.
[0170] If the prediction mode of the current block is AMVP mode, a motion vector predictor candidate (MVP candidate) may be determined based on a template matching error. For example, a motion vector predictor candidate (MVP candidate) that minimizes the error between the current template and a reference template may be selected. Thereafter, template matching for improving a motion vector may be performed on the selected motion vector predictor candidate. At this time, template matching for improving a motion vector may not be performed on motion vector predictor candidates that are not selected.
[0171] More specifically, the improvement of the selected motion vector predictor candidate can be started from full-pel accuracy within the [-8, +8]-pel search region using an iterative diamond search. Alternatively, it can be started from 4-pel accuracy in the case of 4-pel AMVR mode. This can be followed by a search for half-pel and / or quarter-pel accuracy depending on the AMVR mode. According to the search process, the motion vector predictor candidate can maintain the same motion vector accuracy as indicated by the AMVR mode even after the template matching process. In the iterative search process, the search process is terminated if the difference between the previous minimum cost and the current minimum cost is less than an arbitrary threshold. The threshold can be equal to the area of the block, i.e., the number of samples in the block. Table 2 shows examples of search patterns according to the AMVR mode and the merge mode accompanied by AMVR.
[0172]
[0173] If the prediction mode of the current block is merge mode, a similar search method can be applied to the merge candidate indicated by the merge index. As shown in Table 2 above, template matching can be performed up to 1 / 8-pel accuracy or can skip half-pel accuracy or lower, which can be determined depending on whether an alternative interpolation filter is used according to merge motion information. In this case, the alternative interpolation filter can be a filter used when AMVR is in half-pel mode. In addition, if template matching is available, depending on whether bilateral matching (BM) is available, the template matching can operate as an independent process, or can operate as an additional motion vector improvement process between block-based bilateral matching and sub-block-based bilateral matching. The availability of template matching and / or the availability of bilateral matching can be determined based on an availability condition check. The accuracy of the motion vector as described above can refer to the accuracy of the motion vector difference (MVD).
[0174] Overview of intra template matching prediction (intraTMP)
[0175] Intra Template Matching Prediction (IntraTMP) may be a special intra prediction mode that copies an optimal prediction block having an L-shaped template matching the template region of the current block from a reconstructed portion of the current picture. For a predefined search range, the video encoding device (100) may search for a template most similar to the template region of the current block within the reconstructed portion of the current picture, and may use the corresponding block as a prediction block. Then, the video encoding device (100) may signal information indicating the use of the IntraTMP mode, and the video decoding device (200) may perform the same prediction operation through the signaled information.
[0176] FIG. 10 is a diagram illustrating a search area used for intra-template matching prediction (intraTMP) according to one embodiment of the present disclosure. A prediction block can be generated by matching the L-shaped causal neighbors of a current block with other blocks within four predefined search areas illustrated in FIG. 8. The four predefined search areas can be R1 (1010), R2 (1020), R3 (1030), and R4 (1040), as defined below.
[0177] - R1(1010): Current CTU
[0178] - R2(1020): Top left CTU
[0179] - R3(1030): Top CTU
[0180] - R4(1040): Left CTU
[0181] SAD (Sum of Absolute Differences) can be used as a cost function. Within each region, the image decoding device (200) can search for a template having the minimum SAD with respect to the template region of the current block, and use the corresponding block of the searched template as a prediction block.
[0182] The dimensions of all regions (SearchRange_w, SearchRange_h) can be set to be proportional to the block dimensions (BlkW, BlkH) to have a fixed number of SAD comparisons per pixel, as in Equation 1 below.
[0183]
[0184] In Equation 1, a can be a constant that controls the gain / complexity trade-off. For example, a can be 5.
[0185] To speed up the template matching process, the search range of all search regions can be subsampled by a factor of 2. This leads to a reduction in the template matching search by 4. After finding the optimal matching region, a refinement process can be performed. The refinement process can be performed by performing a second template matching search around the optimal matching region with the reduced range. Here, the reduced range can be defined as min(BlkW, BlkH) / 2.
[0186] The intra-template matching tool can be used for CUs with width and height sizes of 64 or less. The maximum CU size for intra-template matching can be configured. That is, the maximum CU size for intra-template matching can be set arbitrarily. Additionally, the intra-template matching prediction mode can be signaled at the CU level via a dedicated flag when the decoder-side intra-mode derivation (DIMD) mode is not used for the current CU.
[0187] Derivation of intraTMP block vector candidates for IBC (intra block copy) mode
[0188] Block vectors derived in IntraTMP mode can be used in IBC mode. Similarly to IBC block vectors, the stored intraTMP block vectors of neighboring blocks can be used as spatial block vector candidates for the IBC candidate list. That is, the intraTMP block vectors stored in neighboring blocks can be included in the block vector candidate list.
[0189] FIG. 11 is a diagram illustrating a method for deriving an intraTMP block vector in an IBC mode according to one embodiment of the present disclosure. An intraTMP block vector, which is a block vector candidate, can be stored in an IBC block vector buffer, and as shown in FIG. 11, a current IBC block (1110) can use both the IBC block vector and the intraTMP block vector (1130) of a neighboring block (1120) as block vector candidates for an IBC block vector candidate list. That is, the IBC block vector candidate list can include both the IBC block vector and the intraTMP block vector (1130) of a neighboring block.
[0190] Hereinafter, a video encoding / decoding method according to one embodiment of the present disclosure will be described in detail.
[0191] Example 1
[0192] Embodiments of the present disclosure propose an intraTMP merge mode for efficient prediction using intraTMP mode and efficient signaling of information used in intraTMP mode. The intraTMP mode can use the template region of a current block to find a previously reconstructed block similar to the current block and use this to generate a predicted block. However, if the similarity between the current block and its template region is low, prediction performance may deteriorate. Therefore, the present disclosure proposes a method for improving prediction performance by utilizing information from previously reconstructed blocks coded in intraTMP mode.
[0193] FIG. 12 is a prediction flowchart utilizing the intraTMP merge mode according to one embodiment of the present disclosure. Referring to FIG. 12, the image decoding device (200) can obtain the intraTMP merge flag (S1210). That is, the image decoding device (200) can obtain the intraTMP merge flag from the bitstream. The image decoding device (200) can perform the intraTMP merge mode when the value of the intraTMPmerge flag is the second value (e.g., 1).
[0194] The video decoding device (200) can construct an intraTMP merge candidate list (S1230). If previously restored blocks are predicted using the intraTMP mode, the video decoding device (200) can construct an intraTMP merge candidate list using intraTMP-related information of the previously restored blocks. The candidates constituting the intraTMP merge candidate list can be used when performing prediction on the current block.
[0195] The video decoding device (200) can rearrange the intraTMP merge candidate list (S1250). Specifically, the video decoding device (200) can obtain an error between the template region of the current block (current template) and the template region of the reference block (reference template). Here, the reference block may be a block coded with an intraTMP mode used to construct the intraTMP merge candidate list. That is, the video decoding device (200) can obtain an error of the intraTMP modes constructed in the intraTMP merge candidate list. The video decoding device (200) can rearrange the intraTMP merge candidate list based on the error value. For example, the video decoding device (200) can rearrange the intraTMP merge candidate list in order of smallest error value. Alternatively, the video decoding device (200) can rearrange the intraTMP merge candidate list in order of largest error value.
[0196] The error for reordering the intraTMP merge candidate list can be calculated using methods such as SAD (Sum of absolute difference), SATD (Sum of transformed difference), SSE (Sum of squared error), MR-SAD (Mean-removed sum of difference), MR-SSE (Mean-removed sum of squared error), and MR-SATD (Mean-removed sum of transformed difference).
[0197] The video decoding device (200) can obtain a candidate index (S1270). Specifically, the video decoding device (200) can obtain the candidate index determined by the video encoding device (100). Accordingly, the video decoding device (200) can generate a prediction block of the current block using the mode indicated by the obtained candidate index.
[0198] Alternatively, the video decoding device (200) may generate a prediction block of the current block using a single candidate agreed upon between the video encoding device (100) and the video decoding device (200) without obtaining a candidate index. For example, the video encoding device (100) and the video decoding device (200) may agree to use the first candidate in the rearranged candidate list. Alternatively, the video encoding device (100) and the video decoding device (200) may agree to use the Nth candidate in the rearranged candidate list. Here, N may be a natural number.
[0199] Meanwhile, the intraTMP merge mode according to the present disclosure may include a mode for generating a prediction block through various methods. For example, the intraTMP merge mode according to the present disclosure may include a mode for weighted-summing multiple blocks. Alternatively, the intraTMP merge mode according to the present disclosure may include a mode for finding a block through a sub-pel search. Alternatively, the intraTMP merge mode according to the present disclosure may include a mode for weighted-summing a prediction block predicted by a general intra mode and a prediction block predicted by an intraTMP mode. Here, the general intra mode may be any intra prediction method except the intraTMP merge mode according to the present disclosure.
[0200] Although the descriptions regarding the above-described FIG. 12 are based on the image decoding device (200), the corresponding process can also be performed in the image encoding device (100).
[0201] The intraTMP mode according to the present disclosure may include a default mode, a filtered mode, an intrafusion mode, an error value-based fusion mode, a fixed value-based fusion mode, and a filter-based fusion mode. Hereinafter, various intraTMP modes will be described in detail.
[0202] The default mode according to the present disclosure may be a mode in which the reference block at the position with the smallest error between the template region of the current block and the template region of the reference block is used as the prediction block of the current block. Alternatively, the default mode according to the present disclosure may be a mode in which a list of block vector candidates is constructed in descending order of the error between the template region of the current block and the template region of the reference block, and then the reference block at the position indicated by the block vector selected by the signaled index is used as the prediction block of the current block.
[0203] Alternatively, the default mode according to the present disclosure may be a mode in which, as illustrated in FIG. 13, an additional search process is performed for sub-pel positions such as 1 / 4-pel, half-pel, and 3 / 4-pel, and a reference block at a position with the smallest error between the template region of the current block and the template region of the reference block is used as a prediction block of the current block. Alternatively, the default mode according to the present disclosure may be a mode in which, as illustrated in FIG. 13, a reference block at a sub-pel position indicated by additional signaling for candidates for sub-pel positions such as 1 / 4-pel, half-pel, and 3 / 4-pel is used as a prediction block of the current block.
[0204] The filtered mode according to the present disclosure may be a mode in which a filter model is created using the relationship between the template region of the current block and the template region of the reference block, and then the filter model is applied to the reference block, thereby making the filtered reference block a predicted block of the current block. Here, the reference block may be a block in the same position as in the default mode.
[0205] In order to calculate the filter model, the image decoding device (200) can train the filter coefficients so that the error between the template region (1410) of the current block and the template region (1420) of the reference block is minimized, as shown in FIG. 14. That is, the image decoding device (200) can train the filter coefficients to be applied to C (1421), E (1423), W (1425), S (1427), and N (1429) in the template region (1420) of the reference block, so that the weighted Outputi can become the P sample (1430) in the template region (1410) of the current block. In addition, the image decoding device (200) can generate the weighted sample Outputi in the current block by applying the trained filter coefficients to the samples in the reference block.
[0206]
[0207] - Outputi: i-th sample of the current block
[0208] - c0, c1, c2, c3, c4, c5: filter coefficients
[0209] - C: Any sample within the template area of the reference block.
[0210] - N: Upper sample adjacent to C
[0211] - S: Lower sample adjacent to C
[0212] - W: Left sample adjacent to C
[0213] - E: Right sample adjacent to C
[0214] - B: bias term (for example, it can have a value of (1<<(bit depth - 1)))
[0215] - P: Sample at the same location as C within the template area of the current block
[0216] The intra-fusion mode according to the present disclosure may be a mode that generates a prediction block by weighting the intraTMP block and a block generated by an intra mode (e.g., modes 0 to 67). Here, the intra mode may be a TIMD (template-based intra-mode derivation) or DIMD (decoder-side intra-mode derivation) mode. Alternatively, the intra mode may be an intra mode stored in a neighboring block. Alternatively, the intra mode may be a fixed value such as Planar or DC.
[0217] There may be n intra modes used in the intra fusion mode, and n may be an integer value agreed upon between the video encoding device (100) and the video decoding device (200). For example, n may be 2 or 3. The intraTMP block used in the intra fusion mode may be a block generated through the default mode, the filtered mode, the error value based fusion mode, the fixed value based fusion mode, or the filter based fusion mode.
[0218] The weight values used for weighted summation in intra fusion mode may be defined as an agreement between the image encoding device (100) and the image decoding device (200). For example, the weight values may be defined in a ratio of 13:3. That is, the weight applied to the intraTMP block may be 13 / 16, and the weight applied to the block generated by the intra mode may be 3 / 16.
[0219] Alternatively, the weights may be derived based on the ratio of error values between template regions. For example, a first error may be obtained between a pre-reconstructed sample in the template region and an intraTMP predictor. Furthermore, a second error may be obtained between a pre-reconstructed sample in the template region and an intra-mode predictor. Accordingly, the image encoding device (100) and / or the image decoding device (200) may derive weight values based on the ratio of the first and second errors.
[0220] Alternatively, the weights used in the intra-fusion mode can be adaptively determined based on the number of modes used. For example, when n is 2 (two modes are used), the weights applied to the predictors generated for each mode can be 1 / 2. As another example, when n is 3 (three modes are used), the three weights applied to the three predictors generated for each mode can be 22 / 64, 21 / 64, and 21 / 64.
[0221] The error value based fusion mode according to the present disclosure may be a mode in which a block vector candidate list is constructed in descending order of errors between a template region of a current block and a template region of a reference block during an intraTMP search process, and then the top n reference blocks with low errors in the block vector candidate list are combined using an error value-based weight to generate a prediction block. In other words, the error value based fusion mode may be a mode in which a prediction block is generated by weighting the top n reference blocks with low errors in the block vector candidate list using a weight based on an error value.
[0222] Alternatively, the error value based fusion mode according to the present disclosure may be a mode in which a block vector candidate list is constructed in descending order of errors between the template region of the current block and the template region of the reference block in the intraTMP search process, and then a candidate index indicating a candidate in the block vector candidate list is signaled to combine n reference blocks from the corresponding candidate position with an error value-based weight, thereby generating a prediction block. For example, when M block vector candidates exist in the block vector candidate list and the candidate index has a value of N (0≤N≤M-1), the image decoding device (200) can generate a prediction block of the current block by weighting n reference blocks (N, N+1, N+2) in order from the block vector candidates in the block vector candidate list indicated by N.
[0223] The weights used in the error value based fusion mode can be derived based on the error values. For example, when the respective error values of n reference blocks are E1, E2, 쪋, and En (n≥2), the weights of each reference block can be derived using the following mathematical expression 3. Here, n may be an integer value agreed upon between the image encoding device (100) and the image decoding device (200). For example, n may be 5.
[0224]
[0225] The fixed value based fusion mode according to the present disclosure may be a mode in which a block vector candidate list is constructed in the order of low error between the template region of the current block and the template region of the reference region during an intraTMP search process, and then the top n reference blocks with low errors in the block vector candidate list are weighted with a fixed weight to generate a prediction block of the current block.
[0226] Alternatively, the fixed value based fusion mode according to the present disclosure may be a mode in which a block vector candidate list is constructed in the order of low error between the template region of the current block and the template region of the reference region during the intraTMP search process, and then a candidate index indicating a candidate in the block vector candidate list is signaled to weight n reference blocks starting from the corresponding candidate position with a fixed weight, thereby generating a prediction block of the current block. Here, n may be an integer agreed upon between the video encoding device (100) / the video decoding device (200). For example, n may be 2 or 3.
[0227] For example, when applying the fixed value-based fusion mode, if n is 2 (when using two reference blocks), the fixed weights applied to each predictor can be 1 / 2 respectively. As another example, if n is 3 (when using three reference blocks), the three fixed weights applied to the three predictors can be 22 / 64, 21 / 64, and 21 / 64 respectively.
[0228] The filter-based fusion mode according to the present disclosure may be a mode in which a block vector candidate list is constructed in the order of low error between the template region of the current block and the template region of the reference block during an intraTMP search process, and then the top n reference blocks with low errors in the block vector candidate list are weighted by filter-based weights to generate a prediction block of the current block.
[0229] Alternatively, the filter-based fusion mode according to the present disclosure may be a mode in which a block vector candidate list is constructed in the order of low error between the template region of the current block and the template region of the reference block during the intraTMP search process, and then a candidate index indicating a candidate in the block vector candidate list is signaled to weight n reference blocks from the corresponding candidate position using a filter-based weight to generate a prediction block of the current block.
[0230] According to the present disclosure, when applying the filter-based fusion mode, the image encoding device (100) and / or the image decoding device (200) can generate a prediction block of the current block by creating a filter model based on the relationship between the template region of the current block and the template region of the reference block and then applying the filter model to the reference blocks. Referring to FIG. 15, the image encoding device (100) and / or the image decoding device (200) can train the filter coefficients so that the error between the template region (1510) of the current block and the template regions (1520, 1530, 1540) of the reference blocks is minimized. At this time, the image encoding device (100) and / or the image decoding device (200) can train the filter coefficients using the following mathematical expression 4.
[0231]
[0232] - Outputi: i-th sample of the current block
[0233] - c0, c1, 쪋, cn-1, cn: filter coefficients
[0234] - S0: Sample at the same location as C (1515) within the template area of reference block 0 (1525)
[0235] - S1: Sample at the same location as C (1515) within the template area of reference block 1 (1535)
[0236] - Sn-1: Sample at the same location as C (1515) within the template area of reference block n-1 (1535)
[0237] - B: bias value (for example, it can be (1<<(bit depth-1)))
[0238] - n: an integer value promised by the video encoding device (100) and the video decoding device (200) (for example, n can be 5)
[0239] That is, the image encoding device (100) and / or the image decoding device (200) can train the filter coefficients so that Outputi, which is a weighted sum of the filter coefficients of samples S0, S1, 쪋, Sn-1 and B (bias value) at the same location within the template area of the reference block, can become C (1515) within the template area of the current block. At this time, each of the filter coefficients c0, c1, 쪋, cn-1 and cn can mean a filter-based weight.
[0240] The various intraTMP modes according to the present disclosure can use an L-shape template (1610), an Above shape template (1620), or a Left shape template (1630) as shown in FIG. 16 during the intraTMP search process. Which template area among the L-shape template, the Above shape template, or the Left shape template is to be used can be signaled. Alternatively, which template area among the L-shape template, the Above shape template, or the Left shape template is to be used can be defined by an agreement between the video encoding device (100) and the video decoding device (200) without separate signaling.
[0241] For example, fusion modes such as error value-based fusion mode and filter-based fusion mode can always use L-shape templates without separate signaling. As another example, default mode or filtered mode can determine the shape of the template region based on information indicating the shape of the signaled template region.
[0242] The various intraTMP modes according to the present disclosure can utilize variable template region sizes during the intraTMP search process. Whether to use a variable template region can be determined based on signaled information. Alternatively, whether to use a variable template region can be determined through an agreement between the video encoding device (100) and the video decoding device (200) without separate signaling.
[0243] For example, a specific intraTMP mode may use a template region consisting of the two upper sample lines adjacent to the current block and the two left sample lines. In this case, the remaining intraTMP modes other than the specific intraTMP mode may use a template region consisting of the four upper sample lines adjacent to the current block and the four left sample lines. As another example, a specific intraTMP mode may use a template region determined based on template size determination information signaled through the bitstream.
[0244] The intraTMP mode according to the present disclosure can generate prediction blocks in various ways. The information required for intraTMP modes can vary, necessitating the effective management of these various intraTMP modes. Therefore, the present disclosure proposes a method for efficiently encoding and decoding by reducing the number of bits of complex and diverse signaling information in intraTMP modes.
[0245] According to one embodiment of the present disclosure, intraTMP mode information stored in reference blocks adjacent or non-adjacent to the current block may be included in the intraTMP merge candidate list. For example, as illustrated in FIG. 17, the intraTMP merge candidate list may include modes stored in a reference block including the current block and adjacent samples (1710) or in a reference block including non-adjacent samples (1720).
[0246] Referring to FIG. 17, when the upper left coordinates of the current block are (x, y), and the width and height of the current block are W, H, respectively, the adjacent samples (1710) may include samples at positions (x-1, y-1), (x+W-1, y-1), (x+W, y-1), (x-1, y+H), and (x-1, y+H-1). However, the present disclosure is not limited thereto, and the adjacent samples may be defined as other adjacent positions by agreement between the image encoding device (100) / image decoding device (200).
[0247] In Fig. 17, when the upper left coordinates of the current block are (x, y), and the width and height of the current block are W, H, respectively, a non-adjacent sample (1720) can be expressed as NonAdj_pos as shown in Table 3 below. However, the present disclosure is not limited thereto and may include only some NonAdj_pos positions. Alternatively, the non-adjacent sample according to the present disclosure may be defined as another non-adjacent position by agreement between the video encoding device (100) / video decoding device (200).
[0248]
[0249]
[0250] As another example, when the upper left coordinates of the current block in FIG. 17 are (x, y), and the width and height of the current block are W, H, respectively, the non-adjacent position can be expressed as NonAdj_pos2 as shown in Table 4 below. The present disclosure is not limited thereto, and the non-adjacent samples may include only some NonAdj_pos2, or may be defined as other non-adjacent positions by agreement between the video encoding device (100) and the video decoding device (200).
[0251]
[0252] According to one embodiment of the present disclosure, intraTMP modes stored in the history-based intraTMP list may also be included in the intraTMP merge candidate list. For example, if a previously coded block is in intraTMP mode, the mode may be included in the history-based intraTMP list. In this case, the history-based intraTMP list may be initialized whenever the CTU row position changes. Alternatively, the history-based intraTMP list may be initialized for each CTU.
[0253] The size of the history-based intraTMP list may be determined by an agreement between the video encoding device (100) and the video decoding device (200). For example, the size of the history-based intraTMP list may be 6. Similarly, the size of the intraTMP merge candidate list may be determined by an agreement between the video encoding device (100) and the video decoding device (200). For example, the size of the intraTMP merge candidate list may be 6.
[0254] According to one embodiment of the present disclosure, the order of configuring the intraTMP mode in the intraTMP merge candidate list may be determined by an agreement between the video encoding device (100) and the video decoding device (200). For example, when the upper left coordinates of the current block are (x, y), and the width and height of the current block are W, H, respectively, the intraTMP merge candidate list may be configured in the order of the intraTMP mode at the (x-1, y-1) position, the IntraTMP mode at the (x+W-1, y-1) position, the IntraTMP mode at the (x+W, y-1) position, the IntraTMP mode at the (x-1, y+H) position, the IntraTMP mode at the (x-1, y+H-1) position, the IntraTMP mode at the NonAdj_pos position, the IntraTMP mode at the NonAdj_pos2 position, and the IntraTMP mode configured in the history based list.
[0255] Meanwhile, even if one of the candidates in the intraTMP merge candidate list is used as the intraTMP mode of the current block, unnecessary intraTMP searches may be performed. Furthermore, if the correlation between the template region of the current block and the current block is low, the performance of the intraTMP mode may deteriorate. To address this issue, the present disclosure proposes a method for reusing pre-coded intraTMP mode information.
[0256] According to one embodiment of the present disclosure, intraTMP mode information stored in the intraTMP merge candidate list can be reused. For example, when the pre-coded intraTMP mode included in the intraTMP merge candidate list is an error value based fusion mode, multiple block vector x, y information and weight values used for prediction of the corresponding block can be reused for prediction of the current block. That is, the image encoding apparatus (100) and / or the image decoding apparatus (200) can generate a weighted sum prediction block using multiple block vector x, y information and weight values without performing an intraTMP search process on the current block.
[0257] If the pre-coded intraTMP mode included in the intraTMP merge candidate list is the default mode, the video encoding device (100) and / or the video decoding device (200) can reuse the block vector x, y information used for prediction of the corresponding reference block. In addition, if the pre-coded intraTMP mode included in the intraTMP merge candidate list is the filtered mode, the video encoding device (100) and / or the video decoding device (200) can reuse the block vector x, y information and / or the filter coefficients (c0, c1, 쪋, cn) used for prediction of the corresponding reference block.
[0258] In addition, when the pre-coded intraTMP mode included in the intraTMP merge candidate list is an intra fusion mode, the video encoding device (100) and / or the video decoding device (200) can reuse block vector x, y information, one or more intra modes and / or weight values used for prediction of the corresponding reference block. In addition, when the pre-coded intraTMP mode included in the intraTMP merge candidate list is an error value based fusion mode, the video encoding device (100) and / or the video decoding device (200) can reuse multiple block vector x, y information and / or weight values used for prediction of the corresponding reference block.
[0259] In addition, when the pre-coded intraTMP mode included in the intraTMP merge candidate list is a fixed value-based fusion mode, the video encoding device (100) and / or the video decoding device (200) can reuse a plurality of block vector x, y information and / or weight values used for prediction of the corresponding reference block. In addition, when the pre-coded intraTMP mode included in the intraTMP merge candidate list is a filter based fusion mode, the video encoding device (100) and / or the video decoding device (200) can reuse a plurality of block vector x, y information and / or filter coefficients (c0, c1, 쪋, cn) used for prediction of the corresponding reference block.
[0260] According to another embodiment of the present disclosure, intraTMP mode information stored in the intraTMP merge candidate list can be partially reused. For example, when the pre-coded intraTMP mode included in the intraTMP merge candidate list is an error value based fusion mode, the video encoding device (100) and / or the video decoding device (200) can reuse only a plurality of block vector x, y information used for predicting the reference block. In this case, the video encoding device (100) and / or the video decoding device (200) may obtain error values between the template region of the reference block indicated by the plurality of block vector x, y information and the template region of the current block, and then derive new weights based on the error values.
[0261] As another example, if the pre-coded intraTMP mode included in the intraTMP merge candidate list is an intra fusion mode, the video encoding device (100) and / or the video decoding device (200) may use only block vector x, y information used for predicting the reference block. In this case, the intra mode used to perform the intra fusion mode may be newly derived. For example, the video encoding device (100) and / or the video decoding device (200) may use the intra mode stored in the surrounding blocks of the current block. Alternatively, the video encoding device (100) and / or the video decoding device (200) may derive the intra mode by using TIMD or DIMD in the template area of the current block.
[0262] According to one embodiment of the present disclosure, an intraTMP merge candidate list can be constructed. In addition, the present disclosure can signal an intraTMP merge candidate index. However, a large amount of bits may be required when signaling an intraTMP merge candidate index. Therefore, in order to reduce the amount of signaling bits, the order of candidate modes in the intraTMP merge candidate list can be changed. For example, the video encoding apparatus (100) and / or the video decoding apparatus (200) can generate a prediction sample with a candidate mode at an upper and / or left adjacent sample location of a current block, and then obtain an error (error) between the generated prediction sample and a previously reconstructed sample. Here, the candidate mode may be a mode constituting the intraTMP merge candidate list of the current block. For example, when one of the candidate modes is a default mode, a previously reconstructed sample indicated by block vectors x and y at an upper and / or left adjacent sample location of the current block can be generated as a prediction sample. The video encoding device (100) and / or the video decoding device (200) can reconstruct candidate modes in the intraTMP merge candidate list in descending order of errors. At this time, the errors can be obtained by methods such as SAD, MR-SAD, SSE, and MSE. Although only a method of rearranging the intraTMP merge candidate list using the upper and / or left adjacent samples of the current block has been described, the present disclosure is not limited thereto, and the adjacent samples used for rearranging the intraTMP merge candidate list may include various adjacent samples or non-adjacent samples, as illustrated in FIG. 17.
[0263] Example 2
[0264] The present disclosure proposes a method for signaling information related to intraTMP merge modes. As described in Example 1, intraTMP modes can vary, and thus the information required for each intraTMP mode can vary. Furthermore, the various pieces of information for these various intraTMP modes can require a significant amount of bits. Therefore, we propose a method for effectively signaling intraTMP merge mode information.
[0265] A signaling method for information regarding intraTMP merge mode according to one embodiment of the present disclosure may be as shown in Table 5 below.
[0266]
[0267] The semantics of the information used in Table 5 above can be as shown in Table 6 below.
[0268]
[0269] intra_tmp_flag may be information indicating whether the intra prediction type of the current block is intraTMP mode. intra_tmp_fusion_flag may be information indicating whether the fusion mode is applied to the current block. That is, intra_tmp_fusion_flag may be information indicating whether the intra fusion mode is applied to the current block. intra_tmp_fusion_idx may be information indicating a candidate set used for intraTMP fusion. The value of intra_tmp_fusion_idx may range from 0 to 2. In addition, intra_tmp_fusion_idx may indicate one of the candidate sets of {BV0 to BV4}, {BV5 to BV9}, or {BV10 to BV14}.
[0270] intra_tmp_fusion_weight_type may be information indicating whether a SAD-based weight derivation method or a Wiener-filter-based weight derivation method is used to obtain the weight. intra_tmp_idx may be an index for a block vector within the candidate list used for the current block. That is, intra_tmp_idx may be information indicating a block vector within the intraTMP merge candidate list used for the current block. The value of intra_tmp_idx may range from 0 to 18. L-shape templates, Above shape templates, and / or Left shape templates may be included in the same intraTMP merge candidate list.
[0271] intra_tmp_sub_pel_precision_idx can be information indicating the precision index for the current block. The value of intra_tmp_sub_pel_precision_idx can range from 0 to 3, and each value can represent integer-pel precision, 1 / 2-pel precision, 1 / 4-pel precision, and 3 / 4-pel precision. intra_tmp_sub_pel_direction_idx can be the sub-pel direction index of the current block. The value of intra_tmp_sub_pel_direction_idx can range from 0 to 7.
[0272] According to another embodiment of the present disclosure, a signaling method for information regarding intraTMP merge mode may be as shown in Table 7 below. Referring to Table 7, when the signaled intra_tmp_merge_flag is true (e.g., 1), the video decoding device (200) can know intraTMP mode information by signaling an intraTMP merge candidate index. On the other hand, when the signaled intra_tmp_merge_flag is false (e.g., 0), the video decoding device (200) can signal information indicating a general intraTMP mode.
[0273]
[0274] The semantics of the information used in Table 7 above can be as shown in Table 8 below.
[0275]
[0276] intra_tmp_merge_flag may be flag information indicating whether the prediction mode of the current block is intraTMP merge mode. If the value of intra_tmp_merge_flag is the first value (e.g., 0), the prediction mode of the current block may not be intraTMP merge mode. If the value of intra_tmp_merge_flag is the second value (e.g., 1), the prediction mode of the current block may be intraTMP merge mode.
[0277] intra_tmp_merge_idx may be index information indicating a candidate within the intraTMP merge candidate list of the current block. In other words, intra_tmp_merge_idx may be index information indicating the intraTMP mode within the intraTMP merge candidate list of the current block.
[0278] According to another embodiment of the present disclosure, a signaling method for information regarding an intraTMP merge mode may be as shown in Table 9 below. Referring to Table 9, the video encoding device (100) and / or the video decoding device (200) may omit signaling of a merge candidate index indicating a candidate in the merge candidate list. In this case, the video encoding device (100) and the video decoding device (200) may specify which intraTMP mode to use in the merge candidate list by agreement. For example, the video encoding device (100) and the video decoding device (200) may use the first intraTMP mode in the merge candidate list as the intraTMP mode of the current block.
[0279]
[0280] FIG. 18 is a flowchart of an encoding method according to an embodiment of the present disclosure. Referring to FIG. 18, the video encoding device (100) may construct an intraTMP merge candidate list for generating a prediction block of the current block (S1810). The video encoding device (100) may rearrange the intraTMP merge candidate list (S1830). The rearrangement of the intraTMP merge candidate list may be performed based on an error value between the template region of the reference block and the template region of the current block. Here, the reference block may be a neighboring block of the current block used to construct the intraTMP merge candidate list.
[0281] The video encoding device (100) can generate a final prediction block of the current block by performing intra prediction based on one candidate included in the rearranged intraTMP merge candidate list (S1850). The video encoding device (100) can encode a candidate index indicating one candidate used in generating the final prediction block (S1870). Here, the intraTMP merge candidate list can be composed of prediction information of a previously restored block predicted in the intraTMP mode.
[0282] FIG. 19 is a flowchart of a decoding method according to an embodiment of the present disclosure. Referring to FIG. 19, the image decoding device (200) may construct an intraTMP merge candidate list for generating a prediction block of the current block (S1910). The image decoding device (200) may rearrange the intraTMP merge candidate list (S1930). The rearrangement of the intraTMP merge candidate list may be performed based on an error value between the template region of the reference block and the template region of the current block. Here, the reference block may be a neighboring block of the current block used to construct the intraTMP merge candidate list.
[0283] The video decoding device (200) can obtain a candidate index indicating one candidate included in the rearranged intraTMP merge candidate list (S1950). The video decoding device (200) can generate a final prediction block of the current block by performing intra prediction based on the candidate indicated by the candidate index (S1970).
[0284] Here, the intraTMP merge candidate list may be composed of prediction information of previously restored blocks predicted by the intraTMP mode. In addition, the intraTMP mode may be one of the default mode, the filtered mode, the intrafusion mode, the error value-based fusion mode, the fixed value-based fusion mode, or the filter-based fusion mode.
[0285] Prediction information of a pre-reconstructed block constituting an intraTMP merge candidate list according to the present disclosure may include at least one of one or more block vector information, filter coefficients, one or more intra prediction modes or one or more weights used in a weighted sum used in the pre-reconstructed block.
[0286] According to one embodiment of the present disclosure, when a candidate indicated by a candidate index is one of an intra fusion mode, an error value-based fusion mode, a fixed value-based fusion mode, or a filter-based fusion mode, a final prediction block may be generated by weighting a first prediction block and a second prediction block. Here, the first prediction block may be a prediction block generated based on the candidate indicated by the candidate index. The second prediction block may be a prediction block generated based on an intra prediction mode. At this time, the intra prediction mode used to generate the second prediction block may be one of a DC mode, a Planar mode, or a directional mode.
[0287] According to one embodiment of the present disclosure, the shape of the template region used in the intraTMP mode may vary. For example, the shape of the template region used in the intraTMP mode may be one of an L-shape template, an Above shape template, or a Left shape template. In addition, the size of the template region used in the intraTMP mode may also vary. For example, the number of sample lines in the template region used in the intraTMP mode may be N. Here, N may be a natural number. In addition, N may be determined by an agreement between the image encoding device (100) and the image decoding device (200).
[0288] The present disclosure can search neighboring blocks of the current block to construct an intraTMP merge candidate list. Here, the neighboring blocks may include at least one of adjacent blocks adjacent to the current block or non-adjacent blocks not adjacent to the current block. For example, the adjacent blocks and non-adjacent blocks may be the blocks illustrated in FIG. 17.
[0289] In order to construct an intraTMP merge candidate list, the present disclosure may search in the following order: the intraTMP mode of the upper left adjacent block of the current block, the intraTMP mode of the upper adjacent block, the intraTMP mode of the upper right adjacent block, the intraTMP mode of the lower left adjacent block, the intraTMP mode of the left adjacent block, and the intraTMP mode of the non-adjacent block.
[0290] Although the exemplary methods of the present disclosure are expressed as a series of operations for clarity of description, this is not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order, if necessary. In order to implement a method according to the present disclosure, other steps may be additionally included in the exemplified steps, some steps may be excluded and the remaining steps may be included, or some steps may be excluded and additional other steps may be included. In the present disclosure, a video encoding device or a video decoding device that performs a predetermined operation (step) may perform an operation (step) that confirms a condition or situation for performing the operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is satisfied, the video encoding device or the video decoding device may perform an operation that confirms whether the predetermined condition is satisfied and then perform the predetermined operation.
[0291] The various embodiments of the present disclosure are not intended to list all possible combinations but rather to illustrate representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.
[0292] Additionally, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of hardware implementation, the embodiments may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general processors, controllers, microcontrollers, microprocessors, etc.
[0293] In addition, the video decoding device and the video encoding device to which the embodiments of the present disclosure are applied may be included in a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a video phone video device, and a medical video device, and may be used to process a video signal or a data signal. For example, the OTT (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), and the like.
[0294] FIG. 20 is a diagram illustrating an example of a content streaming system to which an embodiment according to the present disclosure can be applied.
[0295] As illustrated in FIG. 20, a content streaming system to which an embodiment of the present disclosure is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0296] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data, generates a bitstream, and transmits it to the streaming server. Alternatively, if multimedia input devices such as smartphones, cameras, and camcorders directly generate bitstreams, the encoding server may be omitted.
[0297] The above bitstream can be generated by an image encoding method and / or an image encoding device to which an embodiment of the present disclosure is applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0298] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server can transmit multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server may control commands / responses between each device within the content streaming system.
[0299] The streaming server can receive content from a media repository and / or encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.
[0300] Examples of the user devices may include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, HMDs), digital TVs, desktop computers, digital signage, etc.
[0301] Each server within the above content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner.
[0302] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of various embodiments to be executed on a device or a computer, and a non-transitory computer-readable medium having such software or instructions stored thereon and executable on the device or computer.
[0303] Embodiments according to the present disclosure can be used to encode / decode images.
Claims
1. An image decoding method performed by an image decoding device, A step of constructing an intraTMP (intra template matching prediction) merge candidate list for generating a prediction block of the current block; A step of reordering the intraTMP merge candidate list; A step of obtaining a candidate index representing one candidate included in the above rearranged intraTMP merge candidate list; and A step of generating a final prediction block of the current block by performing intra prediction based on the candidate indicated by the candidate index, The above intraTMP merge candidate list is composed of prediction information of the pre-recovery block predicted in the intraTMP mode. How to decrypt video.
2. In paragraph 1, The intraTMP mode is one of the default mode, filtered mode, intra fusion mode, error value based fusion mode, fixed value based fusion mode, or filter based fusion mode. How to decrypt video.
3. In paragraph 2, The prediction information of the above-described restored block includes at least one of one or more block vector information, filter coefficients, one or more intra prediction modes or one or more weights used in the weighted sum used in the above-described restored block. How to decrypt video.
4. In paragraph 2, The step of generating the final prediction block based on whether the candidate indicated by the candidate index is one of the intra fusion mode, the error value-based fusion mode, the fixed value-based fusion mode, or the filter-based fusion mode, A step of generating a first prediction block based on the candidate indicated by the candidate index; generating a second prediction block based on the intra prediction mode; and A step of generating the final prediction block by weighting the first prediction block and the second prediction block, How to decrypt video.
5. In paragraph 4, The above intra prediction mode is one of DC mode, Planar mode or directional mode. How to decrypt video.
6. In paragraph 1, The shape of the template area used in the above intraTMP mode is one of the L-shape template, Above shape template or Left shape template. How to decrypt video.
7. In paragraph 1, The number of sample lines in the template area used in the above intraTMP mode is N, The above N is a natural number, How to decrypt video.
8. In paragraph 1, The steps for constructing the intraTMP merge candidate list are: Further comprising a step of searching surrounding blocks of the current block, The above-mentioned surrounding block includes at least one of an adjacent block adjacent to the current block or a non-adjacent block not adjacent to the current block. How to decrypt video.
9. In paragraph 8, The search of the above surrounding blocks is performed in the order of intraTMP mode of the upper left adjacent block of the current block, intraTMP mode of the upper adjacent block, intraTMP mode of the upper right adjacent block, intraTMP mode of the lower left adjacent block, intraTMP mode of the left adjacent block, and intraTMP mode of the non-adjacent block. How to decrypt video.
10. In paragraph 1, The above intraTMP merge candidate list is reordered based on the error value between the template area of the reference block and the template area of the current block, The above reference block is a surrounding block of the current block used to construct the intraTMP merge candidate list. How to decrypt video.
11. In paragraph 1, The intraTMP merge candidate list is configured based on flag information indicating whether the prediction mode of the current block is the intraTMP merge mode. How to decrypt video.
12. In paragraph 11, The above candidate index is obtained based on the flag information indicating that the prediction mode of the current block is intraTMP merge mode. How to decrypt video.
13. An image encoding method performed by an image encoding device, A step of constructing a candidate list for generating a prediction block of the current block; A step of reordering the above candidate list; A step of generating a final prediction block of the current block by performing intra prediction based on one candidate included in the above rearranged candidate list; and A step of encoding a candidate index representing the one candidate used in generating the final prediction block, The above candidate list consists of prediction information of a previously restored block predicted in intraTMP (intra template matching prediction) mode. Video encoding method.
14. A computer-readable recording medium storing a bitstream generated by the image encoding method of Article 13.
15. A method for transmitting a bitstream generated by an image encoding method, wherein the image encoding method comprises: A step of constructing a candidate list for generating a prediction block of the current block; A step of reordering the above candidate list; A step of generating a final prediction block of the current block by performing intra prediction based on one candidate included in the above rearranged candidate list; and A step of encoding a candidate index representing the one candidate used in generating the final prediction block, The above candidate list consists of prediction information of a previously restored block predicted in intraTMP (intra template matching prediction) mode. Bitstream transmission method.
Citation Information
Patent Citations
Device And Method For Setting Mosquito Net Or Wind Proof Sheet Using Velcro
KR1020240175491A
Reflector of solar module and photovoltaic system having the same
KR102508715B1
Gravity compensation apparatus
KR102569440B1