Commit Graph
14 Commits
Author SHA1 Message Date
Mark.lin d03f064b4f Refine GVFG preview pacing and error reporting
- Replace non-blocking Present retries with Present(0, 0), allowing DXGI to
  wait for presentation dependencies on the dedicated preview worker.
- Change preview admission from newest-frame replacement to bounded FIFO
  delivery with three pending/upload reservations and one presenting slot.
- Expire queued preview frames after 50 ms before GPU processing and skip new
  preview submissions only when the bounded slot capacity is full.
- Track queue order and queue age without retaining SDK-owned frame memory;
  capture continues releasing each SDK frame after the synchronous upload.
- Service only synchronous Windows sent messages while waiting for preview
  mutexes, worker shutdown, idle drain, and capture-thread join to avoid an
  HWND-owner/DXGI deadlock without dispatching queued application callbacks.
- Preserve internal preview pacing and audio queue counters while removing
  expected busy, expired, and audio-eviction reports from the normal UI log.
- Reserve delivery error logs for preview/render failures, video or audio
  frame-ID anomalies, audio write failures, and final accounting mismatches.
- Remove the normal stop summary and the audio queue-drop field from the
  status display so expected pacing adjustments are not presented as faults.
- Update the public preview comments and diagnostic documentation for the FIFO
  capacity, queue-age boundary, blocking Present behavior, and log policy.
- Keep the capture SDK, driver interfaces, frame ownership, GPU conversion
  precision, and public delivery-statistics structure unchanged.

Validation:
- User testing reported approximately 18% GPU utilization for one 1920x1080
  Y210 10-bit preview channel. This was not independently benchmarked.
- A user-provided long-run log contained 13,715,695 received video frames with
  no preview render failures; periodic preview skips matched the confirmed
  60.000 FPS versus 59.94 Hz pacing difference.
- The same log showed periodic audio playback-queue eviction without audio
  frame-ID gaps or write failures; this is retained as internal diagnostic
  accounting rather than reported as a source-delivery error.
- Static source review and git diff --check passed. No application, shader, or
  driver build was performed by the agent, and runtime deadlock behavior has
  not been independently reproduced or validated.
2026-09-07 10:28:03 +08:00
Mark.lin 29b449fc6e Optimize GVFG GPU preview and clarify delivery diagnostics
- Render preview directly from the FP16 conversion target into the selected
  8-bit or 10-bit swapchain, removing the full-frame scene copy and the
  intermediate BGRA8 preview pass without capture-frame decimation.
- Simplify neutral YUY2/Y210 shaders to one packed texture load per pixel;
  preserve BT.709 conversion, 10-bit unpacking and odd-width chroma handling.
- Cache shader resource views per upload slot and update constant-buffer
  contents only when source dimensions change.
- Allocate only preview resources and skip export-only shader compilation
  for preview; retain the full BGRA8/RGB10A2/NV12 buffer conversion path.
- Unbind render targets before swapchain resize/release and serialize preview
  configuration and resource changes with GPU rendering.
- Bound startup Present retries and retry presentation without redrawing;
  retain actual skipped-frame counts when presentation remains busy.
- Add preview delivery counters for presented, replaced, busy, failed,
  cancelled and pending frames, including busy source and affected frame ID.
- Fix an uncounted pending-frame replacement and drain pending preview work
  at Stop and before a new run to keep per-run accounting separate.
- Track application audio delivery, dropped duration, read/write stalls and
  frame-ID anomalies while retaining the original 10-block audio queue.
- Stop the channel on audio write failure or two seconds of zero-write
  progress; distinguish cancelled data from runtime drops.
- Keep the existing compact UI; aggregate delivery issue logs at most once
  per five seconds and emit a stop summary with accounting errors only.
- Document diagnostic interpretation, GPU changes and validation boundaries.

Validation:
- User testing reported approximately 15% lower GPU utilization after the
  optimization. Baseline/final readings and relative versus percentage-point
  interpretation were not supplied; no independent benchmark was performed.
- Static source checks and git diff --check passed. No application or shader
  build was performed by the agent; 10-bit startup resolution and long-run
  zero-loss behavior have not been confirmed.
- Rebuild the preview DLL with its matching APP; the SDK GPU buffer converter
  also shares the modified shader source. Capture APIs and driver are unchanged.
2026-09-04 16:02:33 +08:00
Mark.lin 61da467d83 Update GVFG for new driver capture flow
Use driver-managed video start/stop IOCTLs and request completed frames with MAXULONG instead of querying the done index. Add 300-frame timing statistics, lock format changes during GVFG streaming, and clear stale preview frames to black on signal loss. Document that this SDK revision requires the new PCIE S2MM driver.
2026-08-18 15:45:00 +08:00
Mark.lin 17fb9bfabd feat: align GVFG output with YUY2
- expose YUY2 across the public API, preview helper, backend, and GPU conversion paths while translating the legacy FPGA format value internally
- correct YUY2 chroma byte interpretation and update customer/internal documentation
- centralize the Standalone SDK version and expose it through gvfg_get_version
- show the SDK version in the sample and enable preview-window controls only after the first valid frame
- close and disable external preview windows when capture stops
2026-08-13 16:14:16 +08:00
Mark.lin a5b86e5872 Decouple preview presentation from capture 2026-08-13 13:55:03 +08:00
Mark.lin aad8419c2a Improve capture startup, frame loss reporting, and preview diagnostics
- defer DMA capture until the first frame reader is waiting
- deliver FIFO frames in sequence order and overwrite the oldest unread frame
  when the three-slot FIFO is full
- report known frame loss through GVFG_EVENT_FRAME_LOSS and runtime statistics
- replace the enum-only event API with the extensible gvfg_event_t structure
- expose per-handle public error details
- add preview GPU resource preparation before capture starts
- move GPU preview timing from periodic logs to the status display
- remove the redundant stream descriptor channel field
- reorganize customer and internal documentation
- add a complete customer API reference
2026-08-12 17:30:56 +08:00
Mark.lin 3309f822ec Integrate GPU conversion and update capture pipeline 2026-08-06 10:03:32 +08:00
Mark.lin 2b5e75ade9 Simplify GVFG API and frame diagnostics 2026-07-30 16:43:30 +08:00
Mark.lin 747209fa87 feat: harden capture API and preview diagnostics 2026-07-27 11:10:59 +08:00
Mark.lin 2b2eeb7302 refactor: simplify PCIES2MM capture backend 2026-07-23 08:54:43 +08:00
Mark.lin 634c02b1f6 refactor: make preview helper standalone
Define a preview-owned frame descriptor with explicit row stride, remove the runtime dependency on gvfg.dll, and update CaptureDemo and the Qt sample to use the standalone API.
2026-07-21 09:09:43 +08:00
Mark.lin 7234619dcb Expose preview adapter info from GVFG helper
- Add adapter_name and adapter_index to gvfg_preview_info_t
- Capture the actual D3D11 adapter used by gvfg_preview.dll
- Report adapter name and DXGI index through gvfg_preview_get_info()
2026-07-07 17:29:03 +08:00
Mark.lin fd0272b623 Add frame layout API and split conversion helper
- Add gvfg_get_frame_layout() and gvfg_frame_layout_t for per-plane
  frame metadata without extending gvfg_frame_t
- Update gvfg_preview to consume gvfg_get_frame_layout() before
  falling back to width-derived stride
- Add optional gvfg_convert helper DLL for explicit snapshot/export
  conversion outside the core capture API
- Support YUY2/Y210 conversion to BGRA8, RGB48, and RGBA64 helper
  frames
- Add SAL annotations to public capture, preview, convert, and debug
  headers
- Update Traditional Chinese API/package documentation for core,
  preview, and convert helper split
2026-06-16 16:59:39 +08:00
Mark.lin d2657a69cb Split GVFG customer API and preview helper
Refactor GVFG into a pull-based customer API with internal debug diagnostics in gvfg_debug.h. Move preview rendering into the separate gvfg_preview helper DLL and update the Qt sample to link it explicitly. Clean legacy callback/preview docs and removed SDK-internal render/log helper sources from the core GVFG DLL.
2026-06-15 17:06:12 +08:00