1 /* 2 =============================================================================== 3 4 PROGRAMMERS: 5 6 martin.isenburg@rapidlasso.com - http://rapidlasso.com 7 uday.karan@gmail.com - Hobu, Inc. 8 9 COPYRIGHT: 10 11 (c) 2007-2014, martin isenburg, rapidlasso - tools to catch reality 12 (c) 2014, Uday Verma, Hobu, Inc. 13 14 This is free software; you can redistribute and/or modify it under the 15 terms of the GNU Lesser General Licence as published by the Free Software 16 Foundation. See the COPYING file for more information. 17 18 This software is distributed WITHOUT ANY WARRANTY and without even the 19 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 21 CHANGE HISTORY: 22 23 =============================================================================== 24 */ 25 26 namespace lazperf 27 { 28 namespace detail 29 { 30 31 class Rgb10Base 32 { 33 protected: 34 Rgb10Base(); 35 36 bool have_last_; 37 las::rgb last; 38 39 models::arithmetic m_byte_used; 40 models::arithmetic m_rgb_diff_0; 41 models::arithmetic m_rgb_diff_1; 42 models::arithmetic m_rgb_diff_2; 43 models::arithmetic m_rgb_diff_3; 44 models::arithmetic m_rgb_diff_4; 45 models::arithmetic m_rgb_diff_5; 46 }; 47 48 class Rgb10Compressor : public Rgb10Base 49 { 50 public: 51 Rgb10Compressor(encoders::arithmetic<OutCbStream>&); 52 53 const char *compress(const char *buf); 54 55 private: 56 encoders::arithmetic<OutCbStream>& enc_; 57 }; 58 59 class Rgb10Decompressor : public Rgb10Base 60 { 61 public: 62 Rgb10Decompressor(decoders::arithmetic<InCbStream>&); 63 64 char *decompress(char *buf); 65 66 private: 67 decoders::arithmetic<InCbStream>& dec_; 68 }; 69 70 } // namespace detail 71 } // namespace lazperf 72