Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Satoru KUMA
MPEG129-m52280
Commits
5097aa9b
Commit
5097aa9b
authored
Jul 09, 2019
by
Toshiyasu Sugio
Committed by
David Flynn
Aug 12, 2019
Browse files
attr/m49628: remove specialised single layer lod generator
This functionality is now handled by the unified generation process.
parent
dcc1301e
Changes
3
Hide whitespace changes
Inline
Side-by-side
tmc3/AttributeDecoder.cpp
View file @
5097aa9b
...
...
@@ -270,17 +270,12 @@ AttributeDecoder::decodeReflectancesPred(
std
::
vector
<
uint32_t
>
numberOfPointsPerLOD
;
std
::
vector
<
uint32_t
>
indexesLOD
;
if
(
aps
.
num_detail_levels
<=
1
)
{
buildPredictorsFastNoLod
(
pointCloud
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
predictors
,
indexesLOD
);
}
else
{
buildPredictorsFast
(
pointCloud
,
aps
.
lod_decimation_enabled_flag
,
aps
.
intra_lod_prediction_enabled_flag
,
aps
.
dist2
,
aps
.
num_detail_levels
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
aps
.
search_range
,
predictors
,
numberOfPointsPerLOD
,
indexesLOD
);
}
buildPredictorsFast
(
pointCloud
,
aps
.
lod_decimation_enabled_flag
,
aps
.
intra_lod_prediction_enabled_flag
,
aps
.
dist2
,
aps
.
num_detail_levels
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
aps
.
search_range
,
predictors
,
numberOfPointsPerLOD
,
indexesLOD
);
const
int64_t
maxReflectance
=
(
1ll
<<
desc
.
attr_bitdepth
)
-
1
;
int
zero_cnt
=
decoder
.
decodeZeroCnt
(
pointCount
);
for
(
size_t
predictorIndex
=
0
;
predictorIndex
<
pointCount
;
...
...
@@ -359,17 +354,12 @@ AttributeDecoder::decodeColorsPred(
std
::
vector
<
uint32_t
>
numberOfPointsPerLOD
;
std
::
vector
<
uint32_t
>
indexesLOD
;
if
(
aps
.
num_detail_levels
<=
1
)
{
buildPredictorsFastNoLod
(
pointCloud
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
predictors
,
indexesLOD
);
}
else
{
buildPredictorsFast
(
pointCloud
,
aps
.
lod_decimation_enabled_flag
,
aps
.
intra_lod_prediction_enabled_flag
,
aps
.
dist2
,
aps
.
num_detail_levels
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
aps
.
search_range
,
predictors
,
numberOfPointsPerLOD
,
indexesLOD
);
}
buildPredictorsFast
(
pointCloud
,
aps
.
lod_decimation_enabled_flag
,
aps
.
intra_lod_prediction_enabled_flag
,
aps
.
dist2
,
aps
.
num_detail_levels
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
aps
.
search_range
,
predictors
,
numberOfPointsPerLOD
,
indexesLOD
);
uint32_t
values
[
3
];
int
zero_cnt
=
decoder
.
decodeZeroCnt
(
pointCount
);
for
(
size_t
predictorIndex
=
0
;
predictorIndex
<
pointCount
;
...
...
tmc3/AttributeEncoder.cpp
View file @
5097aa9b
...
...
@@ -475,17 +475,12 @@ AttributeEncoder::encodeReflectancesPred(
std
::
vector
<
uint32_t
>
numberOfPointsPerLOD
;
std
::
vector
<
uint32_t
>
indexesLOD
;
if
(
aps
.
num_detail_levels
<=
1
)
{
buildPredictorsFastNoLod
(
pointCloud
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
predictors
,
indexesLOD
);
}
else
{
buildPredictorsFast
(
pointCloud
,
aps
.
lod_decimation_enabled_flag
,
aps
.
intra_lod_prediction_enabled_flag
,
aps
.
dist2
,
aps
.
num_detail_levels
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
aps
.
search_range
,
predictors
,
numberOfPointsPerLOD
,
indexesLOD
);
}
buildPredictorsFast
(
pointCloud
,
aps
.
lod_decimation_enabled_flag
,
aps
.
intra_lod_prediction_enabled_flag
,
aps
.
dist2
,
aps
.
num_detail_levels
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
aps
.
search_range
,
predictors
,
numberOfPointsPerLOD
,
indexesLOD
);
const
int64_t
clipMax
=
(
1ll
<<
desc
.
attr_bitdepth
)
-
1
;
PCCResidualsEntropyEstimator
context
;
int
zero_cnt
=
0
;
...
...
@@ -665,17 +660,12 @@ AttributeEncoder::encodeColorsPred(
std
::
vector
<
uint32_t
>
numberOfPointsPerLOD
;
std
::
vector
<
uint32_t
>
indexesLOD
;
if
(
aps
.
num_detail_levels
<=
1
)
{
buildPredictorsFastNoLod
(
pointCloud
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
predictors
,
indexesLOD
);
}
else
{
buildPredictorsFast
(
pointCloud
,
aps
.
lod_decimation_enabled_flag
,
aps
.
intra_lod_prediction_enabled_flag
,
aps
.
dist2
,
aps
.
num_detail_levels
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
aps
.
search_range
,
predictors
,
numberOfPointsPerLOD
,
indexesLOD
);
}
buildPredictorsFast
(
pointCloud
,
aps
.
lod_decimation_enabled_flag
,
aps
.
intra_lod_prediction_enabled_flag
,
aps
.
dist2
,
aps
.
num_detail_levels
,
aps
.
num_pred_nearest_neighbours
,
aps
.
search_range
,
aps
.
search_range
,
predictors
,
numberOfPointsPerLOD
,
indexesLOD
);
const
int64_t
clipMax
=
(
1ll
<<
desc
.
attr_bitdepth
)
-
1
;
uint32_t
values
[
3
];
PCCResidualsEntropyEstimator
context
;
...
...
tmc3/PCCTMC3Common.h
View file @
5097aa9b
...
...
@@ -837,53 +837,6 @@ buildPredictorsFast(
//---------------------------------------------------------------------------
inline
void
buildPredictorsFastNoLod
(
const
PCCPointSet3
&
pointCloud
,
const
int32_t
numberOfNearestNeighborsInPrediction
,
const
int32_t
searchRange
,
std
::
vector
<
PCCPredictor
>&
predictors
,
std
::
vector
<
uint32_t
>&
indexes
)
{
const
int32_t
pointCount
=
int32_t
(
pointCloud
.
getPointCount
());
assert
(
pointCount
);
indexes
.
resize
(
pointCount
);
// re-order points
std
::
vector
<
MortonCodeWithIndex
>
packedVoxel
;
computeMortonCodes
(
pointCloud
,
packedVoxel
);
for
(
int32_t
i
=
0
;
i
<
pointCount
;
++
i
)
{
indexes
[
i
]
=
packedVoxel
[
i
].
index
;
}
predictors
.
resize
(
pointCount
);
for
(
int32_t
i
=
0
;
i
<
pointCount
;
++
i
)
{
const
int32_t
index
=
indexes
[
i
];
const
auto
&
point
=
pointCloud
[
index
];
auto
&
predictor
=
predictors
[
pointCount
-
1
-
i
];
predictor
.
init
();
const
int32_t
k0
=
std
::
min
(
pointCount
-
1
,
i
+
searchRange
);
const
int32_t
k1
=
i
+
1
;
for
(
int32_t
k
=
k1
;
k
<=
k0
;
++
k
)
{
const
int32_t
index1
=
indexes
[
k
];
const
auto
&
point1
=
pointCloud
[
index1
];
predictor
.
insertNeighbor
(
pointCount
-
1
-
k
,
(
point
-
point1
).
getNorm2
(),
numberOfNearestNeighborsInPrediction
,
indexTieBreaker
(
k
,
i
));
}
assert
(
predictor
.
neighborCount
<=
numberOfNearestNeighborsInPrediction
);
if
(
predictor
.
neighborCount
<
2
)
{
predictor
.
neighbors
[
0
].
weight
=
1
;
}
else
if
(
predictor
.
neighbors
[
0
].
weight
==
0
)
{
predictor
.
neighborCount
=
1
;
predictor
.
neighbors
[
0
].
weight
=
1
;
}
}
std
::
reverse
(
indexes
.
begin
(),
indexes
.
end
());
}
//---------------------------------------------------------------------------
}
// namespace pcc
#endif
/* PCCTMC3Common_h */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment