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>
|
|
|
|
|
|
|
|
static unsigned char
|
|
|
|
random_char (void)
|
|
|
|
{
|
|
|
|
static unsigned int state;
|
|
|
|
|
|
|
|
state *= 1103515245;
|
|
|
|
state += 12345;
|
|
|
|
return (state >> 16);
|
|
|
|
}
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
static struct vts_color_struct vts_colors[] = {
|
2004-03-14 22:34:34 +00:00
|
|
|
/* 100% white */
|
|
|
|
{255, 128, 128, 255, 255, 255},
|
|
|
|
/* yellow */
|
|
|
|
{226, 0, 155, 255, 255, 0},
|
|
|
|
/* cyan */
|
|
|
|
{179, 170, 0, 0, 255, 255},
|
|
|
|
/* green */
|
|
|
|
{150, 46, 21, 0, 255, 0},
|
|
|
|
/* magenta */
|
|
|
|
{105, 212, 235, 255, 0, 255},
|
|
|
|
/* red */
|
|
|
|
{76, 85, 255, 255, 0, 0},
|
|
|
|
/* blue */
|
|
|
|
{29, 255, 107, 0, 0, 255},
|
|
|
|
/* black */
|
|
|
|
{16, 128, 128, 0, 0, 0},
|
|
|
|
/* -I */
|
|
|
|
{16, 198, 21, 0, 0, 128},
|
|
|
|
/* +Q */
|
|
|
|
{16, 235, 198, 0, 128, 255},
|
|
|
|
/* superblack */
|
|
|
|
{0, 128, 128, 0, 0, 0},
|
|
|
|
/* 5% grey */
|
|
|
|
{32, 128, 128, 32, 32, 32},
|
2003-04-16 07:52:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
|
|
|
/* wht yel cya grn mag red blu blk -I Q, superblack, dark grey */
|
2004-03-14 22:34:34 +00:00
|
|
|
static int y_colors[] = { 255, 226, 179, 150, 105, 76, 29, 16, 16, 16, 0, 32 };
|
|
|
|
static int u_colors[] =
|
|
|
|
{ 128, 0, 170, 46, 212, 85, 255, 128, 198, 235, 128, 128 };
|
|
|
|
static int v_colors[] =
|
|
|
|
{ 128, 155, 0, 21, 235, 255, 107, 128, 21, 198, 128, 128 };
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
/* wht yel cya grn mag red blu blk -I Q superblack, dark grey */
|
2004-03-14 22:34:34 +00:00
|
|
|
static int r_colors[] = { 255, 255, 0, 0, 255, 255, 0, 0, 0, 0, 0, 32 };
|
|
|
|
static int g_colors[] = { 255, 255, 255, 255, 0, 0, 0, 0, 0, 128, 0, 32 };
|
|
|
|
static int b_colors[] = { 255, 0, 255, 0, 255, 0, 255, 0, 128, 255, 0, 32 };
|
2003-04-16 07:52:54 +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_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);
|
|
|
|
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);
|
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
|
|
|
|
|
|
|
static void paint_hline_I420 (paintinfo * p, int x, int y, int w);
|
|
|
|
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);
|
2003-04-16 07:52:54 +00:00
|
|
|
static void paint_hline_Y800 (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);
|
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);
|
|
|
|
|
|
|
|
struct fourcc_list_struct fourcc_list[] = {
|
|
|
|
/* packed */
|
|
|
|
{"YUY2", "YUY2", 16, paint_setup_YUY2, paint_hline_YUY2},
|
|
|
|
{"UYVY", "UYVY", 16, paint_setup_UYVY, paint_hline_YUY2},
|
|
|
|
{"Y422", "Y422", 16, paint_setup_UYVY, paint_hline_YUY2},
|
2004-03-15 19:32:28 +00:00
|
|
|
{"UYNV", "UYNV", 16, paint_setup_UYVY, paint_hline_YUY2}, /* FIXME: UYNV? */
|
2003-04-16 07:52:54 +00:00
|
|
|
{"YVYU", "YVYU", 16, paint_setup_YVYU, paint_hline_YUY2},
|
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
|
|
|
{"AYUV", "AYUV", 32, paint_setup_AYUV, paint_hline_AYUV},
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
/* interlaced */
|
|
|
|
/*{ "IUYV", "IUY2", 16, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
|
|
|
|
/* inverted */
|
|
|
|
/*{ "cyuv", "cyuv", 16, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
|
|
|
|
/*{ "Y41P", "Y41P", 12, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
|
|
|
|
/* interlaced */
|
|
|
|
/*{ "IY41", "IY41", 12, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
|
|
|
|
/*{ "Y211", "Y211", 8, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
|
|
|
|
/*{ "Y41T", "Y41T", 12, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
/*{ "Y42P", "Y42P", 16, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
/*{ "CLJR", "CLJR", 8, paint_setup_YVYU, paint_hline_YUY2 }, */
|
|
|
|
/*{ "IYU1", "IYU1", 12, paint_setup_YVYU, paint_hline_YUY2 }, */
|
2004-03-14 22:34:34 +00:00
|
|
|
{"IYU2", "IYU2", 24, paint_setup_IYU2, paint_hline_IYU2},
|
2003-04-16 07:52:54 +00:00
|
|
|
|
|
|
|
/* planar */
|
|
|
|
/* YVU9 */
|
2003-07-14 08:36:03 +00:00
|
|
|
{"YVU9", "YVU9", 9, paint_setup_YVU9, paint_hline_YUV9},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* YUV9 */
|
2003-07-14 08:36:03 +00:00
|
|
|
{"YUV9", "YUV9", 9, paint_setup_YUV9, paint_hline_YUV9},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* IF09 */
|
|
|
|
/* YV12 */
|
|
|
|
{"YV12", "YV12", 12, paint_setup_YV12, paint_hline_I420},
|
|
|
|
/* I420 */
|
|
|
|
{"I420", "I420", 12, paint_setup_I420, paint_hline_I420},
|
|
|
|
/* NV12 */
|
|
|
|
/* NV21 */
|
2004-01-09 01:53:31 +00:00
|
|
|
#if 0
|
2003-04-16 07:52:54 +00:00
|
|
|
/* IMC1 */
|
|
|
|
{"IMC1", "IMC1", 16, paint_setup_IMC1, paint_hline_IMC1},
|
|
|
|
/* IMC2 */
|
|
|
|
{"IMC2", "IMC2", 12, paint_setup_IMC2, paint_hline_IMC1},
|
|
|
|
/* IMC3 */
|
|
|
|
{"IMC3", "IMC3", 16, paint_setup_IMC3, paint_hline_IMC1},
|
|
|
|
/* IMC4 */
|
|
|
|
{"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 */
|
2004-11-05 15:07:57 +00:00
|
|
|
{"Y41B", "Y41B", 12, paint_setup_Y41B, paint_hline_Y41B},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* Y42B */
|
2004-11-05 15:07:57 +00:00
|
|
|
{"Y42B", "Y42B", 16, paint_setup_Y42B, paint_hline_Y42B},
|
2003-04-16 07:52:54 +00:00
|
|
|
/* Y800 grayscale */
|
|
|
|
{"Y800", "Y800", 8, paint_setup_Y800, paint_hline_Y800},
|
|
|
|
|
|
|
|
{"RGB ", "xRGB8888", 32, paint_setup_xRGB8888, paint_hline_str4, 1, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x00ff0000, 0x0000ff00, 0x000000ff},
|
2003-04-16 07:52:54 +00:00
|
|
|
{"RGB ", "xBGR8888", 32, paint_setup_xBGR8888, paint_hline_str4, 1, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x000000ff, 0x0000ff00, 0x00ff0000},
|
2003-04-16 07:52:54 +00:00
|
|
|
{"RGB ", "RGBx8888", 32, paint_setup_RGBx8888, paint_hline_str4, 1, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0xff000000, 0x00ff0000, 0x0000ff00},
|
2003-04-16 07:52:54 +00:00
|
|
|
{"RGB ", "BGRx8888", 32, paint_setup_BGRx8888, paint_hline_str4, 1, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x0000ff00, 0x00ff0000, 0xff000000},
|
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
|
|
|
{"RGB ", "ARGB8888", 32, paint_setup_ARGB8888, paint_hline_str4, 1, 32,
|
|
|
|
0x00ff0000, 0x0000ff00, 0x000000ff, 0xff000000},
|
|
|
|
{"RGB ", "ABGR8888", 32, paint_setup_ABGR8888, paint_hline_str4, 1, 32,
|
|
|
|
0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000},
|
|
|
|
{"RGB ", "RGBA8888", 32, paint_setup_RGBA8888, paint_hline_str4, 1, 32,
|
|
|
|
0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff},
|
|
|
|
{"RGB ", "BGRA8888", 32, paint_setup_BGRA8888, paint_hline_str4, 1, 32,
|
|
|
|
0x0000ff00, 0x00ff0000, 0xff000000, 0x000000ff},
|
2003-04-16 07:52:54 +00:00
|
|
|
{"RGB ", "RGB888", 24, paint_setup_RGB888, paint_hline_str3, 1, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x00ff0000, 0x0000ff00, 0x000000ff},
|
2003-04-16 07:52:54 +00:00
|
|
|
{"RGB ", "BGR888", 24, paint_setup_BGR888, paint_hline_str3, 1, 24,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x000000ff, 0x0000ff00, 0x00ff0000},
|
2003-04-16 07:52:54 +00:00
|
|
|
{"RGB ", "RGB565", 16, paint_setup_RGB565, paint_hline_RGB565, 1, 16,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x0000f800, 0x000007e0, 0x0000001f},
|
2003-04-16 07:52:54 +00:00
|
|
|
{"RGB ", "xRGB1555", 16, paint_setup_xRGB1555, paint_hline_xRGB1555, 1, 15,
|
2004-03-14 22:34:34 +00:00
|
|
|
0x00007c00, 0x000003e0, 0x0000001f},
|
2003-04-16 07:52:54 +00:00
|
|
|
};
|
|
|
|
int n_fourccs = sizeof (fourcc_list) / sizeof (fourcc_list[0]);
|
|
|
|
|
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);
|
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
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]);
|
2004-03-14 22:34:34 +00:00
|
|
|
if (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++) {
|
2004-03-14 22:34:34 +00:00
|
|
|
if (strcmp (fourcc_list[i].fourcc, "RGB ") == 0 &&
|
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;
|
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 */
|
2004-03-14 22:34:34 +00:00
|
|
|
if (!fourcc_list[i].ext_caps) {
|
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;
|
|
|
|
|
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
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
if (format->ext_caps) {
|
2003-07-27 05:31:01 +00:00
|
|
|
int endianness;
|
2003-05-13 07:14:36 +00:00
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
if (format->bitspp == 16) {
|
2003-07-27 05:31:01 +00:00
|
|
|
endianness = G_BYTE_ORDER;
|
2004-03-14 22:34:34 +00:00
|
|
|
} else {
|
2003-07-27 05:31:01 +00:00
|
|
|
endianness = G_BIG_ENDIAN;
|
2003-05-13 07:14:36 +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
|
|
|
structure = gst_structure_new ("video/x-raw-rgb",
|
2004-03-15 19:32:28 +00:00
|
|
|
"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);
|
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 (format->depth == 32 && format->alpha_mask > 0) {
|
|
|
|
gst_structure_set (structure, "alpha_mask", G_TYPE_INT,
|
|
|
|
format->alpha_mask, NULL);
|
|
|
|
}
|
2004-03-14 22:34:34 +00:00
|
|
|
} else {
|
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
|
|
|
structure = gst_structure_new ("video/x-raw-yuv",
|
2004-03-15 19:32:28 +00:00
|
|
|
"format", GST_TYPE_FOURCC, fourcc, NULL);
|
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;
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
p->color = vts_colors + i;
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
p->color = vts_colors + k;
|
|
|
|
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;
|
|
|
|
|
|
|
|
p->color = vts_colors + k;
|
|
|
|
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;
|
|
|
|
|
|
|
|
p->color = vts_colors + k;
|
|
|
|
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;
|
2003-04-16 07:52:54 +00:00
|
|
|
struct vts_color_struct color;
|
|
|
|
|
|
|
|
color = vts_colors[COLOR_BLACK];
|
|
|
|
p->color = &color;
|
|
|
|
|
|
|
|
for (i = x1; i < w; i++) {
|
|
|
|
for (j = y2; j < h; j++) {
|
2004-03-15 19:32:28 +00:00
|
|
|
/* FIXME not strictly correct */
|
|
|
|
color.Y = random_char ();
|
|
|
|
color.R = color.Y;
|
|
|
|
color.G = color.Y;
|
|
|
|
color.B = color.Y;
|
|
|
|
p->paint_hline (p, i, j, 1);
|
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;
|
|
|
|
struct vts_color_struct color;
|
|
|
|
|
|
|
|
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 = vts_colors[COLOR_BLACK];
|
|
|
|
p->color = &color;
|
|
|
|
|
|
|
|
for (i = 0; i < w; i++) {
|
|
|
|
for (j = 0; j < h; j++) {
|
|
|
|
/* FIXME not strictly correct */
|
|
|
|
color.Y = random_char ();
|
|
|
|
color.R = color.Y;
|
|
|
|
color.G = color.Y;
|
|
|
|
color.B = color.Y;
|
|
|
|
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,
|
|
|
|
int h, struct vts_color_struct *color)
|
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;
|
|
|
|
|
|
|
|
p->width = w;
|
|
|
|
p->height = h;
|
|
|
|
fourcc = v->fourcc;
|
|
|
|
if (fourcc == NULL)
|
|
|
|
return;
|
|
|
|
|
|
|
|
fourcc->paint_setup (p, dest);
|
|
|
|
p->paint_hline = fourcc->paint_hline;
|
|
|
|
|
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
|
|
|
p->color = color;
|
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)
|
|
|
|
{
|
|
|
|
gst_video_test_src_unicolor (v, dest, w, h, vts_colors + COLOR_BLACK);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_video_test_src_white (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
|
|
|
gst_video_test_src_unicolor (v, dest, w, h, vts_colors + COLOR_WHITE);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_video_test_src_red (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
|
|
|
gst_video_test_src_unicolor (v, dest, w, h, vts_colors + COLOR_RED);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_video_test_src_green (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
|
|
|
gst_video_test_src_unicolor (v, dest, w, h, vts_colors + COLOR_GREEN);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
gst_video_test_src_blue (GstVideoTestSrc * v, guchar * dest, int w, int h)
|
|
|
|
{
|
|
|
|
gst_video_test_src_unicolor (v, dest, w, h, vts_colors + COLOR_BLUE);
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_I420 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
2005-05-09 10:56:13 +00:00
|
|
|
#ifdef oil_splat_u8_ns
|
2003-04-16 07:52:54 +00:00
|
|
|
int x1 = x / 2;
|
|
|
|
int x2 = (x + w) / 2;
|
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
|
|
|
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->color->Y, w);
|
|
|
|
oil_splat_u8_ns (p->up + offset1 + x1, &p->color->U, x2 - x1);
|
|
|
|
oil_splat_u8_ns (p->vp + offset1 + x1, &p->color->V, x2 - x1);
|
2005-05-09 10:56:13 +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_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
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
/* TODO: put into colour struct or take value from property maybe */
|
|
|
|
const uint8_t alpha_color = 128;
|
|
|
|
int offset;
|
|
|
|
|
|
|
|
offset = (y * p->ystride) + (x * 4);
|
|
|
|
oil_splat_u8 (p->yp + offset, 4, &p->color->Y, w);
|
|
|
|
oil_splat_u8 (p->up + offset, 4, &p->color->U, w);
|
|
|
|
oil_splat_u8 (p->vp + offset, 4, &p->color->V, w);
|
|
|
|
oil_splat_u8 (p->ap + offset, 4, &alpha_color, w);
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
int x2 = (x + w) / 2;
|
|
|
|
int offset;
|
|
|
|
|
2004-01-09 01:53:31 +00:00
|
|
|
offset = y * p->ystride;
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 2, 2, &p->color->Y, w);
|
|
|
|
oil_splat_u8 (p->up + offset + x1 * 4, 4, &p->color->U, x2 - x1);
|
|
|
|
oil_splat_u8 (p->vp + offset + x1 * 4, 4, &p->color->V, x2 - x1);
|
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;
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 3, 3, &p->color->Y, w);
|
|
|
|
oil_splat_u8 (p->up + offset + x * 3, 3, &p->color->U, w);
|
|
|
|
oil_splat_u8 (p->vp + offset + x * 3, 3, &p->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;
|
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) / 4;
|
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) / 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)
|
|
|
|
{
|
2005-05-09 10:56:13 +00:00
|
|
|
#ifdef oil_splat_u8_ns
|
2004-11-05 15:07:57 +00:00
|
|
|
int x1 = x / 4;
|
|
|
|
int x2 = (x + w) / 4;
|
|
|
|
int offset = y * p->ystride;
|
|
|
|
int offset1 = y * p->ustride;
|
|
|
|
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->color->Y, w);
|
|
|
|
oil_splat_u8_ns (p->up + offset1 + x1, &p->color->U, x2 - x1);
|
|
|
|
oil_splat_u8_ns (p->vp + offset1 + x1, &p->color->V, x2 - x1);
|
2005-05-09 10:56:13 +00:00
|
|
|
#endif
|
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)
|
|
|
|
{
|
2005-05-09 10:56:13 +00:00
|
|
|
#ifdef oil_splat_u8_ns
|
2004-11-05 15:07:57 +00:00
|
|
|
int x1 = x / 2;
|
|
|
|
int x2 = (x + w) / 2;
|
|
|
|
int offset = y * p->ystride;
|
|
|
|
int offset1 = y * p->ustride;
|
|
|
|
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->color->Y, w);
|
|
|
|
oil_splat_u8_ns (p->up + offset1 + x1, &p->color->U, x2 - x1);
|
|
|
|
oil_splat_u8_ns (p->vp + offset1 + x1, &p->color->V, x2 - x1);
|
2005-05-09 10:56:13 +00:00
|
|
|
#endif
|
2004-11-05 15:07:57 +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_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)
|
|
|
|
{
|
2005-05-09 10:56:13 +00:00
|
|
|
#ifdef oil_splat_u8_ns
|
2004-01-09 01:53:31 +00:00
|
|
|
int offset = y * p->ystride;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->color->Y, w);
|
2005-05-09 10:56:13 +00:00
|
|
|
#endif
|
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;
|
|
|
|
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->color->Y, w);
|
|
|
|
oil_splat_u8_ns (p->up + offset1 + x1, &p->color->U, x2 - x1);
|
|
|
|
oil_splat_u8_ns (p->vp + offset1 + x1, &p->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);
|
|
|
|
p->vp = p->yp + p->ystride * GST_ROUND_UP_4 (p->height);
|
|
|
|
p->vstride = GST_ROUND_UP_4 (p->ystride / 4);
|
|
|
|
p->up = p->vp + p->vstride * GST_ROUND_UP_4 (h / 4);
|
|
|
|
p->ustride = GST_ROUND_UP_4 (p->ystride / 4);
|
|
|
|
p->endptr = p->up + p->ustride * GST_ROUND_UP_4 (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);
|
|
|
|
p->vp = p->up + p->ustride * GST_ROUND_UP_4 (h / 4);
|
|
|
|
p->vstride = GST_ROUND_UP_4 (p->ystride / 4);
|
|
|
|
p->endptr = p->vp + p->vstride * GST_ROUND_UP_4 (h / 4);
|
2003-07-14 08:36:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
paint_hline_YUV9 (paintinfo * p, int x, int y, int w)
|
|
|
|
{
|
2005-05-09 10:56:13 +00:00
|
|
|
#ifdef oil_splat_u8_ns
|
2003-07-14 08:36:03 +00:00
|
|
|
int x1 = x / 4;
|
|
|
|
int x2 = (x + w) / 4;
|
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
|
|
|
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8_ns (p->yp + offset + x, &p->color->Y, w);
|
|
|
|
oil_splat_u8_ns (p->up + offset1 + x1, &p->color->U, x2 - x1);
|
|
|
|
oil_splat_u8_ns (p->vp + offset1 + x1, &p->color->V, x2 - x1);
|
2005-05-09 10:56:13 +00:00
|
|
|
#endif
|
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;
|
2003-04-16 07:52:54 +00:00
|
|
|
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 4, 4, &p->color->R, w);
|
|
|
|
oil_splat_u8 (p->up + offset + x * 4, 4, &p->color->G, w);
|
|
|
|
oil_splat_u8 (p->vp + offset + x * 4, 4, &p->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) {
|
|
|
|
/* TODO: put into colour struct or take value from property maybe */
|
|
|
|
const uint8_t alpha_color = 128;
|
|
|
|
|
|
|
|
oil_splat_u8 (p->ap + offset + (x * 4), 4, &alpha_color, w);
|
|
|
|
}
|
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
|
|
|
|
2005-05-09 01:20:55 +00:00
|
|
|
oil_splat_u8 (p->yp + offset + x * 3, 3, &p->color->R, w);
|
|
|
|
oil_splat_u8 (p->up + offset + x * 3, 3, &p->color->G, w);
|
|
|
|
oil_splat_u8 (p->vp + offset + x * 3, 3, &p->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
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
a = (p->color->R & 0xf8) | (p->color->G >> 5);
|
|
|
|
b = ((p->color->G << 3) & 0xe0) | (p->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
|
|
|
|
2004-03-14 22:34:34 +00:00
|
|
|
a = ((p->color->R >> 1) & 0x7c) | (p->color->G >> 6);
|
|
|
|
b = ((p->color->G << 2) & 0xe0) | (p->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
|
|
|
}
|