[x265] [PATCH 3 of 3] cli: add cli option for Intra-refresh

santhoshini at multicorewareinc.com santhoshini at multicorewareinc.com
Mon Sep 7 14:30:30 CEST 2015


# HG changeset patch
# User Santhoshini Sekar<santhoshini at multicorewareinc.com>
# Date 1441626229 -19800
#      Mon Sep 07 17:13:49 2015 +0530
# Node ID d0f6a040aff28d0bb636d053fa894b834c13f51a
# Parent  d91760d89cbd0e6f124fab60d7e4d684299b89a1
cli: add cli option for Intra-refresh

diff -r d91760d89cbd -r d0f6a040aff2 doc/reST/cli.rst
--- a/doc/reST/cli.rst	Mon Sep 07 16:53:55 2015 +0530
+++ b/doc/reST/cli.rst	Mon Sep 07 17:13:49 2015 +0530
@@ -1092,6 +1092,14 @@
 	:option:`--scenecut` 0 or :option:`--no-scenecut` disables adaptive
 	I frame placement. Default 40
 
+.. option:: --intra-refresh
+
+	Enables Periodic Intra Refresh(PIR) instead of keyframe insertion.
+	PIR can replace keyframes by inserting a column of intra blocks in 
+	non-keyframes, that move across the video from one side to the other
+	and thereby refresh the image but over a period of multiple 
+	frames instead of a single keyframe.
+
 .. option:: --rc-lookahead <integer>
 
 	Number of frames for slice-type decision lookahead (a key
diff -r d91760d89cbd -r d0f6a040aff2 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Mon Sep 07 16:53:55 2015 +0530
+++ b/source/CMakeLists.txt	Mon Sep 07 17:13:49 2015 +0530
@@ -30,7 +30,7 @@
 mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)
 
 # X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 74)
+set(X265_BUILD 75)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
diff -r d91760d89cbd -r d0f6a040aff2 source/common/param.cpp
--- a/source/common/param.cpp	Mon Sep 07 16:53:55 2015 +0530
+++ b/source/common/param.cpp	Mon Sep 07 17:13:49 2015 +0530
@@ -610,6 +610,7 @@
     OPT2("constrained-intra", "cip") p->bEnableConstrainedIntra = atobool(value);
     OPT("fast-intra") p->bEnableFastIntra = atobool(value);
     OPT("open-gop") p->bOpenGOP = atobool(value);
+    OPT("intra-refresh") p->bIntraRefresh = atobool(value);
     OPT("lookahead-slices") p->lookaheadSlices = atoi(value);
     OPT("scenecut")
     {
diff -r d91760d89cbd -r d0f6a040aff2 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp	Mon Sep 07 16:53:55 2015 +0530
+++ b/source/encoder/ratecontrol.cpp	Mon Sep 07 17:13:49 2015 +0530
@@ -455,6 +455,7 @@
                 CMP_OPT_FIRST_PASS("open-gop", m_param->bOpenGOP);
                 CMP_OPT_FIRST_PASS("keyint", m_param->keyframeMax);
                 CMP_OPT_FIRST_PASS("scenecut", m_param->scenecutThreshold);
+                CMP_OPT_FIRST_PASS("intra_refresh", m_param->bIntraRefresh);
 
                 if ((p = strstr(opts, "b-adapt=")) != 0 && sscanf(p, "b-adapt=%d", &i) && i >= X265_B_ADAPT_NONE && i <= X265_B_ADAPT_TRELLIS)
                 {
diff -r d91760d89cbd -r d0f6a040aff2 source/x265cli.h
--- a/source/x265cli.h	Mon Sep 07 16:53:55 2015 +0530
+++ b/source/x265cli.h	Mon Sep 07 17:13:49 2015 +0530
@@ -116,6 +116,7 @@
     { "min-keyint",     required_argument, NULL, 'i' },
     { "scenecut",       required_argument, NULL, 0 },
     { "no-scenecut",          no_argument, NULL, 0 },
+    { "intra-refresh",        no_argument, NULL, 0 },
     { "rc-lookahead",   required_argument, NULL, 0 },
     { "lookahead-slices", required_argument, NULL, 0 },
     { "bframes",        required_argument, NULL, 'b' },
@@ -329,6 +330,7 @@
     H0("-i/--min-keyint <integer>        Scenecuts closer together than this are coded as I, not IDR. Default: auto\n");
     H0("   --no-scenecut                 Disable adaptive I-frame decision\n");
     H0("   --scenecut <integer>          How aggressively to insert extra I-frames. Default %d\n", param->scenecutThreshold);
+    H0("   --intra-refresh               Use Periodic Intra Refresh instead of IDR frames\n");
     H0("   --rc-lookahead <integer>      Number of frames for frame-type lookahead (determines encoder latency) Default %d\n", param->lookaheadDepth);
     H1("   --lookahead-slices <0..16>    Number of slices to use per lookahead cost estimate. Default %d\n", param->lookaheadSlices);
     H0("   --bframes <integer>           Maximum number of consecutive b-frames (now it only enables B GOP structure) Default %d\n", param->bframes);


More information about the x265-devel mailing list