Skip to content
Snippets Groups Projects
Commit 0e95c917 authored by Shunsuke Iwamura's avatar Shunsuke Iwamura
Browse files

JVET-R0130 on cleanup of tC derivation

parent 93107dd3
No related branches found
No related tags found
1 merge request!1579JVET-R0130 on cleanup of tC derivation
...@@ -1041,7 +1041,12 @@ void LoopFilter::xEdgeFilterLuma( const CodingUnit& cu, const DeblockEdgeDir edg ...@@ -1041,7 +1041,12 @@ void LoopFilter::xEdgeFilterLuma( const CodingUnit& cu, const DeblockEdgeDir edg
const int iIndexTC = Clip3(0, MAX_QP + DEFAULT_INTRA_TC_OFFSET, int(iQP + DEFAULT_INTRA_TC_OFFSET*(uiBs - 1) + (tcOffsetDiv2 << 1))); const int iIndexTC = Clip3(0, MAX_QP + DEFAULT_INTRA_TC_OFFSET, int(iQP + DEFAULT_INTRA_TC_OFFSET*(uiBs - 1) + (tcOffsetDiv2 << 1)));
const int iIndexB = Clip3(0, MAX_QP, iQP + (betaOffsetDiv2 << 1)); const int iIndexB = Clip3(0, MAX_QP, iQP + (betaOffsetDiv2 << 1));
#if JVET_R0130_TC_DERIVATION_BUGFIX
const int roundOffset = 1 << (9 - bitDepthLuma);
const int iTc = bitDepthLuma < 10 ? ((sm_tcTable[iIndexTC] + roundOffset) >> (10 - bitDepthLuma)) : ((sm_tcTable[iIndexTC]) << (bitDepthLuma - 10));
#else
const int iTc = bitDepthLuma < 10 ? ((sm_tcTable[iIndexTC] + 2) >> (10 - bitDepthLuma)) : ((sm_tcTable[iIndexTC]) << (bitDepthLuma - 10)); const int iTc = bitDepthLuma < 10 ? ((sm_tcTable[iIndexTC] + 2) >> (10 - bitDepthLuma)) : ((sm_tcTable[iIndexTC]) << (bitDepthLuma - 10));
#endif
const int iBeta = sm_betaTable[iIndexB ] * iBitdepthScale; const int iBeta = sm_betaTable[iIndexB ] * iBitdepthScale;
const int iSideThreshold = ( iBeta + ( iBeta >> 1 ) ) >> 3; const int iSideThreshold = ( iBeta + ( iBeta >> 1 ) ) >> 3;
const int iThrCut = iTc * 10; const int iThrCut = iTc * 10;
......
...@@ -51,6 +51,8 @@ ...@@ -51,6 +51,8 @@
#include <cassert> #include <cassert>
//########### place macros to be removed in next cycle below this line ############### //########### place macros to be removed in next cycle below this line ###############
#define JVET_R0130_TC_DERIVATION_BUGFIX 1 // JVET-R0130: Cleanup of tC derivation for deblocking filter
#define JVET_R0205 1 // JVET-R0205: Condition presence of inter_layer_ref_pics_present_flag on sps_video_parameter_set_id #define JVET_R0205 1 // JVET-R0205: Condition presence of inter_layer_ref_pics_present_flag on sps_video_parameter_set_id
#define JVET_R0186_CLEANUP 1 // JVET-R0186 aspect 1: Signal the pps_no_pic_partition_flag ahead in the PPS. #define JVET_R0186_CLEANUP 1 // JVET-R0186 aspect 1: Signal the pps_no_pic_partition_flag ahead in the PPS.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment