Image encoding / decoding method, device, and recording medium for storing bitstream
Patent Information
- Application Number
- PCT/KR2024/004756
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-09
- Filing Date
- 2024-04-09
- Publication Date
- 2025-06-26
AI Technical Summary
High-resolution and high-quality video data requires efficient encoding and decoding methods to reduce transmission and storage costs, as existing technologies face complexity in coefficient sign prediction due to the need to scan all possible sign combinations for residual coefficients.
A method is introduced to determine the coefficient sign prediction target based on the transformation type of the current block, specifying the coefficient sign prediction area or the number of coefficients to predict, thereby reducing computational complexity by focusing on areas with non-zero coefficients.
This approach enhances encoding/decoding efficiency by predicting signs only in suitable areas, reducing unnecessary computations and memory usage, thus lowering costs associated with high-resolution video data transmission and storage.
Smart Images

Figure KR2024004756_26062025_PF_FP_ABST
Abstract
Description
Video encoding / decoding method, device, and recording medium storing bitstream
[0001] The present invention relates to a video encoding / decoding method, a device, and a recording medium storing a bitstream. Specifically, the present invention relates to a video encoding / decoding method, a device, and a recording medium storing a bitstream that use a method for predicting the sign of a coefficient.
[0002] Recently, the demand for high-resolution, high-quality images, such as UHD (Ultra High Definition) images, is increasing across various application fields. As image data becomes higher in resolution and quality, the relative amount of data increases compared to conventional image data. Therefore, transmitting image data using existing media such as wired or wireless broadband lines or storing it using existing storage media leads to increased transmission and storage costs. To address these issues arising from the increasing resolution and quality of image data, high-efficiency image encoding / decoding technologies for higher-resolution and higher-quality images are required.
[0003] The coefficient sign prediction technology used in image encoding / decoding technology is a technology that selects a combination that minimizes a given cost function among all possible combinations of negative signs and positive signs for residual coefficients to which sign prediction can be applied, and uses this as the predicted value of the actual sign.
[0004] However, there is a problem in that the complexity is very high because all coefficient positions within the sign prediction area must be scanned to determine the target coefficients to which sign prediction is to be applied, and all possible combinations of negative and positive signs for the target coefficients to which sign prediction is to be applied must be examined.
[0005] The purpose of the present invention is to provide a video encoding / decoding method and device with improved encoding / decoding efficiency.
[0006] In addition, the present invention aims to provide a recording medium storing a bitstream generated by an image decoding method or device according to the present invention.
[0007] In addition, the present invention aims to provide a method for measuring a coefficient sign by using a coefficient sign prediction area and a number of coefficients to be predicted based on a transformation type of a current block, in order to solve the problem of coefficient sign prediction.
[0008] An image decoding method according to one embodiment of the present invention includes a step of determining a transformation type of a current block, a step of determining a coefficient sign prediction target of the current block based on the transformation type, and a step of predicting a sign of a coefficient corresponding to the coefficient sign prediction target, wherein the coefficient sign prediction target can be specified as a coefficient sign prediction area or the number of coefficients corresponding to the coefficient sign prediction target.
[0009] In the above image decoding method, the transformation type of the current block may be characterized by representing any one of a separable transformation, a non-separable transformation, or a combination of a separable transformation and a non-separable transformation.
[0010] In the above image decoding method, the coefficient corresponding to the coefficient sign prediction target may be characterized as a coefficient located within the coefficient sign prediction area.
[0011] In the above image decoding method, the size of the coefficient sign prediction region of the current block may be determined based on the transformation type of the current block.
[0012] In the above image decoding method, the size of the coefficient code prediction region of the current block may be determined based on a comparison result between the size of the coefficient code prediction region determined based on the transformation type of the current block and the size of the current block.
[0013] In the above image decoding method, the size of the coefficient sign prediction region of the current block may be determined based on a comparison result between the size of the coefficient sign prediction region determined based on the transformation type of the current block and the size of a valid region that is an area including non-zero coefficients within the current block.
[0014] In the above image decoding method, it may be characterized in that the number of coefficients corresponding to the coefficient sign prediction target is determined based on the transformation type of the current block.
[0015] In the above image decoding method, the number of coefficients corresponding to the coefficient sign prediction target may be determined based on a comparison result between the number of coefficients corresponding to the coefficient sign prediction target, which is determined based on the transformation type of the current block, and the number of non-zero coefficients of the current block.
[0016] In the above image decoding method, the number of coefficients corresponding to the coefficient sign prediction target may be determined based on a comparison result between the number of coefficients corresponding to the coefficient sign prediction target, which is determined based on the transformation type of the current block, and the number of non-zero coefficients included in a valid area within the current block.
[0017] In the above image decoding method, the number of coefficients corresponding to the coefficient sign prediction target is determined based on a comparison result between the number of coefficients corresponding to the coefficient sign prediction target, which is determined based on the transformation type of the current block, and the number of non-zero coefficients included in the coefficient sign prediction area, and the coefficient sign prediction area may be determined based on the transformation type of the current block.
[0018] A video encoding method according to one embodiment of the present invention includes a step of determining a transformation type of a current block, a step of determining a coefficient sign prediction target of the current block based on the transformation type, and a step of predicting a sign of a coefficient corresponding to the coefficient sign prediction target, wherein the coefficient sign prediction target can be specified as a coefficient sign prediction area or the number of coefficients corresponding to the coefficient sign prediction target.
[0019] A non-transitory computer-readable recording medium according to one embodiment of the present invention can store a bitstream generated by an image encoding method, including the steps of determining a transformation type of a current block, the step of determining a coefficient sign prediction target of the current block based on the transformation type, and the step of predicting a sign of a coefficient corresponding to the coefficient sign prediction target, wherein the coefficient sign prediction target is specified as a coefficient sign prediction area or the number of coefficients corresponding to the coefficient sign prediction target.
[0020] A bitstream transmission method according to one embodiment of the present invention comprises a step of determining a transformation type of a current block, a step of determining a coefficient sign prediction target of the current block based on the transformation type, and a step of predicting a sign of a coefficient corresponding to the coefficient sign prediction target, wherein the coefficient sign prediction target is specified as a coefficient sign prediction area or the number of coefficients corresponding to the coefficient sign prediction target. A bitstream generated by an image encoding method can be transmitted.
[0021] The features briefly summarized above regarding the present disclosure are merely exemplary aspects of the detailed description of the present disclosure that follows and do not limit the scope of the present disclosure.
[0022] According to the present invention, a video encoding / decoding method and device with improved encoding / decoding efficiency can be provided.
[0023] In addition, according to the present invention, a coefficient sign prediction method can be provided that predicts the sign of a coefficient only for an area suitable for the distribution of the coefficient of the current block.
[0024] In addition, according to the present invention, a coefficient sign prediction method can be provided that predicts signs only for a predetermined number of coefficients depending on the type of transformation of the current block.
[0025] 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.
[0026] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.
[0027] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.
[0028] FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.
[0029] FIG. 4 is a diagram for explaining a cost function of a coefficient sign prediction method according to an embodiment of the present invention.
[0030] FIG. 5 is a diagram for explaining a non-separable first-order transformation applied to each block size according to one embodiment of the present invention.
[0031] FIG. 6 is a diagram for explaining a zeroing method in non-separable transformation according to one embodiment of the present invention.
[0032] FIG. 7 is a drawing for explaining one embodiment of a transformation block applying a non-separable first-order transformation according to one embodiment of the present invention.
[0033] Figure 8 is a flowchart illustrating an image decoding method according to an embodiment of the present invention.
[0034] FIG. 9 is a drawing exemplarily showing a content streaming system to which an embodiment according to the present invention can be applied.
[0035] The present invention is susceptible to various modifications and embodiments. Therefore, specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present invention to specific embodiments, but rather to encompass all modifications, equivalents, and substitutes falling within the spirit and scope of the present invention. In the drawings, similar reference numerals designate the same or similar functions throughout. The shape and size of elements in the drawings may be provided by way of example only for clarity. The detailed description of the exemplary embodiments described below refers to the accompanying drawings, which illustrate specific embodiments. These embodiments are described in sufficient detail to enable those skilled in the art to practice the embodiments. It should be understood that the various embodiments, while different, are not necessarily mutually exclusive. For example, specific shapes, structures, and characteristics described herein may be implemented in other embodiments without departing from the spirit and scope of the present invention. Furthermore, it should be understood that the location or arrangement of individual components within each disclosed embodiment may be modified without departing from the spirit and scope of the embodiment. Accordingly, the detailed description set forth below is not intended to be taken in a limiting sense, and the scope of the illustrative embodiments, if properly described, is defined only by the appended claims, along with the full scope equivalents to which such claims are entitled.
[0036] In the present invention, terms such as first, second, etc. may be used to describe various components, but the components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present invention, the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component. The term "and / or" includes a combination of multiple related described items or any of multiple related described items.
[0037] The components shown in the embodiments of the present invention are independently depicted to represent different characteristic functions, and do not mean that each component is composed of separate hardware or a single software component. That is, each component is listed and included as a separate component for convenience of explanation, and at least two components among each component may be combined to form a single component, or a single component may be divided into multiple components to perform a function, and such integrated and separate embodiments of each component are also included in the scope of the present invention as long as they do not deviate from the essence of the present invention.
[0038] The terminology used herein is merely used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In addition, some components of the present invention are not essential components that perform essential functions in the present invention and may be optional components merely for performance enhancement. The present invention may be implemented by including only components essential to realizing the essence of the present invention, excluding components used only for performance enhancement, and a structure including only essential components, excluding optional components used only for performance enhancement, is also within the scope of the present invention.
[0039] In an embodiment, the term "at least one" may mean one of a number greater than or equal to 1, such as 1, 2, 3, and 4. In an embodiment, the term "a plurality of" may mean one of a number greater than or equal to 2, such as 2, 3, and 4.
[0040] Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In describing the embodiments of this specification, if it is determined that a detailed description of a related known configuration or function may obscure the gist of this specification, the detailed description will be omitted. The same reference numerals will be used for identical components in the drawings, and duplicate descriptions of identical components will be omitted.
[0041] Glossary of Terms
[0042] Hereinafter, “video” may mean a single picture constituting a video, or may refer to the video itself. For example, “encoding and / or decoding of a video” may mean “encoding and / or decoding of a video,” or may mean “encoding and / or decoding of one of the videos constituting the video.”
[0043] Hereinafter, the terms "video" and "movie" may be used interchangeably and have the same meaning. Furthermore, the target image may be an encoding target image, which is the target of encoding, and / or a decoding target image, which is the target of decoding. Furthermore, the target image may be an input image input to an encoding device, or an input image input to a decoding device. Here, the target image may have the same meaning as the current image.
[0044] Hereinafter, the terms encoder and image encoding device may be used interchangeably and have the same meaning.
[0045] Hereinafter, the terms decoder and image decoding device may be used interchangeably and have the same meaning.
[0046] Hereinafter, “image”, “picture”, “frame” and “screen” may be used with the same meaning and may be used interchangeably.
[0047] Hereinafter, the term "target block" may refer to an encoding target block, which is the target of encoding, and / or a decoding target block, which is the target of decoding. Furthermore, the target block may refer to a current block, which is the target of current encoding and / or decoding. For example, the terms "target block" and "current block" may be used interchangeably and have the same meaning.
[0048] Hereinafter, "block" and "unit" may be used with the same meaning and may be used interchangeably. In addition, "unit" may mean including a luminance component block and a corresponding chroma component block to distinguish it from a block. For example, a coding tree unit (CTU) may be composed of one luma component (Y) coding tree block (CTB) and two chroma component (Cb, Cr) coding tree blocks associated with it.
[0049] Hereinafter, the terms “sample,” “pixel,” and “pixel” may be used interchangeably and have the same meaning. Here, a sample may represent a basic unit that constitutes a block.
[0050] Hereinafter, “inter” and “between screens” may be used interchangeably and have the same meaning.
[0051] Hereinafter, “intra” and “within screen” may be used interchangeably and have the same meaning.
[0052]
[0053] Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.
[0054] The encoding device (100) may be an encoder, a video encoding device, or an image encoding device. A video may include one or more images. The encoding device (100) may sequentially encode one or more images.
[0055] Referring to FIG. 1, the encoding device (100) may include an image segmentation unit (110), an intra prediction unit (120), a motion prediction unit (121), a motion compensation unit (122), a switch (115), a subtractor (113), a transformation unit (130), a quantization unit (140), an entropy encoding unit (150), an inverse quantization unit (160), an inverse transformation unit (170), an adder (117), a filter unit (180), and a reference picture buffer (190).
[0056] Additionally, the encoding device (100) can generate a bitstream including encoded information through encoding an input image and output the generated bitstream. The generated bitstream can be stored in a computer-readable recording medium or can be streamed via a wired / wireless transmission medium.
[0057] The video segmentation unit (110) can segment the input video into various forms to increase the efficiency of video encoding / decoding. That is, the input video is composed of multiple pictures, and one picture can be hierarchically segmented and processed for compression efficiency, parallel processing, etc. For example, one picture can be segmented into one or more tiles or slices, which can then be segmented into multiple Coding Tree Units (CTUs). Alternatively, one picture can first be segmented into multiple sub-pictures defined as groups of rectangular slices, and each sub-picture can then be segmented into the tiles / slices. Here, the sub-pictures can be utilized to support the function of partially independently encoding / decoding and transmitting the picture. Since multiple sub-pictures can each be individually restored, there is an advantage of easy editing in applications that configure multi-channel input into a single picture. In addition, tiles can be segmented horizontally to generate bricks. Here, a brick can be utilized as the basic unit of intra-picture parallel processing. In addition, one CTU can be recursively split into a quadtree (QT), and the terminal node of the split can be defined as a coding unit (CU). The CU can be split into a prediction unit (PU) and a transformation unit (TU), and prediction and splitting can be performed. Meanwhile, the CU can be utilized as a prediction unit and / or a transformation unit itself. Here, for flexible splitting, each CTU can be recursively split into a multi-type tree (MTT) as well as a quadtree (QT). Splitting of a CTU into a multi-type tree can start from the terminal node of a QT, and the MTT can be composed of a binary tree (BT) and a triple tree (TT).For example, the MTT structure can be divided into vertical binary split mode (SPLIT_BT_VER), horizontal binary split mode (SPLIT_BT_HOR), vertical ternary split mode (SPLIT_TT_VER), and horizontal ternary split mode (SPLIT_TT_HOR). In addition, the minimum block size (MinQTSize) of the quad tree of the luminance block during splitting can be set to 16x16, the maximum block size (MaxBtSize) of the binary tree can be set to 128x128, and the maximum block size (MaxTtSize) of the triple tree can be set to 64x64. In addition, the minimum block size (MinBtSize) of the binary tree and the minimum block size (MinTtSize) of the triple tree can be set to 4x4, and the maximum depth (MaxMttDepth) of the multi-type tree can be set to 4. Additionally, to improve the encoding efficiency of the I slice, a dual tree can be applied that uses different CTU partition structures for luminance and chrominance components. On the other hand, in the P and B slices, the luminance and chrominance CTBs (Coding Tree Blocks) within the CTU can be partitioned into a single tree that shares the coding tree structure.
[0058] The encoding device (100) may perform encoding on the input image in intra mode and / or inter mode. Alternatively, the encoding device (100) may perform encoding on the input image in a third mode (e.g., IBC mode, Palette mode, etc.) other than the intra mode and inter mode. However, if the third mode has functional characteristics similar to the intra mode or inter mode, it may be classified as intra mode or inter mode for convenience of explanation. In the present invention, the third mode will be classified and described separately only when a specific description is required.
[0059] When the intra mode is used as the prediction mode, the switch (115) can be switched to intra, and when the inter mode is used as the prediction mode, the switch (115) can be switched to inter. Here, the intra mode can mean an intra-screen prediction mode, and the inter mode can mean an inter-screen prediction mode. The encoding device (100) can generate a prediction block for an input block of an input image. In addition, after the prediction block is generated, the encoding device (100) can encode a residual block using a residual of the input block and the prediction block. The input image can be referred to as a current image that is currently a target of encoding. The input block can be referred to as a current block that is currently a target of encoding or an encoding target block.
[0060] When the prediction mode is intra mode, the intra prediction unit (120) can use samples of blocks already encoded / decoded around the current block as reference samples. The intra prediction unit (120) can perform spatial prediction on the current block using the reference samples, and can generate prediction samples for the input block through spatial prediction. Here, intra prediction can mean prediction within the screen.
[0061] As an intra prediction method, non-directional prediction modes such as DC mode and Planar mode, as well as directional prediction modes (e.g., 65 directions) can be applied. Here, the intra prediction method can be expressed as an intra prediction mode or an intra-screen prediction mode.
[0062] When the prediction mode is inter mode, the motion prediction unit (121) can search for an area that best matches the input block from the reference image during the motion prediction process and derive a motion vector using the searched area. At this time, the area can be used as a search area. The reference image can be stored in the reference picture buffer (190). Here, when encoding / decoding for the reference image is processed, it can be stored in the reference picture buffer (190).
[0063] The motion compensation unit (122) can generate a prediction block for the current block by performing motion compensation using a motion vector. Here, inter prediction may mean inter-screen prediction or motion compensation.
[0064] The above motion prediction unit (121) and motion compensation unit (122) can generate a prediction block by applying an interpolation filter to a portion of the reference image when the value of the motion vector does not have an integer value. In order to perform inter-screen prediction or motion compensation, it is possible to determine whether the motion prediction and motion compensation method of the prediction unit included in the corresponding encoding unit is one of Skip Mode, Merge Mode, Advanced Motion Vector Prediction (AMVP) mode, and Intra Block Copy (IBC) mode based on the encoding unit, and perform inter-screen prediction or motion compensation according to each mode.
[0065] In addition, based on the above inter-screen prediction method, the AFFINE mode of sub-PU based prediction, the SbTMVP (Subblock-based Temporal Motion Vector Prediction) mode, and the MMVD (Merge with MVD) mode and the GPM (Geometric Partitioning Mode) mode of PU based prediction can be applied. In addition, in order to improve the performance of each mode, the HMVP (History based MVP), the PAMVP (Pairwise Average MVP), the CIIP (Combined Intra / Inter Prediction), the AMVR (Adaptive Motion Vector Resolution), the BDOF (Bi-Directional Optical-Flow), the BCW (Bi-predictive with CU Weights), the LIC (Local Illumination Compensation), the TM (Template Matching), and the OBMC (Overlapped Block Motion Compensation) can be applied.
[0066] Among these, AFFINE mode is a technology that is used in both AMVP and MERGE modes and also has high encoding efficiency. In the existing video coding standard, since MC (Motion Compensation) is performed by considering only the parallel translation of the block, there was a disadvantage in that it could not properly compensate for motions that occur in reality, such as zoom in / out and rotation. To supplement this, a 4-parameter affine motion model using two control point motion vectors (CPMV) and a 6-parameter affine motion model using three control point motion vectors can be applied to inter prediction. Here, CPMV is a vector representing the affine motion model of one of the upper left, upper right, and lower left of the current block.
[0067] The subtractor (113) can generate a residual block using the difference between the input block and the predicted block. The residual block may also be referred to as a residual signal. The residual signal may refer to the difference between the original signal and the predicted signal. Alternatively, the residual signal may be a signal generated by transforming, quantizing, or transforming and quantizing the difference between the original signal and the predicted signal. The residual block may be a residual signal in block units.
[0068] The transform unit (130) can perform a transform on the residual block to generate a transform coefficient and output the generated transform coefficient. Here, the transform coefficient may be a coefficient value generated by performing a transform on the residual block. When the transform skip mode is applied, the transform unit (130) may also skip the transform on the residual block.
[0069] Quantized levels can be generated by applying quantization to transform coefficients or residual signals. In the following embodiments, quantized levels may also be referred to as transform coefficients.
[0070] For example, a 4x4 luminance residual block generated through within-screen prediction can be transformed using a basis vector based on DST (Discrete Sine Transform), and the remaining residual blocks can be transformed using a basis vector based on DCT (Discrete Cosine Transform). In addition, through RQT (Residual Quad Tree) technology, the transform block is divided into a quad tree shape for one block, and after performing transformation and quantization on each transform block divided through RQT, a coded block flag (cbf) can be transmitted to increase encoding efficiency when all coefficients become 0.
[0071] Another alternative is to apply Multiple Transform Selection (MTS) technology, which selectively performs transformation using multiple transformation bases. That is, instead of dividing CUs into TUs via RQT, a Sub-block Transform (SBT) technology can perform a function similar to TU division. Specifically, SBT is applied only to inter-screen prediction blocks, and unlike RQT, it can divide the current block into ½ or ¼ blocks vertically or horizontally, and then perform transformation on only one of the blocks. For example, in a vertically divided block, the transformation can be performed on the leftmost or rightmost block, and in a horizontally divided block, the transformation can be performed on the topmost or bottommost block.
[0072] Additionally, LFNST (Low Frequency Non-Separable Transform), a secondary transform technique that further transforms the residual signal converted to the frequency domain through DCT or DST, can be applied. LFNST additionally performs a transform on the low-frequency region of 4x4 or 8x8 in the upper left, which allows the residual coefficients to be concentrated in the upper left.
[0073] The quantization unit (140) can generate a quantized level by quantizing a transform coefficient or residual signal according to a quantization parameter (QP), and can output the generated quantized level. At this time, the quantization unit (140) can quantize the transform coefficient using a quantization matrix.
[0074] For example, a quantizer with QP values of 0 to 51 can be used. Alternatively, if the image size is larger and high encoding efficiency is required, a QP of 0 to 63 can be used. In addition, a Dependent Quantization (DQ) method that uses two quantizers instead of a single quantizer can be applied. DQ performs quantization using two quantizers (e.g., Q0 and Q1), but even without signaling information about the use of a specific quantizer, the quantizer to be used for the next transform coefficient can be selected based on the current state through a state transition model.
[0075] The entropy encoding unit (150) can generate a bitstream by performing entropy encoding according to a probability distribution on values produced by the quantization unit (140) or coding parameter values produced during the encoding process, and can output the bitstream. The entropy encoding unit (150) can perform entropy encoding on information about image samples and information for decoding the image. For example, the information for decoding the image can include syntax elements, etc.
[0076] When entropy encoding is applied, a small number of bits are allocated to symbols with a high occurrence probability, and a large number of bits are allocated to symbols with a low occurrence probability, thereby representing the symbols, whereby the size of the bit string for the symbols to be encoded can be reduced. The entropy encoding unit (150) can use an encoding method such as exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), or Context-Adaptive Binary Arithmetic Coding (CABAC) for entropy encoding. For example, the entropy encoding unit (150) can perform entropy encoding using a Variable Length Coding / Code (VLC) table. In addition, the entropy encoding unit (150) may perform arithmetic encoding using the binarization method, probability model, and context model derived from the binarization method of the target symbol and the probability model of the target symbol / bin.
[0077] In this regard, when applying CABAC, the table probability update method can be changed to a simple formula-based table update method to reduce the size of the probability table stored in the decryption device. Furthermore, two different probability models can be used to obtain more accurate symbol probability values.
[0078] The entropy encoding unit (150) can change a two-dimensional block form coefficient into a one-dimensional vector form through a transform coefficient scanning method to encode a transform coefficient level (quantized level).
[0079] Coding parameters may include not only information (flags, indexes, etc.) encoded in an encoding device (100) and signaled to a decoding device (200), such as syntax elements, but also information derived during an encoding process or a decoding process, and may mean information necessary when encoding or decoding an image.
[0080] Here, signaling a flag or index may mean that the encoder entropy encodes the flag or index and includes it in the bitstream, and that the decoder entropy decodes the flag or index from the bitstream.
[0081] The encoded current image can be used as a reference image for other images to be processed later. Accordingly, the encoding device (100) can reconstruct or decode the encoded current image again and store the reconstructed or decoded image as a reference image in the reference picture buffer (190).
[0082] The quantized level can be dequantized in the dequantization unit (160) and inversely transformed in the inverse transformation unit (170). The dequantized and / or inversely transformed coefficients can be combined with a prediction block through an adder (117), and a reconstructed block can be generated by combining the dequantized and / or inversely transformed coefficients and the prediction block. Here, the dequantized and / or inversely transformed coefficients refer to coefficients on which at least one of dequantization and inverse transformation has been performed, and may refer to a reconstructed residual block. The dequantization unit (160) and the inverse transformation unit (170) can be performed in the reverse process of the quantization unit (140) and the transformation unit (130).
[0083] The restoration block may pass through a filter unit (180). The filter unit (180) may apply a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter (ALF), a bilateral filter (BIF), a Luma Mapping with Chroma Scaling (LMCS), etc. as a filtering technique, in whole or in part, to the restoration sample, restoration block, or restoration image. The filter unit (180) may also be referred to as an in-loop filter. In this case, the in-loop filter is also used as a name excluding LMCS.
[0084] A deblocking filter can remove block distortion that occurs at the boundaries between blocks. Whether to apply a deblocking filter to the current block can be determined based on the samples contained in several columns or rows within the block. When applying a deblocking filter to a block, different filters can be applied depending on the required deblocking filtering strength.
[0085] Sample adaptive offset can be used to compensate for encoding errors by adding an appropriate offset value to sample values. Sample adaptive offset can compensate for the offset from the original image on a sample-by-sample basis for deblocked images. This can be done by dividing the samples contained in the image into a fixed number of regions, determining the regions to be offset, and applying the offset to those regions. Alternatively, the offset can be applied by considering the edge information of each sample.
[0086] Bilateral filter (BIF) can also compensate for the offset from the original image on a sample-by-sample basis for the deblocked image.
[0087] An adaptive loop filter can perform filtering based on a comparison between a reconstructed image and the original image. By dividing the samples contained in the image into predetermined groups and determining the filter to be applied to each group, filtering can be performed differentially for each group. Information regarding whether to apply an adaptive loop filter can be signaled for each coding unit (CU), and the shape and filter coefficients of the adaptive loop filter applied to each block can vary.
[0088] In LMCS (Luma Mapping with Chroma Scaling), luma mapping (LM) refers to remapping luminance values through a piece-wise linear model, and chroma scaling (CS) refers to a technique that scales the residual values of chrominance components according to the average luminance value of the prediction signal. In particular, LMCS can be utilized as an HDR correction technique that reflects the characteristics of HDR (High Dynamic Range) images.
[0089] The restored block or restored image that has passed through the filter unit (180) may be stored in the reference picture buffer (190). The restored block that has passed through the filter unit (180) may be a part of the reference image. In other words, the reference image may be a restored image composed of restored blocks that have passed through the filter unit (180). The stored reference image may be used for inter-screen prediction or motion compensation thereafter.
[0090] Figure 2 is a block diagram showing the configuration according to one embodiment of a decryption device to which the present invention is applied.
[0091] The decoding device (200) may be a decoder, a video decoding device, or an image decoding device.
[0092] Referring to FIG. 2, the decoding device (200) may include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an intra prediction unit (240), a motion compensation unit (250), an adder (201), a switch (203), a filter unit (260), and a reference picture buffer (270).
[0093] The decoding device (200) can receive a bitstream output from the encoding device (100). The decoding device (200) can receive a bitstream stored in a computer-readable recording medium, or a bitstream streamed through a wired / wireless transmission medium. The decoding device (200) can perform decoding on the bitstream in intra mode or inter mode. In addition, the decoding device (200) can generate a restored image or a decoded image through decoding, and can output the restored image or the decoded image.
[0094] If the prediction mode used for decryption is intra mode, the switch (203) can be switched to intra. If the prediction mode used for decryption is inter mode, the switch (203) can be switched to inter.
[0095] The decoding device (200) can decode the input bitstream to obtain a reconstructed residual block and generate a prediction block. Once the reconstructed residual block and the prediction block are obtained, the decoding device (200) can generate a reconstructed block to be decoded by adding the reconstructed residual block and the prediction block. The block to be decoded may be referred to as a current block.
[0096] The entropy decoding unit (210) can generate symbols by performing entropy decoding according to a probability distribution for the bitstream. The generated symbols may include symbols in the form of quantized levels. Here, the entropy decoding method may be the reverse process of the entropy encoding method described above.
[0097] The entropy decoding unit (210) can change a one-dimensional vector-shaped coefficient into a two-dimensional block-shaped coefficient through a transform coefficient scanning method to decode a transform coefficient level (quantized level).
[0098] The quantized level can be inversely quantized in the inverse quantization unit (220) and inversely transformed in the inverse transformation unit (230). The quantized level can be generated as a restored residual block as a result of performing inverse quantization and / or inverse transformation. At this time, the inverse quantization unit (220) can apply a quantization matrix to the quantized level. The inverse quantization unit (220) and inverse transformation unit (230) applied to the decoding device can apply the same technology as the inverse quantization unit (160) and inverse transformation unit (170) applied to the encoding device described above.
[0099] When intra mode is used, the intra prediction unit (240) can generate a predicted block by performing spatial prediction on the current block using sample values of already decoded blocks surrounding the block to be decoded. The intra prediction unit (240) applied to the decoding device can apply the same technology as the intra prediction unit (120) applied to the encoding device described above.
[0100] When the inter mode is used, the motion compensation unit (250) can generate a prediction block by performing motion compensation using a motion vector and a reference image stored in the reference picture buffer (270) on the current block. The motion compensation unit (250) can generate a prediction block by applying an interpolation filter to a portion of the reference image when the value of the motion vector does not have an integer value. In order to perform motion compensation, it is possible to determine whether the motion compensation method of the prediction unit included in the corresponding encoding unit is skip mode, merge mode, AMVP mode, or current picture reference mode based on the encoding unit, and motion compensation can be performed according to each mode. The motion compensation unit (250) applied to the decoding device can apply the same technology as the motion compensation unit (122) applied to the encoding device described above.
[0101] The adder (201) can add the restored residual block and the predicted block to generate a restored block. The filter unit (260) can apply at least one of an Inverse-LMCS, a deblocking filter, a sample adaptive offset, and an adaptive loop filter to the restored block or restored image. The filter unit (260) applied to the decoding device can apply the same filtering technology as that applied to the filter unit (180) applied to the encoding device described above.
[0102] The filter unit (260) can output a restored image. The restored block or restored image can be stored in the reference picture buffer (270) and used for inter prediction. The restored block that has passed through the filter unit (260) can be a part of the reference image. In other words, the reference image can be a restored image composed of restored blocks that have passed through the filter unit (260). The stored reference image can be used for inter-screen prediction or motion compensation thereafter.
[0103] FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.
[0104] 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.
[0105] 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.
[0106] 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.
[0107] The encoding unit (12) can encode the input video / image. The encoding unit (12) can perform a series of procedures such as prediction, transformation, and quantization for compression and encoding efficiency. The encoding unit (12) can output encoded data (encoded video / image information) in the form of a bitstream. The detailed configuration of the encoding unit (12) can also be configured in the same manner as the encoding device (100) of FIG. 1 described above.
[0108] The transmission unit (13) can transmit encoded video / image information or data output in the form of a bitstream to the reception unit (21) of the decoding device (20) via a digital storage medium or a network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit (13) can include an element for generating a media file through a predetermined file format and can include an element for transmission via a broadcasting / communication network. The reception unit (21) can extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit (22).
[0109] 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). The detailed configuration of the decoding unit (22) can also be configured in the same manner as the decoding device (200) of FIG. 2 described above.
[0110] The rendering unit (23) can render the decrypted video / image. The rendered video / image can be displayed through the display unit.
[0111]
[0112] A coefficient sign prediction method may be a method of predicting the sign of a residual coefficient based on the discontinuity between reconstructed samples located at the upper and left boundaries of a current block and the reconstructed samples of the upper and left blocks of the current block. Here, the discontinuity between the reconstructed samples at the upper and left boundaries of the current block and the reconstructed samples of the upper and left blocks of the current block may be measured by a cost function.
[0113] The coefficient sign prediction technique can use the sign that minimizes the cost function among all possible combinations of negative or positive signs of the residual coefficients to which coefficient sign prediction can be applied as the predicted value.
[0114] Hereinafter, with reference to FIGS. 4 to 8, a coefficient sign prediction method according to an embodiment of the present invention will be described in detail.
[0115]
[0116] FIG. 4 is a diagram for explaining a cost function of a coefficient sign prediction method according to an embodiment of the present invention.
[0117] Referring to FIG. 4, the coefficient sign of the residual coefficient may be determined based on the discontinuity between at least some of the reconstructed samples (420) located adjacent to the current block among the reconstructed samples of blocks adjacent to the top and left of the current block (410) and the reconstructed samples (430) of the top and left boundaries of the current block (410). Here, at least some of the reconstructed samples among the samples (430) located at the top and left boundaries of the current block may be referred to as sign candidate samples.
[0118] A cost function for measuring discontinuity between samples (420) located adjacent to the current block and sign candidate samples can be defined as follows:
[0119]
[0120] Here, R x,1 means the reconstructed sample of the upper row of the current block (410), and R 1,y may mean a reconstructed sample of the left column of the current block (410). R x,0 means the sample located at the top of Rx,1 among the reconstructed samples of the block adjacent to the top of the current block. And, R x,-1 Among the reconstructed samples of the blocks adjacent to the top of the current block, R x,0 Shows the sample located at the top.
[0121] Also, R 0,y Among the reconstructed samples of the block adjacent to the left of the current block, R 1,y It means the sample located on the left side of R. And, R -1,y Among the reconstructed samples of the block adjacent to the left of the current block, R 0,y Shows the sample located on the left.
[0122] x, y can indicate the horizontal and vertical coordinates of the sample, and w, h can indicate the width and height of the current block, respectively.
[0123]
[0124] Reconstructed samples (R) of the current block (410) of mathematical expression 1 x,1 , R 1,y ) by replacing the predicted value P and the sum of the residual value r, the cost function can be defined as the mathematical formula below.
[0125]
[0126] Through the cost function transformed as in Equation 2, (-R) of Equation 1 x,-1 + 2R x,0 - R x,1 ) and (-R -1,y + 2R 0,y - R 1,y) can be computed only once per block. Therefore, the complexity of coefficient sign prediction can be reduced.
[0127] A flag indicating whether the sign of the predicted residual coefficient is the same as the sign of the actual residual coefficient based on the cost function can be generated. The flag indicating whether the sign of the predicted residual coefficient is the same as the sign of the actual residual coefficient can be encoded as a context-coded bin.
[0128] Coefficient sign prediction can be performed within the upper left SPAreaW x SPAreaH region of the current block and / or the current transform block. The upper left SPAreaW x SPAreaH region where coefficient sign prediction is performed can be defined as a sign prediction area or a coefficient sign prediction area. In addition, coefficient sign prediction can be performed only for NumSPCoeff residual coefficients in the order of increasing quantization index (qIdx). Here, SPAreaW, SPAreaH, and NumSPCoeff are any positive integers that can indicate the width, height, and number of coefficients to which coefficient sign prediction is to be applied (i.e., the number of target coefficients, which are coefficients corresponding to the coefficient sign prediction target), respectively. The larger the quantization index qIdx, the larger the absolute value of the actual coefficient can be.
[0129] For dependent quantization using two quantizers, the quantization index qIdx can be computed as follows to compensate for the influence of multiple quantizers.
[0130]
[0131] Here, level can indicate the level value of the coefficient transmitted from the encoder and the level value of the residual coefficient parsed from the bitstream by the decoder. In addition, state can indicate a variable that is determined to a specific value as a result of dependent quantization / dequantization performed by the encoder and decoder.
[0132] SPAreaW and SPAreaH, which represent coefficient sign prediction areas, can be set based on one or more surrounding information such as coding environment settings (configuration) in the encoder, image resolution, intra prediction mode / inter prediction mode, and QP (quantization parameter), as shown in Table 1.
[0133]
[0134] Information about SPAreaW and SPAreaH set based on what is defined in Table 1 can be signaled through upper layers such as sequence parameter set (SPS), picture parameter set (PPS), slice header, and picture header. A decoder can perform a decoding operation using information about signaled SPAreaW and SPAreaH.
[0135] And, SPAreaW and SPAreaH representing coefficient sign prediction areas can be updated using the width TbW and height TbH of the current block and / or the transform block according to the mathematical formulas below.
[0136]
[0137]
[0138] The number of coefficients corresponding to the coefficient sign prediction target, i.e., the number of target coefficients, NumSPCoeff, can be set to an arbitrary value in the encoder and / or decoder. Alternatively, the number of target coefficients, NumSPCoeff, can be signaled in the encoder through a higher layer such as a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, or a picture header. The decoder can perform a decoding operation using information about the signaled NumSPCoeff.
[0139] NumSPCoeff, which indicates the number of target coefficients corresponding to the coefficient sign prediction target, can be updated based on the number of non-zero coefficients in the current block and / or transform block according to the mathematical formula below.
[0140]
[0141] Here, TbNumNzCoeff can indicate the number of non-zero coefficients in the current block and / or transform block.
[0142]
[0143] According to one embodiment of the present invention, coefficient sign prediction can be performed by determining a coefficient sign prediction region for a block to which various transformations have been applied. According to one embodiment of the present invention, the coefficient sign prediction region can be determined based on a transformation type.
[0144] In the transform stage of the video encoding process, various transform methods can be applied to the current block, such as a separable primary transform, a combination of a separable primary transform and a non-separable secondary transform, and a non-separable primary transform. Here, in order to reduce computational complexity and memory usage, zeroing, which converts some coefficients of the current block to 0, can be applied. When a separable primary transform is applied in the horizontal and vertical directions to a transform block with a side length of 32, only the transform coefficients of 16 columns and rows from the (0, 0) position of the transform block can remain, and all other coefficients can be converted to 0. For example, in the case of a transform block with a size of 32 x 32 to which a separable primary transform is applied in the horizontal and vertical directions, only the transform coefficients within the 16 x 16 area in the upper left from the (0, 0) position can remain, and all other coefficients can be converted to 0. Therefore, a 16 x 16 sized area located at the upper left of the transformation block can be defined as the valid area after zeroing.
[0145] As another example, for a 32 x 8 sized transform block to which a separate first-order transform is applied in the horizontal and vertical directions, only the transform coefficients within the 16 x 8 sized region to the left of the position (0, 0) remain, and all other coefficients can be converted to 0. Therefore, the 16 x 8 sized region located on the left of the transform block can be defined as the valid region after zeroing.
[0146] In addition, when applying a transformation in the horizontal and vertical directions to a transformation block with a side length of 64, only the transformation coefficients of 32 columns and rows from the (0, 0) position of the transformation block may remain, and all other coefficients may be converted to 0. For example, in the case of a transformation block with a size of 64 x 64 to which a transformation is applied in the horizontal and vertical directions, only the transformation coefficients within an area of a size of 32 x 32 in the upper left from the (0, 0) position may remain, and all other coefficients may be converted to 0. Therefore, an area of a size of 32 x 32 located at the upper left of the transformation block may be defined as a valid area after zeroing.
[0147] As another example, for a 64 x 16 transform block with separate first-order transforms applied in the horizontal and vertical directions, only the transform coefficients within the 32 x 16 area to the left of the position (0, 0) remain, and all other coefficients can be converted to 0. Therefore, the 32 x 16 area located on the left of the transform block can be defined as the valid area after zeroing.
[0148]
[0149] The non-separable primary transform (NSPT) is a technique that, unlike existing transformation methods, applies a non-separable transformation to the primary transform. Zeroing can also be performed during the non-separable primary transform process to reduce computational complexity and memory usage. One example of a non-separable primary transform is described below.
[0150]
[0151] FIG. 5 is a diagram for explaining a non-separable first-order transformation applied to each block size according to one embodiment of the present invention.
[0152] Referring to Fig. 5, for blocks whose width or height is 4 and whose sizes are 4 x 16 and 16 x 4 or less, a non-separable first-order transform corresponding to the block size may be applied. On the other hand, for blocks whose width or height is 4 and whose sizes exceed 4 x 16 and 16 x 4, a DCT-II transform and a non-separable second-order transform, LFNST 4, may be applied. That is, for blocks whose width or height is 4 and whose sizes exceed 4 x 16 and 16 x 4, a non-separable first-order transform may not be applied.
[0153] Also, for blocks whose width or height is 8 and whose sizes are 8 x 16 and 16 x 8 or less, a non-separable first-order transform corresponding to the block size can be applied. On the other hand, for blocks whose width or height is 8 and whose sizes exceed 8 x 16 and 16 x 8, a DCT-II transform and a non-separable second-order transform LFNST 8 can be applied. That is, for blocks whose width or height is 8 and whose sizes exceed 8 x 16 and 16 x 8, a non-separable first-order transform may not be applied.
[0154] The size of the non-separable first-order transform kernel applied according to block size, the number of transform coefficients to be zeroed, and the number of residual transform coefficients after zeroing can be as shown in Table 2.
[0155]
[0156] Zeroing during non-separable transformation and non-separable transformation can be performed as follows.
[0157]
[0158] FIG. 6 is a diagram for explaining a zeroing method in non-separable transformation according to one embodiment of the present invention.
[0159] Referring to Fig. 6, the transform coefficients of the input block to be non-separably transformed can be scanned in a fixed direction and rearranged into a one-dimensional vector in the form of 1 x M. Here, the fixed direction can be one of the row-major direction, the column-major direction, and the diagonal direction. Here, M can be (TbW x TbH), which is the product of the width and height of the input block of the transformation. Alternatively, M can be the product of the width and height of a fixed region-of-interest (ROI) within the transformation block.
[0160] An M x N transform kernel can be applied to a rearranged 1 x M vector, where N can be a positive integer less than or equal to M. If M is greater than N, the high-frequency transform coefficients can be zeroed out. The result of the transform can be a one-dimensional vector of the form 1 x N.
[0161] The 1-dimensional vector in the form of 1 x N generated as a result of the transformation can be rearranged into a 2-dimensional form by scanning in a predetermined direction in block units or CG (coefficient group) units. Here, the predetermined direction can be one of the directions such as the row-major direction, the column-major direction, and the diagonal direction.
[0162] Figure 6 illustrates a case where zeroing is performed in a non-separable transform. As a result of performing zeroing in a non-separable transform, a specific region of a block may have zero or non-zero transform coefficients based on the block's (0, 0) position. On the other hand, the transform coefficients in the remaining regions may all be zero. Here, the region where non-zero transform coefficients exist can be referred to as a valid region.
[0163]
[0164] FIG. 7 is a drawing for explaining one embodiment of a transformation block applying a non-separable first-order transformation according to one embodiment of the present invention.
[0165] Referring to Fig. 7, the size of the transform block may be 8 x 8. When a non-separable first-order transform is performed on a transform block of size 8 x 8, the transform coefficients of the 8 x 8 transform block can be scanned in a predetermined direction and rearranged into a 1 x 64 vector. Then, a 64 x 32 transform kernel can be applied to the rearranged 1 x 64 vector. The 1 x 32 vector obtained as a result of performing the transform may be a residual transform coefficient. The 1 x 32 vector obtained as a result of performing the transform may be rearranged in a two-dimensional form by scanning in a predetermined direction. As a result, non-zero transform coefficients may be rearranged in a 4 x 8 sized area within the 8 x 8 transform block, and residual coding may be performed. Therefore, a 4 x 8 sized area where non-zero transform coefficients exist may be a valid area.
[0166]
[0167] According to one embodiment of the present invention, the coefficient sign prediction region can be determined according to the type of transformation. When a separation transformation is applied to the current block, the coefficient sign prediction region of the block is W S x H S can be determined as W. Or, if a separable transformation and a non-separable transformation are applied together to the current block, the coefficient sign prediction region of the block is W SN x H SN can be determined as follows. When a non-separable transformation is applied to the current block, the coefficient sign prediction region of the block is W N x H N can be defined as
[0168] According to one embodiment, W indicates the size of the coefficient sign prediction region. S , H S , W SN , H SN , W N , H N can be any positive integer.
[0169] According to another embodiment, W indicates the size of the coefficient sign prediction region. S , H S , W SN , H SN , W N , H N can be set based on one or more surrounding information such as coding environment settings (configuration), class of image, resolution of image, intra prediction mode / inter prediction mode, QP (quantization parameter), etc.
[0170] According to another embodiment, W indicates the size of the coefficient sign prediction region. S , H S , W SN , H SN , W N , H N can be independently signaled through upper layers such as sequence parameter set (SPS), picture parameter set (PPS), slice header, and picture header in the encoder.
[0171] According to another embodiment, W indicates the size of the coefficient sign prediction region defined according to the type of transformation applied to the block. S , H S , W SN , H SN , W N , H N can be signaled dependently on information indicating the size of the coefficient sign prediction region for a particular transform type.
[0172] According to another embodiment, W indicates the size of the coefficient sign prediction region. S , H S , W SN , H SN , W N , H NThe combination used in the current block can be determined by an index among combinations defined according to the transformation type. Here, the transformation type can be determined through transformation-related syntax elements including block size or / and transformation flags, transformation indexes, etc.
[0173]
[0174] According to one embodiment, the size of the coefficient sign prediction region SPAreaW x SPAreaH can be updated according to the following mathematical formulas.
[0175]
[0176]
[0177] Here, TbW can indicate the width of the transform block, and TbH can indicate the height of the transform block. That is, the size of the coefficient sign prediction area SPAreaW is W X and the width of the transformation block TbW is updated to the smaller value, and SPAreaH is H X and the height of the transformation block TbH can be updated to a smaller value. Here, the subscript X can be S for a block to which a separable transformation is applied, SN for a block to which a separable transformation and a non-separable transformation are applied, and N for a block to which a non-separable transformation is applied.
[0178] According to another embodiment, the size of the coefficient sign prediction region SPAreaW x SPAreaH can be updated according to the following mathematical formulas.
[0179]
[0180]
[0181] That is, the size of the coefficient sign prediction area SPAreaW is W X and the width of the valid area ZoTbW is updated to the smaller value, and SPAreaH is H Xand the height of the valid area ZoTbH can be updated to a smaller value. Here, the subscript X can be S for a block with a separable transformation applied, SN for a block with a separable and non-separable transformation applied, and N for a block with a non-separable transformation applied.
[0182] According to one embodiment of the present invention, a coefficient sign prediction region for a current block can be adaptively set according to various transform types applied to the current block. In addition, by updating the size value of the coefficient sign prediction region using the width or height of the transform block and the width or height of the effective region after zeroing, the coefficient sign prediction region can be determined more efficiently. In addition, by determining the coefficient sign prediction region based on the effective region, unnecessary coefficient scans can be avoided and coding complexity can be reduced.
[0183]
[0184] According to one embodiment of the present invention, the number of coefficients corresponding to the coefficient sign prediction target can be determined according to the type of transformation. When a separation transformation is applied to the current block, the number of target coefficients is N s can be determined as N. Or, if both separable and non-separable transformations are applied to the current block, the number of target coefficients is N. SN can be determined as follows. If a non-separable transformation is applied to the current block, the number of target coefficients is N N can be defined as
[0185] In one embodiment, N indicates the number of target coefficients. s , N SN , N N can be any positive integer.
[0186] In another embodiment, N indicates the number of target coefficients s , N SN , N Ncan be set based on one or more surrounding information such as coding environment settings (configuration), class of image, resolution of image, intra prediction mode / inter prediction mode, QP (quantization parameter), etc.
[0187] In another embodiment, N indicates the number of target coefficients s , N SN , N N can be independently signaled through upper layers such as sequence parameter set (SPS), picture parameter set (PPS), slice header, and picture header in the encoder.
[0188] According to another embodiment, N indicates the number of target coefficients defined according to the type of transformation applied to the block. s , N SN , N N can be signaled dependently on information indicating the number of target coefficients for a particular type of transformation.
[0189] In another embodiment, N indicates the number of target coefficients s , N SN , N N The combination used in the current block can be determined by an index among combinations defined according to the transformation type. Here, the transformation type can be determined through transformation-related syntax elements including block size or / and transformation flags, transformation indexes, etc.
[0190]
[0191] According to one embodiment, the number of target coefficients NumSPCoeff can be updated according to the following mathematical formula.
[0192]
[0193] Here, TbNumNzCoeff can indicate the number of non-zero coefficients in the transform block. That is, the number of target coefficients NumSPCoeff is N X and TbNumNzCoeff can be updated to a smaller value. Here, the subscript X can be S for a block to which a separable transformation is applied, SN for a block to which a separable and non-separable transformation is applied, and N for a block to which a non-separable transformation is applied.
[0194] According to another embodiment, the number of target coefficients NumSPCoeff can be updated according to the following mathematical formula.
[0195]
[0196] Here, SPNumNzCoeff can indicate the number of non-zero coefficients within the determined coefficient sign prediction region. That is, the number of target coefficients, NumSPCoeff, is N X and SPNumNzCoeff can be updated to a smaller value. Here, the subscript X can be S for a block to which a separable transformation is applied, SN for a block to which a separable and non-separable transformation is applied, and N for a block to which a non-separable transformation is applied.
[0197] According to another embodiment, the number of target coefficients NumSPCoeff can be updated according to the following mathematical formula.
[0198]
[0199] Here, ZoNumNzCoeff can indicate the number of non-zero coefficients in the valid region after zeroing. That is, the number of target coefficients, NumSPCoeff, is N X and ZoNumNzCoeff can be updated to a smaller value. Here, the subscript X can be S for a block to which a separable transformation is applied, SN for a block to which a separable and non-separable transformation is applied, and N for a block to which a non-separable transformation is applied.
[0200]
[0201] According to one embodiment of the present invention, the number of coefficients corresponding to coefficient sign prediction targets can be adaptively set according to various transform types applied to the current block. In addition, the number of target coefficients for efficiently performing coefficient sign prediction can be determined using the number of non-zero coefficients within the transform block, the coefficient sign prediction region, or the valid region after zeroing. Therefore, the complexity of encoding and / or decoding can be reduced.
[0202] Furthermore, according to existing coefficient sign prediction methods, pixels are reconstructed based on all possible combinations of negative and positive signs for each coefficient, and the combination that minimizes the cost function is selected. In contrast, according to one embodiment of the present invention, the number of coefficients for coefficient sign prediction is adaptively determined, thereby reducing encoding and / or decoding complexity as well as memory usage.
[0203]
[0204] Figure 8 is a flowchart illustrating an image decoding method according to an embodiment of the present invention. The image decoding method of Figure 8 can be performed by an image decoding device.
[0205] The conversion type of the current block can be determined (S810).
[0206] Based on the conversion type, the coefficient sign prediction target of the current block can be determined (S820).
[0207] And, the sign of the coefficient corresponding to the coefficient sign prediction target can be predicted (S830).
[0208] Here, the coefficient sign prediction target can be specified as a coefficient sign prediction area or the number of coefficients corresponding to the coefficient sign prediction target.
[0209] Here, the transformation type of the current block can represent any one of a separable transformation, a non-separable transformation, or a combination of a separable transformation and a non-separable transformation.
[0210] Here, the coefficient corresponding to the coefficient sign prediction target may be a coefficient located within the coefficient sign prediction region.
[0211] Here, the size of the coefficient sign prediction area of the current block can be determined based on the transformation type of the current block.
[0212] Here, the size of the coefficient sign prediction region of the current block can be determined based on a comparison result between the size of the coefficient sign prediction region determined based on the transformation type of the current block and the size of the current block.
[0213] Here, the size of the coefficient sign prediction region of the current block can be determined based on the result of a comparison between the size of the coefficient sign prediction region determined based on the transformation type of the current block and the size of the valid region, which is an area including non-zero coefficients within the current block.
[0214] The method for determining the size of the coefficient sign prediction area of the current block is as described in Equations 7 to 10 and related descriptions.
[0215] Here, the number of coefficients corresponding to the coefficient sign prediction target can be determined based on the transformation type of the current block.
[0216] Here, the number of coefficients corresponding to the coefficient sign prediction target can be determined based on the result of a comparison between the number of coefficients corresponding to the coefficient sign prediction target, which is determined based on the transformation type of the current block, and the number of non-zero coefficients of the current block.
[0217] Here, the number of coefficients corresponding to the coefficient sign prediction target can be determined based on a comparison result between the number of coefficients corresponding to the coefficient sign prediction target, which is determined based on the transformation type of the current block, and the number of non-zero coefficients included in the valid area within the current block.
[0218] Here, the number of coefficients corresponding to the coefficient sign prediction target can be determined based on the result of a comparison between the number of coefficients corresponding to the coefficient sign prediction target, which is determined based on the transformation type of the current block, and the number of non-zero coefficients included in the coefficient sign prediction region. Here, the coefficient sign prediction region can be determined based on the transformation type of the current block.
[0219] The method for determining the number of coefficients corresponding to the coefficient sign prediction target is as described in Equations 11 to 13 and related descriptions.
[0220] Meanwhile, the steps described in FIG. 8 can be performed in the same manner in an image encoding method. Furthermore, a bitstream can be generated by an image encoding method including the steps described in FIG. 8. The bitstream can be stored on a non-transitory computer-readable recording medium and can also be transmitted (or streamed).
[0221]
[0222] FIG. 9 is a drawing exemplarily showing a content streaming system to which an embodiment according to the present invention can be applied.
[0223] As illustrated in FIG. 9, a content streaming system to which an embodiment of the present invention 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.
[0224] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and CCTVs into digital data, generates a bitstream, and transmits it to the streaming server. Alternatively, if multimedia input devices such as smartphones, cameras, and CCTVs directly generate bitstreams, the encoding server may be omitted.
[0225] The above bitstream can be generated by an image encoding method and / or an image encoding device to which an embodiment of the present invention is applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0226] 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.
[0227] 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.
[0228] 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.
[0229] 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.
[0230]
[0231] The above embodiments can be performed in the same or corresponding manner in an encoding device and a decoding device. In addition, an image can be encoded / decoded using at least one or a combination of at least one of the above embodiments.
[0232] The order in which the above embodiments are applied may be different in the encoding device and the decoding device. Alternatively, the order in which the above embodiments are applied may be the same in the encoding device and the decoding device.
[0233] The above embodiments can be performed for each of the luminance and chrominance signals. Alternatively, the above embodiments can be performed identically for the luminance and chrominance signals.
[0234] In the above embodiments, the methods are described based on a flowchart as a series of steps or units. However, the present invention is not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will understand that the steps depicted in the flowchart are not exclusive, and that other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention.
[0235] The above embodiments may be implemented in the form of program commands that can be executed by various computer components and recorded on a computer-readable recording medium. The computer-readable recording medium may include program commands, data files, data structures, etc., either singly or in combination. The program commands recorded on the computer-readable recording medium may be those specifically designed and constructed for the present invention, or may be known and usable by those skilled in the art of computer software.
[0236] The bitstream generated by the encoding method according to the above embodiment can be stored in a non-transitory computer-readable recording medium. In addition, the bitstream stored in the non-transitory computer-readable recording medium can be decoded by the decoding method according to the above embodiment.
[0237] Here, examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program instructions such as ROMs, RAMs, and flash memories. Examples of program instructions include not only machine language codes such as those generated by a compiler, but also high-level language codes that can be executed by a computer using an interpreter, etc. The hardware devices may be configured to operate as one or more software modules to perform processing according to the present invention, and vice versa.
[0238] Although the present invention has been described above with specific details such as specific components and limited examples and drawings, these are provided only to help a more general understanding of the present invention, and the present invention is not limited to the above examples, and those with ordinary knowledge in the technical field to which the present invention pertains can make various modifications and variations from this description.
[0239] Therefore, the idea of the present invention should not be limited to the embodiments described above, and all things that are modified equally or equivalently to the following claims as well as the claims are considered to fall within the scope of the idea of the present invention.
[0240] The present invention can be used in a device for encoding / decoding an image and a recording medium storing a bitstream.
Claims
1. In the video decryption method, Step for determining the transformation type of the current block; A step of determining a coefficient sign prediction target of the current block based on the above transformation type; and Including a step of predicting the sign of a coefficient corresponding to the coefficient sign prediction target, An image decoding method in which the coefficient sign prediction target is specified by the coefficient sign prediction area or the number of coefficients corresponding to the coefficient sign prediction target.
2. In paragraph 1, The conversion type of the current block above is, A method for decoding an image, characterized in that the transform represents any one of a separable transform, a non-separable transform, or a combination of a separable transform and a non-separable transform.
3. In paragraph 1, The coefficients corresponding to the coefficient sign prediction target are: An image decoding method, characterized in that the coefficient is located within the coefficient sign prediction area.
4. In paragraph 1, The size of the coefficient sign prediction area of the current block above is, An image decoding method, characterized in that the transformation type of the current block is determined based on the transformation type.
5. In paragraph 4, The size of the coefficient sign prediction area of the current block above is, An image decoding method, characterized in that the size of the coefficient sign prediction region is determined based on the transformation type of the current block and the result of a comparison between the size of the current block.
6. In paragraph 4, The size of the coefficient sign prediction area of the current block above is, An image decoding method, characterized in that the size of the coefficient sign prediction region determined based on the transformation type of the current block is compared with the size of the valid region, which is an region including non-zero coefficients in the current block.
7. In paragraph 1, The number of coefficients corresponding to the coefficient sign prediction target is An image decoding method, characterized in that the transformation type of the current block is determined based on the transformation type.
8. In paragraph 7, The number of coefficients corresponding to the coefficient sign prediction target is An image decoding method, characterized in that the number of coefficients corresponding to the coefficient sign prediction target, which is determined based on the transformation type of the current block, is determined based on the result of a comparison between the number of non-zero coefficients of the current block.
9. In paragraph 7, The number of coefficients corresponding to the coefficient sign prediction target is An image decoding method, characterized in that the determination is based on a comparison result between the number of coefficients corresponding to the coefficient sign prediction target, which is determined based on the transformation type of the current block, and the number of non-zero coefficients included in the valid area within the current block.
10. In paragraph 7, The number of coefficients corresponding to the coefficient sign prediction target is It is determined based on the result of a comparison between the number of coefficients corresponding to the coefficient sign prediction target, which is determined based on the transformation type of the current block, and the number of non-zero coefficients included in the coefficient sign prediction area. The above coefficient sign prediction area is, An image decoding method, characterized in that the transformation type of the current block is determined based on the transformation type.
11. In the video encoding method, Step for determining the transformation type of the current block; A step of determining a coefficient sign prediction target of the current block based on the above transformation type; and Including a step of predicting the sign of a coefficient corresponding to the coefficient sign prediction target, An image encoding method in which the coefficient sign prediction target is specified as a coefficient sign prediction area or the number of coefficients corresponding to the coefficient sign prediction target.
12. A non-transitory computer-readable recording medium storing a bitstream generated by a video encoding method, The above image encoding method is, Step for determining the transformation type of the current block; A step of determining a coefficient sign prediction target of the current block based on the above transformation type; and Including a step of predicting the sign of a coefficient corresponding to the coefficient sign prediction target, A non-transitory computer-readable recording medium, characterized in that the coefficient sign prediction target is specified as a coefficient sign prediction area or the number of coefficients corresponding to the coefficient sign prediction target.
13. A method for transmitting a bitstream generated by a video encoding method, The above transmission method comprises a step of transmitting the bitstream, The above image encoding method is, Step for determining the transformation type of the current block; A step of determining a coefficient sign prediction target of the current block based on the above transformation type; and Including a step of predicting the sign of a coefficient corresponding to the coefficient sign prediction target, A transmission method, characterized in that the coefficient sign prediction target is specified as a coefficient sign prediction area or the number of coefficients corresponding to the coefficient sign prediction target.
Citation Information
Patent Citations
Method and device for predicting residual sign in a transform domain
KR102419112B1
Method and device for harmonizing multi-sign bit hiding and residual sign prediction
KR102492116B1
KR20200116479A
KR20230038282A