Skip to content

Commit

Permalink
get_log_tx_scale: remove mutable variable
Browse files Browse the repository at this point in the history
No functional change.
  • Loading branch information
tmatth committed Nov 19, 2018
1 parent 4277a72 commit 69410dc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/quantize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ use std::mem;

pub fn get_log_tx_scale(tx_size: TxSize) -> i32 {
let num_pixels = tx_size.area();
let mut shift_bits = 0;

if num_pixels > 256 { shift_bits += 1; };
if num_pixels > 1024 { shift_bits += 1; };

shift_bits
i32::from(num_pixels > 256) + i32::from(num_pixels > 1024)
}

pub fn dc_q(qindex: u8, bit_depth: usize) -> i16 {
Expand Down

0 comments on commit 69410dc

Please sign in to comment.