SDL: camera: PipeWire 24 bits formats are endianness independent

From da06e67b1b85fa8bceded25c54b2ca9317f75989 Mon Sep 17 00:00:00 2001
From: Wim Taymans <[EMAIL REDACTED]>
Date: Thu, 9 May 2024 09:30:51 +0200
Subject: [PATCH] camera: PipeWire 24 bits formats are endianness independent

---
 src/camera/pipewire/SDL_camera_pipewire.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/camera/pipewire/SDL_camera_pipewire.c b/src/camera/pipewire/SDL_camera_pipewire.c
index 4ad45240d9d3c..559078134e8b0 100644
--- a/src/camera/pipewire/SDL_camera_pipewire.c
+++ b/src/camera/pipewire/SDL_camera_pipewire.c
@@ -439,25 +439,22 @@ static struct {
 	uint32_t id;
 } sdl_video_formats[] = {
 #if SDL_BYTEORDER == SDL_BIG_ENDIAN
-	{ SDL_PIXELFORMAT_RGB24, SPA_VIDEO_FORMAT_RGB,},
 	{ SDL_PIXELFORMAT_RGBX8888, SPA_VIDEO_FORMAT_RGBx,},
-	{ SDL_PIXELFORMAT_BGR24, SPA_VIDEO_FORMAT_BGR,},
-	{ SDL_PIXELFORMAT_BGR888, SPA_VIDEO_FORMAT_BGR,},
 	{ SDL_PIXELFORMAT_BGRX8888, SPA_VIDEO_FORMAT_BGRx,},
 	{ SDL_PIXELFORMAT_RGBA8888, SPA_VIDEO_FORMAT_RGBA,},
 	{ SDL_PIXELFORMAT_ARGB8888, SPA_VIDEO_FORMAT_ARGB,},
 	{ SDL_PIXELFORMAT_BGRA8888, SPA_VIDEO_FORMAT_BGRA,},
 	{ SDL_PIXELFORMAT_ABGR8888, SPA_VIDEO_FORMAT_ABGR,},
 #else
-	{ SDL_PIXELFORMAT_RGB24, SPA_VIDEO_FORMAT_BGR,},
 	{ SDL_PIXELFORMAT_RGBX8888, SPA_VIDEO_FORMAT_xBGR,},
-	{ SDL_PIXELFORMAT_BGR24, SPA_VIDEO_FORMAT_RGB,},
 	{ SDL_PIXELFORMAT_BGRX8888, SPA_VIDEO_FORMAT_xRGB,},
 	{ SDL_PIXELFORMAT_RGBA8888, SPA_VIDEO_FORMAT_ABGR,},
 	{ SDL_PIXELFORMAT_ARGB8888, SPA_VIDEO_FORMAT_BGRA,},
 	{ SDL_PIXELFORMAT_BGRA8888, SPA_VIDEO_FORMAT_ARGB,},
 	{ SDL_PIXELFORMAT_ABGR8888, SPA_VIDEO_FORMAT_RGBA,},
 #endif
+	{ SDL_PIXELFORMAT_RGB24, SPA_VIDEO_FORMAT_RGB,},
+	{ SDL_PIXELFORMAT_BGR24, SPA_VIDEO_FORMAT_BGR,},
 	{ SDL_PIXELFORMAT_YV12, SPA_VIDEO_FORMAT_YV12,},
 	{ SDL_PIXELFORMAT_IYUV, SPA_VIDEO_FORMAT_I420,},
 	{ SDL_PIXELFORMAT_YUY2, SPA_VIDEO_FORMAT_YUY2,},