[x265] [PATCH] tcomtrquant:remove unused methods
Gopu Govindaswamy
gopu at multicorewareinc.com
Thu Oct 10 08:59:51 CEST 2013
# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1381388381 -19800
# Node ID 9057b379051036554820697722d6849d52fd57e4
# Parent dc733384852a48e15ef3be9f9dccdefbe6d87f0e
tcomtrquant:remove unused methods
diff -r dc733384852a -r 9057b3790510 source/Lib/TLibCommon/TComTrQuant.cpp
--- a/source/Lib/TLibCommon/TComTrQuant.cpp Thu Oct 10 12:10:36 2013 +0530
+++ b/source/Lib/TLibCommon/TComTrQuant.cpp Thu Oct 10 12:29:41 2013 +0530
@@ -328,63 +328,6 @@
return acSum;
}
-void TComTrQuant::xDeQuant(const TCoeff* qCoef, int* coef, int width, int height, int scalingListType)
-{
- if (width > (int)m_maxTrSize)
- {
- width = m_maxTrSize;
- height = m_maxTrSize;
- }
-
- int shift, add, coeffQ;
- UInt log2TrSize = g_convertToBit[width] + 2;
-
- int transformShift = MAX_TR_DYNAMIC_RANGE - X265_DEPTH - log2TrSize;
-
- shift = QUANT_IQUANT_SHIFT - QUANT_SHIFT - transformShift;
-
- TCoeff clipQCoef;
-
- if (getUseScalingList())
- {
- shift += 4;
- int *dequantCoef = getDequantCoeff(scalingListType, m_qpParam.m_rem, log2TrSize - 2);
-
- if (shift > m_qpParam.m_per)
- {
- add = 1 << (shift - m_qpParam.m_per - 1);
-
- for (int n = 0; n < width * height; n++)
- {
- clipQCoef = Clip3(-32768, 32767, qCoef[n]);
- coeffQ = ((clipQCoef * dequantCoef[n]) + add) >> (shift - m_qpParam.m_per);
- coef[n] = Clip3(-32768, 32767, coeffQ);
- }
- }
- else
- {
- for (int n = 0; n < width * height; n++)
- {
- clipQCoef = Clip3(-32768, 32767, qCoef[n]);
- coeffQ = Clip3(-32768, 32767, clipQCoef * dequantCoef[n]); // Clip to avoid possible overflow in following shift left operation
- coef[n] = Clip3(-32768, 32767, coeffQ << (m_qpParam.m_per - shift));
- }
- }
- }
- else
- {
- add = 1 << (shift - 1);
- int scale = g_invQuantScales[m_qpParam.m_rem] << m_qpParam.m_per;
-
- for (int n = 0; n < width * height; n++)
- {
- clipQCoef = Clip3(-32768, 32767, qCoef[n]);
- coeffQ = (clipQCoef * scale + add) >> shift;
- coef[n] = Clip3(-32768, 32767, coeffQ);
- }
- }
-}
-
void TComTrQuant::init(UInt maxTrSize, int useRDOQ, int useRDOQTS, int useTransformSkipFast)
{
m_maxTrSize = maxTrSize;
@@ -499,20 +442,6 @@
// Logical transform
// ------------------------------------------------------------------------------------------------
-/** Wrapper function between HM interface and core NxN inverse transform (2D)
- * \param plCoef input data (transform coefficients)
- * \param pResidual output data (residual)
- * \param stride stride of input residual data
- * \param size transform size (size x size)
- * \param mode is Intra Prediction mode used in Mode-Dependent DCT/DST only
- */
-void TComTrQuant::xIT(UInt mode, int* coeff, short* residual, UInt stride, int width, int /*height*/)
-{
- // TODO: this may need larger data types for X265_DEPTH > 8
- const UInt log2BlockSize = g_convertToBit[width];
- primitives.idct[IDCT_4x4 + log2BlockSize - ((width == 4) && (mode != REG_DCT))](coeff, residual, stride);
-}
-
/** Wrapper function between HM interface and core 4x4 transform skipping
* \param resiBlock input data (residual)
* \param psCoeff output data (transform coefficients)
@@ -1439,26 +1368,6 @@
}
}
-/** set quantized matrix coefficient for decode
- * \param scalingList quantized matrix address
- */
-void TComTrQuant::setScalingListDec(TComScalingList *scalingList)
-{
- UInt size, list;
- UInt qp;
-
- for (size = 0; size < SCALING_LIST_SIZE_NUM; size++)
- {
- for (list = 0; list < g_scalingListNum[size]; list++)
- {
- for (qp = 0; qp < SCALING_LIST_REM_NUM; qp++)
- {
- xSetScalingListDec(scalingList, list, size, qp);
- }
- }
- }
-}
-
/** set error scale coefficients
* \param list List ID
* \param uiSize Size
diff -r dc733384852a -r 9057b3790510 source/Lib/TLibCommon/TComTrQuant.h
--- a/source/Lib/TLibCommon/TComTrQuant.h Thu Oct 10 12:10:36 2013 +0530
+++ b/source/Lib/TLibCommon/TComTrQuant.h Thu Oct 10 12:29:41 2013 +0530
@@ -157,7 +157,6 @@
void xSetScalingListEnc(TComScalingList *scalingList, UInt list, UInt size, UInt qp);
void xSetScalingListDec(TComScalingList *scalingList, UInt list, UInt size, UInt qp);
void setScalingList(TComScalingList *scalingList);
- void setScalingListDec(TComScalingList *scalingList);
void processScalingListEnc(int *coeff, int *quantcoeff, int quantScales, UInt height, UInt width, UInt ratio, int sizuNum, UInt dc);
void processScalingListDec(int *coeff, int *dequantcoeff, int invQuantScales, UInt height, UInt width, UInt ratio, int sizuNum, UInt dc);
@@ -218,10 +217,6 @@
inline double xGetIEPRate() const { return 32768; } ///< Get the cost of an equal probable bit
- void xDeQuant(const TCoeff* src, int* dst, int width, int height, int scalingListType);
-
- void xIT(UInt mode, int* coeff, short* residual, UInt stride, int width, int height);
-
void xITransformSkip(int* coeff, short* residual, UInt stride, int width, int height);
};
}
More information about the x265-devel
mailing list