]> git.sesse.net Git - movit/blobdiff - deinterlace_effect_test.cpp
Convert a loop to range-based for.
[movit] / deinterlace_effect_test.cpp
index dec132246e09a6aef4e40e41faf66fcce38542f2..a509f8c270ef17d0f5806bcafa1af5999ac8f1d1 100644 (file)
@@ -243,11 +243,11 @@ void BM_DeinterlaceEffect(benchmark::State &state, TestFormat format, bool spati
        unique_ptr<float[]> out_data(new float[width * height * format.bytes_per_pixel]);
 
        for (unsigned i = 0; i < width * field_height * format.bytes_per_pixel; ++i) {
-               field1[i] = rand();
-               field2[i] = rand();
-               field3[i] = rand();
-               field4[i] = rand();
-               field5[i] = rand();
+               field1[i] = rand() / (RAND_MAX + 1.0);
+               field2[i] = rand() / (RAND_MAX + 1.0);
+               field3[i] = rand() / (RAND_MAX + 1.0);
+               field4[i] = rand() / (RAND_MAX + 1.0);
+               field5[i] = rand() / (RAND_MAX + 1.0);
        }
 
        EffectChainTester tester(nullptr, width, height);