mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
msdk: vpp: remove mfxExtVPPDoUse from vpp filters.
According to msdk spec, there are two ways to enable filters: 1: Filters can be enabled by adding a filter ID to mfxExtVPPDoUse. In this case, default filter parameters are used 2: Add filter configuration structures directly to mfxVideoParam. Using 1 with 2 is optional but legal. Unfortunately it won't work with some specific use cases like Detail/EdgeEnhancement. Let's stick with option2 which works fine for all VPP operations. https://bugzilla.gnome.org/show_bug.cgi?id=796468
This commit is contained in:
parent
c4809aa16c
commit
10f57b73f3
2 changed files with 0 additions and 30 deletions
|
@ -769,7 +769,6 @@ gst_msdkvpp_close (GstMsdkVPP * thiz)
|
|||
static void
|
||||
ensure_filters (GstMsdkVPP * thiz)
|
||||
{
|
||||
guint n_filters = 0;
|
||||
|
||||
/* Denoise */
|
||||
if (thiz->flags & GST_MSDK_FLAG_DENOISE) {
|
||||
|
@ -778,8 +777,6 @@ ensure_filters (GstMsdkVPP * thiz)
|
|||
mfx_denoise->Header.BufferSz = sizeof (mfxExtVPPDenoise);
|
||||
mfx_denoise->DenoiseFactor = thiz->denoise_factor;
|
||||
gst_msdkvpp_add_extra_param (thiz, (mfxExtBuffer *) mfx_denoise);
|
||||
thiz->max_filter_algorithms[n_filters] = MFX_EXTBUFF_VPP_DENOISE;
|
||||
n_filters++;
|
||||
}
|
||||
|
||||
/* Rotation */
|
||||
|
@ -789,8 +786,6 @@ ensure_filters (GstMsdkVPP * thiz)
|
|||
mfx_rotation->Header.BufferSz = sizeof (mfxExtVPPRotation);
|
||||
mfx_rotation->Angle = thiz->rotation;
|
||||
gst_msdkvpp_add_extra_param (thiz, (mfxExtBuffer *) mfx_rotation);
|
||||
thiz->max_filter_algorithms[n_filters] = MFX_EXTBUFF_VPP_ROTATION;
|
||||
n_filters++;
|
||||
}
|
||||
|
||||
/* Deinterlace */
|
||||
|
@ -800,8 +795,6 @@ ensure_filters (GstMsdkVPP * thiz)
|
|||
mfx_deinterlace->Header.BufferSz = sizeof (mfxExtVPPDeinterlacing);
|
||||
mfx_deinterlace->Mode = thiz->deinterlace_method;
|
||||
gst_msdkvpp_add_extra_param (thiz, (mfxExtBuffer *) mfx_deinterlace);
|
||||
thiz->max_filter_algorithms[n_filters] = MFX_EXTBUFF_VPP_DEINTERLACING;
|
||||
n_filters++;
|
||||
}
|
||||
|
||||
/* Colorbalance(ProcAmp) */
|
||||
|
@ -815,8 +808,6 @@ ensure_filters (GstMsdkVPP * thiz)
|
|||
mfx_procamp->Brightness = thiz->brightness;
|
||||
mfx_procamp->Contrast = thiz->contrast;
|
||||
gst_msdkvpp_add_extra_param (thiz, (mfxExtBuffer *) mfx_procamp);
|
||||
thiz->max_filter_algorithms[n_filters] = MFX_EXTBUFF_VPP_PROCAMP;
|
||||
n_filters++;
|
||||
}
|
||||
|
||||
/* Detail/Edge enhancement */
|
||||
|
@ -826,8 +817,6 @@ ensure_filters (GstMsdkVPP * thiz)
|
|||
mfx_detail->Header.BufferSz = sizeof (mfxExtVPPDetail);
|
||||
mfx_detail->DetailFactor = thiz->detail;
|
||||
gst_msdkvpp_add_extra_param (thiz, (mfxExtBuffer *) mfx_detail);
|
||||
thiz->max_filter_algorithms[n_filters] = MFX_EXTBUFF_VPP_DETAIL;
|
||||
n_filters++;
|
||||
}
|
||||
|
||||
/* Mirroring */
|
||||
|
@ -837,8 +826,6 @@ ensure_filters (GstMsdkVPP * thiz)
|
|||
mfx_mirroring->Header.BufferSz = sizeof (mfxExtVPPMirroring);
|
||||
mfx_mirroring->Type = thiz->mirroring;
|
||||
gst_msdkvpp_add_extra_param (thiz, (mfxExtBuffer *) mfx_mirroring);
|
||||
thiz->max_filter_algorithms[n_filters] = MFX_EXTBUFF_VPP_MIRRORING;
|
||||
n_filters++;
|
||||
}
|
||||
|
||||
/* Scaling Mode */
|
||||
|
@ -848,8 +835,6 @@ ensure_filters (GstMsdkVPP * thiz)
|
|||
mfx_scaling->Header.BufferSz = sizeof (mfxExtVPPScaling);
|
||||
mfx_scaling->ScalingMode = thiz->scaling_mode;
|
||||
gst_msdkvpp_add_extra_param (thiz, (mfxExtBuffer *) mfx_scaling);
|
||||
thiz->max_filter_algorithms[n_filters] = MFX_EXTBUFF_VPP_SCALING;
|
||||
n_filters++;
|
||||
}
|
||||
|
||||
/* FRC */
|
||||
|
@ -859,19 +844,6 @@ ensure_filters (GstMsdkVPP * thiz)
|
|||
mfx_frc->Header.BufferSz = sizeof (mfxExtVPPFrameRateConversion);
|
||||
mfx_frc->Algorithm = thiz->frc_algm;
|
||||
gst_msdkvpp_add_extra_param (thiz, (mfxExtBuffer *) mfx_frc);
|
||||
thiz->max_filter_algorithms[n_filters] =
|
||||
MFX_EXTBUFF_VPP_FRAME_RATE_CONVERSION;
|
||||
n_filters++;
|
||||
}
|
||||
|
||||
/* mfxExtVPPDoUse */
|
||||
if (n_filters) {
|
||||
mfxExtVPPDoUse *mfx_vpp_douse = &thiz->mfx_vpp_douse;
|
||||
mfx_vpp_douse->Header.BufferId = MFX_EXTBUFF_VPP_DOUSE;
|
||||
mfx_vpp_douse->Header.BufferSz = sizeof (mfxExtVPPDoUse);
|
||||
mfx_vpp_douse->NumAlg = n_filters;
|
||||
mfx_vpp_douse->AlgList = thiz->max_filter_algorithms;
|
||||
gst_msdkvpp_add_extra_param (thiz, (mfxExtBuffer *) mfx_vpp_douse);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,6 @@ G_BEGIN_DECLS
|
|||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MSDKVPP))
|
||||
|
||||
#define MAX_EXTRA_PARAMS 8
|
||||
#define MAX_FILTER_ALGORITHMS 7
|
||||
|
||||
typedef struct _GstMsdkVPP GstMsdkVPP;
|
||||
typedef struct _GstMsdkVPPClass GstMsdkVPPClass;
|
||||
|
@ -125,7 +124,6 @@ struct _GstMsdkVPP
|
|||
|
||||
/* MFX Filters */
|
||||
mfxExtVPPDoUse mfx_vpp_douse;
|
||||
mfxU32 max_filter_algorithms [MAX_FILTER_ALGORITHMS];
|
||||
mfxExtVPPDenoise mfx_denoise;
|
||||
mfxExtVPPRotation mfx_rotation;
|
||||
mfxExtVPPDeinterlacing mfx_deinterlace;
|
||||
|
|
Loading…
Reference in a new issue