2014-10-24 13:25:33 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <2014> Wim Taymans <wim.taymans@gmail.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GST_VIDEO_SCALER_H__
|
|
|
|
#define __GST_VIDEO_SCALER_H__
|
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
#include <gst/video/video-format.h>
|
|
|
|
#include <gst/video/video-color.h>
|
2014-10-30 10:43:52 +00:00
|
|
|
#include <gst/video/video-resampler.h>
|
2014-10-24 13:25:33 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2014-10-24 14:51:37 +00:00
|
|
|
/**
|
|
|
|
* GST_VIDEO_SCALER_OPT_DITHER_METHOD:
|
|
|
|
*
|
2018-09-21 16:54:39 +00:00
|
|
|
* #GstVideoDitherMethod, The dither method to use for propagating
|
2014-10-24 14:51:37 +00:00
|
|
|
* quatization errors.
|
|
|
|
*/
|
|
|
|
#define GST_VIDEO_SCALER_OPT_DITHER_METHOD "GstVideoScaler.dither-method"
|
|
|
|
|
2014-10-24 13:25:33 +00:00
|
|
|
/**
|
|
|
|
* GstVideoScalerFlags:
|
|
|
|
* @GST_VIDEO_SCALER_FLAG_NONE: no flags
|
|
|
|
* @GST_VIDEO_SCALER_FLAG_INTERLACED: Set up a scaler for interlaced content
|
|
|
|
*
|
|
|
|
* Different scale flags.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GST_VIDEO_SCALER_FLAG_NONE = (0),
|
|
|
|
GST_VIDEO_SCALER_FLAG_INTERLACED = (1 << 0),
|
|
|
|
} GstVideoScalerFlags;
|
|
|
|
|
|
|
|
typedef struct _GstVideoScaler GstVideoScaler;
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2014-10-30 10:43:52 +00:00
|
|
|
GstVideoScaler * gst_video_scaler_new (GstVideoResamplerMethod method,
|
2014-10-24 13:25:33 +00:00
|
|
|
GstVideoScalerFlags flags,
|
|
|
|
guint n_taps,
|
2014-10-24 14:51:37 +00:00
|
|
|
guint in_size, guint out_size,
|
|
|
|
GstStructure * options);
|
2017-05-16 00:09:38 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2014-10-24 13:25:33 +00:00
|
|
|
void gst_video_scaler_free (GstVideoScaler *scale);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2015-06-12 14:47:03 +00:00
|
|
|
guint gst_video_scaler_get_max_taps (GstVideoScaler *scale);
|
2017-05-16 00:09:38 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2014-10-24 13:25:33 +00:00
|
|
|
const gdouble * gst_video_scaler_get_coeff (GstVideoScaler *scale,
|
|
|
|
guint out_offset,
|
|
|
|
guint *in_offset,
|
|
|
|
guint *n_taps);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2014-10-24 13:25:33 +00:00
|
|
|
void gst_video_scaler_horizontal (GstVideoScaler *scale,
|
|
|
|
GstVideoFormat format,
|
|
|
|
gpointer src, gpointer dest,
|
|
|
|
guint dest_offset, guint width);
|
2017-05-16 00:09:38 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2014-10-24 13:25:33 +00:00
|
|
|
void gst_video_scaler_vertical (GstVideoScaler *scale,
|
|
|
|
GstVideoFormat format,
|
|
|
|
gpointer src_lines[], gpointer dest,
|
2014-11-01 14:58:13 +00:00
|
|
|
guint dest_offset, guint width);
|
2014-10-24 13:25:33 +00:00
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2015-01-28 16:32:12 +00:00
|
|
|
GstVideoScaler * gst_video_scaler_combine_packed_YUV (GstVideoScaler * y_scale,
|
|
|
|
GstVideoScaler *uv_scale,
|
|
|
|
GstVideoFormat in_format,
|
|
|
|
GstVideoFormat out_format);
|
|
|
|
|
2018-03-13 11:48:31 +00:00
|
|
|
GST_VIDEO_API
|
2015-02-11 12:32:25 +00:00
|
|
|
void gst_video_scaler_2d (GstVideoScaler *hscale,
|
|
|
|
GstVideoScaler *vscale,
|
|
|
|
GstVideoFormat format,
|
|
|
|
gpointer src, gint src_stride,
|
|
|
|
gpointer dest, gint dest_stride,
|
|
|
|
guint x, guint y,
|
|
|
|
guint width, guint height);
|
|
|
|
|
2014-10-24 13:25:33 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GST_VIDEO_SCALER_H__ */
|