Skip to content

Commit

Permalink
Linux fix, comment improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Melirius committed Apr 19, 2024
1 parent 44aee83 commit 275be37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use lepton_jpeg::metrics::CpuTimeMeasure;
use log::info;
use simple_logger::SimpleLogger;
use structs::lepton_format::read_jpeg;
#[cfg(target_os = "windows")]
use thread_priority::{set_current_thread_priority, ThreadPriority, WinAPIThreadPriority};

use std::{
Expand Down
4 changes: 2 additions & 2 deletions src/structs/vpx_bool_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ impl<R: Read> VPXBoolReader<R> {
//
// Here some imrovements to the basic scheme are implemented. First, we store more stream bits
// in `value` to reduce refill rate, so that 8 MSBs of `value` represent `value` of the scheme
// (it was already implemented in DropBox version).
// (it was already implemented in DropBox version, however, with shorter 16-bit `value`).
// Second, `range` and `split` are also stored in 8 MSBs of the same size variables (it is new
// and it allows to reduce number of operations to compute `split` - previously `big_split` -
// and new `range` and `shift`).
// and to update `range` and `shift`).
// Third, involved calculation scheme of `split` allows to reduce dependence chain length by 1
// with respect to naive initial fully serial implementation
// `split = (1 + (((range - 1) * probability) >> BITS_IN_BYTE)) << BITS_IN_VALUE_MINUS_LAST_BYTE`
Expand Down

0 comments on commit 275be37

Please sign in to comment.