aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2020-04-13 11:27:26 +0200
committerKostya Shishkov <kostya.shishkov@gmail.com>2020-04-13 11:27:26 +0200
commitcec9f863d6272d15d51045c3cf16f2db9d779eff (patch)
treee2b66cf61f9f3e75fabcbc6ea20a6d51288f1195
parent152e8f78a8e9bec46513e55394fe85e79d162a30 (diff)
downloadnihav-cec9f863d6272d15d51045c3cf16f2db9d779eff.tar.gz
core/io: make Codebook fields and TABLE_FILL_VALUE public
This allows external implementations for CodebookReader trait.
-rw-r--r--nihav-core/src/io/codebook.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/nihav-core/src/io/codebook.rs b/nihav-core/src/io/codebook.rs
index 0fc6a9c..553f2f9 100644
--- a/nihav-core/src/io/codebook.rs
+++ b/nihav-core/src/io/codebook.rs
@@ -127,9 +127,9 @@ pub trait CodebookDescReader<S> {
/// The codebook structure for code reading.
#[allow(dead_code)]
pub struct Codebook<S> {
- table: Vec<u32>,
- syms: Vec<S>,
- lut_bits: u8,
+ pub table: Vec<u32>,
+ pub syms: Vec<S>,
+ pub lut_bits: u8,
}
/// Trait allowing bitreader to use codebook for decoding bit sequences.
@@ -140,7 +140,7 @@ pub trait CodebookReader<S> {
fn read_cb(&mut self, cb: &Codebook<S>) -> CodebookResult<S>;
}
-const TABLE_FILL_VALUE: u32 = 0x7F;
+pub const TABLE_FILL_VALUE: u32 = 0x7F;
const MAX_LUT_BITS: u8 = 10;
fn fill_lut_msb(table: &mut Vec<u32>, off: usize,