# An Analytic Transform Kernel Derivation Method for Video Codecs
## 2 Proposed Common Sparse Unified Matrix
### Integer Kernels with VVC Standard  
Generally, the floating-point elements in the kernels are scaled up to integer elements to avoid a mismatch between the encoder and decoder in most video coding standards. Transform and quantization using resulting integer kernel matrices are implemented with integer arithmetic, which benefits the complexity of implementations and is one of the primary concerns in the standardization of VVC. Despite the benefits of integer kernels, several disadvantages exist. Orthogonality in the kernel matrix can be lost when scaled up to integer values and the magnitudes of the matrix elements should be as small as possible under the consideration of dynamic ranges for the process of transform and quantization [26]. Nevertheless, it is known that the kernel similarity between the derived kernel and original kernels is more important than orthogonality when quantization is applied to transform the coefficients. Thus, it is unnecessary to maintain kernel orthogonality at the expense of kernel similarity. By reflecting the requirements of transform kernels for video codec, integer kernels for every transform block are proposed and finally adopted [15]. In this section, we show how our proposed kernel derivation method is applied for transformation with no deviation, which means the kernels derived by the proposed method are perfectly matched with the standard kernels. Figure 14 shows a 32-point integer DST-7 transform kernel adopted in VTM-3.0 [27] as the standard. In Figure 14, each row vector is shown in the order of the group. The element values in the row vectors were identical to those of the standard kernel. As described in Figure 7 of Section 2.2, the absolute value of \(e_{f}\) in the current row should be identical to the absolute value of \(e_{f}\) of the next row, which is obtained by multiplying the current row vector by \(\mathbf{G}\). The multiplication can be repeated until \(e_{f}\) of the base (first) row is equal to \(e_{f}\) of the row multiplied by \(\mathbf{G}\). For the derivation of all sizes of DST-7, the multiplications are repeated until the end of the last vectors of the group, except for a few cases for 32-point DST-7, which are observed in the 3 rd group for 32-point DST-7. Figure 15 shows the case shown in the 3 rd group for the 32-point DST-7. Figure 13: An example of resulting \(\mathbf{G}\) matrix for \(N=8\) by Figure 12.  
As shown in Figure 15, \([\mathbf{S}_{7,(3,3,18)}]_{32}\) is obtained after the multiplication of \([\mathbf{S}_{7,(3,25)}]_{32}\) and \(\mathbf{G}\). Because \(\ e_{l}\) of \([\mathbf{S}_{7,(3,3)}]_{32}\) equals \(\ e_{l}\) of \([\mathbf{S}_{7,(3,18)}]_{32}\), the algorithm for the current group is complete, as shown in Figure 7. Thus, \([\mathbf{S}_{7,(3,4)}]_{32}\), \([\mathbf{S}_{7,(3,23)}]_{32}\) and \([\mathbf{S}_{7,(3,14)}]_{32}\) for the full-size DST-7 kernel cannot be obtained using the proposed algorithm. This only happens when the element values are scaled up to make the element values of the kernel integer. To address this problem for integer kernels of DST-7, especially for the 32-point kernel, two approaches are proposed in our method. The first method is to tune \(e_{l}\) of \([\mathbf{S}_{7,(3,3)}]_{32}\) from 88 to 89 without considering the sign value, and by tuning the value, the case of stopping the algorithm in \([\mathbf{S}_{7,(3,18)}]_{32}\) obtained after the multiplication of \([\mathbf{S}_{7,(3,25)}]_{32}\) and \(\mathbf{G}\) can be removed, resulting in a full-size 32-point DST-7 transform kernel. Figure 16a shows this procedure. Similarly, the second method is to tune the 3 rd element of the value of \([\mathbf{S}_{7,(3,3)}]_{32}\) from 88 to 89 without considering the sign value, as shown in Figure 16b. By tuning the values, the related values in the other vectors are changed by the proposed algorithm, accordingly. Figure 14: Grouped 32\(-\)point DST\(-\)7 transform kernel elements. Figure 15: An example of the case not deriving the DST\(-\)7 kernel kernel.