[x265] [PATCH] Adding Frametype 'K' (fixes #161)

aasaipriya at multicorewareinc.com aasaipriya at multicorewareinc.com
Tue Oct 27 08:05:52 CET 2015


# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1445929531 -19800
#      Tue Oct 27 12:35:31 2015 +0530
# Node ID 48d21a91fe95079c17f1e1da1c572f13040742dc
# Parent  6563218ce342c30bfd4f9bc172a1dab510e6e55b
Adding Frametype 'K' (fixes #161)

diff -r 6563218ce342 -r 48d21a91fe95 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Mon Oct 26 12:13:53 2015 +0530
+++ b/doc/reST/cli.rst	Tue Oct 27 12:35:31 2015 +0530
@@ -1428,10 +1428,11 @@
 
 	framenumber frametype QP
 
-	Frametype can be one of [I,i,P,B,b]. **B** is a referenced B frame,
+	Frametype can be one of [I,i,K,P,B,b]. **B** is a referenced B frame,
 	**b** is an unreferenced B frame.  **I** is a keyframe (random
 	access point) while **i** is a I frame that is not a keyframe
-	(references are not broken).
+	(references are not broken).**K** takes *I* if closed_gop option
+	enabled or *i* if open_gop option is enabled.
 
 	Specifying QP (integer) is optional, and if specified they are
 	clamped within the encoder to qpmin/qpmax.
diff -r 6563218ce342 -r 48d21a91fe95 source/x265.cpp
--- a/source/x265.cpp	Mon Oct 26 12:13:53 2015 +0530
+++ b/source/x265.cpp	Tue Oct 27 12:35:31 2015 +0530
@@ -486,6 +486,7 @@
             pic_org.forceqp = qp + 1;
         if (type == 'I') pic_org.sliceType = X265_TYPE_IDR;
         else if (type == 'i') pic_org.sliceType = X265_TYPE_I;
+        else if (type == 'K') pic_org.sliceType = param->bOpenGOP ? X265_TYPE_I : X265_TYPE_IDR;
         else if (type == 'P') pic_org.sliceType = X265_TYPE_P;
         else if (type == 'B') pic_org.sliceType = X265_TYPE_BREF;
         else if (type == 'b') pic_org.sliceType = X265_TYPE_B;


More information about the x265-devel mailing list