2003-04-16 07:52:54 +00:00
|
|
|
/* GStreamer
|
|
|
|
* 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
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2003-11-07 12:47:02 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
/* non-GST-specific stuff */
|
|
|
|
|
2004-07-27 21:51:32 +00:00
|
|
|
#include "gstvideotestsrc.h"
|
|
|
|
#include "videotestsrc.h"
|
Convert a few inner loops to use liboil. This is currently optional, and is only enabled if liboil is present (duh!).
Original commit message from CVS:
Convert a few inner loops to use liboil. This is currently
optional, and is only enabled if liboil is present (duh!).
* configure.ac: Check for liboil-0.1
* gst/intfloat/Makefile.am:
* gst/intfloat/gstint2float.c: (conv_f32_s16), (scalarmult_f32),
(gst_int2float_chain_gint16):
* gst/videofilter/Makefile.am:
* gst/videofilter/gstvideobalance.c: (gst_videobalance_class_init),
(tablelookup_u8), (gst_videobalance_planar411):
* gst/videotestsrc/Makefile.am:
* gst/videotestsrc/gstvideotestsrc.c: (plugin_init):
* gst/videotestsrc/videotestsrc.c: (splat_u8), (paint_hline_YUY2),
(paint_hline_IYU2), (paint_hline_str4), (paint_hline_str3),
(paint_hline_RGB565), (paint_hline_xRGB1555):
2004-02-12 07:37:50 +00:00
|
|
|
#include <liboil/liboil.h>
|
2005-05-09 01:20:55 +00:00
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdlib.h>
|
2007-04-04 02:45:03 +00:00
|
|
|
#include <math.h>
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2007-05-09 21:17:40 +00:00
|
|
|
#ifndef M_PI
|
|
|
|
#define M_PI 3.14159265358979323846
|
|
|
|
#endif
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
static unsigned char
|
|
|
|
random_char (void)
|
|
|
|
{
|
|
|
|
static unsigned int state;
|
|
|
|
|
|
|
|
state *= 1103515245;
|
|
|
|
state += 12345;
|
2007-11-01 12:51:57 +00:00
|
|
|
return (state >> 16) & 0xff;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
2003-05-13 07:14:36 +00:00
|
|
|
#if 0
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
|
|
|
random_chars (unsigned char *dest, int nbytes)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
static unsigned int state;
|
|
|
|
|
|
|
|
for (i = 0; i < nbytes; i++) {
|
|
|
|
state *= 1103515245;
|
|
|
|
state += 12345;
|
|
|
|
dest[i] = (state >> 16);
|
|
|
|
}
|
|
|
|
}
|
2003-05-13 07:14:36 +00:00
|
|
|
#endif
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2003-05-13 07:14:36 +00:00
|
|
|
#if 0
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
|
|
|
paint_rect_random (unsigned char *dest, int stride, int x, int y, int w, int h)
|
|
|
|
{
|
|
|
|
unsigned char *d = dest + stride * y + x;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < h; i++) {
|
|
|
|
random_chars (d, w);
|
|
|
|
d += stride;
|
|
|
|
}
|
|
|
|
}
|
2003-05-13 07:14:36 +00:00
|
|
|
#endif
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
#if 0
|
|
|
|
static void
|
2004-03-14 22:34:34 +00:00
|
|
|
paint_rect (unsigned char *dest, int stride, int x, int y, int w, int h,
|
|
|
|
unsigned char color)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
unsigned char *d = dest + stride * y + x;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < h; i++) {
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8_ns (d, &color, w);
|
2003-04-16 07:52:54 +00:00
|
|
|
d += stride;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2003-05-13 07:14:36 +00:00
|
|
|
#if 0
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
2004-03-14 22:34:34 +00:00
|
|
|
paint_rect_s2 (unsigned char *dest, int stride, int x, int y, int w, int h,
|
|
|
|
unsigned char col)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
unsigned char *d = dest + stride * y + x * 2;
|
|
|
|
unsigned char *dp;
|
|
|
|
int i, j;
|
|
|
|
|
|
|
|
for (i = 0; i < h; i++) {
|
|
|
|
dp = d;
|
|
|
|
for (j = 0; j < w; j++) {
|
|
|
|
*dp = col;
|
|
|
|
dp += 2;
|
|
|
|
}
|
|
|
|
d += stride;
|
|
|
|
}
|
|
|
|
}
|
2003-05-13 07:14:36 +00:00
|
|
|
#endif
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2003-05-13 07:14:36 +00:00
|
|
|
#if 0
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
2004-03-14 22:34:34 +00:00
|
|
|
paint_rect2 (unsigned char *dest, int stride, int x, int y, int w, int h,
|
|
|
|
unsigned char *col)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
unsigned char *d = dest + stride * y + x * 2;
|
|
|
|
unsigned char *dp;
|
|
|
|
int i, j;
|
|
|
|
|
|
|
|
for (i = 0; i < h; i++) {
|
|
|
|
dp = d;
|
|
|
|
for (j = 0; j < w; j++) {
|
|
|
|
*dp++ = col[0];
|
|
|
|
*dp++ = col[1];
|
|
|
|
}
|
|
|
|
d += stride;
|
|
|
|
}
|
|
|
|
}
|
2003-05-13 07:14:36 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if 0
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
2004-03-14 22:34:34 +00:00
|
|
|
paint_rect3 (unsigned char *dest, int stride, int x, int y, int w, int h,
|
|
|
|
unsigned char *col)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
unsigned char *d = dest + stride * y + x * 3;
|
|
|
|
unsigned char *dp;
|
|
|
|
int i, j;
|
|
|
|
|
|
|
|
for (i = 0; i < h; i++) {
|
|
|
|
dp = d;
|
|
|
|
for (j = 0; j < w; j++) {
|
|
|
|
*dp++ = col[0];
|
|
|
|
*dp++ = col[1];
|
|
|
|
*dp++ = col[2];
|
|
|
|
}
|
|
|
|
d += stride;
|
|
|
|
}
|
|
|
|
}
|
2003-05-13 07:14:36 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if 0
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
2004-03-14 22:34:34 +00:00
|
|
|
paint_rect4 (unsigned char *dest, int stride, int x, int y, int w, int h,
|
|
|
|
unsigned char *col)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
unsigned char *d = dest + stride * y + x * 4;
|
|
|
|
unsigned char *dp;
|
|
|
|
int i, j;
|
|
|
|
|
|
|
|
for (i = 0; i < h; i++) {
|
|
|
|
dp = d;
|
|
|
|
for (j = 0; j < w; j++) {
|
|
|
|
*dp++ = col[0];
|
|
|
|
*dp++ = col[1];
|
|
|
|
*dp++ = col[2];
|
|
|
|
*dp++ = col[3];
|
|
|
|
}
|
|
|
|
d += stride;
|
|
|
|
}
|
|
|
|
}
|
2003-05-13 07:14:36 +00:00
|
|
|
#endif
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2003-05-13 07:14:36 +00:00
|
|
|
#if 0
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
2004-03-14 22:34:34 +00:00
|
|
|
paint_rect_s4 (unsigned char *dest, int stride, int x, int y, int w, int h,
|
|
|
|
unsigned char col)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
unsigned char *d = dest + stride * y + x * 4;
|
|
|
|
unsigned char *dp;
|
|
|
|
int i, j;
|
|
|
|
|
|
|
|
for (i = 0; i < h; i++) {
|
|
|
|
dp = d;
|
|
|
|
for (j = 0; j < w; j++) {
|
|
|
|
*dp = col;
|
|
|
|
dp += 4;
|
|
|
|
}
|
|
|
|
d += stride;
|
|
|
|
}
|
|
|
|
}
|
2003-05-13 07:14:36 +00:00
|
|
|
#endif
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
COLOR_WHITE = 0,
|
|
|
|
COLOR_YELLOW,
|
|
|
|
COLOR_CYAN,
|
|
|
|
COLOR_GREEN,
|
|
|
|
COLOR_MAGENTA,
|
|
|
|
COLOR_RED,
|
|
|
|
COLOR_BLUE,
|
|
|
|
COLOR_BLACK,
|
|
|
|
COLOR_NEG_I,
|
|
|
|
COLOR_POS_Q,
|
|
|
|
COLOR_SUPER_BLACK,
|
2004-05-21 22:39:30 +00:00
|
|
|
COLOR_DARK_GREY
|
2003-04-16 07:52:54 +00:00
|
|
|
};
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
static const struct vts_color_struct_rgb vts_colors_rgb[] = {
|
|
|
|
{255, 255, 255},
|
|
|
|
{255, 255, 0},
|
|
|
|
{0, 255, 255},
|
|
|
|
{0, 255, 0},
|
|
|
|
{255, 0, 255},
|
|
|
|
{255, 0, 0},
|
|
|
|
{0, 0, 255},
|
|
|
|
{0, 0, 0},
|
|
|
|
{0, 0, 128}, /* -I ? */
|
|
|
|
{0, 128, 255}, /* +Q ? */
|
|
|
|
{0, 0, 0},
|
|
|
|
{19, 19, 19},
|
2003-04-16 07:52:54 +00:00
|
|
|
};
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
static const struct vts_color_struct_rgb vts_colors_rgb_75[] = {
|
|
|
|
{191, 191, 191},
|
|
|
|
{191, 191, 0},
|
|
|
|
{0, 191, 191},
|
|
|
|
{0, 191, 0},
|
|
|
|
{191, 0, 191},
|
|
|
|
{191, 0, 0},
|
|
|
|
{0, 0, 191},
|
|
|
|
{0, 0, 0},
|
|
|
|
{0, 0, 128}, /* -I ? */
|
|
|
|
{0, 128, 255}, /* +Q ? */
|
|
|
|
{0, 0, 0},
|
|
|
|
{19, 19, 19},
|
|
|
|
};
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
static const struct vts_color_struct_yuv vts_colors_bt709_ycbcr_100[] = {
|
|
|
|
{235, 128, 128},
|
|
|
|
{219, 16, 138},
|
|
|
|
{188, 154, 16},
|
|
|
|
{173, 42, 26},
|
|
|
|
{78, 214, 230},
|
|
|
|
{63, 102, 240},
|
|
|
|
{32, 240, 118},
|
|
|
|
{16, 128, 128},
|
|
|
|
{16, 198, 21}, /* -I ? */
|
|
|
|
{16, 235, 198}, /* +Q ? */
|
|
|
|
{0, 128, 128},
|
|
|
|
{32, 128, 128},
|
|
|
|
};
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
static const struct vts_color_struct_yuv vts_colors_bt709_ycbcr_75[] = {
|
|
|
|
{180, 128, 128},
|
|
|
|
{168, 44, 136},
|
|
|
|
{145, 147, 44},
|
|
|
|
{133, 63, 52},
|
|
|
|
{63, 193, 204},
|
|
|
|
{51, 109, 212},
|
|
|
|
{28, 212, 120},
|
|
|
|
{16, 128, 128},
|
|
|
|
{16, 198, 21}, /* -I ? */
|
|
|
|
{16, 235, 198}, /* +Q ? */
|
|
|
|
{0, 128, 128},
|
|
|
|
{32, 128, 128},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct vts_color_struct_yuv vts_colors_bt601_ycbcr_100[] = {
|
|
|
|
{235, 128, 128},
|
|
|
|
{210, 16, 146},
|
|
|
|
{170, 166, 16},
|
|
|
|
{145, 54, 34},
|
|
|
|
{106, 202, 222},
|
|
|
|
{81, 90, 240},
|
|
|
|
{41, 240, 110},
|
|
|
|
{16, 128, 128},
|
|
|
|
{16, 198, 21}, /* -I ? */
|
|
|
|
{16, 235, 198}, /* +Q ? */
|
|
|
|
{-0, 128, 128},
|
|
|
|
{32, 128, 128},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct vts_color_struct_yuv vts_colors_bt601_ycbcr_75[] = {
|
|
|
|
{180, 128, 128},
|
|
|
|
{162, 44, 142},
|
|
|
|
{131, 156, 44},
|
|
|
|
{112, 72, 58},
|
|
|
|
{84, 184, 198},
|
|
|
|
{65, 100, 212},
|
|
|
|
{35, 212, 114},
|
|
|
|
{16, 128, 128},
|
|
|
|
{16, 198, 21}, /* -I ? */
|
|
|
|
{16, 235, 198}, /* +Q ? */
|
|
|
|
{-0, 128, 128},
|
|
|
|
{32, 128, 128},
|
|
|
|
};
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2009-05-26 12:38:43 +00:00
|
|
|
static const struct vts_color_struct_gray vts_colors_gray_100[] = {
|
|
|
|
{235 << 8},
|
|
|
|
{210 << 8},
|
|
|
|
{170 << 8},
|
|
|
|
{145 << 8},
|
|
|
|
{106 << 8},
|
|
|
|
{81 << 8},
|
|
|
|
{41 << 8},
|
|
|
|
{16 << 8},
|
|
|
|
{16 << 8},
|
|
|
|
{16 << 8},
|
|
|
|
{-0 << 8},
|
|
|
|
{32 << 8},
|
|
|
|
};
|
|
|
|
|
|
|
|
static const struct vts_color_struct_gray vts_colors_gray_75[] = {
|
|
|
|
{180 << 8},
|
|
|
|
{162 << 8},
|
|
|
|
{131 << 8},
|
|
|
|
{112 << 8},
|
|
|
|
{84 << 8},
|
|
|
|
{65 << 8},
|
|
|
|
{35 << 8},
|
|
|
|
{16 << 8},
|
|
|
|
{16 << 8},
|
|
|
|
{16 << 8},
|
|
|
|
{-0 << 8},
|
|
|
|
{32 << 8},
|
|
|
|
};
|
2003-04-16 07:52:54 +00:00
|
|
|
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
static void paint_setup_I420 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_YV12 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_YUY2 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_UYVY (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_YVYU (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_IYU2 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_Y41B (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_Y42B (paintinfo * p, unsigned char *dest);
|
2009-02-10 16:39:45 +00:00
|
|
|
static void paint_setup_Y444 (paintinfo * p, unsigned char *dest);
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
static void paint_setup_Y800 (paintinfo * p, unsigned char *dest);
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
static void paint_setup_AYUV (paintinfo * p, unsigned char *dest);
|
2009-02-13 09:10:25 +00:00
|
|
|
static void paint_setup_v308 (paintinfo * p, unsigned char *dest);
|
2008-05-02 10:54:51 +00:00
|
|
|
static void paint_setup_NV12 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_NV21 (paintinfo * p, unsigned char *dest);
|
2009-02-10 23:29:10 +00:00
|
|
|
static void paint_setup_v410 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_v216 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_v210 (paintinfo * p, unsigned char *dest);
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2004-01-09 01:53:31 +00:00
|
|
|
#if 0
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
static void paint_setup_IMC1 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_IMC2 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_IMC3 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_IMC4 (paintinfo * p, unsigned char *dest);
|
2004-01-09 01:53:31 +00:00
|
|
|
#endif
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
static void paint_setup_YUV9 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_YVU9 (paintinfo * p, unsigned char *dest);
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
static void paint_setup_ARGB8888 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_ABGR8888 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_RGBA8888 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_BGRA8888 (paintinfo * p, unsigned char *dest);
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
static void paint_setup_xRGB8888 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_xBGR8888 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_RGBx8888 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_BGRx8888 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_RGB888 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_BGR888 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_RGB565 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_xRGB1555 (paintinfo * p, unsigned char *dest);
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2007-05-15 03:53:11 +00:00
|
|
|
static void paint_setup_bayer (paintinfo * p, unsigned char *dest);
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
static void paint_hline_I420 (paintinfo * p, int x, int y, int w);
|
2008-05-02 10:54:51 +00:00
|
|
|
static void paint_hline_NV12_NV21 (paintinfo * p, int x, int y, int w);
|
2003-04-16 07:52:54 +00:00
|
|
|
static void paint_hline_YUY2 (paintinfo * p, int x, int y, int w);
|
2003-07-14 08:36:03 +00:00
|
|
|
static void paint_hline_IYU2 (paintinfo * p, int x, int y, int w);
|
2004-11-05 15:07:57 +00:00
|
|
|
static void paint_hline_Y41B (paintinfo * p, int x, int y, int w);
|
|
|
|
static void paint_hline_Y42B (paintinfo * p, int x, int y, int w);
|
2009-02-10 16:39:45 +00:00
|
|
|
static void paint_hline_Y444 (paintinfo * p, int x, int y, int w);
|
2003-04-16 07:52:54 +00:00
|
|
|
static void paint_hline_Y800 (paintinfo * p, int x, int y, int w);
|
2009-02-13 09:10:25 +00:00
|
|
|
static void paint_hline_v308 (paintinfo * p, int x, int y, int w);
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
static void paint_hline_AYUV (paintinfo * p, int x, int y, int w);
|
2009-02-10 23:29:10 +00:00
|
|
|
static void paint_hline_v410 (paintinfo * p, int x, int y, int w);
|
|
|
|
static void paint_hline_v216 (paintinfo * p, int x, int y, int w);
|
|
|
|
static void paint_hline_v210 (paintinfo * p, int x, int y, int w);
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2004-01-09 01:53:31 +00:00
|
|
|
#if 0
|
2003-04-16 07:52:54 +00:00
|
|
|
static void paint_hline_IMC1 (paintinfo * p, int x, int y, int w);
|
2004-01-09 01:53:31 +00:00
|
|
|
#endif
|
2003-07-14 08:36:03 +00:00
|
|
|
static void paint_hline_YUV9 (paintinfo * p, int x, int y, int w);
|
2003-04-16 07:52:54 +00:00
|
|
|
static void paint_hline_str4 (paintinfo * p, int x, int y, int w);
|
|
|
|
static void paint_hline_str3 (paintinfo * p, int x, int y, int w);
|
|
|
|
static void paint_hline_RGB565 (paintinfo * p, int x, int y, int w);
|
|
|
|
static void paint_hline_xRGB1555 (paintinfo * p, int x, int y, int w);
|
|
|
|
|
2008-03-14 18:42:35 +00:00
|
|
|
static void paint_hline_bayer (paintinfo * p, int x, int y, int w);
|
2007-05-15 03:53:11 +00:00
|
|
|
|
2009-05-26 12:38:43 +00:00
|
|
|
static void paint_setup_GRAY8 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_setup_GRAY16 (paintinfo * p, unsigned char *dest);
|
|
|
|
static void paint_hline_GRAY8 (paintinfo * p, int x, int y, int w);
|
|
|
|
static void paint_hline_GRAY16 (paintinfo * p, int x, int y, int w);
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
struct fourcc_list_struct fourcc_list[] = {
|
|
|
|
/* packed */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "YUY2", "YUY2", 16, paint_setup_YUY2, paint_hline_YUY2},
|
|
|
|
{VTS_YUV, "UYVY", "UYVY", 16, paint_setup_UYVY, paint_hline_YUY2},
|
|
|
|
{VTS_YUV, "Y422", "Y422", 16, paint_setup_UYVY, paint_hline_YUY2},
|
|
|
|
{VTS_YUV, "UYNV", "UYNV", 16, paint_setup_UYVY, paint_hline_YUY2}, /* FIXME: UYNV? */
|
|
|
|
{VTS_YUV, "YVYU", "YVYU", 16, paint_setup_YVYU, paint_hline_YUY2},
|
2009-02-13 09:10:25 +00:00
|
|
|
{VTS_YUV, "v308", "v308", 24, paint_setup_v308, paint_hline_v308},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "AYUV", "AYUV", 32, paint_setup_AYUV, paint_hline_AYUV},
|
2009-02-10 23:29:10 +00:00
|
|
|
{VTS_YUV, "v410", "v410", 32, paint_setup_v410, paint_hline_v410},
|
|
|
|
{VTS_YUV, "v210", "v210", 21, paint_setup_v210, paint_hline_v210},
|
|
|
|
{VTS_YUV, "v216", "v216", 32, paint_setup_v216, paint_hline_v216},
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
/* interlaced */
|
2007-05-15 03:53:11 +00:00
|
|
|
/*{ VTS_YUV, "IUYV", "IUY2", 16, paint_setup_YVYU, paint_hline_YUY2 }, */
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
/* inverted */
|
2007-05-15 03:53:11 +00:00
|
|
|
/*{ VTS_YUV, "cyuv", "cyuv", 16, paint_setup_YVYU, paint_hline_YUY2 }, */
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2007-05-15 03:53:11 +00:00
|
|
|
/*{ VTS_YUV, "Y41P", "Y41P", 12, paint_setup_YVYU, paint_hline_YUY2 }, */
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
/* interlaced */
|
2007-05-15 03:53:11 +00:00
|
|
|
/*{ VTS_YUV, "IY41", "IY41", 12, paint_setup_YVYU, paint_hline_YUY2 }, */
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2007-05-15 03:53:11 +00:00
|
|
|
/*{ VTS_YUV, "Y211", "Y211", 8, paint_setup_YVYU, paint_hline_YUY2 }, */
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2007-05-15 03:53:11 +00:00
|
|
|
/*{ VTS_YUV, "Y41T", "Y41T", 12, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
/*{ VTS_YUV, "Y42P", "Y42P", 16, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
/*{ VTS_YUV, "CLJR", "CLJR", 8, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
/*{ VTS_YUV, "IYU1", "IYU1", 12, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
{VTS_YUV, "IYU2", "IYU2", 24, paint_setup_IYU2, paint_hline_IYU2},
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
/* planar */
|
|
|
|
/* YVU9 */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "YVU9", "YVU9", 9, paint_setup_YVU9, paint_hline_YUV9},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* YUV9 */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "YUV9", "YUV9", 9, paint_setup_YUV9, paint_hline_YUV9},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* IF09 */
|
|
|
|
/* YV12 */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "YV12", "YV12", 12, paint_setup_YV12, paint_hline_I420},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* I420 */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "I420", "I420", 12, paint_setup_I420, paint_hline_I420},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* NV12 */
|
2008-05-02 10:54:51 +00:00
|
|
|
{VTS_YUV, "NV12", "NV12", 12, paint_setup_NV12, paint_hline_NV12_NV21},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* NV21 */
|
2008-05-02 10:54:51 +00:00
|
|
|
{VTS_YUV, "NV21", "NV21", 12, paint_setup_NV21, paint_hline_NV12_NV21},
|
2004-01-09 01:53:31 +00:00
|
|
|
#if 0
|
2003-04-16 07:52:54 +00:00
|
|
|
/* IMC1 */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "IMC1", "IMC1", 16, paint_setup_IMC1, paint_hline_IMC1},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* IMC2 */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "IMC2", "IMC2", 12, paint_setup_IMC2, paint_hline_IMC1},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* IMC3 */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "IMC3", "IMC3", 16, paint_setup_IMC3, paint_hline_IMC1},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* IMC4 */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "IMC4", "IMC4", 12, paint_setup_IMC4, paint_hline_IMC1},
|
2004-01-09 01:53:31 +00:00
|
|
|
#endif
|
2003-04-16 07:52:54 +00:00
|
|
|
/* CLPL */
|
|
|
|
/* Y41B */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "Y41B", "Y41B", 12, paint_setup_Y41B, paint_hline_Y41B},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* Y42B */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "Y42B", "Y42B", 16, paint_setup_Y42B, paint_hline_Y42B},
|
2009-02-10 16:39:45 +00:00
|
|
|
/* Y444 */
|
|
|
|
{VTS_YUV, "Y444", "Y444", 24, paint_setup_Y444, paint_hline_Y444},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* Y800 grayscale */
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_YUV, "Y800", "Y800", 8, paint_setup_Y800, paint_hline_Y800},
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2009-03-28 09:01:00 +00:00
|
|
|
/* Not exactly YUV but it's the same as above */
|
2009-05-26 12:38:43 +00:00
|
|
|
{VTS_GRAY, "GRAY8", "GRAY8", 8, paint_setup_GRAY8, paint_hline_GRAY8},
|
|
|
|
{VTS_GRAY, "GRAY16", "GRAY16", 16, paint_setup_GRAY16, paint_hline_GRAY16},
|
2009-03-28 09:01:00 +00:00
|
|
|
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "xRGB8888", 32, paint_setup_xRGB8888, paint_hline_str4, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x00ff0000, 0x0000ff00, 0x000000ff},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "xBGR8888", 32, paint_setup_xBGR8888, paint_hline_str4, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x000000ff, 0x0000ff00, 0x00ff0000},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "RGBx8888", 32, paint_setup_RGBx8888, paint_hline_str4, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0xff000000, 0x00ff0000, 0x0000ff00},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "BGRx8888", 32, paint_setup_BGRx8888, paint_hline_str4, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x0000ff00, 0x00ff0000, 0xff000000},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "ARGB8888", 32, paint_setup_ARGB8888, paint_hline_str4, 32,
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "ABGR8888", 32, paint_setup_ABGR8888, paint_hline_str4, 32,
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "RGBA8888", 32, paint_setup_RGBA8888, paint_hline_str4, 32,
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "BGRA8888", 32, paint_setup_BGRA8888, paint_hline_str4, 32,
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
0x0000ff00, 0x00ff0000, 0xff000000, 0x000000ff},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "RGB888", 24, paint_setup_RGB888, paint_hline_str3, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x00ff0000, 0x0000ff00, 0x000000ff},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "BGR888", 24, paint_setup_BGR888, paint_hline_str3, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x000000ff, 0x0000ff00, 0x00ff0000},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "RGB565", 16, paint_setup_RGB565, paint_hline_RGB565, 16,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x0000f800, 0x000007e0, 0x0000001f},
|
2007-05-15 03:53:11 +00:00
|
|
|
{VTS_RGB, "RGB ", "xRGB1555", 16, paint_setup_xRGB1555, paint_hline_xRGB1555,
|
|
|
|
15,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x00007c00, 0x000003e0, 0x0000001f},
|
2007-05-15 03:53:11 +00:00
|
|
|
|
2008-03-14 18:42:35 +00:00
|
|
|
{VTS_BAYER, "BAY8", "Bayer", 8, paint_setup_bayer, paint_hline_bayer}
|
2003-04-16 07:52:54 +00:00
|
|
|
};
|
2009-02-10 16:39:45 +00:00
|
|
|
|
2006-09-23 15:24:55 +00:00
|
|
|
int n_fourccs = G_N_ELEMENTS (fourcc_list);
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
struct fourcc_list_struct *
|
|
|
|
paintinfo_find_by_structure (const GstStructure * structure)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
int i;
|
2004-03-14 22:34:34 +00:00
|
|
|
const char *media_type = gst_structure_get_name (structure);
|
2003-12-22 01:47:09 +00:00
|
|
|
int ret;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2003-12-22 01:47:09 +00:00
|
|
|
g_return_val_if_fail (structure, NULL);
|
|
|
|
|
2009-03-28 09:01:00 +00:00
|
|
|
if (strcmp (media_type, "video/x-raw-gray") == 0) {
|
2009-05-26 12:38:43 +00:00
|
|
|
gint bpp, depth, endianness = 0;
|
2009-03-28 09:01:00 +00:00
|
|
|
|
|
|
|
ret = gst_structure_get_int (structure, "bpp", &bpp) &&
|
|
|
|
gst_structure_get_int (structure, "depth", &depth);
|
2009-05-26 12:38:43 +00:00
|
|
|
if (!ret || bpp != depth || (depth != 8 && depth != 16))
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
ret = gst_structure_get_int (structure, "endianness", &endianness);
|
|
|
|
if ((!ret || endianness != G_BYTE_ORDER) && bpp == 16)
|
2009-03-28 09:01:00 +00:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
for (i = 0; i < n_fourccs; i++) {
|
2009-05-26 12:38:43 +00:00
|
|
|
if (fourcc_list[i].type == VTS_GRAY && fourcc_list[i].bitspp == bpp) {
|
2009-03-28 09:01:00 +00:00
|
|
|
return fourcc_list + i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (strcmp (media_type, "video/x-raw-yuv") == 0) {
|
2003-07-08 07:40:09 +00:00
|
|
|
char *s;
|
|
|
|
int fourcc;
|
2003-07-27 05:31:01 +00:00
|
|
|
guint32 format;
|
2003-07-08 07:40:09 +00:00
|
|
|
|
2003-12-22 01:47:09 +00:00
|
|
|
ret = gst_structure_get_fourcc (structure, "format", &format);
|
2004-03-14 22:34:34 +00:00
|
|
|
if (!ret)
|
|
|
|
return NULL;
|
2003-07-08 07:40:09 +00:00
|
|
|
for (i = 0; i < n_fourccs; i++) {
|
|
|
|
s = fourcc_list[i].fourcc;
|
2005-11-21 13:32:36 +00:00
|
|
|
/* g_print("testing %" GST_FOURCC_FORMAT " and %s\n", GST_FOURCC_ARGS(format), s); */
|
2003-07-08 07:40:09 +00:00
|
|
|
fourcc = GST_MAKE_FOURCC (s[0], s[1], s[2], s[3]);
|
2007-05-15 03:53:11 +00:00
|
|
|
if (fourcc_list[i].type == VTS_YUV && fourcc == format) {
|
2004-03-15 19:32:28 +00:00
|
|
|
return fourcc_list + i;
|
2003-07-08 07:40:09 +00:00
|
|
|
}
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
2004-03-14 22:34:34 +00:00
|
|
|
} else if (strcmp (media_type, "video/x-raw-rgb") == 0) {
|
2003-07-27 05:31:01 +00:00
|
|
|
int red_mask;
|
|
|
|
int green_mask;
|
|
|
|
int blue_mask;
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
int alpha_mask;
|
2003-07-27 05:31:01 +00:00
|
|
|
int depth;
|
|
|
|
int bpp;
|
|
|
|
|
2003-12-22 01:47:09 +00:00
|
|
|
ret = gst_structure_get_int (structure, "red_mask", &red_mask);
|
|
|
|
ret &= gst_structure_get_int (structure, "green_mask", &green_mask);
|
|
|
|
ret &= gst_structure_get_int (structure, "blue_mask", &blue_mask);
|
|
|
|
ret &= gst_structure_get_int (structure, "depth", &depth);
|
|
|
|
ret &= gst_structure_get_int (structure, "bpp", &bpp);
|
|
|
|
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
if (depth == 32) {
|
|
|
|
ret &= gst_structure_get_int (structure, "alpha_mask", &alpha_mask);
|
|
|
|
ret &= (alpha_mask != 0);
|
|
|
|
} else {
|
|
|
|
alpha_mask = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!ret) {
|
|
|
|
GST_WARNING ("incomplete caps structure: %" GST_PTR_FORMAT, structure);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2003-07-27 05:31:01 +00:00
|
|
|
for (i = 0; i < n_fourccs; i++) {
|
2007-05-15 03:53:11 +00:00
|
|
|
if (fourcc_list[i].type == VTS_RGB &&
|
2004-03-15 19:32:28 +00:00
|
|
|
fourcc_list[i].red_mask == red_mask &&
|
|
|
|
fourcc_list[i].green_mask == green_mask &&
|
|
|
|
fourcc_list[i].blue_mask == blue_mask &&
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
(alpha_mask == 0 || fourcc_list[i].alpha_mask == alpha_mask) &&
|
2004-03-15 19:32:28 +00:00
|
|
|
fourcc_list[i].depth == depth && fourcc_list[i].bitspp == bpp) {
|
|
|
|
return fourcc_list + i;
|
2003-07-27 05:31:01 +00:00
|
|
|
}
|
|
|
|
}
|
2003-07-08 07:40:09 +00:00
|
|
|
return NULL;
|
2007-05-15 03:53:11 +00:00
|
|
|
} else if (strcmp (media_type, "video/x-raw-bayer") == 0) {
|
|
|
|
for (i = 0; i < n_fourccs; i++) {
|
|
|
|
if (fourcc_list[i].type == VTS_BAYER) {
|
|
|
|
return fourcc_list + i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
2003-07-08 07:40:09 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
g_critical ("format not found for media type %s", media_type);
|
2003-07-08 07:40:09 +00:00
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
struct fourcc_list_struct *
|
|
|
|
paintrect_find_fourcc (int find_fourcc)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < n_fourccs; i++) {
|
|
|
|
char *s;
|
|
|
|
int fourcc;
|
|
|
|
|
|
|
|
s = fourcc_list[i].fourcc;
|
|
|
|
fourcc = GST_MAKE_FOURCC (s[0], s[1], s[2], s[3]);
|
|
|
|
if (find_fourcc == fourcc) {
|
|
|
|
/* If YUV format, it's good */
|
2007-05-15 03:53:11 +00:00
|
|
|
if (!fourcc_list[i].type == VTS_YUV) {
|
2004-03-15 19:32:28 +00:00
|
|
|
return fourcc_list + i;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return fourcc_list + i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
struct fourcc_list_struct *
|
|
|
|
paintrect_find_name (const char *name)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < n_fourccs; i++) {
|
2004-03-14 22:34:34 +00:00
|
|
|
if (strcmp (name, fourcc_list[i].name) == 0) {
|
2003-04-16 07:52:54 +00:00
|
|
|
return fourcc_list + i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
GstStructure *
|
|
|
|
paint_get_structure (struct fourcc_list_struct * format)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
GstStructure *structure = NULL;
|
2003-04-16 07:52:54 +00:00
|
|
|
unsigned int fourcc;
|
2007-05-15 03:53:11 +00:00
|
|
|
int endianness;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
g_return_val_if_fail (format, NULL);
|
2003-05-14 18:43:36 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
fourcc =
|
|
|
|
GST_MAKE_FOURCC (format->fourcc[0], format->fourcc[1], format->fourcc[2],
|
|
|
|
format->fourcc[3]);
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2007-05-15 03:53:11 +00:00
|
|
|
switch (format->type) {
|
|
|
|
case VTS_RGB:
|
|
|
|
if (format->bitspp == 16) {
|
|
|
|
endianness = G_BYTE_ORDER;
|
|
|
|
} else {
|
|
|
|
endianness = G_BIG_ENDIAN;
|
|
|
|
}
|
|
|
|
structure = gst_structure_new ("video/x-raw-rgb",
|
|
|
|
"bpp", G_TYPE_INT, format->bitspp,
|
|
|
|
"endianness", G_TYPE_INT, endianness,
|
|
|
|
"depth", G_TYPE_INT, format->depth,
|
|
|
|
"red_mask", G_TYPE_INT, format->red_mask,
|
|
|
|
"green_mask", G_TYPE_INT, format->green_mask,
|
|
|
|
"blue_mask", G_TYPE_INT, format->blue_mask, NULL);
|
|
|
|
if (format->depth == 32 && format->alpha_mask > 0) {
|
|
|
|
gst_structure_set (structure, "alpha_mask", G_TYPE_INT,
|
|
|
|
format->alpha_mask, NULL);
|
|
|
|
}
|
|
|
|
break;
|
2009-05-26 12:38:43 +00:00
|
|
|
case VTS_GRAY:
|
|
|
|
structure = gst_structure_new ("video/x-raw-gray",
|
|
|
|
"bpp", G_TYPE_INT, format->bitspp, "depth", G_TYPE_INT,
|
|
|
|
format->bitspp, NULL);
|
|
|
|
if (format->bitspp == 16)
|
|
|
|
gst_structure_set (structure, "endianness", G_TYPE_INT, G_BYTE_ORDER,
|
|
|
|
NULL);
|
|
|
|
break;
|
2007-05-15 03:53:11 +00:00
|
|
|
case VTS_YUV:
|
2009-05-26 12:38:43 +00:00
|
|
|
structure = gst_structure_new ("video/x-raw-yuv",
|
|
|
|
"format", GST_TYPE_FOURCC, fourcc, NULL);
|
2007-05-15 03:53:11 +00:00
|
|
|
break;
|
|
|
|
case VTS_BAYER:
|
|
|
|
structure = gst_structure_new ("video/x-raw-bayer", NULL);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
g_assert_not_reached ();
|
|
|
|
break;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
return structure;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
2004-07-22 15:55:33 +00:00
|
|
|
/* returns the size in bytes for one video frame of the given dimensions
|
2005-07-19 12:01:53 +00:00
|
|
|
* given the fourcc in GstVideoTestSrc */
|
2004-01-09 01:53:31 +00:00
|
|
|
int
|
2005-12-01 01:12:55 +00:00
|
|
|
gst_video_test_src_get_size (GstVideoTestSrc * v, int w, int h)
|
2004-01-09 01:53:31 +00:00
|
|
|
{
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
paintinfo pi = { NULL, };
|
2004-01-09 01:53:31 +00:00
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
|
|
|
|
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, NULL);
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
return (unsigned long) p->endptr;
|
2004-01-09 01:53:31 +00:00
|
|
|
}
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
void
|
2005-12-01 01:12:55 +00:00
|
|
|
gst_video_test_src_smpte (GstVideoTestSrc * v, unsigned char *dest, int w,
|
|
|
|
int h)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int y1, y2;
|
|
|
|
int j;
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
paintinfo pi = { NULL, };
|
2003-04-16 07:52:54 +00:00
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_colors = vts_colors_rgb;
|
|
|
|
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
|
|
|
|
p->yuv_colors = vts_colors_bt601_ycbcr_100;
|
|
|
|
} else {
|
|
|
|
p->yuv_colors = vts_colors_bt709_ycbcr_100;
|
|
|
|
}
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_colors = vts_colors_gray_100;
|
2003-04-16 07:52:54 +00:00
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
|
|
|
y1 = 2 * h / 3;
|
|
|
|
y2 = h * 0.75;
|
|
|
|
|
|
|
|
/* color bars */
|
|
|
|
for (i = 0; i < 7; i++) {
|
|
|
|
int x1 = i * w / 7;
|
|
|
|
int x2 = (i + 1) * w / 7;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->yuv_color = p->yuv_colors + i;
|
|
|
|
p->rgb_color = p->rgb_colors + i;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + i;
|
2003-04-16 07:52:54 +00:00
|
|
|
for (j = 0; j < y1; j++) {
|
|
|
|
p->paint_hline (p, x1, j, (x2 - x1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* inverse blue bars */
|
|
|
|
for (i = 0; i < 7; i++) {
|
|
|
|
int x1 = i * w / 7;
|
|
|
|
int x2 = (i + 1) * w / 7;
|
|
|
|
int k;
|
|
|
|
|
|
|
|
if (i & 1) {
|
|
|
|
k = 7;
|
|
|
|
} else {
|
|
|
|
k = 6 - i;
|
|
|
|
}
|
2008-11-19 00:24:44 +00:00
|
|
|
p->yuv_color = p->yuv_colors + k;
|
|
|
|
p->rgb_color = p->rgb_colors + k;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + k;
|
2003-04-16 07:52:54 +00:00
|
|
|
for (j = y1; j < y2; j++) {
|
|
|
|
p->paint_hline (p, x1, j, (x2 - x1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* -I, white, Q regions */
|
|
|
|
for (i = 0; i < 3; i++) {
|
|
|
|
int x1 = i * w / 6;
|
|
|
|
int x2 = (i + 1) * w / 6;
|
|
|
|
int k;
|
|
|
|
|
|
|
|
if (i == 0) {
|
|
|
|
k = 8;
|
|
|
|
} else if (i == 1) {
|
|
|
|
k = 0;
|
|
|
|
} else
|
|
|
|
k = 9;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->yuv_color = p->yuv_colors + k;
|
|
|
|
p->rgb_color = p->rgb_colors + k;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + k;
|
2003-04-16 07:52:54 +00:00
|
|
|
for (j = y2; j < h; j++) {
|
|
|
|
p->paint_hline (p, x1, j, (x2 - x1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* superblack, black, dark grey */
|
|
|
|
for (i = 0; i < 3; i++) {
|
2004-03-14 22:34:34 +00:00
|
|
|
int x1 = w / 2 + i * w / 12;
|
|
|
|
int x2 = w / 2 + (i + 1) * w / 12;
|
2003-04-16 07:52:54 +00:00
|
|
|
int k;
|
|
|
|
|
|
|
|
if (i == 0) {
|
|
|
|
k = COLOR_SUPER_BLACK;
|
|
|
|
} else if (i == 1) {
|
|
|
|
k = COLOR_BLACK;
|
|
|
|
} else
|
|
|
|
k = COLOR_DARK_GREY;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->yuv_color = p->yuv_colors + k;
|
|
|
|
p->rgb_color = p->rgb_colors + k;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + k;
|
2003-04-16 07:52:54 +00:00
|
|
|
for (j = y2; j < h; j++) {
|
|
|
|
p->paint_hline (p, x1, j, (x2 - x1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2004-03-14 22:34:34 +00:00
|
|
|
int x1 = w * 3 / 4;
|
2008-11-19 00:24:44 +00:00
|
|
|
struct vts_color_struct_rgb rgb_color;
|
|
|
|
struct vts_color_struct_yuv yuv_color;
|
2009-05-26 12:38:43 +00:00
|
|
|
struct vts_color_struct_gray gray_color;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
rgb_color = p->rgb_colors[COLOR_BLACK];
|
|
|
|
yuv_color = p->yuv_colors[COLOR_BLACK];
|
2009-05-26 12:38:43 +00:00
|
|
|
gray_color = p->gray_colors[COLOR_BLACK];
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = &rgb_color;
|
|
|
|
p->yuv_color = &yuv_color;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = &gray_color;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
for (i = x1; i < w; i++) {
|
|
|
|
for (j = y2; j < h; j++) {
|
2004-03-15 19:32:28 +00:00
|
|
|
/* FIXME not strictly correct */
|
2008-11-19 00:24:44 +00:00
|
|
|
int y = random_char ();
|
|
|
|
yuv_color.Y = y;
|
|
|
|
rgb_color.R = y;
|
|
|
|
rgb_color.G = y;
|
|
|
|
rgb_color.B = y;
|
2009-05-26 12:38:43 +00:00
|
|
|
gray_color.G = (y << 8) | random_char ();
|
2004-03-15 19:32:28 +00:00
|
|
|
p->paint_hline (p, i, j, 1);
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
void
|
|
|
|
gst_video_test_src_smpte75 (GstVideoTestSrc * v, unsigned char *dest, int w,
|
|
|
|
int h)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int j;
|
|
|
|
paintinfo pi = { NULL, };
|
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
|
|
|
|
|
|
|
p->rgb_colors = vts_colors_rgb_75;
|
|
|
|
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
|
|
|
|
p->yuv_colors = vts_colors_bt601_ycbcr_75;
|
|
|
|
} else {
|
|
|
|
p->yuv_colors = vts_colors_bt709_ycbcr_75;
|
|
|
|
}
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_colors = vts_colors_gray_75;
|
2008-11-19 00:24:44 +00:00
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
|
|
|
/* color bars */
|
|
|
|
for (i = 0; i < 7; i++) {
|
|
|
|
int x1 = i * w / 7;
|
|
|
|
int x2 = (i + 1) * w / 7;
|
|
|
|
|
|
|
|
p->yuv_color = p->yuv_colors + i;
|
|
|
|
p->rgb_color = p->rgb_colors + i;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + i;
|
2008-11-19 00:24:44 +00:00
|
|
|
for (j = 0; j < h; j++) {
|
|
|
|
p->paint_hline (p, x1, j, (x2 - x1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
void
|
2005-12-01 01:12:55 +00:00
|
|
|
gst_video_test_src_snow (GstVideoTestSrc * v, unsigned char *dest, int w, int h)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int j;
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
paintinfo pi = { NULL, };
|
2003-04-16 07:52:54 +00:00
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
2008-11-19 00:24:44 +00:00
|
|
|
struct vts_color_struct_rgb rgb_color;
|
|
|
|
struct vts_color_struct_yuv yuv_color;
|
2009-05-26 12:38:43 +00:00
|
|
|
struct vts_color_struct_gray gray_color;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_colors = vts_colors_rgb;
|
|
|
|
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
|
|
|
|
p->yuv_colors = vts_colors_bt601_ycbcr_100;
|
|
|
|
} else {
|
|
|
|
p->yuv_colors = vts_colors_bt709_ycbcr_100;
|
|
|
|
}
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_colors = vts_colors_gray_100;
|
2003-04-16 07:52:54 +00:00
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
rgb_color = p->rgb_colors[COLOR_BLACK];
|
|
|
|
yuv_color = p->yuv_colors[COLOR_BLACK];
|
2009-05-26 12:38:43 +00:00
|
|
|
gray_color = p->gray_colors[COLOR_BLACK];
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = &rgb_color;
|
|
|
|
p->yuv_color = &yuv_color;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = &gray_color;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
for (i = 0; i < w; i++) {
|
|
|
|
for (j = 0; j < h; j++) {
|
|
|
|
/* FIXME not strictly correct */
|
2008-11-19 00:24:44 +00:00
|
|
|
int y = random_char ();
|
|
|
|
yuv_color.Y = y;
|
|
|
|
rgb_color.R = y;
|
|
|
|
rgb_color.G = y;
|
|
|
|
rgb_color.B = y;
|
2009-05-26 12:38:43 +00:00
|
|
|
gray_color.G = (y << 8) | random_char ();
|
2003-04-16 07:52:54 +00:00
|
|
|
p->paint_hline (p, i, j, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gst/videotestsrc/: Add more uni-colour patterns ("white", "red", "green", and "blue").
Original commit message from CVS:
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type),
(gst_video_test_src_set_pattern):
* gst/videotestsrc/gstvideotestsrc.h:
* gst/videotestsrc/videotestsrc.c: (gst_video_test_src_unicolor),
(gst_video_test_src_black), (gst_video_test_src_white),
(gst_video_test_src_red), (gst_video_test_src_green),
(gst_video_test_src_blue):
* gst/videotestsrc/videotestsrc.h:
Add more uni-colour patterns ("white", "red", "green", and "blue").
2006-09-01 16:12:35 +00:00
|
|
|
static void
|
|
|
|
gst_video_test_src_unicolor (GstVideoTestSrc * v, unsigned char *dest, int w,
|
2008-11-19 00:24:44 +00:00
|
|
|
int h, int color_index)
|
2003-04-22 22:21:08 +00:00
|
|
|
{
|
|
|
|
int i;
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
paintinfo pi = { NULL, };
|
2003-04-22 22:21:08 +00:00
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_colors = vts_colors_rgb;
|
|
|
|
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
|
|
|
|
p->yuv_colors = vts_colors_bt601_ycbcr_100;
|
|
|
|
} else {
|
|
|
|
p->yuv_colors = vts_colors_bt709_ycbcr_100;
|
|
|
|
}
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_colors = vts_colors_gray_100;
|
2003-04-22 22:21:08 +00:00
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = p->rgb_colors + color_index;
|
|
|
|
p->yuv_color = p->yuv_colors + color_index;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + color_index;
|
2003-04-22 22:21:08 +00:00
|
|
|
|
2003-04-23 07:38:32 +00:00
|
|
|
for (i = 0; i < h; i++) {
|
|
|
|
p->paint_hline (p, 0, i, w);
|
2003-04-22 22:21:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
gst/videotestsrc/: Add more uni-colour patterns ("white", "red", "green", and "blue").
Original commit message from CVS:
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type),
(gst_video_test_src_set_pattern):
* gst/videotestsrc/gstvideotestsrc.h:
* gst/videotestsrc/videotestsrc.c: (gst_video_test_src_unicolor),
(gst_video_test_src_black), (gst_video_test_src_white),
(gst_video_test_src_red), (gst_video_test_src_green),
(gst_video_test_src_blue):
* gst/videotestsrc/videotestsrc.h:
Add more uni-colour patterns ("white", "red", "green", and "blue").
2006-09-01 16:12:35 +00:00
|
|
|
void
|
|
|
|
gst_video_test_src_black (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
2008-11-19 00:24:44 +00:00
|
|
|
gst_video_test_src_unicolor (v, dest, w, h, COLOR_BLACK);
|
gst/videotestsrc/: Add more uni-colour patterns ("white", "red", "green", and "blue").
Original commit message from CVS:
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type),
(gst_video_test_src_set_pattern):
* gst/videotestsrc/gstvideotestsrc.h:
* gst/videotestsrc/videotestsrc.c: (gst_video_test_src_unicolor),
(gst_video_test_src_black), (gst_video_test_src_white),
(gst_video_test_src_red), (gst_video_test_src_green),
(gst_video_test_src_blue):
* gst/videotestsrc/videotestsrc.h:
Add more uni-colour patterns ("white", "red", "green", and "blue").
2006-09-01 16:12:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_video_test_src_white (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
2008-11-19 00:24:44 +00:00
|
|
|
gst_video_test_src_unicolor (v, dest, w, h, COLOR_WHITE);
|
gst/videotestsrc/: Add more uni-colour patterns ("white", "red", "green", and "blue").
Original commit message from CVS:
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type),
(gst_video_test_src_set_pattern):
* gst/videotestsrc/gstvideotestsrc.h:
* gst/videotestsrc/videotestsrc.c: (gst_video_test_src_unicolor),
(gst_video_test_src_black), (gst_video_test_src_white),
(gst_video_test_src_red), (gst_video_test_src_green),
(gst_video_test_src_blue):
* gst/videotestsrc/videotestsrc.h:
Add more uni-colour patterns ("white", "red", "green", and "blue").
2006-09-01 16:12:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_video_test_src_red (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
2008-11-19 00:24:44 +00:00
|
|
|
gst_video_test_src_unicolor (v, dest, w, h, COLOR_RED);
|
gst/videotestsrc/: Add more uni-colour patterns ("white", "red", "green", and "blue").
Original commit message from CVS:
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type),
(gst_video_test_src_set_pattern):
* gst/videotestsrc/gstvideotestsrc.h:
* gst/videotestsrc/videotestsrc.c: (gst_video_test_src_unicolor),
(gst_video_test_src_black), (gst_video_test_src_white),
(gst_video_test_src_red), (gst_video_test_src_green),
(gst_video_test_src_blue):
* gst/videotestsrc/videotestsrc.h:
Add more uni-colour patterns ("white", "red", "green", and "blue").
2006-09-01 16:12:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_video_test_src_green (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
2008-11-19 00:24:44 +00:00
|
|
|
gst_video_test_src_unicolor (v, dest, w, h, COLOR_GREEN);
|
gst/videotestsrc/: Add more uni-colour patterns ("white", "red", "green", and "blue").
Original commit message from CVS:
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type),
(gst_video_test_src_set_pattern):
* gst/videotestsrc/gstvideotestsrc.h:
* gst/videotestsrc/videotestsrc.c: (gst_video_test_src_unicolor),
(gst_video_test_src_black), (gst_video_test_src_white),
(gst_video_test_src_red), (gst_video_test_src_green),
(gst_video_test_src_blue):
* gst/videotestsrc/videotestsrc.h:
Add more uni-colour patterns ("white", "red", "green", and "blue").
2006-09-01 16:12:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_video_test_src_blue (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
2008-11-19 00:24:44 +00:00
|
|
|
gst_video_test_src_unicolor (v, dest, w, h, COLOR_BLUE);
|
gst/videotestsrc/: Add more uni-colour patterns ("white", "red", "green", and "blue").
Original commit message from CVS:
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type),
(gst_video_test_src_set_pattern):
* gst/videotestsrc/gstvideotestsrc.h:
* gst/videotestsrc/videotestsrc.c: (gst_video_test_src_unicolor),
(gst_video_test_src_black), (gst_video_test_src_white),
(gst_video_test_src_red), (gst_video_test_src_green),
(gst_video_test_src_blue):
* gst/videotestsrc/videotestsrc.h:
Add more uni-colour patterns ("white", "red", "green", and "blue").
2006-09-01 16:12:35 +00:00
|
|
|
}
|
|
|
|
|
2006-10-23 12:46:41 +00:00
|
|
|
void
|
|
|
|
gst_video_test_src_checkers1 (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
paintinfo pi = { NULL, };
|
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_colors = vts_colors_rgb;
|
|
|
|
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
|
|
|
|
p->yuv_colors = vts_colors_bt601_ycbcr_100;
|
|
|
|
} else {
|
|
|
|
p->yuv_colors = vts_colors_bt709_ycbcr_100;
|
|
|
|
}
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_colors = vts_colors_gray_100;
|
2006-10-23 12:46:41 +00:00
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
|
|
|
for (y = 0; y < h; y++) {
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = p->rgb_colors + COLOR_GREEN;
|
|
|
|
p->yuv_color = p->yuv_colors + COLOR_GREEN;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + COLOR_GREEN;
|
2006-10-23 12:46:41 +00:00
|
|
|
p->paint_hline (p, 0, y, w);
|
|
|
|
for (x = (y % 2); x < w; x += 2) {
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = p->rgb_colors + COLOR_RED;
|
|
|
|
p->yuv_color = p->yuv_colors + COLOR_RED;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + COLOR_RED;
|
2006-10-23 12:46:41 +00:00
|
|
|
p->paint_hline (p, x, y, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_video_test_src_checkers2 (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
paintinfo pi = { NULL, };
|
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_colors = vts_colors_rgb;
|
|
|
|
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
|
|
|
|
p->yuv_colors = vts_colors_bt601_ycbcr_100;
|
|
|
|
} else {
|
|
|
|
p->yuv_colors = vts_colors_bt709_ycbcr_100;
|
|
|
|
}
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_colors = vts_colors_gray_100;
|
2006-10-23 12:46:41 +00:00
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = p->rgb_colors + COLOR_GREEN;
|
|
|
|
p->yuv_color = p->yuv_colors + COLOR_GREEN;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + COLOR_GREEN;
|
2006-10-23 12:46:41 +00:00
|
|
|
for (y = 0; y < h; y++) {
|
|
|
|
p->paint_hline (p, 0, y, w);
|
|
|
|
}
|
|
|
|
|
|
|
|
for (y = 0; y < h; y += 2) {
|
|
|
|
for (x = ((y % 4) == 0) ? 0 : 2; x < w; x += 4) {
|
|
|
|
guint len = (x < (w - 1)) ? 2 : (w - x);
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = p->rgb_colors + COLOR_RED;
|
|
|
|
p->yuv_color = p->yuv_colors + COLOR_RED;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + COLOR_RED;
|
2006-10-23 12:46:41 +00:00
|
|
|
p->paint_hline (p, x, y + 0, len);
|
|
|
|
if (G_LIKELY ((y + 1) < h)) {
|
|
|
|
p->paint_hline (p, x, y + 1, len);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_video_test_src_checkers4 (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
paintinfo pi = { NULL, };
|
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_colors = vts_colors_rgb;
|
|
|
|
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
|
|
|
|
p->yuv_colors = vts_colors_bt601_ycbcr_100;
|
|
|
|
} else {
|
|
|
|
p->yuv_colors = vts_colors_bt709_ycbcr_100;
|
|
|
|
}
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_colors = vts_colors_gray_100;
|
2006-10-23 12:46:41 +00:00
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = p->rgb_colors + COLOR_GREEN;
|
|
|
|
p->yuv_color = p->yuv_colors + COLOR_GREEN;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + COLOR_GREEN;
|
2006-10-23 12:46:41 +00:00
|
|
|
for (y = 0; y < h; y++) {
|
|
|
|
p->paint_hline (p, 0, y, w);
|
|
|
|
}
|
|
|
|
|
|
|
|
for (y = 0; y < h; y += 4) {
|
|
|
|
for (x = ((y % 8) == 0) ? 0 : 4; x < w; x += 8) {
|
|
|
|
guint len = (x < (w - 3)) ? 4 : (w - x);
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = p->rgb_colors + COLOR_RED;
|
|
|
|
p->yuv_color = p->yuv_colors + COLOR_RED;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + COLOR_RED;
|
2006-10-23 12:46:41 +00:00
|
|
|
p->paint_hline (p, x, y + 0, len);
|
|
|
|
if (G_LIKELY ((y + 1) < h)) {
|
|
|
|
p->paint_hline (p, x, y + 1, len);
|
|
|
|
if (G_LIKELY ((y + 2) < h)) {
|
|
|
|
p->paint_hline (p, x, y + 2, len);
|
|
|
|
if (G_LIKELY ((y + 3) < h)) {
|
|
|
|
p->paint_hline (p, x, y + 3, len);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_video_test_src_checkers8 (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
paintinfo pi = { NULL, };
|
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_colors = vts_colors_rgb;
|
|
|
|
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
|
|
|
|
p->yuv_colors = vts_colors_bt601_ycbcr_100;
|
|
|
|
} else {
|
|
|
|
p->yuv_colors = vts_colors_bt709_ycbcr_100;
|
|
|
|
}
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_colors = vts_colors_gray_100;
|
2006-10-23 12:46:41 +00:00
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = p->rgb_colors + COLOR_GREEN;
|
|
|
|
p->yuv_color = p->yuv_colors + COLOR_GREEN;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + COLOR_GREEN;
|
2006-10-23 12:46:41 +00:00
|
|
|
for (y = 0; y < h; y++) {
|
2008-11-19 00:24:44 +00:00
|
|
|
for (x = 0; x < w; x += 8) {
|
|
|
|
int len = MIN (8, w - x);
|
2006-10-23 12:46:41 +00:00
|
|
|
|
2009-09-23 13:31:50 +00:00
|
|
|
if ((x ^ y) & (1 << 3)) {
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = p->rgb_colors + COLOR_GREEN;
|
|
|
|
p->yuv_color = p->yuv_colors + COLOR_GREEN;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + COLOR_GREEN;
|
2008-11-19 00:24:44 +00:00
|
|
|
} else {
|
|
|
|
p->rgb_color = p->rgb_colors + COLOR_RED;
|
|
|
|
p->yuv_color = p->yuv_colors + COLOR_RED;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = p->gray_colors + COLOR_RED;
|
2006-10-23 12:46:41 +00:00
|
|
|
}
|
2008-11-19 00:24:44 +00:00
|
|
|
p->paint_hline (p, x, y, len);
|
2006-10-23 12:46:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-11-21 20:32:56 +00:00
|
|
|
void
|
|
|
|
gst_video_test_src_zoneplate (GstVideoTestSrc * v, unsigned char *dest,
|
|
|
|
int w, int h)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int j;
|
|
|
|
paintinfo pi = { NULL, };
|
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
|
|
|
struct vts_color_struct_rgb rgb_color;
|
|
|
|
struct vts_color_struct_yuv yuv_color;
|
2009-05-26 12:38:43 +00:00
|
|
|
struct vts_color_struct_gray gray_color;
|
2008-11-21 20:32:56 +00:00
|
|
|
static uint8_t sine_array[256];
|
|
|
|
static int sine_array_inited = FALSE;
|
|
|
|
|
|
|
|
static int t = 0; /* time - increment phase vs time by 1 for each generated frame */
|
|
|
|
/* this may not fit with the correct gstreamer notion of time, so maybe FIXME? */
|
|
|
|
|
|
|
|
int xreset = -(w / 2) - v->xoffset; /* starting values for x^2 and y^2, centering the ellipse */
|
|
|
|
int yreset = -(h / 2) - v->yoffset;
|
|
|
|
|
|
|
|
int x, y;
|
|
|
|
int accum_kx;
|
|
|
|
int accum_kxt;
|
|
|
|
int accum_ky;
|
|
|
|
int accum_kyt;
|
|
|
|
int accum_kxy;
|
|
|
|
int kt;
|
|
|
|
int kt2;
|
|
|
|
int ky2;
|
|
|
|
int delta_kxt = v->kxt * t;
|
|
|
|
int delta_kxy;
|
|
|
|
int scale_kxy = 0xffff / (w / 2);
|
|
|
|
int scale_kx2 = 0xffff / w;
|
|
|
|
|
|
|
|
if (!sine_array_inited) {
|
|
|
|
int black = 16;
|
|
|
|
int white = 235;
|
|
|
|
int range = white - black;
|
|
|
|
for (i = 0; i < 256; i++) {
|
|
|
|
sine_array[i] =
|
|
|
|
floor (range * (0.5 + 0.5 * sin (i * 2 * M_PI / 256)) + 0.5 + black);
|
|
|
|
}
|
|
|
|
sine_array_inited = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
p->rgb_colors = vts_colors_rgb;
|
|
|
|
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
|
|
|
|
p->yuv_colors = vts_colors_bt601_ycbcr_100;
|
|
|
|
} else {
|
|
|
|
p->yuv_colors = vts_colors_bt709_ycbcr_100;
|
|
|
|
}
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_colors = vts_colors_gray_100;
|
2008-11-21 20:32:56 +00:00
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
|
|
|
rgb_color = p->rgb_colors[COLOR_BLACK];
|
|
|
|
yuv_color = p->yuv_colors[COLOR_BLACK];
|
2009-05-26 12:38:43 +00:00
|
|
|
gray_color = p->gray_colors[COLOR_BLACK];
|
2008-11-21 20:32:56 +00:00
|
|
|
p->rgb_color = &rgb_color;
|
|
|
|
p->yuv_color = &yuv_color;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = &gray_color;
|
2008-11-21 20:32:56 +00:00
|
|
|
|
|
|
|
/* Zoneplate equation:
|
|
|
|
*
|
|
|
|
* phase = k0 + kx*x + ky*y + kt*t
|
|
|
|
* + kxt*x*t + kyt*y*t + kxy*x*y
|
|
|
|
* + kx2*x*x + ky2*y*y + Kt2*t*t
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
for (j = 0, y = yreset; j < h; j++, y++) {
|
|
|
|
for (i = 0, x = xreset; i < w; i++, x++) {
|
|
|
|
|
|
|
|
//zero order
|
|
|
|
int phase = v->k0;
|
|
|
|
|
|
|
|
//first order
|
|
|
|
phase = phase + (v->kx * i) + (v->ky * j) + (v->kt * t);
|
|
|
|
|
|
|
|
//cross term
|
|
|
|
//phase = phase + (v->kxt * i * t) + (v->kyt * j * t);
|
|
|
|
//phase = phase + (v->kxy * x * y) / (w/2);
|
|
|
|
|
|
|
|
/*second order */
|
|
|
|
/*normalise x/y terms to rate of change of phase at the picture edge */
|
|
|
|
phase =
|
|
|
|
phase + ((v->kx2 * x * x) / w) + ((v->ky2 * y * y) / h) +
|
|
|
|
((v->kt2 * t * t) >> 1);
|
|
|
|
|
|
|
|
color.Y = sine_array[phase & 0xff];
|
|
|
|
|
|
|
|
color.R = color.Y;
|
|
|
|
color.G = color.Y;
|
|
|
|
color.B = color.Y;
|
|
|
|
p->paint_hline (p, i, j, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* optimised version, with original code shown in comments */
|
|
|
|
accum_ky = 0;
|
|
|
|
accum_kyt = 0;
|
|
|
|
kt = v->kt * t;
|
|
|
|
kt2 = v->kt2 * t * t;
|
|
|
|
for (j = 0, y = yreset; j < h; j++, y++) {
|
|
|
|
accum_kx = 0;
|
|
|
|
accum_kxt = 0;
|
|
|
|
accum_ky += v->ky;
|
|
|
|
accum_kyt += v->kyt * t;
|
|
|
|
delta_kxy = v->kxy * y * scale_kxy;
|
|
|
|
accum_kxy = delta_kxy * xreset;
|
|
|
|
ky2 = (v->ky2 * y * y) / h;
|
|
|
|
for (i = 0, x = xreset; i < w; i++, x++) {
|
|
|
|
|
|
|
|
//zero order
|
|
|
|
int phase = v->k0;
|
|
|
|
|
|
|
|
//first order
|
|
|
|
accum_kx += v->kx;
|
|
|
|
//phase = phase + (v->kx * i) + (v->ky * j) + (v->kt * t);
|
|
|
|
phase = phase + accum_kx + accum_ky + kt;
|
|
|
|
|
|
|
|
//cross term
|
|
|
|
accum_kxt += delta_kxt;
|
|
|
|
accum_kxy += delta_kxy;
|
|
|
|
//phase = phase + (v->kxt * i * t) + (v->kyt * j * t);
|
|
|
|
phase = phase + accum_kxt + accum_kyt;
|
|
|
|
|
|
|
|
//phase = phase + (v->kxy * x * y) / (w/2);
|
|
|
|
//phase = phase + accum_kxy / (w/2) ;
|
|
|
|
phase = phase + (accum_kxy >> 16);
|
|
|
|
|
|
|
|
/*second order */
|
|
|
|
/*normalise x/y terms to rate of change of phase at the picture edge */
|
|
|
|
//phase = phase + ((v->kx2 * x * x)/w) + ((v->ky2 * y * y)/h) + ((v->kt2 * t * t)>>1);
|
|
|
|
phase = phase + ((v->kx2 * x * x * scale_kx2) >> 16) + ky2 + (kt2 >> 1);
|
|
|
|
|
|
|
|
yuv_color.Y = sine_array[phase & 0xff];
|
|
|
|
|
|
|
|
rgb_color.R = yuv_color.Y;
|
|
|
|
rgb_color.G = yuv_color.Y;
|
|
|
|
rgb_color.B = yuv_color.Y;
|
2009-05-26 12:38:43 +00:00
|
|
|
|
|
|
|
gray_color.G = yuv_color.Y << 8;
|
2008-11-21 20:32:56 +00:00
|
|
|
p->paint_hline (p, i, j, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
t++;
|
|
|
|
}
|
|
|
|
|
2007-04-04 02:45:03 +00:00
|
|
|
#undef SCALE_AMPLITUDE
|
|
|
|
void
|
|
|
|
gst_video_test_src_circular (GstVideoTestSrc * v, unsigned char *dest,
|
|
|
|
int w, int h)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int j;
|
|
|
|
paintinfo pi = { NULL, };
|
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
2008-11-19 00:24:44 +00:00
|
|
|
struct vts_color_struct_rgb rgb_color;
|
|
|
|
struct vts_color_struct_yuv yuv_color;
|
2009-05-26 12:38:43 +00:00
|
|
|
struct vts_color_struct_gray gray_color;
|
2007-04-04 02:45:03 +00:00
|
|
|
static uint8_t sine_array[256];
|
|
|
|
static int sine_array_inited = FALSE;
|
|
|
|
double freq[8];
|
|
|
|
|
|
|
|
#ifdef SCALE_AMPLITUDE
|
|
|
|
double ampl[8];
|
|
|
|
#endif
|
|
|
|
int d;
|
|
|
|
|
|
|
|
if (!sine_array_inited) {
|
|
|
|
for (i = 0; i < 256; i++) {
|
|
|
|
sine_array[i] =
|
|
|
|
floor (255 * (0.5 + 0.5 * sin (i * 2 * M_PI / 256)) + 0.5);
|
|
|
|
}
|
|
|
|
sine_array_inited = TRUE;
|
|
|
|
}
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_colors = vts_colors_rgb;
|
|
|
|
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
|
|
|
|
p->yuv_colors = vts_colors_bt601_ycbcr_100;
|
|
|
|
} else {
|
|
|
|
p->yuv_colors = vts_colors_bt709_ycbcr_100;
|
|
|
|
}
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_colors = vts_colors_gray_100;
|
2007-04-04 02:45:03 +00:00
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
rgb_color = p->rgb_colors[COLOR_BLACK];
|
|
|
|
yuv_color = p->yuv_colors[COLOR_BLACK];
|
2009-05-26 12:38:43 +00:00
|
|
|
gray_color = p->gray_colors[COLOR_BLACK];
|
2008-11-19 00:24:44 +00:00
|
|
|
p->rgb_color = &rgb_color;
|
|
|
|
p->yuv_color = &yuv_color;
|
2009-05-26 12:38:43 +00:00
|
|
|
p->gray_color = &gray_color;
|
2007-04-04 02:45:03 +00:00
|
|
|
|
|
|
|
for (i = 1; i < 8; i++) {
|
|
|
|
freq[i] = 200 * pow (2.0, -(i - 1) / 4.0);
|
|
|
|
#ifdef SCALE_AMPLITUDE
|
|
|
|
{
|
|
|
|
double x;
|
|
|
|
|
|
|
|
x = 2 * M_PI * freq[i] / w;
|
|
|
|
ampl[i] = sin (x) / x;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0; i < w; i++) {
|
|
|
|
for (j = 0; j < h; j++) {
|
|
|
|
double dist;
|
|
|
|
int seg;
|
|
|
|
|
|
|
|
dist =
|
|
|
|
sqrt ((2 * i - w) * (2 * i - w) + (2 * j - h) * (2 * j -
|
|
|
|
h)) / (2 * w);
|
|
|
|
seg = floor (dist * 16);
|
|
|
|
if (seg == 0 || seg >= 8) {
|
2008-11-19 00:24:44 +00:00
|
|
|
yuv_color.Y = 255;
|
2009-05-26 12:38:43 +00:00
|
|
|
gray_color.G = 65535;
|
2007-04-04 02:45:03 +00:00
|
|
|
} else {
|
|
|
|
#ifdef SCALE_AMPLITUDE
|
|
|
|
double a;
|
|
|
|
#endif
|
|
|
|
d = floor (256 * dist * freq[seg] + 0.5);
|
|
|
|
#ifdef SCALE_AMPLITUDE
|
|
|
|
a = ampl[seg];
|
|
|
|
if (a < 0)
|
|
|
|
a = 0;
|
2008-11-19 00:24:44 +00:00
|
|
|
yuv_color.Y = 128 + a * (sine_array[d & 0xff] - 128);
|
2009-05-26 12:38:43 +00:00
|
|
|
gray_color.G = 128 + a * (sine_array[d & 0xff] - 128);
|
2007-04-04 02:45:03 +00:00
|
|
|
#else
|
2008-11-19 00:24:44 +00:00
|
|
|
yuv_color.Y = sine_array[d & 0xff];
|
2009-05-26 12:38:43 +00:00
|
|
|
gray_color.G = sine_array[d & 0xff];
|
2007-04-04 02:45:03 +00:00
|
|
|
#endif
|
|
|
|
}
|
2008-11-19 00:24:44 +00:00
|
|
|
rgb_color.R = yuv_color.Y;
|
|
|
|
rgb_color.G = yuv_color.Y;
|
|
|
|
rgb_color.B = yuv_color.Y;
|
2007-04-04 02:45:03 +00:00
|
|
|
p->paint_hline (p, i, j, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-10-07 02:35:50 +00:00
|
|
|
void
|
|
|
|
gst_video_test_src_gamut (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
paintinfo pi = { NULL, };
|
|
|
|
paintinfo *p = π
|
|
|
|
struct fourcc_list_struct *fourcc;
|
|
|
|
struct vts_color_struct_yuv yuv_primary;
|
|
|
|
struct vts_color_struct_yuv yuv_secondary;
|
|
|
|
struct vts_color_struct_rgb rgb_primary = { 0 };
|
|
|
|
struct vts_color_struct_rgb rgb_secondary = { 0 };
|
|
|
|
struct vts_color_struct_gray gray_primary = { 0 };
|
|
|
|
struct vts_color_struct_gray gray_secondary = { 0 };
|
|
|
|
|
|
|
|
p->rgb_colors = vts_colors_rgb;
|
|
|
|
if (v->color_spec == GST_VIDEO_TEST_SRC_BT601) {
|
|
|
|
p->yuv_colors = vts_colors_bt601_ycbcr_100;
|
|
|
|
} else {
|
|
|
|
p->yuv_colors = vts_colors_bt709_ycbcr_100;
|
|
|
|
}
|
|
|
|
p->gray_colors = vts_colors_gray_100;
|
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
|
|
|
for (y = 0; y < h; y++) {
|
|
|
|
int region = (y * 4) / h;
|
|
|
|
|
|
|
|
switch (region) {
|
|
|
|
case 0: /* black */
|
|
|
|
yuv_primary = p->yuv_colors[COLOR_BLACK];
|
|
|
|
yuv_secondary = p->yuv_colors[COLOR_BLACK];
|
|
|
|
yuv_secondary.Y = 0;
|
|
|
|
rgb_primary = p->rgb_colors[COLOR_BLACK];
|
|
|
|
rgb_secondary = p->rgb_colors[COLOR_BLACK];
|
|
|
|
gray_primary = p->gray_colors[COLOR_BLACK];
|
|
|
|
gray_secondary = p->gray_colors[COLOR_BLACK];
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
yuv_primary = p->yuv_colors[COLOR_WHITE];
|
|
|
|
yuv_secondary = p->yuv_colors[COLOR_WHITE];
|
|
|
|
yuv_secondary.Y = 255;
|
|
|
|
rgb_primary = p->rgb_colors[COLOR_WHITE];
|
|
|
|
rgb_secondary = p->rgb_colors[COLOR_WHITE];
|
|
|
|
gray_primary = p->gray_colors[COLOR_WHITE];
|
|
|
|
gray_secondary = p->gray_colors[COLOR_WHITE];
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
yuv_primary = p->yuv_colors[COLOR_RED];
|
|
|
|
yuv_secondary = p->yuv_colors[COLOR_RED];
|
|
|
|
yuv_secondary.V = 255;
|
|
|
|
rgb_primary = p->rgb_colors[COLOR_RED];
|
|
|
|
rgb_secondary = p->rgb_colors[COLOR_RED];
|
|
|
|
gray_primary = p->gray_colors[COLOR_RED];
|
|
|
|
gray_secondary = p->gray_colors[COLOR_RED];
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
yuv_primary = p->yuv_colors[COLOR_BLUE];
|
|
|
|
yuv_secondary = p->yuv_colors[COLOR_BLUE];
|
|
|
|
yuv_secondary.U = 255;
|
|
|
|
rgb_primary = p->rgb_colors[COLOR_BLUE];
|
|
|
|
rgb_secondary = p->rgb_colors[COLOR_BLUE];
|
|
|
|
gray_primary = p->gray_colors[COLOR_BLUE];
|
|
|
|
gray_secondary = p->gray_colors[COLOR_BLUE];
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (x = 0; x < w; x += 8) {
|
|
|
|
int len = MIN (8, w - x);
|
|
|
|
|
|
|
|
if ((x ^ y) & (1 << 4)) {
|
|
|
|
p->rgb_color = &rgb_primary;
|
|
|
|
p->yuv_color = &yuv_primary;
|
|
|
|
p->gray_color = &gray_primary;
|
|
|
|
} else {
|
|
|
|
p->rgb_color = &rgb_secondary;
|
|
|
|
p->yuv_color = &yuv_secondary;
|
|
|
|
p->gray_color = &gray_secondary;
|
|
|
|
}
|
|
|
|
p->paint_hline (p, x, y, len);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_I420 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
|
|
|
p->up = p->yp + p->ystride * GST_ROUND_UP_2 (p->height);
|
|
|
|
p->ustride = GST_ROUND_UP_8 (p->width) / 2;
|
|
|
|
p->vp = p->up + p->ustride * GST_ROUND_UP_2 (p->height) / 2;
|
|
|
|
p->vstride = GST_ROUND_UP_8 (p->ystride) / 2;
|
|
|
|
p->endptr = p->vp + p->vstride * GST_ROUND_UP_2 (p->height) / 2;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
2008-05-02 10:54:51 +00:00
|
|
|
static void
|
|
|
|
paint_setup_NV12 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
|
|
|
p->up = p->yp + p->ystride * GST_ROUND_UP_2 (p->height);
|
|
|
|
p->vp = p->up + 1;
|
|
|
|
p->ustride = p->ystride;
|
|
|
|
p->vstride = p->ystride;
|
2009-06-20 21:36:21 +00:00
|
|
|
p->endptr = p->up + (p->ystride * GST_ROUND_UP_2 (p->height)) / 2;
|
2008-05-02 10:54:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_setup_NV21 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
|
|
|
p->vp = p->yp + p->ystride * GST_ROUND_UP_2 (p->height);
|
|
|
|
p->up = p->vp + 1;
|
|
|
|
p->ustride = p->ystride;
|
|
|
|
p->vstride = p->ystride;
|
2009-06-20 21:36:21 +00:00
|
|
|
p->endptr = p->vp + (p->ystride * GST_ROUND_UP_2 (p->height)) / 2;
|
2008-05-02 10:54:51 +00:00
|
|
|
}
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
|
|
|
paint_hline_I420 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int x1 = x / 2;
|
2009-09-10 08:08:28 +00:00
|
|
|
int w1 = (x + w) / 2 - x1;
|
2004-01-09 01:53:31 +00:00
|
|
|
int offset = y * p->ystride;
|
|
|
|
int offset1 = (y / 2) * p->ustride;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2009-09-11 20:09:06 +00:00
|
|
|
if (x + w == p->width && p->width % 2 != 0)
|
2009-09-10 08:08:28 +00:00
|
|
|
w1++;
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->yuv_color->Y, w);
|
2009-09-10 08:08:28 +00:00
|
|
|
oil_splat_u8_ns (p->up + offset1 + x1, &p->yuv_color->U, w1);
|
|
|
|
oil_splat_u8_ns (p->vp + offset1 + x1, &p->yuv_color->V, w1);
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
2008-05-02 10:54:51 +00:00
|
|
|
static void
|
|
|
|
paint_hline_NV12_NV21 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
2009-06-20 21:36:21 +00:00
|
|
|
int x1 = x / 2;
|
|
|
|
int x2 = (x + w) / 2;
|
2008-05-02 10:54:51 +00:00
|
|
|
int offset = y * p->ystride;
|
2009-06-20 21:36:21 +00:00
|
|
|
int offsetuv = (y / 2) * p->ustride + (x & ~0x01);
|
|
|
|
int uvlength = x2 - x1 + 1;
|
2008-05-02 10:54:51 +00:00
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->yuv_color->Y, w);
|
2008-05-22 18:30:15 +00:00
|
|
|
if (uvlength) {
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8 (p->up + offsetuv, 2, &p->yuv_color->U, uvlength);
|
|
|
|
oil_splat_u8 (p->vp + offsetuv, 2, &p->yuv_color->V, uvlength);
|
2008-05-22 18:30:15 +00:00
|
|
|
}
|
2008-05-02 10:54:51 +00:00
|
|
|
}
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_YV12 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
|
|
|
p->vp = p->yp + p->ystride * GST_ROUND_UP_2 (p->height);
|
|
|
|
p->vstride = GST_ROUND_UP_8 (p->ystride) / 2;
|
|
|
|
p->up = p->vp + p->vstride * GST_ROUND_UP_2 (p->height) / 2;
|
|
|
|
p->ustride = GST_ROUND_UP_8 (p->ystride) / 2;
|
|
|
|
p->endptr = p->up + p->ustride * GST_ROUND_UP_2 (p->height) / 2;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
2009-02-12 17:17:53 +00:00
|
|
|
static void
|
2009-02-13 09:10:25 +00:00
|
|
|
paint_setup_v308 (paintinfo * p, unsigned char *dest)
|
2009-02-12 17:17:53 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->up = dest + 1;
|
|
|
|
p->vp = dest + 2;
|
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width * 3);
|
|
|
|
p->endptr = dest + p->ystride * p->height;
|
|
|
|
}
|
|
|
|
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
static void
|
|
|
|
paint_setup_AYUV (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
p->ap = dest;
|
|
|
|
p->yp = dest + 1;
|
|
|
|
p->up = dest + 2;
|
|
|
|
p->vp = dest + 3;
|
|
|
|
p->ystride = p->width * 4;
|
|
|
|
p->endptr = dest + p->ystride * p->height;
|
|
|
|
}
|
|
|
|
|
2009-02-10 23:29:10 +00:00
|
|
|
static void
|
|
|
|
paint_setup_v410 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
p->yp = dest + 0;
|
|
|
|
p->up = dest + 0;
|
|
|
|
p->vp = dest + 0;
|
|
|
|
p->ystride = p->width * 4;
|
|
|
|
p->endptr = dest + p->ystride * p->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_setup_v216 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
p->ap = dest;
|
|
|
|
p->yp = dest + 2;
|
|
|
|
p->up = dest + 0;
|
|
|
|
p->vp = dest + 4;
|
|
|
|
p->ystride = p->width * 4;
|
|
|
|
p->endptr = dest + p->ystride * p->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_setup_v210 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
p->ap = dest;
|
|
|
|
p->yp = dest + 0;
|
|
|
|
p->up = dest + 0;
|
|
|
|
p->vp = dest + 0;
|
|
|
|
p->ystride = ((p->width + 47) / 48) * 128; /* no, really. */
|
|
|
|
p->endptr = dest + p->ystride * p->height;
|
|
|
|
}
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_YUY2 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->up = dest + 1;
|
|
|
|
p->vp = dest + 3;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_2 (p->width) * 2;
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_UYVY (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest + 1;
|
|
|
|
p->up = dest;
|
|
|
|
p->vp = dest + 2;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_2 (p->width) * 2;
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_YVYU (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->up = dest + 3;
|
|
|
|
p->vp = dest + 1;
|
2006-09-01 10:07:05 +00:00
|
|
|
p->ystride = GST_ROUND_UP_2 (p->width) * 2;
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
2009-02-12 17:17:53 +00:00
|
|
|
static void
|
2009-02-13 09:10:25 +00:00
|
|
|
paint_hline_v308 (paintinfo * p, int x, int y, int w)
|
2009-02-12 17:17:53 +00:00
|
|
|
{
|
|
|
|
int offset;
|
|
|
|
|
|
|
|
offset = (y * p->ystride) + (x * 3);
|
|
|
|
oil_splat_u8 (p->yp + offset, 3, &p->yuv_color->Y, w);
|
|
|
|
oil_splat_u8 (p->up + offset, 3, &p->yuv_color->U, w);
|
|
|
|
oil_splat_u8 (p->vp + offset, 3, &p->yuv_color->V, w);
|
|
|
|
}
|
|
|
|
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
static void
|
|
|
|
paint_hline_AYUV (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int offset;
|
2008-11-19 00:24:44 +00:00
|
|
|
guint8 alpha = 255;
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
|
|
|
|
offset = (y * p->ystride) + (x * 4);
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8 (p->yp + offset, 4, &p->yuv_color->Y, w);
|
|
|
|
oil_splat_u8 (p->up + offset, 4, &p->yuv_color->U, w);
|
|
|
|
oil_splat_u8 (p->vp + offset, 4, &p->yuv_color->V, w);
|
|
|
|
oil_splat_u8 (p->ap + offset, 4, &alpha, w);
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
}
|
|
|
|
|
2009-02-10 23:29:10 +00:00
|
|
|
#define TO_16(x) (((x)<<8) | (x))
|
|
|
|
#define TO_10(x) (((x)<<2) | ((x)>>6))
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_v216 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int x1 = x / 2;
|
|
|
|
int x2 = (x + w) / 2;
|
|
|
|
uint16_t Y, U, V;
|
|
|
|
int i;
|
|
|
|
int offset;
|
|
|
|
|
|
|
|
offset = y * p->ystride;
|
|
|
|
Y = TO_16 (p->yuv_color->Y);
|
|
|
|
U = TO_16 (p->yuv_color->U);
|
|
|
|
V = TO_16 (p->yuv_color->V);
|
|
|
|
for (i = x; i < x + w; i++) {
|
|
|
|
GST_WRITE_UINT16_LE (p->yp + offset + i * 4, Y);
|
|
|
|
}
|
|
|
|
for (i = x1; i < x2; i++) {
|
|
|
|
GST_WRITE_UINT16_LE (p->up + offset + i * 8, U);
|
|
|
|
GST_WRITE_UINT16_LE (p->vp + offset + i * 8, V);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_v410 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
uint32_t a;
|
|
|
|
uint8_t *data;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
a = (TO_10 (p->yuv_color->U) << 22) |
|
|
|
|
(TO_10 (p->yuv_color->Y) << 12) | (TO_10 (p->yuv_color->V) << 2);
|
|
|
|
|
|
|
|
data = p->yp + y * p->ystride + x * 4;
|
|
|
|
for (i = 0; i < w; i++) {
|
|
|
|
GST_WRITE_UINT32_LE (data, a);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_v210 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
uint32_t a0, a1, a2, a3;
|
|
|
|
uint8_t *data;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
/* FIXME this is kinda gross. it only handles x values in
|
|
|
|
multiples of 6 */
|
|
|
|
|
|
|
|
a0 = TO_10 (p->yuv_color->U) | (TO_10 (p->yuv_color->Y) << 10)
|
|
|
|
| (TO_10 (p->yuv_color->V) << 20);
|
|
|
|
a1 = TO_10 (p->yuv_color->Y) | (TO_10 (p->yuv_color->U) << 10)
|
|
|
|
| (TO_10 (p->yuv_color->Y) << 20);
|
|
|
|
a2 = TO_10 (p->yuv_color->V) | (TO_10 (p->yuv_color->Y) << 10)
|
|
|
|
| (TO_10 (p->yuv_color->U) << 20);
|
|
|
|
a3 = TO_10 (p->yuv_color->Y) | (TO_10 (p->yuv_color->V) << 10)
|
|
|
|
| (TO_10 (p->yuv_color->Y) << 20);
|
|
|
|
|
|
|
|
data = p->yp + y * p->ystride;
|
|
|
|
for (i = x / 6; i < (x + w) / 6; i++) {
|
|
|
|
GST_WRITE_UINT32_LE (data + i * 16 + 0, a0);
|
|
|
|
GST_WRITE_UINT32_LE (data + i * 16 + 4, a1);
|
|
|
|
GST_WRITE_UINT32_LE (data + i * 16 + 8, a2);
|
|
|
|
GST_WRITE_UINT32_LE (data + i * 16 + 12, a3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
|
|
|
paint_hline_YUY2 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int x1 = x / 2;
|
2009-09-10 08:08:28 +00:00
|
|
|
int w1 = (x + w) / 2 - x1;
|
|
|
|
int offset = y * p->ystride;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2009-09-11 20:09:06 +00:00
|
|
|
if (x + w == p->width && p->width % 2 != 0)
|
2009-09-10 08:08:28 +00:00
|
|
|
w1++;
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 2, 2, &p->yuv_color->Y, w);
|
2009-09-10 08:08:28 +00:00
|
|
|
oil_splat_u8 (p->up + offset + x1 * 4, 4, &p->yuv_color->U, w1);
|
|
|
|
oil_splat_u8 (p->vp + offset + x1 * 4, 4, &p->yuv_color->V, w1);
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
2003-07-14 08:36:03 +00:00
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_IYU2 (paintinfo * p, unsigned char *dest)
|
2003-07-14 08:36:03 +00:00
|
|
|
{
|
2004-01-09 01:53:31 +00:00
|
|
|
/* untested */
|
2003-07-14 08:36:03 +00:00
|
|
|
p->yp = dest + 1;
|
|
|
|
p->up = dest + 0;
|
|
|
|
p->vp = dest + 2;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width * 3);
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = dest + p->ystride * p->height;
|
2003-07-14 08:36:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_IYU2 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int offset;
|
|
|
|
|
2004-01-09 01:53:31 +00:00
|
|
|
offset = y * p->ystride;
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 3, 3, &p->yuv_color->Y, w);
|
|
|
|
oil_splat_u8 (p->up + offset + x * 3, 3, &p->yuv_color->U, w);
|
|
|
|
oil_splat_u8 (p->vp + offset + x * 3, 3, &p->yuv_color->V, w);
|
2003-07-14 08:36:03 +00:00
|
|
|
}
|
|
|
|
|
2004-11-05 15:07:57 +00:00
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_Y41B (paintinfo * p, unsigned char *dest)
|
2004-11-05 15:07:57 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
2004-11-05 15:07:57 +00:00
|
|
|
p->up = p->yp + p->ystride * p->height;
|
2009-09-21 16:49:06 +00:00
|
|
|
p->ustride = GST_ROUND_UP_16 (p->width) / 4;
|
2004-11-05 15:07:57 +00:00
|
|
|
p->vp = p->up + p->ustride * p->height;
|
2009-09-21 16:49:06 +00:00
|
|
|
p->vstride = GST_ROUND_UP_16 (p->width) / 4;
|
2004-11-05 15:07:57 +00:00
|
|
|
p->endptr = p->vp + p->vstride * p->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_Y41B (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int x1 = x / 4;
|
2009-09-21 16:49:06 +00:00
|
|
|
int w1 = (x + w) / 4 - x1;
|
2004-11-05 15:07:57 +00:00
|
|
|
int offset = y * p->ystride;
|
|
|
|
int offset1 = y * p->ustride;
|
|
|
|
|
2009-09-21 16:49:06 +00:00
|
|
|
if (x + w == p->width && p->width % 4 != 0)
|
|
|
|
w1++;
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->yuv_color->Y, w);
|
2009-09-21 16:49:06 +00:00
|
|
|
oil_splat_u8_ns (p->up + offset1 + x1, &p->yuv_color->U, w1);
|
|
|
|
oil_splat_u8_ns (p->vp + offset1 + x1, &p->yuv_color->V, w1);
|
2004-11-05 15:07:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_Y42B (paintinfo * p, unsigned char *dest)
|
2004-11-05 15:07:57 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
2004-11-05 15:07:57 +00:00
|
|
|
p->up = p->yp + p->ystride * p->height;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ustride = GST_ROUND_UP_8 (p->width) / 2;
|
2004-11-05 15:07:57 +00:00
|
|
|
p->vp = p->up + p->ustride * p->height;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->vstride = GST_ROUND_UP_8 (p->width) / 2;
|
2004-11-05 15:07:57 +00:00
|
|
|
p->endptr = p->vp + p->vstride * p->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_Y42B (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int x1 = x / 2;
|
2009-09-10 08:08:28 +00:00
|
|
|
int w1 = (x + w) / 2 - x1;
|
2004-11-05 15:07:57 +00:00
|
|
|
int offset = y * p->ystride;
|
|
|
|
int offset1 = y * p->ustride;
|
|
|
|
|
2009-09-11 20:09:06 +00:00
|
|
|
if (x + w == p->width && p->width % 2 != 0)
|
2009-09-10 08:08:28 +00:00
|
|
|
w1++;
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->yuv_color->Y, w);
|
2009-09-10 08:08:28 +00:00
|
|
|
oil_splat_u8_ns (p->up + offset1 + x1, &p->yuv_color->U, w1);
|
|
|
|
oil_splat_u8_ns (p->vp + offset1 + x1, &p->yuv_color->V, w1);
|
2004-11-05 15:07:57 +00:00
|
|
|
}
|
|
|
|
|
2009-02-10 16:39:45 +00:00
|
|
|
static void
|
|
|
|
paint_setup_Y444 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
|
|
|
p->up = p->yp + p->ystride * p->height;
|
|
|
|
p->vp = p->up + p->ystride * p->height;
|
|
|
|
p->endptr = p->vp + p->ystride * p->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_Y444 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int offset = y * p->ystride;
|
|
|
|
|
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->yuv_color->Y, w);
|
|
|
|
oil_splat_u8_ns (p->up + offset + x, &p->yuv_color->U, w);
|
|
|
|
oil_splat_u8_ns (p->vp + offset + x, &p->yuv_color->V, w);
|
|
|
|
}
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_Y800 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
2004-01-09 01:53:31 +00:00
|
|
|
/* untested */
|
2003-04-16 07:52:54 +00:00
|
|
|
p->yp = dest;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_Y800 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
2004-01-09 01:53:31 +00:00
|
|
|
int offset = y * p->ystride;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->yuv_color->Y, w);
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
2004-01-09 01:53:31 +00:00
|
|
|
#if 0
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_IMC1 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->up = dest + p->width * p->height;
|
|
|
|
p->vp = dest + p->width * p->height + p->width * p->height / 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_IMC2 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->vp = dest + p->width * p->height;
|
|
|
|
p->up = dest + p->width * p->height + p->width / 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_IMC3 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->up = dest + p->width * p->height + p->width * p->height / 2;
|
|
|
|
p->vp = dest + p->width * p->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_IMC4 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->vp = dest + p->width * p->height + p->width / 2;
|
|
|
|
p->up = dest + p->width * p->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_IMC1 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int x1 = x / 2;
|
|
|
|
int x2 = (x + w) / 2;
|
|
|
|
int offset = y * p->width;
|
|
|
|
int offset1 = (y / 2) * p->width;
|
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->yuv_color->Y, w);
|
|
|
|
oil_splat_u8_ns (p->up + offset1 + x1, &p->yuv_color->U, x2 - x1);
|
|
|
|
oil_splat_u8_ns (p->vp + offset1 + x1, &p->yuv_color->V, x2 - x1);
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
2004-01-09 01:53:31 +00:00
|
|
|
#endif
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2003-07-14 08:36:03 +00:00
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_YVU9 (paintinfo * p, unsigned char *dest)
|
2003-07-14 08:36:03 +00:00
|
|
|
{
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
int h = GST_ROUND_UP_4 (p->height);
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2003-07-14 08:36:03 +00:00
|
|
|
p->yp = dest;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
2009-09-10 08:43:37 +00:00
|
|
|
p->vp = p->yp + p->ystride * h;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->vstride = GST_ROUND_UP_4 (p->ystride / 4);
|
2009-09-10 08:43:37 +00:00
|
|
|
p->up = p->vp + p->vstride * h / 4;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ustride = GST_ROUND_UP_4 (p->ystride / 4);
|
2009-09-10 08:43:37 +00:00
|
|
|
p->endptr = p->up + p->ustride * h / 4;
|
2003-07-14 08:36:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_YUV9 (paintinfo * p, unsigned char *dest)
|
2003-07-14 08:36:03 +00:00
|
|
|
{
|
2004-01-09 01:53:31 +00:00
|
|
|
/* untested */
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
int h = GST_ROUND_UP_4 (p->height);
|
2004-03-14 22:34:34 +00:00
|
|
|
|
2003-07-14 08:36:03 +00:00
|
|
|
p->yp = dest;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
2004-01-09 01:53:31 +00:00
|
|
|
p->up = p->yp + p->ystride * h;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ustride = GST_ROUND_UP_4 (p->ystride / 4);
|
2009-09-10 08:43:37 +00:00
|
|
|
p->vp = p->up + p->ustride * h / 4;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->vstride = GST_ROUND_UP_4 (p->ystride / 4);
|
2009-09-10 08:43:37 +00:00
|
|
|
p->endptr = p->vp + p->vstride * h / 4;
|
2003-07-14 08:36:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_YUV9 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int x1 = x / 4;
|
2009-09-10 08:43:37 +00:00
|
|
|
int w1 = (x + w) / 4 - x1;
|
2004-01-09 01:53:31 +00:00
|
|
|
int offset = y * p->ystride;
|
|
|
|
int offset1 = (y / 4) * p->ustride;
|
2003-07-14 08:36:03 +00:00
|
|
|
|
2009-09-11 20:09:06 +00:00
|
|
|
if (x + w == p->width && p->width % 4 != 0)
|
2009-09-10 08:43:37 +00:00
|
|
|
w1++;
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->yuv_color->Y, w);
|
2009-09-10 08:43:37 +00:00
|
|
|
oil_splat_u8_ns (p->up + offset1 + x1, &p->yuv_color->U, w1);
|
|
|
|
oil_splat_u8_ns (p->vp + offset1 + x1, &p->yuv_color->V, w1);
|
2003-07-14 08:36:03 +00:00
|
|
|
}
|
|
|
|
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
static void
|
|
|
|
paint_setup_ARGB8888 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
paint_setup_xRGB8888 (p, dest);
|
|
|
|
p->ap = dest;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_setup_ABGR8888 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
paint_setup_xBGR8888 (p, dest);
|
|
|
|
p->ap = dest;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_setup_RGBA8888 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
paint_setup_RGBx8888 (p, dest);
|
|
|
|
p->ap = dest + 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_setup_BGRA8888 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
paint_setup_BGRx8888 (p, dest);
|
|
|
|
p->ap = dest + 3;
|
|
|
|
}
|
|
|
|
|
2003-04-16 07:52:54 +00:00
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_xRGB8888 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest + 1;
|
|
|
|
p->up = dest + 2;
|
|
|
|
p->vp = dest + 3;
|
2004-03-14 22:34:34 +00:00
|
|
|
p->ystride = p->width * 4;
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = p->dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_xBGR8888 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest + 3;
|
|
|
|
p->up = dest + 2;
|
|
|
|
p->vp = dest + 1;
|
2004-03-14 22:34:34 +00:00
|
|
|
p->ystride = p->width * 4;
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = p->dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_RGBx8888 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest + 0;
|
|
|
|
p->up = dest + 1;
|
|
|
|
p->vp = dest + 2;
|
2004-03-14 22:34:34 +00:00
|
|
|
p->ystride = p->width * 4;
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = p->dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_BGRx8888 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest + 2;
|
|
|
|
p->up = dest + 1;
|
|
|
|
p->vp = dest + 0;
|
2004-03-14 22:34:34 +00:00
|
|
|
p->ystride = p->width * 4;
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = p->dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_RGB888 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest + 0;
|
|
|
|
p->up = dest + 1;
|
|
|
|
p->vp = dest + 2;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width * 3);
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = p->dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_BGR888 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest + 2;
|
|
|
|
p->up = dest + 1;
|
|
|
|
p->vp = dest + 0;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width * 3);
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = p->dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_str4 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
2004-01-09 01:53:31 +00:00
|
|
|
int offset = y * p->ystride;
|
2008-11-19 00:24:44 +00:00
|
|
|
guint8 alpha = 255;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 4, 4, &p->rgb_color->R, w);
|
|
|
|
oil_splat_u8 (p->up + offset + x * 4, 4, &p->rgb_color->G, w);
|
|
|
|
oil_splat_u8 (p->vp + offset + x * 4, 4, &p->rgb_color->B, w);
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
|
|
|
|
if (p->ap != NULL) {
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8 (p->ap + offset + (x * 4), 4, &alpha, w);
|
gst/videotestsrc/videotestsrc.*: Add support for AYUV and the various RGBA formats. Initialise fields of paintinfo st...
Original commit message from CVS:
* gst/videotestsrc/videotestsrc.c: (paintinfo_find_by_structure),
(paint_get_structure), (gst_video_test_src_get_size),
(gst_video_test_src_smpte), (gst_video_test_src_snow),
(gst_video_test_src_unicolor), (paint_setup_AYUV),
(paint_hline_AYUV), (paint_setup_ARGB8888), (paint_setup_ABGR8888),
(paint_setup_RGBA8888), (paint_setup_BGRA8888), (paint_hline_str4):
* gst/videotestsrc/videotestsrc.h:
Add support for AYUV and the various RGBA formats. Initialise
fields of paintinfo structs allocated on the stack.
* tests/check/elements/videotestsrc.c: (right_shift_colour),
(fix_expected_colour), (check_rgb_buf), (got_buf_cb),
(GST_START_TEST), (videotestsrc_suite):
Add unit tests for videotestsrc's RGB output.
2006-09-02 12:59:48 +00:00
|
|
|
}
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_str3 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
2004-01-09 01:53:31 +00:00
|
|
|
int offset = y * p->ystride;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 3, 3, &p->rgb_color->R, w);
|
|
|
|
oil_splat_u8 (p->up + offset + x * 3, 3, &p->rgb_color->G, w);
|
|
|
|
oil_splat_u8 (p->vp + offset + x * 3, 3, &p->rgb_color->B, w);
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_RGB565 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width * 2);
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = p->dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_RGB565 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
2004-01-09 01:53:31 +00:00
|
|
|
int offset = y * p->ystride;
|
2005-05-09 01:20:55 +00:00
|
|
|
uint8_t a, b;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
a = (p->rgb_color->R & 0xf8) | (p->rgb_color->G >> 5);
|
|
|
|
b = ((p->rgb_color->G << 3) & 0xe0) | (p->rgb_color->B >> 3);
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2003-05-13 07:14:36 +00:00
|
|
|
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 2 + 0, 2, &b, w);
|
|
|
|
oil_splat_u8 (p->yp + offset + x * 2 + 1, 2, &a, w);
|
2003-05-13 07:14:36 +00:00
|
|
|
#else
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 2 + 0, 2, &a, w);
|
|
|
|
oil_splat_u8 (p->yp + offset + x * 2 + 1, 2, &b, w);
|
2003-05-13 07:14:36 +00:00
|
|
|
#endif
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
ext/: ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek) (gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain) ext...
Original commit message from CVS:
2005-05-09 Andy Wingo <wingo@pobox.com>
* ext/alsa/gstalsasink.h:
* ext/gnomevfs/gstgnomevfssrc.c:
(gst_gnomevfssrc_get_icy_metadata):
* ext/ogg/gstoggdemux.c (gst_ogg_demux_perform_seek)
(gst_ogg_demux_read_chain, gst_ogg_demux_read_end_chain)
* ext/theora/theoradec.c (theora_dec_src_query)
(theora_dec_src_event, theora_dec_sink_event)
(theora_handle_comment_packet, theora_handle_data_packet):
* ext/theora/theoraenc.c (theora_enc_chain):
* ext/vorbis/vorbisdec.c (vorbis_dec_src_event)
(vorbis_dec_sink_event, vorbis_handle_comment_packet):
* gst/audioconvert/gstaudioconvert.c (gst_audio_convert_getcaps):
* gst/typefind/gsttypefindfunctions.c (mp3_type_find)
(qt_type_find):
* gst/videotestsrc/videotestsrc.c (paint_setup_I420)
(paint_setup_YV12, paint_setup_YUY2, paint_setup_UYVY)
(paint_setup_YVYU, paint_setup_IYU2, paint_setup_Y41B)
(paint_setup_Y42B, paint_setup_Y800, paint_setup_IMC1)
(paint_setup_IMC2, paint_setup_IMC3, paint_setup_IMC4)
(paint_setup_YVU9, paint_setup_YUV9, paint_setup_xRGB8888)
(paint_setup_xBGR8888, paint_setup_RGBx8888)
(paint_setup_BGRx8888, paint_setup_RGB888, paint_setup_BGR888)
(paint_setup_RGB565, paint_setup_xRGB1555):
* gst/videotestsrc/videotestsrc.h:
* sys/ximage/ximagesink.c (gst_ximagesink_buffer_alloc):
* sys/xvimage/xvimagesink.c (gst_xvimagesink_get_xv_support)
(gst_xvimagesink_setcaps, gst_xvimagesink_buffer_alloc):
GCC4 fixes.
* ext/ogg/gstoggdemux.c (gst_ogg_demux_find_chains): Use the new
gst_pad_query_position. Fixes oggdemux.
2005-05-09 07:03:13 +00:00
|
|
|
paint_setup_xRGB1555 (paintinfo * p, unsigned char *dest)
|
2003-04-16 07:52:54 +00:00
|
|
|
{
|
|
|
|
p->yp = dest;
|
Const-ify GEnumValue and GFlagsValue arrays. Use
Original commit message from CVS:
* ext/pango/gsttextoverlay.c: (gst_text_overlay_valign_get_type),
(gst_text_overlay_halign_get_type),
(gst_text_overlay_wrap_mode_get_type):
* ext/theora/theoradec.c: (theora_handle_type_packet),
(theora_handle_data_packet):
* ext/theora/theoraenc.c: (gst_border_mode_get_type),
(theora_enc_sink_setcaps), (theora_enc_chain):
* gst-libs/gst/cdda/gstcddabasesrc.c:
(gst_cdda_base_src_mode_get_type):
* gst/audiotestsrc/gstaudiotestsrc.c:
(gst_audiostestsrc_wave_get_type):
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type):
* gst/tcp/gstfdset.c: (gst_fdset_mode_get_type):
* gst/tcp/gstmultifdsink.c: (gst_recover_policy_get_type),
(gst_sync_method_get_type), (gst_unit_type_get_type),
(gst_client_status_get_type):
* gst/videoscale/gstvideoscale.c:
(gst_video_scale_method_get_type):
* gst/videotestsrc/gstvideotestsrc.c:
(gst_video_test_src_pattern_get_type):
* gst/videotestsrc/videotestsrc.c: (paint_setup_I420),
(paint_setup_YV12), (paint_setup_YUY2), (paint_setup_UYVY),
(paint_setup_YVYU), (paint_setup_IYU2), (paint_setup_Y41B),
(paint_setup_Y42B), (paint_setup_Y800), (paint_setup_YVU9),
(paint_setup_YUV9), (paint_setup_RGB888), (paint_setup_BGR888),
(paint_setup_RGB565), (paint_setup_xRGB1555):
Const-ify GEnumValue and GFlagsValue arrays. Use
GST_ROUND_UP_* macros instead of home-made ones.
2006-05-09 19:24:46 +00:00
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width * 2);
|
2004-01-09 01:53:31 +00:00
|
|
|
p->endptr = p->dest + p->ystride * p->height;
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_xRGB1555 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
2004-01-09 01:53:31 +00:00
|
|
|
int offset = y * p->ystride;
|
2005-05-09 01:20:55 +00:00
|
|
|
uint8_t a, b;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2008-11-19 00:24:44 +00:00
|
|
|
a = ((p->rgb_color->R >> 1) & 0x7c) | (p->rgb_color->G >> 6);
|
|
|
|
b = ((p->rgb_color->G << 2) & 0xe0) | (p->rgb_color->B >> 3);
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2003-05-13 07:14:36 +00:00
|
|
|
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 2 + 0, 2, &b, w);
|
|
|
|
oil_splat_u8 (p->yp + offset + x * 2 + 1, 2, &a, w);
|
2003-05-13 07:14:36 +00:00
|
|
|
#else
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 2 + 0, 2, &a, w);
|
|
|
|
oil_splat_u8 (p->yp + offset + x * 2 + 1, 2, &b, w);
|
2003-05-13 07:14:36 +00:00
|
|
|
#endif
|
2003-04-16 07:52:54 +00:00
|
|
|
}
|
2007-05-15 03:53:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_setup_bayer (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
|
|
|
p->endptr = p->dest + p->ystride * p->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2008-03-14 18:42:35 +00:00
|
|
|
paint_hline_bayer (paintinfo * p, int x, int y, int w)
|
2007-05-15 03:53:11 +00:00
|
|
|
{
|
|
|
|
int offset = y * p->ystride;
|
|
|
|
uint8_t *dest = p->yp + offset;
|
|
|
|
int i;
|
|
|
|
|
2008-03-14 18:42:35 +00:00
|
|
|
if (y & 1) {
|
2007-05-15 03:53:11 +00:00
|
|
|
for (i = x; i < x + w; i++) {
|
2008-03-14 18:42:35 +00:00
|
|
|
if (i & 1) {
|
2008-11-19 00:24:44 +00:00
|
|
|
dest[i] = p->rgb_color->G;
|
2007-05-15 03:53:11 +00:00
|
|
|
} else {
|
2008-11-19 00:24:44 +00:00
|
|
|
dest[i] = p->rgb_color->B;
|
2007-05-15 03:53:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
for (i = x; i < x + w; i++) {
|
2008-03-14 18:42:35 +00:00
|
|
|
if (i & 1) {
|
2008-11-19 00:24:44 +00:00
|
|
|
dest[i] = p->rgb_color->R;
|
2007-05-15 03:53:11 +00:00
|
|
|
} else {
|
2008-11-19 00:24:44 +00:00
|
|
|
dest[i] = p->rgb_color->G;
|
2007-05-15 03:53:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2009-05-26 12:38:43 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
paint_setup_GRAY8 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width);
|
|
|
|
p->endptr = dest + p->ystride * p->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_GRAY8 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int offset = y * p->ystride;
|
|
|
|
guint8 color = p->gray_color->G >> 8;
|
|
|
|
|
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &color, w);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_setup_GRAY16 (paintinfo * p, unsigned char *dest)
|
|
|
|
{
|
|
|
|
p->yp = dest;
|
|
|
|
p->ystride = GST_ROUND_UP_4 (p->width * 2);
|
|
|
|
p->endptr = dest + p->ystride * p->height;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_GRAY16 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
|
|
|
int offset = y * p->ystride;
|
|
|
|
|
|
|
|
oil_splat_u16_ns ((guint16 *) (p->yp + offset + 2 * x), &p->gray_color->G, w);
|
|
|
|
}
|