Patent Description:
Video coding and decoding can be performed using inter-picture prediction with motion compensation. Uncompressed digital video can include a series of pictures, each picture having a spatial dimension of, for example, <NUM> x <NUM> luminance samples and associated chrominance samples. The series of pictures can have a fixed or variable picture rate (informally also known as frame rate), of, for example <NUM> pictures per second or <NUM>. Uncompressed video has specific bitrate requirements. For example, 1080p60 <NUM>:<NUM>:<NUM> video at <NUM> bit per sample (1920x1080 luminance sample resolution at <NUM> frame rate) requires close to <NUM> Gbit/s bandwidth. An hour of such video requires more than <NUM> GBytes of storage space.

Compression can help reduce the aforementioned bandwidth and/or storage space requirements, in some cases by two orders of magnitude or more. Both lossless compression and lossy compression, as well as a combination thereof can be employed.

A video encoder and decoder can utilize techniques from several broad categories, including, for example, motion compensation, transform, quantization, and entropy coding.

Video codec technologies can include techniques 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, the picture is spatially subdivided into blocks of samples. When all blocks of samples are coded in intra mode, that picture can be an intra picture. Intra pictures and their derivations 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 a video session, or as a still image. The samples of an intra block can be exposed to a transform, and the transform coefficients can be quantized before entropy coding. Intra prediction can be a technique that minimizes sample values in the pre-transform domain. In some cases, the smaller the DC value after a transform is, and the smaller the AC coefficients are, the fewer the bits that are required at a given quantization step size to represent the block after entropy coding.

Traditional intra coding such as known from, for example MPEG-<NUM> generation coding technologies, does not use intra prediction. However, some newer video compression technologies include techniques that attempt, from, for example, surrounding sample data and/or metadata obtained during the encoding/decoding of spatially neighboring, and preceding in decoding order, blocks of data. Such techniques are henceforth called "intra prediction" techniques. Note that in at least some cases, intra prediction is using reference data only from the current picture under reconstruction and not from reference pictures.

There can be many different forms of intra prediction. When more than one of such techniques can be used in a given video coding technology, the technique in use can be coded in an intra prediction mode. In certain cases, modes can have submodes and/or parameters, and those can be coded individually or included in the mode codeword. Which codeword to use for a given mode/submode/parameter combination can have an impact in the coding efficiency gain through intra prediction, and so can the entropy coding technology used to translate the codewords into a bitstream.

A certain mode of intra prediction was introduced with H. <NUM>, refined in H. <NUM>, and further refined in newer coding technologies such as joint exploration model (JEM), versatile video coding (WC), and benchmark set (BMS). A predictor block can be formed using neighboring sample values belonging to already available samples. Sample values of neighboring samples are copied into the predictor block according to a direction. A reference to the direction in use can be coded in the bitstream or may itself be predicted.

The number of possible directions has increased as video coding technology has developed. <NUM> (year <NUM>), nine different direction could be represented. That increased to <NUM> in H. <NUM> (year <NUM>), and JEM/VVC/BMS, at the time of disclosure, can support up to <NUM> directions. Experiments have been conducted to identify the most likely directions, and certain techniques in the entropy coding are used to represent those likely directions in a small number of bits, accepting a certain penalty for less likely directions. Further, the directions themselves can sometimes be predicted from neighboring directions used in neighboring, already decoded, blocks.

The mapping of intra prediction directions bits in the coded video bitstream that represent the direction can be different from video coding technology to video coding technology; and can range, for example, from simple direct mappings of prediction direction to intra prediction mode, to codewords, to complex adaptive schemes involving most probable modes, and similar techniques. In all cases, however, there can be certain directions that are statistically less likely to occur in video content than certain other directions. As the goal of video compression is the reduction of redundancy, those less likely directions will, in a well working video coding technology, be represented by a larger number of bits than more likely directions.

In some video compression techniques, an MV applicable to a certain area of sample data can be predicted from other MVs, for example from those related to another area of sample data spatially adjacent to the area under reconstruction, and preceding that MV in decoding order. Doing so can substantially reduce the amount of data required for coding the MV, thereby removing redundancy and increasing compression. MV prediction can work effectively, for example, because when coding an input video signal derived from a camera (known as natural video) there is a statistical likelihood that areas larger than the area to which a single MV is applicable move in a similar direction and, therefore, can in some cases be predicted using a similar motion vector derived from MVs of neighboring area. That results in the MV found for a given area to be similar or the same as the MV predicted from the surrounding MVs, and that in turn can be represented, after entropy coding, in a smaller number of bits than what would be used if coding the MV directly. In some cases, MV prediction can be an example of lossless compression of a signal (namely: the MVs) derived from the original signal (namely: the sample stream). In other cases, MV prediction itself can be lossy, for example because of rounding errors when calculating a predictor from several surrounding MVs.

Various MV prediction mechanisms are described in <NPL>). Out of the many MV prediction mechanisms that H. <NUM> offers, described here is a technique henceforth referred to as "spatial merge".

Referring to <FIG>, a current block (<NUM>) comprises samples that have been found by the encoder during the motion search process to be predictable from a previous block of the same size that has been spatially shifted. Instead of coding that MV directly, the MV can be derived from metadata associated with one or more reference pictures, for example from the most recent (in decoding order) reference picture, using the MV associated with either one of five surrounding samples, denoted A0, A1, and B0, B1, B2 (<NUM> through <NUM>, respectively). <NUM>, the MV prediction can use predictors from the same reference picture that the neighboring block is using. Non-patent literature <NPL> discloses a method of video decoding at a video decoder, comprising determining a context index to determine a bin of a joint Cb Cr residual, JCCR, flag indicating whether residual samples for both Cb and Cr chroma components of the current CU are coded as a single transform block.

Aspects of the disclosure provide a first method of video decoding at a video decoder. The method can include determining a prediction mode of a current coding unit (CU) including an inter prediction mode and an intra prediction mode, and determining values of the following syntax elements of the current CU: a transform unit (TU) coded block flag of a Cb transform block, denoted tu_cbf_cb, indicating whether the Cb transform block contains one or more transform coefficient levels not equal to zero, and a TU coded block flag of a Cr transform block, denoted tu_cbf_cr, indicating whether the Cr transform block contains one or more transform coefficient levels not equal to <NUM>. The method can further include determining a context index, denoted ctxldx, based on the prediction mode of the current CU and the values of the tu_cbf_cb, and the tu_cbf_cr, and performing an arithmetic decoding process according to a context model indicated by the ctxIdx to determine a bin of a joint Cb Cr residual (JCCR) flag indicating whether residual samples for both Cb and Cr chroma components of the current CU are coded as a single transform block.

In an embodiment, the current CU is coded in the inter prediction mode, one of the Cb transform block and the Cr transform block contains transform coefficient levels that are all zero, and the residual samples for both the Cb and Cr chroma components of the current CU are coded as the single transform block.

In an embodiment, a prediction mode flag indicating whether the current coding unit is coded in the inter prediction mode or the intra prediction mode is received or inferred. In an embodiment, the prediction mode of the current CU is determined to be the intra prediction mode in response to that the current CU is coded with an intra block copy (IBC) mode, or a combined intra and inter prediction (CIIP) mode. In an embodiment, the TU coded block flag of the Cb transform block or the Cr transform block is received or inferred.

In an embodiment, the context index is determined according to one of the following (<NUM>)-(<NUM>) sets of expressions: <MAT> <MAT> <MAT> and <MAT> where isIntra represents a Boolean value that is true when the current CU is coded with the intra prediction mode, and false when the current CU is coded with the inter prediction mode.

In an embodiment, the context index is determined based on decoded information of a neighboring block of the current CU. In an example, the decoded information of the neighboring block of the current CU includes one or more of a prediction mode of the neighboring block, a TU coded block flag of a Cb transform block of the neighboring block, a TU coded block flag of a Cb transform block of the neighboring block, or a size of the neighboring block.

Aspects of the disclosure provide a second method of video decoding at a video decoder. The method can include determining a size of a current CU, determining a context index, denoted ctxIdx, based on the size of the current CU, and performing an arithmetic decoding process according to a context model indicated by the ctxldx to determine a bin of a joint Cb Cr residual (JCCR) flag indicating whether residual samples for both chroma components Cb and Cr of the current CU are coded as a single transform block.

In an embodiment, the size of the current CU is represented by one of a block width, a block height, a block area size, a sum of the block width and the block height, a maximum of the block width and the block height, or a minimum of the block width and the block height. In an example, a first context model is used when the block size of the current CU is smaller than a threshold, and a second context model is used when the block size of the current CU is greater than the threshold.

In an embodiment, the context index is derived based on the size of the current CU, a TU coded block flag of a Cb transform block, denoted tu_cbf_cb, of the current CU indicating whether the Cb transform block contains one or more transform coefficient levels not equal to zero, and a TU coded block flag of a Cr transform block, denoted tu_cbf_cr, of the current CU indicating whether the Cr transform block contains one or more transform coefficient levels not equal to <NUM>.

In an example, the context index is derived according to <MAT> where blocksize represents the size of the current CU, and K represents a threshold and is a positive integer.

Aspects of the disclosure also provide non-transitory computer-readable media storing instructions which when executed by computers for video decoding cause the computers to perform the methods for video decoding disclosed herein.

A streaming system may include a capture subsystem (<NUM>), that can include a video source (<NUM>), for example a digital camera, creating for example a stream of video pictures (<NUM>) that are uncompressed. In an example, the stream of video pictures (<NUM>) includes samples that are taken by the digital camera. The stream of video pictures (<NUM>), depicted as a bold line to emphasize a high data volume when compared to encoded video data (<NUM>) (or coded video bitstreams), can be processed by an electronic device (<NUM>) that includes a video encoder (<NUM>) coupled to the video source (<NUM>). The video encoder (<NUM>) can 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 (<NUM>) (or encoded video bitstream (<NUM>)), depicted as a thin line to emphasize the lower data volume when compared to the stream of video pictures (<NUM>), can be stored on a streaming server (<NUM>) for future use. One or more streaming client subsystems, such as client subsystems (<NUM>) and (<NUM>) in <FIG> can access the streaming server (<NUM>) to retrieve copies (<NUM>) and (<NUM>) of the encoded video data (<NUM>). A client subsystem (<NUM>) can include a video decoder (<NUM>), for example, in an electronic device (<NUM>). The video decoder (<NUM>) decodes the incoming copy (<NUM>) of the encoded video data and creates an outgoing stream of video pictures (<NUM>) that can be rendered on a display (<NUM>) (e.g., display screen) or other rendering device (not depicted). In some streaming systems, the encoded video data (<NUM>), (<NUM>), and (<NUM>) (e.g., video bitstreams) can be encoded according to certain video coding/compression standards. Examples of those standards include ITU-T Recommendation H. In an example, a video coding standard under development is informally known as Versatile Video Coding (WC). The disclosed subject matter may be used in the context of VVC.

During operation, in some examples, the source coder (<NUM>) may perform motion compensated predictive coding, which codes an input picture predictively with reference to one or more previously coded picture from the video sequence that were designated as "reference pictures. " In this manner, the coding engine (<NUM>) codes differences between pixel blocks of an input picture and pixel blocks of reference picture(s) that may be selected as prediction reference(s) to the input picture.

When the coded video data may be decoded at a video decoder (not shown in <FIG>), the reconstructed video sequence typically may be a replica of the source video sequence with some errors.

VVC Draft <NUM> (JVET-O2001-vE) supports a mode where the chroma residuals of Cb and Cr components are coded jointly. The usage (activation) of a joint Cb and Cr residual (JCCR) coding mode is indicated by a TU-level flag tu_joint_cbcr_residual_flag and a selected mode is implicitly indicated by chroma coded block flags (CBFs). The flag tu_joint_cbcr_residual_flag is present if either or both the chroma CBFs for a TU are equal to <NUM>. In a picture parameter set (PPS) and/or a slice header, JCCR chroma quantization parameter (QP) offset values are signaled for the joint chroma residual coding mode to differentiate from the chroma QP offset values signaled for regular chroma residual coding mode. These JCCR chroma QP offset values are used to derive chroma QP values for those blocks coded using the joint chroma residual coding mode.

Table <NUM> shows an example of construction of chroma residuals for three different joint chroma coding modes (or JCCR modes): Mode <NUM>, Mode <NUM>, and mode <NUM>. When Mode <NUM> is active in a TU, the respective JCCR chroma QP offset is added to the applied luma-derived chroma QP during quantization and decoding of that TU. For the other modes (Mode <NUM> and Mode <NUM> in Table <NUM>), the JCCR chroma QPs are derived in the same way as for conventional Cb or Cr blocks. A reconstruction process of chroma residuals (denoted resCb and resCr) from transmitted transform blocks is depicted in Table <NUM>. When the JCCR coding mode is activated, one single joint chroma residual block (denoted resJointC[x][y]) is signaled. A residual block for a Cb component (resCb) and a residual block for a Cr component (resCr) are derived considering information such as CBFs (denoted tu_cbf_cb, and tu_cbf_cr), and a CSign. The value CSign is a sign value (+<NUM> or -<NUM>), and specified in the slice header.

In an example, Modes <NUM>, <NUM>, and <NUM> are supported in intra coded CUs, while for in inter-coded CUs, only mode <NUM> is supported. Hence, in an example, for inter coded CUs, the syntax element tu_joint_cbcr_residual_flag is only present if both chroma CBFs are <NUM> (Mode <NUM> situation).

Related specification texts of the JCCR coding mode as described in the VVC draft version <NUM> are described below.

An example of syntax of a transform unit is shown in Table <NUM> and Table <NUM> from row <NUM> to row <NUM>. At rows <NUM>-<NUM>, when the JCCR coding mode is enabled at an SPS level, and when the transform unit is coded in an intra prediction mode and one of the two CBFs is of a value of one, or when both of the two CBFs are of a value of one, a tu_joint_cbcr_residual_flag is signaled.

Corresponding to the above transform unit syntax, transform unit semantics are defined as follows.

The syntax element tu_cbf_cb[ x0 ][ y0 ] equal to <NUM> specifies that the Cb transform block contains one or more transform coefficient levels not equal to <NUM>. The array indices x0, y0 specify the top-left location ( x0, y0 ) of the considered transform block. When tu_cbf_cb[ x0 ][ y0 ] is not present in the current TU, its value is inferred to be equal to <NUM>.

The syntax element tu_cbf_cr[ x0 ][ y0 ] equal to <NUM> specifies that the Cr transform block contains one or more transform coefficient levels not equal to <NUM>. The array indices x0, y0 specify the top-left location ( x0, y0 ) of the considered transform block. When tu_cbf_cr[ x0 ][ y0 ] is not present in the current TU, its value is inferred to be equal to <NUM>.

The syntax element tu_joint_cbcr_residual_flag[ x0 ][ y0 ] specifies whether the residual samples for both chroma components Cb and Cr are coded as a single transform block. The array indices x0, y0 specify the location ( x0, y0 ) of the top-left luma sample of the considered transform block relative to the top-left luma sample of the picture.

The syntax element tu_joint_cbcr_residual_flag[ x0 ][ y0 ] equal to <NUM> specifies that the transform unit syntax includes the transform coefficient levels for a single transform block from which the residual samples for both Cb and Cr are derived. The syntax element tu_joint_cbcr_residual_flag[ x0 ][ y0 ] equal to <NUM> specifies that the transform coefficient levels of the chroma components are coded as indicated by the syntax elements tu_cbf_cb[ x0 ][ y0 ] and tu_cbf_cr[ x0 ][ y0 ]. When tu_joint_cbcr_residual_flag[ x0 ][ y0 ] is not present, it is inferred to be equal to <NUM>.

Depending on tu_joint_cbcr_residual_flag[ x0 ][ y0 ], tu_cbf_cb[ x0 ][ y0 ], and tu_cbf_cr[ x0 ][ y0 ], the variable TuCResMode[ x0 ][ y0 ] can be derived as follows: If tu_joint_cbcr_residual_flag[ x0 ][ y0 ] is equal to <NUM>, the variable TuCResMode[ x0 ][ y0 ] is set equal to <NUM>; Otherwise, if tu_cbf_cb[ x0 ][ y0 ] is equal to <NUM> and tu_cbf_cr[ x0 ][ y0 ] is equal to <NUM>, the variable TuCResMode[ x0 ][ y0 ] is set equal to <NUM>; Otherwise, if tu_cbf_cb[ x0 ][ y0 ] is equal to <NUM>, the variable TuCResMode[ x0 ][ y0 ] is set equal to <NUM>; Otherwise, the variable TuCResMode[ x0 ][ y0 ] is set equal to <NUM>.

An example of a scaling and transform process is described below. Inputs to this process are: a luma location ( xTbY, yTbY ) specifying the top-left sample of the current luma transform block relative to the top-left luma sample of the current picture, a variable cIdx specifying the colour component of the current block, a variable nTbW specifying the transform block width, a variable nTbH specifying the transform block height. Output of this process is the (nTbW)x(nTbH) array of residual samples resSamples[ x ][ y ] with x = <NUM>. nTbW - <NUM>,
y = <NUM>. nTbH - <NUM>.

The variables bitDepth, bdShift and tsShift are derived as follows: <MAT> <MAT> <MAT>.

The variable codedCIdx is derived as follows: If cIdx is equal to <NUM> or TuCResMode[ xTbY ][ yTbY ] is equal to <NUM>, codedCIdx is set equal to cIdx. Otherwise, if TuCResMode[ xTbY ][ yTbY ] is equal to <NUM> or <NUM>, codedCIdx is set equal to <NUM>. Otherwise, codedCIdx is set equal to <NUM>.

The variable cSign is set equal to ( <NUM> - <NUM> * slice_joint_cbcr sign _flag).

The (nTbW)x(nTbH) array of residual samples resSamples is derived in the following four steps.

At step <NUM>, the scaling process for transform coefficients is invoked with the transform block location (xTbY, yTbY ), the transform width nTbW and the transform height nTbH, the colour component variable cIdx and the bit depth of the current colour component bitDepth as inputs, and the output is an (nTbW)x(nTbH) array of scaled transform coefficients d.

At step <NUM>, the (nTbW)x(nTbH) array of residual samples r is derived as follows: If transform_skip_flag[ xTbY ][ yTbY ][ cIdx ] is equal to <NUM>, the residual sample array values r[ x ][ y ] with with x = <NUM>. nTbW - <NUM>, y = <NUM>. nTbH - <NUM> are derived as follows: <MAT> Otherwise (transform_skip_flag[ xTbY ][ yTbY ][ cIdx ] is equal to <NUM>), the transformation process for scaled transform coefficients is invoked with the transform block location ( xTbY, yTbY ), the transform width nTbW and the transform height nTbH, the colour component variable cIdx and the (nTbW)x(nTbH) array of scaled transform coefficients d as inputs, and the output is an (nTbW)x(nTbH) array of residual samples r.

At step <NUM>, the residual samples resSamples[ x ][ y ] with x = <NUM>. nTbW - <NUM>, y = <NUM>. nTbH - <NUM> are derived as follows: <MAT>.

At step <NUM>, the residual samples resSamples[ x ][ y ] with x = <NUM>. nTbW - <NUM>, y = <NUM>. nTbH - <NUM> are derived as follows: If cIdx is equal to codedCIdx, the following applies: <MAT> Otherwise, if TuCResMode[ xTbY ][ yTbY ] is equal to <NUM>, the following applies: <MAT> Otherwise, the following applies: <MAT>.

An example of a binarization process is described below. Input to this process is a request for a syntax element. Output of this process is the binarization of the syntax element.

Table <NUM> specifies the type of binarization process associated with each syntax element and corresponding inputs. As shown, the truncated Rice (TR) binarization process and the fixed-length (FL) binarization process can be employed.

In a derivation process, variables of ctxTable, ctxIdx and bypassFlag can be determined. For example, based on the position of the current bin within the bin string, binIdx, ctxTable, ctxIdx and bypassFlag can be output from the derivation process. Table <NUM> shows examples of syntax elements and bypassFlag or ctxIdx corresponding to each bin of the respective syntax elements. For example, as shown at the bottom of Table <NUM>, the syntax element tu_joint_cbcr_residual_flag can include one bin. A context model index (ctxIdx) can be determined according to: <MAT> As the CBF syntax elements tu_cbf_cb or tu_cbf_cr can each have a value of <NUM> or <NUM>, the context model index can be one of the following three values: <NUM>, <NUM>, or <NUM>, which correspond to three context models. It is noted that when both tu_cbf_cb and tu_cbf_cr are of zero values, the syntax element tu_joint_cbcr_residual_flag is not signalled.

For hybrid block based video coding, motion compensation from a different picture (inter picture motion compensating) is well known. Similarly, motion compensation can also be performed from a previously reconstructed area within the same picture. This is referred to as intra picture block compensation, current picture referencing (CPR), or intra block copy (IBC). In IBC, a displacement vector that indicates an offset between a current block and a reference block is referred to as a block vector (BV). Different from a motion vector in motion compensation from a different picture, which can be at any value (positive or negative, at either x or y direction), a block vector has a few constraints such that it is ensured that the pointed reference block is available and already reconstructed. Also, for parallel processing consideration, some reference area that is a tile boundary or a wavefront ladder shape boundary is also excluded for IBC.

The coding of a block vector can be either explicit or implicit. In the explicit mode (or referred to as advanced motion vector prediction (AMVP) mode in inter coding), the difference between a block vector and its predictor is signaled; in the implicit mode, the block vector is recovered purely from its predictor, in a similar way as a motion vector obtained in merge mode. The resolution of a block vector, in some implementations, is restricted to integer positions; in other systems, it may be allowed to point to fractional positions.

In an embodiment, the use of IBC at block level can be signaled using a block level flag, referred to as an IBC flag. In an example, the IBC flag is signaled when the current block is not coded in merge mode. In another example, the use of IBC can be signaled by a reference index approach, and the current decoded picture is treated as a reference picture. For example, in HEVC Screen Content Coding (SCC), such a reference picture is put in the last position of a reference picture list. This special reference picture is also managed together with other temporal reference pictures in a decoded picture buffer (DPB).

There are also some variations for intra block copy, such as flipped intra block copy (the reference block is flipped horizontally or vertically before used to predict current block), or line based intra block copy (each compensation unit inside an MxN coding block is an Mx1 or 1xN line).

<FIG> shows an example of intra picture block compensation. A picture (<NUM>) under processing (referred to as a current picture) is partitioned into CTUs (<NUM>-<NUM>). The CTUs (<NUM>-<NUM>) have been decoded. The current CTU (<NUM>) is under processing. To decode a IBC-coded current block (<NUM>) in the current CTU (<NUM>), a block vector (<NUM>) can first be determined. Based on the block vector (<NUM>), a reference block (<NUM>) (also referred to as a prediction block or a predictor block) in the CTU (<NUM>) can be located. Accordingly, the current block (<NUM>) can be reconstructed by combining the reference block (<NUM>) with a residual of the current block (<NUM>). As shown, the reference block (<NUM>) and the current block (<NUM>) reside in the same current picture (<NUM>).

<FIG> shows a CU (<NUM>). In an embodiment, when the CU is coded in merge mode, if the CU (<NUM>) contains at least <NUM> luma samples (e.g., a CU width times a CU height is equal to or larger than <NUM>), and if both the CU width and the CU height are less than <NUM> luma samples, an additional flag is signalled to indicate if a combined inter/intra prediction (CIIP) mode is applied to the current CU (<NUM>). As its name indicates, the CIIP prediction combines an inter prediction signal with an intra prediction signal. The inter prediction signal in the CIIP mode Pinter is derived using the same inter prediction process applied to regular merge mode. The intra prediction signal Pintra is derived following the regular intra prediction process with the planar mode. Then, the intra and inter prediction signals are combined using weighted averaging. The weight value is calculated depending on the coding modes of a top and left neighboring blocks (<NUM> and <NUM>) of the CU(<NUM>).

For example, the weight value can be calculated as follows. If the top neighbor is available and intra coded, then set isIntraTop to <NUM>, otherwise set isIntraTop to <NUM>. If the left neighbor is available and intra coded, then set isIntraLeft to <NUM>, otherwise set isIntraLeft to <NUM>. If (isIntraLeft + isIntraLeft) is equal to <NUM>, then the weight value (denoted wt) is set to <NUM>. Otherwise, if (isIntraLeft + isIntraLeft) is equal to <NUM>, then wt is set to <NUM>. Otherwise, set wt to <NUM>.

In an example, the CIIP prediction can be formed as follows: <MAT>.

In some embodiments, the three JCCR modes (Modes <NUM>-<NUM>) as defined in Table <NUM> are applied to both inter coded CUs and intra coded CUs. Specifically, each of the Modes <NUM>-<NUM> can be applied to inter coded CUs, and each of the Modes <NUM>-<NUM> can be applied to inter coded CUs.

For example, for an inter coded CU, when the tu_cbf_cb and tu_cbf_cr of the CU have values of <NUM> and <NUM> respectively (Mode <NUM> situation), or values of <NUM> and <NUM> respectively (Mode <NUM> situation), JCCR processing can still be applied to the inter coded CU. For example, corresponding to rows <NUM>-<NUM> of the transform unit syntax in Table <NUM>, to apply Mode <NUM> and Mode <NUM> to the inter coded CU, the syntax in row <NUM> can be revised to allow signaling of the TU level JCCR activation flag, tu_joint_cbcr_residual_flag, when one of the tu_cbf_cb and tu_cbf_cr has a zero value.

In some embodiments, the JCCR mode can be applied to a CU coded in IBC mode, or a CU coded in CIIP mode. An JCCR activation flag can be signaled for the IBC coded CU or the CIIP coded CU. In some embodiments, for entropy coding of the CU coded in IBC mode or CIIP mode, the IBC mode and the CIIP mode can be treated as an intra prediction mode for selecting a context model.

In an embodiment, for entropy coding (encoding or decoding) a TU level JCCR activation flag, tu_joint_cbcr_residual_flag, of a current block (or current CU), a context model can be selected from a set of candidate context models each associated with a context index (denoted ctxldx). The selection can depend on previously coded (encoded or decoded) information of the current block. The previously coded information can include a prediction mode of the current block, and CBFs of the current block.

The prediction mode of the current block can include an inter prediction mode and an intra prediction mode. When the current block is coded with a IBC mode or a CIIP mode, the current block is treated as being coded with an intra prediction mode. The prediction mode of the current block can be determined according to a syntax element previously parsed from a bitstream. Or, when the syntax element is not available (not present in the bitstream), a value of the respective syntax element can be inferred.

In an example, during a decoding process of processing the current block, a prediction mode of the current block can be determined. For example, a syntax element (e.g., a prediction mode flag, denoted pred_mode_flag) indicating whether the current block (or CU) is coded with an inter prediction mode or an intra prediction mode can be received and parsed from a bitstream. For example, pred_mode_flag equal to <NUM> specifies that the current coding unit is coded in inter prediction mode, while pred_mode_flag equal to <NUM> specifies that the current coding unit is coded in intra prediction mode.

Or, when the syntax element indicating the prediction mode is not signaled, a value of the syntax element can be inferred. In an example, when pred_mode_flag is not present, it is inferred as follows. If a width of the current block (denoted cbWidth) is equal to <NUM> and a height of the current block (cbHeight) is equal to <NUM>, pred_mode_flag is inferred to be equal to <NUM>. Otherwise, if modeType is equal to MODE_TYPE_INTRA, pred_mode_flag is inferred to be equal to <NUM>. Otherwise, if modeType is equal to MODE_TYPE_INTER, pred_mode_flag is inferred to be equal to <NUM>. Otherwise, pred_mode_flag is inferred to be equal to <NUM> when decoding an I slice, and equal to <NUM> when decoding a P or B slice, respectively.

In an example, the current block is coded with the ICP mode. Accordingly, an syntax element, denoted pre _mode ibc _flag, can be received or parsed from the bitstream. pred_mode_ibc_flag equal to <NUM> specifies that the current coding unit is coded in IBC prediction mode. pred_mode_ibc_flag equal to <NUM> specifies that the current coding unit is not coded in IBC prediction mode. Similarly, when pred_mode_ibc _flag is not present, the pred _mode_ibc _flag can be inferred.

In an example, the current block is coded with the CIIP mode. Accordingly, an syntax element, denoted ciip _flag, can be received or parsed from the bitstream. ciip_flag[ x0 ][ y0 ] specifies whether the combined inter-picture merge and intra-picture prediction is applied for the current coding unit. The array indices x0, y0 specify the location ( x0, y0 ) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. When ciip_flag[ x0 ][ y0 ] is not present, the ciip_flag can be inferred.

In addition, CBFs of the current block can be determined or inferred. For example, a first TU CBF of a Cb transform block of the current block, denoted tu_cbf_cb, can be received and parsed from the bitstream. The Cb CBF can indicate whether the Cb transform block contains one or more transform coefficient levels not equal to zero. In an example, tu_cbf_cb[ x0 ][ y0 ] equal to <NUM> specifies that the Cb transform block contains one or more transform coefficient levels not equal to <NUM>. The array indices x0, y0 specify the top-left location ( x0, y0 ) of the considered transform block. When tu_cbf_cb[ x0 ][ y0 ] is not present in the current TU, a value of the Cb CBF is inferred to be equal to <NUM>.

Similarly, a second TU coded block flag of a Cr transform block of the current block, denoted tu_cbf_cr, can be received and parsed from the bitstream. The Cr CBF can indicate whether the Cr transform block contains one or more transform coefficient levels not equal to <NUM>. In an example, tu_cbf_cr[ x0 ][ y0 ] equal to <NUM> specifies that the Cr transform block contains one or more transform coefficient levels not equal to <NUM>. The array indices x0, y0 specify the top-left location ( x0, y0 ) of the considered transform block. When tu_cbf_cr[ x0 ][ y0 ] is not present in the current TU, a value of the Cr CBF is inferred to be equal to <NUM>.

In an embodiment, for entropy coding (encoding or decoding) the tu_joint_cbcr_residual_flag, of the current block (or current CU), the context model can be determined based on the prediction mode of the current block, and the CBFs of the current block.

In a first example, the context index of tu_joint_cbcr_residual_flag, denoted contextIdx (or ctxIdx), can be calculated by the following expression: <MAT> The variable isIntra equals <NUM> when the current block is coded with an intra prediction mode, or <NUM> when the current block is coded with an inter prediction mode. Corresponding to different combinations of different values of the CBFs and the prediction modes, there can be <NUM> context indices (from <NUM> to <NUM>) corresponding to <NUM> candidate context models. In the present disclosure, contextIdx and ctxIdx are used interchangeably to refer to a context index.

In a second example, the context index of tu_joint_cbcr_residual_flag can be calculated by the following expressions: <MAT> <MAT> Corresponding to different combinations of different values of the CBFs and the prediction modes, there can be <NUM> context indices (from o to <NUM>) corresponding to <NUM> candidate context models.

In a third example, the context index of tu_joint_cbcr_residual_flag can be calculated by the following expressions: <MAT> <MAT> Corresponding to different combinations of different values of the CBFs and the prediction modes, there can be <NUM> context indices (from <NUM> to <NUM>) corresponding to <NUM> candidate context models.

In a fourth example, the context index of tu_joint_cbcr_residual_flag can be calculated by the following expressions: <MAT> <MAT> Corresponding to different combinations of different values of the CBFs and the prediction modes, there can be <NUM> context indices (from <NUM> to <NUM>) corresponding to <NUM> candidate context models.

In some embodiments, for entropy coding (encoding or decoding) the tu_joint_cbcr_residual_flag, of the current block (or current CU), the context model can be determined based on coded information of neighboring blocks of the current block. For example, the coded information of the neighboring blocks can include prediction modes and CBFs of the neighboring blocks.

In some embodiments, for entropy coding (encoding or decoding) the tu_joint_cbcr_residual_flag, of the current block (or current CU), the context model can be determined based on coded information of the current block and/or the neighboring blocks of the current block.

In an embodiments, for entropy coding (encoding or decoding) a TU level JCCR activation flag, tu_joint_cbcr_residual_flag, of a current block (or current CU), a context model can be selected from a set of candidate context models each corresponding to a context index (denoted ctxldx). The selection can depend on a block size of the current block. For example, the block size can be indicated by a block width, a block height, a block area size, a sum of the block width and height, a maximum of the block width and height, a minimum of the block width and height, and the like.

For example, applying the JCCR mode to different blocks with different block sizes can lead to different coding efficiency and computation cost. Accordingly, blocks with different sizes may have different probabilities of activation of the JCCR mode. By determining the context model based on the block size can improve the entropy coding efficiency of the TU level JCCR activation flag.

In an example, a threshold K of a block size is employed for determination of a context index. For example, when the block size of the current block is smaller than the threshold K, a first context is used. Otherwise, a second context is used.

In an embodiment, selection of a context model for entropy coding of a current block can depend on a size of the current block as well as previously coded (encoded or decoded) information of the current block. The previously coded information can include a prediction mode of the current block, and CBFs of the current block.

In an example, a context index of a tu_joint_cbcr_residual_flag of the current block can be calculated by the following expression: <MAT> K represents a threshold, and can be a positive integer, such as <NUM> or <NUM>. Accordingly, there can be <NUM> candidate context models: <NUM> candidates when the block size is smaller than K, and <NUM> other candidates when the block size is greater than or equal to K.

<FIG> shows a flow chart outlining a decoding process (<NUM>) according to an embodiment of the disclosure. By performing the process (<NUM>), a TU level JCCR activation flag can be parsed from a bitstream. According to the TU level JCCR activation flag, residual blocks of Cb and Cr chroma components can be determined for a block under reconstruction. In various embodiments, the process (<NUM>) are executed by processing circuitry, such as the processing circuitry in the terminal devices (<NUM>), (<NUM>), (<NUM>) and (<NUM>), the processing circuitry that performs functions of the video decoder (<NUM>), the processing circuitry that performs functions of the video decoder (<NUM>), and the like. In some embodiments, the process (<NUM>) is implemented in software instructions, thus when the processing circuitry executes the software <NUM> instructions, the processing circuitry performs the process (<NUM>). The process starts at (S1001) and proceeds to (S1010).

At (S1010), a prediction mode of a current CU can be determined. The prediction mode can include an inter prediction mode and an intra prediction mode. For example, a prediction mode flag indicating whether the current coding unit is coded in the inter prediction mode or the intra prediction mode can be received in a bitstream. Or, when the prediction mode is not present in the bitstream, a value of the prediction mode flag can be inferred. When the current CU is coded with an IBC mode or a CIIP mode, the current CU is treated as being coded with an intra prediction mode in an embodiment.

At (S <NUM>), values of CBFs of the current CU can be determined. Each of the Cb and Cr CBFs can have a value of <NUM> or zero. For example, a TU coded block flag of a Cb transform block, denoted tu_cbf_cb, can be received or inferred. The tu_cbf_cb can indicate whether the Cb transform block contains one or more transform coefficient levels not equal to zero. For example, a TU coded block flag of a Cr transform block, denoted tu_cbf_cr, can be received or inferred. The tu_cbf_cr can indicate whether the Cr transform block contains one or more transform coefficient levels not equal to <NUM>.

At (S1030), a context index, denoted ctxldx, can be determined based on the prediction mode of the current CU and the values of the tu_cbf_cb, and the tu_cbf_cr. For example, the context index can be determined according to one of the following (<NUM>)-(<NUM>) sets of expressions: <MAT> <MAT> <MAT> and <MAT> where isIntra represents a Boolean value that is true when the current CU is coded with the intra prediction mode, and false when the current CU is coded with the inter prediction mode.

At (S <NUM>), an arithmetic decoding process can be performed according to a context model indicated by the ctxIdx determined at (S1030). During the arithmetic decoding process, a bin of a joint Cb Cr residual (JCCR) flag can be parsed from the bitstream that indicate whether a JCCR mode is applied (whether residual samples for both Cb and Cr chroma components of the current CU are coded as a single transform block). When the JCCR flag indicates the JCCR mode is applied to the current CU, the Cb and Cr residual blocks of the current CU can be reconstructed based on the single transform block, for example, in a way as described in Table <NUM>. When the JCCR flag indicates no JCCR mode is used, the Cb and Cr residual blocks of the current CU can be obtained separately. The process <NUM> can proceed to (S1099), and terminate at (S1099).

<FIG> shows a flow chart outlining a decoding process (<NUM>) according to an embodiment of the disclosure. By performing the process (<NUM>), a TU level JCCR activation flag can be parsed from a bitstream. According to the TU level JCCR activation flag, residual blocks of Cb and Cr chroma components can be determined for a block under reconstruction. In various embodiments, the process (<NUM>) are executed by processing circuitry, such as the processing circuitry in the terminal devices (<NUM>), (<NUM>), (<NUM>) and (<NUM>), the processing circuitry that performs functions of the video decoder (<NUM>), the processing circuitry that performs functions of the video decoder (<NUM>), and the like. In some embodiments, the process (<NUM>) is implemented in software instructions, thus when the processing circuitry executes the software instructions, the processing circuitry performs the process (<NUM>). The process starts at (S1101) and proceeds to (S1110).

At (S1110), a size of a current CU can be determined based on one or more syntax elements received in a bitstream. For example, the one or more syntax element parsed from the bitstream can indicate a width, a height, or an area of the current CU, for example, in number of samples. The size of the current CU can be represented by the block width, the block height, a block area size (e.g., the block width multiplying the block height), a sum of the block width and the block height, a maximum of the block width and the block height, or a minimum of the block width and the block height of the current CU.

At (S1120), a context index, denoted ctxldx, can be determined based on the size of the current CU. In an example, a size threshold is used. A ctxIdx of a first context model is used when the block size of the current CU is smaller than the threshold. Another ctxIdx of a second context model is used when the block size of the current CU is greater than the threshold.

In an example, the context model is determined based on the size of the current CU as well as CBFs of the current CU. For example, the context index can be determined according to <MAT> where blocksize represents the size of the current CU, and K represents a threshold and is a positive integer.

At (S1130), an arithmetic decoding process can be performed according to a context model indicated by the ctxIdx determined at (S1120). During the process, a bin of a JCCR flag can be determined that indicates whether residual samples for both chroma components Cb and Cr of the current CU are coded as a single transform block. Based on the JCCR flag, residual blocks of Cb and Cr chroma components of the current CU can be derived subsequently. The process <NUM> can proceed to (S1199) and terminate at (S1199).

The components shown in <FIG> for computer system (<NUM>) are exemplary in nature.

Computer system (<NUM>) can also include an interface (<NUM>) to one or more communication networks (<NUM>). Networks can for example be wireless, wireline, optical. Networks can further be local, wide-area, metropolitan, vehicular and industrial, real-time, delay-tolerant, and so on. Examples of networks include local area networks such as Ethernet, wireless LANs, cellular networks to include GSM, <NUM>, <NUM>, <NUM>, LTE and the like, TV wireline or wireless wide area digital networks to include cable TV, satellite TV, and terrestrial broadcast TV, vehicular and industrial to include CANBus, and so forth. Certain networks commonly require external network interface adapters that attached to certain general purpose data ports or peripheral buses (<NUM>) (such as, for example USB ports of the computer system (<NUM>)); others are commonly integrated into the core of the computer system (<NUM>) by attachment to a system bus as described below (for example Ethernet interface into a PC computer system or cellular network interface into a smartphone computer system). Using any of these networks, computer system (<NUM>) can communicate with other entities. Such communication can be uni-directional, receive only (for example, broadcast TV), uni-directional send-only (for example CANbus to certain CANbus devices), or bi-directional, for example to other computer systems using local or wide area digital networks. Certain protocols and protocol stacks can be used on each of those networks and network interfaces as described above.

The core (<NUM>) can include one or more Central Processing Units (CPU) (<NUM>), Graphics Processing Units (GPU) (<NUM>), specialized programmable processing units in the form of Field Programmable Gate Areas (FPGA) (<NUM>), hardware accelerators for certain tasks (<NUM>), graphics adapters (~~<NUM>) and so forth. In an example, the screen (<NUM>) can be connected to the graphics adapter (<NUM>).

Claim 1:
A method of video decoding at a video decoder, comprising:
determining (S1010) a prediction mode of a current coding unit, CU, by determining whether the prediction mode of the current CU is one of an inter prediction mode and an intra prediction mode;
determining (S1020) values of the following syntax elements of the current CU:
a transform unit, TU, coded block flag of a Cb transform block indicating whether the Cb transform block contains one or more transform coefficient levels not equal to zero, and
a TU coded block flag of a Cr transform block indicating whether the Cr transform block contains one or more transform coefficient levels not equal to zero;
determining (S1030) a context index based on the prediction mode of the current CU and the values of the TU coded block flag of the Cb transform block and the TU coded block flag of the Cr transform block; and
performing (S1040) an arithmetic decoding process according to a context model indicated by the context index to determine a bin of a j oint Cb Cr residual, JCCR, flag indicating whether residual samples for both Cb and Cr chroma components of the current CU are coded as a single transform block.