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

m43650/geometry: remove bypass coding mode

This commit removes the "lossless" geometry bypass coding mode that simply
skipped coding of geometry and required the decoder to read the geometry
from the source video.  Bypass coding mode is replaced by octree coding.
parent faf569e8
......@@ -11,15 +11,13 @@ categories:
lossless-geom-lossless-texture:
encflags:
- mode: 0
# NB: geometry coding is bypassed in this condition
- geometryCodec: 0
- geometryCodec: 1
- colorTransform: 1
- positionQuantizationScale: 1
- neighbourAvailBoundaryLog2: 8
decflags:
- mode: 1
- geometryCodec: 0
pcerrorflags:
- dropdups: 2
......@@ -52,14 +50,12 @@ categories:
lossless-geom-lossless-reflectance:
encflags:
- mode: 0
# NB: geometry coding is bypassed in this condition
- geometryCodec: 0
- geometryCodec: 1
- positionQuantizationScale: 1
- neighbourAvailBoundaryLog2: 8
decflags:
- mode: 1
- geometryCodec: 0
pcerrorflags:
- dropdups: 2
......
......@@ -12,15 +12,13 @@ categories:
lossless-geom-lossy-texture:
encflags:
- mode: 0
# NB: geometry coding is bypassed in this condition
- geometryCodec: 0
- geometryCodec: 1
- colorTransform: 1
- positionQuantizationScale: 1
- neighbourAvailBoundaryLog2: 8
decflags:
- mode: 1
- geometryCodec: 0
pcerrorflags:
- dropdups: 2
......@@ -74,15 +72,13 @@ categories:
lossless-geom-lossy-reflectance:
encflags:
- mode: 0
# NB: geometry coding is bypassed in this condition
- geometryCodec: 0
- geometryCodec: 1
- colorTransform: 1
- positionQuantizationScale: 1
- neighbourAvailBoundaryLog2: 8
decflags:
- mode: 1
- geometryCodec: 0
pcerrorflags:
- dropdups: 2
......
......@@ -11,15 +11,13 @@ categories:
lossless-geom-nearlossless-texture:
encflags:
- mode: 0
# NB: geometry coding is bypassed in this condition
- geometryCodec: 0
- geometryCodec: 1
- colorTransform: 1
- positionQuantizationScale: 1
- neighbourAvailBoundaryLog2: 8
decflags:
- mode: 1
- geometryCodec: 0
pcerrorflags:
- dropdups: 2
......@@ -63,14 +61,12 @@ categories:
lossless-geom-nearlossless-reflectance:
encflags:
- mode: 0
# NB: geometry coding is bypassed in this condition
- geometryCodec: 0
- geometryCodec: 1
- positionQuantizationScale: 1
- neighbourAvailBoundaryLog2: 8
decflags:
- mode: 1
- geometryCodec: 0
pcerrorflags:
- dropdups: 2
......
......@@ -122,7 +122,7 @@ public:
pointCloud.addRemoveAttributes(hasColour, hasReflectance);
if (_gps->geom_codec_type != GeometryCodecType::kBypass) {
if (1) {
buf = PayloadBuffer();
readTlv(input, &buf);
assert(buf.type == PayloadType::kGeometryBrick);
......@@ -183,9 +183,7 @@ public:
tempPointCloud.write(params.preInvScalePath);
}
if (_gps->geom_codec_type != GeometryCodecType::kBypass) {
inverseQuantization(pointCloud, params.roundOutputPositions);
}
return 0;
}
......
......@@ -156,10 +156,6 @@ public:
// - prefilter/quantize geometry (non-normative)
// - recolour
// - encode geometry
if (_gps->geom_codec_type == GeometryCodecType::kBypass) {
// todo(df): this should go away now that reporting counts attribute bits
pointCloud = inputPointCloud;
}
if (_gps->geom_codec_type == GeometryCodecType::kOctree) {
quantization(inputPointCloud);
}
......@@ -185,7 +181,7 @@ public:
// geometry encoding
if (_gps->geom_codec_type != GeometryCodecType::kBypass) {
if (1) {
PayloadBuffer payload(PayloadType::kGeometryBrick);
pcc::chrono::Stopwatch<pcc::chrono::utime_inc_children_clock> clock_user;
......@@ -257,12 +253,7 @@ public:
outputFn(payload);
}
if (_gps->geom_codec_type == GeometryCodecType::kBypass) {
if (reconstructedCloud)
*reconstructedCloud = pointCloud;
} else {
reconstructedPointCloud(reconstructedCloud);
}
return 0;
}
......
......@@ -146,7 +146,6 @@ static std::ostream&
operator<<(std::ostream& out, const GeometryCodecType& val)
{
switch (val) {
case GeometryCodecType::kBypass: out << "0 (Bypass)"; break;
case GeometryCodecType::kOctree: out << "1 (TMC1 Octree)"; break;
case GeometryCodecType::kTriSoup: out << "2 (TMC3 TriSoup)"; break;
}
......@@ -265,8 +264,7 @@ ParseParameters(int argc, char* argv[], Parameters& params)
// tools
("geometryCodec",
params.encoder.gps.geom_codec_type, GeometryCodecType::kOctree,
"Controls the method used to encode geometry:"
" 0: bypass (a priori)\n"
"Controls the method used to encode geometry:\n"
" 1: octree (TMC3)\n"
" 2: trisoup (TMC1)")
......@@ -366,6 +364,10 @@ ParseParameters(int argc, char* argv[], Parameters& params)
return false;
}
if (int(params.encoder.gps.geom_codec_type) == 0) {
err.error() << "Bypassed geometry coding is no longer supported\n";
}
// For trisoup, ensure that positionQuantizationScale is the exact inverse of intToOrigScale.
if (params.encoder.gps.geom_codec_type == GeometryCodecType::kTriSoup) {
params.encoder.sps.seq_source_geom_scale_factor =
......@@ -437,13 +439,6 @@ ParseParameters(int argc, char* argv[], Parameters& params)
if (params.compressedStreamPath.empty())
err.error() << "compressedStreamPath not set\n";
// currently the attributes with lossless geometry require the source data
// todo(?): remove this dependency by improving reporting
if (
params.encoder.gps.geom_codec_type == GeometryCodecType::kBypass
&& params.uncompressedDataPath.empty())
err.error() << "uncompressedDataPath not set\n";
// report the current configuration (only in the absence of errors so
// that errors/warnings are more obvious and in the same place).
if (err.is_errored)
......@@ -549,35 +544,6 @@ Decompress(Parameters& params, Stopwatch& clock)
PCCTMC3Decoder3 decoder;
PCCPointSet3 pointCloud;
// todo(df): remove the following hack
// peek at the gps to determine if geometry bypass mode is being used
bool geometryBypass = false;
if (1) {
PayloadBuffer buf;
// skip sps
readTlv(fin, &buf);
assert(buf.type == PayloadType::kSequenceParameterSet);
buf = PayloadBuffer();
readTlv(fin, &buf);
GeometryParameterSet gps = parseGps(buf);
geometryBypass = gps.geom_codec_type == GeometryCodecType::kBypass;
fin.seekg(0);
}
// read a priori geometry from input file for bypass case
if (geometryBypass) {
if (
!pointCloud.read(params.uncompressedDataPath)
|| pointCloud.getPointCount() == 0) {
cout << "Error: can't open input file!" << endl;
return -1;
}
pointCloud.removeReflectances();
pointCloud.removeColors();
}
int ret = decoder.decompress(params.decoder, fin, pointCloud);
if (ret) {
cout << "Error: can't decompress point cloud!" << endl;
......
......@@ -59,8 +59,6 @@ enum class PayloadType
// Describes the geometry coding method.
enum class GeometryCodecType
{
// No geometry coding is performed (geometry is known a priori)
kBypass = 0,
// TMC3 lossless geometry codec using ocrees
kOctree = 1,
// TMC1 octree + triangulation
......
  • Hurry can seen the amazing blog here it is the most use full way for access the here windows 10 desktop clock most of the users can look this information to batter access the windows clock setting thanks.

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