# An Innovative Recompression Scheme for VQ Index Tables
## 3 Proposed Scheme
Specifically, we only need to compare the values of these few side positions with \(C\), so we define \(C_{1}=C_{11}\), \(C_{2}=C_{12}\), \(C_{3}=C_{13}\), \(C_{4}=C_{14}\), \(C_{5}=C_{21}\), \(C_{6}=C_{31}\), and \(C_{7}=C_{41}\). Then, based on Equation (2), we can calculate the Euclidean distance \(d\) between the 7 side pixels of \(P\) and \(C\). In other words, our scheme is reversible to the original VQ index, while SMVQ is lossy in terms of compression quality. We record the corresponding codeword index and the Euclidean distance. By calculating all the codewords and \(P\) one by one, we obtain a side match state codebook containing 256 codeword indices and their corresponding Euclidean distances. Finally, we sort the table based on the Euclidean distance, enabling us to find the closest codeword within the specified matching range. We use \(r\) to represent the bit number of the index corresponding to the matching range; the size of the side match state codebook is \(2^{r}\). If \(r=4\), the 16 codewords with the closest distance can be matched. Similarly, if \(r=5\), the 32 codewords with the closest distance can  
Figure 7: Example of Case 1.  
be matched. Within the specified limit of \(r\), if the same index value as \(P\) can be found from the side match state codebook, then \(P\) belongs to the second type. \[d_{SM}=\sqrt{\sum_{i=1}^{7}(P_{i}-C_{i})^{2}}. \tag{2}\]  
Figure 9 and Table 2 show a complete side match search process. As illustrated in Figure 9, after searching with the SOC algorithm, the same index as the SC is not found. Therefore, we need to use the side match algorithm for the search. Based on the data of the upper neighboring block (2, 3) and left neighboring block (3, 2) of the SC, we can calculate the side match state codebook, as shown in Table 2. In the table, we can find the same codeword index value \"65\" as the SC, and its corresponding side match index is \"1100\". Since the indicator of the second type is \"10\", the final index value is \"101100\". Figure 8: Construction of side match state codebook. Figure 9: Example of Case 2. **Case 3:** Neither the SOC algorithm nor the side match algorithm finds an index, and the original VQ index is used. Since Figures 9 and 10 differ only in the SC, the other search points remain the same. Consequently, after applying the side match algorithm, their side match state codebooks are identical. Hence, Table 2 can still be utilized as the side match state codebook for Figure 10.  
As shown in Figure 10, after executing the SOC algorithm, we did not find the same index value as the SC. After executing the side match algorithm, we also did not find the same codeword index in Table 2. Therefore, we can only use the original VQ index for representation. Since the codebook size is 256, the length of the VQ index is 8 bits. The index of the SC is \"23\", which is converted into a binary sequence: \"0001011\". Since the indicator of the third type is \"11\", the final index value is \"110001011\". When starting the encoding step, all indices are processed one by one. For the index being processed, it is necessary to check first whether it belongs to the first type; that is, the SOC algorithm must be executed to find the same index with the preset search rules. If it can be found, the index belongs to the first type, and uses \"0\" as its indicator. If not found, a further check is needed to see whether it belongs to the second type. The side match algorithm is executed; if the same index is found in the side match state codebook, then the index belongs to the second type, with \"10\" as its indicator. If the index belongs to neither the first type nor the second type, \"11\" is used as its indicator. Note that each index can only be classified into one type, and the proposed algorithm is described in detail as follows:  
Input: The image is divided into blocks, and the processing follows a raster scan order.