2 * Copyright (C) <2003> David A. Schleef <ds@schleef.org>
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., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __VIDEO_TEST_SRC_H__
21 #define __VIDEO_TEST_SRC_H__
39 struct vts_color_struct {
46 typedef struct paintinfo_struct paintinfo;
47 struct paintinfo_struct
49 unsigned char *dest; /* pointer to first byte of video data */
50 unsigned char *yp, *up, *vp; /* pointers to first byte of each component
51 * for both packed/planar YUV and RGB */
52 unsigned char *ap; /* pointer to first byte of alpha component */
53 unsigned char *endptr; /* pointer to byte beyond last video data */
59 const struct vts_color_struct *colors;
60 const struct vts_color_struct *color;
61 /* const struct vts_color_struct *color; */
62 void (*paint_hline) (paintinfo * p, int x, int y, int w);
63 void (*paint_tmpline) (paintinfo * p, int x, int w);
64 void (*convert_tmpline) (paintinfo * p, int y);
74 struct vts_color_struct foreground_color;
75 struct vts_color_struct background_color;
78 struct fourcc_list_struct
84 void (*paint_setup) (paintinfo * p, unsigned char *dest);
85 void (*convert_hline) (paintinfo * p, int y);
87 unsigned int red_mask;
88 unsigned int green_mask;
89 unsigned int blue_mask;
90 unsigned int alpha_mask;
93 struct fourcc_list_struct *
94 paintrect_find_fourcc (int find_fourcc);
95 struct fourcc_list_struct *
96 paintrect_find_name (const char *name);
97 struct fourcc_list_struct *
98 paintinfo_find_by_structure (const GstStructure *structure);
100 paint_get_structure (struct fourcc_list_struct *format);
101 int gst_video_test_src_get_size (GstVideoTestSrc * v, int w, int h);
102 void gst_video_test_src_smpte (GstVideoTestSrc * v,
103 unsigned char *dest, int w, int h);
104 void gst_video_test_src_smpte75 (GstVideoTestSrc * v,
105 unsigned char *dest, int w, int h);
106 void gst_video_test_src_snow (GstVideoTestSrc * v,
107 unsigned char *dest, int w, int h);
108 void gst_video_test_src_black (GstVideoTestSrc * v,
109 unsigned char *dest, int w, int h);
110 void gst_video_test_src_white (GstVideoTestSrc * v,
111 unsigned char *dest, int w, int h);
112 void gst_video_test_src_red (GstVideoTestSrc * v,
113 unsigned char *dest, int w, int h);
114 void gst_video_test_src_green (GstVideoTestSrc * v,
115 unsigned char *dest, int w, int h);
116 void gst_video_test_src_blue (GstVideoTestSrc * v,
117 unsigned char *dest, int w, int h);
118 void gst_video_test_src_solid (GstVideoTestSrc * v,
119 unsigned char *dest, int w, int h);
120 void gst_video_test_src_blink (GstVideoTestSrc * v,
121 unsigned char *dest, int w, int h);
122 void gst_video_test_src_checkers1 (GstVideoTestSrc * v,
123 unsigned char *dest, int w, int h);
124 void gst_video_test_src_checkers2 (GstVideoTestSrc * v,
125 unsigned char *dest, int w, int h);
126 void gst_video_test_src_checkers4 (GstVideoTestSrc * v,
127 unsigned char *dest, int w, int h);
128 void gst_video_test_src_checkers8 (GstVideoTestSrc * v,
129 unsigned char *dest, int w, int h);
130 void gst_video_test_src_circular (GstVideoTestSrc * v,
131 unsigned char *dest, int w, int h);
132 void gst_video_test_src_zoneplate (GstVideoTestSrc * v,
133 unsigned char *dest, int w, int h);
134 void gst_video_test_src_gamut (GstVideoTestSrc * v,
135 unsigned char *dest, int w, int h);
136 void gst_video_test_src_chromazoneplate (GstVideoTestSrc * v,
137 unsigned char *dest, int w, int h);
138 void gst_video_test_src_ball (GstVideoTestSrc * v,
139 unsigned char *dest, int w, int h);
140 void gst_video_test_src_smpte100 (GstVideoTestSrc * v,
141 unsigned char *dest, int w, int h);
142 void gst_video_test_src_bar (GstVideoTestSrc * v,
143 unsigned char *dest, int w, int h);
145 extern struct fourcc_list_struct fourcc_list[];
146 extern int n_fourccs;