avision: Invert conditional for software scaling

Place the alternative calls to fwrite() near each other in the code,
for better readability.
escl-add-user-and-password
David Ward 2022-03-27 16:51:30 -04:00
rodzic c7a33643f3
commit 8bbcdf8de3
1 zmienionych plików z 7 dodań i 7 usunięć

Wyświetl plik

@ -7960,13 +7960,8 @@ reader_process (void *data)
/* SOFTWARE SCALING WITH INTERPOLATION (IF NECESSARY) */
if (s->avdimen.hw_xres == s->avdimen.xres &&
s->avdimen.hw_yres == s->avdimen.yres) /* No scaling */
{
fwrite (out_data, useful_bytes, 1, fp);
line += useful_bytes / s->avdimen.hw_bytes_per_line;
}
else /* Software scaling - watch out - this code bites back! */
if (s->avdimen.hw_xres != s->avdimen.xres ||
s->avdimen.hw_yres != s->avdimen.yres) /* Software scaling */
{
int x;
/* for convenience in the 16bit code path */
@ -8115,6 +8110,11 @@ reader_process (void *data)
out_data + useful_bytes - s->avdimen.hw_bytes_per_line,
s->avdimen.hw_bytes_per_line);
}
else /* No scaling */
{
fwrite (out_data, useful_bytes, 1, fp);
line += useful_bytes / s->avdimen.hw_bytes_per_line;
}
}
/* save image date in stripe buffer for next next stripe */