[x264-devel] checkasm: Use the right variable in a loop condition

Martin Storsjö git at videolan.org
Tue May 23 18:04:26 CEST 2017


x264 | branch: master | Martin Storsjö <martin at martin.st> | Mon May 22 13:10:46 2017 +0300| [b4d811df4fd7dbb9220fe2c8f2a2c2a6ba2bbc87] | committer: Henrik Gramner

checkasm: Use the right variable in a loop condition

Prior to this, this loop hasn't run at all. The condition has been
the same since it was introduced in 5b0cb86f.

This issue was pointed out by a clang warning.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=b4d811df4fd7dbb9220fe2c8f2a2c2a6ba2bbc87
---

 tools/checkasm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/checkasm.c b/tools/checkasm.c
index b367db67..bc159fa5 100644
--- a/tools/checkasm.c
+++ b/tools/checkasm.c
@@ -2260,7 +2260,7 @@ static int check_quant( int cpu_ref, int cpu_new )
                     int max = X264_MIN( i, PIXEL_MAX*16 ); \
                     for( int j = 0; j < size; j++ ) \
                         dct1[j] = rand()%(max*2+1) - max; \
-                    for( int j = 0; i <= size; j += 4 ) \
+                    for( int j = 0; j <= size; j += 4 ) \
                         qf_c.quant_2x2_dc( &dct1[j], h->quant4_mf[CQM_4IC][qpdc][0]>>1, h->quant4_bias[CQM_4IC][qpdc][0]>>1 ); \
                     memcpy( dct2, dct1, size*sizeof(dctcoef) ); \
                     res_c   = call_c1( qf_c.optname, dct1, dmf ); \



More information about the x264-devel mailing list