From f8e44a59c3c251dbd7e59b80e288e544a73582d1 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sat, 15 Feb 2025 22:52:17 +0100 Subject: [PATCH] re-enable colorspace conversion --- psxavenc/decoding.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/psxavenc/decoding.c b/psxavenc/decoding.c index 56f25a4..69da1c9 100644 --- a/psxavenc/decoding.c +++ b/psxavenc/decoding.c @@ -204,22 +204,18 @@ bool open_av_data(const char *filename, settings_t *settings, bool use_audio, bo if (av->scaler == NULL) { return false; } -#if 0 - // FIXME: if this is uncommented libswscale may produce completely black - // frames for whatever reason... if (sws_setColorspaceDetails( av->scaler, sws_getCoefficients(av->video_codec_context->colorspace), - (av->video_codec_context->color_range == AVCOL_RANGE_JPEG), + av->video_codec_context->color_range == AVCOL_RANGE_JPEG, sws_getCoefficients(SWS_CS_ITU601), true, 0, - 0, - 0 + 1 << 16, + 1 << 16 ) < 0) { return false; } -#endif if (settings->swscale_options) { if (av_opt_set_from_string(av->scaler, settings->swscale_options, NULL, "=", ":,") < 0) { return false;