Skip to content

Commit

Permalink
add notes about performance improvement for the future
Browse files Browse the repository at this point in the history
  • Loading branch information
bunnie committed Nov 19, 2024
1 parent d78899c commit e42b719
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions services/bao-video/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ const IMAGE_WIDTH: usize = 256;
const IMAGE_HEIGHT: usize = 240;
const BW_THRESH: u8 = 128;

// Next steps for performance improvement:
//
// Improve qr::mapping -> point_from_hv_lines such that we're not just deriving the HV
// lines from the the edges of the finder regions, we're also using the very edge of
// the whole QR code itself to guide the line. This will improve the intersection point
// so that we can accurately hit the "fourth corner". At the moment it's sort of a
// luck of the draw if the interpolation hits exactly right, or if we're roughly a module
// off from ideal, which causes the data around that point to be interpreted incorrectly.

pub fn blit_to_display(sh1107: &mut Oled128x128, frame: &[u8], display_cleared: bool) {
for (y, row) in frame.chunks(IMAGE_WIDTH).enumerate() {
if y & 1 == 0 {
Expand Down

0 comments on commit e42b719

Please sign in to comment.