re-enable colorspace conversion

This commit is contained in:
Adrian Siekierka 2025-02-15 22:52:17 +01:00
parent 703bb67393
commit f8e44a59c3
1 changed files with 3 additions and 7 deletions

View File

@ -204,22 +204,18 @@ bool open_av_data(const char *filename, settings_t *settings, bool use_audio, bo
if (av->scaler == NULL) { if (av->scaler == NULL) {
return false; return false;
} }
#if 0
// FIXME: if this is uncommented libswscale may produce completely black
// frames for whatever reason...
if (sws_setColorspaceDetails( if (sws_setColorspaceDetails(
av->scaler, av->scaler,
sws_getCoefficients(av->video_codec_context->colorspace), 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), sws_getCoefficients(SWS_CS_ITU601),
true, true,
0, 0,
0, 1 << 16,
0 1 << 16
) < 0) { ) < 0) {
return false; return false;
} }
#endif
if (settings->swscale_options) { if (settings->swscale_options) {
if (av_opt_set_from_string(av->scaler, settings->swscale_options, NULL, "=", ":,") < 0) { if (av_opt_set_from_string(av->scaler, settings->swscale_options, NULL, "=", ":,") < 0) {
return false; return false;