[x265] [PATCH] lookahead: fix crash for I frame cost estimation

deepthidevaki at multicorewareinc.com deepthidevaki at multicorewareinc.com
Thu Sep 19 08:25:56 CEST 2013


# HG changeset patch
# User Deepthi Devaki <deepthidevaki at multicorewareinc.com>
# Date 1379571920 -19800
# Node ID 93d222ec321e5eed93dc8652dc9e5248d836c436
# Parent  26d6f155f8df69147f40f4945d99c29a52988c56
lookahead: fix crash for I frame cost estimation

diff -r 26d6f155f8df -r 93d222ec321e source/encoder/slicetype.cpp
--- a/source/encoder/slicetype.cpp	Wed Sep 18 16:13:33 2013 -0500
+++ b/source/encoder/slicetype.cpp	Thu Sep 19 11:55:20 2013 +0530
@@ -365,7 +365,8 @@
         if (!bDoSearch[i])
         {
             /* Use previously calculated cost */
-            COPY2_IF_LT(bcost, *fenc_costs[i], listused, i + 1);
+            if(p0 != p1)
+                COPY2_IF_LT(bcost, *fenc_costs[i], listused, i + 1);
             continue;
         }
         int numc = 0;


More information about the x265-devel mailing list