Commit Graph

1025 Commits

Author SHA1 Message Date
Esme Povirk 764a93f121 windowscodecs: Fix allocation in tiff_decoder_get_metadata_blocks.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 21:45:35 +01:00
Esme Povirk 466bec7c16 windowscodecs: Fix memory leak in common decoder.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50140
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 21:45:28 +01:00
Esme Povirk 665ab72fca windowscodecs: Move PNG encoding to the unix lib.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 21:06:17 +01:00
Esme Povirk 19033430ae windowscodecs: Start interface for unix encoders.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 20:27:22 +01:00
Ziqing Hui 3b531c06e0 windowscodecs: Correctly set pixel format of uncompressed DDS with extended header.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 10:53:25 +01:00
Esme Povirk c837215382 windowscodecs: Move jpeg decoding to the unix lib.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 10:47:41 +01:00
Esme Povirk 6abf518ece windowscodecs: Move TIFF decoding to unix lib.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 20:25:40 +01:00
Olivier F. R. Dierick 195d0b5308 windowscodecs: Include system header png.h before Windows headers.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50050
Signed-off-by: Olivier F. R. Dierick <o.dierick@piezo-forte.be>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-25 21:01:24 +01:00
Jan Sikorski 9668d44f4d windowscodecs/tests: Add 32bppRGBA/BGRA converter tests.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 20:22:52 +02:00
Jan Sikorski c5b351c35d windowscodecs: Add 32bppRGBA to 32bppBGRA copy.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 20:22:39 +02:00
Jan Sikorski f3752eb58f windowscodecs: Add a missing FIXME.
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-23 20:22:34 +02:00
Esme Povirk 1b37ac14a3 windowscodecs: Add a general wrapper around the decoder interface.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:56:29 +02:00
Esme Povirk cd778e0b7f windowscodecs: Do not call png_read_end.
This isn't necessary because we do not use libpng to read metadata
or verify checksums. If this happens to be the last thing we do,
it will fail the pngformat tests which do not expect us to return
with the stream seeked to the end of the file.

Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:56:29 +02:00
Esme Povirk 980e6650db windowscodecs: Use unix lib to get PNG color contexts.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:56:29 +02:00
Esme Povirk 70ea6485e8 windowscodecs: Use the unix library to find PNG metadata.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:56:29 +02:00
Esme Povirk 53ce545e69 windowscodecs: Move PNG CopyPixels to unix lib.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:56:29 +02:00
Esme Povirk 8b849e814b windowscodecs: Get PNG frame information from unix lib.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:56:29 +02:00
Esme Povirk 6aa8e17975 windowscodecs: Start loading PNG in unix lib.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:56:29 +02:00
Esme Povirk 0f61ed18ef windowscodecs: Add a unix library and start to use it for PNG.
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-19 14:56:29 +02:00
Michael Stefaniuc 55c9849242 windowscodecs/tests: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:02:10 +02:00
Rémi Bernon fae839e49a windowscodecs: Support JXR/WMP detection and formats.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:01:58 +02:00
Rémi Bernon 31859ff023 windowscodecs/tests: Add a simple JXR/WMP test case.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:01:56 +02:00
Ziqing Hui e8a45561c8 windowscodecs: Correctly set output frame size for WriteSource().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:36 +02:00
Ziqing Hui 0ceb07b75b windowscodecs/tests: Add tests for calling WriteSource() without calling SetSize() prior to it.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:34 +02:00
Ziqing Hui e216385fa7 windowscodecs: Add more supported formats and fix RGB masks for RGBA1010102.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-28 10:41:12 +02:00
Ziqing Hui abd7454ecc windowscodecs: Correctly set pixel format of uncompressed DDS images.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-28 10:41:11 +02:00
Ziqing Hui e7abfd6f30 windowscodecs: Support uncompressed format in DdsFrameDecode_CopyPixels().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-28 10:41:08 +02:00
Ziqing Hui fa398d6ec0 windowscodecs: Fix DdsFrameDecode_Dds_CopyBlocks().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-28 10:41:06 +02:00
Ziqing Hui 87ddb4ba37 windowscodecs/tests: Fix tests for CopyBlocks.
Using strncmp() to compare pixel data buffer leads to incorrect tests.
Also, we should clear the pixel data buffer before editing and comparing them.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-28 10:41:04 +02:00
Ziqing Hui 64c7d59ee9 windowscodecs/tests: Add CopyPixels data tests for uncompressed images.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:44 +02:00
Ziqing Hui f39fd206b5 windowscodecs: Remove get_pixel_format_bpp().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Ziqing Hui 80ae60ca26 windowscodecs/tests: Add pixel format bpp to test_data.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Ziqing Hui adef0fc971 windowscodecs/tests: Introduce is_compressed().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Ziqing Hui 6c0c5e9c5b windowscodecs/tests: Expect actual WIC formats for uncompressed image.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Ziqing Hui a017f701f3 windowscodecs: Introduce get_dds_format() to replace get_dxgi_format().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Ziqing Hui 79e6c5d8a1 windowscodecs: Add WIC pixel format information to struct dds_format.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Ziqing Hui 60f1fe59a9 windowscodecs: Introduce decode_block() for DdsFrameDecode_CopyPixels().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Ziqing Hui 3f082762f8 windowscodecs: More complete implementation of DdsFrameDecode_CopyPixels().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Ziqing Hui 1b4318b14c windowscodecs: In struct DdsFrameDecode, add a new member "pixel_data" and rename member "data" to "block_data".
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Ziqing Hui ba913316ad windowscodecs: Add a lock for DdsFrameDecode.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Ziqing Hui c525dae7ab windowscodecs/tests: Add macro BLOCK_WIDTH and BLOCK_HEIGHT.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 21:30:46 +02:00
Ziqing Hui b447bd97e5 windowscodecs/tests: Merge decode_bc*() into a single function.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 21:30:44 +02:00
Ziqing Hui 8e59928778 windowscodecs/tests: Add tests for decoding BC3 format.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 21:30:43 +02:00
Ziqing Hui e23516daf2 windowscodecs/tests: Add tests for decoding BC2 format.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 21:30:41 +02:00
Ziqing Hui 5e000b1830 windowscodecs/tests: Fix a variable name typo in decode_bc1().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 21:30:39 +02:00
Ziqing Hui 6b5579b65f windowscodecs/tests: Add tests for decoding BC1 format.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:37:21 +02:00
Ziqing Hui f178907850 windowscodecs: Add tests and initial implementation for DdsFrameDecode_CopyPixels().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:37:19 +02:00
Ziqing Hui bec58b5e9c windowscodecs: Introduce get_pixel_format_bpp().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 21:37:17 +02:00
Ziqing Hui 72ad4e7dc1 windowscodecs: Fix alpha mode of DXT3 and DXT5 image.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 10:17:00 +02:00
Ziqing Hui 2d0480ecc3 windowscodecs/tests: Add more compressed test DDS images.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-24 10:16:58 +02:00