Rate-QP estimation for a P picture is disclosed which involves the steps of: providing an input group of pictures (GOP); selecting an input P picture within the GOP; and outputting, to a computer readable medium, a bit rate corrected Rate-QP, R(QP), for the input P picture. The outputting step may involve calculating intra/non-intra luma and chroma Rate-QP estimates from corresponding intra/non-intra luma and chroma histograms; offsetting the intra/non-intra chroma Rate-QP estimate to form respective offset intra/non-intra chroma estimates; and setting a bit rate corrected Rate-QP for the input P picture to a corrected sum of the previous estimates. The histograms are formed with estimates of intra and forward prediction coefficients, where an intra/non-intra mode is selected that results in a lowest SATD for each macroblock in the GOP. The methods may be implemented into a computer program, possibly resident in an advanced video encoder.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A method of Rate-QP estimation for a P picture, comprising: (a) inputting an input group of pictures (GOP) to a computer; (b) selecting, on the computer, an input P picture within the input group of pictures; and (c) outputting, from the computer to a computer readable medium, a bit rate corrected Rate-QP, R(QP), for the input P picture; (d) wherein the outputting step comprises: (i) calculating an intra luma (Y) Rate-QP estimate from an intra luma (Y) histogram; (ii) calculating an intra chroma (C) Rate-QP estimate from an intra chroma (C) histogram; (iii) offsetting the intra chroma (C) Rate-QP estimate to form an offset intra chroma (C) estimate; (iv) calculating a non-intra luma (Y) Rate-QP estimate from a non-intra luma (Y) histogram; (v) calculating a non-intra chroma (C) Rate-QP estimate from a non-intra chroma (C) histogram; (vi) offsetting the non-intra chroma (C) Rate-QP estimate to form an offset non-intra chroma (C) estimate; and (vii) setting a Rate-QP for the input P picture to a sum of: (a) the intra luma (Y) Rate-QP estimate; (b) the offset intra chroma (C) Rate-QP estimate; (c) the non-intra luma (Y) Rate-QP estimate; and (d) the offset non-intra chroma (C) Rate-QP estimate.
2. The method of claim 1 , wherein the outputting the bit rate corrected Rate-QP step comprises correcting the Rate-QP of the input P picture to produce the bit rate corrected Rate-QP, R(QP).
3. The method of claim 2 , wherein the correcting the bit rate corrected Rate-QP step comprises: (a) partitioning a set of ordered pairs of (QP, Rate-QP) into a plurality of correction regions; and (b) applying mapping functions for QP values in each of the correction regions to produce the bit rate corrected Rate-QP, R(QP).
4. The method of claim 3 , wherein the plurality of correction regions comprise: (a) a high bit rate correction region; (b) a medium bit rate correction region; and (c) a low bit rate correction region.
5. The method of claim 4 , further comprising applying a linear interpolation for QP values in the high bit rate correction region.
6. The method of claim 4 , further comprising applying a medium bit rate correction for QP values in the medium bit rate correction region.
7. The method of claim 4 , further comprising applying a low bit rate correction for QP values in the low bit rate correction region.
8. The method of claim 1 , wherein the intra luma (Y) histogram, the intra chroma (C) histogram, the non-intra luma (Y) histogram, and the non-intra chroma (C) histogram are accumulated, for every macroblock in the group of pictures, in steps comprising: (a) forming an estimate of a set of intra prediction coefficients; (b) forming an estimate of a set of forward prediction coefficients; (c) selecting between an intra mode and a non-intra mode that results in a lowest Sum of Absolute Transformed Differences (SATD); (d) for each macroblock selected with intra mode, separating the set of intra prediction coefficients into an output accumulated intra luma (Y) histogram and an accumulated intra chroma (C) histogram; and (e) for each macroblock selected with non-intra mode, separating the set of forward prediction coefficients into an output accumulated non-intra (Y) histogram and an accumulated non-intra (C) histogram.
9. The method of claim 8 , wherein the selecting the intra mode step comprises: (a) selecting the intra mode that has a lowest Sum of Absolute Transformed Differences (SATD) among intra modes using a set of inputs [x], H pos , V pos , {right arrow over (h)}, and {right arrow over (v)}; (b) wherein [x] is a 4×4 block of pixels within the input P picture and [ x ] ≡ [ x 0 , 0 x 0 , 1 x 0 , 2 x 0 , 3 x 1 , 0 x 1 , 1 x 1 , 2 x 1 , 3 x 2 , 0 x 2 , 1 x 2 , 2 x 2 , 3 x 3 , 0 x 3 , 1 x 3 , 2 x 3 , 3 ] ; (c) wherein H pos is a horizontal pixel position of the 4×4 block within the image; (d) wherein V pos is a vertical pixel position of the 4×4 block within the image; (e) wherein {right arrow over (h)} is a vector immediately left of the 4×4 block [x], defined as {right arrow over (h)}≡(x 0,−1 ,x 1,−1 ,x 2,−1 ,x 3,−1 ) T relative to the indexing of the elements of [x]; (f) wherein {right arrow over (v)} is a vector immediately above the 4×4 block [x], defined as {right arrow over (v)}≡(x −1,0 ,x −1,1 ,x −1,2 ,x −1,3 ) T relative to the indexing of the elements of [x]; and (g) wherein the lowest SATD intra mode is determined among a group comprising: (i) a horizontal intra mode; (ii) a vertical intra mode; and (iii) a steady state (DC) intra mode.
10. The method of claim 9 , wherein the selecting the lowest SATD intra mode step comprises: (a) calculating a horizontal predictor {right arrow over (H)}≡(H 0 ,H 1 ,H 2 ,H 3 ) T , a vertical predictor {right arrow over (V)}=(V 0 , V 1 , V 2 , V 3 ) T , and a steady state (DC) predictor D; (b) calculating a horizontal cost precursor C hs and a vertical cost precursor C vs using the horizontal predictor {right arrow over (H)}, the vertical predictor {right arrow over (V)}, and the steady state (DC) predictor D; and (d) calculating a horizontal intra mode cost C H , a vertical intra mode cost C V , and a steady state (DC) intra mode cost C D using the horizontal cost precursor C hs and the vertical cost precursor C vs .
11. The method of claim 10 , wherein the calculating of the horizontal predictor {right arrow over (H)}, the vertical predictor {right arrow over (V)}, and the steady state (DC) predictor D comprises: (a) if H pos ≠0 and V pos ≠0 then: (i) setting {right arrow over (H)}≡(H 0 ,H 0 ,H 2 ,H 3 ) T =[NDCT 4 ]{right arrow over (h)} where {right arrow over (h)}≡(h 0 ,h 1 ,h 2 ,h 3 ) T ≡(x 0,−1 ,x 1,−1 ,x 2,−1 ,x 3,−1 ) T ; (ii) setting {right arrow over (V)}≡(V 0 ,V 1 ,V 2 ,V 3 ) T =[NDCT 4 ]{right arrow over (v)} where {right arrow over (v)}≡(v 0 ,v 1 ,v 2 ,v 3 )≡(x −1,0 ,x −1,1 ,x −1,2 ,x −1,3 ); (iii) setting D=(H 0 +V 0 )/2; (b) if H pos =0 and V pos ≠0 then: (i) setting {right arrow over (H)}=(2 15 −1,0,0,0) T ; (ii) setting {right arrow over (V)}≡(V 0 ,V 1 ,V 2 ,V 3 ) T =[NDCT 4 ]{right arrow over (v)} where {right arrow over (v)}≡(v 0 ,v 1 ,v 2 ,v 3 )≡(x −1,0 ,x −1,1 ,x −1,2 ,x −1,3 ); (iii) setting D=V 0 ; (c) if H pos ≠0 and V pos =0 then: (i) setting {right arrow over (H)}≡(H 0 ,H 1 ,H 2 ,H 3 ) T =[NDCT 4 ]{right arrow over (h)} where {right arrow over (h)}≡(h 0 ,h 1 ,h 2 ,h 3 ) T ≡(x 0,−1 ,x 1,−1 ,x 2,−1 ,x 3,−1 ) T ; (ii) setting {right arrow over (V)}=(2 15 −1,0,0,0) T ; (iii) setting D=H 0 ; and (d) if H pos =0 and V pos =0 then: (i) setting {right arrow over (H)}=(2 15 −1,0,0,0) T ; (ii) setting {right arrow over (V)}=(2 15 −1,0,0,0) T ; and (iii) setting D=128×16.
12. The method of claim 10 , wherein the calculating of the horizontal cost precursor C hs and the vertical cost precursor C vs comprises: (a) calculating the values X i,0 , X 0,i for iε0, 1, 2, 3 using the relationships [ X 0 , 0 X 0 , 1 X 0 , 2 X 0 , 3 X 1 , 0 X 1 , 1 X 1 , 2 X 1 , 3 X 2 , 0 X 2 , 1 X 2 , 2 X 2 , 3 X 3 , 0 X 3 , 1 X 3 , 2 X 3 , 3 ] = [ NCDT 4 × 4 ] ( [ x ] ) ; (b) calculating the horizontal cost precursor C hs = ∑ i = 1 3 X i , 0 ; and (c) calculating the vertical cost precursor C vs = ∑ j = 1 3 X 0 , j .
13. The method of claim 12 , wherein calculating the horizontal intra mode cost C H comprises calculating C H = ∑ i = 0 3 H i - X i , 0 + C vs .
14. The method of claim 12 , wherein calculating the vertical intra mode cost C V comprises calculating C v = ∑ j = 0 2 V j - X 0 , j + C hs .
15. The method of claim 12 , wherein calculating the steady state (DC) intra mode cost C D comprises calculating C D =|D−X 0,0 |+C hs +C vs .
16. The method of claim 10 , further comprising selecting the lowest SATD intra mode with a lowest associated intra mode cost among the group consisting of: the horizontal intra mode cost C H , the vertical intra mode cost C V , and the steady state (DC) intra mode cost C D .
17. A second non-transitory computer readable medium comprising a programming executable capable of performing on the computer the method of claim 1 .
18. An advanced video encoder apparatus comprising the method of claim 1 .
19. A method of Rate-QP estimation for a P picture, comprising: (a) inputting an input group of pictures (GOP) to a computer; (b) selecting, on the computer, an input P picture within the input group of pictures; and (c) outputting, from the computer to a computer readable medium, a bit rate corrected Rate-QP, R(QP), for the input P picture; (d) wherein the outputting the bit rate corrected Rate-QP step comprises correcting the Rate-QP of the input P picture to produce the bit rate corrected Rate-QP, R(QP); (e) wherein the correcting the bit rate corrected Rate-QP step comprises: (i) partitioning a set of ordered pairs of (QP, Rate-QP) into a plurality of correction regions; and (ii) applying mapping functions for QP values in each of the correction regions to produce the bit rate corrected Rate-QP,R(QP); and (f) wherein the plurality of correction regions comprise: (i) a high bit rate correction region; (ii) a medium bit rate correction region; and (iii) a low bit rate correction region.
20. The method of claim 19 , further comprising applying a linear interpolation for QP values in the high bit rate correction region.
21. The method of claim 19 , further comprising applying a medium bit rate correction for QP values in the medium bit rate correction region.
22. The method of claim 19 , further comprising applying a low bit rate correction for QP values in the low bit rate correction region.
23. The method of claim 19 , wherein the outputting step comprises: (a) calculating an intra luma (Y) Rate-QP estimate from an intra luma (Y) histogram; (b) calculating an intra chroma (C) Rate-QP estimate from an intra chroma (C) histogram; (c) offsetting the intra chroma (C) Rate-QP estimate to form an offset intra chroma (C) estimate; (d) calculating a non-intra luma (Y) Rate-QP estimate from a non-intra luma (Y) histogram; (e) calculating a non-intra chroma (C) Rate-QP estimate from a non-intra chroma (C) histogram; (f) offsetting the non-intra chroma (C) Rate-QP estimate to form an offset non-intra chroma (C) estimate; and (g) setting a Rate-QP for the input P picture to a sum of: (i) the intra luma (Y) Rate-QP estimate; (ii) the offset intra chroma (C) Rate-QP estimate; (iii) the non-intra luma (Y) Rate-QP estimate; and (iv) the offset non-intra chroma (C) Rate-QP estimate.
24. The method of claim 23 , wherein the intra luma (Y) histogram, the intra chroma (C) histogram, the non-intra luma (Y) histogram, and the non-intra chroma (C) histogram are accumulated, for every macroblock in the group of pictures, in steps comprising: (a) forming an estimate of a set of intra prediction coefficients; (b) forming an estimate of a set of forward prediction coefficients; (c) selecting between an intra mode and a non-intra mode that results in a lowest Sum of Absolute Transformed Differences (SATD); (d) for each macroblock selected with intra mode, separating the set of intra prediction coefficients into an output accumulated intra luma (Y) histogram and an accumulated intra chroma (C) histogram; and (e) for each macroblock selected with non-intra mode, separating the set of forward prediction coefficients into an output accumulated non-intra (Y) histogram and an accumulated non-intra (C) histogram.
25. The method of claim 24 , wherein the selecting the intra mode step comprises: (a) selecting the intra mode that has a lowest Sum of Absolute Transformed Differences (SATD) among intra modes using a set of inputs [x], H pos , V pos , {right arrow over (h)}, and {right arrow over (v)}; (b) wherein [x] is a 4×4 block of pixels within the input P picture and [ x ] ≡ [ x 0 , 0 x 0 , 1 x 0 , 2 x 0 , 3 x 1 , 0 x 1 , 1 x 1 , 2 x 1 , 3 x 2 , 0 x 2 , 1 x 2 , 2 x 2 , 3 x 3 , 0 x 3 , 1 x 3 , 2 x 3 , 3 ] ; (c) wherein H pos is a horizontal pixel position of the 4×4 block within the image; (d) wherein V pos is a vertical pixel position of the 4×4 block within the image; (e) wherein h is a vector immediately left of the 4×4 block [x], defined as {right arrow over (h)}≡(x 0,−1 ,x 1,−1 ,x 2,−1 ,x 3,−1 ) T relative to the indexing of the elements of [x]; (f) wherein {right arrow over (v)} is a vector immediately above the 4×4 block [x], defined as {right arrow over (v)}≡(x −1,0 ,x −1,1 ,x −1,2 ,x −1,3 ) T relative to the indexing of the elements of [x]; and (g) wherein the lowest SATD intra mode is determined among a group comprising: (i) a horizontal intra mode; (ii) a vertical intra mode; and (iii) a steady state (DC) intra mode.
26. The method of claim 25 , wherein the selecting the lowest SATD intra mode step comprises: (a) calculating a horizontal predictor {right arrow over (H)}≡(H 0 ,H 1 ,H 2 ,H 3 ) T , a vertical predictor {right arrow over (V)}≡(V 0 ,V 1 ,V 2 ,V 3 ) T , and a steady state (DC) predictor D; (b) calculating a horizontal cost precursor C hs and a vertical cost precursor C vs using the horizontal predictor {right arrow over (H)}, the vertical predictor {right arrow over (V)}, and the steady state (DC) predictor D; and (d) calculating a horizontal intra mode cost C H , a vertical intra mode cost C V , and a steady state (DC) intra mode cost C D using the horizontal cost precursor C hs and the vertical cost precursor C vs .
27. The method of claim 26 , wherein the calculating of the horizontal predictor {right arrow over (H)}, the vertical predictor {right arrow over (V)}, and the steady state (DC) predictor D comprises: (a) if H pos ≠0 and V pos ≠0 then: (i) setting {right arrow over (H)}≡(H 0 ,H 0 ,H 2 ,H 3 ) T =[NDCT 4 ]{right arrow over (h)} where {right arrow over (h)}≡(h 0 ,h 1 ,h 2 ,h 3 ) T ≡(x 0,−1 ,x 1,−1 ,x 2,−1 ,x 3,−1 ) T ; (ii) setting {right arrow over (V)}≡(V 0 ,V 1 ,V 2 ,V 3 ) T =[NDCT 4 ]{right arrow over (v)} where {right arrow over (v)}≡(v 0 ,v 1 ,v 2 ,v 3 )≡(x −1,0 ,x −1,1 ,x −1,2 ,x −1,3 ); (iii) setting D=(H 0 +V 0 )/2; (b) if H pos =0 and V pos ≠0 then: (i) setting {right arrow over (H)}=(2 15 −1,0,0,0) T ; (ii) setting {right arrow over (V)}≡(V 0 ,V 1 ,V 2 ,V 3 ) T =[NDCT 4 ]{right arrow over (v)} where {right arrow over (v)}≡(v 0 ,v 1 ,v 2 ,v 3 )≡(x −1,0 ,x −1,1 ,x −1,2 ,x −1,3 ); (iii) setting D=V 0 ; (c) if H pos ≠0 and V pos =0 then: (i) setting {right arrow over (H)}≡(H 0 ,H 1 ,H 2 ,H 3 ) T =[NDCT 4 ]{right arrow over (h)} where {right arrow over (h)}≡(h 0 ,h 1 ,h 2 ,h 3 ) T ≡(x 0,−1 ,x 1,−1 ,x 2,−1 ,x 3,−1 ) T ; (ii) setting {right arrow over (V)}=(2 15 −1,0,0,0) T ; (iii) setting D=H 0 ; and (d) if H pos =0 and V pos =0 then: (i) setting {right arrow over (H)}=(2 15 −1,0,0,0) T ; (ii) setting {right arrow over (V)}=(2 15 −1,0,0,0) T ; and (iii) setting D=128×16.
28. The method of claim 26 , wherein the calculating of the horizontal cost precursor C hs and the vertical cost precursor C vs comprises: (a) calculating the values X i,0 ,X 0,i for iε0, 1, 2, 3 using the relationships [ X 0 , 0 X 0 , 1 X 0 , 2 X 0 , 3 X 1 , 0 X 1 , 1 X 1 , 2 X 1 , 3 X 2 , 0 X 2 , 1 X 2 , 2 X 2 , 3 X 3 , 0 X 3 , 1 X 3 , 2 X 3 , 3 ] = [ NDCT 4 × 4 ] ( [ x ] ) ; (b) calculating the horizontal cost precursor C hs = ∑ i = 1 3 X i , 0 ; and (c) calculating the vertical cost precursor C vs = ∑ j = 1 3 X 0 , j .
29. The method of claim 28 , wherein calculating the horizontal intra mode cost C H comprises calculating C H = ∑ i = 0 3 H i - X i , 0 + C vs .
30. The method of claim 28 , wherein calculating the vertical intra mode cost C V comprises calculating C v = ∑ j = 0 3 V j - X 0 , j + C hs .
31. The method of claim 28 , wherein calculating the steady state (DC) intra mode cost C D comprises calculating C D =|D−X 0,0 |+C hs +C vs .
32. The method of claim 26 , further comprising selecting the lowest SATD intra mode with a lowest associated intra mode cost among the group consisting of: the horizontal intra mode cost C H , the vertical intra mode cost C V , and the steady state (DC) intra mode cost C D .
33. A second non-transitory computer readable medium comprising a programming executable capable of performing on the computer the method of claim 19 .
34. An advanced video encoder apparatus comprising the method of claim 19 .
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
April 15, 2008
May 29, 2012
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.