Method, apparatus and system for encoding and decoding blocks of video samples - Patents.com

By determining subdivision levels and applying separate kernels for color channels, the method addresses the challenges of decoding high-resolution and high-frame-rate video formats, enhancing decoding efficiency and flexibility.

JP7564921B2Active Publication Date: 2024-10-09CANON KK
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023138201
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-09-17
Filing Date
2023-08-28
Publication Date
2024-10-09
Estimated Expiration
2040-08-04

AI Technical Summary

Technical Problem

Existing video encoding standards struggle to efficiently handle high-resolution and high-frame-rate video formats, particularly in immersive applications, requiring real-time encoding and decoding with varying block partitioning constraints and differing requirements across frame sections.

Method used

The method involves decoding encoding units from a bitstream by determining subdivision levels and quantization parameters for each area, allowing for flexible adjustment of quantization parameters based on block partitioning constraints and applying separate kernels for primary and secondary color channels, enabling efficient decoding of video frames.

Benefits of technology

This approach enhances the flexibility and efficiency of video decoding, accommodating varying block structures and quantization needs across different frame sections, improving the decoding process for high-resolution and high-frame-rate video formats.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007564921000001
    Figure 0007564921000001
  • Figure 0007564921000002
    Figure 0007564921000002
  • Figure 0007564921000003
    Figure 0007564921000003
Patent Text Reader

Abstract

To provide a system and a method for decoding a plurality of encoded units from a bit stream to generate an image frame.SOLUTION: A method determines a fragmentation level about each of one or more continuous parts of a bit stream. Each fragmentation level can be applied to an encoded unit of the respective continuous parts of the bit stream. Also, the method decodes quantization parameter delta about each of a plurality of areas. The respective areas are based on decomposition of an encoded tree unit to the encoded unit of the respective continuous parts of the bit stream and a corresponding determined fragmentation level. Further, the method determines a quantization parameter about each area on the basis of the decoded quantization parameter delta about the area and a quantization parameter of the preceding encoded unit of an image frame, and decodes a plurality of encoded units by using the quantization parameters determined about each area to generate the image frame.SELECTED DRAWING: Figure 18
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] [REFERENCE TO RELATED APPLICATIONS] This application claims the benefit of the filing date of Australian Patent Application No. 2019232797, filed September 17, 2019, under 35 USC 119, the entirety of which is incorporated by reference as if fully set forth herein.

[0002] [Technical field] The present invention relates generally to digital video signal processing, and more particularly to a method, apparatus and system for encoding and decoding blocks of video samples. The present invention also relates to a computer program product including a computer readable medium having recorded thereon a computer program for encoding and decoding blocks of video samples. [Background technology]

[0003] Currently, many applications exist for video coding, including applications for the transmission and storage of video data. Many video coding standards have also been developed, and others are currently under development. Recent progress in video coding standardization has led to the formation of a group called the "Joint Video Experts Team" (JVET). The Joint Video Experts Team (JVET) includes members of the International Telecommunication Union's (ITU) Telecommunication Standardization Sector (ITU-T) Study Group 16, Question 6 (SG16 / Q6), known as the "Video Coding Experts Group" (VCEG), and members of the International Organization for Standardization / International Electrotechnical Commission Joint Technical Committee 1 / Subcommittee 29 / Working Group 11 (ISO / IEC JTC1 / SC29 / WG11), known as the "Moving Picture Experts Group" (MPEG).

[0004] The Joint Video Experts Team (JVET) issued a Call for Proposals (CfP) and analyzed the responses at its 10th meeting in San Diego, USA. The submitted proposals showed video compression capabilities that significantly exceeded the current state of the art video compression standard "High Efficiency Video Coding" (HEVC). Based on these results, it was decided to start a project to develop a new video compression standard "Versatile Video Coding" (VVC). VVC is supposed to meet the traditional demand for higher compression performance with the increasing capabilities of video formats (e.g. higher resolution and higher frame rate) and also meet the increasing market demand for service delivery over WANs where bandwidth costs are relatively high. Use cases such as immersive video require real-time encoding and decoding of such advanced formats, e.g. cube map projection (CMP) may use 8K formats even if the "viewport" where it is ultimately rendered is of lower resolution. VVC needs to be implementable in modern silicon processes and provide an acceptable trade-off between the performance achieved and the implementation costs. The implementation cost can be considered, for example, in terms of one or more of silicon area, CPU processor load, memory usage, and bandwidth. More advanced video formats may be processed by dividing the frame area into sections and processing each section in parallel. A bitstream constructed from multiple sections of a compressed frame is still suitable for decoding by a "single-core" decoder, i.e., frame-level constraints, including bitrate, are assigned to each section according to the needs of the application.

[0005] Video data includes a series of frames of image data, each of which includes one or more color channels. Typically, one primary color channel and two secondary color channels are required. The primary color channel is commonly called the "luma" channel, and the secondary color channel is commonly called the "chroma" channel. Video data is typically displayed in the RGB (Red-Green-Blue) color space, which has a high degree of correlation between the three components. The representation of the video data seen by the encoder or decoder is often in a color space such as YCbCr. YCbCr aggregates the luma, which is mapped to "luma" according to a transfer function, in the Y (primary) channel, and the chroma in the Cb and Cr (secondary) channels. Due to the use of the correlated YCbCr signal, the statistics of the luma channel and the statistics of the chroma channels are significantly different. The main difference is that after quantization, the chroma channel has relatively fewer significant coefficients for a particular block compared to the coefficients of the corresponding luma channel block. Additionally, the Cb and Cr channels may be spatially sampled (subsampled) at a lower rate compared to the luma channel (e.g., half horizontally and half vertically, known as a "4:2:0 chroma format"). The 4:2:0 chroma format is commonly used in "consumer" applications, such as Internet video streaming, television broadcasting, and storage on Blu-ray Discs. Subsampling the Cb and Cr channels at half rate horizontally, but not vertically, is known as a "4:2:2 chroma format". The 4:2:2 chroma format is typically used in professional applications, including shooting footage for film productions. The 4:2:2 chroma format's higher sampling rate results in video that is more resistant to editing operations such as color grading. Before being distributed to consumers, material in the 4:2:2 chroma format is often converted to the 4:2:0 chroma format and encoded for distribution to consumers. In addition to the chroma format, videos are also characterized by their resolution and frame rate.Exemplary resolutions are 3840x2160 Ultra High Definition (UHD) or 7680x4320 "8K", with exemplary frame rates of 60Hz or 120Hz. Luma sample rates can range from approximately 500 megasamples / second to several gigasamples / second. For a 4:2:0 chroma format, the sample rate of each chroma channel is ¼ the luma sample rate, and for a 4:2:2 chroma format, the sample rate of each chroma channel is ½ the luma sample rate.

[0006] The VVC standard is a "block-based" codec, where a frame is first divided into a square array of regions called "coding tree units" (CTUs). A CTU typically occupies a relatively large area, such as 128x128 luma samples. However, CTUs at the right and bottom edges of each frame may be smaller in area. Each CTU may have a "coding tree" associated with it for both luma and chroma channels (a "shared tree"), or a separate tree for each luma and chroma channel. The coding tree defines the decomposition of the CTU's area into a set of blocks called "coding blocks" (CBs). If a shared tree is used, a single coding tree specifies blocks for both luma and chroma channels, in which case the collection of co-located coding blocks is called a "coding unit" (CU), i.e. each CU has a coding block for each color channel. The CBs are processed for encoding or decoding in a specific order. As a consequence of employing a 4:2:0 chroma format, a CTU with a luma coding tree for a 128x128 luma sample area has a chroma coding tree for a 64x64 chroma sample area collocated with the 128x128 luma sample area. When a single coding tree is used for luma and chroma channels, the collection of blocks collocated for a given area is generally called a "unit", e.g., the CU mentioned above, but also "prediction unit" (PU), "transform unit" (TU). A single tree with CUs spanning the color channels of 4:2:0 chroma format video data results in a chroma block with half the width and height of the corresponding luma block. When separate coding trees are used for a given area, in addition to the CB mentioned above, a "prediction block" (PB) and a "transform block" (TB) are used.

[0007] Notwithstanding the above distinction between "unit" and "block", the term "block" can be used as a general term for an area or region of a frame where an operation is applied to all color channels.

[0008] For each CU, a prediction unit (PU) of the contents (sample values) of the corresponding area of ​​the frame data is generated ("Prediction Unit"). Furthermore, a representation of the difference (or "spatial domain" residual) between the prediction and the contents of the region as seen at the input to the encoder is formed. The differences for each color channel may be transformed and coded as a sequence of residual coefficients to form one or more TUs for a given CU. The applied transform may be a Discrete Cosine Transform (DCT) or other transform applied to the residual values ​​of each block. The transform is applied in isolation, i.e., a two-dimensional transform is performed in two passes. The block is first transformed by applying a one-dimensional transform to each row of samples in the block. The partial results are then transformed by applying a one-dimensional transform to each column of the partial results to produce a final block of transform coefficients that substantially decorrelates the residual samples. The VVC standard supports transforms of various sizes, including the transformation of rectangular blocks whose sides are a power of two. The transform coefficients are quantized for entropy coding into the bitstream.

[0009] VVC has the features of intra-frame prediction and inter-frame prediction. Intra-frame prediction uses previously processed samples in a frame to generate a prediction of a current block of samples in a frame. Inter-frame prediction uses a block of samples from a previously decoded frame to generate a prediction of a current block of samples in a frame. The block of samples from a previously decoded frame is offset from the spatial location of the current block according to a motion vector, and is often filtered. An intra-frame prediction block can be (i) a uniform sample value ("DC intra-prediction"), (ii) a plane with offsets and horizontal and vertical gradients ("planar intra-prediction"), (iii) a block arrangement with neighboring samples and applied in a particular direction ("angular intra-prediction"), or (iv) the result of a matrix multiplication with neighboring samples and selected matrix coefficients. Further discrepancies between the predicted block and the corresponding input samples can be compensated to some extent by coding a "residual" in the bitstream. The residual is typically transformed from the spatial domain to the frequency domain to form residual coefficients (in a "primary transform domain") that may be further transformed (to produce residual coefficients in a "secondary transform domain") by application of a "secondary transform". The residual coefficients are quantized according to a quantization parameter, resulting in a less accurate reconstruction of the samples produced at the decoder, but at a lower bit rate for the bit stream. The quantization parameter may vary between frames and within each frame. Varying the quantization parameter within a frame is typical for "rate controlled" encoders. Rate controlled encoders attempt to generate a substantially constant bit rate bit stream, regardless of the statistics of the received input samples (such as noise characteristics and degree of motion). Because the bit stream is typically transmitted over a network with limited bandwidth, rate control is a popular technique to ensure reliable performance over the network, regardless of variations in the original frames input to the encoder.When a frame is coded in parallel sections, it is desirable to be flexible in the use of rate control since different sections may have different requirements in terms of desired fidelity. Summary of the Invention

[0010] It is an object of the present invention to substantially overcome, or at least ameliorate, one or more disadvantages of existing arrangements.

[0011] One aspect of the disclosure provides a method for decoding a plurality of coding units from a bitstream to generate an image frame, the coding units being a result of a decomposition of a coding tree unit, the plurality of coding units forming one or more consecutive portions of the bitstream, the method including: determining a subdivision level for each of the one or more consecutive portions of the bitstream, each subdivision level being applicable to the coding units of the respective consecutive portions of the bitstream; decoding a quantization parameter delta for each of a plurality of areas, each area being based on a decomposition of a coding tree unit into coding units of the respective consecutive portions of the bitstream and the corresponding determined subdivision level; determining a quantization parameter for each area based on the decoded quantization parameter delta for the area and the quantization parameter of a previous coding unit of the image frame; and decoding the plurality of coding units using the quantization parameter determined for the respective area to generate the image frame.

[0012] According to another aspect, each area is based on a comparison of a level of subdivision associated with the coding unit to the level of subdivision determined for a corresponding contiguous portion.

[0013] According to another aspect, a quantization parameter delta is determined for each area in which the corresponding coding tree has a subdivision level less than or equal to the subdivision level determined for the corresponding successive portion.

[0014] According to another aspect, a new area is established for any node of the coding tree unit having a subdivision level that is less than or equal to the corresponding determined subdivision level.

[0015] According to another aspect, the subdivision level determined for each successive portion comprises a first subdivision level for luma coding units and a second subdivision level for chroma coding units of the successive portion.

[0016] According to another embodiment, the first and second levels of subdivision are different.

[0017] According to another aspect, the method further includes decoding a flag indicating that a partition constraint of a sequence parameter set associated with the bitstream can be overridden.

[0018] According to another aspect, the level of subdivision determined for each of the one or more consecutive portions comprises a maximum luma coding unit depth for the region.

[0019] According to another aspect, the level of subdivision determined for each of the one or more contiguous portions comprises a maximum chroma coding unit depth for a corresponding region.

[0020] According to another aspect, the determined subdivision level for one of the successive portions is adjusted to maintain an offset relative to a decoded deepest allowed subdivision level for the partition constraint of the bitstream.

[0021] Another aspect of the disclosure provides a non-transitory computer-readable medium having stored thereon a computer program implementing a method for decoding a plurality of coding units from a bitstream to generate an image frame, the coding units being results of a decomposition of coding tree units, the plurality of coding units forming one or more consecutive portions of the bitstream, the method including: determining a level of refinement for each of the one or more consecutive portions of the bitstream, each level of refinement being applicable to the coding units of the respective consecutive portions of the bitstream; decoding a quantization parameter delta for each of a plurality of areas, each area being based on a decomposition of coding tree units into coding units of the respective consecutive portions of the bitstream and the corresponding determined level of refinement; determining a quantization parameter for each area based on the decoded quantization parameter delta for the area and the quantization parameter of a previous coding unit of the image frame; and decoding the plurality of coding units using the quantization parameter determined for the respective area to generate the image frame.

[0022] Another aspect of the disclosure provides a video decoder configured to implement a method for decoding a plurality of coding units from a bitstream to generate an image frame, the coding units being results of a decomposition of a coding tree unit, the plurality of coding units forming one or more consecutive portions of the bitstream, the method including: determining a level of refinement for each of the one or more consecutive portions of the bitstream, each level of refinement being applicable to the coding units of the respective consecutive portions of the bitstream; decoding a quantization parameter delta for each of a plurality of areas, each area being based on a decomposition of a coding tree unit into coding units of the respective consecutive portions of the bitstream and the corresponding determined level of refinement; determining a quantization parameter for each area based on the decoded quantization parameter delta for the area and the quantization parameter of a previous coding unit of the image frame; and decoding the plurality of coding units using the quantization parameter determined for the respective area to generate the image frame.

[0023] Another aspect of the disclosure provides a system comprising a memory and a processor, the processor configured to execute code stored in the memory implementing a method for decoding a plurality of coding units from a bitstream to generate an image frame, the coding units being results of a decomposition of a coding tree unit, the plurality of coding units forming one or more consecutive portions of the bitstream, the method including: determining a level of refinement for each of the one or more consecutive portions of the bitstream, each level of refinement being applicable to the coding units of the respective consecutive portions of the bitstream; decoding a quantization parameter delta for each of a plurality of areas, each area being based on a decomposition of a coding tree unit into coding units of the respective consecutive portions of the bitstream and the corresponding determined level of refinement; determining a quantization parameter for each area based on the decoded quantization parameter delta for the area and the quantization parameter of a previous coding unit of the image frame; and decoding the plurality of coding units using the quantization parameter determined for the respective area to generate the image frame.

[0024] Another aspect of the disclosure provides a method for decoding a coding unit of a coding tree from a coding tree unit of an image frame from a video bitstream, the coding unit having a primary color channel and at least one secondary color channel, the method including: determining a coding unit including the primary color channel and the at least one secondary color channel according to a decoded split flag of the coding tree unit; decoding a first index for selecting a kernel for the primary color channel and a second index for selecting a kernel for the at least one secondary color channel; selecting a first kernel according to the first index and a second kernel according to the second index; and decoding the coding unit by applying the first kernel to residual coefficients of the primary color channel and applying the second kernel to residual coefficients of the at least one secondary color channel.

[0025] According to another aspect, the first or second index is decoded immediately after decoding the last significant residual coefficient position of the coding unit.

[0026] According to another aspect, a single residual coefficient is decoded for multiple secondary color channels.

[0027] According to another aspect, a single residual coefficient is decoded for a single secondary color channel.

[0028] According to another aspect, the first index and the second index are independent of each other.

[0029] According to another aspect, the first and second kernels depend on intra prediction modes of the primary and the at least one secondary color channel, respectively.

[0030] According to another aspect, the first and second kernels are related to a block size of the primary color channel and a block size of the at least one secondary color channel, respectively.

[0031] According to another aspect, the second kernel is related to a chroma subsampling ratio of the encoded bitstream.

[0032] According to another aspect, each of the kernels implements a non-separable quadratic transformation.

[0033] According to another aspect, the coding unit has two secondary color channels and a separate index is decoded for each of the secondary color channels.

[0034] Another aspect of the present disclosure provides a non-transitory computer-readable medium having stored thereon a computer program implementing a method for decoding a coding unit of a coding tree from a coding tree unit of an image frame from a video bitstream, the coding unit having a primary color channel and at least one secondary color channel, the method including: determining a coding unit including the primary color channel and the at least one secondary color channel according to a decoded split flag of the coding tree unit; decoding a first index for selecting a kernel for the primary color channel and a second index for selecting a kernel for the at least one secondary color channel; selecting a first kernel according to the first index and a second kernel according to the second index; and decoding the coding unit by applying the first kernel to residual coefficients of the primary color channel and applying the second kernel to residual coefficients of the at least one secondary color channel.

[0035] Another aspect of the disclosure provides a video decoder configured to implement a method for decoding a coding unit of a coding tree from a coding tree unit of an image frame from a video bitstream, the coding unit having a primary color channel and at least one secondary color channel, the method including: determining a coding unit including the primary color channel and the at least one secondary color channel according to a decoded split flag of the coding tree unit; decoding a first index for selecting a kernel for the primary color channel and a second index for selecting a kernel for the at least one secondary color channel; selecting a first kernel according to the first index and a second kernel according to the second index; and decoding the coding unit by applying the first kernel to residual coefficients of the primary color channel and applying the second kernel to residual coefficients of the at least one secondary color channel.

[0036] Another aspect of the disclosure provides a system comprising a memory and a processor, the processor configured to execute code stored in the memory implementing a method for decoding a coding unit of a coding tree from a coding tree unit of an image frame from a video bitstream, the coding unit having a primary color channel and at least one secondary color channel, the method including: determining a coding unit including the primary color channel and the at least one secondary color channel according to a decoded split flag of the coding tree unit; decoding a first index for selecting a kernel for the primary color channel and a second index for selecting a kernel for the at least one secondary color channel; selecting a first kernel according to the first index and a second kernel according to the second index; and decoding the coding unit by applying the first kernel to residual coefficients of the primary color channel and applying the second kernel to residual coefficients of the at least one secondary color channel.

[0037] Other aspects are also disclosed. [Brief description of the drawings]

[0038] At least one embodiment of the invention will now be described with reference to the following drawings and appendix.

[0039] [Figure 1] FIG. 1 is a schematic block diagram illustrating a video encoding and decoding system.

[0040] [Figure 2A] , [Figure 2B] 2A and 2B form a schematic block diagram of a general purpose computer system upon which one or both of the video encoding and decoding systems of FIG. 1 may be implemented.

[0041] [Diagram 3] FIG. 3 is a schematic block diagram illustrating functional modules of a video encoder.

[0042] [Figure 4] FIG. 4 is a schematic block diagram illustrating functional modules of a video decoder.

[0043] [Diagram 5] FIG. 5 is a schematic block diagram illustrating a possible division of a block into one or more blocks in a versatile video coding tree structure.

[0044] [Figure 6] FIG. 6 is a schematic diagram illustrating data flows for realizing permitted division of a block into one or more blocks in a versatile video coding tree structure.

[0045] [Figure 7A] , [Figure 7B] 7A and 7B show an example in which a coding tree unit (CTU) is divided into multiple coding units (CUs).

[0046] [Figure 8A] , [Figure 8B] , [Figure 8C] 8A, 8B and 8C show the levels of subdivision resulting from partitioning the coding tree and the effect of partitioning the coding tree units into quantization groups.

[0047] [Figure 9A] , [Figure 9B] 9A and 9B show the scan pattern for a 4×4 transform block and its associated primary and secondary transform coefficients.

[0048] [Figure 9C] , [Figure 9D]9C and 9D show the scan pattern for an 8x8 transform block and its associated primary and secondary transform coefficients.

[0049] [Figure 10] FIG. 10 shows the application domain of the secondary transform for transform blocks of various sizes.

[0050] [Figure 11] FIG. 11 shows the syntax structure of a bitstream with multiple slices, where each slice contains multiple coding units.

[0051] [Figure 12] FIG. 12 shows a syntax structure of a bitstream with a shared tree of luma coding blocks and chroma coding blocks of a coding tree unit.

[0052] [Figure 13] FIG. 13 illustrates a method for encoding a frame into a bitstream that includes one or more slices as a sequence of coding units.

[0053] [Figure 14] FIG. 14 shows how the slice header is encoded into the bitstream.

[0054] [Figure 15] FIG. 15 illustrates a method for encoding a coding unit into a bitstream.

[0055] [Figure 16] FIG. 16 shows a method for decoding a frame from a bitstream as a sequence of coding units organized into slices.

[0056] [Figure 17] FIG. 17 illustrates a method for decoding a slice header from a bitstream.

[0057] [Figure 18] FIG. 18 illustrates a method for decoding a coding unit from a bitstream.

[0058] [Figure 19A] , [Figure 19B] 19A and 19B show the rules for applying or bypassing the secondary transform to the luma and chroma channels. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0059] Where reference is made in one or more of the accompanying drawings to steps and / or features having the same reference numerals, those steps and / or features have the same function or operation for the purposes of this description, unless a contrary intention appears.

[0060] A rate controlled video encoder needs the flexibility to adjust the quantization parameters with a granularity appropriate to the block partitioning constraints. The block partitioning constraints may differ from one part of a frame to another, for example when multiple video encoders work in parallel to compress each frame. The granularity of the area where the quantization parameters need to be adjusted differs accordingly. Furthermore, the control of the selection of the transform to be applied, including the application of a possible secondary transform, is applied within the prediction signal from which the transformed residual was generated. In particular for intra prediction, separate modes are available for luma and chroma blocks, since luma and chroma blocks may use different intra prediction modes.

[0061] Some sections of the video may contribute more to the fidelity of the rendered viewport than others and may be allocated higher bitrates and have greater flexibility in the variation of block structure and quantization parameters. Sections that contribute less to the fidelity of the rendered viewport, such as sections to the side or back of the rendered viewport, may be compressed with simpler block structures and less flexibility in the control of quantization parameters to reduce the coding effort. In general, for lower bitrates, larger values ​​are selected to more coarsely quantize the transform coefficients. Furthermore, the application of transform selection may be independent between the luma and chroma channels to avoid the need to consider luma and chroma simultaneously for transform selection, further simplifying the encoding process. In particular, the need to consider luma and chroma together for secondary transform selection after considering luma and chroma intra prediction modes separately may be avoided.

[0062] 1 is a schematic block diagram illustrating functional modules of a video encoding and decoding system 100. The system 100 can vary the areas over which quantization parameters are adjusted in different parts of a frame to accommodate different block partitioning constraints that may be in effect in respective parts of the frame.

[0063] System 100 includes source device 110 and destination device 130. Communication channel 120 is used to communicate encoded video information from source device 110 to destination device 130. In some configurations, either or both of source device 110 and destination device 130 may comprise respective mobile phone handsets or “smartphones,” in which case communication channel 120 is a wireless channel. In other configurations, source device 110 and destination device 130 may comprise video conferencing equipment, in which case communication channel 120 is typically a wired channel, such as an Internet connection. Additionally, source device 110 and destination device 130 may comprise any of a wide range of devices, including devices supporting over-the-air television broadcasts, cable television applications, Internet video applications (including streaming), and applications in which encoded video data is captured on some computer-readable storage medium, such as a hard disk drive in a file server.

[0064] As shown in Figure 1, source device 110 includes a video source 112, a video encoder 114, and a transmitter 116. Video source 112 typically comprises a source of captured video frame data (shown as 113), such as an image capture sensor, a previously captured video sequence stored on a non-transitory recording medium, or a video feed from a remote image capture sensor. Video source 112 may also be the output of a computer graphics card, e.g., displaying the video output of an operating system or various applications running on a computing device such as a tablet computer. Examples of source device 110 that may include an image capture sensor as video source 112 include smartphones, video camcorders, professional video cameras, and network video cameras.

[0065] Video encoder 114 converts (or "encodes") captured frame data (indicated by arrow 113) from video source 112 into a bitstream (indicated by arrow 115), as will be further described with reference to FIG. 3. Bitstream 115 is transmitted by transmitter 116 as encoded video data (or "encoded video information") over communication channel 120. Bitstream 115 may also be stored in a non-transitory storage device 122, such as a "flash" memory or a hard disk drive, until later transmitted over communication channel 120, or in lieu of transmission over communication channel 120. For example, encoded video data may be provided on-demand to customers over a wide area network (WAN) for video streaming applications.

[0066] The destination device 130 includes a receiver 132, a video decoder 134, and a display device 136. The receiver 132 receives the encoded video data from the communication channel 120 and passes the received video data to the video decoder 134 as a bitstream (indicated by arrow 133). The video decoder 134 then outputs decoded frame data (indicated by arrow 135) to the display device 136. The decoded frame data 135 has the same chroma format as the frame data 113. Examples of the display device 136 include a cathode ray tube or a liquid crystal display such as in a smartphone, a tablet computer, a computer monitor, or a standalone television. It is also possible that the functions of each of the source device 110 and the destination device 130 are implemented in a single device, examples of which include a mobile phone handset and a tablet computer. The decoded frame data may be further transformed before being presented to a user. For example, a "viewport" with a particular latitude and longitude may be rendered from the decoded frame data using a projection format to represent a 360° view of the scene.

[0067] Regardless of the exemplary devices described above, each of the source device 110 and the destination device 130 may be configured in a general-purpose computing system, typically by a combination of hardware and software components. Fig. 2A illustrates such a computer system 200, which includes a computer module 201, input devices such as a keyboard 202, a mouse pointer device 203, a scanner 226, a camera 227 that may be configured as a video source 112, and a microphone 280, and output devices such as a printer 215, a display device 214 that may be configured as a display device 136, and a speaker 217. An external Modulator-Demodulator (Modem) transceiver device 216 may be used by the computer module 201 to communicate to and from a communication network 220 via a connection 221. The communication network 220, which may represent the communication channel 120, may be a (WAN), such as the Internet, a cellular communication network, or a private WAN. If the connection is by telephone line 221, the modem 216 may be a conventional "dial-up" modem. Alternatively, the modem 216 may be a broadband modem if the connection 221 is a high-capacity (e.g., cable or optical) connection, or a wireless modem may be used for a wireless connection to the communications network 220. The transceiver device 216 may provide the functionality of the transmitter 116 and the receiver 132, and the communications channel 120 may be implemented in the connection 221.

[0068] The computer module 201 typically includes at least one processor unit 205 and a memory unit 206. For example, the memory unit 206 may include a semiconductor random access memory (RAM) and a semiconductor read-only memory (ROM). The computer module 201 also includes a number of input / output (I / O) interfaces, including an audio-video interface 207 coupled to a video display 214, a speaker 217 and a microphone 280, an I / O interface 213 coupled to a keyboard 202, a mouse 203, a scanner 226, a camera 227 and optionally a joystick or other human interface device (not shown), and an interface 208 for an external modem 216 and a printer 215. The signals from the audio-video interface 207 to the computer monitor 214 are typically the output of a computer graphics card. In some implementations, the modem 216 may be integrated into the computer module 201, for example in the interface 208. The computer module 201 also has a local network interface 211, which allows the computer system 200 to be coupled via a connection 223 to a local area communication network 222, known as a local area network (LAN). As shown in FIG. 2A, the local communication network 222 can also be coupled via a connection 224 to a wide area network 220, which would typically include a so-called "firewall" device or a device with similar functionality. The local network interface 211 may comprise an Ethernet circuit card, a Bluetooth wireless configuration, or an IEEE 802.11 wireless configuration, although many other types of interfaces may be used as the interface 211. The local network interface 211 may also provide the functionality of the transmitter 116 and the receiver 132, and the communication channel 120 may also be implemented in the local communication network 222.

[0069] The I / O interfaces 208 and 213 may provide either or both serial and parallel connections, the former typically implemented according to the Universal Serial Bus (USB) standard and having a corresponding USB connector (not shown). The storage device 209 typically includes a hard disk drive (HDD) 210. Other storage devices such as floppy disk drives and magnetic tape drives (not shown) may also be used. An optical disk drive 212 is typically provided to serve as a non-volatile source of data. Portable memory devices such as optical disks (e.g., CD-ROM, DVD, Blu-ray Disc), USB-RAM, portable external hard drives, and floppy disks may be used as suitable data sources for the computer system 200. Typically, any of the HDD 210, the optical drive 212, and the networks 220 and 222 may also be configured to operate as a video source 112 or as a destination for decoded video data to be stored for playback via the display 214. The source device 110 and the destination device 130 of the system 100 may be implemented in a computer system 200 .

[0070] The components 205-213 of the computer module 201 typically communicate via an interconnected bus 204 and in a manner which results in a conventional mode of operation of the computer system 200 known to those skilled in the art. For example, the processor 205 is coupled to the system bus 204 using a connection 218. Similarly, the memory 206 and optical disk drive 212 are coupled to the system bus 204 by a connection 219. Examples of computers on which the described arrangements can be practised include IBM-PC's and compatibles, Sun SPARCstations, Apple Mac® or a similar computer systems.

[0071] If appropriate or desired, the video encoder 114 and the video decoder 134, as well as the methods described below, may be implemented using the computer system 200. In particular, the video encoder 114, the video decoder 134, and the methods described below may be implemented as one or more software application programs 233 executable within the computer system 200. In particular, the video encoder 114, the video decoder 134, and the steps of the methods described are effected by instructions 231 (see FIG. 2B) in the software 233 executed within the computer system 200. The software instructions 231 may be formed as one or more code modules, each for performing one or more specific tasks. The software may also be divided into two separate parts, where a first part and corresponding code modules perform the methods described, and a second part and corresponding code modules manage a user interface between the first part and a user.

[0072] The software may be stored in a computer readable medium, including, for example, the storage devices described below. The software is loaded from the computer readable medium into the computer system 200 and then executed by the computer system 200. A computer readable medium having such software or a computer program recorded thereon is a computer program product. Use of the computer program product in the computer system 200 preferably results in an advantageous apparatus for implementing the video encoder 114, the video decoder 134 and the methods described.

[0073] The software 233 is typically stored on the HDD 210 or memory 206. The software is loaded into the computer system 200 from a computer readable medium and executed by the computer system 200. Thus, for example, the software 233 may be stored on an optically readable disk storage medium (e.g., a CD-ROM) 225 that is read by the optical disk drive 212.

[0074] In some examples, the application program 233 may be encoded on one or more CD-ROMs 225 and provided to the user and read via the corresponding drive 212, or alternatively read by the user from the network 220 or 222. Furthermore, the software may also be loaded into the computer system 200 from other computer readable media. A computer readable storage medium refers to any non-transitory tangible storage medium that provides recorded instructions and / or data to the computer system 200 for execution and / or processing. Examples of such storage media include floppy disks, magnetic tapes, CD-ROMs, DVDs, Blu-ray disks, hard disk drives, ROMs or integrated circuits, USB memories, magneto-optical disks, or computer readable cards such as PCMCIA cards, whether such devices are internal or external to the computer module 201. Examples of transitory or non-tangible computer-readable transmission media that may also participate in providing software, application programs, instructions and / or video data or encoded video data to the computer module 401 include wireless or infrared transmission paths, as well as network connections to other computers or network devices, and the Internet or intranets, including email transmissions, information stored on websites, and the like.

[0075] The second portion of the application programs 233 and corresponding code modules described above may be executed to implement one or more graphical user interfaces (GUIs) that are rendered or otherwise represented on the display 214. Through operation of a typical keyboard 202 and mouse 203, a user of the computer system 200 and applications may manipulate the interface in a functionally adaptable manner to provide control commands and / or input to applications associated with the GUI. Other forms of functionally adaptable user interfaces may also be implemented, such as audio interfaces utilizing voice prompts output via speaker 217 and user voice commands input via microphone 280.

[0076] Figure 2B is a detailed schematic block diagram of processor 205 and "memory" 234. Memory 234 represents the logical collection of all memory modules (including HDD 209 and solid-state memory 206) accessible by computer module 201 of Figure 2A.

[0077] When the computer module 201 is initially powered on, a power-on self-test (POST) program 250 is executed. The POST program 250 is typically stored in the ROM 249 of the semiconductor memory 206 of FIG. 2A. Note that a hardware device that stores software, such as the ROM 249, may be called firmware. The POST program 250 inspects the hardware in the computer module 201 to ensure proper functioning, and typically checks that the processor 205, the memory 234 (209, 206), and a basic input / output system software (BIOS) module 251, also typically stored in the ROM 249, are operating properly. If the POST program 250 is executed normally, the BIOS 251 starts the hard disk drive 210 of FIG. 2A. The start-up of the hard disk drive 210 causes a bootstrap loader program 252 resident in the hard disk drive 210 to be executed via the processor 205. This loads the operating system 253 into the RAM memory 206, which starts the operation of the operating system 253. Operating system 253 is a system level application executable by processor 205 and provides various high level functions such as processor management, memory management, device management, storage management, software application interface, and general purpose user interface.

[0078] The operating system 253 manages the memory 234 (209, 206) to ensure that each process or application running on the computer module 201 has enough memory to run without conflicting with memory allocated to other processes. Furthermore, the different types of memory available in the computer system 200 of FIG. 2A must be used appropriately so that each process can run effectively. Thus, the aggregated memory 234 is not intended to describe how specific segments of memory are allocated (unless otherwise noted), but rather to provide a general view of the memory accessible by the computer system 200 and how it is used.

[0079] As shown in FIG. 2B, the processor 205 includes a number of functional modules including a control unit 239, an arithmetic logic unit (ALU) 240, and a local or internal memory 248, sometimes referred to as a cache memory. The cache memory 248 typically includes a number of storage registers 244-246 in a register section. One or more internal buses 241 operatively interconnect these functional modules. The processor 205 also typically has one or more interfaces 242 for communicating with external devices via the system bus 204 using a connection 218. The memory 234 is coupled to the bus 204 using a connection 219.

[0080] Application program 233 includes a set of instructions 231, which may include conditional branch and loop instructions. Program 233 may also include data 232 that is used during execution of program 233. Instructions 231 and data 232 are stored in memory locations 228, 229, 230 and 235, 236, 237, respectively. Depending on the relative sizes of instructions 231 and memory locations 228-230, a particular instruction may be stored in a single memory location, as depicted by the instruction shown in memory location 230. Alternatively, an instruction may be segmented into several parts, each stored in a separate memory location, as depicted by the instruction segments shown in memory locations 228 and 229.

[0081] In general, the processor 205 is given a set of instructions which it executes. The processor 205 waits for a subsequent input, to which the processor 205 responds by executing another set of instructions. Each input may come from one or more of a number of sources, including data generated by one or more of the input devices 202, 203, data received from an external source via one of the networks 220, 202, data obtained from one of the storage devices 206, 209, or data obtained from a storage medium 225 inserted into a corresponding reader 212, all of which are depicted in FIG. 2A. Execution of the set of instructions may in some cases involve output of data. Execution may also include storing data or variables in the memory 234.

[0082] The video encoder 114, video decoder 134, and methods described may use input variables 254, which are stored in memory 234 at corresponding memory locations 255, 256, 257. The video encoder 114, video decoder 134, and methods described may generate output variables 261, which are stored in memory 234 at corresponding memory locations 262, 263, 264. Intermediate variables 258 may be stored in memory locations 259, 260, 266, 267.

[0083] 2B, the registers 244, 245, 246, the arithmetic logic unit (ALU) 240, and the control unit 239 cooperate to perform the sequence of micro operations required to perform a "fetch, decode, and execute" cycle for every instruction in the instruction set that makes up the program 233. Each fetch, decode, and execute cycle includes the following: A fetch operation that fetches or reads instructions 231 from memory locations 228, 229, 230. A decode operation in which the control unit 239 determines which instructions have been fetched. An execute operation in which the control unit 239 and / or ALU 240 executes the instruction.

[0084] Thereafter, a further fetch, decode, and execute cycle for the next instruction may be performed. Similarly, a store cycle may be performed in which control unit 239 stores or writes a value to memory location 232.

[0085] Each step or sub-process in the methods of Figures 13-18 described below is associated with one or more segments of program 233 and is typically performed by register sections 244, 245, 247, ALU 240, and control unit 239 within processor 205 working together to perform a fetch, decode, and execute cycle of all instructions in the instruction set for the referenced segment of program 233.

[0086] FIG. 3 is a schematic block diagram showing the functional modules of the video encoder 114. FIG. 4 is a schematic block diagram showing the functional modules of the video decoder 134. Generally, data is passed between the functional modules in the video encoder 114 and the functional modules in the video decoder 134 as groups of samples or coefficients, such as a division of a block into fixed-size sub-blocks, or as arrays. The video encoder 114 and the video decoder 134 may be implemented using a general-purpose computer system 200, as shown in FIG. 2A and FIG. 2B, where the various functional modules may be implemented by dedicated hardware in the computer system 200, by software executable within the computer system 200, such as one or more software code modules of a software application program 233 residing on a hard disk drive 205 and whose execution is controlled by the processor 205. Alternatively, the video encoder 114 and the video decoder 134 may be implemented by a combination of dedicated hardware and software executable within the computer system 200. The video encoder 114, the video decoder 134, and the described methods may alternatively be implemented in dedicated hardware, such as one or more integrated circuits performing functions or sub-functions of the described methods. Such dedicated hardware may include a graphic processing unit (GPU), a digital signal processor (DSP), an application specific standard product (ASSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or one or more microprocessors and associated memory. In particular, the video encoder 114 comprises modules 310-390, and the video decoder 134 comprises modules 420-496, each of which may be implemented as one or more software code modules of the software application program 233.

[0087] The video encoder 114 of FIG. 3 is an example of a versatile video coding (VVC) video encoding pipeline, although other video codecs may be used to perform the processing steps described herein. The video encoder 114 receives captured frame data 113, such as a sequence of frames, each frame including one or more color channels. The frame data 113 may be in any chroma format, such as 4:0:0, 4:2:0, 4:2:2, or 4:4:4 chroma formats. The block partitioner 310 first divides the frame data 113 into CTUs, which are generally square in shape and are configured to use a particular size of CTU. The size of the CTU may be, for example, 64×64, 128×128, or 256×256 luma samples. The block partitioner 310 further divides each CTU into one or more CBs according to a luma coding tree and a chroma coding tree. The luma channel may also be referred to as a primary color channel. Each chroma channel may also be referred to as a secondary color channel. CBs may have various sizes and include both square and non-square aspect ratios. The operation of the block partitioner 310 is further described with reference to Figures 13-15. However, in the VVC standard, CBs, CUs, PUs, and TUs always have side lengths that are powers of two. Thus, a current CB, denoted as 312, is output from the block partitioner 310, which proceeds according to iterations for one or more blocks of the CTU according to the luma coding tree and chroma coding tree of the CTU. Options for partitioning a CTU into CBs are further described below with reference to Figures 5 and 6. Although the operation is largely described per CTU, the video encoder 114 and the video decoder 134 may operate on smaller sized regions to reduce memory consumption. For example, each CTU may be partitioned into smaller regions known as "virtual pipeline data units" (VPDUs) of size 64x64.VPDUs form a data granularity that is more suitable for pipelined processing in hardware architectures where the reduced memory footprint reduces silicon area and therefore cost compared to operating on full CTUs.

[0088] The CTUs resulting from the first partition of frame data 113 may be scanned in raster scan order and grouped into one or more "slices." A slice may be an "intra" (or "I") slice. An intra slice (I slice) indicates that all CUs in the slice are intra predicted. A slice may also be unidirectionally or bidirectionally predicted ("P" or "B" slice, respectively), indicating that unidirectional and bidirectional prediction, respectively, are additionally available in the slice.

[0089] In an I slice, the coding tree of each CTU may branch below the 64x64 level into two separate coding trees, one for luma and one for chroma. The use of separate trees allows for different block structures between luma and chroma within the luma 64x64 area of ​​a CTU. For example, a large chroma CB may be colocated with many small luma CBs, or vice versa. In a P or B slice, a single coding tree of a CTU defines a common block structure for luma and chroma. The resulting blocks of the single tree may be intra-predicted or inter-predicted.

[0090] For each CTU, the video encoder 114 operates in two stages. In the first stage (called the "search" stage), the block partitioner 310 tests various potential configurations of the coding tree. Each potential configuration of the coding tree has an associated "candidate" CB. In the first stage, various candidate CBs are tested to select the CB that provides relatively high compression efficiency at relatively low distortion. This testing typically involves Lagrangian optimization, whereby the candidate CBs are evaluated based on a weighted combination of rate (coding cost) and distortion (error relative to the input frame data 113). The "best" candidate CB (the CB with the lowest evaluated rate / distortion) is selected for subsequent encoding into the bitstream 115. Included in the evaluation of the candidate CBs are the options of using the CB for a given area, or of further dividing the area into areas according to various partitioning options and encoding each of the resulting smaller areas with additional CBs, or of further dividing the area. As a result, both the coding tree and the CB are selected in the search stage.

[0091] The video encoder 114 generates a prediction block (PB) for each CB, e.g., CB 312, indicated by arrow 320. The PB 320 is a prediction of the content of the associated CB 312. A subtractor module 322 generates a difference (or "residual", indicating that the difference is in the spatial domain) between the PB 320 and the CB 312, indicated as 324. The difference 324 is the difference in block size between corresponding samples of the PB 320 and the CB 312. The difference 324 is transformed and quantized, and represented as a transform block (TB), indicated by arrow 336. The PB 320 and associated TB 336 are typically selected from one of a number of possible candidate CBs, e.g., based on an estimated cost or distortion.

[0092] A candidate coding block (CB) is a CB obtained by one of the prediction modes available to the video encoder 114 for the associated PB and the resulting residual. When combined with the predicted PB in the video decoder 114, the TB 336 reduces the difference between the decoded CB and the original CB 312 at the cost of additional signaling in the bitstream.

[0093] Each candidate coding block (CB), i.e. a combination of a prediction block (PB) and a transformation block (TB), therefore has an associated coding cost (or "rate") and an associated differential (or "distortion"). The distortion of a CB is estimated as a difference between sample values, e.g., sum of absolute differences (SAD) or sum of squared differences (SSD). The estimates obtained from each candidate PB may be determined by a mode selector 386 using the differentials 324 to determine a prediction mode 387. The prediction mode 387 indicates the decision to use a particular prediction mode, e.g., intra-frame or inter-frame prediction, for the current CB. The estimation of the coding cost associated with each candidate prediction mode and the corresponding residual coding can be performed at a significantly lower cost than entropy coding of the residual. This allows multiple candidate modes to be evaluated to determine the optimal mode in terms of rate-distortion, even in a real-time video encoder.

[0094] Determining the optimal mode from a rate-distortion perspective is typically accomplished using a variation of Lagrangian optimization.

[0095] A Lagrangian or similar optimization process can be employed for both optimal partitioning of the CTUs into CBs (by the block partitioner 310) and for selecting the best prediction mode from multiple possibilities. Application of a Lagrangian optimization process of the candidate modes in the mode selector module 386 selects the intra-prediction mode with the lowest cost measure as the "best" mode. The lowest cost mode is the selected secondary transform index 388, which is also coded into the bitstream 115 by the entropy coder 338.

[0096] In a second stage of operation of the video encoder 114 (called the "encoding" stage), an iteration over the determined coding trees for each CTU is performed in the video encoder 114. For CTUs using separate trees, for each 64x64 luma region of the CTU, the luma coding tree is coded first, followed by the chroma coding tree. Within the luma coding tree, only the luma CB is coded, and within the chroma coding tree, only the chroma CB is coded. For CTUs using a shared tree, a single tree describes the CUs, i.e., the luma CB and the chroma CB, according to the common block structure of the shared tree.

[0097] The entropy coder 338 supports both variable length coding of syntax elements and arithmetic coding of syntax elements. Bitstream parts such as "parameter sets", e.g., sequence parameter set (SPS) and picture parameter set (PPS), use a combination of fixed length codewords and variable length codewords. Slices (also called contiguous parts) have a slice header that uses variable length coding followed by slice data that uses arithmetic coding. The slice header defines parameters specific to the current slice, such as slice-level quantization parameter offsets. The slice data contains syntax elements for each CTU in the slice. The use of variable length coding and arithmetic coding requires sequential parsing within each part of the bitstream. Parts may be separated by start codes and can form "Network Abstraction Layer Units" or "NAL Units". Arithmetic coding is supported using a context-adaptive binary arithmetic coding process. Arithmetic coded syntax elements consist of a sequence of one or more "bins". Bins, like bits, have values ​​of "0" or "1". However, bins are not coded as discrete bits in the bitstream 115. Bins have an associated predicted (or "likely" or "most probable") value and associated probability, known as "context". If the actual bin to be coded matches the predicted value, a "Most Probable Symbol" (MPS) is coded. Coding the Most Probable Symbol is relatively inexpensive in terms of bits consumed in the bitstream 115, and involves a cost equivalent to less than one discrete bit. If the actual bin to be coded mismatches the likely value, a "Less Probable Symbol" (LPS) is coded. Coding the Less Probable Symbol has a relatively high cost in terms of bits consumed. The bin coding technique allows for efficient coding of bins with biased probabilities of "0" and "1". For syntax elements with two possible values ​​(i.e., "flags"), one bin is sufficient. For syntax elements with many possible values, a sequence of bins is required.

[0098] The presence of a later bin in a sequence may also be determined based on the values ​​of preceding bins in the sequence. Furthermore, each bin may be associated with multiple contexts. The selection of a particular context may depend on preceding bins of the syntax element, the values ​​of bins of adjacent syntax elements (i.e., those of adjacent blocks), etc. Each time a context-coded bin is coded, the context (if any) selected for that bin is updated in a manner that reflects the value of the new bin. In this manner, the binary arithmetic coding scheme is said to be adaptive.

[0099] The video encoder 114 also supports bins without context ("bypass bins"). Bypass bins are coded assuming an equiprobable distribution between "0" and "1". Thus, each bin has a coding cost of one bit of the bitstream 115. The absence of context saves memory and reduces complexity. Thus, bypass bins are used when the distribution of values ​​for a particular bin is not skewed. One example of an entropy encoder employing context and adaptation is known in the art as the Context Adaptive Binary Arithmetic Coder (CABAC), and many variations of this encoder have been employed in video coding.

[0100] The entropy coder 338 uses a combination of context coded bins and bypass coded bins to code the quantization parameter 392 and the LFNST index 388, if used for the current CB. The quantization parameter 392 is coded using a "delta QP". The delta QP is signaled at most once in each area called a "quantization group". The quantization parameter 392 is applied to the residual coefficients of the luma CB. The adjusted quantization parameter is applied to the residual coefficients of the co-located chroma CB. The adjusted quantization parameter may include a mapping from the luma quantization parameter 392 according to a mapping table and a CU level offset selected from a list of offsets. The secondary transform index 388 is signaled if the residual associated with the transform block contains significant residual coefficients only at coefficient positions that are subject to transformation to primary coefficients by application of a secondary transform.

[0101] The multiplexer module 384 outputs the PB 320 from the intra-frame prediction module 364 according to the determined best intra-prediction mode selected from the tested prediction modes of each candidate CB. The candidate prediction modes need not include all possible prediction modes supported by the video encoder 114. Intra-prediction is classified into three types: "DC intra-prediction" involves filling the PB with a single value that represents the average of nearby reconstructed samples. "Planar intra-prediction" involves placing samples in the PB according to a plane, where the DC offset and vertical and horizontal gradients are obtained from nearby reconstructed neighboring samples. The nearby reconstructed samples typically include a row of reconstructed samples that are above the current PB and extend to the right of the PB to some extent, and a column of reconstructed samples that are left of the current PB and extend below the PB to some extent. "Angular intra-prediction" involves placing in the PB reconstructed neighboring samples that are filtered and spread across the PB in a particular direction (or "angle"). In VVC, 65 angles are supported, and rectangular blocks can take advantage of additional angles not available in square blocks, making a total of 87 angles. A fourth intra prediction is available for chroma PB, which generates PB from co-located luma reconstructed samples according to the "Cross-Component Linear Model" (CCLM) mode. Three different CCLM modes are available, each of which uses a different model derived from adjacent luma and chroma samples. The resulting model is used to generate a block of chroma PB samples from the co-located luma samples.

[0102] If no previously reconstructed samples are available, such as at the edge of a frame, a halftone default value of half the range of samples is used, e.g., for 10-bit video, a value of 512 is used. For the CB, located in the top left of the frame, there are no previously available samples, so the angular and planar intra prediction modes produce the same output as the DC prediction mode, i.e. a flat plane of samples scaled by the halftone values.

[0103] For inter-frame prediction, a motion compensation module 380 generates a prediction block 382 using samples from one or two frames preceding the current frame in the coding order frames in the bitstream, and outputs it as PB 320 by a multiplexer module 384. Furthermore, for inter-frame prediction, a single coding tree is typically used for both luma and chroma channels. The order of coded frames in the bitstream may differ from the order of frames at capture or display. If one frame is used for prediction, the block is said to be "unidirectionally predicted" and has one motion vector associated with it. If two frames are used for prediction, the block is said to be "bidirectionally predicted" and has two motion vectors associated with it. For P slices, each CU may be intra-predicted or unidirectionally predicted. For B slices, each CU may be intra-predicted, unidirectionally predicted, or bidirectionally predicted. Frames are typically coded using a "group of pictures" structure, allowing for temporal layering of frames. A frame may be divided into multiple slices, each of which codes a portion of the frame. Temporal layering of frames allows frames to reference preceding and following images in the order in which they are to be displayed: images are coded in the order necessary to ensure that dependencies for decoding each frame are met.

[0104] The samples are selected according to the motion vector 378 and the reference picture index. The motion vector 378 and the reference picture index apply to all color channels, and therefore inter prediction is mainly described in terms of operations on PUs rather than PBs, i.e., the decomposition of each CTU into one or more inter predicted blocks is described in a single coding tree. Inter prediction schemes may differ in the number of motion parameters and their precision. The motion parameters usually include a reference frame index indicating which reference frame out of a list of reference frames to use and a spatial transformation of each reference frame, but may also include more frames, extra frames, or complex affine parameters such as scaling and rotation. Furthermore, a pre-determined motion refinement process may be applied to generate a dense motion estimate based on the reference sample block.

[0105] The PB 320 is determined and selected, and subtracted from the original sample block in a subtractor 322, resulting in a residual with the lowest coding cost, represented as 324, which is subjected to lossy compression. The lossy compression process consists of the steps of transformation, quantization, and entropy coding. A forward primary transform module 326 applies a forward transform to the difference 324 to convert it from the spatial domain to the frequency domain, generating primary transform coefficients, represented as arrows 328. The maximum primary transform size in one dimension is either a 32-point DCT-2 or a 64-point DCT-2 transform. If the CB to be coded is larger than the maximum supported primary transform size, represented as a block size, i.e., 64x64 or 32x32, the primary transform 326 is applied in a tiled manner to transform all samples of the difference 324. The application of the transform 326 results in multiple TBs for the CB. When each application of the transform is performed on a TB of the difference 324 that is larger than 32×32, e.g., 64×64, all resulting primary transform coefficients 328 that are outside the top-left 32×32 area of ​​the TB are set to zero, i.e., discarded. The remaining primary transform coefficients 328 are passed to a quantization module 334. The primary transform coefficients 328 are quantized according to a quantization parameter 392 associated with the CB to generate primary transform coefficients 332. The quantization parameter 392 may be different for the luma CB and each chroma CB. The primary transform coefficients 332 are passed to a forward secondary transform module 330, which generates transform coefficients, represented by arrow 336, by performing either a non-separable secondary transform (NSST) operation or by bypassing the secondary transform. The forward primary transform is typically separable, transforming a set of rows of each TB and then a set of columns. Forward primary transform module 326 uses a Type II Discrete Cosine Transform (DCT-2) in the horizontal and vertical directions, bypasses the transform in the horizontal and vertical directions, or uses a combination of a Type VII Discrete Sine Transform (DST-7) and a Type VIII Discrete Cosine Transform (DCT-8) in the horizontal or vertical directions for luma TBs whose width and height do not exceed 16 samples. The VVC standard refers to the combination of DST-7 and DCT-8 as the "Multiple Transform Selection Set" (MTS).

[0106] The forward secondary transform of module 330 is generally a non-separable transform and is applied only to the residual of intra-predicted CUs, and may nevertheless be bypassed. The forward secondary transform is performed on either 16 samples (arranged as a 4×4 sub-block at the top left of the primary transform coefficients 328) or 48 samples (arranged as three 4×4 sub-blocks at the top left of the 8×8 coefficients of the primary transform coefficients 328) to generate a set of secondary transform coefficients. The set of secondary transform coefficients may be fewer in number than the set of primary transform coefficients from which they are derived. In order to apply the secondary transform only to a set of coefficients that are adjacent to each other and that include a DC coefficient, the secondary transform is referred to as a "low frequency non-separable secondary transform" (LFNST). Furthermore, when the LFNST is applied, all remaining coefficients of the TB must be zero, both in the primary transform domain and in the secondary transform domain.

[0107] The quantization parameter 392 is constant for a given TB and thus results in uniform scaling for the generation of residual coefficients in the linear transform domain of the TB. The quantization parameter 392 may vary periodically with a signaled "delta quantization parameter". The delta quantization parameter (delta QP) is signaled only once for the CUs contained within a given area called a "quantization group". If one CU is larger than the size of the quantization group, the delta QP is signaled once for one of the TBs of the CU. That is, the delta QP is signaled by the entropy coder 338 only once for the first quantization group of the CU and not for the quantization groups of subsequent CUs. Non-uniform scaling is also possible by application of a "quantization matrix", whereby the scaling factor applied to each residual coefficient is obtained from a combination of the quantization parameter 392 and the corresponding entry of the scaling matrix. The scaling matrix may have a size smaller than the size of the TB, and when applied to the TB, a nearest neighbor approach is used to provide a scaling value for each residual coefficient from the scaling matrix, which has a size smaller than the size of the TB. The residual coefficients 336 are provided to an entropy coder 338 for encoding in the bitstream 115. Typically, the residual coefficients of each TB having at least one significant residual coefficient of a TU are scanned to generate an ordered list of values ​​according to a scan pattern. The scan pattern generally scans the TB as a sequence of 4×4 "sub-blocks", providing a regular scanning operation with a granularity of 4×4 sets of residual coefficients, the configuration of the sub-blocks depending on the size of the TB. The scan within each sub-block and the progression from one sub-block to the next typically follows a backward diagonal scan pattern. Additionally, the quantization parameter 392 is coded into the bitstream 115 using a delta QP syntax element, and the secondary transform index 388 is coded into the bitstream 115 under conditions described with reference to Figures 13-15.

[0108] As mentioned above, the video encoder 114 needs to access a frame representation that corresponds to the decoded frame representation seen by the video decoder 134. Thus, the residual coefficients 336 are passed to an inverse secondary transform module 344 that operates according to a secondary transform index 388 to generate intermediate inverse transform coefficients represented by arrow 342. The intermediate inverse transform coefficients are inverse quantized by an inverse quantization module 340 according to a quantization parameter 392 to generate inverse transform coefficients represented by arrow 346. The intermediate inverse transform coefficients 346 are passed to an inverse primary transform module 348 to generate residual samples of the TU represented by arrow 350. The type of inverse transform performed by the inverse secondary transform module 344 corresponds to the type of forward transform performed by the forward secondary transform module 330. The type of inverse transform performed by the inverse primary transform module 348 corresponds to the type of primary transform performed by the primary transform module 326. The accumulation module 352 sums the residual samples 350 and the PU 320 to generate reconstructed samples of the CU (indicated by arrow 354).

[0109] The reconstructed samples 354 are passed to a reference sample cache 356 and an in-loop filter module 368. The reference sample cache 356 is typically implemented using static RAM on the ASIC (thus avoiding costly off-chip memory accesses) and provides the minimum sample storage required to satisfy the dependencies for generating intra-frame PBs for subsequent CUs in the frame. The minimum dependencies typically include a "line buffer" of samples along the bottom edge of a row of CTUs for use by the next row of CTUs, and a column buffer of an extent set by the height of the CTU. The reference sample cache 356 provides reference samples (represented by arrow 358) to a reference sample filter 360. The sample filter applies 360 a smoothing operation to generate filtered reference samples (indicated by arrow 362). The filtered reference samples 362 are used by an intra-frame prediction module 364 to generate a block of intra-predicted samples, represented by arrow 366. For each candidate intra-prediction mode, the intra-frame prediction module 364 generates a block of samples, i.e., 366. A block of samples 366 is generated by module 364 using techniques such as DC intra prediction, planar intra prediction, or angular intra prediction.

[0110] The in-loop filter module 368 applies several filtering stages to the reconstructed samples 354. The filtering stages include a "deblocking filter" (DBF), which applies smoothing aligned to CU boundaries to reduce artifacts resulting from discontinuities. Another filtering stage present in the in-loop filter module 368 is an "adaptive loop filter" (ALF), which applies a Wiener-based adaptive filter to further reduce distortion. Another filtering stage present in the in-loop filter module 368 is a "sample adaptive offset" (SAO) filter. The SAO filter operates by first classifying the reconstructed samples into one or more categories and applying an offset at the sample level depending on the assigned category.

[0111] The filtered samples, represented by arrow 370, are output from the in-loop filter module 368. The filtered samples 370 are stored in a frame buffer 372. The frame buffer 372 typically has the capacity to store multiple pictures (e.g., up to 16) and is stored in the memory 206. The frame buffer 372 is typically not stored using on-chip memory due to the large memory consumption required. Therefore, access to the frame buffer 372 is costly in terms of memory bandwidth. The frame buffer 372 provides a reference frame (represented by arrow 374) to a motion estimation module 376 and a motion compensation module 380.

[0112] The motion estimation module 376 estimates a number of "motion vectors" (denoted as 378), each of which is a Cartesian space offset from the position of the current CB, by referring to one block of the reference frame in the frame buffer 372. A filtered block of reference samples (denoted as 382) is generated for each motion vector. The filtered reference samples 382 form further candidate modes available for potential selection by the mode selector 386. Furthermore, for a given CU, the PU 320 may be formed using one reference block ("unidirectional prediction") or two reference blocks ("bidirectional prediction"). For the selected motion vector, the motion compensation module 380 generates the PB 320 according to a filtering process that supports sub-pixel accuracy of the motion vector. In this way, the motion estimation module 376 (operating on the motion vectors of many candidates) may perform a simplified filtering process compared to the filtering process of the motion compensation module 380 (operating on only the selected candidate), thereby achieving reduced computational complexity. When the video encoder 114 selects inter prediction for a CU, a motion vector 378 is encoded into the bitstream 115.

[0113] Although the illustrated video encoder 114 is described with respect to Versatile Video Coding (VVC), other video coding standards or implementations may employ the processing stages of modules 310-390. Also, the frame data 113 (bitstream 115) may be read from (or written to) the memory 206, the hard disk drive 210, a CD-ROM, a Blu-ray Disc, or other computer-readable storage medium. Furthermore, the frame data (113 and bitstream 115) may be received from (or transmitted to) an external source, such as a server or a radio frequency receiver connected to the communication network 220. The communication network 220 may provide limited bandwidth, making it necessary to use rate control in the video encoder 114 to avoid saturating the network when the frame data 113 is difficult to compress. Furthermore, the bitstream 115 may be composed of one or more slices representing spatial sections (a collection of CTUs) of the frame data 113, generated by one or more instances of the video encoder 114 operating cooperatively under the control of the processor 205. In the context of this disclosure, a slice is also referred to as a "contiguous portion" of a bitstream. Slices are contiguous in the bitstream and can be encoded or decoded as separate portions, for example, when parallel processing is used.

[0114] The video decoder 134 is shown in Figure 4. The video decoder 134 of Figure 4 is an example of a Various Video Coding (VVC) video decoding pipeline, although other video codecs may be used to perform the processing steps described herein. As shown in Figure 4, the video decoder 134 receives a bitstream 133 as input. The bitstream 133 may be read from the memory 206, the hard disk drive 210, a CD-ROM, a Blu-ray Disc, or other non-transitory computer readable storage medium. Alternatively, the bitstream 133 may be received from an external source, such as a server or a radio frequency receiver connected to the communication network 220. The bitstream 133 includes encoded syntax elements that represent captured frame data to be decoded.

[0115] This bitstream is input to the entropy decoder module 420 133. The entropy decoder module 420 extracts syntax elements from the bitstream 133 by decoding a sequence of "bins" and passes the values ​​of the syntax elements to other modules of the video decoder 134. The entropy decoder module 420 uses variable and fixed length decoding to decode the SPS, PPS or slice headers and uses an arithmetic decoding engine to decode the syntax elements of the slice data as a sequence of one or more bins. Each bin can use one or more "contexts", which describe the probability levels used to code the "1" and "0" values ​​of that bin. If multiple contexts are available for a bin, a "context modeling" or "context selection" step is performed to select one of the available contexts to decode the bin. The process of decoding the bins forms a sequential feedback loop, so that each slice can be decoded in its entirety by a given entropy decoder 420 instance. A single (or a small number) of high-performance entropy decoder 420 instances may decode all slices for a frame from bitstream 115, or multiple lower-performance entropy decoder 420 instances may simultaneously decode slices for a frame from bitstream 133.

[0116] The entropy decoder module 420 applies an arithmetic coding algorithm, such as "Context Adaptive Binary Arithmetic Coding (CABAC)," to decode syntax elements from the bitstream 133. The decoded syntax elements are used to reconstruct parameters in the video decoder 134. The parameters include residual coefficients (represented by arrow 420), quantization parameters 474, secondary transform indexes 470, and mode selection information (represented by arrow 458), such as intra-prediction modes. The mode selection information also includes motion vectors and information such as partitioning each CTU into one or more CBs. The parameters are typically used in combination with sample data from previously decoded CBs to generate PBs.

[0117] The residual coefficients 424 are passed to an inverse secondary transform module 436 where a secondary transform is applied or no processing is performed (bypassed) according to the methods described with reference to Figures 16-18. The inverse secondary transform module 436 generates reconstructed transform coefficients 432, i.e., primary transform domain coefficients, from the secondary transform domain coefficients. The reconstructed transform coefficients 432 are input to an inverse quantization module 428. The inverse quantization module 428 performs inverse quantization (or "scaling") on the residual coefficients 432, i.e., in the primary transform coefficient domain, to generate reconstructed intermediate transform coefficients, represented by arrows 440, according to a quantization parameter 474. If the use of a non-uniform inverse quantization matrix is ​​indicated in the bitstream 133, the video decoder 134 reads the quantization matrix from the bitstream 133 as a sequence of scaling coefficients and composes the scaling coefficients into a matrix. Inverse scaling uses the quantization matrix in combination with the quantization parameter to create the reconstructed intermediate transform coefficients 440.

[0118] The reconstructed transform coefficients 440 are passed to an inverse linear transform module 444, which transforms the coefficients 440 from the frequency domain back to the spatial domain. The result of the operation of the module 444 is a block of residual samples, represented by arrow 448. The block of residual samples 448 is of equal size to the corresponding CB. The residual samples 448 are provided to an accumulation module 450, where they are added to the decoded PB (represented by 452) to generate a block of reconstructed samples, represented by arrow 456. The reconstructed samples 456 are provided to a reconstructed sample cache 460 and to an in-loop filtering module 488, which generates a reconstructed block of frame samples, represented by arrow 492. The frame samples 492 are written to a frame buffer 496.

[0119] The reconstructed sample cache 460 operates similarly to the reconstructed sample cache 356 of the video encoder 114. The reconstructed sample cache 460 provides storage of reconstructed samples required for intra-predicting subsequent CBs without using the memory 206 (e.g., by using the data 232, which is a typical on-chip memory, instead). Reference samples, represented by arrow 464, are obtained from the reconstructed sample cache 460 and fed to a reference sample filter 468 to generate filtered reference samples, represented by arrow 472. The filtered reference samples 472 are fed to an intra-frame prediction module 476, which generates blocks of intra-predicted samples, represented by arrow 480, according to intra-prediction mode parameters signaled in the bitstream 133 and decoded by the entropy decoder 420. The blocks of samples 480 are generated using modes such as DC intra-prediction, planar intra-prediction, or angular intra-prediction.

[0120] If the prediction mode of the CB is indicated to use intra prediction in the bitstream 133, the intra predicted samples 480 form the decoded PB 452 via the multiplexer module 484. Intra prediction generates a predictive block of samples (PB), i.e., a block of one color component derived using "neighboring samples" of the same color component. Neighboring samples are samples that are adjacent to the current block and have already been reconstructed because they precede it in the block decoding order. If the luma and chroma blocks are collocated, they can use different intra prediction modes. However, the two chroma CBs share the same intra prediction mode.

[0121] If the prediction mode of the CB is indicated to be inter-prediction in the bitstream 133, the motion compensation module 434 uses the motion vector (decoded from the bitstream 133 by the entropy decoder 420) and the reference frame index to select and filter a block of samples 498 from a frame buffer 496 to generate a block of inter-predicted samples represented as 438. The block of samples 498 is obtained from a previously decoded frame stored in the frame buffer 496. For bidirectional prediction, two blocks of samples are generated and blended to generate samples for the decoded PB 452. The frame buffer 496 is provided with the filtered block data 492 from the in-loop filtering module 488. Similar to the in-loop filtering module 368 of the video encoder 114, the in-loop filtering module 488 applies any of the DBF, ALF and SAO filtering operations. In general, the motion vector is applied to both the luma and chroma channels, although the filtering process for sub-sample interpolation in the luma and chroma channels is different.

[0122] 5 is a schematic block diagram illustrating a set of available partitions or partitions 500 for partitioning a region into one or more sub-regions in a versatile video coding tree structure. The partitions shown in set 500 are available to the block partitioner 310 of the encoder 114 to partition each CTU into one or more CUs or CBs according to the coding tree, as determined by Lagrangian optimization, as described with reference to FIG.

[0123] Although set 500 shows that only square regions are partitioned into other, possibly non-square sub-regions, it should be understood that set 500 shows possible partitions from parent nodes of the coding tree to child nodes of the coding tree, and does not require that the parent nodes correspond to square regions. If the containing region is non-square, the dimensions of the blocks resulting from the partition are scaled according to the aspect ratio of the containing block. When a region is not further partitioned, i.e., at the leaf node of the coding tree, a CU will occupy the region.

[0124] The process of subdividing a region into subregions must end when the resulting subregions reach a minimum CU size (typically 4x4 luma samples). In addition to constraining the CU to prohibit block areas smaller than a certain minimum size (e.g., 16 samples), the CU is constrained to have a minimum width or height of 4. Other minimum values ​​for both width and height, or for width or height, are also possible. The process of subdivision may end before the deepest decomposition level, resulting in a CU larger than the minimum CU size. It is also possible that no division is performed and one CU occupies the entire CTU. A single CU occupying the entire CTU is the largest coding unit size available. The use of a subsampled chroma format, such as 4:2:0, allows the video encoder 114 and video decoder 134 configuration to end the division of regions in the chroma channels earlier than the luma channel, including in the case of a shared coding tree that defines the block structure for the luma and chroma channels. When separate coding trees are used for luma and chroma, constraints on the available split operations guarantee a minimum chroma CB area of ​​16 samples, even if the CB is co-located with a larger luma area, e.g., 64 luma samples.

[0125] At the leaf nodes of the coding tree, there are CUs that are not further subdivided. For example, leaf node 510 contains one CU. At the non-leaf nodes of the coding tree, there are two or more further divisions, each of which may be a leaf node forming one CU or a non-leaf node containing further divisions into smaller regions. At each leaf node of the coding tree, there is one coding block per color channel. The division ends at the same depth for both luma and chroma, resulting in three co-located CBs. The division ends at a deeper depth for luma than chroma, resulting in multiple luma CBs being co-located with chroma channel CBs.

[0126] The quadtree partition 512 divides the containing region into four equal-sized regions as shown in the figure. Compared to HEVC, Versatile Video Coding (VVC) achieves further flexibility through additional partitions, including a horizontal bisection 514 and a vertical bisection 516. Each of the partitions 514 and 516 divides the containing region into two equal-sized regions. The partitions are along horizontal boundaries (514) or vertical boundaries (516) within the containing block.

[0127] Further flexibility is provided in versatile video coding by adding a third horizontal division 518 and a third vertical division 520. Third divisions 518 and 520 divide the block into three regions, which are partitioned horizontally (518) or vertically (520) along ¼ and ¾ of the width or height of the containing region. The combination of quad trees, bipartite trees, and ternary trees is called "QTBTTT". The root of the tree contains zero or more quad tree divisions (the "QT" section of the tree). Once the QT section is finished, zero or more bisections or trisections may occur (the "multi-tree" or "MT" section of the tree), eventually terminating with CB or CU at the leaf nodes of the tree. If the tree describes all color channels, then the leaf nodes of the tree are CU. If the tree describes luma or chroma channels, then the leaf nodes of the tree are CB.

[0128] Compared to HEVC, which only supports quad-trees and square blocks, QTBTTT leads to the possibility of larger CU sizes, especially considering the possibility of recursively applying bipartite and / or ternary tree partitions. When only quad-tree partitions are available, increasing the coding tree depth corresponds to a reduction in the CU size to 1 / 4 of the parent area. In VVC, the availability of bipartitions and tripartitions means that the coding tree depth no longer directly matches the CU area. Restricting partitioning options to eliminate partitions where the width or height of a block is less than or not a multiple of 4 samples can reduce the possibility of unusual (non-square) block sizes. Typically, this constraint would be applied taking into account luma samples. However, in the configuration described here, the constraint can be applied to blocks for chroma channels separately. For example, if the frame data is in 4:2:0 chroma format or 4:2:2 chroma format, applying the constraint to the partitioning options for the chroma channels will result in different minimum block sizes for luma and chroma. Each division produces a subregion whose horizontal dimensions are either unchanged, halved, or quartered relative to the containing region, and because the size of a CTU is a power of two, all CTUs have side dimensions that are also powers of two.

[0129] 6 is a schematic flow diagram illustrating a data flow 600 of the QTBTTT (or "coding tree") structure used in versatile video coding. The QTBTTT structure is used for each CTU to define the partitioning of the CTU into one or more CUs. The QTBTTT structure for each CTU is determined by the block partitioner 310 in the video encoder 114 and is encoded into the bitstream 115 or decoded from the bitstream 133 by the entropy decoder 420 in the video decoder 134. The data flow 600 further characterizes the permissible combinations available to the block partitioner 310 to partition the CTU into one or more CUs according to the partitioning shown in FIG. 5.

[0130] Starting from the top level of the hierarchy, i.e., in the CTU, zero or more quad-tree splits are first performed. Specifically, a quad-tree (QT) split decision 610 is performed by the block partitioner 310. This decision at 610 returning a symbol of "1" indicates a decision to split the current node into four subnodes according to the quad-tree split 512. This results in four new nodes being generated, as at 620, and a recursive return to the QT split decision 610 for each new node. Each new node is considered in raster (or Z-scan) order. Alternatively, if the QT split decision 610 indicates that no further splits should be made (returning a "0" symbol), the quad-tree split is discontinued and a multi-tree (MT) split is subsequently considered.

[0131] First, an MT split decision 612 is made by the block partitioner 310. At 612, a decision to perform MT split is indicated. Returning a "0" symbol at decision 612 indicates that no further splitting of the node into subnodes is to be performed. If no further splitting of the node is to be performed, then the node is a leaf node of the coding tree and corresponds to a CU. The leaf node is output at 622. Alternatively, if MT split 612 indicates a decision to perform MT split (returning a "1" symbol), then the block partitioner 310 proceeds to direction decision 614.

[0132] Orientation decision 614 indicates the orientation of the MT partition as either horizontal ("H" or "0") or vertical ("V" or "1"). The block partitioner 310 proceeds to decision 616 if decision 614 returns a "0" indicating a horizontal orientation. The block partitioner 310 proceeds to decision 618 if decision 614 returns a "1" indicating a vertical orientation.

[0133] In each of decisions 616, 618, the number of divisions in the MT division is indicated as either two (bisection or "BT" node) or three (trisection or "TT") in the BT / TT division. That is, if the indicated direction from 614 is horizontal, then a BT / TT division decision 616 is made by block partitioner 310, and if the indicated direction from 614 is vertical, then a BT / TT division decision 618 is made by block partitioner 310.

[0134] The BT / TT split decision 616 indicates whether the horizontal split is a bisection 514 (indicated by returning a "0") or a trisection 518 (indicated by returning a "1"). If the BT / TT split decision 616 indicates a bisection, then in an HBT CTU node generation step 625, two nodes are generated by the block partitioner 310 in accordance with the horizontal bisection 514. When the BT / TT split 616 indicates a trisection, then in an HTT CTU node generation step 626, three nodes are generated by the block partitioner 310 in accordance with the horizontal trisection 518.

[0135] BT / TT split decision 618 indicates whether the vertical split is a bisection 516 (indicated by returning "0") or a trisection 520 (indicated by returning "1"). When BT / TT split 618 indicates a bisection, two nodes are generated by block partitioner 310 according to vertical bisection 516 in VBT CTU node generation step 627. When BT / TT split 618 indicates a trisection, three nodes are generated by block partitioner 310 according to vertical trisection 520 in VTT CTU node generation step 628. For each node resulting from steps 625-628, data flow 600 is applied recursively back to MT split decision 612 in a left-to-right or top-to-bottom order depending on direction 614. As a result, bisection tree and trisection tree splits can be applied to generate CUs with various sizes.

[0136] Figures 7A and 7B provide an example partition 700 for partitioning a CTU 710 into multiple CUs or CBs. An example CU 712 is shown in Figure 7A. Figure 7A shows the spatial organization of CUs in the CTU 710. The example partition 700 is also shown as a coding tree 720 in Figure 7B.

[0137] For each non-leaf node of the CTU 710 in FIG. 7A, e.g., nodes 714, 716, 718, the contained nodes (which may be further split or may be CUs) are scanned or traversed in "Z-order" to create a list of nodes represented as columns of the coding tree 720. In the case of a quad-tree split, the Z-order scan is performed from top-left to right and bottom-left to right. For horizontal and vertical splits, the Z-order scan (traversal) is simplified to a top-down scan and a left-right scan, respectively. The coding tree 720 in FIG. 7B lists all nodes and CUs according to the applied scan order. Each split generates a list of two, three, or four new nodes at the next level of the tree until a leaf node (CU) is reached.

[0138] As described with reference to Figure 3, after decomposing an image into CTUs and further decomposing them into CUs by block partitioner 310 and using the CUs to generate respective residual blocks (324), the residual blocks are subjected to forward transformation and quantization by video encoder 114. The resulting TBs 336 are scanned to form a sequential list of residual coefficients as part of the operation of entropy encoding module 338. A comparable process is performed in video decoder 134 to obtain the TBs from bitstream 133.

[0139] 8A, 8B, and 8C show the refinement levels resulting from the coding tree splitting and the corresponding effect on the division of coding tree units into quantization groups. Delta QP (392) is signaled together with the TB residuals at most once per quantization group. In HEVC, the definition of a quantization group corresponds to the coding tree depth since the definition leads to an area of ​​fixed size. In VVC, additional splitting means that the coding tree depth is no longer a good proxy for the CTU area. In VVC, "refinement levels" are defined, with each increment corresponding to halving the area involved.

[0140] FIG. 8A shows a set 800 of partitions of a coding tree and the corresponding refinement levels. At the root node of the coding tree, the refinement level is initialized to zero. If the coding tree contains a quaternary tree partition (e.g., 810), the refinement level is increased by two for all CUs contained therein. If the coding tree contains a bipartition (e.g., 812), the refinement level is increased by one for all CUs contained therein. If the coding tree contains a tripartite partition (e.g., 814), the refinement level is increased by two for the two outer CUs and by one for the inner CU resulting from the tripartite partition. Once the coding tree of each CTU is traversed, the resulting refinement level of each CU is determined according to the set 800, as described with reference to FIG. 6.

[0141] FIG. 8B illustrates an example set of CU nodes 840 to illustrate the effect of splitting. An example parent node 820 of the set 840 with zero subdivision levels corresponds to a CTU of size 64×64 in the example of FIG. 8B. The parent node 820 is trisected to generate three child nodes 821, 822, and 823 with sizes of 16×64, 32×64, and 16×64, respectively. The child nodes 821, 822, and 823 have subdivision levels of 2, 1, and 2, respectively.

[0142] In the example of FIG. 8B, the quantization group threshold is set to 1, which corresponds to half of the 64×64 area, i.e., an area of ​​2048 samples. A flag tracks the start of a new QG. The flag tracking a new QG is reset for nodes whose subdivision level is equal to or less than the quantization group threshold. The flag is set when traversing a parent node 820, which has a subdivision level of zero. The center CU 822 of size 32×64 has an area of ​​2048 samples, but the two sibling CUs 821 and 823 have a subdivision level of 2, i.e., an area of ​​1024, so the flag is not reset when traversing the center CU, and the quantization group does not start at the center CU. Instead, the flag starts at the parent node, as shown at 824, similar to the first flag reset. Effectively, the QP may only be changed on boundaries that are aligned with multiples of the quantization group area. The delta QP is signaled together with the residual of the TB associated with the CB. If there are no significant coefficients, there is no opportunity to code the delta QP.

[0143] FIG. 8C shows an example 860 of a division of a CTU 862 into multiple CUs and QGs to explain the relationship between the subdivision level, the QG, and the signaling of delta QP. A vertical bisection divides the CTU 862 into two, with the left half 870 containing one CU CU0 and the right half 872 containing several CUs (CU1-CU4). In the example of FIG. 8C, the quantization group threshold is set to 2, so that the quantization group has an area that is typically equal to ¼ of the area of ​​the CTU. Since the parent node, i.e., the root node of the coding tree, has a subdivision level of zero, the QG flag is reset and a new QG will start with the next coded CU, i.e., the CU at arrow 868. Since CU0 (870) has coded coefficients, the delta QP 864 is coded along with the residual for CU0. A horizontal bisection is performed on the right half 872, and further division is performed on the upper and lower sections of the right half 872, resulting in CU1-CU4. The coding tree nodes corresponding to the upper (877 including CU1 and CU2) and lower (878 including CU3 and CU4) sections of the right half 872 have a subdivision level of 2. Since a subdivision level of 2 is equal to the quantization group threshold of 2, a new QG starts in each section, marked 874 and 876, respectively. CU1 has no coded coefficients (no residual) and CU2 is a "skipped" CU that also has no coded coefficients. Therefore, no delta QP is coded for the upper section. Since CU3 is a skipped CU and CU4 has coded residual, a delta QP 866 is coded for the QG including CU3 and CU4 along with the residual for CU4.

[0144] 9A and 9B show the scan pattern of a 4×4 transform block and associated primary and secondary transform coefficients. The operation of the secondary transform module 330 on the primary residual coefficients is described for the video encoder 114. The 4×4 TB 900 is scanned according to a backward diagonal scan pattern 910. The scan pattern 910 proceeds from the "last significant coefficient" position back towards the DC (top left) coefficient position. All coefficient positions that are not scanned, e.g., residual coefficients located after the last significant coefficient position, are implicitly non-significant when considering a forward scan. When a secondary transform is used, all remaining coefficients are non-significant. That is, all secondary domain residual coefficients that are not subject to the secondary transform are non-significant, and all primary domain residual coefficients that are not located by the application of the secondary transform are required to be non-significant. Furthermore, after the application of the forward secondary transform by the module 330, there may be a smaller number of secondary transformed coefficients than the number of primary transformed coefficients processed by the secondary transform module 330. For example, FIG. 9B shows a set 920 of blocks. In FIG. 9B, the 16 primary coefficients are arranged as one 4×4 sub-block, which is 924 of the 4×4 TB 920. The primary residual coefficients may be subjected to a secondary transform to generate a secondary transformed block 926 in the example of FIG. 9B. The secondary transformed block 926 includes eight secondary transformed coefficients 928. The eight secondary transformed coefficients 928 are stored in the TB according to the scan pattern 910, starting from the DC coefficient position. The remaining coefficient positions of the 4×4 sub-block, shown as area 930, include the quantized residual coefficients from the primary transform, and are required to be all insignificant for the secondary transform to be applied. Thus, the final significant coefficient position of the 4×4 TB specifying a coefficient that is one of the first eight scan positions of the TB 920 indicates either (i) the application of the secondary transform, or (ii) that the output of the primary transform after quantization does not have significant coefficients beyond the eighth scan position of the TB 920.

[0145] If a secondary transform can be performed on the TB, a secondary transform index, i.e., 388, is coded to indicate the application of a possible secondary transform. The secondary transform index may also indicate which kernel is applied as the secondary transform in module 330 if multiple transform kernels are available. Correspondingly, the video decoder 134 decodes the secondary transform index 470 when the last significant coefficient position is located at any one of the scan positions reserved for holding secondary transformed coefficients, e.g., 928.

[0146] Although a secondary transform kernel that maps 16 primary coefficients to 8 secondary coefficients has been described, different kernels are possible, including kernels that map to a different number of secondary transform coefficients. The number of secondary transform coefficients may be the same as the number of primary transform coefficients, e.g., 16. For a TB with a width greater than 4 and a height greater than 4, the operations described for the 4×4 TB case are applied to the most significant sub-block of the TB. The other sub-blocks of the TB have zero-valued residual coefficients when the secondary transform is applied. For a TB with a width greater than 4 and a height equal to 4, the operations described for the 4×4 TB case are applied to the leftmost sub-block of the TB, and the other sub-blocks of the TB have zero-valued residual coefficients, allowing the last significant coefficient position to be used to determine whether a secondary transform index needs to be decoded.

[0147] 9C and 9D show examples of 8×8 transform block scan patterns and associated primary and secondary transform coefficients. FIG. 9C shows a 4×4 sub-block based back diagonal scan pattern 950 for an 8×8 TB 940. The 8×8 TB 940 is scanned with a 4×4 sub-block based back diagonal scan pattern 950. FIG. 9D shows a set 960 showing the effect of the operation of a secondary transform. The scan 950 proceeds from the last significant coefficient position back to the DC (top left) coefficient position. Application of a forward secondary transform kernel to the 48 primary coefficients shown as area 962 of 940 is possible if the remaining 16 primary coefficients shown as 964 are zero-valued. Applying the secondary transform to this area 962 results in 16 secondary transformed coefficients shown as 966. The other coefficient positions of the TB are zero-valued and shown as 968. If the last significant position of the 88×TB 940 indicates that a secondary transformed coefficient is within 966, then the secondary transform index 388 is coded to indicate application of a particular transform kernel (or bypass of the kernel) by module 330. Video decoder 134 uses the last significant position of the TB to determine whether to decode the secondary transform index, i.e., index 470. For transform blocks that are greater than 8 samples in width or height, the approach of Figures 9C and 9D is applied to the top left 8×8 region, i.e., the top left 2×2 sub-block of the TB.

[0148] As described in Fig. 9A-9D, two sizes of secondary transform kernels are available. One size of secondary transform kernel is for transform blocks with width or height of 4, and another size of secondary transform is for transform blocks with width and height larger than 4. Within each size of kernel, multiple sets (e.g., four) of secondary transform kernels are available. A set is selected based on the intra prediction mode of the block, which may be different between luma and chroma blocks. Within the selected set, one or two kernels are available. The use of one kernel in the selected set or bypass of the secondary transform is signaled via the secondary transform index independently for luma and chroma blocks in the coding unit belonging to the shared tree of the coding tree unit. That is, the index used for the luma channel and the index used for the chroma channel are independent of each other.

[0149] Figure 10 illustrates a set 1000 of transform blocks available in the Versatile Video Coding (VVC) standard. Figure 10 also illustrates the application of a secondary transform to a subset of residual coefficients from the transform blocks of the set 1000. Figure 10 illustrates TBs ranging in width and height from 4 to 32. However, TBs of width and height of 64 are also possible but are not shown for ease of reference.

[0150] A 16-point secondary transform 1052 (shown in darker shading) is applied to a set of 4x4 coefficients. The 16-point secondary transform 1052 is applied to TBs with a width or height of 4, e.g., 4x4 TB 1010, 8x4 TB 1012, 16x4 TB 1014, 32x4 TB 1016, 4x8 TB 1020, 4x16 TB 1030, and 4x32 TB 1040. If a 64-point primary transform is available, the 16-point secondary transform 1052 is applied to TBs of size 4x64 and 64x4 (not shown in FIG. 10). For TBs with a width or height of 4 but with 16 or more primary coefficients, the 16-point secondary transform is only applied to the top left 4x4 sub-block of the TB, and other sub-blocks are required to have zero-valued coefficients in order for the secondary transform to be applied. In general, applying the 16-point secondary transform results in 16 secondary transform coefficients. These secondary transform coefficients are packed into a TB for encoding into the sub-block from which the original 16 primary transform coefficients were derived. The secondary transform kernel may generate a number of secondary transform coefficients that is less than the number of primary transform coefficients to which the secondary transform was applied, for example as described with reference to FIG. 9B.

[0151] For transform sizes with width and height greater than 4, a 48-point secondary transform 1050 (shown in lighter shading) is available to apply to three 4×4 sub-blocks of residual coefficients in the top left 8×8 region of the transform block, as shown in Figure 10. The 48-point secondary transform 1050 is applied to 8×8 transform block 1022, 16×8 transform block 1024, 32×8 transform block 1026, 8×16 transform block 1032, 16×16 transform block 1034, 32×16 transform block 1036, 8×32 transform block 1042, 16×32 transform block 1044, and 32×32 transform block 1046, in the regions shown in each case in lighter shading and dashed outline. If a 64-point primary transform is available, a 48-point secondary transform 1050 can also be applied to TBs of size 8x64, 16x64, 32x64, 64x64, 64x32, 64x16, 64x8 (not shown). Applying a 48-point secondary transform kernel will generally generate fewer than 48 secondary transform coefficients. For example, 8 or 16 secondary transform coefficients may be generated. The secondary transform coefficients are stored in a transform block in the top left region, for example, in FIG. 9D, 8 secondary transform coefficients are shown. Primary transform coefficients that are not subject to the secondary transform ("primary-only coefficients"), for example, coefficient 1066 of TB 1034 (similar to 964 in FIG. 9D), are required to be zero-valued in order for the secondary transform to be applied. After applying the 48-point secondary transform 1050 in the forward direction, the region that may contain significant coefficients is reduced from 48 coefficients to 16 coefficients, further reducing the number of coefficient positions that may contain significant coefficients. For example, 968 will contain only insignificant coefficients. For the inverse secondary transform, the decoded significant coefficients, e.g., present only in TB 966, are transformed to generate coefficients in a region, e.g., 962, any of which may be significant, which then undergo an inverse primary transform. When the secondary transform reduces one or more sub-blocks to a set of 16 secondary transform coefficients, only the top left 4x4 sub-block may contain significant coefficients. The last significant coefficient position, which is at any coefficient position where secondary transform coefficients may be stored, indicates whether a secondary transform or only a primary transform has been applied.However, after quantization, the resulting significant coefficients are in the same region as when the quadratic transformation kernel is applied.

[0152] If the last significant coefficient position indicates a secondary transform coefficient position in the TB (e.g., 922 or 962), a signaled secondary transform index is needed to distinguish whether to apply a secondary transform kernel or bypass the secondary transform. Although the application of the secondary transform to TBs of various sizes has been described in FIG. 10 from the perspective of the video encoder 114, a corresponding inverse process is performed in the video decoder 134. The video decoder 134 first decodes the last significant coefficient position. If the decoded last significant coefficient position indicates the possibility of applying a secondary transform, i.e., the position is in 928 or 966 for secondary transform kernels generating 8 or 16 secondary transform coefficients, respectively, the secondary transform index is decoded to determine whether to apply or bypass the inverse secondary transform.

[0153] Fig. 11 shows a syntax structure 1100 of a bitstream 1101 having multiple slices. Each slice includes multiple coding units. The bitstream 1101 may be generated by the video encoder 114, e.g. as bitstream 115, or may be parsed by the video decoder 134, e.g. as bitstream 133. The bitstream 1101 is partitioned into parts, e.g. Network Abstraction Layer (NAL) units, where the partitioning is achieved by preceding each NAL unit with a NAL unit header, e.g. 1108. A sequence parameter set (SPS) 1110 defines sequence-level parameters, such as the profile (set of tools), chroma format, sample bit depth, and frame resolution, used for encoding and decoding the bitstream. Also included in the set 1110 are parameters that constrain the application of different types of partitioning in the coding tree of each CTU. The encoding of parameters that constrain the type of partitioning can be optimized to a more compact representation, for example by using a log2 basis for block size constraints and expressing the parameters relative to other parameters such as the minimum CTU size. Some parameters encoded in SPS1110 are: log2_ctu_size_minus5: Specifies the CTU size, coded values ​​0, 1, and 2 specify CTU sizes of 32x32, 64x64, and 128x128, respectively. partition_constraints_override_enabled_flag: Enables the ability to apply slice-level overrides for several parameters collectively known as partition constraint parameters 1130. log2_min_luma_coding_block_size_minus2: Specifies the minimum coding block size (luma samples), values ​​0, 1, 2, … specify the minimum luma CB size of 4x4, 8x8, 16x16, …. The maximum coded value is constrained by the specified CTU size, i.e. log2_min_luma_coding_block_size_minus2≦log2_ctu_size_minus5 + 3. The usable chroma block dimensions correspond to the usable luma block dimensions scaled according to the chroma channel subsampling of the chroma format in use. sps_max_mtt_hierarchy_depth_inter_slice: For an inter (P or B) slice, specifies the maximum hierarchical depth of coding units in the coding tree for multi-tree type splits (i.e., bisection and trisection) relative to a quadtree node of the coding tree (i.e., where the quadtree split stops in the coding tree), and is one of the parameters 1130. sps_max_mtt_hierarchy_depth_intra_slice_luma: For an intra (I) slice, specifies the maximum hierarchical depth of coding units in the coding tree for multi-tree type splits (i.e., bisection and trisection) relative to a quadtree node of the coding tree (i.e., where the quadtree split stops in the coding tree), and is one of the parameters 1130. · partition_constraints_override_flag: This parameter is signaled in the slice header when partition_constraints_override_enabled_flag of the SPS is 1, indicating that the partition constraints signaled in the SPS are overridden for the corresponding slice.

[0154] The Picture Parameter Set (PPS) 1112 defines a set of parameters applicable to zero or more frames. The parameters included in the PPS 1112 include parameters for dividing a frame into one or more "tiles" and / or "bricks". The PPS 1112 parameters may also include a list of CU chroma QP offsets, one of which may be applied at the CU level to derive the quantization parameters to use for a chroma block from the quantization parameters of the co-located luma CB.

[0155] A set of slices that form a picture is known as an access unit (AU), such as AU 0 1114. AU 0 1114 contains three slices, such as slices 0 through 2. Slice 1 is marked as 1116. Like the other slices, slice 1 (1116) contains a slice header 1118 and slice data 1120.

[0156] The slice header contains parameters grouped as 1134. Group 1134 contains the following: slice_max_mtt_hierarchy_depth_luma: Signaled in slice header 1118 when partition_constraints_override_flag in the slice header is 1, overriding the value obtained from SPS. For I slices, instead of using sps_max_mtt_hierarchy_depth_intra_slice_luma, slice_max_mtt_hierarchy_depth_luma is used to set MaxMttDepth 1134. For P or B slices, instead of using sps_max_mtt_hierarchy_depth_inter_slice, slice_max_mtt_hierarchy_depth_luma is used. The variable MinQtLog2SizeIntraY (not shown) is derived from the syntax element sps_log2_diff_min_qt_min_cb_intra_slice_luma decoded from SPS 1110 and specifies the minimum coded block size resulting from zero or more quad tree splits (i.e., no further MTT splits have occurred in the coding tree) for an I slice. The variable MinQtLog2SizeInterY (not shown) is derived from the syntax element sps_log2_diff_min_qt_min_cb_inter_slice decoded from SPS 1110. The variable MinQtLog2SizeInterY specifies the minimum coded block size resulting from zero or more quad tree splits (i.e., no further MTT splits have occurred in the coding tree) for P and B slices. Since the CUs resulting from the quadtree division are square, the variables MinQtLog2SizeIntraY and MinQtLog2SizeInterY specify their width and height (as the log2 of the CU's width / height), respectively.

[0157] The parameter cu_qp_delta_subdiv may be optionally signaled in the slice header 1118 and indicates the maximum subdivision level at which delta QP is signaled in the luma branch of the coding tree or another tree slice for the shared tree. For an I slice, the range of cu_qp_delta_subdiv is 0 to 2×(log2_ctu_size_minus5 + 5 − MinQtLog2SizeIntraY + MaxMttDepthY 1134. For a P or B slice, the range of cu_qp_delta_subdiv is 0 to 2×(log2_ctu_size_minus5 + 5 − MinQtLog2SizeInterY + MaxMttDepthY 1134. There is no analytical problem since the range of cu_qp_delta_subdiv depends on the value MaxMttDepthY 1134 derived from the partition constraint obtained from the SPS 1110 or the slice header 1118.

[0158] The parameter cu_chroma_qp_offset_subdiv may optionally be signaled in the slice header 1118 and indicates the maximum subdivision level at which a chroma CU QP offset is signaled in the chroma branch of the shared tree or another tree slice. The range constraint of cu_chroma_qp_offset_subdiv for an I or P / B slice is the same as the corresponding range constraint for cu_qp_delta_subdiv.

[0159] A subdivision level 1136 is derived for the CTUs in the slice 1120 and is specified as cu_qp_delta_subdiv for luma CB and cu_chroma_qp_offset_subdiv for chroma CB. The subdivision level is used to establish the point at which the CTU delta QP syntax element is coded, as described with reference to Figures 8A-C. For chroma CB, the enablement (and index, if enabled) of the chroma CU-level offset is also signaled using the approach of Figures 8A-C.

[0160] 12 shows a syntax structure 1200 for slice data 1120 of bitstream 1101 (e.g., 115 or 133) having a shared tree for luma and chroma coding blocks of coding tree units such as CTU 1210. CTU 1210 includes one or more CUs, an example of which is shown as CU 1214. CU 1214 includes a signaled prediction mode 1216a followed by a transform tree 1216b. If the size of CU 1214 does not exceed the maximum transform size (either 32x32 or 64x64), then transform tree 1216b includes one transform unit, shown as TU 1218.

[0161] If the prediction mode 1216a indicates the use of intra prediction for the CU 1214, a luma intra prediction mode and a chroma intra prediction mode are specified. Also, for the luma CB of the CU 1214, the primary transform type is also signaled as either (i) horizontal and vertical DCT-2, (ii) horizontal and vertical transform skip, or (iii) a combination of horizontal and vertical DST-7 and DCT-8. If the signaled luma transform type is horizontal and vertical DCT-2 (option (i)), an additional luma secondary transform type 1220, also known as a "low frequency non-separable transform" (LFNST) index, is signaled in the bitstream, in the conditions described with reference to Figures 9A-D. A chroma secondary transform type 1221 is also signaled. The chroma secondary transform type 1221 is signaled independently of whether the luma primary transform type is DCT-2 or not.

[0162] Using a shared coding tree, the TU 1218 will contain a TB for each color channel, denoted as luma TB Y 1222, first chroma TB Cb 1224, and second chroma TB Cr 1226. An encoding mode is available in which a single chroma TB is transmitted to specify the chroma residual for both the Cb and Cr channels, known as the "joint CbCr" encoding mode. When the joint CbCr encoding mode is enabled, a single chroma TB is encoded.

[0163] Regardless of the color channel, each TB includes a final position 1228. The final position 1228 indicates the final significant residual coefficient position of the TB when considering the coefficients of the diagonal scan pattern used to serialize the array of coefficients of the TB in a forward direction (i.e., proceeding from the DC coefficient). If the final position 1228 of the TB indicates that only coefficients in the secondary transform domain are significant, i.e., all remaining coefficients will be subject to only the primary transform, then a secondary transform index is signaled to specify whether or not to apply a secondary transform.

[0164] In case a secondary transform is applied and multiple secondary transform kernels are available, the secondary transform index indicates which kernel is selected. Typically, one kernel is available or two kernels are available in a "candidate set". The candidate set is determined from the intra prediction mode of the block. Typically, there are four candidate sets, but there may be fewer candidate sets. As mentioned above, the use of secondary transform for luma and chroma, and the kernel selected accordingly, depends on the intra prediction mode of the luma and chroma channels, respectively. The kernel also depends on the block size of the corresponding luma and chroma TB. The kernel selected for chroma also depends on the chroma subsampling ratio of the bitstream. If there is only one kernel, the signaling is limited to applying or not applying the secondary transform (index ranges from 0 to 1). If two kernels are available, the value of the index is 0 (not apply), 1 (apply first kernel), or 2 (apply second kernel). For chroma, the same secondary transform kernel is applied to each chroma channel, and therefore the residuals of the Cb block 1224 and the Cr block 1226 need to contain only significant coefficients at positions subject to the secondary transform, as explained with reference to Figures 9A-D. If joint CbCr coding is used, the requirement to contain only significant coefficients at positions subject to the secondary transform only applies to single-coded chroma TBs, since the resulting Cb and Cr residuals contain only significant coefficients at positions corresponding to significant coefficients in the jointly coded TBs. If the applicable color channel of a given secondary index is described by a single TB (a single final position, e.g. 1228), i.e., if luma always requires only one TB and chroma requires one TB when joint CbCr coding is used, the secondary transform index may be coded immediately after coding the final position, rather than after the TU, i.e., coded as index 1230 instead of 1220 (or 1221).By signaling the secondary transform early in the bitstream, the video decoder 134 can begin applying the secondary transform as each residual coefficient of the residual coefficients 1232 is decoded, thereby reducing the latency of the system 100.

[0165] In the configuration of the video encoder 114 and the video decoder 134, if joint CbCr coding is not used, a separate secondary transform index is signaled for each chroma TB, i.e., 1224 and 1226, resulting in independent control of the secondary transform for each color channel. If each TB is controlled independently, the secondary transform index of each TB may be signaled immediately after the last position of the corresponding TB for luma and for chroma (with or without the application of joint CbCr mode).

[0166] FIG. 13 shows a method 1300 for encoding frame data 113 into a bitstream 115, the bitstream 115 comprising one or more slices as a sequence of coding tree units. The method 1300 may be implemented by an apparatus such as an FPGA, an ASIC, or an ASSP configured. Furthermore, the method 1300 may be executed by the video encoder 114 under execution of the processor 205. For the workload of encoding a frame, the steps of the method 1300 may be executed on different processors, such that different slices are encoded by different processors, for example using modern multi-core processors, to share the workload. Furthermore, when encoding each portion (slice) of the bitstream 115, the partitioning constraints and the definition of the quantization groups may be different for each slice, as may be considered beneficial for rate control purposes. For further flexibility in encoding the residual of each coding unit, not only the subdivision level of the quantization groups may vary from slice to slice, but also the application of the secondary transform is independently controllable for luma and chroma. As such, the method 1300 may be stored in a computer-readable storage medium and / or in the memory 206 .

[0167] The method 1300 begins with an SPS / PPS encoding step 1310. In step 1310, the video encoder 114 encodes the SPS 1110 and the PPS 1112 as a sequence of fixed-length and variable-length coded parameters into the bitstream 115. A partition_constraints_override_enabled_flag is encoded as part of the SPS 1110 to indicate that the partition constraints can be overridden in the slice header (1118) of each slice (e.g., 1116). Default partition constraints are also encoded as part of the SPS 1110 by the video encoder 114.

[0168] From step 1310, the method 1300 continues with step 1320 of dividing the frame into slices. In performing step 1320, the processor 205 divides the frame data 113 into one or more slices or consecutive portions. If parallelism is desired, a separate instance of the video encoder 114 encodes each slice somewhat independently. A single video encoder 114 may process each slice sequentially, or some intermediate degree of parallelism may be implemented. Typically, the division of a frame into slices (consecutive portions) is aligned with the boundaries of a division of the frame into regions known as "sub-pictures" or tiles, or the like.

[0169] From step 1320, the method 1300 continues with a slice header encoding step 1330. In step 1330, the entropy encoder 338 encodes the slice header 1118 into the bitstream 115. An example implementation of step 1330 is provided below with reference to FIG.

[0170] From step 1330, the method 1300 continues with step 1340 of dividing the slice into CTUs. In performing step 1340, the video encoder 114 divides the slice 1116 into a sequence of CTUs. Slice boundaries are aligned to CTU boundaries, and the CTUs within the slice are ordered according to a CTU scan order, typically a raster scan order. The division of the slice into CTUs establishes which portions of the frame data 113 are processed by the video encoder 113 in encoding the current slice.

[0171] From step 1340, the method 1300 continues with a coding tree determination step 1350. In step 1350, the video encoder 114 determines a coding tree for the currently selected CTU in the slice. The method 1300 starts with the first CTU in the slice 1116 in the first invocation of step 1350 and progresses to subsequent CTUs in the slice 1116 in subsequent invocations. In determining the coding tree for the CTU, various combinations of quad trees, binary trees, and ternary trees are generated and tested by the block partitioner 310.

[0172] From step 1350, the method 1300 continues with step 1360 of determining a coding unit. In step 1360, the video encoder 114 performs, using known methods, to determine the "optimal" coding for the CU resulting from the various coding trees under evaluation. Determining the optimal coding includes determining a prediction mode (e.g., intra prediction with a particular mode or inter prediction with motion vectors), a transform selection (primary transform type and optionally secondary transform type). If the primary transform type of the luma TB is determined to be DCT-2, or if the quantized primary transform coefficients not subject to a forward secondary transform are significant, the secondary transform index of the luma TB may indicate application of the secondary transform. Otherwise, the secondary transform index for the luma indicates bypass of the secondary transform. For the luma channel, the primary transform type is determined to be one of DCT-2, transform skip, or MTS options for the chroma channels, with DCT-2 being the available transform type. The determination of the secondary transform type is further described with reference to Figures 19A and 19B. The coding decision may also include determining the quantization parameters where the QP can be changed, i.e., at the boundaries of the quantization groups. In determining the individual coding units, the optimal coding tree is also jointly determined. If the coding unit is coded using intra prediction, the luma intra prediction mode and the chroma intra prediction mode are determined.

[0173] The coding unit determination step 1360 may prohibit testing the application of a secondary transform if there are no "AC" (coefficients at any location other than the top-left position of the transform block) residual coefficients in the primary domain residual resulting from the application of the DCT-2 primary transform. Coding gain is seen when the application of a secondary transform is tested on a transform block containing only DC coefficients (the final position indicates that only the top-left coefficient of the transform block is significant). The prohibition of testing a secondary transform when only a DC primary coefficient is present extends to the block to which the secondary transform index is applied, i.e., Y, Cb, and Cr for the shared tree (only the Y channel if the Cb and Cr blocks are 2 samples wide or high), if a single index is coded. Even though a residual with only a DC coefficient has a lower coding cost compared to a residual with at least one AC coefficient, applying the secondary transform even to a residual with only a significant DC coefficient further reduces the magnitude of the final coded DC coefficient. Even after further quantization and / or rounding before coding, the other (AC) coefficients do not have sufficient magnitude after the secondary transform, leading to significant coded residual coefficients in the bitstream. Provided that there is at least one significant primary coefficient in the coding tree, either the shared tree or a separate tree, within the range of application of the secondary transform index, even if only the DC coefficient(s) of the respective transform block, the video encoder 114 tests for the selection of a non-zero secondary transform index value (i.e., for the application of a secondary transform).

[0174] From step 1360, the method 1300 continues with a coding unit encoding step 1370. In step 1370, the video encoder 114 encodes the determined coding unit of step 1360 into the bitstream 115. An example of how a coding unit is encoded is described in more detail with reference to FIG.

[0175] Method 1300 continues from step 1370 to a last coding unit test step 1380. In step 1380, processor 205 tests whether the current coding unit is the last coding unit of the CTU. If not ("NO" at step 1380), control in processor 205 passes to coding unit determination step 1360. Otherwise, if the current coding unit is the last coding unit ("YES" at step 1380), control in processor 205 passes to last CTU test step 1390.

[0176] In a last CTU test step 1390, the processor 205 tests whether the current CTU is the last CTU in the slice 1116. If it is not the last CTU in the slice 1116, control in the processor 205 returns to the determine coding tree step 1350. Otherwise, if the current CTU is the last one ("YES" at step 1390), control in the processor proceeds to a last slice test step 13100.

[0177] In a last slice test step 13100, the processor 205 tests whether the current slice being coded is the last slice of the frame. If it is not the last slice ("NO" in step 13100), control in the processor 205 passes to a slice header coding step 1330. Otherwise, if the current slice is the last and all slices (consecutive portions) have been coded ("YES" in step 13100), the method 1300 ends.

[0178] 14 shows a method 1400 for encoding the slice header 1118 into the bitstream 115, implemented in step 1330. The method 1400 may be implemented by an apparatus such as a configured FPGA, ASIC, or ASSP. Furthermore, the method 1400 may be performed by the video encoder 114 under execution of the processor 205. As such, the method 1400 may be stored in a computer-readable storage medium and / or in the memory 206.

[0179] The method 1400 begins with a partition constraints override enabled test step 1410. In step 1410, the processor 205 tests whether a partition constraints override enabled flag encoded in the SPS 1110 indicates that the partition constraints may be overridden at the slice level. If the partition constraints may be overridden at the slice level ("YES" in step 1410), control in the processor 205 proceeds to a partition constraint determination step 1420. Otherwise, if the partition constraints cannot be overridden at the slice level ("NO" in step 1410), control in the processor 205 proceeds to another parameter encoding step 1480.

[0180] In a partition constraint determination step 1420, the processor 205 determines a partition constraint (e.g., maximum MTT division depth) appropriate for the current slice 1116. In one example, the frame data 310 includes a projection of a 360-degree view of a scene mapped to a 2D frame and is divided into several sub-pictures. Depending on the selected viewport, certain slices may require higher fidelity and other slices lower fidelity. The partition constraint for a given slice may be set (e.g., by step 1340) based on the fidelity requirements of the portion of the frame data 310 encoded by that slice. If lower fidelity is considered acceptable, a shallower coding tree with larger CUs may be allowed and the maximum MTT depth may be set to a lower value accordingly. The subdivision level 1136 signaled in the flag cu_qp_delta_subdiv is determined accordingly, at least within the range resulting from the determined maximum MTT depth 1134. Also, the corresponding chroma subdivision level is determined and signaled.

[0181] From step 1420, the method 1400 continues with a partition constraint overwrite flag encoding step 1430. In step 1430, the entropy encoder 338 encodes into the bitstream 115 a flag indicating whether the partition constraints signaled in the SPS 1110 are overwritten for the slice 1116. If a partition constraint specific to the current slice was derived in step 1420, the value of the flag will indicate the use of the partition constraint overwrite function. If the constraints determined in step 1420 match those already encoded in the SPS 1110, there is no need to overwrite the partition constraints since there are no changes to be signaled, and the flag value is encoded accordingly.

[0182] From step 1430, the method 1400 continues with a partition constraints override test step 1440. In step 1440, the processor 205 tests the flag value encoded in step 1430. If the flag indicates to override the partition constraints ("YES" in step 1440), control in the processor 205 proceeds to a slice partition constraint encoding step 1450. Otherwise, if the partition constraints are not to be overridden ("NO" in step 1440), control in the processor 205 proceeds to another parameter encoding step 1480.

[0183] From step 1440, the method 1400 continues with a slice partition constraint encoding step 1450. In performing step 1450, the entropy encoder 338 encodes the partition constraints determined for the slice into the bitstream 115. The partition constraints for the slice include "slice_max_mtt_hierarchy_depth_luma", from which MaxMttDepthY 1134 is derived.

[0184] From step 1450, the method 1400 continues with a QP subdivision level encoding step 1460. In step 1460, the entropy encoder 338 encodes the subdivision level for the luma CB using the "cu_qp_delta_subdiv" syntax element, as described with reference to FIG.

[0185] From step 1460, the method 1400 continues with a chroma QP subdivision level encoding step 1470. In step 1470, the entropy encoder 338 encodes the subdivision level for signaling the CU chroma QP offset using the "cu_chroma_qp_offset_subdiv" syntax element, as described with reference to FIG.

[0186] Steps 1460 and 1470 operate to code an overall QP refinement level for a slice (contiguous portion) of a frame. The overall refinement level includes both the refinement level of the luma coding units and the refinement level of the chroma coding units of the slice. The refinement levels of chroma and luma may be different, for example, by using separate coding trees for luma and chroma in an I slice.

[0187] From step 1470, the method 1400 continues with another parameter encoding step 1480. In step 1480, the entropy encoder 338 encodes other parameters, such as those required for deblocking, control of specific tools such as an adaptive loop filter, and optional selection of scaling lists from those previously signaled (for non-uniform application of quantization parameters to transform blocks), into the slice header 1118. The method 1400 ends upon execution of step 1480.

[0188] Figure 15 shows a method 1500 for encoding a coding unit into a bitstream 115, corresponding to step 1370 of Figure 13. The method 1500 may be implemented by an apparatus such as a configured FPGA, ASIC, or ASSP. Furthermore, the method 1500 may be performed by the video encoder 114 under execution of the processor 205. As such, the method 1500 may be stored in a computer-readable storage medium and / or in the memory 206.

[0189] The method 1500 starts with a prediction mode encoding step 1510. In step 1510, the entropy encoder 338 encodes the prediction mode for the coding unit, determined in step 1360, into the bitstream 115. A "pred_mode" syntax element is encoded to distinguish the use of intra-, inter-, or other prediction modes for the coding unit. If intra-prediction is used for the coding unit, a luma intra prediction mode is encoded and a chroma intra prediction mode is encoded. If inter-prediction is used for the coding unit, a "merge index" may be encoded to select a motion vector from a neighboring coding unit to use for this coding unit, and a motion vector delta may be encoded to introduce an offset to the motion vector obtained from a spatially neighboring block. A primary transform type is encoded to select whether to use DCT-2 horizontally and vertically, transform skip horizontally and vertically, or a combination of DCT-8 and DST-7 horizontally and vertically for the luma TB of the coding unit.

[0190] From step 1510, the method 1500 continues with an encoded residual test step 1520. In step 1520, the processor 205 determines whether a residual needs to be encoded for the coding unit. If there are significant residual coefficients to be encoded for the coding unit ("YES" at step 1520), control of the processor 205 passes to a new QG test step 1530. Otherwise, if there are no significant residual coefficients to be encoded ("NO" at step 1520), the method 1500 ends since all information required to decode the coding unit is present in the bitstream 115.

[0191] In a new QG test step 1530, the processor 205 determines whether the coding unit corresponds to a new quantization group. If the coding unit corresponds to a new quantization group ("YES" at step 1530), control of the processor 205 passes to a code delta QP step 1540. Otherwise, if the coding unit does not relate to a new quantization group ("NO" at step 1530), control in the processor 205 passes to a perform primary transform step 1550. When coding each coding unit, the nodes of the coding tree of the CTU are traversed in step 1530. If any of the child nodes of the current node have a subdivision level less than or equal to the subdivision level 1136 for the current slice, as determined from "cu_qp_delta_subdiv", a new quantization group is started in the area of ​​the CTU corresponding to that node, and step 1530 returns "YES". The first CU in a quantization group that contains a coded residual also contains a coded delta QP, signaling any changes to the quantization parameters applied to the residual coefficients in this quantization group.

[0192] In a delta QP encoding step 1540, the entropy coder 338 encodes the delta QP into the bitstream 115. The delta QP encodes the difference between a predicted QP and the QP intended to be used for the current quantization group. The predicted QP is obtained by averaging the QPs of the adjacent preceding (above and to the left) quantization groups. For lower levels of refinement, the quantization groups are larger and the delta QP is coded less frequently. A less frequent coding of the delta QP results in less overhead for signaling QP changes, but also less flexibility in rate control. The selection of the quantization parameter for each quantization group is performed by the QP controller module 390, which typically implements a rate control algorithm that targets a particular bitrate for the bitstream 115, somewhat independently of changes in the statistics of the underlying frame data 113. The method 1500 continues from step 1540 to a primary transform execution step 1550.

[0193] In a perform primary transform step 1550, the forward primary transform module 326 performs a primary transform according to the primary transform type of the coding unit, resulting in primary transform coefficients 328. A primary transform is performed for each color channel, first for the luma channel (Y), and then for the Cb and Cr TBs in subsequent invocations of step 1550 for the current TU. For the luma channel, a primary transform type (DCT-2, transform skip, MTS option) is performed, and for the chroma channels, a DCT-2 is performed.

[0194] The method 1500 continues from step 1550 with a primary transform coefficient quantization step 1560. In step 1560, the quantization module 334 quantizes the primary transform coefficients 328 according to the quantization parameter 392 to generate quantized primary transform coefficients 332. A delta QP, if present, is used to code the transform coefficients 328.

[0195] From step 1560, the method 1500 continues with a secondary transform execution step 1570. In step 1570, the secondary transform module 330 performs a secondary transform on the quantized primary transform coefficients 332 according to the secondary transform index 388 for the current transform block to generate secondary transform coefficients 336. Although the secondary transform is performed after quantization, the primary transform coefficients 328 may retain higher precision compared to the final intended quantization step size of the quantization parameter 392, e.g., the magnitude may be 16 times larger than would result directly from application of the quantization parameter 392, i.e., 4 additional bits of precision would be retained. By retaining the additional bits of precision on the quantized primary transform coefficients 332, the secondary transform module 330 can operate with higher precision on the coefficients in the primary coefficient domain. After application of the secondary transform, a final scaling (e.g., a 4-bit right shift) in step 1560 results in quantization to the intended quantization step size of the quantization parameter 392. The application of the "scaling list" is performed on primary transform coefficients corresponding to known transform basis functions (DCT-2, DCT-8, DST-7) rather than operating on secondary transform coefficients resulting from a trained secondary transform kernel. If the secondary transform index 388 for a transform block indicates no application of a secondary transform (index value equal to zero), the secondary transform is bypassed. That is, the primary transform coefficients 332 are propagated unchanged through the secondary transform module 330 to become secondary transform coefficients 336. The luma secondary transform index is used in combination with the luma intra prediction mode to select a secondary transform kernel to apply to the luma TB. The chroma secondary transform index is used in combination with the chroma intra prediction mode to select a secondary transform kernel to apply to the chroma TB.

[0196] From step 1570, the method 1500 continues with a last position encoding step 1580. In step 1580, the entropy encoder 338 encodes the last significant coefficient position in the secondary transform coefficients 336 for the current transform block into the bitstream 115. During the first call of step 1580, the luma TB is considered, and during subsequent calls, the Cb and then Cr TBs are considered.

[0197] In a configuration where the secondary transform index 388 is coded immediately after the final position, the method 1500 continues with an LFNST index coding step 1590. In step 1590, the entropy coder 338 codes the secondary transform index 338 as "lfnst_index" into the bitstream 115 using a truncated unary codeword if the secondary transform index was not inferred to be zero based on the final position coded in step 1580. Each CU has one luma TB, allowing step 1590 to be performed for the luma block, and if a "joint" coding mode is used for chroma, one chroma TB is coded, so step 1590 can be performed for chroma. Knowing the secondary transform index before decoding each residual coefficient allows the secondary transform to be applied coefficient-by-coefficient as the coefficients are decoded, for example using multiplication and accumulation logic. The method 1500 continues from step 1590 with a sub-block coding step 15100.

[0198] If the secondary transform index 388 is not coded immediately after the final position, the method 1500 continues from step 1580 to a sub-block coding step 15100. In the sub-block coding step 15100, the residual coefficients of the current transform block (336) are coded into the bitstream 115 as a series of sub-blocks. The residual coefficients are coded proceeding from the sub-block containing the last significant coefficient position back to the sub-block containing the DC residual coefficient.

[0199] From step 15100, the method 1500 continues with a last TB test step 15110, in which the processor 205 tests whether the current transform block is the last one in the progression through the color channels, i.e., Y, Cb, and Cr. If the transform block just coded is for the Cr TB ("YES" at step 15110), control of the processor 205 proceeds to a luma LFNST index coding step 15120. Otherwise, if the current TB is not the last ("YES" at step 15110), control in the processor 205 returns to the perform primary transform step 1550, which is the next TB (Cb or Cr is selected).

[0200] Steps 1550-15110 are described with respect to an example of a shared coding tree structure in which the prediction mode is intra prediction and uses DCT-2. Operations of steps such as performing a primary transform (1550), quantizing the primary transform coefficients (1560), and encoding the final position (1590) can be implemented for inter-prediction or intra-prediction modes other than the shared coding tree structure using known methods. Steps 1510-1540 can be implemented regardless of the prediction mode or coding tree structure.

[0201] From step 15110, the method 1500 continues with a luma LFNST index coding step 15120. In step 15120, the secondary transform index applied to the luma TB is coded into the bitstream 115 by the entropy encoder 338 if it is not inferred to be zero (no secondary transform is applied). The luma secondary transform index is inferred to be zero if the last significant position for the luma TB indicates a significant primary-only residual coefficient or if a primary transform other than DCT-2 is performed. Furthermore, the secondary transform index applied to the luma TB is coded into the bitstream only for coding units that use intra prediction and a shared coding tree structure. The secondary transform index applied to the luma TB is coded using flag 1220 (or flag 1230 in case of joint CbCr mode).

[0202] From step 15120, the method 1500 continues with a chroma LFNST index coding step 15130. In step 1530, if the chroma secondary transform index is not inferred to be zero (no secondary transform is applied), the secondary transform index applied to the chroma TB is coded into the bitstream 115 by the entropy coder 338. The chroma secondary transform index is inferred to be zero if the last significant position for any chroma TB indicates a significant primary-only residual coefficient. After executing step 15130, the method 1500 ends and control in the processor 205 returns to the method 1300. The secondary transform index applied to the chroma TB is coded into the bitstream only for coding units using intra prediction and a shared coding tree structure. The secondary transform index applied to the chroma TB is coded using flag 1221 (or flag 1230 in case of joint CbCr mode).

[0203] 16 illustrates a method 1600 for decoding a frame from a bitstream as a sequence of coding units organized into slices. The method 1600 may be implemented by an apparatus such as an FPGA, ASIC, or ASSP configured. Additionally, the method 1600 may be performed by the video decoder 134 under execution of the processor 205. As such, the method 1600 may be stored in a computer-readable storage medium and / or in the memory 206.

[0204] Method 1600 decodes a bitstream that was encoded using method 1300 in which partitioning constraints and quantization group definitions may vary from slice to slice, as deemed beneficial for rate control purposes, when encoding each portion (slice) of bitstream 115. Not only may the subdivision level of the quantization groups vary from slice to slice, but the application of the secondary transform is independently controllable for luma and chroma.

[0205] The method 1600 begins with an SPS / PPS decoding step 1610. In performing step 1610, the video decoder 134 decodes the SPS 1110 and the PPS 1112 from the bitstream 133 as sequences of fixed-length and variable-length parameters. A partition_constraints_override_enabled_flag is decoded as part of the SPS 1110, which indicates whether the partition constraints can be overridden in the slice header (e.g., 1118) of the respective slice (e.g., 1116). Default (i.e., signaled in the SPS 1110 and used for the slice in the absence of a subsequent override) partition constraint parameters 1130 are also decoded by the video decoder 134 as part of the SPS 1110.

[0206] From step 1610, method 1600 continues with step 1620 of determining slice boundaries. In performing step 1620, processor 205 determines the location of slices in the current access unit in bitstream 133. Typically, slices are identified by determining NAL unit boundaries (by detecting a "start code") and reading, for each NAL unit, a NAL unit header that contains a "NAL unit type". A particular NAL unit type identifies a slice type such as "I slice", "P slice", "B slice", etc. Upon identifying slice boundaries, application 233 may distribute the execution of subsequent steps of method 1600 on different processors, e.g., in a multi-processor architecture, for parallel decoding. For higher decoding throughput, different slices may be decoded by each processor in a multi-processor system.

[0207] From step 1610, the method 1600 continues with a slice header decoding step 1630. In step 1630, the entropy decoder 420 decodes the slice header 1118 from the bitstream 133. An exemplary method for decoding the slice header 1118 from the bitstream 133 implemented in step 1630 is described below with reference to FIG.

[0208] From step 1630, method 1600 continues with step 1640 of dividing the slice into CTUs. In step 1640, video decoder 134 divides slice 1116 into a sequence of CTUs. Slice boundaries are aligned to CTU boundaries, and CTUs within the slice are ordered according to a CTU scan order, which is typically a raster scan order. The division of the slice into CTUs establishes which portions of frame data 113 are processed by video decoder 134 when decoding the current slice.

[0209] From step 1640, the method 1600 continues with a coding tree decoding step 1650. In performing step 1650, the video decoder 133 decodes the coding tree for a current CTU in the slice from the bitstream 133, starting with the first CTU of the slice 1116 in the first invocation of step 1650. The coding tree of the CTU is decoded by decoding the split flag according to FIG. 6. In subsequent iterations of step 1650 for the CTU, the decoding is performed for subsequent CTUs in the slice 1116. If the coding tree was coded using an intra prediction mode and a shared coding tree structure, the coding unit has a primary color channel (luma or Y) and at least one secondary color channel (chroma, Cb and Cr or CbCr). In this case, the coding tree decoding involves decoding the coding unit including the primary color channel and at least one secondary color channel according to the coding tree unit split flag.

[0210] From step 1660, the method 1600 continues with a coding unit decoding step 1670. In step 1670, the video decoder 314 decodes the coding unit from the bitstream 133. An example of a method for decoding a coding unit implemented in step 1670 is described below with reference to FIG.

[0211] From step 1610, the method 1600 continues with a last coding unit test step 1680. In step 1680, the processor 205 tests whether the current coding unit is the last coding unit of the CTU. If it is not the last coding unit ("NO" at step 1680), control in the processor 205 returns to the coding unit decoding step 1670 to decode the next coding unit of the coding tree unit. If the current coding unit is the last coding unit ("YES" at step 1680), control in the processor 205 proceeds to a last CTU test step 1690.

[0212] In a last CTU test step 1690, the processor 205 tests whether the current CTU is the last CTU of the slice 1116. If it is not the last CTU of the slice ("NO" at step 1690), control in the processor 205 returns to the coding tree decoding step 1650 to decode the next coding tree unit of the slice 1116. If the current CTU is the last CTU of the slice 1116 ("YES" at step 1690), control in the processor 205 proceeds to a last slice test step 16100.

[0213] In a last slice test step 16100, the processor 205 tests whether the current slice being decoded is the last slice of the frame. If it is not the last slice in the frame ("NO" in step 16100), control in the processor 205 returns to a slice header decoding step 1630, which operates to decode the slice header of the next slice in the frame (e.g., "Slice 2" in FIG. 11). If the current slice is the last slice in the frame ("YES" in step 1600), the method 1600 ends.

[0214] The method 1600 operates on a plurality of coding units to generate image frames as described with respect to device 130 in FIG.

[0215] 17 shows a method 1700 for decoding the slice header into a bitstream, implemented in step 1630. The method 1700 may be implemented by an apparatus such as a configured FPGA, ASIC, or ASSP. Furthermore, the method 1700 may be performed by the video decoder 134 under execution of the processor 205. As such, the method 1700 may be stored in a computer-readable storage medium and / or memory 206.

[0216] Similar to method 1500, method 1700 is performed for a current slice or contiguous portion (1116) in a frame, such as frame 1101. Method 1700 begins with a partition constraint overwrite enable test step 1710. In step 1710, processor 205 tests whether a partition constraint overwrite enable flag decoded from SPS 1110 indicates that the partition constraint may be overwritten at the slice level. If the partition constraint may be overwritten at the slice level ("YES" at step 1710), control in processor 205 proceeds to a partition constraint overwrite flag decode step 1720. Otherwise, if the partition constraint overwrite enable flag indicates that the constraint may not be overwritten at the slice level ("NO" at step 1710), control in processor 205 proceeds to another parameter decode step 1770.

[0217] In a partition constraint overwrite flag decoding step 1720, the entropy decoder 420 decodes the partition constraint overwrite flag from the bitstream 133. The decoded flag indicates whether the partition constraint signaled in the SPS 1110 is overwritten for the current slice 1116.

[0218] From step 1720, the method 1700 continues with a partition constraint overwrite test step 1730. In performing step 1730, the processor 205 tests the flag value decoded in step 1720. If the decoded flag indicates that the partition constraint is to be overwritten ("YES" in step 1730), control in the processor 205 passes to a slice partition constraint decode step 1740. Otherwise, if the decoded flag indicates that the partition constraint is not to be overwritten ("NO" in step 1730), control in the processor 205 passes to another parameter decode step 1770.

[0219] In a slice partition constraint decoding step 1740, the entropy decoder 420 decodes the partition constraint determined for the slice from the bitstream 133. The partition constraint for the slice includes "slice_max_mtt_hierarchy_depth_luma", from which MaxMttDepthY 1134 is derived.

[0220] The method 1700 continues from step 1740 with a QP subdivision level decoding step 1750. In step 1720, the entropy decoder 420 decodes the subdivision level for the luma CB using the "cu_qp_delta_subdiv" syntax element as described with reference to FIG.

[0221] From step 1750, the method 1700 continues with a chroma QP subdivision level decoding step 1760. At step 1760, the entropy decoder 420 decodes the subdivision level for signaling the CU chroma QP offset using the "cu_chroma_qp_offset_subdiv" syntax element, as described with reference to FIG.

[0222] Steps 1750 and 1760 operate to determine a level of subdivision for a particular continuous portion (slice) of the bitstream. Repeated iterations between steps 1630 and 16100 operate to determine a level of subdivision for each continuous portion (slice) of the bitstream. As described below, each level of subdivision is applicable to the coding units of the corresponding slice (continuous portion).

[0223] From step 1760, the method 1700 continues with another parameter decoding step 1770. In step 1770, the entropy decoder 420 decodes other parameters from the slice header 1118, such as those required for deblocking, control of specific tools such as an adaptive loop filter, any selective selection of scaling lists from those previously signaled (for non-uniform application of quantization parameters to transform blocks). The method 1700 ends upon execution of step 1770.

[0224] 18 illustrates a method 1800 for decoding a coding unit from a bitstream. The method 1800 may be implemented by an apparatus such as a configured FPGA, ASIC, or ASSP. Additionally, the method 1800 may be performed by the video decoder 134 under execution of the processor 205. As such, the method 1800 may be stored in a computer-readable storage medium and / or in the memory 206.

[0225] The method 1800 is implemented for a current coding unit of a current CTU (e.g., CTU0 of slice 1116). The method 1800 begins with a prediction mode decoding step 1810. In step 1800, the entropy decoder 420 decodes the prediction mode of the coding unit, determined in step 1360 of Figure 13, from the bitstream 133. To distinguish between the use of intra-prediction, inter-prediction, or other prediction modes for the coding unit, the "pred_mode" syntax element is decoded in step 1810.

[0226] If intra prediction is used for the coding unit, the luma intra prediction mode and the chroma intra prediction mode are also decoded in step 1810. If inter prediction is used for the coding unit, a "merge index" may also be decoded in step 1810 to determine motion vectors from neighboring coding units to use for this coding unit, and a motion vector delta may be decoded to introduce an offset for motion vectors derived from spatially neighboring blocks. The primary transform type is also decoded in step 1810 to select between using horizontal and vertical DCT-2, horizontal and vertical transform skip, or a combination of horizontal and vertical DCT-8 and DST-7 for the luma TB of the coding unit.

[0227] From step 1810, the method 1800 continues with a coding residual test step 1820. In performing step 1820, the processor 205 determines whether it is necessary to decode the residual for the coding unit by decoding the "root coding block flag" for the coding unit using the entropy decoder 420. If there are significant residual coefficients to be decoded for the coding unit ("YES" at step 1820), control in the processor 205 passes to a new QG test step 1830. Otherwise, if there are no residual coefficients to be decoded ("NO" at step 1820), the method 1800 ends since all the information required to decode the coding unit is available in the bitstream 115. When the method 1800 ends, the following steps such as PB generation, application of in-loop filtering, etc. are performed to generate decoded samples as described with reference to FIG. 4.

[0228] In a new QG test step 1830, the processor 205 determines whether the coding unit corresponds to a new quantization group. If the coding unit corresponds to a new quantization group (step 1830: "YES"), control in the processor 205 passes to a delta QP decoding step 1840. Otherwise, if the coding unit does not correspond to a new quantization group (step 1830: "NO"), control in the processor 205 passes to a last position decoding step 8150. The new quantization group is associated with the current mode or subdivision level of the coding unit. When decoding each coding unit, the nodes of the coding tree of the CTU are traversed. When any of the child nodes of the current node has a subdivision level less than or equal to the subdivision level 1136 of the current slice, i.e. as determined from "cu_qp_delta_subdiv", a new quantization group starts in the area of ​​the CTU corresponding to that node. The first CU of a quantization group containing coded residual coefficients will also contain a coded delta QP, signaling any changes to the quantization parameters applicable to the residual coefficients of this quantization group. In practice, for each area (quantization group), a single (at most one) quantization parameter delta is decoded. As explained in relation to Figures 8A-8C, each area (quantization group) is based on the decomposition of the coding tree units of each slice and the corresponding refinement level (e.g., as coded in steps 1460 and 1470). In other words, each area or quantization group is based on a comparison of the refinement level associated with the coding unit against the refinement level determined for the corresponding successive part.

[0229] In a delta QP decoding step 1840, the entropy decoder 420 decodes the delta QP from the bitstream 133. The delta QP encodes the difference between a predicted QP and the QP intended to be used for the current quantization group. The predicted QP is obtained by averaging the QPs of the neighboring (above and to the left) quantization groups.

[0230] From step 1840, the method 1800 continues with a final position decoding step 1850. In performing step 1850, the entropy decoder 420 decodes from the bitstream 133 the final significant coefficient position in the secondary transform coefficients 424 for the current transform block. In the first invocation of step 1850, the step is performed for the luma TB. In subsequent invocations of step 1850 for the current CU, the step is performed for the Cb TB. If the final position indicates a significant coefficient outside the secondary transform coefficient set for the luma or chroma block (i.e. outside 928 or 966), the respective secondary transform index for the luma or chroma channel is inferred to be zero. This step is performed for the Cr TB in a subsequent iteration after that for Cb.

[0231] As described in connection with step 1590 of FIG. 15, in some configurations, the secondary transform index 470 is coded immediately after the last significant coefficient position of the coding unit. In decoding the same coding unit, if the secondary transform index 470 was not inferred to be zero based on the position of the last position for the TB decoded in step 1840, the secondary transform index 470 is decoded immediately after decoding the last significant residual coefficient position of the coding unit. In configurations in which the secondary transform index 470 is decoded immediately after the last significant coefficient position of the coding unit, the method 1800 continues from step 1850 to an LFNST index decoding step 1860. In performing step 1860, the entropy decoder 420 decodes the secondary transform index 470 from the bitstream 133 as "lfnst_index" using a truncated unary codeword if all significant coefficients undergo an inverse secondary transform (e.g., within 928 or 966). The secondary transform index 470 can be decoded for the luma TB or for the chroma when joint coding for the chroma TB with a single transform block is performed. The method 1800 continues from step 1860 with a sub-block decoding step 1870 .

[0232] If the secondary transform index 470 is not decoded immediately after the last significant position of the coding unit, the method 1800 continues from step 1850 to a sub-block decoding step 1870. In step 1870, the residual coefficients of the current transform block, i.e., 424, are decoded from the bitstream 133 as a series of sub-blocks progressing from the sub-block containing the last significant coefficient position back to the sub-block containing the DC residual coefficient.

[0233] From step 1870, the method 1800 continues with a last TB test step 1880. In performing step 1880, the processor 205 tests whether the current transform block is the last transform block in the progression through the color channels, i.e., Y, Cb, and Cr. If the just decoded (current) transform block is for the Cr TB, control in the processor 205 determines that all TBs have been decoded ("YES" at step 1880) and the method 1800 proceeds to a luma LFNST index decode step 1890. Otherwise, if no TBs have been decoded ("NO" at step 1880), control in the processor 205 returns to the last position decode step 1850. The next TB (following Y, Cb, Cr in that order) is selected for decoding in the repetition of step 1850.

[0234] From step 1880, the method 1800 continues with a luma LFNST index decoding step 1890. In performing step 1890, if the final position of the luma TB is within the set of coefficients subject to the inverse secondary transform (e.g., 928 or 966) and the luma TB uses DCT-2 horizontally and vertically as a primary transform, the secondary transform index 470 applied to the luma TB is decoded from the bitstream 133 by the entropy decoder 420. If the final significant position of the luma TB indicates the presence of a significant primary coefficient that is outside the set of coefficients subject to the inverse secondary transform (e.g., outside 928 or 966), the luma secondary transform index is inferred to be zero (no secondary transform is applied). The secondary transform index decoded in step 1890 is shown in Figure 12 as 1220 (1230 for joint CbCr mode).

[0235] From step 1890, the method 1800 continues with a chroma LFNST index decoding step 1895. In step 1895, the secondary transform index 470 to be applied to the chroma TB is decoded from the bitstream 133 by the entropy decoder 420 if the final position for each chroma TB is within the set of coefficients subject to the inverse secondary transform (e.g., 928 or 966). If the final significant position of any chroma TB indicates the presence of a significant primary coefficient that is outside the set of coefficients subject to the inverse secondary transform (e.g., outside 928 or 966), the chroma secondary transform index is inferred to be zero (no secondary transform is applied). The secondary transform index decoded in step 1895 is shown in FIG. 12 as 1221 (1230 in joint CbCr mode). When decoding the separate luma and chroma indices, a separate arithmetic context for each truncated unary codeword may be used, or the context may be shared such that the nth bin of each of the luma and chroma truncated unary codewords shares the same context.

[0236] Essentially, steps 1890 and 1895 relate to decoding a first index (e.g., 1220) for selecting a kernel for a luma (primary color) channel and a second index (e.g., 1221) for selecting a kernel for at least one chroma (secondary color) channel, respectively.

[0237] The method 1800 continues from step 1895 to step 18100 of performing an inverse secondary transform. In step 18100, the inverse secondary transform module 436 performs an inverse secondary transform on the decoded residual transform coefficients 424 according to the secondary transform index 470 for the current transform block to generate secondary transform coefficients 432. The secondary transform index decoded in step 1890 is applied to the luma TB, and the secondary transform index decoded in step 1895 is applied to the chroma TB. The kernel selection for luma and chroma also depends on the luma intra prediction mode and the chroma intra prediction mode, respectively (decoded in step 1810). In step 18100, a kernel according to the LFNST index for luma and a kernel according to the LFNST index for chroma are selected.

[0238] The method 1800 continues from step 18100 with a primary transform coefficient inverse quantization step 18110. In step 18110, the inverse quantization module 428 inverse quantizes the secondary transform coefficients 432 according to the quantization parameter 474 to generate the inverse quantized primary transform coefficients 440. If the delta QP was decoded in step 1840, the entropy decoder 420 determines the quantization parameter according to the delta QP for the quantization group (area) and the quantization parameter of a previous coding unit of the image frame. As previously described herein, the previous coding unit typically relates to the neighboring top-left coding unit.

[0239] From step 1870, the method 1800 continues with a primary transform performing step 18120. In step 1820, the inverse primary transform module 444 performs an inverse primary transform according to the primary transform type of the coding unit, such that the transform coefficients 440 are transformed into residual samples 448 in the spatial domain. An inverse primary transform is performed for each color channel, first for the luma channel (Y), and then for the Cb and Cr TBs upon subsequent invocations of step 1650 for the current TU. Steps 18100 through 18120 operate substantially to decode the current coding unit by applying a kernel selected in step 1890 according to the LFNST index for luma to the decoded residual coefficients of the luma channel, and applying a kernel selected in step 1890 according to the LFNST index for chroma to the decoded residual coefficients of at least one chroma channel.

[0240] The method 1800 ends after performing step 18120 and control in the processor 205 returns to the method 1600.

[0241] Steps 1850 to 18120 are described in relation to an example of a shared coding tree structure where the prediction mode is intra prediction and the transform is DCT-2. For example, the secondary transform index applied to the luma TB is decoded from the bitstream (1890) only for coding units that use intra prediction and a shared coding tree structure. Similarly, the secondary transform index applied to the chroma TB is decoded from the bitstream (1895) only for coding units that use intra prediction and a shared coding tree structure. The operations of steps such as decoding the subblocks (1870), inverse quantizing the primary transform coefficients (18110), and performing the primary transform can be implemented for inter prediction or intra prediction modes other than the shared coding tree structure using known methods. Steps 1810 to 1840 are performed in the described manner regardless of the prediction mode or structure.

[0242] Upon completion of the method 1800, subsequent steps are performed to decode the coding unit, including generation of intra prediction samples 480 by module 476, summation of the prediction block 452 with the decoded residual samples 448 by module 450, and application of an in-loop filter module 488 to generate filtered samples 492, which are output as frame data 135.

[0243] 19A and 19B show rules for applying or bypassing secondary transforms to luma and chroma channels. Figure 19A shows a table 1900 illustrating conditions for applying secondary transforms in luma and chroma channels in CUs obtained from a shared coding tree.

[0244] Condition 1901 exists if the last significant coefficient position of the luma TB indicates a decoded significant coefficient that is not obtained as a result of a forward secondary transform and is therefore not subject to an inverse secondary transform. Condition 1902 exists if the last significant coefficient position of the luma TB indicates a decoded significant coefficient that is obtained as a result of a forward secondary transform and is therefore subject to an inverse secondary transform. Furthermore, for the luma channel, the primary transform type must be DCT-2 for condition 1902 to exist, otherwise condition 1901 exists.

[0245] Condition 1910 exists if the last significant coefficient positions of one or two chroma TBs indicate decoded significant coefficients that are not the result of a forward secondary transform and thus are not subject to an inverse secondary transform. Condition 1911 also exists if the last significant coefficient positions of one or two chroma TBs indicate decoded significant coefficients that are the result of a forward secondary transform and thus are subject to an inverse secondary transform. Furthermore, for condition 1911 to exist, the width and height of the chroma block must be at least 4 samples (e.g., the width or height may be 2 samples due to chroma subsampling when 4:2:0 or 4:2:2 chroma formats are used).

[0246] If conditions 1901 and 1910 exist, then no secondary transform index is signaled (independently or jointly) and is not applied in luma or chroma, i.e., 1920. If conditions 1901 and 1911 exist, then one secondary transform index is signaled to indicate application or bypass of the selected kernel for the luma channel only, i.e., 1921. If conditions 1902 and 1910 exist, then one secondary transform index is signaled to indicate application of the selected kernel or bypass processing of only the chroma channels, i.e., 1922. If conditions 1911 and 1902 exist, then the configuration with independent signaling signals two secondary transform indexes, one for the luma TB and one for the chroma TB, i.e., 1923. The configuration using a single signaled secondary transform index when conditions 1902 and 1911 exist uses one index to control the selection for luma and chroma, but the kernel selected also depends on the intra-prediction modes of luma and chroma, which may be different. The ability to apply the secondary transform to either luma or chroma (i.e., 1921 and 1922) leads to coding efficiency gains.

[0247] FIG. 19B shows a table 1950 of search options available to the video encoder 114 at step 1360. The secondary transform indices for luma (1952) and chroma (1953) are shown as 1952 and 1953, respectively. An index value of 0 indicates that the secondary transform is bypassed, while index values ​​of 1 and 2 indicate which of the two kernels for the candidate set resulting from the luma or chroma intra prediction modes are used. There is a resulting search space of nine combinations ("0,0" to "2,2"), which may be constrained according to the constraints described with reference to FIG. 19A. Compared to searching all allowable combinations, the simplified search of three combinations (1951) may test only combinations where the luma and chroma secondary transform indices are the same, subject to the index being zeroed for channels where the last significant coefficient position indicates that only primary coefficients are present. For example, if condition 1921 exists, the choices "1,1" and "2,2" become "0,1" and "0,2" respectively (i.e., 1954). If condition 1922 exists, the choices "1,1" and "2,2" become "1,0" and "2,0" respectively (i.e., 1955). If condition 1920 exists, there is no need to signal the secondary transform index and the choice "0,0" is used. In effect, conditions 1921 and 1922 allow the choices "0,1", "0,2" and "1,0", "2,0" in the shared tree CU, resulting in high compression efficiency. If these choices were forbidden, either condition 1901 or 1910 would result in condition 1920, i.e., the choices "1,1" and "2,2" would be forbidden, and "0,0" would be used (see 1956).

[0248] Signaling the quantization group refinement level in the slice header allows for more granular control below the picture level. Higher granularity of control is advantageous for applications where the encoding fidelity requirements vary from part of the image, and especially where multiple encodings may need to operate somewhat independently to provide real-time throughput. Signaling the quantization group refinement level in the slice header is also consistent with signaling partition override settings and scaling list application settings in the slice header.

[0249] In one configuration of video encoder 114 and video decoder 134, the secondary transform index for chroma intra prediction blocks is always set to zero, i.e., no secondary transform is applied for chroma intra prediction blocks. In this case, there is no need to signal the chroma secondary transform index, and thus steps 15130 and 1895 may be omitted, and steps 1360, 1570, and 18100 are simplified accordingly.

[0250] If a coding tree node in the shared tree has an area of ​​64 luma samples, further splitting with a bipartite or quaternite tree split will result in smaller luma CBs, such as 4x4 blocks, but not smaller chroma CBs. Instead, there will be a single chroma CB with a size corresponding to the area of ​​64 luma samples, such as a 4x4 chroma CB. Similarly, when a coding tree node with an area of ​​128 luma samples undergoes trisection, a set of smaller luma CBs and one chroma CB will result. Each luma CB has a corresponding luma secondary transform index, and the chroma CB has a chroma secondary transform index.

[0251] If a node of the coding tree has an area of ​​64 and a further partition is signaled, or if it has an area of ​​128 luma samples and a third partition is signaled, the partition is applied to the luma channel only, and the resulting CBs (multiple luma CBs and one chroma CB for each chroma channel) are all intra predicted or all inter predicted. If a CU has a width or height of 4 luma samples and contains one CB for each of the color channels (Y, CB, and Cr), the chroma CB of the CU has a width or height of 2 samples. CBs with a width or height of 2 samples do not require a secondary transform, since they do not operate with 16-point or 48-point LFNST kernels. For blocks with a width or height of 2 samples, there is no need to perform steps 15130, 1895, 1360, 1570, and 18100.

[0252] In another configuration of the video encoder 114 and the video decoder 134, a single secondary transform index is signaled if either or both of the luma and chroma contain only insignificant residual coefficients in the regions of the respective TBs that are subject to only the primary transform. If the luma TB contains significant residual coefficients in the non-secondarily transformed regions of the decoded residual (e.g., 1066, 968) or if it is indicated not to use DCT-2 as the primary transform, the indicated secondary transform kernel (or secondary transform bypass) is applied only to the chroma TB. If any chroma TB contains significant residual coefficients in the non-secondarily transformed regions of the decoded residual, the indicated secondary transform kernel (or secondary transform bypass) is applied only to the luma TB. The application of a secondary transform is now possible for the luma TB when not possible for the chroma TB, and vice versa, resulting in improved coding efficiency compared to requiring the final positions of all TBs to be in the secondary coefficient domain before any TB of the CU can be subject to a secondary transform. Furthermore, only one secondary transform index is required for the CU of the shared coding tree. If the primary transform of luma is DCT-2, then the secondary transform may be inferred to be ineffective for chroma as well as luma.

[0253] In another configuration of the video encoder 114 and the video decoder 134, the secondary transform is applied only to the luma TB of the CU (by the modules 330 and 436, respectively), and not to any chroma TB of the CU. The absence of secondary transform logic for the chroma channels results in reduced complexity, e.g., less execution time or reduced silicon area. The absence of secondary transform logic for the chroma channels results in only needing to signal one secondary transform index, which may be signaled after the final position of the luma TB. That is, instead of steps 15120 and 1890, steps 1590 and 1860 are performed for the luma TB. Steps 15130 and 1895 are omitted in this case.

[0254] In another configuration of the video encoder 114 and the video decoder 134, the syntax elements that define the quantization group size (i.e., cu_chroma_qp_offset_subdiv and cu_qp_delta_subdiv) are signaled in the PPS 1112. The range of values ​​for the subdivision level is defined according to the partition constraint signaled in the SPS 1110, even if the partition constraint is overridden in the slice header 1118. For example, the range of cu_qp_delta_subdiv and cu_chroma_qp_offset_subdiv is 0 to 2×(log2_ctu_size_minus5 + 5 - (MinQtLog2SizeInterY or MinQtLog2SizeIntraY) + The value MaxMttDepthY is derived from the SPS 1110. That is, MaxMttDepthY is set equal to sps_max_mtt_hierarchy_depth_intra_slice_luma if the current slice is an I slice, and set equal to sps_max_mtt_hierarchy_depth_inter_slice if the current slice is a P slice or a B slice. The depth of the partition may be shallower than the depth signaled in the SPS 1110. For slices with overridden partitioning constraints, if the quantization group refinement level determined from the PPS 1112 is higher (deeper) than the highest refinement level achievable under the shallower coding tree depth determined from the slice header, the quantization group refinement level for that slice is clipped to be equal to the highest refinement level achievable for that slice. For example, cu_qp_delta_subdiv and cu_chroma_qp_offset_subdiv for a slice are clipped to be within 0 to 2×(log2_ctu_size_minus5 + 5 − (MinQtLog2SizeInterY or MinQtLog2SizeIntraY) + MaxMttDepthY_slice_header), and this clipped value is used for the slice.The value MaxMttDepthY_slice_header is derived from the slice header 1118, i.e., MaxMttDepthY_slice_header is set equal to slice_max_mtt_hierarchy_depth_luma.

[0255] In yet another configuration of the video encoder 114 and the video decoder 134, to derive the luma and chroma subdivision levels, the subdivision level is determined from the cu_chroma_qp_offset_subdiv and cu_qp_delta_subdiv decoded from the PPS 1112. If the partition constraints decoded from the slice header 1118 lead to a different range of subdivision levels for the slice, the subdivision level applied to the slice is adjusted to maintain the same offset to the deepest allowed subdivision level according to the partition constraints decoded from the SPS 1110. For example, if the SPS 1110 indicates a maximum refinement level of 4, the PPS 1112 indicates a refinement level of 3, and the slice header 1118 reduces the maximum to 3, then the refinement level applied within the slice is set to 2 (maintaining an offset of 1 relative to the maximum allowed refinement level). Adjusting the area of ​​the quantization group in response to changes in the partition constraint for a particular slice allows the signaling of the refinement level to occur less frequently (i.e., at the PPS level) while providing granularity to accommodate changes in the slice-level partition constraints. The configuration in which the refinement level is signaled in the PPS 1112, using the range defined according to the partitioning constraints decoded from the SPS 1110, so that it can be later adjusted based on the overridden partitioning constraints decoded from the slice header 1118, avoids the parsing dependency problem of having PPS syntax elements that depend on the partitioning constraints established in the slice header 1118. [Industrial Applicability]

[0256] The described arrangements are applicable in the computer and data processing industry, in particular for digital signal processing for encoding and decoding of signals such as video and image signals, achieving high compression efficiency.

[0257] The arrangements described herein provide increased flexibility to a video encoder in generating a highly compressed bitstream from input video data. The quantization of different regions or sub-pictures within a frame can be controlled with varying granularity, and varying the granularity per region can reduce the amount of coded residual data. Thus, higher granularity can be implemented when needed, e.g. for the 360° images mentioned above.

[0258] In some configurations, the application of the secondary transform may be controlled independently for luma and chroma, as described in connection with steps 15120 and 15130 (and corresponding steps 1890 and 1895), to achieve further reduction of the encoded residual data. A video decoder has been described along with the functionality necessary to decode a bitstream generated by such a video encoder.

[0259] Although only certain embodiments of the present invention have been described above, modifications and / or variations can be made thereto without departing from the scope and spirit of the present invention, and the embodiments are illustrative and not restrictive.

Claims

1. 1. A method for decoding an image including a plurality of coding tree units from a bitstream using a predetermined scheme, comprising: a first determining step of determining a subdivision value for determining a quantization group to which one quantization parameter delta is shared, the one quantization parameter delta representing a difference between a quantization parameter for the quantization group and a predicted quantization parameter of the quantization parameter for the quantization group, the subdivision value being a value that increases as the number of times a coding tree unit is divided into coding units increases, a quadrant can be used for division into coding units, and the quantization group can include multiple coding units; a first decoding step of decoding predetermined syntax elements from the bitstream; a second determining step of determining a maximum subdivision value for determining the quantization groups according to the predetermined syntax elements; a third determining step for determining the quantization group by comparing the subdivision value with the maximum subdivision value; a second decoding step of decoding the one quantization parameter delta for the quantization group; a derivation step of deriving the quantization parameter for the quantization group according to the one quantization parameter delta and the predicted quantization parameter of the quantization parameter for the quantization group; and a third decoding step of decoding one or more coding units included in the quantization group using the quantization parameter for the quantization group; if the slice type is intra slice and the value of a partition constraints override flag is a first value, the maximum subdivision value is limited to a range that depends on a first syntax element included in a sequence parameter set of the bitstream; When the slice type is a P slice or a B slice capable of using inter prediction and the value of the partition constraints override flag is the first value, the maximum subdivision value is limited to a range that depends on a second syntax element included in the sequence parameter set of the bitstream; if the value of the partition constraints override flag is a second value different from the first value, the maximum subdivision value is limited to a range that depends on syntax elements that may be included in a slice header of the bitstream in the predetermined manner and that are different from the first syntax elements and the second syntax elements; the predetermined syntax element for determining the maximum subdivision value may be included in the slice header of the bitstream in the predetermined manner, regardless of a value of the partition constraints override flag. A method comprising:

2. The method of claim 1 , wherein the first syntax element is max_mtt_hierarchy_depth for the intra slices and the second syntax element is max_mtt_hierarchy_depth for the P slices and the B slices.

3. 2. The method of claim 1, wherein the partition constraints override flag is a flag for a partition constraint.

4. 1. A method for encoding an image including a plurality of coding tree units into a bitstream using a predefined scheme, comprising: a first determining step of determining a subdivision value for determining a quantization group to which one quantization parameter delta is shared, the one quantization parameter delta representing a difference between a quantization parameter for the quantization group and a predicted quantization parameter of the quantization parameter for the quantization group, the subdivision value being a value that increases as the number of times a coding tree unit is divided into coding units increases, a quadrant can be used for division into coding units, and the quantization group can include multiple coding units; a second determining step of determining a maximum subdivision value for determining said quantization groups; a first encoding step of encoding into the bitstream a predetermined syntax element for determining the maximum subdivision value when decoding the bitstream; a third determining step for determining the quantization group by comparing the subdivision value with the maximum subdivision value; a second encoding step of encoding the one quantization parameter delta for the quantization group into the bitstream; a third encoding step of encoding one or more coding units included in the quantization group using the quantization parameter for the quantization group; if the slice type is intra slice and the value of a partition constraints override flag is a first value, the maximum subdivision value is limited to a range that depends on a first syntax element included in a sequence parameter set of the bitstream; if the slice type is a P slice or a B slice capable of using inter prediction and the value of the partition constraints override flag is the first value, the maximum subdivision value is limited to a range that depends on a second syntax element included in the sequence parameter set of the bitstream; if the value of the partition constraints override flag is a second value different from the first value, the maximum subdivision value is limited to a range that depends on syntax elements that may be included in a slice header of the bitstream in the predetermined manner and that are different from the first syntax elements and the second syntax elements; the predetermined syntax element for determining the maximum subdivision value may be included in the slice header of the bitstream in the predetermined manner, regardless of a value of the partition constraints override flag. A method comprising:

5. The method of claim 4 , wherein the first syntax element is max_mtt_hierarchy_depth for the intra slices and the second syntax element is max_mtt_hierarchy_depth for the P slices and the B slices.

6. 5. The method of claim 4, wherein the partition constraints override flag is a flag for a partition constraint.

7. 1. An apparatus for decoding an image including a plurality of coding tree units from a bitstream using a predetermined scheme, comprising: a first determining means for determining a subdivision value for determining a quantization group to which one quantization parameter delta is shared, the one quantization parameter delta representing a difference between a quantization parameter for the quantization group and a predicted quantization parameter of the quantization parameter for the quantization group, the subdivision value being a value that increases as the number of times a coding tree unit is divided into coding units increases, a quadrant can be used for division into coding units, and the quantization group can include multiple coding units; a first decoding means for decoding a predetermined syntax element from the bitstream; a second determining means for determining a maximum subdivision value for determining the quantization group according to the predetermined syntax element; a third determining means for determining the quantization group by comparing the subdivision value with the maximum subdivision value; second decoding means for decoding the one quantization parameter delta for the quantization group; derivation means for deriving the quantization parameter for the quantization group according to the one quantization parameter delta and the predicted quantization parameter of the quantization parameter for the quantization group; and a third decoding means for decoding one or more coding units included in the quantization group using the quantization parameter for the quantization group; if the slice type is intra slice and the value of a partition constraints override flag is a first value, the maximum subdivision value is limited to a range that depends on a first syntax element included in a sequence parameter set of the bitstream; When the slice type is a P slice or a B slice capable of using inter prediction and the value of the partition constraints override flag is the first value, the maximum subdivision value is limited to a range that depends on a second syntax element included in the sequence parameter set of the bitstream; if the value of the partition constraints override flag is a second value different from the first value, the maximum subdivision value is limited to a range that depends on syntax elements that may be included in a slice header of the bitstream in the predetermined manner and that are different from the first syntax elements and the second syntax elements; the predetermined syntax element for determining the maximum subdivision value may be included in the slice header of the bitstream in the predetermined manner, regardless of a value of the partition constraints override flag. Device.

8. 1. An apparatus for encoding an image, the image including a plurality of coding tree units, into a bitstream using a predetermined scheme, the apparatus comprising: a first determining means for determining a subdivision value for determining a quantization group to which one quantization parameter delta is shared, the one quantization parameter delta representing a difference between a quantization parameter for the quantization group and a predicted quantization parameter of the quantization parameter for the quantization group, the subdivision value being a value that increases as the number of times a coding tree unit is divided into coding units increases, a quadrant can be used for division into coding units, and the quantization group can include multiple coding units; a second determining means for determining a maximum subdivision value for determining said quantization groups; a first encoding means for encoding into the bitstream a predetermined syntax element for determining the maximum subdivision value when decoding the bitstream; a third determining means for determining the quantization group by comparing the subdivision value with the maximum subdivision value; a second encoding means for encoding the one quantization parameter delta for the quantization group into the bitstream; and a third encoding means for encoding one or more coding units included in the quantization group using the quantization parameter for the quantization group; if the slice type is intra slice and the value of a partition constraints override flag is a first value, the maximum subdivision value is limited to a range that depends on a first syntax element included in a sequence parameter set of the bitstream; When the slice type is a P slice or a B slice capable of using inter prediction and the value of the partition constraints override flag is the first value, the maximum subdivision value is limited to a range that depends on a second syntax element included in the sequence parameter set of the bitstream; if the value of the partition constraints override flag is a second value different from the first value, the maximum subdivision value is limited to a range that depends on syntax elements that may be included in a slice header of the bitstream in the predetermined manner, the syntax elements being different from the first syntax elements and the second syntax elements; the predetermined syntax element for determining the maximum subdivision value may be included in the slice header of the bitstream in the predetermined manner, regardless of a value of the partition constraints override flag. Device.

9. A program for causing a computer to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dynamic image encoding device and dynamic image decoding device

    JP2021034966A

  • Encoding method and device thereof, decoding method and device thereof

    JP2021508976A

  • VIDEO ENCODER, VIDEO DECODER, AND CORRESPONDING METHODS - Patent application

    JP2022501978A

  • Image-processing device and method

    WO2019159697A1