Commit b4106fb4 authored by Khaled Mammou's avatar Khaled Mammou Committed by David Flynn
Browse files

m42634/syntax: represent quant step size in 32 bits rather than 16

This commit fixes a syntax issue where attribute quantisation step sizes
greater than 2^{16}-1 could not be correctly represented.

Extracted-from: http://wg11.sc29.org/svn/repos/MPEG-I/Part5-PointCloudCompression/CE/CE0/CE0.1/trunk@1357


Reintegrated-by: David Flynn's avatar <dflynn@blackberry.com>
parent 2c6f23ec
......@@ -392,8 +392,8 @@ class PCCTMC3Decoder3 {
quantizationSteps.resize(levelOfDetailCount);
for (size_t lodIndex = 0; lodIndex < levelOfDetailCount; ++lodIndex) {
uint16_t qs = 0;
PCCReadFromBuffer<uint16_t>(bitstream.buffer, qs, bitstream.size);
uint32_t qs = 0;
PCCReadFromBuffer<uint32_t>(bitstream.buffer, qs, bitstream.size);
quantizationSteps[lodIndex] = qs;
}
......
......@@ -351,8 +351,8 @@ class PCCTMC3Encoder3 {
PCCWriteToBuffer<uint32_t>(d2, bitstream.buffer, bitstream.size);
}
for (size_t lodIndex = 0; lodIndex < attributeParams.levelOfDetailCount; ++lodIndex) {
const uint16_t qs = uint16_t(attributeParams.quantizationSteps[lodIndex]);
PCCWriteToBuffer<uint16_t>(qs, bitstream.buffer, bitstream.size);
const uint32_t qs = uint32_t(attributeParams.quantizationSteps[lodIndex]);
PCCWriteToBuffer<uint32_t>(qs, bitstream.buffer, bitstream.size);
}
for (size_t lodIndex = 0; lodIndex < attributeParams.levelOfDetailCount; ++lodIndex) {
const uint16_t dz = uint16_t(attributeParams.quantizationDeadZoneSizes[lodIndex]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment