coeffs: Codebook<u16>,
}
-struct RV34CodeReader {
- lengths: Vec<u8>,
- codes: Vec<u32>,
- syms: Vec<u16>,
+pub struct RV34CodeReader {
+ pub lengths: Vec<u8>,
+ pub codes: Vec<u32>,
+ pub syms: Vec<u16>,
}
impl RV34CodeReader {
- fn new(data: &'static [u8]) -> Self {
+ pub fn new(data: &'static [u8]) -> Self {
let len = data.len();
let mut lengths: Vec<u8> = Vec::with_capacity(len);
let mut codes: Vec<u32> = Vec::with_capacity(len);
fn len (&mut self) -> usize { self.lengths.len() }
}
-struct RV34CBPCodeReader {
- lengths: Vec<u8>,
- codes: Vec<u32>,
- syms: Vec<u8>,
+pub struct RV34CBPCodeReader {
+ pub lengths: Vec<u8>,
+ pub codes: Vec<u32>,
+ pub syms: Vec<u8>,
}
const RV34_CBP_SYMS: [u8; 16] = [
];
impl RV34CBPCodeReader {
- fn new(data: &'static [u8]) -> Self {
+ pub fn new(data: &'static [u8]) -> Self {
let len = data.len();
let mut lengths: Vec<u8> = Vec::with_capacity(len);
let mut codes: Vec<u32> = Vec::with_capacity(len);
}
}
-const RV34_SET_IDX_INTRA: [usize; 31] = [
+pub const RV34_SET_IDX_INTRA: [usize; 31] = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 0
];
-const RV34_SET_IDX_INTER: [usize; 31] = [
+pub const RV34_SET_IDX_INTER: [usize; 31] = [
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3,
3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6
];
0xE0, 0xE1, 0xE2, 0xE4, 0xE5, 0xE6, 0xE8, 0xE9, 0xEA,
];
-const RV34_INTRA_CBPPAT: &[[[u8; 1296]; 2]; 5] = &[
+pub const RV34_INTRA_CBPPAT: &[[[u8; 1296]; 2]; 5] = &[
[
[
8, 10, 10, 10, 10, 10, 11, 10, 10, 11, 10, 10, 10, 10, 10, 6,
],
];
-const RV34_INTRA_CBP: &[[[u8; 16]; 8]; 5] = &[
+pub const RV34_INTRA_CBP: &[[[u8; 16]; 8]; 5] = &[
[
[ 0, 3, 3, 4, 3, 5, 5, 5, 2, 5, 4, 6, 4, 6, 6, 6, ],
[ 0, 2, 3, 4, 2, 5, 6, 7, 3, 6, 5, 7, 4, 7, 8, 8, ],
],
];
-const RV34_INTRA_FIRSTPAT: &[[[u8; 864]; 4]; 5] = &[
+pub const RV34_INTRA_FIRSTPAT: &[[[u8; 864]; 4]; 5] = &[
[
[
0, 10, 5, 10, 7, 12, 9, 11, 8, 13, 9, 12, 10, 13, 11, 12,
],
];
-const RV34_INTRA_SECONDPAT: &[[[u8; 108]; 2]; 5] = &[
+pub const RV34_INTRA_SECONDPAT: &[[[u8; 108]; 2]; 5] = &[
[
[
0, 5, 10, 3, 6, 10, 7, 8, 9, 4, 6, 10, 6, 7, 9, 8,
],
];
-const RV34_INTRA_THIRDPAT: &[[[u8; 108]; 2]; 5] = &[
+pub const RV34_INTRA_THIRDPAT: &[[[u8; 108]; 2]; 5] = &[
[
[
0, 5, 10, 3, 6, 10, 7, 8, 10, 4, 7, 10, 6, 7, 10, 8,
],
];
-const RV34_INTRA_COEFFS: &[[u8; 32]; 5] = &[
+pub const RV34_INTRA_COEFFS: &[[u8; 32]; 5] = &[
[
1, 3, 3, 4, 4, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9,
9, 9, 10, 10, 10, 11, 11, 11, 10, 10, 10, 12, 13, 14, 15, 15,
]
];
-const RV34_INTER_CBPPAT: &[[u8; 1296]; 7] = &[
+pub const RV34_INTER_CBPPAT: &[[u8; 1296]; 7] = &[
[
7, 9, 9, 8, 9, 8, 9, 8, 9, 9, 8, 8, 8, 8, 8, 4,
7, 10, 11, 10, 11, 10, 12, 10, 12, 11, 11, 10, 11, 10, 10, 7,
10, 16, 16, 16, 16, 16, 16, 16, 14, 16, 16, 16, 16, 16, 16, 14,
]];
-const RV34_INTER_CBP: &[[[u8; 16]; 4]; 7] = &[
+pub const RV34_INTER_CBP: &[[[u8; 16]; 4]; 7] = &[
[
[ 0, 6, 6, 3, 6, 4, 5, 3, 6, 5, 4, 3, 3, 4, 4, 3 ],
[ 0, 6, 6, 4, 6, 4, 5, 3, 6, 5, 4, 3, 4, 4, 4, 2 ],
[ 0, 4, 4, 3, 5, 4, 5, 4, 5, 5, 4, 4, 3, 4, 4, 3 ]
]];
-const RV34_INTER_FIRSTPAT: &[[[u8; 864]; 2]; 7] = &[
+pub const RV34_INTER_FIRSTPAT: &[[[u8; 864]; 2]; 7] = &[
[
[
0, 7, 5, 7, 5, 7, 6, 6, 7, 10, 7, 9, 8, 9, 8, 7,
],
];
-const RV34_INTER_SECONDPAT: &[[[u8; 108]; 2]; 7] = &[
+pub const RV34_INTER_SECONDPAT: &[[[u8; 108]; 2]; 7] = &[
[
[
0, 4, 8, 3, 6, 8, 6, 7, 8, 4, 6, 8, 6, 7, 8, 7,
],
];
-const RV34_INTER_THIRDPAT: &[[[u8; 108]; 2]; 7] = &[
+pub const RV34_INTER_THIRDPAT: &[[[u8; 108]; 2]; 7] = &[
[
[
0, 5, 8, 3, 6, 9, 6, 7, 9, 4, 6, 9, 6, 7, 9, 8,
],
];
-const RV34_INTER_COEFFS: &[[u8; 32]; 7] = &[
+pub const RV34_INTER_COEFFS: &[[u8; 32]; 7] = &[
[
1, 2, 4, 4, 5, 5, 6, 7, 7, 7, 8, 8, 8, 9, 9, 10,
10, 10, 10, 11, 11, 11, 11, 12, 11, 11, 11, 13, 14, 15, 16, 16,