This is the submitted version of the journal article: Sánchez, Antonio José; Blanes Garcia, Ian; Barrios, Yubal; [et al.]. «Reducing data dependencies in the feedback loop of the CCSDS 123.0-B-2 predictor». IEEE Geoscience and Remote Sensing Letters, Vol. 19 (October 2022), art. 6014505. DOI 10.1109/LGRS.2022.3213975 This version is available at https://ddd.uab.cat/record/275899 under the terms of the license 1 Reducing Data Dependencies in the Feedback Loop of the CCSDS 123.0-B-2 Predictor Antonio Sánchez, Ian Blanes, Yubal Barrios, Miguel Hernández-Cabronero, Joan Bartrina-Rapesta, Joan Serra-Sagristà, Senior Member, IEEE, and Roberto Sarmiento Abstract—On-board multi- and hyperspectral instruments ac- sion requirements, these solutions are required to have low- quire large volumes of data that need to be processed with the enough complexity to fit well on spaceborne hardware, to limited computational and storage resources. In this context, the have limited power consumption, and to have robustness CCSDS 123.0-B-2 standard emerges as an interesting option to compress multi- and hyperspectral images on-board satellites, against radiation-induced faults. The Consultative Committee supporting both lossless and near-lossless compression with low for Space Data Systems (CCSDS), a worldwide organization complexity and reduced power consumption. Nonetheless, the formed by world-leading space agencies, has published several inclusion of a feedback loop in the CCSDS 123.0-B-2 predictor data compression standards specifically conceived for space to support near-lossless compression introduces significant data applications, focusing on high compression performance at dependencies that hinder real-time processing, particularly due to the presence of a quantization stage within this loop. This work affordable computational complexities. provides an analysis of the aforementioned data dependencies Among these standards, the CCSDS 123.0-B-2 [6] specifies and proposes two strategies aiming at maximizing throughput in a low-complexity algorithm to compress multi- and hyper- hardware implementations and thus enabling real-time process- spectral images in both lossless and near-lossless modes. It is ing. In particular, through an elaborate mathematical derivation, composed of two main stages: a predictor that exploits spectral the quantization stage is removed completely from the feedback loop. This reduces the critical path, which allows for shorter and spatial redundancy, and an entropy coder that encodes initiation intervals in a pipelined hardware implementation and prediction residuals. Image samples are handled sequentially, higher throughput. This is achieved without any impact in the and the predictor estimates the value of the current input compression performance, which is identical to the one obtained sample sz (t) considering previously processed samples in its by the original data flow of the predictor. spatial and spectral neighborhood. Index Terms—Hyperspectral imaging, compression algorithms, The CCSDS 123.0-B-2 standard introduces several dif- CCSDS 123.0-B-2, on-board data processing. ferences with respect to its predecessor CCSDS 123.0-B-1, mainly to support near-lossless compression. These differences introduce challenging data dependencies for a high-throughput I. I NTRODUCTION hardware implementation. A key novelty is the introduction PECTROSCOPIC imaging sensors are very common in S Earth Observation (EO) space missions due to the relevant information acquired in the spectral domain for characteriza- of a quantizer within the prediction loop, which controls data losses through a maximum error limit that can be absolute or relative to the sample magnitude. This requires the calculation tion and monitoring purposes, among many others [1], [2]. of the so-called sample representatives s′′z (t), which are a The handling of the ever-increasing volumes of data produced reconstruction of the input samples after quantization. These by these instruments with the often-limited on-board storage are required so that identical predictions can be performed resources and downlink capacities motivate the necessity of by a decoder, where the original values of the input samples using compression techniques that efficiently reduce data are not necessarily available. The standard also introduces volumes before being sent to the ground [3], [4]. narrow local sums, which limit the predictor use of the sample Compression solutions for space missions are not straight- representatives to the left of the value being predicted. This forward to develop [5]. In addition to the usual compres- eases data dependencies and favours hardware optimization strategies that improve throughput [7]. This work has been supported by ESA (contract 4000136723/22/NL/CRS), Regarding the entropy coding stage, the CCSDS 123.0-B- by the European Union’s Horizon 2020 research and innovation programme (grant agreement No 776151) and though the Marie Skłodowska-Curie (grant 2 standard defines three different encoders, including a novel agreement #801370), by the Spanish Ministry of Science and Innovation and hybrid entropy encoder that provides higher compression ratios by the European Regional Development Fund (RTI2018-095287-B-I00 and than the other two for low-entropy data [8]. Entropy encoders PID2021-125258OB-I00), and by the Government of Catalonia though the Beatriu de Pinós programme (2018-BP-00008). are out of the scope of this manuscript. A. Sánchez, Y. Barrios and R. Sarmiento are with the Institute for The main contributions of this letter are a data dependency Applied Microelectronics (IUMA), University of Las Palmas de Gran Canaria analysis for the prediction stage of the CCSDS 123.0-B-2 stan- (ULPGC), 35017 Las Palmas de Gran Canaria, Spain (e-mail: {ajsanchez, ybarrios, roberto}@iuma.ulpgc.es). dard, and two implementation strategies that reduce the critical I. Blanes, M. Hernández-Cabronero, J. Bartrina-Rapesta and J. Serra- path in the predictor’s feedback loop. In one strategy, the Sagristà are with the Universitat Autònoma de Barcelona, 08193 Cer- quantization and reconstruction are effectively removed from danyola del V., Spain (e-mail: {ian.blanes, miguel.hernandez, joan.bartrina, joan.serra}@uab.cat). the feedback loop, and in another the feedback loop is further Manuscript received XXX; revised XXX. reduced through speculative execution. These optimizations 2 Fig. 1: Data dependency diagram for the CCSDS 123.0-B-2 predictor. The critical path for successive samples within the same band is highlighted in bold orange. allow to directly process images collected in Band-Interleaved by Line (BIL) order, without any extra reordering stage and thus enabling compression on-the-fly. The application of both strategies on [9] shows an increase in maximum theoretical throughput without affecting the output of the prediction stage. This paper employs the same notation and naming conven- tions as the CCSDS 123.0-B-2 standard. Readers not familiar with the standard may obtain additional descriptions within Fig. 2: Pipeline disposition when processing data for samples the standard itself [6], [7], while additional implementation in the same locations of consecutive spectral bands. An arrow information is available in [10], [9], [11]. denotes the principal data dependency. The MAC employed The rest of the paper is structured as follows. The data in the prediction calculation is displayed as a separate stage dependency analysis is detailed in Section II, while the two preceding the prediction stage. implementation strategies are described in Section III. Finally, Section IV summarizes the main conclusions of this work. dependencies according to whether dominant data dependen- II. A NALYSIS OF DATA DEPENDENCIES cies are of spectral (i.e., samples processed with consecutive values of z) or spatial nature (i.e., samples processed with The use of sample representatives in CCSDS 123.0-B-2 consecutive values of t). Implementations using careful data imposes significant challenges in the processing data path and rearrangements may benefit too from our analysis and from introduces data dependencies between successive samples that the derived implementation strategies described later. might impact the complexity and performance of hardware implementations. In this Section, the main bottlenecks found in the predictor stage of the standard are analyzed. A. Spectral data dependencies The data dependencies that occur during the prediction of one sample in CCSDS 123.0-B-2 are depicted in Fig. 1, where A careful analysis reveals that predictions at index t of band data flows are represented by arrows between the intermediate z require the sample representative s′′z−1 (t) to compute the results. For a given sample at index t –in raster-scan order– central local differences in Uz (t), which in turn is required to within band z, the predictor inputs are the input sample sz (t) compute s′′z (t). This introduces a strong dependency within itself, some sample representatives s′′≤z (< t) of previously the data path for samples at the same spatial locations of scanned locations, and the weight vector Wz (t). For the consecutive spectral bands, in which a sample must be almost same sample, the predictor outputs are an updated weight fully processed before the processing of the next one can start, vector Wz (t + 1), a mapped quantizer index δz (t), i.e., the as shown in Fig. 2. This imposes a strong limitation in terms predicted value, and a sample representative s′′z (t) to be used of throughput that can be hardly avoided. The only manner in in future predictions instead of the current sample. Note that which to dispose of this strong dependency is by setting the s′′≤z (< t) are used to compute local sums and differences, and number of previous bands for prediction P to 0. However, this the computation of s′′z (t) is particularly onerous, requiring a solution completely disables inter-band prediction, resulting in quantization operation and thus involving a divider. unacceptable compression penalties. A key aspect in the evaluation of data dependencies is the Other sample representatives s′′z−1 (t′ ) for t′ < t are re- order in which input samples are processed. This order may quired as well to compute local sums, but the use of narrow directly follow the order of the input samples as produced by local sums and the use of the column-oriented prediction a given multi- or hyperspectral sensor, or it may be the result mode allow for differences between t′ and t of approxi- of a careful rearrangement of the input data into an order mately the width of the image. Hence, when determining data better suited to obtain high throughput [11]. Hence, instead compression orders, it seems necessary to avoid those that of focusing our analysis on the three common data processing consecutively process input samples with strong spectral data orders (i.e., BIP, BIL, and BSQ orders), this letter studies data dependencies (e.g., the BIP order). 3  −1  if sz (t) − ŝz (t) ≤ mz (t) and s̃z (t) is odd, + sgn [ez (t)] = 1 if sz (t) − ŝz (t) ≤ mz (t) and s̃z (t) is even, (1)   +  sgn sz (t) − ŝz (t) otherwise. B. Spatial data dependencies Here, the main data dependency is caused by the weight vec- tor Wz (t) being employed to produce weight vector Wz (t+1) in a convoluted succession of data dependencies (see Fig. 1). This limits the achievable throughput because weights are employed to obtain dˆz (t) using an inner product of vectors, which cannot be computed until weights related to sample t−1 are obtained. Spatial data dependencies are strongly influenced by the (a) selected local sum type and prediction mode, which may cause additional dependencies due to the use of neighboring sample representatives. The strongest data dependency is found in local sums in the wide neighbor-oriented mode, where the sample representative s′′z (t − 1) of the next sample to the left must be obtained to compute the local sum. Parallelization possibilities are limited in this configuration, demanding for almost-serial implementations. This also applies for the first line of an image in wide column-oriented mode. Conveniently, narrow local sums do not present this data dependency. (b) Another dependency related with sample representatives Fig. 3: Pipeline disposition when processing data for samples occurs due to the use of the full prediction mode. In this case, in consecutive locations of the same spectral band (a), and directional local differences are required, and again the sample with eager execution of weight updates (b). representative s′′z (t − 1) is used. The most favorable configuration is the combination of nar- row local sums and reduced prediction mode. In this situation, the spatial dependency on sample representatives is mostly quantizer index) without having to wait for quantization and removed with the limiting factor being weight dependencies. sample representative stages. While the redefinition is very Nonetheless, as explained in Section III, the dependency on simple, its derivation is extensive and for reader’s convenience weights can be significantly alleviated, reducing the critical is left out of the main text and available in Annex A. As shown path by removing the quantization result from the dependen- in Fig. 3a, using this new definition effectively removes the cies of Wz (t + 1). It is worth noting that this change does quantization step from the feedback loop and allows for tight not affect the result of the weight updating nor the prediction pipelining strategies. outcome. Additionally, a second cumulative strategy may be applied to the weight update step. Similar to [12], eager execution may III. I MPLEMENTATION STRATEGIES be employed on the weight update calculation given that the Two implementation strategies are proposed to shorten the result of sgn+ is binary. Therefore, the computation of both critical path of a CCSDS 123.0-B-2 predictor implementation, possible weight update results can be done in parallel and in achieving a higher throughput in hardware implementations advance, and the selection of the correct one is performed after without affecting the predictor outputs. the result of the sgn+ is obtained. This allows to reduce the The first implementation strategy is related to the use of an initiation interval between samples in a pipelined implemen- equivalent definition of the first part of the weight update step, tation, improving the performance at the cost of duplicating i.e., the calculation of sgn+ [2s′z (t) − s̃z (t)]. This expression the logic used for weight updating. Trough both strategies, requires results from the prediction calculation step, but also the loop of dependencies is reduced to the computation of the from the sample representatives step, which in turn requires MAC and prediction modules, as depicted in Fig. 3b. results from the quantization step. The equivalent definition Experimental simulation demonstrates the goodness of the for t > 0 is shown in (1). Thus, this calculation can be now proposed optimization strategies. Considering as baseline the obtained from sz (t), ŝz (t) and s̃z (t) instead of s′z (t) and s̃z (t). work conducted in [9], in which the CCSDS 123.0-B-2 pre- This redefinition originates from the main idea that quantiz- dictor runs at a maximum clock frequency of 125 MHz, a ing a prediction residual ∆z (t) does not alter the sign of the speed up x7 is achieved. More detailed results are reflected in result (except for when the quantizer yields a zero quantizer Table I. Furthermore, these strategies do not alter the output of index), and that the sign of ∆z (t) can be employed in the the prediction stage, and thus do not alter any rate-distortion weight update stage (except when the quantizer yields a zero results. 4 TABLE I: Experimental results. case (a) s̃z (t) = 2smax + 1 Baseline Proposal Critical path (cycles per sample) 7 1 K2 = 0 s̃z (t) < 2smax + 1 case (b) Speed (Msamples/s) @125 MHz 17.86 125 K2 = −1 s̃z (t) = 2smin case (c) K1 = 0 IV. C ONCLUSION s̃z (t) > 2smin case (d) case (e) This letter examines the data dependencies within the CCSDS 123.0-B-2 prediction stage, and it shows that existing K1 > 0 ∆z (t) = 0 spectral data dependencies are to be avoided within an imple- s̃z (t) = 2smax + 1 case (f) mentation critical path. On the other hand, existing spatial data ∆z (t) > 0 s̃z (t) < 2smax + 1 case (g) dependencies, while apparently equally burdensome, may be ∆z (t) < 0 eased through two proposed implementation strategies. These case (h) s̃z (t) = 2smin strategies effectively remove the predictor quantizer out of an implementation’s feedback loop and make use of eager s̃z (t) > 2smin case (i) execution to achieve higher implementation throughput (up Fig. 4: Cases of study of equation (8). to 1 clock cycle per sample), while producing bit-identical compressed files. The selection of an appropriate processing order that com- It is straightforward to see that K1 ≥ 0, and from (5) we bines well with the proposed implementation strategies is a can also see that ( interesting topic of future research. The BIL order is a clear  s̃z (t)  −1 if s̃z (t) is odd, candidate, since it perfectly fits the optimizations presented in K2 = 2 − s̃z (t) = (10) 2 0 if s̃z (t) is even, this work. Its goodness will be demonstrated in a hardware implementation, which is on-going. and as mz (t) ≥ 0 from § 4.8.2, we can also see that K3 ≥ 1. (11) A PPENDIX A   This appendix proves (1) for t > 0. We start by stating some From § 4.7.3 we have that s̃z (t) = s̆z (t)/2Ω+1 , and from required equations from the CCSDS 123.0-B-2 standard. We the clipping boundaries defined for s̆z (t) in § 4.7.2 we have use the symbol ‘§’ to indicate section numbers referring to the 2Ω+2smin ≤ s̆z (t) ≤ 2Ω+1 (2smax +1),  which allows us to infer  standard document [6]. that 2Ω+2 smin /2Ω+1 ≤ s̃z (t) ≤ 2Ω+1 (2smax + 1)/2Ω+1 , From § 1.6.1, § 4.10.1, § 4.9.2 § 4.7.4 and § 4.8.1 respec- and that tively we have that 2smin ≤ s̃z (t) ≤ 2smax + 1. (12) Corollary 1. For the minimum clipping boundary 2smin −s̃z (t) ( 1 if x ≥ 0, sgn+ [x] = (2) in (8), from (12) we can see that either 2smin = s̃z (t) implying −1 if x < 0, 2smin − s̃z (t) = 0, or 2smin < s̃z (t) implying 2smin − s̃z (t) < 0. ez (t) = 2s′z (t) − s̃z (t), (3) I.e., strictly negative values are only turned to zero in the clip function in (8) when 2smin = s̃z (t), and remain strictly s′z (t) = clip ŝz (t) + qz (t)(2mz (t) + 1), {smin , smax } . (4)  negative otherwise. ŝz (t) = ⌊s̃z (t)/2⌋ , (5) Corollary 2. Similarly, for the maximum clipping boundary j  k 2smax − s̃z (t) in (8), from (12) we can see that either s̃z (t) = qz (t) = sgn ∆z (t) |∆z (t)| + mz (t) 2mz (t) + 1 , (6) 2smax + 1 implying 2smax − s̃z (t) = −1, or s̃z (t) < 2smax + 1 and implying 2smax − s̃z (t) ≥ 0. I.e., non-negative values are only ∆z (t) = sz (t) − ŝz (t). (7) turned to strictly negative in the clip function in (8) when s̃z (t) = 2smax + 1, and remain non-negative otherwise. By substituting (4) and (6) into (3) we obtain  At this point we are ready to analyze (8) case by case. ez (t) = clip K2 + 2 · sgn (∆z (t)) · K1 · K3 , Fig. 4 presents a flowchart which separates the study of (8) n o (8) 2smin − s̃z (t), 2smax − s̃z (t) , into mutually exclusive cases. Note that at each decision point, all possible options are taken into account. We now analyze with each case individually: j k K1 =  |∆z (t)| + mz (t) 2mz (t) + 1 , (9) (a) This case is impossible. From § 3.3.2, the value of smax is either 2D − 1 or 2D−1 − 1, with D an integer not K2 = 2 ŝz (t) − s̃z (t), and K3 = (2mz (t) + 1). smaller than 2. Hence smax is odd and s̃z (t) = 2smax + 1 At this point we are interested to test whether the expression is odd too, which is incompatible with K2 = 0. in (8) is strictly positive or not, as this is the only information (b) As K1 = 0 and K2 = 0, we can see that ez (t) = needed to obtain sgn+ [ez (t)]. Before moving to study the value clip 0, 2smin − s̃z (t), 2smax − s̃z (t) , which by Corol- of sgn+ [ez (t)], we calculate some bounds that will be of use lary 2 we see is equivalent to ez (t) = 0, as s̃z (t) < latter. 2smax + 1. 5 K2 = 0 case (α): ez (t) = 0 strictly positive, |∆z (t)| + mz (t) < 2mz (t) + 1 implies that K1 = 0. Hence, for the first two cases of (1), we see that K1 = 0 K2 = −1 case (β): ez (t) = −1 K1 = 0. For the first case of (1) we also know that s̃z (t) is odd, K1 > 0 ∆z (t) > 0 case (γ): ez (t) ≥ 0 and thus, per (10), that K2 = −1. This means that for the ∆z (t) < 0 case (δ): ez (t) < 0 first case  of  (1) we are in case (β) of Fig. 5. For this case, sgn+ − 1 = −1. Fig. 5: Summary of the results of the case by case study of (8). For the second case of (1) we know that K1 = 0 and that s̃z (t) is even, and thus, per (10), that K2 = 0. This means (c) This case is impossible. From § 3.3.2, the value of smin that for the second case  of (1) we are in case (α) of Fig. 5. is either 0 or −2D−1 , with D an integer not smaller For this case, sgn+ 0 = 1. than 2. Hence smin is even and s̃z (t) = 2smin is even For the third case of (1) we know that |sz (t) − ŝz (t)| ≥ too, which is incompatible with K2 = −1. mz (t) + 1 and hence that K1 > 0. For this third case, there (d) As K1 = 0 and K2 = −1, we can see that are two subcases:  ez (t) = clip − 1, 2smin − s̃z (t), 2smax − s̃z (t) , which by – If ∆z (t) = sz (t) − ŝz (t) > 0 we are in case (γ). In this Corollary 1 we see is equivalent to ez (t) = −1, as case we know that ez (t) ≥ 0 thus sgn+ [ez (t)] = 1, thus s̃z (t) > 2smin . (1) yielding sgn+ [sz (t) − ŝz (t)] = 1 is the correct result. (e) This case is impossible.  In this case K1 >  0, – If ∆z (t) = sz (t) − ŝz (t) < 0 we are in case (δ). In this hence K1 = |∆z (t)| + mz (t) / 2mz (t) + 1 > case we know that ez (t) < 0 thus sgn+ [ez (t)] = −1, 0, but if ∆z (t) = 0, we can see that K1 = thus (1) yielding sgn+ [sz (t) − ŝz (t)] = −1 is the correct ⌊mz (t)/(2mz (t) + 1)⌋ = 0, as mz (t) ≥ 0 from § 4.8.2. result. (f) This case is impossible. Having  ∆z (t) > 0 implies At this point we have proven that all cases in (1) yield the sz (t) > ŝz (t), and sz (t) > s̃z (t)/2  . From  § 3.3.2 correct result. ■ we have that sz (t) ≤ smax , thus s̃z (t)/2 < smax . In this case we have that s̃z (t) = 2smax + 1, but R EFERENCES substituting our previous j finding k into this equation yields [1] M. Parente, J. Kerekes, and R. Heylen, “A Special Issue on Hyperspec- s̃z (t) = 2smax + 1 > 2 s̃z2(t) + 1, which is impossible. tral Imaging [From the Guest Editors],” IEEE Geosci. Remote Sens. Mag., vol. 7, no. 2, pp. 6–7, 2019. (g) As K3 ≥ 1 from (11), as K1 is an integer strictly larger [2] M. J. Khan, H. S. Khan, A. Yousaf, K. Khurshid, and A. Abbas, than 0 (i.e., K1 ≥ 1), and as ∆z (t) > 0 we have that “Modern Trends in Hyperspectral Image Analysis: A Review,” IEEE K2 +2 ≤ K2 +2 sgn (∆z (t))·K1 ·K3 . As K2 ∈ {−1, 0}, Access, vol. 6, pp. 14 118–14 129, 2018. [3] S.-E. Qian, “Introduction to hyperspectral satellites,” in Hyperspectral we have that 1 ≤ K2 + 2 sgn (∆z (t)) · K1 · K3 . I.e., the Satellites and System Design. CRC Press, Taylor & Francis Group, clipping operation on (8) is applied to a value not smaller 2020, ch. 1, pp. 1–52. than 1. From Corollary 2, as s̃z (t) < 2smax + 1, we see [4] G. Denis, A. Claverie, X. Pasco, J.-P. Darnis, B. de Maupeou, M. Lafaye, and E. Morel, “Towards disruptions in Earth observation? New Earth that ez (t) ≥ 0. Observation systems and markets evolution: Possible scenarios and (h) This case is impossible. ∆z (t) < 0 implies sz (t) < impacts,” Acta Astronautica, vol. 137, pp. 415–433, 2017. ŝz (t), and sz (t) < s̃z (t)/2 [5] I. Blanes, E. Magli, and J. Serra-Sagrista, “A Tutorial on Image  . From  § 3.3.2 we have that Compression for Optical Space Imaging Systems,” IEEE Geosci. Remote smin ≤ sz (t), thus smin < s̃z (t)/2 . In this case we have Sens. Mag., vol. 2, no. 3, pp. 8–26, 2014. that s̃z (t) = 2smin , but substituting our previous  finding [6] Consultative Committee for Space Data Systems, Low-Complexity Loss- into this equation yields s̃z (t) = 2smin < 2 s̃z (t)/2 , less and Near-Lossless Multispectral and Hyperspectral Image Com- pression, CCSDS 123.0-B-2. CCSDS, February 2019. which is impossible for s̃z (t) even and s̃z (t) = 2smin [7] M. Hernández-Cabronero, A. B. Kiely, M. Klimesh, I. Blanes, J. Ligo, makes s̃z (t) even. E. Magli, and J. Serra-Sagristà, “The CCSDS 123.0-B-2 “Low- (i) As K3 ≥ 1 from (11), as K1 is an integer strictly larger Complexity Lossless and Near-Lossless Multispectral and Hyperspectral Image Compression” Standard: A comprehensive review,” IEEE Geosci. than 0 (i.e., K1 ≥ 1), and as ∆z (t) < 0 we have that Remote Sens. Mag., vol. 9, no. 4, pp. 102–119, 2021. K2 +2 sgn (∆z (t))·K1 ·K3 ≤ K2 −2. As K2 ∈ {−1, 0}, [8] P. Chatziantoniou, A. Tsigkanos, and N. Kranitis, “A high-performance we have that K2 + 2 sgn (∆z (t)) · K1 · K3 ≤ −2. I.e., RTL implementation of the CCSDS-123.0-B-2 hybrid entropy coder on a space-grade SRAM FPGA,” in Proceedings of the 7th OBPDC, 2020, the clipping operation on (8) is applied to a value non- pp. 21–23. larger than −2. From Corollary 1, as s̃z (t) > 2smin , we [9] Y. Barrios, A. Sánchez, R. Guerra, and R. Sarmiento, “Hardware see that ez (t) < 0. Implementation of the CCSDS 123.0-B-2 Near-Lossless Compression Standard Following an HLS Design Methodology,” Remote Sensing, The results of this case by case analysis of equation (8) is vol. 13, no. 21, p. 4388, 2021. detailed in Fig. 5. There are only four cases remaining, and [10] I. Blanes, A. Kiely, M. Hernández-Cabronero, and J. Serra-Sagristà, “Performance Impact of Parameter Tuning on the CCSDS-123.0-B-2 for each one the value of sgn+ [ez (t)] is known. Low-Complexity Lossless and Near-Lossless Multispectral and Hyper- For the last part of the proof, we show that (1) yields the spectral Image Compression Standard,” Remote Sensing, vol. 11, no. 11, correct result for each of the cases in Fig. 5. From (9) we can 2019. [11] D. Báscones, C. Gonzalez, and D. Mozos, “A Real-Time FPGA Im- see that K1 = 0 is equivalent to plementation of the CCSDS 123.0-B-2 Standard,” IEEE Trans. Geosci. j  k Remote Sens., vol. 60, pp. 1–13, 2022. K1 = |∆z (t)| + mz (t) 2mz (t) + 1 = 0. (13) [12] Q. Fang, Y. Liu, and L. Zhang, “Design and implementation of a lossless compression system for hyperspectral images,” Traitement du Signal, As the dividend in (13) is non-negative and the divisor is vol. 37, no. 5, pp. 745–752, 2020.