# Frequency-Based Adaptive Interpolation Filter in Intra Prediction
## 3 Proposed Method  
### Design of 8-Tap Interpolation Filter  
A method is proposed that addresses more integer samples using 8-tap DCT-IF and 8-tap SIF to generate fractional reference samples based on the frequency information of the reference samples. The 8-tap DCT-IF coefficients are derived from DCT-II and IDCT-II (Inverse DCT-II) in Equations (1) and (2) of Section 2, where \(N\) is set to 8. The 8-tap DCT-IF is derived by substituting Equation (1) into Equation (2). \(p/32\)-pixel interpolation filter, \(p=0\), 1, 2, 3,..., 31, in the case of using \(1/32\) fractional samples, is derived by substituting \(n=3+p/32\) from 8-tap DCT-IF as a linear combination of discrete cosine coefficients and \(x(m)\), \(m=0\), 1, 2,..., 7. The 8-tap DCT-IF coefficients derived for \((0/32\), \(1/32\), \(2/32\),..., \(16/32)\) fractional sample positions are shown in Table 4 by substituting \(n=3+(0/32\), \(1/32\), \(2/32\),..., \(16/32)\), respectively, from 8-tap DCT-IF. The 8-tap DCT-IF coefficients for \((17/32\), \(18/32\), \(19/32\),..., \(31/32)\) are obtained in the same way as above, where filter coefficients are scaled to an integer implementation. The 8-tap SIF coefficients are derived from the convolution of \(z[n]\) and \(1/32\) fractional linear filter, where \(z[n]\) in Figure 2 is derived from the convolution of \(h[n]\) and \(y[n]\) in Equations (7) and (8), in which \(h[n]\) is a 3-point [1, 2, 1] LPF. Equations (7) and (8) show the procedure for deriving \(y[n]\) and \(z[n]\). Figure 2 shows \(h[n]\), \(y[n]\), and \(z[n]\), and the 8-tap SIF coefficients are obtained from linear interpolation of \(z[n]\) and \(1/32\) fractional linear filter. \[y[n]=h[n]*h[n]=\sum_{k=-1}^{1}h[k]h[n+k] \tag{7}\]  
\[z[n]=h[n]*y[n]=\sum_{k=-1}^{1}h[k]y[n+k] \tag{8}\] \begin{table}
\begin{tabular}{c c c c c c c c} \hline
**Index \(i\)** & **0** & **1** & **2** & **3** & **4** & **5** & **6** & **7** \\ \hline _0/32-pixel filter[i]_ & 0 & 0 & 0 & 128 & 0 & 0 & 0 & 0 \\ _1/32-pixel filter[i]_ & 0 & 1 & \(-3\) & 127 & 4 & \(-2\) & 1 & 0 \\ _2/32-pixel filter[i]_ & \(-1\) & 3 & \(-7\) & 127 & 8 & \(-4\) & 2 & 0 \\ _3/32-pixel filter[i]_ & \(-1\) & 4 & \(-10\) & 126 & 13 & \(-6\) & 3 & \(-1\) \\ _4/32-pixel filter[i]_ & \(-1\) & 5 & \(-12\) & 124 & 17 & \(-7\) & 3 & \(-1\) \\ _5/32-pixel filter[i]_ & \(-2\) & 6 & \(-15\) & 122 & 23 & \(-9\) & 4 & \(-1\) \\ _6/32-pixel filter[i]_ & \(-2\) & 7 & \(-17\) & 120 & 28 & \(-11\) & 5 & \(-2\) \\ _7/32-pixel filter[i]_ & \(-2\) & 8 & \(-19\) & 117 & 33 & \(-13\) & 6 & \(-2\) \\ _8/32-pixel filter[i]_ & \(-3\) & 9 & \(-21\) & 114 & 38 & \(-14\) & 7 & \(-2\) \\ _9/32-pixel filter[i]_ & \(-3\) & 9 & \(-22\) & 111 & 43 & \(-16\) & 8 & \(-2\) \\ _10/32-pixel filter[i]_ & \(-3\) & 10 & \(-23\) & 107 & 49 & \(-18\) & 8 & \(-2\) \\ _11/32-pixel filter[i]_ & \(-3\) & 10 & \(-24\) & 104 & 54 & \(-19\) & 9 & \(-3\) \\ _12/32-pixel filter[i]_ & \(-3\) & 11 & \(-24\) & 99 & 59 & \(-20\) & 9 & \(-3\) \\ _13/32-pixel filter[i]_ & \(-3\) & 11 & \(-25\) & 95 & 65 & \(-22\) & 10 & \(-3\) \\ _14/32-pixel filter[i]_ & \(-3\) & 11 & \(-25\) & 90 & 70 & \(-22\) & 10 & \(-3\) \\ _15/32-pixel filter[i]_ & \(-3\) & 11 & \(-24\) & 85 & 75 & \(-23\) & 10 & \(-3\) \\ _16/32-pixel filter[i]_ & \(-3\) & 11 & \(-24\) & 80 & 80 & \(-24\) & 11 & \(-3\) \\ \hline \end{tabular}
\end{table} 
Table 4: The 8-tap DCT Interpolation Filter (DCT-IF) coefficients for interpolation. Equations (9) and (10) describe the procedure for calculating 8-tap SIF coefficients, where \(g[u]=z[n-3]\), \(n=0\), \(1,2,\ldots,6\). \[\sum_{i=0}^{6}g[i]\left(\frac{32-p}{32}r[i_{0}+i]+\frac{p}{32}r[i_{0}+1+i]\right)\ll 2 \tag{9}\]  
Equation (10) shows an example of the SIF coefficient derivation at the position \(i_{0}+3+16/32\)-pixel, when \(p=16\). The bold integer numbers shown in Equation (10) are the filter coefficients, which are derived at \(16/32\)-_pixel filter[i]_ in Table 5.  
\[