mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 15:18:21 +00:00
mskd: Don't use MFX_FOURCC_RGB565 if it's undefined
../subprojects/gst-plugins-bad/sys/msdk/msdk.c(61): error C2065: 'MFX_FOURCC_RGB565' The minimum required version for the format seems to MFX_VERSION >= 1028
This commit is contained in:
parent
74d281fbc2
commit
1d17e3891d
5 changed files with 24 additions and 3 deletions
|
@ -312,12 +312,14 @@ gst_msdk_frame_lock (mfxHDL pthis, mfxMemId mid, mfxFrameData * data)
|
|||
data->B = data->R + 2;
|
||||
data->A = data->R + 3;
|
||||
break;
|
||||
#if (MFX_VERSION >= 1028)
|
||||
case VA_FOURCC_RGB565:
|
||||
data->Pitch = mem_id->image.pitches[0];
|
||||
data->R = buf + mem_id->image.offsets[0];
|
||||
data->G = data->R;
|
||||
data->B = data->R;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
@ -454,10 +456,12 @@ gst_msdk_export_dmabuf_to_vasurface (GstMsdkContext * context,
|
|||
va_chroma = VA_RT_FORMAT_YUV422;
|
||||
va_fourcc = VA_FOURCC_UYVY;
|
||||
break;
|
||||
#if (MFX_VERSION >= 1028)
|
||||
case GST_VIDEO_FORMAT_RGB16:
|
||||
va_chroma = VA_RT_FORMAT_RGB16;
|
||||
va_fourcc = VA_FOURCC_RGB565;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
goto error_unsupported_format;
|
||||
}
|
||||
|
|
|
@ -113,12 +113,14 @@ ensure_data (GstMsdkSystemMemory * mem)
|
|||
mem->surface->Data.B = mem->surface->Data.R + 2;
|
||||
mem->surface->Data.Pitch = mem->destination_pitches[0];
|
||||
break;
|
||||
#if (MFX_VERSION >= 1028)
|
||||
case GST_VIDEO_FORMAT_RGB16:
|
||||
mem->surface->Data.R = mem->cached_data[0];
|
||||
mem->surface->Data.G = mem->surface->Data.R;
|
||||
mem->surface->Data.B = mem->surface->Data.R;
|
||||
mem->surface->Data.Pitch = mem->destination_pitches[0];
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
|
|
@ -51,15 +51,26 @@
|
|||
GST_DEBUG_CATEGORY_EXTERN (gst_msdkvpp_debug);
|
||||
#define GST_CAT_DEFAULT gst_msdkvpp_debug
|
||||
|
||||
#if (MFX_VERSION >= 1028)
|
||||
#define SUPPORTED_SYSTEM_FORMAT \
|
||||
"{ NV12, YV12, I420, YUY2, UYVY, BGRA, BGRx, RGB16, P010_10LE }"
|
||||
#define SUPPORTED_DMABUF_FORMAT \
|
||||
"{ NV12, BGRA, YUY2, UYVY, RGB16, P010_10LE}"
|
||||
#else
|
||||
#define SUPPORTED_SYSTEM_FORMAT \
|
||||
"{ NV12, YV12, I420, YUY2, UYVY, BGRA, BGRx, P010_10LE }"
|
||||
#define SUPPORTED_DMABUF_FORMAT \
|
||||
"{ NV12, BGRA, YUY2, UYVY, P010_10LE}"
|
||||
#endif
|
||||
|
||||
static GstStaticPadTemplate gst_msdkvpp_sink_factory =
|
||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE
|
||||
("{ NV12, YV12, I420, YUY2, UYVY, BGRA, BGRx, RGB16, P010_10LE }")
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (SUPPORTED_SYSTEM_FORMAT)
|
||||
", " "interlace-mode = (string){ progressive, interleaved, mixed }" ";"
|
||||
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_DMABUF,
|
||||
"{ NV12, BGRA, YUY2, UYVY, RGB16, P010_10LE}")));
|
||||
SUPPORTED_DMABUF_FORMAT)));
|
||||
|
||||
static GstStaticPadTemplate gst_msdkvpp_src_factory =
|
||||
GST_STATIC_PAD_TEMPLATE ("src",
|
||||
|
|
|
@ -58,7 +58,9 @@ static const struct map gst_msdk_video_format_to_mfx_map[] = {
|
|||
GST_VIDEO_INFO_TO_MFX_MAP (UYVY, YUV422, UYVY),
|
||||
GST_VIDEO_INFO_TO_MFX_MAP (BGRA, YUV444, RGB4),
|
||||
GST_VIDEO_INFO_TO_MFX_MAP (BGRx, YUV444, RGB4),
|
||||
#if (MFX_VERSION >= 1028)
|
||||
GST_VIDEO_INFO_TO_MFX_MAP (RGB16, YUV444, RGB565),
|
||||
#endif
|
||||
{0, 0, 0}
|
||||
};
|
||||
|
||||
|
|
|
@ -62,7 +62,9 @@ static const struct fourcc_map gst_msdk_fourcc_mfx_to_va[] = {
|
|||
FOURCC_MFX_TO_VA (RGB4, ARGB),
|
||||
FOURCC_MFX_TO_VA (P8, P208),
|
||||
FOURCC_MFX_TO_VA (P010, P010),
|
||||
#if (MFX_VERSION >= 1028)
|
||||
FOURCC_MFX_TO_VA (RGB565, RGB565),
|
||||
#endif
|
||||
{0, 0}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue