WO2024262883A1 - Image encoding/decoding method and apparatus, and recording medium for storing bitstream - Google Patents
Image encoding/decoding method and apparatus, and recording medium for storing bitstream Download PDFInfo
- Publication number
- WO2024262883A1 WO2024262883A1 PCT/KR2024/008238 KR2024008238W WO2024262883A1 WO 2024262883 A1 WO2024262883 A1 WO 2024262883A1 KR 2024008238 W KR2024008238 W KR 2024008238W WO 2024262883 A1 WO2024262883 A1 WO 2024262883A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- intra prediction
- bins
- empty string
- encoding
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
- H04N19/105—Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/132—Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/593—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
Definitions
- 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 for a syntax element used in template-based multiple reference line (TMRL) intra prediction.
- TMRL template-based multiple reference line
- CABAC context-based adaptive binary arithmetic coding
- the purpose of the present invention is to provide a video encoding/decoding method and device with improved encoding/decoding efficiency.
- 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.
- the present invention aims to provide a prediction method for solving the problems of the existing entropy encoding with respect to syntactic elements used in template-based multiple reference line (TMRL) intra prediction.
- TMRL template-based multiple reference line
- a video decoding method may include the steps of: obtaining an empty string corresponding to a syntax element from a bitstream, the syntax element representing a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction, obtaining the syntax element by inversely binarizing the empty string, and performing intra prediction of the current block based on the syntax element, wherein at least some bins of the empty string are obtained by bypass decoding, and bins excluding bypass-coded bins of the empty string are obtained by arithmetic decoding.
- the intra prediction of the current block may be characterized by using an intra prediction mode indicated by the syntax element and a reference sample line indicated by the syntax element among a plurality of reference sample lines adjacent to the current block.
- the syntax element may be characterized by indicating one candidate from a candidate list including candidates indicating different combinations of intra prediction modes and reference sample lines used for intra prediction.
- the intra prediction modes of the candidates may be characterized as being intra prediction modes excluding a predetermined mode.
- the candidates in the candidate list may be characterized as being a plurality of candidates selected based on a cost value of intra prediction based on a combination of an intra prediction mode and a reference sample line.
- the cost value is determined based on a comparison result between a result value of intra prediction based on a combination of an intra prediction mode and a reference sample line and a prediction value corresponding to a template including samples adjacent to the current block.
- the template may be characterized by including samples of a reference sample line most adjacent to the current block.
- the cost value may be measured using any one of a sum of absolute differences (SAD) measurement method, a sum of squared difference (SSD) measurement method, and a sum of absolute transformed differences.
- SAD sum of absolute differences
- SSD sum of squared difference
- the empty string may be an empty string binarized in the form of a truncated Golomb Rice code, and the empty string may be characterized by including a prefix and a suffix.
- a bin corresponding to a prefix of the empty string is obtained by the arithmetic decoding, and a bin corresponding to a suffix of the empty string is obtained by the bypass decoding.
- the above image decoding method may be characterized in that at least some of the bins corresponding to the prefix of the empty string and the bins corresponding to the suffix of the empty string are obtained by the arithmetic decoding.
- the empty string may be an empty string binarized into a truncated single code form, and it may be characterized in that a number of bins less than or equal to a preset number among the empty strings are obtained by the arithmetic decoding.
- a video encoding method comprises the steps of: deriving a syntax element indicating a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction; generating an empty string by binarizing the syntax element; and generating a bitstream by encoding each bin of the empty string according to an encoding method corresponding to each bin, wherein bypass coding is applied to at least some bins of the empty string, and arithmetic coding is applied to bins other than bins to which bypass coding of the empty string is applied.
- a non-transitory computer-readable recording medium can store a bitstream generated by a video encoding method, including the steps of: deriving a syntax element indicating a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction; generating an empty string by binarizing the syntax element; and generating a bitstream by encoding each bin of the empty string according to an encoding method corresponding to each bin, wherein bypass coding is applied to at least some bins of the empty string, and arithmetic coding is applied to bins except for bins to which bypass coding of the empty string is applied.
- a transmission method includes a step of transmitting the bitstream
- an image encoding method includes a step of deriving a syntax element indicating a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction, a step of binarizing the syntax element to generate an empty string, and a step of generating a bitstream by encoding each bin of the empty string according to an encoding method corresponding to each bin, wherein bypass coding is applied to at least some bins of the empty string, and arithmetic coding is applied to bins other than bins to which bypass coding of the empty string is applied.
- a bitstream generated by the image encoding method can be transmitted.
- a video encoding/decoding method and device with improved encoding/decoding efficiency can be provided.
- an entropy encoding/decoding method for a syntactic element used in template-based multiple reference line (TMRL) intra prediction can be provided.
- an entropy encoding/decoding method can be provided that reduces the complexity of an encoder/decoder and improves throughput without significant loss of coding efficiency by reducing the number of context-coded bins when coding index values for TMRL intra prediction.
- Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.
- FIG. 2 is a block diagram showing the configuration of one embodiment of a decryption device to which the present invention is applied.
- FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.
- FIG. 4 is a diagram for explaining a CABAC encoding structure for a syntax element according to one embodiment of the present invention.
- FIG. 5 is a diagram for explaining a CABAC decoding structure for a syntax element according to one embodiment of the present invention.
- FIG. 6 is a diagram for explaining a template-based multi-reference sample line intra prediction method according to one embodiment of the present invention.
- FIG. 7 is a diagram for explaining intra-template matching according to one embodiment of the present invention.
- FIG. 8 is a flowchart illustrating an entropy decryption method according to an embodiment of the present invention.
- FIG. 9 is a flowchart illustrating an entropy encoding method according to an embodiment of the present invention.
- FIG. 10 is a drawing exemplarily showing a content streaming system to which an embodiment according to the present invention can be applied.
- first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are only used for the purpose of distinguishing one component from another.
- 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 a plurality of related described items or any item among a plurality of related described items.
- each component shown in the embodiments of the present invention are independently depicted to indicate different characteristic functions, and do not mean that each component is formed as a separate hardware or software configuration unit. 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 one component may be divided into multiple components to perform a function, and such integrated embodiments 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.
- the terminology used in the present invention is only 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.
- some components of the present invention are not essential components that perform essential functions in the present invention and may be optional components that merely enhance performance.
- the present invention may be implemented by including only essential components for implementing the essence of the present invention excluding components used only for enhancing performance, and a structure including only essential components excluding optional components used only for enhancing performance is also included in the scope of the present invention.
- the term "at least one” can mean one of a number greater than or equal to 1, such as 1, 2, 3, and 4.
- the term "a plurality of” can mean one of a number greater than or equal to 2, such as 2, 3, and 4.
- the target image may be an encoding target image that is a target of encoding and/or a decoding target image that is a target of decoding.
- the target image may be an input image input to an encoding device and may be an input image input to a decoding device.
- the target image may have the same meaning as the current image.
- encoder and image encoding device may be used interchangeably and have the same meaning.
- decoder and image decoding device may be used interchangeably and interchangeably.
- image may be used with the same meaning and may be used interchangeably.
- target block may be an encoding target block that is a target of encoding and/or a decoding target block that is a target of decoding.
- target block may be a current block that is a target of current encoding and/or decoding.
- target block and current block may be used with the same meaning and may be used interchangeably.
- a coding tree unit may be composed of one luma component (Y) coding tree block (CTB) and two chroma component (Cb, Cr) coding tree blocks related to it.
- sample may represent a basic unit constituting a block.
- Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.
- an 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).
- 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 through a wired/wireless transmission medium.
- 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 multiple tiles or slices, and then segmented again into multiple CTUs (Coding Tree Units). Alternatively, one picture can be segmented into multiple sub-pictures defined as groups of rectangular slices, and each sub-picture can 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.
- multiple sub-pictures can be individually restored, they have the advantage of being easy to edit in applications that configure multi-channel input into one picture.
- tiles can be segmented horizontally to generate bricks.
- a brick can be utilized as a basic unit of intra-picture parallel processing.
- one CTU can be recursively split into a quad tree (QT: Quadtree), and the terminal node of the split can be defined as a CU (Coding Unit).
- the CU can be split into a prediction unit (PU) and a transformation unit (TU) to perform prediction and splitting. Meanwhile, the CU can be utilized as a prediction unit and/or a transformation unit itself.
- each CTU can be recursively split into not only a quad tree (QT) but also a multi-type tree (MTT: Multi-Type Tree).
- MTT Multi-Type Tree
- 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 BT (Binary Tree) and a TT (Triple Tree).
- the MTT structure can be distinguished 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).
- the minimum block size (MinQTSize) of the quad tree of the luma 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.
- the minimum block size (MinBtSize) of the binary tree and the minimum block size (MinTtSize) of the triple tree can be set to 4x4
- the maximum depth (MaxMttDepth) of the multi-type tree can be set to 4.
- a dual tree that uses different CTU split structures for luma and chrominance components can be applied to improve the encoding efficiency of the I slice.
- the luminance and chrominance CTBs (Coding Tree Blocks) within the CTU can be split into a single tree sharing the coding tree structure.
- the encoding device (100) may perform encoding on the input image in the intra mode and/or the inter mode.
- 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 the inter mode.
- a third mode e.g., IBC mode, Palette mode, etc.
- the third mode may be classified as the intra mode or the inter mode for convenience of explanation. In the present invention, the third mode will be classified and described separately only when a specific explanation is required.
- 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.
- the intra mode can mean an intra-screen prediction mode
- 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.
- 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 which is a current encoding target.
- the input block can be referred to as a current block which is a current encoding target or an encoding target block.
- 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 sample, and can generate prediction samples for the input block through spatial prediction.
- intra prediction can mean prediction within the screen.
- non-directional prediction modes such as DC mode and Planar mode and directional prediction modes (e.g., 65 directions) can be applied.
- the intra prediction method can be expressed as an intra prediction mode or an intra-screen prediction 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 can derive a motion vector using the searched area. At this time, the search area can be used as the area.
- the reference image can be stored in the reference picture buffer (190).
- it when encoding/decoding for the reference image is processed, it can be stored in the reference picture buffer (190).
- 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 an area within a reference image when the value of a motion vector does not have an integer value.
- the AFFINE mode of sub-PU based prediction the AFFINE mode of sub-PU based prediction, the SbTMVP (Subblock-based Temporal Motion Vector Prediction) mode, and the MMVD (Merge with MVD) mode, the GPM (Geometric Partitioning Mode) mode of PU based prediction can be applied.
- the SbTMVP Subblock-based Temporal Motion Vector Prediction
- MMVD Merge with MVD
- GPM Gaometric Partitioning Mode
- the HMVP History based MVP
- the PAMVP Positionwise Average MVP
- the CIIP Combined Intra/Inter Prediction
- the AMVR Adaptive Motion Vector Resolution
- the BDOF Bi-Directional Optical-Flow
- the BCW Block Predictive with CU Weights
- the LIC Lical Illumination Compensation
- the TM Tempolate Matching
- the OBMC Overlapped Block Motion Compensation
- AFFINE mode is a technology that is used in both AMVP and MERGE modes and also has high encoding efficiency. Since the conventional video coding standard performs MC (Motion Compensation) 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 four-parameter affine motion model using two control point motion vectors (CPMV) and a six-parameter affine motion model using three control point motion vectors can be applied to inter prediction.
- CPMV is a vector representing an affine motion model of one of the upper left, upper right, and lower left of the current block.
- 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 mean the difference between the original signal and the predicted signal.
- 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.
- the transform unit (130) can perform a transform on the residual block to generate a transform coefficient and output the generated transform coefficient.
- the transform coefficient can be a coefficient value generated by performing a transform on the residual block.
- the transform unit (130) can also skip the transform on the residual block.
- a quantized level can be generated by applying quantization to a transform coefficient or a residual signal.
- a quantized level may also be referred to as a transform coefficient.
- a 4x4 luminance residual block generated through within-screen prediction can be transformed using a basis vector based on DST (Discrete Sine Transform), and a basis vector based on DCT (Discrete Cosine Transform) can be used to transform the remaining residual blocks.
- a transform block can be divided into a quad tree shape for one block using RQT (Residual Quad Tree) technology, 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.
- RQT Residual Quad Tree
- the Multiple Transform Selection (MTS) technique can be applied to perform transformation by selectively using multiple transformation bases. That is, instead of dividing the CU into TUs through the RQT, a function similar to TU division can be performed through the Sub-block Transform (SBT) technique.
- SBT Sub-block Transform
- the SBT is applied only to inter-screen prediction blocks, and unlike the RQT, the current block can be divided into 1 ⁇ 2 or 1 ⁇ 4 sizes in the vertical or horizontal direction, and then the transformation can be performed on only one of the blocks. For example, if it is divided vertically, the transformation can be performed on the leftmost or rightmost block, and if it is divided horizontally, the transformation can be performed on the topmost or bottommost block.
- LFNST Low Frequency Non-Separable Transform
- a secondary transform technique that additionally 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, so that the residual coefficients can be concentrated in the upper left.
- the quantization unit (140) can generate a quantized level by quantizing a transform coefficient or a 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.
- QP quantization parameter
- a quantizer using QP values of 0 to 51 can be used.
- 0 to 63 QP can be used.
- DQ Dependent Quantization
- DQ performs quantization using two quantizers (e.g., Q0 and Q1), and 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.
- 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 in 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, information for decoding the image can include syntax elements, etc.
- 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.
- CAVLC Context-Adaptive Variable Length Coding
- CABAC Context-Adaptive Binary Arithmetic Coding
- the entropy encoding unit (150) can perform entropy encoding using a Variable Length Coding/Code (VLC) table.
- VLC Variable Length Coding/Code
- the entropy encoding unit (150) may derive a binarization method of a target symbol and a probability model of a target symbol/bin, and then perform arithmetic encoding using the derived binarization method, probability model, and context model.
- the table probability update method when applying CABAC, in order to reduce the size of the probability table stored in the decryption device, the table probability update method can be changed to a table update method using a simple formula and applied.
- two different probability models can be used to obtain more accurate symbol probability values.
- 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).
- Coding parameters may include information (flags, indexes, etc.) encoded in an encoding device (100) and signaled to a decoding device (200), such as syntax elements, as well as information derived during an encoding process or a decoding process, and may mean information necessary when encoding or decoding an image.
- 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.
- the encoded current image can be used as a reference image for other images to be processed later. Therefore, the encoding device (100) can restore or decode the encoded current image again, and store the restored or decoded image as a reference image in the reference picture buffer (190).
- the quantized level can be dequantized in the dequantization unit (160) and inverse transformed in the inverse transform unit (170).
- the dequantized and/or inverse 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 inverse transformed coefficients and the prediction block.
- the dequantized and/or inverse transformed coefficients mean coefficients on which at least one of dequantization and inverse transformation has been performed, and may mean a reconstructed residual block.
- the dequantization unit (160) and the inverse transform unit (170) can be performed in the reverse process of the quantization unit (140) and the transform unit (130).
- 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), LMCS (Luma Mapping with Chroma Scaling), 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 called an in-loop filter. In this case, the in-loop filter is also used as a name excluding LMCS.
- the deblocking filter can remove block distortion that occurs at the boundary between blocks.
- different filters can be applied depending on the required deblocking filtering strength.
- a sample adaptive offset can be used to add an appropriate offset value to the sample value to compensate for the encoding error.
- the sample adaptive offset can correct the offset from the original image on a sample basis for the image on which deblocking has been performed.
- a method can be used in which the samples included in the image are divided into a certain number of regions, and then the region to be offset is determined and the offset is applied to the region, or a method can be used in which the offset is applied by considering the edge information of each sample.
- Bilateral filter can also compensate for the offset from the original image on a sample-by-sample basis for the deblocked image.
- An adaptive loop filter can perform filtering based on a comparison value between a restored image and an original image. After dividing samples included in an image into a predetermined group, a filter to be applied to each group can be determined, and filtering can be performed differentially for each group. Information related to 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 to be applied can vary for each block.
- CU coding unit
- LMCS Luma Mapping with Chroma Scaling
- LM luma mapping
- CS chroma scaling
- LMCS can be utilized as an HDR correction technique that reflects the characteristics of HDR (High Dynamic Range) images.
- 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.
- 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.
- FIG. 2 is a block diagram showing the configuration of one embodiment of a decryption device to which the present invention is applied.
- the decoding device (200) may be a decoder, a video decoding device, or an image decoding device.
- 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).
- an entropy decoding unit (210) 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).
- 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 can receive a bitstream streamed through a wired/wireless transmission medium.
- the decoding device (200) can perform decoding on the bitstream in an intra mode or an inter mode.
- 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.
- 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.
- the decoding device (200) can obtain a reconstructed residual block by decoding the input bitstream and can generate a prediction block. When 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 decoding target block can be referred to as a current block.
- the entropy decoding unit (210) can generate symbols by performing entropy decoding according to a probability distribution for the bitstream.
- the generated symbols can include symbols in the form of quantized levels.
- the entropy decoding method can be the reverse process of the entropy encoding method described above.
- 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).
- the quantized level can be dequantized in the dequantization unit (220) and detransformed in the inverse transform unit (230).
- the quantized level can be generated as a restored residual block as a result of the dequantization and/or detransformation.
- the dequantization unit (220) can apply a quantization matrix to the quantized level.
- the dequantization unit (220) and the detransform unit (230) applied to the decoding device can apply the same technology as the dequantization unit (160) and the detransform unit (170) applied to the encoding device described above.
- the intra prediction unit (240) can generate a prediction 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.
- the motion compensation unit (250) can perform motion compensation using a motion vector and a reference image stored in the reference picture buffer (270) for the current block to generate a prediction block.
- the motion compensation unit (250) can apply an interpolation filter to a part of the reference image to generate a prediction block when the value of the motion vector does not have an integer value.
- 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.
- the adder (201) can add the restored residual block and the prediction 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 the 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.
- 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.
- 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.
- FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.
- a video coding system 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.
- An encoding device (10) may include a video source generating unit (11), an encoding unit (12), and a transmitting unit (13).
- a decoding device (20) may include a receiving unit (21), a decoding unit (22), and a rendering unit (23).
- the encoding unit (12) may be called a video/image encoding unit, and the decoding unit (22) may be called a video/image decoding unit.
- the transmitting unit (13) may be included in the encoding unit (12).
- the receiving 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.
- the video source generation unit (11) can obtain a video/image through a process of capturing, synthesizing, or generating a video/image.
- 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/image, etc.
- the video/image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate a video/image.
- a virtual video/image can be generated through a computer, etc., and in this case, the video/image capture process can be replaced with a process of generating related data.
- 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.
- 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) through 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 through 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).
- 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.
- the rendering unit (23) can render the decrypted video/image.
- the rendered video/image can be displayed through the display unit.
- the encoder can generate and transmit a bitstream by performing entropy encoding on information for decoding an image, including syntactic elements, etc.
- the encoder can use an encoding method such as CABAC for entropy encoding.
- the decoder can obtain a bitstream and decode the obtained bitstream using a decoding method such as CABAC. And, the decoder can obtain information for decoding a block to be decoded based on the decoding result of the bitstream, and generate a prediction block of the block to be decoded.
- a decoding method such as CABAC.
- CABAC encoding structure of the encoding device and the CABAC decoding structure of the decoding device are each described below.
- FIG. 4 is a diagram for explaining a CABAC encoding structure for a syntax element according to one embodiment of the present invention.
- the CABAC encoding structure includes a binarization structure that binarizes a syntactic element to generate an empty or blank string, and a binary arithmetic coder structure that encodes the empty or blank string.
- the binary arithmetic coder may include a regular coding engine and a bypass coding engine based on a context model of a context modeler.
- the regular coding engine may be an arithmetic coding structure.
- the CABAC encoding structure can use the value of the syntax element as it is without additionally performing binarization on the syntax element.
- the CABAC encoding structure can convert the value of the syntax element that is not a binary value into a binary value by binarizing it.
- Each binary digit 0 or 1 that constitutes the binary value is defined as a bin.
- a structure that lists multiple bins is defined as a bin string. For example, if the bin string after binarization is 110, 1, 1, and 0 are each called a bin.
- the bins or empty strings of the binarized syntax elements can be regular coded or bypass coded according to an encoding method corresponding to each bin.
- the regular coding can be context-model-based binary arithmetic coding (CABAC).
- CABAC binary arithmetic coding
- a context model reflecting a probability value for a bin can be assigned.
- the bin can be encoded based on the assigned context model.
- encoding is performed for the bin, and the context model for the bin can be updated.
- a bin that is regular coded as described above by the regular coding engine is referred to as a context-coded bin.
- the bypass coding process can be a coding process that omits the process of estimating the probability for the input bin and the process of updating the context model applied to the bin.
- the bypass coding process can encode the bin by applying a uniform (or fixed) probability distribution. Since the bypass coding process applies a uniform (or fixed) probability distribution, it can encode a number of bins in one coding cycle, thereby improving the speed of entropy coding.
- the bins that are bypass-coded by the bypass coding engine as described above are referred to as bypass-coded bins.
- FIG. 5 is a diagram for explaining a CABAC decoding structure for a syntax element according to one embodiment of the present invention.
- the CABAC decoding structure includes a binary arithmetic decoder structure that decodes a bitstream to obtain a bin or an empty string corresponding to a syntax element, and a debinarization structure that debinarizes the bin or the empty string to output the syntax element.
- the binary arithmetic decoder may include a regular coding engine and a bypass coding engine based on a context model.
- the regular coding engine may be a context model-based binary arithmetic coding structure.
- Entropy decoding may be a process of performing the entropy encoding process described above in reverse order. For example, if a syntax element is encoded based on a context model, a decoder may obtain a bin or an empty string corresponding to the syntax element from a received bitstream. The decoder may determine a context model of the bin or the empty string using at least one of information from the syntax element, the decoding target block, the decoding information of the surrounding blocks, or the information of the syntax element/bin decoded in the previous step. Then, the decoder may predict the occurrence probability of the obtained bin according to the context model, and perform arithmetic decoding to derive the value of the bin or the empty string corresponding to the syntax element. Thereafter, the context model of the decoded bin may be updated based on the context model determined through the above process.
- the decoder can obtain a bin or a bin string corresponding to the syntax element through the bitstream, and decode it by applying a uniform (or fixed) probability distribution to the obtained bin.
- the procedure for deriving a context model of the syntax element and the procedure for updating the context model applied to the bin after decoding can be omitted.
- the decoder can debinarize the empty string to obtain the syntax element. On the other hand, if the decoded syntax element is a single blank, the decoder can skip the debinarization process and use the blank value as the value of the syntax element.
- the syntax element may include a syntax element regarding intra prediction, a syntax element regarding inter prediction, etc.
- the syntax element regarding intra prediction may be a syntax element regarding template-based multiple reference line (TMRL) intra prediction.
- TMRL template-based multiple reference line
- Template-based multiple reference sample line intra prediction may be an intra prediction based on a method of signaling by combining an intra prediction mode of a block and reference sample lines used for intra prediction of the block.
- One embodiment of a template-based multiple reference sample line intra prediction method may be as described below.
- FIG. 6 is a diagram for explaining a template-based multi-reference sample line intra prediction method according to one embodiment of the present invention.
- TMRL intra prediction can be performed using an intra prediction mode for a current block (610) and N multiple reference samples.
- the number of intra prediction mode candidates used in TMRL intra prediction can be M.
- M is a positive integer greater than or equal to 1.
- an arbitrary mode preset in a decoder/encoder may not be used for TMRL intra prediction.
- the arbitrary mode preset may be a planar mode or an undirected prediction mode.
- N is a positive integer greater than or equal to 2.
- N x M combinations of N reference sample lines (631, 632, 633) and M intra-screen prediction modes.
- TMRL intra prediction a candidate list including candidates indicating different combinations of intra prediction modes and reference sample lines used for intra prediction can be generated.
- the candidate list for TMRL intra prediction may use all N x M combinations.
- the candidate list for TMRL intra prediction may include only K candidates determined based on a cost value of an intra prediction value based on a combination of an intra prediction mode and a reference sample line.
- the cost value may be a result value of a cost function based on a comparison result of a prediction value using a template induced by template matching and an intra prediction value using a combination of an intra prediction mode and a reference sample line.
- the K candidates can be K candidates selected in order of having small cost values among N x M combinations. And, the K candidates can be sorted in a set order (e.g. sorted in ascending order by cost value, etc.) to form a candidate list.
- K can be an integer greater than or equal to 1 and less than or equal to N x M.
- the cost function can use at least one of the following methods: sum of absolute differences (SAD), sum of squared differences (SSD), and sum of absolute transformed differences (SATD).
- template matching to derive cost values can be as described below.
- FIG. 7 is a diagram for explaining intra-template matching according to one embodiment of the present invention.
- intra template matching prediction can determine an optimal prediction block for a current block in a reconstructed area (730) within a current picture (700) based on a current block (710).
- a set of adjacent reference samples surrounding a current block (710) can be defined as a current template (720).
- a template matching-based search can be performed within a reconstructed area (730) based on the current template (720) to find a reference template (740) that is a template with the highest similarity to the current template (720), and a matching block (750) can be determined.
- the matching block (750) can be used as a prediction block for the current block (710).
- template matching-based search can be performed in pre-defined regions (R1, R2, R3, R4) among the pre-restored regions (730), and the search order can be R1, R2, R3, R4.
- the reference template (740) having the highest similarity to the current L-shaped template (720) surrounding the current block is searched in the search area, and the block adjacent to the reference template (740) is determined as a matching block.
- the shape of the template may be a shape other than the L-shape.
- the template having a shape other than the L-shape may be a left template including a left-side surrounding sample of the block, and an upper template including a top-side surrounding sample of the block.
- the template when performing template matching, may be a template of a shape implicitly determined from among various forms of templates using samples around blocks predefined in the encoder and decoder, such as an L-shaped template, a left template, an upper template, or the like based on information such as the size and position of the current block.
- TMRL intra prediction an index value of a candidate representing a combination of a reference line and an intra prediction mode used for intra prediction of a current block among a constructed candidate list may be signaled.
- the index of a candidate representing a combination of a reference line and an intra prediction mode used for intra prediction of a current block may be referred to as a TMRL index.
- the value of the TMRL index may be entropy encoded through CABAC (context-based adaptive binary arithmetic coding).
- the value of the TMRL index may not be a binary value. Therefore, the TMRL index may be binarized before being entropy encoded. For example, the TMRL index may be binarized by the truncated Golomb-Rice code method.
- the indices of the candidates included in the candidate list used for TMRL intra prediction may be expressed as codewords binarized by the truncated Golomb-Rice code method as follows.
- Table 1 is only an example of expressing the indices of candidates included in the candidate list used for TMRL intra prediction in the form of codewords.
- the indices of candidates included in the candidate list used for TMRL intra prediction can be binarized using various binarization methods (e.g., truncated unary code, etc.).
- the encoding process may be delayed due to the context model update (or probability update) process of regular coding.
- the context model update or probability update
- the context (or probability) value that has changed due to the value of the first bin must be updated.
- the context (or probability) update process may cause a delay in the coding cycle. That is, the process of repeatedly calling the same context and waiting for the context (or probability) model update after coding each bin causes a bottleneck in the encoder/decoder and reduces the throughput of encoding/decoding.
- the performance gain may be small or almost nonexistent compared to regular coding for bins with higher correlation.
- the encoder can encode the bin string corresponding to the TMRL index by combining regular coding and bypass coding.
- the encoder can encode one or more bins of the bin string corresponding to the TMRL index as context coding bins (i.e., regular coding) and encode the remaining bins of the bin string corresponding to the TMRL index as bypass coding bins (i.e., bypass coding).
- the decoder can decode one or more context-coded bins among the bin strings corresponding to the TMRL index using the regular coding engine. And, the decoder can decode the remaining bins among the bin strings corresponding to the TMRL index that are not context-coded using the bypass coding engine.
- TMRL index when a TMRL index is binarized into a codeword form by dividing it into a prefix and a suffix as in Table 1, regular coding may be applied to bins corresponding to the prefix of the codeword, and bypass coding may be applied to bins corresponding to the suffix of the codeword.
- bins corresponding to the prefix of the codeword may be context coding bins
- bins corresponding to the suffix of the codeword may be bypass coding bins.
- bins corresponding to suffixes of TMRL indexes can be divided into two or more groups.
- [Table 2] is an example in which an index of a candidate list consisting of 20 candidates is binarized into a codeword form using a truncated Golomb-Rice code method, and bins corresponding to suffixes of the codewords are divided into two groups.
- bypass coding may be applied to the bins of some group(s), and context coding may be applied to the remaining bins.
- the encoder may apply bypass coding only to bins corresponding to suffix 1 of the codeword in Table 2, and apply context coding to bins corresponding to prefix and suffix 0.
- the encoder may apply bypass coding only to suffix 0, and apply context coding to bins corresponding to prefix and suffix 1.
- the bins corresponding to some groups of prefixes and suffixes of the codeword may be context coding bins, and the bins corresponding to some remaining groups of suffixes of the codeword may be bypass coding bins.
- a TMRL index can be binarized into a codeword form having no prefix and suffix using a binary code (e.g., a truncated single code, etc.) method.
- a binary code e.g., a truncated single code, etc.
- the maximum number of context coding bins for TMRL index coding can be determined in advance.
- the encoder can apply context coding to a predetermined number of bins among the codewords of the TMRL index.
- the encoder can apply context coding to bins exceeding a predetermined number among the codewords of the TMRL index. That is, the predetermined number of bins among the codewords can be context coding bins, and the bins exceeding a predetermined number among the codewords can be bypass coding bins.
- the correlation of the bins of the empty string corresponding to the TMRL index may not be high.
- the difference in coding performance between regular coding and bypass coding for the bins of the empty string corresponding to the TMRL index may not be significant.
- regular coding of the bins of the empty string corresponding to the TMRL index may only cause a bottleneck and may not have much significance in terms of coding performance.
- the amount of time and computational resources saved by bypass-coding all bins in an empty string may be more important than the coding performance gained by regular-coding all bins in an empty string when entropy-coding the bins in an empty string corresponding to a TMRL index.
- the encoder can bypass code all bins of the empty string corresponding to the TMRL index.
- various types of codes can be used, such as a truncated single code in addition to a binarized code consisting of a prefix and a suffix.
- FIG. 8 is a flowchart illustrating an entropy decryption method according to an embodiment of the present invention.
- the video decoding device can obtain an empty string corresponding to a syntax element from a bitstream (S810).
- a syntax element can indicate a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction.
- the image decoding device can obtain syntactic elements by de-binarizing an empty string (S820).
- the image decoding device can perform intra prediction of the current block based on the syntax elements (S830).
- intra prediction of the current block can be performed using an intra prediction mode indicated by the syntax element and a reference sample line indicated by the syntax element among a plurality of reference sample lines adjacent to the current block.
- the syntax element can indicate one candidate from a candidate list including candidates indicating different combinations of intra prediction modes and reference sample lines used for intra prediction.
- the intra prediction modes of the candidates can be intra prediction modes other than a predetermined mode.
- the candidates in the candidate list may be multiple candidates selected based on the cost value of intra prediction based on a combination of intra prediction mode and reference sample line.
- the cost value can be determined based on the result of comparing the result value of intra prediction based on the combination of the intra prediction mode and the reference sample line with the prediction value corresponding to the template including samples adjacent to the current block.
- the template may include samples of the reference sample line closest to the current block.
- the cost value can be measured by any one of the sum of absolute differences (SAD) measurement method, the sum of squared difference (SSD) measurement method, and the sum of absolute transformed differences.
- the empty string is a binarized empty string in the form of a truncated Golomb Rice code, and the empty string may include a prefix and a suffix.
- the bin corresponding to the prefix of the empty string can be obtained by arithmetic decoding, and the bin corresponding to the suffix of the empty string can be obtained by bypass decoding.
- At least some of the bins corresponding to the prefix of the empty string and the bins corresponding to the suffix of the empty string can be obtained by arithmetic decoding.
- the empty string is an empty string binarized into a truncated single code form, and among the empty strings, bins less than or equal to a preset number can be obtained by the above arithmetic decoding.
- FIG. 9 is a flowchart illustrating an entropy encoding method according to an embodiment of the present invention.
- the video encoding device can derive a syntax element indicating a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction (S910).
- the image encoding device can generate an empty string including at least one bin by binarizing a syntax element (S920).
- bypass coding may be applied to at least some bins of the empty string, and arithmetic coding may be applied to bins other than bins to which bypass coding of the empty string has been applied.
- a bitstream can be generated by encoding each bin of an empty string according to an encoding method corresponding to each bin (S930).
- a bitstream can be generated by a video encoding method including the steps described in FIG. 9.
- the bitstream can be stored in a non-transitory computer-readable recording medium, and can also be transmitted (or streamed).
- FIG. 10 is a drawing exemplarily showing a content streaming system to which an embodiment according to the present invention can be applied.
- 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.
- the encoding server compresses content input from multimedia input devices such as smartphones, cameras, CCTVs, etc. into digital data to generate a bitstream and transmits it to the streaming server.
- multimedia input devices such as smartphones, cameras, CCTVs, etc. directly generate a bitstream
- the encoding server may be omitted.
- 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.
- the above 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 that informs the user of any available services.
- the web server transmits it to the streaming server, and the streaming server can transmit multimedia data to the user.
- the content streaming system may include a separate control server, and in this case, the control server may perform a role of controlling commands/responses between each device within the content streaming system.
- the above streaming server can receive content from a media storage and/or an encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.
- 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.
- PDAs personal digital assistants
- PMPs portable multimedia players
- navigation devices slate PCs
- tablet PCs tablet PCs
- ultrabooks ultrabooks
- wearable devices e.g., smartwatches, smart glasses, HMDs
- digital TVs desktop computers, digital signage, etc.
- 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 distributedly processed.
- an image can be encoded/decoded using at least one or a combination of at least one of the above embodiments.
- 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.
- the above embodiments can be performed for each of the luminance and chrominance signals, or the above embodiments can be performed identically for the luminance and chrominance signals.
- the methods are described based on the flowchart as a series of steps or units, but 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.
- the steps shown in the flowchart are not exclusive, and other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention.
- the above embodiments may be implemented in the form of program commands that can be executed through 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., alone or in combination.
- the program commands recorded on the computer-readable recording medium may be those specifically designed and configured for the present invention or may be those known to and available to those skilled in the art of computer software.
- a bitstream generated by an encoding method according to the above embodiment can be stored in a non-transitory computer-readable recording medium.
- the bitstream stored in the non-transitory computer-readable recording medium can be decoded by a decoding method according to the above embodiment.
- 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, DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program instructions such as ROMs, RAMs, flash memories, and the like.
- Examples of program instructions include not only machine language codes 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 the processing according to the present invention, and vice versa.
- the present invention can be used in a device for encoding/decoding an image and a recording medium storing a bitstream.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
본 발명은 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체에 관한 것이다. 구체적으로, 본 발명은 템플릿 기반 다중 참조 샘플 라인(template-based multiple reference line, TMRL) 인트라 예측에 사용되는 구문 요소에 대한 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체에 관한 것이다. 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 for a syntax element used in template-based multiple reference line (TMRL) intra prediction.
최근 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 더 높은 해상도 및 화질을 갖는 영상에 대한 고효율 영상 부호화(encoding)/복호화(decoding) 기술이 요구된다. Recently, the demand for high-resolution, high-quality images such as UHD (Ultra High Definition) images is increasing in various application fields. As image data becomes higher in resolution and quality, the amount of data increases relatively compared to existing image data. Therefore, when transmitting image data using media such as existing wired and wireless broadband lines or storing image data using existing storage media, the transmission and storage costs increase. In order to solve these problems that occur as image data becomes higher in resolution and quality, high-efficiency image encoding/decoding technology for images with higher resolution and quality is required.
엔트로피 부호화 방법 중 하나인 CABAC(context-based adaptive binary arithmetic coding)은 높은 코딩 성능을 제공한다. 하지만, CABAC은 적은 처리량(throughput)을 가진다는 단점을 가진다. 이는 CABAC의 정규 코딩 엔진(regular coding engine)으로 인한 것이다. 구체적으로, 정규 코딩 엔진에서는 이전 빈(bin)의 코딩을 통해 업데이트된 확률 상태와 범위를 다음 빈의 코딩에 사용한다. 따라서, 각 빈들은 높은 데이터 의존성을 가지고, 병렬적으로 처리되지 않는다. 또한, 확률 구간을 읽고 현재 상태를 판단하는 데에도 많은 시간이 소요될 수 있다. One of the entropy coding methods, context-based adaptive binary arithmetic coding (CABAC), provides high coding performance. However, CABAC has a disadvantage of low throughput. This is due to the regular coding engine of CABAC. Specifically, the regular coding engine uses the probability state and range updated through the coding of the previous bin for coding the next bin. Therefore, each bin has high data dependency and is not processed in parallel. In addition, it may take a lot of time to read the probability interval and determine the current state.
따라서, 엔트로피 부호화 효율을 향상시키기 위하여, 다양한 툴이 논의되고 있다. Therefore, various tools are being discussed to improve entropy encoding efficiency.
본 발명은 부호화/복호화 효율이 향상된 영상 부호화/복호화 방법 및 장치를 제공하는 것을 목적으로 한다.The purpose of the present invention is to provide a video encoding/decoding method and device with improved encoding/decoding efficiency.
또한, 본 발명은 본 발명에 따른 영상 복호화 방법 또는 장치에 의해 생성된 비트스트림을 저장한 기록 매체를 제공하는 것을 목적으로 한다.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.
또한, 본 발명은 템플릿 기반 다중 참조 샘플 라인(template-based multiple reference line, TMRL) 인트라 예측에 사용되는 구문 요소에 관하여, 위와 같은 기존의 엔트로피 부호화의 문제점을 해결하기 위한 예측 방법을 제공하는 것을 목적으로 한다. In addition, the present invention aims to provide a prediction method for solving the problems of the existing entropy encoding with respect to syntactic elements used in template-based multiple reference line (TMRL) intra prediction.
본 발명의 일 실시예에 따른 영상 복호화 방법은, 비트스트림으로부터 구문 요소에 대응되는 빈 스트링을 획득하는 단계, 상기 구문 요소는 현재 블록의 인트라 예측 모드와 인트라 예측에 사용되는 참조 샘플 라인의 조합을 나타냄, 상기 빈 스트링을 역 이진화하여 상기 구문 요소를 획득하는 단계, 및 상기 구문 요소를 기초로 상기 현재 블록의 인트라 예측을 수행하는 단계를 포함하고, 상기 빈 스트링의 적어도 일부의 빈은 바이패스 디코딩으로 획득되고, 상기 빈 스트링의 바이패스 코딩된 빈을 제외한 빈은 산술 디코딩으로 획득되는 것을 특징으로 할 수 있다. A video decoding method according to one embodiment of the present invention may include the steps of: obtaining an empty string corresponding to a syntax element from a bitstream, the syntax element representing a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction, obtaining the syntax element by inversely binarizing the empty string, and performing intra prediction of the current block based on the syntax element, wherein at least some bins of the empty string are obtained by bypass decoding, and bins excluding bypass-coded bins of the empty string are obtained by arithmetic decoding.
상기 영상 복호화 방법에 있어서, 상기 현재 블록의 인트라 예측은 상기 구문 요소에 의해 지시되는 인트라 예측 모드 및 상기 현재 블록에 인접한 복수의 참조 샘플 라인들 중에서, 상기 구문 요소에 의해 지시되는 참조 샘플 라인을 이용하는 것을 특징으로 할 수 있다. In the above image decoding method, the intra prediction of the current block may be characterized by using an intra prediction mode indicated by the syntax element and a reference sample line indicated by the syntax element among a plurality of reference sample lines adjacent to the current block.
상기 영상 복호화 방법에 있어서, 상기 구문 요소는, 인트라 예측 모드와 인트라 예측에 사용되는 참조 샘플 라인의 서로 다른 조합을 지시하는 후보들을 포함하는 후보 리스트 중에서 하나의 후보를 지시하는 것을 특징으로 할 수 있다. In the above image decoding method, the syntax element may be characterized by indicating one candidate from a candidate list including candidates indicating different combinations of intra prediction modes and reference sample lines used for intra prediction.
상기 영상 복호화 방법에 있어서, 상기 후보들의 인트라 예측 모드는, 미리 결정된 소정의 모드를 제외한 인트라 예측 모드인 것을 특징으로 할 수 있다. In the above image decoding method, the intra prediction modes of the candidates may be characterized as being intra prediction modes excluding a predetermined mode.
상기 영상 복호화 방법에 있어서, 상기 후보 리스트의 상기 후보들은, 인트라 예측 모드 및 참조 샘플 라인의 조합에 기초한 인트라 예측의 비용 값에 기반하여 선택된 복수의 후보들인 것을 특징으로 할 수 있다. In the above image decoding method, the candidates in the candidate list may be characterized as being a plurality of candidates selected based on a cost value of intra prediction based on a combination of an intra prediction mode and a reference sample line.
상기 영상 복호화 방법에 있어서, 상기 비용 값은, 인트라 예측 모드 및 참조 샘플 라인의 조합에 기초한 인트라 예측의 결과 값과 상기 현재 블록에 인접한 샘플들을 포함하는 템플릿에 대응되는 예측 값의 비교 결과를 기초로 결정되는 것을 특징으로 할 수 있다. In the above image decoding method, it may be characterized in that the cost value is determined based on a comparison result between a result value of intra prediction based on a combination of an intra prediction mode and a reference sample line and a prediction value corresponding to a template including samples adjacent to the current block.
상기 영상 복호화 방법에 있어서, 상기 템플릿은, 상기 현재 블록에 가장 인접한 참조 샘플 라인의 샘플들을 포함하는 것을 특징으로 할 수 있다. In the above image decoding method, the template may be characterized by including samples of a reference sample line most adjacent to the current block.
상기 영상 복호화 방법에 있어서, 상기 비용 값은 SAD(sum of absolute differences) 측정 방법, SSD(sum of squared difference) 측정 방법, 절대 변환 차이의 합(sum of absolute transformed differences) 중 어느 하나의 방법을 통해 측정되는 것을 특징으로 할 수 있다. In the above image decoding method, the cost value may be measured using any one of a sum of absolute differences (SAD) measurement method, a sum of squared difference (SSD) measurement method, and a sum of absolute transformed differences.
상기 영상 복호화 방법에 있어서, 상기 빈 스트링은 절단된 골롬 라이스 코드 형태로 이진화된 빈 스트링이고, 상기 빈 스트링은 접두사 및 접미사를 포함하는 것을 특징으로 할 수 있다. In the above image decoding method, the empty string may be an empty string binarized in the form of a truncated Golomb Rice code, and the empty string may be characterized by including a prefix and a suffix.
상기 영상 복호화 방법에 있어서, 상기 빈 스트링의 접두사에 해당하는 빈은 상기 산술 디코딩으로 획득되고, 상기 빈 스트링의 접미사에 해당하는 빈은 상기 바이패스 디코딩으로 획득되는 것을 특징으로 할 수 있다. In the above image decoding method, it may be characterized in that a bin corresponding to a prefix of the empty string is obtained by the arithmetic decoding, and a bin corresponding to a suffix of the empty string is obtained by the bypass decoding.
상기 영상 복호화 방법에 있어서, 상기 빈 스트링의 접두사에 해당하는 빈 및 상기 빈 스트링의 접미사에 해당하는 빈 중에서 적어도 일부의 빈은 상기 산술 디코딩으로 획득되는 것을 특징으로 할 수 있다. In the above image decoding method, it may be characterized in that at least some of the bins corresponding to the prefix of the empty string and the bins corresponding to the suffix of the empty string are obtained by the arithmetic decoding.
상기 영상 복호화 방법에 있어서, 상기 빈 스트링은 절단된 단일 코드 형태로 이진화된 빈 스트링이고, 상기 빈 스트링 중에서 미리 설정된 개수 이하의 빈은 상기 산술 디코딩으로 획득되는 것을 특징으로 할 수 있다. In the above image decoding method, the empty string may be an empty string binarized into a truncated single code form, and it may be characterized in that a number of bins less than or equal to a preset number among the empty strings are obtained by the arithmetic decoding.
본 발명의 일 실시예에 따른 영상 부호화 방법은, 현재 블록의 인트라 예측 모드와 인트라 예측에 사용되는 참조 샘플 라인의 조합을 지시하는 구문 요소를 유도하는 단계, 상기 구문 요소를 이진화하여 빈 스트링을 생성하는 단계; 및 상기 빈 스트링의 각 빈을, 각 빈에 대응되는 부호화 방법에 따라, 부호화함으로써 비트스트림을 생성하는 단계를 포함하고, 상기 빈 스트링의 적어도 일부의 빈에는 바이패스 코딩이 적용되고, 상기 빈 스트링의 바이패스 코딩이 적용된 빈을 제외한 빈에는 산술 코딩이 적용되는 것을 특징으로 할 수 있다. A video encoding method according to one embodiment of the present invention comprises the steps of: deriving a syntax element indicating a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction; generating an empty string by binarizing the syntax element; and generating a bitstream by encoding each bin of the empty string according to an encoding method corresponding to each bin, wherein bypass coding is applied to at least some bins of the empty string, and arithmetic coding is applied to bins other than bins to which bypass coding of the empty string is applied.
본 발명의 일 실시예에 따른 비 일시적 컴퓨터 판독가능한 기록 매체는, 현재 블록의 인트라 예측 모드와 인트라 예측에 사용되는 참조 샘플 라인의 조합을 지시하는 구문 요소를 유도하는 단계, 상기 구문 요소를 이진화하여 빈 스트링을 생성하는 단계, 상기 빈 스트링의 각 빈을, 각 빈에 대응되는 부호화 방법에 따라, 부호화함으로써 비트스트림을 생성하는 단계를 포함하고, 상기 빈 스트링의 적어도 일부의 빈에는 바이패스 코딩이 적용되고, 상기 빈 스트링의 바이패스 코딩이 적용된 빈을 제외한 빈에는 산술 코딩이 적용되는 것을 특징으로 하는, 영상 부호화 방법에 의해 생성된 비트스트림을 저장할 수 있다. A non-transitory computer-readable recording medium according to one embodiment of the present invention can store a bitstream generated by a video encoding method, including the steps of: deriving a syntax element indicating a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction; generating an empty string by binarizing the syntax element; and generating a bitstream by encoding each bin of the empty string according to an encoding method corresponding to each bin, wherein bypass coding is applied to at least some bins of the empty string, and arithmetic coding is applied to bins except for bins to which bypass coding of the empty string is applied.
본 발명의 일 실시예에 따른 전송 방법은, 상기 비트스트림을 전송하는 단계를 포함하고, 상기 영상 부호화 방법은, 현재 블록의 인트라 예측 모드와 인트라 예측에 사용되는 참조 샘플 라인의 조합을 지시하는 구문 요소를 유도하는 단계, 상기 구문 요소를 이진화하여 빈 스트링을 생성하는 단계, 및 상기 빈 스트링의 각 빈을, 각 빈에 대응되는 부호화 방법에 따라, 부호화함으로써 비트스트림을 생성하는 단계를 포함하고, 상기 빈 스트링의 적어도 일부의 빈에는 바이패스 코딩이 적용되고, 상기 빈 스트링의 바이패스 코딩이 적용된 빈을 제외한 빈에는 산술 코딩이 적용되는 것을 특징으로 하는 영상 부호화 방법에 의해 생성된 비트스트림을 전송할 수 있다. A transmission method according to one embodiment of the present invention includes a step of transmitting the bitstream, and an image encoding method includes a step of deriving a syntax element indicating a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction, a step of binarizing the syntax element to generate an empty string, and a step of generating a bitstream by encoding each bin of the empty string according to an encoding method corresponding to each bin, wherein bypass coding is applied to at least some bins of the empty string, and arithmetic coding is applied to bins other than bins to which bypass coding of the empty string is applied. A bitstream generated by the image encoding method can be transmitted.
본 개시에 대하여 위에서 간략하게 요약된 특징들은 후술하는 본 개시의 상세한 설명의 예시적인 양상일 뿐이며, 본 개시의 범위를 제한하는 것은 아니다. 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.
본 발명에 따르면, 부호화/복호화 효율이 향상된 영상 부호화/복호화 방법 및 장치가 제공될 수 있다.According to the present invention, a video encoding/decoding method and device with improved encoding/decoding efficiency can be provided.
또한, 본 발명에 따르면, 템플릿 기반 다중 참조 샘플 라인(template-based multiple reference line, TMRL) 인트라 예측에 사용되는 구문 요소에 대한 엔트로피 부호화/복호화 방법이 제공될 수 있다.In addition, according to the present invention, an entropy encoding/decoding method for a syntactic element used in template-based multiple reference line (TMRL) intra prediction can be provided.
또한, 본 발명에 따르면, TMRL 인트라 예측을 위한 인덱스 값을 코딩함에 있어, 컨텍스트 코딩 빈(context-coded bin)의 개수를 절감함으로써 큰 코딩 효율의 손실 없이 부호화기/복호화기의 복잡도를 줄이고, 처리량을 향상시키는 엔트로피 부호화/복호화 방법이 제공될 수 있다. In addition, according to the present invention, an entropy encoding/decoding method can be provided that reduces the complexity of an encoder/decoder and improves throughput without significant loss of coding efficiency by reducing the number of context-coded bins when coding index values for TMRL intra prediction.
본 개시에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다. The effects obtainable from the present disclosure are not limited to the effects mentioned above, and other effects not mentioned will be clearly understood by a person skilled in the art to which the present disclosure belongs from the description below.
도 1은 본 발명이 적용되는 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.
도 2는 본 발명이 적용되는 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.FIG. 2 is a block diagram showing the configuration of one embodiment of a decryption device to which the present invention is applied.
도 3은 본 발명이 적용될 수 있는 비디오 코딩 시스템을 개략적으로 나타내는 도면이다.FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.
도 4는 본 발명의 일 실시예에 따른 구문 요소에 대한 CABAC 부호화 구조를 설명하기 위한 도면이다. FIG. 4 is a diagram for explaining a CABAC encoding structure for a syntax element according to one embodiment of the present invention.
도 5는 본 발명의 일 실시예에 따른 구문 요소에 대한 CABAC 복호화 구조를 설명하기 위한 도면이다. FIG. 5 is a diagram for explaining a CABAC decoding structure for a syntax element according to one embodiment of the present invention.
도 6은 본 발명의 일 실시예에 따른 템플릿 기반 다중 참조 샘플 라인 인트라 예측 방법을 설명하기 위한 도면이다. FIG. 6 is a diagram for explaining a template-based multi-reference sample line intra prediction method according to one embodiment of the present invention.
도 7은 본 발명의 일 실시 예에 따른 인트라 템플릿 매칭을 설명하기 위한 도면이다. FIG. 7 is a diagram for explaining intra-template matching according to one embodiment of the present invention.
도 8은 본 발명의 일 실시 예에 따른 엔트로피 복호화 방법을 나타내는 흐름도이다. FIG. 8 is a flowchart illustrating an entropy decryption method according to an embodiment of the present invention.
도 9는 본 발명의 일 실시 예에 따른 엔트로피 부호화 방법을 나타내는 흐름도이다. FIG. 9 is a flowchart illustrating an entropy encoding method according to an embodiment of the present invention.
도 10은 본 발명에 따른 실시예가 적용될 수 있는 컨텐츠 스트리밍 시스템을 예시적으로 나타내는 도면이다. FIG. 10 is a drawing exemplarily showing a content streaming system to which an embodiment according to the present invention can be applied.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다. 도면에서의 요소들의 형상 및 크기 등은 보다 명확한 설명을 위해 예시적으로 제공될 수 있다. 후술하는 예시적 실시예들에 대한 상세한 설명은, 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 실시예를 실시할 수 있기에 충분하도록 상세히 설명된다. 다양한 실시예들은 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예에 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 실시예의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 예시적 실시예들의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다.The present invention may have various modifications and embodiments, and thus 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 should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention. In the drawings, similar reference numerals refer to the same or similar functions throughout the various aspects. The shapes and sizes of elements in the drawings may be provided by way of example for clearer description. The detailed description of the exemplary embodiments described below refers to the accompanying drawings, which illustrate specific embodiments by way of example. 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 are different from each other, but 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 with respect to one embodiment. In addition, it should be understood that the location or arrangement of individual components within each disclosed embodiment may be changed without departing from the spirit and scope of the embodiment. Accordingly, the following detailed description is not intended to be taken in a limiting sense, and the scope of the illustrative embodiments is defined only by the appended claims, along with the full scope equivalents to which such claims are entitled, if properly described.
본 발명에서 제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.In the present invention, the terms first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are only used for the purpose of distinguishing 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 a plurality of related described items or any item among a plurality of related described items.
본 발명의 실시예에 나타나는 구성부들은 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시되는 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수 개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.The components shown in the embodiments of the present invention are independently depicted to indicate different characteristic functions, and do not mean that each component is formed as a separate hardware or software configuration unit. 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 one component may be divided into multiple components to perform a function, and such integrated embodiments 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.
본 발명에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 또한, 본 발명의 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.The terminology used in the present invention is only 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 that merely enhance performance. The present invention may be implemented by including only essential components for implementing the essence of the present invention excluding components used only for enhancing performance, and a structure including only essential components excluding optional components used only for enhancing performance is also included in the scope of the present invention.
실시예에서 용어 "적어도 하나(at least one)"는 1, 2, 3 및 4와 같은 1 이상의 개수들 중 하나를 의미할 수 있다. 실시예에서 용어 "복수(a plurality of)"는 2, 3 및 4와 같은 2 이상의 개수들 중 하나를 의미할 수 있다.In an embodiment, the term "at least one" can 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" can mean one of a number greater than or equal to 2, such as 2, 3, and 4.
이하, 도면을 참조하여 본 발명의 실시 형태에 대하여 구체적으로 설명한다. 본 명세서의 실시예를 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 명세서의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략하고, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, embodiments of the present invention will be specifically described 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, and the same reference numerals will be used for the same components in the drawings, and duplicate descriptions of the same components will be omitted.
용어 설명Glossary of Terms
이하에서, “영상”은 동영상(video)을 구성하는 하나의 픽처(picture)를 의미할 수 있으며, 동영상 자체를 나타낼 수도 있다. 예를 들면, "영상의 부호화 및/또는 복호화"는 "동영상의 부호화 및/또는 복호화"를 의미할 수 있으며, "동영상을 구성하는 영상들 중 하나의 영상의 부호화 및/또는 복호화"를 의미할 수도 있다.Hereinafter, “video” may mean one picture constituting a video, and may also represent the video itself. For example, “encoding and/or decoding of a video” may mean “encoding and/or decoding of a video,” and may also mean “encoding and/or decoding of one of the videos constituting the video.”
이하에서, "동영상" 및 "비디오"는 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다. 또한, 대상 영상은 부호화의 대상인 부호화 대상 영상 및/또는 복호화의 대상인 복호화 대상 영상일 수 있다. 또한, 대상 영상은 부호화 장치로 입력된 입력 영상일 수 있고, 복호화 장치로 입력된 입력 영상일 수 있다. 여기서, 대상 영상은 현재 영상과 동일한 의미를 가질 수 있다.Hereinafter, "moving image" and "video" may be used with the same meaning and may be used interchangeably. In addition, the target image may be an encoding target image that is a target of encoding and/or a decoding target image that is a target of decoding. In addition, the target image may be an input image input to an encoding device and may be an input image input to a decoding device. Here, the target image may have the same meaning as the current image.
이하에서, 부호화기 및 영상 부호화 장치는 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다. Hereinafter, the terms encoder and image encoding device may be used interchangeably and have the same meaning.
이하에서, 복호화기 및 영상 복호화 장치는 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다. Hereinafter, the terms decoder and image decoding device may be used interchangeably and interchangeably.
이하에서, "영상(image)", "픽처(picture)", "프레임(frame)" 및 "스크린(screen)"은 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다.Hereinafter, “image”, “picture”, “frame” and “screen” may be used with the same meaning and may be used interchangeably.
이하에서, “대상 블록”은 부호화의 대상인 부호화 대상 블록 및/또는 복호화의 대상인 복호화 대상 블록일 수 있다. 또한, 대상 블록은 현재 부호화 및/또는 복호화의 대상인 현재 블록일 수 있다. 예를 들면, "대상 블록" 및 "현재 블록"은 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다.Hereinafter, the “target block” may be an encoding target block that is a target of encoding and/or a decoding target block that is a target of decoding. In addition, the target block may be a current block that is a target of current encoding and/or decoding. For example, “target block” and “current block” may be used with the same meaning and may be used interchangeably.
이하에서, "블록" 및 "유닛"은 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다. 또한, “유닛”은 블록과 구분하여 지칭하기 위해 휘도(Luma) 성분 블록과 그에 대응하는 색차(Chroma) 성분 블록을 포함한 것을 의미할 수 있다. 일 예로, 부호화 트리 유닛(Coding Tree Unit, CTU)은 하나의 휘도 성분(Y) 부호화 트리 블록(Coding Tree Block, CTB)과 관련된 두 색차 성분(Cb, Cr) 부호화 트리 블록들로 구성될 수 있다. Hereinafter, "block" and "unit" may be used interchangeably and may be used interchangeably. In addition, "unit" may mean including a luminance (Luma) component block and a corresponding chroma component block in order 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 related to it.
이하에서, “샘플”, “화소” 및 “픽셀”은 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다. 여기서, 샘플은 블록을 구성하는 기본 단위를 나타낼 수 있다. Hereinafter, “sample”, “pixel” and “pixel” may be used interchangeably with each other with the same meaning. Here, a sample may represent a basic unit constituting a block.
이하에서, “인터” 및 “화면 간”은 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다. Hereinafter, “inter” and “between screens” may be used interchangeably and have the same meaning.
이하에서, “인트라” 및 “화면 내”는 동일한 의미로 사용될 수 있으며, 서로 교체되어 사용될 수 있다. Hereinafter, “intra” and “within screen” may be used interchangeably and have the same meaning.
도 1은 본 발명이 적용되는 부호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.Figure 1 is a block diagram showing the configuration according to one embodiment of an encoding device to which the present invention is applied.
부호화 장치(100)는 인코더, 비디오 부호화 장치 또는 영상 부호화 장치일 수 있다. 비디오는 하나 이상의 영상들을 포함할 수 있다. 부호화 장치(100)는 하나 이상의 영상들을 순차적으로 부호화할 수 있다.The encoding device (100) may be an encoder, a video encoding device, or an image encoding device. The video may include one or more images. The encoding device (100) may sequentially encode one or more images.
도 1을 참조하면, 부호화 장치(100)는 영상 분할부(110), 인트라 예측부(120), 움직임 예측부(121), 움직임 보상부(122), 스위치(115), 감산기(113), 변환부(130), 양자화부(140), 엔트로피 부호화부(150), 역양자화부(160), 역변환부(170), 가산기(117), 필터부(180) 및 참조 픽처 버퍼(190)를 포함할 수 있다.Referring to FIG. 1, an 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).
또한, 부호화 장치(100)는 입력 영상에 대한 부호화를 통해 부호화된 정보를 포함하는 비트스트림을 생성할 수 있고, 생성된 비트스트림을 출력할 수 있다. 생성된 비트스트림은 컴퓨터 판독가능한 기록 매체에 저장될 수 있거나, 유/무선 전송 매체를 통해 스트리밍될 수 있다. In addition, 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 through a wired/wireless transmission medium.
영상 분할부(110)는 동영상 부호화/복호화의 효율을 높이기 위해, 입력 영상을 다양한 형태로 분할할 수 있다. 즉, 입력 동영상은 다수의 픽처로 구성되어 있고 하나의 픽처는 압축 효율, 병렬처리 등을 위하여 계층적으로 분할되어 처리될 수 있다. 예를 들어, 하나의 픽처를 하나 또는 다수개의 타일(tile) 또는 슬라이스(slice)로 분할하고 다시 다수개의 CTU (Coding Tree Unit)로 분할할 수 있다. 또 다른 방식으로, 먼저 하나의 픽처를 직사각형 모양의 슬라이스의 그룹으로 정의되는 다수개의 서브픽처(sub-picture)로 분할하고, 각 서브픽처를 상기 타일/슬라이스로 분할할 수도 있다. 여기서, 서브픽처는 픽처를 부분적으로 독립 부호화/복호화 및 전송하는 기능을 지원하기 위하여 활용될 수 있다. 여러 개의 서브픽처는 각각 개별적으로 복원 가능하기에 멀티 채널 입력을 하나의 픽처로 구성하는 응용에 있어서 편집이 용이하다는 장점을 가지게 된다. 또한, 타일을 횡방향으로 분할하여 브릭(brick)을 생성할 수도 있다. 여기서, 브릭(brick)은 픽처내 병렬처리의 기본 단위로 활용할 수 있다. 또한, 하나의 CTU는 쿼드 트리(QT: Quadtree)로 재귀적으로 분할될 수 있고, 분할의 말단 노드를 CU (Coding Unit)라고 정의할 수 있다. CU는 예측 단위인 PU(Prediction Unit)와 변환 단위인 TU (Transform Unit)로 분할되어 예측과 분할이 수행될 수 있다. 한편, CU는 예측 단위 및/또는 변환 단위 그 자체로 활용할 수 있다. 여기서, 유연한 분할을 위하여 각 CTU는 쿼드 트리(QT) 뿐만 아니라 멀티타입 트리(MTT: Multi-Type Tree)로 재귀적으로 분할될 수도 있다. CTU는 QT의 말단 노드에서 멀티타입 트리로 분할이 시작될 수 있으며 MTT는 BT(Binary Tree)와 TT(Triple Tree)로 구성될 수 있다. 예를 들어, MTT구조에는 수직 이진 분할모드(SPLIT_BT_VER), 수평 이진 분할모드(SPLIT_BT_HOR), 수직 삼항 분할모드(SPLIT_TT_VER), 수평 삼항 분할모드(SPLIT_TT_HOR)로 구분될 수 있다. 또한, 분할 시 휘도 블록의 쿼드 트리의 최소 블록 크기(MinQTSize)는 16x16이고 바이너리 트리의 최대블록 크기(MaxBtSize)는 128x128, 트리플 트리의 최대 블록 크기(MaxTtSize)는 64x64로 설정할 수 있다. 또한, 바이너리 트리의 최소 블록 크기(MinBtSize)와 트리플 트리의 최소 블록 크기(MinTtSize)는 4x4, 멀티 타입 트리의 최대 깊이(MaxMttDepth)는 4로 지정할 수 있다. 또한 I 슬라이스의 부호화 효율을 높이기 위하여 휘도와 색차성분의 CTU 분할 구조를 서로 다르게 사용하는 듀얼 트리(dual tree)를 적용할 수도 있다. 반면 P와 B슬라이스에서는 CTU 내의 휘도와 색차 CTB (Coding Tree Block)들이 코딩 트리 구조를 공유하는 싱글 트리(single tree)로 분할할 수 있다.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 multiple tiles or slices, and then segmented again into multiple CTUs (Coding Tree Units). Alternatively, one picture can be segmented into multiple sub-pictures defined as groups of rectangular slices, and each sub-picture can 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 be individually restored, they have the advantage of being easy to edit in applications that configure multi-channel input into one picture. In addition, tiles can be segmented horizontally to generate bricks. Here, a brick can be utilized as a basic unit of intra-picture parallel processing. In addition, one CTU can be recursively split into a quad tree (QT: Quadtree), and the terminal node of the split can be defined as a CU (Coding Unit). The CU can be split into a prediction unit (PU) and a transformation unit (TU) to perform prediction and splitting. 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 not only a quad tree (QT) but also a multi-type tree (MTT: Multi-Type Tree). 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 BT (Binary Tree) and a TT (Triple Tree). For example, the MTT structure can be distinguished 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 luma 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. In addition, a dual tree that uses different CTU split structures for luma and chrominance components can be applied to improve the encoding efficiency of the I slice. On the other hand, in P and B slices, the luminance and chrominance CTBs (Coding Tree Blocks) within the CTU can be split into a single tree sharing the coding tree structure.
부호화 장치(100)는 입력 영상에 대해 인트라 모드 및/또는 인터 모드로 부호화를 수행할 수 있다. 또는, 부호화 장치(100)는 입력 영상에 대해 상기 인트라 모드 및 인터 모드가 아닌 제3의 모드 (예, IBC 모드, Palette 모드 등)로 부호화를 수행할 수도 있다. 단, 상기 제3의 모드가 인트라 모드 또는 인터 모드와 유사한 기능적 특징을 가지는 경우, 설명의 편의를 위해 인트라 모드 또는 인터 모드로 분류하기도 한다. 본 발명에서는 상기 제3의 모드에 대한 구체적인 설명이 필요한 경우에만 이를 별도로 분류하여 기술할 것이다. The encoding device (100) may perform encoding on the input image in the intra mode and/or the 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 the inter mode. However, if the third mode has functional characteristics similar to the intra mode or the inter mode, it may be classified as the intra mode or the inter mode for convenience of explanation. In the present invention, the third mode will be classified and described separately only when a specific explanation is required.
예측 모드로 인트라 모드가 사용되는 경우 스위치(115)는 인트라로 전환될 수 있고, 예측 모드로 인터 모드가 사용되는 경우 스위치(115)는 인터로 전환될 수 있다. 여기서 인트라 모드는 화면 내 예측 모드를 의미할 수 있으며, 인터 모드는 화면 간 예측 모드를 의미할 수 있다. 부호화 장치(100)는 입력 영상의 입력 블록에 대한 예측 블록을 생성할 수 있다. 또한, 부호화 장치(100)는 예측 블록이 생성된 후, 입력 블록 및 예측 블록의 차분(residual)을 사용하여 잔여 블록을 부호화할 수 있다. 입력 영상은 현재 부호화의 대상인 현재 영상으로 칭해질 수 있다. 입력 블록은 현재 부호화의 대상인 현재 블록 혹은 부호화 대상 블록으로 칭해질 수 있다.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 which is a current encoding target. The input block can be referred to as a current block which is a current encoding target or an encoding target block.
예측 모드가 인트라 모드인 경우, 인트라 예측부(120)는 현재 블록의 주변에 이미 부호화/복호화된 블록의 샘플을 참조 샘플로서 이용할 수 있다. 인트라 예측부(120)는 참조 샘플을 이용하여 현재 블록에 대한 공간적 예측을 수행할 수 있고, 공간적 예측을 통해 입력 블록에 대한 예측 샘플들을 생성할 수 있다. 여기서 인트라 예측은 화면 내 예측을 의미할 수 있다.If 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 sample, and can generate prediction samples for the input block through spatial prediction. Here, intra prediction can mean prediction within the screen.
인트라 예측 방식으로, DC 모드, Planar 모드와 같은 무방향성 예측 모드와 방향성 예측 모드 (예, 65개 방향)가 적용될 수 있다. 여기서, 인트라 예측 방식은 인트라 예측 모드 또는 화면 내 예측 모드로 표현될 수 있다.As an intra prediction method, non-directional prediction modes such as DC mode and Planar mode and 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.
예측 모드가 인터 모드인 경우, 움직임 예측부(121)는, 움직임 예측 과정에서 참조 영상으로부터 입력 블록과 가장 매치가 잘 되는 영역을 검색할 수 있고, 검색된 영역을 이용하여 움직임 벡터를 도출할 수 있다. 이때, 상기 영역으로 탐색 영역을 사용할 수 있다. 참조 영상은 참조 픽처 버퍼(190)에 저장될 수 있다. 여기서, 참조 영상에 대한 부호화/복호화가 처리되었을 때 참조 픽처 버퍼(190)에 저장될 수 있다.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 can derive a motion vector using the searched area. At this time, the search area can be used as the 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).
움직임 보상부(122)는 움직임 벡터를 이용하는 움직임 보상을 수행함으로써 현재 블록에 대한 예측 블록을 생성할 수 있다. 여기서 인터 예측은 화면 간 예측 혹은 움직임 보상을 의미할 수 있다.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 can mean inter-screen prediction or motion compensation.
상기 움직임 예측부(121)와 움직임 보상부(122)는 움직임 벡터의 값이 정수 값을 가지지 않을 경우에 참조 영상 내의 일부 영역에 대해 보간 필터(Interpolation Filter)를 적용하여 예측 블록을 생성할 수 있다. 화면 간 예측 혹은 움직임 보상을 수행하기 위해 부호화 유닛을 기준으로 해당 부호화 유닛에 포함된 예측 유닛의 움직임 예측 및 움직임 보상 방법이 스킵 모드(Skip Mode), 머지 모드(Merge Mode), 향상된 움직임 벡터 예측(Advanced Motion Vector Prediction; AMVP) 모드, 인트라 블록 복사(Intra Block Copy; IBC) 모드 중 어떠한 방법인지 여부를 판단할 수 있고, 각 모드에 따라 화면 간 예측 혹은 움직임 보상을 수행할 수 있다.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 an area within a reference image when the value of a 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 a prediction unit included in a 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.
또한, 상기 화면 간 예측 방법을 기초로, sub-PU 기반 예측의 AFFINE 모드, SbTMVP (Subblock-based Temporal Motion Vector Prediction) 모드, 및 PU 기반 예측의 MMVD(Merge with MVD) 모드, GPM(Geometric Partitioning Mode) 모드를 적용할 수도 있다. 또한, 각 모드의 성능 향상을 위하여 HMVP(History based MVP), PAMVP(Pairwise Average MVP), CIIP(Combined Intra/Inter Prediction), AMVR(Adaptive Motion Vector Resolution), BDOF(Bi-Directional Optical-Flow), BCW(Bi-predictive with CU Weights), LIC (Local Illumination Compensation), TM(Template Matching), OBMC(Overlapped Block Motion Compensation) 등을 적용할 수도 있다. 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, 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), the OBMC (Overlapped Block Motion Compensation), etc. can be applied.
이 중, AFFINE 모드는 AMVP와 MERGE 모드에서 모두 사용되고 부호화 효율 또한 높은 기술이다. 종래 동영상 코딩 표준에서는 블록의 평행이동만을 고려하여 MC(Motion Compensation)를 수행하기 때문에 줌 인/아웃(zoom in/out), 회전(rotation)과 같이 현실에서 발생하는 움직임을 제대로 보상하지 못하는 단점이 있었다. 이를 보완하여, 두 개의 컨트롤 포인트 움직임 벡터(control point motion vector, CPMV)를 사용하는 4 파라미터 어파인 움직임 모델과 세 개의 컨트롤 포인트 움직임 벡터를 사용하는 6 파라미터 어파인 움직임 모델을 사용하여 인터 예측에 적용할 수 있다. 여기서, CPMV는 현재 블록의 왼쪽 상단, 오른쪽 상단, 왼쪽 하단 중 어느 하나의 어파인 움직임 모델을 표현하는 벡터이다. Among these, AFFINE mode is a technology that is used in both AMVP and MERGE modes and also has high encoding efficiency. Since the conventional video coding standard performs MC (Motion Compensation) 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 four-parameter affine motion model using two control point motion vectors (CPMV) and a six-parameter affine motion model using three control point motion vectors can be applied to inter prediction. Here, CPMV is a vector representing an affine motion model of one of the upper left, upper right, and lower left of the current block.
감산기(113)는 입력 블록 및 예측 블록의 차분을 사용하여 잔여 블록을 생성할 수 있다. 잔여 블록은 잔여 신호로 칭해질 수도 있다. 잔여 신호는 원 신호 및 예측 신호 간의 차이(difference)를 의미할 수 있다. 또는, 잔여 신호는 원신호 및 예측 신호 간의 차이를 변환(transform)하거나, 양자화하거나, 또는 변환 및 양자화함으로써 생성된 신호일 수 있다. 잔여 블록은 블록 단위의 잔여 신호일 수 있다.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 mean 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.
변환부(130)는 잔여 블록에 대해 변환(transform)을 수행하여 변환 계수(transform coefficient)를 생성할 수 있고, 생성된 변환 계수를 출력할 수 있다. 여기서, 변환 계수는 잔여 블록에 대한 변환을 수행함으로써 생성된 계수 값일 수 있다. 변환 생략(transform skip) 모드가 적용되는 경우, 변환부(130)는 잔여 블록에 대한 변환을 생략할 수도 있다.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 can be a coefficient value generated by performing a transform on the residual block. When the transform skip mode is applied, the transform unit (130) can also skip the transform on the residual block.
변환 계수 또는 잔여 신호에 양자화를 적용함으로써 양자화된 레벨(quantized level)이 생성될 수 있다. 이하, 실시예들에서는 양자화된 레벨도 변환 계수로 칭해질 수 있다.A quantized level can be generated by applying quantization to a transform coefficient or a residual signal. In the following embodiments, a quantized level may also be referred to as a transform coefficient.
일 예로, 화면내 예측을 통해 생성된 4x4 휘도 잔차 블록은 DST(Discrete Sine Transform) 기반 기저 벡터를 통해 변환하며, 나머지 잔차 블록에 대해서는 DCT(Discrete Cosine Transform) 기반의 기저 벡터를 사용하여 변환을 수행할 수 있다. 또한 RQT(Residual Quad Tree) 기술을 통하여 하나의 블록에 대하여 변환 블록을 쿼드 트리 형태로 분할하며 RQT를 통해 분할된 각 변환 블록에 대하여 변환과 양자화를 수행하고 난 후 모든 계수가 0이 되는 경우의 부호화 효율을 높이기 위해 cbf(coded block flag)를 전송할 수 있다. 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 a basis vector based on DCT (Discrete Cosine Transform) can be used to transform the remaining residual blocks. In addition, a transform block can be divided into a quad tree shape for one block using RQT (Residual Quad Tree) technology, 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.
또 다른 대안으로는, 여러 변환 기저를 선택적으로 사용하여 변환을 수행하는 MTS(Multiple Transform Selection) 기술을 적용할 수도 있다. 즉, CU를 RQT를 통해 TU로 분할하지 않고, SBT(Sub-block Transform) 기술을 통해 TU분할과 유사한 기능을 수행할 수 있다. 구체적으로, SBT는 화면 간 예측 블록에만 적용되며 RQT와 달리 현재 블록을 수직 혹은 수평 방향으로 ½ 혹은 ¼ 크기로 분할한 뒤 그 중 하나의 블록에 대해서만 변환을 수행할 수 있다. 예를 들어, 수직으로 분할된 경우 맨 왼쪽 혹은 맨 오른쪽 블록에 대해 변환을 수행하고, 수평으로 분할된 경우 맨 위쪽 혹은 맨 아래쪽 블록에 대하여 변환을 수행할 수 있다. Alternatively, the Multiple Transform Selection (MTS) technique can be applied to perform transformation by selectively using multiple transformation bases. That is, instead of dividing the CU into TUs through the RQT, a function similar to TU division can be performed through the Sub-block Transform (SBT) technique. Specifically, the SBT is applied only to inter-screen prediction blocks, and unlike the RQT, the current block can be divided into ½ or ¼ sizes in the vertical or horizontal direction, and then the transformation can be performed on only one of the blocks. For example, if it is divided vertically, the transformation can be performed on the leftmost or rightmost block, and if it is divided horizontally, the transformation can be performed on the topmost or bottommost block.
또한 DCT 또는 DST를 통해 주파수 영역으로 변환된 잔차 신호를 추가 변환하는 2차 변환 (secondary transform) 기술인 LFNST(Low Frequency Non-Separable Transform)를 적용할 수도 있다. LFNST는 좌측 상단의 4x4 또는 8x8의 저주파수 영역에 대해서 변환을 추가적으로 수행하여 잔차 계수를 좌측 상단으로 집중시킬 수 있게 된다.Additionally, LFNST (Low Frequency Non-Separable Transform), a secondary transform technique that additionally 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, so that the residual coefficients can be concentrated in the upper left.
양자화부(140)는 변환 계수 또는 잔여 신호를 양자화 매개변수 (QP, Quantization parameter)에 따라 양자화함으로써 양자화된 레벨을 생성할 수 있고, 생성된 양자화된 레벨을 출력할 수 있다. 이때, 양자화부(140)에서는 양자화 행렬을 사용하여 변환 계수를 양자화할 수 있다.The quantization unit (140) can generate a quantized level by quantizing a transform coefficient or a 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.
일 예로, 0~51 QP 값을 사용하는 양자화기를 사용할 수 있다. 또는, 영상의 크기가 보다 크고 높은 부호화 효율이 요구되는 경우에는, 0~63 QP를 사용할 수도 있다. 또한 하나의 양자화기를 사용하는 것이 아닌 두 개의 양자화기를 사용하는 DQ(Dependent Quantization) 방법을 적용할 수도 있다. DQ는 두개의 양자화기(예, Q0, Q1)를 사용하여 양자화를 수행하되, 특정 양자화기 사용에 대한 정보를 시그널링 하지 않더라도, 상태 전이 모델을 통해 현재 상태에 기반하여 다음 변환 계수에 사용할 양자화기가 선택되도록 적용할 수 있다.For example, a quantizer using QP values of 0 to 51 can be used. Or, if the image size is larger and high encoding efficiency is required, 0 to 63 QP can be used. Also, a Dependent Quantization (DQ) method that uses two quantizers instead of one can be applied. DQ performs quantization using two quantizers (e.g., Q0 and Q1), and 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.
엔트로피 부호화부(150)는, 양자화부(140)에서 산출된 값들 또는 부호화 과정에서 산출된 부호화 파라미터(Coding Parameter) 값들 등에 대하여 확률 분포에 따른 엔트로피 부호화를 수행함으로써 비트스트림(bitstream)을 생성할 수 있고, 비트스트림을 출력할 수 있다. 엔트로피 부호화부(150)는 영상의 샘플에 관한 정보 및 영상의 복호화를 위한 정보에 대한 엔트로피 부호화를 수행할 수 있다. 예를 들면, 영상의 복호화를 위한 정보는 구문 요소(syntax element) 등을 포함할 수 있다. 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 in 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, information for decoding the image can include syntax elements, etc.
엔트로피 부호화가 적용되는 경우, 높은 발생 확률을 갖는 심볼(symbol)에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 부호화 대상 심볼들에 대한 비트열의 크기가 감소될 수 있다. 엔트로피 부호화부(150)는 엔트로피 부호화를 위해 지수 골롬(exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 부호화 방법을 사용할 수 있다. 예를 들면, 엔트로피 부호화부(150)는 가변 길이 부호화(Variable Length Coding/Code; VLC) 테이블을 이용하여 엔트로피 부호화를 수행할 수 있다. 또한 엔트로피 부호화부(150)는 대상 심볼의 이진화(binarization) 방법 및 대상 심볼/빈(bin)의 확률 모델(probability model)을 도출한 후, 도출된 이진화 방법, 확률 모델, 문맥 모델(Context Model)을 사용하여 산술 부호화를 수행할 수도 있다.When entropy encoding is applied, a small number of bits are allocated to symbols having a high occurrence probability and a large number of bits are allocated to symbols having a low occurrence probability, thereby representing symbols, whereby the size of the bit string for 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 derive a binarization method of a target symbol and a probability model of a target symbol/bin, and then perform arithmetic encoding using the derived binarization method, probability model, and context model.
관련하여, CABAC을 적용함에 있어서, 복호화 장치에서 저장되는 확률 테이블의 크기를 줄이고자, 테이블 확률 업데이트 방식을 간단한 수식을 통한 테이블 업데이트 방식으로 변경하여 적용할 수도 있다. 또한 더 정확한 심볼의 확률 값을 얻기 위하여 2개의 서로 다른 확률 모델을 사용할 수도 있다.In relation to this, when applying CABAC, in order to reduce the size of the probability table stored in the decryption device, the table probability update method can be changed to a table update method using a simple formula and applied. In addition, two different probability models can be used to obtain more accurate symbol probability values.
엔트로피 부호화부(150)는 변환 계수 레벨(양자화된 레벨)을 부호화하기 위해 변환 계수 스캐닝(Transform Coefficient Scanning) 방법을 통해 2차원의 블록 형태(form) 계수를 1차원의 벡터 형태로 변경할 수 있다.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).
부호화 파라미터(Coding Parameter)는 구문 요소 (syntax element)와 같이 부호화 장치(100)에서 부호화되어 복호화 장치(200)로 시그널링되는 정보(플래그, 색인 등)뿐만 아니라, 부호화 과정 혹은 복호화 과정에서 유도되는 정보를 포함할 수 있으며, 영상을 부호화하거나 복호화할 때 필요한 정보를 의미할 수 있다. Coding parameters may include information (flags, indexes, etc.) encoded in an encoding device (100) and signaled to a decoding device (200), such as syntax elements, as well as information derived during an encoding process or a decoding process, and may mean information necessary when encoding or decoding an image.
여기서, 플래그 혹은 색인을 시그널링(signaling)한다는 것은 인코더에서는 해당 플래그 혹은 색인을 엔트로피 부호화(Entropy Encoding)하여 비트스트림(Bitstream)에 포함하는 것을 의미할 수 있고, 디코더에서는 비트스트림으로부터 해당 플래그 혹은 색인을 엔트로피 복호화(Entropy Decoding)하는 것을 의미할 수 있다.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.
부호화된 현재 영상은 이후에 처리되는 다른 영상에 대한 참조 영상으로서 사용될 수 있다. 따라서, 부호화 장치(100)는 부호화된 현재 영상을 다시 복원 또는 복호화할 수 있고, 복원 또는 복호화된 영상을 참조 영상으로 참조 픽처 버퍼(190)에 저장할 수 있다.The encoded current image can be used as a reference image for other images to be processed later. Therefore, the encoding device (100) can restore or decode the encoded current image again, and store the restored or decoded image as a reference image in the reference picture buffer (190).
양자화된 레벨은 역양자화부(160)에서 역양자화(dequantization)될 수 있고. 역변환부(170)에서 역변환(inverse transform)될 수 있다. 역양자화 및/또는 역변환된 계수는 가산기(117)를 통해 예측 블록과 합해질 수 있다, 역양자화 및/또는 역변환된 계수와 예측 블록을 합함으로써 복원 블록(reconstructed block)이 생성될 수 있다. 여기서, 역양자화 및/또는 역변환된 계수는 역양자화 및 역변환 중 적어도 하나 이상이 수행된 계수를 의미하며, 복원된 잔여 블록을 의미할 수 있다. 상기 역양자화부(160) 및 역변환부(170)는 양자화부(140) 및 변환부(130)의 역과정으로 수행될 수 있다.The quantized level can be dequantized in the dequantization unit (160) and inverse transformed in the inverse transform unit (170). The dequantized and/or inverse 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 inverse transformed coefficients and the prediction block. Here, the dequantized and/or inverse transformed coefficients mean coefficients on which at least one of dequantization and inverse transformation has been performed, and may mean a reconstructed residual block. The dequantization unit (160) and the inverse transform unit (170) can be performed in the reverse process of the quantization unit (140) and the transform unit (130).
복원 블록은 필터부(180)를 거칠 수 있다. 필터부(180)는 디블록킹 필터(deblocking filter), 샘플 적응적 오프셋(Sample Adaptive Offset; SAO), 적응적 루프 필터(Adaptive Loop Filter; ALF), 양방향 필터 (Bilateral filter; BIF), LMCS (Luma Mapping with Chroma Scaling) 등을 복원 샘플, 복원 블록 또는 복원 영상에, 전부 또는 일부 필터링 기술로 적용할 수 있다. 필터부(180)는 인-루프 필터(in-loop filter)로 칭해질 수도 있다. 이때, 인-루프 필터(in-loop filter)는 LMCS를 제외하는 명칭으로 사용하기도 한다. 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), LMCS (Luma Mapping with Chroma Scaling), 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 called an in-loop filter. In this case, the in-loop filter is also used as a name excluding LMCS.
디블록킹 필터는 블록들 간의 경계에서 발생한 블록 왜곡을 제거할 수 있다. 디블록킹 필터를 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 샘플을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 서로 다른 필터를 적용할 수 있다.The deblocking filter can remove block distortion that occurs at the boundary between blocks. In order to determine whether to perform the deblocking filter, it is possible to determine whether to apply the deblocking filter to the current block based on the samples contained in several columns or rows contained in the block. When applying the deblocking filter to the block, different filters can be applied depending on the required deblocking filtering strength.
샘플 적응적 오프셋을 이용하여 부호화 에러를 보상하기 위해 샘플 값에 적정 오프셋(offset) 값을 더할 수 있다. 샘플 적응적 오프셋은 디블록킹을 수행한 영상에 대해 샘플 단위로 원본 영상과의 오프셋을 보정할 수 있다. 영상에 포함된 샘플을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 샘플의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.A sample adaptive offset can be used to add an appropriate offset value to the sample value to compensate for the encoding error. The sample adaptive offset can correct the offset from the original image on a sample basis for the image on which deblocking has been performed. A method can be used in which the samples included in the image are divided into a certain number of regions, and then the region to be offset is determined and the offset is applied to the region, or a method can be used in which the offset is applied by considering the edge information of each sample.
양방향 필터 (Bilateral filter; BIF) 또한 디블록킹을 수행한 영상에 대해 샘플 단위로 원본 영상과의 오프셋을 보정할 수 있다.Bilateral filter (BIF) can also compensate for the offset from the original image on a sample-by-sample basis for the deblocked image.
적응적 루프 필터는 복원 영상 및 원래의 영상을 비교한 값에 기반하여 필터링을 수행할 수 있다. 영상에 포함된 샘플을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. 적응적 루프 필터를 적용할지 여부에 관련된 정보는 부호화 유닛(Coding Unit, CU) 별로 시그널링될 수 있고, 각각의 블록에 따라 적용될 적응적 루프 필터의 모양 및 필터 계수는 달라질 수 있다.An adaptive loop filter can perform filtering based on a comparison value between a restored image and an original image. After dividing samples included in an image into a predetermined group, a filter to be applied to each group can be determined, and filtering can be performed differentially for each group. Information related to 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 to be applied can vary for each block.
LMCS(Luma Mapping with Chroma Scaling)에서, 루마 매핑(LM, Luma-mapping)은 piece-wise 선형 모델을 통해 휘도 값을 재맵핑 하는 것을 의미하고, 크로마 스케일링(CS, Chroma scaling)은 예측 신호의 평균 휘도 값에 따라 색차 성분의 잔차 값을 스케일링해주는 기술을 의미한다. 특히, LMCS는 HDR(High Dynamic Range) 영상의 특성을 반영한 HDR 보정 기술로 활용될 수 있다. 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 for scaling the residual values of chroma 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.
필터부(180)를 거친 복원 블록 또는 복원 영상은 참조 픽처 버퍼(190)에 저장될 수 있다. 필터부(180)를 거친 복원 블록은 참조 영상의 일부일 수 있다. 말하자면, 참조 영상은 필터부(180)를 거친 복원 블록들로 구성된 복원 영상일 수 있다. 저장된 참조 영상은 이후 화면 간 예측 혹은 움직임 보상에 사용될 수 있다.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.
도 2는 본 발명이 적용되는 복호화 장치의 일 실시예에 따른 구성을 나타내는 블록도이다.FIG. 2 is a block diagram showing the configuration of one embodiment of a decryption device to which the present invention is applied.
복호화 장치(200)는 디코더, 비디오 복호화 장치 또는 영상 복호화 장치일 수 있다.The decoding device (200) may be a decoder, a video decoding device, or an image decoding device.
도 2를 참조하면, 복호화 장치(200)는 엔트로피 복호화부(210), 역양자화부(220), 역변환부(230), 인트라 예측부(240), 움직임 보상부(250), 가산기(201), 스위치 (203), 필터부(260) 및 참조 픽처 버퍼(270)를 포함할 수 있다.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).
복호화 장치(200)는 부호화 장치(100)에서 출력된 비트스트림을 수신할 수 있다. 복호화 장치(200)는 컴퓨터 판독가능한 기록 매체에 저장된 비트스트림을 수신하거나, 유/무선 전송 매체를 통해 스트리밍되는 비트스트림을 수신할 수 있다. 복호화 장치(200)는 비트스트림에 대하여 인트라 모드 또는 인터 모드로 복호화를 수행할 수 있다. 또한, 복호화 장치(200)는 복호화를 통해 복원된 영상 또는 복호화된 영상을 생성할 수 있고, 복원된 영상 또는 복호화된 영상을 출력할 수 있다.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 can receive a bitstream streamed through a wired/wireless transmission medium. The decoding device (200) can perform decoding on the bitstream in an intra mode or an 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.
복호화에 사용되는 예측 모드가 인트라 모드인 경우 스위치(203)가 인트라로 전환될 수 있다. 복호화에 사용되는 예측 모드가 인터 모드인 경우 스위치(203)가 인터로 전환될 수 있다.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.
복호화 장치(200)는 입력된 비트스트림을 복호화하여 복원된 잔여 블록(reconstructed residual block)을 획득할 수 있고, 예측 블록을 생성할 수 있다. 복원된 잔여 블록 및 예측 블록이 획득되면, 복호화 장치(200)는 복원된 잔여 블록과 및 예측 블록을 더함으로써 복호화 대상이 되는 복원 블록을 생성할 수 있다. 복호화 대상 블록은 현재 블록으로 칭해질 수 있다.The decoding device (200) can obtain a reconstructed residual block by decoding the input bitstream and can generate a prediction block. When 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 decoding target block can be referred to as a current block.
엔트로피 복호화부(210)는 비트스트림에 대한 확률 분포에 따른 엔트로피 복호화를 수행함으로써 심볼들을 생성할 수 있다. 생성된 심볼들은 양자화된 레벨 형태의 심볼을 포함할 수 있다. 여기에서, 엔트로피 복호화 방법은 상술된 엔트로피 부호화 방법의 역과정일 수 있다.The entropy decoding unit (210) can generate symbols by performing entropy decoding according to a probability distribution for the bitstream. The generated symbols can include symbols in the form of quantized levels. Here, the entropy decoding method can be the reverse process of the entropy encoding method described above.
엔트로피 복호화부(210)는 변환 계수 레벨(양자화된 레벨)을 복호화하기 위해 변환 계수 스캐닝 방법을 통해 1차원의 벡터 형태 계수를 2차원의 블록 형태로 변경할 수 있다. 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).
양자화된 레벨은 역양자화부(220)에서 역양자화될 수 있고, 역변환부(230)에서 역변환될 수 있다. 양자화된 레벨은 역양자화 및/또는 역변환이 수행된 결과로서, 복원된 잔여 블록으로 생성될 수 있다. 이때, 역양자화부(220)는 양자화된 레벨에 양자화 행렬을 적용할 수 있다. 복호화 장치에 적용되는 역양자화부(220) 및 역변환부(230)는 전술한 부호화 장치에 적용되는 역양자화부(160) 및 역변환부(170)와 동일한 기술을 적용할 수 있다.The quantized level can be dequantized in the dequantization unit (220) and detransformed in the inverse transform unit (230). The quantized level can be generated as a restored residual block as a result of the dequantization and/or detransformation. At this time, the dequantization unit (220) can apply a quantization matrix to the quantized level. The dequantization unit (220) and the detransform unit (230) applied to the decoding device can apply the same technology as the dequantization unit (160) and the detransform unit (170) applied to the encoding device described above.
인트라 모드가 사용되는 경우, 인트라 예측부(240)는 복호화 대상 블록 주변의 이미 복호화된 블록의 샘플 값을 이용하는 공간적 예측을 현재 블록에 대해 수행함으로써 예측 블록을 생성할 수 있다. 복호화 장치에 적용되는 인트라 예측부(240)는 전술한 부호화 장치에 적용되는 인트라 예측부(120)와 동일한 기술을 적용할 수 있다. When the intra mode is used, the intra prediction unit (240) can generate a prediction 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.
인터 모드가 사용되는 경우, 움직임 보상부(250)는 움직임 벡터 및 참조 픽처 버퍼(270)에 저장되어 있는 참조 영상을 이용하는 움직임 보상을 현재 블록에 대해 수행함으로써 예측 블록을 생성할 수 있다. 상기 움직임 보상부(250)는 움직임 벡터의 값이 정수 값을 가지지 않을 경우에 참조 영상 내의 일부 영역에 대해 보간 필터를 적용하여 예측 블록을 생성할 수 있다. 움직임 보상을 수행하기 위해 부호화 유닛을 기준으로 해당 부호화 유닛에 포함된 예측 유닛의 움직임 보상 방법이 스킵 모드, 머지 모드, AMVP 모드, 현재 픽처 참조 모드 중 어떠한 방법인지 여부를 판단할 수 있고, 각 모드에 따라 움직임 보상을 수행할 수 있다. 복호화 장치에 적용되는 움직임 보상부(250)는 전술한 부호화 장치에 적용되는 움직임 보상부(122)와 동일한 기술을 적용할 수 있다. When the inter mode is used, the motion compensation unit (250) can perform motion compensation using a motion vector and a reference image stored in the reference picture buffer (270) for the current block to generate a prediction block. The motion compensation unit (250) can apply an interpolation filter to a part of the reference image to generate a prediction block 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 a skip mode, a merge mode, an AMVP mode, or a current picture reference mode based on the encoding unit, and to perform motion compensation 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.
가산기(201)는 복원된 잔여 블록 및 예측 블록을 가산하여 복원 블록을 생성할 수 있다. 필터부(260)는 Inverse-LMCS, 디블록킹 필터, 샘플 적응적 오프셋 및 적응적 루프 필터 등 적어도 하나를 복원 블록 또는 복원 영상에 적용할 수 있다. 복호화 장치에 적용되는 필터부(260)는 전술한 부호화 장치에 적용되는 필터부(180)에 적용된 필터링 기술과 동일한 기술을 적용할 수 있다.The adder (201) can add the restored residual block and the prediction 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 the 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.
필터부(260)는 복원 영상을 출력할 수 있다. 복원 블록 또는 복원 영상은 참조 픽처 버퍼(270)에 저장되어 인터 예측에 사용될 수 있다. 필터부(260)를 거친 복원 블록은 참조 영상의 일부일 수 있다. 말하자면, 참조 영상은 필터부(260)를 거친 복원 블록들로 구성된 복원 영상일 수 있다. 저장된 참조 영상은 이후 화면 간 예측 혹은 움직임 보상에 사용될 수 있다.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.
도 3은 본 발명이 적용될 수 있는 비디오 코딩 시스템을 개략적으로 나타내는 도면이다.FIG. 3 is a diagram schematically showing a video coding system to which the present invention can be applied.
일 실시예에 따른 비디오 코딩 시스템은 부호화 장치(10) 및 복호화 장치(20)를 포함할 수 있다. 부호화 장치(10)는 부호화된 비디오(video) 및/또는 영상(image) 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 복호화 장치(20)로 전달할 수 있다. 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.
일 실시예에 따른 부호화 장치(10)는 비디오 소스 생성부(11), 부호화부(12), 전송부(13)를 포함할 수 있다. 일 실시예에 따른 복호화 장치(20)는 수신부(21), 복호화부(22) 및 렌더링부(23)를 포함할 수 있다. 상기 부호화부(12)는 비디오/영상 부호화부라고 불릴 수 있고, 상기 복호화부(22)는 비디오/영상 복호화부라고 불릴 수 있다. 전송부(13)는 부호화부(12)에 포함될 수 있다. 수신부(21)는 복호화부(22)에 포함될 수 있다. 렌더링부(23)는 디스플레이부를 포함할 수도 있고, 디스플레이부는 별개의 디바이스 또는 외부 컴포넌트로 구성될 수도 있다.An encoding device (10) according to one embodiment may include a video source generating unit (11), an encoding unit (12), and a transmitting unit (13). A decoding device (20) according to one embodiment may include a receiving unit (21), a decoding unit (22), and a rendering unit (23). The encoding unit (12) may be called a video/image encoding unit, and the decoding unit (22) may be called a video/image decoding unit. The transmitting unit (13) may be included in the encoding unit (12). The receiving 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.
비디오 소스 생성부(11)는 비디오/영상의 캡쳐, 합성 또는 생성 과정 등을 통하여 비디오/영상을 획득할 수 있다. 비디오 소스 생성부(11)는 비디오/영상 캡쳐 디바이스 및/또는 비디오/영상 생성 디바이스를 포함할 수 있다. 비디오/영상 캡쳐 디바이스는 예를 들어, 하나 이상의 카메라, 이전에 캡쳐된 비디오/영상을 포함하는 비디오/영상 아카이브 등을 포함할 수 있다. 비디오/영상 생성 디바이스는 예를 들어 컴퓨터, 타블렛 및 스마트폰 등을 포함할 수 있으며 (전자적으로) 비디오/영상을 생성할 수 있다. 예를 들어, 컴퓨터 등을 통하여 가상의 비디오/영상이 생성될 수 있으며, 이 경우 관련 데이터가 생성되는 과정으로 비디오/영상 캡쳐 과정이 갈음될 수 있다.The video source generation unit (11) can obtain a video/image through a process of capturing, synthesizing, or generating a video/image. 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/image, etc. The video/image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate a video/image. For example, a virtual video/image can be generated through a computer, etc., and in this case, the video/image capture process can be replaced with a process of generating related data.
부호화부(12)는 입력 비디오/영상을 부호화할 수 있다. 부호화부(12)는 압축 및 부호화 효율을 위하여 예측, 변환, 양자화 등 일련의 절차를 수행할 수 있다. 부호화부(12)는 부호화된 데이터(부호화된 비디오/영상 정보)를 비트스트림(bitstream) 형태로 출력할 수 있다. 상기 부호화부(12)의 상세 구성은 전술한 도 1의 부호화 장치(100)와 동일하게 구성하는 것도 가능하다.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.
전송부(13)는 비트스트림 형태로 출력된 부호화된 비디오/영상 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 복호화 장치(20)의 수신부(21)로 전달할 수 있다. 디지털 저장 매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장 매체를 포함할 수 있다. 전송부(13)는 미리 정해진 파일 포맷을 통하여 미디어 파일을 생성하기 위한 엘리먼트를 포함할 수 있고, 방송/통신 네트워크를 통한 전송을 위한 엘리먼트를 포함할 수 있다. 수신부(21)는 상기 저장매체 또는 네트워크로부터 상기 비트스트림을 추출/수신하여 복호화부(22)로 전달할 수 있다.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) through 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 through 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).
복호화부(22)는 부호화부(12)의 동작에 대응하는 역양자화, 역변환, 예측 등 일련의 절차를 수행하여 비디오/영상을 복호화할 수 있다. 상기 복호화부(22)의 상세 구성은 전술한 도 2의 복호화 장치(200)와 동일하게 구성하는 것도 가능하다.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.
렌더링부(23)는 복호화된 비디오/영상을 렌더링할 수 있다. 렌더링된 비디오/영상은 디스플레이부를 통하여 디스플레이될 수 있다. The rendering unit (23) can render the decrypted video/image. The rendered video/image can be displayed through the display unit.
즉, 부호화기는, 구문 요소 등을 포함하는, 영상의 복호화를 위한 정보에 대한 엔트로피 부호화를 수행하여 비트스트림을 생성하고 전송할 수 있다. 부호화기는 엔트로피 부호화를 위해 CABAC 등의 부호화 방법을 사용할 수 있다. That is, the encoder can generate and transmit a bitstream by performing entropy encoding on information for decoding an image, including syntactic elements, etc. The encoder can use an encoding method such as CABAC for entropy encoding.
그리고, 복호화기는 비트스트림을 획득하고, CABAC 등의 복호화 방법을 사용하여 획득한 비트스트림을 복호화할 수 있다. 그리고 복호화기는 비트스트림의 복호화 결과를 기초로 복호화 대상 블록의 복호화를 위한 정보를 획득하고, 복호화 대상 블록의 예측 블록을 생성할 수 있다. And, the decoder can obtain a bitstream and decode the obtained bitstream using a decoding method such as CABAC. And, the decoder can obtain information for decoding a block to be decoded based on the decoding result of the bitstream, and generate a prediction block of the block to be decoded.
부호화 장치의 CABAC 부호화 구조 및 복호화 장치의 CABAC 복호화 구조 각각은 아래에 설명하는 바와 같다. The CABAC encoding structure of the encoding device and the CABAC decoding structure of the decoding device are each described below.
도 4는 본 발명의 일 실시예에 따른 구문 요소에 대한 CABAC 부호화 구조를 설명하기 위한 도면이다. FIG. 4 is a diagram for explaining a CABAC encoding structure for a syntax element according to one embodiment of the present invention.
도 4를 참고하면, CABAC 부호화 구조는 구문 요소를 이진화하여 빈 또는 빈 스트링을 생성하는 이진화 구조 및 빈 또는 빈 스트링을 부호화하는 이진 산술 코더 구조를 포함한다. 그리고, 이진 산술 코더는 컨텍스트 모델러의 컨텍스트 모델에 기반한 정규 코딩 엔진 및 바이패스 코딩 엔진을 포함할 수 있다. 여기서, 정규 코딩 엔진은 산술 코딩 구조일 수 있다. Referring to FIG. 4, the CABAC encoding structure includes a binarization structure that binarizes a syntactic element to generate an empty or blank string, and a binary arithmetic coder structure that encodes the empty or blank string. In addition, the binary arithmetic coder may include a regular coding engine and a bypass coding engine based on a context model of a context modeler. Here, the regular coding engine may be an arithmetic coding structure.
구문 요소가 이미 이진 값인 경우, CABAC 부호화 구조는 구문 요소에 대한 이진화를 추가적으로 수행하지 않고, 구문 요소의 값을 그대로 사용할 수 있다. 반면, 구문 요소가 이진 값이 아닌 경우, CABAC 부호화 구조는 이진 값이 아닌 구문 요소의 값을 이진화하여 이진 값 형태로 변환할 수 있다. 이진 값을 구성하는 각각의 이진수 0 또는 1을 빈(bin)이라고 정의한다. 그리고, 복수의 빈을 나열한 구조를 빈 스트링(bin string)이라고 정의한다. 예를 들어, 이진화 후의 빈 스트링이 110인 경우, 1, 1, 0 각각을 하나의 빈이라고 한다.If the syntax element is already a binary value, the CABAC encoding structure can use the value of the syntax element as it is without additionally performing binarization on the syntax element. On the other hand, if the syntax element is not a binary value, the CABAC encoding structure can convert the value of the syntax element that is not a binary value into a binary value by binarizing it. Each
이후, 이진화된 구문 요소의 빈 또는 빈 스트링은 각 빈에 대응되는 부호화 방법에 따라 정규 코딩(regular coding) 또는 바이패스 코딩(bypass coding)될 수 있다. 여기서, 정규 코딩은 컨텍스트 모델 기반 이진 산술 코딩(CABAC)일 수 있다. 정규 코딩 과정에서, 빈에 대한 확률 값을 반영하는 컨텍스트 모델(context model)이 할당될 수 있다. 그리고, 해당 빈은 할당된 컨텍스트 모델에 기초하여 부호화될 수 있다. 정규 코딩 과정에서, 빈에 대한 부호화가 수행되고, 해당 빈에 대한 컨텍스트 모델이 갱신(update)될 수 있다. 위와 같이 정규 코딩 엔진에 의해 정규 코딩 되는 빈을 컨텍스트 코딩 빈(context-coded bin)이라고 지칭한다.Thereafter, the bins or empty strings of the binarized syntax elements can be regular coded or bypass coded according to an encoding method corresponding to each bin. Here, the regular coding can be context-model-based binary arithmetic coding (CABAC). In the regular coding process, a context model reflecting a probability value for a bin can be assigned. And, the bin can be encoded based on the assigned context model. In the regular coding process, encoding is performed for the bin, and the context model for the bin can be updated. A bin that is regular coded as described above by the regular coding engine is referred to as a context-coded bin.
반면, 정규 코딩 과정과 달리 바이패스 코딩 과정은 입력된 빈에 대한 확률을 추정하는 프로세스 및 빈에 적용한 컨텍스트 모델을 갱신하는 과정을 생략한 코딩 과정일 수 있다. 바이패스 코딩 과정은 빈에 컨텍스트 모델을 할당하는 대신, 균일한 (또는 고정된) 확률 분포를 적용하여 빈을 부호화 할 수 있다. 바이패스 코딩 과정은 균일한 (또는 고정된) 확률 분포를 적용하므로 한 코딩 사이클(cycle)에 다수의 빈을 부호화 할 수 있으며, 이를 통하여 엔트로피 부호화의 속도를 향상시킬 수 있다. 위와 같이 바이패스 코딩 엔진에 의해 바이패스 코딩 되는 빈을 바이패스 코딩 빈(bypass-coded bin)이라고 지칭한다.On the other hand, unlike the regular coding process, the bypass coding process can be a coding process that omits the process of estimating the probability for the input bin and the process of updating the context model applied to the bin. Instead of assigning a context model to the bin, the bypass coding process can encode the bin by applying a uniform (or fixed) probability distribution. Since the bypass coding process applies a uniform (or fixed) probability distribution, it can encode a number of bins in one coding cycle, thereby improving the speed of entropy coding. The bins that are bypass-coded by the bypass coding engine as described above are referred to as bypass-coded bins.
도 5는 본 발명의 일 실시예에 따른 구문 요소에 대한 CABAC 복호화 구조를 설명하기 위한 도면이다. FIG. 5 is a diagram for explaining a CABAC decoding structure for a syntax element according to one embodiment of the present invention.
도 5를 참고하면, CABAC 복호화 구조는 비트스트림을 복호화하여 구문 요소에 대응되는 빈 또는 빈 스트링을 획득하는 이진 산술 디코더 구조 및 빈 또는 빈 스트링을 역이진화하여 구문 요소를 출력하는 역이진화 구조를 포함한다. 그리고, 이진 산술 디코더는 컨텍스트 모델에 기반한 정규 코딩 엔진 및 바이패스 코딩 엔진을 포함할 수 있다. 여기서, 정규 코딩 엔진은 컨텍스트 모델 기반 이진 산술 코딩 구조일 수 있다. Referring to FIG. 5, the CABAC decoding structure includes a binary arithmetic decoder structure that decodes a bitstream to obtain a bin or an empty string corresponding to a syntax element, and a debinarization structure that debinarizes the bin or the empty string to output the syntax element. In addition, the binary arithmetic decoder may include a regular coding engine and a bypass coding engine based on a context model. Here, the regular coding engine may be a context model-based binary arithmetic coding structure.
엔트로피 복호화는 상술한 엔트로피 부호화 과정을 역순으로 수행하는 과정일 수 있다. 예를 들어, 구문 요소가 컨텍스트 모델을 기반으로 부호화된 경우, 복호화기는 수신한 비트스트림으로부터 구문 요소에 대응되는 빈 또는 빈 스트링을 획득할 수 있다. 복호화기는 구문 요소, 디코딩 대상 블록, 주변 블록의 디코딩 정보, 혹은 이전 단계에서 디코딩된 구문 요소/빈의 정보 중 적어도 하나의 정보를 이용하여 빈 또는 빈 스트링의 컨텍스트 모델(context model)을 결정할 수 있다. 그리고, 복호화기는 획득한 빈의 발생 확률을 컨텍스트 모델에 따라 예측하고, 산술 복호화(arithmetic decoding)를 수행하여 구문 요소에 해당하는 빈 또는 빈 스트링의 값을 도출할 수 있다. 이후 복호화되는 빈의 컨텍스트 모델은 위의 과정을 통해 결정된 컨텍스트 모델에 기초하여 업데이트될 수 있다.Entropy decoding may be a process of performing the entropy encoding process described above in reverse order. For example, if a syntax element is encoded based on a context model, a decoder may obtain a bin or an empty string corresponding to the syntax element from a received bitstream. The decoder may determine a context model of the bin or the empty string using at least one of information from the syntax element, the decoding target block, the decoding information of the surrounding blocks, or the information of the syntax element/bin decoded in the previous step. Then, the decoder may predict the occurrence probability of the obtained bin according to the context model, and perform arithmetic decoding to derive the value of the bin or the empty string corresponding to the syntax element. Thereafter, the context model of the decoded bin may be updated based on the context model determined through the above process.
구문 요소가 바이패스 디코딩된 경우, 복호화기는 비트스트림을 통해 구문 요소에 대응하는 빈 또는 빈 스트링을 획득할 수 있고, 획득한 빈에 균일한(또는 고정된) 확률 분포를 적용하여 복호화할 수 있다. 이 경우, 구문 요소의 컨텍스트 모델을 도출하는 절차 및 복호화 이후에 빈에 적용한 컨텍스트 모델을 갱신하는 절차는 생략될 수 있다. If the syntax element is bypass decoded, the decoder can obtain a bin or a bin string corresponding to the syntax element through the bitstream, and decode it by applying a uniform (or fixed) probability distribution to the obtained bin. In this case, the procedure for deriving a context model of the syntax element and the procedure for updating the context model applied to the bin after decoding can be omitted.
복호화된 구문 요소가 빈 스트링인 경우, 복호화기는 빈 스트링을 역이진화하여 구문 요소를 획득할 수 있다. 반면, 복호화된 구문 요소가 하나의 빈인 경우, 복호화기는 역이진화 과정을 생략하고, 빈 값을 그대로 구문 요소의 값으로 사용할 수 있다. If the decoded syntax element is an empty string, the decoder can debinarize the empty string to obtain the syntax element. On the other hand, if the decoded syntax element is a single blank, the decoder can skip the debinarization process and use the blank value as the value of the syntax element.
여기서, 구문 요소는 인트라 예측에 관한 구문 요소, 인터 예측에 관한 구문 요소 등을 포함할 수 있다. 그리고, 본 발명의 일 실시예에 따르면, 인트라 예측에 관한 구문 요소는 템플릿 기반 다중 참조 샘플 라인 (template-based multiple reference line, TMRL) 인트라 예측에 관한 구문 요소일 수 있다. Here, the syntax element may include a syntax element regarding intra prediction, a syntax element regarding inter prediction, etc. And, according to one embodiment of the present invention, the syntax element regarding intra prediction may be a syntax element regarding template-based multiple reference line (TMRL) intra prediction.
템플릿 기반 다중 참조 샘플 라인 인트라 예측은 블록의 인트라 예측 모드 및 블록의 인트라 예측에 사용되는 참조 샘플 라인을 결합하여 시그널링하는 방법에 기초한 인트라 예측일 수 있다. 템플릿 기반 다중 참조 샘플 라인 인트라 예측 방법의 일 실시예는 아래에 설명하는 바와 같을 수 있다. Template-based multiple reference sample line intra prediction may be an intra prediction based on a method of signaling by combining an intra prediction mode of a block and reference sample lines used for intra prediction of the block. One embodiment of a template-based multiple reference sample line intra prediction method may be as described below.
도 6은 본 발명의 일 실시예에 따른 템플릿 기반 다중 참조 샘플 라인 인트라 예측 방법을 설명하기 위한 도면이다. FIG. 6 is a diagram for explaining a template-based multi-reference sample line intra prediction method according to one embodiment of the present invention.
도 6을 참고하면, 현재 블록(current block, 610)에 대한 인트라 예측 모드 및 N개의 다중 참조 샘플을 사용하여 TMRL 인트라 예측이 수행될 수 있다. TMRL 인트라 예측에서 사용하는 인트라 예측 모드 후보의 수는 M개일 수 있다. 이 때, M은 1 이상의 양의 정수이다. 인트라 예측 모드들 중에서, 부/복호기에서 미리 설정된 임의의 모드는 TMRL 인트라 예측에 사용되지 않을 수 있다. 일 실시예에 따르면 미리 설정된 임의의 모드는 플래너 모드 또는 무방향성 예측 모드일 수 있다. Referring to FIG. 6, TMRL intra prediction can be performed using an intra prediction mode for a current block (610) and N multiple reference samples. The number of intra prediction mode candidates used in TMRL intra prediction can be M. In this case, M is a positive integer greater than or equal to 1. Among the intra prediction modes, an arbitrary mode preset in a decoder/encoder may not be used for TMRL intra prediction. According to one embodiment, the arbitrary mode preset may be a planar mode or an undirected prediction mode.
그리고, 도 6을 참고하면, TMRL 인트라 예측에 사용되는 복수의 샘플 라인들(620, 631, 632, 633)이 도시된다. 여기서, 현재 블록(610)에 가장 인접한 이웃 샘플 라인(reference line 0, 620)은 템플릿으로 사용되고, 그 다음으로 인접한 N개의 참조 샘플 라인들(631, 632, 633)이 다중 참조 샘플 라인으로 사용될 수 있다. 이 때, N은 2 이상의 양의 정수이다. And, referring to FIG. 6, multiple sample lines (620, 631, 632, 633) used for TMRL intra prediction are illustrated. Here, the neighboring sample line (reference line 0, 620) closest to the current block (610) is used as a template, and the next adjacent N reference sample lines (631, 632, 633) can be used as multiple reference sample lines. At this time, N is a positive integer greater than or equal to 2.
N개의 참조 샘플 라인들(631, 632, 633)과 M개의 화면내 예측 모드의 조합은 총 N x M개이다. 그리고, TMRL 인트라 예측을 위해, 인트라 예측 모드와 인트라 예측에 사용되는 참조 샘플 라인의 서로 다른 조합을 지시하는 후보들을 포함하는 후보 리스트가 생성될 수 있다. There are a total of N x M combinations of N reference sample lines (631, 632, 633) and M intra-screen prediction modes. And, for TMRL intra prediction, a candidate list including candidates indicating different combinations of intra prediction modes and reference sample lines used for intra prediction can be generated.
일 실시예에 따르면, TMRL 인트라 예측을 위한 후보 리스트는 N x M개의 조합을 모두 사용할 수도 있다. 반면, 다른 실시예에 따르면, TMRL 인트라 예측을 위한 후보 리스트는 인트라 예측 모드와 참조 샘플 라인의 조합에 기초한 인트라 예측 값의 비용 값을 기초로 결정된 K 개의 후보들 만을 포함할 수 있다. 여기서, 비용 값은 템플릿 매칭에 의해 유도된 템플릿을 이용한 예측 값과 인트라 예측 모드 및 참조 샘플 라인의 조합을 이용한 인트라 예측 값의 비교 결과에 기초한 비용 함수의 결과 값일 수 있다. In one embodiment, the candidate list for TMRL intra prediction may use all N x M combinations. On the other hand, in another embodiment, the candidate list for TMRL intra prediction may include only K candidates determined based on a cost value of an intra prediction value based on a combination of an intra prediction mode and a reference sample line. Here, the cost value may be a result value of a cost function based on a comparison result of a prediction value using a template induced by template matching and an intra prediction value using a combination of an intra prediction mode and a reference sample line.
여기서, K 개의 후보들은 N x M개의 조합 중에서, 작은 비용 값을 가지는 순서대로 선택된 K개의 후보들일 수 있다. 그리고, K개의 후보들은 정해진 순서로 정렬(ex. 비용 값 기준으로 오름차순으로 정렬 등)되어 후보 리스트를 구성할 수 있다. 여기서, K는 1 이상, N x M 이하의 정수일 수 있다. Here, the K candidates can be K candidates selected in order of having small cost values among N x M combinations. And, the K candidates can be sorted in a set order (e.g. sorted in ascending order by cost value, etc.) to form a candidate list. Here, K can be an integer greater than or equal to 1 and less than or equal to N x M.
여기서, 비용 함수는 절대 차이의 합(sum of absolute difference, SAD), 제곱 차이의 합(sum of squared difference, SSD), 절대 변환 차이의 합(sum of absolute transformed differences, SATD) 중 적어도 하나의 방법이 사용될 수 있다. Here, the cost function can use at least one of the following methods: sum of absolute differences (SAD), sum of squared differences (SSD), and sum of absolute transformed differences (SATD).
여기서, 비용 값을 산출하기 위한 템플릿 매칭은 아래에 설명하는 바와 같을 수 있다. Here, template matching to derive cost values can be as described below.
도 7은 본 발명의 일 실시 예에 따른 인트라 템플릿 매칭을 설명하기 위한 도면이다. FIG. 7 is a diagram for explaining intra-template matching according to one embodiment of the present invention.
도 7을 참고하면, 인트라 템플릿 매칭 예측은 현재 블록(Current block, 710)을 기준으로 현재 픽처(Current picture, 700) 내의 기 복원된 영역(Reconstructed area, 730)에서 현재 블록에 대한 최적의 예측 블록을 결정할 수 있다. 구체적으로, 인트라 템플릿 매칭 예측에서, 현재 블록(710)의 주변 인접한 참조 샘플들의 집합을 현재 템플릿(Current template, 720)이라 정의할 수 있다. 그리고, 현재 템플릿(720)을 기초로 기 복원된 영역(730) 내에서 템플릿 매칭 기반 탐색을 수행하여 현재 템플릿(720)과 가장 유사도가 높은 템플릿인 참조 템플릿(Reference template, 740)을 찾아 매칭 블록(matching block, 750)이 결정될 수 있다. 여기서, 매칭 블록(750)은 현재 블록(710)에 대한 예측 블록으로 이용될 수 있다.Referring to FIG. 7, intra template matching prediction can determine an optimal prediction block for a current block in a reconstructed area (730) within a current picture (700) based on a current block (710). Specifically, in intra template matching prediction, a set of adjacent reference samples surrounding a current block (710) can be defined as a current template (720). Then, a template matching-based search can be performed within a reconstructed area (730) based on the current template (720) to find a reference template (740) that is a template with the highest similarity to the current template (720), and a matching block (750) can be determined. Here, the matching block (750) can be used as a prediction block for the current block (710).
한편, 템플릿 매칭 기반 탐색은 기 복원된 영역(730) 중 기 정의된 영역(R1, R2, R3, R4)에서 수행될 수 있고, 탐색 순서는 R1, R2, R3, R4 순일 수 있다. Meanwhile, template matching-based search can be performed in pre-defined regions (R1, R2, R3, R4) among the pre-restored regions (730), and the search order can be R1, R2, R3, R4.
즉, 현재 블록 주변의 L형의 현재 템플릿(720)와 가장 높은 유사도를 가지는 참조 템플릿(740)을 탐색 영역에서 탐색하고, 참조 템플릿(740)에 인접한 블록을 매칭 블록으로 결정한다. 다만, 템플릿의 형상은 L형 이외의 형상일 수 있다. 예를 들어, L형 이외의 형상을 가지는 템플릿은 블록의 좌측의 주변 샘플을 포함하는 좌측 템플릿, 블록의 상단의 주변 샘플을 포함하는 상측 템플릿일 수 있다. That is, the reference template (740) having the highest similarity to the current L-shaped template (720) surrounding the current block is searched in the search area, and the block adjacent to the reference template (740) is determined as a matching block. However, the shape of the template may be a shape other than the L-shape. For example, the template having a shape other than the L-shape may be a left template including a left-side surrounding sample of the block, and an upper template including a top-side surrounding sample of the block.
또는, 템플릿 매칭을 수행함에 있어 템플릿은 현재 블록의 크기, 위치 등의 정보에 기초한 L형 템플릿, 좌측 템플릿, 상측 템플릿 또는 부호화기 및 복호화기에서 미리 정의된 블록 주변의 샘플을 이용한 다양한 형태의 템플릿 중에서 암시적으로 결정된 형상의 템플릿일 수 있다. Alternatively, when performing template matching, the template may be a template of a shape implicitly determined from among various forms of templates using samples around blocks predefined in the encoder and decoder, such as an L-shaped template, a left template, an upper template, or the like based on information such as the size and position of the current block.
TMRL 인트라 예측에서, 구성된 후보 목록 중 현재 블록의 인트라 예측에 사용된 참조 라인과 인트라 예측 모드의 조합을 나타내는 후보의 인덱스 값이 시그널링될 수 있다. 현재 블록의 인트라 예측에 사용된 참조 라인과 인트라 예측 모드의 조합을 나타내는 후보의 인덱스를 TMRL 인덱스로 지칭할 수 있다. TMRL 인덱스의 값은 CABAC(context-based adaptive binary arithmetic coding)을 통해 엔트로피 부호화될 수 있다. In TMRL intra prediction, an index value of a candidate representing a combination of a reference line and an intra prediction mode used for intra prediction of a current block among a constructed candidate list may be signaled. The index of a candidate representing a combination of a reference line and an intra prediction mode used for intra prediction of a current block may be referred to as a TMRL index. The value of the TMRL index may be entropy encoded through CABAC (context-based adaptive binary arithmetic coding).
TMRL 인덱스의 값은 이진(binary) 값이 아닐 수 있다. 따라서, TMRL 인덱스는 엔트로피 부호화되기에 앞서, 이진화(binarization)될 수 있다. 예를 들어, TMRL 인덱스는 절단된 골롬-라이스 코드(truncated Golomb-Rice code) 방법으로 이진화 될 수 있다. TMRL 인트라 예측에 사용되는 후보 목록에 포함된 후보들의 인덱스는 아래와 같이 절단된 골롬-라이스 코드 방법으로 이진화된 코드워드로 표현될 수 있다. The value of the TMRL index may not be a binary value. Therefore, the TMRL index may be binarized before being entropy encoded. For example, the TMRL index may be binarized by the truncated Golomb-Rice code method. The indices of the candidates included in the candidate list used for TMRL intra prediction may be expressed as codewords binarized by the truncated Golomb-Rice code method as follows.
다만, 표 1의 실시예는 TMRL 인트라 예측에 사용되는 후보 목록에 포함된 후보들의 인덱스들을 코드워드 형태로 표현하는 일 실시예일 뿐이다. TMRL 인트라 예측에 사용되는 후보 목록에 포함된 후보들의 인덱스는 다양한 이진화 방법(예를 들어, 절단된 단일 코드(truncated unary code) 등)들을 이용하여 이진화될 수 있다. However, the embodiment of Table 1 is only an example of expressing the indices of candidates included in the candidate list used for TMRL intra prediction in the form of codewords. The indices of candidates included in the candidate list used for TMRL intra prediction can be binarized using various binarization methods (e.g., truncated unary code, etc.).
다만, TMRL 인덱스에 CABAC 부호화를 적용할 경우, 정규 코딩의 컨텍스트 모델 업데이트(또는 확률 업데이트) 프로세스로 인하여 부호화 프로세스가 지연될 수 있다. 예를 들어, 정규 코딩 되는 두 개의 빈들이 동일한 컨텍스트 모델을 사용하는 경우, 첫 번째 빈의 값이 확률 모델에 영향을 미칠 수 있다. 따라서 두 번째 빈을 코딩하기에 앞서, 첫 번째 빈의 값으로 인해 변경된 컨텍스트(또는 확률) 값을 업데이트하여야 한다. 컨텍스트(또는 확률) 업데이트 과정은 코딩 사이클(cycle)에 지연을 초래할 수 있다. 즉, 동일한 컨텍스트를 반복적으로 호출하고, 각각의 빈을 코딩한 후 컨텍스트(또는 확률) 모델의 업데이트를 위해 대기하는 과정은 부호화기/복호화기에 병목 현상(bottleneck)을 야기하고, 부호화/복호화의 처리량(throughput)을 감소시킨다. 또한, 낮은 상관도를 보이는 빈들을 정규 코딩하더라도, 더 높은 상관도를 갖는 빈들에 대한 정규 코딩에 비해 성능 이득이 작거나 거의 없을 수 있다. However, when CABAC encoding is applied to the TMRL index, the encoding process may be delayed due to the context model update (or probability update) process of regular coding. For example, if two bins that are regular coded use the same context model, the value of the first bin may affect the probability model. Therefore, before coding the second bin, the context (or probability) value that has changed due to the value of the first bin must be updated. The context (or probability) update process may cause a delay in the coding cycle. That is, the process of repeatedly calling the same context and waiting for the context (or probability) model update after coding each bin causes a bottleneck in the encoder/decoder and reduces the throughput of encoding/decoding. In addition, even if bins showing low correlation are regular coded, the performance gain may be small or almost nonexistent compared to regular coding for bins with higher correlation.
따라서, TMRL 인덱스를 효율적으로 엔트로피 부호화하기 위해, 다음과 같은 방법들 중 하나의 방법이 사용될 수 있다. Therefore, to efficiently entropy encode the TMRL index, one of the following methods can be used.
본 발명의 일 실시예에 따르면, TMRL 인덱스에 대응되는 빈 스트링의 모든 빈들을 정규 코딩함으로써 얻을 수 있는 코딩 성능보다, TMRL 인덱스에 대응되는 빈 스트링의 일부 빈들만 정규 코딩함으로써 절약되는 시간 및 계산 리소스들의 양이 더 중요할 수 있다. 따라서, 부호화기는 정규 코딩과 바이패스 코딩을 결합해 TMRL 인덱스에 대응되는 빈 스트링을 부호화할 수 있다. 이를 위해 부호화기는 TMRL 인덱스에 대응되는 빈 스트링의 하나 이상의 빈들을 컨텍스트 코딩 빈으로 부호화(즉, 정규 코딩)하고, TMRL 인덱스에 대응되는 빈 스트링의 나머지 빈들을 바이패스 코딩 빈으로 부호화(즉, 바이패스 코딩)할 수 있다. According to one embodiment of the present invention, the amount of time and computational resources saved by regular coding only some bins of the bin string corresponding to the TMRL index may be more important than the coding performance that can be obtained by regular coding all bins of the bin string corresponding to the TMRL index. Therefore, the encoder can encode the bin string corresponding to the TMRL index by combining regular coding and bypass coding. To this end, the encoder can encode one or more bins of the bin string corresponding to the TMRL index as context coding bins (i.e., regular coding) and encode the remaining bins of the bin string corresponding to the TMRL index as bypass coding bins (i.e., bypass coding).
이에 상응하여, 복호화기는 정규 코딩 엔진을 이용하여 TMRL 인덱스에 대응되는 빈 스트링 중에서 컨텍스트 코딩된 하나 이상의 빈을 복호화할 수 있다. 그리고, 복호화기는 바이패스 코딩 엔진을 이용하여 TMRL 인덱스에 대응되는 빈 스트링 중에서 컨텍스트 코딩되지 않은 나머지 빈을 복호화할 수 있다. Accordingly, the decoder can decode one or more context-coded bins among the bin strings corresponding to the TMRL index using the regular coding engine. And, the decoder can decode the remaining bins among the bin strings corresponding to the TMRL index that are not context-coded using the bypass coding engine.
구체적으로, 본 발명의 일 실시예에 따르면, TMRL 인덱스가 표 1과 접두사와 접미사로 구분되어 코드워드 형태로 이진화 되는 경우, 코드워드의 접두사에 해당하는 빈들에는 정규 코딩이 적용되고, 코드워드의 접미사에 해당하는 빈은 바이패스 코딩이 적용될 수 있다. 즉, 코드워드의 접두사에 해당하는 빈들은 컨텍스트 코딩 빈이고, 코드워드의 접미사에 해당하는 빈은 바이패스 코딩 빈일 수 있다. Specifically, according to one embodiment of the present invention, when a TMRL index is binarized into a codeword form by dividing it into a prefix and a suffix as in Table 1, regular coding may be applied to bins corresponding to the prefix of the codeword, and bypass coding may be applied to bins corresponding to the suffix of the codeword. In other words, bins corresponding to the prefix of the codeword may be context coding bins, and bins corresponding to the suffix of the codeword may be bypass coding bins.
본 발명의 다른 실시예에 따르면, TMRL 인덱스의 접미사에 해당하는 빈들은 둘 이상의 그룹으로 구분될 수 있다. [표 2]는 20개의 후보들로 구성된 후보 목록의 인덱스를 절단된 골롬-라이스 코드 방법으로 코드워드 형태로 이진화하고, 코드워드의 접미사에 해당하는 빈들을 두 그룹으로 구분한 일 실시예이다. According to another embodiment of the present invention, bins corresponding to suffixes of TMRL indexes can be divided into two or more groups. [Table 2] is an example in which an index of a candidate list consisting of 20 candidates is binarized into a codeword form using a truncated Golomb-Rice code method, and bins corresponding to suffixes of the codewords are divided into two groups.
그리고, 코드워드의 접미사에 해당하는 빈들 중에서, 일부 그룹(들)의 빈에 바이패스 코딩이 적용되고, 나머지 빈들에 컨텍스트 코딩이 적용될 수 있다. And, among the bins corresponding to the suffix of the codeword, bypass coding may be applied to the bins of some group(s), and context coding may be applied to the remaining bins.
본 발명의 일 실시예에 따르면, 부호화기는 표 2의 코드워드의 접미사 1에 해당하는 빈에만 바이패스 코딩을 적용하고, 접두사와 접미사 0에 해당하는 빈들에 컨텍스트 코딩을 적용할 수 있다. 또는, 부호화기는 접미사 0에만 바이패스 코딩을 적용하고, 접두사와 접미사 1에 해당하는 빈들에 컨텍스트 코딩을 적용할 수 있다. According to one embodiment of the present invention, the encoder may apply bypass coding only to bins corresponding to suffix 1 of the codeword in Table 2, and apply context coding to bins corresponding to prefix and suffix 0. Alternatively, the encoder may apply bypass coding only to suffix 0, and apply context coding to bins corresponding to prefix and
즉, 코드워드의 접두사 및 접미사의 일부 그룹에 해당하는 빈들은 컨텍스트 코딩 빈이고, 코드워드의 접미사의 나머지 일부 그룹에 해당하는 빈은 바이패스 코딩 빈일 수 있다.That is, the bins corresponding to some groups of prefixes and suffixes of the codeword may be context coding bins, and the bins corresponding to some remaining groups of suffixes of the codeword may be bypass coding bins.
본 발명의 또 다른 실시예에 따르면, 이진 코드(ex. 절단된 단일 코드 등) 방법을 이용하여, 접두사와 접미사를 가지지 않는 코드워드 형태로 TMRL 인덱스를 이진화할 수 있다. TMRL 인덱스가 접두사와 접미사를 가지지 않는 코드워드 형태로 이진화되는 경우, TMRL 인덱스 코딩을 위한 최대 컨텍스트 코딩 빈의 수는 미리 결정될 수 있다. 부호화기는 TMRL 인덱스의 코드워드 중에서 미리 결정된 개수의 빈들에 컨텍스트 코딩을 적용할 수 있다. 반면, 부호화기는 TMRL 인덱스의 코드워드 중에서 미리 결정된 개수를 초과하는 빈들에 컨텍스트 코딩을 적용할 수 있다. 즉, 코드워드 중에서 미리 결정된 개수의 빈들은 컨텍스트 코딩 빈이고, 코드워드 중에서 미리 결정된 개수를 초과하는 빈들은 빈은 바이패스 코딩 빈일 수 있다. According to another embodiment of the present invention, a TMRL index can be binarized into a codeword form having no prefix and suffix using a binary code (e.g., a truncated single code, etc.) method. When the TMRL index is binarized into a codeword form having no prefix and suffix, the maximum number of context coding bins for TMRL index coding can be determined in advance. The encoder can apply context coding to a predetermined number of bins among the codewords of the TMRL index. On the other hand, the encoder can apply context coding to bins exceeding a predetermined number among the codewords of the TMRL index. That is, the predetermined number of bins among the codewords can be context coding bins, and the bins exceeding a predetermined number among the codewords can be bypass coding bins.
본 발명의 또 다른 실시예에 따르면, TMRL 인덱스에 대응되는 빈 스트링의 빈들의 상관성은 높지 않을 수 있다. 이 경우, TMRL 인덱스에 대응되는 빈 스트링의 빈들에 대한 정규 코딩과 바이패스 코딩 간의 코딩 성능 차이가 크지 않을 수 있다. 다시 말해, TMRL 인덱스에 대응되는 빈 스트링의 빈들을 정규 코딩하는 것이 병목 현상만을 가져올 뿐 코딩 성능 면에서 큰 의미가 없을 수 있다. According to another embodiment of the present invention, the correlation of the bins of the empty string corresponding to the TMRL index may not be high. In this case, the difference in coding performance between regular coding and bypass coding for the bins of the empty string corresponding to the TMRL index may not be significant. In other words, regular coding of the bins of the empty string corresponding to the TMRL index may only cause a bottleneck and may not have much significance in terms of coding performance.
또는, 일부 응용에 따라 TMRL 인덱스에 대응되는 빈 스트링의 빈들을 엔트로피 부호화할 때 빈 스트링의 모든 빈들을 정규 코딩함으로써 얻을 수 있는 코딩 성능보다, 빈 스트링의 모든 빈들을 바이패스 코딩함으로써 절약되는 시간 및 계산 리소스들의 양이 더 중요할 수도 있다. Alternatively, for some applications, the amount of time and computational resources saved by bypass-coding all bins in an empty string may be more important than the coding performance gained by regular-coding all bins in an empty string when entropy-coding the bins in an empty string corresponding to a TMRL index.
따라서, 부호화기는 TMRL 인덱스에 대응되는 빈 스트링의 모든 빈들을 바이패스 코딩할 수 있다. 이 경우, 접두사와 접미사로 구성된 이진화 코드 외에 절단된 단일 코드 등 다양한 형태의 코드들이 사용될 수 있다. Therefore, the encoder can bypass code all bins of the empty string corresponding to the TMRL index. In this case, various types of codes can be used, such as a truncated single code in addition to a binarized code consisting of a prefix and a suffix.
도 8은 본 발명의 일 실시 예에 따른 엔트로피 복호화 방법을 나타내는 흐름도이다. FIG. 8 is a flowchart illustrating an entropy decryption method according to an embodiment of the present invention.
영상 복호화 장치는 비트스트림으로부터 구문 요소에 대응되는 빈 스트링을 획득할 수 있다(S810). 여기서, 빈 스트링의 적어도 일부의 빈은 바이패스 디코딩으로 획득되고, 빈 스트링의 바이패스 코딩된 빈을 제외한 빈은 산술 디코딩으로 획득될 수 있다. 그리고, 구문 요소는 현재 블록의 인트라 예측 모드와 인트라 예측에 사용되는 참조 샘플 라인의 조합을 지시할 수 있다. The video decoding device can obtain an empty string corresponding to a syntax element from a bitstream (S810). Here, at least some of the bins of the empty string are obtained by bypass decoding, and the bins except for the bypass-coded bins of the empty string can be obtained by arithmetic decoding. In addition, the syntax element can indicate a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction.
영상 복호화 장치는 빈 스트링을 역 이진화하여 구문 요소를 획득할 수 있다 (S820). The image decoding device can obtain syntactic elements by de-binarizing an empty string (S820).
영상 복호화 장치는 구문 요소를 기초로 현재 블록의 인트라 예측을 수행할 수 있다(S830). The image decoding device can perform intra prediction of the current block based on the syntax elements (S830).
여기서, 현재 블록의 인트라 예측은 상기 구문 요소에 의해 지시되는 인트라 예측 모드 및 상기 현재 블록에 인접한 복수의 참조 샘플 라인들 중에서, 상기 구문 요소에 의해 지시되는 참조 샘플 라인을 이용하여 수행될 수 있다. Here, intra prediction of the current block can be performed using an intra prediction mode indicated by the syntax element and a reference sample line indicated by the syntax element among a plurality of reference sample lines adjacent to the current block.
여기서, 구문 요소는, 인트라 예측 모드와 인트라 예측에 사용되는 참조 샘플 라인의 서로 다른 조합을 지시하는 후보들을 포함하는 후보 리스트 중에서 하나의 후보를 지시할 수 있다. Here, the syntax element can indicate one candidate from a candidate list including candidates indicating different combinations of intra prediction modes and reference sample lines used for intra prediction.
여기서, 후보들의 인트라 예측 모드는, 미리 결정된 소정의 모드를 제외한 인트라 예측 모드일 수 있다. Here, the intra prediction modes of the candidates can be intra prediction modes other than a predetermined mode.
여기서, 후보 리스트의 후보들은, 인트라 예측 모드 및 참조 샘플 라인의 조합에 기초한 인트라 예측의 비용 값에 기반하여 선택된 복수의 후보들일 수 있다. Here, the candidates in the candidate list may be multiple candidates selected based on the cost value of intra prediction based on a combination of intra prediction mode and reference sample line.
여기서, 비용 값은, 인트라 예측 모드 및 참조 샘플 라인의 조합에 기초한 인트라 예측의 결과 값과 현재 블록에 인접한 샘플들을 포함하는 템플릿에 대응되는 예측 값의 비교 결과를 기초로 결정될 수 있다. Here, the cost value can be determined based on the result of comparing the result value of intra prediction based on the combination of the intra prediction mode and the reference sample line with the prediction value corresponding to the template including samples adjacent to the current block.
여기서, 템플릿은, 현재 블록에 가장 인접한 참조 샘플 라인의 샘플들을 포함할 수 있다. Here, the template may include samples of the reference sample line closest to the current block.
여기서, 비용 값은 SAD(sum of absolute differences) 측정 방법, SSD(sum of squared difference) 측정 방법, 절대 변환 차이의 합(sum of absolute transformed differences) 중 어느 하나의 방법을 통해 측정될 수 있다. Here, the cost value can be measured by any one of the sum of absolute differences (SAD) measurement method, the sum of squared difference (SSD) measurement method, and the sum of absolute transformed differences.
여기서, 빈 스트링은 절단된 골롬 라이스 코드 형태로 이진화된 빈 스트링이고, 빈 스트링은 접두사 및 접미사를 포함할 수 있다. Here, the empty string is a binarized empty string in the form of a truncated Golomb Rice code, and the empty string may include a prefix and a suffix.
여기서, 빈 스트링의 접두사에 해당하는 빈은 산술 디코딩으로 획득되고, 빈 스트링의 접미사에 해당하는 빈은 바이패스 디코딩으로 획득될 수 있다. Here, the bin corresponding to the prefix of the empty string can be obtained by arithmetic decoding, and the bin corresponding to the suffix of the empty string can be obtained by bypass decoding.
여기서, 빈 스트링의 접두사에 해당하는 빈 및 빈 스트링의 접미사에 해당하는 빈 중에서 적어도 일부의 빈은 산술 디코딩으로 획득될 수 있다. Here, at least some of the bins corresponding to the prefix of the empty string and the bins corresponding to the suffix of the empty string can be obtained by arithmetic decoding.
여기서, 빈 스트링은 절단된 단일 코드 형태로 이진화된 빈 스트링이고, 빈 스트링 중에서 미리 설정된 개수 이하의 빈은 상기 산술 디코딩으로 획득될 수 있다. Here, the empty string is an empty string binarized into a truncated single code form, and among the empty strings, bins less than or equal to a preset number can be obtained by the above arithmetic decoding.
도 9는 본 발명의 일 실시 예에 따른 엔트로피 부호화 방법을 나타내는 흐름도이다. FIG. 9 is a flowchart illustrating an entropy encoding method according to an embodiment of the present invention.
영상 부호화 장치는 현재 블록의 인트라 예측 모드와 인트라 예측에 사용되는 참조 샘플 라인의 조합을 지시하는 구문 요소를 유도할 수 있다(S910). The video encoding device can derive a syntax element indicating a combination of an intra prediction mode of a current block and a reference sample line used for intra prediction (S910).
영상 부호화 장치는 구문 요소를 이진화하여 적어도 하나 이상의 빈을 포함하는 빈 스트링을 생성할 수 있다(S920). 여기서, 빈 스트링의 적어도 일부의 빈에는 바이패스 코딩이 적용되고, 빈 스트링의 바이패스 코딩이 적용된 빈을 제외한 빈에는 산술 코딩이 적용될 수 있다. The image encoding device can generate an empty string including at least one bin by binarizing a syntax element (S920). Here, bypass coding may be applied to at least some bins of the empty string, and arithmetic coding may be applied to bins other than bins to which bypass coding of the empty string has been applied.
빈 스트링의 각 빈을, 각 빈에 대응되는 부호화 방법에 따라, 부호화함으로써 비트스트림을 생성할 수 있다(S930). A bitstream can be generated by encoding each bin of an empty string according to an encoding method corresponding to each bin (S930).
도 9에서 설명한 단계를 포함하는 영상 부호화 방법에 의해 비트스트림이 생성될 수 있다. 상기 비트스트림은 비 일시적 컴퓨터 판독가능한 기록매체에 저장될 수 있으며, 또한, 전송(또는 스트리밍)될 수 있다.A bitstream can be generated by a video encoding method including the steps described in FIG. 9. The bitstream can be stored in a non-transitory computer-readable recording medium, and can also be transmitted (or streamed).
도 10은 본 발명에 따른 실시예가 적용될 수 있는 컨텐츠 스트리밍 시스템을 예시적으로 나타내는 도면이다.FIG. 10 is a drawing exemplarily showing a content streaming system to which an embodiment according to the present invention can be applied.
도 10에 도시된 바와 같이, 본 발명의 실시예가 적용된 컨텐츠 스트리밍 시스템은 크게 인코딩 서버, 스트리밍 서버, 웹 서버, 미디어 저장소, 사용자 장치 및 멀티미디어 입력 장치를 포함할 수 있다.As illustrated in FIG. 10, 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.
상기 인코딩 서버는 스마트폰, 카메라, CCTV 등과 같은 멀티미디어 입력 장치들로부터 입력된 컨텐츠를 디지털 데이터로 압축하여 비트스트림을 생성하고 이를 상기 스트리밍 서버로 전송하는 역할을 한다. 다른 예로, 스마트폰, 카메라, CCTV 등과 같은 멀티미디어 입력 장치들이 비트스트림을 직접 생성하는 경우, 상기 인코딩 서버는 생략될 수도 있다.The encoding server compresses content input from multimedia input devices such as smartphones, cameras, CCTVs, etc. into digital data to generate a bitstream and transmits it to the streaming server. As another example, if multimedia input devices such as smartphones, cameras, CCTVs, etc. directly generate a bitstream, the encoding server may be omitted.
상기 비트스트림은 본 발명의 실시예가 적용된 영상 부호화 방법 및/또는 영상 부호화 장치에 의해 생성될 수 있고, 상기 스트리밍 서버는 상기 비트스트림을 전송 또는 수신하는 과정에서 일시적으로 상기 비트스트림을 저장할 수 있다.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.
상기 스트리밍 서버는 웹 서버를 통한 사용자 요청에 기반하여 멀티미디어 데이터를 사용자 장치에 전송하고, 상기 웹 서버는 사용자에게 어떠한 서비스가 있는지를 알려주는 매개체 역할을 할 수 있다. 사용자가 상기 웹 서버에 원하는 서비스를 요청하면, 상기 웹 서버는 이를 스트리밍 서버에 전달하고, 상기 스트리밍 서버는 사용자에게 멀티미디어 데이터를 전송할 수 있다. 이때, 상기 컨텐츠 스트리밍 시스템은 별도의 제어 서버를 포함할 수 있고, 이 경우 상기 제어 서버는 상기 컨텐츠 스트리밍 시스템 내 각 장치 간 명령/응답을 제어하는 역할을 수행할 수 있다.The above 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 that informs the user of any available services. When a user requests a desired service from the web server, the web server transmits it 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 perform a role of controlling commands/responses between each device within the content streaming system.
상기 스트리밍 서버는 미디어 저장소 및/또는 인코딩 서버로부터 컨텐츠를 수신할 수 있다. 예를 들어, 상기 인코딩 서버로부터 컨텐츠를 수신하는 경우, 상기 컨텐츠를 실시간으로 수신할 수 있다. 이 경우, 원활한 스트리밍 서비스를 제공하기 위하여 상기 스트리밍 서버는 상기 비트스트림을 일정 시간동안 저장할 수 있다.The above streaming server can receive content from a media storage and/or an encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, in order to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.
상기 사용자 장치의 예로는, 휴대폰, 스마트 폰(smart phone), 노트북 컴퓨터(laptop computer), 디지털방송용 단말기, PDA(personal digital assistants), PMP(portable multimedia player), 네비게이션, 슬레이트 PC(slate PC), 태블릿 PC(tablet PC), 울트라북(ultrabook), 웨어러블 디바이스(wearable device, 예를 들어, 워치형 단말기(smartwatch), 글래스형 단말기(smart glass), HMD(head mounted display)), 디지털 TV, 데스크탑 컴퓨터, 디지털 사이니지 등이 있을 수 있다.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.
상기 컨텐츠 스트리밍 시스템 내 각 서버들은 분산 서버로 운영될 수 있으며, 이 경우 각 서버에서 수신하는 데이터는 분산 처리될 수 있다.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 distributedly processed.
상기의 실시예들은 부호화 장치 및 복호화 장치에서 동일한 방법 또는 상응하는 방법으로 수행될 수 있다. 또한, 상기 실시예들 중 적어도 하나 혹은 적어도 하나의 조합을 이용해서 영상을 부호화/복호화할 수 있다.The above embodiments can be performed in the same or corresponding manner in the encoding device and the 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.
상기 실시예들이 적용되는 순서는 부호화 장치와 복호화 장치에서 상이할 수 있다. 또는, 상기 실시예들이 적용되는 순서는 부호화 장치와 복호화 장치에서 동일할 수 있다.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.
상기 실시예들은 휘도 및 색차 신호 각각에 대하여 수행될 수 있다. 또는, 휘도 및 색차 신호에 대한 상기 실시예들이 동일하게 수행될 수 있다.The above embodiments can be performed for each of the luminance and chrominance signals, or the above embodiments can be performed identically for the luminance and chrominance signals.
상기 실시예들에서, 방법들은 일련의 단계 또는 유닛으로서 순서도를 기초로 설명되고 있으나, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당해 기술 분야에서 통상의 지식을 가진 자라면 순서도에 나타난 단계들이 배타적이지 않고, 다른 단계가 포함되거나, 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다. In the above embodiments, the methods are described based on the flowchart as a series of steps or units, but 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. In addition, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the present invention.
상기 실시예들은 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 컴퓨터 판독 가능한 기록 매체에 기록되는 프로그램 명령어는 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수도 있다. The above embodiments may be implemented in the form of program commands that can be executed through 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., alone or in combination. The program commands recorded on the computer-readable recording medium may be those specifically designed and configured for the present invention or may be those known to and available to those skilled in the art of computer software.
상기 실시예에 따른 부호화 방법에 의해 생성된 비트스트림은 비 일시적인 컴퓨터 판독 가능한 기록 매체에 저장될 수 있다. 또한, 상기 비 일시적인 컴퓨터 판독 가능한 기록 매체에 저장되는 비트스트림은 상기 실시예에 따른 복호화 방법에 의해 복호화될 수 있다. A bitstream generated by an 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 a decoding method according to the above embodiment.
여기서, 컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령어의 예에는, 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.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, DVDs, magneto-optical media such as floptical disks, and hardware devices specifically configured to store and execute program instructions such as ROMs, RAMs, flash memories, and the like. Examples of program instructions include not only machine language codes 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 the processing according to the present invention, and vice versa.
이상에서 본 발명이 구체적인 구성요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나, 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명이 상기 실시예들에 한정되는 것은 아니며, 본 발명이 속하는 기술분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형을 꾀할 수 있다.Although the present invention has been described above with specific details such as specific components and limited examples and drawings, these have been 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 common knowledge in the technical field to which the present invention belongs can make various modifications and variations from this description.
따라서, 본 발명의 사상은 상기 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등하게 또는 등가적으로 변형된 모든 것들은 본 발명의 사상의 범주에 속한다고 할 것이다. Therefore, the idea of the present invention should not be limited to the embodiments described above, and not only the claims described below but also all modifications equivalent to or equivalent to the claims are included in the scope of the idea of the present invention.
본 발명은 영상을 부호화/복호화하는 장치 및 비트스트림을 저장한 기록 매체에 이용될 수 있다. The present invention can be used in a device for encoding/decoding an image and a recording medium storing a bitstream.
Claims (15)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202480029831.3A CN121058238A (en) | 2023-06-21 | 2024-06-14 | Image encoding/decoding methods, devices, and recording media for storing bitstreams |
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR20230079490 | 2023-06-21 | ||
| KR10-2023-0079490 | 2023-06-21 | ||
| KR10-2024-0077675 | 2024-06-14 | ||
| KR1020240077675A KR20240178215A (en) | 2023-06-21 | 2024-06-14 | Method and apparatus for encoding/decoding image and recording medium for storing bitstream |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024262883A1 true WO2024262883A1 (en) | 2024-12-26 |
Family
ID=93935932
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2024/008238 Pending WO2024262883A1 (en) | 2023-06-21 | 2024-06-14 | Image encoding/decoding method and apparatus, and recording medium for storing bitstream |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2024262883A1 (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101650640B1 (en) * | 2011-11-08 | 2016-08-23 | 퀄컴 인코포레이티드 | Progressive coding of position of last significant coefficient |
| KR20180074773A (en) * | 2015-11-22 | 2018-07-03 | 엘지전자 주식회사 | Method and apparatus for entropy encoding and decoding video signals |
| KR20180111374A (en) * | 2017-03-31 | 2018-10-11 | 주식회사 칩스앤미디어 | A method of video processing providing high-throughput arithmetic coding and a method and appratus for decoding and encoding video using the processing. |
| KR20210099133A (en) * | 2018-12-20 | 2021-08-11 | 캐논 가부시끼가이샤 | Encoding and decoding of information about motion information predictors |
-
2024
- 2024-06-14 WO PCT/KR2024/008238 patent/WO2024262883A1/en active Pending
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101650640B1 (en) * | 2011-11-08 | 2016-08-23 | 퀄컴 인코포레이티드 | Progressive coding of position of last significant coefficient |
| KR20180074773A (en) * | 2015-11-22 | 2018-07-03 | 엘지전자 주식회사 | Method and apparatus for entropy encoding and decoding video signals |
| KR20180111374A (en) * | 2017-03-31 | 2018-10-11 | 주식회사 칩스앤미디어 | A method of video processing providing high-throughput arithmetic coding and a method and appratus for decoding and encoding video using the processing. |
| KR20210099133A (en) * | 2018-12-20 | 2021-08-11 | 캐논 가부시끼가이샤 | Encoding and decoding of information about motion information predictors |
Non-Patent Citations (1)
| Title |
|---|
| L. XU (OPPO), Y. YU (OPPO), H. YU (OPPO), D. WANG (OPPO): "Non-EE2: Modifications on template-based multiple reference line intra prediction", 29. JVET MEETING; 20230111 - 20230120; TELECONFERENCE; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), 5 January 2023 (2023-01-05), XP030306535 * |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020071830A1 (en) | Image coding method using history-based motion information, and device therefor | |
| WO2020071829A1 (en) | History-based image coding method, and apparatus thereof | |
| WO2023200214A1 (en) | Image encoding/decoding method and apparatus, and recording medium storing bitstream | |
| WO2023239147A1 (en) | Image encoding/decoding method, device, and recording medium in which bitstream is stored | |
| WO2024039155A1 (en) | Image encoding/decoding method, device, and recording medium for storing bitstream | |
| WO2023200206A1 (en) | Image encoding/decoding method and apparatus, and recording medium storing bitstream | |
| WO2024262883A1 (en) | Image encoding/decoding method and apparatus, and recording medium for storing bitstream | |
| WO2024253465A1 (en) | Image encoding/decoding method and apparatus, and recording medium for storing bitstream | |
| WO2025084817A1 (en) | Image encoding/decoding method and device, and recording medium storing bitstream | |
| WO2025009816A1 (en) | Image encoding/decoding method and device, and recording medium for storing bitstream | |
| WO2025192990A1 (en) | Method and device for image encoding/decoding and recording medium having bitstreams stored therein | |
| WO2025110783A1 (en) | Image encoding/decoding method and device, and recording medium storing bitstream | |
| WO2024258110A1 (en) | Image encoding/decoding method and device, and recording medium storing bitstream | |
| WO2024210648A1 (en) | Image encoding/decoding method and device, and recording medium storing bitstream | |
| WO2025005615A1 (en) | Image encoding/decoding method and device, and recording medium for storing bitstream | |
| WO2024262870A1 (en) | Image encoding/decoding method, device, and recording medium storing bitstream | |
| WO2024181820A1 (en) | Image encoding/decoding method and device, and recording medium onto which bitstream is stored | |
| WO2026019073A1 (en) | Image encoding/decoding method and apparatus, and recording medium having bitstream stored therein | |
| WO2024210624A1 (en) | Image encoding/decoding method, device, and recording medium storing bitstreams | |
| WO2025037911A1 (en) | Image encoding/decoding method and device, and recording medium on which bitstream is stored | |
| WO2025135613A1 (en) | Image encoding/decoding method and device, and recording medium storing bitstream | |
| WO2024253427A1 (en) | Image encoding/decoding method and device, and recording medium on which bitstream is stored | |
| WO2024253365A1 (en) | Image encoding/decoding method, device, and recording medium for storing bitstream | |
| WO2026005571A1 (en) | Image encoding/decoding method, device, and recording medium storing bitstream | |
| WO2025048441A1 (en) | Image encoding/decoding method and device, and recording medium storing bitstream |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24826201 Country of ref document: EP Kind code of ref document: A1 |