Remove legacy signal status fields
This commit is contained in:
@@ -269,9 +269,7 @@ typedef struct
|
|||||||
{
|
{
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
double fps;
|
gvfg_fpga_signal_status_t fpga;
|
||||||
int bit_depth;
|
|
||||||
char pixel_format[32];
|
|
||||||
} gvfg_signal_status_t;
|
} gvfg_signal_status_t;
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -279,9 +277,7 @@ typedef struct
|
|||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `width` | input 寬度 |
|
| `width` | input 寬度 |
|
||||||
| `height` | input 高度 |
|
| `height` | input 高度 |
|
||||||
| `fps` | Legacy field;GVFG 固定回 `0`,請使用 `fpga.frame_rate_*` |
|
| `fpga` | FPGA raw/decoded signal metadata |
|
||||||
| `bit_depth` | Legacy SDK source-buffer bit depth;FPGA bit depth 請使用 `fpga.bit_depth` |
|
|
||||||
| `pixel_format` | Legacy SDK source-buffer format;callback buffer format 請使用 `gvfg_runtime_info_t::delivered_frame` |
|
|
||||||
|
|
||||||
|
|
||||||
### Customer buffer vs FPGA signal
|
### Customer buffer vs FPGA signal
|
||||||
@@ -324,9 +320,6 @@ typedef struct
|
|||||||
{
|
{
|
||||||
int width; /* Signal width in pixels, from FPGA when available. */
|
int width; /* Signal width in pixels, from FPGA when available. */
|
||||||
int height; /* Signal height in pixels, from FPGA when available. */
|
int height; /* Signal height in pixels, from FPGA when available. */
|
||||||
double fps; /* Legacy field; GVFG leaves this 0. Use fpga.frame_rate_* instead. */
|
|
||||||
int bit_depth; /* Legacy SDK source-buffer field. Prefer fpga.* and runtime delivered_frame. */
|
|
||||||
char pixel_format[32]; /* Legacy SDK source-buffer field. Prefer fpga.* and runtime delivered_frame. */
|
|
||||||
gvfg_fpga_signal_status_t fpga; /* Raw/decoded FPGA signal metadata. */
|
gvfg_fpga_signal_status_t fpga; /* Raw/decoded FPGA signal metadata. */
|
||||||
} gvfg_signal_status_t;
|
} gvfg_signal_status_t;
|
||||||
```
|
```
|
||||||
@@ -900,7 +893,7 @@ gvfg_signal_status_t sig = {0};
|
|||||||
gvfg_status_t st = gvfg_get_signal_status(handle, &sig);
|
gvfg_status_t st = gvfg_get_signal_status(handle, &sig);
|
||||||
|
|
||||||
if (st == GVFG_OK) {
|
if (st == GVFG_OK) {
|
||||||
printf("Signal legacy: %dx%d\n",
|
printf("Signal: %dx%d\n",
|
||||||
sig.width,
|
sig.width,
|
||||||
sig.height);
|
sig.height);
|
||||||
|
|
||||||
@@ -1265,7 +1258,6 @@ wait_frame: deliver
|
|||||||
## Current XDMA Notes
|
## Current XDMA Notes
|
||||||
|
|
||||||
- The current XDMA path exposes decoded FPGA signal metadata through `sig.fpga`.
|
- The current XDMA path exposes decoded FPGA signal metadata through `sig.fpga`.
|
||||||
- `sig.pixel_format` and `sig.bit_depth` are legacy SDK source-buffer fields.
|
|
||||||
- The delivered customer callback buffer is reported by `gvfg_runtime_info_t::delivered_frame`.
|
- The delivered customer callback buffer is reported by `gvfg_runtime_info_t::delivered_frame`.
|
||||||
- `sig.fpga.bit_depth=10` does not by itself mean the delivered callback buffer is `Y210`; the current callback path reports BGRA8.
|
- `sig.fpga.bit_depth=10` does not by itself mean the delivered callback buffer is `Y210`; the current callback path reports BGRA8.
|
||||||
- `sig.fpga.frame_rate_bits=0001` is not in the supported table, so the UI/API reports it as `--`.
|
- `sig.fpga.frame_rate_bits=0001` is not in the supported table, so the UI/API reports it as `--`.
|
||||||
|
|||||||
@@ -127,9 +127,6 @@ typedef struct
|
|||||||
{
|
{
|
||||||
int width; /* Signal width in pixels, from FPGA when available. */
|
int width; /* Signal width in pixels, from FPGA when available. */
|
||||||
int height; /* Signal height in pixels, from FPGA when available. */
|
int height; /* Signal height in pixels, from FPGA when available. */
|
||||||
double fps; /* Legacy field; GVFG leaves this 0. Use fpga.frame_rate_* instead. */
|
|
||||||
int bit_depth; /* Legacy SDK source-buffer bit depth. Prefer fpga.* and runtime delivered_frame. */
|
|
||||||
char pixel_format[32]; /* Legacy SDK source-buffer format. Prefer fpga.* and runtime delivered_frame. */
|
|
||||||
gvfg_fpga_signal_status_t fpga; /* Raw/decoded FPGA signal metadata. */
|
gvfg_fpga_signal_status_t fpga; /* Raw/decoded FPGA signal metadata. */
|
||||||
} gvfg_signal_status_t;
|
} gvfg_signal_status_t;
|
||||||
|
|
||||||
@@ -144,7 +141,7 @@ typedef struct
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
gvfg_signal_status_t input_signal; /* FPGA-reported signal metadata plus legacy buffer fields. */
|
gvfg_signal_status_t input_signal; /* FPGA-reported signal metadata. */
|
||||||
gvfg_delivered_frame_info_t delivered_frame; /* Frame buffer delivered by gvfg.dll to the app. */
|
gvfg_delivered_frame_info_t delivered_frame; /* Frame buffer delivered by gvfg.dll to the app. */
|
||||||
double capture_fps; /* Runtime FPS measured from backend frames seen by the SDK worker. */
|
double capture_fps; /* Runtime FPS measured from backend frames seen by the SDK worker. */
|
||||||
uint64_t delivered_frames; /* Number of frames delivered to the app callback. */
|
uint64_t delivered_frames; /* Number of frames delivered to the app callback. */
|
||||||
@@ -406,8 +403,8 @@ GVFG_API gvfg_status_t gvfg_stop(gvfg_handle handle);
|
|||||||
* - GVFG_EINVAL if handle or out_status is NULL.
|
* - GVFG_EINVAL if handle or out_status is NULL.
|
||||||
* - GVFG_ENODEV if no valid signal information is available.
|
* - GVFG_ENODEV if no valid signal information is available.
|
||||||
*
|
*
|
||||||
* The FPGA metadata describes the hardware signal. The pixel_format and
|
* The FPGA metadata describes the hardware signal. Use
|
||||||
* bit_depth fields describe the buffer format delivered by the customer API.
|
* gvfg_runtime_info_t::delivered_frame for the callback buffer format.
|
||||||
*/
|
*/
|
||||||
GVFG_API gvfg_status_t gvfg_get_signal_status(gvfg_handle handle, gvfg_signal_status_t *out_status);
|
GVFG_API gvfg_status_t gvfg_get_signal_status(gvfg_handle handle, gvfg_signal_status_t *out_status);
|
||||||
|
|
||||||
|
|||||||
@@ -158,27 +158,6 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *gdriver_pixel_format_name(gdriver_pixel_format_t fmt)
|
|
||||||
{
|
|
||||||
switch (fmt)
|
|
||||||
{
|
|
||||||
case GDRIVER_PIXFMT_YUY2:
|
|
||||||
return "YUY2";
|
|
||||||
case GDRIVER_PIXFMT_Y210:
|
|
||||||
return "Y210";
|
|
||||||
case GDRIVER_PIXFMT_RGB24:
|
|
||||||
return "RGB24";
|
|
||||||
case GDRIVER_PIXFMT_NV12:
|
|
||||||
return "NV12";
|
|
||||||
case GDRIVER_PIXFMT_P010:
|
|
||||||
return "P010";
|
|
||||||
case GDRIVER_PIXFMT_YUV444:
|
|
||||||
return "YUV444";
|
|
||||||
default:
|
|
||||||
return "UNKNOWN";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool fpga_field_valid(uint32_t mask, int bit)
|
bool fpga_field_valid(uint32_t mask, int bit)
|
||||||
{
|
{
|
||||||
return (mask & (1u << bit)) != 0;
|
return (mask & (1u << bit)) != 0;
|
||||||
@@ -380,9 +359,6 @@ struct gvfg_handle_t
|
|||||||
haveSignalSize = fpgaWidthValid && fpgaHeightValid && fpgaWidthRaw != 0 && fpgaHeightRaw != 0;
|
haveSignalSize = fpgaWidthValid && fpgaHeightValid && fpgaWidthRaw != 0 && fpgaHeightRaw != 0;
|
||||||
out.width = haveSignalSize ? static_cast<int>(fpgaWidthRaw) : 0;
|
out.width = haveSignalSize ? static_cast<int>(fpgaWidthRaw) : 0;
|
||||||
out.height = haveSignalSize ? static_cast<int>(fpgaHeightRaw) : 0;
|
out.height = haveSignalSize ? static_cast<int>(fpgaHeightRaw) : 0;
|
||||||
out.fps = 0.0;
|
|
||||||
out.bit_depth = static_cast<int>(bitDepth ? bitDepth : 8);
|
|
||||||
copy_cstr(out.pixel_format, sizeof(out.pixel_format), gdriver_pixel_format_name(pixelFormat));
|
|
||||||
out.fpga.valid_mask = fpgaValidMask;
|
out.fpga.valid_mask = fpgaValidMask;
|
||||||
out.fpga.width_valid = fpgaWidthValid ? 1 : 0;
|
out.fpga.width_valid = fpgaWidthValid ? 1 : 0;
|
||||||
out.fpga.height_valid = fpgaHeightValid ? 1 : 0;
|
out.fpga.height_valid = fpgaHeightValid ? 1 : 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user