Commit Graph

357 Commits

Author SHA1 Message Date
Ziqing Hui 6b4566dfe7 windowscodecs: Add more formats to get_bytes_per_block_from_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-07-20 11:44:56 +02:00
Ziqing Hui e74d39c32d windowscodecs: Introduce is_compressed(). And fix some format checks.
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-20 11:44:54 +02:00
Ziqing Hui 15f04f5779 windowscodecs/tests: Add tests for DDS images with fourCC which are also uncompressed.
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-20 11:44:52 +02:00
Ziqing Hui 0b676b55cc windowscodecs: Add more supported DXGI formats for DDS decoder. And return the actual formats for 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-07-20 11:44:50 +02:00
Ziqing Hui c801bde2f0 windowscodecs/tests: Add more RGB images for DDS tests.
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-20 11:44:47 +02:00
Ziqing Hui 4e56d3e650 windowscodecs: Add support for decoding uncompressed DDS image.
For uncompressed DDS image, "a block" means a pixel.

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-17 13:25:08 +02:00
Ziqing Hui 31991b2d10 windowscodecs/tests: Add tests for decoding uncompressed DDS 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-17 13:25:08 +02:00
Ziqing Hui f98a32ad47 windowscodecs: Return fail for unsupported format in DdsDecoder_Initialize().
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-17 13:25:08 +02:00
Ziqing Hui 2b2341cb36 windowscodecs/tests: Add tests for DdsDecoder_Wine_Initialize().
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-13 21:26:16 +02:00
Ziqing Hui 82d90fc2a1 windowscodecs: Implement DdsFrameDecode_GetPixelFormat().
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-01 10:17:12 +02:00
Ziqing Hui 7b24d3efc7 windowscodecs/tests: Format ok() message for tests/ddsformat.c.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-22 16:43:12 +02:00
Ziqing Hui a2fa0e76b1 windowscodecs: Fix MIME types of DDS decoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 11:42:12 +02:00
Ziqing Hui f69619791d windowscodecs/tests: Add decoder info tests for DDS decoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 11:42:08 +02:00
Ziqing Hui 67a50f1252 windowscodecs/tests: Add tests for DdsFrameDecode_GetPixelFormat().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 11:42:06 +02:00
Ziqing Hui fed3784ab0 windowscodecs: Implement DdsFrameDecode_Dds_CopyBlocks().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 08:32:04 +02:00
Ziqing Hui e51a707487 windowscodecs/tests: Add more tests for DdsFrameDecode_Dds_CopyBlocks() when "boundsInBlocks" is NULL.
The added tests shows that when boundsInBlocks parameter is NULL,
stride parameter will be checked to ensure it is bigger or equal to
frame stride, but it will be ignored in the call. This can be proved
by:

* CopyBlocks(NULL, frame_stride - 1, sizeof(buffer), buffer) return
error.

* CopyBlocks(NULL, frame_stride, sizeof(buffer), buffer) and
CopyBlocks(NULL, frame_stride * 2, sizeof(buffer), buffer) works fine
and result in same buffer content.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 08:31:46 +02:00
Ziqing Hui 71e92c029a windowscodecs/tests: Add a DXT3 test image for DDS decoder.
We only tested DXT1 images with 1 blocks before. That's not enough.
Also, for CopyBlocks(), when boundsInBlocks parameter is NULL, the
stride should be the stride of the frame itself.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-10 08:31:42 +02:00
Ziqing Hui ac1adfc512 windowscodecs/tests: Add more tests for DdsFrameDecode_Dds_CopyBlocks().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 19:30:42 +02:00
Ziqing Hui b3eabfdd93 windowscodecs: Add tests for DdsFrameDecode_Dds_CopyBlocks().
Some code in test_dds_decoder_frame_properties() are moved to
test_dds_decoder_frame() bacause there are some same code in
test_dds_decoder_frame_properties() and test_dds_decoder_frame_data().

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-03 22:55:03 +02:00
Ziqing Hui a31cadae42 windowscodecs: Implement DdsFrameDecode_Dds_GetSizeInBlocks().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Ziqing Hui 81da1f6b5d windowscodecs/tests: Add tests for DdsFrameDecode_Dds_GetSizeInBlocks().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Ziqing Hui 2e39b43c5d windowscodecs: Implement DdsFrameDecode_Dds_GetFormatInfo().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Ziqing Hui febf29ba9d windowscodecs/tests: Add tests for DdsFrameDecode_Dds_GetFormatInfo().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Ziqing Hui 0d263f9fda windowscodecs: Check NULL parameters for DdsFrameDecode_GetSize().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-01 22:10:28 +02:00
Ziqing Hui 9a6108cf43 windowscodecs: Implement DdsFrameDecode_GetSize().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Esme Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 10:45:36 +02:00
Ziqing Hui ff9b2936ed windowscodecs/tests: Add tests for DdsDecoder_GetFrame() and DdsFrameDecode_GetSize().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-22 19:50:47 +02:00
Francois Gouget fe2435c93f windowscodecs/tests: Fix the spelling of a couple of variable names.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 11:52:33 +02:00
Ziqing Hui d622b134dd windowsccodecs: Implement DdsDecoder_Dds_GetParameters().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 08:48:15 +02:00
Ziqing Hui a9c70877f3 windowscodecs/tests: Add tests for IWICDdsDecoder_GetParameters().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 08:48:10 +02:00
Dmitry Timoshkov c1d02a5fdf windowscodecs/tests: Add the tests for GIF encoder and decoder.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 21:36:12 +02:00
Ziqing Hui 79664eb1cf windowscodecs: Implement DdsDecoder_GetFrameCount().
The added tests code is to test the return value of
DdsDecoder_GetFrameCount() when decoder is not initialized or
parameter is NULL.

Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 20:20:15 +02:00
Dmitry Timoshkov 962bb99352 windowscodecs/tests: Add a separate test for 4bps BGRA TIFF format.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:35:06 +02:00
Dmitry Timoshkov d9ac191542 windowscodecs/tests: Add some tests for various TIFF color formats.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:35:03 +02:00
Ziqing Hui 3d247caab5 windowscodecs/tests: Add tests for DdsDecoder_GetFrameCount().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:34:49 +02:00
Ziqing Hui ceddeadc14 windowscodecs/tests: Add more DDS test images.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:34:44 +02:00
Jacek Caban 27c4648507 windowscodecs: Provide UUIDs in importlib.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 19:32:46 +02:00
Ziqing Hui b34d4bdcb8 windowscodecs/tests: Avoid using SUCCEEDED() and FAILED() in ddsformat.c.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:23 +02:00
Ziqing Hui f634aa2836 windowscodecs: Implement global property functions for DdsDecoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:20 +02:00
Ziqing Hui f74797d3da windowscodecs/tests: Add tests for global properties of DdsDecoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 21:50:16 +02:00
Ziqing Hui 8467b61a3e windowscodecs: Implement DdsDecoder_Initialize().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Ziqing Hui e167f90eca windowscodecs/tests: Add tests for DdsDecoder_Initialize().
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Ziqing Hui 9e81463de9 windowscodecs: Implement stub for DdsDecoder.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 22:53:48 +02:00
Ziqing Hui 66a82d2595 windowscodecs/tests: Add tests for DDS format.
Signed-off-by: Ziqing Hui <zhui@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 22:53:48 +02:00
Vincent Povirk 4f53be1a6e windowscodecs: Set palette in WriteSource when necessary.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 20:27:55 +01:00
Vincent Povirk 9891afcb68 windowscodecs/tests: Add test for WriteSource with indexed formats.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 20:27:55 +01:00
Nikolay Sivov 5f6851fb29 wincodecs: Return WINCODEC_ERR_PALETTEUNAVAILABLE for jpeg decoder frame.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 20:47:45 +01:00
Nikolay Sivov ec51875730 wincodecs: Add 32RGBA -> 24BGR conversion path.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-02 16:22:06 +01:00
Vincent Povirk 546ab20cf3 windowscodecs: Fix tiffformat test on current Windows 10.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 09:34:48 +01:00
Vincent Povirk 98c2c9a9c9 windowscodecs: Implement IWICStream_Commit.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 21:45:43 +02:00
Vincent Povirk f704c36568 windowscodecs/tests: Expect success from IWICStream_Commit.
Windows 10 implemented this.

Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 21:45:40 +02:00