6
6
7
7
#include "prim_test.h"
8
8
9
+ #include <winpr/print.h>
10
+
9
11
#include <winpr/wlog.h>
10
12
#include <winpr/crypto.h>
11
13
#include <freerdp/primitives.h>
@@ -1002,7 +1004,6 @@ static BOOL yuv444_to_rgb(BYTE* rgb, size_t stride, const BYTE* yuv[3], const UI
1002
1004
/* Check the result of generic matches the optimized routine.
1003
1005
*
1004
1006
*/
1005
- #include <winpr/print.h>
1006
1007
static BOOL compare_yuv444_to_rgb (prim_size_t roi , DWORD type )
1007
1008
{
1008
1009
BOOL rc = FALSE;
@@ -1051,10 +1052,14 @@ static BOOL compare_yuv444_to_rgb(prim_size_t roi, DWORD type)
1051
1052
const UINT32 color1 = FreeRDPReadColor (& line1 [x * 4 ], format );
1052
1053
const UINT32 color2 = FreeRDPReadColor (& line2 [x * 4 ], format );
1053
1054
1054
- BYTE r1 , g1 , b1 ;
1055
+ BYTE r1 = 0 ;
1056
+ BYTE g1 = 0 ;
1057
+ BYTE b1 = 0 ;
1055
1058
FreeRDPSplitColor (color1 , format , & r1 , & g1 , & b1 , NULL , NULL );
1056
1059
1057
- BYTE r2 , g2 , b2 ;
1060
+ BYTE r2 = 0 ;
1061
+ BYTE g2 = 0 ;
1062
+ BYTE b2 = 0 ;
1058
1063
FreeRDPSplitColor (color2 , format , & r2 , & g2 , & b2 , NULL , NULL );
1059
1064
1060
1065
const int dr12 = abs (r1 - r2 );
@@ -1071,12 +1076,12 @@ static BOOL compare_yuv444_to_rgb(prim_size_t roi, DWORD type)
1071
1076
1072
1077
if ((dr12 > 0 ) || (dg12 > 0 ) || (db12 > 0 ))
1073
1078
{
1074
- fprintf (stderr ,
1075
- "[%" PRIuz "x%" PRIuz "] generic and optimized data mismatch: r[0x%" PRIx8
1076
- "|0x%" PRIx8 "] g[0x%" PRIx8 "|0x%" PRIx8 "] b [0x%" PRIx8 "|0x%" PRIx8
1077
- "]\n" ,
1078
- x , y , r1 , r2 , g1 , g2 , b1 , b2 );
1079
- fprintf (stderr , "roi: %dx%d\n" , roi .width , roi .height );
1079
+ ( void ) fprintf (stderr ,
1080
+ "[%" PRIuz "x%" PRIuz
1081
+ "] generic and optimized data mismatch: r [0x%" PRIx8 "|0x%" PRIx8
1082
+ "] g[0x%" PRIx8 "|0x%" PRIx8 "] b[0x%" PRIx8 "|0x%" PRIx8 "]\n" ,
1083
+ x , y , r1 , r2 , g1 , g2 , b1 , b2 );
1084
+ ( void ) fprintf (stderr , "roi: %dx%d\n" , roi .width , roi .height );
1080
1085
winpr_HexDump ("y0" , WLOG_INFO , & yline [0 ][x ], 16 );
1081
1086
winpr_HexDump ("y1" , WLOG_INFO , & yline [0 ][x + roi .width ], 16 );
1082
1087
winpr_HexDump ("u0" , WLOG_INFO , & yline [1 ][x ], 16 );
@@ -1151,7 +1156,7 @@ static BOOL compare_rgb_to_yuv444(prim_size_t roi, DWORD type)
1151
1156
{
1152
1157
if (memcmp (yline1 [x ], yline2 [x ], yuvStep [x ]) != 0 )
1153
1158
{
1154
- fprintf (stderr , "[%s] compare failed in line %" PRIuz , __func__ , x );
1159
+ ( void ) fprintf (stderr , "[%s] compare failed in line %" PRIuz , __func__ , x );
1155
1160
goto fail ;
1156
1161
}
1157
1162
}
@@ -1218,10 +1223,14 @@ static BOOL compare_yuv420_to_rgb(prim_size_t roi, DWORD type)
1218
1223
const UINT32 color1 = FreeRDPReadColor (& line1 [x * 4 ], format );
1219
1224
const UINT32 color2 = FreeRDPReadColor (& line2 [x * 4 ], format );
1220
1225
1221
- BYTE r1 , g1 , b1 ;
1226
+ BYTE r1 = 0 ;
1227
+ BYTE g1 = 0 ;
1228
+ BYTE b1 = 0 ;
1222
1229
FreeRDPSplitColor (color1 , format , & r1 , & g1 , & b1 , NULL , NULL );
1223
1230
1224
- BYTE r2 , g2 , b2 ;
1231
+ BYTE r2 = 0 ;
1232
+ BYTE g2 = 0 ;
1233
+ BYTE b2 = 0 ;
1225
1234
FreeRDPSplitColor (color2 , format , & r2 , & g2 , & b2 , NULL , NULL );
1226
1235
1227
1236
const int dr12 = abs (r1 - r2 );
@@ -1348,10 +1357,11 @@ static BOOL compare_rgb_to_yuv420(prim_size_t roi, DWORD type)
1348
1357
{
1349
1358
if (similarY (yline1 [x ], yline2 [x ], yuvStep [x ], x ) != 0 )
1350
1359
{
1351
- fprintf (stderr , "[%s] compare failed in component %" PRIuz ", line %" PRIuz "\n" ,
1352
- __func__ , x , y );
1353
- fprintf (stderr , "[%s] roi %" PRIu32 "x%" PRIu32 "\n" , __func__ , roi .width ,
1354
- roi .height );
1360
+ (void )fprintf (stderr ,
1361
+ "[%s] compare failed in component %" PRIuz ", line %" PRIuz "\n" ,
1362
+ __func__ , x , y );
1363
+ (void )fprintf (stderr , "[%s] roi %" PRIu32 "x%" PRIu32 "\n" , __func__ , roi .width ,
1364
+ roi .height );
1355
1365
winpr_HexDump (TAG , WLOG_WARN , yline1 [x ], yuvStep [x ]);
1356
1366
winpr_HexDump (TAG , WLOG_WARN , yline2 [x ], yuvStep [x ]);
1357
1367
winpr_HexDump (TAG , WLOG_WARN , & rgb [y * stride ], stride );
0 commit comments