laswriteitemcompressed_v2.cpp
Go to the documentation of this file.
1 /*
2 ===============================================================================
3 
4  FILE: laswriteitemcompressed_v2.cpp
5 
6  CONTENTS:
7 
8  see corresponding header file
9 
10  PROGRAMMERS:
11 
12  martin.isenburg@gmail.com
13 
14  COPYRIGHT:
15 
16  (c) 2011, Martin Isenburg, LASSO - tools to catch reality
17 
18  This is free software; you can redistribute and/or modify it under the
19  terms of the GNU Lesser General Licence as published by the Free Software
20  Foundation. See the COPYING file for more information.
21 
22  This software is distributed WITHOUT ANY WARRANTY and without even the
23  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 
25  CHANGE HISTORY:
26 
27  see corresponding header file
28 
29 ===============================================================================
30 */
31 
33 
34 #include <assert.h>
35 #include <string.h>
36 
37 /*
38 ===============================================================================
39  LASwriteItemCompressed_POINT10_v2
40 ===============================================================================
41 */
42 
43 struct LASpoint10
44 {
45  I32 x;
46  I32 y;
47  I32 z;
48  U16 intensity;
49  U8 return_number : 3;
55  U8 user_data;
57 };
58 
60 {
61  U32 i;
62 
63  /* set encoder */
64  assert(enc);
65  this->enc = enc;
66 
67  /* create models and integer compressors */
69  ic_intensity = new IntegerCompressor(enc, 16, 4);
73  for (i = 0; i < 256; i++)
74  {
75  m_bit_byte[i] = 0;
76  m_classification[i] = 0;
77  m_user_data[i] = 0;
78  }
79  ic_dx = new IntegerCompressor(enc, 32, 2); // 32 bits, 2 context
80  ic_dy = new IntegerCompressor(enc, 32, 22); // 32 bits, 22 contexts
81  ic_z = new IntegerCompressor(enc, 32, 20); // 32 bits, 20 contexts
82 }
83 
85 {
86  U32 i;
87 
89  delete ic_intensity;
92  delete ic_point_source_ID;
93  for (i = 0; i < 256; i++)
94  {
98  }
99  delete ic_dx;
100  delete ic_dy;
101  delete ic_z;
102 }
103 
105 {
106  U32 i;
107 
108  /* init state */
109  for (i=0; i < 16; i++)
110  {
113  last_intensity[i] = 0;
114  last_height[i/2] = 0;
115  }
116 
117  /* init models and integer compressors */
123  for (i = 0; i < 256; i++)
124  {
128  }
131  ic_z->initCompressor();
132 
133  /* init last item */
134  memcpy(last_item, item, 20);
135 
136  return TRUE;
137 }
138 
140 {
141  U32 r = ((LASpoint10*)item)->return_number;
142  U32 n = ((LASpoint10*)item)->number_of_returns_of_given_pulse;
143  U32 m = number_return_map[n][r];
144  U32 l = number_return_level[n][r];
145  U32 k_bits;
146  I32 median, diff;
147 
148  // compress which other values have changed
149  I32 changed_values = (((last_item[14] != item[14]) << 5) | // bit_byte
150  ((last_intensity[m] != ((LASpoint10*)item)->intensity) << 4) |
151  ((last_item[15] != item[15]) << 3) | // classification
152  ((last_item[16] != item[16]) << 2) | // scan_angle_rank
153  ((last_item[17] != item[17]) << 1) | // user_data
154  (((LASpoint10*)last_item)->point_source_ID != ((LASpoint10*)item)->point_source_ID));
155 
156  enc->encodeSymbol(m_changed_values, changed_values);
157 
158  // compress the bit_byte (edge_of_flight_line, scan_direction_flag, returns, ...) if it has changed
159  if (changed_values & 32)
160  {
161  if (m_bit_byte[last_item[14]] == 0)
162  {
165  }
166  enc->encodeSymbol(m_bit_byte[last_item[14]], item[14]);
167  }
168 
169  // compress the intensity if it has changed
170  if (changed_values & 16)
171  {
172  ic_intensity->compress(last_intensity[m], ((LASpoint10*)item)->intensity, (m < 3 ? m : 3));
173  last_intensity[m] = ((LASpoint10*)item)->intensity;
174  }
175 
176  // compress the classification ... if it has changed
177  if (changed_values & 8)
178  {
179  if (m_classification[last_item[15]] == 0)
180  {
183  }
184  enc->encodeSymbol(m_classification[last_item[15]], item[15]);
185  }
186 
187  // compress the scan_angle_rank ... if it has changed
188  if (changed_values & 4)
189  {
190  enc->encodeSymbol(m_scan_angle_rank[((LASpoint10*)item)->scan_direction_flag], U8_FOLD(item[16]-last_item[16]));
191  }
192 
193  // compress the user_data ... if it has changed
194  if (changed_values & 2)
195  {
196  if (m_user_data[last_item[17]] == 0)
197  {
200  }
201  enc->encodeSymbol(m_user_data[last_item[17]], item[17]);
202  }
203 
204  // compress the point_source_ID ... if it has changed
205  if (changed_values & 1)
206  {
207  ic_point_source_ID->compress(((LASpoint10*)last_item)->point_source_ID, ((LASpoint10*)item)->point_source_ID);
208  }
209 
210  // compress x coordinate
211  median = last_x_diff_median5[m].get();
212  diff = ((LASpoint10*)item)->x - ((LASpoint10*)last_item)->x;
213  ic_dx->compress(median, diff, n==1);
214  last_x_diff_median5[m].add(diff);
215 
216  // compress y coordinate
217  k_bits = ic_dx->getK();
218  median = last_y_diff_median5[m].get();
219  diff = ((LASpoint10*)item)->y - ((LASpoint10*)last_item)->y;
220  ic_dy->compress(median, diff, (n==1) + ( k_bits < 20 ? U32_ZERO_BIT_0(k_bits) : 20 ));
221  last_y_diff_median5[m].add(diff);
222 
223  // compress z coordinate
224  k_bits = (ic_dx->getK() + ic_dy->getK()) / 2;
225  ic_z->compress(last_height[l], ((LASpoint10*)item)->z, (n==1) + (k_bits < 18 ? U32_ZERO_BIT_0(k_bits) : 18));
226  last_height[l] = ((LASpoint10*)item)->z;
227 
228  // copy the last item
229  memcpy(last_item, item, 20);
230  return TRUE;
231 }
232 
233 /*
234 ===============================================================================
235  LASwriteItemCompressed_GPSTIME11_v2
236 ===============================================================================
237 */
238 
239 #define LASZIP_GPSTIME_MULTI 500
240 #define LASZIP_GPSTIME_MULTI_MINUS -10
241 #define LASZIP_GPSTIME_MULTI_UNCHANGED (LASZIP_GPSTIME_MULTI - LASZIP_GPSTIME_MULTI_MINUS + 1)
242 #define LASZIP_GPSTIME_MULTI_CODE_FULL (LASZIP_GPSTIME_MULTI - LASZIP_GPSTIME_MULTI_MINUS + 2)
243 
244 #define LASZIP_GPSTIME_MULTI_TOTAL (LASZIP_GPSTIME_MULTI - LASZIP_GPSTIME_MULTI_MINUS + 6)
245 
247 {
248  /* set encoder */
249  assert(enc);
250  this->enc = enc;
251  /* create entropy models and integer compressors */
254  ic_gpstime = new IntegerCompressor(enc, 32, 9); // 32 bits, 9 contexts
255 }
256 
258 {
261  delete ic_gpstime;
262 }
263 
265 {
266  /* init state */
267  last = 0, next = 0;
268  last_gpstime_diff[0] = 0;
269  last_gpstime_diff[1] = 0;
270  last_gpstime_diff[2] = 0;
271  last_gpstime_diff[3] = 0;
272  multi_extreme_counter[0] = 0;
273  multi_extreme_counter[1] = 0;
274  multi_extreme_counter[2] = 0;
275  multi_extreme_counter[3] = 0;
276 
277  /* init models and integer compressors */
281 
282  /* init last item */
283  last_gpstime[0].u64 = *((U64*)item);
284  last_gpstime[1].u64 = 0;
285  last_gpstime[2].u64 = 0;
286  last_gpstime[3].u64 = 0;
287  return TRUE;
288 }
289 
291 {
292  U64I64F64 this_gpstime;
293  this_gpstime.i64 = *((I64*)item);
294 
295  if (last_gpstime_diff[last] == 0) // if the last integer difference was zero
296  {
297  if (this_gpstime.i64 == last_gpstime[last].i64)
298  {
299  enc->encodeSymbol(m_gpstime_0diff, 0); // the doubles have not changed
300  }
301  else
302  {
303  // calculate the difference between the two doubles as an integer
304  I64 curr_gpstime_diff_64 = this_gpstime.i64 - last_gpstime[last].i64;
305  I32 curr_gpstime_diff = (I32)curr_gpstime_diff_64;
306  if (curr_gpstime_diff_64 == (I64)(curr_gpstime_diff))
307  {
308  enc->encodeSymbol(m_gpstime_0diff, 1); // the difference can be represented with 32 bits
309  ic_gpstime->compress(0, curr_gpstime_diff, 0);
310  last_gpstime_diff[last] = curr_gpstime_diff;
312  }
313  else // the difference is huge
314  {
315  U32 i;
316  // maybe the double belongs to another time sequence
317  for (i = 1; i < 4; i++)
318  {
319  I64 other_gpstime_diff_64 = this_gpstime.i64 - last_gpstime[(last+i)&3].i64;
320  I32 other_gpstime_diff = (I32)other_gpstime_diff_64;
321  if (other_gpstime_diff_64 == (I64)(other_gpstime_diff))
322  {
323  enc->encodeSymbol(m_gpstime_0diff, i+2); // it belongs to another sequence
324  last = (last+i)&3;
325  return write(item);
326  }
327  }
328  // no other sequence found. start new sequence.
330  ic_gpstime->compress((I32)(last_gpstime[last].u64 >> 32), (I32)(this_gpstime.u64 >> 32), 8);
331  enc->writeInt((U32)(this_gpstime.u64));
332  next = (next+1)&3;
333  last = next;
334  last_gpstime_diff[last] = 0;
336  }
337  last_gpstime[last].i64 = this_gpstime.i64;
338  }
339  }
340  else // the last integer difference was *not* zero
341  {
342  if (this_gpstime.i64 == last_gpstime[last].i64)
343  {
344  // if the doubles have not changed use a special symbol
346  }
347  else
348  {
349  // calculate the difference between the two doubles as an integer
350  I64 curr_gpstime_diff_64 = this_gpstime.i64 - last_gpstime[last].i64;
351  I32 curr_gpstime_diff = (I32)curr_gpstime_diff_64;
352 
353  // if the current gpstime difference can be represented with 32 bits
354  if (curr_gpstime_diff_64 == (I64)(curr_gpstime_diff))
355  {
356  // compute multiplier between current and last integer difference
357  F32 multi_f = (F32)curr_gpstime_diff / (F32)(last_gpstime_diff[last]);
358  I32 multi = I32_QUANTIZE(multi_f);
359 
360  // compress the residual curr_gpstime_diff in dependance on the multiplier
361  if (multi == 1)
362  {
363  // this is the case we assume we get most often for regular spaced pulses
365  ic_gpstime->compress(last_gpstime_diff[last], curr_gpstime_diff, 1);
367  }
368  else if (multi > 0)
369  {
370  if (multi < LASZIP_GPSTIME_MULTI) // positive multipliers up to LASZIP_GPSTIME_MULTI are compressed directly
371  {
373  if (multi < 10)
374  ic_gpstime->compress(multi*last_gpstime_diff[last], curr_gpstime_diff, 2);
375  else
376  ic_gpstime->compress(multi*last_gpstime_diff[last], curr_gpstime_diff, 3);
377  }
378  else
379  {
383  if (multi_extreme_counter[last] > 3)
384  {
385  last_gpstime_diff[last] = curr_gpstime_diff;
387  }
388  }
389  }
390  else if (multi < 0)
391  {
392  if (multi > LASZIP_GPSTIME_MULTI_MINUS) // negative multipliers larger than LASZIP_GPSTIME_MULTI_MINUS are compressed directly
393  {
395  ic_gpstime->compress(multi*last_gpstime_diff[last], curr_gpstime_diff, 5);
396  }
397  else
398  {
402  if (multi_extreme_counter[last] > 3)
403  {
404  last_gpstime_diff[last] = curr_gpstime_diff;
406  }
407  }
408  }
409  else
410  {
412  ic_gpstime->compress(0, curr_gpstime_diff, 7);
414  if (multi_extreme_counter[last] > 3)
415  {
416  last_gpstime_diff[last] = curr_gpstime_diff;
418  }
419  }
420  }
421  else // the difference is huge
422  {
423  U32 i;
424  // maybe the double belongs to another time sequence
425  for (i = 1; i < 4; i++)
426  {
427  I64 other_gpstime_diff_64 = this_gpstime.i64 - last_gpstime[(last+i)&3].i64;
428  I32 other_gpstime_diff = (I32)other_gpstime_diff_64;
429  if (other_gpstime_diff_64 == (I64)(other_gpstime_diff))
430  {
431  // it belongs to this sequence
433  last = (last+i)&3;
434  return write(item);
435  }
436  }
437  // no other sequence found. start new sequence.
439  ic_gpstime->compress((I32)(last_gpstime[last].u64 >> 32), (I32)(this_gpstime.u64 >> 32), 8);
440  enc->writeInt((U32)(this_gpstime.u64));
441  next = (next+1)&3;
442  last = next;
443  last_gpstime_diff[last] = 0;
445  }
446  last_gpstime[last].i64 = this_gpstime.i64;
447  }
448  }
449  return TRUE;
450 }
451 
452 /*
453 ===============================================================================
454  LASwriteItemCompressed_RGB12_v2
455 ===============================================================================
456 */
457 
459 {
460  /* set encoder */
461  assert(enc);
462  this->enc = enc;
463 
464  /* create models and integer compressors */
472 }
473 
475 {
483 }
484 
486 {
487  /* init state */
488 
489  /* init models and integer compressors */
497 
498  /* init last item */
499  memcpy(last_item, item, 6);
500  return TRUE;
501 }
502 
504 {
505  I32 diff_l = 0;
506  I32 diff_h = 0;
507  I32 corr;
508  U32 sym = ((last_item[0]&0x00FF) != (((U16*)item)[0]&0x00FF)) << 0;
509  sym |= ((last_item[0]&0xFF00) != (((U16*)item)[0]&0xFF00)) << 1;
510  sym |= ((last_item[1]&0x00FF) != (((U16*)item)[1]&0x00FF)) << 2;
511  sym |= ((last_item[1]&0xFF00) != (((U16*)item)[1]&0xFF00)) << 3;
512  sym |= ((last_item[2]&0x00FF) != (((U16*)item)[2]&0x00FF)) << 4;
513  sym |= ((last_item[2]&0xFF00) != (((U16*)item)[2]&0xFF00)) << 5;
514  sym |= (((((U16*)item)[0]&0x00FF) != (((U16*)item)[1]&0x00FF)) || ((((U16*)item)[0]&0x00FF) != (((U16*)item)[2]&0x00FF)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[1]&0xFF00)) || ((((U16*)item)[0]&0xFF00) != (((U16*)item)[2]&0xFF00))) << 6;
516  if (sym & (1 << 0))
517  {
518  diff_l = ((int)(((U16*)item)[0]&255)) - (last_item[0]&255);
520  }
521  if (sym & (1 << 1))
522  {
523  diff_h = ((int)(((U16*)item)[0]>>8)) - (last_item[0]>>8);
525  }
526  if (sym & (1 << 6))
527  {
528  if (sym & (1 << 2))
529  {
530  corr = ((int)(((U16*)item)[1]&255)) - U8_CLAMP(diff_l + (last_item[1]&255));
532  }
533  if (sym & (1 << 4))
534  {
535  diff_l = (diff_l + (((U16*)item)[1]&255) - (last_item[1]&255)) / 2;
536  corr = ((int)(((U16*)item)[2]&255)) - U8_CLAMP(diff_l + (last_item[2]&255));
538  }
539  if (sym & (1 << 3))
540  {
541  corr = ((int)(((U16*)item)[1]>>8)) - U8_CLAMP(diff_h + (last_item[1]>>8));
543  }
544  if (sym & (1 << 5))
545  {
546  diff_h = (diff_h + (((U16*)item)[1]>>8) - (last_item[1]>>8)) / 2;
547  corr = ((int)(((U16*)item)[2]>>8)) - U8_CLAMP(diff_h + (last_item[2]>>8));
549  }
550  }
551  memcpy(last_item, item, 6);
552  return TRUE;
553 }
554 
555 /*
556 ===============================================================================
557  LASwriteItemCompressed_WAVEPACKET13_v2
558 ===============================================================================
559 */
560 
561 #ifdef MIST
562 
563 struct LASwavepacket13
564 {
565  U64 offset;
568  U32I32F32 x;
569  U32I32F32 y;
570  U32I32F32 z;
571 };
572 
573 LASwriteItemCompressed_WAVEPACKET13_v2::LASwriteItemCompressed_WAVEPACKET13_v2(EntropyEncoder* enc)
574 {
575  /* set encoder */
576  assert(enc);
577  this->enc = enc;
578 
579  /* create models and integer compressors */
580  m_packet_index = enc->createSymbolModel(256);
581  m_offset_diff[0] = enc->createSymbolModel(4);
582  m_offset_diff[1] = enc->createSymbolModel(4);
583  m_offset_diff[2] = enc->createSymbolModel(4);
584  m_offset_diff[3] = enc->createSymbolModel(4);
585  ic_offset_diff = new IntegerCompressor(enc, 32);
586  ic_packet_size = new IntegerCompressor(enc, 32);
587  ic_return_point = new IntegerCompressor(enc, 32);
588  ic_xyz = new IntegerCompressor(enc, 32, 3);
589 
590  /* create last item */
591  last_item = new U8[28];
592 }
593 
594 LASwriteItemCompressed_WAVEPACKET13_v2::~LASwriteItemCompressed_WAVEPACKET13_v2()
595 {
596  enc->destroySymbolModel(m_packet_index);
597  enc->destroySymbolModel(m_offset_diff[0]);
598  enc->destroySymbolModel(m_offset_diff[1]);
599  enc->destroySymbolModel(m_offset_diff[2]);
600  enc->destroySymbolModel(m_offset_diff[3]);
601  delete ic_offset_diff;
602  delete ic_packet_size;
603  delete ic_return_point;
604  delete ic_xyz;
605  delete [] last_item;
606 }
607 
608 BOOL LASwriteItemCompressed_WAVEPACKET13_v2::init(const U8* item)
609 {
610  /* init state */
611  last_diff_32 = 0;
612  sym_last_offset_diff = 0;
613 
614  /* init models and integer compressors */
615  enc->initSymbolModel(m_packet_index);
616  enc->initSymbolModel(m_offset_diff[0]);
617  enc->initSymbolModel(m_offset_diff[1]);
618  enc->initSymbolModel(m_offset_diff[2]);
619  enc->initSymbolModel(m_offset_diff[3]);
620  ic_offset_diff->initCompressor();
621  ic_packet_size->initCompressor();
622  ic_return_point->initCompressor();
623  ic_xyz->initCompressor();
624 
625  /* init last item */
626  item++;
627  memcpy(last_item, item, 28);
628  return TRUE;
629 }
630 
631 inline BOOL LASwriteItemCompressed_WAVEPACKET13_v2::write(const U8* item)
632 {
633  enc->encodeSymbol(m_packet_index, (U32)(item[0]));
634  item++;
635 
636  // calculate the difference between the two offsets
637  I64 curr_diff_64 = ((LASwavepacket13*)item)->offset - ((LASwavepacket13*)last_item)->offset;
638  I32 curr_diff_32 = (I32)curr_diff_64;
639  // if the current difference can be represented with 32 bits
640  if (curr_diff_64 == (I64)(curr_diff_32))
641  {
642  if (curr_diff_32 == 0) // current difference is zero
643  {
644  enc->encodeSymbol(m_offset_diff[sym_last_offset_diff], 0);
645  sym_last_offset_diff = 0;
646  }
647  else if (curr_diff_32 == (I32)((LASwavepacket13*)last_item)->packet_size) // current difference is size of last packet
648  {
649  enc->encodeSymbol(m_offset_diff[sym_last_offset_diff], 1);
650  sym_last_offset_diff = 1;
651  }
652  else //
653  {
654  enc->encodeSymbol(m_offset_diff[sym_last_offset_diff], 2);
655  sym_last_offset_diff = 2;
656  ic_offset_diff->compress(last_diff_32, curr_diff_32);
657  last_diff_32 = curr_diff_32;
658  }
659  }
660  else
661  {
662  enc->encodeSymbol(m_offset_diff[sym_last_offset_diff], 3);
663  sym_last_offset_diff = 3;
664  enc->writeInt64(((LASwavepacket13*)item)->offset);
665  }
666  ic_packet_size->compress(((LASwavepacket13*)last_item)->packet_size, ((LASwavepacket13*)item)->packet_size);
667  ic_return_point->compress(((LASwavepacket13*)last_item)->return_point.i32, ((LASwavepacket13*)item)->return_point.i32);
668  ic_xyz->compress(((LASwavepacket13*)last_item)->x.i32, ((LASwavepacket13*)item)->x.i32, 0);
669  ic_xyz->compress(((LASwavepacket13*)last_item)->y.i32, ((LASwavepacket13*)item)->y.i32, 1);
670  ic_xyz->compress(((LASwavepacket13*)last_item)->z.i32, ((LASwavepacket13*)item)->z.i32, 2);
671  memcpy(last_item, item, 28);
672  return TRUE;
673 }
674 
675 #endif
676 
677 /*
678 ===============================================================================
679  LASwriteItemCompressed_BYTE_v2
680 ===============================================================================
681 */
682 
684 {
685  U32 i;
686 
687  /* set encoder */
688  assert(enc);
689  this->enc = enc;
690  assert(number);
691  this->number = number;
692 
693  /* create models and integer compressors */
694  m_byte = new EntropyModel*[number];
695  for (i = 0; i < number; i++)
696  {
697  m_byte[i] = enc->createSymbolModel(256);
698  }
699 
700  /* create last item */
701  last_item = new U8[number];
702 }
703 
705 {
706  U32 i;
707  for (i = 0; i < number; i++)
708  {
710  }
711  delete [] m_byte;
712  delete [] last_item;
713 }
714 
716 {
717  U32 i;
718  /* init state */
719 
720  /* init models and integer compressors */
721  for (i = 0; i < number; i++)
722  {
724  }
725 
726  /* init last point */
727  memcpy(last_item, item, number);
728  return TRUE;
729 }
730 
732 {
733  U32 i;
734  I32 diff;
735  for (i = 0; i < number; i++)
736  {
737  diff = item[i] - last_item[i];
738  enc->encodeSymbol(m_byte[i], U8_FOLD(diff));
739  }
740  memcpy(last_item, item, number);
741  return TRUE;
742 }
743 
LASpoint10
Definition: lasreaditemcompressed_v1.cpp:43
LASwriteItemCompressed_RGB12_v2::init
BOOL init(const U8 *item)
Definition: laswriteitemcompressed_v2.cpp:485
EntropyEncoder::initSymbolModel
virtual void initSymbolModel(EntropyModel *model, U32 *init=0)=0
IntegerCompressor::compress
void compress(I32 iPred, I32 iReal, U32 context=0)
Definition: integercompressor.cpp:263
LASpoint10::user_data
U8 user_data
Definition: lasreaditemcompressed_v1.cpp:55
LASwriteItemCompressed_BYTE_v2::init
BOOL init(const U8 *item)
Definition: laswriteitemcompressed_v2.cpp:715
LASpoint10::x
I32 x
Definition: lasreaditemcompressed_v1.cpp:45
LASwriteItemCompressed_POINT10_v2::m_changed_values
EntropyModel * m_changed_values
Definition: laswriteitemcompressed_v2.hpp:59
LASZIP_GPSTIME_MULTI_MINUS
#define LASZIP_GPSTIME_MULTI_MINUS
Definition: laswriteitemcompressed_v2.cpp:240
StreamingMedian5::init
void init()
Definition: laszip_common_v2.hpp:40
LASwavepacket13::return_point
U32I32F32 return_point
Definition: lasreaditemcompressed_v1.cpp:432
LASpoint10::intensity
U16 intensity
Definition: lasreaditemcompressed_v1.cpp:48
I8
char I8
Definition: mydefs.hpp:37
LASwriteItemCompressed_POINT10_v2::m_scan_angle_rank
EntropyModel * m_scan_angle_rank[2]
Definition: laswriteitemcompressed_v2.hpp:61
LASwriteItemCompressed_POINT10_v2::last_height
I32 last_height[8]
Definition: laswriteitemcompressed_v2.hpp:57
LASwriteItemCompressed_POINT10_v2::ic_dy
IntegerCompressor * ic_dy
Definition: laswriteitemcompressed_v2.hpp:67
IntegerCompressor::getK
U32 getK() const
Definition: integercompressor.hpp:71
I64
long long I64
Definition: mydefs.hpp:48
LASwriteItemCompressed_GPSTIME11_v2::enc
EntropyEncoder * enc
Definition: laswriteitemcompressed_v2.hpp:83
U8_CLAMP
#define U8_CLAMP(n)
Definition: mydefs.hpp:97
LASwriteItemCompressed_POINT10_v2::m_bit_byte
EntropyModel * m_bit_byte[256]
Definition: laswriteitemcompressed_v2.hpp:63
EntropyEncoder::encodeSymbol
virtual void encodeSymbol(EntropyModel *model, U32 sym)=0
EntropyEncoder::writeInt
virtual void writeInt(U32 sym)=0
LASwriteItemCompressed_POINT10_v2::last_y_diff_median5
StreamingMedian5 last_y_diff_median5[16]
Definition: laswriteitemcompressed_v2.hpp:56
I32
int I32
Definition: mydefs.hpp:35
U64I64F64::u64
U64 u64
Definition: mydefs.hpp:61
LASwriteItemCompressed_POINT10_v2::ic_z
IntegerCompressor * ic_z
Definition: laswriteitemcompressed_v2.hpp:68
TRUE
#define TRUE
Definition: mydefs.hpp:137
EntropyEncoder::destroySymbolModel
virtual void destroySymbolModel(EntropyModel *model)=0
LASwriteItemCompressed_BYTE_v2::~LASwriteItemCompressed_BYTE_v2
~LASwriteItemCompressed_BYTE_v2()
Definition: laswriteitemcompressed_v2.cpp:704
LASwriteItemCompressed_POINT10_v2::ic_dx
IntegerCompressor * ic_dx
Definition: laswriteitemcompressed_v2.hpp:66
number_return_level
const U8 number_return_level[8][8]
Definition: laszip_common_v2.hpp:174
LASwriteItemCompressed_BYTE_v2::last_item
U8 * last_item
Definition: laswriteitemcompressed_v2.hpp:132
LASwriteItemCompressed_RGB12_v2::write
BOOL write(const U8 *item)
Definition: laswriteitemcompressed_v2.cpp:503
LASwavepacket13::y
U32I32F32 y
Definition: lasreaditemcompressed_v1.cpp:434
LASZIP_GPSTIME_MULTI
#define LASZIP_GPSTIME_MULTI
Definition: laswriteitemcompressed_v2.cpp:239
LASwavepacket13::x
U32I32F32 x
Definition: lasreaditemcompressed_v1.cpp:433
StreamingMedian5::add
void add(I32 v)
Definition: laszip_common_v2.hpp:45
LASZIP_GPSTIME_MULTI_UNCHANGED
#define LASZIP_GPSTIME_MULTI_UNCHANGED
Definition: laswriteitemcompressed_v2.cpp:241
laswriteitemcompressed_v2.hpp
LASwriteItemCompressed_GPSTIME11_v2::last_gpstime_diff
I32 last_gpstime_diff[4]
Definition: laswriteitemcompressed_v2.hpp:86
LASwriteItemCompressed_RGB12_v2::m_rgb_diff_5
EntropyModel * m_rgb_diff_5
Definition: laswriteitemcompressed_v2.hpp:115
LASwriteItemCompressed_GPSTIME11_v2::LASwriteItemCompressed_GPSTIME11_v2
LASwriteItemCompressed_GPSTIME11_v2(EntropyEncoder *enc)
Definition: laswriteitemcompressed_v2.cpp:246
IntegerCompressor::initCompressor
void initCompressor()
Definition: integercompressor.cpp:218
LASwriteItemCompressed_RGB12_v2::~LASwriteItemCompressed_RGB12_v2
~LASwriteItemCompressed_RGB12_v2()
Definition: laswriteitemcompressed_v2.cpp:474
LASwavepacket13
Definition: lasreaditemcompressed_v1.cpp:428
EntropyEncoder::createSymbolModel
virtual EntropyModel * createSymbolModel(U32 n)=0
EntropyEncoder::writeInt64
virtual void writeInt64(U64 sym)=0
LASwavepacket13::packet_size
U32 packet_size
Definition: lasreaditemcompressed_v1.cpp:431
LASwriteItemCompressed_POINT10_v2::ic_intensity
IntegerCompressor * ic_intensity
Definition: laswriteitemcompressed_v2.hpp:60
LASwriteItemCompressed_RGB12_v2::enc
EntropyEncoder * enc
Definition: laswriteitemcompressed_v2.hpp:106
LASwriteItemCompressed_POINT10_v2::last_x_diff_median5
StreamingMedian5 last_x_diff_median5[16]
Definition: laswriteitemcompressed_v2.hpp:55
LASpoint10::number_of_returns_of_given_pulse
U8 number_of_returns_of_given_pulse
Definition: lasreaditemcompressed_v1.cpp:50
LASZIP_GPSTIME_MULTI_CODE_FULL
#define LASZIP_GPSTIME_MULTI_CODE_FULL
Definition: laswriteitemcompressed_v2.cpp:242
LASwriteItemCompressed_GPSTIME11_v2::ic_gpstime
IntegerCompressor * ic_gpstime
Definition: laswriteitemcompressed_v2.hpp:91
StreamingMedian5::get
I32 get() const
Definition: laszip_common_v2.hpp:120
LASwriteItemCompressed_RGB12_v2::m_rgb_diff_4
EntropyModel * m_rgb_diff_4
Definition: laswriteitemcompressed_v2.hpp:114
LASpoint10::point_source_ID
U16 point_source_ID
Definition: lasreaditemcompressed_v1.cpp:56
LASwriteItemCompressed_GPSTIME11_v2::m_gpstime_multi
EntropyModel * m_gpstime_multi
Definition: laswriteitemcompressed_v2.hpp:89
LASwriteItemCompressed_GPSTIME11_v2::last_gpstime
U64I64F64 last_gpstime[4]
Definition: laswriteitemcompressed_v2.hpp:85
LASZIP_GPSTIME_MULTI_TOTAL
#define LASZIP_GPSTIME_MULTI_TOTAL
Definition: laswriteitemcompressed_v2.cpp:244
I32_QUANTIZE
#define I32_QUANTIZE(n)
Definition: mydefs.hpp:111
LASwriteItemCompressed_GPSTIME11_v2::next
U32 next
Definition: laswriteitemcompressed_v2.hpp:84
LASwriteItemCompressed_GPSTIME11_v2::last
U32 last
Definition: laswriteitemcompressed_v2.hpp:84
U32_ZERO_BIT_0
#define U32_ZERO_BIT_0(n)
Definition: mydefs.hpp:130
LASwriteItemCompressed_BYTE_v2::number
U32 number
Definition: laswriteitemcompressed_v2.hpp:131
LASwriteItemCompressed_POINT10_v2::~LASwriteItemCompressed_POINT10_v2
~LASwriteItemCompressed_POINT10_v2()
Definition: laswriteitemcompressed_v2.cpp:84
LASwriteItemCompressed_RGB12_v2::m_byte_used
EntropyModel * m_byte_used
Definition: laswriteitemcompressed_v2.hpp:109
U16
unsigned short U16
Definition: mydefs.hpp:40
LASwriteItemCompressed_POINT10_v2::write
BOOL write(const U8 *item)
Definition: laswriteitemcompressed_v2.cpp:139
LASwriteItemCompressed_GPSTIME11_v2::~LASwriteItemCompressed_GPSTIME11_v2
~LASwriteItemCompressed_GPSTIME11_v2()
Definition: laswriteitemcompressed_v2.cpp:257
LASpoint10::classification
U8 classification
Definition: lasreaditemcompressed_v1.cpp:53
LASwriteItemCompressed_RGB12_v2::m_rgb_diff_2
EntropyModel * m_rgb_diff_2
Definition: laswriteitemcompressed_v2.hpp:112
LASwriteItemCompressed_RGB12_v2::m_rgb_diff_1
EntropyModel * m_rgb_diff_1
Definition: laswriteitemcompressed_v2.hpp:111
LASwriteItemCompressed_POINT10_v2::last_item
U8 last_item[20]
Definition: laswriteitemcompressed_v2.hpp:53
LASpoint10::edge_of_flight_line
U8 edge_of_flight_line
Definition: lasreaditemcompressed_v1.cpp:52
LASwavepacket13::offset
U64 offset
Definition: lasreaditemcompressed_v1.cpp:430
U8
unsigned char U8
Definition: mydefs.hpp:41
BOOL
int BOOL
Definition: mydefs.hpp:57
U64
unsigned long long U64
Definition: mydefs.hpp:47
U64I64F64
Definition: mydefs.hpp:61
LASwriteItemCompressed_GPSTIME11_v2::init
BOOL init(const U8 *item)
Definition: laswriteitemcompressed_v2.cpp:264
LASwriteItemCompressed_GPSTIME11_v2::m_gpstime_0diff
EntropyModel * m_gpstime_0diff
Definition: laswriteitemcompressed_v2.hpp:90
LASwriteItemCompressed_POINT10_v2::enc
EntropyEncoder * enc
Definition: laswriteitemcompressed_v2.hpp:52
LASwriteItemCompressed_POINT10_v2::m_classification
EntropyModel * m_classification[256]
Definition: laswriteitemcompressed_v2.hpp:64
F32
float F32
Definition: mydefs.hpp:51
LASwriteItemCompressed_GPSTIME11_v2::write
BOOL write(const U8 *item)
Definition: laswriteitemcompressed_v2.cpp:290
LASwriteItemCompressed_POINT10_v2::last_intensity
U16 last_intensity[16]
Definition: laswriteitemcompressed_v2.hpp:54
LASwriteItemCompressed_BYTE_v2::m_byte
EntropyModel ** m_byte
Definition: laswriteitemcompressed_v2.hpp:134
LASwriteItemCompressed_POINT10_v2::ic_point_source_ID
IntegerCompressor * ic_point_source_ID
Definition: laswriteitemcompressed_v2.hpp:62
LASpoint10::scan_angle_rank
I8 scan_angle_rank
Definition: lasreaditemcompressed_v1.cpp:54
LASpoint10::y
I32 y
Definition: lasreaditemcompressed_v1.cpp:46
LASwavepacket13::z
U32I32F32 z
Definition: lasreaditemcompressed_v1.cpp:435
number_return_map
const U8 number_return_map[8][8]
Definition: laszip_common_v2.hpp:146
LASpoint10::return_number
U8 return_number
Definition: lasreaditemcompressed_v1.cpp:49
LASwriteItemCompressed_POINT10_v2::init
BOOL init(const U8 *item)
Definition: laswriteitemcompressed_v2.cpp:104
LASwriteItemCompressed_RGB12_v2::m_rgb_diff_3
EntropyModel * m_rgb_diff_3
Definition: laswriteitemcompressed_v2.hpp:113
LASwriteItemCompressed_BYTE_v2::write
BOOL write(const U8 *item)
Definition: laswriteitemcompressed_v2.cpp:731
LASwriteItemCompressed_GPSTIME11_v2::multi_extreme_counter
I32 multi_extreme_counter[4]
Definition: laswriteitemcompressed_v2.hpp:87
LASwriteItemCompressed_POINT10_v2::LASwriteItemCompressed_POINT10_v2
LASwriteItemCompressed_POINT10_v2(EntropyEncoder *enc)
Definition: laswriteitemcompressed_v2.cpp:59
LASwriteItemCompressed_RGB12_v2::last_item
U16 last_item[3]
Definition: laswriteitemcompressed_v2.hpp:107
U32
unsigned int U32
Definition: mydefs.hpp:39
LASwriteItemCompressed_BYTE_v2::enc
EntropyEncoder * enc
Definition: laswriteitemcompressed_v2.hpp:130
LASwriteItemCompressed_RGB12_v2::m_rgb_diff_0
EntropyModel * m_rgb_diff_0
Definition: laswriteitemcompressed_v2.hpp:110
U32I32F32
Definition: mydefs.hpp:60
LASwriteItemCompressed_BYTE_v2::LASwriteItemCompressed_BYTE_v2
LASwriteItemCompressed_BYTE_v2(EntropyEncoder *enc, U32 number)
Definition: laswriteitemcompressed_v2.cpp:683
LASwriteItemCompressed_POINT10_v2::m_user_data
EntropyModel * m_user_data[256]
Definition: laswriteitemcompressed_v2.hpp:65
EntropyEncoder
Definition: entropyencoder.hpp:38
LASpoint10::scan_direction_flag
U8 scan_direction_flag
Definition: lasreaditemcompressed_v1.cpp:51
LASpoint10::z
I32 z
Definition: lasreaditemcompressed_v1.cpp:47
IntegerCompressor
Definition: integercompressor.hpp:53
LASwriteItemCompressed_RGB12_v2::LASwriteItemCompressed_RGB12_v2
LASwriteItemCompressed_RGB12_v2(EntropyEncoder *enc)
Definition: laswriteitemcompressed_v2.cpp:458
U8_FOLD
#define U8_FOLD(n)
Definition: mydefs.hpp:94
U64I64F64::i64
I64 i64
Definition: mydefs.hpp:61


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23