]> git.sesse.net Git - movit/blobdiff - mix_effect_test.cpp
Inline combine_two_samples (and remove an obsolete assert). Helps 13–14% on ResampleE...
[movit] / mix_effect_test.cpp
index 096ecd5ae03169ee5e9052bfe2207a0140cc6f53..b5082846abc13e6ec76ff37d9dfe1ec6b7032ab7 100644 (file)
@@ -1,8 +1,15 @@
 // Unit tests for MixEffect.
 
-#include "test_util.h"
+#include <epoxy/gl.h>
+
+#include "effect_chain.h"
 #include "gtest/gtest.h"
+#include "image_format.h"
+#include "input.h"
 #include "mix_effect.h"
+#include "test_util.h"
+
+namespace movit {
 
 TEST(MixEffectTest, FiftyFiftyMix) {
        float data_a[] = {
@@ -95,7 +102,7 @@ TEST(MixEffectTest, AdditiveBlendingWorksForBothTotallyOpaqueAndPartiallyTranslu
                1.0f, 1.0f, 1.0f, 0.7f,
        };
 
-       float out_data[4];
+       float out_data[8];
        EffectChainTester tester(data_a, 1, 2, FORMAT_RGBA_POSTMULTIPLIED_ALPHA, COLORSPACE_sRGB, GAMMA_LINEAR);
        Effect *input1 = tester.get_chain()->last_added_effect();
        Effect *input2 = tester.add_input(data_b, FORMAT_RGBA_POSTMULTIPLIED_ALPHA, COLORSPACE_sRGB, GAMMA_LINEAR);
@@ -133,3 +140,5 @@ TEST(MixEffectTest, MixesLinearlyDespitesRGBInputsAndOutputs) {
 
        expect_equal(expected_data, out_data, 2, 2);
 }
+
+}  // namespace movit