[x265-commits] [x265] param: show options using their CLI / param_parse names
Steve Borho
steve at borho.org
Mon Nov 3 19:59:51 CET 2014
details: http://hg.videolan.org/x265/rev/c32a733a819b
branches:
changeset: 8772:c32a733a819b
user: Steve Borho <steve at borho.org>
date: Fri Oct 31 16:25:14 2014 -0500
description:
param: show options using their CLI / param_parse names
Subject: [x265] encoder: make it clear that --fast-cbf is innefective at lower rd levels
details: http://hg.videolan.org/x265/rev/eebb372eec89
branches:
changeset: 8773:eebb372eec89
user: Steve Borho <steve at borho.org>
date: Fri Oct 31 16:29:20 2014 -0500
description:
encoder: make it clear that --fast-cbf is innefective at lower rd levels
This begs the question of whether the feature should exist, or whether it
should be added to the lower RD levels
Subject: [x265] cleanup CUData::m_skipFlag
details: http://hg.videolan.org/x265/rev/2e60f3b81981
branches:
changeset: 8774:2e60f3b81981
user: Satoshi Nakagawa <nakagawa424 at oki.com>
date: Mon Nov 03 17:02:14 2014 +0900
description:
cleanup CUData::m_skipFlag
Subject: [x265] asm: fix typo error in interp_8tap_vert_pp_4x4_avx2
details: http://hg.videolan.org/x265/rev/ee88b63aced0
branches:
changeset: 8775:ee88b63aced0
user: Min Chen <chenm003 at 163.com>
date: Mon Nov 03 09:29:41 2014 -0800
description:
asm: fix typo error in interp_8tap_vert_pp_4x4_avx2
Subject: [x265] cleanup: remove unused asm calcrecon
details: http://hg.videolan.org/x265/rev/5637b495e2e1
branches:
changeset: 8776:5637b495e2e1
user: Min Chen <chenm003 at 163.com>
date: Mon Nov 03 12:43:26 2014 -0800
description:
cleanup: remove unused asm calcrecon
diffstat:
source/common/cudata.cpp | 53 +--
source/common/cudata.h | 16 +-
source/common/param.cpp | 4 +-
source/common/primitives.h | 1 -
source/common/quant.cpp | 2 +-
source/common/x86/ipfilter8.asm | 2 +-
source/common/x86/pixel-util.h | 7 -
source/common/x86/pixel-util8.asm | 441 --------------------------------------
source/encoder/analysis.cpp | 26 +-
source/encoder/encoder.cpp | 6 +
source/encoder/entropy.cpp | 25 +-
source/encoder/frameencoder.cpp | 4 +-
source/encoder/search.cpp | 6 +-
13 files changed, 69 insertions(+), 524 deletions(-)
diffs (truncated from 1032 to 300 lines):
diff -r 75cb2ab1ecec -r 5637b495e2e1 source/common/cudata.cpp
--- a/source/common/cudata.cpp Thu Oct 30 18:13:27 2014 -0500
+++ b/source/common/cudata.cpp Mon Nov 03 12:43:26 2014 -0800
@@ -230,13 +230,12 @@ void CUData::initialize(const CUDataMemP
m_qp = (char*)charBuf; charBuf += m_numPartitions;
m_log2CUSize = charBuf; charBuf += m_numPartitions;
m_partSize = charBuf; charBuf += m_numPartitions;
- m_predMode = charBuf; charBuf += m_numPartitions;
m_lumaIntraDir = charBuf; charBuf += m_numPartitions;
m_tqBypass = charBuf; charBuf += m_numPartitions;
m_refIdx[0] = (char*)charBuf; charBuf += m_numPartitions;
m_refIdx[1] = (char*)charBuf; charBuf += m_numPartitions;
m_cuDepth = charBuf; charBuf += m_numPartitions;
- m_skipFlag = charBuf; charBuf += m_numPartitions; /* the order up to here is important in initCTU() and initSubCU() */
+ m_predMode = charBuf; charBuf += m_numPartitions; /* the order up to here is important in initCTU() and initSubCU() */
m_mergeFlag = charBuf; charBuf += m_numPartitions;
m_interDir = charBuf; charBuf += m_numPartitions;
m_mvpIdx[0] = charBuf; charBuf += m_numPartitions;
@@ -279,7 +278,6 @@ void CUData::initCTU(const Frame& frame,
m_partSet((uint8_t*)m_qp, (uint8_t)qp);
m_partSet(m_log2CUSize, (uint8_t)g_maxLog2CUSize);
m_partSet(m_partSize, (uint8_t)SIZE_NONE);
- m_partSet(m_predMode, (uint8_t)MODE_NONE);
m_partSet(m_lumaIntraDir, (uint8_t)DC_IDX);
m_partSet(m_tqBypass, (uint8_t)frame.m_encData->m_param->bLossless);
if (m_slice->m_sliceType != I_SLICE)
@@ -291,7 +289,7 @@ void CUData::initCTU(const Frame& frame,
X265_CHECK(!(frame.m_encData->m_param->bLossless && !m_slice->m_pps->bTransquantBypassEnabled), "lossless enabled without TQbypass in PPS\n");
/* initialize the remaining CU data in one memset */
- memset(m_cuDepth, 0, (BytesPerPartition - 8) * m_numPartitions);
+ memset(m_cuDepth, 0, (BytesPerPartition - 7) * m_numPartitions);
uint32_t widthInCU = m_slice->m_sps->numCuInWidth;
m_cuLeft = (m_cuAddr % widthInCU) ? m_encData->getPicCTU(m_cuAddr - 1) : NULL;
@@ -319,7 +317,6 @@ void CUData::initSubCU(const CUData& ctu
m_partSet((uint8_t*)m_qp, (uint8_t)ctu.m_qp[0]);
m_partSet(m_log2CUSize, (uint8_t)cuGeom.log2CUSize);
m_partSet(m_partSize, (uint8_t)SIZE_NONE);
- m_partSet(m_predMode, (uint8_t)MODE_NONE);
m_partSet(m_lumaIntraDir, (uint8_t)DC_IDX);
m_partSet(m_tqBypass, (uint8_t)m_encData->m_param->bLossless);
m_partSet((uint8_t*)m_refIdx[0], (uint8_t)REF_NOT_VALID);
@@ -327,7 +324,7 @@ void CUData::initSubCU(const CUData& ctu
m_partSet(m_cuDepth, (uint8_t)cuGeom.depth);
/* initialize the remaining CU data in one memset */
- memset(m_skipFlag, 0, (BytesPerPartition - 9) * m_numPartitions);
+ memset(m_predMode, 0, (BytesPerPartition - 8) * m_numPartitions);
}
/* Copy the results of a sub-part (split) CU to the parent CU */
@@ -340,13 +337,12 @@ void CUData::copyPartFrom(const CUData&
m_subPartCopy((uint8_t*)m_qp + offset, (uint8_t*)subCU.m_qp);
m_subPartCopy(m_log2CUSize + offset, subCU.m_log2CUSize);
m_subPartCopy(m_partSize + offset, subCU.m_partSize);
- m_subPartCopy(m_predMode + offset, subCU.m_predMode);
m_subPartCopy(m_lumaIntraDir + offset, subCU.m_lumaIntraDir);
m_subPartCopy(m_tqBypass + offset, subCU.m_tqBypass);
m_subPartCopy((uint8_t*)m_refIdx[0] + offset, (uint8_t*)subCU.m_refIdx[0]);
m_subPartCopy((uint8_t*)m_refIdx[1] + offset, (uint8_t*)subCU.m_refIdx[1]);
m_subPartCopy(m_cuDepth + offset, subCU.m_cuDepth);
- m_subPartCopy(m_skipFlag + offset, subCU.m_skipFlag);
+ m_subPartCopy(m_predMode + offset, subCU.m_predMode);
m_subPartCopy(m_mergeFlag + offset, subCU.m_mergeFlag);
m_subPartCopy(m_interDir + offset, subCU.m_interDir);
m_subPartCopy(m_mvpIdx[0] + offset, subCU.m_mvpIdx[0]);
@@ -410,7 +406,7 @@ void CUData::initLosslessCU(const CUData
m_partSet(m_tqBypass, true);
/* clear residual coding flags */
- m_partSet(m_skipFlag, 0);
+ m_partSet(m_predMode, cu.m_predMode[0] & (MODE_INTRA | MODE_INTER));
m_partSet(m_tuDepth, 0);
m_partSet(m_transformSkip[0], 0);
m_partSet(m_transformSkip[1], 0);
@@ -428,13 +424,12 @@ void CUData::copyToPic(uint32_t depth) c
m_partCopy((uint8_t*)ctu.m_qp + m_absIdxInCTU, (uint8_t*)m_qp);
m_partCopy(ctu.m_log2CUSize + m_absIdxInCTU, m_log2CUSize);
m_partCopy(ctu.m_partSize + m_absIdxInCTU, m_partSize);
- m_partCopy(ctu.m_predMode + m_absIdxInCTU, m_predMode);
m_partCopy(ctu.m_lumaIntraDir + m_absIdxInCTU, m_lumaIntraDir);
m_partCopy(ctu.m_tqBypass + m_absIdxInCTU, m_tqBypass);
m_partCopy((uint8_t*)ctu.m_refIdx[0] + m_absIdxInCTU, (uint8_t*)m_refIdx[0]);
m_partCopy((uint8_t*)ctu.m_refIdx[1] + m_absIdxInCTU, (uint8_t*)m_refIdx[1]);
m_partCopy(ctu.m_cuDepth + m_absIdxInCTU, m_cuDepth);
- m_partCopy(ctu.m_skipFlag + m_absIdxInCTU, m_skipFlag);
+ m_partCopy(ctu.m_predMode + m_absIdxInCTU, m_predMode);
m_partCopy(ctu.m_mergeFlag + m_absIdxInCTU, m_mergeFlag);
m_partCopy(ctu.m_interDir + m_absIdxInCTU, m_interDir);
m_partCopy(ctu.m_mvpIdx[0] + m_absIdxInCTU, m_mvpIdx[0]);
@@ -478,7 +473,6 @@ void CUData::copyFromPic(const CUData& c
m_partCopy((uint8_t*)m_qp, (uint8_t*)ctu.m_qp + m_absIdxInCTU);
m_partCopy(m_log2CUSize, ctu.m_log2CUSize + m_absIdxInCTU);
m_partCopy(m_partSize, ctu.m_partSize + m_absIdxInCTU);
- m_partCopy(m_predMode, ctu.m_predMode + m_absIdxInCTU);
m_partCopy(m_lumaIntraDir, ctu.m_lumaIntraDir + m_absIdxInCTU);
m_partCopy(m_tqBypass, ctu.m_tqBypass + m_absIdxInCTU);
m_partCopy((uint8_t*)m_refIdx[0], (uint8_t*)ctu.m_refIdx[0] + m_absIdxInCTU);
@@ -496,7 +490,7 @@ void CUData::copyFromPic(const CUData& c
memcpy(m_mvd[1], ctu.m_mvd[1] + m_absIdxInCTU, m_numPartitions * sizeof(MV));
/* clear residual coding flags */
- m_partSet(m_skipFlag, 0);
+ m_partSet(m_predMode, ctu.m_predMode[m_absIdxInCTU] & (MODE_INTRA | MODE_INTER));
m_partSet(m_tuDepth, 0);
m_partSet(m_transformSkip[0], 0);
m_partSet(m_transformSkip[1], 0);
@@ -515,7 +509,7 @@ void CUData::updatePic(uint32_t depth) c
m_partCopy(ctu.m_transformSkip[0] + m_absIdxInCTU, m_transformSkip[0]);
m_partCopy(ctu.m_transformSkip[1] + m_absIdxInCTU, m_transformSkip[1]);
m_partCopy(ctu.m_transformSkip[2] + m_absIdxInCTU, m_transformSkip[2]);
- m_partCopy(ctu.m_skipFlag + m_absIdxInCTU, m_skipFlag);
+ m_partCopy(ctu.m_predMode + m_absIdxInCTU, m_predMode);
m_partCopy(ctu.m_tuDepth + m_absIdxInCTU, m_tuDepth);
m_partCopy(ctu.m_cbf[0] + m_absIdxInCTU, m_cbf[0]);
m_partCopy(ctu.m_cbf[1] + m_absIdxInCTU, m_cbf[1]);
@@ -1441,7 +1435,7 @@ uint32_t CUData::getInterMergeCandidates
bool isAvailableA1 = cuLeft &&
cuLeft->isDiffMER(xP - 1, yP + nPSH - 1, xP, yP) &&
!(puIdx == 1 && (curPS == SIZE_Nx2N || curPS == SIZE_nLx2N || curPS == SIZE_nRx2N)) &&
- !cuLeft->isIntra(leftPartIdx);
+ cuLeft->isInter(leftPartIdx);
if (isAvailableA1)
{
// get Inter Dir
@@ -1465,7 +1459,7 @@ uint32_t CUData::getInterMergeCandidates
bool isAvailableB1 = cuAbove &&
cuAbove->isDiffMER(xP + nPSW - 1, yP - 1, xP, yP) &&
!(puIdx == 1 && (curPS == SIZE_2NxN || curPS == SIZE_2NxnU || curPS == SIZE_2NxnD)) &&
- !cuAbove->isIntra(abovePartIdx);
+ cuAbove->isInter(abovePartIdx);
if (isAvailableB1 && (!isAvailableA1 || !cuLeft->hasEqualMotion(leftPartIdx, *cuAbove, abovePartIdx)))
{
// get Inter Dir
@@ -1486,7 +1480,7 @@ uint32_t CUData::getInterMergeCandidates
const CUData* cuAboveRight = getPUAboveRight(aboveRightPartIdx, partIdxRT);
bool isAvailableB0 = cuAboveRight &&
cuAboveRight->isDiffMER(xP + nPSW, yP - 1, xP, yP) &&
- !cuAboveRight->isIntra(aboveRightPartIdx);
+ cuAboveRight->isInter(aboveRightPartIdx);
if (isAvailableB0 && (!isAvailableB1 || !cuAbove->hasEqualMotion(abovePartIdx, *cuAboveRight, aboveRightPartIdx)))
{
// get Inter Dir
@@ -1507,7 +1501,7 @@ uint32_t CUData::getInterMergeCandidates
const CUData* cuLeftBottom = this->getPUBelowLeft(leftBottomPartIdx, partIdxLB);
bool isAvailableA0 = cuLeftBottom &&
cuLeftBottom->isDiffMER(xP - 1, yP + nPSH, xP, yP) &&
- !cuLeftBottom->isIntra(leftBottomPartIdx);
+ cuLeftBottom->isInter(leftBottomPartIdx);
if (isAvailableA0 && (!isAvailableA1 || !cuLeft->hasEqualMotion(leftPartIdx, *cuLeftBottom, leftBottomPartIdx)))
{
// get Inter Dir
@@ -1530,7 +1524,7 @@ uint32_t CUData::getInterMergeCandidates
const CUData* cuAboveLeft = getPUAboveLeft(aboveLeftPartIdx, absPartAddr);
bool isAvailableB2 = cuAboveLeft &&
cuAboveLeft->isDiffMER(xP - 1, yP - 1, xP, yP) &&
- !cuAboveLeft->isIntra(aboveLeftPartIdx);
+ cuAboveLeft->isInter(aboveLeftPartIdx);
if (isAvailableB2 && (!isAvailableA1 || !cuLeft->hasEqualMotion(leftPartIdx, *cuAboveLeft, aboveLeftPartIdx))
&& (!isAvailableB1 || !cuAbove->hasEqualMotion(abovePartIdx, *cuAboveLeft, aboveLeftPartIdx)))
{
@@ -1966,26 +1960,18 @@ bool CUData::addMVPCandOrder(MV& outMV,
bool CUData::getColMVP(MV& outMV, int& outRefIdx, int picList, int cuAddr, int partUnitIdx) const
{
- uint32_t absPartAddr = partUnitIdx & TMVP_UNIT_MASK;
-
- int colRefPicList;
- int colPOC, colRefPOC, curPOC, curRefPOC;
- MV colmv;
-
- // use coldir.
Frame *colPic = m_slice->m_refPicList[m_slice->isInterB() ? 1 - m_slice->m_colFromL0Flag : 0][m_slice->m_colRefIdx];
CUData *colCU = colPic->m_encData->getPicCTU(cuAddr);
if (colCU->m_partSize[partUnitIdx] == SIZE_NONE)
return false;
- curPOC = m_slice->m_poc;
- colPOC = colCU->m_slice->m_poc;
+ uint32_t absPartAddr = partUnitIdx & TMVP_UNIT_MASK;
if (colCU->isIntra(absPartAddr))
return false;
- colRefPicList = m_slice->m_bCheckLDC ? picList : m_slice->m_colFromL0Flag;
+ int colRefPicList = m_slice->m_bCheckLDC ? picList : m_slice->m_colFromL0Flag;
int colRefIdx = colCU->m_refIdx[colRefPicList][absPartAddr];
@@ -1999,9 +1985,12 @@ bool CUData::getColMVP(MV& outMV, int& o
}
// Scale the vector
- colRefPOC = colCU->m_slice->m_refPOCList[colRefPicList][colRefIdx];
- colmv = colCU->m_mv[colRefPicList][absPartAddr];
- curRefPOC = m_slice->m_refPOCList[picList][outRefIdx];
+ int colRefPOC = colCU->m_slice->m_refPOCList[colRefPicList][colRefIdx];
+ int colPOC = colCU->m_slice->m_poc;
+ MV colmv = colCU->m_mv[colRefPicList][absPartAddr];
+
+ int curRefPOC = m_slice->m_refPOCList[picList][outRefIdx];
+ int curPOC = m_slice->m_poc;
scaleMvByPOCDist(outMV, colmv, curPOC, curRefPOC, colPOC, colRefPOC);
return true;
diff -r 75cb2ab1ecec -r 5637b495e2e1 source/common/cudata.h
--- a/source/common/cudata.h Thu Oct 30 18:13:27 2014 -0500
+++ b/source/common/cudata.h Mon Nov 03 12:43:26 2014 -0800
@@ -51,9 +51,10 @@ enum PartSize
enum PredMode
{
- MODE_INTER,
- MODE_INTRA,
- MODE_NONE = 15
+ MODE_NONE = 0,
+ MODE_INTER = (1 << 0),
+ MODE_INTRA = (1 << 1),
+ MODE_SKIP = (1 << 2) | MODE_INTER
};
// motion vector predictor direction used in AMVP
@@ -129,12 +130,11 @@ public:
char* m_qp; // array of QP values
uint8_t* m_log2CUSize; // array of cu log2Size TODO: seems redundant to depth
uint8_t* m_partSize; // array of partition sizes
- uint8_t* m_predMode; // array of prediction modes
uint8_t* m_lumaIntraDir; // array of intra directions (luma)
uint8_t* m_tqBypass; // array of CU lossless flags
char* m_refIdx[2]; // array of motion reference indices per list
uint8_t* m_cuDepth; // array of depths
- uint8_t* m_skipFlag; // array of skip flags
+ uint8_t* m_predMode; // array of prediction modes
uint8_t* m_mergeFlag; // array of merge flags
uint8_t* m_interDir; // array of inter directions
uint8_t* m_mvpIdx[2]; // array of motion vector predictor candidates or merge candidate indices [0]
@@ -142,7 +142,7 @@ public:
uint8_t* m_transformSkip[3]; // array of transform skipping flags per plane
uint8_t* m_cbf[3]; // array of coded block flags (CBF) per plane
uint8_t* m_chromaIntraDir; // array of intra directions (chroma)
- enum { BytesPerPartition = 22 }; // combined sizeof() of all per-part data
+ enum { BytesPerPartition = 21 }; // combined sizeof() of all per-part data
coeff_t* m_trCoeff[3]; // transformed coefficient buffer per plane
@@ -173,7 +173,6 @@ public:
void updatePic(uint32_t depth) const;
void setPartSizeSubParts(PartSize size) { m_partSet(m_partSize, (uint8_t)size); }
- void setSkipFlagSubParts(uint8_t skipFlag) { m_partSet(m_skipFlag, skipFlag); }
void setPredModeSubParts(PredMode mode) { m_partSet(m_predMode, (uint8_t)mode); }
void clearCbf() { m_partSet(m_cbf[0], 0); m_partSet(m_cbf[1], 0); m_partSet(m_cbf[2], 0); }
@@ -204,7 +203,8 @@ public:
uint32_t getNumPartInter() const { return nbPartsTable[(int)m_partSize[0]]; }
bool isIntra(uint32_t absPartIdx) const { return m_predMode[absPartIdx] == MODE_INTRA; }
- bool isSkipped(uint32_t absPartIdx) const { return !!m_skipFlag[absPartIdx]; }
+ bool isInter(uint32_t absPartIdx) const { return !!(m_predMode[absPartIdx] & MODE_INTER); }
+ bool isSkipped(uint32_t absPartIdx) const { return m_predMode[absPartIdx] == MODE_SKIP; }
bool isBipredRestriction() const { return m_log2CUSize[0] == 3 && m_partSize[0] != SIZE_2Nx2N; }
void getPartIndexAndSize(uint32_t puIdx, uint32_t& absPartIdx, int& puWidth, int& puHeight) const;
diff -r 75cb2ab1ecec -r 5637b495e2e1 source/common/param.cpp
--- a/source/common/param.cpp Thu Oct 30 18:13:27 2014 -0500
+++ b/source/common/param.cpp Mon Nov 03 12:43:26 2014 -0800
@@ -1171,8 +1171,8 @@ void x265_print_params(x265_param *param
fprintf(stderr, "psy-rd=%.2lf ", param->psyRd);
if (param->psyRdoq > 0.)
fprintf(stderr, "psy-rdoq=%.2lf ", param->psyRdoq);
- TOOLOPT(param->bEnableEarlySkip, "esd");
- TOOLOPT(param->bEnableCbfFastMode, "cfm");
+ TOOLOPT(param->bEnableEarlySkip, "early-skip");
+ TOOLOPT(param->bEnableCbfFastMode, "fast-cbf");
if (param->noiseReduction)
fprintf(stderr, "nr=%d ", param->noiseReduction);
if (param->bEnableLoopFilter)
diff -r 75cb2ab1ecec -r 5637b495e2e1 source/common/primitives.h
--- a/source/common/primitives.h Thu Oct 30 18:13:27 2014 -0500
+++ b/source/common/primitives.h Mon Nov 03 12:43:26 2014 -0800
@@ -160,7 +160,6 @@ typedef void (*idct_t)(int32_t *src, int
typedef void (*denoiseDct_t)(int32_t* dctCoef, uint32_t* resSum, uint16_t* offset, int numCoeff);
typedef void (*calcresidual_t)(pixel *fenc, pixel *pred, int16_t *residual, intptr_t stride);
-typedef void (*calcrecon_t)(pixel* pred, int16_t* residual, int16_t* reconqt, pixel *reconipred, int stride, int strideqt, int strideipred);
typedef void (*transpose_t)(pixel* dst, pixel* src, intptr_t stride);
typedef uint32_t (*quant_t)(int32_t *coef, int32_t *quantCoeff, int32_t *deltaU, int16_t *qCoef, int qBits, int add, int numCoeff);
typedef uint32_t (*nquant_t)(int32_t *coef, int32_t *quantCoeff, int16_t *qCoef, int qBits, int add, int numCoeff);
diff -r 75cb2ab1ecec -r 5637b495e2e1 source/common/quant.cpp
--- a/source/common/quant.cpp Thu Oct 30 18:13:27 2014 -0500
+++ b/source/common/quant.cpp Mon Nov 03 12:43:26 2014 -0800
@@ -333,7 +333,6 @@ uint32_t Quant::transformNxN(CUData& cu,
bool isLuma = ttype == TEXT_LUMA;
bool usePsy = m_psyRdoqScale && isLuma && !useTransformSkip;
- bool isIntra = cu.m_predMode[absPartIdx] == MODE_INTRA;
int transformShift = MAX_TR_DYNAMIC_RANGE - X265_DEPTH - log2TrSize; // Represents scaling through forward transform
int trSize = 1 << log2TrSize;
More information about the x265-commits
mailing list