[x265] [PATCH] modify the minimum keyint value

gopi.satykrishna at multicorewareinc.com gopi.satykrishna at multicorewareinc.com
Thu Sep 22 12:14:11 CEST 2016


# HG changeset patch
# User Gopi Satykrishna Akisetty <gopi.satykrishna at multicorewareinc.com>
# Date 1474539223 -19800
#      Thu Sep 22 15:43:43 2016 +0530
# Node ID 24ecccf7b435e849545e161a0992f452875f6bbc
# Parent  bdf098eefd35b70b68419f5a204e60f1df4aeae1
modify the minimum keyint value

This patch enables fixed gop size even when scenecut option is enabled

diff -r bdf098eefd35 -r 24ecccf7b435 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Thu Sep 22 13:26:57 2016 +0530
+++ b/doc/reST/cli.rst	Thu Sep 22 15:43:43 2016 +0530
@@ -1141,10 +1141,10 @@
 .. option:: --min-keyint, -i <integer>
 
 	Minimum GOP size. Scenecuts closer together than this are coded as I
-	or P, not IDR. Minimum keyint is clamped to be at least half of
-	:option:`--keyint`. If you wish to force regular keyframe intervals
+	or P, not IDR. If you wish to force regular keyframe intervals
 	and disable adaptive I frame placement, you must use
-	:option:`--no-scenecut`.
+	:option:`--no-scenecut` or give minimum keyint equal to keyint
+	with scenecut enabled.
 
 	**Range of values:** >=0 (0: auto)
 
diff -r bdf098eefd35 -r 24ecccf7b435 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Thu Sep 22 13:26:57 2016 +0530
+++ b/source/encoder/encoder.cpp	Thu Sep 22 15:43:43 2016 +0530
@@ -1660,7 +1660,7 @@
         double fps = (double)p->fpsNum / p->fpsDenom;
         p->keyframeMin = X265_MIN((int)fps, p->keyframeMax / 10);
     }
-    p->keyframeMin = X265_MAX(1, X265_MIN(p->keyframeMin, p->keyframeMax / 2 + 1));
+    p->keyframeMin = X265_MAX(1, p->keyframeMin);
 
     if (!p->bframes)
         p->bBPyramid = 0;


More information about the x265-devel mailing list