Method and apparatus for efficiently decoding residual block
By introducing decoding flags, inverse quantization and inverse transform units into the video decoding device, combined with deblocking filtering technology, the problem of low efficiency in processing residual blocks in the existing technology is solved, and higher coding efficiency and image quality are achieved.
Patent Information
- Application Number
- CN202410746861.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-03-12
- Filing Date
- 2020-03-12
- Publication Date
- 2024-10-11
AI Technical Summary
Existing video compression technology is inefficient when processing video data with a large number of residual values or areas with few residual values, and it is difficult to achieve higher coding efficiency and image quality.
A video decoding device is designed, including a decoding unit, a prediction unit, an inverse quantization and inverse transform unit, an adder, and a filter unit. Through decoding flags, reconstructed transform coefficients, prediction blocks, and residual blocks, inverse quantization, and inverse transform , and deblocking filtering to process residual blocks, suitable for areas with no or small residual values.
The efficiency of encoding video data in areas with a small residual value is improved, the demand for hardware resources is reduced, and the image quality is improved.
Smart Images

Figure CN118764633A_ABST
Abstract
Description
[0001] This application is a divisional application of the PCT patent application entered into China with Chinese patent application number 202080020838.0, invention name “Method and device for effectively decoding residual blocks”, and application date March 12, 2020.
[0002] CROSS-REFERENCE TO RELATED APPLICATIONS
[0003] This application claims priority to Korean Patent Application No. 10-2019-0028364, filed on Mar. 12, 2019, which is hereby incorporated by reference in its entirety. Technical Field
[0004] The present invention, in some embodiments, relates to encoding and decoding of video. More specifically, the present invention relates to methods and apparatus for efficiently encoding residual blocks. Background Art
[0005] Since video data has a larger data volume compared to audio data or still image data, a large amount of hardware resources, including memory, are required to store or transmit the data in its original form before compression processing.
[0006] Accordingly, storing or transmitting video data is usually accompanied by compressing it by using an encoder before a decoding unit can receive, decompress and reproduce the compressed video data. Existing video compression technologies include H.264 / AVC and High Efficiency Video Coding (HEVC), which improves the coding efficiency of H.264 / AVC by about 40%.
[0007] However, the continuous increase in size, resolution and frame rate of video images and the resulting increase in the amount of data to be encoded require a new and superior compression technology that has better coding efficiency improvement and higher image quality improvement than existing compression technologies.
[0008] In the video encoding process, the video encoding device performs prediction of the current block by intra-frame prediction or inter-frame prediction, and then subtracts the sample value of the current block from the sample value of the prediction block to generate a residual block. The video encoding device divides the residual block into one or more transform blocks, applies a transform to the one or more transform blocks, and transforms the residual value of the transform block from the pixel domain to the frequency domain. Depending on the prediction accuracy, some areas of the residual block may have no residual value or very few residual values, and blindly dividing the residual block into smaller-sized transform blocks is sometimes very inefficient. Summary of the invention
[0009] Technical issues
[0010] The present invention, in some embodiments, seeks to provide a scheme for encoding residual blocks that is applicable to those residual blocks that have no residual values or some regions with very few residual values.
[0011] Technical Solution
[0012] At least one aspect of the present invention provides a video decoding device, which includes a decoding unit, a prediction unit, an inverse quantization and inverse transform unit, an adder and a filter unit. The decoding unit is configured to decode a flag from a bit stream, the flag indicating whether a residual signal corresponding to only a partial area of the current block has been encoded, and when the flag indicates that the residual signal corresponding to only a partial area of the current block has been encoded, the transform coefficient information of one sub-block of two sub-blocks partitioned from the current block is decoded from the bit stream to reconstruct the transform coefficient. The prediction unit is configured to predict the current block to generate a prediction block. The inverse quantization and inverse transform unit is configured to perform inverse quantization and inverse transform on the transform coefficients in a sub-block whose transform coefficient information has been decoded to generate a residual block of the current block. The adder is configured to add the prediction block and the residual block to reconstruct the current block. The filter unit is configured to set a grid of N samples at regular intervals in the horizontal and vertical directions, and perform deblocking filtering on the boundary between two sub-blocks in the current block that coincides with the boundary of the grid.
[0013] Another aspect of the present invention provides a video decoding method, the method comprising the following steps: (i) decoding a flag from a bit stream, the flag indicating whether a residual signal corresponding to only a partial area of a current block has been encoded; (ii) when the flag indicates that a residual signal corresponding to only a partial area of the current block has been encoded, reconstructing a transform coefficient by decoding transform coefficient information of one of two sub-blocks partitioned from the current block from the bit stream; (iii) predicting the current block to generate a prediction block; (iv) generating a residual block of the current block by performing inverse quantization and inverse transformation on the transform coefficients in a sub-block whose transform coefficient information has been decoded; (v) reconstructing the current block by adding the prediction block and the residual block; (vi) setting a grid of N samples at regular intervals in the horizontal and vertical directions, and performing deblocking filtering on a boundary between two sub-blocks in the current block that coincides with the boundary of the grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a block diagram showing a video encoding device that can implement the technology of the present invention.
[0015] Figure 2 is a schematic diagram for explaining a method of dividing a block by using a QTBTTT structure.
[0016] Figure 3a is a schematic diagram showing multiple intra prediction modes.
[0017] Figure 3b is a schematic diagram showing a plurality of intra prediction modes including a wide-angle intra prediction mode.
[0018] Figure 4 is a block diagram showing a video decoding device capable of implementing the technology of the present invention.
[0019] Figure 5a to Figure 5d Various partition types of residual blocks and sub-blocks to be encoded are shown.
[0020] Figure 6 1 is a schematic diagram for explaining a case where one sub-block is encoded separately in a residual block associated with a current block, and shows positions of neighboring blocks to be referenced for predicting a quantization parameter (QP).
[0021] Figure 7 It is a schematic diagram of a chrominance block and at least one luminance block at the same position as the chrominance block.
[0022] Figure 8 is a schematic diagram of a reconstructed current block, which shows that the relevant residual blocks of the reconstructed current block are vertically partitioned and transformed at their left sub-blocks to reveal the inter-sub-block partition boundaries by deblocking the boundaries.
[0023] Fig. 9 is a diagram for explaining deblocking filtering performed on a boundary between residual subblocks at a residual signal level.
[0024] Fig.10 is a flowchart of a method performed by a video encoding apparatus for inter-frame prediction encoding of a current block of a video according to at least one embodiment of the present invention.
[0025] Fig.11 The present invention is a flowchart of a method of a video decoding apparatus for decoding an inter-frame prediction-encoded current block from an encoded video bitstream according to at least one embodiment of the present invention. DETAILED DESCRIPTION
[0026] Hereinafter, some embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description, the same reference numerals preferably represent the same elements, although the elements are shown in different drawings. In addition, in the following description of some embodiments, when it is considered to be obscure the subject of the present invention, for the sake of clarity and brevity, the specific description of the related known components and functions will be omitted.
[0027] Figure 1 is a block diagram showing a video encoding device that can implement the technology of the present invention. Figure 1 A video encoding apparatus and subcomponents of the apparatus are described.
[0028] The video encoding device can be configured to include: an image segmentation unit 110, a prediction unit 120, a subtractor 130, a transform unit 140, a quantization unit 145, a rearrangement unit 150, an entropy encoding unit 155, an inverse quantizer 160, an inverse transform unit 165, an adder 170, a filter unit 180 and a memory 190.
[0029] Each component of the video encoding device can be implemented as hardware or software, or a combination of hardware and software. In addition, the function of each component can be implemented by software, and the software function of each component can be implemented as being executed by a microprocessor.
[0030] A video consists of multiple images. The images are divided into multiple regions, and encoding is performed on each region. For example, an image is divided into one or more tiles or / and slices. Here, one or more tiles are defined as a tile group. Each tile or / and slice is divided into one or more coding tree units (Coding Tree Unit, CTU). Each CTU is divided into one or more coding units (Coding Unit, CU) through a tree structure. The information applied to each CU is encoded as the syntax of the CU, and the information commonly applied to the CU included in a CTU is encoded as the syntax of the CTU. In addition, the information commonly applied to all blocks in a slice is encoded as the syntax of the slice header, and the information applied to all blocks constituting an image is encoded in the picture parameter set (Picture Parameter Set, PPS) or the picture header. In addition, information commonly referenced by multiple images is encoded in a sequence parameter set (Sequence Parameter Set, SPS). In addition, information commonly referenced by one or more SPSs is encoded in a video parameter set (Video Parameter Set, VPS). In the same manner, information commonly applied to one tile or tile group may be encoded as the syntax of a tile header or tile group header.
[0031] The image segmentation unit 110 determines the size of a coding tree unit (CTU). Information on the size of the CTU (CTU size) is encoded as a syntax of an SPS or a PPS and transmitted to a video decoding device.
[0032] The image segmentation unit 110 segments each image constituting a video into a plurality of coding tree units (CTUs) having a predetermined size, and then recursively segments the CTUs using a tree structure. The leaf nodes in the tree structure become coding units (CUs), which are basic units of coding.
[0033] The tree structure used can be a quadtree (QuadTree, QT), a binary tree (BinaryTree, BT), a ternary tree (TernaryTree, TT) or a mixture of two or more QT structures, BT structures and TT structures, wherein the quadtree (QT) is an upper node (or parent node) divided into four lower nodes (or child nodes) of equal size, the binary tree (BT) is an upper node divided into two lower nodes, and the ternary tree (TT) is an upper node divided into three lower nodes at a size ratio of 1:2:1. For example, a quadtree plus a binary tree (QuadTree plus BinaryTree, QTBT) structure can be used, or a quadtree plus a binary tree ternary tree (QuadTree plus BinaryTree TernaryTree, QTBTTT) structure can be used. Here, BTTT can be collectively referred to as a multiple-type tree (Multiple-Type Tree, MTT).
[0034] Figure 2 The QTBTTT partition tree structure is shown. Figure 2 As shown, the CTU can be first split into a QT structure. The quadtree splitting can be repeated until the size of the split block reaches the minimum block size (MinQTSize) of the leaf node allowed in the QT. The first flag (QT_split_flag) indicating whether each node of the QT structure is split into four nodes of the lower layer is encoded by the entropy coding unit 155 and notified to the video decoding device with a signal. When the leaf node of the QT is not larger than the maximum block size (MaxBTSize) of the root node allowed in the BT, it can be further split into any one or more BT structures or TT structures. In the BT structure and / or TT structure, there can be multiple splitting directions. For example, there can be two directions of splitting blocks of related nodes horizontally and vertically. As Figure 2 As shown, when MTT splitting starts, the second flag (mtt_split_flag) indicating whether the node is split is encoded by the entropy coding unit 155 and notified to the video encoding device by a signal. If so, another flag indicating the splitting direction (vertical or horizontal) is encoded and / or a flag indicating the partition or splitting type (binary or trifurcated) is encoded by the entropy coding unit 155, and the video decoding device is notified by a signal.
[0035] Alternatively, before encoding the first flag (QT_split_flag) indicating whether each node is split into four nodes of the lower layer, the CU split flag (split_cu_flag) indicating whether the node is split may be encoded. When the CU split flag (split_cu_flag) value indicates that the node is not split, the block of the node becomes a leaf node in the split tree structure and becomes a coding unit (CU), that is, a basic unit of encoding. When the CU split flag (split_cu_flag) value indicates that the node is split, the video encoding device starts encoding from the first flag in the above manner.
[0036] As another example of a tree structure, when using QTBT, there may be two types of partitions, including a type of horizontally splitting the block of the relevant node into two blocks of equal size (i.e., symmetrical horizontal partitioning) and a type of vertically splitting the block of the relevant node into two blocks of equal size (i.e., symmetrical vertical partitioning). Encoded by the entropy coding unit 155 and transmitted to the video decoding device is a split flag (split_flag) indicating whether each node of the BT structure is split into blocks of the lower layer and split type information indicating its split type. In addition, there may be another type, that is, the block of the relevant node is split into two asymmetrically formed blocks. The asymmetric form may include a form in which the block of the relevant node is split into two rectangular blocks with a size ratio of 1:3, or a form in which the block of the relevant node is split in a diagonal direction.
[0037] Depending on the QTBT or QTBTTT partitioning of the CTU, the CU can have different sizes. In the following, the block corresponding to the CU to be encoded or decoded (i.e., the leaf node of the QTBTTT) is referred to as the "current block". With QTBTTT partitioning, the shape of the current block can be not only square but also rectangular.
[0038] The prediction unit 120 predicts the current block to generate a predicted block. The prediction unit 120 includes an intra prediction unit 122 and an inter prediction unit 124.
[0039] Typically, a current block in an image can be predictively encoded separately. Prediction of the current block can typically be performed using intra-frame prediction techniques or inter-frame prediction techniques, wherein the intra-frame prediction technique uses data from each image containing the current block, while the inter-frame prediction technique uses data from a previous image encoded before the image containing the current block. Inter-frame prediction includes unidirectional prediction and bidirectional prediction.
[0040] The intra prediction unit 122 predicts the pixels in the current block by using the surrounding pixels (reference pixels) around the current block in the current image. Different prediction directions present multiple corresponding intra prediction modes. For example, Figure 3aAs shown, the multiple intra prediction modes may include 2 non-directional modes including a planar mode and a DC mode and 65 directional modes. Each prediction mode provides a different corresponding definition of adjacent pixels and a calculation formula to be used.
[0041] For efficient directional prediction of a current block of rectangular shape, additional modes used may be indicated by the dotted arrows of the intra prediction modes at numbers 67 to 80 and numbers -1 to -14. Figure 3b Directional modes shown. These may be referred to as "wide-angle intra prediction modes". Figure 3b The arrows in indicate the corresponding reference samples used for prediction, not the prediction direction. The prediction direction is opposite to the direction indicated by the arrow. The wide-angle intra prediction mode is a mode for performing prediction of a specific direction mode in the reverse direction without additional bit transmission when the current block is rectangular. In this case, in the wide-angle intra prediction mode, some wide-angle intra prediction modes that can be used in the current block can be determined by the ratio of the width to the height of the rectangular current block. For example, when having a rectangular shape with a height less than the width, a wide-angle intra prediction mode with an angle less than 45 degrees (intra prediction modes at numbers 67 to 80) can be used in the current block. When having a rectangular shape with a height greater than the width, a wide-angle intra prediction mode with an angle of -135 degrees or more (intra prediction modes at numbers -1 to -14) can be used in the current block.
[0042] The intra-frame prediction unit 122 can determine the intra-frame prediction mode to be used to encode the current block. In some examples, the intra-frame prediction unit 122 can encode the current block by utilizing several intra-frame prediction modes, and select the appropriate intra-frame prediction mode to be used from the tested modes. For example, the intra-frame prediction unit 122 can calculate the rate-distortion value by rate-distortion analysis of several tested intra-frame prediction modes, and select the intra-frame prediction mode with the best rate-distortion characteristics among the tested modes.
[0043] The intra prediction unit 122 selects an intra prediction mode from a plurality of intra prediction modes and predicts the current block by using at least one adjacent pixel (reference pixel) determined according to the selected intra prediction mode and a calculation formula. Information about the selected intra prediction mode is encoded by the entropy encoding unit 155 and transmitted to the video decoding device.
[0044] The inter-frame prediction unit 124 generates a prediction block of the current block through motion compensation processing. The inter-frame prediction unit 124 searches for a block that is most similar to the current block in a reference image that is encoded and decoded before the current image, and generates a prediction block of the current block by using the searched block. Then, the inter-frame prediction unit 124 generates a motion vector corresponding to the displacement between the current block in the current image and the prediction block in the reference image. Typically, motion estimation is performed on the luminance component, and the motion vector calculated based on the luminance component is used for both the luminance component and the chrominance component. Motion information including information about the reference image and information about the motion vector used to predict the current block is encoded by the entropy encoding unit 155 and transmitted to the video decoding device.
[0045] The subtractor 130 generates a residual block by subtracting a prediction block generated by the intra prediction unit 122 or the inter prediction unit 124 from the current block.
[0046] The transform unit 140 divides the residual block into one or more transform blocks, applies the transform to the one or more transform blocks, and transforms the residual value of the transform block from the pixel domain to the frequency domain. In the frequency domain, the transform block is called a coefficient block containing one or more transform coefficient values. A two-dimensional transform kernel can be used for the transform, and a one-dimensional transform kernel can be used for each of the horizontal transform and the vertical transform. The transform kernel can be based on a discrete cosine transform (DCT), a discrete sine transform (DST), etc.
[0047] The transform unit 140 may transform the residual signal in the residual block by using the entire size of the residual block as the transform unit. In addition, the transform unit 140 may split the residual block into two sub-blocks in the horizontal or vertical direction and transform only one of the two sub-blocks. Figure 5a to Figure 5d is described. Accordingly, the size of the transform block may be different from the size of the residual block (and thus the prediction block size). In the sub-block where the transform is not performed, the non-zero residual sample values may not exist or may be very sparse. No signal is given for the residual samples of the sub-block where the transform is performed, and the video decoding device may regard them all as "0". Depending on the partition direction and the partition ratio, there may be several partition types. The transform unit 140 provides the entropy coding unit 155 with information about the encoding mode (or transform mode) of the residual block, such as information indicating whether the transform is a residual block or a residual sub-block, information indicating the partition type selected for partitioning the residual block into sub-blocks, and information for identifying the sub-blocks where the transform is performed. The entropy coding unit 155 can encode information about the encoding mode (or transform mode) of the residual block.
[0048] The quantization unit 145 quantizes the transform coefficient output from the transform unit 140, and outputs the quantized transform coefficient to the entropy encoding unit 155. The quantization unit 145 may directly quantize a relevant residual block of a specific block or frame without transformation.
[0049] The rearrangement unit 150 can rearrange the coefficient values on the quantized residual value. The rearrangement unit 150 can use coefficient scanning to change the two-dimensional coefficient array into a one-dimensional coefficient sequence. For example, the rearrangement unit 150 can scan the DC coefficient into the coefficient in the high-frequency area by zig-zag scanning or diagonal scanning to output a one-dimensional coefficient sequence. According to the size of the transform unit and the intra-frame prediction mode, the zig-zag scan used can be used to scan the two-dimensional coefficient array in the column direction. The vertical scan and the horizontal scan for scanning the two-dimensional block shape coefficient in the row direction are replaced. In other words, the scanning method to be used can be determined among the zig-zag scan, the diagonal scan, the vertical scan, and the horizontal scan according to the size of the transform unit and the intra-frame prediction mode.
[0050] The entropy encoding unit 155 encodes the sequence of one-dimensional quantized transform coefficients output from the rearrangement unit 150 using various encoding methods such as Context-based Adaptive Binary Arithmetic Code (CABAC), Exponential Golomb, etc. to generate a bitstream.
[0051] In addition, the entropy encoding unit 155 encodes information about block partitions (e.g., CTU size, CU partition flag, QT partition flag, MTT partition type, and MTT partition direction) so that the video decoding device partitions the block in the same manner as the video encoding device. In addition, the entropy encoding unit 155 encodes and decodes information about a prediction type according to a prediction type, intra-frame prediction information (i.e., information about an intra-frame prediction mode), or inter-frame prediction information (i.e., information about a reference image and a motion vector), the prediction type indicating whether the current block is encoded by intra-frame prediction or inter-frame prediction.
[0052] The inverse quantization unit 160 inversely quantizes the quantized transform coefficient output from the quantization unit 145 to generate a transform coefficient. The inverse transform unit 165 transforms the transform coefficient output from the inverse quantization unit 160 from the frequency domain to the spatial domain to reconstruct a residual block.
[0053] The adding unit 170 adds the reconstructed residual block and the prediction block generated by the prediction unit 120 to reconstruct the current block. Pixels in the reconstructed current block are used as reference pixels when intra-predicting the next block.
[0054] The filter unit 180 performs filtering on the reconstructed pixels to reduce blocking artifacts, ringing artifacts, blurring artifacts, etc. generated due to block-based prediction and transform / quantization. The filter unit 180 may include a deblocking filter 182 and a sample adaptive offset (SAO) filter 184.
[0055] The deblocking filter 180 filters the boundary between the reconstructed blocks to remove the blocking effect caused by block-by-block encoding / decoding, and the SAO filter 184 performs additional filtering on the deblocking filtered image. The SAO filter 184 is a filter for compensating for the difference between the reconstructed pixels and the original pixels caused by lossy encoding.
[0056] The reconstructed blocks are filtered through the deblocking filter 182 and the SAO filter 184 and stored in the memory 190. When all blocks in one image are reconstructed, the reconstructed image can be used as a reference image for inter-frame prediction of blocks in a subsequent image to be encoded.
[0057] Figure 4 1 is a functional block diagram of a video decoding device capable of implementing the technology of the present invention. Figure 4 A video decoding apparatus and subcomponents of the apparatus are described.
[0058] The video decoding apparatus may be configured to include an entropy decoding unit 410 , a rearrangement unit 415 , an inverse quantization unit 420 , an inverse transform unit 430 , a prediction unit 440 , an adder 450 , a filter unit 460 , and a memory 470 .
[0059] At once Figure 1 For a video encoding device, each component of the video decoding device can be implemented as hardware or software, or a combination of hardware and software. In addition, the function of each component can be implemented by software, and the software function of each component can be implemented as being executed by a microprocessor.
[0060] The entropy decoding unit 410 decodes a bit stream generated by the video encoding device and extracts information about block partitions to determine a current block to be decoded, and extracts prediction information and information about a residual signal, etc., required to reconstruct the current block.
[0061] The entropy decoding unit 410 extracts information about the CTU size from a sequence parameter set (SPS) or a picture parameter set (PPS), determines the size of the CTU, and divides the image into CTUs of the determined size. Then, the entropy decoding unit 410 determines the CTU as the highest level of the tree structure, i.e., the root node, and extracts partition information about the CTU, thereby partitioning the CTU by using the tree structure.
[0062] For example, when CTU is segmented by using the QTBTTT structure, the first flag (QT_split_flag) related to QT segmentation is first extracted, and each node is segmented into four nodes of the lower layer. For the node corresponding to the leaf node of QT, the entropy decoding unit 410 extracts the second flag (MTT_split_flag) related to the partition of MTT and the information of the segmentation direction (vertical / horizontal) and / or the segmentation type (binary / tripartite) to segment the leaf node into the MTT structure. This causes each node below the leaf node of QT to be recursively segmented into a BT or TT structure.
[0063] As another example, when a CTU is segmented by using a QTBTTT structure, the entropy decoding unit 410 may first extract a CU segmentation flag (split_cu_flag) indicating whether the CU is segmented, and when segmenting the relevant block, may also extract a first flag (QT_split_flag). During the segmentation process, each node may have zero or more recursive QT segmentations, followed by zero or more recursive MTT segmentations. For example, a CTU may immediately enter an MTT segmentation, or, conversely, have multiple QT segmentations alone.
[0064] As another example, when CTU is segmented by using the QTBT structure, the entropy decoding unit 410 extracts the first flag (QT_split_flag) related to QT segmentation to segment each node into four nodes of the lower layer. And, for a node corresponding to a leaf node of QT, the entropy decoding unit 410 extracts a segmentation flag (split_flag) indicating whether the node is further segmented into BTs and segmentation direction information.
[0065] In addition, when the entropy decoding unit 410 determines the current block to be decoded through the tree structure partitioning, the entropy decoding unit 410 extracts information about the prediction type indicating whether the current block is intra-predicted or inter-predicted. When the prediction type information indicates intra-prediction, the entropy decoding unit 410 extracts syntax elements of intra-prediction information (intra-prediction mode) for the current block. When the prediction type information indicates inter-prediction, the entropy decoding unit 410 extracts syntax elements of inter-prediction information, that is, information indicating a motion vector and a reference image referred to by the motion vector.
[0066] In addition, the entropy decoding unit 410 extracts information about the encoding mode of the residual block from the bitstream, such as information about whether to encode the residual block or to individually encode subblocks of the residual block, information indicating a selected partition type for dividing the residual block into subblocks, information identifying the encoded residual subblock, a quantization parameter, etc. In addition, the entropy decoding unit 410 extracts information about the quantized transform coefficient of the current block as the information about the residual signal.
[0067] The rearrangement unit 415 rearranges the one-dimensional quantized transform coefficients entropy-decoded by the entropy decoding unit 410 into a two-dimensional coefficient array, ie, a block, in a reverse sequence of a coefficient scanning sequence performed by the video encoding apparatus.
[0068] The inverse quantization unit 420 inversely quantizes the quantized transform coefficients. The inverse transform unit 430 inversely transforms the inversely quantized transform coefficients from the frequency domain to the spatial domain based on the information on the encoding mode of the residual block to reconstruct the residual signal, thereby generating a reconstructed residual block of the current block.
[0069] In response to information about the encoding mode of the residual block indicating that the residual block of the current block is encoded in the video encoding device, the inverse transform unit 430 performs an inverse transform on the inverse quantized transform coefficient by using the size of the current block (and therefore, the size of the residual block to be reconstructed) as a transform unit to generate a reconstructed residual block of the current block.
[0070] In addition, in response to the information about the encoding mode of the residual block indicating that a single sub-block of the residual block is encoded separately in the video encoding device, the inverse transform unit 430 performs an inverse transform on the inverse quantized transform coefficient by using the size of the transformed sub-block as a transform unit to reconstruct the residual signal of the transformed sub-block while filling the residual signal of the untransformed sub-block with a "0" value, thereby generating a reconstructed residual block of the current block.
[0071] The prediction unit 440 may include an intra prediction unit 442 and an inter prediction unit 444. The intra prediction unit 442 is activated when the prediction type of the current block is intra prediction, and the inter prediction unit 444 is activated when the prediction type of the current block is inter prediction.
[0072] The intra prediction unit 442 determines an intra prediction mode of a current block among a plurality of intra prediction modes according to the syntax elements of the intra prediction mode extracted by the entropy decoding unit 410, and predicts the current block by using adjacent reference pixels of the current block according to the determined intra prediction mode.
[0073] The inter prediction unit 444 determines a motion vector of a current block and a reference image referred to by the motion vector using the syntax elements for the intra prediction mode extracted by the entropy decoding unit 410 , and predicts the current block using the determined motion vector and the reference image.
[0074] The adder 450 adds the residual block output from the inverse transform unit to the prediction block output from the inter prediction unit or the intra prediction unit to reconstruct the current block. Pixels in the reconstructed current block are used as reference pixels when intra-predicting a subsequent block to be decoded.
[0075] The filter unit 460 may include a deblocking filter 462 and an SAO filter 464. The deblocking filter 462 deblocks and filters the boundaries between the reconstructed blocks to remove the block effect caused by block-by-block decoding. The SAO filter 464 performs additional filtering on the reconstructed blocks after deblocking filtering to compensate for the difference between the reconstructed pixels and the original pixels caused by lossy encoding. The reconstructed blocks are filtered by the deblocking filter 462 and the SAO filter 464 and stored in the memory 470. When all blocks in one image are reconstructed, the reconstructed image is used as a reference image for inter-frame prediction of subsequent blocks within the image to be encoded.
[0076] The techniques of the embodiments shown herein generally relate to inter-frame prediction coding, that is, encoding and decoding the current block. In order to effectively encode the residual block obtained according to block-based motion compensation, the video encoding device may divide the residual block into two residual sub-blocks in the horizontal or vertical direction, and encode one residual sub-block separately between the two residual sub-blocks. In other words, the transform and quantization process may be applied only to one residual sub-block. The residual value of the other non-encoded sub-block is regarded as "0" or ignored. This encoding tool is effective in encoding the residual block when some areas of the residual block have no residual value or very few residual values.
[0077] The video encoding device can select the best one of a first encoding mode and a second encoding mode, wherein the first encoding mode encodes the residual block so as to transform the residual signal in the residual block with a transform unit of the same size as the prediction block, and the second encoding mode divides the residual block into two sub-blocks in the horizontal or vertical direction and encodes one sub-block separately so as to transform the residual signal in the residual block with a transform unit of a different size from the prediction block.
[0078] The second mode related to residual block encoding is described in detail below. The following description focuses mainly on the decoding technique, in particular the operation of the video decoding device, and the encoding technique will be kept concise because the encoding technique is the inverse operation of the fully described decoding technique. In addition, the terms "sub-block of the residual block" and "residual sub-block" can be used interchangeably.
[0079] 1. Partition type and change location
[0080] Figure 5a to Figure 5d Various partitioning or partitioning types of residual blocks and sub-blocks to be encoded (and thus transformed) are shown. The residual block can be divided into two sub-blocks. In the residual blocks 510 to 580 shown, the sub-blocks undergoing transformation are shaded and marked with "A". The sub-block located on the left or upper side of the residual block can be represented as being located at "position 0" in the residual block, and the sub-block located on the right or lower side of the residual block can be represented as being located at "position 1" within the residual block. The position of the sub-block in the residual block where the transformation is performed can be referred to as the "transformation position". Therefore, the transformation position indicated by "position 0" can represent the transformation performed on the sub-block located on the left or upper side of the residual block, and the transformation position indicated by "position 1" can represent the transformation performed on the sub-block located on the right or lower side of the residual block.
[0081] Depending on the partition direction and the partition ratio, various partition types may be considered. The block partition types to be considered include: a first type of symmetrical partitioning in the horizontal direction, a second type of symmetrical partitioning in the vertical direction, a third type of asymmetrical partitioning in the horizontal direction (e.g., at a ratio of 1:3 or 3:1), and a fourth type of asymmetrical partitioning in the vertical direction (e.g., at a ratio of 1:3 or 3:1).
[0082] Block 510 is vertically divided into a left subblock and a right subblock, and a transform is not performed on the right subblock at position 1, while a transform is performed on the left subblock at position 0. Block 520 is vertically divided into a left subblock and a right subblock, and a transform is not performed on the left subblock, while a transform is performed on the right subblock at position 1. Block 530 is horizontally divided into an upper subblock and a lower subblock, and a transform is performed on the upper subblock at position 0 instead of the lower subblock. Block 540 is horizontally divided into two subblocks, and a transform is performed on the lower subblock at position 1 instead of the upper subblock.
[0083] Block 550 is vertically divided into a left sub-block and a right sub-block having a ratio of 1:3, and a transform is not performed on the right sub-block at position 1, while a transform is performed on the left sub-block at position 0. Block 560 is vertically divided into a left sub-block and a right sub-block having a ratio of 3:1, and a transform is not performed on the left sub-block, while a transform is performed on the right sub-block at position 1. Block 570 is horizontally divided into an upper sub-block and a lower sub-block having a ratio of 1:3, and a transform is performed on the upper sub-block at position 0 instead of the lower sub-block. Block 580 is horizontally divided into two sub-blocks having a ratio of 3:1, and a transform is performed on the lower sub-block at position 1 instead of the upper sub-block.
[0084] At once Figure 5c and Figure 5d For blocks 550 to 580 shown, when the residual block is partitioned asymmetrically (eg, in a ratio of 1:3 or 3:1), the transform may be set to be performed on the smaller sub-block by default.
[0085] The available partitioning ratios and partitioning directions may be limited according to the size of the residual block to provide 4 or more pixels for the height or width of the sub-block to be transformed. For example, the first type of horizontal symmetric partitioning may be used for residual blocks with a width of 8 pixels or more, while the second type of vertical symmetric partitioning may be used for residual blocks with a height of 8 pixels or more. Similarly, the third and fourth types providing horizontal or vertical asymmetric partitioning may be used for residual blocks with a width or height of 16 pixels or more.
[0086] 2. Transformation Kernel Selection
[0087] According to the partition direction (horizontal or vertical) of the residual block and its transformation position, ie the position of the transformed sub-block, transformation kernels in the horizontal and vertical directions (horTransform and verTransform) may be selected for the sub-block to be transformed.
[0088] When vertical partitioning is applied to the residual block, the kernel to be used for the sub-block transform can be implicitly derived as follows. For blocks 510 and 550, when the transformed sub-block is at position 0, then (horTransform, verTransform) = (DCT-8, DST-7). For blocks 520 and 560, when the transformed sub-block is at position 1, then (horTransform, verTransform) = (DST-7, DST-7).
[0089] When horizontal partitioning is applied to the residual block, the kernel to be used for the sub-block transform can be implicitly derived as follows. For blocks 530 and 570, when the transformed sub-block is located at position 0, then (horTransform, verTransform) = (DCT-7, DST-8). For blocks 540 and 580, when the transformed sub-block is located at position 1, then (horTransform, verTransform) = (DST-7, DST-7).
[0090] When a residual sub-block is larger than 32 pixels, the DCT-2 kernel can be applied in the horizontal direction and the vertical direction. In addition, for the residual block of the chrominance component, the DCT-2 kernel can always be applied to the transformation of the residual sub-block, regardless of the partition direction (horizontal or vertical) of the residual block and its transformation position, that is, the position of the transformed sub-block. Some cases can explicitly signal the information identifying the transformation kernel used for transformation in the horizontal direction and the vertical direction.
[0091] 3. Signaling of residual coding mode
[0092] When the current block is inter-prediction coded and the associated residual block has at least one non-zero coefficient, a first flag indicating whether the associated residual block of the current block is transformed or only a sub-block of the residual block is coded may be explicitly signaled.
[0093] Accordingly, when reconstructing the residual block of the inter-frame prediction-encoded current block, the video decoding device can decode the first flag from the bitstream to determine whether the video encoding device has divided the residual block into two sub-blocks and separately encoded a sub-block between the two sub-blocks.
[0094] Some embodiments may skip signaling of the first flag based on the width or height of the current block, or based on the product of the width and height, the ratio of the width to the height, or the larger of the width and the height. For example, when both the width and the height of the current block are less than 8 pixels, the video decoding device may skip decoding of the first flag and infer that the entire residual block of the current block has been transformed.
[0095] When only one sub-block of the residual block is encoded, the partition type and transform position of the residual block may be additionally signaled. Information about the partition type and transform position may be provided to the video encoding device in various ways. For example, a syntax element may be used to indicate the partition type of the residual block, or two flags may be used to indicate the partition ratio and the partition direction. In addition, a flag may be used to indicate the transform position, that is, the position of the transformed sub-block. An example case may be to set the flag indicating the transform position to a "0" value when applying a transform to a sub-block located on the left or upper side of the residual block, and to set the flag indicating the transform position to a "1" value when applying a transform to a sub-block located on the right or lower side of the residual block.
[0096] When split at a ratio of 1:3 or 3:1, the residual block may add the constraint that the transform is always performed at the smaller sub-block, which enables the signaling of a flag indicating the transform location to be dispensed with.
[0097] In addition, according to the width and height of the residual block, or according to the product of the width and height, the ratio of the width to the height, and the larger of the width and the height, the use of certain partition types or partition directions and / or partition ratios can be restricted, which makes it possible to exempt the signal notification of the syntax element representing the same partition type or partition direction and / or partition ratio. As an example, when the width and height of the residual block are both less than 16 pixels, it may not be allowed to "split the residual block at a ratio of 1:3 or a ratio of 3:1". Accordingly, the video decoding device can be responsive to the fact that the width and height of the residual block are less than 16 pixels, and the split ratio is 1:1 without decoding the flag indicating the split ratio. As another example, when the width (or height) of the residual block is less than 8 pixels, the residual block may not be allowed to be split in the vertical direction (or horizontal direction). Accordingly, the video decoding device can be responsive to the fact that the width of the residual block is less than 8 pixels, and the residual block is split in the horizontal direction without decoding the flag indicating the split direction. Similarly, the video decoding device may infer that the segmentation is performed in the vertical direction in response to the height of the residual block being less than 8 pixels. Another example may infer that the segmentation is performed in the vertical direction in response to the width being greater than the height, and infer that the segmentation is performed in the horizontal direction in response to the height being greater than the width.
[0098] The residual block associated with the luma component may have only one residual sub-block encoded, and then the corresponding residual block associated with the chroma component may also have only one residual sub-block encoded. Accordingly, the first flag signaled at the CU level may be shared between the luma component residual block and the chroma component residual block.
[0099] The same residual coding mode selected for the luma component residual block can be applied to the chroma component residual block at the same position as the luma component residual block. In other words, when the luma component residual block has only one subblock encoded, the chroma component residual block can also have only one subblock encoded. In this case, information about the partition type of the residual block and the position of the subblock to be encoded can be shared between the luma block and the chroma block.
[0100] In at least one embodiment of a single tree structure, the same residual coding mode can be applied to the luma component and the chroma component, and the same information about the partition direction determined for the luma component residual block and the position of the sub-block to be encoded can be applied to the chroma component residual block. In another example where only one sub-block of the chroma component residual block is encoded, when only one sub-block of the luma component residual block at the same position is encoded in the same way, the same information about the partition direction determined for the luma component residual block and the position of the sub-block to be encoded can be applied to the chroma component residual block.
[0101] 4. Residual Block Reconstruction
[0102] The video decoding device may determine the position of the sub-block in the residual block of the relevant transform coefficient information to be decoded from the bitstream and the size of the sub-block based on the partition type and the transform position. The video decoding device may decode the transform coefficient information from the bitstream to reconstruct the transform coefficient of the sub-block corresponding to the transform position. The video decoding device applies an inverse quantization / inverse transform process to the reconstructed transform coefficient to generate a residual signal corresponding to the sub-block of the transform position, and sets all residual signals corresponding to other sub-blocks of the non-transform position to "0", thereby reconstructing the residual block of the current block.
[0103] Similarly, the video encoding device performs transformation and quantization on the residual sub-block corresponding to the transformation position, performs entropy encoding on the quantized transformation coefficients, and applies inverse quantization / inverse transformation processing to the quantized transformation coefficients to reconstruct the residual sub-block corresponding to the transformation position, and sets all residual signals of other sub-blocks corresponding to non-transformation positions to "0", thereby reconstructing the residual block of the current block.
[0104] 5. Calculation of Quantization Parameters
[0105] The video encoding device may determine a quantization parameter (QP) value of a current block (CU), and determine a differential quantization parameter (Delta QP or DQP) value of the current block based on the QP value and the QP prediction value. The video encoding device may be configured to signal the DQP value and quantize the current block by using the determined QP value. The video encoding device may adjust the QP value of the current block, thereby adjusting the degree of quantization applied to the coefficient block associated with the current block.
[0106] DQP is defined as the difference between the current QP (i.e., the actual QP used in the current block) and the predicted value of the current QP or the QP predicted value. Based on the signaled DQP, the corresponding current QP value can be reconstructed by adding the DQP to the QP predicted value. Specifically, the video encoding device calculates the DQP by subtracting the QP predicted value from the actual QP of the current block, and the video decoding device reconstructs the actual QP of the current block by adding the received DQP to the QP predicted value.
[0107] In some embodiments, the average value of the actual QP values of the upper block and the left block relative to the current block can be determined as the QP prediction value of the current block. In some other embodiments, a representative value (e.g., average value, median value, etc.) of the actual QP values of the left block, the upper left block, and the upper block of the current block can be determined as the QP prediction value of the current block.
[0108] Some embodiments encode only a subblock of the residual block associated with the current block, wherein the partition information, segmentation shape, or position of the subblock of the residual block used for encoding is used as the basis for selecting the neighboring block to be referenced. Then, the actual QP value used to select the neighboring block can be used as the QP prediction value of the current block, or the actual QP value of the selected neighboring block can be used as the basis for obtaining the QP prediction value of the current block.
[0109] Figure 6 2 is a diagram for explaining a case where one subblock is encoded separately in a residual block associated with a current block, and shows positions of neighboring blocks to be referenced for predicting a quantization parameter (QP).
[0110] When the residual block 610 is vertically divided and the residual signal exists only in the left sub-block, that is, when the left sub-block is encoded separately, at least one of the QP prediction values of the neighboring blocks "a, b, d, e" adjacent to the left sub-block can be used as a basis for calculating the QP prediction value of the current block. For example, the QP prediction value of the current block can be calculated based on the average of the QP values of the blocks "a" and "b".
[0111] When the residual block 620 is vertically partitioned and the residual signal exists only in the right subblock, that is, the right subblock is encoded separately, the QP value of block 'c' which is a neighboring block adjacent to the right subblock may be determined as the QP prediction value of the current block.
[0112] Figure 7 It is a schematic diagram of a chrominance block and at least one luminance block at the same position as the chrominance block.
[0113] The QP value of the chroma block can be determined based on the QP value of the corresponding luma block. The QP prediction value of the chroma block can be determined based on the QP value of the luma block at the same position. As an example, the QP value of the luma block "a" located at the upper left side in the current block can be used as the QP prediction value of the chroma component residual block. Alternatively, the available QP prediction value of the chroma component residual block can be the most frequent value, maximum value, minimum value, average value or median value among the QP values of the luma blocks "a to i".
[0114] When one sub-block is encoded separately in the chroma component residual block, the available QP prediction value of the chroma block may be the QP value of the luma block selected based on the partition direction of the residual block, the position of the sub-block for encoding, the size of the sub-block, the horizontal to vertical ratio of the sub-block, and the larger value (or, smaller value) of the width or height of the sub-block. In at least one embodiment, the available QP prediction value of the chroma component block is the QP value of one of the block "d" and the block "i", or the average value of the QP values of the block "d" and the block "i", wherein the block "d" and the block "i" are the luma blocks corresponding to the sub-block A encoded in the chroma component residual block.
[0115] 6. Loop Filter
[0116] The video encoding apparatus and the video decoding apparatus may perform in-loop filtering including deblocking filtering on the reconstructed current block, and store the filtered current block in a buffer (eg, Figure 1 Memory 190 and Figure 4 The image is stored in a memory 470) to be used as a reference image for inter-frame prediction of subsequent blocks in the image to be encoded in the future.
[0117] A deblocking filter is applied to pixels at block boundaries to mitigate blocking artifacts caused by boundaries between blocks in the reconstructed image. Deblocking filtering is performed on both vertical and horizontal boundaries. The filtering performed first on the vertical boundary can be used as input to the subsequent horizontal boundary filtering.
[0118] Figure 8 8 is a schematic diagram of a reconstructed current block (810, 820), which shows that the relevant residual blocks of the reconstructed current block are vertically partitioned and transformed at their left sub-blocks (ie, the transformation position is 0) to show their inter-sub-block partition boundaries and deblocking boundaries.
[0119] The video encoding device and the video decoding device can determine whether to apply deblocking filtering to the current block based on whether the 4×4 unit (or 8×8 unit) deblocking boundary matches the boundary between the sub-blocks of the residual block. For example, the video decoding device can set a grid of N samples at regular intervals in the horizontal and vertical directions, and perform deblocking filtering only when the boundary between two sub-blocks in the current block coincides with the grid boundary. Accordingly, deblocking filtering may not be performed on the boundary between sub-blocks that do not coincide with the grid boundary. Here, N can be set to 2 n (n is a natural number). Alternatively, the video encoding device and the video decoding device may determine whether to apply deblocking filtering to the current block based on pixels in a number of columns or rows included in the current block. Grids of different units may be used depending on whether the current block is a luminance block or a chrominance block. For example, a grid may be set in units of 4×4 for a luminance block, and in units of 8×8 for a chrominance block.
[0120] In some embodiments, deblocking filtering may be performed at the level of the reconstructed residual signal. Fig. 9 is a diagram for explaining deblocking filtering performed on a boundary between residual subblocks at a residual signal level. Fig. 9 A 4×8 residual block is shown that undergoes horizontal partitioning and transformation at the lower 4×4 sub-block of the 4×8 residual block (i.e., the transformation position is 1). Once the residual signal corresponding to the lower sub-block is reconstructed and the residual signal of the upper sub-block is filled with "0" to complete the reconstructed residual block, deblocking filtering can be performed on the residual block. Fig. 9 The embodiment shows a one-dimensional mean filter with parameters [12 1] applied to the boundary between two sub-blocks.
[0121] When applying a deblocking filter to the current block, a strong filter or a weak filter may be selected according to the required deblocking filter strength. In addition, various conventional filters such as a mean filter, a median filter, and a bilateral filter may be considered for use in common image processing techniques.
[0122] In terms of filter selection, before selecting a filter for residual deblocking filtering, the video encoding device may notify the video decoding device of the filter to be used. For example, the index of the filter to be used may be signaled among a plurality of predetermined filters. Alternatively, one predetermined filter may be used.
[0123] Once a filter is selected, the implementation calculates filtering parameters associated with the selected filter, in particular parameters determining filter strength and clipping values for pixel variations, and performs filtering on residual sample boundaries based on the calculated filtering parameters.
[0124] For filter parameters, the position information of adjacent coding units (e.g., previous frame, adjacent blocks, adjacent tile groups, adjacent tiles, etc.) can be notified by signal, and the filter parameters of the adjacent decoding units corresponding to the position can be used for the current block as is, or the filter parameters for the current block can be reconstructed based on the adjacent parameter values and the difference values further notified by signal.
[0125] Fig.10 is a flowchart of a method performed by a video encoding apparatus for inter-frame prediction encoding of a current block of a video according to at least one embodiment of the present invention.
[0126] In step S1010 , the video encoding apparatus may generate a prediction block by performing inter-frame prediction on a current block of video data being encoded, and may generate a residual block by subtracting the prediction block from the current block of video data.
[0127] In step S1020, the video encoding device may determine a residual coding mode of the residual block of the current block. Specifically, the video encoding device may choose whether to encode the residual block of the current block or only encode a subblock as a partial area of the residual block. The selection may be based on a rate-distortion test.
[0128] In step S1030 , the video encoding apparatus may encode information about a residual encoding mode selected for a relevant residual block of the current block.
[0129] The residual encoding mode information may include a first flag indicating whether the residual block or a separate sub-block of the residual block is to be encoded.
[0130] When only one subblock of the residual block is encoded, the video encoding device may additionally encode information indicating a partition type for partitioning the residual block into two subblocks. Depending on the partition direction and the partition ratio, there may be various partition types. For example, the inter-frame prediction encoding method may consider the partition types used, and the partition types include: providing a first type of horizontal symmetrical partitioning into two subblocks, providing a second type of vertical symmetrical partitioning into two subblocks, providing a third type of horizontal asymmetrical partitioning into two subblocks (e.g., at a ratio of 1:3 or 3:1), and providing a fourth type of vertical asymmetrical partitioning into two subblocks (e.g., at a ratio of 1:3 or 3:1). One or more syntax elements may be used to signal the partition type (or partition direction and partition ratio) of the relevant residual block of the current block.
[0131] Depending on the width and height of the residual block associated with the current block, and therefore depending on the width and height of the prediction block, the video encoding device can limit the use of certain partition directions, partition ratios and / or partition types, so that the video encoding device can skip signaling syntax elements indicating the partition direction, partition ratio and / or partition type that depends on the width and height of the residual block.
[0132] In at least one embodiment, when the width and height of the residual block are both less than 16 pixels, the residual block may not be allowed to be split "at a ratio of 1:3 or 3:1". Accordingly, when the width and height of the residual block are less than 16 pixels, the video decoding device can infer that the split ratio is 1:1, and the video encoding device can consider that the syntax element (e.g., a 1-bit flag) used to signal the split direction is skipped. In another embodiment, when the width of the current block is less than 8 pixels, the vertical split of the current block may not be allowed. When the height of the current block is less than 8 pixels, the horizontal split of the current block may not be allowed. Accordingly, when the width (or height) of the residual block is less than 8 pixels, the video decoding device can infer that the current block is split at a ratio of 1:1 in the vertical direction (or horizontal direction), which enables the video encoding device to skip the syntax element (e.g., a 1-bit flag) used to signal the split direction.
[0133] In addition, the video encoding device may explicitly signal a flag for identifying a sub-block to be encoded (and thus to be transformed) between two sub-blocks classified according to the partition type. In some embodiments, the video encoding device may immediately consider the smaller sub-block between the two blocks to be encoded in response to when the partition type of the current block is the third type or the fourth type, that is, when the current block is asymmetrically partitioned in the horizontal or vertical direction, while skipping signaling a flag for identifying the sub-block to be encoded.
[0134] In steps S1040 to S1050, the video encoding device encodes the residual block or a sub-block of the residual block according to the residual encoding mode selected for the relevant residual block of the current block. When the residual block is selected to be encoded, the video encoding device may transform and quantize the residual block with a transform unit of a size equal to the residual block, and entropy encode the quantized transform coefficients. When it is selected to encode only a sub-block of the residual block, the video encoding device may transform and quantize the sub-block corresponding to the transform position, and entropy encode the quantized transform coefficients. The residual signals of other sub-blocks corresponding to the untransformed positions are all regarded as 0, which eliminates the need for transform coefficient information.
[0135] In step S1060, the video decoding device may apply an inverse quantization / inverse transform process to the quantized transform coefficients to reconstruct the residual signal corresponding to the transform position, and set all residual signals of other sub-blocks corresponding to the non-transformed position to 0, thereby reconstructing the residual block of the current block. The video encoding device may add the reconstructed residual block to the prediction block to generate a reconstructed current block.
[0136] In step S1070, the video encoding apparatus may perform deblocking filtering on at least the reconstructed current block, and store the filtered current block in a buffer (eg, Figure 1 The video encoding device may store the N samples in a memory 190 of the image to be encoded to serve as a reference image for inter-frame prediction of subsequent blocks in the image to be encoded. Specifically, the video encoding device may set a grid of N samples at regular intervals in the horizontal and vertical directions, and determine whether to apply deblocking filtering to the current block based on whether the boundary between the sub-blocks of the residual block coincides with the grid boundary. The video encoding device may perform deblocking filtering only when the boundary between two residual sub-blocks in the current block coincides with the grid boundary. In other words, deblocking filtering may be performed only when the 4×4 unit (or 8×8 unit) deblocking boundary coincides with the boundary between the residual sub-blocks.
[0137] Fig.11 The present invention is a flowchart of a method of a video decoding apparatus for decoding an inter-frame prediction-encoded current block from an encoded video bitstream according to at least one embodiment of the present invention.
[0138] In step S1110, a video decoding device (eg, Figure 4 The entropy decoding unit) can decode information about the residual coding mode of the residual block related to the current block.
[0139] For example, the video decoding device may decode from the bitstream a first flag indicating whether the encoding is a residual block related to the current block or a separate sub-block of the residual block. When the first flag has a first value (e.g., "0"), it may indicate that the residual block has been transformed, and a first flag having a second value (e.g., "1") may indicate that a separate sub-block of the residual block has been transformed.
[0140] When the first flag indicates that only one subblock of the residual block is transformed, the video decoding device may further decode one or more syntax elements representing the partition type (partition direction and / or partition ratio) of the residual block from the bitstream, and may determine the partition type of the residual block based at least in part on the decoded one or more syntax elements. Depending on the partition direction and the partition ratio, there may be various partition types. For example, the partition types may include: providing a first type of horizontal symmetrical partitioning into two subblocks, providing a second type of vertical symmetrical partitioning into two subblocks, providing a third type of horizontal asymmetrical partitioning into two subblocks (e.g., at a ratio of 1:3 or 3:1), and providing a fourth type of vertical asymmetrical partitioning into two subblocks (e.g., at a ratio of 1:3 or 3:1).
[0141] When determining the partition type, the width and height of the current block and the information indicating the partition type may be further considered. Depending on the width and height of the current block, the use of certain partition types (or partition directions and / or partition ratios) may be restricted, which may exempt the signaling of syntax elements indicating the same partition type (or partition direction and / or partition ratio).
[0142] At least one embodiment may be responsive to not allowing the current block to be split “at a ratio of 1:3 or 3:1” when both the width and height of the current block are less than 16 pixels. Accordingly, when both the width and height of the residual block are less than 16 pixels, the video decoding device may simply infer that the split ratio is 1:1 without decoding a syntax element (e.g., a 1-bit flag) indicating the split direction.
[0143] Another embodiment may be responsive to not allowing the current block to be split in the vertical direction (or horizontal direction) when the width (or height) of the current block is less than 8 pixels. Therefore, when the width of the residual block is less than 8 pixels, the video decoding device may only infer that the split direction is the horizontal direction without decoding the syntax element indicating the split direction. In the same manner, when the height of the residual block is less than 8 pixels, the video decoding device may only infer that the split direction is the vertical direction without decoding the syntax element indicating the direction.
[0144] In order to identify the sub-block from which the transform coefficient information is to be decoded, the video decoding device may further decode from the bitstream a syntax element (e.g., a 1-bit flag) indicating the position of the encoded sub-block and the position of the sub-block on which the transform has been performed. In some embodiments, the video decoding device may immediately consider the smaller sub-block between the two blocks as a sub-block to be subjected to the transform in response to the partition type of the current block being the third type or the fourth type, while skipping the decoding of the syntax element indicating the position of the sub-block on which the transform is performed.
[0145] In steps S1120 to S1130, the video decoding apparatus may reconstruct a relevant residual block of the current block based on the decoded residual coding mode information.
[0146] When the first flag indicates that the relevant residual block of the current block is encoded, the video decoding device can decode the transform coefficient information of the residual block from the bit stream to reconstruct the transform coefficient. Thereafter, the video decoding device inversely quantizes the transform coefficient and transforms the inversely quantized transform coefficient with a transform unit having a size equal to the residual block, thereby reconstructing the residual block of the current block.
[0147] When the first flag indicates that only one sub-block of the residual block is encoded, the video decoding device can decode the transform coefficient information of the sub-block corresponding to the transform position from the bit stream to reconstruct the transform coefficient. Thereafter, the video decoding device inversely quantizes and inversely transforms the transform coefficient to generate a residual signal corresponding to the sub-block of the transform position, and sets all residual signals corresponding to other sub-blocks of the non-transform position to "0", thereby reconstructing the residual block of the current block.
[0148] In step S1140, the video decoding apparatus may generate a prediction block by performing inter-frame prediction on the current block, and may reconstruct the current block by adding the prediction block and the residual block.
[0149] In step S1150, the video decoding apparatus may perform deblocking filtering on the reconstructed current block, and store the filtered current block in a buffer (eg, Figure 4 The video decoding device may set a grid of N samples at regular intervals in the horizontal and vertical directions, and determine whether to apply deblocking filtering to the current block based on the boundary of the set grid. For example, when the boundary between the current block and other decoded blocks coincides with the grid boundary, deblocking filtering may be applied to the boundary between the current block and other decoded blocks. In addition, when the boundary between the sub-blocks of the residual block coincides with the grid boundary, deblocking filtering may be applied to the boundary between the sub-blocks of the residual block. Grids of different units may be used depending on whether the current block is a luminance block or a chrominance block. For example, a grid may be set in units of 4×4 for luminance blocks and in units of 8×8 for chrominance blocks.
[0150] It should be understood that the above description presents illustrative embodiments that can be implemented in various other ways. The functions described in some embodiments can be implemented by hardware, software, firmware and / or their combination. It should also be understood that the functional components described in this specification are marked by "... units" to highlight their independent realizability.
[0151] In addition, the various methods or functions described in the present invention can be implemented as instructions stored in a non-volatile recording medium, which can be read and executed by one or more processors. Non-volatile recording media include, for example, all types of recording devices that store data in a form that can be read by a computer system. For example, non-volatile recording media can include storage media such as erasable programmable read-only memory (EPROM), flash drives, optical drives, magnetic hard drives, and solid-state drives (SSDs), etc.
[0152] Although exemplary embodiments of the present invention have been described for illustrative purposes, it will be appreciated by those skilled in the art that various modifications, additions and substitutions may be made without departing from the claimed concept and spirit of the present invention. Therefore, for the sake of brevity and clarity, exemplary embodiments of the present invention are described. The scope of the technical concept of the present invention is not limited by the illustrations. Accordingly, it will be appreciated by those skilled in the art that the scope of the claimed invention is not limited by the embodiments explicitly described above, but by the claims and their equivalents.
Claims
1. A video decoding device, the device comprising at least one processor, wherein the at least one processor is configured to: decoding a flag from the bitstream, the flag indicating whether a residual signal corresponding to only a portion of the current block has been encoded; When the flag indicates that the residual signal corresponding to only a partial area of the current block has been encoded, reconstructing the transform coefficient by decoding transform coefficient information of one of the two sub-blocks partitioned from the current block from the bitstream; Predicting the current block to generate a predicted block; generating a residual block of the current block by performing inverse quantization and inverse transformation on a transform coefficient in one sub-block whose transform coefficient information has been decoded, wherein the inverse transformation is performed based on a predetermined transform kernel; reconstructing the current block by adding the prediction block and the residual block; and A grid of N samples is set at regular intervals in the horizontal and vertical directions, and deblocking filtering is performed on a boundary between two sub-blocks in the current block that coincidentally matches the boundary of the grid.
2. The video decoding device according to claim 1, in, A residual signal of one sub-block of two sub-blocks is generated by performing inverse quantization and inverse transformation on the transform coefficients in a sub-block whose transform coefficient information has been decoded, and a residual block of the current block is generated by setting the residual signal of the other sub-block of the two sub-blocks to zero.
3. The video decoding device according to claim 1, in, The at least one processor is configured to reconstruct transform coefficients by: decoding from a bitstream one or more syntax elements indicating a partition type of a current block; Determining a partition type of the current block to be split into two sub-blocks based on one or more syntax elements indicating a partition type of the current block and a width and a height of the current block; as well as Transform coefficient information corresponding to only one subblock of two subblocks determined according to the partition type is decoded.
4. The video decoding device according to claim 3, in, The partition type of the current block includes at least one of the following: A first type, in which the current block is split symmetrically in the horizontal direction; The second type, in which the current block is divided symmetrically in the vertical direction; A third type, in which the current block is split asymmetrically in the horizontal direction; A fourth type, in which the current block is partitioned asymmetrically in the vertical direction.
5. The video decoding device according to claim 4, in, The at least one processor is configured to decode transform coefficient information by: When the partition type is the third type or the fourth type, transform coefficient information is decoded only for a relatively smaller subblock between two subblocks.
6. A video encoding device, the device comprising at least one processor, the processor being configured to: predicting a current block of video data to generate a predicted block; Generate a residual block of the current block based on the prediction block; Determine to signal a residual signal within a partial region of a residual block for a current block, the partial region corresponding to one of two sub-blocks partitioned from the current block; encoding into a bitstream a flag indicating that a residual signal within a partial region of the residual block is signaled; Performing transformation and quantization on the residual signal in the partial region to encode the residual signal in the partial region of the residual block into a bit stream, wherein the transformation is performed based on a predetermined transformation kernel; reconstructing the current block by adding the prediction block and the residual block for use in encoding other blocks of video data; and A grid of N samples is set at regular intervals in the horizontal and vertical directions, and deblocking filtering is performed on a boundary between two sub-blocks in the current block that coincidentally matches the boundary of the grid.
7. The video encoding device according to claim 6, in, The at least one processor is further configured to: One or more syntax elements indicating a partition type of a current block specifying a partition ratio and a partition direction are encoded into a bitstream, wherein an available partition ratio and an available partition direction of the current block are restricted according to a width and a height of the current block.
8. An apparatus for providing video data using a video decoding apparatus, the apparatus comprising at least one processor, the at least one processor being configured to: Encoding video data into a bitstream; Send the bitstream to the video decoding device, in, The at least one processor is configured to encode video data by: predicting a current block of video data to generate a predicted block; Generate a residual block of the current block based on the prediction block; Determine to signal a residual signal within a partial region of a residual block for a current block, the partial region corresponding to one of two sub-blocks partitioned from the current block; encoding into a bitstream a flag indicating that a residual signal within a partial region of the residual block is signaled; Performing transformation and quantization on the residual signal in the partial region to encode the residual signal in the partial region of the residual block into a bit stream, wherein the transformation is performed based on a predetermined transformation kernel; reconstructing the current block by adding the prediction block and the residual block for use in encoding other blocks of video data; and A grid of N samples is set at regular intervals in the horizontal and vertical directions, and deblocking filtering is performed on a boundary between two sub-blocks in the current block that coincidentally matches the boundary of the grid.
