Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VVCSoftware_VTM
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jvet
VVCSoftware_VTM
Commits
311811df
Commit
311811df
authored
6 years ago
by
Frederic Barbier
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup dead code
parent
eb547a55
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!317
Cleanup dead code
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/Lib/CommonLib/Contexts.h
+0
-102
0 additions, 102 deletions
source/Lib/CommonLib/Contexts.h
with
0 additions
and
102 deletions
source/Lib/CommonLib/Contexts.h
+
0
−
102
View file @
311811df
...
...
@@ -520,106 +520,4 @@ private:
class
CtxStateBuf
{
public:
CtxStateBuf
()
:
m_valid
(
false
)
{}
~
CtxStateBuf
()
{}
inline
void
reset
()
{
m_valid
=
false
;
}
inline
bool
getIfValid
(
Ctx
&
ctx
)
const
{
if
(
m_valid
)
{
ctx
.
loadPStates
(
m_states
);
return
true
;
}
return
false
;
}
inline
void
store
(
const
Ctx
&
ctx
)
{
ctx
.
savePStates
(
m_states
);
m_valid
=
true
;
}
private
:
std
::
vector
<
uint16_t
>
m_states
;
bool
m_valid
;
};
class
CtxStateArray
{
public:
CtxStateArray
()
{}
~
CtxStateArray
()
{}
inline
void
resetAll
()
{
for
(
std
::
size_t
k
=
0
;
k
<
m_data
.
size
();
k
++
)
{
m_data
[
k
].
reset
();
}
}
inline
void
resize
(
std
::
size_t
reqSize
)
{
if
(
m_data
.
size
()
<
reqSize
)
{
m_data
.
resize
(
reqSize
);
}
}
inline
bool
getIfValid
(
Ctx
&
ctx
,
unsigned
id
)
const
{
if
(
id
<
m_data
.
size
())
{
return
m_data
[
id
].
getIfValid
(
ctx
);
}
return
false
;
}
inline
void
store
(
const
Ctx
&
ctx
,
unsigned
id
)
{
if
(
id
>=
m_data
.
size
())
{
resize
(
id
+
1
);
}
m_data
[
id
].
store
(
ctx
);
}
private
:
std
::
vector
<
CtxStateBuf
>
m_data
;
};
class
CtxWSizeSet
{
public:
CtxWSizeSet
()
:
m_valid
(
false
),
m_changes
(
false
),
m_coded
(
false
),
m_log2WinSizes
()
{}
bool
isValid
()
const
{
return
m_valid
;
}
const
std
::
vector
<
uint8_t
>&
getWinSizeBuffer
()
const
{
return
m_log2WinSizes
;
}
std
::
vector
<
uint8_t
>&
getWinSizeBuffer
()
{
return
m_log2WinSizes
;
}
int
getMode
()
const
{
return
(
!
m_valid
||
!
m_changes
?
0
:
(
m_coded
?
2
:
1
)
);
}
void
setInvalid
()
{
m_valid
=
m_changes
=
m_coded
=
false
;
}
void
setCoded
()
{
m_coded
=
true
;
}
void
setValidOnly
()
{
m_valid
=
true
;
}
void
setValid
(
uint8_t
defSize
)
{
m_valid
=
true
;
m_changes
=
false
;
for
(
std
::
size_t
n
=
0
;
n
<
m_log2WinSizes
.
size
();
n
++
)
{
if
(
m_log2WinSizes
[
n
]
&&
m_log2WinSizes
[
n
]
!=
defSize
)
{
m_changes
=
true
;
return
;
}
}
}
private
:
bool
m_valid
;
bool
m_changes
;
bool
m_coded
;
std
::
vector
<
uint8_t
>
m_log2WinSizes
;
};
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment