cmorman89 / pixel_art_renderer

0 stars 0 forks source link

Implement Run-Length Buffering #1

Open cmorman89 opened 2 days ago

cmorman89 commented 2 days ago

Implement Run Length Buffering

Description

Run-length buffering needs to be implemented in the rendering pipeline to optimize how ANSI codes are handled. This will reduce the number of color transitions and improve rendering performance.

Goals:

Tasks:

  1. Create a RunBuffer class to store contiguous pixel runs.
  2. Add logic to RunBufferBuilder to detect color transitions and create runs.
  3. Utilize a backbuffer to detect the color transitions.
  4. Integrate into TerminalRenderer
  5. Update demo.py if necessary to use a run-buffer. Reactivate animation.
cmorman89 commented 1 day ago

Update Overview:

RunBuffer and RunBufferBuilder have been implemented as foundational changes. Integration into the rendering pipeline is pending.


Updated Features:

RunBuffer:

RunBufferBuilder:


Updated Progress:

Goals:

Completed:

Tasks:

Completed:

Remaining:


New Issues/To Do Items:

⚠️RunBuffer : __repr__() Output Oversized:

⚠️ Implement Adjacent RunBuffer Detection:


Summary:

The primary changes involve the addition of RunBuffer and RunBufferBuilder as a foundational step in improving efficiency and reducing redundancy in terminal rendering. These classes have been implemented but not yet integrated into the main rendering pipeline.