diff --git a/.gitignore b/.gitignore index e69de29..163e228 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/JPEGXR_DPK_Spec_1.0.pdf +/jxrlib_1_1.tar.gz diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..ed58ca8 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,69 @@ +cmake_minimum_required(VERSION 3.5) +project(jxrlib C) +include(GNUInstallDirs) + +set(JXRLIB_MAJOR 0) +set(JXRLIB_MINOR 0) + +set(JXRLIB_LIB_VERSION ${JXRLIB_MAJOR}.${JXRLIB_MINOR}.0) +set(JXRLIB_SO_VERSION ${JXRLIB_MAJOR}) + +include(TestBigEndian) +test_big_endian(ISBIGENDIAN) +if(ISBIGENDIAN) + set(DEF_ENDIAN -D_BIG__ENDIAN_) +endif() + +add_definitions(-D__ANSI__ -DDISABLE_PERF_MEASUREMENT ${DEF_ENDIAN}) + +include_directories( + common/include + image/sys + jxrgluelib + jxrtestlib +) + +# JXR Library +file(GLOB jpegxr_SRC image/sys/*.c image/decode/*.c image/encode/*.c) +file(GLOB jpegxr_HDR image/sys/*.h image/decode/*.h image/encode/*.h) + +add_library(jpegxr ${jpegxr_SRC} ${jpegxr_HDR}) +set_target_properties(jpegxr PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION}) + +install(TARGETS jpegxr + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +# JXR-GLUE Library +file(GLOB jxrglue_SRC jxrgluelib/*.c jxrtestlib/*.c) +file(GLOB jxrglue_HDR jxrgluelib/*.h jxrtestlib/*.h) + +add_library(jxrglue ${jxrglue_SRC} ${jxrglue_HDR}) +set_target_properties(jxrglue PROPERTIES VERSION ${JXRLIB_LIB_VERSION} SOVERSION ${JXRLIB_SO_VERSION}) +target_link_libraries(jxrglue jpegxr m) + +install(TARGETS jxrglue + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +# JxrEncApp Executable +add_executable(JxrEncApp jxrencoderdecoder/JxrEncApp.c) +target_link_libraries(JxrEncApp jxrglue) +install(TARGETS JxrEncApp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + +# JxrDecApp Executable +add_executable(JxrDecApp jxrencoderdecoder/JxrDecApp.c) +target_link_libraries(JxrDecApp jxrglue) +install(TARGETS JxrDecApp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + +# Headers +install(FILES jxrgluelib/JXRGlue.h jxrgluelib/JXRMeta.h jxrtestlib/JXRTest.h image/sys/windowsmediaphoto.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jxrlib +) +install(DIRECTORY common/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/jxrlib + FILES_MATCHING PATTERN "*.h" +) diff --git a/jxrlib.spec b/jxrlib.spec new file mode 100644 index 0000000..85602f1 --- /dev/null +++ b/jxrlib.spec @@ -0,0 +1,238 @@ +Name: jxrlib +Version: 1.1 +Release: 32%{?dist} +Summary: Open source implementation of jpegxr + +# See JPEGXR_DPK_Spec_1.0.doc. Upstream request for plain text license file at +# https://jxrlib.codeplex.com/workitem/13 +# Automatically converted from old format: BSD - review is highly recommended. +License: LicenseRef-Callaway-BSD +URL: https://jxrlib.codeplex.com/ +Source0: http://jxrlib.codeplex.com/downloads/get/685249#/jxrlib_%(echo %{version} | tr . _).tar.gz +# Use CMake to build to facilitate creation of shared libraries +# See https://jxrlib.codeplex.com/workitem/13 +Source1: CMakeLists.txt +# Converted from shipped doc/JPEGXR_DPK_Spec_1.doc +# libreoffice --headless --convert-to pdf doc/JPEGXR_DPK_Spec_1.0.doc +Source2: JPEGXR_DPK_Spec_1.0.pdf + +# Fix various warnings, upstreamable +# See https://jxrlib.codeplex.com/workitem/13 +Patch0: jxrlib_warnings.patch +# Mingw build fixes +Patch1: jxrlib_mingw.patch + +BuildRequires: cmake +BuildRequires: gcc + +BuildRequires: mingw32-filesystem >= 95 +BuildRequires: mingw32-gcc + +BuildRequires: mingw64-filesystem >= 95 +BuildRequires: mingw64-gcc + + +%description +This is an open source implementation of the jpegxr image format standard. + + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains libraries and header files for +developing applications that use %{name}. + + +%package -n mingw32-%{name} +Summary: MinGW Windows JPEG XR library +BuildArch: noarch + +%description -n mingw32-%{name} +MinGW Windows JPEG XR library. + + +%package -n mingw64-%{name} +Summary: MinGW Windows JPEG XR library +BuildArch: noarch + +%description -n mingw64-%{name} +MinGW Windows JPEG XR library. + + +%{?mingw_debug_package} + + +%prep +%setup -q -n %{name} + +# Sanitize charset and line endings +for file in `find . -type f -name '*.c' -or -name '*.h' -or -name '*.txt'`; do + iconv --from=ISO-8859-15 --to=UTF-8 $file > $file.new && \ + sed -i 's|\r||g' $file.new && \ + touch -r $file $file.new && mv $file.new $file +done + +%patch -P0 -p1 +%patch -P1 -p1 + +# Remove shipped binaries +rm -rf bin + +cp -a %{SOURCE1} . +cp -a %{SOURCE2} doc + + +%build +# Native build +%cmake +%cmake_build + +# MinGW build +%mingw_cmake +%mingw_make_build + + +%install +%cmake_install +%mingw_make_install + +# Delete guiddef.h which conflicts with guiddef.h shipped by mingw-headers +rm -f %{buildroot}%{mingw32_includedir}/jxrlib/guiddef.h +rm -f %{buildroot}%{mingw64_includedir}/jxrlib/guiddef.h + + +%mingw_debug_install_post + + +%files +%doc doc/readme.txt doc/JPEGXR_DPK_Spec_1.0.pdf +%{_bindir}/JxrEncApp +%{_bindir}/JxrDecApp +%{_libdir}/libjpegxr.so.* +%{_libdir}/libjxrglue.so.* + +%files devel +%{_includedir}/jxrlib/ +%{_libdir}/libjpegxr.so +%{_libdir}/libjxrglue.so + +%files -n mingw32-%{name} +%{mingw32_bindir}/libjpegxr.dll +%{mingw32_bindir}/libjxrglue.dll +%{mingw32_bindir}/JxrDecApp.exe +%{mingw32_bindir}/JxrEncApp.exe +%{mingw32_includedir}/jxrlib/ +%{mingw32_libdir}/libjpegxr.dll.a +%{mingw32_libdir}/libjxrglue.dll.a + +%files -n mingw64-%{name} +%{mingw64_bindir}/libjpegxr.dll +%{mingw64_bindir}/libjxrglue.dll +%{mingw64_bindir}/JxrDecApp.exe +%{mingw64_bindir}/JxrEncApp.exe +%{mingw64_includedir}/jxrlib/ +%{mingw64_libdir}/libjpegxr.dll.a +%{mingw64_libdir}/libjxrglue.dll.a + + +%changelog +* Thu Jul 24 2025 Fedora Release Engineering - 1.1-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Wed Jul 16 2025 Sandro Mani - 1.1-31 +- Increase minimum cmake version to 3.5 +- Port CMakeLists.txt to GNUInstallDirs + +* Fri Jan 17 2025 Fedora Release Engineering - 1.1-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Mon Sep 02 2024 Miroslav Suchý - 1.1-29 +- convert license to SPDX + +* Thu Jul 18 2024 Fedora Release Engineering - 1.1-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed Jan 24 2024 Fedora Release Engineering - 1.1-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jan 20 2024 Fedora Release Engineering - 1.1-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Thu Jul 20 2023 Fedora Release Engineering - 1.1-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jan 19 2023 Fedora Release Engineering - 1.1-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Aug 05 2022 Sandro Mani - 1.1-23 +- Don't install guiddef.h for mingw + +* Thu Jul 21 2022 Fedora Release Engineering - 1.1-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Mar 25 2022 Sandro Mani - 1.1-21 +- Rebuild with mingw-gcc-12 + +* Thu Feb 24 2022 Sandro Mani - 1.1-20 +- Make mingw subpackages noarch + +* Sun Feb 20 2022 Sandro Mani - 1.1-19 +- Add mingw subpackege + +* Thu Jan 20 2022 Fedora Release Engineering - 1.1-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 1.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 1.1-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 1.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 1.1-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 1.1-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 1.1-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.1-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sun Feb 18 2018 Sandro Mani - 1.1-10 +- Add missing BR: gcc, make + +* Wed Feb 07 2018 Fedora Release Engineering - 1.1-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 1.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 1.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Sep 11 2015 Sandro Mani - 1.1-4 +- Fix typo in jxrlib_warnings.patch + +* Tue Sep 08 2015 Sandro Mani - 1.1-3 +- Add Patch0 and Source1 upstream links +- Ship pdf variant of JPEGXR_DPK_Spec_1.0.doc in %%doc +- Remove bin folder + +* Tue Sep 08 2015 Sandro Mani - 1.1-2 +- Comments for Patch0 and Source1 + +* Wed Sep 02 2015 Sandro Mani - 1.1-1 +- Initial package diff --git a/jxrlib_mingw.patch b/jxrlib_mingw.patch new file mode 100644 index 0000000..3b3e45d --- /dev/null +++ b/jxrlib_mingw.patch @@ -0,0 +1,94 @@ +diff -rupN jxrlib/common/include/wmspecstring.h jxrlib-new/common/include/wmspecstring.h +--- jxrlib/common/include/wmspecstring.h 2013-03-21 18:58:18.000000000 +0100 ++++ jxrlib-new/common/include/wmspecstring.h 2015-09-06 21:10:53.943039237 +0200 +@@ -334,7 +334,7 @@ void __pfx_assume(int, const char *); + + // Some CE versions don't have specstrings.h, some have very old version without + // __specstrings defined. So we handle CE separately in wmasalce.h +-#if defined(UNDER_CE) || defined(NO_WINDOWS) ++#if defined(UNDER_CE) || defined(NO_WINDOWS) || defined(MINGW) + #include "wmspecstringce.h" + #endif + +diff -rupN jxrlib/image/sys/ansi.h jxrlib-new/image/sys/ansi.h +--- jxrlib/image/sys/ansi.h 2013-03-28 18:34:06.000000000 +0100 ++++ jxrlib-new/image/sys/ansi.h 2015-09-06 21:18:54.051637086 +0200 +@@ -44,13 +44,9 @@ + //================================ + #define FORCE_INLINE + #define CDECL +-#if __LP64__ +-#define UINTPTR_T unsigned long long +-#define INTPTR_T long long +-#else +-#define UINTPTR_T unsigned int +-#define INTPTR_T int +-#endif ++#include ++#define UINTPTR_T uintptr_t ++#define INTPTR_T intptr_t + + + //================================ +diff -rupN jxrlib/image/sys/strcodec.h jxrlib-new/image/sys/strcodec.h +--- jxrlib/image/sys/strcodec.h 2015-09-06 02:21:20.337316724 +0200 ++++ jxrlib-new/image/sys/strcodec.h 2015-09-06 21:18:44.335483326 +0200 +@@ -40,7 +40,7 @@ + + //================================================================ + #ifdef ENABLE_OPTIMIZATIONS +-#if defined(WIN32) && !defined(_WIN64) ++#if defined(_MSC_VER) && !defined(_WIN64) + #define WMP_OPT_SSE2 + + #define WMP_OPT_CC_ENC +@@ -57,9 +57,9 @@ + + //================================================================ + //#ifdef WIN32 +-#if defined(WIN32) && !defined(UNDER_CE) // WIN32 seems to be defined always in VS2005 for ARM platform ++#if defined(_MSC_VER) && !defined(UNDER_CE) // WIN32 seems to be defined always in VS2005 for ARM platform + #define PLATFORM_X86 +-#include "..\x86\x86.h" ++#include "../x86/x86.h" + #endif + + #ifndef UNREFERENCED_PARAMETER +@@ -89,6 +89,7 @@ typedef unsigned __int64 U64; + + // The following macros depend on UINTPTR_T and INTPTR_T being properly defined + // so that they are equal to pointer width. Confirm and fail if our assumptions are wrong. ++ + CT_ASSERT(sizeof(UINTPTR_T) == sizeof(void*), strcodec1); + CT_ASSERT(sizeof(INTPTR_T) == sizeof(void*), strcodec2); + +@@ -450,7 +451,7 @@ typedef struct CWMImageStrCodec { + + struct WMPStream ** ppWStream; + +-#ifdef WIN32 ++#ifdef _MSC_VER + TCHAR **ppTempFile; + #else + char **ppTempFile; +diff -rupN jxrlib/jxrgluelib/JXRMeta.h jxrlib-new/jxrgluelib/JXRMeta.h +--- jxrlib/jxrgluelib/JXRMeta.h 2015-09-06 02:21:20.340316728 +0200 ++++ jxrlib-new/jxrgluelib/JXRMeta.h 2015-09-06 21:10:53.944039253 +0200 +@@ -28,7 +28,7 @@ + #pragma once + + #include +-#ifndef WIN32 ++#ifndef _MSC_VER + #include + #endif + +@@ -106,7 +106,7 @@ + #define WMP_valWMPhotoID WMP_valCompression + + +-#ifdef WIN32 ++#ifdef _MSC_VER + #define __in_win __in + #define __out_win __out + #endif diff --git a/jxrlib_warnings.patch b/jxrlib_warnings.patch new file mode 100644 index 0000000..f7b8175 --- /dev/null +++ b/jxrlib_warnings.patch @@ -0,0 +1,193 @@ +diff -rupN jxrlib/image/sys/common.h jxrlib-new/image/sys/common.h +--- jxrlib/image/sys/common.h 2013-03-21 17:30:54.000000000 +0100 ++++ jxrlib-new/image/sys/common.h 2015-09-03 10:31:06.528657911 +0200 +@@ -124,8 +124,8 @@ Void Adapt (CAdaptiveHuffman *pAdHuff, B + Void AdaptFixed (CAdaptiveHuffman *pAdHuff); + Void AdaptDiscriminant (CAdaptiveHuffman *pAdHuff); + +-#ifndef _PREFAST_ +-#pragma warning(disable:4068) +-#endif ++// #ifndef _PREFAST_ ++// #pragma warning(disable:4068) ++// #endif + + #endif // WMI_COMMON_H +diff -rupN jxrlib/image/sys/strcodec.c jxrlib-new/image/sys/strcodec.c +--- jxrlib/image/sys/strcodec.c 2013-03-20 19:16:21.000000000 +0100 ++++ jxrlib-new/image/sys/strcodec.c 2015-09-03 10:30:31.018971760 +0200 +@@ -668,9 +668,7 @@ ERR detach_SB(SimpleBitIO* pSB) + // WinCE ARM and Desktop x86 + #else + // other platform +-#ifdef _BIG__ENDIAN_ +-#define _byteswap_ulong(x) (x) +-#else // _BIG__ENDIAN_ ++#ifndef _BIG__ENDIAN_ + U32 _byteswap_ulong(U32 bits) + { + U32 r = (bits & 0xffu) << 24; +diff -rupN jxrlib/image/sys/strcodec.h jxrlib-new/image/sys/strcodec.h +--- jxrlib/image/sys/strcodec.h 2013-03-21 19:22:34.000000000 +0100 ++++ jxrlib-new/image/sys/strcodec.h 2015-09-03 10:30:31.019971779 +0200 +@@ -64,7 +64,7 @@ + + #ifndef UNREFERENCED_PARAMETER + #define UNREFERENCED_PARAMETER(P) { (P) = (P); } +-#endif UNREFERENCED_PARAMETER ++#endif // UNREFERENCED_PARAMETER + + #ifdef UNDER_CE + #define PLATFORM_WCE +@@ -673,6 +673,16 @@ void flushToByte(BitIOInfo* pIO); + pIO->cBitsUsed &= 16 - 1;\ + pIO->uiAccumulator = LOAD16(pIO->pbCurrent) << pIO->cBitsUsed;\ + return 0; +-// pIO->uiAccumulator = LOAD16(pIO->pbCurrent) & ((U32)(-1) >> pIO->cBitsUsed);\ + + void OutputPerfTimerReport(CWMImageStrCodec *pState); ++ ++#if (defined(WIN32) && !defined(UNDER_CE)) || (defined(UNDER_CE) && defined(_ARM_)) ++// WinCE ARM and Desktop x86 ++#else ++// other platform ++#ifdef _BIG__ENDIAN_ ++#define _byteswap_ulong(x) (x) ++#else // _BIG__ENDIAN_ ++U32 _byteswap_ulong(U32 bits); ++#endif // _BIG__ENDIAN_ ++#endif +\ No newline at end of file +diff -rupN jxrlib/jxrencoderdecoder/JxrDecApp.c jxrlib-new/jxrencoderdecoder/JxrDecApp.c +--- jxrlib/jxrencoderdecoder/JxrDecApp.c 2013-05-08 18:45:08.000000000 +0200 ++++ jxrlib-new/jxrencoderdecoder/JxrDecApp.c 2015-09-03 10:30:31.019971779 +0200 +@@ -423,7 +423,7 @@ ERR WmpDecAppCreateEncoderFromExt( + Call(GetTestEncodeIID(szExt, &pIID)); + + // Create encoder +- Call(PKTestFactory_CreateCodec(pIID, ppIE)); ++ Call(PKTestFactory_CreateCodec(pIID, (void**)ppIE)); + + Cleanup: + return err; +diff -rupN jxrlib/jxrencoderdecoder/JxrEncApp.c jxrlib-new/jxrencoderdecoder/JxrEncApp.c +--- jxrlib/jxrencoderdecoder/JxrEncApp.c 2013-05-28 20:58:22.000000000 +0200 ++++ jxrlib-new/jxrencoderdecoder/JxrEncApp.c 2015-09-03 10:30:31.020971798 +0200 +@@ -578,7 +578,7 @@ main(int argc, char* argv[]) + + //================================ + Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION)); +- Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, &pEncoder)); ++ Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, (void**)&pEncoder)); + + //---------------------------------------------------------------- + Call(PKCreateTestFactory(&pTestFactory, WMP_SDK_VERSION)); +diff -rupN jxrlib/jxrgluelib/JXRGlueJxr.c jxrlib-new/jxrgluelib/JXRGlueJxr.c +--- jxrlib/jxrgluelib/JXRGlueJxr.c 2013-03-20 20:01:13.000000000 +0100 ++++ jxrlib-new/jxrgluelib/JXRGlueJxr.c 2015-09-03 10:30:31.021971818 +0200 +@@ -28,6 +28,7 @@ + //*@@@---@@@@****************************************************************** + #include + #include ++#include + + + static const char szHDPhotoFormat[] = "image/vnd.ms-photo"; +diff -rupN jxrlib/jxrgluelib/JXRMeta.h jxrlib-new/jxrgluelib/JXRMeta.h +--- jxrlib/jxrgluelib/JXRMeta.h 2013-03-20 19:06:24.000000000 +0100 ++++ jxrlib-new/jxrgluelib/JXRMeta.h 2015-09-03 10:30:31.021971818 +0200 +@@ -34,7 +34,7 @@ + + #ifndef UNREFERENCED_PARAMETER + #define UNREFERENCED_PARAMETER(P) { (P) = (P); } +-#endif UNREFERENCED_PARAMETER ++#endif // UNREFERENCED_PARAMETER + + //================================================================ + // Container +diff -rupN jxrlib/jxrtestlib/JXRTest.c jxrlib-new/jxrtestlib/JXRTest.c +--- jxrlib/jxrtestlib/JXRTest.c 2013-03-19 20:06:18.000000000 +0100 ++++ jxrlib-new/jxrtestlib/JXRTest.c 2015-09-03 10:30:31.022971837 +0200 +@@ -198,7 +198,7 @@ ERR PKTestFactory_CreateDecoderFromFile( + ERR err = WMP_errSuccess; + + char *pExt = NULL; +- PKIID* pIID = NULL; ++ const PKIID* pIID = NULL; + + struct WMPStream* pStream = NULL; + PKImageDecode* pDecoder = NULL; +@@ -214,7 +214,7 @@ ERR PKTestFactory_CreateDecoderFromFile( + Call(CreateWS_File(&pStream, szFilename, "rb")); + + // Create decoder +- Call(PKTestFactory_CreateCodec(pIID, ppDecoder)); ++ Call(PKTestFactory_CreateCodec(pIID, (void**)ppDecoder)); + pDecoder = *ppDecoder; + + // attach stream to decoder +@@ -232,7 +232,7 @@ ERR PKCreateTestFactory(PKCodecFactory** + + UNREFERENCED_PARAMETER( uVersion ); + +- Call(PKAlloc(ppCFactory, sizeof(**ppCFactory))); ++ Call(PKAlloc((void**)ppCFactory, sizeof(**ppCFactory))); + pCFactory = *ppCFactory; + + pCFactory->CreateCodec = PKTestFactory_CreateCodec; +@@ -287,7 +287,7 @@ ERR PKTestDecode_Release( + + pID->fStreamOwner && pID->pStream->Close(&pID->pStream); + +- return PKFree(ppID); ++ return PKFree((void**)ppID); + } + + ERR PKTestDecode_Create( +@@ -296,7 +296,7 @@ ERR PKTestDecode_Create( + ERR err = WMP_errSuccess; + PKTestDecode* pID = NULL; + +- Call(PKAlloc(ppID, sizeof(**ppID))); ++ Call(PKAlloc((void**)ppID, sizeof(**ppID))); + + pID = *ppID; + pID->Initialize = PKTestDecode_Initialize; +diff -rupN jxrlib/jxrtestlib/JXRTestHdr.c jxrlib-new/jxrtestlib/JXRTestHdr.c +--- jxrlib/jxrtestlib/JXRTestHdr.c 2013-03-20 17:40:08.000000000 +0100 ++++ jxrlib-new/jxrtestlib/JXRTestHdr.c 2015-09-03 10:30:31.022971837 +0200 +@@ -27,7 +27,7 @@ + //*@@@---@@@@****************************************************************** + #ifndef ANSI + #define _CRT_SECURE_NO_WARNINGS +-#endif ANSI ++#endif // ANSI + + #include + #include +diff -rupN jxrlib/jxrtestlib/JXRTestPnm.c jxrlib-new/jxrtestlib/JXRTestPnm.c +--- jxrlib/jxrtestlib/JXRTestPnm.c 2013-03-19 22:43:44.000000000 +0100 ++++ jxrlib-new/jxrtestlib/JXRTestPnm.c 2015-09-03 10:30:31.023971856 +0200 +@@ -27,7 +27,7 @@ + //*@@@---@@@@****************************************************************** + #ifndef ANSI + #define _CRT_SECURE_NO_WARNINGS +-#endif ANSI ++#endif // ANSI + + #include + +diff -rupN jxrlib/jxrtestlib/JXRTestTif.c jxrlib-new/jxrtestlib/JXRTestTif.c +--- jxrlib/jxrtestlib/JXRTestTif.c 2013-03-19 20:17:12.000000000 +0100 ++++ jxrlib-new/jxrtestlib/JXRTestTif.c 2015-09-03 10:30:31.023971856 +0200 +@@ -909,8 +909,8 @@ ERR PKImageDecode_Release_TIF(PKTestDeco + + PKTestDecode *pID = *ppID; + +- Call(WMPFree(&pID->EXT.TIF.uStripOffsets)); +- Call(WMPFree(&pID->EXT.TIF.uStripByteCounts)); ++ Call(WMPFree((void**)&pID->EXT.TIF.uStripOffsets)); ++ Call(WMPFree((void**)&pID->EXT.TIF.uStripByteCounts)); + + Call(PKTestDecode_Release(ppID)); + diff --git a/sources b/sources index e69de29..c9867d9 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +e7e20a8afc305bf7a9c80359821abf26 JPEGXR_DPK_Spec_1.0.pdf +c0a6a4529cb687d127cf52b52f5ec848 jxrlib_1_1.tar.gz