Skip to content
Snippets Groups Projects
Commit 9feae237 authored by Frank Bossen's avatar Frank Bossen
Browse files

Merge branch 'JVET-O0159fix' into 'master'

JVET-O0159 10bitTcTable Deblocking

See merge request jvet/VVCSoftware_VTM!752
parents e70ecb44 7245bae0
No related branches found
No related tags found
No related merge requests found
...@@ -63,12 +63,18 @@ ...@@ -63,12 +63,18 @@
// Tables // Tables
// ==================================================================================================================== // ====================================================================================================================
#if JVET_O0159_10BITTCTABLE_DEBLOCKING
const uint16_t LoopFilter::sm_tcTable[MAX_QP + 1 + DEFAULT_INTRA_TC_OFFSET] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,4,4,5,5,5,5,7,7,8,9,10,10,11,13,14,15,17,19,21,24,25,29,33,36,41,45,51,57,64,71,80,89,100,112,125,141,157,177,198,222,250,280,314,352,395
};
#else
const uint8_t LoopFilter::sm_tcTable[MAX_QP + 1 + DEFAULT_INTRA_TC_OFFSET] = const uint8_t LoopFilter::sm_tcTable[MAX_QP + 1 + DEFAULT_INTRA_TC_OFFSET] =
{ {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,6,6,7,8,9,10,11,13,14,16,18,20,22,25 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,6,6,7,8,9,10,11,13,14,16,18,20,22,25
, 28, 31, 35, 39, 44, 50, 56, 63, 70, 79, 88, 99 , 28, 31, 35, 39, 44, 50, 56, 63, 70, 79, 88, 99
}; };
#endif
const uint8_t LoopFilter::sm_betaTable[MAX_QP + 1] = const uint8_t LoopFilter::sm_betaTable[MAX_QP + 1] =
{ {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8,9,10,11,12,13,14,15,16,17,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64
...@@ -932,7 +938,11 @@ void LoopFilter::xEdgeFilterLuma( const CodingUnit& cu, const DeblockEdgeDir edg ...@@ -932,7 +938,11 @@ 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_O0159_10BITTCTABLE_DEBLOCKING
const int iTc = bitDepthLuma < 10 ? ((sm_tcTable[iIndexTC] + 2) >> (10 - bitDepthLuma)) : ((sm_tcTable[iIndexTC]) << (bitDepthLuma - 10));
#else
const int iTc = sm_tcTable [iIndexTC] * iBitdepthScale; const int iTc = sm_tcTable [iIndexTC] * iBitdepthScale;
#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;
...@@ -1209,8 +1219,11 @@ void LoopFilter::xEdgeFilterChroma(const CodingUnit& cu, const DeblockEdgeDir ed ...@@ -1209,8 +1219,11 @@ void LoopFilter::xEdgeFilterChroma(const CodingUnit& cu, const DeblockEdgeDir ed
} }
const int iIndexTC = Clip3<int>(0, MAX_QP + DEFAULT_INTRA_TC_OFFSET, iQP + DEFAULT_INTRA_TC_OFFSET * (bS[chromaIdx] - 1) + (tcOffsetDiv2 << 1)); const int iIndexTC = Clip3<int>(0, MAX_QP + DEFAULT_INTRA_TC_OFFSET, iQP + DEFAULT_INTRA_TC_OFFSET * (bS[chromaIdx] - 1) + (tcOffsetDiv2 << 1));
#if JVET_O0159_10BITTCTABLE_DEBLOCKING
const int iTc = sps.getBitDepth(CHANNEL_TYPE_CHROMA) < 10 ? ((sm_tcTable[iIndexTC] + 2) >> (10 - sps.getBitDepth(CHANNEL_TYPE_CHROMA))) : ((sm_tcTable[iIndexTC]) << (sps.getBitDepth(CHANNEL_TYPE_CHROMA) - 10));
#else
const int iTc = sm_tcTable[iIndexTC] * iBitdepthScale; const int iTc = sm_tcTable[iIndexTC] * iBitdepthScale;
#endif
bool useLongFilter = false; bool useLongFilter = false;
if (largeBoundary) if (largeBoundary)
{ {
......
...@@ -101,7 +101,11 @@ private: ...@@ -101,7 +101,11 @@ private:
inline int xCalcDP ( Pel* piSrc, const int iOffset ) const; inline int xCalcDP ( Pel* piSrc, const int iOffset ) const;
inline int xCalcDQ ( Pel* piSrc, const int iOffset ) const; inline int xCalcDQ ( Pel* piSrc, const int iOffset ) const;
#if JVET_O0159_10BITTCTABLE_DEBLOCKING
static const uint16_t sm_tcTable[MAX_QP + 3];
#else
static const uint8_t sm_tcTable[MAX_QP + 3]; static const uint8_t sm_tcTable[MAX_QP + 3];
#endif
static const uint8_t sm_betaTable[MAX_QP + 1]; static const uint8_t sm_betaTable[MAX_QP + 1];
public: public:
......
...@@ -50,6 +50,8 @@ ...@@ -50,6 +50,8 @@
#include <assert.h> #include <assert.h>
#include <cassert> #include <cassert>
#define JVET_O0159_10BITTCTABLE_DEBLOCKING 1 // tc table for 10-bit video
#define JVET_O0046_DQ_SIGNALLING 1 // JVET-O0046: Move delta-QP earlier for 64x64 VPDU processing, applied to CUs >64x64 only #define JVET_O0046_DQ_SIGNALLING 1 // JVET-O0046: Move delta-QP earlier for 64x64 VPDU processing, applied to CUs >64x64 only
#define JVET_O0616_400_CHROMA_SUPPORT 1 // JVET-O0616: Various chroma format support in VVC #define JVET_O0616_400_CHROMA_SUPPORT 1 // JVET-O0616: Various chroma format support in VVC
......
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