Commit db0a2f51 authored by Wim Taymans's avatar Wim Taymans

videoconvert: renamed from colorspace

parent b94f9793
...@@ -426,7 +426,7 @@ AG_GST_CHECK_PLUGIN(audiorate) ...@@ -426,7 +426,7 @@ AG_GST_CHECK_PLUGIN(audiorate)
AG_GST_CHECK_PLUGIN(audiotestsrc) AG_GST_CHECK_PLUGIN(audiotestsrc)
AG_GST_CHECK_PLUGIN(encoding) AG_GST_CHECK_PLUGIN(encoding)
AG_GST_CHECK_PLUGIN(ffmpegcolorspace) AG_GST_CHECK_PLUGIN(ffmpegcolorspace)
AG_GST_CHECK_PLUGIN(colorspace) AG_GST_CHECK_PLUGIN(videoconvert)
AG_GST_CHECK_PLUGIN(gdp) AG_GST_CHECK_PLUGIN(gdp)
AG_GST_CHECK_PLUGIN(playback) AG_GST_CHECK_PLUGIN(playback)
AG_GST_CHECK_PLUGIN(audioresample) AG_GST_CHECK_PLUGIN(audioresample)
...@@ -863,7 +863,7 @@ gst/audioconvert/Makefile ...@@ -863,7 +863,7 @@ gst/audioconvert/Makefile
gst/audiorate/Makefile gst/audiorate/Makefile
gst/audiotestsrc/Makefile gst/audiotestsrc/Makefile
gst/encoding/Makefile gst/encoding/Makefile
gst/colorspace/Makefile gst/videoconvert/Makefile
gst/ffmpegcolorspace/Makefile gst/ffmpegcolorspace/Makefile
gst/gdp/Makefile gst/gdp/Makefile
gst/playback/Makefile gst/playback/Makefile
......
plugin_LTLIBRARIES = libgstcolorspace.la plugin_LTLIBRARIES = libgstvideoconvert.la
ORC_SOURCE=gstcolorspaceorc ORC_SOURCE=gstvideoconvertorc
include $(top_srcdir)/common/orc.mak include $(top_srcdir)/common/orc.mak
libgstcolorspace_la_SOURCES = gstcolorspace.c colorspace.c libgstvideoconvert_la_SOURCES = gstvideoconvert.c videoconvert.c
nodist_libgstcolorspace_la_SOURCES = $(ORC_NODIST_SOURCES) nodist_libgstvideoconvert_la_SOURCES = $(ORC_NODIST_SOURCES)
libgstcolorspace_la_CFLAGS = \ libgstvideoconvert_la_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \
$(GST_CFLAGS) \ $(GST_CFLAGS) \
$(ORC_CFLAGS) $(ORC_CFLAGS)
libgstcolorspace_la_LIBADD = \ libgstvideoconvert_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \ $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) \
$(GST_BASE_LIBS) \ $(GST_BASE_LIBS) \
$(GST_LIBS) \ $(GST_LIBS) \
$(ORC_LIBS) $(ORC_LIBS)
libgstcolorspace_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstvideoconvert_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstcolorspace_la_LIBTOOLFLAGS = --tag=disable-static libgstvideoconvert_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = gstcolorspace.h colorspace.h noinst_HEADERS = gstvideoconvert.h videoconvert.h
Android.mk: Makefile.am $(BUILT_SOURCES) Android.mk: Makefile.am $(BUILT_SOURCES)
androgenizer \ androgenizer \
-:PROJECT libgstcolorspace -:SHARED libgstcolorspace \ -:PROJECT libgstvideoconvert -:SHARED libgstvideoconvert \
-:TAGS eng debug \ -:TAGS eng debug \
-:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
-:SOURCES $(libgstcolorspace_la_SOURCES) \ -:SOURCES $(libgstvideoconvert_la_SOURCES) \
$(nodist_libgstcolorspace_la_SOURCES) \ $(nodist_libgstvideoconvert_la_SOURCES) \
-:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstcolorspace_la_CFLAGS) \ -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgstvideoconvert_la_CFLAGS) \
-:LDFLAGS $(libgstcolorspace_la_LDFLAGS) \ -:LDFLAGS $(libgstvideoconvert_la_LDFLAGS) \
$(libgstcolorspace_la_LIBADD) \ $(libgstvideoconvert_la_LIBADD) \
-ldl \ -ldl \
-:PASSTHROUGH LOCAL_ARM_MODE:=arm \ -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \ LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-0.10' \
......
...@@ -19,31 +19,32 @@ ...@@ -19,31 +19,32 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#ifndef __GST_COLORSPACE_H__ #ifndef __GST_VIDEOCONVERT_H__
#define __GST_COLORSPACE_H__ #define __GST_VIDEOCONVERT_H__
#include <gst/gst.h> #include <gst/gst.h>
#include <gst/video/video.h> #include <gst/video/video.h>
#include <gst/video/gstvideofilter.h> #include <gst/video/gstvideofilter.h>
#include "colorspace.h" #include "videoconvert.h"
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_CSP (gst_csp_get_type()) #define GST_TYPE_VIDEO_CONVERT (gst_video_convert_get_type())
#define GST_CSP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CSP,GstCsp)) #define GST_VIDEO_CONVERT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VIDEO_CONVERT,GstVideoConvert))
#define GST_CSP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CSP,GstCspClass)) #define GST_VIDEO_CONVERT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VIDEO_CONVERT,GstVideoConvertClass))
#define GST_IS_CSP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CSP)) #define GST_IS_VIDEO_CONVERT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VIDEO_CONVERT))
#define GST_IS_CSP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CSP)) #define GST_IS_VIDEO_CONVERT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VIDEO_CONVERT))
#define GST_VIDEO_CONVERT_CAST(obj) ((GstVideoConvert *)(obj))
typedef struct _GstCsp GstCsp; typedef struct _GstVideoConvert GstVideoConvert;
typedef struct _GstCspClass GstCspClass; typedef struct _GstVideoConvertClass GstVideoConvertClass;
/** /**
* GstCsp: * GstVideoConvert:
* *
* Opaque object data structure. * Opaque object data structure.
*/ */
struct _GstCsp { struct _GstVideoConvert {
GstVideoFilter element; GstVideoFilter element;
gint width, height; gint width, height;
...@@ -55,15 +56,15 @@ struct _GstCsp { ...@@ -55,15 +56,15 @@ struct _GstCsp {
GstVideoFormat to_format; GstVideoFormat to_format;
ColorSpaceColorSpec to_spec; ColorSpaceColorSpec to_spec;
ColorspaceConvert *convert; VideoConvert *convert;
gboolean dither; gboolean dither;
}; };
struct _GstCspClass struct _GstVideoConvertClass
{ {
GstVideoFilterClass parent_class; GstVideoFilterClass parent_class;
}; };
G_END_DECLS G_END_DECLS
#endif /* __GST_COLORSPACE_H__ */ #endif /* __GST_VIDEOCONVERT_H__ */
/* Colorspace conversion functions /* Video conversion functions
* Copyright (C) 2010 David Schleef <ds@schleef.org> * Copyright (C) 2010 David Schleef <ds@schleef.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
G_BEGIN_DECLS G_BEGIN_DECLS
typedef struct _ColorspaceConvert ColorspaceConvert; typedef struct _VideoConvert VideoConvert;
typedef struct _ColorspaceFrame ColorspaceComponent; typedef struct _VideoFrame VideoComponent;
typedef enum { typedef enum {
COLOR_SPEC_NONE = 0, COLOR_SPEC_NONE = 0,
...@@ -41,12 +41,12 @@ typedef enum { ...@@ -41,12 +41,12 @@ typedef enum {
DITHER_HALFTONE DITHER_HALFTONE
} ColorSpaceDitherMethod; } ColorSpaceDitherMethod;
struct _ColorspaceComponent { struct _VideoComponent {
int offset; int offset;
int stride; int stride;
}; };
struct _ColorspaceConvert { struct _VideoConvert {
gint width, height; gint width, height;
gboolean interlaced; gboolean interlaced;
gboolean use_16bit; gboolean use_16bit;
...@@ -67,28 +67,28 @@ struct _ColorspaceConvert { ...@@ -67,28 +67,28 @@ struct _ColorspaceConvert {
int src_offset[4]; int src_offset[4];
int src_stride[4]; int src_stride[4];
void (*convert) (ColorspaceConvert *convert, guint8 *dest, const guint8 *src); void (*convert) (VideoConvert *convert, guint8 *dest, const guint8 *src);
void (*getline) (ColorspaceConvert *convert, guint8 *dest, const guint8 *src, int j); void (*getline) (VideoConvert *convert, guint8 *dest, const guint8 *src, int j);
void (*putline) (ColorspaceConvert *convert, guint8 *dest, const guint8 *src, int j); void (*putline) (VideoConvert *convert, guint8 *dest, const guint8 *src, int j);
void (*matrix) (ColorspaceConvert *convert); void (*matrix) (VideoConvert *convert);
void (*getline16) (ColorspaceConvert *convert, guint16 *dest, const guint8 *src, int j); void (*getline16) (VideoConvert *convert, guint16 *dest, const guint8 *src, int j);
void (*putline16) (ColorspaceConvert *convert, guint8 *dest, const guint16 *src, int j); void (*putline16) (VideoConvert *convert, guint8 *dest, const guint16 *src, int j);
void (*matrix16) (ColorspaceConvert *convert); void (*matrix16) (VideoConvert *convert);
void (*dither16) (ColorspaceConvert *convert, int j); void (*dither16) (VideoConvert *convert, int j);
}; };
ColorspaceConvert * colorspace_convert_new (GstVideoFormat to_format, VideoConvert * videoconvert_convert_new (GstVideoFormat to_format,
ColorSpaceColorSpec from_spec, GstVideoFormat from_format, ColorSpaceColorSpec from_spec, GstVideoFormat from_format,
ColorSpaceColorSpec to_spec, int width, int height); ColorSpaceColorSpec to_spec, int width, int height);
void colorspace_convert_set_dither (ColorspaceConvert * convert, int type); void videoconvert_convert_set_dither (VideoConvert * convert, int type);
void colorspace_convert_set_interlaced (ColorspaceConvert *convert, void videoconvert_convert_set_interlaced (VideoConvert *convert,
gboolean interlaced); gboolean interlaced);
void colorspace_convert_set_palette (ColorspaceConvert *convert, void videoconvert_convert_set_palette (VideoConvert *convert,
const guint32 *palette); const guint32 *palette);
const guint32 * colorspace_convert_get_palette (ColorspaceConvert *convert); const guint32 * videoconvert_convert_get_palette (VideoConvert *convert);
void colorspace_convert_free (ColorspaceConvert * convert); void videoconvert_convert_free (VideoConvert * convert);
void colorspace_convert_convert (ColorspaceConvert * convert, void videoconvert_convert_convert (VideoConvert * convert,
guint8 *dest, const guint8 *src); guint8 *dest, const guint8 *src);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment