Update GigabyteLib to the vfg100 0914-b package
Compared with f5311e9:
- replace the vendored headers and x64 static library with supervisor package version 1.0.2
- record the corrected source location and SHA-256 checksum
- route YUY2 and Y210 selection through the now-linked GvfgSetVideoColorDepth API
- remove the output-format register fallback and the SDK-owned dual-Y210 restriction
- retain only diagnostic register read and write in the isolated driver extension
- document the undeclared GvfgGetAVStats binary symbol as an upstream header and ABI gap
This commit is contained in:
@@ -356,11 +356,7 @@ extern "C"
|
||||
GVFG_PARAM_IN int channel_index,
|
||||
GVFG_PARAM_OUT int *out_enabled);
|
||||
|
||||
/*
|
||||
* Select the hardware output format before capture starts. This capability
|
||||
* currently uses an isolated driver extension because GvfgSdk.lib 1.0.0
|
||||
* does not expose an equivalent API.
|
||||
*/
|
||||
/* Select the hardware output format before capture starts. */
|
||||
GVFG_API gvfg_status_t gvfg_set_channel_video_format(
|
||||
GVFG_PARAM_IN gvfg_handle handle,
|
||||
GVFG_PARAM_IN int channel_index,
|
||||
|
||||
@@ -43,7 +43,7 @@ GVFG_API gvfg_status_t gvfg_debug_get_channel_backend_stats(
|
||||
GVFG_PARAM_IN int channel_index,
|
||||
GVFG_PARAM_OUT gvfg_debug_backend_stats_t *out_stats);
|
||||
|
||||
/* GIGABYTELIB GAP: GvfgSdk.lib 1.0.0 has no register-access API. */
|
||||
/* GIGABYTELIB GAP: GvfgSdk.lib 1.0.2 has no declared register-access API. */
|
||||
GVFG_API gvfg_status_t gvfg_debug_read_register(
|
||||
GVFG_PARAM_IN gvfg_handle handle,
|
||||
GVFG_PARAM_IN uint32_t offset,
|
||||
|
||||
@@ -193,12 +193,11 @@ gvfg_status_t GigabyteCaptureSession::set_video_format(gvfg_pixel_format_t forma
|
||||
if (openStatus != GVFG_OK)
|
||||
return openStatus;
|
||||
|
||||
constexpr uint32_t kVideoOutputFormatRegister = 0x080;
|
||||
if (!gigabyte_write_register(device_handle_, kVideoOutputFormatRegister,
|
||||
format == GVFG_PIXFMT_Y210 ? 1u : 0u))
|
||||
return reject(GVFG_EIO,
|
||||
"GigabyteLib gap: driver extension failed to set the output format register");
|
||||
return GVFG_OK;
|
||||
const ULONG colorDepth = format == GVFG_PIXFMT_Y210
|
||||
? GVFG_VIDEO_COLOR_DEPTH_10_BITS
|
||||
: GVFG_VIDEO_COLOR_DEPTH_8_BITS;
|
||||
return from_vendor(GvfgSetVideoColorDepth(context_, channel_, colorDepth),
|
||||
"GvfgSetVideoColorDepth");
|
||||
}
|
||||
|
||||
gvfg_status_t GigabyteCaptureSession::refresh_video_info() const
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
|
||||
namespace gvfg::internal
|
||||
{
|
||||
// GIGABYTELIB GAP: GvfgSdk.lib 1.0.0 does not expose register access or
|
||||
// output-format selection. Keep these driver extensions isolated here so
|
||||
// they can be deleted when equivalent Gvfg* APIs are supplied.
|
||||
// GIGABYTELIB GAP: GvfgSdk.lib 1.0.2 has no declared register-access API.
|
||||
// Keep this driver extension isolated until matching Gvfg* APIs are supplied.
|
||||
bool gigabyte_read_register(HANDLE device, uint32_t offset, uint32_t &value);
|
||||
bool gigabyte_write_register(HANDLE device, uint32_t offset, uint32_t value);
|
||||
}
|
||||
|
||||
@@ -864,16 +864,7 @@ struct gvfg_handle_t
|
||||
return rejectChannel(channelIndex, GVFG_EINVAL,
|
||||
"gvfg_set_channel_video_format rejected: pixel format is invalid");
|
||||
|
||||
const int other = channelIndex == GVFG_CHANNEL_0 ? GVFG_CHANNEL_1 : GVFG_CHANNEL_0;
|
||||
if (format == GVFG_PIXFMT_Y210 &&
|
||||
requestedFormats[static_cast<size_t>(other)] == GVFG_PIXFMT_Y210)
|
||||
return rejectChannel(channelIndex, GVFG_ENOTSUP,
|
||||
"both channels cannot use Y210 at the same time");
|
||||
|
||||
const gvfg_status_t status = channel->setVideoFormat(format);
|
||||
if (status == GVFG_OK)
|
||||
requestedFormats[static_cast<size_t>(channelIndex)] = format;
|
||||
return status;
|
||||
return channel->setVideoFormat(format);
|
||||
}
|
||||
|
||||
gvfg_status_t stopAll()
|
||||
@@ -911,7 +902,6 @@ struct gvfg_handle_t
|
||||
std::array<std::unique_ptr<gvfg_channel_session_t>, 2> channels;
|
||||
int currentIndex = -1;
|
||||
std::array<bool, 2> zeroCopyRequested{false, false};
|
||||
std::array<gvfg_pixel_format_t, 2> requestedFormats{GVFG_PIXFMT_YUY2, GVFG_PIXFMT_YUY2};
|
||||
};
|
||||
|
||||
extern "C"
|
||||
|
||||
BIN
Binary file not shown.
+3
-3
@@ -3,10 +3,10 @@
|
||||
This directory contains the supervisor-provided static MSVC library used by the
|
||||
GVFG backend.
|
||||
|
||||
- Upstream version macro: `GVFG_SDK_VER 1.0.0`
|
||||
- Upstream version macro: `GVFG_SDK_VER 1.0.2`
|
||||
- Library: `GvfgSdk.lib`
|
||||
- SHA-256: `B8D1ED04C2A8F1857F43B81E68B17DAE362D576D2156AF666A2B5C3286CEBDAA`
|
||||
- Original source: `_SDK/ex/_demo/GigabyteLib/GigabyteLib`
|
||||
- SHA-256: `EC9577D4BE76861E44DFDD3B537DF2A57CCDA5A5F1B14E0BAAC92213E796A743`
|
||||
- Original source: `ex_demo/GigabyteLib/vfg100_0914_b`
|
||||
|
||||
`GvfgSdk.lib` is linked into `gvfg.dll`; it is not distributed as a separate
|
||||
customer runtime dependency. The supplied package did not contain source,
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ extern "C" {
|
||||
#define GVFG_PARAM_OUT
|
||||
|
||||
#define GVFG_SDK_API
|
||||
#define GVFG_SDK_VER "1.0.0"
|
||||
#define GVFG_SDK_VER "1.0.2"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -27,6 +27,8 @@ typedef enum GVFG_HRESULT {
|
||||
|
||||
} GVFG_HRESULT;
|
||||
|
||||
#define GVFG_VIDEO_COLOR_DEPTH_8_BITS (8)
|
||||
#define GVFG_VIDEO_COLOR_DEPTH_10_BITS (10)
|
||||
|
||||
#define GVFG_VIDEO_INTERFACE_SDI (0)
|
||||
#define GVFG_VIDEO_INTERFACE_HDMI (1)
|
||||
@@ -240,6 +242,11 @@ GVFG_SDK_API GVFG_HRESULT GvfgGetAudioFrame(GVFG_PARAM_IN PGVFG_CONTEXT pCxt,
|
||||
|
||||
|
||||
|
||||
GVFG_SDK_API GVFG_HRESULT GvfgSetVideoColorDepth(GVFG_PARAM_IN PGVFG_CONTEXT pCxt,
|
||||
GVFG_PARAM_IN ULONG videoChn,
|
||||
GVFG_PARAM_IN ULONG colorDepth);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
# GigabyteLib 1.0.0 integration gaps
|
||||
# GigabyteLib 1.0.2 integration gaps
|
||||
|
||||
Capture, audio, events, signal information, copy mode, and zero-copy mode use
|
||||
the supervisor-provided `GvfgSdk.lib` API directly.
|
||||
|
||||
## Action required from the GigabyteLib owner
|
||||
|
||||
The following existing GVFG capabilities are not exposed by `GvfgSdk.lib 1.0.0`:
|
||||
The following existing GVFG capabilities are not exposed by the declared
|
||||
`GvfgSdk.lib 1.0.2` API:
|
||||
|
||||
| GVFG capability | Current temporary implementation | Requested GigabyteLib API |
|
||||
|---|---|---|
|
||||
| Select YUY2 or Y210 output | Write global register `0x080` through the isolated driver extension | Add a channel-aware `GvfgSetVideoFormat` or equivalent |
|
||||
| Read a diagnostic register | Driver read-register request in `gigabyte_driver_extensions.cpp` | Add a supported diagnostic register-read API |
|
||||
| Write a diagnostic register | Driver write-register request in `gigabyte_driver_extensions.cpp` | Add a supported diagnostic register-write API |
|
||||
|
||||
These are marked `GIGABYTELIB GAP` in source. They intentionally do not use
|
||||
the removed `giga_ioctl.dll`; the minimal fallback is compiled into `gvfg.dll`.
|
||||
Once official `Gvfg*` functions exist, replace the three extension calls and
|
||||
delete `gigabyte_driver_extensions.*`.
|
||||
GigabyteLib 1.0.2 supplies `GvfgSetVideoColorDepth()` for YUY2/Y210 selection,
|
||||
so format switching no longer uses the extension. Once official register functions
|
||||
exist, replace the remaining two extension calls and delete
|
||||
`gigabyte_driver_extensions.*`.
|
||||
|
||||
The library owner should also confirm whether output-format register `0x080`
|
||||
is global or channel-specific and whether CH0 and CH1 may both select Y210.
|
||||
The binary also contains a C++-mangled `GvfgGetAVStats` symbol, but the supplied
|
||||
header declares neither that function nor `GIGA_AV_STATS_INFO`. It cannot be used
|
||||
safely until its public declaration and structure ABI are supplied.
|
||||
|
||||
@@ -229,7 +229,7 @@ Zero-copy mode 的 driver lifecycle 由 SDK 管理:open 時 enable,每次成
|
||||
成功 read 後,不論 PCM 是送往播放、錄音或被丟棄,都必須正好 release 一次。
|
||||
|
||||
`gvfg_set_channel_video_format()` 可在 stream 尚未開始或已 stop 時選擇 YUY2/Y210。
|
||||
目前 GigabyteLib 1.0.0 沒有對應 API,因此此功能由隔離的 driver extension 暫時補足。
|
||||
此功能由 GigabyteLib 1.0.2 的 `GvfgSetVideoColorDepth()` 實作。
|
||||
|
||||
### 查詢
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ register 與 DMA 實作不屬於本文件。
|
||||
|
||||
`gvfg_sdi_mode_t`、`gvfg_sdi_resolution_t` 與 `gvfg_sdi_fps_t` 提供
|
||||
`gvfg_sdi_info_t.mode`、`resolution`、`fps` 的程式判斷常數。其數值與
|
||||
GigabyteLib 1.0.0 完全一致,包含:
|
||||
GigabyteLib 1.0.2 完全一致,包含:
|
||||
|
||||
- Mode:`GVFG_SDI_INPUT_MODE_HD`、`SD`、`3G`。
|
||||
- Resolution:SMPTE ST 274 1920x1080、ST 296 1280x720、SMPTE 2048
|
||||
@@ -286,9 +286,8 @@ gvfg_status_t gvfg_set_channel_video_format(gvfg_handle handle,
|
||||
|
||||
- 支援 `GVFG_PIXFMT_YUY2` 與 `GVFG_PIXFMT_Y210`。
|
||||
- Channel 必須已 open,且 capture 必須尚未 start 或已 stop。
|
||||
- 目前透過隔離的 driver extension 寫入 output-format register;這是
|
||||
`GvfgSdk.lib 1.0.0` 尚未提供的功能。
|
||||
- 同一裝置 CH0、CH1 不可同時設定 Y210。
|
||||
- YUY2 對應 GigabyteLib 8-bit color depth,Y210 對應 10-bit;SDK 透過
|
||||
`GvfgSetVideoColorDepth()` 設定,不直接寫硬體 register。
|
||||
|
||||
### 1.20 Audio capture selection and frame ownership
|
||||
|
||||
|
||||
@@ -123,9 +123,10 @@ x64 `gvfg_frame_t` ABI 已在 `gvfg_capture.cpp` 以 static assertions 固定為
|
||||
## GigabyteLib requirement
|
||||
|
||||
Capture、audio、event 與 frame ownership 的 driver ABI 由主管提供的
|
||||
`GvfgSdk.lib` 負責。例外只有 library 1.0.0 尚未提供的 output-format selection
|
||||
與 diagnostic register R/W;它們集中在 `gigabyte_driver_extensions.*`,不得擴大
|
||||
成第二套 capture backend。待主管補上正式 `Gvfg*` API 後應刪除此 extension。
|
||||
`GvfgSdk.lib` 負責。Output-format selection 已改用 library 1.0.2 的
|
||||
`GvfgSetVideoColorDepth()`;目前唯一例外是 diagnostic register R/W,集中在
|
||||
`gigabyte_driver_extensions.*`,不得擴大成第二套 capture backend。待主管補上正式
|
||||
register API 後應刪除此 extension。
|
||||
|
||||
目前原生格式:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user