Skip to content

Commit 269af7a

Browse files
ac-freemanAndrew
and
Andrew
authored
Completely rewrite adder-viz with eframe (#120)
* Begin huge refactoring of viz. Setup template app with resizing key * Create the tab interface * Insert first slider * Setup communication between main thread and transcoder task * Setup for creating framed transcoder * Get solid color image appearing with new interface * Setup for just updating a texture * Progress * Working live transcode display, but could be faster * Write the textures directly * Toggle input view * Rescaling and color * Quality params * View mode * More options * Big restructuring * Setup for syncing metrics * Quality plot showing * Reset buttons * Open file button * Save video button * UX improvements * Improve design with enum_dispatch crate * Show event rate information * Display bitrates * Fix feat radius adjustment * Loop videos in transcoder, and create standalone framer bin * Fix save restarting bug * Fix save restarting bug * Fix frame flushing * Separate ADU interval slider * Begin implementing player * More player setup * Changes during redeye flight * Tmpframerdavis (#119) * framer changes * higher tps for davis * Add comment * Generalize framer * First pass redesigning the player--images do show on screen. Need to add the rest of the sliders and support buffer limiting * Start working on updating player state * Update buffer limit * Add a note * Smoother playback at fixed rate * Buffer limit by default * Buffer pause (for a hardcoded 3-second duration * Don't hang the UI thread * Seek back button * Fix the stop buttons * Can change view mode * Enable playback feature detection * Cleanup * Don't hang transcoder on compression * Fix playback speed * Proper playback looping * Update crate versions * Start adding back davis transcoder * Drop runtime, but probably slower? * Properly restart DAVIS videos * event ordering * Bandwidth limiting and davis socket * Cleanup * Re-add prophesee support * Compile with opencv flag disabled * Get more tests passing * More tests passing with ordered bytes messages * All tests passing * Cleanup * Eframe4 (#121) * Second attempt at reducing stuttering in live transcode * Seemingly get it working * Cleanup * Avoid writer deadlock * Cleanup * Tests passing --------- Co-authored-by: Andrew <[email protected]>
1 parent 38f5da5 commit 269af7a

34 files changed

+4056
-3044
lines changed

.idea/runConfigurations/Run_adder_viz_dynamic.xml

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Test_stable.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

adder-codec-core/Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "adder-codec-core"
3-
version = "0.3.3"
3+
version = "0.3.4"
44
edition = "2021"
55
authors = ["Andrew C. Freeman"]
66
description = """Core library for encoding/decoding ADΔER events
@@ -30,6 +30,7 @@ fenwick = "2.0.1"
3030
float-cmp = "0.9.0"
3131
hashbrown = "0.13.2"
3232
itertools = "0.10.5"
33+
nestify = "0.3.1"
3334
numquant = "0.2.0"
3435
num-traits = "0.2.15"
3536
priority-queue = "1.3.1"

adder-codec-core/src/codec/compressed/source_model/event_structure/event_adu.rs

+26-24
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,43 @@ use crate::{AbsoluteT, DeltaT, Event, PlaneSize};
88
use arithmetic_coding_adder_dep::{Decoder, Encoder};
99
use bitstream_io::{BigEndian, BitReader, BitWriter};
1010
use ndarray::Array2;
11+
use nestify::nest;
1112
use std::io::Cursor;
1213
use std::mem::size_of;
1314

14-
#[derive(Clone, Debug, Default)]
15-
pub struct EventAdu {
16-
/// Contains the sparse events in the cube. The index is the relative interval of dt_ref from the start
17-
event_cubes: Array2<EventCube>,
15+
nest! {
16+
#[derive(Clone, Debug, Default)]
17+
pub struct EventAdu {
18+
/// Contains the sparse events in the cube. The index is the relative interval of dt_ref from the start
19+
event_cubes: Array2<EventCube>,
1820

19-
/// The absolute time of the Adu's beginning (not necessarily aligned to an event. We structure
20-
/// cubes to be in temporal lockstep at the beginning.)
21-
pub(crate) start_t: AbsoluteT,
21+
/// The absolute time of the Adu's beginning (not necessarily aligned to an event. We structure
22+
/// cubes to be in temporal lockstep at the beginning.)
23+
pub(crate) start_t: AbsoluteT,
2224

23-
/// How many ticks each input interval spans
24-
pub(crate) dt_ref: DeltaT,
25+
/// How many ticks each input interval spans
26+
pub(crate) dt_ref: DeltaT,
2527

26-
/// How many dt_ref intervals the whole adu spans
27-
pub(crate) num_intervals: usize,
28+
/// How many dt_ref intervals the whole adu spans
29+
pub(crate) num_intervals: usize,
2830

29-
pub(crate) skip_adu: bool,
31+
pub(crate) skip_adu: bool,
3032

31-
cube_to_write_count: u16,
33+
cube_to_write_count: u16,
3234

33-
pub(crate) state: AduState,
35+
pub(crate) state:
36+
#[derive(Clone, Debug, Default, PartialEq)]
37+
pub enum AduState {
38+
Compressed,
39+
Decompressed,
40+
#[default]
41+
Empty,
42+
},
3443

35-
first_run: bool,
44+
first_run: bool,
3645

37-
decompress_block_idx: (usize, usize), // decompressed_event_queue: VecDeque<Event>,
38-
}
39-
40-
#[derive(Clone, Debug, Default, PartialEq)]
41-
pub enum AduState {
42-
Compressed,
43-
Decompressed,
44-
#[default]
45-
Empty,
46+
decompress_block_idx: (usize, usize), // decompressed_event_queue: VecDeque<Event>,
47+
}
4648
}
4749

4850
impl EventAdu {

0 commit comments

Comments
 (0)