[x265-commits] [x265] dpb: remove commented code
Steve Borho
steve at borho.org
Thu Mar 6 08:14:03 CET 2014
details: http://hg.videolan.org/x265/rev/1b8ebfd190a4
branches:
changeset: 6404:1b8ebfd190a4
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 22:12:01 2014 -0600
description:
dpb: remove commented code
Subject: [x265] TComSlice: remove unused checkCRA function
details: http://hg.videolan.org/x265/rev/f1f5303613fc
branches:
changeset: 6405:f1f5303613fc
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 22:46:17 2014 -0600
description:
TComSlice: remove unused checkCRA function
Subject: [x265] TComSlice: remove unused checkNumPocTotalCurr argument to setRefPicList()
details: http://hg.videolan.org/x265/rev/a35934b41412
branches:
changeset: 6406:a35934b41412
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 23:15:24 2014 -0600
description:
TComSlice: remove unused checkNumPocTotalCurr argument to setRefPicList()
Subject: [x265] TComSlice: replace magic numbers with appropriate macro
details: http://hg.videolan.org/x265/rev/a1d82df4d45e
branches:
changeset: 6407:a1d82df4d45e
user: Steve Borho <steve at borho.org>
date: Wed Mar 05 23:49:04 2014 -0600
description:
TComSlice: replace magic numbers with appropriate macro
Subject: [x265] clarify valid values for --vbv-init
details: http://hg.videolan.org/x265/rev/889edfd2c4c3
branches:
changeset: 6408:889edfd2c4c3
user: Steve Borho <steve at borho.org>
date: Thu Mar 06 00:00:42 2014 -0600
description:
clarify valid values for --vbv-init
diffstat:
source/Lib/TLibCommon/TComSlice.cpp | 93 ++++--------------------------------
source/Lib/TLibCommon/TComSlice.h | 4 +-
source/common/param.cpp | 4 +-
source/encoder/dpb.cpp | 7 --
source/x265.cpp | 2 +-
5 files changed, 15 insertions(+), 95 deletions(-)
diffs (187 lines):
diff -r ba92d0695116 -r 889edfd2c4c3 source/Lib/TLibCommon/TComSlice.cpp
--- a/source/Lib/TLibCommon/TComSlice.cpp Wed Mar 05 21:32:47 2014 -0600
+++ b/source/Lib/TLibCommon/TComSlice.cpp Thu Mar 06 00:00:42 2014 -0600
@@ -215,26 +215,23 @@ void TComSlice::setRefPOCList()
}
}
-void TComSlice::setRefPicList(PicList& picList, bool checkNumPocTotalCurr)
+void TComSlice::setRefPicList(PicList& picList)
{
- if (!checkNumPocTotalCurr)
+ if (m_sliceType == I_SLICE)
{
- if (m_sliceType == I_SLICE)
- {
- ::memset(m_refPicList, 0, sizeof(m_refPicList));
- ::memset(m_numRefIdx, 0, sizeof(m_numRefIdx));
+ ::memset(m_refPicList, 0, sizeof(m_refPicList));
+ ::memset(m_numRefIdx, 0, sizeof(m_numRefIdx));
- return;
- }
-
- m_numRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0);
- m_numRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1);
+ return;
}
+ m_numRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0);
+ m_numRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1);
+
TComPic* refPic = NULL;
- TComPic* refPicSetStCurr0[16];
- TComPic* refPicSetStCurr1[16];
- TComPic* refPicSetLtCurr[16];
+ TComPic* refPicSetStCurr0[MAX_NUM_REF];
+ TComPic* refPicSetStCurr1[MAX_NUM_REF];
+ TComPic* refPicSetLtCurr[MAX_NUM_REF];
uint32_t numPocStCurr0 = 0;
uint32_t numPocStCurr1 = 0;
uint32_t numPocLtCurr = 0;
@@ -285,30 +282,6 @@ void TComSlice::setRefPicList(PicList& p
TComPic* rpsCurrList0[MAX_NUM_REF + 1];
TComPic* rpsCurrList1[MAX_NUM_REF + 1];
int numPocTotalCurr = numPocStCurr0 + numPocStCurr1 + numPocLtCurr;
- if (checkNumPocTotalCurr)
- {
- // The variable NumPocTotalCurr is derived as specified in subclause 7.4.7.2. It is a requirement of bitstream conformance
- // that the following applies to the value of NumPocTotalCurr:
- // - If the current picture is a BLA or CRA picture, the value of NumPocTotalCurr shall be equal to 0.
- // - Otherwise, when the current picture contains a P or B slice, the value of NumPocTotalCurr shall not be equal to 0.
- if (getRapPicFlag())
- {
- assert(numPocTotalCurr == 0);
- }
-
- if (m_sliceType == I_SLICE)
- {
- ::memset(m_refPicList, 0, sizeof(m_refPicList));
- ::memset(m_numRefIdx, 0, sizeof(m_numRefIdx));
-
- return;
- }
-
- assert(numPocTotalCurr >= 0);
-
- m_numRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0);
- m_numRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1);
- }
int cIdx = 0;
for (i = 0; i < numPocStCurr0; i++, cIdx++)
@@ -395,50 +368,6 @@ int TComSlice::getNumRpsCurrTempList()
return numRpsCurrTempList;
}
-void TComSlice::checkCRA(TComReferencePictureSet *rps, int& pocCRA, bool& prevRAPisBLA)
-{
- for (int i = 0; i < rps->getNumberOfNegativePictures() + rps->getNumberOfPositivePictures(); i++)
- {
- if (pocCRA < MAX_UINT && getPOC() > pocCRA)
- {
- assert(getPOC() + rps->getDeltaPOC(i) >= pocCRA);
- }
- }
-
- for (int i = rps->getNumberOfNegativePictures() + rps->getNumberOfPositivePictures(); i < rps->getNumberOfPictures(); i++)
- {
- if (pocCRA < MAX_UINT && getPOC() > pocCRA)
- {
- if (!rps->getCheckLTMSBPresent(i))
- {
- //assert(xGetLongTermRefPic(picList, rps->getPOC(i), false)->getPOC() >= pocCRA);
- }
- else
- {
- assert(rps->getPOC(i) >= pocCRA);
- }
- }
- }
-
- if (getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP) // IDR picture found
- {
- pocCRA = getPOC();
- prevRAPisBLA = false;
- }
- else if (getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA) // CRA picture found
- {
- pocCRA = getPOC();
- prevRAPisBLA = false;
- }
- else if (getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
- || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
- || getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_N_LP) // BLA picture found
- {
- pocCRA = getPOC();
- prevRAPisBLA = true;
- }
-}
-
/** get WP tables for weighted pred
* \param int
* \param refIdx
diff -r ba92d0695116 -r 889edfd2c4c3 source/Lib/TLibCommon/TComSlice.h
--- a/source/Lib/TLibCommon/TComSlice.h Wed Mar 05 21:32:47 2014 -0600
+++ b/source/Lib/TLibCommon/TComSlice.h Thu Mar 06 00:00:42 2014 -0600
@@ -1466,8 +1466,6 @@ public:
bool isIRAP() const { return (getNalUnitType() >= 16) && (getNalUnitType() <= 23); }
- void checkCRA(TComReferencePictureSet *rps, int& pocCRA, bool& prevRAPisBLA);
-
void setSliceType(SliceType e) { m_sliceType = e; }
void setSliceQp(int i) { m_sliceQp = i; }
@@ -1494,7 +1492,7 @@ public:
void setPic(TComPic* p) { m_pic = p; }
- void setRefPicList(PicList& picList, bool checkNumPocTotalCurr = false);
+ void setRefPicList(PicList& picList);
void setRefPOCList();
diff -r ba92d0695116 -r 889edfd2c4c3 source/common/param.cpp
--- a/source/common/param.cpp Wed Mar 05 21:32:47 2014 -0600
+++ b/source/common/param.cpp Thu Mar 06 00:00:42 2014 -0600
@@ -1033,8 +1033,8 @@ int x265_check_params(x265_param *param)
"Size of the vbv buffer can not be less than zero");
CHECK(param->rc.vbvMaxBitrate < 0,
"Maximum local bit rate can not be less than zero");
- CHECK(param->rc.vbvBufferInit < 0 || param->rc.vbvBufferInit > 1,
- "Valid VBV buffer occpancy range 0 - 1");
+ CHECK(param->rc.vbvBufferInit < 0,
+ "Valid initial VBV buffer occpancy must be a fraction 0 - 1, or size in kbits");
CHECK(param->rc.bitrate < 0,
"Target bitrate can not be less than zero");
CHECK(param->bFrameBias < 0, "Bias towards B frame decisions must be 0 or greater");
diff -r ba92d0695116 -r 889edfd2c4c3 source/encoder/dpb.cpp
--- a/source/encoder/dpb.cpp Wed Mar 05 21:32:47 2014 -0600
+++ b/source/encoder/dpb.cpp Thu Mar 06 00:00:42 2014 -0600
@@ -357,13 +357,6 @@ void DPB::applyReferencePictureSet(TComR
outPic->setUsedByCurr(0);
outPic->setIsLongTerm(0);
}
- // TODO: Do we require this check here
- // check that pictures of higher or equal temporal layer are not in the RPS if the current picture is a TSA picture
-
- /*if (this->getNalUnitType() == NAL_UNIT_CODED_SLICE_TLA_R || this->getNalUnitType() == NAL_UNIT_CODED_SLICE_TSA_N)
- {
- assert(outPic->getSlice()->isReferenced() == 0);
- }*/
}
}
diff -r ba92d0695116 -r 889edfd2c4c3 source/x265.cpp
--- a/source/x265.cpp Wed Mar 05 21:32:47 2014 -0600
+++ b/source/x265.cpp Thu Mar 06 00:00:42 2014 -0600
@@ -361,7 +361,7 @@ void CLIOptions::showHelp(x265_param *pa
H0(" May cause VBV underflows!\n");
H0(" --vbv-maxrate <integer> Max local bitrate (kbit/s). Default %d\n", param->rc.vbvMaxBitrate);
H0(" --vbv-bufsize <integer> Set size of the VBV buffer (kbit). Default %d\n", param->rc.vbvBufferSize);
- H0(" --vbv-init <float> Initial VBV buffer occupancy. Default %f\n", param->rc.vbvBufferInit);
+ H0(" --vbv-init <float> Initial VBV buffer occupancy (fraction of bufsize or in kbits). Default %f\n", param->rc.vbvBufferInit);
H0("-q/--qp <integer> Base QP for CQP mode. Default %d\n", param->rc.qp);
H0(" --aq-mode <integer> Mode for Adaptive Quantization - 0:none 1:uniform AQ 2:auto variance. Default %d\n", param->rc.aqMode);
H0(" --aq-strength <float> Reduces blocking and blurring in flat and textured areas.(0 to 3.0). Default %f\n", param->rc.aqStrength);
More information about the x265-commits
mailing list