Skip to content

Commit d6a4cb1

Browse files
committed
Moving back to SWS_BICUBIC for high quality mode (during export mostly). This provides a sharper image when enlarging images than SWS_LANCZOS, and only has a slight performance disadvantage.
1 parent 272f004 commit d6a4cb1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/FFmpegReader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ void FFmpegReader::ProcessVideoPacket(int64_t requested_frame) {
13391339

13401340
int scale_mode = SWS_FAST_BILINEAR;
13411341
if (openshot::Settings::Instance()->HIGH_QUALITY_SCALING) {
1342-
scale_mode = SWS_LANCZOS;
1342+
scale_mode = SWS_BICUBIC;
13431343
}
13441344
SwsContext *img_convert_ctx = sws_getContext(info.width, info.height, AV_GET_CODEC_PIXEL_FORMAT(pStream, pCodecCtx), width,
13451345
height, PIX_FMT_RGBA, scale_mode, NULL, NULL, NULL);

src/FFmpegWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ void FFmpegWriter::OutputStreamInfo() {
21112111
void FFmpegWriter::InitScalers(int source_width, int source_height) {
21122112
int scale_mode = SWS_FAST_BILINEAR;
21132113
if (openshot::Settings::Instance()->HIGH_QUALITY_SCALING) {
2114-
scale_mode = SWS_LANCZOS;
2114+
scale_mode = SWS_BICUBIC;
21152115
}
21162116

21172117
// Init software rescalers vector (many of them, one for each thread)

0 commit comments

Comments
 (0)