73 for (i = 0; i < 256; i++)
93 for (i = 0; i < 256; i++)
109 for (i=0; i < 16; i++)
123 for (i = 0; i < 256; i++)
142 U32 n = ((
LASpoint10*)item)->number_of_returns_of_given_pulse;
149 I32 changed_values = (((
last_item[14] != item[14]) << 5) |
159 if (changed_values & 32)
170 if (changed_values & 16)
177 if (changed_values & 8)
188 if (changed_values & 4)
194 if (changed_values & 2)
205 if (changed_values & 1)
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)
244 #define LASZIP_GPSTIME_MULTI_TOTAL (LASZIP_GPSTIME_MULTI - LASZIP_GPSTIME_MULTI_MINUS + 6)
293 this_gpstime.
i64 = *((
I64*)item);
305 I32 curr_gpstime_diff = (
I32)curr_gpstime_diff_64;
306 if (curr_gpstime_diff_64 == (
I64)(curr_gpstime_diff))
317 for (i = 1; i < 4; i++)
320 I32 other_gpstime_diff = (
I32)other_gpstime_diff_64;
321 if (other_gpstime_diff_64 == (
I64)(other_gpstime_diff))
351 I32 curr_gpstime_diff = (
I32)curr_gpstime_diff_64;
354 if (curr_gpstime_diff_64 == (
I64)(curr_gpstime_diff))
425 for (i = 1; i < 4; i++)
428 I32 other_gpstime_diff = (
I32)other_gpstime_diff_64;
429 if (other_gpstime_diff_64 == (
I64)(other_gpstime_diff))
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;
518 diff_l = ((int)(((
U16*)item)[0]&255)) - (
last_item[0]&255);
523 diff_h = ((int)(((
U16*)item)[0]>>8)) - (
last_item[0]>>8);
535 diff_l = (diff_l + (((
U16*)item)[1]&255) - (
last_item[1]&255)) / 2;
546 diff_h = (diff_h + (((
U16*)item)[1]>>8) - (
last_item[1]>>8)) / 2;
573 LASwriteItemCompressed_WAVEPACKET13_v2::LASwriteItemCompressed_WAVEPACKET13_v2(
EntropyEncoder* enc)
591 last_item =
new U8[28];
594 LASwriteItemCompressed_WAVEPACKET13_v2::~LASwriteItemCompressed_WAVEPACKET13_v2()
601 delete ic_offset_diff;
602 delete ic_packet_size;
603 delete ic_return_point;
608 BOOL LASwriteItemCompressed_WAVEPACKET13_v2::init(
const U8* item)
612 sym_last_offset_diff = 0;
620 ic_offset_diff->initCompressor();
621 ic_packet_size->initCompressor();
622 ic_return_point->initCompressor();
623 ic_xyz->initCompressor();
627 memcpy(last_item, item, 28);
631 inline BOOL LASwriteItemCompressed_WAVEPACKET13_v2::write(
const U8* item)
638 I32 curr_diff_32 = (
I32)curr_diff_64;
640 if (curr_diff_64 == (
I64)(curr_diff_32))
642 if (curr_diff_32 == 0)
644 enc->
encodeSymbol(m_offset_diff[sym_last_offset_diff], 0);
645 sym_last_offset_diff = 0;
649 enc->
encodeSymbol(m_offset_diff[sym_last_offset_diff], 1);
650 sym_last_offset_diff = 1;
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;
662 enc->
encodeSymbol(m_offset_diff[sym_last_offset_diff], 3);
663 sym_last_offset_diff = 3;
671 memcpy(last_item, item, 28);
695 for (i = 0; i <
number; i++)
707 for (i = 0; i <
number; i++)
721 for (i = 0; i <
number; i++)
735 for (i = 0; i <
number; i++)