Conversation
A clock rendered with a proportional font changes its width every few seconds and the region got destroyed and recreated each time, freeing and reallocating its MMA blocks between the VPE frame buffers. The canvas is now rounded up to 32x16 and only grows, and the bitmap is padded with transparent pixels to its size.
Made from the region thread, a canvas lands in the MMA gap the encoder's frame buffers are taken from and returned to, and on SSC323 the main stream then drops to 13 fps with 3DNR on. Created once at startup, with a quarter more width than the text needs, it sits below them: 20 fps with OSD, 3DNR, JPEG snapshots and motion detection.
regX_bgcolor fills the text canvas with a color, with a small margin on either side, so white text stays readable over bright walls; it is also set and reported through /api/osd/X as bgcolor=#RRGGBB or none. A regX_posx of -1 centers the region on the main stream.
PR Summary by QodoStabilize i6 OSD canvases and add background boxes and centering
AI Description
Diagram
High-Level Assessment
Files changed (13)
|
Code Review by Qodo
1. Centered overlays miss smaller streams
|
regN_*keys wiped their defaults (opacity 0, no font), so a region with only a text was invisible; the defaults are now seeded before parsing.sdk_start, before the pipeline, like majestic's fixed ones.regN_bgcolordraws the text over a box (0x8000is opaque black, with a small margin), also through/api/osd/Nasbgcolor=#RRGGBBornone;regN_posx: -1centers the region.doc/overlays.mdanddoc/endpoints.mdcover the new options.Tested on SSC323 with 3DNR, a JPEG channel and a second VPE consumer: date top left and a name centered, both over black boxes, 20 fps and no MMA allocation failures.
The HAL changes are kept inside
src/hal/star/i6_*and conditioned on the series where they are specific to SSC32x; glad to rebase once the HAL naming refactor you mentioned in #43 lands.