From c572e209599f2effb9fb4d8cbfd26931caea5222 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Mon, 23 Sep 2024 10:14:44 +0200 Subject: [PATCH] vdisp/sdl2: removed param sdl2-r10k It didn't seem that R10k worked for anyone before 18th Sep (commit 3c9e2602) because bit shuffling is needed (r10k_to_sdl2()). Also the negative meaning (=no), which has been added just in the last week commit can be replaced with '--param decoder-use-codec='!R10k'`. --- src/video_display/sdl2.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/video_display/sdl2.c b/src/video_display/sdl2.c index c8e203f37..0cb924a10 100644 --- a/src/video_display/sdl2.c +++ b/src/video_display/sdl2.c @@ -399,8 +399,8 @@ static bool display_sdl2_reconfigure(void *state, struct video_desc desc) } if (desc.color_spec == R10k) { MSG(WARNING, - "Displaying 10-bit RGB, which is experimentat. In case of " - "problems use '--param sdl2-r10k=no` and please report.\n"); + "Displaying 10-bit RGB, which is experimental. In case of " + "problems use '--param decoder-use-codec='!R10k'` and please report.\n"); } pthread_mutex_lock(&s->lock); @@ -446,21 +446,11 @@ static uint32_t get_ug_to_sdl_format(codec_t ug_codec) { return SDL_PIXELFORMAT_UNKNOWN; } -ADD_TO_PARAM("sdl2-r10k", - "* sdl2-r10k[=no]\n" - " Enable/disable 10-bit RGB support for SDL2 (default: enabled)\n"); - static int get_supported_pfs(codec_t *codecs) { - int count = 0; + const int count = sizeof pf_mapping / sizeof pf_mapping[0]; - const char *sdl2_r10k_opt = get_commandline_param("sdl2-r10k"); - const bool sdl2_r10k_req = - sdl2_r10k_opt == NULL || strcmp(sdl2_r10k_opt, "no") != 0; - for (unsigned int i = 0; i < sizeof pf_mapping / sizeof pf_mapping[0]; ++i) { - if (pf_mapping[i].first == R10k && !sdl2_r10k_req) { - continue; - } - codecs[count++] = pf_mapping[i].first; + for (int i = 0; i < count; ++i) { + codecs[i] = pf_mapping[i].first; } return count; }