# Adaptive Vector Quantization for Lossy Compression of Image Sequences +
## 3 The AVQ for Image Sequences (AVQ\({}_{\text{IS}}\)) Algorithm  
In this section, we focus on the description of an _easy-to-implement_ extension of the AVQ algorithm, which allows the lossy compression of image sequences, without influencing the execution time of the algorithm (for both compression and decompression phases). The extension is easily implementable and requires only few modifications, starting from an existing AVQ implementation. We emphasize that by compressing, in an independent manner, each frame of an image sequence \(IS\) through the AVQ algorithm, only the _spatial correlation_ (i.e., the correlation within the same frame) is exploited. Indeed, during the encoding of the \(i\)-th frame of \(IS\), the AVQ algorithm will use only the blocks derived from the already coded part of the \(i\)-th frame itself. Figure 6: Graphical representation of: (a) the progress (in _false-colors_) of the compression stage; (b) the progress of the decompression stage. Figure 7: Graphical representation of the number of access (on the \(y\)-axis) to a specific index of the dictionary (on the \(x\)-axis) during the compression phase. Our objective is to extend the AVQ algorithm to exploit also the _temporal correlation_ among the frames of an image sequence, by minimizing the effort for the modifications of an existing AVQ implementation. Therefore, we considered using a dictionary (we referred to as _shared dictionary_), that will be shared during the processing of all of the input frames (\(\textit{frame}_{1},\ldots,\textit{frame}_{i},\ldots,\textit{frame}_{N}\)) of an image sequence _IS_[10]. The main benefit that provides a shared dictionary (SD) is related to the fact that it hosts the blocks derived from the coded portions of the input frame as well as the ones derived from previously coded frames. Therefore, the encoder has a greater probability to individuate matched blocks with larger dimensions, which can cover larger areas of the input frame and, consequently, the compression performances should be improved. On the other hand, the perceivable quality of the compressed frames could be lower with respect to the usage of a local independent dictionary for each frame, since some blocks are obtained by previous coded frames and present a slightly lower similarity. Starting from these considerations, we outline a novel scheme based on the AVQ algorithm, which we refer to as _Adaptive Vector Quantization for Image Sequences_ (\(AVQ_{\text{IS}}\)). AVQ\({}_{\text{IS}}\) can be used for lossy compression of image sequences. In order to maintain a high degree of ease of implementation, the existing heuristics are the same as the ones involved in the AVQ algorithm. Consequently, the blocks stored in the shared dictionary will be treated in the same manner whether they were obtained from the current frame or whether they were obtained from the previously encoded frames. In Algorithm 3, we report the pseudo-code related to the compression stage of the AVQ\({}_{\text{IS}}\) algorithm. In detail, each one of the \(N\) frames of \(IS\) (the input image sequence) is compressed through the _fAVQ_ algorithm. The _fAVQ_ algorithm is directly derived from the AVQ algorithm and is able to operate on the shared dictionary \(SD\), instead of the local dictionary \(D\). As it is possible to observe in Figure 8, the shared dictionary \(SD\) is involved among the instances of the _fAVQ_ algorithm (one instance per frame). We remark that during the compression of the \(i\)-th frame \(\textit{frame}_{i}\) (\(i>0\)), by the _fAVQ_ algorithm, the \(SD\) contains blocks from the already coded parts of the frame in process (i.e., \(\textit{frame}_{i}\)) and from the previous coded frames (\(\textit{frame}_{j},j=1,\ldots,i-1\)).