From 71f0cf0aef8e78da8640b8c509b1a79f4739cca5 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 1 Aug 2017 05:55:02 +0200 Subject: [PATCH] Rebase against 611c15953e8297ac1762abfb5aeca6665985fc0f. --- ...-sinh-cosh-exp-pow-with-higher-preci.patch | 16 ++++---- patches/patchinstall.sh | 2 +- ...oid-crashing-if-no-IPropertyBag2-was.patch | 16 ++++---- ...sts-Add-some-tests-for-encoding-1bpp.patch | 37 ++++++++++--------- 4 files changed, 37 insertions(+), 34 deletions(-) diff --git a/patches/msvcrt-Math_Precision/0001-msvcrt-Calculate-sinh-cosh-exp-pow-with-higher-preci.patch b/patches/msvcrt-Math_Precision/0001-msvcrt-Calculate-sinh-cosh-exp-pow-with-higher-preci.patch index c65ef859..11d5fef1 100644 --- a/patches/msvcrt-Math_Precision/0001-msvcrt-Calculate-sinh-cosh-exp-pow-with-higher-preci.patch +++ b/patches/msvcrt-Math_Precision/0001-msvcrt-Calculate-sinh-cosh-exp-pow-with-higher-preci.patch @@ -1,4 +1,4 @@ -From 24730a3c3015b70bbf0685653c44dcbd768f4fd5 Mon Sep 17 00:00:00 2001 +From 94ca142c68870be4e9dcb898fdc01d574de68e33 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 10 Apr 2015 07:51:16 +0200 Subject: msvcrt: Calculate sinh/cosh/exp/pow with higher precision. (v2) @@ -9,7 +9,7 @@ Based on a patch by Zheng Chen. 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c -index 079446d04ed..924e3432881 100644 +index 2001d44a0b4..04b14788919 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -59,6 +59,61 @@ static MSVCRT_matherr_func MSVCRT_default_matherr_func = NULL; @@ -74,16 +74,16 @@ index 079446d04ed..924e3432881 100644 void msvcrt_init_math(void) { sse2_supported = sse2_enabled = IsProcessorFeaturePresent( PF_XMMI64_INSTRUCTIONS_AVAILABLE ); -@@ -398,7 +453,7 @@ double CDECL MSVCRT_cos( double x ) +@@ -399,7 +454,7 @@ double CDECL MSVCRT_cos( double x ) double CDECL MSVCRT_cosh( double x ) { - if (!isfinite(x)) *MSVCRT__errno() = MSVCRT_EDOM; + if (isnan(x)) *MSVCRT__errno() = MSVCRT_EDOM; - return cosh(x); + return precise_cosh(x); } /********************************************************************* -@@ -406,7 +461,7 @@ double CDECL MSVCRT_cosh( double x ) +@@ -407,7 +462,7 @@ double CDECL MSVCRT_cosh( double x ) */ double CDECL MSVCRT_exp( double x ) { @@ -92,7 +92,7 @@ index 079446d04ed..924e3432881 100644 if (isnan(x)) *MSVCRT__errno() = MSVCRT_EDOM; else if (isfinite(x) && !isfinite(ret)) *MSVCRT__errno() = MSVCRT_ERANGE; return ret; -@@ -447,7 +502,7 @@ double CDECL MSVCRT_log10( double x ) +@@ -448,7 +503,7 @@ double CDECL MSVCRT_log10( double x ) double CDECL MSVCRT_pow( double x, double y ) { /* FIXME: If x < 0 and y is not integral, set EDOM */ @@ -101,10 +101,10 @@ index 079446d04ed..924e3432881 100644 if (!isfinite(z)) *MSVCRT__errno() = MSVCRT_EDOM; return z; } -@@ -467,7 +522,7 @@ double CDECL MSVCRT_sin( double x ) +@@ -468,7 +523,7 @@ double CDECL MSVCRT_sin( double x ) double CDECL MSVCRT_sinh( double x ) { - if (!isfinite(x)) *MSVCRT__errno() = MSVCRT_EDOM; + if (isnan(x)) *MSVCRT__errno() = MSVCRT_EDOM; - return sinh(x); + return precise_sinh(x); } diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index d99ae554..0cbb6315 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "5d9a4c4dbd85cd97acae0d9f0191415bf4b30673" + echo "611c15953e8297ac1762abfb5aeca6665985fc0f" } # Show version information diff --git a/patches/windowscodecs-GIF_Encoder/0005-windowscodecs-Avoid-crashing-if-no-IPropertyBag2-was.patch b/patches/windowscodecs-GIF_Encoder/0005-windowscodecs-Avoid-crashing-if-no-IPropertyBag2-was.patch index cb824570..bfc80f86 100644 --- a/patches/windowscodecs-GIF_Encoder/0005-windowscodecs-Avoid-crashing-if-no-IPropertyBag2-was.patch +++ b/patches/windowscodecs-GIF_Encoder/0005-windowscodecs-Avoid-crashing-if-no-IPropertyBag2-was.patch @@ -1,4 +1,4 @@ -From 6a2b1a19e6f4b6eec02097d3ba55958ec58a7146 Mon Sep 17 00:00:00 2001 +From 4d72031dc8739e38d0b7f316cd2e6908ff6ad369 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Sun, 16 Oct 2016 17:36:32 +0800 Subject: windowscodecs: Avoid crashing if no IPropertyBag2 was passed to @@ -9,20 +9,20 @@ Subject: windowscodecs: Avoid crashing if no IPropertyBag2 was passed to 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c -index 7d8beab..45bb88f 100644 +index 53fa44f8094..a787a2c4c24 100644 --- a/dlls/windowscodecs/jpegformat.c +++ b/dlls/windowscodecs/jpegformat.c -@@ -1451,11 +1451,14 @@ static HRESULT WINAPI JpegEncoder_CreateNewFrame(IWICBitmapEncoder *iface, - return WINCODEC_ERR_NOTINITIALIZED; - } +@@ -1478,11 +1478,14 @@ static HRESULT WINAPI JpegEncoder_CreateNewFrame(IWICBitmapEncoder *iface, + opts[5].vt = VT_BOOL; + opts[5].dwType = PROPBAG2_TYPE_DATA; -- hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions); +- hr = CreatePropertyBag2(opts, 6, ppIEncoderOptions); - if (FAILED(hr)) + if (ppIEncoderOptions) { - LeaveCriticalSection(&This->lock); - return hr; -+ hr = CreatePropertyBag2(NULL, 0, ppIEncoderOptions); ++ hr = CreatePropertyBag2(opts, 6, ppIEncoderOptions); + if (FAILED(hr)) + { + LeaveCriticalSection(&This->lock); @@ -32,5 +32,5 @@ index 7d8beab..45bb88f 100644 This->frame_count = 1; -- -2.9.0 +2.13.1 diff --git a/patches/windowscodecs-Palette_Images/0011-windowscodecs-tests-Add-some-tests-for-encoding-1bpp.patch b/patches/windowscodecs-Palette_Images/0011-windowscodecs-tests-Add-some-tests-for-encoding-1bpp.patch index 6d8461e1..420562ca 100644 --- a/patches/windowscodecs-Palette_Images/0011-windowscodecs-tests-Add-some-tests-for-encoding-1bpp.patch +++ b/patches/windowscodecs-Palette_Images/0011-windowscodecs-tests-Add-some-tests-for-encoding-1bpp.patch @@ -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 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