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
Ziqing Hui
da0fc29042
windowscodecs/tests: Add tests for alpha and luminance 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:16:56 +02:00
Ziqing Hui
0703005948
windowscodecs/tests: Rename test_dds_bgr565 to test_dds_rgb565.
...
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-22 22:18:37 +02:00
Ziqing Hui
33406cd357
windowscodecs/tests: Simplify init_decoder().
...
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-22 22:18:35 +02:00
Ziqing Hui
7ca07bc8af
windowscodecs/tests: Remove the test data in test_dds_decoder_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-22 22:18:25 +02:00
Ziqing Hui
2683be090b
windowscodecs: Add support for decoding cube maps.
...
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:45:00 +02:00
Ziqing Hui
bc805bbcd9
windowscodecs/tests: Add tests for cube maps.
...
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:58 +02:00
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
81405aa86d
windowscodecs: Use IWICWineDecoder_Initialize() to initialize decoders in find_decoder().
...
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:24:53 +02:00
Ziqing Hui
9ac21b7e1e
windowscodecs: Implement DdsDecoder_Wine_Initialize().
...
Code in DdsDecoder_Initialize() are moved to DdsDecoder_Wine_Initialize().
And DdsDecoder_Initialize() are implemented on top of 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-17 11:02:18 +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
d7ef1cd82c
windowscodecs: Add IWICWineDecoder stub for DDS decoder.
...
Initializing cube map and uncompressed DDS is not supported in WIC.
But we would like to use them in other part of wine. So we introduce
a Wine-specific interface to initialize 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-07-13 21:22:14 +02:00
Ziqing Hui
43788707ce
windowscodecs: Remove header and header_dxt10 in struct DdsDecoder.
...
This make dds_info become the only dependence of implementation.
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:22:14 +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