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 06b0ed5 commit 5c50940
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
(num_pixels > 256) as i32 + (num_pixels > 1024) as i32
}

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

0 comments on commit 5c50940

Please sign in to comment.