qtable generation range fix

This commit is contained in:
Muaz Ahmad 2023-12-12 14:25:23 +05:00
parent 6c91c2c228
commit 9648f06186

View file

@ -134,9 +134,8 @@ pub fn gen_qtable(q: f16, step_start_band: usize, step_stop_band: usize) @Vector
for (0..band_len) |j| {
if (band_i < step_start_band) {
ret[idx + j] = @floatFromInt(q_min);
}
if (band_i < band_range + step_start_band) {
ret[idx + j] = @floatFromInt(q_min + step * band_i);
} else if (band_i < band_range + step_start_band) {
ret[idx + j] = @floatFromInt(q_min + step * (band_i - step_start_band));
} else {
ret[idx + j] = @floatFromInt(q_max);
}