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

m42634/attr: restrict numberOfNearestNeighborsInPrediction to 4

This commit reduces the number of nearest neighbours used in attribute
prediction to 4 from 8 in order to reduce memory usage.

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 01ce36e3
......@@ -3,7 +3,7 @@
mode: 2
colorTransform: 1
positionQuantizationScale: 1
numberOfNearestNeighborsInPrediction: 8
numberOfNearestNeighborsInPrediction: 4
levelOfDetailCount: 9
searchRange: 0
dist2: 134217728 33554432 8388608 2097152 524288 131072 32768 8192 0
......
......@@ -3,7 +3,7 @@
mode: 2
colorTransform: 1
positionQuantizationScale: 1
numberOfNearestNeighborsInPrediction: 8
numberOfNearestNeighborsInPrediction: 4
levelOfDetailCount: 9
searchRange: 0
dist2: 134217728 33554432 8388608 2097152 524288 131072 32768 8192 0
......
......@@ -3,7 +3,7 @@
mode: 2
colorTransform: 1
positionQuantizationScale: 1
numberOfNearestNeighborsInPrediction: 8
numberOfNearestNeighborsInPrediction: 4
levelOfDetailCount: 9
searchRange: 0
dist2: 134217728 33554432 8388608 2097152 524288 131072 32768 8192 0
......
......@@ -3,7 +3,7 @@
mode: 2
colorTransform: 1
positionQuantizationScale: 1
numberOfNearestNeighborsInPrediction: 8
numberOfNearestNeighborsInPrediction: 4
levelOfDetailCount: 9
searchRange: 0
dist2: 134217728 33554432 8388608 2097152 524288 131072 32768 8192 0
......
......@@ -3,7 +3,7 @@
mode: 2
colorTransform: 1
positionQuantizationScale: 1
numberOfNearestNeighborsInPrediction: 8
numberOfNearestNeighborsInPrediction: 4
levelOfDetailCount: 9
searchRange: 0
dist2: 134217728 33554432 8388608 2097152 524288 131072 32768 8192 0
......
......@@ -44,7 +44,7 @@
namespace pcc {
const uint32_t PCCTMC3MagicNumber = 20110904;
const uint32_t PCCTMC3FormatVersion = 1;
const uint32_t PCCTMC3MaxPredictionNearestNeighborCount = 8;
const uint32_t PCCTMC3MaxPredictionNearestNeighborCount = 4;
const uint32_t PCCTMC3Diff1AdaptiveDataModelCount = 512;
const uint32_t PCCTMC3AdaptiveDataModelAlphabetMaxSize = 2047;
......
......@@ -186,7 +186,7 @@ bool ParseParameters(int argc, char *argv[], Parameters &params) {
"Attribute's todo(kmammou)")
("numberOfNearestNeighborsInPrediction",
params_attr.numberOfNearestNeighborsInPrediction, size_t(8),
params_attr.numberOfNearestNeighborsInPrediction, size_t(4),
"Attribute's maximum number of nearest neighbors to be used for prediction")
("levelOfDetailCount",
......@@ -219,14 +219,21 @@ bool ParseParameters(int argc, char *argv[], Parameters &params) {
// - validate that quantizationSteps, dist2
// of each attribute contain levelOfDetailCount elements.
for (const auto &attr : params.encodeParameters.attributeEncodeParameters) {
int lod = attr.second.levelOfDetailCount;
int lod = attr.second.levelOfDetailCount;
if (attr.second.dist2.size() != lod) {
err.error() << attr.first << ".dist2 does not have " << lod << " entries\n";
}
if (attr.second.quantizationSteps.size() != lod) {
err.error() << attr.first << ".quantizationSteps does not have " << lod << " entries\n";
}
if (attr.second.dist2.size() != lod) {
err.error() << attr.first << ".dist2 does not have " << lod << " entries\n";
}
if (attr.second.quantizationSteps.size() != lod) {
err.error() << attr.first << ".quantizationSteps does not have " << lod << " entries\n";
}
if (attr.second.numberOfNearestNeighborsInPrediction >
PCCTMC3MaxPredictionNearestNeighborCount)
{
err.error() << attr.first
<< ".numberOfNearestNeighborsInPrediction must be less than "
<< PCCTMC3MaxPredictionNearestNeighborCount << "\n";
}
}
// check required arguments are specified
......
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