Skip to content

Commit 4cd86ff

Browse files
FreezyLemonlu-zero
authored andcommitted
Remove unnecessary .max(255)
This is a `u8` which has a max value of 255
1 parent 83f949c commit 4cd86ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ impl QuantizerParameters {
557557

558558
// delta_q only gets 6 bits + a sign bit, so it can differ by 63 at most.
559559
let min_qi = base_q_idx.saturating_sub(63).max(1);
560-
let max_qi = base_q_idx.saturating_add(63).min(255);
560+
let max_qi = base_q_idx.saturating_add(63);
561561
let clamp_qi = |qi: u8| qi.clamp(min_qi, max_qi);
562562

563563
QuantizerParameters {

0 commit comments

Comments
 (0)