Expand description
Spatial decision logging for encoder debugging.
When the debug-rect feature is enabled, the debug_rect! macro logs every
encoder decision alongside the rectangle it affects. Logs are collected in a
global buffer and flushed to a sidecar CSV when the frame is complete.
When the feature is disabled, the macro compiles to nothing.
§CSV format
stage,x,y,w,h,message§Query workflow
- Encode with
--features debug-rect→ producesoutput.jxl.debug_rect.csv - Decode both our JXL and cjxl’s JXL, diff the pixels to find divergent regions
- Call
query_overlapping(or grep the CSV) for rectangles touching that region - Read the
messagecolumn to understand every decision that affected those pixels