[x265] [PATCH] api: add zero-latency tune target

Steve Borho steve at borho.org
Thu Oct 31 22:14:21 CET 2013


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1383254053 18000
#      Thu Oct 31 16:14:13 2013 -0500
# Node ID 8afb161419df87f7c1b088e057e7ce6dab654322
# Parent  885e41fac72615b270e558cf85273d1b8425a2c8
api: add zero-latency tune target

This just disables lookahead and B frames at the moment.

diff -r 885e41fac726 -r 8afb161419df source/common/common.cpp
--- a/source/common/common.cpp	Thu Oct 31 15:13:39 2013 -0500
+++ b/source/common/common.cpp	Thu Oct 31 16:14:13 2013 -0500
@@ -394,6 +394,12 @@
         {
             // not yet supported
         }
+        else if (!strcmp(tune, "zero-latency"))
+        {
+            param->bFrameAdaptive = 0;
+            param->bframes = 0;
+            param->lookaheadDepth = 0;
+        }
         else
             return -1;
     }
diff -r 885e41fac726 -r 8afb161419df source/x265.h
--- a/source/x265.h	Thu Oct 31 15:13:39 2013 -0500
+++ b/source/x265.h	Thu Oct 31 16:14:13 2013 -0500
@@ -382,7 +382,7 @@
  *      100 times faster than placebo!
  *
  *      Currently available tunings are: */
-static const char * const x265_tune_names[] = { "psnr", "ssim", 0 };
+static const char * const x265_tune_names[] = { "psnr", "ssim", "zero-latency", 0 };
 
 /*      returns 0 on success, negative on failure (e.g. invalid preset/tune name). */
 int x265_param_default_preset(x265_param *, const char *preset, const char *tune);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 1398 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131031/14fb4661/attachment-0001.bin>


More information about the x265-devel mailing list