Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Kenneth Andersson
HM
Commits
606a5b19
Commit
606a5b19
authored
Mar 31, 2021
by
FANGJUN PU
Browse files
Fix!36: add Shutter Interval SEI message processing constrain and warning info
parent
8eaa2cac
Changes
3
Hide whitespace changes
Inline
Side-by-side
source/App/TAppDecoder/TAppDecTop.cpp
View file @
606a5b19
...
...
@@ -250,11 +250,18 @@ Void TAppDecTop::decode()
UInt
numUnitsLFR
=
seiShutterIntervalInfo
->
m_siiSubLayerNumUnitsInSI
[
0
];
UInt
numUnitsHFR
=
seiShutterIntervalInfo
->
m_siiSubLayerNumUnitsInSI
[
arraySize
-
1
];
setShutterFilterFlag
(
numUnitsLFR
==
2
*
numUnitsHFR
);
const
TComSPS
*
activeSPS
=
&
(
pcListPic
->
front
()
->
getPicSym
()
->
getSPS
());
if
(
numUnitsLFR
==
2
*
numUnitsHFR
&&
activeSPS
->
getMaxTLayers
()
==
1
&&
activeSPS
->
getMaxDecPicBuffering
(
0
)
==
1
)
{
fprintf
(
stderr
,
"Warning: Shutter Interval SEI message processing is disabled for single TempLayer and single frame in DPB
\n
"
);
setShutterFilterFlag
(
false
);
}
}
}
if
((
!
m_shutterIntervalPostFileName
.
empty
())
&&
(
!
openedPostFile
)
&&
getShutterFilterFlag
())
{
const
BitDepths
&
bitDepths
=
pcListPic
->
front
()
->
getPicSym
()
->
getSPS
().
getBitDepths
();
// use bit depths of first reconstructed picture.
const
BitDepths
&
bitDepths
=
pcListPic
->
front
()
->
getPicSym
()
->
getSPS
().
getBitDepths
();
for
(
UInt
channelType
=
0
;
channelType
<
MAX_NUM_CHANNEL_TYPE
;
channelType
++
)
{
if
(
m_outputBitDepth
[
channelType
]
==
0
)
...
...
source/App/TAppEncoder/TAppEncCfg.cpp
View file @
606a5b19
...
...
@@ -2032,13 +2032,17 @@ Bool TAppEncCfg::parseCfg( Int argc, TChar* argv[] )
if
(
arraySize
>
1
&&
m_siiSEISubLayerNumUnitsInSI
[
0
]
==
2
*
m_siiSEISubLayerNumUnitsInSI
[
arraySize
-
1
])
{
m_ShutterFilterEnable
=
true
;
const
d
ouble
shutterAngle
=
360.0
;
d
ouble
fpsHFR
=
(
d
ouble
)
m_iFrameRate
,
fpsLFR
=
(
d
ouble
)
m_iFrameRate
/
2.0
;
UInt
numUnitsHFR
=
(
UInt
)(((
d
ouble
)
m_siiSEITimeScale
/
fpsHFR
)
*
(
shutterAngle
/
360.0
));
UInt
numUnitsLFR
=
(
UInt
)(((
d
ouble
)
m_siiSEITimeScale
/
fpsLFR
)
*
(
shutterAngle
/
360.0
));
const
D
ouble
shutterAngle
=
360.0
;
D
ouble
fpsHFR
=
(
D
ouble
)
m_iFrameRate
,
fpsLFR
=
(
D
ouble
)
m_iFrameRate
/
2.0
;
UInt
numUnitsHFR
=
(
UInt
)(((
D
ouble
)
m_siiSEITimeScale
/
fpsHFR
)
*
(
shutterAngle
/
360.0
));
UInt
numUnitsLFR
=
(
UInt
)(((
D
ouble
)
m_siiSEITimeScale
/
fpsLFR
)
*
(
shutterAngle
/
360.0
));
for
(
Int
i
=
0
;
i
<
arraySize
-
1
;
i
++
)
m_siiSEISubLayerNumUnitsInSI
[
i
]
=
numUnitsLFR
;
m_siiSEISubLayerNumUnitsInSI
[
arraySize
-
1
]
=
numUnitsHFR
;
}
else
{
printf
(
"Warning: Input number of units in Sii SEI should be greater than 1 and number of LFR units should be 2 times of number of HFR units
\n
"
);
}
#endif
}
#endif
...
...
@@ -2947,6 +2951,14 @@ Void TAppEncCfg::xCheckParameter()
}
#endif
#if SHUTTER_INTERVAL_SEI_PROCESSING
if
(
m_siiSEIEnabled
&&
m_ShutterFilterEnable
&&
m_maxTempLayer
==
1
&&
m_maxDecPicBuffering
[
0
]
==
1
)
{
printf
(
"Warning: Shutter Interval SEI message processing is disabled for single TempLayer and single frame in DPB
\n
"
);
m_ShutterFilterEnable
=
false
;
}
#endif
if
(
m_timeCodeSEIEnabled
)
{
xConfirmPara
(
m_timeCodeSEINumTs
>
MAX_TIMECODE_SEI_SETS
,
"Number of time sets cannot exceed 3"
);
...
...
source/Lib/TLibEncoder/TEncCfg.h
View file @
606a5b19
...
...
@@ -148,7 +148,7 @@ protected:
Double
m_dXPSNRWeight
[
MAX_NUM_COMPONENT
];
Bool
m_cabacZeroWordPaddingEnabled
;
#if SHUTTER_INTERVAL_SEI_PROCESSING
b
ool
m_ShutterFilterEnable
;
///< enable Pre-Filtering with Shutter Interval SEI
B
ool
m_ShutterFilterEnable
;
///< enable Pre-Filtering with Shutter Interval SEI
#endif
/* profile & level */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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