Commit e15d4056 authored by Xiang Li's avatar Xiang Li

cleaning and fix format

parent 0dc5ab0d
......@@ -450,12 +450,12 @@ static const int NTAPS_CHROMA = 4; ///< Numb
static const int NTAPS_LUMA_FRUC = 2;
#endif
#if JVET_K0076_CPR
static const int IBC_MAX_CAND_SIZE = 16; // max block size for ibc search
static const int IBC_NUM_CANDIDATES = 64; ///< Maximum number of candidates to store/test
static const int CHROMA_REFINEMENT_CANDIDATES = 8; /// 8 candidates BV to choose from
static const int IBC_FAST_METHOD_NOINTRA_IBCCBF0 = 0x01;
static const int IBC_FAST_METHOD_BUFFERBV = 0X02;
static const int IBC_FAST_METHOD_ADAPTIVE_SEARCHRANGE = 0X04;
static const int IBC_MAX_CAND_SIZE = 16; // max block size for ibc search
static const int IBC_NUM_CANDIDATES = 64; ///< Maximum number of candidates to store/test
static const int CHROMA_REFINEMENT_CANDIDATES = 8; /// 8 candidates BV to choose from
static const int IBC_FAST_METHOD_NOINTRA_IBCCBF0 = 0x01;
static const int IBC_FAST_METHOD_BUFFERBV = 0X02;
static const int IBC_FAST_METHOD_ADAPTIVE_SEARCHRANGE = 0X04;
#endif
// ====================================================================================================================
// Macro functions
......
......@@ -1929,7 +1929,7 @@ SPSNext::SPSNext( SPS& sps )
, m_compositeRefEnabled ( false )
#endif
#if JVET_K0076_CPR
, m_IBCMode(0)
, m_IBCMode ( 0 )
#endif
// ADD_NEW_TOOL : (sps extension) add tool enabling flags here (with "false" as default values)
{
......
......@@ -1171,7 +1171,7 @@ void PU::getInterMergeCandidates( const PredictionUnit &pu, MergeCtx& mrgCtx, co
// compute the location of the current PU
int cnt = 0;
#if JVET_K0076_CPR && JEM_TOOLS
#if JVET_K0076_CPR
int cntIBC = 0;
#endif
const Position posLT = pu.Y().topLeft();
......
......@@ -226,15 +226,14 @@ bool CABACReader::coding_tree_unit( CodingStructure& cs, const UnitArea& area, i
{
isLast = coding_tree(cs, *partitioner, cuCtx);
#else
bool isLast = coding_tree(cs, *partitioner, cuCtx);
#endif
bool isLast = coding_tree( cs, *partitioner, cuCtx );
#endif
qps[CH_L] = cuCtx.qp;
if (!isLast && CS::isDualITree(cs) && cs.pcv->chrFormat != CHROMA_400)
if( !isLast && CS::isDualITree( cs ) && cs.pcv->chrFormat != CHROMA_400 )
{
CUCtx cuCtxChroma(qps[CH_C]);
partitioner->initCtu(area, CH_C, *cs.slice);
isLast = coding_tree(cs, *partitioner, cuCtxChroma);
CUCtx cuCtxChroma( qps[CH_C] );
partitioner->initCtu( area, CH_C, *cs.slice );
isLast = coding_tree( cs, *partitioner, cuCtxChroma );
qps[CH_C] = cuCtxChroma.qp;
}
#if JVET_K0230_DUAL_CODING_TREE_UNDER_64x64_BLOCK
......@@ -1383,6 +1382,7 @@ void CABACReader::imv_mode( CodingUnit& cu, MergeCtx& mrgCtx )
void CABACReader::pred_mode( CodingUnit& cu )
{
RExt__DECODER_DEBUG_BIT_STATISTICS_CREATE_SET( STATS__CABAC_BITS__PRED_MODE );
if( cu.cs->slice->isIntra() || m_BinDecoder.decodeBin( Ctx::PredMode() ) )
{
cu.predMode = MODE_INTRA;
......
......@@ -45,7 +45,6 @@
#include <stdio.h>
#include <memory.h>
#include <assert.h>
#include <cinttypes>
#include "CommonLib/CommonDef.h"
#include "CommonLib/ChromaFormat.h"
#include "math.h"
......@@ -182,10 +181,11 @@ public:
PSNRyuv = (MSEyuv == 0) ? 999.99 : 10.0 * log10((maxval * maxval) / MSEyuv);
}
#if ENABLE_QPA || WCG_WPSNR
void printOut(char cDelim, const ChromaFormat chFmt, const bool printMSEBasedSNR, const bool printSequenceMSE, const BitDepths &bitDepths, const bool useWPSNR = false)
void printOut ( char cDelim, const ChromaFormat chFmt, const bool printMSEBasedSNR, const bool printSequenceMSE, const BitDepths &bitDepths, const bool useWPSNR = false )
#else
void printOut(char cDelim, const ChromaFormat chFmt, const bool printMSEBasedSNR, const bool printSequenceMSE, const BitDepths &bitDepths)
void printOut ( char cDelim, const ChromaFormat chFmt, const bool printMSEBasedSNR, const bool printSequenceMSE, const BitDepths &bitDepths )
#endif
{
#if !WCG_WPSNR
......@@ -234,7 +234,6 @@ public:
#endif
msg( e_msg_level, " \tTotal Frames | " "Bitrate " "Y-PSNR" );
if (printSequenceMSE)
{
msg( e_msg_level, " Y-MSE\n" );
......@@ -253,7 +252,6 @@ public:
#endif
getPsnr(COMPONENT_Y) / (double)getNumPic() );
if (printSequenceMSE)
{
msg( e_msg_level, " %8.4lf\n", m_MSEyuvframe[COMPONENT_Y] / (double)getNumPic() );
......@@ -277,7 +275,6 @@ public:
#endif
msg( e_msg_level, "\tTotal Frames | " "Bitrate " "Y-PSNR" );
if (printSequenceMSE)
{
msg( e_msg_level, " Y-MSE\n" );
......@@ -296,7 +293,6 @@ public:
#endif
getPsnr(COMPONENT_Y) / (double)getNumPic() );
if (printSequenceMSE)
{
msg( e_msg_level, " %8.4lf\n", m_MSEyuvframe[COMPONENT_Y] / (double)getNumPic() );
......@@ -325,7 +321,6 @@ public:
#endif
msg( e_msg_level, " \tTotal Frames | " "Bitrate " "Y-PSNR " "U-PSNR " "V-PSNR " "YUV-PSNR " );
if (printSequenceMSE)
{
msg( e_msg_level, " Y-MSE " "U-MSE " "V-MSE " "YUV-MSE \n" );
......@@ -353,7 +348,6 @@ public:
getPsnr(COMPONENT_Cr) / (double)getNumPic(),
PSNRyuv );
if (printSequenceMSE)
{
msg( e_msg_level, " %8.4lf " "%8.4lf " "%8.4lf " "%8.4lf\n",
......@@ -387,7 +381,6 @@ public:
m_ext360.printHeader(e_msg_level);
#endif
if (printSequenceMSE)
{
msg( e_msg_level, " Y-MSE " "U-MSE " "V-MSE " "YUV-MSE \n" );
......@@ -415,7 +408,6 @@ public:
getPsnr(COMPONENT_Cr) / (double)getNumPic(),
PSNRyuv );
#if EXTENSION_360_VIDEO
m_ext360.printPSNRs(getNumPic(), e_msg_level);
#endif
......
This diff is collapsed.
......@@ -269,7 +269,7 @@ public:
int& iNumEncoded, bool isTff );
void printSummary(bool isField) { m_cGOPEncoder.printOutSummary(m_uiNumAllPicCoded, isField, m_printMSEBasedSequencePSNR, m_printSequenceMSE, m_spsMap.getFirstPS()->getBitDepths()); }
void printSummary(bool isField) { m_cGOPEncoder.printOutSummary (m_uiNumAllPicCoded, isField, m_printMSEBasedSequencePSNR, m_printSequenceMSE, m_spsMap.getFirstPS()->getBitDepths()); }
};
......
......@@ -1291,10 +1291,6 @@ void InterSearch::xIntraBlockCopyEstimation(PredictionUnit& pu, PelUnitBuf& orig
Distortion &ruiCost, const int localSearchRangeX, const int localSearchRangeY
)
{
#if ENABLE_ENCODING_STAT
g_encoderStat->startTimer(EncodingTimeStat_IbcMe);
#endif
bool buffered = false;
if (m_pcEncCfg->getIBCFastMethod() & IBC_FAST_METHOD_BUFFERBV)
{
......@@ -1372,9 +1368,6 @@ void InterSearch::xIntraBlockCopyEstimation(PredictionUnit& pu, PelUnitBuf& orig
xIntraPatternSearch(pu, cStruct, rcMv, ruiCost, &cMvSrchRngLT, &cMvSrchRngRB, pcMvPred);
}
#if ENABLE_ENCODING_STAT
g_encoderStat->stopTimer(EncodingTimeStat_IbcMe);
#endif
}
// based on xSetSearchRange
......@@ -1442,7 +1435,6 @@ bool InterSearch::predIntraBCSearch(CodingUnit& cu, Partitioner& partitioner, co
if (m_pcEncCfg->getIBCHashSearch())
{
// TODO: when hash search finds BV the cost is actually set to zero, which may not be good
xxIntraBlockCopyHashSearch(pu, cMvPred, iBvpNum, cMv, bvpIdxBest, ibcHashMap);
}
......@@ -1544,9 +1536,6 @@ bool InterSearch::predIntraBCSearch(CodingUnit& cu, Partitioner& partitioner, co
void InterSearch::xxIntraBlockCopyHashSearch(PredictionUnit& pu, Mv* mvPred, int numMvPred, Mv &mv, int& idxMvPred, IbcHashMap& ibcHashMap)
{
#if ENABLE_ENCODING_STAT
g_encoderStat->startTimer(EncodingTimeStat_IbcHashSearch);
#endif
mv.setZero();
m_pcRdCost->setCostScale(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment