Tue, 10 Oct 2017 22:31:02 -0400audio: SDL_ResampleCVT() should use memmove instead of memcpy.
Ryan C. Gordon [Tue, 10 Oct 2017 22:31:02 -0400] rev 11586
audio: SDL_ResampleCVT() should use memmove instead of memcpy.

This copy can overlap.

Fixes Bugzilla #3849.

Tue, 10 Oct 2017 22:18:46 -0400audio: Don't stack-allocate resampler padding.
Ryan C. Gordon [Tue, 10 Oct 2017 22:18:46 -0400] rev 11585
audio: Don't stack-allocate resampler padding.

(I thought padding size ranged from 5 frames to ~30 frames (based around
RESAMPLER_ZERO_CROSSINGS, which is 5), but it's actually between 512 and
several thousands (based on RESAMPLER_SAMPLES_PER_ZERO_CROSSING)). It gets
big fast when downsampling.

Tue, 10 Oct 2017 17:41:41 -0700The event filter and event watch functions are now thread-safe
Sam Lantinga [Tue, 10 Oct 2017 17:41:41 -0700] rev 11584
The event filter and event watch functions are now thread-safe

Tue, 10 Oct 2017 16:12:56 -0400audio: reworked audio streams to have right-hand resampling padding available.
Ryan C. Gordon [Tue, 10 Oct 2017 16:12:56 -0400] rev 11583
audio: reworked audio streams to have right-hand resampling padding available.

Fixes Bugzilla #3851.

Tue, 10 Oct 2017 11:56:54 -0400Added SDL_PeekIntoDataQueue().
Ryan C. Gordon [Tue, 10 Oct 2017 11:56:54 -0400] rev 11582
Added SDL_PeekIntoDataQueue().

Tue, 10 Oct 2017 11:10:15 -0700Exposed the joystick locking functions for multi-threaded access to the joystick API
Sam Lantinga [Tue, 10 Oct 2017 11:10:15 -0700] rev 11581
Exposed the joystick locking functions for multi-threaded access to the joystick API

Mon, 09 Oct 2017 21:36:10 +0200atari:gem: Do not change system palette if application does not have focus SDL-1.2
Patrice Mandin [Mon, 09 Oct 2017 21:36:10 +0200] rev 11580
atari:gem: Do not change system palette if application does not have focus

Mon, 09 Oct 2017 11:45:15 -0700Fixed crash in SDL_IsGameController() on Windows if called when a controller is being removed
Sam Lantinga [Mon, 09 Oct 2017 11:45:15 -0700] rev 11579
Fixed crash in SDL_IsGameController() on Windows if called when a controller is being removed

Sun, 08 Oct 2017 10:59:03 -0700Fixed bug 3865 - [PATCH] Support for GreenAsia Inc. PSX to USB converter as SDL_GameController
Sam Lantinga [Sun, 08 Oct 2017 10:59:03 -0700] rev 11578
Fixed bug 3865 - [PATCH] Support for GreenAsia Inc. PSX to USB converter as SDL_GameController

Manuel

I would like this small patch merged that adds support for my GreenAsia Inc. PSX to USB converter, so SDL_IsGameController() returns true when using this adaptor.
It's interesting because PSX/PS2 controllers connected using this model won't be detected as gamecontrollers otherwise, only as joysticks.

Sat, 07 Oct 2017 15:26:55 -0700Fixed bug 3857 - SDL_ConvertPixels misses YUV conversions
Sam Lantinga [Sat, 07 Oct 2017 15:26:55 -0700] rev 11577
Fixed bug 3857 - SDL_ConvertPixels misses YUV conversions

Sylvain

There are various YUV-RGB conversion coefficients, according to https://www.fourcc.org/fccyvrgb.php
I choose the first (from Video Demystified, with integer multiplication),
but the current SDL2 Dither functions use in fact the next one, which follows a specifications called CCIR 601.

Here's a patch to use the second ones and with previous warning corrections.
There are less multiplications involved because Chroma coefficient is 1.
Also, doing float multiplication is as efficient with vectorization.
In the end, the YUV decoding is faster: ~165 ms vs my previous 195 ms.

Moreover, if SDL2 is compiled with -march=native, then YUV decoding time drops to ~130ms, while older ones remains around ~220 ms.


For information, from jpeg-9 source code:
jpeg-9/jccolor.c

* YCbCr is defined per CCIR 601-1, except that Cb and Cr are
* normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
* The conversion equations to be implemented are therefore
* Y = 0.29900 * R + 0.58700 * G + 0.11400 * B
* Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE
* Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE

jpeg-9/jdcolor.c

* YCbCr is defined per CCIR 601-1, except that Cb and Cr are
* normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
* The conversion equations to be implemented are therefore
*
* R = Y + 1.40200 * Cr
* G = Y - 0.34414 * Cb - 0.71414 * Cr
* B = Y + 1.77200 * Cb