[x265] [PATCH 2 of 2] slicetype: detect scenecuts or scene transitions that originate at the beginning
deepthi at multicorewareinc.com
deepthi at multicorewareinc.com
Thu Oct 8 07:37:45 CEST 2015
# HG changeset patch
# User Deepthi Nandakumar <deepthi at multicorewareinc.com>
# Date 1444282542 -19800
# Thu Oct 08 11:05:42 2015 +0530
# Branch stable
# Node ID 115e78ad59829686d8a66d840c3dc4b0d8cebb28
# Parent 98b1d72c31fccd39e9b343a90d6ecbee72112f00
slicetype: detect scenecuts or scene transitions that originate at the beginning
or end of the current mini-GOP.
diff -r 98b1d72c31fc -r 115e78ad5982 source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp Thu Oct 08 11:01:28 2015 +0530
+++ b/source/encoder/slicetype.cpp Thu Oct 08 11:05:42 2015 +0530
@@ -1446,7 +1446,10 @@
avgSatdCost /= cnt;
for (int i= p1 ; i <= maxp1; i++)
{
- if (fabs((double)(frames[i]->costEst[i - p0][0] - avgSatdCost)) > 0.1 * avgSatdCost)
+ int64_t curCost = frames[i]->costEst[i - p0][0];
+ int64_t prevCost = frames[i - 1]->costEst[i - 1 - p0][0];
+ if (fabs((double)(curCost - avgSatdCost)) > 0.1 * avgSatdCost ||
+ fabs((double)(curCost - prevCost)) > 0.1 * prevCost)
{
fluctuate = true;
if (!m_isSceneTransition && frames[i]->bScenecut)
More information about the x265-devel
mailing list