CPC H04N 19/132 (2014.11) [H04N 19/105 (2014.11); H04N 19/159 (2014.11); H04N 19/176 (2014.11); H04N 19/46 (2014.11)] | 9 Claims |
1. A method for intra prediction, comprising:
during an intra predicted sample generation stage, obtaining a filtering indication indicating whether a filtered value or an unfiltered value of reference samples of a current coding block is to be used;
in response to determining that a value of the filtering indication is true, generating a prediction sample by using the filtered value of the reference samples based on a planar mode; or
in response to determining that the value of the filtering indication is false, generating a prediction sample by using the unfiltered value of the reference samples based on the planar mode; and
during the intra predicted sample generation stage, obtaining the filtered value of the reference samples by applying a filter to the reference samples, wherein:
when the filter is [1 2 1],
predV[x][y]=((nH−1−y)*((p[x−1][−1]+2*p[x][−1]+p[x+1][−1]+2)>>2)+(y+1) * p[−1][nTbH])<<Log2 (nW),
predH[x][y]=((nW−1−x)*((p[−1][y−1]+2*p[−1][y]+p[−1][y+1]+2)>>2)+(x+1)*p[nTbW][−1])<<Log2 (nH),
wherein predV[x][y] is a vertical component of the prediction sample, predH[x][y] is a horizontal component of the prediction sample, and p[x][y] (x=−1, y=−1 . . . nTbH and x=0 . . . nTbW, y=−1) is the reference sample; and
when the filter is [1 6 1],
predV[x][y]=((nH−1−y)*((p[x−1][−1]+(p[x][−1]*6)+p[x+1][−1]+4)>>3)+(y+1)*p[−1][nTbH])<<Log2 (nW),
predH[x][y]=((nW−1−x)*((p[−1][y−1]+(p[−1][y]*6)+p[−1][y+1]+4)>>3)+(x+1)*p[nTbW][−1])<<Log2 (nH),
wherein predV[x][y] is a vertical component of the prediction sample, predH[x][y] is a horizontal component of the prediction sample, and p[x][y] (x=−1, y=−1 . . . nTbH and x=0 . . . nTbW, y=−1) is the reference sample.
|