METHOD AND APPARATUS OF SIMPLIFIED LUMA-BASED CHROMA
INTRA PREDICTION
BACKGROUND OF THE INVENTION
Cross Reference To Related Applications [0001] The present invention claims priority to PCT Patent Application, Serial No. PCT/CN2012/074118, filed April 16, 2012, entitled "Improvements of Luma-based Chroma Intra Prediction". The PCT Patent Application is hereby incorporated by reference in its entirety.
Field of the Invention [0002] The present invention relates to video coding. In particular, the present invention relates to coding techniques associated with simplified chroma intra prediction based on reconstructed luma and chroma pixels.
Description of the Related Art
[0003] Motion compensated inter- frame coding has been widely adopted in various coding standards, such as MPEG-1/2/4 and H.261/H.263/H.264/AVC. While motion-compensated inter-frame coding can effectively reduce bitrate for compressed video, intra coding is required to compress the regions with high motion or scene changes. Besides, intra coding is also used to process an initial picture or to periodically insert I-pictures or I-blocks for random access or for alleviation of error propagation. Intra prediction exploits the spatial correlation within a picture or within a picture region. In practice, a picture or a picture region is divided into blocks and the intra prediction is performed on a block basis. Intra prediction for a current block can rely on pixels in neighboring blocks that have been processed. For example, if blocks in a picture or picture region are processed row by row first from left to right and then from top to bottom, neighboring blocks on the top and neighboring blocks on the left of the current block can be used to form intra prediction for pixels in the current block. While any pixels in the processed neighboring blocks can be used for intra predictor of pixels in the current block, very often only pixels of the neighboring blocks that are adjacent to the current block boundaries on the top and on the left are used.
[0004] The intra predictor is usually designed to exploit spatial features in the picture such as smooth area (DC mode), vertical line or edge, horizontal line or edge and diagonal line or
edge. Furthermore, correlation often exists between the luminance (luma) and chrominance (chroma) components. Therefore, reconstructed luma pixels can be used to derive the intra chroma prediction. In recent development of High Efficiency Video Coding (HEVC), a chroma intra prediction method based on co-located reconstructed luma blocks has been disclosed. The type of chroma intra prediction is termed as LM prediction or LM mode. The main concept is to use the reconstructed luma pixels to generate the predictors of corresponding chroma pixels. Fig. 1A and Fig. IB illustrate the prediction procedure. First, the neighboring reconstructed pixels of a co-located luma block in Fig. 1 A and the neighboring reconstructed pixels of a chroma block in Fig. IB are used to derive the correlation parameters between the blocks. Then, the predicted pixels of the chroma block are generated using the parameters and the
reconstructed pixels of the luma block. In the parameters derivation, the first above
reconstructed pixel row and the second left reconstructed pixel column of the current luma block are used. The specific row and column of the luma block are used in order to match the 4:2:0 sampling format of the chroma components. The following illustration is based on 4:2:0 sampling format. LM-mode chroma intra prediction for other sampling formats can be derived similarly.
[0005] In the Test Model Version 5.0 (HM-5.0), the LM mode is applied to predict chroma samples based on a linear model using reconstructed luma samples of the co-located prediction unit (PU). The parameters of the linear model consist of slope (a»k) and y-intercept (b), where "»" corresponds to the right shift operation. The parameters are derived based on the neighboring luma and chroma samples according to a least mean square criterion. The prediction sample, predSamples[x,y] for the chroma sample to be coded in the LM mode is derived as follows, where x,y = 0...nS-l and nS corresponds to the block size.
[0006] First, variable k3 and the sample array pY' are derived as:
k3 = Max( 0, BitDepthc + Log2( nS ) - 14 ) , (1) where BitDepthc denotes the internal chroma bit depth (i.e., the bit depth with which the chroma signal is processed during video coding process), and
pY'[x,-l] = ( Pw[2x-1 -1] + 2*Pm[2x -1] +
PLM[2X+1 -1] + 2 ) » 2, (2) Pr i-hy] = ( Pw[-h2y] + Pw[-h2y+i] ) » h (3) ργ'[χ,γ] = ( recSamplesL,[2x,2y] + recSamplesL[2x, 2y+l] ) » 1, (4) where x = 0...nS-l, Pmix ] denotes the neighboring reconstructed luma samples, and recSamplesL[x,y] denotes the current reconstructed luma samples of the co-located luma block. The sample array ργ are derived from reconstructed luma samples. Accordingly, pY' is also called derived co-located luma sample in this disclosure. In equations (2) through (4), ργ' [x,y]
is only evaluated at positions co-located with the chroma samples.
[0007] In HM-5.0, the characteristics of the neighboring reconstructed luma samples and neighboring reconstructed chroma samples of the current block are used to determine the linear- model parameters a, k, and b for LM-mode chroma intra prediction. The derived co-located luma pixels of the current luma block can be derived from the current reconstructed luma pixels of the current luma block at pixel locations co-located with the chroma pixels of the current chroma block.
[0008] To exemplify the linear model relating the chroma intra prediction with the derived co-located luma pixels, a set of variable, including L, C, LL, LC and k2, are defined. Variables L, C, LL, LC and k2 are derived as follows.
nS-l nS-l
LC ∑ PY l-i, y] * p[-i, y] + ∑ Ργ '[χ, - ΐ] * P[x, -i] » k3 (8) y=0 x=0
kl = Log2( (2*nS) » k3 ) (9)
[0009] As shown in equations (5) through (8), L corresponds to the sum of reconstructed luma samples in the neighboring area of the current block, C corresponds to the sum of reconstructed chroma samples in the neighboring area of the current block, LL corresponds to the sum of squared reconstructed luma samples in the neighboring area of the current block, LC corresponds to the sum of cross-product of reconstructed luma samples and reconstructed chroma samples in the neighboring area of the current block. Furthermore, L, C, LL, and LC are right shifted by k3 bits to take into account of the internal bit depth with which the chroma signal is processed during video coding process (i.e., bitDepthC) and the block size (i.e., nS).
[0010] The linear-model parameters a, b and k are derived as follows.
al ( LC « kl ) - L*C, (10) al ( LL « kl ) - L*L, (11) kl Max(0, Log2( abs(a2)) -5) - Max(0, Log2(abs(ai)) - 14) + 2, (12) als al » Max(0, Log2( abs(ai)) - 14), (13)
als = abs( al » Max(0, Log2(abs(a2)) - 5)), (14) a3 = als <1?0 : Clip3(-215,215-l,(oi^/mZ) v + (1 « (kl ~ 1))) » kl),(15) a = a3 » Max(0, Log2( abs(aJ)) - 6), (16) k = 13 - Max( 0, Log2( abs(aJ)) - 6), and (17) b = (L - ((a*C) » kl) + (1 « (kl - 1))) » kl, (18) where ImDiv is specified in Table 1 for all als values.
[0011] Parameter al as defined in equation (10) corresponds to a co variance-like value associated with the neighboring reconstructed luma pixels of the current luma block and the neighboring reconstructed chroma pixels of the current chroma block. The covariance σ(Χ,Υ) associated with random variables X and Y are defined as σ(Χ,Υ) =E[XY] - E[X]E[Y], where E[.] is the expected value of the underlying random variable. For a random variable with a uniform distribution, the expected value is equivalent to the average value. Variables L, C, LL, and LC as shown in equations (5) through 8 are right shifted by k3 bits, where k3 is related to the block size (i.e., nS). In other words, if the neighboring reconstructed luma pixels of the current luma block are considered as a first uniformly distributed random variable (i.e., X) and the neighboring reconstructed chroma pixels of the current chroma block are considered as a second uniformly distributed random variable (i.e., Y), al has a form similar to a covariance value for uniformly distributed random variables X and Y. In equation (10), LC is left shifted by k2 bits in order to match the scaling of L*C. Accordingly, al as defined in equation (10) has a covariance-like form associated with the neighboring reconstructed luma pixels of the current luma block and the neighboring reconstructed chroma pixels of the current chroma block. The covariance-like value may be scaled to a desired range and the scaling may be performed by left or right shifting the covariance-like value. For example, the scaling of the covariance-like value used in HM-5.0 is shown in equation (13).
[0012] Similarly, parameter a2 as defined in equation (11) corresponds to a variance-like value associated with the neighboring reconstructed luma pixels of the current luma block. The variance-like value may be scaled to a desired range and the scaling may be performed by left or right shifting the variance-like value. For example, the scaling of the variance-like value used in HM-5.0 is shown in equation (14). A division factor, ImDiv is then determined by dividing with rounding a first data range by a2s. In HM-5.0, the division with rounding by a2s is implemented using a look-up table as shown in Table 1. In HM-5.0, the first data range corresponds to 2A15 (i.e., 215). Accordingly, ImDiv =(2A15+a2s/2)/a2s. An intermediate parameter, a3 is then determined according to als*lmDiv, where the product als*lmDiv is divided with rounding by 2kl and the result is clipped between -215 and 215-1 if a2s > 1. If a2s is less than 1, a3 is set to 0. In HM-5.0, derivation of a3 is shown in equation (15), where the division with rounding
by 2kl is implemented by right shifting. The right shifting in equation (15) is performed to reverse the shifting operations that are applied to al and a2 in equation (13) and equation (14).
[0013] Parameters a and k for the linear model are then determined based on a3 as shown in equations (16) and (17) respectively. The y-intercept, b is determined according to equation (18). Finally, the value of the prediction samples predSamples[x,y] is derived as:
predSamples[x,y] = Clvplc((( pY'[x,y] * a) » k) + b), (19) where x, y = 0..nS~l and
Cliplc(w) = Clip3(0, (1 « BitDepthc) ~ 1 , w)
clip3(t, u, v) = ((v < t) ? t : ((v > w) ? u : v))
Table 1
[0014] As shown above, the derivation of the prediction sample, predSamples[x,y] is very computationally intensive. Not only it involves a large number of computations, it also requires buffer to store the table. Furthermore, some operations may require higher precision. For example, in equation (15), als is a signed 15-bit integer, therefore, als*lmDiv requires a 15-bit multiplier. This large multiplier introduces higher computational complexity. Therefore, it is desirable to simplify the derivation of the prediction sample.
BRIEF SUMMARY OF THE INVENTION
[0015] A method and apparatus for chroma intra prediction based on reconstructed luma pixels and chroma pixels are disclosed. The chroma intra prediction for chroma pixels of the current chroma block is based on a linear model of derived co-located current luma pixels of the current luma block scaled by a scaling factor. The scaling factor comprises a product term of a division factor and a scaled covariance-like value associated with the neighboring reconstructed luma pixels of the current luma block and the neighboring reconstructed chroma pixels of the current chroma block. The division factor is related to a first data range divided with rounding by a scaled variance-like value associated with the neighboring reconstructed luma pixels of the current luma block. In a system incorporating an embodiment of the present invention, the scaled covariance-like value, the first data range, or both of the scaled covariance-like value and the first data range are dependent on the internal bit depth with which the chroma signal is processed during video coding process.
[0016] In one embodiment, the scaled covariance-like value, als is derived according to als = al » Max(0, Log2( abs(al) ) - (BitDepthC -2)), where al represents the covariance-like value, and BitDepthC represents the internal bit depth with which the chroma signal is process in video codec. In another embodiment of the present invention, the first data range corresponds to 2A( BitDepthC + n), where n is an integer from -2 to +4. The division factor can be derived using a look-up table with the scaled variance-like value as the table input. Some table entries can be omitted depending on the selected first data range. Besides, the division factor can also be calculated by dividing with rounding by the scaled variance-like value during coding process.
BRIEF DESCRIPTION OF DRAWINGS
[0017] Fig. 1A illustrates an example of derived luma samples derived based on neighboring reconstructed luma pixels and current reconstructed luma samples for chroma intra prediction according to HM-5.0.
[0018] Fig. IB illustrates an example of neighboring reconstructed chroma samples used for chroma intra prediction of current chroma samples.
[0019] Fig. 2 illustrates an example of a flowchart for chroma intra prediction incorporating an embodiment of the present invention.
DETAILED DESCRIPTION OF THE INVENTION
[0020] As mentioned before, the existing LM mode derivation is quite complicated. Some
operations require higher arithmetic accuracy, such as the als*lmDiv operation. Therefore, in one embodiment of the present invention, the complexity of the als*lmDiv operation is reduced by incorporating the internal bit depth, with which the chroma signal is processed during video coding process, in the als derivation. As an example, the shift operation for als incorporating an embodiment of the present invention becomes:
als = al » Max(0, Log2( abs(ai) ) - (BitDepthc-2)). (20) [0021] In equation (20), the constant value (i.e. 14) of equation (13) is replaced by
(BitDepthC -2). Accordingly, the number of bits of als is limited to the bit depth of the chroma signal (i.e., BitDepthC) minus one and plus one sign bit. Furthermore, lmDiv is changed from (2Λ 15+a2s/2)/a2s to (2A(BitDepthC- 1 )+a2s/2)/a2s. Therefore, lmDiv will be less than
(2ABitDepthC) when a2s is equal to 1. As mentioned before, the derivation of lmDiv from a2s, i.e., lmDiv=(2A(BitDepthC-l)+a2s/2)/a2s, can be implemented as a look-up table. Table 2 illustrates the values of lmDiv for BitDepthC = 8. Table 3 illustrates the values of lmDiv for BitDepthC = 10. Table 2
Table 3
[0022] Along with the new als as shown in equation (20) and lmDiv (i.e.,
(2A(BitDepthC-l)+a2s/2)/a2s) mentioned above, other variables that require modification are as
follows:
kl = Max(0,Log2(abs(a2))-5)-Max(0,Log2(abs(ai))-(fi iZ)ep^c-2)), (21) k = BitDepthc- 1 - Max(0, Log2(abs(aJ)) - 6). (22)
[0023] In another embodiment, ImDiv is set to (2A(BitDepthC-2)+a2s/2)/a2s. Therefore, ImDiv is less than (2A(BitDepthC-l)) when a2s is equal to 1. Table 4 illustrates the values of
ImDiv for BitDepthC = 8. Table 5 illustrates the values of ImDiv for BitDepthC = 10.
Table 4
Table 5
[0024] For the ImDiv (i.e., (2
A(BitDepthC-2)+a2s/2)/a2s) mentioned above, variable k is defined as follows:
k = BitDepthc- 2 - Max(0, Log2(abs(aJ)) - 6). (23) [0025] In yet another embodiment, ImDiv is set to (2A(BitDepthC+2)+a2s/2)/a2s. In this case, ImDiv will be less than 2ABitDepthC for a2s >= 7. Accordingly, Table 6 illustrates the values of ImDiv for BitDepthC = 8. Table 7 illustrates the values of ImDiv for BitDepthC = 10. In Tables 6 and 7, there are no entries for a2s < 7 since a2s is impossible to be any value from 1 to 6.
Table 6
Table 7
[0026] For the ImDiv (i.e., (2
A(BitDepthC+2)+a2s/2)/a2s) mentioned above, variable a3 and k are defined as follows:
a3 = als <7 ? 0: Clip3(-215, 215-l ,als*/mZ)/v+(l« (kl-l ) »kl), (24) k = BitDepthc + 2 - Max(0, Log2(abs(aJ)) - 6). (25) [0027] In yet another embodiment, ImDiv is changed to (2A(BitDepthC+l)+a2s/2)/a2s and this will ensure ImDiv < 2A(BitDepthC-l) for a2s >= 7. Table 8 illustrates the values of ImDiv for BitDepthC = 8. Table 9 illustrates the values of ImDiv for BitDepthC = 10. In Tables 8 and 9, there are no entries for a2s < 7 since a2s is impossible to be any value from 1 to 6.
Table 8 a2s 7 8 9 10 1 1 12 13 14 15 16 17 18 19 20 21
ImDiv 73 64 57 51 47 43 39 37 34 32 30 28 27 26 24 a2s 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
ImDiv 23 22 21 20 20 19 18 18 17 17 16 16 15 15 14 a2s 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
ImDiv 14 13 13 13 12 12 12 12 1 1 1 1 1 1 1 1 10 10 10
a2s 52 53 54 55 56 57 58 59 60 61 62 63
ImDiv 10 10 9 9 9 9 9 9 9 8 8 8
Table 9
[0028] For the ImDiv (i.e., (2A(BitDepthC+l)+a2s/2)/a2s) mentioned above, variable a3 and k is defined as follows:
a3 = als <7 ? 0: Clip3(-215, 215-l,als*/mZ)/v+(l« (kl-l ) »kl), (26) k = BitDepthc + 1 - Max(0, Log2(abs(aJ)) - 6). (27)
[0029] In another embodiment, ImDiv is set to (2A(BitDepthC+4)+a2s/2)/a2s and a3 in equation (15) is set to zero for a2s < 32. In this case, ImDiv < 2A( BitDepthC) for a2s >= 32.
Table 10 illustrates the values of ImDiv for BitDepthC = 8. Table 11 illustrates the values of
ImDiv for BitDepthC = 10. There is no need for table entries corresponding to a2s < 32 since
ImDiv is set to 0 in this case.
Table 10
Table 11 a2s 32 33 34 35 36 37 38 39 40 41 42
ImDiv 512 496 482 468 455 443 431 420 410 400 390 a2s 43 44 45 46 47 48 49 50 51 52 53
ImDiv 381 372 364 356 349 341 334 328 321 315 309
a2s 54 55 56 57 58 59 60 61 62 63
ImDiv 303 298 293 287 282 278 273 269 264 260
[0030] For the ImDiv (i.e., (2A(BitDepthC+4)+a2s/2)/a2s) and a3 mentioned above, other variables that require modification are as follows:
a3 = als <32 ? 0: Clip3(-215, 215-l ,als*/mZ)/v+(l« (kl-l ) »kl), (28) k = BitDepthc+ 4 - Max(0, Log2(abs(aJ)) - 6). (29)
[0031] In another embodiment, ImDiv is set to (2A(BitDepthC+3)+a2s/2)/a2s and a3 in equation (15) is set to zero for a2s<32. In this case, ImDiv will be less than 2A( BitDepthC-1) for a2s>=32. Table 12 illustrates the values of ImDiv for BitDepthC = 8. Table 13 illustrates the values of ImDiv for BitDepthC = 10. . There is no need for table entries corresponding to a2s < 32 since ImDiv is set to 0 in this case.
[0032]
Table 12
Table 13
[0033] For the ImDiv (i.e., (2
A(BitDepthC+3)+a2s/2)/a2s) and a3 mentioned above, other variables that require modification are as follows: a3 = als < 32 ? 0 : Clip3(-215, 2\5-\ , als*lmDiv+(\« (kl-\))» kl), (30) k = BitDepth
c+ 3 - Max(0, Log2(abs(aJ)) - 6). (31) [0034] The LM-mode chroma intra prediction method described above can be used in a
video encoder as well as a video decoder. Fig. 2 illustrates an exemplary flowchart of an encoder or a decoder incorporating an embodiment of the present invention. Neighboring reconstructed luma pixels and current reconstructed luma pixels of a current luma block are received from a media or a processor as shown in step 210. The reconstructed luma pixels may be retrieved from a media such as a computer memory of buffer (RAM or DRAM). The reconstructed luma pixels may also be received from a processor such as a central processing unit or a digital signal processor that reconstructs the luma pixels from residual signals. In a video encoder, the residual signals are generated by the encoder. In a video decoder, the residual signals may be derived from the received bitstream. The neighboring reconstructed chroma pixels of a current chroma block are received from a media or a processor as shown in step 220, wherein the current chroma block is co-located with the current luma block. The reconstructed luma samples and chroma samples may be retrieved from the same media (such as the same DRAM device) or separate media (such as separate DRAM devices). The
reconstructed luma samples and chroma samples may be received from the same processor or different processors (such as a processor for luma samples and another processor for chroma samples). The chroma intra prediction for chroma pixels of the current chroma block is then derived based on derived co-located current luma pixels of the current luma block scaled by a scaling factor as shown in step 230. The scaling factor comprises a product term of a division factor and a scaled covariance-like value associated with the neighboring reconstructed luma pixels of the current luma block and the neighboring reconstructed chroma pixels of the current chroma block. The division factor is related to a first data range divided with rounding by a scaled variance-like value associated with the neighboring reconstructed luma pixels of the current luma block. According the present invention, at least one of the scaled covariance-like value and the first data range is dependent on the internal bit depth with which the chroma signal is processed during video coding process. The chroma intra prediction is then provided for encoding or decoding of the chroma pixels of the current chroma block as shown in step 240.
[0035] The flowcharts shown above are intended to illustrate examples of a luma-based chroma intra prediction method for a video encoder and a decoder incorporating embodiments of the present invention. A person skilled in the art may modify each step, re-arranges the steps, split a step, or combine the steps to practice the present invention without departing from the spirit of the present invention.
[0036] The above description is presented to enable a person of ordinary skill in the art to practice the present invention as provided in the context of a particular application and its requirement. Various modifications to the described embodiments will be apparent to those with skill in the art, and the general principles defined herein may be applied to other
embodiments. Therefore, the present invention is not intended to be limited to the particular embodiments shown and described, but is to be accorded the widest scope consistent with the principles and novel features herein disclosed. In the above detailed description, various specific details are illustrated in order to provide a thorough understanding of the present invention. Nevertheless, it will be understood by those skilled in the art that the present invention may be practiced.
[0037] Embodiment of the present invention as described above may be implemented in various hardware, software codes, or a combination of both. For example, an embodiment of the present invention can be a circuit integrated into a video compression chip or program code integrated into video compression software to perform the processing described herein. An embodiment of the present invention may also be program code to be executed on a Digital Signal Processor (DSP) to perform the processing described herein. The invention may also involve a number of functions to be performed by a computer processor, a digital signal processor, a microprocessor, or field programmable gate array (FPGA). These processors can be configured to perform particular tasks according to the invention, by executing machine- readable software code or firmware code that defines the particular methods embodied by the invention. The software code or firmware code may be developed in different programming languages and different formats or styles. The software code may also be compiled for different target platforms. However, different code formats, styles and languages of software codes and other means of configuring code to perform the tasks in accordance with the invention will not depart from the spirit and scope of the invention.
[0038] The invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described examples are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.