I found the YUV Conversion bug in the source please somebody fix ;)

EDIT: I created Bug#3964 for this and also uploaded the proposed patch described below to Bugzilla.

Here is the bug in latest SDL 2.0.8 development repo. I am not familiar with the repo, so it would be awesome if someone could commit a fix. It is obvious and simple.

In “src/video/SDL_yuv.c,” on lines 217, 249, 280, 321, 353, and 384 the wrong conversion functions are called for SDL_PIXELFORMAT_ABGR8888. Instead of ABGR functions, BGRA functions are called. These are typos.

One example in context:
(…)
line 312:
case SDL_PIXELFORMAT_BGRX8888:
case SDL_PIXELFORMAT_BGRA8888:
yuv420_bgra_std(width, height, y, u, v, y_stride, uv_stride, rgb, rgb_stride, yuv_type);
return SDL_TRUE;
case SDL_PIXELFORMAT_RGB888:
case SDL_PIXELFORMAT_ARGB8888:
yuv420_argb_std(width, height, y, u, v, y_stride, uv_stride, rgb, rgb_stride, yuv_type);
return SDL_TRUE;
case SDL_PIXELFORMAT_BGR888:
case SDL_PIXELFORMAT_ABGR8888:
yuv420_bgra_std(width, height, y, u, v, y_stride, uv_stride, rgb, rgb_stride, yuv_type);
return SDL_TRUE;

Notice the bold line, line 321 has a typo. it should read
line321:
yuv420_abgr_std(width, height, y, u, v, y_stride, uv_stride, rgb, rgb_stride, yuv_type);

Similarly for line 353, it should read
line353:
yuv422_abgr_std(width, height, y, u, v, y_stride, uv_stride, rgb, rgb_stride, yuv_type);

Similarly for line 383, it should read
line383:
yuvnv12_abgr_std(width, height, y, u, v, y_stride, uv_stride, rgb, rgb_stride, yuv_type);

And the same typo is also present in the SSE functions:
line217 should read:
yuv420_abgr_sseu(width, height, y, u, v, y_stride, uv_stride, rgb, rgb_stride, yuv_type);
line249 should read:
yuv422_abgr_sseu(width, height, y, u, v, y_stride, uv_stride, rgb, rgb_stride, yuv_type);
line 280 should read:
yuvnv12_abgr_sseu(width, height, y, u, v, y_stride, uv_stride, rgb, rgb_stride, yuv_type);

In summary, in six places in src/video/SDL_yuv.c, “bgra” should be switched to “abgr”.

It is clear from the context that it is a bug: Why would BGRA and ABGR pixel formats use the same conversion function?

But I also double-checked it using my program that displayed the wrong colors only with SDL 2.0.8, and these changes fixed it. SDL was simply calling the wrong conversion function.