Rebase against 611c15953e8297ac1762abfb5aeca6665985fc0f.

This commit is contained in:
Sebastian Lackner
2017-08-01 05:55:02 +02:00
parent ea9d4a0fa1
commit 71f0cf0aef
4 changed files with 37 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
From c0876d0b4f8e7773db7d97a5d2d287db51cc3177 Mon Sep 17 00:00:00 2001
From 0644c971ba8d69eadc161ce50241eea78fc4ec57 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 20 Sep 2016 14:47:48 +0800
Subject: windowscodecs/tests: Add some tests for encoding 1bpp/8bpp images
@@ -9,7 +9,7 @@ Subject: windowscodecs/tests: Add some tests for encoding 1bpp/8bpp images
1 file changed, 340 insertions(+), 19 deletions(-)
diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c
index 367df51a0b2..7bfd70bdc21 100644
index 13aa3c11ca8..704ae5d0ddc 100644
--- a/dlls/windowscodecs/tests/converter.c
+++ b/dlls/windowscodecs/tests/converter.c
@@ -1,5 +1,6 @@
@@ -36,7 +36,7 @@ index 367df51a0b2..7bfd70bdc21 100644
typedef struct bitmap_data {
const WICPixelFormatGUID *format;
UINT bpp;
@@ -232,6 +236,19 @@ static BOOL compare_bits(const struct bitmap_data *expect, UINT buffersize, cons
@@ -235,6 +239,19 @@ static BOOL compare_bits(const struct bitmap_data *expect, UINT buffersize, cons
break;
}
}
@@ -56,7 +56,7 @@ index 367df51a0b2..7bfd70bdc21 100644
else
equal = (memcmp(expect->bits, converted_bits, buffersize) == 0);
@@ -263,7 +280,7 @@ static void compare_bitmap_data(const struct bitmap_data *expect, IWICBitmapSour
@@ -266,7 +283,7 @@ static void compare_bitmap_data(const struct bitmap_data *expect, IWICBitmapSour
hr = IWICBitmapSource_GetPixelFormat(source, &dst_pixelformat);
ok(SUCCEEDED(hr), "GetPixelFormat(%s) failed, hr=%x\n", name, hr);
@@ -65,7 +65,7 @@ index 367df51a0b2..7bfd70bdc21 100644
prc.X = 0;
prc.Y = 0;
@@ -287,6 +304,21 @@ static void compare_bitmap_data(const struct bitmap_data *expect, IWICBitmapSour
@@ -290,6 +307,21 @@ static void compare_bitmap_data(const struct bitmap_data *expect, IWICBitmapSour
HeapFree(GetProcessHeap(), 0, converted_bits);
}
@@ -87,7 +87,7 @@ index 367df51a0b2..7bfd70bdc21 100644
static const BYTE bits_24bppBGR[] = {
255,0,0, 0,255,0, 0,0,255, 0,0,0,
0,255,255, 255,0,255, 255,255,0, 255,255,255};
@@ -571,6 +603,118 @@ static void test_encoder_properties(const CLSID* clsid_encoder, IPropertyBag2 *o
@@ -592,6 +624,118 @@ static void test_encoder_properties(const CLSID* clsid_encoder, IPropertyBag2 *o
}
}
@@ -206,7 +206,7 @@ index 367df51a0b2..7bfd70bdc21 100644
struct setting {
const WCHAR *name;
PROPBAG2_TYPE type;
@@ -624,7 +768,7 @@ todo_wine
@@ -645,7 +789,7 @@ todo_wine
static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* clsid_encoder,
const struct bitmap_data **dsts, const CLSID *clsid_decoder, WICRect *rc,
@@ -215,7 +215,7 @@ index 367df51a0b2..7bfd70bdc21 100644
{
HRESULT hr;
IWICBitmapEncoder *encoder;
@@ -653,9 +797,22 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
@@ -674,9 +818,22 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
if (hglobal && SUCCEEDED(hr))
{
@@ -238,7 +238,7 @@ index 367df51a0b2..7bfd70bdc21 100644
i=0;
while (SUCCEEDED(hr) && srcs[i])
{
@@ -689,13 +846,20 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
@@ -710,13 +867,20 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
}
}
@@ -260,7 +260,7 @@ index 367df51a0b2..7bfd70bdc21 100644
hr = IWICBitmapFrameEncode_SetSize(frameencode, srcs[i]->width, srcs[i]->height);
ok(SUCCEEDED(hr), "SetSize failed, hr=%x\n", hr);
@@ -703,17 +867,42 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
@@ -724,17 +888,42 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
if (IsEqualGUID(clsid_encoder, &CLSID_WICPngEncoder))
test_set_frame_palette(frameencode);
@@ -307,7 +307,7 @@ index 367df51a0b2..7bfd70bdc21 100644
IWICBitmapFrameEncode_Release(frameencode);
IPropertyBag2_Release(options);
@@ -728,6 +917,8 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
@@ -756,6 +945,8 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
{
hr = IWICBitmapEncoder_Commit(encoder);
ok(SUCCEEDED(hr), "Commit failed, hr=%x\n", hr);
@@ -316,7 +316,7 @@ index 367df51a0b2..7bfd70bdc21 100644
}
if (SUCCEEDED(hr))
@@ -739,25 +930,105 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
@@ -767,25 +958,105 @@ static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID* cls
if (SUCCEEDED(hr))
{
@@ -423,7 +423,7 @@ index 367df51a0b2..7bfd70bdc21 100644
IWICBitmapDecoder_Release(decoder);
}
@@ -773,13 +1044,31 @@ static void test_encoder(const struct bitmap_data *src, const CLSID* clsid_encod
@@ -801,13 +1072,31 @@ static void test_encoder(const struct bitmap_data *src, const CLSID* clsid_encod
{
const struct bitmap_data *srcs[2];
const struct bitmap_data *dsts[2];
@@ -456,7 +456,7 @@ index 367df51a0b2..7bfd70bdc21 100644
}
static void test_encoder_rects(void)
@@ -798,20 +1087,20 @@ static void test_encoder_rects(void)
@@ -826,20 +1115,20 @@ static void test_encoder_rects(void)
rc.Width = 4;
rc.Height = 2;
@@ -482,7 +482,7 @@ index 367df51a0b2..7bfd70bdc21 100644
}
static const struct bitmap_data *multiple_frames[3] = {
@@ -830,8 +1119,14 @@ static const struct setting png_interlace_settings[] = {
@@ -858,8 +1147,14 @@ static const struct setting png_interlace_settings[] = {
START_TEST(converter)
{
@@ -497,7 +497,7 @@ index 367df51a0b2..7bfd70bdc21 100644
test_conversion(&testdata_32bppBGRA, &testdata_32bppBGR, "BGRA -> BGR", FALSE);
test_conversion(&testdata_32bppBGR, &testdata_32bppBGRA, "BGR -> BGRA", FALSE);
test_conversion(&testdata_32bppBGRA, &testdata_32bppBGRA, "BGRA -> BGRA", FALSE);
@@ -857,22 +1152,48 @@ START_TEST(converter)
@@ -885,12 +1180,36 @@ START_TEST(converter)
test_invalid_conversion();
test_default_converter();
@@ -537,6 +537,9 @@ index 367df51a0b2..7bfd70bdc21 100644
test_encoder(&testdata_24bppBGR, &CLSID_WICTiffEncoder,
&testdata_24bppBGR, &CLSID_WICTiffDecoder, "TIFF encoder 24bppBGR");
@@ -898,12 +1217,14 @@ START_TEST(converter)
&testdata_24bppBGR, NULL, "JPEG encoder 24bppBGR");
test_multi_encoder(multiple_frames, &CLSID_WICTiffEncoder,
- multiple_frames, &CLSID_WICTiffDecoder, NULL, NULL, "TIFF encoder multi-frame");
+ multiple_frames, &CLSID_WICTiffDecoder, NULL, NULL, "TIFF encoder multi-frame", NULL);
@@ -552,5 +555,5 @@ index 367df51a0b2..7bfd70bdc21 100644
CoUninitialize();
}
--
2.11.0
2.13.1