obs-ffmpeg: Add I010/P010 as formats for old NVENC

Avoids fallback to NV12, crushing 10-bit into 8-bit.
This commit is contained in:
jpark37 2022-04-29 09:45:49 -07:00 committed by Jim
parent 7eb36eadb1
commit 9677ad1876

View File

@ -57,8 +57,16 @@ static const char *hevc_nvenc_getname(void *unused)
static inline bool valid_format(enum video_format format)
{
return format == VIDEO_FORMAT_I420 || format == VIDEO_FORMAT_NV12 ||
format == VIDEO_FORMAT_I444;
switch (format) {
case VIDEO_FORMAT_I420:
case VIDEO_FORMAT_NV12:
case VIDEO_FORMAT_I444:
case VIDEO_FORMAT_I010:
case VIDEO_FORMAT_P010:
return true;
default:
return false;
}
}
static void nvenc_video_info(void *data, struct video_scale_info *info)