On 2023-03-17 15:28, Biswapriyo Nath wrote:
1. You missed the Reserved member in DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA.
2. There should be __C89_NAMELESS before the struct and union keywords.

Indeed, good catch.

Here is v2 of the patch.
From 9460de6f16b394a88a1cf3b51ba3f0c6bf139514 Mon Sep 17 00:00:00 2001
From: Steve Lhomme <[email protected]>
Date: Fri, 17 Mar 2023 11:07:18 +0100
Subject: [PATCH] headers: explicitly define Reserved bits in DXVAHD_BLT_STATE
 structures

As defined in the documentation 
https://learn.microsoft.com/en-us/windows/win32/api/dxvahd/ns-dxvahd-dxvahd_blt_state_output_color_space_data

and 
https://learn.microsoft.com/en-us/windows/win32/api/dxvahd/ns-dxvahd-dxvahd_stream_state_input_color_space_data
---
 mingw-w64-headers/include/dxvahd.idl | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/mingw-w64-headers/include/dxvahd.idl 
b/mingw-w64-headers/include/dxvahd.idl
index bf00ca67f..3e0b07cfc 100644
--- a/mingw-w64-headers/include/dxvahd.idl
+++ b/mingw-w64-headers/include/dxvahd.idl
@@ -212,10 +212,16 @@ typedef struct _DXVAHD_BLT_STATE_CONSTRICTION_DATA {
 } DXVAHD_BLT_STATE_CONSTRICTION_DATA;
 
 typedef struct _DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA {
-  UINT Usage  :1;
-  UINT RGB_Range  :1;
-  UINT YCbCr_Matrix  :1;
-  UINT YCbCr_xvYCC  :1;
+  __C89_NAMELESS union {
+    __C89_NAMELESS struct {
+      UINT Usage  :1;
+      UINT RGB_Range  :1;
+      UINT YCbCr_Matrix  :1;
+      UINT YCbCr_xvYCC  :1;
+      UINT Reserved : 28;
+    } __C89_NAMELESSSTRUCTNAME;
+    UINT Value;
+  } __C89_NAMELESSUNIONNAME;
 } DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE_DATA;
 
 typedef struct _DXVAHD_BLT_STATE_PRIVATE_DATA {
@@ -308,10 +314,16 @@ typedef struct _DXVAHD_STREAM_STATE_FRAME_FORMAT_DATA {
 } DXVAHD_STREAM_STATE_FRAME_FORMAT_DATA;
 
 typedef struct _DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA {
-  UINT Type  :1;
-  UINT RGB_Range  :1;
-  UINT YCbCr_Matrix  :1;
-  UINT YCbCr_xvYCC  :1;
+  __C89_NAMELESS union {
+    __C89_NAMELESS struct {
+      UINT Type  :1;
+      UINT RGB_Range  :1;
+      UINT YCbCr_Matrix  :1;
+      UINT YCbCr_xvYCC  :1;
+      UINT Reserved : 28;
+    } __C89_NAMELESSSTRUCTNAME;
+    UINT Value;
+  } __C89_NAMELESSUNIONNAME;
 } DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE_DATA;
 
 typedef struct _DXVAHD_STREAM_STATE_LUMA_KEY_DATA {
-- 
2.37.3.windows.1

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to