mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 16:18:16 +00:00
video-scaler: Enforce same taps on Y and UV scalers for merged formats
Make sure we have the same number of taps for the Y and UV scalers so that the scalers can be merged correctly. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=749764
This commit is contained in:
parent
37684b35b6
commit
f4f3894836
3 changed files with 19 additions and 1 deletions
|
@ -4040,7 +4040,8 @@ setup_scale (GstVideoConverter * convert)
|
||||||
in_width), GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (out_finfo,
|
in_width), GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (out_finfo,
|
||||||
GST_VIDEO_COMP_Y, out_width), convert->config);
|
GST_VIDEO_COMP_Y, out_width), convert->config);
|
||||||
uv_scaler =
|
uv_scaler =
|
||||||
gst_video_scaler_new (method, GST_VIDEO_SCALER_FLAG_NONE, taps,
|
gst_video_scaler_new (method, GST_VIDEO_SCALER_FLAG_NONE,
|
||||||
|
gst_video_scaler_get_max_taps (y_scaler),
|
||||||
GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (in_finfo, GST_VIDEO_COMP_U,
|
GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (in_finfo, GST_VIDEO_COMP_U,
|
||||||
in_width), GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (out_finfo,
|
in_width), GST_VIDEO_FORMAT_INFO_SCALE_WIDTH (out_finfo,
|
||||||
GST_VIDEO_COMP_U, out_width), convert->config);
|
GST_VIDEO_COMP_U, out_width), convert->config);
|
||||||
|
|
|
@ -248,6 +248,22 @@ gst_video_scaler_free (GstVideoScaler * scale)
|
||||||
g_slice_free (GstVideoScaler, scale);
|
g_slice_free (GstVideoScaler, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_video_scaler_get_max_taps:
|
||||||
|
* @scale: a #GstVideoScaler
|
||||||
|
*
|
||||||
|
* Get the maximum number of taps for @scale.
|
||||||
|
*
|
||||||
|
* Returns: the maximum number of taps
|
||||||
|
*/
|
||||||
|
guint
|
||||||
|
gst_video_scaler_get_max_taps (GstVideoScaler * scale)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (scale != NULL, 0);
|
||||||
|
|
||||||
|
return scale->resampler.max_taps;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_video_scaler_get_coeff:
|
* gst_video_scaler_get_coeff:
|
||||||
* @scale: a #GstVideoScaler
|
* @scale: a #GstVideoScaler
|
||||||
|
|
|
@ -57,6 +57,7 @@ GstVideoScaler * gst_video_scaler_new (GstVideoResamplerMethod m
|
||||||
GstStructure * options);
|
GstStructure * options);
|
||||||
void gst_video_scaler_free (GstVideoScaler *scale);
|
void gst_video_scaler_free (GstVideoScaler *scale);
|
||||||
|
|
||||||
|
guint gst_video_scaler_get_max_taps (GstVideoScaler *scale);
|
||||||
const gdouble * gst_video_scaler_get_coeff (GstVideoScaler *scale,
|
const gdouble * gst_video_scaler_get_coeff (GstVideoScaler *scale,
|
||||||
guint out_offset,
|
guint out_offset,
|
||||||
guint *in_offset,
|
guint *in_offset,
|
||||||
|
|
Loading…
Reference in a new issue