Confirm single-image presents and require whole YUY2 macropixels in preview rows
- gvfg_playback_present_image compares the preview's presented count before and after rendering, and returns GVFG_PLAYBACK_EOUTPUT when the image was not actually presented.
- Compute the minimum YUY2 row size from whole 4-byte macropixels, so an odd-width row that is 2 bytes short is rejected instead of read past its end.
Validation: git diff --cached --check passed. The MSVC Release SDK build with these changes and 1d89392 passed. On a GIGABYTE SDI VFG100 with a 1080p60 SDI signal, the Viewer capture journey (live preview, snapshot, stop, restart, recording) passed with that SDK. gvfg_playback_present_image and odd-width YUY2 frames were not exercised.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -843,7 +843,7 @@ extern "C"
|
||||
switch (frame->pixel_format)
|
||||
{
|
||||
case GVFG_PREVIEW_PIXFMT_YUY2:
|
||||
minimumRowBytes = static_cast<uint64_t>(frame->width) * 2u;
|
||||
minimumRowBytes = (static_cast<uint64_t>(frame->width) + 1u) / 2u * 4u;
|
||||
break;
|
||||
case GVFG_PREVIEW_PIXFMT_Y210:
|
||||
minimumRowBytes = static_cast<uint64_t>(frame->width) * 4u;
|
||||
|
||||
Reference in New Issue
Block a user