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.
This commit is contained in:
@@ -643,10 +643,9 @@ private:
|
||||
renderFmt = gvfg::internal::GVFG_RENDER_FMT_RGBA16;
|
||||
else if (work.pixelFormat == GVFG_PREVIEW_PIXFMT_DICOM_YBR_FULL_422)
|
||||
renderFmt = gvfg::internal::GVFG_RENDER_FMT_DICOM_YBR_FULL_422;
|
||||
rendered = pipeline_->render_texture_to_fp16(work.texture.Get(), renderFmt,
|
||||
work.width, work.height, work.view.Get());
|
||||
if (rendered)
|
||||
presentResult = pipeline_->present_preview(work.width, work.height);
|
||||
presentResult = pipeline_->present_texture(work.texture.Get(), work.view.Get(), renderFmt,
|
||||
work.width, work.height, work.bitDepth);
|
||||
rendered = presentResult != gvfg::internal::GVFG_PREVIEW_PRESENT_FAILED;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -708,7 +707,7 @@ private:
|
||||
desc.swapchain_10bit = gvfg::internal::GVFG_RENDER_PREVIEW_BITDEPTH_AUTO;
|
||||
pipeline_->configurePreview(desc);
|
||||
pipeline_->set_source_bit_depth(sourceBitDepth > 0 ? sourceBitDepth : 8);
|
||||
const bool ready = pipeline_->ensure_rt_and_pipeline(width, height, true) &&
|
||||
const bool ready = pipeline_->ensure_states() &&
|
||||
pipeline_->ensure_preview_swapchain(width, height);
|
||||
return ready;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user