Loading tests/rtp/ivasrtp.py +11 −11 Original line number Diff line number Diff line Loading @@ -829,17 +829,17 @@ def packPositionsCompact(bitstrm: BitStream, data: any): #posX = np.uint16(q10(position.x / 10.24)) #posY = np.uint16(q10(position.y / 10.24)) #posZ = np.uint16(q9(position.z / 5.12)) posX = ctypes.c_int16( q10(position.x / 10.24) ).value posY = ctypes.c_int16( q10(position.y / 10.24) ).value posZ = ctypes.c_int16( q9(position.z / 5.12) ).value bitstrm.append(f"uintbe:8={ctypes.c_uint8(posX >> 3).value}") bitstrm.append(f"uintbe:8={ctypes.c_uint8(( (posX & MASK_3BIT) << 5 ) | (posY >> 6)).value}") bitstrm.append(f"uintbe:8={ctypes.c_uint8(( (posY & MASK_6BIT) << 2 ) | (posZ >> 8)).value}") bitstrm.append(f"uintbe:8={(posZ >> 2)}") #bitstrm.append(f"int:11={q10(position.x / 10.24)}") #bitstrm.append(f"int:11={q10(position.y / 10.24)}") #bitstrm.append(f"int:10={q9(position.z / 5.12)}") # posX = ctypes.c_int16( q10(position.x / 10.24) ).value # posY = ctypes.c_int16( q10(position.y / 10.24) ).value # posZ = ctypes.c_int16( q9(position.z / 5.12) ).value # bitstrm.append(f"uintbe:8={ctypes.c_uint8(posX >> 3).value}") # bitstrm.append(f"uintbe:8={ctypes.c_uint8(( (posX & MASK_3BIT) << 5 ) | (posY >> 6)).value}") # bitstrm.append(f"uintbe:8={ctypes.c_uint8(( (posY & MASK_6BIT) << 2 ) | (posZ >> 8)).value}") # bitstrm.append(f"uintbe:8={(posZ >> 2)}") bitstrm.append(f"int:11={q10(position.x / 10.24)}") bitstrm.append(f"int:11={q10(position.y / 10.24)}") bitstrm.append(f"int:10={q9(position.z / 5.12)}") def unpackOrientation(bitstrm: ConstBitStream, piSize: int) -> ORIENTATION: Loading Loading
tests/rtp/ivasrtp.py +11 −11 Original line number Diff line number Diff line Loading @@ -829,17 +829,17 @@ def packPositionsCompact(bitstrm: BitStream, data: any): #posX = np.uint16(q10(position.x / 10.24)) #posY = np.uint16(q10(position.y / 10.24)) #posZ = np.uint16(q9(position.z / 5.12)) posX = ctypes.c_int16( q10(position.x / 10.24) ).value posY = ctypes.c_int16( q10(position.y / 10.24) ).value posZ = ctypes.c_int16( q9(position.z / 5.12) ).value bitstrm.append(f"uintbe:8={ctypes.c_uint8(posX >> 3).value}") bitstrm.append(f"uintbe:8={ctypes.c_uint8(( (posX & MASK_3BIT) << 5 ) | (posY >> 6)).value}") bitstrm.append(f"uintbe:8={ctypes.c_uint8(( (posY & MASK_6BIT) << 2 ) | (posZ >> 8)).value}") bitstrm.append(f"uintbe:8={(posZ >> 2)}") #bitstrm.append(f"int:11={q10(position.x / 10.24)}") #bitstrm.append(f"int:11={q10(position.y / 10.24)}") #bitstrm.append(f"int:10={q9(position.z / 5.12)}") # posX = ctypes.c_int16( q10(position.x / 10.24) ).value # posY = ctypes.c_int16( q10(position.y / 10.24) ).value # posZ = ctypes.c_int16( q9(position.z / 5.12) ).value # bitstrm.append(f"uintbe:8={ctypes.c_uint8(posX >> 3).value}") # bitstrm.append(f"uintbe:8={ctypes.c_uint8(( (posX & MASK_3BIT) << 5 ) | (posY >> 6)).value}") # bitstrm.append(f"uintbe:8={ctypes.c_uint8(( (posY & MASK_6BIT) << 2 ) | (posZ >> 8)).value}") # bitstrm.append(f"uintbe:8={(posZ >> 2)}") bitstrm.append(f"int:11={q10(position.x / 10.24)}") bitstrm.append(f"int:11={q10(position.y / 10.24)}") bitstrm.append(f"int:10={q9(position.z / 5.12)}") def unpackOrientation(bitstrm: ConstBitStream, piSize: int) -> ORIENTATION: Loading