properly fix detection of 128k re-encode

This commit is contained in:
Armin 2026-07-03 23:33:19 +02:00
commit 7b1a3526b6

10
tcd.c
View file

@ -1190,10 +1190,7 @@ static int process_file(const char *filename, const Options *opts)
if (bitrate > 0 && bitrate < 192000) expected_min = 0.75; if (bitrate > 0 && bitrate < 192000) expected_min = 0.75;
else if (bitrate > 0 && bitrate < 256000) expected_min = 0.85; else if (bitrate > 0 && bitrate < 256000) expected_min = 0.85;
if (cutoff_ratio > 0 && cutoff_ratio < expected_min - 0.08) { if (cutoff_ratio > 0 && cutoff_ratio < expected_min - 0.08) {
if (effective_cutoff > 0 && steepness / effective_cutoff > 0.30) upscaled = 1;
upscaled = 0;
else
upscaled = 1;
} }
} }
@ -1255,10 +1252,7 @@ static int process_file(const char *filename, const Options *opts)
else if (bitrate > 0 && bitrate < 256000) expected_min = 0.85; else if (bitrate > 0 && bitrate < 256000) expected_min = 0.85;
if (cutoff_ratio > 0 && cutoff_ratio < expected_min - 0.08) { if (cutoff_ratio > 0 && cutoff_ratio < expected_min - 0.08) {
if (effective_cutoff > 0 && steepness / effective_cutoff > 0.30) upscaled = 1;
upscaled = 0;
else
upscaled = 1;
} }
if (upscaled) { if (upscaled) {