Unix: xvideo: Prefer RGB then YUY2 then I420.

This commit is contained in:
BearOso 2022-01-31 16:15:42 -06:00
parent 951de39c87
commit 111b92ca58
1 changed files with 4 additions and 12 deletions

View File

@ -585,18 +585,16 @@ static bool8 SetupXvideo()
} }
/* Ok time to search for a good Format */ /* Ok time to search for a good Format */
GUI.xv_format = FOURCC_YUY2; GUI.xv_format = FOURCC_I420;
GUI.xv_bpp = 0x7FFFFFFF; GUI.xv_bpp = 0x7FFFFFFF;
for (int i = 0; i < formats; i++) for (int i = 0; i < formats; i++)
{ {
//prefer I420 //prefer I420
if (fo[i].id == FOURCC_I420) { if (fo[i].id == FOURCC_YUY2) {
GUI.xv_format = FOURCC_I420; GUI.xv_format = FOURCC_YUY2;
break;
} }
else if (fo[i].id == 0x3 || fo[i].type == XvRGB)
if (fo[i].id == 0x3 || fo[i].type == XvRGB)
{ {
if (fo[i].bits_per_pixel < GUI.xv_bpp) if (fo[i].bits_per_pixel < GUI.xv_bpp)
{ {
@ -617,12 +615,6 @@ static bool8 SetupXvideo()
GUI.red_shift = GUI.blue_shift; GUI.red_shift = GUI.blue_shift;
GUI.blue_shift = copy; GUI.blue_shift = copy;
} }
/* on big-endian Xv still seems to like LSB order */
/*if (config->force_inverted_byte_order)
S9xSetEndianess (ENDIAN_MSB);
else
S9xSetEndianess (ENDIAN_LSB); */
} }
} }
} }