summaryrefslogtreecommitdiff
path: root/multimedia/x264-devel/patches/patch-encoder_analyse.c
blob: da1e8d054e2e52276b8517d8bba1e89681ce197a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-encoder_analyse.c,v 1.2 2017/07/14 08:12:34 adam Exp $

Use logf() instead of log2f.

--- encoder/analyse.c.orig	2017-07-12 20:45:03.000000000 +0000
+++ encoder/analyse.c
@@ -309,7 +309,7 @@ int x264_analyse_init_costs( x264_t *h )
 
     logs[0] = 0.718f;
     for( int i = 1; i <= 2*4*mv_range; i++ )
-        logs[i] = log2f( i+1 ) * 2.0f + 1.718f;
+        logs[i] = logf(i+1)*2.88539f + 1.718f;
 
     for( int qp = X264_MIN( h->param.rc.i_qp_min, QP_MAX_SPEC ); qp <= h->param.rc.i_qp_max; qp++ )
         if( init_costs( h, logs, qp ) )