Files
GVFG_Standalone/GVFG_SDK/helpers/gvfg_osd/README.md
T
Mark.lin f0beaff35f Add GPU text overlays and streamline SDK conversion paths
- add an internal DirectWrite/Direct2D OSD core for YUY2 and Y210 with configurable position, font size, RGB color, and up to 32 printable ASCII characters

- expose per-channel OSD set/clear APIs and blend only the visible overlay rectangle on the GPU while preserving the frame read/release contract and tracking native versus processed buffer ownership

- convert native YUY2/Y210 directly to BGRA8, RGB10A2, or NV12 with reusable output resources, avoiding unnecessary FP16 intermediates and scene copies

- draw native-size and reduced previews directly to the swapchain and allocate an FP16 intermediate only for enlarged previews while retaining the existing upload queue and format support

- bump the SDK version to 1.0.2, fix the installed customer API reference path, update conversion and OSD documentation, and remove the old 0922 SDK archive

Validation: git diff --cached --check passed before commit. No SDK rebuild or hardware runtime validation was performed in this commit pass.
2026-10-15 16:18:30 +08:00

1.2 KiB

GVFG OSD core

gvfg_osd_core is an internal static library that generates a full-frame YUV422 OSD surface when text settings change. It does not capture, process live video frames, communicate with the driver, or present a preview. The library is linked into gvfg.dll; it is not installed or shipped as a separate customer DLL.

The initial API supports:

  • YUY2 and Y210 output
  • printable ASCII text, up to 32 characters
  • Arial-preferred font with DirectWrite fallback, configurable pixel size, RGB color, and (x, y) position
  • BT.709 limited-range RGB-to-YUV conversion
  • an 8-bit coverage mask (0 transparent, 255 fully covered)

The caller owns all output memory. Width must be even. YUY2 requires at least width * 2 bytes per output row; Y210 requires width * 4. The mask requires at least width bytes per row.

For live SDK OSD, GpuOsdProcessor caches the non-zero mask bounds, aligned to complete YUV422 pixel pairs. Only this rectangle is uploaded, blended, and read back each frame. The SDK preserves the complete native frame with memory copies and replaces the processed rectangle; CPU code does not blend pixels. Text with no visible coverage bypasses processing. The public frame format and read/release contract remain unchanged.