# Frequency-Based Adaptive Interpolation Filter in Intra Prediction
## 2 Previous Works
### An Overview of Reference Sample Filtering for Video Coding Standards
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Index \(i\)** & **0** & **1** & **2** & **3** \\ \hline _0/32-pixel filter[i]_ & 0 & 64 & 0 & 0 \\ _1/32-pixel filter[i]_ & \(-1\) & 63 & 2 & 0 \\ _2/32-pixel filter[i]_ & \(-2\) & 62 & 4 & 0 \\ _3/32-pixel filter[i]_ & \(-2\) & 60 & 7 & \(-1\) \\ _4/32-pixel filter[i]_ & \(-2\) & 58 & 10 & \(-2\) \\ _5/32-pixel filter[i]_ & \(-3\) & 57 & 12 & \(-2\) \\ _6/32-pixel filter[i]_ & \(-4\) & 56 & 14 & \(-2\) \\ _7/32-pixel filter[i]_ & \(-4\) & 55 & 15 & \(-2\) \\ _8/32-pixel filter[i]_ & \(-4\) & 54 & 16 & \(-2\) \\ _9/32-pixel filter[i]_ & \(-5\) & 53 & 18 & \(-2\) \\ _10/32-pixel filter[i]_ & \(-6\) & 52 & 20 & \(-2\) \\ _11/32-pixel filter[i]_ & \(-6\) & 49 & 24 & \(-3\) \\ _12/32-pixel filter[i]_ & \(-6\) & 46 & 28 & \(-4\) \\ _13/32-pixel filter[i]_ & \(-5\) & 44 & 29 & \(-4\) \\ _14/32-pixel filter[i]_ & \(-4\) & 42 & 30 & \(-4\) \\ _15/32-pixel filter[i]_ & \(-4\) & 39 & 33 & \(-4\) \\ _16/32-pixel filter[i]_ & \(-4\) & 36 & 36 & \(-4\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The 4-tap DCT Interpolation Filter (DCT-IF) coefficients in VVC. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Index \(i\)** & **0** & **1** & **2** & **3** \\ \hline _0/32-pixel filter[i]_ & 16 & 32 & 16 & 0 \\ _1/32-pixel filter[i]_ & 16 & 32 & 16 & 0 \\ _2/32-pixel filter[i]_ & 15 & 31 & 17 & 1 \\ _3/32-pixel filter[i]_ & 15 & 31 & 17 & 1 \\ _4/32-pixel filter[i]_ & 14 & 30 & 18 & 2 \\ _5/32-pixel filter[i]_ & 14 & 30 & 18 & 2 \\ _6/32-pixel filter[i]_ & 13 & 29 & 19 & 3 \\ _7/32-pixel filter[i]_ & 13 & 29 & 19 & 3 \\ _8/32-pixel filter[i]_ & 12 & 28 & 20 & 4 \\ _9/32-pixel filter[i]_ & 12 & 28 & 20 & 4 \\ _10/32-pixel filter[i]_ & 11 & 27 & 21 & 5 \\ _11/32-pixel filter[i]_ & 10 & 26 & 22 & 6 \\ _13/32-pixel filter[i]_ & 10 & 26 & 22 & 6 \\ _14/32-pixel filter[i]_ & 9 & 25 & 23 & 7 \\ _15/32-pixel filter[i]_ & 9 & 25 & 23 & 7 \\ _16/32-pixel filter[i]_ & 8 & 24 & 24 & 8 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The 4-tap Smoothing Interpolation Filter (SIF) coefficients in VVC. The fractional sample position is derived from the angle of the intra prediction mode and the fractional position of the current predicted sample. The derivation of the prediction sample _pred_(\(x\), \(y\)) on (\(x\), \(y\)) position in the current CU using 4-tap intra fractional prediction is shown in Equation (5) as follows:  
\[pred(x,y)=\left(\sum_{i=0}^{3}f[p][i]\cdot r[i_{0}+i]+32\right)\gg 6 \tag{5}\]  
\[p=\left((y+1+refIdx)\ *\ intraPredAngle\right)\ \&\ 31 \tag{6}\]  
where \(f[p][i]\) are the filter coefficients; where \(p\), \(p\) = 0, 1, 2,..., 31, is the horizontal or vertical projection of the fractional part of the predicted sample; and \(i\) is the index of the integer reference sample in Tables 1 and 2. \(p\) is computed in Equation (6), where _refIdx_ is the MRL index and _intraPredAngle_ depends on the intra prediction mode of the current CU. When the intra prediction mode is less than 34, \(y\) is replaced by \(x\) in Equation (6). \(r[i+i_{0}]\), \(i\) = 0, 1, 2, 3, is the reference sample projected onto the CU boundary where \(i_{0}\) is the start integer reference sample index.