[x265] [PATCH] frameencoder: increase refLagRows by one when subme has multiple hpel iteration steps
santhoshini at multicorewareinc.com
santhoshini at multicorewareinc.com
Wed Apr 1 09:26:15 CEST 2015
# HG changeset patch
# User Santhoshini Sekar<santhoshini at multicorewareinc.com>
# Date 1427869853 -19800
# Wed Apr 01 12:00:53 2015 +0530
# Node ID 721439fe1542acc7cbe846fbf353eaa818fd209d
# Parent ac85c775620f1dcb0df056874633cbf916098bd2
frameencoder: increase refLagRows by one when subme has multiple hpel iteration steps
diff -r ac85c775620f -r 721439fe1542 source/encoder/frameencoder.cpp
--- a/source/encoder/frameencoder.cpp Tue Mar 31 20:04:28 2015 -0500
+++ b/source/encoder/frameencoder.cpp Wed Apr 01 12:00:53 2015 +0530
@@ -112,9 +112,10 @@
bool ok = !!m_numRows;
int range = m_param->searchRange; /* fpel search */
- range += 1; /* diamond search range check lag */
- range += 2; /* subpel refine */
- range += NTAPS_LUMA / 2; /* subpel filter half-length */
+ range += 1; /* diamond search range check lag */
+ range += 2; /* subpel refine */
+ range += NTAPS_LUMA / 2; /* subpel filter half-length */
+ range += !!(MotionEstimate::hpelIterationCount(m_param->subpelRefine) > 1);
m_refLagRows = 1 + ((range + g_maxCUSize - 1) / g_maxCUSize);
// NOTE: 2 times of numRows because both Encoder and Filter in same queue
diff -r ac85c775620f -r 721439fe1542 source/encoder/motion.cpp
--- a/source/encoder/motion.cpp Tue Mar 31 20:04:28 2015 -0500
+++ b/source/encoder/motion.cpp Wed Apr 01 12:00:53 2015 +0530
@@ -149,6 +149,11 @@
#undef SETUP_SCALE
}
+int MotionEstimate::hpelIterationCount(int subpelRefine)
+{
+ return workload[subpelRefine].hpel_iters;
+}
+
MotionEstimate::~MotionEstimate()
{
fencPUYuv.destroy();
diff -r ac85c775620f -r 721439fe1542 source/encoder/motion.h
--- a/source/encoder/motion.h Tue Mar 31 20:04:28 2015 -0500
+++ b/source/encoder/motion.h Wed Apr 01 12:00:53 2015 +0530
@@ -68,6 +68,7 @@
~MotionEstimate();
static void initScales();
+ static int hpelIterationCount(int subpelRefine);
void init(int method, int refine, int csp);
/* Methods called at slice setup */
More information about the x265-devel
mailing list