From: David Schleef Date: Wed, 19 May 2004 06:10:49 +0000 (+0000) Subject: configure.ac: Add sunaudio X-Git-Tag: 1.19.3~511^2~14206 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c95dd78c2bd339a0e7146f0995e139535b14c14e;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/ChangeLog b/ChangeLog index ea1a917..3f1cffe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2004-05-18 David Schleef + + * 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 * ext/ogg/gstoggmux.c: (gst_ogg_mux_get_type), (gst_ogg_mux_init), diff --git a/configure.ac b/configure.ac index e9ba371..ee312d3 100644 --- a/configure.ac +++ b/configure.ac @@ -461,6 +461,12 @@ GST_CHECK_FEATURE(QCAM, [QuickCam], qcamsrc, [ 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 *** translit(dnm, m, l) AM_CONDITIONAL(USE_VCD, true) GST_CHECK_FEATURE(VCD, [Video CD], vcdsrc, [ @@ -1786,6 +1792,7 @@ sys/dxr3/Makefile sys/glsink/Makefile sys/oss/Makefile sys/qcam/Makefile +sys/sunaudio/Makefile sys/v4l/Makefile sys/v4l2/Makefile sys/vcd/Makefile diff --git a/examples/Makefile.am b/examples/Makefile.am index d2537f2..0c8190c 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -10,5 +10,11 @@ else GTK_SUBDIRS= 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 diff --git a/gst/ffmpegcolorspace/gstffmpegcodecmap.c b/gst/ffmpegcolorspace/gstffmpegcodecmap.c index 9e0d1d5..feb493a 100644 --- a/gst/ffmpegcolorspace/gstffmpegcodecmap.c +++ b/gst/ffmpegcolorspace/gstffmpegcodecmap.c @@ -34,12 +34,23 @@ * See below for why we use this. */ +#ifdef G_HAVE_ISO_VARARGS #define GST_FF_VID_CAPS_NEW(mimetype, ...) \ 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, \ __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 * to a GstCaps. If the context is ommitted, no fixed values diff --git a/gst/ffmpegcolorspace/imgconvert.c b/gst/ffmpegcolorspace/imgconvert.c index 13248f3..be60c2e 100644 --- a/gst/ffmpegcolorspace/imgconvert.c +++ b/gst/ffmpegcolorspace/imgconvert.c @@ -70,153 +70,193 @@ PixFmtInfo; /* this table gives more information about formats */ static PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { /* YUV formats */ - [PIX_FMT_YUV420P] = { - .name = "yuv420p", - .nb_channels = 3, - .color_type = FF_COLOR_YUV, - .pixel_type = FF_PIXEL_PLANAR, - .depth = 8, - .x_chroma_shift = 1,.y_chroma_shift = 1, + /* [PIX_FMT_YUV420P] = */ { + /* .name = */ "yuv420p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 1, + /* .y_chroma_shift = */ 1, + /* .depth = */ 8, }, - [PIX_FMT_YUV422P] = { - .name = "yuv422p", - .nb_channels = 3, - .color_type = FF_COLOR_YUV, - .pixel_type = FF_PIXEL_PLANAR, - .depth = 8, - .x_chroma_shift = 1,.y_chroma_shift = 0, + /* [PIX_FMT_YUV422P] = */ { + /* .name = */ "yuv422p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 1, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, }, - [PIX_FMT_YUV444P] = { - .name = "yuv444p", - .nb_channels = 3, - .color_type = FF_COLOR_YUV, - .pixel_type = FF_PIXEL_PLANAR, - .depth = 8, - .x_chroma_shift = 0,.y_chroma_shift = 0, + /* [PIX_FMT_YUV444P] = */ { + /* .name = */ "yuv444p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, }, - [PIX_FMT_YUV422] = { - .name = "yuv422", - .nb_channels = 1, - .color_type = FF_COLOR_YUV, - .pixel_type = FF_PIXEL_PACKED, - .depth = 8, - .x_chroma_shift = 1,.y_chroma_shift = 0, + /* [PIX_FMT_YUV422] = */ { + /* .name = */ "yuv422", + /* .nb_channels = */ 1, + /* .color_type = */ FF_COLOR_YUV, + /* .pixel_type = */ FF_PIXEL_PACKED, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 1, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, }, - [PIX_FMT_YUV410P] = { - .name = "yuv410p", - .nb_channels = 3, - .color_type = FF_COLOR_YUV, - .pixel_type = FF_PIXEL_PLANAR, - .depth = 8, - .x_chroma_shift = 2,.y_chroma_shift = 2, + /* [PIX_FMT_YUV410P] = */ { + /* .name = */ "yuv410p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 2, + /* .y_chroma_shift = */ 2, + /* .depth = */ 8, }, - [PIX_FMT_YUV411P] = { - .name = "yuv411p", - .nb_channels = 3, - .color_type = FF_COLOR_YUV, - .pixel_type = FF_PIXEL_PLANAR, - .depth = 8, - .x_chroma_shift = 2,.y_chroma_shift = 0, + /* [PIX_FMT_YUV411P] = */ { + /* .name = */ "yuv411p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 2, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, }, /* JPEG YUV */ - [PIX_FMT_YUVJ420P] = { - .name = "yuvj420p", - .nb_channels = 3, - .color_type = FF_COLOR_YUV_JPEG, - .pixel_type = FF_PIXEL_PLANAR, - .depth = 8, - .x_chroma_shift = 1,.y_chroma_shift = 1, + /* [PIX_FMT_YUVJ420P] = */ { + /* .name = */ "yuvj420p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV_JPEG, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 1, + /* .y_chroma_shift = */ 1, + /* .depth = */ 8, }, - [PIX_FMT_YUVJ422P] = { - .name = "yuvj422p", - .nb_channels = 3, - .color_type = FF_COLOR_YUV_JPEG, - .pixel_type = FF_PIXEL_PLANAR, - .depth = 8, - .x_chroma_shift = 1,.y_chroma_shift = 0, + /* [PIX_FMT_YUVJ422P] = */ { + /* .name = */ "yuvj422p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV_JPEG, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 1, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, }, - [PIX_FMT_YUVJ444P] = { - .name = "yuvj444p", - .nb_channels = 3, - .color_type = FF_COLOR_YUV_JPEG, - .pixel_type = FF_PIXEL_PLANAR, - .depth = 8, - .x_chroma_shift = 0,.y_chroma_shift = 0, + /* [PIX_FMT_YUVJ444P] = */ { + /* .name = */ "yuvj444p", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_YUV_JPEG, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, }, /* RGB formats */ - [PIX_FMT_RGB24] = { - .name = "rgb24", - .nb_channels = 3, - .color_type = FF_COLOR_RGB, - .pixel_type = FF_PIXEL_PACKED, - .depth = 8, - .x_chroma_shift = 0,.y_chroma_shift = 0, + /* [PIX_FMT_RGB24] = */ { + /* .name = */ "rgb24", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_RGB, + /* .pixel_type = */ FF_PIXEL_PACKED, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, }, - [PIX_FMT_BGR24] = { - .name = "bgr24", - .nb_channels = 3, - .color_type = FF_COLOR_RGB, - .pixel_type = FF_PIXEL_PACKED, - .depth = 8, - .x_chroma_shift = 0,.y_chroma_shift = 0, + /* [PIX_FMT_BGR24] = */ { + /* .name = */ "bgr24", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_RGB, + /* .pixel_type = */ FF_PIXEL_PACKED, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, }, - [PIX_FMT_RGBA32] = { - .name = "rgba32", - .nb_channels = 4,.is_alpha = 1, - .color_type = FF_COLOR_RGB, - .pixel_type = FF_PIXEL_PACKED, - .depth = 8, - .x_chroma_shift = 0,.y_chroma_shift = 0, + /* [PIX_FMT_RGBA32] = */ { + /* .name = */ "rgba32", + /* .nb_channels = */ 4, + /* .color_type = */ FF_COLOR_RGB, + /* .pixel_type = */ FF_PIXEL_PACKED, + /* .is_alpha = */ 1, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, }, - [PIX_FMT_RGB565] = { - .name = "rgb565", - .nb_channels = 3, - .color_type = FF_COLOR_RGB, - .pixel_type = FF_PIXEL_PACKED, - .depth = 5, - .x_chroma_shift = 0,.y_chroma_shift = 0, + /* [PIX_FMT_RGB565] = */ { + /* .name = */ "rgb565", + /* .nb_channels = */ 3, + /* .color_type = */ FF_COLOR_RGB, + /* .pixel_type = */ FF_PIXEL_PACKED, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, + /* .depth = */ 5, }, - [PIX_FMT_RGB555] = { - .name = "rgb555", - .nb_channels = 4,.is_alpha = 1, - .color_type = FF_COLOR_RGB, - .pixel_type = FF_PIXEL_PACKED, - .depth = 5, - .x_chroma_shift = 0,.y_chroma_shift = 0, + /* [PIX_FMT_RGB555] = */ { + /* .name = */ "rgb555", + /* .nb_channels = */ 4, + /* .color_type = */ FF_COLOR_RGB, + /* .pixel_type = */ FF_PIXEL_PACKED, + /* .is_alpha = */ 1, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, + /* .depth = */ 5, }, /* gray / mono formats */ - [PIX_FMT_GRAY8] = { - .name = "gray", - .nb_channels = 1, - .color_type = FF_COLOR_GRAY, - .pixel_type = FF_PIXEL_PLANAR, - .depth = 8, + /* [PIX_FMT_GRAY8] = */ { + /* .name = */ "gray", + /* .nb_channels = */ 1, + /* .color_type = */ FF_COLOR_GRAY, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, + /* .depth = */ 8, }, - [PIX_FMT_MONOWHITE] = { - .name = "monow", - .nb_channels = 1, - .color_type = FF_COLOR_GRAY, - .pixel_type = FF_PIXEL_PLANAR, - .depth = 1, + /* [PIX_FMT_MONOWHITE] = */ { + /* .name = */ "monow", + /* .nb_channels = */ 1, + /* .color_type = */ FF_COLOR_GRAY, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, + /* .depth = */ 1, }, - [PIX_FMT_MONOBLACK] = { - .name = "monob", - .nb_channels = 1, - .color_type = FF_COLOR_GRAY, - .pixel_type = FF_PIXEL_PLANAR, - .depth = 1, + /* [PIX_FMT_MONOBLACK] = */ { + /* .name = */ "monob", + /* .nb_channels = */ 1, + /* .color_type = */ FF_COLOR_GRAY, + /* .pixel_type = */ FF_PIXEL_PLANAR, + /* .is_alpha = */ 0, + /* .x_chroma_shift = */ 0, + /* .y_chroma_shift = */ 0, + /* .depth = */ 1, }, /* paletted formats */ - [PIX_FMT_PAL8] = { - .name = "pal8", - .nb_channels = 4,.is_alpha = 1, - .color_type = FF_COLOR_RGB, - .pixel_type = FF_PIXEL_PALETTE, - .depth = 8, + /* [PIX_FMT_PAL8] = */ { + /* .name = */ "pal8", + /* .nb_channels = */ 4, + /* .color_type = */ FF_COLOR_RGB, + /* .pixel_type = */ FF_PIXEL_PALETTE, + /* .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 (g = 0; g < 6; g++) { 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]; } } @@ -1427,10 +1467,14 @@ gray_to_monoblack (AVPicture * dst, const AVPicture * src, gray_to_mono (dst, src, width, height, 0x00); } +typedef void (*convert_func) (AVPicture * dst, const AVPicture * src, int width, + int height); + typedef struct ConvertEntry { - void (*convert) (AVPicture * dst, - const AVPicture * src, int width, int height); + int from; + int to; + convert_func convert; } ConvertEntry; @@ -1451,151 +1495,88 @@ ConvertEntry; The other conversion functions are just optimisations for common cases. */ -static ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = { - [PIX_FMT_YUV420P] = { - [PIX_FMT_RGB555] = { - .convert = yuv420p_to_rgb555}, - [PIX_FMT_RGB565] = { - .convert = yuv420p_to_rgb565}, - [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_YUV420P] = { - .convert = rgb24_to_yuv420p}, - [PIX_FMT_RGB565] = { - .convert = rgb24_to_rgb565}, - [PIX_FMT_RGB555] = { - .convert = rgb24_to_rgb555}, - [PIX_FMT_RGBA32] = { - .convert = rgb24_to_rgba32}, - [PIX_FMT_BGR24] = { - .convert = rgb24_to_bgr24}, - [PIX_FMT_GRAY8] = { - .convert = rgb24_to_gray}, - [PIX_FMT_PAL8] = { - .convert = rgb24_to_pal8}, - [PIX_FMT_YUV444P] = { - .convert = rgb24_to_yuv444p}, - [PIX_FMT_YUVJ420P] = { - .convert = rgb24_to_yuvj420p}, - [PIX_FMT_YUVJ444P] = { - .convert = rgb24_to_yuvj444p}, - }, - [PIX_FMT_RGBA32] = { - [PIX_FMT_RGB24] = { - .convert = rgba32_to_rgb24}, - [PIX_FMT_RGB555] = { - .convert = rgba32_to_rgb555}, - [PIX_FMT_PAL8] = { - .convert = rgba32_to_pal8}, - [PIX_FMT_YUV420P] = { - .convert = rgba32_to_yuv420p}, - [PIX_FMT_GRAY8] = { - .convert = rgba32_to_gray}, - }, - [PIX_FMT_BGR24] = { - [PIX_FMT_RGB24] = { - .convert = bgr24_to_rgb24}, - [PIX_FMT_YUV420P] = { - .convert = bgr24_to_yuv420p}, - [PIX_FMT_GRAY8] = { - .convert = bgr24_to_gray}, - }, - [PIX_FMT_RGB555] = { - [PIX_FMT_RGB24] = { - .convert = rgb555_to_rgb24}, - [PIX_FMT_RGBA32] = { - .convert = rgb555_to_rgba32}, - [PIX_FMT_YUV420P] = { - .convert = rgb555_to_yuv420p}, - [PIX_FMT_GRAY8] = { - .convert = rgb555_to_gray}, - }, - [PIX_FMT_RGB565] = { - [PIX_FMT_RGB24] = { - .convert = rgb565_to_rgb24}, - [PIX_FMT_YUV420P] = { - .convert = rgb565_to_yuv420p}, - [PIX_FMT_GRAY8] = { - .convert = rgb565_to_gray}, - }, - [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 ConvertEntry convert_table[] = { + {PIX_FMT_YUV420P, PIX_FMT_RGB24, yuv420p_to_rgb24}, + {PIX_FMT_YUV420P, PIX_FMT_BGR24, yuv420p_to_bgr24}, + {PIX_FMT_YUV420P, PIX_FMT_RGBA32, yuv420p_to_rgba32}, + {PIX_FMT_YUV420P, PIX_FMT_RGB565, yuv420p_to_rgb565}, + {PIX_FMT_YUV420P, PIX_FMT_RGB555, yuv420p_to_rgb555}, + + {PIX_FMT_YUV422P, PIX_FMT_YUV422, yuv422p_to_yuv422}, + {PIX_FMT_YUV444P, PIX_FMT_RGB24, yuv444p_to_rgb24}, + {PIX_FMT_YUV422, PIX_FMT_YUV420P, yuv422_to_yuv420p}, + {PIX_FMT_YUV422, PIX_FMT_YUV422P, yuv422_to_yuv422p}, + + {PIX_FMT_YUVJ420P, PIX_FMT_RGB555, yuvj420p_to_rgb555}, + {PIX_FMT_YUVJ420P, PIX_FMT_RGB565, yuvj420p_to_rgb565}, + {PIX_FMT_YUVJ420P, PIX_FMT_BGR24, yuvj420p_to_bgr24}, + {PIX_FMT_YUVJ420P, PIX_FMT_RGB24, yuvj420p_to_rgb24}, + {PIX_FMT_YUVJ420P, PIX_FMT_RGBA32, yuvj420p_to_rgba32}, + {PIX_FMT_YUVJ444P, PIX_FMT_RGB24, yuvj444p_to_rgb24}, + + {PIX_FMT_RGB24, PIX_FMT_YUV420P, rgb24_to_yuv420p}, + {PIX_FMT_RGB24, PIX_FMT_RGB565, rgb24_to_rgb565}, + {PIX_FMT_RGB24, PIX_FMT_RGB555, rgb24_to_rgb555}, + {PIX_FMT_RGB24, PIX_FMT_RGBA32, rgb24_to_rgba32}, + {PIX_FMT_RGB24, PIX_FMT_BGR24, rgb24_to_bgr24}, + {PIX_FMT_RGB24, PIX_FMT_GRAY8, rgb24_to_gray}, + {PIX_FMT_RGB24, PIX_FMT_PAL8, rgb24_to_pal8}, + {PIX_FMT_RGB24, PIX_FMT_YUV444P, rgb24_to_yuv444p}, + {PIX_FMT_RGB24, PIX_FMT_YUVJ420P, rgb24_to_yuvj420p}, + {PIX_FMT_RGB24, PIX_FMT_YUVJ444P, rgb24_to_yuvj444p}, + + {PIX_FMT_RGBA32, PIX_FMT_RGB24, rgba32_to_rgb24}, + {PIX_FMT_RGBA32, PIX_FMT_RGB555, rgba32_to_rgb555}, + {PIX_FMT_RGBA32, PIX_FMT_PAL8, rgba32_to_pal8}, + {PIX_FMT_RGBA32, PIX_FMT_YUV420P, rgba32_to_yuv420p}, + {PIX_FMT_RGBA32, PIX_FMT_GRAY8, rgba32_to_gray}, + + {PIX_FMT_BGR24, PIX_FMT_RGB24, bgr24_to_rgb24}, + {PIX_FMT_BGR24, PIX_FMT_YUV420P, bgr24_to_yuv420p}, + {PIX_FMT_BGR24, PIX_FMT_GRAY8, bgr24_to_gray}, + + {PIX_FMT_RGB555, PIX_FMT_RGB24, rgb555_to_rgb24}, + {PIX_FMT_RGB555, PIX_FMT_RGBA32, rgb555_to_rgba32}, + {PIX_FMT_RGB555, PIX_FMT_YUV420P, rgb555_to_yuv420p}, + {PIX_FMT_RGB555, PIX_FMT_GRAY8, rgb555_to_gray}, + + {PIX_FMT_RGB565, PIX_FMT_RGB24, rgb565_to_rgb24}, + {PIX_FMT_RGB565, PIX_FMT_YUV420P, rgb565_to_yuv420p}, + {PIX_FMT_RGB565, PIX_FMT_GRAY8, rgb565_to_gray}, + + {PIX_FMT_GRAY8, PIX_FMT_RGB555, gray_to_rgb555}, + {PIX_FMT_GRAY8, PIX_FMT_RGB565, gray_to_rgb565}, + {PIX_FMT_GRAY8, PIX_FMT_RGB24, gray_to_rgb24}, + {PIX_FMT_GRAY8, PIX_FMT_BGR24, gray_to_bgr24}, + {PIX_FMT_GRAY8, PIX_FMT_RGBA32, gray_to_rgba32}, + {PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, gray_to_monowhite}, + {PIX_FMT_GRAY8, PIX_FMT_MONOBLACK, gray_to_monoblack}, + + {PIX_FMT_MONOWHITE, PIX_FMT_GRAY8, monowhite_to_gray}, + + {PIX_FMT_MONOBLACK, PIX_FMT_GRAY8, monoblack_to_gray}, + + {PIX_FMT_PAL8, PIX_FMT_RGB555, pal8_to_rgb555}, + {PIX_FMT_PAL8, PIX_FMT_RGB565, pal8_to_rgb565}, + {PIX_FMT_PAL8, PIX_FMT_BGR24, pal8_to_bgr24}, + {PIX_FMT_PAL8, PIX_FMT_RGB24, pal8_to_rgb24}, + {PIX_FMT_PAL8, PIX_FMT_RGBA32, 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 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; } - ce = &convert_table[src_pix_fmt][dst_pix_fmt]; + ce = convert_table_lookup (src_pix_fmt, dst_pix_fmt); if (ce->convert) { /* specific convertion routine */ ce->convert (dst, src, dst_width, dst_height); diff --git a/gst/ffmpegcolorspace/imgconvert_template.h b/gst/ffmpegcolorspace/imgconvert_template.h index cd5a731..dd32174 100644 --- a/gst/ffmpegcolorspace/imgconvert_template.h +++ b/gst/ffmpegcolorspace/imgconvert_template.h @@ -18,7 +18,7 @@ */ #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 static void glue(yuv420p_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src, diff --git a/sys/Makefile.am b/sys/Makefile.am index ff51384..96563de 100644 --- a/sys/Makefile.am +++ b/sys/Makefile.am @@ -16,6 +16,12 @@ else QCAM_DIR= endif +if USE_SUNAUDIO +SUNAUDIO_DIR=sunaudio +else +SUNAUDIO_DIR= +endif + if USE_V4L V4L_DIR=v4l else @@ -52,7 +58,7 @@ else CDROM_DIR= endif -SUBDIRS=$(DXR3_DIR) $(OSS_DIR) $(QCAM_DIR) $(V4L_DIR) $(V4L2_DIR) \ - $(VCD_DIR) $(CDROM_DIR) $(XI_DIR) $(XV_DIR) +SUBDIRS=$(DXR3_DIR) $(OSS_DIR) $(SUNAUDIO_DIR) $(QCAM_DIR) $(V4L_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 diff --git a/tests/old/examples/Makefile.am b/tests/old/examples/Makefile.am index d2537f2..0c8190c 100644 --- a/tests/old/examples/Makefile.am +++ b/tests/old/examples/Makefile.am @@ -10,5 +10,11 @@ else GTK_SUBDIRS= 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