start work on 320x240 screen version using the pi pico
This commit is contained in:
parent
8acd684e59
commit
90f648e0b0
13 changed files with 112280 additions and 20 deletions
|
@ -16,15 +16,17 @@ const MAX_LOSS: usize = 16; // highest "loss" value tried for all lossy encoding
|
|||
const LOSSLESS_ENCODINGS: &[FrameEncoder] = &[
|
||||
enc::rle_horizontal,
|
||||
enc::rle_vertical,
|
||||
// enc::rle_diff_horizontal,
|
||||
// enc::rle_diff_vertical,
|
||||
enc::bg_strips_horizontal,
|
||||
];
|
||||
enc::rle_diff_horizontal,
|
||||
enc::rle_diff_vertical,
|
||||
// enc::bg_strips_horizontal_16, // only works for the tiny display
|
||||
// enc::bg_strips_horizontal_24, // intended for the 240x320 display
|
||||
];
|
||||
const LOSSY_ENCODINGS: &[FrameEncoderLossy] = &[
|
||||
enc::fill_white,
|
||||
enc::fill_black,
|
||||
enc::cell_diff_8_vertical,
|
||||
// enc::cell_diff_4_vertical,
|
||||
// todo: adapt these for big display
|
||||
// enc::cell_diff_8_vertical,
|
||||
// enc::cell_diff_4_vertical_small,
|
||||
];
|
||||
|
||||
fn main() {
|
||||
|
@ -88,7 +90,7 @@ fn main() {
|
|||
export_string += &format!("{byte},");
|
||||
}
|
||||
export_string += "\n};\n";
|
||||
let mut file = File::create("../ch32_decoder/data.h").unwrap();
|
||||
let mut file = File::create(format!("../{OUTPUT_DIR}/data.h")).unwrap();
|
||||
file.write_all(export_string.as_bytes()).unwrap();
|
||||
}
|
||||
|
||||
|
@ -161,7 +163,8 @@ enum Encoding {
|
|||
RLEVertical,
|
||||
RLEDiffHorizontal,
|
||||
RLEDiffVertical,
|
||||
BGStripsH,
|
||||
BGStripsH16,
|
||||
BGStripsH24,
|
||||
// BGStripsV,
|
||||
// QuadTree,
|
||||
// DrawCommands,
|
||||
|
@ -170,7 +173,8 @@ enum Encoding {
|
|||
// CellDiff4HH,
|
||||
// CellDiff4HV,
|
||||
// CellDiff4VH,
|
||||
CellDiff4VV,
|
||||
CellDiff4VV_small,
|
||||
// CellDiff4VV_large,
|
||||
}
|
||||
|
||||
fn get_matching_decoder(encoding: Encoding) -> FrameDecoder {
|
||||
|
@ -181,7 +185,8 @@ fn get_matching_decoder(encoding: Encoding) -> FrameDecoder {
|
|||
Encoding::RLEVertical => dec::rle_vertical,
|
||||
Encoding::RLEDiffHorizontal => dec::rle_diff_horizontal,
|
||||
Encoding::RLEDiffVertical => dec::rle_diff_vertical,
|
||||
Encoding::BGStripsH => dec::bg_strips_horizontal,
|
||||
Encoding::BGStripsH16 => dec::bg_strips_horizontal16,
|
||||
Encoding::BGStripsH24 => dec::bg_strips_horizontal24,
|
||||
// Encoding::BGStripsV => todo!(),
|
||||
// Encoding::QuadTree => todo!(),
|
||||
// Encoding::DrawCommands => todo!(),
|
||||
|
@ -190,7 +195,8 @@ fn get_matching_decoder(encoding: Encoding) -> FrameDecoder {
|
|||
// Encoding::CellDiff4HH => todo!(),
|
||||
// Encoding::CellDiff4HV => todo!(),
|
||||
// Encoding::CellDiff4VH => todo!(),
|
||||
Encoding::CellDiff4VV => dec::cell_diff_4_vertical,
|
||||
Encoding::CellDiff4VV_small => dec::cell_diff_4_vertical_small,
|
||||
// Encoding::CellDiff4VV_large => dec::cell_diff_4_vertical_large,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue