Commit b3c5d0fa authored by David Flynn's avatar David Flynn
Browse files

decoder: remove roundOutputPositions option

This option was added to use the original CfP response output position
rounding after the switch to integer point clouds.  It is not used and
its effect is barely noticeable in the objective distortion metric.
Furthermore, the encoder and decoder behaviour is different if the
option is enabled.
parent 8b6ccbc7
......@@ -60,7 +60,7 @@
namespace pcc {
struct DecoderParams {
bool roundOutputPositions;
// Do not delete this structure -- it is for passing options to the decoder.
};
class PCCTMC3Decoder3 {
......@@ -731,25 +731,15 @@ private:
//==========================================================================
public:
void inverseQuantization(
PCCPointSet3& pointCloud, const bool roundOutputPositions)
void inverseQuantization(PCCPointSet3& pointCloud)
{
const size_t pointCount = pointCloud.getPointCount();
const double invScale = 1.0 / _sps->seq_source_geom_scale_factor;
if (roundOutputPositions) {
for (size_t i = 0; i < pointCount; ++i) {
auto& point = pointCloud[i];
for (size_t k = 0; k < 3; ++k) {
point[k] = std::round(point[k] * invScale + minPositions[k]);
}
}
} else {
for (size_t i = 0; i < pointCount; ++i) {
auto& point = pointCloud[i];
for (size_t k = 0; k < 3; ++k) {
point[k] = point[k] * invScale + minPositions[k];
}
for (size_t i = 0; i < pointCount; ++i) {
auto& point = pointCloud[i];
for (size_t k = 0; k < 3; ++k) {
point[k] = point[k] * invScale + minPositions[k];
}
}
}
......
......@@ -246,11 +246,8 @@ ParseParameters(int argc, char* argv[], Parameters& params)
" 0: none\n"
" 1: RGB to YCbCr (Rec.709)")
(po::Section("Decoder"))
("roundOutputPositions",
params.decoder.roundOutputPositions, false,
"todo(kmammou)")
// NB: if adding decoder options, uncomment the Decoder section marker
// (po::Section("Decoder"))
(po::Section("Encoder"))
......@@ -583,8 +580,7 @@ Decompress(Parameters& params, Stopwatch& clock)
pointCloud.write(params.preInvScalePath);
}
decoder.inverseQuantization(
pointCloud, params.decoder.roundOutputPositions);
decoder.inverseQuantization(pointCloud);
clock.stop();
......
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