2 * Copyright (C) <2014> Wim Taymans <wim.taymans@gmail.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
20 #ifndef __GST_VIDEO_SCALER_H__
21 #define __GST_VIDEO_SCALER_H__
25 #include <gst/video/video-format.h>
26 #include <gst/video/video-color.h>
27 #include <gst/video/video-resampler.h>
32 * GST_VIDEO_SCALER_OPT_DITHER_METHOD:
34 * #GstVideoDitherMethod, The dither method to use for propagating
37 #define GST_VIDEO_SCALER_OPT_DITHER_METHOD "GstVideoScaler.dither-method"
40 * GstVideoScalerFlags:
41 * @GST_VIDEO_SCALER_FLAG_NONE: no flags
42 * @GST_VIDEO_SCALER_FLAG_INTERLACED: Set up a scaler for interlaced content
44 * Different scale flags.
47 GST_VIDEO_SCALER_FLAG_NONE = (0),
48 GST_VIDEO_SCALER_FLAG_INTERLACED = (1 << 0),
49 } GstVideoScalerFlags;
51 typedef struct _GstVideoScaler GstVideoScaler;
54 GstVideoScaler * gst_video_scaler_new (GstVideoResamplerMethod method,
55 GstVideoScalerFlags flags,
57 guint in_size, guint out_size,
58 GstStructure * options);
61 void gst_video_scaler_free (GstVideoScaler *scale);
64 guint gst_video_scaler_get_max_taps (GstVideoScaler *scale);
67 const gdouble * gst_video_scaler_get_coeff (GstVideoScaler *scale,
73 void gst_video_scaler_horizontal (GstVideoScaler *scale,
74 GstVideoFormat format,
75 gpointer src, gpointer dest,
76 guint dest_offset, guint width);
79 void gst_video_scaler_vertical (GstVideoScaler *scale,
80 GstVideoFormat format,
81 gpointer src_lines[], gpointer dest,
82 guint dest_offset, guint width);
85 GstVideoScaler * gst_video_scaler_combine_packed_YUV (GstVideoScaler * y_scale,
86 GstVideoScaler *uv_scale,
87 GstVideoFormat in_format,
88 GstVideoFormat out_format);
91 void gst_video_scaler_2d (GstVideoScaler *hscale,
92 GstVideoScaler *vscale,
93 GstVideoFormat format,
94 gpointer src, gint src_stride,
95 gpointer dest, gint dest_stride,
97 guint width, guint height);
101 #endif /* __GST_VIDEO_SCALER_H__ */