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
a9b60add
Commit
a9b60add
authored
Jan 13, 2020
by
Satoru KUMA
Browse files
MPEG129/m52280
parent
717395ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
tmc3/geometry_trisoup_decoder.cpp
View file @
a9b60add
...
...
@@ -108,13 +108,13 @@ decodeGeometryTrisoup(
// Decode segind from bitstream.
symbolCount
=
arithmeticDecoder
->
decodeExpGolomb
(
0
,
ctxBypass
,
ctxTemp
);
AdaptiveMAryModel
multiSymbolSegindModel0
(
256
);
//AdaptiveMAryModel multiSymbolSegindModel0(256);
AdaptiveBitModel
ctxTempSeg
;
std
::
vector
<
bool
>
segind
;
for
(
uint32_t
i
=
0
;
i
<
symbolCount
;
i
++
)
{
const
uint8_t
c
=
arithmeticDecoder
->
decode
(
multiSymbolSegindModel0
);
for
(
int
b
=
7
;
b
>=
0
;
b
--
)
{
segind
.
push_back
(
!!
(
c
&
(
1
<<
b
)));
}
bool
c
=
!!
(
arithmeticDecoder
->
decode
(
ctxTempSeg
));
segind
.
push_back
(
c
);
}
// Decode vertices from bitstream.
...
...
tmc3/geometry_trisoup_encoder.cpp
View file @
a9b60add
...
...
@@ -64,23 +64,20 @@ encodeGeometryTrisoup(
determineTrisoupVertices
(
nodes
,
segind
,
vertices
,
pointCloud
,
blockWidth
);
// Encode segind to bitstream.
AdaptiveMAryModel
multiSymbolSegindModel0
(
256
);
symbolCount
=
(
segind
.
size
()
+
7
)
/
8
;
segind
.
resize
(
8
*
symbolCount
,
false
);
//AdaptiveMAryModel multiSymbolSegindModel0(256);
AdaptiveBitModel
ctxTempSeg
;
symbolCount
=
segind
.
size
();
//segind.resize(8 * symbolCount, false);
// todo(df): consider a more appropriate signalling method
AdaptiveBitModel
ctxTemp
;
StaticBitModel
ctxBypass
;
arithmeticEncoder
->
encodeExpGolomb
(
symbolCount
,
0
,
ctxBypass
,
ctxTemp
);
int
uniqueIndex
=
0
;
//
int uniqueIndex = 0;
for
(
uint32_t
i
=
0
;
i
<
symbolCount
;
i
++
)
{
uint8_t
c
=
0
;
for
(
int
b
=
7
;
b
>=
0
;
b
--
)
{
uint8_t
bit
=
uint8_t
(
segind
[
uniqueIndex
++
]);
c
|=
bit
<<
b
;
}
arithmeticEncoder
->
encode
(
uint32_t
(
c
),
multiSymbolSegindModel0
);
arithmeticEncoder
->
encode
((
int
)
segind
[
i
],
ctxTempSeg
);
}
// Encode vertices to bitstream.
...
...
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