Update o3dgcArithmeticCodec.cpp

pull/3569/head
ihsinme 2021-01-06 16:50:07 +03:00 committed by GitHub
parent ccc0a50d96
commit 177304bb7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -522,8 +522,7 @@ namespace o3dgc
buffer_size = max_code_bytes; // assign new memory buffer_size = max_code_bytes; // assign new memory
delete [] new_buffer; // free anything previously assigned delete [] new_buffer; // free anything previously assigned
if ((new_buffer = new unsigned char[buffer_size+16]) == 0) // 16 extra bytes new_buffer = new unsigned char[buffer_size+16]; // 16 extra bytes
AC_Error("cannot assign memory for compressed data buffer");
code_buffer = new_buffer; // set buffer for compressed data code_buffer = new_buffer; // set buffer for compressed data
} }
@ -732,7 +731,6 @@ namespace o3dgc
table_size = table_shift = 0; table_size = table_shift = 0;
distribution = new unsigned[data_symbols]; distribution = new unsigned[data_symbols];
} }
if (distribution == 0) AC_Error("cannot assign model memory");
} }
// compute cumulative distribution, decoder table // compute cumulative distribution, decoder table
unsigned s = 0; unsigned s = 0;
@ -803,7 +801,6 @@ namespace o3dgc
distribution = new unsigned[2*data_symbols]; distribution = new unsigned[2*data_symbols];
} }
symbol_count = distribution + data_symbols; symbol_count = distribution + data_symbols;
if (distribution == 0) AC_Error("cannot assign model memory");
} }
reset(); // initialize model reset(); // initialize model