[x265-commits] [x265] search: fix binary mismatch and inconsistent crash for sh...
Gopu Govindaswamy
gopu at multicorewareinc.com
Tue Nov 18 21:16:44 CET 2014
details: http://hg.videolan.org/x265/rev/854fcbb50220
branches:
changeset: 8847:854fcbb50220
user: Gopu Govindaswamy <gopu at multicorewareinc.com>
date: Mon Nov 17 15:35:23 2014 +0530
description:
search: fix binary mismatch and inconsistent crash for share inter information
Subject: [x265] encoder: init filename to NULL
details: http://hg.videolan.org/x265/rev/2f0062f0791b
branches:
changeset: 8848:2f0062f0791b
user: Deepthi Nandakumar <deepthi at multicorewareinc.com>
date: Tue Nov 18 11:31:39 2014 +0530
description:
encoder: init filename to NULL
Subject: [x265] param: use strdup() on input strings uniformly
details: http://hg.videolan.org/x265/rev/ad532c30bc95
branches:
changeset: 8849:ad532c30bc95
user: Steve Borho <steve at borho.org>
date: Tue Nov 18 13:58:56 2014 -0600
description:
param: use strdup() on input strings uniformly
Subject: [x265] threading: copyright comment format nits
details: http://hg.videolan.org/x265/rev/a7b9b90e1bdd
branches:
changeset: 8850:a7b9b90e1bdd
user: Steve Borho <steve at borho.org>
date: Tue Nov 18 13:59:51 2014 -0600
description:
threading: copyright comment format nits
be consistent with our other files
Subject: [x265] threading: don't use this->
details: http://hg.videolan.org/x265/rev/3731d9bc7b88
branches:
changeset: 8851:3731d9bc7b88
user: Steve Borho <steve at borho.org>
date: Tue Nov 18 14:00:19 2014 -0600
description:
threading: don't use this->
We don't do this anywhere else
Subject: [x265] analysis: drop MATCH_NON_PMODE macro
details: http://hg.videolan.org/x265/rev/dc61091d5cc4
branches:
changeset: 8852:dc61091d5cc4
user: Steve Borho <steve at borho.org>
date: Tue Nov 18 14:01:47 2014 -0600
description:
analysis: drop MATCH_NON_PMODE macro
this was a debugging feature, it's not being tested which means it will get
broken and so it's best just to keep the code clean
Subject: [x265] frameencoder: white-space nits
details: http://hg.videolan.org/x265/rev/29a374b62920
branches:
changeset: 8853:29a374b62920
user: Steve Borho <steve at borho.org>
date: Tue Nov 18 14:02:00 2014 -0600
description:
frameencoder: white-space nits
Subject: [x265] api: fix range limit docs for RQT limit params
details: http://hg.videolan.org/x265/rev/d059cfa88f1a
branches:
changeset: 8854:d059cfa88f1a
user: Steve Borho <steve at borho.org>
date: Tue Nov 18 14:11:12 2014 -0600
description:
api: fix range limit docs for RQT limit params
diffstat:
source/common/common.h | 3 -
source/common/param.cpp | 8 ++--
source/common/threading.cpp | 24 ++++++-------
source/common/threading.h | 2 -
source/common/threadpool.cpp | 2 -
source/common/threadpool.h | 2 -
source/encoder/analysis.cpp | 68 ++++------------------------------------
source/encoder/encoder.cpp | 1 +
source/encoder/frameencoder.cpp | 2 +
source/encoder/search.cpp | 15 +++------
source/x265.h | 4 +-
11 files changed, 33 insertions(+), 98 deletions(-)
diffs (truncated from 370 to 300 lines):
diff -r 05d824463602 -r d059cfa88f1a source/common/common.h
--- a/source/common/common.h Mon Nov 17 16:38:52 2014 +0530
+++ b/source/common/common.h Tue Nov 18 14:11:12 2014 -0600
@@ -350,9 +350,6 @@ struct SAOParam
struct analysis_inter_data
{
int ref;
- int costZero;
- int16_t mvx;
- int16_t mvy;
};
/* Stores intra analysis data for a single frame. This struct needs better packing */
diff -r 05d824463602 -r d059cfa88f1a source/common/param.cpp
--- a/source/common/param.cpp Mon Nov 17 16:38:52 2014 +0530
+++ b/source/common/param.cpp Tue Nov 18 14:11:12 2014 -0600
@@ -546,9 +546,6 @@ int x265_param_parse(x265_param *p, cons
}
}
}
- OPT("csv") p->csvfn = value;
- OPT("scaling-list") p->scalingLists = value;
- OPT("lambda-file") p->rc.lambdaFileName = value;
OPT("threads") p->poolNumThreads = atoi(value);
OPT("frame-threads") p->frameNumThreads = atoi(value);
OPT("pmode") p->bDistributeModeAnalysis = atobool(value);
@@ -697,7 +694,6 @@ int x265_param_parse(x265_param *p, cons
OPT("cutree") p->rc.cuTree = atobool(value);
OPT("slow-firstpass") p->rc.bEnableSlowFirstPass = atobool(value);
OPT("analysis-mode") p->analysisMode = parseName(value, x265_analysis_names, bError);
- OPT("analysis-file") p->analysisFileName = strdup(value);
OPT("sar")
{
p->vui.aspectRatioIdc = parseName(value, x265_sar_names, bError);
@@ -772,6 +768,10 @@ int x265_param_parse(x265_param *p, cons
p->rc.bStatRead = pass & 2;
}
OPT("stats") p->rc.statFileName = strdup(value);
+ OPT("csv") p->csvfn = strdup(value);
+ OPT("scaling-list") p->scalingLists = strdup(value);
+ OPT("lambda-file") p->rc.lambdaFileName = strdup(value);
+ OPT("analysis-file") p->analysisFileName = strdup(value);
else
return X265_PARAM_BAD_NAME;
#undef OPT
diff -r 05d824463602 -r d059cfa88f1a source/common/threading.cpp
--- a/source/common/threading.cpp Mon Nov 17 16:38:52 2014 +0530
+++ b/source/common/threading.cpp Tue Nov 18 14:11:12 2014 -0600
@@ -1,6 +1,4 @@
/*****************************************************************************
- * x265: threading class and intrinsics
- *****************************************************************************
* Copyright (C) 2013 x265 project
*
* Authors: Steve Borho <steve at borho.org>
@@ -48,21 +46,21 @@ bool Thread::start()
{
DWORD threadId;
- this->thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadShim, this, 0, &threadId);
+ thread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadShim, this, 0, &threadId);
return threadId > 0;
}
void Thread::stop()
{
- if (this->thread)
- WaitForSingleObject(this->thread, INFINITE);
+ if (thread)
+ WaitForSingleObject(thread, INFINITE);
}
Thread::~Thread()
{
- if (this->thread)
- CloseHandle(this->thread);
+ if (thread)
+ CloseHandle(thread);
}
#else /* POSIX / pthreads */
@@ -79,10 +77,9 @@ static void *ThreadShim(void *opaque)
bool Thread::start()
{
- if (pthread_create(&this->thread, NULL, ThreadShim, this))
+ if (pthread_create(&thread, NULL, ThreadShim, this))
{
- this->thread = 0;
-
+ thread = 0;
return false;
}
@@ -91,8 +88,8 @@ bool Thread::start()
void Thread::stop()
{
- if (this->thread)
- pthread_join(this->thread, NULL);
+ if (thread)
+ pthread_join(thread, NULL);
}
Thread::~Thread() {}
@@ -101,6 +98,7 @@ Thread::~Thread() {}
Thread::Thread()
{
- this->thread = 0;
+ thread = 0;
}
+
}
diff -r 05d824463602 -r d059cfa88f1a source/common/threading.h
--- a/source/common/threading.h Mon Nov 17 16:38:52 2014 +0530
+++ b/source/common/threading.h Tue Nov 18 14:11:12 2014 -0600
@@ -1,6 +1,4 @@
/*****************************************************************************
- * x265: threading class and intrinsics
- *****************************************************************************
* Copyright (C) 2013 x265 project
*
* Authors: Steve Borho <steve at borho.org>
diff -r 05d824463602 -r d059cfa88f1a source/common/threadpool.cpp
--- a/source/common/threadpool.cpp Mon Nov 17 16:38:52 2014 +0530
+++ b/source/common/threadpool.cpp Tue Nov 18 14:11:12 2014 -0600
@@ -1,6 +1,4 @@
/*****************************************************************************
- * x265: singleton thread pool and interface classes
- *****************************************************************************
* Copyright (C) 2013 x265 project
*
* Authors: Steve Borho <steve at borho.org>
diff -r 05d824463602 -r d059cfa88f1a source/common/threadpool.h
--- a/source/common/threadpool.h Mon Nov 17 16:38:52 2014 +0530
+++ b/source/common/threadpool.h Tue Nov 18 14:11:12 2014 -0600
@@ -1,6 +1,4 @@
/*****************************************************************************
- * x265: singleton thread pool and interface classes
- *****************************************************************************
* Copyright (C) 2013 x265 project
*
* Authors: Steve Borho <steve at borho.org>
diff -r 05d824463602 -r d059cfa88f1a source/encoder/analysis.cpp
--- a/source/encoder/analysis.cpp Mon Nov 17 16:38:52 2014 +0530
+++ b/source/encoder/analysis.cpp Tue Nov 18 14:11:12 2014 -0600
@@ -489,8 +489,6 @@ void Analysis::parallelModeAnalysis(int
}
}
-#define MATCH_NON_PMODE 0
-
void Analysis::compressInterCU_dist(const CUData& parentCTU, const CUGeom& cuGeom)
{
uint32_t depth = cuGeom.depth;
@@ -573,31 +571,13 @@ void Analysis::compressInterCU_dist(cons
if (bTryAmp)
{
-#if MATCH_NON_PMODE
- bool bHor = false, bVer = false;
- if (bestInter->cu.m_partSize[0] == SIZE_2NxN)
- bHor = true;
- else if (bestInter->cu.m_partSize[0] == SIZE_Nx2N)
- bVer = true;
- else if (bestInter->cu.m_partSize[0] == SIZE_2Nx2N &&
- md.bestMode && md.bestMode->cu.getQtRootCbf(0))
- {
- bHor = true;
- bVer = true;
- }
-#define HOR && bHor
-#define VER && bVer
-#else
-#define HOR
-#define VER
-#endif
- if (md.pred[PRED_2NxnU].sa8dCost < bestInter->sa8dCost HOR)
+ if (md.pred[PRED_2NxnU].sa8dCost < bestInter->sa8dCost)
bestInter = &md.pred[PRED_2NxnU];
- if (md.pred[PRED_2NxnD].sa8dCost < bestInter->sa8dCost HOR)
+ if (md.pred[PRED_2NxnD].sa8dCost < bestInter->sa8dCost)
bestInter = &md.pred[PRED_2NxnD];
- if (md.pred[PRED_nLx2N].sa8dCost < bestInter->sa8dCost VER)
+ if (md.pred[PRED_nLx2N].sa8dCost < bestInter->sa8dCost)
bestInter = &md.pred[PRED_nLx2N];
- if (md.pred[PRED_nRx2N].sa8dCost < bestInter->sa8dCost VER)
+ if (md.pred[PRED_nRx2N].sa8dCost < bestInter->sa8dCost)
bestInter = &md.pred[PRED_nRx2N];
}
@@ -620,11 +600,7 @@ void Analysis::compressInterCU_dist(cons
checkBestMode(md.pred[PRED_BIDIR], depth);
}
-#if MATCH_NON_PMODE
- if ((bTryIntra && md.bestMode->cu.getQtRootCbf(0)) || md.bestMode->sa8dCost == MAX_INT64)
-#else
if (bTryIntra)
-#endif
checkBestMode(md.pred[PRED_INTRA], depth);
}
else /* m_param->rdLevel == 2 */
@@ -668,26 +644,10 @@ void Analysis::compressInterCU_dist(cons
if (bTryAmp)
{
-#if MATCH_NON_PMODE
- bool bHor = false, bVer = false;
- if (md.bestMode->cu.m_partSize[0] == SIZE_2NxN)
- bHor = true;
- else if (md.bestMode->cu.m_partSize[0] == SIZE_Nx2N)
- bVer = true;
- else if (md.bestMode->cu.m_partSize[0] == SIZE_2Nx2N && !md.bestMode->cu.m_mergeFlag[0] && !md.bestMode->cu.isSkipped(0))
- {
- bHor = true;
- bVer = true;
- }
-#undef HOR
-#undef VER
-#define VER if (bVer)
-#define HOR if (bHor)
-#endif
- VER checkBestMode(md.pred[PRED_2NxnU], depth);
- VER checkBestMode(md.pred[PRED_2NxnD], depth);
- HOR checkBestMode(md.pred[PRED_nLx2N], depth);
- HOR checkBestMode(md.pred[PRED_nRx2N], depth);
+ checkBestMode(md.pred[PRED_2NxnU], depth);
+ checkBestMode(md.pred[PRED_2NxnD], depth);
+ checkBestMode(md.pred[PRED_nLx2N], depth);
+ checkBestMode(md.pred[PRED_nRx2N], depth);
}
if (bTryIntra)
@@ -1454,10 +1414,7 @@ void Analysis::checkInter_rd0_4(Mode& in
MotionData* bestME = interMode.bestME[part];
for (int32_t i = 0; i < numPredDir; i++)
{
- bestME[i].mv.x = m_reuseInterDataCTU->mvx;
- bestME[i].mv.y = m_reuseInterDataCTU->mvy;
bestME[i].ref = m_reuseInterDataCTU->ref;
- bestME[i].costZero = !!m_reuseInterDataCTU->costZero;
m_reuseInterDataCTU++;
}
}
@@ -1477,10 +1434,7 @@ void Analysis::checkInter_rd0_4(Mode& in
MotionData* bestME = interMode.bestME[part];
for (int32_t i = 0; i < numPredDir; i++)
{
- m_reuseInterDataCTU->mvx = bestME[i].mv.x;
- m_reuseInterDataCTU->mvy = bestME[i].mv.y;
m_reuseInterDataCTU->ref = bestME[i].ref;
- m_reuseInterDataCTU->costZero = bestME[i].costZero;
m_reuseInterDataCTU++;
}
}
@@ -1507,10 +1461,7 @@ void Analysis::checkInter_rd5_6(Mode& in
MotionData* bestME = interMode.bestME[part];
for (int32_t i = 0; i < numPredDir; i++)
{
- bestME[i].mv.x = m_reuseInterDataCTU->mvx;
- bestME[i].mv.y = m_reuseInterDataCTU->mvy;
bestME[i].ref = m_reuseInterDataCTU->ref;
- bestME[i].costZero = !!m_reuseInterDataCTU->costZero;
m_reuseInterDataCTU++;
}
}
@@ -1526,10 +1477,7 @@ void Analysis::checkInter_rd5_6(Mode& in
MotionData* bestME = interMode.bestME[part];
for (int32_t i = 0; i < numPredDir; i++)
{
- m_reuseInterDataCTU->mvx = bestME[i].mv.x;
- m_reuseInterDataCTU->mvy = bestME[i].mv.y;
m_reuseInterDataCTU->ref = bestME[i].ref;
- m_reuseInterDataCTU->costZero = bestME[i].costZero;
m_reuseInterDataCTU++;
}
}
diff -r 05d824463602 -r d059cfa88f1a source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Mon Nov 17 16:38:52 2014 +0530
+++ b/source/encoder/encoder.cpp Tue Nov 18 14:11:12 2014 -0600
@@ -80,6 +80,7 @@ Encoder::Encoder()
m_buOffsetC = NULL;
m_threadPool = 0;
m_numThreadLocalData = 0;
+ m_analysisFile = NULL;
}
void Encoder::create()
diff -r 05d824463602 -r d059cfa88f1a source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Mon Nov 17 16:38:52 2014 +0530
+++ b/source/encoder/frameencoder.cpp Tue Nov 18 14:11:12 2014 -0600
@@ -204,11 +204,13 @@ bool FrameEncoder::startCompressFrame(Fr
m_frame = curFrame;
curFrame->m_encData->m_frameEncoderID = m_frameEncoderID; // Each Frame knows the ID of the FrameEncoder encoding it
curFrame->m_encData->m_slice->m_mref = m_mref;
+
if (!m_cuGeoms)
More information about the x265-commits
mailing list