# HG changeset patch
# User Santhoshini Sekar<santhosh...@multicorewareinc.com>
# Date 1441626229 -19800
#      Mon Sep 07 17:13:49 2015 +0530
# Node ID dbfc496c0f9604cf9109f4c9ab95d89b5ec06074
# Parent  0e6dc779c1b21d47a2c510c18536e52e4c28c878
add cli for Intra refresh

diff -r 0e6dc779c1b2 -r dbfc496c0f96 doc/reST/cli.rst
--- a/doc/reST/cli.rst  Wed Sep 16 14:26:59 2015 +0530
+++ b/doc/reST/cli.rst  Mon Sep 07 17:13:49 2015 +0530
@@ -1087,7 +1087,8 @@
 
        Max intra period in frames. A special case of infinite-gop (single
        keyframe at the beginning of the stream) can be triggered with
-       argument -1. Use 1 to force all-intra. Default 250
+       argument -1. Use 1 to force all-intra. When intra-refresh is enabled
+       it specifies the interval between which refresh sweeps happen. Default 
250
 
 .. option:: --min-keyint, -i <integer>
 
@@ -1106,6 +1107,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 0e6dc779c1b2 -r dbfc496c0f96 source/common/param.cpp
--- a/source/common/param.cpp   Wed Sep 16 14:26:59 2015 +0530
+++ b/source/common/param.cpp   Mon Sep 07 17:13:49 2015 +0530
@@ -612,6 +612,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")
     {
@@ -1453,6 +1454,7 @@
     BOOL(p->bSaoNonDeblocked, "sao-non-deblock");
     BOOL(p->bBPyramid, "b-pyramid");
     BOOL(p->rc.cuTree, "cutree");
+    BOOL(p->bIntraRefresh, "intra-refresh");
     s += sprintf(s, " rc=%s", p->rc.rateControlMode == X265_RC_ABR ? (
          p->rc.bStatRead ? "2 pass" : p->rc.bitrate == p->rc.vbvMaxBitrate ? 
"cbr" : "abr")
          : p->rc.rateControlMode == X265_RC_CRF ? "crf" : "cqp");
diff -r 0e6dc779c1b2 -r dbfc496c0f96 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp    Wed Sep 16 14:26:59 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 0e6dc779c1b2 -r dbfc496c0f96 source/x265cli.h
--- a/source/x265cli.h  Wed Sep 16 14:26:59 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);
_______________________________________________
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to