2003-04-16 07:52:54 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) <2003> David A. Schleef <ds@schleef.org>
|
|
|
|
*
|
|
|
|
* 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., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2005-12-01 01:12:55 +00:00
|
|
|
#ifndef __VIDEO_TEST_SRC_H__
|
|
|
|
#define __VIDEO_TEST_SRC_H__
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2006-01-10 10:06:53 +00:00
|
|
|
#include <glib.h>
|
2005-05-09 01:20:55 +00:00
|
|
|
|
2007-05-15 03:53:11 +00:00
|
|
|
enum {
|
|
|
|
VTS_YUV,
|
|
|
|
VTS_RGB,
|
2009-05-26 12:38:43 +00:00
|
|
|
VTS_GRAY,
|
2007-05-15 03:53:11 +00:00
|
|
|
VTS_BAYER
|
|
|
|
};
|
2005-07-28 18:42:54 +00:00
|
|
|
|
2010-09-13 03:36:19 +00:00
|
|
|
enum {
|
|
|
|
VTS_BAYER_BGGR,
|
|
|
|
VTS_BAYER_RGGB,
|
|
|
|
VTS_BAYER_GRBG,
|
|
|
|
VTS_BAYER_GBRG
|
|
|
|
};
|
|
|
|
|
2010-08-23 06:01:19 +00:00
|
|
|
struct vts_color_struct {
|
2010-07-21 12:20:03 +00:00
|
|
|
guint8 Y, U, V, A;
|
2010-08-23 06:01:19 +00:00
|
|
|
guint8 R, G, B;
|
|
|
|
guint16 gray;
|
2008-11-19 00:24:44 +00:00
|
|
|
};
|
2010-08-23 06:01:19 +00:00
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
typedef struct paintinfo_struct paintinfo;
|
|
|
|
struct paintinfo_struct
|
|
|
|
{
|
2011-06-21 15:33:27 +00:00
|
|
|
int size; /* size of a frame */
|
2003-04-16 07:52:54 +00:00
|
|
|
int width;
|
|
|
|
int height;
|
2010-08-23 06:01:19 +00:00
|
|
|
const struct vts_color_struct *colors;
|
|
|
|
const struct vts_color_struct *color;
|
2010-03-15 13:14:54 +00:00
|
|
|
/* const struct vts_color_struct *color; */
|
2003-04-16 07:52:54 +00:00
|
|
|
void (*paint_hline) (paintinfo * p, int x, int y, int w);
|
2010-09-10 19:48:30 +00:00
|
|
|
void (*paint_tmpline) (paintinfo * p, int x, int w);
|
2012-05-29 15:48:45 +00:00
|
|
|
void (*convert_tmpline) (paintinfo * p, GstVideoFrame *frame, int y);
|
2010-09-13 03:36:19 +00:00
|
|
|
int x_offset;
|
2010-09-10 19:48:30 +00:00
|
|
|
|
2010-09-13 03:36:19 +00:00
|
|
|
int bayer_x_invert;
|
|
|
|
int bayer_y_invert;
|
|
|
|
|
|
|
|
guint8 *tmpline;
|
|
|
|
guint8 *tmpline2;
|
|
|
|
guint8 *tmpline_u8;
|
2012-05-29 15:48:45 +00:00
|
|
|
guint16 *tmpline_u16;
|
2010-09-06 03:35:13 +00:00
|
|
|
|
|
|
|
struct vts_color_struct foreground_color;
|
|
|
|
struct vts_color_struct background_color;
|
2003-04-16 07:52:54 +00:00
|
|
|
};
|
2012-05-29 15:48:45 +00:00
|
|
|
#define PAINT_INFO_INIT {0, }
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2011-06-16 10:48:33 +00:00
|
|
|
struct format_list_struct
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
2007-05-15 03:53:11 +00:00
|
|
|
int type;
|
2011-06-16 10:48:33 +00:00
|
|
|
const char *format;
|
2010-03-15 21:49:53 +00:00
|
|
|
const char *name;
|
2011-06-21 15:33:27 +00:00
|
|
|
void (*paint_setup) (paintinfo * p, GstVideoFrame *frame);
|
2012-05-29 15:48:45 +00:00
|
|
|
void (*convert_hline) (paintinfo * p, GstVideoFrame *frame, int y);
|
2003-04-16 07:52:54 +00:00
|
|
|
};
|
|
|
|
|
2011-06-16 10:48:33 +00:00
|
|
|
struct format_list_struct *
|
|
|
|
paintrect_find_format (const gchar *find_format);
|
|
|
|
struct format_list_struct *
|
2005-12-06 19:42:02 +00:00
|
|
|
paintrect_find_name (const char *name);
|
2011-06-16 10:48:33 +00:00
|
|
|
struct format_list_struct *
|
2005-12-06 19:42:02 +00:00
|
|
|
paintinfo_find_by_structure (const GstStructure *structure);
|
2004-07-22 15:55:33 +00:00
|
|
|
GstStructure *
|
2011-06-16 10:48:33 +00:00
|
|
|
paint_get_structure (struct format_list_struct *format);
|
2011-06-21 15:33:27 +00:00
|
|
|
|
2005-12-06 19:42:02 +00:00
|
|
|
int gst_video_test_src_get_size (GstVideoTestSrc * v, int w, int h);
|
2011-06-21 15:33:27 +00:00
|
|
|
void gst_video_test_src_smpte (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_smpte75 (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_snow (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_black (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_white (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_red (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_green (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_blue (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_solid (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_blink (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_checkers1 (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_checkers2 (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_checkers4 (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_checkers8 (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_circular (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_zoneplate (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_gamut (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_chromazoneplate (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_ball (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_smpte100 (GstVideoTestSrc * v, GstVideoFrame *frame);
|
|
|
|
void gst_video_test_src_bar (GstVideoTestSrc * v, GstVideoFrame *frame);
|
2010-09-16 15:15:32 +00:00
|
|
|
|
2011-06-16 10:48:33 +00:00
|
|
|
extern struct format_list_struct format_list[];
|
|
|
|
extern int n_formats;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
#endif
|