# HG changeset patch
# User Steve Borho <[email protected]>
# Date 1380090499 18000
#      Wed Sep 25 01:28:19 2013 -0500
# Branch stable
# Node ID 91ae57f62e18e447b217bbfe9f4d45f36dd19b03
# Parent  ddb7abf83f983a5d5e1e0e79b57073d5bd9c8160
encoder: disable lookahead for all-intra encodes

This works around a bug in the current Lookahead::slicetypeDecide().  I have
a patch in the works which fixes this properly, but I think this is a reasonable
workaround (who needs lookahead or lowres structs for all-intra encodes)?

diff -r ddb7abf83f98 -r 91ae57f62e18 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp        Tue Sep 24 14:22:26 2013 -0500
+++ b/source/encoder/encoder.cpp        Wed Sep 25 01:28:19 2013 -0500
@@ -213,6 +213,12 @@
     {
         _param->keyframeMin = _param->keyframeMax;
     }
+    if (_param->keyframeMin == 1)
+    {
+        // disable lookahead for all-intra encodes
+        _param->bFrameAdaptive = 0;
+        _param->bframes = 0;
+    }
     // if a bitrate is specified, chose ABR.  Else default to CQP
     if (_param->rc.bitrate)
     {
_______________________________________________
x265-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to