mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 05:31:15 +00:00
msdkvpp: Add compute scaling mode
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5128>
This commit is contained in:
parent
b20f66ceac
commit
b3e7404312
2 changed files with 20 additions and 5 deletions
|
@ -1076,11 +1076,22 @@ ensure_filters (GstMsdkVPP * thiz)
|
|||
|
||||
/* Scaling Mode */
|
||||
if (thiz->flags & GST_MSDK_FLAG_SCALING_MODE) {
|
||||
mfxExtVPPScaling *mfx_scaling = &thiz->mfx_scaling;
|
||||
mfx_scaling->Header.BufferId = MFX_EXTBUFF_VPP_SCALING;
|
||||
mfx_scaling->Header.BufferSz = sizeof (mfxExtVPPScaling);
|
||||
mfx_scaling->ScalingMode = thiz->scaling_mode;
|
||||
gst_msdkvpp_add_extra_param (thiz, (mfxExtBuffer *) mfx_scaling);
|
||||
gboolean scaling_mode_is_compute = FALSE;
|
||||
#if (MFX_VERSION >= 2007)
|
||||
if (thiz->scaling_mode == MFX_SCALING_MODE_INTEL_GEN_COMPUTE)
|
||||
scaling_mode_is_compute = TRUE;
|
||||
#endif
|
||||
if (MFX_RUNTIME_VERSION_ATLEAST (thiz->version, 2, 7) ||
|
||||
!scaling_mode_is_compute) {
|
||||
mfxExtVPPScaling *mfx_scaling = &thiz->mfx_scaling;
|
||||
mfx_scaling->Header.BufferId = MFX_EXTBUFF_VPP_SCALING;
|
||||
mfx_scaling->Header.BufferSz = sizeof (mfxExtVPPScaling);
|
||||
mfx_scaling->ScalingMode = thiz->scaling_mode;
|
||||
gst_msdkvpp_add_extra_param (thiz, (mfxExtBuffer *) mfx_scaling);
|
||||
} else {
|
||||
GST_WARNING_OBJECT (thiz,
|
||||
"Compute scaling mode not supported, ignore it...");
|
||||
}
|
||||
}
|
||||
|
||||
/* FRC */
|
||||
|
|
|
@ -371,6 +371,10 @@ gst_msdkvpp_scaling_mode_get_type (void)
|
|||
{MFX_SCALING_MODE_DEFAULT, "Default Scaling", "disable"},
|
||||
{MFX_SCALING_MODE_LOWPOWER, "Lowpower Scaling", "lowpower"},
|
||||
{MFX_SCALING_MODE_QUALITY, "High Quality Scaling", "quality"},
|
||||
#if (MFX_VERSION >= 2007)
|
||||
{MFX_SCALING_MODE_INTEL_GEN_COMPUTE,
|
||||
"Compute Mode Scaling (running on EUs)", "compute"},
|
||||
#endif
|
||||
{0, NULL, NULL}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue