qtable generation range fix
This commit is contained in:
parent
6c91c2c228
commit
9648f06186
1 changed files with 2 additions and 3 deletions
|
@ -134,9 +134,8 @@ pub fn gen_qtable(q: f16, step_start_band: usize, step_stop_band: usize) @Vector
|
||||||
for (0..band_len) |j| {
|
for (0..band_len) |j| {
|
||||||
if (band_i < step_start_band) {
|
if (band_i < step_start_band) {
|
||||||
ret[idx + j] = @floatFromInt(q_min);
|
ret[idx + j] = @floatFromInt(q_min);
|
||||||
}
|
} else if (band_i < band_range + step_start_band) {
|
||||||
if (band_i < band_range + step_start_band) {
|
ret[idx + j] = @floatFromInt(q_min + step * (band_i - step_start_band));
|
||||||
ret[idx + j] = @floatFromInt(q_min + step * band_i);
|
|
||||||
} else {
|
} else {
|
||||||
ret[idx + j] = @floatFromInt(q_max);
|
ret[idx + j] = @floatFromInt(q_max);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue