mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
video-converter: add fastpath for some gray formats
This commit is contained in:
parent
0737316e7e
commit
3dfbd11fc8
2 changed files with 29 additions and 0 deletions
|
@ -3336,6 +3336,18 @@ static const VideoTransform transforms[] = {
|
|||
convert_scale_planes, GST_VIDEO_FORMAT_RGB},
|
||||
{GST_VIDEO_FORMAT_BGR, GST_VIDEO_FORMAT_BGR, TRUE, FALSE, FALSE, 0, 0,
|
||||
convert_scale_planes, GST_VIDEO_FORMAT_BGR},
|
||||
|
||||
{GST_VIDEO_FORMAT_GRAY8, GST_VIDEO_FORMAT_GRAY8, TRUE, FALSE, FALSE, 0, 0,
|
||||
convert_scale_planes, GST_VIDEO_FORMAT_GRAY8},
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
{GST_VIDEO_FORMAT_GRAY16_LE, GST_VIDEO_FORMAT_GRAY16_LE, TRUE, FALSE, FALSE,
|
||||
0, 0,
|
||||
convert_scale_planes, GST_VIDEO_FORMAT_GRAY16_LE},
|
||||
#else
|
||||
{GST_VIDEO_FORMAT_GRAY16_BE, GST_VIDEO_FORMAT_GRAY16_BE, TRUE, FALSE, FALSE,
|
||||
0, 0,
|
||||
convert_scale_planes, GST_VIDEO_FORMAT_GRAY16_BE},
|
||||
#endif
|
||||
};
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -1209,6 +1209,18 @@ gst_video_scaler_horizontal (GstVideoScaler * scale, GstVideoFormat format,
|
|||
break;
|
||||
}
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_GRAY16_LE:
|
||||
case GST_VIDEO_FORMAT_GRAY16_BE:
|
||||
switch (scale->resampler.max_taps) {
|
||||
case 1:
|
||||
func = video_scale_h_near_u16;
|
||||
break;
|
||||
default:
|
||||
func = video_scale_h_ntap_u16;
|
||||
break;
|
||||
}
|
||||
n_elems = 1;
|
||||
break;
|
||||
default:
|
||||
goto no_func;
|
||||
}
|
||||
|
@ -1291,6 +1303,11 @@ gst_video_scaler_vertical (GstVideoScaler * scale, GstVideoFormat format,
|
|||
bits = 8;
|
||||
n_elems = 2;
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_GRAY16_LE:
|
||||
case GST_VIDEO_FORMAT_GRAY16_BE:
|
||||
bits = 16;
|
||||
n_elems = 1;
|
||||
break;
|
||||
default:
|
||||
goto no_func;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue