mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-05 02:02:26 +00:00
video-converter: we can use the scaler without scalers to copy
This commit is contained in:
parent
e1715f7728
commit
621292e754
1 changed files with 1 additions and 18 deletions
|
@ -3567,23 +3567,6 @@ convert_plane_fill (GstVideoConverter * convert,
|
||||||
convert->fout_width[plane], convert->fout_height[plane]);
|
convert->fout_width[plane], convert->fout_height[plane]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
convert_plane_copy (GstVideoConverter * convert,
|
|
||||||
const GstVideoFrame * src, GstVideoFrame * dest, gint plane)
|
|
||||||
{
|
|
||||||
guint8 *s, *d;
|
|
||||||
gint splane = convert->fsplane[plane];
|
|
||||||
|
|
||||||
s = FRAME_GET_PLANE_LINE (src, splane, convert->fin_y[splane]);
|
|
||||||
s += convert->fin_x[splane];
|
|
||||||
d = FRAME_GET_PLANE_LINE (dest, plane, convert->fout_y[plane]);
|
|
||||||
d += convert->fout_x[plane];
|
|
||||||
|
|
||||||
video_orc_memcpy_2d (d, FRAME_GET_PLANE_STRIDE (dest, plane),
|
|
||||||
s, FRAME_GET_PLANE_STRIDE (src, splane),
|
|
||||||
convert->fout_width[plane], convert->fout_height[plane]);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
convert_plane_h_double (GstVideoConverter * convert,
|
convert_plane_h_double (GstVideoConverter * convert,
|
||||||
const GstVideoFrame * src, GstVideoFrame * dest, gint plane)
|
const GstVideoFrame * src, GstVideoFrame * dest, gint plane)
|
||||||
|
@ -4030,7 +4013,7 @@ setup_scale (GstVideoConverter * convert)
|
||||||
need_h_scaler = FALSE;
|
need_h_scaler = FALSE;
|
||||||
if (iw == ow) {
|
if (iw == ow) {
|
||||||
if (ih == oh) {
|
if (ih == oh) {
|
||||||
convert->fconvert[i] = convert_plane_copy;
|
convert->fconvert[i] = convert_plane_hv;
|
||||||
GST_DEBUG ("plane %d: copy", i);
|
GST_DEBUG ("plane %d: copy", i);
|
||||||
} else if (ih == 2 * oh && pstride == 1
|
} else if (ih == 2 * oh && pstride == 1
|
||||||
&& resample_method == GST_VIDEO_RESAMPLER_METHOD_LINEAR) {
|
&& resample_method == GST_VIDEO_RESAMPLER_METHOD_LINEAR) {
|
||||||
|
|
Loading…
Reference in a new issue