mirror of
https://github.com/pgpointcloud/pointcloud.git
synced 2025-12-08 20:36:04 +00:00
Revert "Fix sigbits decoding to handle the 0-commonbits case"
This reverts commit ca64830e53cdae288e80fb8a127c2a86cf141c2f. It broke other cases, better to rethink (#69)
This commit is contained in:
parent
ca64830e53
commit
45c0fc7820
@ -942,12 +942,7 @@ pc_bytes_sigbits_decode_8(const PCBYTES pcb)
|
||||
int shift = bit - nbits;
|
||||
uint8_t val = *bytes_ptr;
|
||||
/* The unique part is all in this word */
|
||||
if ( shift == 0 )
|
||||
{
|
||||
obytes[i] = val;
|
||||
++bytes_ptr;
|
||||
}
|
||||
else if ( shift > 0 )
|
||||
if ( shift >= 0 )
|
||||
{
|
||||
/* Push unique part to bottom of word */
|
||||
val >>= shift;
|
||||
@ -1012,12 +1007,7 @@ pc_bytes_sigbits_decode_16(const PCBYTES pcb)
|
||||
{
|
||||
int shift = bit - nbits;
|
||||
uint16_t val = *bytes_ptr;
|
||||
if ( shift == 0 )
|
||||
{
|
||||
obytes[i] = val;
|
||||
++bytes_ptr;
|
||||
}
|
||||
else if ( shift > 0 )
|
||||
if ( shift >= 0 )
|
||||
{
|
||||
val >>= shift;
|
||||
val &= mask;
|
||||
@ -1076,12 +1066,7 @@ pc_bytes_sigbits_decode_32(const PCBYTES pcb)
|
||||
{
|
||||
int shift = bit - nbits;
|
||||
uint32_t val = *bytes_ptr;
|
||||
if ( shift == 0 )
|
||||
{
|
||||
obytes[i] = val;
|
||||
++bytes_ptr;
|
||||
}
|
||||
else if ( shift > 0 )
|
||||
if ( shift >= 0 )
|
||||
{
|
||||
val >>= shift;
|
||||
val &= mask;
|
||||
@ -1141,12 +1126,7 @@ pc_bytes_sigbits_decode_64(const PCBYTES pcb)
|
||||
{
|
||||
int shift = bit - nbits;
|
||||
uint64_t val = *bytes_ptr;
|
||||
if ( shift == 0 )
|
||||
{
|
||||
obytes[i] = val;
|
||||
++bytes_ptr;
|
||||
}
|
||||
else if ( shift > 0 )
|
||||
if ( shift >= 0 )
|
||||
{
|
||||
val >>= shift;
|
||||
val &= mask;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user