TRANSFORM AND QUANTIZATION ON NON-DYADIC BLOCKS

A mechanism for processing video data is disclosed. A scaling process is selected for application to a block during residual coding based on whether the block is dyadic or non-dyadic. The block has a width (W) and a height (H). A conversion is performed between a visual media data and a bitstream based on application of the scaling process to the block.

TECHNICAL FIELD

This patent document relates to generation, storage, and consumption of digital audio video media information in a file format.

BACKGROUND

Digital video accounts for the largest bandwidth used on the Internet and other digital communication networks. As the number of connected user devices capable of receiving and displaying video increases, the bandwidth demand for digital video usage is likely to continue to grow.

SUMMARY

A first aspect relates to a method for processing video data comprising: selecting a scaling process for application to a block during residual coding based on whether the block is dyadic or non-dyadic, wherein the block has a width (W) and a height (H); and performing a conversion between a visual media data and a bitstream based on application of the scaling process to the block.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the scaling process includes application of a scaling factor after a first forward transform stage (ST1), and wherein ST1is set to 2−(┌log2W┐+offset)when the block is non-dyadic, where offset is an integer.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the scaling process includes application of a scaling factor after a second forward transform stage (ST2), and wherein ST2is set to 2−(┌log2W┐+offset)when the block is non-dyadic, where offset is an integer.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the scaling process includes application of a scaling factor after a first inverse transform stage (SIT1), and wherein SIT1is set to 2−offsetwhen the block is non-dyadic, where offset is an integer.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the scaling process includes application of a scaling factor after a second inverse transform stage (SIT2), and wherein SIT2is set to 2−offsetwhen the block is non-dyadic, where offset is an integer.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the offset is a function of a bit-depth.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the scaling process includes application of a scaling factor after a first forward transform stage (ST1) and application of a scaling factor after a second forward transform stage (ST2), and wherein ST1is set to 2(└log2W┐+B−9)and ST2is set to 1 when the block is non-dyadic and the H is equal to one, where B is a bit-depth.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the scaling process includes application of a scaling factor after a first forward transform stage (ST1) and application of a scaling factor after a second forward transform stage (ST2), and wherein ST1is set to 1 and ST2is set to 2(└log2H┘+B−9)when the block is non-dyadic and the W is equal to one, where B is a bit-depth.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the scaling process includes application of a scaling factor after a first inverse transform stage (ST1) and a scaling factor after a second inverse transform stage (SIT2), and wherein SIT1is set to 1 and SIT2is set to 2−(20−B)when the block is non-dyadic and the W is equal to one, where B is a bit-depth.

Optionally, in any of the preceding aspects, another implementation of the aspect provides selecting a quantization process for application to the block during residual coding based on whether the block is dyadic or non-dyadic.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the quantization process includes a determination of quantized residual coefficients, denoted as level, according to

where coeff includes transformed residual coefficients, QP is a quantization parameter, fQP%6is a quantization matrix, offsetQis an integer value, and shift2 is a shifting value, and wherein fQP%6, offsetQ, and shift2 are selected based on dimensions of the block when the block is non-dyadic.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the quantization process includes a determination of de-quantized residual coefficients according to

where coeffQincludes de-quantized residual coefficients, level are quantized residual coefficients, QP is a quantization parameter, gQP%6is a de-quantization matrix, offsetIQis an integer value, and shift1 is a shifting value, and wherein gQP%6, offsetIQand shift1 are selected based on dimensions of the block when the block is non-dyadic.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that fQP%6is derived based on W, H and QP, wherein shift2 is derived based on W and H.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that gQP%6is derived based on W, H and QP, and wherein shift1 is derived based on W and H.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that gQP%6is derived according to

where Prod is derived base on W×H, IQ_SHIFT is an integer, s is an integer, and round is a function that rounds a floating point number into an integer.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that fQP%6is derived according to

where Prod is derived base on W×H, Q_SHIFT is an integer, s is an integer, and round is a function that rounds a floating point number into an integer.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that fQP%6is derived according to

where round is a function that rounds a floating point number into an integer, Q_SHIFT is an integer, IQ_SHIFT is an integer, gQP%6(W×H) is a de-quantization matrix based on W and H, and Additionalshifts2 (W,H) is a shifting value based on W and H.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that Prod is equal to 1, s is equal to 1 or 2, gQP%6(W, H) is set equal to gQP%6VVC_evenor gQP%6VVC_odd, and fQP%6(W, H) is set equal to fQP%6VVC_oddor fQP%6VVC_even.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that fQP%6is stored as a three-dimension table denoted as f[idx0][idx1][idx2], or wherein gQP%6is stored as a three-dimension table denoted as g[idx0][idx1][idx2], where idx2 represents a value of a QP, idx0 represents W, and idx1 represents H.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the quantization process only applies a quantization scaling matrix when the block is a dyadic block and does not apply the quantization scaling matrix when the block is a non-dyadic block.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that a quantization scaling matrix is signaled in the bitstream to support the quantization process when the block is a non-dyadic block.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that sign data hiding (SDH) or sign prediction is applied to the block when the block is a non-dyadic block.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the block is a transform-skip coded block, and wherein the quantization process is applied differently for a non-dyadic block than a dyadic block.

Optionally, in any of the preceding aspects, another implementation of the aspect provides that the block is a palette coded block, and wherein the quantization process is applied differently for a non-dyadic block than a dyadic block.

A second aspect relates to a non-transitory computer readable medium comprising a computer program product for use by a video coding device, the computer program product comprising computer executable instructions stored on the non-transitory computer readable medium such that when executed by a processor cause the video coding device to perform the method of any of the preceding aspects.

A third aspect relates to an apparatus for processing video data comprising: a processor; and a non-transitory memory with instructions thereon, wherein the instructions upon execution by the processor, cause the processor to perform the method of any of the preceding aspects.

DETAILED DESCRIPTION

Versatile Video Coding (VVC), also known as H.266, terminology is used in some description only for ease of understanding and not for limiting scope of the disclosed techniques. As such, the techniques described herein are applicable to other video codec protocols and designs also. In the present document, editing changes are shown to text by bold italics indicating cancelled text and bold underline indicating added text, with respect to the VVC specification or International Organization for Standardization (ISO) base media file format (ISOBMFF) file format specification.

This document is related to image/video coding, and more particularly to transforms on some special kinds of blocks. The disclosed mechanisms may be applied to the video coding standards such as High Efficiency Video Coding (HEVC) and/or Versatile Video Coding (VVC). Such mechanisms may also be applicable to other video coding standards and/or video codecs.

Video coding standards have evolved primarily through the development of the International Telecommunication Union (ITU) Telecommunication Standardization Sector (ITU-T) and International Organization for Standardization (ISO)/International Electrotechnical Commission (IEC) standards. The ITU-T produced a H.261 standard and a H.263 standard, ISO/IEC produced Motion Picture Experts Group (MPEG) phase one (MPEG-1) and MPEG phase four (MPEG-4) Visual standards, and the two organizations jointly produced the H.262/MPEG phase two (MPEG-2) Video standard, the H.264/MPEG-4 Advanced Video Coding (AVC) standard, and the H.265/High Efficiency Video Coding (HEVC) standard. Since H.262, the video coding standards are based on a hybrid video coding structure that utilizes a temporal prediction plus a transform coding.

FIG.1is a schematic diagram of an example coding and decoding (codec) for video coding, for example according to HEVC. For example, codec100provides functionality to support converting a video file into a bitstream by encoding and/or decoding pictures. Codec100is generalized to depict components employed in both an encoder and a decoder. Codec100receives a stream of pictures as a video signal101and partitions the pictures. Codec100then compresses the pictures in the video signal101into a coded bitstream when acting as an encoder. When acting as a decoder, codec system100generates an output video signal from the bitstream. The codec100includes a general coder control component111, a transform scaling and quantization component113, an intra-picture estimation component115, an intra-picture prediction component117, a motion compensation component119, a motion estimation component121, a scaling and inverse transform component129, a filter control analysis component127, an in-loop filters component125, a decoded picture buffer component123, and a header formatting and context adaptive binary arithmetic coding (CAB AC) component131. Such components are coupled as shown. InFIG.1, black lines indicate movement of data to be encoded/decoded while dashed lines indicate movement of control data that controls the operation of other components. The components of codec100may all be present in the encoder. The decoder may include a subset of the components of codec100. For example, the decoder may include the intra-picture prediction component117, the motion compensation component119, the scaling and inverse transform component129, the in-loop filters component125, and the decoded picture buffer component123. These components are now described.

The video signal101is a captured video sequence that has been partitioned into blocks of pixels by a coding tree. A coding tree employs various split modes to subdivide a block of pixels into smaller blocks of pixels. These blocks can then be further subdivided into smaller blocks. The blocks may be referred to as nodes on the coding tree. Larger parent nodes are split into smaller child nodes. The number of times a node is subdivided is referred to as the depth of the node/coding tree. The divided blocks can be included in coding units (CUs) in some cases. For example, a CU can be a sub-portion of a CTU that contains a luma block, red difference chroma (Cr) block(s), and a blue difference chroma (Cb) block(s) along with corresponding syntax instructions for the CU. The split modes may include a binary tree (BT), triple tree (TT), and a quad tree (QT) employed to partition a node into two, three, or four child nodes, respectively, of varying shapes depending on the split modes employed. The video signal101is forwarded to the general coder control component111, the transform scaling and quantization component113, the intra-picture estimation component115, the filter control analysis component127, and the motion estimation component121for compression.

The general coder control component111is configured to make decisions related to coding of the images of the video sequence into the bitstream according to application constraints. For example, the general coder control component111manages optimization of bitrate/bitstream size versus reconstruction quality. Such decisions may be made based on storage space/bandwidth availability and image resolution requests. The general coder control component111also manages buffer utilization in light of transmission speed to mitigate buffer underrun and overrun issues. To manage these issues, the general coder control component111manages partitioning, prediction, and filtering by the other components. For example, the general coder control component111may increase compression complexity to increase resolution and increase bandwidth usage or decrease compression complexity to decrease resolution and bandwidth usage. Hence, the general coder control component111controls the other components of codec100to balance video signal reconstruction quality with bit rate concerns. The general coder control component111creates control data, which controls the operation of the other components. The control data is also forwarded to the header formatting and CABAC component131to be encoded in the bitstream to signal parameters for decoding at the decoder.

The video signal101is also sent to the motion estimation component121and the motion compensation component119for inter-prediction. A video unit (e.g., a picture, a slice, a CTU, etc.) of the video signal101may be divided into multiple blocks. Motion estimation component121and the motion compensation component119perform inter-predictive coding of the received video block relative to one or more blocks in one or more reference pictures to provide temporal prediction. Codec system100may perform multiple coding passes, e.g., to select an appropriate coding mode for each block of video data.

Motion estimation component121and motion compensation component119may be highly integrated, but are illustrated separately for conceptual purposes. Motion estimation, performed by motion estimation component121, is the process of generating motion vectors, which estimate motion for video blocks. A motion vector, for example, may indicate the displacement of a coded object in a current block relative to a reference block. A reference block is a block that is found to closely match the block to be coded, in terms of pixel difference. Such pixel differences may be determined by sum of absolute difference (SAD), sum of square difference (SSD), or other difference metrics. HEVC employs several coded objects including a CTU, coding tree blocks (CTBs), and CUs. For example, a CTU can be divided into CTBs, which can then be divided into CBs for inclusion in CUs. A CU can be encoded as a prediction unit (PU) containing prediction data and/or a transform unit (TU) containing transformed residual data for the CU. The motion estimation component121generates motion vectors, PUs, and TUs by using a rate-distortion analysis as part of a rate distortion optimization process. For example, the motion estimation component121may determine multiple reference blocks, multiple motion vectors, etc. for a current block/frame, and may select the reference blocks, motion vectors, etc. having the best rate-distortion characteristics. The best rate-distortion characteristics balance both quality of video reconstruction (e.g., amount of data loss by compression) with coding efficiency (e.g., size of the final encoding).

In some examples, codec100may calculate values for sub-integer pixel positions of reference pictures stored in decoded picture buffer component123. For example, video codec100may interpolate values of one-quarter pixel positions, one-eighth pixel positions, or other fractional pixel positions of the reference picture. Therefore, motion estimation component121may perform a motion search relative to the full pixel positions and fractional pixel positions and output a motion vector with fractional pixel precision. The motion estimation component121calculates a motion vector for a PU of a video block in an inter-coded slice by comparing the position of the PU to the position of a reference block of a reference picture. Motion estimation component121outputs the calculated motion vector as motion data to header formatting and CABAC component131for encoding and to the motion compensation component119.

Motion compensation, performed by motion compensation component119, may involve fetching or generating a reference block based on the motion vector determined by motion estimation component121. Motion estimation component121and motion compensation component119may be functionally integrated, in some examples. Upon receiving the motion vector for the PU of the current video block, motion compensation component119may locate the reference block to which the motion vector points. A residual video block is then formed by subtracting pixel values of the reference block from the pixel values of the current block being coded, forming pixel difference values. In general, motion estimation component121performs motion estimation relative to luma components, and motion compensation component119uses motion vectors calculated based on the luma components for both chroma components and luma components. The reference block and residual block are forwarded to transform scaling and quantization component113.

The video signal101is also sent to intra-picture estimation component115and intra-picture prediction component117. As with motion estimation component121and motion compensation component119, intra-picture estimation component115and intra-picture prediction component117may be highly integrated, but are illustrated separately for conceptual purposes. The intra-picture estimation component115and intra-picture prediction component117intra-predict a current block relative to blocks in a current picture, as an alternative to the inter-prediction performed by motion estimation component121and motion compensation component119between pictures, as described above. In particular, the intra-picture estimation component115determines an intra-prediction mode to use to encode a current block. In some examples, intra-picture estimation component115selects an appropriate intra-prediction mode to encode a current block from multiple tested intra-prediction modes. The selected intra-prediction modes are then forwarded to the header formatting and CABAC component131for encoding.

For example, the intra-picture estimation component115calculates rate-distortion values using a rate-distortion analysis for the various tested intra-prediction modes, and selects the intra-prediction mode having the best rate-distortion characteristics among the tested modes. Rate-distortion analysis generally determines an amount of distortion (or error) between an encoded block and an original unencoded block that was encoded to produce the encoded block, as well as a bitrate (e.g., a number of bits) used to produce the encoded block. The intra-picture estimation component115calculates ratios from the distortions and rates for the various encoded blocks to determine which intra-prediction mode exhibits the best rate-distortion value for the block. In addition, intra-picture estimation component115may be configured to code depth blocks of a depth map using a depth modeling mode (DMM) based on rate-distortion optimization (RDO).

The intra-picture prediction component117may generate a residual block from the reference block based on the selected intra-prediction modes determined by intra-picture estimation component115when implemented on an encoder or read the residual block from the bitstream when implemented on a decoder. The residual block includes the difference in values between the reference block and the original block, represented as a matrix. The residual block is then forwarded to the transform scaling and quantization component113. The intra-picture estimation component115and the intra-picture prediction component117may operate on both luma and chroma components.

The transform scaling and quantization component113is configured to further compress the residual block. The transform scaling and quantization component113applies a transform, such as a discrete cosine transform (DCT), a discrete sine transform (DST), or a conceptually similar transform, to the residual block, producing a video block comprising residual transform coefficient values. Wavelet transforms, integer transforms, sub-band transforms or other types of transforms could also be used. The transform may convert the residual information from a pixel value domain to a transform domain, such as a frequency domain. The transform scaling and quantization component113is also configured to scale the transformed residual information, for example based on frequency. Such scaling involves applying a scale factor to the residual information so that different frequency information is quantized at different granularities, which may affect final visual quality of the reconstructed video. The transform scaling and quantization component113is also configured to quantize the transform coefficients to further reduce bit rate. The quantization process may reduce the bit depth associated with some or all of the coefficients. The degree of quantization may be modified by adjusting a quantization parameter. In some examples, the transform scaling and quantization component113may then perform a scan of the matrix including the quantized transform coefficients. The quantized transform coefficients are forwarded to the header formatting and CABAC component131to be encoded in the bitstream.

The scaling and inverse transform component129applies a reverse operation of the transform scaling and quantization component113to support motion estimation. The scaling and inverse transform component129applies inverse scaling, transformation, and/or quantization to reconstruct the residual block in the pixel domain, e.g., for later use as a reference block for another current block. The motion estimation component121and/or motion compensation component119may calculate a further reference block by adding the residual block back to a previous reference block for use in motion estimation of a later block/frame. Filters are applied to the reconstructed reference blocks to mitigate artifacts created during scaling, quantization, and transform. Such artifacts could otherwise cause inaccurate prediction (and create additional artifacts) when subsequent blocks are predicted.

The filter control analysis component127and the in-loop filters component125apply the filters to the residual blocks and/or to reconstructed picture blocks. For example, the transformed residual block from the scaling and inverse transform component129may be combined with a corresponding reference block from intra-picture prediction component117and/or motion compensation component119to reconstruct the original image block. The filters may then be applied to the reconstructed image block. In some examples, the filters may instead be applied to the residual blocks. As with other components inFIG.1, the filter control analysis component127and the in-loop filters component125are highly integrated and may be implemented together, but are depicted separately for conceptual purposes. Filters applied to the reconstructed reference blocks are applied to particular spatial regions and include multiple parameters to adjust how such filters are applied. The filter control analysis component127analyzes the reconstructed reference blocks to determine where such filters should be applied and sets corresponding parameters. Such data is forwarded to the header formatting and CABAC component131as filter control data for encoding. The in-loop filters component125applies such filters based on the filter control data. The filters may include a deblocking filter, a noise suppression filter, a SAO filter, and an adaptive loop filter. Such filters may be applied in the spatial/pixel domain (e.g., on a reconstructed pixel block) or in the frequency domain, depending on the example.

When operating as an encoder, the filtered reconstructed image block, residual block, and/or prediction block are stored in the decoded picture buffer component123for later use in motion estimation as discussed above. When operating as a decoder, the decoded picture buffer component123stores and forwards the reconstructed and filtered blocks toward a display as part of an output video signal. The decoded picture buffer component123may be any memory device capable of storing prediction blocks, residual blocks, and/or reconstructed image blocks.

The header formatting and CABAC component131receives the data from the various components of codec100and encodes such data into a coded bitstream for transmission toward a decoder. Specifically, the header formatting and CABAC component131generates various headers to encode control data, such as general control data and filter control data. Further, prediction data, including intra-prediction and motion data, as well as residual data in the form of quantized transform coefficient data are all encoded in the bitstream. The final bitstream includes all information desired by the decoder to reconstruct the original partitioned video signal101. Such information may also include intra-prediction mode index tables (also referred to as codeword mapping tables), definitions of encoding contexts for various blocks, indications of most probable intra-prediction modes, an indication of partition information, etc. Such data may be encoded by employing entropy coding. For example, the information may be encoded by employing context adaptive variable length coding (CAVLC), CABAC, syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or another entropy coding technique. Following the entropy coding, the coded bitstream may be transmitted to another device (e.g., a video decoder) or archived for later transmission or retrieval.

In order to encode and/or decode a picture as described above, the picture is first partitioned.FIG.2is a schematic diagram of example macroblock partitions200, which can be created by a partition tree structure pursuant to H.264/AVC. The core of the coding layer in such standards is the macroblock, containing a 16×16 block of luma samples and, in the case of 4:2:0 color sampling, two corresponding 8×8 blocks of chroma samples. An intra-coded block uses spatial prediction to exploit spatial correlation among pixels. Two partitions are defined for an intra-coded block, namely a 16×16 sub-block and 4×4 sub-block. An inter-coded block uses temporal prediction, instead of spatial prediction, by estimating motion among pictures. Motion can be estimated independently for either a 16×16 macroblock or any sub-macroblock partitions. An inter-coded block can be partitioned into a 16×8 sub-block, an 8×16 sub-block, an 8×8 sub-block, an 8×4 sub-block, a 4×8 sub-block, and/or a 4×4 sub-block. All such values are measured in a number of samples. A Sample is a luma (light) value or chroma (color) value at a pixel.

FIG.3is a schematic diagram of example modes300for partitioning coding blocks, for example according to HEVC. In HEVC, a picture is partitioned into CTUs. A CTU is split into CUs by using a quadtree structure denoted as a coding tree to adapt to various local characteristics. The decision whether to code a picture area using inter-picture (temporal) or intra-picture (spatial) prediction is made at the CU level. Each CU can be further split into one, two, or four PUs according to the PU splitting type. Inside one PU, the same prediction process is applied and the relevant information is transmitted to the decoder on a PU basis. After obtaining the residual block by applying the prediction process based on the PU splitting type, a CU can be partitioned into transform units (TUs) according to another quadtree structure similar to the coding tree for the CU. One feature of the HEVC structure is that HEVC has multiple partition conceptions including CU, PU, and TU.

Various features involved in hybrid video coding using HEVC are highlighted as follows. HEVC includes the CTU, which is analogous to the macroblock in AVC. The CTU has a size selected by the encoder and can be larger than a macroblock. The CTU includes a luma coding tree block (CTB), corresponding chroma CTBs, and syntax elements. The size of a luma CTB, denoted as L×L, can be chosen as L=16, 32, or 64 samples with the larger sizes resulting in better compression. HEVC then supports a partitioning of the CTBs into smaller blocks using a tree structure and quadtree-like signaling.

The quadtree syntax of the CTU specifies the size and positions of corresponding luma and chroma CBs. The root of the quadtree is associated with the CTU. Hence, the size of the luma CTB is the largest supported size for a luma CB. The splitting of a CTU into luma and chroma CBs is signaled jointly. One luma CB and two chroma CBs, together with associated syntax, form a coding unit (CU). A CTB may contain only one CU or may be split to form multiple CUs. Each CU has an associated partitioning into prediction units (PUs) and a tree of transform units (TUs). The decision of whether to code a picture area using inter picture or intra picture prediction is made at the CU level. A PU partitioning structure has a root at the CU level. Depending on the basic prediction-type decision, the luma and chroma CBs can then be further split in size and predicted from luma and chroma prediction blocks (PBs) according to modes300. HEVC supports variable PB sizes from 64×64 down to 4×4 samples. As shown, modes300can split a CB of size M pixels by M pixels into an M×M block, a M/2×M block, a M×M/2 block, a M/2×M/2 block, a M/4×M (left) block, a M/4×M (right) block, a M×M/4 (up) block, and/or a M×M/4 (down) block. It should be noted that the modes300for splitting CBs into PBs are subject to size constraints. Further, only M×M and M/2×M/2 are supported for intra picture predicted CBs.

FIG.4is a schematic diagram of example method400for partitioning a picture for coding residual, for example according to HEVC. As noted above, blocks are coded by reference to reference blocks. A difference between values of a current block and the reference blocks is known as the residual. Method400is employed to compress the residual. For example, the prediction residual is coded using block transforms. Method400employs a TU tree structure403to partition a CTB401and included CBs for application of transform blocks (TBs). Method400illustrates the subdivision of a CTB401into CBs and TBs. Solid lines indicate CB boundaries and dotted lines indicate TB boundaries. The TU tree structure403is an example quadtree that partitions the CTB401. A transform, such as discrete cosine transform (DCT), is applied to each TB. The transform converts the residual into transform coefficients that can be represented using less data than the uncompressed residual. The TU tree structure403has a root at the CU level. The luma CB residual area may be identical to the luma TB area or may be further split into smaller luma TB s. The same applies to the chroma TBs. Integer basis transform functions similar to those of a DCT are defined for the square TB sizes 4×4, 8×8, 16×16, and 32×32. For the 4×4 transform of luma intra picture prediction residuals, an integer transform derived from a form of DST is alternatively specified.

A quadtree plus binary tree block structure with larger CTUs in Joint Exploration Model (JEM) is discussed below. Joint Video Exploration Team (JVET) was founded by Video Coding Experts group (VCEG) and MPEG to explore video coding technologies beyond HEVC. JVET has adopted many improvements included such improvements into a reference software named Joint Exploration Model (JEM).

FIG.5is a schematic diagram of example method500for partitioning a picture, for example according to a quad tree binary tree (QTBT) structure501. A tree representation503of the QTBT structure501is also shown. Unlike the partitioning structures in HEVC, the QTBT structure501removes the concepts of multiple partition types. For example, the QTBT structure501removes the separation of the CU, PU, and TU concepts, and supports more flexibility for CU partition shapes. In the QTBT structure501, a CU can have either a square or rectangular shape. In method500, a CTU is first partitioned by a quadtree structure. The quadtree leaf nodes are further partitioned by a binary tree structure. Symmetric horizontal splitting and symmetric vertical splitting are two splitting types used in the binary tree. The binary tree leaf nodes are called CUs, and that segmentation is used for prediction and transform processing without further partitioning. This causes the CU, PU, and TU to have the same block size in the QTBT structure501. In the JEM, a CU sometimes includes CBs of different color components. For example, one CU may contain one luma CB and two chroma CBs in the case of unidirectional inter prediction (P) and bidirectional inter prediction (B) slices of the 4:2:0 chroma format. Further, the CU sometimes includes a CB of a single component. For example, one CU may contain only one luma CB or just two chroma CBs in the case of intra prediction (I) slices.

The following parameters are defined for the QTBT partitioning scheme. The CTU size is the root node size of a quadtree, which is the same concept as in HEVC. Minimum quad tree size (MinQTSize) is the minimum allowed quadtree leaf node size. Maximum binary tree size (MaxBTSize) is the maximum allowed binary tree root node size. Maximum binary tree depth (MaxBTDepth) is the maximum allowed binary tree depth. Minimum binary tree size (MinBTSize) is the minimum allowed binary tree leaf node size.

In one example of the QTBT structure501, the CTU size is set as 128×128 luma samples with two corresponding 64×64 blocks of chroma samples, the MinQTSize is set as 16×16, the MaxBTSize is set as 64×64, the MinBTSize (for both width and height) is set as 4×4, and the MaxBTDepth is set as 4. The quadtree partitioning is applied to the CTU first to generate quadtree leaf nodes. The quadtree leaf nodes may have a size from 16×16 (the MinQTSize) to 128×128 (the CTU size). If the leaf quadtree node is 128×128, the node is not to be further split by the binary tree since the size exceeds the MaxBTSize (e.g., 64×64). Otherwise, the leaf quadtree node can be further partitioned by the binary tree. Therefore, the quadtree leaf node is also the root node for the binary tree and has the binary tree depth as 0. When the binary tree depth reaches MaxBTDepth (e.g., 4), no further splitting is considered. When the binary tree node has width equal to MinBTSize (e.g., 4), no further horizontal splitting is considered. Similarly, when the binary tree node has a height equal to MinBTSize, no further vertical splitting is considered. The leaf nodes of the binary tree are further processed by prediction and transform processing without any further partitioning. In the JEM, the maximum CTU size is 256×256 luma samples.

Method500illustrates an example of block partitioning by using the QTBT structure501, and tree representation503illustrates the corresponding tree representation. The solid lines indicate quadtree splitting and dotted lines indicate binary tree splitting. In each splitting (e.g., non-leaf) node of the binary tree, one flag is signalled to indicate which splitting type (e.g., horizontal or vertical) is used, where 0 indicates horizontal splitting and 1 indicates vertical splitting. For the quadtree splitting, there is no need to indicate the splitting type since quadtree splitting always splits a block both horizontally and vertically to produce 4 sub-blocks with an equal size.

In addition, the QTBT scheme supports the ability for the luma and chroma to have a separate QTBT structure501. For example, in P and B slices the luma and chroma CTBs in one CTU share the same QTBT structure501. However, in I slices the luma CTB is partitioned into CUs by a QTBT structure501, and the chroma CTBs are partitioned into chroma CUs by another QTBT structure501. Accordingly, a CU in an I slice can include a coding block of the luma component or coding blocks of two chroma components. Further, a CU in a P or B slice includes coding blocks of all three color components. In HEVC, inter prediction for small blocks is restricted to reduce the memory access of motion compensation, such that bi-prediction is not supported for 4×8 and 8×4 blocks, and inter prediction is not supported for 4×4 blocks. In the QTBT of the JEM, these restrictions are removed.

Triple-tree partitioning for VVC is now discussed.FIG.6is a schematic diagram600of example partitioning structures used in VVC. As shown, split types other than quad-tree and binary-tree are supported in VVC. For example, schematic diagram600includes a quad tree partition601, a vertical binary tree partition603, a horizontal binary tree partition605, a vertical triple tree partition607, and a horizontal triple tree partition609. This approach introduces two triple tree (TT) partitions in addition to the quad tree and binary trees.

In an example implementation, two levels of trees are employed including a region tree (a quad-tree) and a prediction tree (binary-tree or triple-tree). A CTU is first partitioned by a region tree (RT). A RT leaf may be further split with prediction tree (PT). A PT leaf may also be further split with PT until a max PT depth is reached. A PT leaf is a basic coding unit. The PT may also be called a CU for convenience. In an example implementation, a CU cannot be further split. Prediction and transform are both applied on CU in the same way as JEM. The whole partition structure is named multiple-type-tree.

An extended quad tree is now discussed.FIG.7is a schematic diagram700of example EQT partitioning structures. An EQT partitioning structure corresponding to a block partitioning process includes an extended quad tree partitioning process for the block of video data. The extended quad partitioning structure represents partitioning the block of video data into final sub-blocks. When the extended quad tree partitioning process decides to apply an extended quad tree partition to a block, the block is always split into four sub-blocks. Decoding of the final sub-blocks is based on the video bitstream. Decoding of the block of video data is based on the final sub-blocks decoded according to the EQT structure derived.

The EQT partitioning process can be applied to a block recursively to generate EQT leaf nodes. Alternatively, when EQT is applied to a certain block, for each of the sub-blocks resulting from the EQT split, may further be split into BT and/or QT and/or TT and/or EQT and/or other kinds of partition trees. In one example, EQT and QT may share the same depth increment process and the same restrictions of leaf node sizes. In this case, the partitioning of one node can be implicitly terminated when the size of the node reaches a minimum allowed quad tree leaf node size or EQT depth with the node reaches a maximum allowed quad tree depth. Alternatively, EQT and QT may share different depth increment processes and/or restrictions of leaf node sizes. The partitioning of one node by EQT may be implicitly terminated when the size of the node reaches a minimum allowed EQT leaf node size or the EQT depth associated with the node reaches a maximum allowed EQT depth. In one example, the EQT depth and/or the minimum allowed EQT leaf node sizes may be signaled in a sequences parameter set (SPS), a picture parameter set (PPS), a slice header, a CTU, a region, a tile, and/or a CU.

EQT may not use a quad tree partition applied to a square block, for example where the block has a size of M×N where M and N are equal or unequal non-zero positive integer values. Instead, EQT splits one block equally into four partitions, such as an M/4×N split701or an M×N/4 split703. Split727and split729show general examples of split701and703, respectively. For example, split727is split into M×N1, M×N2, M×N3, and M×N4, where N1+N2+N3+N4=N. Further, split729is split into M1×N, M2×N, M3×N and M4×N where M1+M2+M3+M4=M.

In another example, the EQT can split the shape equally into four partitions where the partition size is dependent on the maximum and minimum values of M and N. In one example, one 4×32 block may be split into four 4×8 sub-blocks while a 32×4 block may be split into four 8×4 sub-blocks.

In another example, EQT splits one block equally into four partitions, such as two partitions are with size equal to (M*w0/w)×(N*h0/h) and the other two are with (M*(w−w0)/w)×(N*(h−h0)/h) as shown by split705, split707, split709, and split711. For example, w0 and w may be equal to 1 and 2, respectively, such that the width is reduced by half while the height can use other ratios instead of 2:1 to get the sub-blocks. In another example, h0 and h may be equal to 1 and 2, respectively, such that the height is reduced by half while the width can use other ratios instead of 2:1. For example, split705includes a sub-block width fixed to be M/2 with a height equal to N/4 or 3N/4 with a smaller selection for the top two partitions. For example, split707includes a sub-block height fixed to be N/2 with a width equal to M/4 or 3M/4 with a smaller selection for the left two partitions. For example, split709includes a sub-block width fixed to be M/2 with a height equal to N/4 or 3N/4 with a smaller selection for the bottom two partitions. For example, split711includes a sub-block height fixed to be N/2 with a width equal to M/4 or 3M/4 with a smaller selection for the right two partitions.

Split713, split715, split717, split719, split721, and split723show other examples of quad tree partitioning. For example, split713, split715, and split717show options where the shape is split by M×N/4 and M/2×N/2. For example, split719, split721, and split723show options where the shape is split by N×M/4 and N/2×M/2.

Split725shows a more general case of quad tree partitioning with different shapes of partitions. In this case, split725is split such that M1×N1, (M−M1)×N1, M1×(N−N1) and (M−M1)×(N−N1).

FIG.8is a schematic diagram800of example flexible tree (FT) partitioning structures. A FT partitioning structure corresponds to a block partitioning process including an FT partitioning process for the block of video data. The FT partitioning structure represents a partitioning for a block of video data into final sub-blocks. When the FT partitioning process decides to apply a FT partition to a block, the block is split into K sub-blocks wherein K could be larger than 4. The final sub-blocks can be coded based on the video bitstream. Further, the block of video data can be decoded based on the final sub-blocks decoded according to the FT structure derived. The FT partitioning process can be applied to a given block recursively to generate FT tree leaf nodes. The partitioning of one node is implicitly terminated when the node reaches a minimum allowed FT leaf node size or FT depth associated with the node reaches a maximum allowed FT depth. Further, when FT is applied to a certain block, multiple sub-blocks can be created. Each of the sub-blocks created by FT may further be split into BT, QT, EQT, TT, and/or other kinds of partition trees. In an example, the FT depth or the minimum allowed FT leaf node sizes or the minimum allowed partition size for FT may be signaled in a SPS, a PPS, a slice header, a CTU, a region, a tile, and/or a CU. Similar to EQT, all of the sub-blocks created by FT partitions may be the same or different sizes.

Schematic diagram800includes example FT partitioning structures where the number of sub-blocks, denoted as K, is set equal to six or eight. Split801is a partitioning structure with K=8, M/4*N/2. Split803is a partitioning structure with K=8, M/2*N/4. Split805is a partitioning structure with K=6, M/2*N/2 and M/4*N/2. Split807is a partitioning structure with K=6, M/2*N/2 and M/2*N/4.

FIG.9is a schematic diagram900of example generalized TT (GTT) partitioning structures. For the TT partitioning structure, the restriction of splitting along either horizonal or vertical may be removed. The GTT partition pattern may be defined as splitting for both horizontal and vertical. Split901employs a left split from a vertical TT split and a horizontal BT split of the remaining area. Split903employs a bottom split from a horizontal TT split and a vertical BT split of the remaining area. In some examples, the partitioning EQT, FT, and/or GTT partitioning methods may be applied under certain conditions. In other words, when the condition(s) are not satisfied, there is no need to signal the partition types. In another example, the EQT, FT, and/or GTT partitioning methods may be used to replace other partition tree types. In another example, the EQT, FT, and/or GTT partitioning methods may be only used as a replacement for other partition tree types under certain conditions. In one example, the condition may be based on the picture, slice types, block sizes, the coded modes; and/or whether a block is located at a picture, slice, and/ or tile boundary. In one example, EQT may be treated in the same way as QT. In this case, when the QT partition tree type is selected, more flags/indications of the detailed quad-tree partition patterns may be further signaled. In some examples, EQT may be treated as additional partition patterns. In one example, the signaling of partitioning methods of EQT, FT, and/or GTT may be conditional. For example, one or more EQP, FT, and/or GTT partitioning methods may not be used in some cases, and the bits corresponding to signal these partitioning methods are not signaled.

FIG.10is a schematic diagram of example boundary partitioning tree1000, which is also known as a versatile boundary partition. The boundary partitioning tree1000is an example boundary handling method for VVC and/or Audio and Video Coding Standard Workgroup Part three (AVS-3.0). Since the forced quadtree boundary partition solution in VVC is not optimized, the boundary partitioning tree1000uses regular block partition syntax to maintain continuity with the CAB AC engine as well as to match the picture boundary. The versatile boundary partition obtains the following rules (both encoder and decoder). Since the boundary partitioning tree1000uses exactly the same partition syntax of the normal block (non-boundary) for boundaries located at block, the syntax is not changed. If the no split mode is parsed for the boundary CU, the forced boundary partition (FBP) is used to match the picture boundary. After the forced boundary partition is used (non-singling boundary partition), no further partition is performed. The forced boundary partition is described as follows. If the size of block is larger than the maximal allowed BT size, forced QT is used to perform the FBP in the current forced partition level. Otherwise, if the bottom-right sample of current CU is located below the bottom picture boundary and not extended to the right boundary, a forced horizontal BT is used to perform the FBP in the current forced partition level. Otherwise, if the bottom-right sample of current CU is located at the right side of the right picture boundary and not below the bottom boundary, a forced vertical BT is used to perform the FBP in the current forced partition level. Otherwise, if the bottom-right sample of current CU is located at the right side of the right picture boundary and below the bottom boundary, a forced QT is used to perform the FBP in the current forced partition level.

FIG.11is a schematic diagram1100of example partitioning structures used in Audio and Video Coding Standard (AVS) part three (AVS-3.0). Partitioning in AVS-3.0 is now discussed. The Audio and Video Coding Standard (AVS) Workgroup of China was authorized to be established by the Science and Technology Department under the former Ministry of Industry and Information Technology of People's Republic of China. With the mandate of satisfying the demands from the rapidly growing information industry, AVS is committed to producing technical standards of high quality for compression, decompression, processing, and representation of digital audio and video, and thus providing digital audio-video equipment and systems with high-efficient and economical coding/decoding technologies. AVS can be applied in wide variety of significant information sectors including high-resolution digital broadcast, high-density laser-digital storage media, wireless broad-band multimedia communication and internet broad-band stream media. AVS is one of the second generation of source coding/decoding standards and owns independent Chinese intellectual property rights. Source coding technology primarily addresses the problem of coding and compressing audio and video mass data from initial data and original sources. Hence AVS is known as digital video and audio coding technology, and is the premise of the subsequent digital transmission, storage, and broadcast. Further, AVS serves as a common standard for the digital video and audio industry.

AVS-3.0 employs a QT partitioning1101, a vertical BT partitioning1105, a horizontal BT partitioning1103, and a horizontal extended quad-tree (EQT) partitioning1107, and a vertical EQT partitioning1109to split a largest coding unit (LCU) into multiple CUs. QT partitioning, BT partitioning, and EQT partitioning can all be used for the root, internal nodes, or leaf nodes of the partitioning tree. However, QT partitioning is forbidden after any BT and/or EQT partitioning.

FIG.12is a schematic diagram1200of example Unsymmetrical Quad-Tree (UQT) partitioning structures. UQT partitioning employs a block with dimensions W×H, which is split into four partitions with dimensions W1×H1, W2×H2, W3×H3 and W4×H4, where W1, W2, W3, W4,H1, H2, H3, H4 are all integers. In one example, and at least one of the partitions has different block size compared to others. In one example, only two of the four partitions may have equal size, and the other two are different with each other and different from the two partitions with equal size. In one example, all the parameters are in the form of power of 2. For example, W1=2N1, W2=2N2, W3=2N3, W4=2N4, H1=2M1, H2=2M2, H3=2M3, H4=2M4. In one example, UQT only splits one partition in vertical direction, for example, H1=H2=H3=H4=H. In one example, in split 1201 W1=W/8, W2=W/2, W3=W/8, W4=W/4, H1=H2=H3=H4=H. This kind of UQT is vertical split and named as UQT1-V. In one example, in split1203W1=W/8, W2=W/2, W3=W/4, W4=W/8, H1=H2=H3=H4=H. This kind of UQT is vertical split and named as UQT2-V. In one example in split1205W1=W/4, W2=W/8, W3=W/2, W4=W/8, H1=H2=H3=H4=H. This kind of UQT is vertical split and named as UQT3-V. In one example, in split1207W1=W/8, W2 =W/4, W3 =W/2, W4=W/8, H1=H2=H3=H4=H. This kind of UQT is vertical split and named as UQT4-V.

In one example, UQT only splits one partition in horizontal direction, for example, W1=W2=W3=W4=W. In one example, in split1209H1=H/8, H2=H/2, H3=H/8, H4=H/4, W1=W2=W3=W4=W. This kind of UQT is horizontal split and named as UQT1-H. In one example, in split1211H1=H/8, H2=H/2, H3=H/4, H4=H/8, W1=W2=W3=W4=W. This kind of UQT is horizontal split and named as UQT2-H. In one example, in split1213H1=H/4, H2=H/8, H3=H/2, H4=H/8, W1=W2=W3=W4=W. This kind of UQT is horizontal split and named as UQT3-H. In one example, in split1215H1=H/8, H2=H/4, H3=H/2, H4=H/8, W1=W2=W3=W4=W. This kind of UQT is horizontal split and named as UQT4-H.

FIG.13is a schematic diagram1300of example ETT partitioning structures, including an ETT-V split1301and an ETT-H split1303. When employing ETT, a block with dimensions width times height (W×H) is split into three partitions with dimensions W1×H1, W2×H2, and W3×H3. W1, W2, W3, H1, H2, H3 are all integers. In an example, and at least one of the parameters is not in the form of power of 2. W1, W2, and W3 are widths of resulting sub-blocks. H1, H2, and H3 are heights of resulting sub-blocks. In one example, W2 cannot be in a form of W2=2N2 with any positive integer N2. In another example, H2 cannot be in a form of H2=2N2with any positive integer N2. In one example, at least one of the parameters is in the form of power of 2. In one example, W1 is in a form of W1=2N1with a positive integer N1. In another example, H1 is in a form of H1=2N1with a positive integer N1.

In one example, ETT only splits one partition in a vertical direction, for example where W1=a1*W, W2=a2*W, and W3=a3*W, where a1+a2+a3=1, and where H1=H2=H3=H. This kind of ETT is vertical split and may be referred to as ETT-V. In one example, ETT-V split1301can be used where W1=W/8, W2=3*W/4, W3=W/8, and H1=H2=H3=H. In one example, ETT only splits one partition in horizontal direction, for example where H1=a1*H, H2=a2*H, and H3=a3*H, where a1+a2+a3=1, and where W1=W2=W3=W. This kind of ETT is a horizontal split and may be referred to as ETT-H. In one example, ETT-H split1303can be used where H1=H/8, H2=3*H/4, H3=H/8, and W1=W2=W3=W.

FIG.14is a schematic diagram1400of example ¼ UBT partitioning structures, which includes vertical UBT (UBT-V) partitions and horizontal UBT (UBT-H) partitions. A block of dimensions W×H can be split into two sub-blocks dimensions W1×H1 and W2×H2, where one of the sub-blocks is a dyadic block and the other is a non-dyadic block. Such a split is named as Unsymmetric Binary Tree (UBT) split. In one example, W1=a×W, W2=(1−a)×W, and H1=H2=H. In such as case, the partition may be called a vertical UBT (UBT-V). In one example, a may be smaller than ½, such as ¼, ⅛, 1/16, 1/32, 1/64, etc. In such a case, the partition may be called a Type 0 UBT-V, an example of which is shown as split1401. In one example, a may be larger than ½, such as 3/4, 7/8, 15/16, 31/32, 63/64, etc. In such a case, the partition is called a Type 1 UBT-V, an example of which is shown as split1403. In one example, H1=a×H, H2=(1−a)×H, W1=W2=W. In such as case, the partition may be called a horizontal UBT (UBT-H). In one example, a may be smaller than ½, such as ¼, ⅛, 1/16, 1/32, 1/64, etc. In such a case, the partition is called a Type 0 UBT-H, an example of which is shown as split1405. In one example, a may be larger than ½, such as ¾, ⅞, 15/16, 31/32, 63/64, etc. In such a case, the partition may be called a Type 1 UBT-H, an example of which is shown as split1407.

FIG.15is a schematic diagram1500of an example of residual transformation, for example as used in HEVC. For example, blocks can be coded according to prediction based on other blocks. The difference between the prediction from the reference block(s) and the current block is known as the residual. The residual can be transformed and quantized at an encoder to reduce the size of the residual data. A dequantization and inverse transform can be applied at a decoder to obtain the residual data. The residual data can then be applied to the prediction to reconstruct the coded block for display. The schematic diagram1500illustrates a transform process and quantization process at the encoder on the left and a dequantization process and an inverse transform at the decoder on the right. The transform process for a N×N block can be formulated as:

where i=0, . . . , N−1. Elements cijof the DCT transform matrix C are defined as

ST2=2−(M+6)B represents the bit-depth.After the first inverse transform stage: SIT1=2−(7)After the second inverse transform stage: SIT2=2(20−B)For the output sample of the forward transform, coeff, a straightforward quantization scheme can be implemented as follows:

Scale FactorFirst forward transform stage2(6+M/2)After the first forward transform stage (ST1)2−(B+M−9)Second forward transform stage2(6+M/2)After second forward transform stage (ST2)2−(M+6)Total scaling for the forward transform2(15−B−M)

Scale FactorFirst inverse transform stage2(6+M/2)After the first inverse transform stage (SIT1)2−7Second inverse transform stage2(6+M/2)After second inverse transform stage (SIT2)2−(20−B)Total scaling for the inverse transform2−(15−B−M)

In VVC, the process of transform, quantization, de-quantization, and inverse transform is shown inFIG.15and is discussed in more detail below. Unlike HEVC, VVC supports rectangular blocks, and hence VVC support blocks where the width and height may be different. Suppose the width and height of a transform block are W and H, respectively, then

Shifts and multipliers inFIG.15for VVC are modified as follows in comparison toFIG.15:

Scaling Factor (shift)First forward transform stage2(6+└log2W┘/2)After the first forward transform stage (ST1)2−(└log2W┘+B−9)Second forward transform stage2(6+└log2H┘/2)After second forward transform stage (ST2)2−([log2H]+6)Total scaling for the forward transform215−B−(└log2W┘+└log2H┘)/2

Scaling Factor (shift)First inverse transform stage2(6+└log2W┘/2)After the first inverse transform stage2−7(SIT1)Second inverse transform stage2(6+└log2H┘/2)After second inverse transform stage (SIT2)2−(20−B)Total scaling for the inverse transform2−(15−B−(└log2W┘+└log2H┘)/2)

Compared to HEVC, when └log2W┘+└log2H┘ is an even number, the same quantization/dequantization factors can be used. If └log2W┘+└log2H┘ is an odd number, a factor of 21/2is used for compensation at the quantization/dequantization stage.

If └log2W┘+└log2H┘ is an even number, fVVC_even=[4,23302,20560,18396,16384,14564] is used, which is the same to fin HEVC. And gVVC_even=[40,45,51,57,64,71]. is used, which is the same to g in HEVC.

If └log2W┘+└log2H┘ is an odd number, fVVC_odd==[18396,16384,14564,13107,11651,10280] is used instead of fVVC_even. And gVVC_odd==[57,64,72,80,90,102] is used instead of gVCC_even. Roughly speaking, fVVC_odd≈fVVC_even×2−1/2and gVVC_odd≈gVVC_even×21/2.

If └log2W┘+└log2H┘ is an odd number, shift2=shift2−1.
SQis equal to 2−shift2.

If └log2W┘+└log2H┘ is an odd number, shift1=shift1+1.SIQis equal to 2−shift1.

The following are example technical problems solved by disclosed technical solutions. Dyadic dimensions describe a case where the width and height of a block must be in a form 2N, wherein N is a positive integer. Transform and quantization mechanisms should be modified to adapt to the blocks with non-dyadic dimensions.

Disclosed herein are mechanisms to address one or more of the problems listed above. For example, transforms are sized and configured for application to dyadic blocks. As such, a transform may not function properly when applied to a non-dyadic block. The present disclosure includes configuration changes that allow transforms to function properly when applied to non-dyadic blocks. For example, a scaling process applies scaling factors to residual data created by application of transforms (e.g., forward transforms at the encoder and inverse transforms at the decoder). In an example, the scaling factors, denoted as ST1and ST2for forward transforms and Sin and SIT2for inverse transforms, are different for non-dyadic blocks than dyadic blocks. As another example, a quantization process, including quantization at the encoder and dequantization at the decoder, is applied to residual coefficients created by the transforms. The quantization step in the quantization process can be different for non-dyadic blocks and dyadic blocks. As another example, a quantization scaling matrix can be applied to the residual coefficients as part of the quantization process. In some examples, the scaling factors in the quantization scaling matrix may be treated differently for non-dyadic blocks than dyadic blocks. For example, scaling factors for some positions in a non-dyadic block may not be signaled in a bitstream, and may instead be copied/predicted from the scaling factors signaled for dyadic blocks. In another example, sign data hiding, transform-skip coding, and palette coding blocks may be treated differently depending on whether the block is dyadic or non-dyadic.

FIG.16is another schematic diagram of an example of residual transformation1600. Residual transformation1600is similar to process discussed in schematic diagram1500, but has been simplified for clarity of discussion. Residual transformation1600includes the process of transforming the residual at both an encoder and a decoder. It should be noted that residual transformation1600includes applying forward transforms at the encoder and inverse transforms at the decoder. Further, residual transformation1600includes application of a quantization process including quantization at the encoder and dequantization at the decoder. In addition, the residual transformation1600includes application of a scaling process at both the encoder and decoder.

Accordingly, the terms residual transformation, quantization process, and scaling process may refer to processes at the encoder, the decoder, or both. Further, the term forward transform is specific to the encoder and the terms inverse transform and dequantization are specific to the decoder. The term quantization may refer specifically to processes at the encoder or generally to both quantization and/dequantization at the encoder, the decoder, or both, depending on context.

Residual transformation1600includes receiving a residual at step1601. The residual is created as a result of block prediction. For example, a current block is matched to a reference block and coded by reference to the reference block. Hence, the current block is predicted by the reference block. The difference between the reference block and the current block is known as the residual. The residual cannot be predicted solely by the reference block, and hence must be either separately coded or lost. Residual transformation1600is the process of transforming and quantizing the residual to reduce the size of the residual data for transmission between an encoder and a decoder. The residual, as received at step1601, describes differences in value of corresponding pixels. For pixels in the current block that match corresponding pixels in the reference block perfectly, the residual is zero. For pixels that do not match, the residual includes differences in luma (light) and chroma (color). The chroma may be further divided into Cr and Cb. Accordingly, for each coded block, the residual transformation1600is applied to a block of luma residual, a block of Cr residual, and a block of Cb residual.

At step1603, a primary forward transform is applied to the residual. A transform employs a wave, such as a sine wave or a cosine wave. The transform fits the wave to the residual data in an area by applying coefficients to terms that describe the wave. Accordingly, the encoder need only transmit the type of transform used and the coefficients. The decoder can then reconstruct the residual from the coefficients. As such, the residual in an area to be transformed is included in a matrix. A transform matrix is then applied to (e.g., multiplied) the residual matrix to convert the residual into residual coefficients. Depending on the example, the primary forward transform may include a DCT, a DST, a multiple transform selection (MTS) transform, an identity transform (IDT), or combinations thereof.

Once the residual coefficients are created by the primary forward transform, a scaling process applies a first scaling factor to the residual coefficients at step1605. The scaling factor is known as a scaling factor after a first forward transform stage (ST1). Specifically, the matrices used in video coding may be scaled relative to an orthonormal transform (e.g., scaled by 2(6+M/2)where M=log2(N) and where N is the transform size). The scaling factors are applied to preserve the norm of the residual block through the transform process. As such, ST1is used to account for scaling alterations applied during application of the primary forward transform.

In some examples, a secondary forward transform is applied to the residual coefficients at step1607. Specifically, the output of the primary transform at step1603is a matrix of coefficients, which are then scaled at step1605. A matrix including secondary forward transform is then applied (e.g., by multiplication) to the matrix of the residual coefficients for further compression. As with the primary forward transform, the secondary forward transform outputs residual coefficients with scaling that is altered by the transform. Accordingly, a second scaling factor is applied to the residual coefficients at step1609. The second scaling factor is known as a scaling factor after a second forward transform stage (ST2). The ST2accounts for scaling alterations applied during application of the secondary forward transform. This results in residual coefficients at step1610that are correctly scaled so that an inverse transform process can correctly reconstruct the residual from step1601.

The number of bits needed to express a value is the bit depth for the value. The residual coefficients at step1610have a bit depth that results from the application of the primary and secondary forward transforms. For example, the residual coefficients may each have a bit depth of sixteen. At step1611, quantization is performed. Quantization reduces the bit depth, and hence reduces the size of the residual coefficients. Quantization is performed by applying a quantization step (Qstep) determined according to a quantization parameter (QP). The output of the Qstep is then rounded. This has the effect of reducing the size of the value for each residual coefficient (e.g., making the number smaller), and then rounding to remove the least significant digits. Accordingly, quantization reduces the bit depth, and hence the data size for each residual coefficient with a loss of data caused by the rounding process.

The residual coefficients and syntax describing the transformation, scaling, and/or quantization process is coded into the bitstream at step1613. The bitstream is forwarded to the decoder, for example via streaming over the Internet or as coded data on a hardware storage medium. The decoder can then decode the bitstream. The decoder can determine a predicted block based on a reference bock. The decoder than employs the residual to determine the current block based on the predicted blow. To obtain the residual, the decoder should reverse the quantization and transformation performed by the encoder.

At step1627, the decoder performs dequantization on the residual coefficients stored in the bitstream. The dequantization applies an inverse of the Qstep based on the QP to increase the value of each residual coefficient and counteract the value reduction performed at the quantization stage at the encoder. However, the bit depth lost to rounding at the encoder is not recoverable, and is therefore lost. This results in a loss in clarity of the reconstructed image, which may or may not be perceivable by the human eye. As such, the quantization process is a tradeoff between image reconstruction accuracy and data compression.

At step1625, the residual coefficients have been dequantized and are forwarded for transformation to reconstruct the residual. At step1623, an inverse secondary transform is applied to reverse the secondary forward transform of step1607. A scaling factor after a first inverse transform stage (SIT1) is then applied at step1621. The SIT1accounts for scaling alterations applied during application of the inverse secondary transform. An inverse primary transform is applied at step1619to reverse the primary forward transform of step1603. A scaling factor after a second inverse transform stage (SIT2) is then applied at step1617. The SIT2accounts for scaling alterations applied during application of the inverse primary transform. The output from the inverse primary transform is the residual minus loss caused by rounding during quantization. Accordingly, the inverse secondary transform and inverse primary transform apply an inverse transform process that recovers residual samples from residual coefficients. The inverse secondary transform and inverse primary transform are selected based on the secondary forward transform and primary forward transform, respectively. Further, the inverse transforms are applied by multiplying a matrix of the residual coefficients by a matrix of transform data to obtain a block of residual samples. The residual of step1615can then be used to complete reconstruction of a current block for inclusion in a picture.

The transform, scaling, quantization, dequantization, and inverse transform processes are configured to apply to dyadic blocks. A dyadic block is a block with all sides with dimensions that can be expressed as a power of two. The present disclosure includes the introduction of non-dyadic blocks, where a non-dyadic block has at least one side that cannot be expressed as a power of two. Accordingly, the present disclosure includes example modifications to the transform, scaling, quantization, dequantization, and inverse transform processes to allow such processes to be applied to non-dyadic blocks of residual samples.

For example, the scaling of steps1605,1609,1617, and/or1621can be modified to operate differently for non-dyadic blocks than for dyadic blocks. For example, a block of residual can have sides of width (W) and height (H) where at least one of W and H are non-dyadic. In an example, ST1is set to 2(┌log2W┐+offset), ST2is set to 2−(┌log2H┐+offset), SIT1is set to 2−offsetand SIT2is set to 2−offset. Offset may be an integer, such as a predefined integer value (e.g., 6, 7, etc.) and/or an integer value that is a function of bit depth (B) (e.g., B−9, 20−B, etc.). In another example, the scaling factors may be different when at least one of W and H is equal to one. In an example, ST1is set to 2−(└log2W┘+B−9)and ST2is set to 1 when the block is non-dyadic and the H is equal to one. In another example, ST1is set to 1 and ST2is set to 2(└log2H┘+B−9)when the block is non-dyadic and the W is equal to one. In another example, SIT1is set to 2−(20−B)and SIT2is set to 1 when the block is non-dyadic and the H is equal to one. In another example, SIT1is set to 1 and SIT2is set to 2−(20−B)when the block is non-dyadic and the W is equal to one.

In another example, the quantization and dequantization processes of steps1611and1627can be modified to operate differently for non-dyadic blocks than for dyadic blocks. In an example, the quantization of step1611includes determining quantized residual coefficients, denoted as level, according to

where coeff includes transformed residual coefficients, QP is a quantization parameter, fQP%6is a quantization matrix, offsetQis an integer value, and shift2 is a shifting value, and wherein fQP%6, offsetQ, and shift2 are selected based on dimensions of the block when the block is non-dyadic. It should be noted that offsetQis selected to set a desired amount of rounding in the quantization process and shift2 is an amount of bitshift (e.g.., right shift) applied to the residual coefficients when reducing the size of the coefficients. In an example, the dequantization of step1627includes a determination of de-quantized residual coefficients, denoted as coeffQ, according to

where level are the quantized residual coefficients, QP is a quantization parameter, gQP%6is a de-quantization matrix, offsetIQis an integer value, and shift1 is a shifting value, and wherein gQP%6, offsetIQ, and shift1 are selected based on dimensions of the block when the block is non-dyadic. It should be noted that offsetIQis selected based on o offsetQand shift1 is an amount of bitshift (e.g., left shift) applied to the residual coefficients when increasing the size of the coefficients.

For example, fQP%6and gQP%6can be derived based on W, H, and QP. Further, shift1 and shift 2 may be derived based W and H. For example, shift1 may be derived as a baseshift1 plus an additionalshift1, and shift2 may be derived as a baseshift2 plus an additionalshift2. In an example, baseshift1 and baseshift2 may be based on bit depth, such as baseshift1=B−9 and baseshift2=29−B−┌log2W┐−┌log2H┐. Furthermore, additionalshift1 may be equal to additionalshift2, and/or additionalshift1 and additionalshift2 may depend on W and H.

In an example, fQP%6and gQP%6may be derived by

In an example, GQP%6is a quantization matrix, prod is derived base on W×H, IQ_SHIFT is an integer, Q_SHIFT is an integer, s is an integer, and round is a function that rounds a floating point number into an integer. In an example, Prod, s, and additionshift1 are derived as follows:Set Prod=W×H;Set s=1;Set additionshift1(W, H)=0;Find the maximum value of Z, that satisfies (Prod % 22Z==0) and (Z>=1);Set additionshift1(W, H)=Z;Set Prod=Prod>>(2×Z);If Prod % 2==0,Set Prod=Prod>>1;Set additionshift1(W, H)=additionshift1(W, H)+1;Set s=2;

In an example, fQP%6is derived according to

where round is a function that rounds a floating point number into an integer, Q_SHIFT is an integer, IQ_SHIFT is an integer, gQP%6(W×H) is a de-quantization matrix based on W and H, and Additionalshifts2 (W,H) is a shifting value based on W and H, which may be equal to additionshift1(W, H).

In an example, prod is equal to 1, s is equal to 1 or 2, gQP%6(W, H) is set equal to gQP%6VVC_evenor gQP%6VVC_odd, and fQP%6(W,H) is set equal to fQP%6VVC_oddor fQP%6VVC_even. In an example, fQP%6is stored as a three-dimension table denoted as f[idx0][idx1][idx2], and gQP%6is stored as a three-dimension table denoted as g[idx0][idx1][idx2], where idx2 represents a value of a QP, idx0 represents W, and idx1 represents H. For example, idx0=IdxMapping[W] and idx1=IdxMapping[H], where IdxMapping[W] maps a width to a width index, IdxMapping[H] maps a height to a height index, a unique width index is assigned to each allowed width, and a unique height index is assigned to each allowed height. In another example, idx0 and idx1 may be in ascending order, descending order, or combinations thereof. In an example, additionalshift1 and/or additionalshift2 is stored as a two dimensional table, denoted as Shift[idx0][idx1], and the table includes the values for the additionalshift values.

In an example, the quantization and dequantization of steps1611and1627apply a quantization scaling matrix. In some examples, the quantization scaling matrix is only applied when the residual block is a dyadic block and is not applied when the residual block is a non-dyadic block. In other examples, the quantization scaling matrix is applied to non-dyadic blocks. However, the quantization scaling matrix is sized to be dyadic. Accordingly, the quantization scaling matrix can be applied for the non-dyadic block by including extra scaling factors to alter the size of the quantization scaling matrix to fit the non-dyadic block. The additional scaling factors can be signaled in the bitstream. In another example, the additional scaling factors can be copied and/or predicted from other scaling factors used for dyadic blocks. In some examples, syntax elements, such as flags, can also be included to indicate the presence of the quantization scaling matrix and/or the usage of the quantization scaling matrix for application to non-dyadic blocks.

In another example, wherein sign data hiding (SDH) or sign prediction is applied to the block when the block is a non-dyadic block. In an example, a syntax element, such as a flag, can also be included in the bitstream to indicate the usage of SDH and/or sign prediction. In another example, the residual block can be set as a transform-skip coded block, and the quantization process is applied differently for a non-dyadic block than a dyadic block. In another example, the residual block can be set as a palette coded block, and the quantization process is applied differently for a non-dyadic block than a dyadic block.

Accordingly, to address the problems mentioned above, several methods are disclosed to handle the issues caused by transforms and quantization mechanisms when applied to non-dyadic blocks as discussed above. The methods result in achieving better coding performance.

The detailed embodiments below should be considered as examples to explain general concepts. These embodiments should not be interpreted in a narrow way. Furthermore, these embodiments can be combined in any manner. In the following discussion, QT, BT, TT, UQT, and ETT may refer to QT split, BT split, TT split, UQT split and ETT split, respectively. In the following discussion, a block is a dyadic block if both width and height is a dyadic number, which is in a form of 2Nwith N being a positive integer. In the following discussion, a block is a non-dyadic block if at least one of width and height is a non-dyadic number, which cannot be represented in a form of 2Nwith N being a positive integer. In the following discussion, split and partitioning have the same meaning. In the following discussion, a coefficient after a transform or inverse transform stage may be multiplied by a scaling factor, divided by a scaling factor, shifted by a shifting value, or multiplied by a scaling factor then shifted by a shifting value. Such an operation is referred to as “a scaling process.”

The scaling process (or shifting values) in transform and/or inverse transform of a first block may depend on whether it is a dyadic block or non-dyadic block. In one example, whether and/or how to do scaling in transform and/or inverse transform for a first block may depend on whether the first block is a dyadic block or a non-dyadic block.

In one example, the scaling factor after the first forward transform stage (ST1) for a non-dyadic block with dimensions W×H is set to be 2−(┌log2W┐+offset), wherein offset is an integer such as B−9, wherein B is the bit-depth. In one example, ST1 for a non-dyadic block is set to be 2−└log2W┘+offset), wherein offset is an integer such as B−9, wherein B is the bit-depth. In one example, ST1 is derived in a same way for a non-dyadic block and for a dyadic block.

In one example, the scaling factor after the second forward transform stage (ST2) for a non-dyadic block with dimensions W×H is set to be 2−(┌log2H┐+offset), wherein offset is an integer such as B−9, wherein B is the bit-depth. In one example, ST2 for a non-dyadic block is set to be 2−(└log2H┘+offset), wherein offset is an integer such as 6. In one example, ST2 is derived in a same way for a non-dyadic block and for a dyadic block.

In one example, the scaling factor after the first inverse transform stage (SIT1) for a non-dyadic block with dimensions W×H is set to be 2−offset, wherein offset is an integer such as 7. In one example, SIT1 is derived in a same way for a non-dyadic block and for a dyadic block.

In one example, the scaling factor after the second inverse transform stage (S IT2) for a non-dyadic block with dimensions W×H is set to be 2−offset, wherein offset is an integer such as 20−B, wherein B is the bit-depth. In one example, S IT2 is derived in a same way for a non-dyadic block and for a dyadic block.

In one example, the scaling factors may be different when at least one of W and H is equal to 1. For example, ST1 and ST2 for a non-dyadic block is set to be 2(└log2W┘+B−9)and 1, respectively, when H is equal to 1. For example, ST1 and ST2 for a non-dyadic block is set to be 1 and 2−(└log2H┘+B−9)respectively, when W is equal to 1. For example, SIT1 and SIT2 for a non-dyadic block is set to be 2−(20−B)and 1, respectively, when H is equal to 1. For example, SIT1 and SIT2 for a non-dyadic block is set to be 1 and 2−(20−B), respectively, when W is equal to 1.

The quantization/de-quantization process on a first block with dimensions W×H may depend on whether the block is a dyadic block or a non-dyadic block.

In one example, the quantization/de-quantization is conducted in the same way as that in VVC when the first block is a dyadic block. In one example, the quantization/de-quantization is conducted in a way different to that in VVC when the first block is a non-dyadic block. The following disclosed methods may be used to perform the quantization/de-quantization process on a non-dyadic block.

In the quantization step,

wherein fQP%6, offsetQ and shift2 may depend on the block dimensions. In the de-quantization step,

wherein gQP%6, offsetIQ and shift1 may depend on the block dimensions.

In one example, gQP%6may be derived based on W, H and QP. In one example, fQP%6may be derived based on W, H and QP.

In one example, shift1 may be derived based on W and H. In one example, shift1=baseshift1+additionshift1. In one example, baseshift1 is based on B wherein B is the bit-depth. E.g. baseshift1=B−9. In one example, shift2 may be derived based on W and H. In one example, shift2=baseshift2+additionshift2. In one example, baseshift2 is based on B wherein B is the bit-depth, W and H. For example, baseshift2=29−B−┌log2W┐−┌log2H┐.

In one example, additionshift1 may be equal to additionshift2. In one example, additionshift1 and/or additionshift2 may depend on W and H.

For a block with dimensions (W, H),

wherein Prod is derived base on W×H and IQ_SHIFT is an integer such as 6 or 8. round(.) represents to round a floating point number to an integer number.

wherein Prod is derived base on W×H and Q_SHIFT is an integer such as 14 or 16. round(.) represents to round a floating point number to an integer number. In one example, Prod and s can be derived in the same way as they are derived for gQP%6. Additionshift2(W, H) is set equal to additionshift1(W, H).

wherein Prod is derived base on W×H and Q_SHIFT is an integer such as 14 or 16. round(.) represents to round a floating point number to an integer number. Additionshift2(W, H) is set equal to additionshift1(W, H).

In one example, if Prod is equal to 1 and s is equal to 1, gQP%6(W, H) is set equal to gQP%6VVC_even. In one example, if Prod is equal to 1 and s is equal to 2, gQP%6(W, H) is set equal to gQP%6VVC_odd. In one example, if Prod is equal to 1 and s is equal to 1, fQP%6(W, H) is set equal to fQP%6VVC_even. In one example, if Prod is equal to 1 and s is equal to 2, fQP%6(W, H) is set equal to fQP%6VVC_odd. In one example, fQP%6is stored as a three-dimension table denoted as f[idx0][idx1][idx2]. An entry in the table is fetched when fQP%6is needed. In one example, one of the dimensions (such as idx2) represents the value of QP%6. In one example, two of the dimensions (such as idx0 and idx1) represents the W and H. In one example, idx0=W and/or idx1=H. In one example, idx0=IdxMapping[W], wherein IdxMapping[W] map a width to a width index, wherein a unique width index is assigned to each allowed width. In one example, idx1=IdxMapping[H], wherein IdxMapping[H] map a height to a height index, wherein a unique height index is assigned to each allowed height.

In one example, gQP%6is stored as a three-dimension table denoted as g[idx0][idx1][idx2]. An entry in the table is fetched when gQP%6is needed. In one example, one of the dimensions (such as idx2) represents the value of QP%6. In one example, two of the dimensions (such as idx0 and idx1) represents the W and H. In one example, idx0=W and/or idx1=H. In one example, idx0=IdxMapping[W], wherein IdxMapping[W] map a width to a width index, wherein a unique width index is assigned to each allowed width. In an example, idx0=IdxMapping[W], wherein IdxMapping[W] map a width to a width index, wherein idx0 is in an ascending order. In an example, idx0=IdxMapping[W], wherein IdxMapping[W] map a width to a width index, wherein idx0 is in a descending order. In one example, idx1=IdxMapping[H], wherein IdxMapping[H] map a height to a height index, wherein a unique height index is assigned to each allowed height. In an example, idx1=IdxMapping[H], wherein IdxMapping[H] map a height to a height index, wherein idx1 is in an ascending order. In an example, idx1=IdxMapping[H], wherein IdxMapping[H] map a height to a height index, wherein idx1 is in a descending order.

In one example, additionshift1 or additionshift2 is stored as a two-dimension table denoted as Shift[idx0][idx1]. An entry in the table is fetched when additionshift1 or additionshift2 is needed. In one example, two of the dimensions (such as idx0 and idx1) represents the W and H. In one example, idx0=W and/or idx1=H. In one example, idx0=IdxMapping[W], wherein IdxMapping[W] map a width to a width index, wherein a unique width index is assigned to each allowed width. In one example, idx1=IdxMapping[H], wherein IdxMapping[H] map a height to a height index, wherein a unique height index is assigned to each allowed height.

In one example, signaled quantization scaling matrix (such as scaling_list_data( )) can only be applied to dyadic blocks, i.e., excluding non-dyadic blocks. In an example, quantization scaling matrix (such as scaling_list_data( ) which may be applied to non-dyadic blocks may be signalled. In one example, the scaling factors may be signaled for some or all positions of a non-dyadic block. In one example, the scaling factors for a non-dyadic block may be copied or predicted from those for a dyadic block. Quantization scaling matrix may be signalled for both dyadic blocks and non-dyadic blocks. In an example, a syntax element (e.g., one flag) may be signalled to indicate the presence of quantization scaling matrix applied to non-dyadic blocks. In an example, a syntax element (e.g., one flag) may be signalled to indicate the usage of quantization scaling matrix applied to non-dyadic blocks. In one example, the scaling factors for one non-dyadic block may be copied or predicted from those for another non-dyadic block with different width or height.

In one example, sign data hiding (SDH) or sign prediction method can only be applied to dyadic blocks. In an example, SDH or sign prediction method can also be applied to non-dyadic blocks. In an example, furthermore, a syntax element (e.g., one flag) may be signalled to indicate the usage of SDH or sign prediction applied to non-dyadic blocks.

In one example, for a transform-skip coded block, the same quantization/dequantization approach may be applied on a dyadic block and a non-dyadic block. In an example, for a transform-skip coded block, different quantization/dequantization approaches may be applied on a dyadic block and a non-dyadic block.

In one example, for a palette coded block, the same quantization/dequantization approach may be applied on a dyadic block and a non-dyadic block. In an example, for a palette coded block, different quantization/dequantization approaches may be applied on a dyadic block and a non-dyadic block.

FIG.17is a block diagram showing an example video processing system1700in which various techniques disclosed herein may be implemented. Various implementations may include some or all of the components of the system1700. The system1700may include input1702for receiving video content. The video content may be received in a raw or uncompressed format, e.g., 8 or 10 bit multi-component pixel values, or may be in a compressed or encoded format. The input1702may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interface include wired interfaces such as Ethernet, passive optical network (PON), etc. and wireless interfaces such as Wi-Fi or cellular interfaces.

The system1700may include a coding component1704that may implement the various coding or encoding methods described in the present document. The coding component1704may reduce the average bitrate of video from the input1702to the output of the coding component1704to produce a coded representation of the video. The coding techniques are therefore sometimes called video compression or video transcoding techniques. The output of the coding component1704may be either stored, or transmitted via a communication connected, as represented by the component1706. The stored or communicated bitstream (or coded) representation of the video received at the input1702may be used by a component1708for generating pixel values or displayable video that is sent to a display interface1710. The process of generating user-viewable video from the bitstream representation is sometimes called video decompression. Furthermore, while certain video processing operations are referred to as “coding” operations or tools, it will be appreciated that the coding tools or operations are used at an encoder and corresponding decoding tools or operations that reverse the results of the coding will be performed by a decoder.

Examples of a peripheral bus interface or a display interface may include universal serial bus (USB) or high definition multimedia interface (HDMI) or Displayport, and so on. Examples of storage interfaces include SATA (serial advanced technology attachment), PCI, IDE interface, and the like. The techniques described in the present document may be embodied in various electronic devices such as mobile phones, laptops, smartphones or other devices that are capable of performing digital data processing and/or video display.

FIG.18is a block diagram of an example video processing apparatus1800. The apparatus1800may be used to implement one or more of the methods described herein. The apparatus1800may be embodied in a smartphone, tablet, computer, Internet of Things (IoT) receiver, and so on. The apparatus1800may include one or more processors1802, one or more memories1804and video processing circuitry1806. The processor(s)1802may be configured to implement one or more methods described in the present document. The memory (memories)1804may be used for storing data and code used for implementing the methods and techniques described herein. The video processing circuitry1806may be used to implement, in hardware circuitry, some techniques described in the present document. In some embodiments, the video processing circuitry1806may be at least partly included in the processor1802, e.g., a graphics co-processor.

FIG.19is a flowchart for an example method1900of video processing. The method1900includes selecting a scaling process for application to a block during residual coding based on whether the block is dyadic or non-dyadic at step1902. At step1904, a quantization process is selected for application to the block during residual coding based on whether the block is dyadic or non-dyadic. At step1906, a conversion is performed between a visual media data and a bitstream based on application of the scaling process to the block. For example, steps1902and1904may include selecting equations for use in steps1605,1609,1611,1617,1621, and/or1627in residual transformation1600. Step1906can then include performing video encoding at an encoder or video decoding at decoder, for example by employing residual transformation1600.

It should be noted that the method1900can be implemented in an apparatus for processing video data comprising a processor and a non-transitory memory with instructions thereon, such as video encoder2100, video decoder2200, and/or encoder2300. In such a case, the instructions upon execution by the processor, cause the processor to perform the method1900. Further, the method1900can be performed by a non-transitory computer readable medium comprising a computer program product for use by a video coding device. The computer program product comprises computer executable instructions stored on the non-transitory computer readable medium such that when executed by a processor cause the video coding device to perform the method1900.

FIG.20is a block diagram that illustrates an example video coding system2000that may utilize the techniques of this disclosure. As shown inFIG.20, video coding system2000may include a source device2010and a destination device2020. Source device2010generates encoded video data which may be referred to as a video encoding device. Destination device2020may decode the encoded video data generated by source device2010which may be referred to as a video decoding device.

Source device2010may include a video source2012, a video encoder2014, and an input/output (I/O) interface2016. Video source2012may include a source such as a video capture device, an interface to receive video data from a video content provider, and/or a computer graphics system for generating video data, or a combination of such sources. The video data may comprise one or more pictures. Video encoder2014encodes the video data from video source2012to generate a bitstream. The bitstream may include a sequence of bits that form a coded representation of the video data. The bitstream may include coded pictures and associated data. The coded picture is a coded representation of a picture. The associated data may include sequence parameter sets, picture parameter sets, and other syntax structures. I/O interface2016may include a modulator/demodulator (modem) and/or a transmitter. The encoded video data may be transmitted directly to destination device2020via I/O interface2016through network2030. The encoded video data may also be stored onto a storage medium/server2040for access by destination device2020.

Destination device2020may include an I/O interface2026, a video decoder2024, and a display device2022.1/0interface2026may include a receiver and/or a modem. I/O interface2026may acquire encoded video data from the source device2010or the storage medium/server2040. Video decoder2024may decode the encoded video data. Display device2022may display the decoded video data to a user. Display device2022may be integrated with the destination device2020, or may be external to destination device2020, which can be configured to interface with an external display device.

Video encoder2014and video decoder2024may operate according to a video compression standard, such as the High Efficiency Video Coding (HEVC) standard, Versatile Video Coding (VVM) standard and other current and/or further standards.

FIG.21is a block diagram illustrating an example of video encoder2100, which may be video encoder2014in the system2000illustrated inFIG.20. Video encoder2100may be configured to perform any or all of the techniques of this disclosure. In the example ofFIG.21, video encoder2100includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of video encoder2100. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.

The functional components of video encoder2100may include a partition unit2101, a prediction unit2102which may include a mode selection unit2103, a motion estimation unit2104, a motion compensation unit2105, an intra prediction unit2106, a residual generation unit2107, a transform processing unit2108, a quantization unit2109, an inverse quantization unit2110, an inverse transform unit2111, a reconstruction unit2112, a buffer2113, and an entropy encoding unit2114.

In other examples, video encoder2100may include more, fewer, or different functional components. In an example, prediction unit2102may include an intra block copy (IBC) unit. The IBC unit may perform prediction in an IBC mode in which at least one reference picture is a picture where the current video block is located.

Furthermore, some components, such as motion estimation unit2104and motion compensation unit2105may be highly integrated, but are represented in the example ofFIG.21separately for purposes of explanation.

Partition unit2101may partition a picture into one or more video blocks. Video encoder2100and video decoder2200may support various video block sizes.

Mode selection unit2103may select one of the coding modes, intra or inter, e.g., based on error results, and provide the resulting intra or inter coded block to a residual generation unit2107to generate residual block data and to a reconstruction unit2112to reconstruct the encoded block for use as a reference picture. In some examples, mode selection unit2103may select a combination of intra and inter prediction (CIIP) mode in which the prediction is based on an inter prediction signal and an intra prediction signal. Mode selection unit2103may also select a resolution for a motion vector (e.g., a sub-pixel or integer pixel precision) for the block in the case of inter prediction.

To perform inter prediction on a current video block, motion estimation unit2104may generate motion information for the current video block by comparing one or more reference frames from buffer2113to the current video block. Motion compensation unit2105may determine a predicted video block for the current video block based on the motion information and decoded samples of pictures from buffer2113other than the picture associated with the current video block.

Motion estimation unit2104and motion compensation unit2105may perform different operations for a current video block, for example, depending on whether the current video block is in an I slice, a P slice, or a B slice.

In some examples, motion estimation unit2104may output a full set of motion information for decoding processing of a decoder. In some examples, motion estimation unit2104may not output a full set of motion information for the current video. Rather, motion estimation unit2104may signal the motion information of the current video block with reference to the motion information of another video block. For example, motion estimation unit2104may determine that the motion information of the current video block is sufficiently similar to the motion information of a neighboring video block.

In one example, motion estimation unit2104may indicate, in a syntax structure associated with the current video block, a value that indicates to the video decoder2200that the current video block has the same motion information as another video block.

As discussed above, video encoder2100may predictively signal the motion vector. Two examples of predictive signaling techniques that may be implemented by video encoder2100include advanced motion vector prediction (AMVP) and merge mode signaling.

Intra prediction unit2106may perform intra prediction on the current video block. When intra prediction unit2106performs intra prediction on the current video block, intra prediction unit2106may generate prediction data for the current video block based on decoded samples of other video blocks in the same picture. The prediction data for the current video block may include a predicted video block and various syntax elements.

Residual generation unit2107may generate residual data for the current video block by subtracting the predicted video block(s) of the current video block from the current video block. The residual data of the current video block may include residual video blocks that correspond to different sample components of the samples in the current video block.

In other examples, there may be no residual data for the current video block for the current video block, for example in a skip mode, and residual generation unit2107may not perform the subtracting operation.

After transform processing unit2108generates a transform coefficient video block associated with the current video block, quantization unit2109may quantize the transform coefficient video block associated with the current video block based on one or more quantization parameter (QP) values associated with the current video block.

Inverse quantization unit2110and inverse transform unit2111may apply inverse quantization and inverse transforms to the transform coefficient video block, respectively, to reconstruct a residual video block from the transform coefficient video block. Reconstruction unit2112may add the reconstructed residual video block to corresponding samples from one or more predicted video blocks generated by the prediction unit2102to produce a reconstructed video block associated with the current block for storage in the buffer2113.

After reconstruction unit2112reconstructs the video block, the loop filtering operation may be performed to reduce video blocking artifacts in the video block.

Entropy encoding unit2114may receive data from other functional components of the video encoder2100. When entropy encoding unit2114receives the data, entropy encoding unit2114may perform one or more entropy encoding operations to generate entropy encoded data and output a bitstream that includes the entropy encoded data.

FIG.22is a block diagram illustrating an example of video decoder2200which may be video decoder2024in the system2000illustrated inFIG.20.

The video decoder2200may be configured to perform any or all of the techniques of this disclosure. In the example ofFIG.22, the video decoder2200includes a plurality of functional components. The techniques described in this disclosure may be shared among the various components of the video decoder2200. In some examples, a processor may be configured to perform any or all of the techniques described in this disclosure.

In the example ofFIG.22, video decoder2200includes an entropy decoding unit2201, a motion compensation unit2202, an intra prediction unit2203, an inverse quantization unit2204, an inverse transformation unit2205, and a reconstruction unit2206and a buffer2207. Video decoder2200may, in some examples, perform a decoding pass generally reciprocal to the encoding pass described with respect to video encoder2100(FIG.21).

Entropy decoding unit2201may retrieve an encoded bitstream. The encoded bitstream may include entropy coded video data (e.g., encoded blocks of video data). Entropy decoding unit2201may decode the entropy coded video data, and from the entropy decoded video data, motion compensation unit2202may determine motion information including motion vectors, motion vector precision, reference picture list indexes, and other motion information. Motion compensation unit2202may, for example, determine such information by performing the AMVP and merge mode.

Motion compensation unit2202may use interpolation filters as used by video encoder2100during encoding of the video block to calculate interpolated values for sub-integer pixels of a reference block. Motion compensation unit2202may determine the interpolation filters used by video encoder2100according to received syntax information and use the interpolation filters to produce predictive blocks.

Intra prediction unit2203may use intra prediction modes for example received in the bitstream to form a prediction block from spatially adjacent blocks. Inverse quantization unit2204inverse quantizes, i.e., de-quantizes, the quantized video block coefficients provided in the bitstream and decoded by entropy decoding unit2201. Inverse transform unit2205applies an inverse transform.

Reconstruction unit2206may sum the residual blocks with the corresponding prediction blocks generated by motion compensation unit2202or intra prediction unit2203to form decoded blocks. If desired, a deblocking filter may also be applied to filter the decoded blocks in order to remove blockiness artifacts. The decoded video blocks are then stored in buffer2207, which provides reference blocks for subsequent motion compensation/intra prediction and also produces decoded video for presentation on a display device.

FIG.23is a schematic diagram of an example encoder2300. The encoder2300is suitable for implementing the techniques of VVC. The encoder2300includes three in-loop filters, namely a deblocking filter (DF)2302, a sample adaptive offset (SAO)2304, and an adaptive loop filter (ALF)2306. Unlike the DF2302, which uses predefined filters, the SAO2304and the ALF2306utilize the original samples of the current picture to reduce the mean square errors between the original samples and the reconstructed samples by adding an offset and by applying a finite impulse response (FIR) filter, respectively, with coded side information signaling the offsets and filter coefficients. The ALF2306is located at the last processing stage of each picture and can be regarded as a tool trying to catch and fix artifacts created by the previous stages.

The encoder2300further includes an intra prediction component2308and a motion estimation/compensation (ME/MC) component2310configured to receive input video. The intra prediction component2308is configured to perform intra prediction, while the ME/MC component2310is configured to utilize reference pictures obtained from a reference picture buffer2312to perform inter prediction. Residual blocks from inter prediction or intra prediction are fed into a transform (T) component2314and a quantization (Q) component2316to generate quantized residual transform coefficients, which are fed into an entropy coding component2318. The entropy coding component2318entropy codes the prediction results and the quantized transform coefficients and transmits the same toward a video decoder (not shown). Quantization components output from the quantization component2316may be fed into an inverse quantization (IQ) components2320, an inverse transform component2322, and a reconstruction (REC) component2324. The REC component2324is able to output images to the DF2302, the SAO2304, and the ALF2306for filtering prior to those images being stored in the reference picture buffer2312.

A listing of solutions preferred by some examples is provided next.

The following solutions show examples of techniques discussed herein.1. A method of video processing (e.g., method1900depicted inFIG.19), comprising: determining, for a conversion between a video block of a video and a bitstream of the video, whether or how a scaling process is used in an application of a transform for coding based on a rule; and performing the conversion according to the rule, wherein the rule is dependent on whether the video block is a dyadic block.2. The method of solution 1, wherein the rule specifies that, due to the video block having W×H dimensions that is non-dyadic, a scaling factor of 2−(┌log2W┐+offset, is used in a first forward transform stage, where offset is an integer.3. The method of solution 2, wherein offset=B−9, where B is a bit-dept of samples of the video block.4. The method of any of solutions 1-3, wherein the rule specifies that, due to the video block having W×H dimensions that is non-dyadic, a scaling factor of 2−(┌log2W┐+offset), is used in a second forward transform stage, where offset1 is an integer.5. The method of solution 1, wherein the rule specifies that, due to the video block having W×H dimensions that is non-dyadic, a scaling factor of 2−(┌log2H┐+offset), is used in a first forward transform stage, where offset is an integer.6. The method of solution 5, wherein offset=B−9, where B is a bit-dept of samples of the video block.7. The method of any of solutions 5-6, wherein the rule specifies that, due to the video block having W×H dimensions that is non-dyadic, a scaling factor of to be 2−(┌log2H┐+offset), is used in a second forward transform stage, where offset 1 is an integer.8. The method of solution 1, wherein the rule specifies that a scaling factor of 2−offsetis applied after a first inverse transform stage.9. The method of solution 1, wherein the rule specifies that a scaling factor of 2−offsetis

applied after a second inverse transform stage.10. The method of solution 8 or 9, wherein the scaling factor is equal to a constant or equal to 20−B, where B is a bit-depth of samples of the video block.11. The method of solution 1, wherein the rule specifies that scaling factors of different values are used for first and second transforms in due to the video block having at least length of height equal to 1.12. A method of video processing, comprising: determining, for a conversion between a video block of a video and a bitstream of the video, whether or how a quantization process is used for coding based on a rule; and performing the conversion according to the rule, wherein the rule is dependent on whether the video block is a dyadic block.13. The method of solution 12, wherein the rule specifies that different quantization processes are used for dyadic blocks and non-dyadic blocks.14. The method of any of solutions 12-13, wherein the rule specifies that, responsive to the video block being dyadic, during quantization,

wherein fQP%6, offsetQ and shift2 depend on dimensions of the video block.15. The method of any of solutions 12-14, wherein the rule specifies that, responsive to the video block being dyadic, during dequantization,

wherein gQP%6, offsetIQ and shift1 may on the block dimensions.16. A method of video processing, comprising: performing a conversion between a video and a bitstream of the video according to a rule, wherein the rule specifies that the bitstream includes an indication of a quantization scaling matrix used during the conversion, wherein the rule specifies whether the quantization scaling matrix is applicable to dyadic blocks, non-dyadic blocks, or both dyadic and non-dyadic blocks of the video.17. The method of solution 16, wherein the rule specifies that the quantization scaling matrix that is indicated in the bitstream is applicable for conversion of only dyadic blocks.18. The method of solution 16, wherein the rule specifies that the quantization scaling matrix that is indicated in the bitstream is applicable for conversion of only non-dyadic blocks.19. The method of solution 16, wherein the rule specifies that the quantization scaling matrix that is indicated in the bitstream is applicable for conversion of dyadic blocks and non-dyadic blocks.20. A method of video processing, comprising: performing a conversion between a video and a bitstream of the video according to a rule, wherein the rule specifies whether a video block is coded using a sign data hiding or a sign prediction method is dependent on whether the video block is a dyadic block.21. The method of solution 20, wherein the rule specifies that the sign data hiding or the sign prediction method is used only for blocks that are dyadic.22. The method of solution 20, wherein the rule specifies that the sign data hiding or the sign prediction method is used only for blocks that are not dyadic.23. A method of video processing, comprising: performing a conversion between a video block of a video and a bitstream of the video according to a rule, wherein the video block is coded using a transform-skip mode, wherein the rule specifies whether or how a quantization method is used for the video block depending on whether the video block is dyadic.24. The method of solution 23, wherein the rule specifies that the quantization method for the video block that is dyadic is same as a quantization method for non-dyadic video blocks.25. A method of video processing, comprising: performing a conversion between a video block of a video and a bitstream of the video according to a rule, wherein the video block is coded using a palette coding mode, wherein the rule specifies whether or how a quantization method is used for the video block depending on whether the video block is dyadic.26. The method of solution 25, wherein the rule specifies that the quantization method for the video block that is dyadic is same as a quantization method for non-dyadic video blocks.27. The method of any of solutions 1-26, wherein the conversion includes generating the bitstream from the video.28. The method of any of solutions 1-26, wherein the conversion includes generating the video from the bitstream.29. A method of storing a bitstream on a computer-readable medium, comprising generating a bitstream according to a method recited in any one or more of solutions 1-28 and storing the bitstream on the computer-readable medium.30. A computer-readable medium having a bitstream of a video stored thereon, the bitstream, when processed by a processor of a video decoder, causing the video decoder to generate the video, wherein the bitstream is generated according to a method recited in one or more of solutions 1-28.31. A video decoding apparatus comprising a processor configured to implement a method recited in one or more of solutions 1 to 29.32. A video encoding apparatus comprising a processor configured to implement a method recited in one or more of solutions 1 to 29.33. A computer program product having computer code stored thereon, the code, when executed by a processor, causes the processor to implement a method recited in any of solutions 1 to 29.34. A computer readable medium on which a bitstream complying to a bitstream format that is generated according to any of solutions 1 to 29.35. A method, an apparatus, a bitstream generated according to a disclosed method or a system described in the present document.

In the solutions described herein, an encoder may conform to the format rule by producing a coded representation according to the format rule. In the solutions described herein, a decoder may use the format rule to parse syntax elements in the coded representation with the knowledge of presence and absence of syntax elements according to the format rule to produce decoded video.

In the present document, the term “video processing” may refer to video encoding, video decoding, video compression or video decompression. For example, video compression algorithms may be applied during conversion from pixel representation of a video to a corresponding bitstream representation or vice versa. The bitstream representation of a current video block may, for example, correspond to bits that are either co-located or spread in different places within the bitstream, as is defined by the syntax. For example, a macroblock may be encoded in terms of transformed and coded error residual values and also using bits in headers and other fields in the bitstream. Furthermore, during conversion, a decoder may parse a bitstream with the knowledge that some fields may be present, or absent, based on the determination, as is described in the above solutions. Similarly, an encoder may determine that certain syntax fields are or are not to be included and generate the coded representation accordingly by including or excluding the syntax fields from the coded representation.

A first component is directly coupled to a second component when there are no intervening components, except for a line, a trace, or another medium between the first component and the second component. The first component is indirectly coupled to the second component when there are intervening components other than a line, a trace, or another medium between the first component and the second component. The term “coupled” and its variants include both directly coupled and indirectly coupled. The use of the term “about” means a range including ±10% of the subsequent number unless otherwise stated.