Context design for encoding and decoding syntax elements in inter prediction mode - Patent Application 20070122997

By deriving encoding contexts from spatial and temporal parameters, the method optimizes inter-prediction mode encoding in video coding, enhancing compression efficiency and reducing data requirements.

JP7825102B2Active Publication Date: 2026-03-05TENCENT AMERICA LLC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025515388
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2023-03-16
Filing Date
2023-03-21
Publication Date
2026-03-05
Estimated Expiration
2043-03-21

AI Technical Summary

Technical Problem

Existing video coding technologies face inefficiencies in determining optimal contexts for encoding and decoding syntax elements in inter-prediction modes, leading to suboptimal compression ratios and increased data requirements.

Method used

A method for determining encoding contexts for inter-prediction blocks by deriving parameters from spatially neighboring blocks and temporal motion vector prediction candidates, using binary indicators and context indices to select appropriate encoding contexts for syntax elements such as DRL index and inter-prediction modes, independent of temporal motion vector prediction.

Benefits of technology

Improves video coding efficiency by reducing the bit requirements for motion vector representation and enhancing compression performance in inter-prediction modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007825102000006
    Figure 0007825102000006
  • Figure 0007825102000007
    Figure 0007825102000007
  • Figure 0007825102000008
    Figure 0007825102000008
Patent Text Reader

Abstract

[0001] The present disclosure relates generally to video coding, and more particularly to methods and systems for determining contexts for encoding and decoding various syntax elements of a video stream in inter-prediction mode. Various example implementations are disclosed for limiting the number of possible coding contexts for syntax elements related to inter-prediction mode and for selecting an coding context for a current block based on coding information and temporal motion prediction information of spatially neighboring blocks.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] Incorporation by Reference This PCT international patent application is based on U.S. Non-Provisional Patent Application No. 18 / 185,143, filed March 16, 2023, entitled "Context Design for Coding and Decoding Syntax Elements in Inter Prediction Modes," which in turn is based on and claims the benefit of priority to U.S. Provisional Patent Application No. 63 / 419,689, filed October 26, 2022, and U.S. Provisional Patent Application No. 63 / 420,071, filed October 27, 2022, both entitled "Inter Mode Context Simplification." These prior patent applications are incorporated herein by reference in their entireties.

[0002] FIELD

[0002] The present disclosure relates generally to video coding, and more particularly to methods and systems for determining contexts for encoding and decoding various syntax elements of a video stream in inter-prediction mode. [Background technology]

[0003]

[0003] This background discussion provided herein is intended to generally present the context for the present disclosure. Work of the inventors currently identified to the extent that their work is described in this background section, and aspects of the discussion that may not otherwise be considered prior art at the time of filing this application, are not expressly or implicitly admitted to be prior art to the present disclosure.

[0004] Video encoding and decoding can be performed using inter-picture prediction with motion compensation. Uncompressed digital video can include a series of pictures, each having spatial dimensions of, for example, 1920 x 1080 luma samples and associated full or subsampled chroma samples. The series of pictures can have a fixed or variable picture rate (alternatively called a frame rate), for example, 60 pictures per second, or 60 frames per second. Uncompressed video has inherent bitrate requirements for streaming or data processing. For example, a video with a pixel resolution of 1920 x 1080, a frame rate of 60 frames / second, and chroma subsampling of 4:2:0 with 8 bits per pixel per color channel requires a bandwidth of nearly 1.5 Gbit / s. One hour of such video requires more than 600 GByte of storage space.

[0005]

[0005] One goal of video encoding and decoding can be the reduction of redundancy in an uncompressed input video signal through compression. Compression can, in some cases, help reduce the aforementioned bandwidth and / or storage space requirements by more than two orders of magnitude. Both lossless and lossy compression, as well as combinations thereof, can be employed. Lossless compression refers to a technique in which an exact copy of the original signal can be reconstructed from the compressed original signal through a decoding process. Lossy compression refers to an encoding / decoding process in which the original video information is not fully preserved during encoding and therefore cannot be fully restored during decoding. When using lossy compression, the reconstructed signal may not be identical to the original signal, but even with some information loss, the distortion between the original and reconstructed signal is small enough to make the reconstructed signal useful for the intended application. In the case of video, lossy compression is widely adopted in many applications. The amount of tolerable distortion depends on the application. For example, users of certain consumer video streaming applications can tolerate greater distortion than users of movie or television broadcasting applications. The compression ratio achievable by a particular encoding algorithm can be selected or adjusted to reflect different distortion tolerances; generally, the more distortion that can be tolerated, the more lossy and the greater the compression ratio that is possible with an encoding algorithm.

[0006] Video encoders and decoders can utilize techniques from several broad categories and processes, including, for example, motion compensation, Fourier transform, quantization, and entropy coding.

[0007]

[0007] Video codec technology can include a technique known as intra-coding. In intra-coding, sample values ​​are represented without reference to samples or other data from previously reconstructed reference pictures. In some video codecs, a picture is spatially subdivided into blocks of samples. When all blocks of samples are coded in intra mode, the picture can be called an intra-picture. Intra-pictures and their derivatives, such as independent decoder refresh pictures, can be used to reset the decoder state and can therefore be used as the first picture in a coded video bitstream and video session, or as a still image. The samples of the block after intra-prediction can then be transformed into the frequency domain, and the transform coefficients thus generated can be quantized before entropy coding. Intra-prediction refers to a technique that minimizes sample values ​​in the pre-transform domain. In some cases, the smaller the DC value and the smaller the AC coefficients after the transformation, the fewer bits are required to represent the block after entropy coding at a given quantization step size.

[0008]

[0008] Traditional intra-coding, such as that known from the MPEG-2 generation of encoding techniques, does not use intra-prediction. However, some newer video compression techniques include techniques that attempt to encode / decode blocks based on surrounding sample data and / or metadata obtained during the encoding and / or decoding of spatially neighboring blocks and that precede the intra-coded or decoded data block in decoding order. Such techniques are hereinafter referred to as "intra-prediction" techniques. It should be noted that, at least in some cases, intra-prediction uses only reference data from the current picture being reconstructed, and does not use reference data from other reference pictures.

[0009]

[0009] There can be many different forms of intra prediction. When two or more such techniques are available within a given video coding technique, the technique in use can be referred to as an intra prediction mode. In a particular codec, one or more intra prediction modes may be provided. In certain cases, a mode can have sub-modes and / or can be associated with various parameters, and the mode / sub-mode information and the intra coding parameters of a video block can be coded separately or collectively included in a mode codeword. Which codeword to use for a given mode, sub-mode, and / or parameter combination can also affect coding efficiency gains through intra prediction, and therefore, entropy coding techniques can be used to turn the codeword into a bitstream.

[0010]

[0010] Certain intra-prediction modes were introduced in H.264, improved in H.265, and further refined in newer coding techniques, such as the joint exploration model (JEM), versatile video coding (VVC), and benchmark set (BMS). In general, for intra-prediction, a predictor block can be formed using available neighboring sample values. For example, available values ​​of a specific set of neighboring samples along a specific direction and / or line may be copied into the predictor block. A reference to the direction in use can be coded in the bitstream or may itself be predicted.

[0011] 1A, a subset of nine predictor directions specified by the 33 possible intra predictor directions of H.265 (corresponding to the 33 angle modes of the 35 intra modes specified in H.265) is depicted in the lower right. The point (101) where the arrows converge represents the sample to be predicted. The arrows represent the direction in which neighboring samples are used to predict the sample at 101. For example, arrow (102) indicates that sample (101) is predicted from one or more neighboring samples located to the upper right and at an angle of 45 degrees from the horizontal. Similarly, arrow (103) indicates that sample (101) is predicted from one or more neighboring samples located to the lower left of sample (101) and at an angle of 22.5 degrees from the horizontal.

[0012]

[0012] With further reference to FIG. 1A, a square block (104) of 4x4 samples (indicated by a thick dotted line) is depicted at the top left. The square block (104) includes 16 samples, each labeled with "S," the block's position in the Y dimension (e.g., row index), and the block's position in the X dimension (e.g., column index). For example, sample S21 is the second sample (from the top) in the Y dimension and the first sample (from the left) in the X dimension. Similarly, sample S44 is the fourth sample in block (104) in both the Y and X dimensions. Because the block is 4x4 samples in size, S44 is located at the bottom right. An example reference sample is also shown, following a similar numbering scheme. The reference sample is labeled R, the sample's Y position (e.g., row index) and X position (column index) relative to block (104). In both H.264 and H.265, prediction samples that are adjacent to the block being reconstructed are used.

[0013]

[0013] Intra-picture prediction of block 104 may begin by copying reference sample values ​​from neighboring samples according to the signaled prediction direction. For example, assume that the coded video bitstream includes signaling indicating the prediction direction of the arrow (102) for this block 104—that is, the sample is predicted from one or more prediction samples located to the upper right and at a 45-degree angle from the horizontal. In such a case, samples S41, S32, S23, and S14 are predicted from the same reference sample R05. Thus, sample S44 is predicted from reference sample R08.

[0014] In certain cases, especially when the direction is not evenly divisible by 45 degrees, the values ​​of multiple reference samples may be combined, for example through interpolation, to calculate the reference sample.

[0015] The number of possible directions has increased as video coding technology continues to develop. In H.264 (2003), for example, nine different directions are available for intra prediction. This increased to 33 in H.265 (2013), and JEM / VVC / BMS can support up to 65 directions as of the time of this disclosure. Empirical studies have been conducted to help identify optimal intra prediction directions, and specific techniques in entropy coding may be used to encode these optimal directions with a small number of bits, accepting a specific bit penalty for the direction. Furthermore, the direction itself is sometimes predictable from neighboring directions used in intra prediction of decoded neighboring blocks.

[0016]

[0016] Figure 1B shows a schematic diagram (180) depicting 65 intra prediction directions according to JEM to illustrate the increasing number of prediction directions in various encoding techniques developed over time.

[0017]

[0017] The manner in which bits representing intra-prediction directions are mapped to prediction directions in the encoded video bitstream may vary from one video coding technique to another, and may range, for example, from a simple direct mapping of prediction directions to intra-prediction modes to codewords, complex adaptive schemes involving most probable modes, and similar techniques. However, in all cases, there may be certain directions for intra-prediction that are statistically less likely to occur in the video content than certain other directions. Because the goal of video compression is to reduce redundancy, in a well-designed video coding technique, these less likely directions may be represented with a greater number of bits than more likely directions.

[0018]

[0018] Inter-picture prediction or inter-prediction may be based on motion compensation. In motion compensation, sample data (reference picture) from a previously reconstructed picture or part thereof may be used for predicting a newly reconstructed picture or part of a picture (e.g., a block) after being spatially shifted in a direction indicated by a motion vector (hereinafter, MV: motion vector). In some cases, the reference picture may be the same as the picture currently being reconstructed. The MV may have two dimensions, X and Y, or three dimensions, with the third dimension indicating the reference picture in use (similar to the temporal dimension).

[0019]

[0019] In some video compression techniques, the current MV applicable to a particular area of ​​sample data can be predicted from other MVs, such as other MVs related to other areas of sample data that are spatially adjacent to the area being reconstructed and precede the current MV in decoding order. Doing so can substantially reduce the total amount of data required to encode the MV by relying on the elimination of redundancy in correlated MVs, thereby improving compression efficiency. For example, when encoding an input video signal derived from a camera (known as raw video), there is a statistical possibility that an area larger than the area to which a single MV is applicable moves in a similar direction in the video sequence. Therefore, in some cases, MV prediction can work effectively because it can be predicted using similar motion vectors derived from MVs of neighboring areas. This results in the actual MV of a given area being similar or identical to the MV predicted from surrounding MVs. Then, after entropy encoding, such an MV may be represented with fewer bits than would be used if the MV were encoded directly rather than predicted from neighboring MVs. In some cases, the MV prediction may be an example of lossless compression of a signal (i.e., the MV) derived from the original signal (i.e., the sample stream). In other cases, the MV prediction itself may be lossy, for example, due to rounding errors when computing the predictor from several surrounding MVs.

[0020]

[0020] H.265 / HEVC (ITU-T Recommendation H.265, "High Efficiency Video Coding", December 2016) describes various MV prediction mechanisms. Among the many MV prediction mechanisms specified by H.265, a technique hereinafter referred to as "spatial merging" will be described below.

[0021]

[0021] Specifically, referring to Figure 2, a current block (201) contains samples that the encoder found during the motion search process to be predictable from a spatially shifted previous block of the same size. Instead of directly encoding this MV, the MV can be derived from metadata associated with one or more reference pictures, such as the most recent reference picture (in decoding order), using the MV associated with any one of five surrounding samples denoted A0, A1, and B0, B1, B2 (202 to 206, respectively). In H.265, MV prediction can use predictors from the same reference picture used by neighboring blocks. Summary of the Invention [Means for solving the problem]

[0022]

[0022] The present disclosure relates generally to video coding, and more particularly to methods and systems for determining contexts for encoding and decoding various syntax elements of a video stream in inter prediction mode.

[0023]

[0023] In one example implementation, a method for decoding a current predictive block in a current coding block of a video stream is disclosed. The method may include receiving a flag indicating that the current predictive block is inter-predicted, deriving a first parameter for quantifying an extent to which the current predictive block shares a reference frame with a spatially neighboring predictive block of the current coding block, deriving a second parameter associated with utilization of motion vector prediction in the spatially neighboring predictive block of the current coding block, and selecting, according to the first parameter and the second parameter, an encoding context for at least one of a set of syntaxes associated with inter-prediction of the current predictive block, wherein the selection of the encoding context is independent of or further based on a derived value of any temporal motion vector prediction (TMVP) candidate block, and the set of syntaxes includes at least a dynamic motion vector reference list (DRL) index and a single-reference inter-prediction mode index.

[0024]

[0024] In an implementation of the above example, the first parameter represented by "nearest_match" may include a predefined collection of binary row reference frame matching indicators indicating whether there is a reference frame match between the current prediction block and at least one spatially neighboring prediction block in the row of prediction blocks immediately above the current coding block, and binary column reference frame matching indicators indicating whether there is a reference frame match between the current prediction block and at least one spatially neighboring prediction block in the column of prediction blocks immediately to the left of the current coding block, and the second parameter represented by "newmv_count" indicates the number of prediction blocks among the spatially neighboring prediction blocks of the current predicate block having at least one motion vector predicted by at least one reference motion vector.

[0025]

[0025] In any one of the implementation forms of the above example, the method is to derive a first context index represented by "newmv_ctx" from the first parameter and the second parameter as newmv_ctx = nearest_match+(newmv_count>0), where the () operator is configured to generate 1 and 0 when the logical formula enclosed by the () operator is true and false, respectively, and further include selecting a set of encoding contexts for the DRL index of the current prediction block according to the first parameter and the second parameter, at least via newmv_ctx. Further, the selection of the set of encoding contexts for the DRL index of the current prediction block according to the first parameter and the second parameter is via the maximum newmv_ctx. The method is to derive a second context index represented by "refmv_ctx" from the first parameter and the second parameter as refmv_ctx = nearest_match+(newmv_count<A), where A is a predefined or signaled positive integer, and further include selecting an encoding context for the single-reference inter-prediction mode of the current prediction block according to the first parameter and the second parameter, via the maximum newmv_ctx and refmv_ctx, in response to determining that the inter-prediction of the current prediction block is in the single-reference inter-prediction mode.

[0026]

[0026] In any one of the implementation forms of the above example, the method is to derive a second context indicator represented by "refmv_ctx" from the first parameter and the second parameter as refmv_ctx = nearest_match + Boolean(newmv_count < A), where A is a predefined or signaled positive integer, and in response to determining that the inter-prediction of the current prediction block is in the composite reference inter-prediction mode, select an encoding context for the composite reference inter-prediction mode of the current prediction block according to the first parameter and the second parameter via the maximum newmv_ctx and refmv_ctx. This may further be included.

[0027]

[0027] In any one of the implementation forms of the above example, the method may further include selecting an encoding context for the single-reference inter-prediction mode of the current prediction block according to the first parameter and the second parameter via the maximum newmv_ctx in response to determining that the inter-prediction of the current prediction block is in the single-reference inter-prediction mode.

[0028]

[0028] In any one of the implementation forms of the above example, the method may further include selecting an encoding context for the composite reference inter-prediction mode of the current prediction block according to the first parameter and the second parameter via the maximum newmv_ctx in response to determining that the inter-prediction of the current prediction block is in the composite reference inter-prediction mode.

[0029]

[0029] In any one of the implementation forms of the above example, the method may further include selecting an encoding context for the optical flow mode of the current prediction block according to the first parameter and the second parameter via the maximum newmv_ctx in response to determining that the optical flow mode is used for the current prediction block.

[0030] In any one of the implementation forms of the above examples, deriving the first parameter and the second parameter involves scanning M nearest left columns and nearest upper rows of spatially neighboring predictive blocks of the current coding block in a predefined scan order, where M is a predefined or signaled positive integer. For example, M may be 2. As another example, M may be 4.

[0031]

[0031] In any one of the implementation forms of the above examples, the method may further include: a predefined scanning order of the nearest left column and the nearest upper row of spatially neighboring prediction blocks follows: (L-1, B) → (R, T-1) → (L-1, T) → (L, T-1) → (L-1, B-1) → (L+1, T-1) → (L-1, C_row) → (C_column, T-1), where L, R, T, and B represent the block coordinates of the left column, right column, top row, and bottom row of the current coding block, respectively, and C_row and C_column represent the block coordinate positions of the current row and current column of the current prediction block, respectively. For example,

[0032]

[0032] In any one of the implementation forms of the above examples, the predefined scanning order of the nearest left column and nearest top row of spatially adjacent prediction blocks follows (R, T-1) → (L-1, B) → (L, T-1) → (L-1, T), where L, R, T, and B represent the block coordinates of the left column, right column, top row, and bottom row of the current coding block, respectively.

[0033] In any one of the implementation forms of the above example, the method is to derive a first context index represented by "newmv_ctx" from the first parameter and the second parameter as newmv_ctx = nearest_match + (newmv_count > 0), where the () operator is configured to generate 1 and 0 when the logical formula enclosed by the () operator is true and false, respectively, and to derive a second context index represented by "refmv_ctx" from the first parameter and the second parameter as refmv_ctx = nearest_match + (newmv_count < A), where A is a predefined or signaled positive integer. Selecting an encoding context for at least one of the set of syntaxes may include selecting a context according to newmv_ctx and refmv_ctx. The first parameter and the second parameter for deriving newmv_ctx may be obtained by scanning the maximum L adjacent prediction blocks in the column immediately to the left and the row immediately above the current encoding block. The first parameter and the second parameter for deriving refmv_ctx may be obtained by scanning the maximum K adjacent prediction blocks in the column immediately to the left and the row immediately above the current encoding block. L and K may be predefined or signaled positive integers not greater than a predefined or signaled positive integer M.

[0034]

[0034] In another example implementation, a method for processing a current predictive block within a current coding block of a video stream is disclosed. The method may include receiving a flag indicating that the current predictive block is inter-predicted, deriving context parameters based on checking the availability of one or more temporal motion vector prediction (TMVP) candidate blocks and comparing a global motion vector with the available TMVP candidate blocks, where at least one of the one or more TMVP candidate blocks is spatially located at a position other than the top-leftmost position of the current coding block, and determining an encoding context for syntax elements associated with the inter-prediction of the current predictive block according to the context parameters.

[0035]

[0035] In the above example implementation, the one or more TMVP candidate blocks include a single TMVP candidate block spatially positioned at the bottom right or center position of the current coding block.

[0036]

[0036] In any one of the implementation forms of the above examples, the one or more TMVP candidate blocks include multiple TMVP candidate blocks spatially positioned at the bottom right and center positions of the current encoding block, the multiple TMVP candidate blocks are checked for availability, and the first available TMVP candidate block is compared with the global motion vector to derive context parameters.

[0037]

[0037] In any one of the implementation forms of the above examples, the one or more TMVP candidate blocks include multiple TMVP candidate blocks spatially positioned at the top-leftmost position, the bottom-rightmost position, and the center position of the current coding block, and the multiple TMVP candidate blocks are checked for availability, and the first available TMVP candidate block is compared with the global motion vector to derive context parameters.

[0038] Aspects of the present disclosure also provide an electronic device or apparatus including circuitry or a processor configured to perform any of the implementations of the above methods.

[0039]

[0039] An aspect of the present disclosure also provides a non-transitory computer-readable medium storing instructions that, when executed by an electronic device, cause the electronic device to perform any one of the implementation forms of the above methods.

[0040]

[0040] Further features, nature and various advantages of the disclosed subject matter will become more apparent from the following detailed description and accompanying drawings. [Brief explanation of the drawings]

[0041] [Figure 1A] FIG. 10 is a schematic diagram of an exemplary subset of intra-prediction direction modes. [Figure 1B]

[0042] FIG. 1 is a diagram of exemplary intra-prediction directions. [Figure 2]

[0043] FIG. 1 is a schematic diagram of a current block and its surrounding spatial merge candidates for motion vector prediction in one example. [Figure 3]

[0044] FIG. 3 is a simplified block diagram schematic of a communication system (300) according to an example embodiment. [Figure 4]

[0045] FIG. 4 is a simplified block diagram schematic of a communication system (400) according to an example embodiment. [Figure 5]

[0046] FIG. 2 is a schematic diagram of a simplified block diagram of a video decoder according to an example embodiment. [Figure 6]

[0047] FIG. 1 is a schematic diagram of a simplified block diagram of a video encoder according to an example embodiment. [Figure 7]

[0048] FIG. 10 is a block diagram of a video encoder according to another example embodiment. [Figure 8]

[0049] FIG. 10 is a block diagram of a video decoder according to another example embodiment. [Figure 9]

[0050] FIG. 1 is a diagram of a coding block partitioning scheme according to an example embodiment of the present disclosure. [Figure 10]

[0051] FIG. 10 is a diagram of another coding block partitioning scheme according to an example embodiment of the present disclosure. [Figure 11]

[0052] FIG. 10 is a diagram of another coding block partitioning scheme according to an example embodiment of the present disclosure. [Figure 12]

[0053] FIG. 10 is a diagram of an example partitioning of a base block into coding blocks according to an example partitioning scheme. [Figure 13]

[0054] FIG. 1 is a diagram of an example ternary partitioning scheme. [Figure 14]

[0055] FIG. 1 is a diagram of an example quadtree / binary tree coding block partitioning scheme. [Figure 15]

[0056] FIG. 2 is a diagram of a scheme for partitioning a coding block into multiple transform blocks and a coding order of the transform blocks according to an example embodiment of the present disclosure. [Figure 16]

[0057] FIG. 10 is a diagram of another scheme for partitioning a coding block into multiple transform blocks and the coding order of the transform blocks according to an example embodiment of this disclosure. [Figure 17]

[0058] FIG. 10 is a diagram of another scheme for partitioning a coding block into multiple transform blocks according to an example embodiment of the present disclosure. [Figure 18]

[0059] FIG. 10 is a diagram of spatial neighboring blocks of a current coding block for inter-prediction mode coding context derivation. [Figure 19]

[0060] 1 is a flowchart of a method according to an example embodiment of the present disclosure. [Figure 20]

[0061] 10 is a flowchart of a method according to another example embodiment of the present disclosure. [Figure 21]

[0062] FIG. 1 is a schematic diagram of a computer system according to an example embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0042]

[0063] Throughout this specification and claims, terms may have nuances in meaning that are suggested or implied in context beyond their explicitly stated meaning. The phrases "in one embodiment" or "in some embodiments" as used herein do not necessarily refer to the same embodiment, and the phrases "in another embodiment" or "in other embodiments" as used herein do not necessarily refer to different embodiments. Similarly, the phrases "in one implementation" or "in some implementations" as used herein do not necessarily refer to the same implementation, and the phrases "in another implementation" or "in other implementations" as used herein do not necessarily refer to different implementations. For example, the claimed subject matter is intended to include, in whole or in part, combinations of example embodiments / implementations.

[0043]

[0064] Generally, terminology may be understood, at least in part, from the usage in context. For example, as used herein, terms such as "and," "or," or "and / or" may include various meanings that may depend, at least in part, on the context in which such terms are used. Typically, "or" when used to relate a list such as A, B, or C is intended to refer to A, B, and C, which is used here in an inclusive sense, as well as A, B, or C, which is used here in an exclusive sense. Furthermore, as used herein, the terms "one or more" or "at least one" may be used to describe any feature, structure, or characteristic in a singular sense, or may be used to describe a combination of features, structures, or characteristics in a plural sense, depending, at least in part, on the context. Similarly, terms such as "a," "an," or "the" may be understood to convey a singular or plural sense, again depending, at least in part, on the context. Furthermore, the terms "based on" or "determined by" may be understood as not necessarily intended to convey an exclusive set of elements, but instead allow for the presence of additional elements not necessarily expressly recited, again depending at least in part on the context. FIG. 3 illustrates a simplified block diagram of a communication system (300) according to an embodiment of the present disclosure. The communication system (300) includes multiple terminal devices capable of communicating with each other, e.g., via a network (350). For example, the communication system (300) includes a first pair of terminal devices (310) and (320) interconnected via the network (350). In the example of FIG. 3, the first pair of terminal devices (310) and (320) may implement unidirectional transmission of data. For example, the terminal device (310) may encode video data (e.g., a stream of video pictures captured by the terminal device (310)) for transmission to another terminal device (320) via the network (350).The encoded video data can be transmitted in the form of one or more coded video bitstreams. The terminal device (320) may receive the coded video data from the network (350), decode the coded video data to reconstruct video pictures, and display the video pictures according to the reconstructed video data. One-way data transmission may be implemented in a media serving application, etc.

[0044]

[0065] In another example, the communication system (300) includes a second pair of terminal devices (330) and (340) that implement bidirectional transmission of encoded video data, such as may be implemented during a video conferencing application. For bidirectional transmission of data, in one example, each of the terminal devices (330) and (340) may encode video data (e.g., of a stream of video pictures captured by the terminal device) for transmission to the other of the terminal devices (330) and (340) over the network (350). Each of the terminal devices (330) and (340) may also receive encoded video data transmitted by the other of the terminal devices (330) and (340), decode the encoded video data to reconstruct the video pictures, and display the video pictures on an accessible display device in response to the reconstructed video data.

[0045]

[0066] In the example of FIG. 3 , the terminal devices (310), (320), (330), and (340) may be implemented as a server, a personal computer, and a smartphone, although the applicability of the underlying principles of the present disclosure may not be so limited. Embodiments of the present disclosure may also be implemented in desktop computers, laptop computers, tablet computers, media players, wearable computers, dedicated videoconferencing equipment, and the like. The network (350) represents any number or type of network that conveys coded video data between the terminal devices (310), (320), (330), and (340), including, for example, wireline and / or wireless communication networks. The communication network (350) 9 may exchange data over circuit-switched, packet-switched, and / or other types of channels. Exemplary networks include telecommunications networks, local area networks, wide area networks, and / or the Internet. For the purposes of this discussion, the architecture and topology of the network (350) may not be important to the operation of the present disclosure unless explicitly described herein.

[0046]

[0067] 4 illustrates the arrangement of a video encoder and a video decoder in a video streaming environment as an example of application of the disclosed subject matter. The disclosed subject matter may be equally applicable to other video applications including, for example, video conferencing, digital TV broadcasting, gaming, virtual reality, storage of compressed video on digital media including CDs, DVDs, memory sticks, etc.

[0047]

[0068] The video streaming system may include a video capture subsystem (413), which may include a video source (401), such as a digital camera, for producing a stream of uncompressed video pictures or images (402). In one example, the stream of video pictures (402) includes samples recorded by the digital camera of the video source 401. The stream of video pictures (402), depicted as a bold line to emphasize its larger data volume when compared to the encoded video data (404) (or coded video bitstream), can be processed by an electronic device (420) that includes a video encoder (403) coupled to the video source (401). The video encoder (403) may include hardware, software, or a combination thereof to enable or implement aspects of the disclosed subject matter, as described in more detail below. The encoded video data (404) (or encoded video bitstream (404)), depicted as a thin line to emphasize its smaller data volume when compared to the stream of uncompressed video pictures (402), can be stored on the streaming server (405) for future use or directly on a downstream video device (not shown). One or more streaming client subsystems, such as the client subsystems (406) and (408) of FIG. 4, can access the streaming server (405) to retrieve copies (407) and (409) of the encoded video data (404). The client subsystem (406) can include a video decoder (410), for example, within the electronic device (430). The video decoder (410) decodes the incoming copy of the encoded video data (407) to produce an outgoing stream of video pictures (411) that is uncompressed and ready to be rendered on a display (412) (e.g., a display screen) or other rendering device (not shown). Video decoder 410 may be configured to perform some or all of the various functions described in this disclosure.In some streaming systems, the encoded video data (404), (407), and (409) (e.g., video bitstreams) can be encoded according to a particular video encoding / compression standard. Examples of these standards include ITU-T Recommendation H.265. In one example, a developing video encoding standard is informally known as Versatile Video Coding (VVC). The disclosed subject matter may also be used in the context of VVC, as well as other video encoding standards.

[0048]

[0069] It should be noted that the electronic devices (420) and (430) may include other components (not shown). For example, the electronic device (420) may include a video decoder (not shown), and the electronic device (430) may also include a video encoder (not shown).

[0049]

[0070] 5 shows a block diagram of a video decoder (510) according to any of the embodiments of the present disclosure described below. The video decoder (510) can be included in an electronic device (530). The electronic device (530) can include a receiver (531) (e.g., receiving circuitry). The video decoder (510) can be used in place of the video decoder (410) in the example of FIG. 4.

[0050]

[0071] The receiver (531) may receive one or more coded video sequences to be decoded by the video decoder (510). In the same or another embodiment, one coded video sequence may be decoded at a time, with the decoding of each coded video sequence being independent of other coded video sequences. Each video sequence may be associated with multiple video frames or images. The coded video sequences may be received from a channel (501), which may be a hardware or software link to a storage device that stored the coded video data or a streaming source that transmitted the coded video data. The receiver (531) may receive the coded video data with other data, such as coded audio data and / or auxiliary data streams, and the coded video data may be forwarded to its respective processing circuitry (not shown). The receiver (531) may separate the coded video sequences from other data. A buffer memory (515) may be located between the receiver (531) and the entropy decoder / parser (520) (hereinafter "parser (520)") to prevent network jitter. In certain applications, the buffer memory (515) may be implemented as part of the video decoder (510). In other applications, the buffer memory (515) may be external to and separate from the video decoder (510) (not shown). In still other applications, there may be a buffer memory (not shown) external to the video decoder (510), for example, to prevent network jitter, or another additional buffer memory (515) internal to the video decoder (510), for example, to handle playback timing. When the receiver (531) is receiving data from a store / forward device with sufficient bandwidth and controllability or from an isosynchronous network, the buffer memory (515) may not be needed or may be small.For use with best-effort packet networks such as the Internet, a sufficiently sized buffer memory (515) may be required, and may be significantly larger. Such a buffer memory may be provided in an adaptable size and may be implemented at least in part in an operating system or similar element (not shown) external to the video decoder (510).

[0051]

[0072] The video decoder (510) may include a parser (520) for reconstructing symbols (521) from the encoded video sequence. These symbol categories include information used to manage the operation of the video decoder (510) and possibly information for controlling a rendering device, such as a display (512) (e.g., a display screen), which may or may not be an integral part of the electronic device (530), but may be coupled to the electronic device (530) as shown in FIG. 5. The control information for the rendering device may be in the form of a Supplemental Enhancement Information (SEI) message or a Video Usability Information (VUI) parameter set fragment (not shown). The parser (520) may parse / entropy decode the encoded video sequence received by the parser (520). The entropy coding of the coded video sequence may be in accordance with a video coding technique or standard and may follow various principles, including variable length coding, Huffman coding, context-independent or non-context-dependent arithmetic coding, etc. The parser (520) may extract a set of subgroup parameters for at least one of the subgroups of pixels in the video decoder from the coded video sequence based on at least one parameter corresponding to the subgroup. The subgroup may include a group of pictures (GOP), a picture, a tile, a slice, a macroblock, a coding unit (CU), a block, a transform unit (TU), a prediction unit (PU), etc. Additionally, the parser (520) may extract coded video sequence information, such as transform coefficients (e.g., Fourier transform coefficients), quantization parameter values, motion vectors, etc.

[0052]

[0073] The parser (520) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (515) to produce symbols (521).

[0053]

[0074] The reconstruction of the symbols (521) may require several different processing or functional units, depending on the type of coded video picture or portion thereof (inter and intra pictures, inter and intra blocks, etc.), as well as other factors. The units required, and how they are required, may be controlled by subgroup control information parsed from the coded video sequence by the parser (520). The flow of such subgroup control information between the parser (520) and the following processing or functional units is not depicted for the sake of simplicity.

[0054]

[0075] In addition to the functional blocks already mentioned, the video decoder (510) can be conceptually subdivided into several functional units, as described below. In a practical implementation operating under commercial constraints, many of these functional units will interact closely with each other and may be at least partially integrated with each other. However, to clearly explain the various functions of the disclosed subject matter, a conceptual subdivision into functional units will be adopted in the following disclosure.

[0055]

[0076] The first unit may include a scalar / inverse transform unit (551). The scalar / inverse transform unit (551) may receive quantized transform coefficients and control information from the parser (520), including information indicating which type of inverse transform to use, block size, quantization factors / parameters, quantization scaling matrices, and lies as symbols (521). The scalar / inverse transform unit (551) may output blocks having sample values ​​that can be input to an aggregator (555).

[0056]

[0077] In some cases, the output samples of the scaler / inverse transform (551) may be for intra-coded blocks, i.e., blocks that can use prediction information from a previously reconstructed portion of the current picture rather than using prediction information from a previously reconstructed picture. Such prediction information can be provided by an intra-picture prediction unit (552). In some cases, the intra-picture prediction unit (552) may generate blocks of the same size and shape as the block being reconstructed using surrounding block information already reconstructed and stored in the current picture buffer (558). The current picture buffer (558), for example, buffers a partially reconstructed and / or fully reconstructed current picture. In some implementations, the aggregator (555) may add, on a sample-by-sample basis, the prediction information generated by the intra-prediction unit (552) to the output sample information as provided by the scaler / inverse transform unit (551).

[0057]

[0078] In other cases, the output samples of the scalar / inverse transform unit (551) may be for an inter-coded and potentially motion-compensated block. In such cases, the motion-compensated prediction unit (553) may access the reference picture memory (557) to fetch samples used for inter-picture prediction. After motion-compensating the fetched samples according to the symbols (521) for the block, these samples may be added to the output of the scalar / inverse transform unit (551) by the aggregator (555) to generate the output sample information (the output of unit 551 may be referred to as residual samples or residual signals). The addresses in the reference picture memory (557) from which the motion-compensated prediction unit (553) fetches the prediction samples may be controlled by a motion vector available to the motion-compensated prediction unit (553) in the form of a symbol (521), which may have, for example, an X and Y component (shift) and a reference picture component (time). Motion compensation may further include interpolation of sample values ​​as fetched from the reference picture memory (557) when sub-sample accurate motion vectors are in use, may be further associated with a motion vector prediction mechanism, etc.

[0058]

[0079] The output samples of the aggregator (555) may be subjected to various loop filtering techniques in the loop filter unit (556). Video compression techniques can include in-loop filter techniques controlled by parameters contained in the coded video sequence (also called the coded video bitstream) and made available to the loop filter unit (556) as symbols (521) from the parser (520), but can also include those that respond to meta-information obtained during decoding of previous portions (in decoding order) of the coded picture or coded video sequence, and those that respond to previously reconstructed, loop-filtered sample values. As described in more detail below, several types of loop filters may be included as part of the loop filter unit 556, in various orders.

[0059]

[0080] The output of the loop filter unit (556) may be a sample stream that can be output to a rendering device (512) or stored in a reference picture memory (557) for use during future inter-picture prediction.

[0060]

[0081] A particular coded picture can be used as a reference picture for future inter-picture prediction as soon as it is fully reconstructed. For example, once the coded picture corresponding to the current picture is fully reconstructed and the coded picture is identified as a reference picture (e.g., by the parser (520)), the current picture buffer (558) can become part of the reference picture memory (557), and an unused current picture buffer can be reallocated before beginning reconstruction of the next coded picture.

[0061]

[0082] The video decoder (510) may perform decoding operations according to a predetermined video compression technique adopted in a standard such as ITU-T Recommendation H.265. An encoded video sequence may conform to the syntax specified by the video compression technique or standard used, in the sense that the encoded video sequence conforms to both the syntax of the video compression technique or standard and the profile as documented in the video compression technique or standard. Specifically, a profile may select a particular tool from all tools available in the video compression technique or standard as the only tool available for use under this profile. To be standard-compliant, the complexity of the encoded video sequence may be within a range as defined by the level of the video compression technique or standard. In some cases, the level limits the maximum picture size, maximum frame rate, maximum reconstruction sample rate (e.g., measured in megasamples per second), maximum reference picture size, etc. In some cases, the limits set by the levels can be further restricted through the Hypothetical Reference Decoder (HRD) specification and metadata for HRD buffer management signaled in the coded video sequence.

[0062]

[0083] In some example embodiments, the receiver (531) may receive additional (redundant) data along with the encoded video. The additional data may be included as part of the encoded video sequence. The additional data may be used by the video decoder (510) to properly decode the data and / or to more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial, or signal-to-noise ratio (SNR) enhancement layers, redundant slices, redundant pictures, forward error correction codes, etc.

[0063]

[0084] 6 shows a block diagram of a video encoder (603) according to an example embodiment of the present disclosure. The video encoder (603) may be included in an electronic device (620). The electronic device (620) may further include a transmitter (640) (e.g., transmission circuitry). The video encoder (603) can be used in place of the video encoder (403) in the example of FIG. 4.

[0064]

[0085] The video encoder (603) may receive video samples from a video source (601) (not part of the electronic device (620) in the example of FIG. 6) that may capture video images to be encoded by the video encoder (603). In another example, the video source (601) may be provided as part of the electronic device (620).

[0065]

[0086] The video source (601) may provide a source video sequence to be encoded by the video encoder (603) in the form of a digital video sample stream, which can be of any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, etc.), any color space (e.g., BT.601 YCrCb, RGB, XYZ, etc.), and any suitable sampling structure (e.g., YCrCb 4:2:0, YCrCb 4:4:4). In a media serving system, the video source (601) may be a storage device capable of storing previously prepared video. In a video conferencing system, the video source (601) may be a camera that captures local image information as a video sequence. Video data may be provided as multiple individual pictures or images that convey motion when viewed in sequence. The picture itself may be organized as a spatial array of pixels, each of which can have one or more samples, depending on the sampling structure, color space, etc., used. Those skilled in the art can readily understand the relationship between pixels and samples. The following description focuses on samples.

[0066]

[0087] According to some example embodiments, the video encoder (603) may encode and compress pictures of a source video sequence into an encoded video sequence (643) in real time or under any other time constraints, as needed by the application. Enforcing an appropriate encoding speed constitutes one function of the controller (650). In some embodiments, the controller (650) may be functionally coupled to and control other functional units, such as those described below. The coupling is not depicted for simplicity. Parameters set by the controller (650) may include rate control-related parameters (picture skip, quantizer, lambda value for rate-distortion optimization techniques, etc.), picture size, group-of-picture (GOP) layout, maximum motion vector search range, etc. The controller (650) can be configured to have other appropriate functions for the video encoder (603) optimized for a particular system design.

[0067]

[0088] In some example embodiments, the video encoder (603) may be configured to operate within an encoding loop. As an overly simplified explanation, in one example, the encoding loop may include a source coder (630) (e.g., responsible for producing symbols, such as a symbol stream, based on an input picture to be encoded and a reference picture) and a (local) decoder (633) embedded in the video encoder (603). The decoder (633) reconstructs the symbols to produce sample data in a similar manner as a (remote) decoder would have produced it even if the embedded decoder 633 had processed the encoded video stream by the source coder 630 without entropy encoding (since any compression between the symbols and the encoded video bitstream in entropy encoding may be lossless in the video compression techniques considered in the disclosed subject matter). The reconstructed sample stream (sample data) is input to a reference picture memory (634). Because decoding the symbol stream results in bit-exact results independent of the decoder location (local or remote), the contents of the reference picture memory (634) are also bit-exact between the local and remote encoders. In other words, the predictive portion of the encoder "sees" the reference picture sampling exactly the same sample values ​​that the decoder "sees" when using prediction during decoding. This basic principle of reference picture synchrony (and the resulting drift when synchrony cannot be maintained, e.g., due to channel errors) is used to improve coding quality.

[0068]

[0089] The operation of the "local" decoder (633) can be the same as a "remote" decoder, such as the video decoder (510) already described in detail above in conjunction with Figure 5. Furthermore, and briefly referring to Figure 5, however, the entropy decoding portion of the video decoder (510), including the buffer memory (515) and parser (520), need not be entirely implemented in the local decoder (633) within the encoder, because symbols are available and the encoding / decoding of the symbols into an encoded video sequence by the entropy coder (645) and parser (520) can be lossless.

[0069]

[0090] An observation that can be made at this point is that any decoder technology other than parsing / entropy decoding, which may only be present in the decoder, may necessarily need to be present in a substantially identical functional form in the corresponding encoder. For this reason, the disclosed subject matter may sometimes focus on decoder operations in cooperation with the decoding portion of the encoder. Therefore, a description of the encoder technology may be omitted, since it is the reverse of the decoder technology, which is described generically. Only in certain areas or aspects is a more detailed description of the encoder provided below.

[0070]

[0091] During operation in some example implementations, the source coder (630) may perform motion-compensated predictive coding, which predictively codes an input picture with reference to one or more previously coded pictures from a video sequence designated as "reference pictures." In this manner, the coding engine (632) codes color channel differences (or residuals) between pixel blocks of the input picture and pixel blocks of reference pictures that may be selected as predictive references for the input picture. The terms "residual" and its adjective form "residual" are sometimes used interchangeably.

[0071]

[0092] The local video decoder (633) may decode the coded video data of pictures that may be designated as reference pictures based on symbols produced by the source coder (630). The operation of the coding engine (632) may advantageously be a lossy process. When the coded video data may be decoded in a video decoder (not shown in FIG. 6), the reconstructed video sequence may be a copy of the source video sequence, typically containing some errors. The local video decoder (633) may replicate the decoding process that may be performed on reference pictures by the video decoder and store the reconstructed reference pictures in a reference picture cache (634). In this way, the video encoder (603) may locally store copies of reconstructed reference pictures that have content in common with reconstructed reference pictures that will be retrieved by a far-end (remote) video decoder (without transmission errors).

[0072]

[0093] The predictor (635) may perform prediction searches for the coding engine (632). That is, to encode a new picture, the predictor (635) may search the reference picture memory (634) for sample data (as candidate reference pixel blocks) or for specific metadata, such as reference picture motion vectors, block shapes, etc., that may serve as suitable prediction references for the new picture. The predictor (635) may operate on a sample block-by-pixel block basis to find suitable prediction references. In some cases, as determined by search results obtained by the predictor (635), the input picture may have prediction references created from multiple reference pictures stored in the reference picture memory (634).

[0073]

[0094] The controller (650) may manage the coding operations of the source coder (630), including, for example, setting the parameters and subgroup parameters used to encode the video data.

[0074]

[0095] The output of all the aforementioned functional units may undergo entropy coding in an entropy coder (645), which transforms the symbols as produced by the various functional units into an encoded video sequence by lossless compression of the symbols through techniques such as Huffman coding, variable length coding, or arithmetic coding.

[0075]

[0096] The transmitter (640) may buffer the encoded video sequence as produced by the entropy coder (645) in preparation for transmission over a communication channel (660), which may be a hardware / software link to a storage device that will store the encoded video data. The transmitter (640) may merge the encoded video data from the video coder (603) with other data to be transmitted, such as encoded audio data and / or auxiliary data streams (sources not shown).

[0076]

[0097] The controller (650) may manage the operation of the video encoder (603). During encoding, the controller (650) may assign a particular coded picture type to each coded picture, which may affect the coding technique that may be applied to the respective picture. For example, pictures may often be assigned as one of the following picture types:

[0077]

[0098] An intra-picture (I-picture) may be coded and decoded without using any other pictures in a sequence as a source of prediction. Some video codecs allow different types of intra-pictures, including, for example, Independent Decoder Refresh ("IDR") pictures. Those skilled in the art are aware of these variations of I-pictures and their respective uses and characteristics.

[0078]

[0099] A predicted picture (P picture) may be coded and decoded using intra- or inter-prediction using at most one motion vector and reference index to predict the sample values ​​of each block.

[0079]

[0100] Bidirectionally predicted pictures (B-pictures) may be coded and decoded using intra- or inter-prediction, using at most two motion vectors and reference indices to predict the sample values ​​of each block. Similarly, multiple predicted pictures can use more than two reference pictures and associated metadata for the reconstruction of a single block.

[0080]

[0101] A source picture may generally be spatially subdivided into multiple sample coding blocks (e.g., blocks of 4x4, 8x8, 4x8, or 16x16 samples each) and coded block by block. Blocks may be predictively coded with reference to other (already coded) blocks as determined by the coding assignment applied to the block's respective picture. For example, blocks of an I-picture may be non-predictively coded or predictively coded with reference to previously coded blocks of the same picture (spatial prediction or intra-prediction). Pixel blocks of a P-picture may be predictively coded via spatial prediction or temporal prediction with reference to one previously coded reference picture. Blocks of a B-picture may be predictively coded via spatial prediction or temporal prediction with reference to one or two previously coded reference pictures. Source pictures or intermediate processed pictures may also be subdivided into other types of blocks for other purposes. The division of coding blocks and other types of blocks may or may not follow the same manner as described in more detail below.

[0081]

[0102] The video encoder (603) may perform encoding operations according to a given video encoding technique or standard, such as ITU-T Recommendation H.265. During its operation, the video encoder (603) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancies in the input video sequence. Thus, the encoded video data may conform to a syntax specified by the video encoding technique or standard used.

[0082]

[0103] In some example embodiments, the transmitter (640) may transmit additional data along with the encoded video. The source coder (630) may include data such as portions of the encoded video sequence. The additional data may include temporal / spatial / SNR enhancement layers, other forms of redundant data such as redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.

[0083]

[0104] Video may be captured as a time sequence of multiple source pictures (video pictures). Intra-picture prediction (often abbreviated to intra-prediction) exploits spatial correlations within a given picture, while inter-picture prediction exploits temporal or other correlations between pictures. For example, a particular picture being encoded / decoded, called the current picture, may be partitioned into blocks. When a block in the current picture resembles a reference block in a previously coded and still buffered reference picture in the video, it may be coded by a vector, called a motion vector. A motion vector points to a reference block within a reference picture and may have a third dimension that identifies the reference picture in cases where multiple reference pictures are in use.

[0084]

[0105] In some example embodiments, bi-prediction techniques can be used for inter-picture prediction. According to such bi-prediction techniques, two reference pictures are used, such as a first reference picture and a second reference picture, both of which advance the current picture in the video in decoding order (but may be in the past or future, respectively, in display order). A block in the current picture can be coded by a first motion vector that points to a first reference block in the first reference picture and a second motion vector that points to a second reference block in the second reference picture. A block can be jointly predicted by combining the first reference block and the second reference block.

[0085]

[0106] Furthermore, to improve coding efficiency, merge mode techniques may be used during inter-picture prediction.

[0086]

[0107] According to some example embodiments of the present disclosure, prediction, such as inter-picture prediction and intra-picture prediction, is performed in units of blocks. For example, pictures in a sequence of video pictures are partitioned into coding tree units (CTUs) for compression, and the CTUs within a picture may have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. In general, a CTU may include three parallel coding tree blocks (CTBs): one luma CTB and two chroma CTBs. Each CTU may be recursively quad-tree split into one or more coding units (CUs). For example, a 64×64 pixel CTU may be split into one CU of 64×64 pixels or four CUs of 32×32 pixels. One or more of the 32×32 blocks may each be further split into four CUs of 16×16 pixels. In some example embodiments, each CU may be analyzed during encoding to determine a prediction type for the CU from various prediction types, such as an inter-prediction type or an intra-prediction type. The CU may be divided into one or more prediction units (PUs) according to temporal and / or spatial predictability. Generally, each PU includes one luma prediction block (PB) and two chroma PBs. In one embodiment, prediction operations during coding (encoding / decoding) are performed in units of prediction blocks. The division of a CU into PUs (or PBs of different color channels) may be performed in various spatial patterns. For example, a luma or chroma PB may include a matrix of sample values ​​(e.g., luma values), such as 8x8 pixels, 16x16 pixels, 8x16 pixels, 16x8 samples, etc.

[0087]

[0108] 7 shows a diagram of a video encoder (703) according to another example embodiment of this disclosure. The video encoder (703) is configured to receive a processed block (e.g., a predictive block) of sample values ​​in a current video picture in a sequence of video pictures and encode the processed block into an encoded picture that is part of an encoded video sequence. The example video encoder (703) may be used in place of the example video encoder (403) of FIG. 4.

[0088]

[0109] For example, the video encoder (703) receives a matrix of sample values ​​for a processing block, such as a predicted block of 8x8 samples. The video encoder (703) then determines, for example, using rate-distortion optimization (RDO), whether the processing block is best coded using intra mode, inter mode, or bi-predictive mode. When it is determined that the processing block is coded in intra mode, the video encoder (703) may encode the processing block into a coded picture using intra prediction techniques, and when it is determined that the processing block is coded in inter mode or bi-predictive mode, the video encoder (703) may encode the processing block into a coded picture using inter prediction or bi-predictive techniques, respectively. In some example embodiments, a merge mode may be used as a sub-mode of inter-picture prediction, in which a motion vector is derived from one or more motion vector predictors without the benefit of coded motion vector components outside the predictors. In other example embodiments, there may be motion vector components applicable to the subject block. Thus, the video encoder (703) may include components not explicitly shown in FIG. 7, such as a mode decision module, to determine the prediction mode of a processing block.

[0089]

[0110] In the example of Figure 7, the video encoder (703) includes an inter-encoder (730), an intra-encoder (722), a residual calculator (723), a switch (726), a residual encoder (724), a general controller (721), and an entropy encoder (725), linked together as shown in the example arrangement of Figure 7.

[0090]

[0111] The inter-encoder (730) is configured to receive a sample of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference picture (e.g., blocks in previous and subsequent pictures in display order), generate inter-prediction information (e.g., a description of redundant information due to inter-coding techniques, motion vectors, merge mode information), and calculate an inter-prediction result (e.g., a predicted block) based on the inter-prediction information using any suitable technique. In some examples, the reference picture is a decoded reference picture decoded based on the encoded video information using a decoding unit 633 incorporated in the example encoder 620 of FIG. 6 (as shown as residual decoder 728 of FIG. 7, as described in more detail below).

[0091]

[0112] The intra encoder (722) is configured to receive samples of a current block (e.g., a processing block), compare the block with previously coded blocks in the same picture, generate transformed quantized coefficients, and in some cases, further generate intra prediction information (e.g., intra prediction direction information using one or more intra encoding techniques). The intra encoder (722) may calculate intra prediction results (e.g., prediction blocks) based on the intra prediction information and reference blocks in the same picture.

[0092]

[0113] The general controller (721) may be configured to determine general control data and control other components of the video encoder (703) based on the general control data. In one example, the general controller (721) determines a prediction mode for a block and sends a control signal to the switch (726) based on the prediction mode. For example, when the prediction mode is intra-mode, the general controller (721) controls the switch (726) to select an intra-mode result for use by the residual calculator (723) and controls the entropy encoder (725) to select intra-prediction information and include the intra-prediction information in the bitstream. When the block's predicate mode is inter-mode, the general controller (721) controls the switch (726) to select an inter-prediction result for use by the residual calculator (723) and controls the entropy encoder (725) to select inter-prediction information and include the inter-prediction information in the bitstream.

[0093]

[0114] The residual calculator (723) may be configured to calculate the difference (residual data) between the received block and a prediction result of the block selected from the intra-encoder (722) or the inter-encoder (730). The residual encoder (724) may be configured to encode the residual data to generate transform coefficients. For example, the residual encoder (724) may be configured to convert the residual data from the spatial domain to the frequency domain to generate the transform coefficients. The transform coefficients then undergo a quantization process to obtain quantized transform coefficients. In various example embodiments, the video encoder (703) further includes a residual decoder (728). The residual decoder (728) is configured to perform an inverse transform and generate decoded residual data. The decoded residual data can be used by the intra-encoder (722) and the inter-encoder (730) as appropriate. For example, the inter-encoder (730) can generate decoded blocks based on the decoded residual data and inter-prediction information, and the intra-encoder (722) can generate decoded blocks based on the decoded residual data and intra-prediction information. The decoded blocks are appropriately processed to generate decoded pictures, which are buffered in a memory circuit (not shown) and can be used as reference pictures.

[0094]

[0115] The entropy encoder (725) may be configured to format a bitstream to include the encoded block and perform entropy encoding. The entropy encoder (725) may be configured to include various information in the bitstream. For example, the entropy encoder (725) may be configured to include general control data, selected prediction information (e.g., intra-prediction information or inter-prediction information), residual information, and other appropriate information in the bitstream. When encoding a block in an inter mode or a merged sub-mode of a bi-prediction mode, the residual information may be absent.

[0095]

[0116] 8 shows a diagram of an example video decoder (810) according to another embodiment of the present disclosure. The video decoder (810) is configured to receive coded pictures that are part of a coded video sequence and decode the coded pictures to generate reconstructed pictures. In one example, the video decoder (810) may be used in place of the video decoder (410) in the example of FIG. 4.

[0096]

[0117] In the example of Figure 8, the video decoder (810) includes an entropy decoder (871), an inter decoder (880), a residual decoder (873), a reconstruction module (874), and an intra decoder (872) linked together as shown in the arrangement of the example of Figure 8.

[0097]

[0118] The entropy decoder (871) can be configured to reconstruct, from the coded picture, certain symbols that represent syntax elements that make up the coded picture. Such symbols can include, for example, prediction information (e.g., intra- or inter-prediction information) that can identify the mode in which the block is coded (e.g., intra-mode, inter-mode, bi-prediction mode, merged sub-mode, or another sub-mode), certain samples or metadata used for prediction by the intra decoder (872) or inter decoder (880), residual information in the form of, for example, quantized transform coefficients, etc. In one example, when the prediction mode is an inter- or bi-prediction mode, the inter-prediction information is provided to the inter decoder (880), and when the prediction type is an intra-prediction type, the intra-prediction information is provided to the intra decoder (872). The residual information can undergo inverse quantization and is provided to the residual decoder (873).

[0098]

[0119] The inter decoder (880) may be configured to receive inter prediction information and generate inter prediction results based on the inter prediction information.

[0099]

[0120] The intra decoder (872) may be configured to receive intra prediction information and generate prediction results based on the intra prediction information.

[0100]

[0121] The residual decoder (873) may be configured to perform inverse quantization to extract dequantized transform coefficients, process the dequantized transform coefficients, and convert the residual from the frequency domain to the spatial domain. Additionally, the residual decoder (873) may utilize certain control information (to include quantization parameters (QPs)) that may be provided by the entropy decoder (871) (this may be only small data volume control information, so the data path is not depicted).

[0101]

[0122] The reconstruction module (874) may be configured to combine, in the spatial domain, the residual, as output by the residual decoder (873), and the prediction result (as output by the inter- or intra-prediction module, as the case may be), to form a reconstructed block that forms part of the reconstructed picture as part of the reconstructed video. Note that other appropriate operations, such as deblocking operations, may also be performed to improve visual quality.

[0102]

[0123] It should be noted that the video encoders (403), (603), and (703) and the video decoders (410), (510), and (810) may be implemented using any suitable technique. In some example embodiments, the video encoders (403), (603), and (703) and the video decoders (410), (510), and (810) may be implemented using one or more integrated circuits. In another embodiment, the video encoders (403), (603), and (603) and the video decoders (410), (510), and (810) may be implemented using one or more processors executing software instructions.

[0103]

[0124] Turning to block partitioning for encoding and decoding, general partitioning may start with a base block and may follow a predefined set of rules, a specific pattern, a partition tree, or any partition structure or scheme. The partitioning may be hierarchical and recursive. After dividing or partitioning the base block according to any or a combination of the example partitioning procedures described below or other procedures, a final set of partitions or coding blocks may be obtained. Each of these partitions may be at one of various partitioning levels in the partitioning hierarchy and may be of various shapes. Each of the partitions may be referred to as a coding block (CB). For various example partitioning implementations described further below, each resulting CB may be of any allowed size and partitioning level. Such partitions are referred to as coding blocks because they may form the unit at which some basic encoding / decoding decisions may be made, and at which encoding / decoding parameters may be optimized, determined, and signaled in the encoded video bitstream. The highest or deepest level in the final partition represents the depth of the coding block partitioning structure of the tree. The coding blocks may be luma coding blocks or chroma coding blocks. The CB tree structure for each color is sometimes called the coding block tree (CBT).

[0104]

[0125] The coding blocks of all color channels may be collectively referred to as a coding unit (CU). The hierarchical structure of all color channels may be collectively referred to as a coding tree unit (CTU). The partitioning pattern or structure of the various color channels in a CTU may or may not be the same.

[0105]

[0126] In some implementations, the partition tree schemes or structures used for the luma and chroma channels may not need to be the same. In other words, the luma and chroma channels may have separate coding tree structures or patterns. Furthermore, whether the luma and chroma channels use the same or different coding partition tree structures, and whether the actual coding partition tree structure should be used, may depend on whether the coded slice is a P slice, a B slice, or an I slice. For example, for an I slice, the chroma and luma channels may have separate coding partition tree structures or coding partition tree structure modes, while for a P or B slice, the luma and chroma channels may share the same coding partition tree scheme. When separate coding partition tree structures or modes are applied, the luma channel may be partitioned into CBs by one coding partition tree structure, and the chroma channel may be partitioned into chroma CBs by another coding partition tree structure.

[0106]

[0127] In some example implementations, a predetermined partitioning pattern may be applied to the base block. As shown in FIG. 9 , an example four-way partition tree may start at a first predefined level (e.g., a 64×64 block level or other size as the base block size), and the base block may be hierarchically partitioned down to a predefined lowest level (e.g., a 4×4 level). For example, the base block may follow four predefined partitioning options or patterns indicated by 902, 904, 906, and 908, and the partition designated as R may have the same partitioning option indicated in FIG. 9 repeated at a lower scale down to the lowest level (e.g., the 4×4 level), thereby allowing recursive partitioning. In some implementations, additional restrictions may be applied to the partitioning scheme of FIG. 9 . In the implementation of FIG. 9 , rectangular partitions (e.g., 1:2 / 2:1 rectangular partitions) may be allowed but are not allowed to be recursive, while square partitions are allowed to be recursive. Partitioning according to FIG. 9 with recursion generates a final set of coding blocks, if necessary. A coding tree depth may be further defined to indicate the division depth from the root node or root block. For example, the coding tree depth of the root node or root block, e.g., a 64×64 block, may be set to 0, and after the root block is further divided once according to FIG. 9, the coding tree depth increases by 1. The maximum or deepest level from the 64×64 base block to the smallest 4×4 partition should be 4 (starting from level 0) for the above scheme. Such a partitioning scheme may be applied to one or more of the color channels. Each color channel may be independently partitioned according to the scheme of FIG. 9 (e.g., a partitioning pattern or option from among predefined patterns may be independently determined for each color channel at each hierarchical level).Alternatively, two or more of the color channels may share the same hierarchical pattern tree of FIG. 9 (e.g., the same partitioning pattern or option from among predefined patterns may be chosen for two or more color channels per hierarchical level).

[0107]

[0128] FIG. 10 illustrates another example predefined partitioning pattern that allows for recursive partitioning to form a partitioning tree. As shown in FIG. 10, an example 10-way partitioning structure or pattern may be predefined. The root block may begin at a predefined level (e.g., from a base block at a 128x128 level or a 64x64 level). The example partitioning structure of FIG. 10 includes various 2:1 / 1:2 and 4:1 / 1:4 rectangular partitions. The partition type having three sub-partitions, designated 1002, 1004, 1006, and 1008 in the second row of FIG. 10, may be referred to as a "T-type" partition. The "T-type" partitions 1002, 1004, 1006, and 1008 may be referred to as a left T-type, upper T-type, right T-type, and lower T-type. In some example implementations, none of the rectangular partitions of FIG. 10 are allowed to be further subdivided. A coding tree depth may be further defined to indicate the division depth from the root node or root block. For example, the coding tree depth of a root node or root block, such as a 128x128 block, may be set to 0, and after the root block is further divided once according to FIG. 10, the coding tree depth increases by 1. In some implementations, only the all-square partitions of 1010 may be allowed to recursively partition to the next level of the partitioning tree according to the pattern of FIG. 10. In other words, recursive partitioning may not be allowed for the square partitions in the T-type patterns 1002, 1004, 1006, and 1008. The partitioning procedure according to FIG. 10 with recursion generates a final set of coding blocks, if necessary. Such a scheme may be applied to one or more of the color channels. In some implementations, more flexibility may be added to the use of partitions below the 8x8 level. For example, 2x2 chroma inter prediction may be used in certain cases.

[0108]

[0129] In some other example implementations of coding block partitioning, a quadtree structure may be used to split a base block or an intermediate block into quadtree partitions. Such quadtree splitting may be applied hierarchically and recursively to any square-shaped partition. Whether a base block or an intermediate block or partition is further quadtree split may be adapted to various local characteristics of the base block or intermediate block / partition. The quadtree partitioning at picture boundaries may be further adapted. For example, implicit quadtree splitting may be implemented at picture boundaries so that a block continues to be quadtree split until its size fits the picture boundary.

[0109]

[0130] In some other example implementations, hierarchical binary partitioning from a base block may be used. In such a scheme, a base block or a mid-level block may be partitioned into two partitions. The partitioning may be horizontal or vertical. For example, horizontal partitioning may split a base block or a mid-level block into equal right and left partitions. Similarly, vertical partitioning may split a base block or a mid-level block into equal top and bottom partitions. Such partitioning may be hierarchical and recursive. For each base block or mid-level block, a determination may be made as to whether the binary partitioning scheme should continue and, if the scheme continues further, whether horizontal or vertical partitioning should be used. In some implementations, further partitioning may stop at a predefined minimum partition size (in one or both dimensions). Alternatively, further partitioning may stop as soon as a predefined partitioning level or depth from the base block is reached. In some implementations, the aspect ratio of the partitions may be limited. For example, the aspect ratio of a section may be no less than 1:4 (or no more than 4:1). Thus, a vertically elongated section with a vertical to horizontal aspect ratio of 4:1 may simply be further divided vertically into an upper section and a lower section, each with a vertical to horizontal aspect ratio of 2:1.

[0110]

[0131] In some other examples, a three-partitioning scheme may be used to partition the base block or any intermediate blocks, as shown in FIG. 13 . A three-partitioning scheme may be implemented vertically, as shown at 1302 in FIG. 13 , or horizontally, as shown at 1304 in FIG. 13 . The split ratio in the example of FIG. 13 is shown as 1:2:1 vertically or horizontally, but other ratios may be predefined. In some implementations, two or more different ratios may be predefined. Such a three-partitioning scheme may be used to complement a quadtree or two-partitioning structure, since such a ternary tree partitioning has the ability to capture an object at a block center within one contiguous partition, while quadtrees and two-partitions always split along the block center and therefore should split the object into separate partitions. In some implementations, the width and height of the partitions in the example ternary tree are always powers of two to avoid further transformations.

[0111]

[0132] The above partitioning schemes may be combined in any manner at different partitioning levels. As one example, the above-mentioned quadtree and binary partitioning schemes may be combined to partition a base block into a quadtree-binary-tree (QTBT) structure. In such a scheme, the base block or intermediate blocks / partitions may be quadtree-split or binary-split, if specified, subject to a set of predefined conditions. A specific example is illustrated in FIG. 14. In the example of FIG. 14, the base block is first quadtree-split into four partitions, as shown by 1402, 1404, 1406, and 1408. Each of the resulting partitions is then quadtree-partitioned into four further partitions (such as 1408), or binary-split into two further partitions at the next level (e.g., both symmetric, such as 1402 or 1406), or not split (such as 1404). Binary or quadtree splits may be recursively allowed for square-shaped partitions, as shown by the overall example partition pattern in 1410 and the corresponding tree structure / representation in 1420, where solid lines represent quadtree splits and dashed lines represent binary splits. A flag may be used at each binary split node (a non-leaf partition consisting of two) to indicate whether the binary split is horizontal or vertical. For example, as shown in 1420 in agreement with the partitioning structure in 1410, a flag "0" may represent a horizontal binary split and a flag "1" may represent a vertical binary split. In the case of quadtree split partitions, there is no need to indicate the split type, since a quadtree split always splits a block or partition both horizontally and vertically to produce four equal-sized sub-blocks / partitions. In some implementations, a flag "1" may represent a horizontal binary split and a flag "0" may represent a vertical binary split.

[0112]

[0133] In some example implementations of QTBT, the quadtree and binary splitting rule sets may be represented by the following predefined parameters and corresponding functions associated therewith: - CTU size: Root node size of the quadtree (size of the base block) - MinQTSize: Minimum allowable quadtree leaf node size - MaxBTSize: Maximum allowed binary tree root node size - MaxBTDepth: Maximum allowed binary tree depth - MinBTSize: The minimum allowable binary tree leaf node size In some example implementations of the QTBT partitioning structure, the CTU size may be set as 128x128 luma samples with two corresponding 64x64 blocks of chroma samples (when example chroma subsampling is considered and used), MinQTSize may be set as 16x16, MaxBTSize may be set as 64x64, MinBTSize (both width and height) may be set as 4x4, and MaxBTDepth may be set as 4. Quadtree partitioning may first be applied to the CTU to generate quadtree leaf nodes. The quadtree leaf nodes may have sizes from its minimum allowed size of 16x16 (i.e., MinQTSize) to 128x128 (i.e., CTU size). If the node is 128x128, it will not be initially split by the binary tree because its size exceeds MaxBTSize (i.e., 64x64). Otherwise, nodes that do not exceed MaxBTSize may be partitioned by a binary tree. In the example of FIG. 14, the base block is 128x128. According to a predefined rule set, the basic block can only be quadtree split. The base block has a partitioning depth of 0. Each of the resulting four partitions is 64x64, does not exceed MaxBTSize, and may undergo further quadtree or binary tree splits at level 1. The process continues. When the binary tree depth reaches MaxBTDepth (i.e., 4), further splits may not be considered. When a binary tree node has a width equal to MinBTSize (i.e., 4), further horizontal splits may not be considered. Similarly, when a binary tree node has a height equal to MinBTSize, further vertical splits are not considered.

[0113]

[0134] In some example implementations, the above QTBT scheme may be configured to support flexibility for luma and chroma to have the same or separate QTBT structures. For example, for P and B slices, the luma and chroma CTBs in one CTU may share the same QTBT structure. However, for an I slice, the luma CTB may be partitioned into CBs by a QTBT structure, and the chroma CTB may be partitioned into chroma CBs by a different QTBT structure. This means that CUs may be used to refer to different color channels in an I slice; for example, an I slice may consist of a coded block of a luma component or a coded block of two chroma components, while a CU in a P or B slice may consist of coded blocks of all three color components.

[0114]

[0135] In some other implementations, the QTBT scheme may be supplemented with the ternary scheme described above. Such implementations are sometimes referred to as multi-type tree (MTT) structures. For example, in addition to the binary division of nodes, one of the ternary partitioning patterns of FIG. 13 may be chosen. In some implementations, only square nodes may undergo ternary division. An additional flag may be used to indicate whether the ternary partitioning is horizontal or vertical.

[0115]

[0136] Two-level or multi-level tree designs, such as QTBT implementations, and QTBT implementations supplemented by three-partitions, may be primarily motivated by complexity reduction. Logically, the complexity of traversing a tree is T D where T represents the number of split types and D is the depth of the tree. Trade-offs may be made by using multiple types (T) while reducing the depth (D).

[0116]

[0137] In some implementations, the CB may be further partitioned. For example, the CB may be further partitioned into multiple prediction blocks (PBs) for intra- or inter-frame prediction during the encoding and decoding process. In other words, the CB may be further divided into different sub-partitions, and individual prediction decisions / configurations may be made. At the same time, the CB may be further partitioned into multiple transform blocks (TBs) to accurately represent the level at which a transform or inverse transform of video data is performed. The partitioning scheme of the CB into PBs and TBs may be the same or different. For example, each partitioning scheme may be implemented using a unique procedure based on, for example, various characteristics of the video data. The PB and TB partitioning schemes may be unrelated in some example implementations. The PB and TB partitioning schemes and boundaries may be correlated in other example implementations. In some implementations, for example, the TBs may be partitioned after the PB partitioning, and in particular, each PB may be determined following the partitioning of the coding block and then further partitioned into one or more TBs. For example, in some implementations, a PB may be split into one, two, four, or some other number of TBs.

[0117]

[0138] In some implementations, for the partitioning of base blocks into coding blocks and further into prediction blocks and / or transform blocks, the luma channel and the chroma channel may be treated separately. For example, in some implementations, partitioning of coding blocks into prediction blocks and / or transform blocks may be allowed for the luma channel, while such partitioning of coding blocks into prediction blocks and / or transform blocks may not be allowed for the chroma channel. In such implementations, transform and / or prediction of luma blocks may therefore only be performed at the coding block level. As another example, the minimum transform block size of the luma channel and the chroma channel may be different, e.g., coding blocks of the luma channel may be allowed to be partitioned into smaller transform and / or predictive blocks than the chroma channel. As yet another example, the maximum depth of partitioning of coding blocks into transform and / or predictive blocks may be different between the luma channel and the chroma channel, e.g., coding blocks of the luma channel may be allowed to be partitioned into deeper transform and / or predictive blocks than the chroma channel. As a specific example, a luma coding block may be partitioned into transform blocks of multiple sizes, which can be represented by recursive partitions down by up to two levels, and transform block shapes such as square, 2:1 / 1:2, and 4:1 / 1:4, as well as transform block sizes from 4x4 to 64x64 may be allowed. However, for chroma blocks, only the largest possible transform block specified for the luma block may be allowed.

[0118]

[0139] In some example implementations of partitioning a coding block into PBs, the depth, shape, and / or other characteristics of the PB partitioning may depend on whether the PB is intra-coded or inter-coded.

[0119]

[0140] The partitioning of coding blocks (or prediction blocks) into transform blocks may be performed recursively or non-recursively in various example schemes, including, but not limited to, quadtree division and predefined pattern division, and with further consideration of transform blocks at boundaries of coding blocks or prediction blocks. In general, the resulting transform blocks may be of different division levels, may not be the same size, and may not need to be square in shape (e.g., the resulting transform blocks can be rectangular with several allowed sizes and aspect ratios). Further examples are described in more detail below in connection with Figures 15, 16, and 17.

[0120]

[0141] However, in some other implementations, a CB obtained through any of the above partitioning schemes may be used as a basic or minimum coding block for prediction and / or transformation. In other words, no further division is performed for performing inter-prediction / intra-prediction and / or transformation. For example, a CB obtained from the above QTBT scheme may be directly used as a unit for performing prediction. Specifically, such a QTBT structure eliminates the concept of multiple partition types, i.e., such a QTBT structure eliminates the distinction between CUs, PUs, and TUs and supports more flexibility for the CU / CB partition shapes described above. In such a QTBT block structure, CUs / CBs can have square or rectangular shapes. Leaf nodes of such a QTBT are used as units for prediction and transformation processing without any further partitioning. This means that in such an example QTBT coding block structure, CUs, PUs, and TUs have the same block size.

[0121]

[0142] The various CB compartmentalization schemes described above, as well as further compartmentalization of the CB into PB and / or TB (not including PB / TB compartmentalization), may be combined in any manner. The following specific implementations are provided as non-limiting examples.

[0122]

[0143] Example implementations of coding block and transform block partitioning are described below. In such example implementations, a base block may be divided into coding blocks using recursive quadtree division or the predefined division patterns described above (such as those in FIGS. 9 and 10). For each level, local video data characteristics may determine whether further quadtree division of a particular partition should continue. The resulting CBs may be at various quadtree division levels and of various sizes. A decision as to whether a picture area should be coded using inter-picture (temporal) prediction or intra-picture (spatial) prediction may be made at the CB level (or at the CU level, for a total of three color channels). Each CB may be further divided into one, two, four, or other number of PBs according to a predefined PB division type. Within one PB, the same prediction process may be applied, and related information may be transmitted to the decoder for each PB. After obtaining the residual block by applying a prediction process based on the PB division type, the CB can be partitioned into TBs according to another quadtree structure similar to the coding tree of the CB. In this particular implementation, the CB or TB may be, but need not be, limited to a square shape. Furthermore, in this particular example, the PB may be square or rectangular for inter prediction, or only square for intra prediction. The coding block may be divided, for example, into four square-shaped TBs. Each TB may be further recursively divided (using quadtree division) into smaller TBs called residual quadtrees (RQTs).

[0123]

[0144] Another example implementation for partitioning a base block into CBs, PBs, and / or TBs is further described below. For example, rather than using multiple partition unit types such as those shown in FIG. 9 or FIG. 10, a quadtree with nested multitype trees using two- and three-split segmentation structures (e.g., QTBT or QTBT with three-split as described above) may be used. The separation of CBs, PBs, and TBs (i.e., partitioning of CBs into PBs and / or TBs, and partitioning of PBs into TBs) may be abandoned except when necessary for CBs with sizes too large for the maximum transform length; such CBs may require further partitioning. This example partitioning scheme may be designed to support more flexibility for CB partition shapes, so that both prediction and transformation can be performed on the CB level without further partitioning. In such a coding tree structure, the CBs may have a square or rectangular shape. Specifically, the coding tree block (CTB) may first be partitioned by a quadtree structure. The quadtree leaf nodes may then be further partitioned by a nested multitype tree structure. An example of a nested multitype tree structure using two or three splits is shown in FIG. 11. Specifically, the example multitype tree structure of FIG. 11 includes four split types, called vertical two-split (SPLIT_BT_VER) (1102), horizontal two-split (SPLIT_BT_HOR) (1104), vertical three-split (SPLIT_TT_VER) (1106), and horizontal three-split (SPLIT_TT_HOR) (1108). Therefore, CB corresponds to the leaf of the multitype tree. In this example implementation, as long as CB is not too large as the maximum transform length, this segmentation is used for both prediction and transform processing without any further partitioning. This means that in most cases, in a quadtree with a nested multitype tree coding block structure, CB, PB, and TB have the same block size. An exception occurs when the maximum supported transform length is smaller than the width or height of the color component of CB. In some implementations, in addition to the 2 or 3 splits, the nested pattern of FIG. 11 may further include a quadtree split.

[0124]

[0145] One specific example of a quadtree with a nested multitype tree coding block structure of block partitions (including quadtree, two-, and three-split options) for one base block is shown in FIG. 12. More specifically, FIG. 12 shows a base block 1200 quadtree split into four square partitions 1202, 1204, 1206, and 1208. The multitype tree structure of FIG. 11 and the decision to further use a quadtree for further splitting are made for each quadtree split partition. In the example of FIG. 12, partition 1204 is not further split. Partitions 1202 and 1208 each adopt another quadtree split. For partition 1202, the second-level quadtree-split top-left, top-right, bottom-left, and bottom-right partitions adopt a third-level split of the quadtree: horizontal two-split 1104 of FIG. 11, no split, and horizontal three-split 1108 of FIG. 11, respectively. Partition 1208 employs another quadtree splitting, with the second-level quadtree-split top-left, top-right, bottom-left, and bottom-right partitions employing a third-level split of vertical three-way split 1106 in FIG. 11 , no split, no split, and horizontal two-way split 1104 in FIG. 11 , respectively. Two of the subpartitions of the third-level top-left partition of 1208 are further split according to horizontal two-way split 1104 and horizontal three-way split 1108 in FIG. 11 , respectively. Partition 1206 employs a second-level splitting pattern according to vertical two-way split 1102 in FIG. 11 into two partitions that are further split according to horizontal three-way split 1108 and vertical two-way split 1102 in FIG. 11 at the third level. A fourth-level split is further applied to one of these according to horizontal two-way split 1104 in FIG. 11 .

[0125]

[0146] As a specific example of the above, the maximum luma transform size may be 64 × 64, and the maximum supported chroma transform size may be different from the luma, for example, at 32 × 32. Even if the CB in the above example of Figure 12 is not further split into smaller PBs and / or TBs overall, when the width or height of the luma coding block or chroma coding block is greater than the maximum transform width or height, the luma coding block or chroma coding block may be automatically split in the horizontal and / or vertical directions to meet the transform size constraint in that direction.

[0126]

[0147] In the specific example of partitioning base blocks into CBs described above, the coding tree scheme may support the ability for luma and chroma to have separate block tree structures. For example, in the case of P and B slices, the luma and chroma CTBs in one CTU may share the same coding tree structure. In the case of an I slice, for example, the luma and chroma CTBs may have separate coding block tree structures. When separate block tree structures are applied, the luma CTB may be partitioned into luma CBs by one coding tree structure, and the chroma CTB is partitioned into chroma CBs by another coding tree structure. This means that a CU in an I slice may consist of a coding block of the luma component or a coding block of two chroma components, and that a CU in a P or B slice always consists of coding blocks of all three color components, unless the video is monochrome.

[0127]

[0148] When a coding block is further partitioned into multiple transform blocks, the transform blocks may be arranged in the bitstream according to various orders or scan patterns. Example implementations of the partitioning of coding or prediction blocks into transform blocks and the coding order of the transform blocks are described in further detail below. In some example implementations, as described above, the transform partitioning may support multiple shapes of transform blocks, such as 1:1 (square), 1:2 / 2:1, and 1:4 / 4:1, with transform block sizes ranging from 4×4 to 64×64, for example. In some implementations, when the coding block is smaller than or equal to 64×64, the transform block partitioning may be applied only to the luma component, and therefore, for chroma blocks, the transform block size is the same as the coding block size. Otherwise, if the coding block width or height is greater than 64, both the luma and chroma coding blocks may be implicitly split into multiples of min(W,64)×min(H,64) and min(W,32)×min(H,32) transform blocks, respectively.

[0128]

[0149] In some example implementations of transform block partitioning, for both intra- and inter-coded blocks, the coding block may be further partitioned into multiple transform blocks with a partition depth up to a predefined number of levels (e.g., two levels). The transform block partition depth and size may be related. For some example implementations, the mapping from the transform size of the current depth to the transform size of the next depth is shown below in Table 1.

[0129] [Table 1]

[0130]

[0150] Based on the example mapping in Table 1, for a 1:1 square block, the next level transform division may produce four 1:1 square sub-transform blocks. The transform partition may stop at, for example, 4x4. Thus, a transform size of 4x4 at the current depth corresponds to the same size of 4x4 at the next depth. In the example of Table 1, for a 1:2 / 2:1 non-square block, the next level transform division may produce two 1:1 square sub-transform blocks, while for a 1:4 / 4:1 non-square block, the next level transform division may produce two 1:2 / 2:1 sub-transform blocks.

[0131]

[0151] In some example implementations, additional restrictions on transform block partitioning may be applied to the luma component of an intra-coded block. For example, all sub-transform blocks at each level of transform partitioning may be restricted to be of equal size. For example, for a 32x16 coded block, level 1 transform partitioning creates two 16x16 sub-transform blocks, and level 2 transform partitioning creates eight 8x8 sub-transform blocks. In other words, second-level partitioning must be applied to all first-level sub-blocks to keep the transform units of equal size. An example of transform block partitioning for an intra-coded square block according to Table 1 is shown in Figure 15, with the coding order indicated by the arrows. Specifically, 1502 illustrates a square coded block. The first-level partitioning into four equally sized transform blocks according to Table 1 is shown in 1504, with the coding order indicated by the arrows. All second-level partitioning of the first-level equal-sized block into 16 equally sized transform blocks according to Table 1 is shown in 1506, with the coding order indicated by the arrows.

[0132]

[0152] In some example implementations, the above restrictions on intra-coding may not apply for the luma component of an inter-coded block. For example, after the first level of transform division, any one of the sub-transform blocks may be further divided independently at another level. Thus, the resulting transform blocks may or may not be the same size. An example division of an inter-coded block into transform blocks in its coding order is shown in FIG. 16. In the example of FIG. 16, an inter-coded block 1602 is divided into transform blocks at two levels according to Table 1. At the first level, the inter-coded block is divided into four transform blocks of equal size. Then, only one of the four transform blocks (but not all of the transform blocks) is further divided into four sub-transform blocks, resulting in a total of seven transform blocks with two different sizes, as indicated by 1604. The coding order of these seven example transform blocks is indicated by the arrows at 1604 in FIG. 16.

[0133]

[0153] In some example implementations, for chroma components, some additional restrictions on the transform blocks may apply: for example, for chroma components, the transform block size can be as large as the coding block size but not smaller than a predefined size, such as 8x8.

[0134]

[0154] In some other example implementations, for coding blocks with width (W) or height (H) greater than 64, both luma and chroma coding blocks may be implicitly split into multiples of min(W,64) x min(H,64) and min(W,32) x min(H,32) transform units, respectively, where in this disclosure, "min(a,b)" may return the smaller value of a and b.

[0135]

[0155] Figure 17 further illustrates another alternative example scheme for partitioning a coding block or a prediction block into transform blocks. As shown in Figure 17, instead of using recursive transform partitioning, a predefined set of partitioning types may be applied to a coding block depending on the transform type of the coding block. In the particular example shown in Figure 17, one of six example partitioning types may be applied to split the coding block into various numbers of transform blocks. Such a scheme for generating transform block partitioning may be applied to a coding block or a prediction block.

[0136]

[0156] More specifically, the partitioning scheme of FIG. 17 provides up to six example partition types for any given transform type (transform type refers to the type of primary transform, such as ADST, for example). In this scheme, a transform partition type may be assigned for each coding block or predictive block, for example, based on rate-distortion cost. In one example, the transform partition type assigned to a coding block or predictive block may be determined based on the transform type of the coding block or predictive block. A particular transform partition type may correspond to a transform block division size and pattern, as shown by the six transform partition types illustrated in FIG. 17. The correspondence between various transform types and various transform partition types may be predefined. An example is shown below, where capitalized labels indicate transform partition types that may be assigned to a coding block or predictive block based on rate-distortion cost.

[0137]

[0157] ● PARTITION_NONE: Allocate a transformation size equal to the block size.

[0138]

[0158] ● PARTITION_SPLIT: Allocate a transformation size that is 1 / 2 the width of the block size and 1 / 2 the height of the block size.

[0139]

[0159] ● PARTITION_HORZ: Allocate a transform size that has the same width as the block size and 1 / 2 the height of the block size.

[0140]

[0160] ● PARTITION_VERT: Allocate a transformation size that has a width of 1 / 2 the block size and a height equal to the block size.

[0141]

[0161] ● PARTITION_HORZ4: Allocate a transformation size that has the same width as the block size and 1 / 4 of the height of the block size.

[0142]

[0162] ● PARTITION_VERT4: Allocates a transformation size that has a width of 1 / 4 of the block size and a height equal to the block size.

[0143]

[0163] In the above example, all transform partition types as shown in Figure 17 include uniform transform sizes for the partitioned transform blocks. This is by way of example only and not limitation. In some other implementations, mixed transform block sizes for the partitioned transform blocks of a particular partition type (or pattern) may be used.

[0144]

[0164] The PBs (or CBs, also called PBs when not further partitioned into predictive blocks) obtained from any of the above partitioning schemes may then become individual blocks for encoding via intra-prediction or inter-prediction. In the case of inter-prediction for the current PB, a residual between the current block and the predictive block may be generated, coded, and included in the coded bitstream.

[0145]

[0165] Inter prediction may be performed, for example, in a single reference mode or a mixed reference mode. In some implementations, a skip flag may be initially included in the bitstream for the current block (or at a higher level) to indicate whether the current block is inter-coded and whether it should not be skipped. If the current block is inter-coded, another flag may be further included in the bitstream as a signal to indicate whether a single reference mode or a mixed reference mode is used for predicting the current block. In a single reference mode, one reference block may be used to generate a prediction block for the current block. In a mixed reference mode, two or more reference blocks may be used to generate a prediction block, for example, by weighted averaging. A mixed reference mode may also be referred to as a two or more reference mode, a two-reference mode, or a multiple reference mode. One or more reference blocks may be identified using one or more reference frame indices and, additionally, using one or more corresponding motion vectors, which indicate a shift between the reference block and the current block in location relative to the frame, e.g., horizontal and vertical pixels. For example, the inter-predicted block for the current block may be generated from a single reference block identified by one motion vector in a reference frame as the predictive block in a single reference mode, while in a mixed reference mode, the predictive block may be generated by a weighted average of two reference blocks in two reference frames indicated by two reference frame indices and two corresponding motion vectors. The motion vectors may be coded and included in the bitstream in various manners.

[0146]

[0166] In some implementations, an encoding or decoding system may maintain a decoded picture buffer (DPB). Some images / pictures may be kept in the DPB waiting to be displayed (in the decoding system), and some images / pictures in the DPB may be used as reference frames to enable inter-prediction (in the decoding or encoding system). In some implementations, reference frames in the DPB may be tagged as short-term or long-term references for the current image being encoded or decoded. For example, short-term reference frames may include frames used for inter-prediction of blocks in the current frame or in a predefined number (e.g., two) of subsequent video frames closest to the current frame in decoding order. Long-term reference frames may include frames in the DPB that can be used to predict image blocks in frames that are more than a predefined number of frames away from the current frame in decoding order. Information about such tags for short-term and long-term reference frames may be called a Reference Picture Set (RPS) and may be added to the header of each frame in the encoded bitstream. Each frame in the encoded video stream may be identified by a Picture Order Counter (POC), which may be absolutely numbered according to the playback sequence or may relate to a group of pictures starting from, for example, an I-frame.

[0147]

[0167] In some example implementations, one or more reference picture lists including identification of short-term and long-term reference frames for inter prediction may be formed based on information in the RPS. For example, a single picture reference list may be formed for unidirectional inter prediction and denoted as L0 reference (or reference list 0), while two picture reference lists may be formed for bidirectional inter prediction and denoted as L0 (or reference list 0) and L1 (or reference list 1), for each of the two prediction directions. The reference frames included in the L0 and L1 lists may be ordered in various predetermined manners. The lengths of the L0 and L1 lists may be signaled in the video bitstream. Unidirectional inter prediction may be a single reference mode, or may be a mixed reference mode when multiple references for generating a prediction block by weighted averaging in a mixed prediction mode are on the same side of a frame. Bidirectional inter prediction may be the only mixed mode, since bidirectional inter prediction involves at least two reference blocks.

[0148]

[0168] In some implementations, a merge mode (MM) for inter prediction may be implemented. In general, in the merge mode, one or more of the motion vectors in single-reference prediction or the motion vectors in mixed-reference prediction for the current PB may be derived from other motion vectors rather than being calculated and signaled independently. For example, in an encoding system, the current motion vector of the current PB may be represented by the difference between the current motion vector and one or more other already-encoded motion vectors (referred to as reference motion vectors). Such a motion vector difference, rather than the entire current motion vector, may be encoded and included in the bitstream and linked to the reference motion vector. Correspondingly, in a decoding system, the motion vector corresponding to the current PB may be derived based on the decoded motion vector difference and the decoded reference motion vector linked thereto. As a specific form of merge mode (MM) inter prediction in general, such inter prediction based on the motion vector difference may be referred to as merge mode with motion vector difference (MMVD). Thus, MM in general, or MMVD in particular, may be implemented to exploit the correlation between motion vectors associated with different PBs to improve coding efficiency. For example, neighboring PBs may have similar motion vectors, and therefore the MVD may be small and efficiently codeable. As another example, motion vectors may be temporally correlated (between frames) for blocks that are similarly located / placed in space.

[0149]

[0169] In some example implementations, an MM flag may be included in the bitstream during the encoding process to indicate whether the current PB is in merge mode. Additionally or alternatively, an MMVD flag may be included during the encoding process and signaled in the bitstream to indicate whether the current PB is in MMVD mode. MM and / or MMVD flags or indicators may be provided at the PB level, CB level, CU level, CTB level, CTU level, slice level, frame level, picture level, sequence level, etc. As a specific example, both an MM flag and an MMVD flag may be included for the current CU, and the MMVD flag may be signaled immediately after the skip flag and MM flag to specify whether MMVD mode is used for the current CU.

[0150]

[0170] In some example implementations of MMVD, a list of reference motion vectors (RMVs), or MV predictor candidates for motion vector prediction, may be formed for the block being predicted. The list of RMV candidates may include a predetermined number (e.g., two) of MV predictor candidate blocks, and the motion vectors of the MV predictor candidate blocks may be used to predict the current motion vector. The RMV candidate blocks may include blocks selected from neighboring blocks in the same frame (called spatial motion vector predictors, or SMVPs) and / or temporal blocks (e.g., blocks located exactly in a following or subsequent frame of the current frame, called temporal motion vector predictors, or TMVPs). These options represent blocks in spatial or temporal locations relative to the current block that are likely to have a motion vector similar or identical to the current block. The size of the list of MV predictor candidates may be predetermined. For example, the list may include two or more candidates. To be on the list of RMV candidates, a candidate block may be required, for example, to have the same reference frame (or multiple reference frames) as the current block, must exist (e.g., a boundary check needs to be performed when the current block is near the edge of a frame), must have already been encoded during the encoding process, and / or must have already been decoded during the decoding process. In some implementations, the list of merge candidates may be populated with spatially neighboring blocks (scanned in a specific predefined order) first, if available and if they satisfy the above conditions, and then with temporal blocks if space is still available in the list. Neighboring RMV candidate blocks may be selected, for example, from the blocks to the left and top of the current block. The list of RMV predictor candidates may be dynamically formed at various levels (sequence, picture, frame, slice, superblock, etc.) as a dynamic reference list (DRL). The DRL may be signaled in the bitstream.

[0151]

[0171] In some implementations, the actual MV predictor candidate used as the reference motion vector for predicting the motion vector of the current block may be signaled. In the case where the RMV candidate list contains two candidates, a one-bit flag called a merge candidate flag may be used to indicate the selection of the reference merge candidate. If the current block is predicted in mixed mode, each of the multiple motion vectors predicted using the MV predictor may be associated with a reference motion vector from the merge candidate list. The encoder may determine which of the RMV candidates more closely predicts the MV of the current coding block and signal the selection as an index to the DRL.

[0152]

[0172] In some example implementations of MMVD, after an RMV candidate is selected and used as a base motion vector predictor for predicting a motion vector, a motion vector difference (MVD or delta MV representing the difference between the motion vector to be predicted and a reference candidate motion vector) may be calculated in the encoding system. Such MVD may include information representing the magnitude and direction of the MV difference, and both the magnitude and direction of the MV difference may be signaled in the bitstream. The magnitude and direction of the motion difference may be signaled in various ways.

[0153]

[0173] In some example implementations of MMVD, a distance index may be used to specify magnitude information of the motion vector difference and to indicate one of a set of predefined offsets that represent predefined motion vector differences from a starting point (reference motion vector). The MV offset according to the signaled index may then be added to the horizontal or vertical component of the start (reference) motion vector. Whether the horizontal or vertical component of the reference motion vector should be offset may be determined by the direction information of the MVD. An example predefined relationship between the distance index and the predefined offsets is specified in Table 2.

[0154] Table 2

[0155]

[0174] In some example implementations of the MMVD, a direction index may be further signaled and used to indicate the direction of the MVD relative to the reference motion vector. In some implementations, the direction may be limited to one of horizontal and vertical. An example 2-bit direction index is shown in Table 3. In the example of Table 3, the interpretation of the MVD may differ depending on the information of the start / reference MV. For example, when the start / reference MV corresponds to a uni-prediction block or a bi-prediction block where both reference frame lists point to the same side of the current picture (i.e., when the POCs of the two reference pictures are both greater than or both less than the POC of the current picture), the code in Table 3 may specify the sign (direction) of the MV offset added to the start / reference MV. When the start / reference MV corresponds to a bi-predictive block with two reference pictures on different sides of the current picture (i.e., the POC of one reference picture is larger than the POC of the current picture and the POC of the other reference picture is smaller than the POC of the current picture), and when the difference between the reference POC in picture reference list 0 and the current frame is larger than the difference between the reference POC in picture reference list 1 and the current frame, the code in Table 3 may specify the sign of the MV offset added to the reference MV corresponding to the reference picture in picture reference list 0, and the sign of the offset of the MV corresponding to the reference picture in picture reference list 1 may have the opposite value (the opposite sign of the offset). Otherwise, if the difference between the reference POC in picture reference list 1 and the current frame is larger than the difference between the reference POC in picture reference list 0 and the current frame, the code in Table 3 may specify the sign of the MV offset added to the reference MV associated with picture reference list 1, and the sign of the offset to the reference MV associated with picture reference list 0 has the opposite value.

[0156] [Table 3]

[0157]

[0175] In some example implementations, the MVD may be scaled according to the POC difference per direction. If the POC difference in both lists is the same, no scaling is required. Otherwise, if the POC difference in reference list 0 is larger than the one in reference list 1, the MVD for reference list 1 is scaled. If the POC difference in reference list 1 is larger than list 0, the MVD for list 0 may be scaled in the same manner. If the start MV is uni-predicted, the MVD is added to the available MV or reference MV.

[0158]

[0176] In some other example implementations of MV prediction, a harmonized scheme may be used to implement general merge-mode MMVD and some other types of MV prediction for both single-reference mode and mixed-reference mode MV prediction. Various syntax elements may be used to signal the manner in which the MV of the current block is predicted.

[0159]

[0177] For example, for a single reference mode, the following MV prediction modes may be signaled:

[0160]

[0178] NEARMV - Use one of the motion vector predictors (MVP) in the list directly pointed to by the DRL (Dynamic Reference List) index with no MVD at all.

[0161]

[0179] NEWMV - Use one of the motion vector predictors (MVP) in the list signaled by the DRL index as a reference and apply a delta to the MVP (e.g., using MVD).

[0162]

[0180] GLOBALMV - Use motion vectors based on frame-level global motion parameters.

[0163]

[0181] Similarly, if a mixed reference inter prediction mode uses two reference frames corresponding to the two MVs to be predicted, the following MV prediction modes may be signaled:

[0164]

[0182] NEAR_NEARMV - Use one of the motion vector predictors (MVPs) in the list signaled by the DRL index without MVD for each of two of the MVs to be predicted.

[0165]

[0183] NEAR_NEWMV - Use one of the motion vector predictors (MVP) in the list signaled by the DRL index as a reference MV without MVD to predict the first of two motion vectors, and use one of the motion vector predictors (MVP) in the list signaled by the DRL index as a reference MV with the additionally signaled delta MV (MVD) to predict the second of two motion vectors.

[0166]

[0184] NEW_NEARMV - Use one of the motion vector predictors (MVP) in the list signaled by the DRL index as a reference MV without MVD to predict the second of two motion vectors, and use one of the motion vector predictors (MVP) in the list signaled by the DRL index as a reference MV with the delta MV (MVD) signaled as an addition to predict the first of two motion vectors.

[0167]

[0185] NEW_NEWMV - Use one of the motion vector predictors (MVPs) in the list signaled by the DRL index as a reference MV and use this, together with the additionally signaled delta MV, to predict for each of the two MVs.

[0168]

[0186] GLOBAL_GLOBALMV - Use the MV from each reference based on its frame-level global motion parameters.

[0169]

[0187] Thus, the term "NEAR" above refers to MV prediction using a reference MV without any MVD as a general merge mode, while the term "NEW" refers to MV prediction using a reference MV and offsetting the reference MV with a signaled or derived MVD, as in the MMVD mode. In the case of hybrid inter prediction, for example, the two MVDs may be correlated, and although such correlation may be exploited to reduce the amount of information required to signal two motion vector deltas, both the reference-based motion vector and the motion vector delta may generally be different or unrelated between the two references or two MVDs. To exploit such correlation, joint signaling of the two MVDs may be implemented and indicated in the bitstream, as described in more detail below.

[0170]

[0188] In some example implementations of MVD, a predefined set of MVD pixel resolutions may be allowed. The allowed MVD pixel resolutions may be integer or fractional. For example, the allowable set of MVD pixel resolutions may include, but is not limited to, 8, 4, 2, 1, 1 / 2, 1 / 4, and 1 / 8 pixels. These pixel resolutions or precisions may be used adaptively. For example, an encoder may search all supported precision values ​​and identify the highest precision for encoding and signaling to a decoder. In some example implementations, the allowable resolutions may be organized into multiple frame-level maximum precision sets, such as the two precision sets shown below.

[0171] [Table 4]

[0172]

[0189] Moving on to entropy coding, various syntax elements of a video stream may be coded based on context-adaptive binary arithmetic coding (CABAC). In some other implementations, an M-ary arithmetic coding engine may be implemented to encode a sequence of multi-level symbols, rather than binary symbols. For example, each syntax element may be associated with an alphabet of M elements, where M can be any integer value, e.g., from 2 to 16. The input to the encoding is a sequence of M-ary symbols. The coding context may correspondingly consist of a set of M probabilities represented by a cumulative distribution function (CDF). The probabilities in the coding context may be updated after encoding / parsing each syntax element. The cumulative distribution function may be represented by an array of M 15-bit integers (in fixed-point precision) as follows: C=[c0,c1,...,c (M-2) ,2 15 ] (1)

[0173]

[0190] where c n / 32768 represents the probability of a symbol being less than or equal to n. In some example implementations, the probability update may be performed using the following equation:

[0174]

number

[0175]

[0191] where α is the probability update rate that is adapted based on the number of times a symbol is decoded (up to a maximum, e.g., 32), and m is the index of an element in the CDF. This adaptation of α allows for faster probability updates at the beginning of encoding / parsing a syntax element. The M-ary arithmetic coding process follows traditional arithmetic coding engine designs. However, in some example implementations, only the most significant bits, e.g., 9 bits, of a 15-bit probability value are input to the arithmetic encoder / decoder.

[0176]

[0192] In some example implementations, for each transform block, entropy coding of transform coefficients may start by coding an all_zero flag, which indicates whether all quantized transform coefficients in the transform block are zero. If the all_zero flag is signaled as 0, this may be followed by signaling a primary transform kernel type, an end-of-block (EOB) position, and a secondary transform kernel index. The transform coefficient values ​​may then be coded in multiple level maps along with their sign values. For example, the level map may be coded as three level planes, e.g., a low-level plane, a mid-level plane, and a high-level plane, and the signs of the transform coefficients may be coded as separate planes. The low-level plane, the mid-level plane, and the high-level plane may correspond to different ranges of coefficient magnitudes (e.g., 0 to 2, 3 to 14, and 15 or greater, respectively). In some example implementations, the three level planes may be coded as follows: After the EOB value is coded, the low-level plane and the mid-level plane may be coded together in a reverse scan order (the scan order refers to the scan applied to the transform coefficients of the current transform block). The scan order may be, but is not limited to, one of a zigzag scan, a diagonal scan, a horizontal scan, and a vertical scan, depending on the transform block size and the applied transform type. Then, the sign plane and the high-level plane may be coded together in a forward scan order. After that, the remainder (coefficient magnitude minus 14) may be entropy coded, for example, using an Exp-Golomb code.

[0177]

[0193] In some example implementations, the context model applied to low-level planes may depend on 1) the primary transform direction, i.e., one of bidirectional, horizontal, and vertical transform directions; 2) the transform block size; and 3) up to five neighboring transform domain coefficients. Mid-level planes may use similar context models, but the number of neighboring coefficients that determine the context may be reduced, for example, from five to two. High-level planes may be coded using Exp-Golomb codes without using context modeling. In the case of code planes, with the exception of the DC code, which may be coded using the DC code from a neighboring transform unit, the code values ​​of all other transform coefficients may be coded directly without using context modeling.

[0178]

[0194] Turning specifically to entropy coding of syntax elements related to inter-prediction modes, such syntax elements may be coded based on context-adaptive arithmetic coding. Such syntax elements may include, but are not limited to, an indicator for single-mode inter prediction (represented by "inter_single_mode"), an indicator for mixed-mode inter prediction (represented by "inter_comp_mode"), an indicator for optical flow mode (represented by "use_optical_flow"), and a dynamic motion vector reference list (DRL) index (represented by "drl_index") for specifying a motion vector predictor in the DRL with or without motion vector difference (MVD). Some of these syntax elements are binary. Others may be non-binary. For example, a DRL index for a DRL list longer than two may not be binary. Non-binary syntax elements may be binarized and coded based on two-symbol context-adaptive binary arithmetic coding or multi-symbol context-adaptive arithmetic coding.

[0179]

[0195] Each of these syntax elements for inter prediction may be coded using an appropriately selected context for optimal coding efficiency. In some implementations, a set of contexts may be provided for selection during the coding / decoding process of a particular syntax element. In some implementations, the number of possible contexts and their selection during the coding / decoding process of a prediction block may depend on the coding mode and coding information of spatially neighboring blocks of the current coding block within the same frame, or the temporal motion information of the current coding block, which reflects the statistical correlation between the coding mode and motion vectors of the spatially neighboring blocks of the current coding block and the coding mode and motion vectors of the current coding block.

[0180]

[0196] In some example implementations, the context derivation (including both the number of possible contexts and the selection of a particular context depending on the dynamic coding information) may be designed to be based on or derived from one or more context parameters, which may further depend on coding information related to spatially neighboring blocks and / or a temporal motion vector predictor of the current coding block.

[0181]

[0197] In some example implementations, a first context parameter, denoted "newmv_ctx," may be derived to represent an estimated likelihood that the current prediction (or transform) block uses motion vector prediction with both a motion vector predictor and a motion vector differential. A second context parameter, denoted "refmv_ctx," may be derived to represent an estimated likelihood that the current prediction (or transform) block directly uses a motion vector predictor without a motion vector differential. A third context parameter, denoted "zeromv_tx," may be derived to represent an estimated likelihood that the current prediction (or transform) block uses a global motion vector predictor.

[0182]

[0198] In some example implementations, these context parameters may be derived from the coding properties and information of spatially neighboring blocks and / or temporal motion vector predictor information of the current coding block. An example is shown in Figure 18. Figure 18 illustrates a coding block (e.g., a superblock) 1802, which may include multiple prediction or transform blocks distributed row-wise and column-wise. In the example of Figure 18, the coding block 1802 includes six rows and six columns of predictive blocks (predictive blocks are assumed to be the same as transform blocks and are referred to as "blocks"). Each block may be associated with a block location expressed as a pair of column and row coordinates (e.g., relative to the frame or other reference objects within the frame). The top-leftmost block 1806 may be associated with block coordinates (L, T). The top-rightmost block 1808 may be associated with block coordinates (R, T). The bottom-leftmost block 1810 may be associated with block coordinates (L, B). The bottom right block 1812 may be associated with block coordinates (R,B). The current block is associated with block coordinates (C col ,C row ) and is designated as 1804.

[0183]

[0199] In some implementations, a predefined or signaled set of spatial neighboring blocks of the current coding block 1802 may be scanned and examined to determine one or more of the above context parameters. The predefined or signaled locations of the set of neighboring blocks to be scanned and the order in which these blocks are scanned may be based on general statistics or real-time statistics of the correlation between the coding characteristics of the neighboring blocks and the coding characteristics of the current block 1804. In the example implementation illustrated in FIG. 18, the sets of neighboring blocks immediately to the left and immediately above the current coding block 1802 may be scanned in the order specified in FIG. 18. These are the nearest neighboring blocks that are coded / decoded before the current coding block 1802. The scanning of these nearest spatial neighboring blocks may follow the same manner as the scanning of an MVP list (DRL list structure), for example. For example, the scanning may follow the following order: 1. The next block 1820 at the bottom and immediately to the left of the coding block 1802, with block coordinates (L-1, B) 2. The neighboring block 1822 located immediately above and to the right of the coding block 1802 and having block coordinates (R, T-1) 3. The neighboring block 1824 located at the top and immediately to the left of the coding block 1802 and having block coordinates (L-1, T). 4. The neighboring block 1826 located immediately above and to the left of the coding block 1802 and having block coordinates (L, T-1) 5. The neighboring block 1828 immediately below and to the left of the lower left corner of the coding block 1802, having block coordinates (L-1, B-1). 6. The neighboring block 1830 immediately above and to the right of the upper right corner of the coding block 1802, with block coordinates (R-1, T-1). 7. The block in the same row as the current block 1804 and immediately to the left of the coding block 1802, with block coordinates (L-1, C row ) adjacent block 1832 8. The block in the same column as the current block 1804 and immediately above the coding block 1802, with block coordinates (C col , T-1)

[0184]

[0200] In some example implementations, a scan through these spatially neighboring blocks may be performed to check whether these blocks share at least one reference frame for inter-prediction with the current block 1804. The number of blocks among these neighboring blocks that share a reference frame with the current block 1804 may be tracked. The number of reference frame matching blocks in the left neighbor column (among blocks 1820, 1824, 1828, and 1832 of Figure 18) and in the above neighbor row (among blocks 1822, 1826, 1830, and 1834) may be tracked separately and are represented by col_match_count and row_match_count, respectively.

[0185]

[0201] In some example implementations, a scan through these spatially neighboring blocks immediately to the left and above may also be performed to check the number of these blocks that are inter-predicted based on MVD (e.g., blocks in which the new MV mode involves a motion vector predictor and MVD, as described above), the number or count being represented as newmv_count.

[0186]

[0202] In some example implementations, the reference frame matching parameters may be derived based on the row and column counts of the nearest neighboring block having a reference frame match with the current coding block 1804. For example, such reference frame matching parameters may be derived as follows: nearest_match=(row_match_count>0)+(col_match_count>0) (3)

[0187]

[0203] Here, the () operator returns "1" or "0" depending on whether the logical expression enclosed in the () operator is true or false, respectively. Therefore, nearest_match has three possible values ​​(0, 1, and 2) depending on the derivation above.

[0188]

[0204] In some example implementations, two of the above three context parameters, newmv_ctx and remv_ctx, may be derived from nearest_match and newmv_count. For example, as follows: newmv_ctx=2*nearest_match+(newmv_count>0) (4) refmv_ctx=2*nearest_match+(newmv_count<3) (5)

[0189]

[0205] In the above derivation, the "2*" operation is effectively a left bit shift. Therefore, newmv_ctx and refmv_ctx each have six possible values ​​(0-5).

[0190]

[0206] In some example implementations, to derive the third context parameter, a temporal motion vector prediction (TMVP) candidate (representing a global MV context) zeromv_ctx at the top-left position inside a spatially co-located coding block of the current coding block 1802 in a different time frame may be checked. If this TMVP candidate is not available or if one component (horizontal or vertical) of the motion vector difference between this TMVP candidate and the global MV is greater than a threshold (e.g., 2pel), the zeromv_ctx context parameter may be set to 1; otherwise, it may be set to 0.

[0191]

[0207] In some example implementations, the context for various inter-prediction related syntax elements may be derived based on one or more of the above context parameters. In particular, the coding context for syntax elements including, but not limited to, drl_index, inter_single_mode, inter_comp_mode, and use_optical_flow may be derived from one or more of these context parameters. For example, the coding context for these syntax elements may be derived according to newmv_ctx, refmv_ctx, and zeromv_ctx as follows: drl_index_ctx0=2*newmv_ctx+zeromv_ctx(12 possible contexts) (6) drl_index_ctx1=2*newmv_ctx+zeromv_ctx(12 possible contexts) (7) drl_index_ctx2=2*newmv_ctx+zeromv_ctx(12 possible contexts) (8) inter_single_mode_ctx=2*2*newmv_ctx+2*zeromv_ctx+isrefmv_ctx[refmv_ctx] (24 possible contexts) (9) Here, isrefmv[6]={0,0,1,0,1,0}. inter_comp_mode_ctx=comp_mode_ctx_map[refmv_ctx>>1][MIN(newmv_ctx,4)] (8 possible contexts) (10) where comp_mode_ctx_map[3][5]={ {0,1,1,1,1}, {1,2,3,4,4}, {4,4,5,6,7} } use_optical_flow_ctx=comp_mode_ctx_map[refmv_ctx>>1][MIN(newmv_ctx,4)] (8 possible contexts) (11) where comp_mode_ctx_map[3][5]={ {0,1,1,1,1}, {1,2,3,4,4}, {4,4,5,6,7} }

[0192]

[0208] In the above, it is assumed that drl_index includes three bits, and each of the three bits may be coded with a different context, as specified by drl_index_ctx0, drl_index_ctx1, and drl_index_ctx2. The values ​​derived above may be used to specify the context to be used for the corresponding syntax element or bit of the syntax element (e.g., as an index into a group of contexts). The number of possible context groups for each of the syntax elements is also indicated in the above equation.

[0193]

[0209] In the various example implementations above, there are a relatively large number of possible contexts for each of the various inter-prediction related syntax elements for the encoder / decoder to maintain. The complexity can negatively affect the efficiency of the parsing process. Furthermore, the scanning process in avoiding the various counts above is also of a certain complexity. To provide simplified example implementations that reduce the number of contexts or simplify the scanning process, the following additional disclosure is included.

[0194]

[0210] In some implementations, the third context parameter zeromv_ctx may not need to be derived, and correspondingly, the inter mode context derivations above may be modified to remove their dependency on zeromv_ctx, insofar as they depend on zeromv_ctx. For example, the coding context derivations for drl_index and inter_single_mode among various syntax elements may be modified to the following: drl_index_ctx0=newmv_ctx(6 possible contexts) (12) drl_index_ctx1=newmv_ctx(6 possible contexts) (13) drl_index_ctx2=newmv_ctx(6 possible contexts) (14) inter_single_mode_ctx=2*newmv_ctx+isrefmv_ctx[refmv_ctx] (12 possible contexts) (15) Here, isrefmv[6]={0,0,1,0,1,0}.

[0195]

[0211] The number of possible coding contexts for each of these syntax elements is therefore reduced two-fold: the "2*" operator for drl_index in equations (7) and (8), as well as one of the two "2*" operators in equation (9), are not needed and therefore, furthermore, are removed in the above implementation in equations (12)-(15) because they do not affect the number of possible contexts once the dependency on zeromv_ctx is removed.

[0196]

[0212] Furthermore, in the implementation of the above example, the inter single-mode context may be designed to be derived only according to newmv_ctx among the above context parameters. inter_single_mode_ctx=newmv_ctx(6 possible contexts) (16)

[0197]

[0213] This reduces the possible contexts for inter_single_mode from 12 or 24 to 6. Again, the double "2*" operator in equation (9) is unnecessary since it does not affect the number of possible contexts once the dependency on zeromv_ctx is removed.

[0198]

[0214] In some example implementations, the coding context for inter_comp_mode and / or use_optical_flow may be designed to be derived only depending on newmv_ctx. inter_comp_mode_ctx=newmv_ctx(6 possible contexts) (17) use_optical_flow_ctx=newmv_ctx(possible context) (18)

[0199]

[0215] This eliminates the mapping design in equations (10) and (11) and reduces the number of possible contexts for inter_comp_mode and use_optical_flow, respectively, from 8 to 6.

[0200]

[0216] In some example implementations, the drl_index context may be designed to be derived only depending on the newmv_ctx. drl_index_ctx0=newmv_ctx(6 possible contexts) (19) drl_index_ctx1=newmv_ctx(6 possible contexts) (20) drl_index_ctx2=newmv_ctx(6 possible contexts) (21)

[0201]

[0217] This achieves the same conclusion as for the design of equations (12-14) above: the drl_index context is designed to remove the dependency on zeromv_ctx, and the number of possible contexts, drl_index contexts, is reduced to 6 each. Again, the "2*" operator in drl_index in equations (7) and (8) is unnecessary because it does not affect the number of contexts in equations (20) and (21).

[0202]

[0218] In some example implementations, the coding context for various syntax elements related to inter-prediction modes may be designed to depend only on the mode information of spatial neighboring blocks. For example, among the context parameters of the three examples above, newmv_ctx and refmv_ctx depend on spatial neighboring blocks, while zeromv_ctx depends on TMVP information. Therefore, according to these implementations of the context design for various syntax elements related to inter-prediction modes, the dependency on newmv_ctx and refmv_ctx may be retained, while the dependency on zeromv_ctx may be removed. Unnecessary "2*" operators may also be removed as appropriate.

[0203]

[0219] In some example embodiments, the context design and selection for drl_index may be reduced by context encoding only the first N bits that need to be signaled or have unequal probability distributions, and encoding the remaining bits using equal probability, where N is a positive integer. For example, if N is equal to 2, only drl_index_ctx0 and drl_index_ctx1 are used, drl_index_ctx2 is discarded, and equal probability is used to encode drl_index[2]. The value of N can be predefined at both the encoder and decoder sides, or signaled in the bitstream in a high-level syntax.

[0204]

[0220] In some example implementations, a reduction in the number of possible contexts for various inter-prediction mode syntaxes may be achieved by a modified design for the derivation of the various parameters mentioned above, including but not limited to nearest_match. For example, the number of possible values ​​of nearest_match may be reduced. The number of possible values ​​of context parameters that depend on parameters such as newmv_ctx and refmv_ctx should be correspondingly reduced. For example, in some implementations, instead of calculating the sum of two Boolean values ​​regarding whether the top row and immediately left column of a neighboring block have at least one matched reference frame with the current block (i.e., equation (3), nearest_match=row_match_count>0)+(col_match_count>0)), an "OR" operation may be performed between these Boolean values, such as nearest_match=row_match_count>0) / / (col_match_count>0). In other words, in such example implementations, nearest_match becomes binary, having only two possible values: "0" or "1."

[0205]

[0221] Specifically, in some example implementations, the context parameters newmv_ctx and refmv_ctx may be derived as follows: nearest_match=(row_match_count>0)||(col_match_count>0) (22) newmv_ctx=2*nearest_match+(newmv_count>0) (23) refmv_ctx=2*nearest_match+(newmv_count<3) (24)

[0206]

[0222] This reduces the possible values ​​of newmv_ctx and refmv_ctx to 0-3 (4 possible values).

[0207]

[0223] In some example implementations, the possible values ​​of the newmv_ctx and refmv_ctx parameters may be further reduced by removing the "2*" operator above, by using the example derivation below. nearest_match=(row_match_count>0)||(col_match_count>0) (twenty five) newmv_ctx=nearest_match+(newmv_count>0) (26) refmv_ctx=nearest_match+(newmv_count<3) (27)

[0208]

[0224] This reduces the possible values ​​of newmv_ctx and refmv_ctx to 0 to 2 (3 possible values).

[0209]

[0225] In some further example implementations, the refmv_ctx parameter may be further simplified to remove its dependency on newmv_count. nearest_match=(row_match_count>0)||(col_match_count>0) (28) newmv_ctx=2*nearest_match+(newmv_count>0) (29-1) refmv_ctx=nearest_match (30-1)

[0210]

[0226] This further reduces the value of refmv_ctx to 0 to 1 (a binary with two possible values). The "2*" operator may or may not be included.

[0211]

[0227] Similarly, in some alternative example implementations, the newmv_ctx parameter may instead be further simplified to remove its dependency on newmv_count. nearest_match=(row_match_count>0)||(col_match_count>0) newmv_ctx=nearest_match (29-2) refmv_ctx=2*nearest_match+(newmv_count>0) (30-2)

[0212]

[0228] This further reduces the value of newmv_ctx to 0 to 1 (a binary with two possible values). The "2*" operator may or may not be included.

[0213]

[0229] In some alternative example implementations, during the derivation of newmv_ctx and refmv_ctx, instead of calculating a weighted sum of nearest_match and a Boolean value for whether newmv_count is greater than 0 or less than 3, an alternative derivation formula may be used to reduce the number of possible values ​​for the newmv_ctx and refmv_ctx context parameters.

[0214]

[0230] For example, newmv_ctx and refmv_ctx may be derived by removing the "2*" operator from equations (4) and (5) as follows: newmv_ctx=nearest_match+(newmv_count>0) (31) refmv_ctx=nearest_match+(newmv_count<3) (32)

[0215]

[0231] This reduces the possible values ​​to 0 to 3 (4 possible values) when nearest_match takes the above sum form for (row_match_count>0) and (col_match_count>0), and to 0 to 2 (3 possible values) when nearest_match takes the above OR form for (row_match_count>0) and (col_match_count>0).

[0216]

[0232] In some example implementations, the newmv_ctx and refmv_ctx context parameters may be derived by ORing rather than summing their derived components as follows: newmv_ctx=nearest_match||(newmv_count>0) (33) refmv_ctx=nearest_match||(newmv_count<3) (34)

[0217]

[0233] This makes them binary and reduces their possible values ​​to 0 to 1 (two possible values) when nearest_match takes the above OR form for (row_match_count>0) and (col_match_count>0). The above sum form of nearest_match for (row_match_count>0) and (col_match_count>0) may not be applicable due to the OR operation in equations (33) and (34).

[0218]

[0234] In some alternative example implementations, the newmv_ctx and refmv_ctx context parameters may be derived by removing their dependency on newmv_count. newmv_ctx=nearest_match (35) refmv_ctx=nearest_match (36)

[0219]

[0235] This reduces the possible values ​​to 0 to 2 (3 possible values) when nearest_match takes the sum form above for (row_match_count>0) and (col_match_count>0), and to 0 to 1 (2 possible values) when nearest_match is binary and takes the OR form above for (row_match_count>0) and (col_match_count>0).

[0220]

[0236] The implementations of the above examples provide ways to reduce the number of possible values ​​of various parameters used to derive context parameters. In some other example implementations, alternatively or additionally, the number of spatially neighboring blocks to be scanned may be reduced, and the order in which these blocks are scanned may be designed to reduce the scanning complexity and / or the number of possible values ​​of the various parameters for deriving coding context for syntax related to inter-prediction modes.

[0221]

[0237] In some example implementations, during the determination of col_match_count, row_match_count, and newmv_count above, only the first M adjacent spatial candidate blocks may be scanned, and the order in which the spatial candidate blocks are scanned may be predefined or signaled. M is a positive integer. The value of M may be predefined at both the encoder and decoder sides or signaled in the bitstream in a high-level syntax.

[0222]

[0238] For example, the scanning order of the M spatial candidates may be the same as the scanning order of the MVP list structure, as shown in FIG.

[0223]

[0239] For example, only the first M=2 candidates are scanned to derive newmv_ctx and refmv_ctx. As another example, only the first 4 candidates are scanned to derive newmv_ctx and refmv_ctx.

[0224]

[0240] Some example implementations may follow a scan order other than that shown in Figure 18. For example, the nearest neighbors in Figure 18 may be scanned in the order 2, 1, 4, 3 for M=4.

[0225]

[0241] In some example implementations, a value M may be applied to each scan of col_match_count, row_match_count, and newmv_count. For example, up to M nearest top-row neighbor blocks may be scanned to determine row_match_count. Similarly, up to M nearest left-row neighbor blocks may be scanned to determine col_match_count. Similarly, up to M nearest top-row and left columns of a neighbor block may be scanned to determine newmv_count in a predefined or signaled scan order. In some alternative implementations, M may be applied in aggregate for determining col_match_count and row_match_count. That is, the total number of top-rows and left columns of a neighbor block scanned to determine these counts may not exceed M. For example, if M=4, up to two top-rows of a neighbor block may be scanned to determine row_match_count, and up to two left columns of a neighbor block may be scanned to determine col_match_count.

[0226]

[0242] In some example implementations, the first M adjacent spatial candidate blocks may be scanned in a predefined or signaled scanning order to determine the parameters necessary to derive newmv_ctx and refmv_ctx. From the M scanned candidate blocks, K of them may be used to determine the parameters for deriving newmv_ctx, while L of them may be used to determine the parameters for deriving refmv_ctx. L and K may be positive integers not greater than M.

[0227]

[0243] Moving to the determination of the third context parameter zeromv_ctx related to TMVP, instead of setting the value of zeromv_ctx to "0" or "1," a TMVP at another position may be used by checking the TMVP candidate at the top-left position inside a spatially co-located coding block of the current coding block 1802 in Figure 18 in a different time frame to see if it is unavailable, and comparing one component (horizontal or vertical) of the motion vector difference between this TMVP candidate and the global MV to see if it is greater than a threshold value (e.g., 2pels). In some implementations, the TMVP corresponding to the top-left position of the current coding block and one or more TMVP candidates at the following positions may be checked for availability and compared to the global MV. 1. TMVP candidate in the central position 2. The TMVP candidate at the bottom right

[0228]

[0244] In some implementations, the TMVPs at one or more of the above-listed locations may be checked for availability and compared to the global MV to determine the zeromv_ctx parameter. In other words, any combination of the TMVs at the top-left, center, and bottom-right locations may be checked for availability and compared to the global MV to determine the zeromv_ctx parameter.

[0229]

[0245] FIG. 19 shows a flowchart 1900 of an example method according to the principles underlying the above implementation. The flow of the example method starts at S1901. At S1910, a flag indicating that a current predictive block is inter-predicted is received. At S1920, a first parameter is derived to quantify the extent to which the current predictive block shares a reference frame with a spatially neighboring predictive block of the current coding block. At S1930, a second parameter associated with the use of motion vector prediction within the spatially neighboring predictive block of the current coding block is further derived. At S1940, a coding context for at least one of a set of syntaxes associated with inter-prediction of the current predictive block is selected according to the first and second parameters, where selecting the coding context is independent of or further based on a derived value of any temporal motion vector prediction (TMVP) candidate block, and the set of syntaxes includes at least a dynamic motion vector reference list (DRL) index and a single-reference inter-prediction mode index. The example method stops at S1999.

[0230]

[0246] FIG. 20 shows a flowchart 2000 of an example method according to the principles underlying the above implementation. The flow of the example method starts at S2001. At S2010, a flag indicating that a current prediction block in a current coding block is inter-predicted is received. At S2020, the availability of one or more temporal motion vector prediction (TMVP) candidate blocks is checked, and context parameters are derived based on comparing a global motion vector with the available TMVP candidate blocks, and at least one of the one or more TMVP candidate blocks is spatially positioned at a position other than the top-leftmost position of the current coding block. At S2030, a coding context for syntax elements associated with inter-prediction of the current prediction block is selected according to the context parameters. The example method stops at S2099.

[0231]

[0247] In the embodiments and implementations of the present disclosure, any steps and / or operations may be combined or arranged in any quantity or order as desired. Two or more of the steps and / or operations may be performed in parallel. The embodiments and implementations of the present disclosure may be used separately or in combination in any order. Furthermore, each of the method (or embodiment), encoder, and decoder may be implemented by processing circuitry (e.g., one or more processors or one or more integrated circuits). In one example, the one or more processors execute a program stored on a non-transitory computer-readable medium. The embodiments of the present disclosure may apply to luma blocks or chroma blocks. The term "block" may be interpreted as a prediction block, a coding block, or a coding unit (CU). The term "block" here may also be used to refer to a transform block. In the following sections, when referring to a block size, the block size may refer to the block width or height, the maximum value of the width and height, the minimum value of the width and height, the area size (width * height), or the aspect ratio of the block (width:height or height:width).

[0232]

[0248] The techniques described above can be implemented as computer software using computer-readable instructions and physically stored on one or more computer-readable media. For example, Figure 21 illustrates a computer system (2100) suitable for implementing certain embodiments of the disclosed subject matter.

[0233]

[0249] Computer software can be coded using any suitable machine or computer language, which may be subjected to mechanisms such as assembling, compiling, linking, etc. to produce code comprising instructions that can be executed by one or more computer central processing units (CPUs), graphics processing units (GPUs), etc., either directly or through interpretation, microcode execution, etc.

[0234]

[0250] The instructions may be executable by various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smartphones, gaming devices, Internet of Things devices, and the like.

[0235]

[0251] 21 for computer system (2100) are exemplary in nature and are not intended to suggest any limitation as to the scope of use or functionality of the computer software implementing embodiments of the present disclosure. The arrangement of components should not be interpreted as having any dependency or requirement regarding any one or combination of components illustrated in the exemplary embodiment of computer system (2100).

[0236]

[0252] The computer system (2100) may include certain human interface input devices that can respond to input by one or more human users through, for example, tactile input (e.g., keystrokes, swipes, data glove movements), audio input (e.g., voice, clapping), visual input (e.g., gestures), or olfactory input (not shown). Human interface devices can also be used to capture certain media that are not necessarily directly related to conscious human input, such as audio (e.g., speech, music, ambient sounds), images (e.g., scanned images, photographic images obtained from a still-image camera), and video (e.g., two-dimensional video, three-dimensional video, including stereoscopic video).

[0237]

[0253] The input human interface devices may include one or more (only one of each depicted) of a keyboard (2101), a mouse (2102), a trackpad (2103), a touchscreen (2110), a data glove (not shown), a joystick (2105), a microphone (2106), a scanner (2107), and a camera (2108).

[0238]

[0254] The computer system (2100) may further include certain human interface output devices. Such human interface output devices may stimulate one or more of the human user's senses, for example, through tactile output, sound, light, and smell / taste. Such human interface output devices may include haptic output devices (e.g., haptic feedback via a touchscreen (2110), data gloves (not shown), or joystick (2105), although haptic feedback devices that do not function as input devices are also possible), audio output devices (such as speakers (2109), headphones (not shown)), visual output devices (such as screens (2110), to include CRT screens, LCD screens, plasma screens, and OLED screens, each with or without touchscreen input capability and each with or without haptic feedback capability—some of which may be capable of outputting two-dimensional visual output or three- or more-dimensional output through means such as stereoscopic output, virtual reality glasses (not shown), holographic displays, and smoke tanks (not shown)), and printers (not shown).

[0239]

[0255] The computer system (2100) may also include human-accessible storage devices and their associated media, such as optical media including CD / DVD ROM / RW (2120), including media such as CD / DVD (2121), thumb drives (2122), removable hard drives or solid state drives (2123), older magnetic media such as tape and floppy disks (not shown), and specialized ROM / ASIC / PLD-based devices (not shown) such as security dongles.

[0240]

[0256] Furthermore, those skilled in the art will understand that the term "computer-readable medium" as used in connection with the subject matter of this disclosure does not encompass transmission media, carrier waves, or other transient signals.

[0241]

[0257] The computer system 2100 may also include an interface 2154 to one or more communications networks 2155. For example, the network may be wireless, wireline, or optical. Furthermore, the network may be local, wide-area, metropolitan, vehicular, and industrial, real-time, delay-tolerant, and the like. Examples of networks include local area networks such as Ethernet; wireless LANs; cellular networks, such as to include GSM, 3G, 4G, 5G, LTE, and the like; TV wireline or wireless wide-area digital networks, such as to include cable TV, satellite TV, and terrestrial television broadcast; and vehicular and industrial networks, such as to include CAN buses. Particular networks generally require an external network interface adapter attached to a particular general-purpose data port or peripheral bus 2149 (e.g., a USB port on the computer system 2100); others are generally integrated into the core of the computer system 2100 by attachment to a system bus, as described below (e.g., an Ethernet interface to a PC computer system or a cellular network interface to a smartphone computer system). Using any of these networks, the computer system (2100) can communicate with other entities. Such communication can be one-way receive-only (e.g., television broadcast), one-way transmit-only (e.g., CANbus to a specific CANbus device), or bidirectional, e.g., to other computer systems using local or wide-area digital networks. Specific protocols and protocol stacks are available for use with each of these networks and network interfaces, as described above.

[0242]

[0258] The aforementioned human interface devices, human-accessible storage devices, and network interfaces may be attached to the core (2140) of the computer system (2100).

[0243]

[0259] The core (2140) may include one or more central processing units (CPUs) (2141), graphics processing units (GPUs) (2142), specialized programmable processing units (2143) in the form of field programmable gate areas (FPGAs), hardware accelerators for specific tasks (2144), graphics adapters (2150), etc. These devices may be connected through a system bus (2148), along with read-only memory (ROM) (2145), random access memory (2146), internal mass storage (2147) such as an internal non-user-accessible hard drive, SSD, etc. In some computer systems, the system bus (2148) may be accessible in the form of one or more physical plugs to allow expansion with additional CPUs, GPUs, etc. Peripheral devices may be attached directly to the core's system bus (2148) or through a peripheral bus (2149). In one example, the screen (2110) can be connected to a graphics adapter (2150). Peripheral bus architectures include PCI, USB, and the like.

[0244]

[0260] The CPU (2141), GPU (2142), FPGA (2143), and accelerator (2144) can execute specific instructions that can combine to make up the aforementioned computer code. This computer code can be stored in ROM (2145) or RAM (2146). Temporary data can also be stored in RAM (2146), while permanent data can be stored, for example, in internal mass storage (2147). Rapid storage and retrieval to and from any of the memory devices can be enabled through the use of cache memory, which can be closely associated with one or more of the CPU (2141), GPU (2142), mass storage (2147), ROM (2145), RAM (2146), etc.

[0245]

[0261] The computer-readable medium can bear computer code for performing various computer-executed operations. The medium and computer code can be those specially designed and constructed for the present disclosure, or they can be of the kind well known and available to those skilled in the computer software arts.

[0246]

[0262] As a non-limiting example, a computer system (2100) having an architecture, and specifically a core (2140), can provide functionality as a result of a processor (including a CPU, GPU, FPGA, accelerator, etc.) executing software embodied in one or more tangible computer-readable media. Such computer-readable media can be user-accessible mass storage, as introduced above, and media associated with specific storage of the core (2140) that is non-transitory in nature, such as the core's internal mass storage (2147) or ROM (2145). Software implementing various embodiments of the present disclosure can be stored in such devices and executed by the core (2140). The computer-readable media can include one or more memory devices or chips, depending on particular needs. The software can cause the core (2140) and specifically the core's processor (including a CPU, GPU, FPGA, etc.) to perform certain processes, or certain portions of certain processes, described herein, including defining data structures stored in RAM (2146) and modifying such data structures in accordance with the software-defined processes. Additionally or alternatively, a computer system may provide functionality as a result of logic hardwired or otherwise embodied in circuitry (e.g., accelerator (2144)) that can operate in place of or together with software to perform particular processes, or particular portions of particular processes, described herein. References to software may encompass logic, and vice versa, where appropriate. References to computer-readable media may encompass, where appropriate, circuitry (such as an integrated circuit (IC)) that stores software for execution, circuitry that embodies logic for execution, or both. The present disclosure encompasses any appropriate combination of hardware and software.

[0247]

[0263] While this disclosure has described several exemplary embodiments, there are alterations, permutations, and various substitute equivalents that are within the scope of this disclosure. It will thus be recognized that those skilled in the art will be capable of devising numerous systems and methods that, while not explicitly shown or described herein, embody the principles of the present disclosure and are therefore within the spirit and scope of the present disclosure.

[0248] Appendix A: Acronyms JEM: Joint Exploration Model ROM: Read-only memory VVC: Versatile Video Coding RAM: Random Access Memory BMS: Benchmark Set ASIC: Application Specific Integrated Circuit MV: Motion Vector PLD: Programmable Logic Device MVD: Motion Vector Difference LAN: Local Area Network MMVD: Merge mode with motion vector difference GSM: Global System for Mobile Communications HEVC: High Efficiency Video Coding LTE: Long Term Evolution SEI:Supplementary Enhancement Information CANBus: Controller Area Network Bus VUI: Video Usability Information USB: Universal Serial Bus GOP: Group of Pictures PCI: Peripheral Component Interconnect TU: Conversion unit FPGA: Field Programmable Gate Area PU: Prediction Unit SSD: Solid State Drive CU: Coding Unit IC: Integrated Circuit CTU: Coding Tree Unit JVET: Joint Video Exploration Team CTB: coding tree block SPS: Sequence Parameter Setting PB: Predicted Block PPS: Picture Parameter Set SB: Super Block APS: Calibration parameter set HRD: Hypothetical Reference Decoder VPS: Video Parameter Set SNR: Signal to Noise Ratio DPS: Decoding Parameter Set CPU: Central Processing Unit AV1 / 2:AOMedia Video 1 / 2 GPU: Graphics Processing Unit POC: Picture Order Count CRT: cathode ray tube RPS: Reference Picture Set LCD: Liquid crystal display DPB: Decoded Picture Buffer OLED: Organic Light Emitting Diode DVD: Digital Video Disc CD: Compact Disc [Explanation of symbols]

[0249] 101 points, sample 102 Arrow 103 Arrow 104 Square Blocks 180 Schematic 201 Current Block 300 Communication Systems 350 Network 310 Terminal Devices 320 terminal devices 330 Terminal Devices 340 Terminal Devices 400 Communication Systems 401 Video Source 402 Video picture or image stream, video picture stream 403 Video Encoder 404 Encoded Video Data, Encoded Video Bitstream 405 Streaming Server 406 Client Subsystem 407 Copy of encoded video data, encoded video data 408 Client Subsystem 409 Copy of encoded video data, encoded video data 410 Video Decoder 411 Video Picture Stream 412 Display 413 Video Capture Subsystem 420 Electronic Devices 430 Electronic Devices 501 Channel 510 Video Decoder 512 displays, rendering devices 515 buffer memory 520 Entropy Decoder / Parser, Parser 521 Symbol 530 Electronic Devices 531 Receiver 551 Scaler / Inverse Transformation Unit, Scaler / Inverse Transformation, Unit 552 intra picture prediction unit, intra prediction, intra prediction unit 553 Motion Compensated Prediction Unit, Motion Compensated Prediction 555 Aggregator 556 Loop filter unit, loop filter 557 Reference Picture Memory 558 Current Picture Buffer 601 Video Sources 603 Video Encoder 620 Electronic Devices 630 Source Coder 632 encoding engine 633 decoder, local video decoder, (local) decoder, decoding unit 634 Reference Picture Memory, Reference Picture Cache 635 Predictor 640 Transmitter 643 coded video sequence 645 Entropy Coder 650 Controller 660 Communication Channels 703 Video Encoder 721 General Controller 722 Intra Encoder 723 Residual Calculator 724 Residual Encoder 725 Entropy Encoder 726 Switch 728 Residual Decoder 730 Interencoder 810 Video Decoder 871 Entropy Decoder 872 Intra Decoder 873 Residual Decoder 874 Reconstruction Module, Reconstruction 880 Interdecoder 1002 "T-type" section, T-type pattern 1004 "T-type" section, T-type pattern 1006 "T-type" section, T-type pattern 1008 "T-type" section, T-type pattern 1010 All square plots 1102 Vertical binary fission, SPLIT_BT_VER 1104 Horizontal binary split, SPLIT_BT_HOR 1106 Vertical split into three, SPLIT_TT_VER 1108 Horizontal split into three, SPLIT_TT_HOR 1202 Square Plot, Plot 1204 Square Plot, Plot 1206 Square Plot, Plot 1208 Square Plot, Plot 1602 Inter-coded blocks 1802 coding blocks, superblocks 1804 current block 1806 Top left block 1808 Top right block 1810 Bottom left block 1812 Bottom right block 1820 Next block, block 1824 Next block, block 1826 Next block, block 1828 Next block, block 1830 Next block, block 1832 Next block, block 1834 Next block, block 2100 Computer Systems 2101 Keyboard 2102 Mouse 2103 Trackpad 2105 Joystick 2106 Microphone 2107 Scanner 2108 Camera 2109 Speaker 2110 Touchscreen, Screen 2120 CD / DVD ROM / RW 2121 CD / DVD and other media 2122 thumb drive 2123 Removable Hard Drive or Solid State Drive 2140 cores 2141 Central Processing Unit (CPU) 2142 Graphics Processing Unit (GPU) 2143 FPGA, Specialized Programmable Processing Unit 2144 ACCL, Hardware Accelerator, Accelerator 2145 Read-Only Memory (ROM) 2146 Random Access Memory, RAM 2147 Internal Mass Storage, Mass Storage, Core Internal Mass Storage 2148 System Bus 2149 Peripheral bus 2150 Graphics Adapter 2154 Interface, Network Interface 2155 Communication Network

Claims

1. 1. A method for decoding a current prediction block within a current coding block of a video stream, comprising: receiving a flag indicating that the current predicted block is inter predicted; deriving a first parameter to quantify the extent to which the current prediction block shares a reference frame with a spatially neighboring prediction block of the current coding block; deriving a second parameter associated with the use of motion vector prediction within the spatially neighboring predictive blocks of the current coding block; selecting a coding context for at least one of a set of syntaxes associated with the inter prediction of the current predictive block according to the first parameter and the second parameter, wherein the selecting of the coding context is independent of or further based on a derived value of any temporal motion vector prediction (TMVP) candidate block, and the set of syntaxes includes at least a dynamic motion vector reference list (DRL) index and a single-reference inter prediction mode indicator; A method comprising:

2. the first parameter, denoted "nearest_match", comprises a predefined collection of binary row reference frame matching indicators indicating whether there is a reference frame match between the current prediction block and at least one spatially neighboring prediction block in a row of prediction blocks immediately above the current coding block, and binary column reference frame matching indicators indicating whether there is a reference frame match between the current prediction block and at least one spatially neighboring prediction block in a column of prediction blocks immediately to the left of the current coding block; the second parameter, denoted "newmv_count", indicates the number of prediction blocks among the spatially neighboring prediction blocks of the current prediction block that have at least one motion vector predicted by at least one reference motion vector; The method of claim 1.

3. deriving a first context index, denoted "newmv_ctx", from the first and second parameters, where newmv_ctx=nearest_match+(newmv_count>0), wherein the () operator is configured to generate 1 and 0 when a logical expression enclosed by the () operator is true and false, respectively; selecting a set of coding contexts for the DRL index of the current predictive block depending on at least the first parameter and the second parameter via newmv_ctx; The method of claim 2 further comprising:

4. 4. The method of claim 3, wherein the selection of the set of coding contexts for the DRL index of the current predictive block according to the first parameter and the second parameter is via maxnewmv_ctx.

5. deriving a second context index, denoted "refmv_ctx", from the first and second parameters, where refmv_ctx=nearest_match+(newmv_count<A), where A is a predefined or signaled positive integer; in response to determining that the inter prediction of the current predictive block is a single-reference inter prediction mode, selecting a coding context for the single-reference inter prediction mode of the current predictive block according to the first parameter and the second parameter via a maximum of newmv_ctx and refmv_ctx; The method of claim 4 further comprising:

6. deriving a second context index, denoted "refmv_ctx", from the first and second parameters as follows: refmv_ctx=nearest_match+Boolean(newmv_count<A), where A is a predefined or signaled positive integer; in response to determining that the inter prediction of the current predictive block is a mixed reference inter prediction mode, selecting a coding context for the mixed reference inter prediction mode of the current predictive block according to the first parameter and the second parameter via a maximum of newmv_ctx and refmv_ctx; The method of claim 3 further comprising:

7. 4. The method of claim 3, further comprising: in response to determining that the inter prediction of the current predictive block is a single-reference inter prediction mode, selecting an encoding context for the single-reference inter prediction mode of the current predictive block according to the first parameter and the second parameter via maxnewmv_ctx.

8. 4. The method of claim 3, further comprising: in response to determining that the inter prediction of the current predictive block is a mixed reference inter prediction mode, selecting an encoding context for the mixed reference inter prediction mode of the current predictive block according to the first parameter and the second parameter via maxnewmv_ctx.

9. 4. The method of claim 3, further comprising: in response to determining that an optical flow mode is to be used for the current prediction block, selecting a coding context for the optical flow mode of the current prediction block depending on the first parameter and the second parameter via maxnewmv_ctx.

10. 3. The method of claim 2, wherein the derivation of the first parameter and the second parameter involves scanning M nearest left columns and nearest above rows of spatially neighboring predictive blocks of the current coding block in a predefined scan order, where M is a predefined or signaled positive integer.

11. 11. The method of claim 10, wherein the predefined scanning order of the nearest left column and the nearest above row of spatially neighboring predictive blocks follows: (L-1, B) → (R, T-1) → (L-1, T) → (L, T-1) → (L-1, B-1) → (L+1, T-1) → (L-1, C_row) → (C_column, T-1), where L, R, T, and B represent block coordinates of the left column, right column, top row, and bottom row of the current coding block, respectively, and C_row and C_column represent block coordinate positions of the current row and current column of the current predictive block, respectively.

12. 11. The method of claim 10, wherein M=2.

13. 11. The method of claim 10, wherein M=4.

14. 14. The method of claim 13, wherein the predefined scanning order of the nearest left column and the nearest top row of spatially neighboring prediction blocks follows (R, T-1) → (L-1, B) → (L, T-1) → (L-1, T), where L, R, T, and B represent block coordinates of the left column, right column, top row, and bottom row of the current coding block, respectively.

15. deriving a first context index, denoted "newmv_ctx", from the first and second parameters, where newmv_ctx=nearest_match+(newmv_count>0), wherein the () operator is configured to generate 1 and 0 when a logical expression enclosed by the () operator is true and false, respectively; deriving a second context index, denoted "refmv_ctx", from the first and second parameters, where refmv_ctx=nearest_match+(newmv_count<A), where A is a predefined or signaled positive integer; further comprising selecting the coding context for the at least one of the sets of syntaxes comprises selecting the context in response to newmv_ctx and refmv_ctx; the first and second parameters for deriving newmv_ctx are obtained by scanning up to L neighboring prediction blocks in the column immediately to the left and the row immediately above the current coding block; the first and second parameters for deriving refmv_ctx are obtained by scanning up to K neighboring prediction blocks in the immediately left column and the immediately above row of the current coding block; L and K are predefined or signaled positive integers not greater than M, a predefined or signaled positive integer; The method of claim 2.

16. 1. A method for processing a current prediction block within a current coding block of a video stream, comprising: receiving a flag indicating that the current predicted block is inter predicted; checking the availability of one or more temporal motion vector prediction (TMVP) candidate blocks and deriving context parameters based on comparing a global motion vector with available TMVP candidate blocks, wherein at least one of the one or more TMVP candidate blocks is spatially located at a position other than the top-leftmost position of the current coding block; determining a coding context for a syntax element associated with the inter prediction of the current predictive block in response to the context parameter; A method comprising:

17. 17. The method of claim 16, wherein the one or more TMVP candidate blocks include a single TMVP candidate block spatially located at a bottom right or center position of the current coding block.

18. the one or more TMVP candidate blocks include a plurality of TMVP candidate blocks spatially positioned at a bottom right-most position and a center position of the current coding block; the plurality of TMVP candidate blocks are checked for availability, and a first available TMVP candidate block is compared with the global motion vector to derive the context parameters.

17. The method of claim 16.

19. the one or more TMVP candidate blocks include a plurality of TMVP candidate blocks spatially positioned at a top-left position, a bottom-right position, and a center position of the current coding block; the plurality of TMVP candidate blocks are checked for availability, and a first available TMVP candidate block is compared with the global motion vector to derive the context parameters.

17. The method of claim 16.

20. A program causing at least one processor to carry out the method according to any one of claims 1 to 19.

21. 1. An electronic device for processing a current prediction block within a current coding block of a video stream, comprising: receiving a flag indicating that the current predicted block is inter predicted; deriving a first parameter to quantify the extent to which the current prediction block shares a reference frame with a spatially neighboring prediction block of the current coding block; deriving a second parameter associated with the use of motion vector prediction within the spatially neighboring predictive blocks of the current coding block; selecting a coding context for at least one of a set of syntaxes associated with the inter prediction of the current predictive block according to the first parameter and the second parameter, wherein selecting the coding context is independent of or further based on a derived value of any temporal motion vector prediction (TMVP) candidate block, and the set of syntaxes includes at least a dynamic motion vector reference list (DRL) index and a single-reference inter prediction mode index; and a processor for executing said instructions.