From cec9f863d6272d15d51045c3cf16f2db9d779eff Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Mon, 13 Apr 2020 11:27:26 +0200 Subject: [PATCH] core/io: make Codebook fields and TABLE_FILL_VALUE public This allows external implementations for CodebookReader trait. --- nihav-core/src/io/codebook.rs | 8 ++++---- 1 file 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 { /// The codebook structure for code reading. #[allow(dead_code)] pub struct Codebook { - table: Vec, - syms: Vec, - lut_bits: u8, + pub table: Vec, + pub syms: Vec, + pub lut_bits: u8, } /// Trait allowing bitreader to use codebook for decoding bit sequences. @@ -140,7 +140,7 @@ pub trait CodebookReader { fn read_cb(&mut self, cb: &Codebook) -> CodebookResult; } -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, off: usize, -- 2.39.5