From: Steinar H. Gunderson Date: Fri, 25 Sep 2015 23:33:29 +0000 (+0200) Subject: In ycbcr_conversion_effect_test, use a non-float framebuffer. X-Git-Tag: 1.3.0~42 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=223fbbe7c569feba046fc3533b9769943ed82612;hp=5307e8adafcb1fda2579793730a00b6b978fd701 In ycbcr_conversion_effect_test, use a non-float framebuffer. 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). --- diff --git a/ycbcr_conversion_effect_test.cpp b/ycbcr_conversion_effect_test.cpp index aada42c..e127b4d 100644 --- a/ycbcr_conversion_effect_test.cpp +++ b/ycbcr_conversion_effect_test.cpp @@ -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;