mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
configure.ac: Add sunaudio
Original commit message from CVS: * configure.ac: Add sunaudio * examples/Makefile.am: make gstplay depend on gconf * gst/ffmpegcolorspace/gstffmpegcodecmap.c: Remove c99-isms * gst/ffmpegcolorspace/imgconvert.c: (build_rgb_palette), (convert_table_lookup), (img_convert): remove c99-isms * gst/ffmpegcolorspace/imgconvert_template.h: make a constant unsigned, to fix a warning on Solaris * gst/mpeg1sys/systems.c: bcopy->memcpy * gst/rtjpeg/RTjpeg.c: (RTjpeg_yuvrgb8): bcopy->memcpy * sys/Makefile.am: Add sunaudio
This commit is contained in:
parent
db9cdcef0f
commit
c95dd78c2b
8 changed files with 304 additions and 274 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2004-05-18 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
|
* configure.ac: Add sunaudio
|
||||||
|
* examples/Makefile.am: make gstplay depend on gconf
|
||||||
|
* gst/ffmpegcolorspace/gstffmpegcodecmap.c: Remove c99-isms
|
||||||
|
* gst/ffmpegcolorspace/imgconvert.c: (build_rgb_palette),
|
||||||
|
(convert_table_lookup), (img_convert): remove c99-isms
|
||||||
|
* gst/ffmpegcolorspace/imgconvert_template.h: make a constant
|
||||||
|
unsigned, to fix a warning on Solaris
|
||||||
|
* gst/mpeg1sys/systems.c: bcopy->memcpy
|
||||||
|
* gst/rtjpeg/RTjpeg.c: (RTjpeg_yuvrgb8): bcopy->memcpy
|
||||||
|
* sys/Makefile.am: Add sunaudio
|
||||||
|
|
||||||
2004-05-18 Wim Taymans <wim@fluendo.com>
|
2004-05-18 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* ext/ogg/gstoggmux.c: (gst_ogg_mux_get_type), (gst_ogg_mux_init),
|
* ext/ogg/gstoggmux.c: (gst_ogg_mux_get_type), (gst_ogg_mux_init),
|
||||||
|
|
|
@ -461,6 +461,12 @@ GST_CHECK_FEATURE(QCAM, [QuickCam], qcamsrc, [
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl *** Sun Audio ***
|
||||||
|
translit(dnm, m, l) AM_CONDITIONAL(USE_SUNAUDIO, true)
|
||||||
|
GST_CHECK_FEATURE(SUNAUDIO, [Sun Audio], sunaudiosrc, [
|
||||||
|
AC_CHECK_HEADER(sys/audioio.h, HAVE_SUNAUDIO="yes", HAVE_SUNAUDIO="no")
|
||||||
|
])
|
||||||
|
|
||||||
dnl *** Video CD ***
|
dnl *** Video CD ***
|
||||||
translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
|
translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true)
|
||||||
GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
|
GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [
|
||||||
|
@ -1786,6 +1792,7 @@ sys/dxr3/Makefile
|
||||||
sys/glsink/Makefile
|
sys/glsink/Makefile
|
||||||
sys/oss/Makefile
|
sys/oss/Makefile
|
||||||
sys/qcam/Makefile
|
sys/qcam/Makefile
|
||||||
|
sys/sunaudio/Makefile
|
||||||
sys/v4l/Makefile
|
sys/v4l/Makefile
|
||||||
sys/v4l2/Makefile
|
sys/v4l2/Makefile
|
||||||
sys/vcd/Makefile
|
sys/vcd/Makefile
|
||||||
|
|
|
@ -10,5 +10,11 @@ else
|
||||||
GTK_SUBDIRS=
|
GTK_SUBDIRS=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS=$(GTK_SUBDIRS) gstplay switch
|
if USE_GCONF
|
||||||
|
GCONF_SUBDIRS=gstplay
|
||||||
|
else
|
||||||
|
GCONF_SUBDIRS=
|
||||||
|
endif
|
||||||
|
|
||||||
|
SUBDIRS=$(GTK_SUBDIRS) $(GCONF_SUBDIRS) switch
|
||||||
DIST_SUBDIRS=capsfilter dynparams seeking indexing gstplay switch
|
DIST_SUBDIRS=capsfilter dynparams seeking indexing gstplay switch
|
||||||
|
|
|
@ -34,12 +34,23 @@
|
||||||
* See below for why we use this.
|
* See below for why we use this.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef G_HAVE_ISO_VARARGS
|
||||||
#define GST_FF_VID_CAPS_NEW(mimetype, ...) \
|
#define GST_FF_VID_CAPS_NEW(mimetype, ...) \
|
||||||
gst_caps_new_simple (mimetype, \
|
gst_caps_new_simple (mimetype, \
|
||||||
"width", GST_TYPE_INT_RANGE, 16, 4096, \
|
"width", GST_TYPE_INT_RANGE, 16, 4096, \
|
||||||
"height", GST_TYPE_INT_RANGE, 16, 4096, \
|
"height", GST_TYPE_INT_RANGE, 16, 4096, \
|
||||||
"framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE, \
|
"framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE, \
|
||||||
__VA_ARGS__)
|
__VA_ARGS__)
|
||||||
|
#elif defined(G_HAVE_GNU_VARARGS)
|
||||||
|
#define GST_FF_VID_CAPS_NEW(mimetype, props...) \
|
||||||
|
gst_caps_new_simple (mimetype, \
|
||||||
|
"width", GST_TYPE_INT_RANGE, 16, 4096, \
|
||||||
|
"height", GST_TYPE_INT_RANGE, 16, 4096, \
|
||||||
|
"framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE, \
|
||||||
|
##props, NULL)
|
||||||
|
#else
|
||||||
|
#error FIXME
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Convert a FFMPEG Pixel Format and optional AVCodecContext
|
/* Convert a FFMPEG Pixel Format and optional AVCodecContext
|
||||||
* to a GstCaps. If the context is ommitted, no fixed values
|
* to a GstCaps. If the context is ommitted, no fixed values
|
||||||
|
|
|
@ -70,153 +70,193 @@ PixFmtInfo;
|
||||||
/* this table gives more information about formats */
|
/* this table gives more information about formats */
|
||||||
static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
|
static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = {
|
||||||
/* YUV formats */
|
/* YUV formats */
|
||||||
[PIX_FMT_YUV420P] = {
|
/* [PIX_FMT_YUV420P] = */ {
|
||||||
.name = "yuv420p",
|
/* .name = */ "yuv420p",
|
||||||
.nb_channels = 3,
|
/* .nb_channels = */ 3,
|
||||||
.color_type = FF_COLOR_YUV,
|
/* .color_type = */ FF_COLOR_YUV,
|
||||||
.pixel_type = FF_PIXEL_PLANAR,
|
/* .pixel_type = */ FF_PIXEL_PLANAR,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 1,.y_chroma_shift = 1,
|
/* .x_chroma_shift = */ 1,
|
||||||
|
/* .y_chroma_shift = */ 1,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
[PIX_FMT_YUV422P] = {
|
/* [PIX_FMT_YUV422P] = */ {
|
||||||
.name = "yuv422p",
|
/* .name = */ "yuv422p",
|
||||||
.nb_channels = 3,
|
/* .nb_channels = */ 3,
|
||||||
.color_type = FF_COLOR_YUV,
|
/* .color_type = */ FF_COLOR_YUV,
|
||||||
.pixel_type = FF_PIXEL_PLANAR,
|
/* .pixel_type = */ FF_PIXEL_PLANAR,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 1,.y_chroma_shift = 0,
|
/* .x_chroma_shift = */ 1,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
[PIX_FMT_YUV444P] = {
|
/* [PIX_FMT_YUV444P] = */ {
|
||||||
.name = "yuv444p",
|
/* .name = */ "yuv444p",
|
||||||
.nb_channels = 3,
|
/* .nb_channels = */ 3,
|
||||||
.color_type = FF_COLOR_YUV,
|
/* .color_type = */ FF_COLOR_YUV,
|
||||||
.pixel_type = FF_PIXEL_PLANAR,
|
/* .pixel_type = */ FF_PIXEL_PLANAR,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 0,.y_chroma_shift = 0,
|
/* .x_chroma_shift = */ 0,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
[PIX_FMT_YUV422] = {
|
/* [PIX_FMT_YUV422] = */ {
|
||||||
.name = "yuv422",
|
/* .name = */ "yuv422",
|
||||||
.nb_channels = 1,
|
/* .nb_channels = */ 1,
|
||||||
.color_type = FF_COLOR_YUV,
|
/* .color_type = */ FF_COLOR_YUV,
|
||||||
.pixel_type = FF_PIXEL_PACKED,
|
/* .pixel_type = */ FF_PIXEL_PACKED,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 1,.y_chroma_shift = 0,
|
/* .x_chroma_shift = */ 1,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
[PIX_FMT_YUV410P] = {
|
/* [PIX_FMT_YUV410P] = */ {
|
||||||
.name = "yuv410p",
|
/* .name = */ "yuv410p",
|
||||||
.nb_channels = 3,
|
/* .nb_channels = */ 3,
|
||||||
.color_type = FF_COLOR_YUV,
|
/* .color_type = */ FF_COLOR_YUV,
|
||||||
.pixel_type = FF_PIXEL_PLANAR,
|
/* .pixel_type = */ FF_PIXEL_PLANAR,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 2,.y_chroma_shift = 2,
|
/* .x_chroma_shift = */ 2,
|
||||||
|
/* .y_chroma_shift = */ 2,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
[PIX_FMT_YUV411P] = {
|
/* [PIX_FMT_YUV411P] = */ {
|
||||||
.name = "yuv411p",
|
/* .name = */ "yuv411p",
|
||||||
.nb_channels = 3,
|
/* .nb_channels = */ 3,
|
||||||
.color_type = FF_COLOR_YUV,
|
/* .color_type = */ FF_COLOR_YUV,
|
||||||
.pixel_type = FF_PIXEL_PLANAR,
|
/* .pixel_type = */ FF_PIXEL_PLANAR,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 2,.y_chroma_shift = 0,
|
/* .x_chroma_shift = */ 2,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
|
|
||||||
/* JPEG YUV */
|
/* JPEG YUV */
|
||||||
[PIX_FMT_YUVJ420P] = {
|
/* [PIX_FMT_YUVJ420P] = */ {
|
||||||
.name = "yuvj420p",
|
/* .name = */ "yuvj420p",
|
||||||
.nb_channels = 3,
|
/* .nb_channels = */ 3,
|
||||||
.color_type = FF_COLOR_YUV_JPEG,
|
/* .color_type = */ FF_COLOR_YUV_JPEG,
|
||||||
.pixel_type = FF_PIXEL_PLANAR,
|
/* .pixel_type = */ FF_PIXEL_PLANAR,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 1,.y_chroma_shift = 1,
|
/* .x_chroma_shift = */ 1,
|
||||||
|
/* .y_chroma_shift = */ 1,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
[PIX_FMT_YUVJ422P] = {
|
/* [PIX_FMT_YUVJ422P] = */ {
|
||||||
.name = "yuvj422p",
|
/* .name = */ "yuvj422p",
|
||||||
.nb_channels = 3,
|
/* .nb_channels = */ 3,
|
||||||
.color_type = FF_COLOR_YUV_JPEG,
|
/* .color_type = */ FF_COLOR_YUV_JPEG,
|
||||||
.pixel_type = FF_PIXEL_PLANAR,
|
/* .pixel_type = */ FF_PIXEL_PLANAR,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 1,.y_chroma_shift = 0,
|
/* .x_chroma_shift = */ 1,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
[PIX_FMT_YUVJ444P] = {
|
/* [PIX_FMT_YUVJ444P] = */ {
|
||||||
.name = "yuvj444p",
|
/* .name = */ "yuvj444p",
|
||||||
.nb_channels = 3,
|
/* .nb_channels = */ 3,
|
||||||
.color_type = FF_COLOR_YUV_JPEG,
|
/* .color_type = */ FF_COLOR_YUV_JPEG,
|
||||||
.pixel_type = FF_PIXEL_PLANAR,
|
/* .pixel_type = */ FF_PIXEL_PLANAR,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 0,.y_chroma_shift = 0,
|
/* .x_chroma_shift = */ 0,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
|
|
||||||
/* RGB formats */
|
/* RGB formats */
|
||||||
[PIX_FMT_RGB24] = {
|
/* [PIX_FMT_RGB24] = */ {
|
||||||
.name = "rgb24",
|
/* .name = */ "rgb24",
|
||||||
.nb_channels = 3,
|
/* .nb_channels = */ 3,
|
||||||
.color_type = FF_COLOR_RGB,
|
/* .color_type = */ FF_COLOR_RGB,
|
||||||
.pixel_type = FF_PIXEL_PACKED,
|
/* .pixel_type = */ FF_PIXEL_PACKED,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 0,.y_chroma_shift = 0,
|
/* .x_chroma_shift = */ 0,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
[PIX_FMT_BGR24] = {
|
/* [PIX_FMT_BGR24] = */ {
|
||||||
.name = "bgr24",
|
/* .name = */ "bgr24",
|
||||||
.nb_channels = 3,
|
/* .nb_channels = */ 3,
|
||||||
.color_type = FF_COLOR_RGB,
|
/* .color_type = */ FF_COLOR_RGB,
|
||||||
.pixel_type = FF_PIXEL_PACKED,
|
/* .pixel_type = */ FF_PIXEL_PACKED,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 0,.y_chroma_shift = 0,
|
/* .x_chroma_shift = */ 0,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGBA32] = {
|
/* [PIX_FMT_RGBA32] = */ {
|
||||||
.name = "rgba32",
|
/* .name = */ "rgba32",
|
||||||
.nb_channels = 4,.is_alpha = 1,
|
/* .nb_channels = */ 4,
|
||||||
.color_type = FF_COLOR_RGB,
|
/* .color_type = */ FF_COLOR_RGB,
|
||||||
.pixel_type = FF_PIXEL_PACKED,
|
/* .pixel_type = */ FF_PIXEL_PACKED,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 1,
|
||||||
.x_chroma_shift = 0,.y_chroma_shift = 0,
|
/* .x_chroma_shift = */ 0,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB565] = {
|
/* [PIX_FMT_RGB565] = */ {
|
||||||
.name = "rgb565",
|
/* .name = */ "rgb565",
|
||||||
.nb_channels = 3,
|
/* .nb_channels = */ 3,
|
||||||
.color_type = FF_COLOR_RGB,
|
/* .color_type = */ FF_COLOR_RGB,
|
||||||
.pixel_type = FF_PIXEL_PACKED,
|
/* .pixel_type = */ FF_PIXEL_PACKED,
|
||||||
.depth = 5,
|
/* .is_alpha = */ 0,
|
||||||
.x_chroma_shift = 0,.y_chroma_shift = 0,
|
/* .x_chroma_shift = */ 0,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 5,
|
||||||
},
|
},
|
||||||
[PIX_FMT_RGB555] = {
|
/* [PIX_FMT_RGB555] = */ {
|
||||||
.name = "rgb555",
|
/* .name = */ "rgb555",
|
||||||
.nb_channels = 4,.is_alpha = 1,
|
/* .nb_channels = */ 4,
|
||||||
.color_type = FF_COLOR_RGB,
|
/* .color_type = */ FF_COLOR_RGB,
|
||||||
.pixel_type = FF_PIXEL_PACKED,
|
/* .pixel_type = */ FF_PIXEL_PACKED,
|
||||||
.depth = 5,
|
/* .is_alpha = */ 1,
|
||||||
.x_chroma_shift = 0,.y_chroma_shift = 0,
|
/* .x_chroma_shift = */ 0,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 5,
|
||||||
},
|
},
|
||||||
|
|
||||||
/* gray / mono formats */
|
/* gray / mono formats */
|
||||||
[PIX_FMT_GRAY8] = {
|
/* [PIX_FMT_GRAY8] = */ {
|
||||||
.name = "gray",
|
/* .name = */ "gray",
|
||||||
.nb_channels = 1,
|
/* .nb_channels = */ 1,
|
||||||
.color_type = FF_COLOR_GRAY,
|
/* .color_type = */ FF_COLOR_GRAY,
|
||||||
.pixel_type = FF_PIXEL_PLANAR,
|
/* .pixel_type = */ FF_PIXEL_PLANAR,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 0,
|
||||||
|
/* .x_chroma_shift = */ 0,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
[PIX_FMT_MONOWHITE] = {
|
/* [PIX_FMT_MONOWHITE] = */ {
|
||||||
.name = "monow",
|
/* .name = */ "monow",
|
||||||
.nb_channels = 1,
|
/* .nb_channels = */ 1,
|
||||||
.color_type = FF_COLOR_GRAY,
|
/* .color_type = */ FF_COLOR_GRAY,
|
||||||
.pixel_type = FF_PIXEL_PLANAR,
|
/* .pixel_type = */ FF_PIXEL_PLANAR,
|
||||||
.depth = 1,
|
/* .is_alpha = */ 0,
|
||||||
|
/* .x_chroma_shift = */ 0,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 1,
|
||||||
},
|
},
|
||||||
[PIX_FMT_MONOBLACK] = {
|
/* [PIX_FMT_MONOBLACK] = */ {
|
||||||
.name = "monob",
|
/* .name = */ "monob",
|
||||||
.nb_channels = 1,
|
/* .nb_channels = */ 1,
|
||||||
.color_type = FF_COLOR_GRAY,
|
/* .color_type = */ FF_COLOR_GRAY,
|
||||||
.pixel_type = FF_PIXEL_PLANAR,
|
/* .pixel_type = */ FF_PIXEL_PLANAR,
|
||||||
.depth = 1,
|
/* .is_alpha = */ 0,
|
||||||
|
/* .x_chroma_shift = */ 0,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
/* paletted formats */
|
/* paletted formats */
|
||||||
[PIX_FMT_PAL8] = {
|
/* [PIX_FMT_PAL8] = */ {
|
||||||
.name = "pal8",
|
/* .name = */ "pal8",
|
||||||
.nb_channels = 4,.is_alpha = 1,
|
/* .nb_channels = */ 4,
|
||||||
.color_type = FF_COLOR_RGB,
|
/* .color_type = */ FF_COLOR_RGB,
|
||||||
.pixel_type = FF_PIXEL_PALETTE,
|
/* .pixel_type = */ FF_PIXEL_PALETTE,
|
||||||
.depth = 8,
|
/* .is_alpha = */ 1,
|
||||||
|
/* .x_chroma_shift = */ 0,
|
||||||
|
/* .y_chroma_shift = */ 0,
|
||||||
|
/* .depth = */ 8,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1159,7 +1199,7 @@ build_rgb_palette (uint8_t * palette, int has_alpha)
|
||||||
for (r = 0; r < 6; r++) {
|
for (r = 0; r < 6; r++) {
|
||||||
for (g = 0; g < 6; g++) {
|
for (g = 0; g < 6; g++) {
|
||||||
for (b = 0; b < 6; b++) {
|
for (b = 0; b < 6; b++) {
|
||||||
pal[i++] = (0xff << 24) | (pal_value[r] << 16) |
|
pal[i++] = (0xffU << 24) | (pal_value[r] << 16) |
|
||||||
(pal_value[g] << 8) | pal_value[b];
|
(pal_value[g] << 8) | pal_value[b];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1427,10 +1467,14 @@ gray_to_monoblack (AVPicture * dst, const AVPicture * src,
|
||||||
gray_to_mono (dst, src, width, height, 0x00);
|
gray_to_mono (dst, src, width, height, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef void (*convert_func) (AVPicture * dst, const AVPicture * src, int width,
|
||||||
|
int height);
|
||||||
|
|
||||||
typedef struct ConvertEntry
|
typedef struct ConvertEntry
|
||||||
{
|
{
|
||||||
void (*convert) (AVPicture * dst,
|
int from;
|
||||||
const AVPicture * src, int width, int height);
|
int to;
|
||||||
|
convert_func convert;
|
||||||
}
|
}
|
||||||
ConvertEntry;
|
ConvertEntry;
|
||||||
|
|
||||||
|
@ -1451,151 +1495,88 @@ ConvertEntry;
|
||||||
|
|
||||||
The other conversion functions are just optimisations for common cases.
|
The other conversion functions are just optimisations for common cases.
|
||||||
*/
|
*/
|
||||||
static ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = {
|
static ConvertEntry convert_table[] = {
|
||||||
[PIX_FMT_YUV420P] = {
|
{PIX_FMT_YUV420P, PIX_FMT_RGB24, yuv420p_to_rgb24},
|
||||||
[PIX_FMT_RGB555] = {
|
{PIX_FMT_YUV420P, PIX_FMT_BGR24, yuv420p_to_bgr24},
|
||||||
.convert = yuv420p_to_rgb555},
|
{PIX_FMT_YUV420P, PIX_FMT_RGBA32, yuv420p_to_rgba32},
|
||||||
[PIX_FMT_RGB565] = {
|
{PIX_FMT_YUV420P, PIX_FMT_RGB565, yuv420p_to_rgb565},
|
||||||
.convert = yuv420p_to_rgb565},
|
{PIX_FMT_YUV420P, PIX_FMT_RGB555, yuv420p_to_rgb555},
|
||||||
[PIX_FMT_BGR24] = {
|
|
||||||
.convert = yuv420p_to_bgr24},
|
|
||||||
[PIX_FMT_RGB24] = {
|
|
||||||
.convert = yuv420p_to_rgb24},
|
|
||||||
[PIX_FMT_RGBA32] = {
|
|
||||||
.convert = yuv420p_to_rgba32},
|
|
||||||
},
|
|
||||||
[PIX_FMT_YUV422P] = {
|
|
||||||
[PIX_FMT_YUV422] = {
|
|
||||||
.convert = yuv422p_to_yuv422,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
[PIX_FMT_YUV444P] = {
|
|
||||||
[PIX_FMT_RGB24] = {
|
|
||||||
.convert = yuv444p_to_rgb24},
|
|
||||||
},
|
|
||||||
[PIX_FMT_YUVJ420P] = {
|
|
||||||
[PIX_FMT_RGB555] = {
|
|
||||||
.convert = yuvj420p_to_rgb555},
|
|
||||||
[PIX_FMT_RGB565] = {
|
|
||||||
.convert = yuvj420p_to_rgb565},
|
|
||||||
[PIX_FMT_BGR24] = {
|
|
||||||
.convert = yuvj420p_to_bgr24},
|
|
||||||
[PIX_FMT_RGB24] = {
|
|
||||||
.convert = yuvj420p_to_rgb24},
|
|
||||||
[PIX_FMT_RGBA32] = {
|
|
||||||
.convert = yuvj420p_to_rgba32},
|
|
||||||
},
|
|
||||||
[PIX_FMT_YUVJ444P] = {
|
|
||||||
[PIX_FMT_RGB24] = {
|
|
||||||
.convert = yuvj444p_to_rgb24},
|
|
||||||
},
|
|
||||||
[PIX_FMT_YUV422] = {
|
|
||||||
[PIX_FMT_YUV420P] = {
|
|
||||||
.convert = yuv422_to_yuv420p,
|
|
||||||
},
|
|
||||||
[PIX_FMT_YUV422P] = {
|
|
||||||
.convert = yuv422_to_yuv422p,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
[PIX_FMT_RGB24] = {
|
{PIX_FMT_YUV422P, PIX_FMT_YUV422, yuv422p_to_yuv422},
|
||||||
[PIX_FMT_YUV420P] = {
|
{PIX_FMT_YUV444P, PIX_FMT_RGB24, yuv444p_to_rgb24},
|
||||||
.convert = rgb24_to_yuv420p},
|
{PIX_FMT_YUV422, PIX_FMT_YUV420P, yuv422_to_yuv420p},
|
||||||
[PIX_FMT_RGB565] = {
|
{PIX_FMT_YUV422, PIX_FMT_YUV422P, yuv422_to_yuv422p},
|
||||||
.convert = rgb24_to_rgb565},
|
|
||||||
[PIX_FMT_RGB555] = {
|
{PIX_FMT_YUVJ420P, PIX_FMT_RGB555, yuvj420p_to_rgb555},
|
||||||
.convert = rgb24_to_rgb555},
|
{PIX_FMT_YUVJ420P, PIX_FMT_RGB565, yuvj420p_to_rgb565},
|
||||||
[PIX_FMT_RGBA32] = {
|
{PIX_FMT_YUVJ420P, PIX_FMT_BGR24, yuvj420p_to_bgr24},
|
||||||
.convert = rgb24_to_rgba32},
|
{PIX_FMT_YUVJ420P, PIX_FMT_RGB24, yuvj420p_to_rgb24},
|
||||||
[PIX_FMT_BGR24] = {
|
{PIX_FMT_YUVJ420P, PIX_FMT_RGBA32, yuvj420p_to_rgba32},
|
||||||
.convert = rgb24_to_bgr24},
|
{PIX_FMT_YUVJ444P, PIX_FMT_RGB24, yuvj444p_to_rgb24},
|
||||||
[PIX_FMT_GRAY8] = {
|
|
||||||
.convert = rgb24_to_gray},
|
{PIX_FMT_RGB24, PIX_FMT_YUV420P, rgb24_to_yuv420p},
|
||||||
[PIX_FMT_PAL8] = {
|
{PIX_FMT_RGB24, PIX_FMT_RGB565, rgb24_to_rgb565},
|
||||||
.convert = rgb24_to_pal8},
|
{PIX_FMT_RGB24, PIX_FMT_RGB555, rgb24_to_rgb555},
|
||||||
[PIX_FMT_YUV444P] = {
|
{PIX_FMT_RGB24, PIX_FMT_RGBA32, rgb24_to_rgba32},
|
||||||
.convert = rgb24_to_yuv444p},
|
{PIX_FMT_RGB24, PIX_FMT_BGR24, rgb24_to_bgr24},
|
||||||
[PIX_FMT_YUVJ420P] = {
|
{PIX_FMT_RGB24, PIX_FMT_GRAY8, rgb24_to_gray},
|
||||||
.convert = rgb24_to_yuvj420p},
|
{PIX_FMT_RGB24, PIX_FMT_PAL8, rgb24_to_pal8},
|
||||||
[PIX_FMT_YUVJ444P] = {
|
{PIX_FMT_RGB24, PIX_FMT_YUV444P, rgb24_to_yuv444p},
|
||||||
.convert = rgb24_to_yuvj444p},
|
{PIX_FMT_RGB24, PIX_FMT_YUVJ420P, rgb24_to_yuvj420p},
|
||||||
},
|
{PIX_FMT_RGB24, PIX_FMT_YUVJ444P, rgb24_to_yuvj444p},
|
||||||
[PIX_FMT_RGBA32] = {
|
|
||||||
[PIX_FMT_RGB24] = {
|
{PIX_FMT_RGBA32, PIX_FMT_RGB24, rgba32_to_rgb24},
|
||||||
.convert = rgba32_to_rgb24},
|
{PIX_FMT_RGBA32, PIX_FMT_RGB555, rgba32_to_rgb555},
|
||||||
[PIX_FMT_RGB555] = {
|
{PIX_FMT_RGBA32, PIX_FMT_PAL8, rgba32_to_pal8},
|
||||||
.convert = rgba32_to_rgb555},
|
{PIX_FMT_RGBA32, PIX_FMT_YUV420P, rgba32_to_yuv420p},
|
||||||
[PIX_FMT_PAL8] = {
|
{PIX_FMT_RGBA32, PIX_FMT_GRAY8, rgba32_to_gray},
|
||||||
.convert = rgba32_to_pal8},
|
|
||||||
[PIX_FMT_YUV420P] = {
|
{PIX_FMT_BGR24, PIX_FMT_RGB24, bgr24_to_rgb24},
|
||||||
.convert = rgba32_to_yuv420p},
|
{PIX_FMT_BGR24, PIX_FMT_YUV420P, bgr24_to_yuv420p},
|
||||||
[PIX_FMT_GRAY8] = {
|
{PIX_FMT_BGR24, PIX_FMT_GRAY8, bgr24_to_gray},
|
||||||
.convert = rgba32_to_gray},
|
|
||||||
},
|
{PIX_FMT_RGB555, PIX_FMT_RGB24, rgb555_to_rgb24},
|
||||||
[PIX_FMT_BGR24] = {
|
{PIX_FMT_RGB555, PIX_FMT_RGBA32, rgb555_to_rgba32},
|
||||||
[PIX_FMT_RGB24] = {
|
{PIX_FMT_RGB555, PIX_FMT_YUV420P, rgb555_to_yuv420p},
|
||||||
.convert = bgr24_to_rgb24},
|
{PIX_FMT_RGB555, PIX_FMT_GRAY8, rgb555_to_gray},
|
||||||
[PIX_FMT_YUV420P] = {
|
|
||||||
.convert = bgr24_to_yuv420p},
|
{PIX_FMT_RGB565, PIX_FMT_RGB24, rgb565_to_rgb24},
|
||||||
[PIX_FMT_GRAY8] = {
|
{PIX_FMT_RGB565, PIX_FMT_YUV420P, rgb565_to_yuv420p},
|
||||||
.convert = bgr24_to_gray},
|
{PIX_FMT_RGB565, PIX_FMT_GRAY8, rgb565_to_gray},
|
||||||
},
|
|
||||||
[PIX_FMT_RGB555] = {
|
{PIX_FMT_GRAY8, PIX_FMT_RGB555, gray_to_rgb555},
|
||||||
[PIX_FMT_RGB24] = {
|
{PIX_FMT_GRAY8, PIX_FMT_RGB565, gray_to_rgb565},
|
||||||
.convert = rgb555_to_rgb24},
|
{PIX_FMT_GRAY8, PIX_FMT_RGB24, gray_to_rgb24},
|
||||||
[PIX_FMT_RGBA32] = {
|
{PIX_FMT_GRAY8, PIX_FMT_BGR24, gray_to_bgr24},
|
||||||
.convert = rgb555_to_rgba32},
|
{PIX_FMT_GRAY8, PIX_FMT_RGBA32, gray_to_rgba32},
|
||||||
[PIX_FMT_YUV420P] = {
|
{PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, gray_to_monowhite},
|
||||||
.convert = rgb555_to_yuv420p},
|
{PIX_FMT_GRAY8, PIX_FMT_MONOBLACK, gray_to_monoblack},
|
||||||
[PIX_FMT_GRAY8] = {
|
|
||||||
.convert = rgb555_to_gray},
|
{PIX_FMT_MONOWHITE, PIX_FMT_GRAY8, monowhite_to_gray},
|
||||||
},
|
|
||||||
[PIX_FMT_RGB565] = {
|
{PIX_FMT_MONOBLACK, PIX_FMT_GRAY8, monoblack_to_gray},
|
||||||
[PIX_FMT_RGB24] = {
|
|
||||||
.convert = rgb565_to_rgb24},
|
{PIX_FMT_PAL8, PIX_FMT_RGB555, pal8_to_rgb555},
|
||||||
[PIX_FMT_YUV420P] = {
|
{PIX_FMT_PAL8, PIX_FMT_RGB565, pal8_to_rgb565},
|
||||||
.convert = rgb565_to_yuv420p},
|
{PIX_FMT_PAL8, PIX_FMT_BGR24, pal8_to_bgr24},
|
||||||
[PIX_FMT_GRAY8] = {
|
{PIX_FMT_PAL8, PIX_FMT_RGB24, pal8_to_rgb24},
|
||||||
.convert = rgb565_to_gray},
|
{PIX_FMT_PAL8, PIX_FMT_RGBA32, pal8_to_rgba32},
|
||||||
},
|
|
||||||
[PIX_FMT_GRAY8] = {
|
|
||||||
[PIX_FMT_RGB555] = {
|
|
||||||
.convert = gray_to_rgb555},
|
|
||||||
[PIX_FMT_RGB565] = {
|
|
||||||
.convert = gray_to_rgb565},
|
|
||||||
[PIX_FMT_RGB24] = {
|
|
||||||
.convert = gray_to_rgb24},
|
|
||||||
[PIX_FMT_BGR24] = {
|
|
||||||
.convert = gray_to_bgr24},
|
|
||||||
[PIX_FMT_RGBA32] = {
|
|
||||||
.convert = gray_to_rgba32},
|
|
||||||
[PIX_FMT_MONOWHITE] = {
|
|
||||||
.convert = gray_to_monowhite},
|
|
||||||
[PIX_FMT_MONOBLACK] = {
|
|
||||||
.convert = gray_to_monoblack},
|
|
||||||
},
|
|
||||||
[PIX_FMT_MONOWHITE] = {
|
|
||||||
[PIX_FMT_GRAY8] = {
|
|
||||||
.convert = monowhite_to_gray},
|
|
||||||
},
|
|
||||||
[PIX_FMT_MONOBLACK] = {
|
|
||||||
[PIX_FMT_GRAY8] = {
|
|
||||||
.convert = monoblack_to_gray},
|
|
||||||
},
|
|
||||||
[PIX_FMT_PAL8] = {
|
|
||||||
[PIX_FMT_RGB555] = {
|
|
||||||
.convert = pal8_to_rgb555},
|
|
||||||
[PIX_FMT_RGB565] = {
|
|
||||||
.convert = pal8_to_rgb565},
|
|
||||||
[PIX_FMT_BGR24] = {
|
|
||||||
.convert = pal8_to_bgr24},
|
|
||||||
[PIX_FMT_RGB24] = {
|
|
||||||
.convert = pal8_to_rgb24},
|
|
||||||
[PIX_FMT_RGBA32] = {
|
|
||||||
.convert = pal8_to_rgba32},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static convert_func
|
||||||
|
convert_table_lookup (int src_pix_fmt, int dst_pix_fmt)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < sizeof (convert_table) / sizeof (convert_table[0]); i++) {
|
||||||
|
if (convert_table[i].from == src_pix_fmt &&
|
||||||
|
convert_table[i].to == dst_pix_fmt) {
|
||||||
|
return convert_table[i].convert;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
avpicture_alloc (AVPicture * picture, int pix_fmt, int width, int height)
|
avpicture_alloc (AVPicture * picture, int pix_fmt, int width, int height)
|
||||||
{
|
{
|
||||||
|
@ -1660,7 +1641,7 @@ img_convert (AVPicture * dst, int dst_pix_fmt,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ce = &convert_table[src_pix_fmt][dst_pix_fmt];
|
ce = convert_table_lookup (src_pix_fmt, dst_pix_fmt);
|
||||||
if (ce->convert) {
|
if (ce->convert) {
|
||||||
/* specific convertion routine */
|
/* specific convertion routine */
|
||||||
ce->convert (dst, src, dst_width, dst_height);
|
ce->convert (dst, src, dst_width, dst_height);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef RGB_OUT
|
#ifndef RGB_OUT
|
||||||
#define RGB_OUT(d, r, g, b) RGBA_OUT(d, r, g, b, 0xff)
|
#define RGB_OUT(d, r, g, b) RGBA_OUT(d, r, g, b, 0xffU)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void glue(yuv420p_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
|
static void glue(yuv420p_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src,
|
||||||
|
|
|
@ -16,6 +16,12 @@ else
|
||||||
QCAM_DIR=
|
QCAM_DIR=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if USE_SUNAUDIO
|
||||||
|
SUNAUDIO_DIR=sunaudio
|
||||||
|
else
|
||||||
|
SUNAUDIO_DIR=
|
||||||
|
endif
|
||||||
|
|
||||||
if USE_V4L
|
if USE_V4L
|
||||||
V4L_DIR=v4l
|
V4L_DIR=v4l
|
||||||
else
|
else
|
||||||
|
@ -52,7 +58,7 @@ else
|
||||||
CDROM_DIR=
|
CDROM_DIR=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS=$(DXR3_DIR) $(OSS_DIR) $(QCAM_DIR) $(V4L_DIR) $(V4L2_DIR) \
|
SUBDIRS=$(DXR3_DIR) $(OSS_DIR) $(SUNAUDIO_DIR) $(QCAM_DIR) $(V4L_DIR) \
|
||||||
$(VCD_DIR) $(CDROM_DIR) $(XI_DIR) $(XV_DIR)
|
$(V4L2_DIR) $(VCD_DIR) $(CDROM_DIR) $(XI_DIR) $(XV_DIR)
|
||||||
|
|
||||||
DIST_SUBDIRS=dxr3 oss qcam v4l v4l2 vcd ximage xvimage glsink cdrom
|
DIST_SUBDIRS=dxr3 oss qcam sunaudio v4l v4l2 vcd ximage xvimage glsink cdrom
|
||||||
|
|
|
@ -10,5 +10,11 @@ else
|
||||||
GTK_SUBDIRS=
|
GTK_SUBDIRS=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS=$(GTK_SUBDIRS) gstplay switch
|
if USE_GCONF
|
||||||
|
GCONF_SUBDIRS=gstplay
|
||||||
|
else
|
||||||
|
GCONF_SUBDIRS=
|
||||||
|
endif
|
||||||
|
|
||||||
|
SUBDIRS=$(GTK_SUBDIRS) $(GCONF_SUBDIRS) switch
|
||||||
DIST_SUBDIRS=capsfilter dynparams seeking indexing gstplay switch
|
DIST_SUBDIRS=capsfilter dynparams seeking indexing gstplay switch
|
||||||
|
|
Loading…
Reference in a new issue