[PATCH 0/5] MR10467: iyuv/tests: Add stub DLL and tests.
This MR adds a stub for the `iyuv_32.dll` and tests its functionality. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10467
From: Brendan McGrath <bmcgrath@codeweavers.com> --- configure | 2 + configure.ac | 1 + dlls/iyuv_32/Makefile.in | 6 ++ dlls/iyuv_32/iyuv.c | 184 ++++++++++++++++++++++++++++++++++++ dlls/iyuv_32/iyuv_32.rc | 29 ++++++ dlls/iyuv_32/iyuv_32.spec | 1 + dlls/iyuv_32/iyuv_private.h | 34 +++++++ loader/wine.inf.in | 2 + po/ar.po | 4 + po/ast.po | 4 + po/bg.po | 4 + po/ca.po | 4 + po/cs.po | 4 + po/da.po | 4 + po/de.po | 4 + po/el.po | 4 + po/en.po | 4 + po/en_US.po | 4 + po/eo.po | 4 + po/es.po | 4 + po/fa.po | 4 + po/fi.po | 4 + po/fr.po | 4 + po/he.po | 4 + po/hi.po | 4 + po/hr.po | 4 + po/hu.po | 4 + po/it.po | 4 + po/ja.po | 4 + po/ka.po | 4 + po/ko.po | 4 + po/lt.po | 4 + po/ml.po | 4 + po/nb_NO.po | 4 + po/nl.po | 4 + po/or.po | 4 + po/pa.po | 4 + po/pl.po | 4 + po/pt_BR.po | 4 + po/pt_PT.po | 4 + po/rm.po | 4 + po/ro.po | 4 + po/ru.po | 4 + po/si.po | 4 + po/sk.po | 4 + po/sl.po | 4 + po/sr_RS@cyrillic.po | 4 + po/sr_RS@latin.po | 4 + po/sv.po | 4 + po/ta.po | 4 + po/te.po | 4 + po/th.po | 4 + po/tr.po | 4 + po/uk.po | 4 + po/wa.po | 4 + po/wine.pot | 4 + po/zh_CN.po | 4 + po/zh_TW.po | 4 + 58 files changed, 459 insertions(+) create mode 100644 dlls/iyuv_32/Makefile.in create mode 100644 dlls/iyuv_32/iyuv.c create mode 100644 dlls/iyuv_32/iyuv_32.rc create mode 100644 dlls/iyuv_32/iyuv_32.spec create mode 100644 dlls/iyuv_32/iyuv_private.h diff --git a/configure b/configure index 981fb77c455..1c4d778ad53 100755 --- a/configure +++ b/configure @@ -1237,6 +1237,7 @@ enable_ir50_32 enable_irprops_cpl enable_itircl enable_itss +enable_iyuv_32 enable_joy_cpl enable_jscript enable_jsproxy @@ -23763,6 +23764,7 @@ wine_fn_config_makefile dlls/irprops.cpl enable_irprops_cpl wine_fn_config_makefile dlls/itircl enable_itircl wine_fn_config_makefile dlls/itss enable_itss wine_fn_config_makefile dlls/itss/tests enable_tests +wine_fn_config_makefile dlls/iyuv_32 enable_iyuv_32 wine_fn_config_makefile dlls/joy.cpl enable_joy_cpl wine_fn_config_makefile dlls/jscript enable_jscript wine_fn_config_makefile dlls/jscript/tests enable_tests diff --git a/configure.ac b/configure.ac index 9a437851996..953edcce7b9 100644 --- a/configure.ac +++ b/configure.ac @@ -2880,6 +2880,7 @@ WINE_CONFIG_MAKEFILE(dlls/irprops.cpl) WINE_CONFIG_MAKEFILE(dlls/itircl) WINE_CONFIG_MAKEFILE(dlls/itss) WINE_CONFIG_MAKEFILE(dlls/itss/tests) +WINE_CONFIG_MAKEFILE(dlls/iyuv_32) WINE_CONFIG_MAKEFILE(dlls/joy.cpl) WINE_CONFIG_MAKEFILE(dlls/jscript) WINE_CONFIG_MAKEFILE(dlls/jscript/tests) diff --git a/dlls/iyuv_32/Makefile.in b/dlls/iyuv_32/Makefile.in new file mode 100644 index 00000000000..e1899cc5a43 --- /dev/null +++ b/dlls/iyuv_32/Makefile.in @@ -0,0 +1,6 @@ +MODULE = iyuv_32.dll +IMPORTS = winegstreamer user32 mfplat mfuuid ole32 + +SOURCES = \ + iyuv.c \ + iyuv_32.rc diff --git a/dlls/iyuv_32/iyuv.c b/dlls/iyuv_32/iyuv.c new file mode 100644 index 00000000000..d1ebd4d383a --- /dev/null +++ b/dlls/iyuv_32/iyuv.c @@ -0,0 +1,184 @@ +/* + * iyuv Video "Decoder" + * Copyright 2026 Brendan McGrath for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + */ + +#include <stdarg.h> +#include <stdlib.h> +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "commdlg.h" +#include "vfw.h" +#include "initguid.h" +#include "wmcodecdsp.h" +#include "iyuv_private.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(iyuv_32); + +static HINSTANCE IYUV_32_hModule; + +static LRESULT IYUV_Open( const ICINFO *icinfo ) +{ + FIXME("DRV_OPEN %p\n", icinfo); + + return 0; +} + +static LRESULT IYUV_DecompressQuery( const BITMAPINFOHEADER *in, const BITMAPINFOHEADER *out ) +{ + FIXME("ICM_DECOMPRESS_QUERY %p %p\n", in, out); + + return ICERR_UNSUPPORTED; +} + +static LRESULT IYUV_DecompressGetFormat( BITMAPINFOHEADER *in, BITMAPINFOHEADER *out ) +{ + FIXME("ICM_DECOMPRESS_GETFORMAT %p %p\n", in, out); + + return ICERR_UNSUPPORTED; +} + +static LRESULT IYUV_DecompressBegin( IMFTransform *transform, const BITMAPINFOHEADER *in, const BITMAPINFOHEADER *out ) +{ + FIXME("ICM_DECOMPRESS_BEGIN %p %p %p\n", transform, in, out); + + return ICERR_UNSUPPORTED; +} + +static LRESULT IYUV_Decompress( IMFTransform *transform, const ICDECOMPRESS *params ) +{ + FIXME("ICM_DECOMPRESS %p %p\n", transform, params); + + return ICERR_UNSUPPORTED; +} + +static LRESULT IYUV_GetInfo( ICINFO *icinfo, DWORD dwSize ) +{ + FIXME("ICM_GETINFO %p %lu\n", icinfo, dwSize); + + return ICERR_UNSUPPORTED; +} + +/*********************************************************************** + * DriverProc (IYUV_32.@) + */ +LRESULT WINAPI IYUV_DriverProc( DWORD_PTR dwDriverId, HDRVR hdrvr, UINT msg, + LPARAM lParam1, LPARAM lParam2 ) +{ + IMFTransform *transform = (IMFTransform *) dwDriverId; + LRESULT r = ICERR_UNSUPPORTED; + + TRACE("%Id %p %04x %08Ix %08Ix\n", dwDriverId, hdrvr, msg, lParam1, lParam2); + + switch( msg ) + { + case DRV_LOAD: + TRACE("DRV_LOAD\n"); + r = TRUE; + break; + + case DRV_OPEN: + r = IYUV_Open((ICINFO *)lParam2); + break; + + case DRV_CLOSE: + TRACE("DRV_CLOSE\n"); + if ( transform ) + IMFTransform_Release( transform ); + r = TRUE; + break; + + case DRV_ENABLE: + case DRV_DISABLE: + case DRV_FREE: + break; + + case ICM_GETINFO: + r = IYUV_GetInfo( (ICINFO *) lParam1, (DWORD) lParam2 ); + break; + + case ICM_DECOMPRESS_QUERY: + r = IYUV_DecompressQuery( (BITMAPINFOHEADER *)lParam1, (BITMAPINFOHEADER *)lParam2 ); + break; + + case ICM_DECOMPRESS_GET_FORMAT: + r = IYUV_DecompressGetFormat( (BITMAPINFOHEADER*) lParam1, (BITMAPINFOHEADER*) lParam2 ); + break; + + case ICM_DECOMPRESS_GET_PALETTE: + FIXME("ICM_DECOMPRESS_GET_PALETTE\n"); + break; + + case ICM_DECOMPRESS: + r = IYUV_Decompress( transform, (ICDECOMPRESS *)lParam1 ); + break; + + case ICM_DECOMPRESS_BEGIN: + r = IYUV_DecompressBegin( transform, (BITMAPINFOHEADER *)lParam1, (BITMAPINFOHEADER *)lParam2 ); + break; + + case ICM_DECOMPRESS_END: + r = ICERR_OK; + break; + + case ICM_DECOMPRESSEX_QUERY: + case ICM_DECOMPRESSEX_BEGIN: + case ICM_DECOMPRESSEX: + case ICM_DECOMPRESSEX_END: + /* unsupported */ + break; + + case ICM_COMPRESS_QUERY: + r = ICERR_BADFORMAT; + /* fall through */ + case ICM_COMPRESS_GET_FORMAT: + case ICM_COMPRESS_END: + case ICM_COMPRESS: + FIXME("compression not implemented\n"); + break; + + case ICM_CONFIGURE: + break; + + default: + FIXME("Unknown message: %04x %Id %Id\n", msg, lParam1, lParam2); + } + + return r; +} + +/*********************************************************************** + * DllMain + */ +BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved) +{ + TRACE("(%p,%lu,%p)\n", hModule, dwReason, lpReserved); + + switch (dwReason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hModule); + IYUV_32_hModule = hModule; + break; + } + return TRUE; +} diff --git a/dlls/iyuv_32/iyuv_32.rc b/dlls/iyuv_32/iyuv_32.rc new file mode 100644 index 00000000000..a9705a2bd76 --- /dev/null +++ b/dlls/iyuv_32/iyuv_32.rc @@ -0,0 +1,29 @@ +/* + * Copyright 2026 Brendan McGrath for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "iyuv_private.h" + +#pragma makedep po + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT + +STRINGTABLE +{ + IDS_NAME "IYUV codec" + IDS_DESCRIPTION "IYUV codec" +} diff --git a/dlls/iyuv_32/iyuv_32.spec b/dlls/iyuv_32/iyuv_32.spec new file mode 100644 index 00000000000..a0c64b96696 --- /dev/null +++ b/dlls/iyuv_32/iyuv_32.spec @@ -0,0 +1 @@ +@ stdcall -private DriverProc(long long long long long) IYUV_DriverProc diff --git a/dlls/iyuv_32/iyuv_private.h b/dlls/iyuv_32/iyuv_private.h new file mode 100644 index 00000000000..00b5a577c9f --- /dev/null +++ b/dlls/iyuv_32/iyuv_private.h @@ -0,0 +1,34 @@ +/* + * Copyright 2026 Brendan McGrath for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __IYUV_PRIVATE_H +#define __IYUV_PRIVATE_H + +#include "windef.h" + +#define COBJMACROS +#include "mfapi.h" +#include "mferror.h" +#include "mfobjects.h" +#include "mfidl.h" +#include "mftransform.h" + +#define IDS_NAME 100 +#define IDS_DESCRIPTION 101 + +#endif /* __IYUV_PRIVATE_H */ diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 8c58fb781e4..fc3f085e68b 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -887,6 +887,8 @@ system.ini, drivers32,,"vidc.mrle=msrle32.dll" system.ini, drivers32,,"vidc.msvc=msvidc32.dll" system.ini, drivers32,,"vidc.cvid=iccvid.dll" system.ini, drivers32,,"vidc.IV50=ir50_32.dll" +system.ini, drivers32,,"vidc.i420=iyuv_32.dll" +system.ini, drivers32,,"vidc.iyuv=iyuv_32.dll" system.ini, drivers32,,"; vidc.IV31=ir32_32.dll" system.ini, drivers32,,"; vidc.IV32=ir32_32.dll" diff --git a/po/ar.po b/po/ar.po index 948203a132c..a6cc2464efe 100644 --- a/po/ar.po +++ b/po/ar.po @@ -3857,6 +3857,10 @@ msgstr "الفهرس" msgid "Indeo Video Interactive version 5 video codec" msgstr "ترميز واين المرئي الأول" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "مقابض اللعب" diff --git a/po/ast.po b/po/ast.po index 48a285bc84e..ef4696b4afa 100644 --- a/po/ast.po +++ b/po/ast.po @@ -3818,6 +3818,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Códec de videu Indeo Video Interactive versión 5" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Joysticks" diff --git a/po/bg.po b/po/bg.po index 64749df702d..ca1364188ad 100644 --- a/po/bg.po +++ b/po/bg.po @@ -3860,6 +3860,10 @@ msgstr "&Съдържание" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine MS-RLE видео кодек" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/ca.po b/po/ca.po index 390f85814e0..183c8e70746 100644 --- a/po/ca.po +++ b/po/ca.po @@ -3843,6 +3843,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Còdec de vídeo Indeo Video Interactive versió 5" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Palanques de control" diff --git a/po/cs.po b/po/cs.po index 38e79ee7e71..3eec4c20606 100644 --- a/po/cs.po +++ b/po/cs.po @@ -3805,6 +3805,10 @@ msgstr "Rejstřík" msgid "Indeo Video Interactive version 5 video codec" msgstr "Videokodek Wine Video 1" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Pákové ovladače" diff --git a/po/da.po b/po/da.po index 0e81d78006d..7aeddfb3b92 100644 --- a/po/da.po +++ b/po/da.po @@ -3886,6 +3886,10 @@ msgstr "Indeks" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine Video 1 videokodeks" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/de.po b/po/de.po index c14163ec960..2a39ad6b8e6 100644 --- a/po/de.po +++ b/po/de.po @@ -3834,6 +3834,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Indeo-Video-Interactive Version 5 Videocodec" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Joysticks" diff --git a/po/el.po b/po/el.po index 810506c74d5..5e521d44ede 100644 --- a/po/el.po +++ b/po/el.po @@ -3767,6 +3767,10 @@ msgstr "" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/en.po b/po/en.po index 68310b2ea99..c8d2a47423e 100644 --- a/po/en.po +++ b/po/en.po @@ -3802,6 +3802,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Indeo Video Interactive version 5 video codec" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Joysticks" diff --git a/po/en_US.po b/po/en_US.po index 4fdbd6362ec..4a08d3919ae 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -3802,6 +3802,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Indeo Video Interactive version 5 video codec" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Joysticks" diff --git a/po/eo.po b/po/eo.po index f0311332a93..83460efd8e2 100644 --- a/po/eo.po +++ b/po/eo.po @@ -3770,6 +3770,10 @@ msgstr "Indekso" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/es.po b/po/es.po index 3c2e01f1192..fec575d2ab4 100644 --- a/po/es.po +++ b/po/es.po @@ -3848,6 +3848,10 @@ msgstr "Índice" msgid "Indeo Video Interactive version 5 video codec" msgstr "Códec de vídeo Wine Video 1" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Comando de juego" diff --git a/po/fa.po b/po/fa.po index 028796cbff1..4a622265a26 100644 --- a/po/fa.po +++ b/po/fa.po @@ -3792,6 +3792,10 @@ msgstr "" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/fi.po b/po/fi.po index cb10cc55610..9e937bbb881 100644 --- a/po/fi.po +++ b/po/fi.po @@ -3799,6 +3799,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Indeo Video Interactive versio 5 -videokoodekki" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Joystickit" diff --git a/po/fr.po b/po/fr.po index bf67d3cd4be..ff4d706d781 100644 --- a/po/fr.po +++ b/po/fr.po @@ -3855,6 +3855,10 @@ msgstr "Index" msgid "Indeo Video Interactive version 5 video codec" msgstr "Codec vidéo Wine Video 1" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Joysticks" diff --git a/po/he.po b/po/he.po index e83cb17bd79..ea476c6b5fc 100644 --- a/po/he.po +++ b/po/he.po @@ -3847,6 +3847,10 @@ msgstr "מפתח" msgid "Indeo Video Interactive version 5 video codec" msgstr "מקודד הווידאו Video 1 של Wine" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/hi.po b/po/hi.po index c120d383cdf..0d12a5b2b80 100644 --- a/po/hi.po +++ b/po/hi.po @@ -3720,6 +3720,10 @@ msgstr "" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/hr.po b/po/hr.po index b5b5ec0d321..a3389a4d8a9 100644 --- a/po/hr.po +++ b/po/hr.po @@ -3860,6 +3860,10 @@ msgstr "Indeks" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine Video 1 video codec" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Joystici" diff --git a/po/hu.po b/po/hu.po index 14e233f57b1..98e8b86a85d 100644 --- a/po/hu.po +++ b/po/hu.po @@ -3902,6 +3902,10 @@ msgstr "&Témakörök" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine Video 1 video kodek" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/it.po b/po/it.po index a32bca4b6c5..406c2ea1b80 100644 --- a/po/it.po +++ b/po/it.po @@ -3910,6 +3910,10 @@ msgstr "Indice" msgid "Indeo Video Interactive version 5 video codec" msgstr "Codec Video Wine Video 1" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/ja.po b/po/ja.po index 787d2e28365..393b0c15e0e 100644 --- a/po/ja.po +++ b/po/ja.po @@ -3796,6 +3796,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Indeo Video Interactive バージョン 5 ビデオ コーデック" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "ジョイスティック" diff --git a/po/ka.po b/po/ka.po index 2f2af8a52f7..f9cf467a76e 100644 --- a/po/ka.po +++ b/po/ka.po @@ -3810,6 +3810,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "ვიდეო კოდეკი Indeo Video Interactive version 5" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "ჯოისტიკები" diff --git a/po/ko.po b/po/ko.po index 12a8f482934..07d9cfb3a8a 100644 --- a/po/ko.po +++ b/po/ko.po @@ -3785,6 +3785,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Indeo Video Interactive 버전 5 비디오 코덱" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "조이스틱" diff --git a/po/lt.po b/po/lt.po index 5b557738368..78ed3d10ea1 100644 --- a/po/lt.po +++ b/po/lt.po @@ -3809,6 +3809,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Indeo Video 5 interaktyvus vaizdo kodekas" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Vairasvirtės" diff --git a/po/ml.po b/po/ml.po index 1d238c005fe..2d62f1545c3 100644 --- a/po/ml.po +++ b/po/ml.po @@ -3724,6 +3724,10 @@ msgstr "" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/nb_NO.po b/po/nb_NO.po index 2bb1867be24..363a77f9630 100644 --- a/po/nb_NO.po +++ b/po/nb_NO.po @@ -3840,6 +3840,10 @@ msgstr "Innhold" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine Video 1 videokodeks" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Styrespaker" diff --git a/po/nl.po b/po/nl.po index dcd65b8698e..f2c183897ea 100644 --- a/po/nl.po +++ b/po/nl.po @@ -3815,6 +3815,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Indeo Video Interactive versie 5 video codec" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Joysticks" diff --git a/po/or.po b/po/or.po index 675c8f5b3a9..0ef48ac832f 100644 --- a/po/or.po +++ b/po/or.po @@ -3720,6 +3720,10 @@ msgstr "" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/pa.po b/po/pa.po index 81d2074e2c2..b2a57f8742f 100644 --- a/po/pa.po +++ b/po/pa.po @@ -3720,6 +3720,10 @@ msgstr "" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/pl.po b/po/pl.po index cecb6f4486e..691cc14b1da 100644 --- a/po/pl.po +++ b/po/pl.po @@ -3824,6 +3824,10 @@ msgstr "Indeo 5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Kodek Indeo Video Interactive w wersji 5" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Dżojstiki" diff --git a/po/pt_BR.po b/po/pt_BR.po index c02c974f022..c500fc619df 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -3843,6 +3843,10 @@ msgstr "Índice" msgid "Indeo Video Interactive version 5 video codec" msgstr "Codec de vídeo Wine Video 1" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Controles" diff --git a/po/pt_PT.po b/po/pt_PT.po index e5f15e64780..37bc199a8e0 100644 --- a/po/pt_PT.po +++ b/po/pt_PT.po @@ -3886,6 +3886,10 @@ msgstr "Índice" msgid "Indeo Video Interactive version 5 video codec" msgstr "codec video Wine Video 1" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/rm.po b/po/rm.po index a9791e89fa5..3b859c0fc16 100644 --- a/po/rm.po +++ b/po/rm.po @@ -3757,6 +3757,10 @@ msgstr "&Cuntgn�" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/ro.po b/po/ro.po index a289574ed53..9f23f6c7e1a 100644 --- a/po/ro.po +++ b/po/ro.po @@ -3843,6 +3843,10 @@ msgstr "Index" msgid "Indeo Video Interactive version 5 video codec" msgstr "Codecul video Wine Video 1" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Joystick-uri" diff --git a/po/ru.po b/po/ru.po index 3f2a8cc0823..d1fdbdd0b18 100644 --- a/po/ru.po +++ b/po/ru.po @@ -3836,6 +3836,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Видео кодек Wine Video 1" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Джойстики" diff --git a/po/si.po b/po/si.po index bf1509544a8..05dbd769c2d 100644 --- a/po/si.po +++ b/po/si.po @@ -3775,6 +3775,10 @@ msgstr "දර්ශකය" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine වීඩියෝ 1 වීඩියෝ කොඩෙක්" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "නියාමක යටි" diff --git a/po/sk.po b/po/sk.po index 87ddfae0173..10787d14c79 100644 --- a/po/sk.po +++ b/po/sk.po @@ -3813,6 +3813,10 @@ msgstr "Obsah" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/sl.po b/po/sl.po index 643ae789def..569dd015eb9 100644 --- a/po/sl.po +++ b/po/sl.po @@ -3904,6 +3904,10 @@ msgstr "Kazalo" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine Video 1 video kodek" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/sr_RS@cyrillic.po b/po/sr_RS@cyrillic.po index 2a234226d1f..8d9f4af3083 100644 --- a/po/sr_RS@cyrillic.po +++ b/po/sr_RS@cyrillic.po @@ -3875,6 +3875,10 @@ msgstr "&Попис" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine Video 1 видео кодек" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/sr_RS@latin.po b/po/sr_RS@latin.po index 5f2ec9b52c0..e1631124807 100644 --- a/po/sr_RS@latin.po +++ b/po/sr_RS@latin.po @@ -3966,6 +3966,10 @@ msgstr "Index" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine Video 1 video kodek" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/sv.po b/po/sv.po index 5eea64eac8e..045d4fbc292 100644 --- a/po/sv.po +++ b/po/sv.po @@ -3865,6 +3865,10 @@ msgstr "Index" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine Video 1 videokodek" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Joysticks" diff --git a/po/ta.po b/po/ta.po index 2f5caa9caae..013b85491fe 100644 --- a/po/ta.po +++ b/po/ta.po @@ -3752,6 +3752,10 @@ msgstr "" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine வீடியோ 1 வீடியோ கோடெக்" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/te.po b/po/te.po index 9d7d7c679f3..934f754ae10 100644 --- a/po/te.po +++ b/po/te.po @@ -3720,6 +3720,10 @@ msgstr "" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/th.po b/po/th.po index 31cb7c293fb..648029d932a 100644 --- a/po/th.po +++ b/po/th.po @@ -3785,6 +3785,10 @@ msgstr "" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/tr.po b/po/tr.po index a362b196329..abdac7777cd 100644 --- a/po/tr.po +++ b/po/tr.po @@ -3825,6 +3825,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Indeo Video Etkileşimli sürüm 5 video codec bileşeni" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Oyun Kolları" diff --git a/po/uk.po b/po/uk.po index d736730d273..3a9ca0311f8 100644 --- a/po/uk.po +++ b/po/uk.po @@ -3835,6 +3835,10 @@ msgstr "Вказівник" msgid "Indeo Video Interactive version 5 video codec" msgstr "Відео кодек Wine Video 1" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "Джойстик" diff --git a/po/wa.po b/po/wa.po index eb22ce9821f..32d3c0aeac7 100644 --- a/po/wa.po +++ b/po/wa.po @@ -3799,6 +3799,10 @@ msgstr "Å&dvins" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/wine.pot b/po/wine.pot index c67b1305cc0..05bef23f76b 100644 --- a/po/wine.pot +++ b/po/wine.pot @@ -3674,6 +3674,10 @@ msgstr "" msgid "Indeo Video Interactive version 5 video codec" msgstr "" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "" diff --git a/po/zh_CN.po b/po/zh_CN.po index fe6f0c4b6d4..9b824ab0ebc 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -3753,6 +3753,10 @@ msgstr "Indeo5" msgid "Indeo Video Interactive version 5 video codec" msgstr "Indeo Video Interactive 版本 5 视频编解码器" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "操纵杆" diff --git a/po/zh_TW.po b/po/zh_TW.po index 0218688c2a8..9820716d25e 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -3786,6 +3786,10 @@ msgstr "索引" msgid "Indeo Video Interactive version 5 video codec" msgstr "Wine 視訊 1 視訊編碼解碼器" +#: dlls/iyuv_32/iyuv_32.rc:28 dlls/iyuv_32/iyuv_32.rc:29 +msgid "IYUV codec" +msgstr "" + #: dlls/joy.cpl/joy.rc:37 msgid "Joysticks" msgstr "搖桿" -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10467
From: Brendan McGrath <bmcgrath@codeweavers.com> --- configure | 1 + configure.ac | 1 + dlls/iyuv_32/tests/Makefile.in | 6 ++++ dlls/iyuv_32/tests/i420frame.bmp | Bin 0 -> 50742 bytes dlls/iyuv_32/tests/iyuv_32.c | 45 +++++++++++++++++++++++++ dlls/iyuv_32/tests/resource.rc | 30 +++++++++++++++++ dlls/iyuv_32/tests/rgb24frame_flip.bmp | Bin 0 -> 27702 bytes 7 files changed, 83 insertions(+) create mode 100644 dlls/iyuv_32/tests/Makefile.in create mode 100755 dlls/iyuv_32/tests/i420frame.bmp create mode 100644 dlls/iyuv_32/tests/iyuv_32.c create mode 100644 dlls/iyuv_32/tests/resource.rc create mode 100644 dlls/iyuv_32/tests/rgb24frame_flip.bmp diff --git a/configure b/configure index 1c4d778ad53..fe8285d1545 100755 --- a/configure +++ b/configure @@ -23765,6 +23765,7 @@ wine_fn_config_makefile dlls/itircl enable_itircl wine_fn_config_makefile dlls/itss enable_itss wine_fn_config_makefile dlls/itss/tests enable_tests wine_fn_config_makefile dlls/iyuv_32 enable_iyuv_32 +wine_fn_config_makefile dlls/iyuv_32/tests enable_tests wine_fn_config_makefile dlls/joy.cpl enable_joy_cpl wine_fn_config_makefile dlls/jscript enable_jscript wine_fn_config_makefile dlls/jscript/tests enable_tests diff --git a/configure.ac b/configure.ac index 953edcce7b9..bc898b9bbb5 100644 --- a/configure.ac +++ b/configure.ac @@ -2881,6 +2881,7 @@ WINE_CONFIG_MAKEFILE(dlls/itircl) WINE_CONFIG_MAKEFILE(dlls/itss) WINE_CONFIG_MAKEFILE(dlls/itss/tests) WINE_CONFIG_MAKEFILE(dlls/iyuv_32) +WINE_CONFIG_MAKEFILE(dlls/iyuv_32/tests) WINE_CONFIG_MAKEFILE(dlls/joy.cpl) WINE_CONFIG_MAKEFILE(dlls/jscript) WINE_CONFIG_MAKEFILE(dlls/jscript/tests) diff --git a/dlls/iyuv_32/tests/Makefile.in b/dlls/iyuv_32/tests/Makefile.in new file mode 100644 index 00000000000..7d47050a25b --- /dev/null +++ b/dlls/iyuv_32/tests/Makefile.in @@ -0,0 +1,6 @@ +TESTDLL = iyuv_32.dll +IMPORTS = msvfw32 + +SOURCES = \ + iyuv_32.c \ + resource.rc diff --git a/dlls/iyuv_32/tests/i420frame.bmp b/dlls/iyuv_32/tests/i420frame.bmp new file mode 100755 index 0000000000000000000000000000000000000000..acebee03e4d77aa6f5720df1c0b0bc04940c67fe GIT binary patch literal 50742 zcmZ?rHJiWy24)Nl3>pj!3<(Sj3=97M|If&v02XI}%0oC1^54II|3~p?7>uTY(KIlc z21e7sXc`zz1EXnRG!2ZVfzdQDng&MGz-Ss6O#`E8VECp1hQELRkK)lV7)=ACX<#%B zjHZFnG%%V5M$^D(8W>FjqiJ9?4UDFN(KIlc21e7s@J$2%|1<m_#iL;`ng&MGz-Ss6 zO#`E8U^ESkrh(BkFq#HN)4*sN7)=ACX<#%BjHZF%n+6#EGW;LKqhT<b21e7sXc`zz z1EXnRG!2ZVfzdQDng&MGz-Ss6O#`E8U^ESkrh(y`2L3So`#*|D!(cQGjHZFnG%%V5 zM$^D(8W>FjqiJ9?4UDFN(KIlc21e7sXc`zz1H(5BFfjc2KZ-}gU^ESkrh(BkFq#HN z)4*sN7)=ACX<#%BjHZFnG%%V5M$^D(8W>Fj!#555XJGh0ibum>G!2ZVfzdQDng&MG zz-Ss6O#`E8U^ESkrh(BkFq#HN)4*sN7)=AiHw`c_F#I3IqhT<b21e7sXc`zz1EXnR zG!2ZVfzdQDng&MGz-Ss6O#`E8U^ESkrh(y`240VX(GVC7fzc2cpb)q?3PwX<Gz3ON zV1Pnk)hHMZfzc2c4S@j)feE8vGz3ONU^D~<C<L-b!DtAKhQMeD3{VIJj)Kt;7!85Z z5E!5k&>RJ$Aut*OqaiRrAs{dcMnhmU1V%$(fI^^Q6yObk0g9F(W9_n0fHwrpMgiUs zI5`UNhCtLPz#9S|MgiUsz+1VEN{)sAfe@H93h;)&kZGt5kVBP60p1X}Hwy5E!23~v RHw5xV0p1WGP`!<KX#n}>2Mz!L literal 0 HcmV?d00001 diff --git a/dlls/iyuv_32/tests/iyuv_32.c b/dlls/iyuv_32/tests/iyuv_32.c new file mode 100644 index 00000000000..01b67cc110f --- /dev/null +++ b/dlls/iyuv_32/tests/iyuv_32.c @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Brendan McGrath for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <windef.h> +#include <wingdi.h> +#include <vfw.h> +#include "wine/test.h" + +#define FOURCC_I420 mmioFOURCC('I','4','2','0') + +START_TEST(iyuv_32) +{ + BITMAPINFOHEADER in = + { + .biSize = sizeof(BITMAPINFOHEADER), + .biCompression = FOURCC_I420, + .biPlanes = 1, + .biWidth = 96, + .biHeight = 96, + .biSizeImage = 96 * 96 * 3 / 2, + }; + HIC hic; + + hic = ICLocate(ICTYPE_VIDEO, FOURCC_I420, &in, NULL, ICMODE_DECOMPRESS); + todo_wine + ok(!!hic, "Failed to locate iyuv codec\n"); + if (!hic) + return; + ICClose(hic); +} diff --git a/dlls/iyuv_32/tests/resource.rc b/dlls/iyuv_32/tests/resource.rc new file mode 100644 index 00000000000..d963e812105 --- /dev/null +++ b/dlls/iyuv_32/tests/resource.rc @@ -0,0 +1,30 @@ +/* + * Copyright 2026 Brendan McGrath for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include "windef.h" + +/* Generated with: */ +/* ffmpeg -f lavfi -i pal100bars=size=96x96 \ + * -vf transpose -pix_fmt bgr24 -frames:v 1 \ + * rgb24frame_flip.bmp */ +/* @makedep: rgb24frame_flip.bmp */ +rgb24frame_flip.bmp RCDATA rgb24frame_flip.bmp + +/* Generated by running the compression test on Windows */ +/* @makedep: i420frame.bmp */ +i420frame.bmp RCDATA i420frame.bmp diff --git a/dlls/iyuv_32/tests/rgb24frame_flip.bmp b/dlls/iyuv_32/tests/rgb24frame_flip.bmp new file mode 100644 index 0000000000000000000000000000000000000000..7795fcf3989b8bf6594935c15eedf22829f14229 GIT binary patch literal 27702 zcmZ?rHOpZD12YB&1`P%Vh6E^PWRL)hGeG4boKbQ#1V%$(Gz3ONU^E0qLtr!nMnhmU z1V%$(Gz3ONfSw`nkAYznjfTKz2#kinXb6mkz-S1JhQMeDjE2By2#kinXb8|D1Q;0p zj-t^J7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu;sI)uPqhJT}IGz3ONU^E0qLtr!n zMnhmU1V%$(Gz3ONU^E0qLx2t;FuMA1Gz3ONU^E0qLtr!nMnhmU1V%$(Gz3ONU^E0q zLx4UZ@c%!<C>jlc(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc44LkKYZ{X2?ALtr!n zMnhmU1V%$(Gz3ONU^E0qLtr!nMnhmU1n3X~|3|@S2#kinXb6mkz-S1JhQMeDjE2By Q2#kinXb6mk09`@=09!zwZ~y=R literal 0 HcmV?d00001 -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10467
From: Brendan McGrath <bmcgrath@codeweavers.com> --- dlls/iyuv_32/tests/iyuv_32.c | 137 +++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/dlls/iyuv_32/tests/iyuv_32.c b/dlls/iyuv_32/tests/iyuv_32.c index 01b67cc110f..ee7b9de689e 100644 --- a/dlls/iyuv_32/tests/iyuv_32.c +++ b/dlls/iyuv_32/tests/iyuv_32.c @@ -22,9 +22,138 @@ #include "wine/test.h" #define FOURCC_I420 mmioFOURCC('I','4','2','0') +#define FOURCC_IYUV mmioFOURCC('I','Y','U','V') + +static void test_formats(DWORD handler) +{ + BITMAPINFOHEADER in = {.biSize = sizeof(BITMAPINFOHEADER)}; + BITMAPINFOHEADER out = {.biSize = sizeof(BITMAPINFOHEADER)}; + ICINFO info; + LRESULT lr; + DWORD res; + HIC hic; + + in.biCompression = handler; + + hic = ICLocate(ICTYPE_VIDEO, handler, &in, NULL, ICMODE_DECOMPRESS); + ok(!hic, "Should fail to open codec without width and/or height.\n"); + + in.biWidth = 320; + in.biHeight = 240; + + hic = ICLocate(ICTYPE_VIDEO, handler, &in, NULL, ICMODE_DECOMPRESS); + ok(!!hic, "Failed to open codec.\n"); + + lr = ICGetInfo(hic, &info, sizeof(info)); + ok(lr == sizeof(info), "Got %Id.\n", lr); + ok(info.dwSize == sizeof(info), "Got size %lu.\n", info.dwSize); + ok(info.fccType == ICTYPE_VIDEO, "Got type %#lx.\n", info.fccType); + ok(info.fccHandler == FOURCC_IYUV, "Got handler %#lx.\n", info.fccHandler); + ok(info.dwFlags == 0, "Got flags %#lx.\n", info.dwFlags); + ok(info.dwVersion == 0, "Got version %#lx.\n", info.dwVersion); + ok(info.dwVersionICM == ICVERSION, "Got ICM version %#lx.\n", info.dwVersionICM); + + res = ICDecompressQuery(hic, &in, NULL); + ok(res == ICERR_OK, "Got %ld.\n", res); + + res = ICDecompressGetFormat(hic, &in, NULL); + ok(res == sizeof(BITMAPINFOHEADER), "Got %ld.\n", res); + + res = ICDecompressGetFormat(hic, &in, &out); + ok(res == ICERR_OK, "Got %ld.\n", res); + ok(out.biSize == sizeof(BITMAPINFOHEADER), "Got size %lu.\n", out.biSize); + ok(out.biWidth == 320, "Got width %ld.\n", out.biWidth); + ok(out.biHeight == 240, "Got height %ld.\n", out.biHeight); + ok(out.biPlanes == 1, "Got %u planes.\n", out.biPlanes); + ok(out.biBitCount == 24, "Got depth %u.\n", out.biBitCount); + ok(out.biCompression == BI_RGB, "Got compression %#lx.\n", out.biCompression); + ok(out.biSizeImage == 320 * 240 * 3, "Got image size %lu.\n", out.biSizeImage); + ok(!out.biXPelsPerMeter, "Got horizontal resolution %ld.\n", out.biXPelsPerMeter); + ok(!out.biYPelsPerMeter, "Got vertical resolution %ld.\n", out.biYPelsPerMeter); + ok(!out.biClrUsed, "Got %lu used colours.\n", out.biClrUsed); + ok(!out.biClrImportant, "Got %lu important colours.\n", out.biClrImportant); + + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_OK, "Got %ld.\n", res); + + out.biHeight = -240; + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_BADFORMAT, "Got %ld.\n", res); + + out.biHeight = -480; + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_BADFORMAT, "Got %ld.\n", res); + + out.biHeight = 480; + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_BADFORMAT, "Got %ld.\n", res); + + out.biWidth = 640; + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_BADFORMAT, "Got %ld.\n", res); + + out.biWidth = 160; + out.biHeight = 120; + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_BADFORMAT, "Got %ld.\n", res); + + out.biWidth = 320; + out.biHeight = 240; + out.biBitCount = 8; + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_OK, "Got %ld.\n", res); + out.biBitCount = 16; + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_OK, "Got %ld.\n", res); + out.biBitCount = 32; + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_BADFORMAT, "Got %ld.\n", res); + + out.biBitCount = 16; + out.biCompression = BI_BITFIELDS; + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_BADFORMAT, "Got %ld.\n", res); + + out.biCompression = mmioFOURCC('C','L','J','R'); + out.biBitCount = 8; + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_BADFORMAT, "Got %ld.\n", res); + + out.biBitCount = 16; + out.biCompression = mmioFOURCC('U','Y','V','Y'); + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_BADFORMAT, "Got %ld.\n", res); + out.biCompression = mmioFOURCC('Y','U','Y','2'); + res = ICDecompressQuery(hic, &in, &out); + ok(res == ICERR_BADFORMAT, "Got %ld.\n", res); + + res = ICDecompressEnd(hic); + ok(res == ICERR_OK, "Got %ld.\n", res); + + out.biCompression = BI_RGB; + out.biBitCount = 24; + res = ICDecompressBegin(hic, &in, &out); + todo_wine + ok(res == ICERR_OK, "Got %ld.\n", res); + + res = ICDecompressEnd(hic); + ok(res == ICERR_OK, "Got %ld.\n", res); + + lr = ICDecompressExQuery(hic, 0, &in, NULL, 0, 0, 320, 240, NULL, NULL, 0, 0, 0, 0); + ok(lr == ICERR_UNSUPPORTED, "Got %Id.\n", lr); + + lr = ICDecompressExBegin(hic, 0, &in, NULL, 0, 0, 320, 240, &out, NULL, 20, 20, 320, 240); + ok(lr == ICERR_UNSUPPORTED, "Got %Id.\n", lr); + lr = ICDecompressExEnd(hic); + ok(lr == ICERR_UNSUPPORTED, "Got %Id.\n", lr); + + res = ICClose(hic); + ok(res == ICERR_OK, "Got %ld.\n", res); +} START_TEST(iyuv_32) { + static const DWORD handler[] = { FOURCC_IYUV, FOURCC_I420 }; BITMAPINFOHEADER in = { .biSize = sizeof(BITMAPINFOHEADER), @@ -35,6 +164,7 @@ START_TEST(iyuv_32) .biSizeImage = 96 * 96 * 3 / 2, }; HIC hic; + int i; hic = ICLocate(ICTYPE_VIDEO, FOURCC_I420, &in, NULL, ICMODE_DECOMPRESS); todo_wine @@ -42,4 +172,11 @@ START_TEST(iyuv_32) if (!hic) return; ICClose(hic); + + for (i = 0; i < ARRAY_SIZE(handler); i++) + { + winetest_push_context("handler %.4s", (char*)&handler[i]); + test_formats(handler[i]); + winetest_pop_context(); + } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10467
From: Brendan McGrath <bmcgrath@codeweavers.com> --- dlls/iyuv_32/tests/iyuv_32.c | 132 +++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) diff --git a/dlls/iyuv_32/tests/iyuv_32.c b/dlls/iyuv_32/tests/iyuv_32.c index ee7b9de689e..efe4158566c 100644 --- a/dlls/iyuv_32/tests/iyuv_32.c +++ b/dlls/iyuv_32/tests/iyuv_32.c @@ -24,6 +24,65 @@ #define FOURCC_I420 mmioFOURCC('I','4','2','0') #define FOURCC_IYUV mmioFOURCC('I','Y','U','V') +#pragma pack(push,2) +struct bmp_header +{ + char magic[2]; + DWORD length; + DWORD reserved; + DWORD offset; +}; +#pragma pack(pop) + + +static void write_bitmap_to_file(const BITMAPINFOHEADER *bitmap_header, const BYTE *data, HANDLE output) +{ + struct bmp_header header = + { + .magic = "BM", + .length = sizeof(header) + sizeof(*bitmap_header) + bitmap_header->biSizeImage, + .offset = sizeof(header) + sizeof(*bitmap_header), + }; + DWORD written; + BOOL ret; + + ret = WriteFile(output, &header, sizeof(header), &written, NULL); + ok(ret, "WriteFile failed, error %lu\n", GetLastError()); + ok(written == sizeof(header), "written %lu bytes\n", written); + ret = WriteFile(output, bitmap_header, sizeof(*bitmap_header), &written, NULL); + ok(ret, "WriteFile failed, error %lu\n", GetLastError()); + ok(written == sizeof(*bitmap_header), "written %lu bytes\n", written); + ret = WriteFile(output, data, bitmap_header->biSizeImage, &written, NULL); + ok(ret, "WriteFile failed, error %lu\n", GetLastError()); + ok(written == bitmap_header->biSizeImage, "written %lu bytes\n", written); +} + +static HANDLE open_temp_file(const WCHAR *output_filename) +{ + WCHAR path[MAX_PATH]; + HANDLE output; + + GetTempPathW(ARRAY_SIZE(path), path); + lstrcatW(path, output_filename); + + output = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, 0); + ok(output != INVALID_HANDLE_VALUE, "CreateFileW failed, error %lu\n", GetLastError()); + + trace("created %s\n", debugstr_w(path)); + + return output; +} + +static void write_bitmap(const BITMAPINFOHEADER *bitmap_header, const BYTE *data, const WCHAR *output_filename) +{ + HANDLE output; + + output = open_temp_file(output_filename); + write_bitmap_to_file(bitmap_header, data, output); + + CloseHandle(output); +} + static void test_formats(DWORD handler) { BITMAPINFOHEADER in = {.biSize = sizeof(BITMAPINFOHEADER)}; @@ -151,6 +210,78 @@ static void test_formats(DWORD handler) ok(res == ICERR_OK, "Got %ld.\n", res); } +static void test_decompress(DWORD handler) +{ + static const DWORD width = 96, height = 96; + + const struct bmp_header *expect_rgb_header; + const BYTE *expect_rgb_data; + BYTE rgb_data[96 * 96 * 3]; + DWORD res, diff; + BYTE *i420_data; + HRSRC resource; + HIC hic; + + BITMAPINFOHEADER i420_info = + { + .biSize = sizeof(i420_info), + .biWidth = width, + .biHeight = height, + .biPlanes = 1, + .biBitCount = 12, + .biCompression = handler, + }; + + BITMAPINFOHEADER rgb_info = + { + .biSize = sizeof(rgb_info), + .biWidth = width, + .biHeight = height, + .biPlanes = 1, + .biBitCount = 24, + .biCompression = BI_RGB, + .biSizeImage = sizeof(rgb_data), + }; + + resource = FindResourceW(NULL, L"i420frame.bmp", (const WCHAR *)RT_RCDATA); + i420_data = LockResource(LoadResource(GetModuleHandleW(NULL), resource)); + i420_data += *(DWORD*)(i420_data+2); + i420_info.biSizeImage = SizeofResource(GetModuleHandleW(NULL), resource); + + hic = ICOpen(ICTYPE_VIDEO, handler, ICMODE_DECOMPRESS); + ok(!!hic, "Failed to open codec.\n"); + + res = ICDecompressBegin(hic, &i420_info, &rgb_info); + todo_wine + ok(res == ICERR_OK, "Got %ld.\n", res); + + if (res != ICERR_OK) + goto skip_decompression_tests; + + res = ICDecompress(hic, 0, &i420_info, i420_data, &rgb_info, rgb_data); + todo_wine + ok(res == ICERR_OK, "Got %ld.\n", res); + res = ICDecompressEnd(hic); + ok(res == ICERR_OK, "Got %ld.\n", res); + + write_bitmap(&rgb_info, rgb_data, L"rgb24frame_flip.bmp"); + + resource = FindResourceW(NULL, L"rgb24frame_flip.bmp", (const WCHAR *)RT_RCDATA); + expect_rgb_header = ((const struct bmp_header *)LockResource(LoadResource(GetModuleHandleW(NULL), resource))); + expect_rgb_data = (const BYTE*)((uintptr_t)expect_rgb_header + expect_rgb_header->offset); + + diff = 0; + for (unsigned int i = 0; i < rgb_info.biSizeImage; ++i) + diff += abs((int)rgb_data[i] - (int)expect_rgb_data[i]); + diff = diff * 100 / 256 / rgb_info.biSizeImage; + todo_wine + ok(diff == 0, "Got %lu%% difference.\n", diff); + +skip_decompression_tests: + res = ICClose(hic); + ok(res == ICERR_OK, "Got %ld.\n", res); +} + START_TEST(iyuv_32) { static const DWORD handler[] = { FOURCC_IYUV, FOURCC_I420 }; @@ -177,6 +308,7 @@ START_TEST(iyuv_32) { winetest_push_context("handler %.4s", (char*)&handler[i]); test_formats(handler[i]); + test_decompress(handler[i]); winetest_pop_context(); } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10467
From: Brendan McGrath <bmcgrath@codeweavers.com> --- dlls/iyuv_32/tests/iyuv_32.c | 157 +++++++++++++++++++++++++++++++++++ 1 file changed, 157 insertions(+) diff --git a/dlls/iyuv_32/tests/iyuv_32.c b/dlls/iyuv_32/tests/iyuv_32.c index efe4158566c..00cd93d10cd 100644 --- a/dlls/iyuv_32/tests/iyuv_32.c +++ b/dlls/iyuv_32/tests/iyuv_32.c @@ -34,6 +34,7 @@ struct bmp_header }; #pragma pack(pop) +typedef UINT32 (*yuv_to_bgr32_converter)(WORD x, WORD y, WORD stride, WORD height, const BYTE *data); static void write_bitmap_to_file(const BITMAPINFOHEADER *bitmap_header, const BYTE *data, HANDLE output) { @@ -83,6 +84,80 @@ static void write_bitmap(const BITMAPINFOHEADER *bitmap_header, const BYTE *data CloseHandle(output); } +static void convert_yuv_and_write_bitmap(const BITMAPINFOHEADER *bitmap_header, const BYTE *data, yuv_to_bgr32_converter convert, const WCHAR *output_filename) +{ + BITMAPINFOHEADER bgr32_header; + UINT32 *bgr32_ptr; + BYTE *bgr32_data; + HANDLE output; + DWORD written; + WORD x, y; + BOOL ret; + + bgr32_header = *bitmap_header; + bgr32_header.biBitCount = 32; + bgr32_header.biCompression = BI_RGB; + bgr32_header.biSizeImage = bgr32_header.biWidth * bgr32_header.biHeight * bgr32_header.biBitCount / 8; + bgr32_header.biHeight = -bitmap_header->biHeight; + bgr32_data = malloc(bgr32_header.biSizeImage); + + output = open_temp_file(output_filename); + bgr32_ptr = (UINT32*)bgr32_data; + for (y = 0; y < bitmap_header->biWidth; y++) + for (x = 0; x < bitmap_header->biHeight; x++) + *bgr32_ptr++ = convert(x, y, bitmap_header->biWidth, bitmap_header->biHeight, data); + + write_bitmap_to_file(&bgr32_header, (BYTE*)bgr32_data, output); + ret = WriteFile(output, data, bitmap_header->biSizeImage, &written, NULL); + ok(ret, "WriteFile failed, error %lu\n", GetLastError()); + ok(written == bitmap_header->biSizeImage, "written %lu bytes\n", written); + + free(bgr32_data); + CloseHandle(output); +} + +#define CLAMP(x) ((x) > 255 ? 255 : (x) < 0 ? 0 : (x)) + +static UINT32 convert_yuv_to_bgr32(INT y, INT u, INT v) +{ + const INT y_offset = 16; + const INT uv_offset = 128; + const INT adj = 1024; + const INT c1 = 1.164 * adj + .5; + const INT c2 = 1.596 * adj + .5; + const INT c3 = 0.391 * adj + .5; + const INT c4 = 0.813 * adj + .5; + const INT c5 = 2.018 * adj + .5; + + INT r, g, b; + + y -= y_offset; + u -= uv_offset; + v -= uv_offset; + + r = CLAMP((c1 * y + c2 * v) / adj); + g = CLAMP((c1 * y - c4 * v - c3 * u) / adj); + b = CLAMP((c1 * y + c5 * u) / adj); + + return 0xff000000 | r << 16 | g << 8 | b; +} + +static UINT32 convert_i420_to_bgr32(WORD x, WORD y, WORD stride, WORD height, const BYTE *data) +{ + WORD uv_offset, u_offset, v_offset; + BYTE yuv_y, yuv_u, yuv_v; + + u_offset = height * stride; + v_offset = u_offset * 5 / 4; + uv_offset = (y / 2) * stride / 2 + x / 2; + + yuv_y = data[y * stride + x]; + yuv_u = data[u_offset + uv_offset]; + yuv_v = data[v_offset + uv_offset]; + + return convert_yuv_to_bgr32(yuv_y, yuv_u, yuv_v); +} + static void test_formats(DWORD handler) { BITMAPINFOHEADER in = {.biSize = sizeof(BITMAPINFOHEADER)}; @@ -282,6 +357,87 @@ skip_decompression_tests: ok(res == ICERR_OK, "Got %ld.\n", res); } +static void test_compress(DWORD handler) +{ + const struct bmp_header *expect_i420_header; + const struct bmp_header *rgb_header; + const BITMAPINFOHEADER *rgb_info; + BYTE i420_data[96 * 96 * 3 / 2]; + const BYTE *expect_i420_data; + BITMAPINFOHEADER i420_info; + DWORD res, flags, diff; + const BYTE *rgb_data; + HRSRC resource; + HIC hic; + + hic = ICOpen(ICTYPE_VIDEO, handler, ICMODE_COMPRESS); + ok(!!hic, "Failed to open codec.\n"); + + resource = FindResourceW(NULL, L"rgb24frame_flip.bmp", (const WCHAR *)RT_RCDATA); + rgb_header = ((const struct bmp_header *)LockResource(LoadResource(GetModuleHandleW(NULL), resource))); + rgb_info = (const BITMAPINFOHEADER *)(rgb_header+1); + rgb_data = (const BYTE *)(rgb_info+1); + + res = ICCompressQuery(hic, rgb_info, NULL); + todo_wine + ok(res == ICERR_OK, "Got %ld.\n", res); + + if (res != ICERR_OK) + goto skip_compression_tests; + + res = ICCompressGetSize(hic, rgb_info, NULL); + ok(res == rgb_info->biWidth * rgb_info->biHeight * 3, "Got %ld.\n", res); + + res = ICCompressGetFormatSize(hic, rgb_info); + ok(res == sizeof(BITMAPINFOHEADER), "Got %ld.\n", res); + + memset(&i420_info, 0xcc, sizeof(i420_info)); + res = ICCompressGetFormat(hic, rgb_info, &i420_info); + ok(res == ICERR_OK, "Got %ld.\n", res); + ok(i420_info.biSize == sizeof(BITMAPINFOHEADER), "Got size %lu.\n", i420_info.biSize); + ok(i420_info.biWidth == 96, "Got width %ld.\n", i420_info.biWidth); + ok(i420_info.biHeight == 96, "Got height %ld.\n", i420_info.biHeight); + ok(i420_info.biPlanes == 1, "Got %u planes.\n", i420_info.biPlanes); + ok(i420_info.biBitCount == 24, "Got depth %u.\n", i420_info.biBitCount); + ok(i420_info.biCompression == FOURCC_IYUV, + "Got compression %#lx.\n", i420_info.biCompression); + ok(i420_info.biSizeImage == rgb_info->biWidth * rgb_info->biHeight * 3, "Got image size %lu.\n", i420_info.biSizeImage); + ok(!i420_info.biXPelsPerMeter, "Got horizontal resolution %ld.\n", i420_info.biXPelsPerMeter); + ok(!i420_info.biYPelsPerMeter, "Got vertical resolution %ld.\n", i420_info.biYPelsPerMeter); + ok(!i420_info.biClrUsed, "Got %lu used colours.\n", i420_info.biClrUsed); + ok(!i420_info.biClrImportant, "Got %lu important colours.\n", i420_info.biClrImportant); + + res = ICCompressQuery(hic, rgb_info, &i420_info); + ok(res == ICERR_OK, "Got %ld.\n", res); + + res = ICCompressBegin(hic, rgb_info, &i420_info); + ok(res == ICERR_OK, "Got %ld.\n", res); + memset(i420_data, 0xcd, sizeof(i420_data)); + res = ICCompress(hic, ICCOMPRESS_KEYFRAME, &i420_info, i420_data, + (BITMAPINFOHEADER *)rgb_info, (void *)rgb_data, NULL, &flags, 1, 0, 0, NULL, NULL); + ok(res == ICERR_OK, "Got %ld.\n", res); + ok(flags == AVIIF_KEYFRAME, "got flags %#lx\n", flags); + ok(i420_info.biSizeImage == sizeof(i420_data), "Got size %ld.\n", i420_info.biSizeImage); + res = ICCompressEnd(hic); + ok(res == ICERR_OK, "Got %ld.\n", res); + + convert_yuv_and_write_bitmap(&i420_info, i420_data, convert_i420_to_bgr32, L"i420frame.bmp"); + + resource = FindResourceW(NULL, L"i420frame.bmp", (const WCHAR *)RT_RCDATA); + expect_i420_header = ((const struct bmp_header *)LockResource(LoadResource(GetModuleHandleW(NULL), resource))); + expect_i420_data = (const BYTE*)((uintptr_t)expect_i420_header + expect_i420_header->length); + + diff = 0; + for (unsigned int i = 0; i < i420_info.biSizeImage; ++i) + diff += abs((int)i420_data[i] - (int)expect_i420_data[i]); + diff = diff * 100 / 256 / i420_info.biSizeImage; + ok(diff == 0, "Got %lu%% difference.\n", diff); + +skip_compression_tests: + res = ICClose(hic); + ok(res == ICERR_OK, "Got %ld.\n", res); +} + START_TEST(iyuv_32) { static const DWORD handler[] = { FOURCC_IYUV, FOURCC_I420 }; @@ -309,6 +465,7 @@ START_TEST(iyuv_32) winetest_push_context("handler %.4s", (char*)&handler[i]); test_formats(handler[i]); test_decompress(handler[i]); + test_compress(handler[i]); winetest_pop_context(); } } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10467
Adding @rbernon and @zfigura as reviewers as this is similar to `ir50_32` (which was reviewed by both). I haven't added a DLL before, so I might have got some things wrong. To call out a couple of things I was concerned about: 1. Po files. I don't know if I've done this right - or if there should be some translations before adding? 2. The Copyright at the start of each file. I've added my name and current year. One other question I have, which is not related to this MR, but rather the implementation of the DLL. Like `ir50_32`, I plan to use an `IMFTransform` - specifically the color converter. Should I create this via `CoCreateInstance`? That would require a call to `CoInitialize` and `CoUninitialize`. Or should I link against `winegstreamer` and add a function to obtain it that way (like `ir50_32` does). Actually, I just noticed I left the link to `winegstreamer` in `Makefile.in`. But I'll wait for feedback before I remove. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10467#note_133967
Po files. I don't know if I've done this right - or if there should be some translations before adding?
You don't need to add generated files to the commit. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10467#note_133973
On Fri Mar 27 07:02:32 2026 +0000, Zhiyi Zhang wrote:
Po files. I don't know if I've done this right - or if there should be some translations before adding? You don't need to add generated files to the commit. Oh OK, thank-you for that. I guess that would also include `configure`? I'll remove them.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10467#note_133974
On Fri Mar 27 07:04:12 2026 +0000, Brendan McGrath wrote:
Oh OK, thank-you for that. I guess that would also include `configure`? I'll remove them. Right, you don't need to add configure.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10467#note_133975
participants (3)
-
Brendan McGrath -
Brendan McGrath (@redmcg) -
Zhiyi Zhang (@zhiyi)