]> git.sesse.net Git - movit/commitdiff
In ycbcr_conversion_effect_test, use a non-float framebuffer.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 25 Sep 2015 23:33:29 +0000 (01:33 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 25 Sep 2015 23:33:29 +0000 (01:33 +0200)
This way, we let the card convert float-to-int, which we have reasonable
control over, as opposed to glReadPixels(), which is rather unpredictable.
Fixes unit test failures on Broadwell on Linux (Mesa 10.1).

ycbcr_conversion_effect_test.cpp

index aada42cc50fe206f05ddbd083b8dcb2abc83c8f9..e127b4d8ff832ea03e7eb834731770f3d7f8e1ca 100644 (file)
@@ -40,7 +40,7 @@ TEST(YCbCrConversionEffectTest, BasicInOut) {
 
        unsigned char out_data[width * height * 4];
 
-       EffectChainTester tester(NULL, width, height);
+       EffectChainTester tester(NULL, width, height, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR, GL_RGBA8);
 
        ImageFormat format;
        format.color_space = COLORSPACE_sRGB;
@@ -96,7 +96,7 @@ TEST(YCbCrConversionEffectTest, ClampToValidRange) {
 
        unsigned char out_data[width * height * 4];
 
-       EffectChainTester tester(NULL, width, height);
+       EffectChainTester tester(NULL, width, height, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR, GL_RGBA8);
 
        ImageFormat format;
        format.color_space = COLORSPACE_sRGB;
@@ -147,12 +147,12 @@ TEST(YCbCrConversionEffectTest, LimitedRangeToFullRange) {
                255, 128, 128, 255,
                 76,  85, 255, 255,
                150,  44,  21, 255,
-                29, 255, 107, 255
+                29, 255, 108, 255
        };
 
        unsigned char out_data[width * height * 4];
 
-       EffectChainTester tester(NULL, width, height);
+       EffectChainTester tester(NULL, width, height, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR, GL_RGBA8);
 
        ImageFormat format;
        format.color_space = COLORSPACE_sRGB;
@@ -200,7 +200,7 @@ TEST(YCbCrConversionEffectTest, PlanarOutput) {
 
        unsigned char out_y[width * height], out_cb[width * height], out_cr[width * height];
 
-       EffectChainTester tester(NULL, width, height);
+       EffectChainTester tester(NULL, width, height, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR, GL_RGBA8);
 
        ImageFormat format;
        format.color_space = COLORSPACE_sRGB;
@@ -270,7 +270,7 @@ TEST(YCbCrConversionEffectTest, SplitLumaAndChroma) {
 
        unsigned char out_y[width * height * 4], out_cbcr[width * height * 4];
 
-       EffectChainTester tester(NULL, width, height);
+       EffectChainTester tester(NULL, width, height, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR, GL_RGBA8);
 
        ImageFormat format;
        format.color_space = COLORSPACE_sRGB;