Hello community, here is the log from the commit of package laszip for openSUSE:Factory checked in at 2019-07-15 22:43:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/laszip (Old) and /work/SRC/openSUSE:Factory/.laszip.new.1887 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "laszip" Mon Jul 15 22:43:57 2019 rev:5 rq:714512 version:3.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/laszip/laszip.changes 2019-02-27 17:28:45.691329115 +0100 +++ /work/SRC/openSUSE:Factory/.laszip.new.1887/laszip.changes 2019-07-15 22:43:57.423903127 +0200 @@ -1,0 +2,16 @@ +Wed Jul 10 18:51:45 UTC 2019 - Dirk Stoecker <[email protected]> + +- update to version 3.4.1 + * 1024 AC_BUFFER_SIZE to 4096 for propagate_carry() overflow + * Fix two small memory leaks + * FastAC now properly BSD-licensed. + * writer: sanity check for consistent legacy and extended classification + * reader: zero the legacy classification whenever extended classification + is larger than 31 + * bug fix when writing 4,294,967,296 or more points uncompressed to LAS + * fix for LASzip v4 decompression of WavePacket part of PRDF 9 and 10 + * upped to 3.2 r9 for bug fix in multi-channel NIR decompression + * fix for v4 decompression of WavePacket part of PRDF 9 and 10 +- build fix: use -fPIC instead of -fPIE for library + +------------------------------------------------------------------- Old: ---- laszip-src-3.2.9.tar.gz laszip-src-3.2.9.tar.gz.md5 New: ---- laszip-src-3.4.1.tar.gz laszip-src-3.4.1.tar.gz.sha256sum ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ laszip.spec ++++++ --- /var/tmp/diff_new_pack.rZNpOP/_old 2019-07-15 22:43:57.955903000 +0200 +++ /var/tmp/diff_new_pack.rZNpOP/_new 2019-07-15 22:43:57.955903000 +0200 @@ -21,14 +21,14 @@ %define sover 8 Name: laszip -Version: 3.2.9 +Version: 3.4.1 Release: 0 Summary: Compression library supporting ASPRS LAS format data License: LGPL-2.1-or-later Group: Development/Libraries/C and C++ -Url: http://www.laszip.org/ +Url: https://laszip.org/ Source0: https://github.com/LASzip/LASzip/releases/download/%{version}/laszip-src-%{version}.tar.gz -Source1: https://github.com/LASzip/LASzip/releases/download/%{version}/laszip-src-%{version}.tar.gz.md5 +Source1: https://github.com/LASzip/LASzip/releases/download/%{version}/laszip-src-%{version}.tar.gz.sha256sum BuildRequires: cmake BuildRequires: gcc-c++ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -84,10 +84,10 @@ %build # laszip need dlopen,dlsym,dlclose %cmake \ - -DCMAKE_C_FLAGS="%{optflags} -fno-strict-aliasing -fPIE -pie" \ - -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -fno-strict-aliasing -fPIE -pie" \ - -DCMAKE_CXX_FLAGS="%{optflags} -fno-strict-aliasing -fPIE -pie" \ - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -fno-strict-aliasing -fPIE -pie" \ + -DCMAKE_C_FLAGS="%{optflags} -fno-strict-aliasing -fPIC" \ + -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -fno-strict-aliasing -fPIC" \ + -DCMAKE_CXX_FLAGS="%{optflags} -fno-strict-aliasing -fPIC" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -fno-strict-aliasing -fPIC" \ -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now -Wl,--no-as-needed -ldl" make V=1 %{?_smp_mflags} ++++++ laszip-src-3.2.9.tar.gz -> laszip-src-3.4.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/CHANGES.txt new/laszip-src-3.4.1/CHANGES.txt --- old/laszip-src-3.2.9/CHANGES.txt 2018-11-19 16:56:40.000000000 +0100 +++ new/laszip-src-3.4.1/CHANGES.txt 2019-04-12 21:13:25.000000000 +0200 @@ -1,3 +1,12 @@ +11 April 2019 -- increase AC_BUFFER_SIZE from 1024 to 4096 to lower chance of ultra-rare propagate_carry() overflow +10 April 2019 -- fix potential memory leaks found by Connor Manning using valgrind +31 March 2019 -- better license terms for core arithmetic coder thanks to Amir Said. upgrade to version 3.4 rev 0 +20 March 2019 -- upped to 3.3 r1 for checking consistent legacy and extended classification for new point types +19 March 2019 -- bug fix when decompressing new point types: zero "legacy classification" if "classification" > 31 + 7 March 2019 -- upped to 3.3 r0 because hobu was suggesting it for the next release +21 February 2019 -- bug fix when writing 4,294,967,296 or more points uncompressed to LAS +28 December 2018 -- fix for LASzip v4 decompression of WavePacket part of PRDF 9 and 10 +27 December 2018 -- upped to 3.2 r9 for bug fix in multi-channel NIR decompression 7 November 2018 -- laszip DLL: upped to 3.2 r8 for identical legacy and extended flags check 20 October 2018 -- fixed rare bug in LASinterval::merge_intervals() 5 October 2018 -- laszip DLL: upped to 3.2 r6 for corrected 'is_empty' return value in laszip_inside_rectangle() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/CMakeLists.txt new/laszip-src-3.4.1/CMakeLists.txt --- old/laszip-src-3.2.9/CMakeLists.txt 2018-12-27 17:38:54.000000000 +0100 +++ new/laszip-src-3.4.1/CMakeLists.txt 2019-04-12 21:13:25.000000000 +0200 @@ -7,7 +7,7 @@ # the next line is the ONLY place in the entire laszip system where # the version info is hard-coded -set(LASZIP_API_VERSION_STRING "3.2.9" CACHE STRING "LASzip version" FORCE) +set(LASZIP_API_VERSION_STRING "3.4.1" CACHE STRING "LASzip version" FORCE) include (CheckIncludeFileCXX) include(${ROOT_DIR}/cmake/common.cmake NO_POLICY_SCOPE) @@ -41,7 +41,7 @@ # libtool SO version naming # 8.0.0 for 3.2.1 # 9.0.0 for 4.0+ -set(LASZIP_SO_VERSION "8.0.2") +set(LASZIP_SO_VERSION "8.0.4") set(LASZIP_COMPATIBILITY_VERSION 8) check_include_file_cxx ("unordered_map" HAVE_UNORDERED_MAP) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/cleanup.sh new/laszip-src-3.4.1/cleanup.sh --- old/laszip-src-3.2.9/cleanup.sh 2016-02-27 18:32:30.000000000 +0100 +++ new/laszip-src-3.4.1/cleanup.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -rm -rf CMakeFiles src/CMakeFiles CMakeCache.txt cmake_install.cmake CPackConfig.cmake _CPack_Packages/ CPackSourceConfig.cmake pnacl/CMakeFiles diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/cmake/unix_compiler_options.cmake new/laszip-src-3.4.1/cmake/unix_compiler_options.cmake --- old/laszip-src-3.2.9/cmake/unix_compiler_options.cmake 2017-09-11 01:43:34.000000000 +0200 +++ new/laszip-src-3.4.1/cmake/unix_compiler_options.cmake 2019-04-12 21:13:25.000000000 +0200 @@ -19,4 +19,4 @@ message(FATAL_ERROR "Unsupported C++ compiler") endif() -set (CMAKE_CXX_FLAGS "${LASZIP_COMMON_CXX_FLAGS} ${CXX_STANDARD}") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LASZIP_COMMON_CXX_FLAGS} ${CXX_STANDARD}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/git2cl new/laszip-src-3.4.1/git2cl --- old/laszip-src-3.2.9/git2cl 2017-10-10 20:47:26.000000000 +0200 +++ new/laszip-src-3.4.1/git2cl 1970-01-01 01:00:00.000000000 +0100 @@ -1,58 +0,0 @@ -#!/usr/bin/php -<?php - -$sapi = strtolower(php_sapi_name()); -if ( 'cli' != $sapi ) { - g2c_exit('Please run git2cl from the command line'); -} - -if ( 1 == $argc ) { - $gitPath = '.'; -} else { - $gitPath = $argv[1]; -} - -$gitPathEscaped = escapeshellarg($gitPath); -$gitLog = shell_exec("cd {$gitPathEscaped}; git log --date=short --format=%an%n%ae%n%ai%n%s%n###"); -$gitLogBits = explode('###' . PHP_EOL, $gitLog); - -$gitRealPath = realpath($gitPath); -$changeLogPath = "{$gitRealPath}/ChangeLog"; - -$changeLog = array(); -date_default_timezone_set('America/Chicago'); - -foreach ( $gitLogBits as $log ) { - $log = trim($log); - $bits = explode(PHP_EOL, $log); - - if ( count($bits) > 1 ) { - $author = $bits[0]; - $email = $bits[1]; - $date = $bits[2]; - $message = $bits[3]; - - $exactDate = date('Y-m-d', strtotime($date)); - $changeLog[$exactDate][] = array( - 'time' => date('H:i:s', strtotime($date)), - 'author' => $author, - 'email' => $email, - 'message' => $message - ); - } -} - -reset($changeLog); - -foreach ( $changeLog as $entryDate => $entryList ) { - fwrite(STDOUT, $entryDate . PHP_EOL); - foreach ( $entryList as $entry ) { - fwrite(STDOUT, "\t* {$entry['author']} <{$entry['email']}> {$entry['message']} ({$entry['time']})" . PHP_EOL); - } - fwrite(STDOUT, PHP_EOL); -} - -function g2c_exit($message) { - echo $message, PHP_EOL; - exit(0); -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/hobu.sh new/laszip-src-3.4.1/hobu.sh --- old/laszip-src-3.2.9/hobu.sh 2018-01-02 17:41:06.000000000 +0100 +++ new/laszip-src-3.4.1/hobu.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -rm -rf build -mkdir build -cd build -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/laszip .. -make -j 4 -make install - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/install_manifest.txt new/laszip-src-3.4.1/install_manifest.txt --- old/laszip-src-3.2.9/install_manifest.txt 2017-10-12 17:39:57.000000000 +0200 +++ new/laszip-src-3.4.1/install_manifest.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -/usr/local/lib/liblaszip.3.1.1.dylib -/usr/local/lib/liblaszip.3.dylib -/usr/local/lib/liblaszip.dylib -/usr/local/lib/liblaszip_api.3.1.1.dylib -/usr/local/lib/liblaszip_api.3.dylib -/usr/local/lib/liblaszip_api.dylib -/usr/local/include//laszip/laszip_api.h -/usr/local/include//laszip/laszip_api_version.h -/usr/local/include//laszip_api.h -/usr/local/include//laszip_api_version.h \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/laszip-config.cmake.in new/laszip-src-3.4.1/laszip-config.cmake.in --- old/laszip-src-3.2.9/laszip-config.cmake.in 2017-10-12 16:05:55.000000000 +0200 +++ new/laszip-src-3.4.1/laszip-config.cmake.in 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -# - Config file for the lazperf package -# It defines the following variables -# LAZPERF_FOUND - Indicates that the module was found -# LAZPERF_INCLUDE_DIR - Include directory - -set(LAZPERF_FOUND TRUE) -set(LAZPERF_INCLUDE_DIR "@INSTALL_INCLUDE_DIR@") - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/arithmeticdecoder.cpp new/laszip-src-3.4.1/src/arithmeticdecoder.cpp --- old/laszip-src-3.2.9/src/arithmeticdecoder.cpp 2017-09-11 01:43:38.000000000 +0200 +++ new/laszip-src-3.4.1/src/arithmeticdecoder.cpp 2019-04-12 21:13:25.000000000 +0200 @@ -2,9 +2,9 @@ =============================================================================== FILE: arithmeticdecoder.cpp - + CONTENTS: - + A modular C++ wrapper for an adapted version of Amir Said's FastAC Code. see: http://www.cipr.rpi.edu/~said/FastAC.html @@ -22,50 +22,76 @@ This software is distributed WITHOUT ANY WARRANTY and without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - + CHANGE HISTORY: - + see header file - + =============================================================================== */ -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// - -// Fast arithmetic coding implementation - -// -> 32-bit variables, 32-bit product, periodic updates, table decoding - -// - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// - -// Version 1.00 - April 25, 2004 - -// - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// - -// WARNING - -// ========= - -// - -// The only purpose of this program is to demonstrate the basic principles - -// of arithmetic coding. It is provided as is, without any express or - -// implied warranty, without even the warranty of fitness for any particular - -// purpose, or that the implementations are correct. - -// - -// Permission to copy and redistribute this code is hereby granted, provided - -// that this warning and copyright notices are not removed or altered. - -// - -// Copyright (c) 2004 by Amir Said ([email protected]) & - -// William A. Pearlman ([email protected]) - -// - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// - -// A description of the arithmetic coding method used here is available in - -// - -// Lossless Compression Handbook, ed. K. Sayood - -// Chapter 5: Arithmetic Coding (A. Said), pp. 101-152, Academic Press, 2003 - -// - -// A. Said, Introduction to Arithetic Coding Theory and Practice - -// HP Labs report HPL-2004-76 - http://www.hpl.hp.com/techreports/ - -// - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - +// **************************** - +// ARITHMETIC CODING EXAMPLES - +// **************************** - +// - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - +// Fast arithmetic coding implementation - +// -> 32-bit variables, 32-bit product, periodic updates, table decoding - +// - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - +// Version 1.00 - April 25, 2004 - +// - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - +// WARNING - +// ========= - +// - +// The only purpose of this program is to demonstrate the basic principles - +// of arithmetic coding. The original version of this code can be found in - +// Digital Signal Compression: Principles and Practice - +// (Cambridge University Press, 2011, ISBN: 9780511984655) - +// - +// Copyright (c) 2019 by Amir Said ([email protected]) & - +// William A. Pearlman ([email protected]) - +// - +// Redistribution and use in source and binary forms, with or without - +// modification, are permitted provided that the following conditions are - +// met: - +// - +// 1. Redistributions of source code must retain the above copyright notice, - +// this list of conditions and the following disclaimer. - +// - +// 2. Redistributions in binary form must reproduce the above copyright - +// notice, this list of conditions and the following disclaimer in the - +// documentation and/or other materials provided with the distribution. - +// - +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER - +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - +// - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - +// A description of the arithmetic coding method used here is available in - +// - +// Lossless Compression Handbook, ed. K. Sayood - +// Chapter 5: Arithmetic Coding (A. Said), pp. 101-152, Academic Press, 2003 - +// - +// A. Said, Introduction to Arithetic Coding Theory and Practice - +// HP Labs report HPL-2004-76 - http://www.hpl.hp.com/techreports/ - +// - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #include "arithmeticdecoder.hpp" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/arithmeticencoder.cpp new/laszip-src-3.4.1/src/arithmeticencoder.cpp --- old/laszip-src-3.2.9/src/arithmeticencoder.cpp 2015-11-23 23:50:01.000000000 +0100 +++ new/laszip-src-3.4.1/src/arithmeticencoder.cpp 2019-04-12 21:13:25.000000000 +0200 @@ -2,9 +2,9 @@ =============================================================================== FILE: arithmeticencoder.cpp - + CONTENTS: - + A modular C++ wrapper for an adapted version of Amir Said's FastAC Code. see: http://www.cipr.rpi.edu/~said/FastAC.html @@ -22,50 +22,76 @@ This software is distributed WITHOUT ANY WARRANTY and without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - + CHANGE HISTORY: - + see header file - + =============================================================================== */ -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// - -// Fast arithmetic coding implementation - -// -> 32-bit variables, 32-bit product, periodic updates, table decoding - -// - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// - -// Version 1.00 - April 25, 2004 - -// - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// - -// WARNING - -// ========= - -// - -// The only purpose of this program is to demonstrate the basic principles - -// of arithmetic coding. It is provided as is, without any express or - -// implied warranty, without even the warranty of fitness for any particular - -// purpose, or that the implementations are correct. - -// - -// Permission to copy and redistribute this code is hereby granted, provided - -// that this warning and copyright notices are not removed or altered. - -// - -// Copyright (c) 2004 by Amir Said ([email protected]) & - -// William A. Pearlman ([email protected]) - -// - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -// - -// A description of the arithmetic coding method used here is available in - -// - -// Lossless Compression Handbook, ed. K. Sayood - -// Chapter 5: Arithmetic Coding (A. Said), pp. 101-152, Academic Press, 2003 - -// - -// A. Said, Introduction to Arithetic Coding Theory and Practice - -// HP Labs report HPL-2004-76 - http://www.hpl.hp.com/techreports/ - -// - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - +// **************************** - +// ARITHMETIC CODING EXAMPLES - +// **************************** - +// - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - +// Fast arithmetic coding implementation - +// -> 32-bit variables, 32-bit product, periodic updates, table decoding - +// - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - +// Version 1.00 - April 25, 2004 - +// - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - +// WARNING - +// ========= - +// - +// The only purpose of this program is to demonstrate the basic principles - +// of arithmetic coding. The original version of this code can be found in - +// Digital Signal Compression: Principles and Practice - +// (Cambridge University Press, 2011, ISBN: 9780511984655) - +// - +// Copyright (c) 2019 by Amir Said ([email protected]) & - +// William A. Pearlman ([email protected]) - +// - +// Redistribution and use in source and binary forms, with or without - +// modification, are permitted provided that the following conditions are - +// met: - +// - +// 1. Redistributions of source code must retain the above copyright notice, - +// this list of conditions and the following disclaimer. - +// - +// 2. Redistributions in binary form must reproduce the above copyright - +// notice, this list of conditions and the following disclaimer in the - +// documentation and/or other materials provided with the distribution. - +// - +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - +// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A - +// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER - +// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - +// - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// - +// A description of the arithmetic coding method used here is available in - +// - +// Lossless Compression Handbook, ed. K. Sayood - +// Chapter 5: Arithmetic Coding (A. Said), pp. 101-152, Academic Press, 2003 - +// - +// A. Said, Introduction to Arithetic Coding Theory and Practice - +// HP Labs report HPL-2004-76 - http://www.hpl.hp.com/techreports/ - +// - +// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #include "arithmeticencoder.hpp" @@ -301,8 +327,8 @@ else p--; assert(outbuffer <= p); - assert(p < endbuffer); - assert(outbyte < endbuffer); + assert(p < endbuffer); + assert(outbyte < endbuffer); } ++*p; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/arithmeticmodel.hpp new/laszip-src-3.4.1/src/arithmeticmodel.hpp --- old/laszip-src-3.2.9/src/arithmeticmodel.hpp 2015-11-23 23:50:01.000000000 +0100 +++ new/laszip-src-3.4.1/src/arithmeticmodel.hpp 2019-04-12 21:13:25.000000000 +0200 @@ -14,7 +14,7 @@ COPYRIGHT: - (c) 2007-2014, martin isenburg, rapidlasso - fast tools to catch reality + (c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality This is free software; you can redistribute and/or modify it under the terms of the GNU Lesser General Licence as published by the Free Software @@ -25,6 +25,7 @@ CHANGE HISTORY: + 11 April 2019 -- 1024 AC_BUFFER_SIZE to 4096 for propagate_carry() overflow 10 January 2011 -- licensing change for LGPL release and liblas integration 8 December 2010 -- unified framework for all entropy coders 30 October 2009 -- refactoring Amir Said's FastAC code @@ -41,7 +42,7 @@ /* this header byte needs to change in case incompatible change happen */ #define AC_HEADER_BYTE 2 -#define AC_BUFFER_SIZE 1024 +#define AC_BUFFER_SIZE 4096 const U32 AC__MinLength = 0x01000000U; // threshold for renormalization const U32 AC__MaxLength = 0xFFFFFFFFU; // maximum AC interval length diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/bytestreamout_array.hpp new/laszip-src-3.4.1/src/bytestreamout_array.hpp --- old/laszip-src-3.2.9/src/bytestreamout_array.hpp 2017-09-11 01:43:38.000000000 +0200 +++ new/laszip-src-3.4.1/src/bytestreamout_array.hpp 2019-04-12 21:13:25.000000000 +0200 @@ -11,7 +11,7 @@ COPYRIGHT: - (c) 2007-2016, martin isenburg, rapidlasso - fast tools to catch reality + (c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality This is free software; you can redistribute and/or modify it under the terms of the GNU Lesser General Licence as published by the Free Software @@ -22,6 +22,8 @@ CHANGE HISTORY: + 11 April 2019 -- increase default alloc from 1024 bytes to 4096 bytes + 10 April 2019 -- fix potential memory leak found by Connor Manning's valgrind 22 June 2016 -- access to current size for "native LAS 1.4 compressor" 19 July 2015 -- moved from LASlib to LASzip for "compatibility mode" in DLL 9 April 2012 -- created after cooking Zuccini/Onion/Potatoe dinner for Mara @@ -39,7 +41,7 @@ class ByteStreamOutArray : public ByteStreamOut { public: - ByteStreamOutArray(I64 alloc=1024); + ByteStreamOutArray(I64 alloc=4096); /* write a single byte */ BOOL putByte(U8 byte); /* write an array of bytes */ @@ -53,7 +55,7 @@ /* seek to the end of the file */ BOOL seekEnd(); /* destructor */ - ~ByteStreamOutArray(){}; + ~ByteStreamOutArray() { if (data) free(data); }; /* get access to data */ inline I64 getSize() const { return size; }; inline I64 getCurr() const { return curr; }; @@ -69,7 +71,7 @@ class ByteStreamOutArrayLE : public ByteStreamOutArray { public: - ByteStreamOutArrayLE(I64 alloc=1024); + ByteStreamOutArrayLE(I64 alloc=4096); /* write 16 bit low-endian field */ BOOL put16bitsLE(const U8* bytes); /* write 32 bit low-endian field */ @@ -89,7 +91,7 @@ class ByteStreamOutArrayBE : public ByteStreamOutArray { public: - ByteStreamOutArrayBE(I64 alloc=1024); + ByteStreamOutArrayBE(I64 alloc=4096); /* write 16 bit low-endian field */ BOOL put16bitsLE(const U8* bytes); /* write 32 bit low-endian field */ @@ -109,7 +111,7 @@ inline ByteStreamOutArray::ByteStreamOutArray(I64 alloc) { this->data = (U8*)malloc((U32)alloc); - this->alloc = 1024; + this->alloc = alloc; this->size = 0; this->curr = 0; } @@ -118,7 +120,7 @@ { if (curr == alloc) { - alloc += 1024; + alloc += 4096; data = (U8*)realloc(data, (U32)alloc); if (data == 0) { @@ -135,7 +137,7 @@ { if ((curr+num_bytes) > alloc) { - alloc += (1024+num_bytes); + alloc += (4096+num_bytes); data = (U8*)realloc(data, (U32)alloc); if (data == 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/lasattributer.hpp new/laszip-src-3.4.1/src/lasattributer.hpp --- old/laszip-src-3.2.9/src/lasattributer.hpp 2018-11-19 16:56:40.000000000 +0100 +++ new/laszip-src-3.4.1/src/lasattributer.hpp 2019-04-12 21:13:25.000000000 +0200 @@ -145,6 +145,9 @@ inline BOOL set_scale(F64 scale) { if (data_type) { this->scale[0] = scale; options |= 0x08; return TRUE; } return FALSE; }; inline BOOL set_offset(F64 offset) { if (data_type) { this->offset[0] = offset; options |= 0x10; return TRUE; } return FALSE; }; + inline BOOL unset_scale() { if (data_type) { options &= (~0x08); return TRUE; } return FALSE; }; + inline BOOL unset_offset() { if (data_type) { options &= (~0x10); return TRUE; } return FALSE; }; + inline BOOL has_no_data() const { return options & 0x01; }; inline BOOL has_min() const { return options & 0x02; }; inline BOOL has_max() const { return options & 0x04; }; @@ -156,8 +159,9 @@ if (data_type) { const U32 size_table[10] = { 1, 1, 2, 2, 4, 4, 8, 8, 4, 8 }; - U32 type = get_type(); - return size_table[type]; + I32 type = get_type(); + I32 dim = get_dim(); + return size_table[type] * dim; } else { @@ -165,31 +169,100 @@ } }; - inline F64 get_value_as_float(U8* value) const + inline F64 get_value_as_float(U8* pointer) const { - F64 casted_value; + F64 cast_value; I32 type = get_type(); if (type == 0) - casted_value = (F64)*((U8*)value); + cast_value = (F64)*((U8*)pointer); else if (type == 1) - casted_value = (F64)*((I8*)value); + cast_value = (F64)*((I8*)pointer); else if (type == 2) - casted_value = (F64)*((U16*)value); + cast_value = (F64)*((U16*)pointer); else if (type == 3) - casted_value = (F64)*((I16*)value); + cast_value = (F64)*((I16*)pointer); else if (type == 4) - casted_value = (F64)*((U32*)value); + cast_value = (F64)*((U32*)pointer); else if (type == 5) - casted_value = (F64)*((I32*)value); + cast_value = (F64)*((I32*)pointer); else if (type == 6) - casted_value = (F64)(I64)*((U64*)value); + cast_value = (F64)(I64)*((U64*)pointer); else if (type == 7) - casted_value = (F64)*((I64*)value); + cast_value = (F64)*((I64*)pointer); else if (type == 8) - casted_value = (F64)*((F32*)value); + cast_value = (F64)*((F32*)pointer); else - casted_value = *((F64*)value); - return offset[0]+scale[0]*casted_value; + cast_value = *((F64*)pointer); + if (options & 0x08) + { + if (options & 0x10) + { + return offset[0]+scale[0]*cast_value; + } + else + { + return scale[0]*cast_value; + } + } + else + { + if (options & 0x10) + { + return offset[0]+cast_value; + } + else + { + return cast_value; + } + } + }; + + inline void set_value_as_float(U8* pointer, F64 value) const + { + F64 unoffset_and_unscaled_value; + if (options & 0x08) + { + if (options & 0x10) + { + unoffset_and_unscaled_value = (value - offset[0])/scale[0]; + } + else + { + unoffset_and_unscaled_value = value/scale[0]; + } + } + else + { + if (options & 0x10) + { + unoffset_and_unscaled_value = value - offset[0]; + } + else + { + unoffset_and_unscaled_value = value; + } + } + I32 type = get_type(); + if (type == 0) + *((U8*)pointer) = U8_QUANTIZE(unoffset_and_unscaled_value); + else if (type == 1) + *((I8*)pointer) = I8_QUANTIZE(unoffset_and_unscaled_value); + else if (type == 2) + *((U16*)pointer) = U16_QUANTIZE(unoffset_and_unscaled_value); + else if (type == 3) + *((I16*)pointer) = I16_QUANTIZE(unoffset_and_unscaled_value); + else if (type == 4) + *((U32*)pointer) = U32_QUANTIZE(unoffset_and_unscaled_value); + else if (type == 5) + *((I32*)pointer) = U32_QUANTIZE(unoffset_and_unscaled_value); + else if (type == 6) + *((U64*)pointer) = U64_QUANTIZE(unoffset_and_unscaled_value); + else if (type == 7) + *((I64*)pointer) = I64_QUANTIZE(unoffset_and_unscaled_value); + else if (type == 8) + *((F32*)pointer) = (F32)unoffset_and_unscaled_value; + else + *((F64*)pointer) = unoffset_and_unscaled_value; }; private: @@ -197,35 +270,35 @@ { return ((I32)data_type - 1)%10; }; - inline I32 get_dim() const + inline I32 get_dim() const // compute dimension of deprecated tuple and triple attributes { - return 1; + return ((I32)data_type - 1)/10 + 1; }; - inline U64I64F64 cast(U8* value) const + inline U64I64F64 cast(U8* pointer) const { I32 type = get_type(); - U64I64F64 casted_value; + U64I64F64 cast_value; if (type == 0) - casted_value.u64 = *((U8*)value); + cast_value.u64 = *((U8*)pointer); else if (type == 1) - casted_value.i64 = *((I8*)value); + cast_value.i64 = *((I8*)pointer); else if (type == 2) - casted_value.u64 = *((U16*)value); + cast_value.u64 = *((U16*)pointer); else if (type == 3) - casted_value.i64 = *((I16*)value); + cast_value.i64 = *((I16*)pointer); else if (type == 4) - casted_value.u64 = *((U32*)value); + cast_value.u64 = *((U32*)pointer); else if (type == 5) - casted_value.i64 = *((I32*)value); + cast_value.i64 = *((I32*)pointer); else if (type == 6) - casted_value.u64 = *((U64*)value); + cast_value.u64 = *((U64*)pointer); else if (type == 7) - casted_value.i64 = *((I64*)value); + cast_value.i64 = *((I64*)pointer); else if (type == 8) - casted_value.f64 = *((F32*)value); + cast_value.f64 = *((F32*)pointer); else - casted_value.f64 = *((F64*)value); - return casted_value; + cast_value.f64 = *((F64*)pointer); + return cast_value; }; inline U64I64F64 smallest(U64I64F64 a, U64I64F64 b) const { @@ -431,6 +504,15 @@ return -1; } + const CHAR* get_attribute_name(I32 index) const + { + if (index < number_attributes) + { + return attributes[index].name; + } + return 0; + } + BOOL remove_attribute(I32 index) { if (index < 0 || index >= number_attributes) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/laspoint.hpp new/laszip-src-3.4.1/src/laspoint.hpp --- old/laszip-src-3.2.9/src/laspoint.hpp 2018-11-19 16:56:40.000000000 +0100 +++ new/laszip-src-3.4.1/src/laspoint.hpp 2019-04-12 21:13:25.000000000 +0200 @@ -694,6 +694,14 @@ return 0.0; }; + inline void set_attribute_as_float(U32 index, F64 value) const + { + if (has_attribute(index)) + { + attributer->attributes[index].set_value_as_float(extra_bytes + attributer->attribute_starts[index], value); + } + }; + // typed and offset functions for attributes in extra bytes (more efficient) inline void get_attribute(I32 start, U8 &data) const { data = extra_bytes[start]; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/lasreaditemcompressed_v3.cpp new/laszip-src-3.4.1/src/lasreaditemcompressed_v3.cpp --- old/laszip-src-3.2.9/src/lasreaditemcompressed_v3.cpp 2018-12-27 17:38:16.000000000 +0100 +++ new/laszip-src-3.4.1/src/lasreaditemcompressed_v3.cpp 2019-04-12 21:13:25.000000000 +0200 @@ -893,11 +893,15 @@ } ((LASpoint14*)last_item)->classification = dec_classification->decodeSymbol(contexts[current_context].m_classification[ccc]); - // legacy copies + // update the legacy copy if (((LASpoint14*)last_item)->classification < 32) { ((LASpoint14*)last_item)->legacy_classification = ((LASpoint14*)last_item)->classification; } + else + { + ((LASpoint14*)last_item)->legacy_classification = 0; + } } //////////////////////////////////////// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/lasreaditemcompressed_v3.hpp new/laszip-src-3.4.1/src/lasreaditemcompressed_v3.hpp --- old/laszip-src-3.2.9/src/lasreaditemcompressed_v3.hpp 2017-09-11 01:43:38.000000000 +0200 +++ new/laszip-src-3.4.1/src/lasreaditemcompressed_v3.hpp 2019-04-12 21:13:25.000000000 +0200 @@ -13,7 +13,7 @@ COPYRIGHT: - (c) 2007-2017, martin isenburg, rapidlasso - fast tools to catch reality + (c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality This is free software; you can redistribute and/or modify it under the terms of the GNU Lesser General Licence as published by the Free Software @@ -24,6 +24,7 @@ CHANGE HISTORY: + 19 March 2019 -- set "legacy classification" to zero if "classification > 31" 28 August 2017 -- moving 'context' from global development hack to interface 19 April 2017 -- support for selective decompression for new LAS 1.4 points 22 June 2016 -- created after Island beat Austria 2:1 in the EM2016 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/lasreaditemcompressed_v4.cpp new/laszip-src-3.4.1/src/lasreaditemcompressed_v4.cpp --- old/laszip-src-3.2.9/src/lasreaditemcompressed_v4.cpp 2018-05-06 20:00:18.000000000 +0200 +++ new/laszip-src-3.4.1/src/lasreaditemcompressed_v4.cpp 2019-04-12 21:13:25.000000000 +0200 @@ -893,11 +893,15 @@ } ((LASpoint14*)last_item)->classification = dec_classification->decodeSymbol(contexts[current_context].m_classification[ccc]); - // legacy copies + // update the legacy copy if (((LASpoint14*)last_item)->classification < 32) { ((LASpoint14*)last_item)->legacy_classification = ((LASpoint14*)last_item)->classification; } + else + { + ((LASpoint14*)last_item)->legacy_classification = 0; + } } //////////////////////////////////////// diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/lasreaditemcompressed_v4.hpp new/laszip-src-3.4.1/src/lasreaditemcompressed_v4.hpp --- old/laszip-src-3.2.9/src/lasreaditemcompressed_v4.hpp 2018-02-12 21:56:09.000000000 +0100 +++ new/laszip-src-3.4.1/src/lasreaditemcompressed_v4.hpp 2019-04-12 21:13:25.000000000 +0200 @@ -13,7 +13,7 @@ COPYRIGHT: - (c) 2007-2017, martin isenburg, rapidlasso - fast tools to catch reality + (c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality This is free software; you can redistribute and/or modify it under the terms of the GNU Lesser General Licence as published by the Free Software @@ -24,6 +24,7 @@ CHANGE HISTORY: + 19 March 2019 -- set "legacy classification" to zero if "classification > 31" 28 December 2017 -- fix incorrect 'context switch' reported by Wanwannodao 28 August 2017 -- moving 'context' from global development hack to interface 19 April 2017 -- support for selective decompression for new LAS 1.4 points diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/laswritepoint.cpp new/laszip-src-3.4.1/src/laswritepoint.cpp --- old/laszip-src-3.2.9/src/laswritepoint.cpp 2018-02-12 21:56:09.000000000 +0100 +++ new/laszip-src-3.4.1/src/laswritepoint.cpp 2019-04-12 21:13:25.000000000 +0200 @@ -13,7 +13,7 @@ COPYRIGHT: - (c) 2007-2017, martin isenburg, rapidlasso - fast tools to catch reality + (c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality This is free software; you can redistribute and/or modify it under the terms of the GNU Lesser General Licence as published by the Free Software @@ -300,26 +300,34 @@ if (chunk_count == chunk_size) { - if (layered_las14_compression) + if (enc) { - // write how many points are in the chunk - outstream->put32bitsLE((U8*)&chunk_count); - // write all layers - for (i = 0; i < num_writers; i++) + if (layered_las14_compression) { - ((LASwriteItemCompressed*)writers[i])->chunk_sizes(); + // write how many points are in the chunk + outstream->put32bitsLE((U8*)&chunk_count); + // write all layers + for (i = 0; i < num_writers; i++) + { + ((LASwriteItemCompressed*)writers[i])->chunk_sizes(); + } + for (i = 0; i < num_writers; i++) + { + ((LASwriteItemCompressed*)writers[i])->chunk_bytes(); + } } - for (i = 0; i < num_writers; i++) + else { - ((LASwriteItemCompressed*)writers[i])->chunk_bytes(); + enc->done(); } + add_chunk_to_table(); + init(outstream); } else { - enc->done(); + // happens *only* for uncompressed LAS with over U32_MAX points + assert(chunk_size == U32_MAX); } - add_chunk_to_table(); - init(outstream); chunk_count = 0; } chunk_count++; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/laswritepoint.hpp new/laszip-src-3.4.1/src/laswritepoint.hpp --- old/laszip-src-3.2.9/src/laswritepoint.hpp 2017-09-11 01:43:38.000000000 +0200 +++ new/laszip-src-3.4.1/src/laswritepoint.hpp 2019-04-12 21:13:25.000000000 +0200 @@ -13,7 +13,7 @@ COPYRIGHT: - (c) 2007-2017, martin isenburg, rapidlasso - fast tools to catch reality + (c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality This is free software; you can redistribute and/or modify it under the terms of the GNU Lesser General Licence as published by the Free Software @@ -24,6 +24,7 @@ CHANGE HISTORY: + 21 February 2019 -- fix for writing 4294967295+ points uncompressed to LAS 28 August 2017 -- moving 'context' from global development hack to interface 23 August 2016 -- layering of items for selective decompression in LAS 1.4 6 September 2014 -- removed inheritance of EntropyEncoder and EntropyDecoder diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/laszip.cpp new/laszip-src-3.4.1/src/laszip.cpp --- old/laszip-src-3.2.9/src/laszip.cpp 2018-02-12 21:56:09.000000000 +0100 +++ new/laszip-src-3.4.1/src/laszip.cpp 2019-04-12 21:13:25.000000000 +0200 @@ -258,7 +258,7 @@ break; case LASitem::WAVEPACKET14: if (item->size != 29) return return_error("WAVEPACKET14 has size != 29"); - if ((item->version != 0) && (item->version != 3)) return return_error("WAVEPACKET14 has version != 0 and != 3 and != 4"); // version == 4 fixes context-switch + if ((item->version != 0) && (item->version != 3) && (item->version != 4)) return return_error("WAVEPACKET14 has version != 0 and != 3 and != 4"); // version == 4 fixes context-switch break; default: if (1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/laszip.hpp new/laszip-src-3.4.1/src/laszip.hpp --- old/laszip-src-3.2.9/src/laszip.hpp 2018-12-27 17:38:16.000000000 +0100 +++ new/laszip-src-3.4.1/src/laszip.hpp 2019-04-12 21:13:25.000000000 +0200 @@ -14,7 +14,7 @@ COPYRIGHT: - (c) 2007-2018, martin isenburg, rapidlasso - fast tools to catch reality + (c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality This is free software; you can redistribute and/or modify it under the terms of the GNU Lesser General Licence as published by the Free Software @@ -25,11 +25,14 @@ CHANGE HISTORY: + 20 March 2019 -- upped to 3.3 r1 for consistent legacy and extended class check + 21 February 2019 -- bug fix when writing 4294967295+ points uncompressed to LAS + 28 December 2018 -- fix for v4 decompression of WavePacket part of PRDF 9 and 10 27 December 2018 -- upped to 3.2 r9 for bug fix in multi-channel NIR decompression 7 November 2018 -- upped to 3.2 r8 for identical legacy and extended flags check 20 October 2018 -- upped to 3.2 r7 for rare bug in LASinterval::merge_intervals() 5 October 2018 -- upped to 3.2 r6 for corrected 'is_empty' return value - 28 September 2018 -- upped to 3.2 r5 for fix in extended classification writing + 28 September 2018 -- upped to 3.2 r5 for fix in extended classification writing 9 February 2018 -- minor version increment as it can read v4 compressed items 28 December 2017 -- fix incorrect 'context switch' reported by Wanwannodao 23 August 2017 -- minor version increment for C++ stream-based read/write API @@ -70,9 +73,9 @@ #endif #define LASZIP_VERSION_MAJOR 3 -#define LASZIP_VERSION_MINOR 2 -#define LASZIP_VERSION_REVISION 9 -#define LASZIP_VERSION_BUILD_DATE 181227 +#define LASZIP_VERSION_MINOR 4 +#define LASZIP_VERSION_REVISION 1 +#define LASZIP_VERSION_BUILD_DATE 190411 #define LASZIP_COMPRESSOR_NONE 0 #define LASZIP_COMPRESSOR_POINTWISE 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/src/laszip_dll.cpp new/laszip-src-3.4.1/src/laszip_dll.cpp --- old/laszip-src-3.2.9/src/laszip_dll.cpp 2018-11-19 16:56:40.000000000 +0100 +++ new/laszip-src-3.4.1/src/laszip_dll.cpp 2019-04-12 21:13:25.000000000 +0200 @@ -13,7 +13,7 @@ COPYRIGHT: - (c) 2007-2017, martin isenburg, rapidlasso - fast tools to catch reality + (c) 2007-2019, martin isenburg, rapidlasso - fast tools to catch reality This is free software; you can redistribute and/or modify it under the terms of the GNU Lesser General Licence as published by the Free Software @@ -24,6 +24,7 @@ CHANGE HISTORY: + 20 March 2019 -- check consistent legacy and extended classification in laszip_write_point() 7 November 2018 -- assure identical legacy and extended flags in laszip_write_point() 20 October 2018 -- changed (U8*) to (const U8*) for all out->put___() calls 5 October 2018 -- corrected 'is_empty' return value in laszip_inside_rectangle() @@ -2793,7 +2794,13 @@ // compute offsets (or points item pointers) for data transfer from the point items + if (laszip_dll->point_items) + { + delete [] laszip_dll->point_items; + } + laszip_dll->point_items = new U8*[laszip->num_items]; + if (laszip_dll->point_items == 0) { sprintf(laszip_dll->error, "could not alloc point_items"); @@ -3027,6 +3034,16 @@ sprintf(laszip_dll->error, "legacy flags and extended flags are not identical"); return 1; } + + // make sure legacy classification is zero or identical to extended classification + if (laszip_dll->point.classification != 0) + { + if (laszip_dll->point.classification != laszip_dll->point.extended_classification) + { + sprintf(laszip_dll->error, "legacy classification %d and extended classification %d are not consistent", laszip_dll->point.classification, laszip_dll->point.extended_classification); + return 1; + } + } } // special recoding of points (in compatibility mode only) @@ -3960,6 +3977,11 @@ } // create point's item pointers + + if (laszip_dll->point_items) + { + delete [] laszip_dll->point_items; + } laszip_dll->point_items = new U8*[laszip->num_items]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/laszip-src-3.2.9/tools/laszip.pc new/laszip-src-3.4.1/tools/laszip.pc --- old/laszip-src-3.2.9/tools/laszip.pc 2017-09-11 17:31:13.000000000 +0200 +++ new/laszip-src-3.4.1/tools/laszip.pc 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -prefix=/tmp/lasjunk -exec_prefix=/tmp/lasjunk -libdir=/tmp/lasjunk/ -includedir=/tmp/lasjunk/ - -Name: LASzip -Description: Library (C/C++) and tools for the LAS LiDAR compression -Requires: -Version: 3.1.0 -Libs: -L${libdir} -llaszip -Cflags: -I${includedir}/laszip $CMAKE_CXX_FLAGS - ++++++ laszip-src-3.4.1.tar.gz.sha256sum ++++++ 5d9b0ffaf8b7319c2fa216da3f3f878bb8f4e5b4b14d2c154d441a351da2be37 laszip-src-3.4.1.tar.gz
