encoder/ffmpeg: Improve software scaling quality

Might be better to allow end-users to choose swscale quality, if they deem it necessary.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2022-09-10 01:34:52 +02:00
parent b55e4b283b
commit 7296bbc16b

View file

@ -498,7 +498,7 @@ void ffmpeg_instance::initialize_sw(obs_data_t* settings)
_scaler.set_target_format(pix_fmt_target); _scaler.set_target_format(pix_fmt_target);
// Create Scaler // Create Scaler
if (!_scaler.initialize(SWS_POINT)) { if (!_scaler.initialize(SWS_SINC | SWS_FULL_CHR_H_INT | SWS_FULL_CHR_H_INP | SWS_ACCURATE_RND | SWS_BITEXACT)) {
std::stringstream sstr; std::stringstream sstr;
sstr << "Initializing scaler failed for conversion from '" sstr << "Initializing scaler failed for conversion from '"
<< ::streamfx::ffmpeg::tools::get_pixel_format_name(_scaler.get_source_format()) << "' to '" << ::streamfx::ffmpeg::tools::get_pixel_format_name(_scaler.get_source_format()) << "' to '"