fix: handle FPGA Y210 payload and correct chroma order

- treat FPGA v210 format marker as Y210 payload
- calculate Y210 DMA frame size as width * height * 4
- route CaptureDemo preview frames through the Y210 path
- normalize FPGA Y0/V/Y1/U data to standard Y0/U/Y1/V
- apply the same chroma correction to preview and frame conversion
- reallocate capture buffers using the detected pixel format
This commit is contained in:
Mark.lin
2026-07-20 16:24:06 +08:00
parent 5a143a4743
commit f7e5d20068
5 changed files with 52 additions and 17 deletions
@@ -165,7 +165,9 @@ namespace
case fourcc('N', 'V', '1', '2'):
return PCIES2MM_PIXFMT_NV12;
case fourcc('v', '2', '1', '0'):
return PCIES2MM_PIXFMT_V210;
// Temporary FPGA contract: FOURCC remains v210 while the DMA
// payload is laid out as Y210.
return PCIES2MM_PIXFMT_Y210;
case fourcc('Y', '2', '1', '0'):
return PCIES2MM_PIXFMT_Y210;
case fourcc('P', '0', '1', '0'):
@@ -456,6 +458,7 @@ namespace gvfg::internal
{
case PCIES2MM_PIXFMT_YUY2:
case PCIES2MM_PIXFMT_UYVY:
case PCIES2MM_PIXFMT_Y210:
case PCIES2MM_PIXFMT_V210:
break;
default: