2002-03-20 21:45:03 +00:00
|
|
|
/* GStreamer
|
2001-12-22 23:27:17 +00:00
|
|
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
*
|
|
|
|
* 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
|
2012-11-03 23:05:09 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2001-12-22 23:27:17 +00:00
|
|
|
*/
|
|
|
|
|
2005-12-01 01:12:55 +00:00
|
|
|
#ifndef __GST_VIDEO_SCALE_H__
|
|
|
|
#define __GST_VIDEO_SCALE_H__
|
2001-12-22 23:27:17 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
2010-06-12 11:35:47 +00:00
|
|
|
#include <gst/video/video.h>
|
2010-04-23 13:14:56 +00:00
|
|
|
#include <gst/video/gstvideofilter.h>
|
2001-12-22 23:27:17 +00:00
|
|
|
|
2005-07-01 17:03:13 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2020-03-12 12:29:22 +00:00
|
|
|
#define GST_TYPE_VIDEO_SCALE (gst_video_scale_get_type())
|
|
|
|
#define GST_VIDEO_SCALE_CAST(obj) ((GstVideoScale *)(obj))
|
|
|
|
G_DECLARE_FINAL_TYPE (GstVideoScale, gst_video_scale, GST, VIDEO_SCALE,
|
|
|
|
GstVideoFilter)
|
2011-12-21 17:58:42 +00:00
|
|
|
|
2001-12-22 23:27:17 +00:00
|
|
|
|
docs/plugins/: Added videoscale to docs.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
Added videoscale to docs.
* gst/videorate/gstvideorate.c: (gst_video_rate_flush_prev),
(gst_video_rate_swap_prev), (gst_video_rate_event),
(gst_video_rate_chain):
Fix typo in docs.
* gst/videoscale/gstvideoscale.c: (gst_video_scale_class_init),
(gst_video_scale_init), (gst_video_scale_prepare_size),
(gst_video_scale_set_caps), (gst_video_scale_get_unit_size),
(gst_video_scale_fixate_caps), (gst_video_scale_transform):
* gst/videoscale/gstvideoscale.h:
Added docs, examples.
Some code cleanups.
Post errors instead of g_warning.
2006-03-02 17:46:36 +00:00
|
|
|
/**
|
|
|
|
* GstVideoScaleMethod:
|
|
|
|
* @GST_VIDEO_SCALE_NEAREST: use nearest neighbour scaling (fast and ugly)
|
2014-11-25 10:28:42 +00:00
|
|
|
* @GST_VIDEO_SCALE_BILINEAR: use 2-tap bilinear scaling (slower but prettier).
|
|
|
|
* @GST_VIDEO_SCALE_4TAP: use a 4-tap sinc filter for scaling (slow).
|
2011-03-18 02:13:58 +00:00
|
|
|
* @GST_VIDEO_SCALE_LANCZOS: use a multitap Lanczos filter for scaling (slow).
|
2014-11-25 10:28:42 +00:00
|
|
|
* @GST_VIDEO_SCALE_BILINEAR2: use a multitap bilinear filter
|
|
|
|
* @GST_VIDEO_SCALE_SINC: use a multitap sinc filter
|
|
|
|
* @GST_VIDEO_SCALE_HERMITE: use a multitap bicubic Hermite filter
|
|
|
|
* @GST_VIDEO_SCALE_SPLINE: use a multitap bicubic spline filter
|
|
|
|
* @GST_VIDEO_SCALE_CATROM: use a multitap bicubic Catmull-Rom filter
|
|
|
|
* @GST_VIDEO_SCALE_MITCHELL: use a multitap bicubic Mitchell filter
|
|
|
|
*
|
docs/plugins/: Added videoscale to docs.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
Added videoscale to docs.
* gst/videorate/gstvideorate.c: (gst_video_rate_flush_prev),
(gst_video_rate_swap_prev), (gst_video_rate_event),
(gst_video_rate_chain):
Fix typo in docs.
* gst/videoscale/gstvideoscale.c: (gst_video_scale_class_init),
(gst_video_scale_init), (gst_video_scale_prepare_size),
(gst_video_scale_set_caps), (gst_video_scale_get_unit_size),
(gst_video_scale_fixate_caps), (gst_video_scale_transform):
* gst/videoscale/gstvideoscale.h:
Added docs, examples.
Some code cleanups.
Post errors instead of g_warning.
2006-03-02 17:46:36 +00:00
|
|
|
* The videoscale method to use.
|
|
|
|
*/
|
2004-03-15 16:32:55 +00:00
|
|
|
typedef enum {
|
2005-12-01 01:12:55 +00:00
|
|
|
GST_VIDEO_SCALE_NEAREST,
|
|
|
|
GST_VIDEO_SCALE_BILINEAR,
|
2011-03-18 02:13:58 +00:00
|
|
|
GST_VIDEO_SCALE_4TAP,
|
2014-11-25 10:28:42 +00:00
|
|
|
GST_VIDEO_SCALE_LANCZOS,
|
|
|
|
|
|
|
|
GST_VIDEO_SCALE_BILINEAR2,
|
|
|
|
GST_VIDEO_SCALE_SINC,
|
|
|
|
GST_VIDEO_SCALE_HERMITE,
|
|
|
|
GST_VIDEO_SCALE_SPLINE,
|
|
|
|
GST_VIDEO_SCALE_CATROM,
|
|
|
|
GST_VIDEO_SCALE_MITCHELL
|
2004-03-15 16:32:55 +00:00
|
|
|
} GstVideoScaleMethod;
|
|
|
|
|
docs/plugins/: Added videoscale to docs.
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
* docs/plugins/gst-plugins-base-plugins-sections.txt:
Added videoscale to docs.
* gst/videorate/gstvideorate.c: (gst_video_rate_flush_prev),
(gst_video_rate_swap_prev), (gst_video_rate_event),
(gst_video_rate_chain):
Fix typo in docs.
* gst/videoscale/gstvideoscale.c: (gst_video_scale_class_init),
(gst_video_scale_init), (gst_video_scale_prepare_size),
(gst_video_scale_set_caps), (gst_video_scale_get_unit_size),
(gst_video_scale_fixate_caps), (gst_video_scale_transform):
* gst/videoscale/gstvideoscale.h:
Added docs, examples.
Some code cleanups.
Post errors instead of g_warning.
2006-03-02 17:46:36 +00:00
|
|
|
/**
|
|
|
|
* GstVideoScale:
|
|
|
|
*
|
|
|
|
* Opaque data structure
|
|
|
|
*/
|
2005-12-01 01:12:55 +00:00
|
|
|
struct _GstVideoScale {
|
2010-04-23 13:14:56 +00:00
|
|
|
GstVideoFilter element;
|
2004-03-15 16:32:55 +00:00
|
|
|
|
2011-03-18 02:13:58 +00:00
|
|
|
/* properties */
|
2005-08-24 15:07:54 +00:00
|
|
|
GstVideoScaleMethod method;
|
2010-07-17 18:24:18 +00:00
|
|
|
gboolean add_borders;
|
2011-03-18 02:13:58 +00:00
|
|
|
double sharpness;
|
|
|
|
double sharpen;
|
|
|
|
gboolean dither;
|
|
|
|
int submethod;
|
|
|
|
double envelope;
|
2014-11-25 10:54:51 +00:00
|
|
|
gboolean gamma_decode;
|
2017-02-20 19:38:17 +00:00
|
|
|
gint n_threads;
|
2005-08-24 15:07:54 +00:00
|
|
|
|
2014-10-24 15:08:43 +00:00
|
|
|
GstVideoConverter *convert;
|
|
|
|
|
2010-07-17 18:24:18 +00:00
|
|
|
gint borders_h;
|
|
|
|
gint borders_w;
|
2004-03-15 16:32:55 +00:00
|
|
|
};
|
2001-12-22 23:27:17 +00:00
|
|
|
|
2021-02-11 10:11:25 +00:00
|
|
|
GST_ELEMENT_REGISTER_DECLARE (videoscale);
|
|
|
|
|
2005-07-01 17:03:13 +00:00
|
|
|
G_END_DECLS
|
2001-12-22 23:27:17 +00:00
|
|
|
|
2005-12-01 01:12:55 +00:00
|
|
|
#endif /* __GST_VIDEO_SCALE_H__ */
|