From 6c73d9a340902bfbf1b1e469c21d0de2fcfc78be Mon Sep 17 00:00:00 2001 From: b Date: Tue, 15 Nov 2022 22:27:33 +0100 Subject: [PATCH] fix indexing bugs & such stuff --- bluenh.c | 6 +++--- core.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bluenh.c b/bluenh.c index bb0f61b..323f24c 100644 --- a/bluenh.c +++ b/bluenh.c @@ -194,9 +194,9 @@ void calculate_bluenh_parameters (struct bluenh_data *data) data->r_high = (ILint64)(data->f) - (ILint64)(data->e); data->s_high = (ILint64)(data->c) - (ILint64)(data->b); data->t_high =((ILint64)(data->e))*((ILint64)(data->c))-((ILint64)(data->b))*((ILint64)(data->f)); - data->r_high = (ILint64)(data->e) - (ILint64)(data->d); - data->s_high = (ILint64)(data->b) - (ILint64)(data->a); - data->t_high =((ILint64)(data->d))*((ILint64)(data->b))-((ILint64)(data->a))*((ILint64)(data->e)); + data->r_low = (ILint64)(data->e) - (ILint64)(data->d); + data->s_low = (ILint64)(data->b) - (ILint64)(data->a); + data->t_low =((ILint64)(data->d))*((ILint64)(data->b))-((ILint64)(data->a))*((ILint64)(data->e)); } static inline ILuint bluenh_linear (ILuint x, ILint64 r, ILint64 s, ILint64 t, ILuint max) diff --git a/core.c b/core.c index 2a789df..9b2ed4b 100644 --- a/core.c +++ b/core.c @@ -1053,10 +1053,10 @@ int perform_action ( uint_fast8_t skip_frame; uint_fast8_t skip_line; uint_fast8_t skip_pixel; - ILint actual_frames = 0xFFFFFFFF; - ILint actual_width = 0xFFFFFFFF; - ILint actual_height = 0xFFFFFFFF; - ILint actual_colours= 0xFFFFFFFF; + ILint actual_frames = 0x7FFFFFFF; + ILint actual_width = 0x7FFFFFFF; + ILint actual_height = 0x7FFFFFFF; + ILint actual_colours= 0x7FFFFFFF; ILint x, y, f; struct PixelInfo *p; int r = 0; @@ -1130,7 +1130,7 @@ int perform_action ( for (f = 0; (f < frames) && (r == 0); ++f) { skip_frame = 0; - for (i=0; i