Added the excellent mpeg2dec decoder. Not 100% optimized but allready very fast.
Original commit message from CVS: Added the excellent mpeg2dec decoder. Not 100% optimized but allready very fast. More cleanup.
This commit is contained in:
parent
dbe262dfbb
commit
c125059f97
@ -432,6 +432,7 @@ plugins/mpeg2/ac3parse/Makefile
|
||||
plugins/mpeg2/ac3dec/Makefile
|
||||
plugins/mpeg2/video/Makefile
|
||||
plugins/mpeg2/mpeg2enc/Makefile
|
||||
plugins/mpeg2/mpeg2dec/Makefile
|
||||
plugins/mpeg2/subtitles/Makefile
|
||||
plugins/mpeg2/videoparse/Makefile
|
||||
plugins/mpeg2/mpegtypes/Makefile
|
||||
|
@ -1,5 +1,5 @@
|
||||
# cheap trick to build . first...
|
||||
SUBDIRS = . types meta elements xml
|
||||
SUBDIRS = . types meta elements
|
||||
|
||||
lib_LTLIBRARIES = libgst.la
|
||||
|
||||
|
@ -15,7 +15,9 @@
|
||||
|
||||
pthread_key_t _cothread_key = -1;
|
||||
|
||||
cothread_state *cothread_create(cothread_context *ctx) {
|
||||
cothread_state*
|
||||
cothread_create (cothread_context *ctx)
|
||||
{
|
||||
cothread_state *s;
|
||||
|
||||
DEBUG("cothread: pthread_self() %ld\n",pthread_self());
|
||||
@ -50,14 +52,21 @@ cothread_state *cothread_create(cothread_context *ctx) {
|
||||
return s;
|
||||
}
|
||||
|
||||
void cothread_setfunc(cothread_state *thread,cothread_func func,int argc,char **argv) {
|
||||
void
|
||||
cothread_setfunc (cothread_state *thread,
|
||||
cothread_func func,
|
||||
int argc,
|
||||
char **argv)
|
||||
{
|
||||
thread->func = func;
|
||||
thread->argc = argc;
|
||||
thread->argv = argv;
|
||||
thread->pc = (int *)func;
|
||||
}
|
||||
|
||||
cothread_context *cothread_init() {
|
||||
cothread_context*
|
||||
cothread_init (void)
|
||||
{
|
||||
cothread_context *ctx = (cothread_context *)malloc(sizeof(cothread_context));
|
||||
|
||||
if (_cothread_key == -1) {
|
||||
@ -89,12 +98,16 @@ cothread_context *cothread_init() {
|
||||
return ctx;
|
||||
}
|
||||
|
||||
cothread_state *cothread_main(cothread_context *ctx) {
|
||||
// fprintf(stderr,"returning %p, the 0th cothread\n",ctx->threads[0]);
|
||||
cothread_state*
|
||||
cothread_main(cothread_context *ctx)
|
||||
{
|
||||
DEBUG(stderr,"returning %p, the 0th cothread\n",ctx->threads[0]);
|
||||
return ctx->threads[0];
|
||||
}
|
||||
|
||||
void cothread_stub() {
|
||||
void
|
||||
cothread_stub (void)
|
||||
{
|
||||
cothread_context *ctx = pthread_getspecific(_cothread_key);
|
||||
register cothread_state *thread = ctx->threads[ctx->current];
|
||||
|
||||
@ -109,7 +122,9 @@ void cothread_stub() {
|
||||
//printf("uh, yeah, we shouldn't be here, but we should deal anyway\n");
|
||||
}
|
||||
|
||||
void cothread_switch(cothread_state *thread) {
|
||||
void
|
||||
cothread_switch (cothread_state *thread)
|
||||
{
|
||||
cothread_context *ctx;
|
||||
cothread_state *current;
|
||||
int enter;
|
||||
|
@ -42,7 +42,8 @@ struct _cothread_context {
|
||||
|
||||
cothread_context* cothread_init();
|
||||
cothread_state* cothread_create (cothread_context *ctx);
|
||||
void cothread_setfunc(cothread_state *thread,cothread_func func,int argc,char **argv);
|
||||
void cothread_setfunc (cothread_state *thread, cothread_func func,
|
||||
int argc, char **argv);
|
||||
void cothread_switch (cothread_state *thread);
|
||||
cothread_state* cothread_main (cothread_context *ctx);
|
||||
|
||||
|
24
gst/gst.c
24
gst/gst.c
@ -29,7 +29,9 @@ extern gint _gst_trace_on;
|
||||
* Initializes the GStreamer library, setting up internal path lists,
|
||||
* registering built-in elements, and loading standard plugins.
|
||||
*/
|
||||
void gst_init(int *argc,char **argv[]) {
|
||||
void
|
||||
gst_init (int *argc, char **argv[])
|
||||
{
|
||||
GstTrace *gst_trace;
|
||||
|
||||
if (!g_thread_supported ()) g_thread_init (NULL);
|
||||
@ -42,12 +44,12 @@ void gst_init(int *argc,char **argv[]) {
|
||||
_gst_buffer_initialize ();
|
||||
|
||||
/* register some standard builtin types */
|
||||
gst_elementfactory_register(gst_elementfactory_new(
|
||||
"bin",gst_bin_get_type(),&gst_bin_details));
|
||||
gst_elementfactory_register(gst_elementfactory_new(
|
||||
"pipeline",gst_pipeline_get_type(),&gst_pipeline_details));
|
||||
gst_elementfactory_register(gst_elementfactory_new(
|
||||
"thread",gst_thread_get_type(),&gst_thread_details));
|
||||
gst_elementfactory_register (gst_elementfactory_new ("bin",
|
||||
gst_bin_get_type (), &gst_bin_details));
|
||||
gst_elementfactory_register (gst_elementfactory_new ("pipeline",
|
||||
gst_pipeline_get_type (), &gst_pipeline_details));
|
||||
gst_elementfactory_register (gst_elementfactory_new("thread",
|
||||
gst_thread_get_type (), &gst_thread_details));
|
||||
|
||||
//gst_plugin_load_elementfactory("gsttypes");
|
||||
//gst_plugin_load("libgstelements.so");
|
||||
@ -64,7 +66,9 @@ void gst_init(int *argc,char **argv[]) {
|
||||
*
|
||||
* Enter the main GStreamer processing loop
|
||||
*/
|
||||
void gst_main() {
|
||||
void
|
||||
gst_main (void)
|
||||
{
|
||||
gtk_main ();
|
||||
}
|
||||
|
||||
@ -73,6 +77,8 @@ void gst_main() {
|
||||
*
|
||||
* Exits the main GStreamer processing loop
|
||||
*/
|
||||
void gst_main_quit() {
|
||||
void
|
||||
gst_main_quit (void)
|
||||
{
|
||||
gtk_main_quit ();
|
||||
}
|
||||
|
@ -51,8 +51,8 @@
|
||||
/* initialize GST */
|
||||
void gst_init(int *argc,char **argv[]);
|
||||
|
||||
void gst_main();
|
||||
void gst_main_quit();
|
||||
void gst_main (void);
|
||||
void gst_main_quit (void);
|
||||
|
||||
/* debugging */
|
||||
#ifndef DEBUG
|
||||
|
136
gst/gstbin.c
136
gst/gstbin.c
@ -33,7 +33,7 @@ GstElementDetails gst_bin_details = {
|
||||
};
|
||||
|
||||
|
||||
void gst_bin_real_destroy(GtkObject *object);
|
||||
static void gst_bin_real_destroy (GtkObject *object);
|
||||
|
||||
static GstElementStateReturn gst_bin_change_state (GstElement *element);
|
||||
static GstElementStateReturn gst_bin_change_state_norecurse (GstBin *bin);
|
||||
@ -45,7 +45,8 @@ static void gst_bin_create_plan_func(GstBin *bin);
|
||||
static void gst_bin_iterate_func (GstBin *bin);
|
||||
|
||||
static xmlNodePtr gst_bin_save_thyself (GstElement *element, xmlNodePtr parent);
|
||||
static void gst_bin_restore_thyself(GstElement *element, xmlNodePtr parent, GHashTable *elements);
|
||||
static void gst_bin_restore_thyself (GstElement *element, xmlNodePtr parent,
|
||||
GHashTable *elements);
|
||||
|
||||
/* Bin signals and args */
|
||||
enum {
|
||||
@ -67,7 +68,8 @@ static GstElementClass *parent_class = NULL;
|
||||
static guint gst_bin_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
GtkType
|
||||
gst_bin_get_type(void) {
|
||||
gst_bin_get_type (void)
|
||||
{
|
||||
static GtkType bin_type = 0;
|
||||
|
||||
if (!bin_type) {
|
||||
@ -87,7 +89,8 @@ gst_bin_get_type(void) {
|
||||
}
|
||||
|
||||
static void
|
||||
gst_bin_class_init(GstBinClass *klass) {
|
||||
gst_bin_class_init (GstBinClass *klass)
|
||||
{
|
||||
GtkObjectClass *gtkobject_class;
|
||||
GstElementClass *gstelement_class;
|
||||
|
||||
@ -115,7 +118,9 @@ gst_bin_class_init(GstBinClass *klass) {
|
||||
gtkobject_class->destroy = gst_bin_real_destroy;
|
||||
}
|
||||
|
||||
static void gst_bin_init(GstBin *bin) {
|
||||
static void
|
||||
gst_bin_init (GstBin *bin)
|
||||
{
|
||||
bin->numchildren = 0;
|
||||
bin->children = NULL;
|
||||
bin->use_cothreads = TRUE;
|
||||
@ -129,7 +134,9 @@ static void gst_bin_init(GstBin *bin) {
|
||||
*
|
||||
* Returns: new bin
|
||||
*/
|
||||
GstElement *gst_bin_new(gchar *name) {
|
||||
GstElement*
|
||||
gst_bin_new (gchar *name)
|
||||
{
|
||||
GstElement *bin = GST_ELEMENT (gtk_type_new (GST_TYPE_BIN));
|
||||
gst_element_set_name (GST_ELEMENT (bin), name);
|
||||
return bin;
|
||||
@ -143,7 +150,10 @@ GstElement *gst_bin_new(gchar *name) {
|
||||
* Add the given element to the bin. Set the elements parent, and thus
|
||||
* add a reference.
|
||||
*/
|
||||
void gst_bin_add(GstBin *bin,GstElement *element) {
|
||||
void
|
||||
gst_bin_add (GstBin *bin,
|
||||
GstElement *element)
|
||||
{
|
||||
g_return_if_fail (bin != NULL);
|
||||
g_return_if_fail (GST_IS_BIN (bin));
|
||||
g_return_if_fail (element != NULL);
|
||||
@ -171,7 +181,10 @@ void gst_bin_add(GstBin *bin,GstElement *element) {
|
||||
*
|
||||
* Remove the element from its associated bin, unparenting as well.
|
||||
*/
|
||||
void gst_bin_remove(GstBin *bin,GstElement *element) {
|
||||
void
|
||||
gst_bin_remove (GstBin *bin,
|
||||
GstElement *element)
|
||||
{
|
||||
g_return_if_fail (bin != NULL);
|
||||
g_return_if_fail (GST_IS_BIN (bin));
|
||||
g_return_if_fail (element != NULL);
|
||||
@ -192,12 +205,15 @@ void gst_bin_remove(GstBin *bin,GstElement *element) {
|
||||
}
|
||||
|
||||
|
||||
static GstElementStateReturn gst_bin_change_state(GstElement *element) {
|
||||
static GstElementStateReturn
|
||||
gst_bin_change_state (GstElement *element)
|
||||
{
|
||||
GstBin *bin;
|
||||
GList *children;
|
||||
GstElement *child;
|
||||
|
||||
g_return_val_if_fail (GST_IS_BIN (element), GST_STATE_FAILURE);
|
||||
|
||||
bin = GST_BIN (element);
|
||||
|
||||
g_print("gst_bin_change_state(\"%s\"): currently %d(%s), %d(%s) pending\n",
|
||||
@ -242,7 +258,9 @@ static GstElementStateReturn gst_bin_change_state(GstElement *element) {
|
||||
}
|
||||
|
||||
|
||||
static GstElementStateReturn gst_bin_change_state_norecurse(GstBin *bin) {
|
||||
static GstElementStateReturn
|
||||
gst_bin_change_state_norecurse (GstBin *bin)
|
||||
{
|
||||
|
||||
if (GST_ELEMENT_CLASS (parent_class)->change_state)
|
||||
return GST_ELEMENT_CLASS (parent_class)->change_state (GST_ELEMENT (bin));
|
||||
@ -250,9 +268,11 @@ static GstElementStateReturn gst_bin_change_state_norecurse(GstBin *bin) {
|
||||
return GST_STATE_FAILURE;
|
||||
}
|
||||
|
||||
static gboolean gst_bin_change_state_type(GstBin *bin,
|
||||
static gboolean
|
||||
gst_bin_change_state_type(GstBin *bin,
|
||||
GstElementState state,
|
||||
GtkType type) {
|
||||
GtkType type)
|
||||
{
|
||||
GList *children;
|
||||
GstElement *child;
|
||||
|
||||
@ -292,9 +312,11 @@ static gboolean gst_bin_change_state_type(GstBin *bin,
|
||||
*
|
||||
* Returns: indication if the state change was successfull
|
||||
*/
|
||||
gboolean gst_bin_set_state_type(GstBin *bin,
|
||||
gboolean
|
||||
gst_bin_set_state_type (GstBin *bin,
|
||||
GstElementState state,
|
||||
GtkType type) {
|
||||
GtkType type)
|
||||
{
|
||||
GstBinClass *oclass;
|
||||
|
||||
DEBUG("gst_bin_set_state_type(\"%s\",%d,%d)\n",
|
||||
@ -310,7 +332,9 @@ gboolean gst_bin_set_state_type(GstBin *bin,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void gst_bin_real_destroy(GtkObject *object) {
|
||||
static void
|
||||
gst_bin_real_destroy (GtkObject *object)
|
||||
{
|
||||
GstBin *bin = GST_BIN (object);
|
||||
GList *children;
|
||||
GstElement *child;
|
||||
@ -336,7 +360,10 @@ void gst_bin_real_destroy(GtkObject *object) {
|
||||
*
|
||||
* Returns: the element with the given name
|
||||
*/
|
||||
GstElement *gst_bin_get_by_name(GstBin *bin,gchar *name) {
|
||||
GstElement*
|
||||
gst_bin_get_by_name (GstBin *bin,
|
||||
gchar *name)
|
||||
{
|
||||
GList *children;
|
||||
GstElement *child;
|
||||
|
||||
@ -344,7 +371,9 @@ GstElement *gst_bin_get_by_name(GstBin *bin,gchar *name) {
|
||||
g_return_val_if_fail (GST_IS_BIN (bin), NULL);
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
|
||||
g_print("gstbin: lookup element \"%s\" in \"%s\"\n", name, gst_element_get_name(GST_ELEMENT(bin)));
|
||||
g_print("gstbin: lookup element \"%s\" in \"%s\"\n", name,
|
||||
gst_element_get_name (GST_ELEMENT (bin)));
|
||||
|
||||
children = bin->children;
|
||||
while (children) {
|
||||
child = GST_ELEMENT (children->data);
|
||||
@ -369,14 +398,19 @@ GstElement *gst_bin_get_by_name(GstBin *bin,gchar *name) {
|
||||
*
|
||||
* Returns: a GList of elements
|
||||
*/
|
||||
GList *gst_bin_get_list(GstBin *bin) {
|
||||
GList*
|
||||
gst_bin_get_list (GstBin *bin)
|
||||
{
|
||||
g_return_val_if_fail (bin != NULL, NULL);
|
||||
g_return_val_if_fail (GST_IS_BIN (bin), NULL);
|
||||
|
||||
return bin->children;
|
||||
}
|
||||
|
||||
static xmlNodePtr gst_bin_save_thyself(GstElement *element, xmlNodePtr parent) {
|
||||
static xmlNodePtr
|
||||
gst_bin_save_thyself (GstElement *element,
|
||||
xmlNodePtr parent)
|
||||
{
|
||||
GstBin *bin = GST_BIN (element);
|
||||
xmlNodePtr childlist;
|
||||
GList *children;
|
||||
@ -396,7 +430,11 @@ static xmlNodePtr gst_bin_save_thyself(GstElement *element, xmlNodePtr parent) {
|
||||
return childlist;
|
||||
}
|
||||
|
||||
static void gst_bin_restore_thyself(GstElement *element, xmlNodePtr parent, GHashTable *elements) {
|
||||
static void
|
||||
gst_bin_restore_thyself (GstElement *element,
|
||||
xmlNodePtr parent,
|
||||
GHashTable *elements)
|
||||
{
|
||||
GstBin *bin = GST_BIN (element);
|
||||
xmlNodePtr field = parent->childs;
|
||||
xmlNodePtr childlist;
|
||||
@ -421,7 +459,10 @@ static void gst_bin_restore_thyself(GstElement *element, xmlNodePtr parent, GHas
|
||||
|
||||
}
|
||||
|
||||
void gst_bin_use_cothreads(GstBin *bin, gboolean enabled) {
|
||||
void
|
||||
gst_bin_use_cothreads (GstBin *bin,
|
||||
gboolean enabled)
|
||||
{
|
||||
g_return_if_fail (GST_IS_BIN (bin));
|
||||
|
||||
bin->use_cothreads = enabled;
|
||||
@ -433,12 +474,15 @@ void gst_bin_use_cothreads(GstBin *bin, gboolean enabled) {
|
||||
*
|
||||
* iterates over the elements in this bin
|
||||
*/
|
||||
void gst_bin_iterate(GstBin *bin) {
|
||||
void
|
||||
gst_bin_iterate (GstBin *bin)
|
||||
{
|
||||
GstBinClass *oclass;
|
||||
|
||||
oclass = GST_BIN_CLASS (GTK_OBJECT (bin)->klass);
|
||||
|
||||
DEBUG("gst_bin_iterate()\n");
|
||||
|
||||
if (oclass->iterate)
|
||||
(oclass->iterate) (bin);
|
||||
}
|
||||
@ -449,7 +493,9 @@ void gst_bin_iterate(GstBin *bin) {
|
||||
*
|
||||
* let the bin figure out how to handle the plugins in it.
|
||||
*/
|
||||
void gst_bin_create_plan(GstBin *bin) {
|
||||
void
|
||||
gst_bin_create_plan (GstBin *bin)
|
||||
{
|
||||
GstBinClass *oclass;
|
||||
|
||||
oclass = GST_BIN_CLASS (GTK_OBJECT (bin)->klass);
|
||||
@ -458,7 +504,9 @@ void gst_bin_create_plan(GstBin *bin) {
|
||||
(oclass->create_plan) (bin);
|
||||
}
|
||||
|
||||
static int gst_bin_loopfunc_wrapper(int argc,char *argv[]) {
|
||||
static int
|
||||
gst_bin_loopfunc_wrapper (int argc,char *argv[])
|
||||
{
|
||||
GstElement *element = GST_ELEMENT (argv);
|
||||
GList *pads;
|
||||
GstPad *pad;
|
||||
@ -506,7 +554,9 @@ static int gst_bin_loopfunc_wrapper(int argc,char *argv[]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void gst_bin_pullfunc_wrapper(GstPad *pad) {
|
||||
static void
|
||||
gst_bin_pullfunc_wrapper (GstPad *pad)
|
||||
{
|
||||
DEBUG("** in gst_bin_pullfunc_wrapper()============================= %s\n",
|
||||
gst_element_get_name (GST_ELEMENT (pad->parent)));
|
||||
cothread_switch (GST_ELEMENT (pad->parent)->threadstate);
|
||||
@ -514,7 +564,9 @@ static void gst_bin_pullfunc_wrapper(GstPad *pad) {
|
||||
gst_element_get_name (GST_ELEMENT (pad->parent)));
|
||||
}
|
||||
|
||||
static void gst_bin_pushfunc_wrapper(GstPad *pad) {
|
||||
static void
|
||||
gst_bin_pushfunc_wrapper (GstPad *pad)
|
||||
{
|
||||
DEBUG("** in gst_bin_pushfunc_wrapper()============================= %s\n",
|
||||
gst_element_get_name (GST_ELEMENT (pad->parent)));
|
||||
cothread_switch (GST_ELEMENT (pad->parent)->threadstate);
|
||||
@ -522,7 +574,9 @@ static void gst_bin_pushfunc_wrapper(GstPad *pad) {
|
||||
gst_element_get_name (GST_ELEMENT (pad->parent)));
|
||||
}
|
||||
|
||||
static void gst_bin_create_plan_func(GstBin *bin) {
|
||||
static void
|
||||
gst_bin_create_plan_func (GstBin *bin)
|
||||
{
|
||||
GList *elements;
|
||||
GstElement *element;
|
||||
int sink_pads;
|
||||
@ -537,16 +591,26 @@ static void gst_bin_create_plan_func(GstBin *bin) {
|
||||
elements = bin->children;
|
||||
while (elements) {
|
||||
element = GST_ELEMENT (elements->data);
|
||||
g_print("gstbin: found element \"%s\" in bin \"%s\"\n", gst_element_get_name(element), gst_element_get_name(GST_ELEMENT(bin)));
|
||||
|
||||
g_print("gstbin: found element \"%s\" in bin \"%s\"\n",
|
||||
gst_element_get_name (element),
|
||||
gst_element_get_name (GST_ELEMENT (bin)));
|
||||
|
||||
// if it's a loop-based element, use cothreads
|
||||
if (element->loopfunc != NULL) {
|
||||
g_print("gstbin: loop based element \"%s\" in bin \"%s\"\n", gst_element_get_name(element), gst_element_get_name(GST_ELEMENT(bin)));
|
||||
g_print("gstbin: loop based element \"%s\" in bin \"%s\"\n",
|
||||
gst_element_get_name (element),
|
||||
gst_element_get_name (GST_ELEMENT (bin)));
|
||||
|
||||
bin->need_cothreads = TRUE;
|
||||
break;
|
||||
}
|
||||
// if it's a complex element, use cothreads
|
||||
else if (GST_ELEMENT_IS_MULTI_IN (element)) {
|
||||
g_print("gstbin: complex element \"%s\" in bin \"%s\"\n", gst_element_get_name(element), gst_element_get_name(GST_ELEMENT(bin)));
|
||||
g_print("gstbin: complex element \"%s\" in bin \"%s\"\n",
|
||||
gst_element_get_name (element),
|
||||
gst_element_get_name (GST_ELEMENT (bin)));
|
||||
|
||||
bin->need_cothreads = TRUE;
|
||||
break;
|
||||
}
|
||||
@ -560,7 +624,10 @@ static void gst_bin_create_plan_func(GstBin *bin) {
|
||||
pads = g_list_next (pads);
|
||||
}
|
||||
if (sink_pads > 1) {
|
||||
g_print("gstbin: more than 1 sinkpad for element \"%s\" in bin \"%s\"\n", gst_element_get_name(element), gst_element_get_name(GST_ELEMENT(bin)));
|
||||
g_print("gstbin: more than 1 sinkpad for element \"%s\" in bin \"%s\"\n",
|
||||
gst_element_get_name (element),
|
||||
gst_element_get_name (GST_ELEMENT (bin)));
|
||||
|
||||
bin->need_cothreads = TRUE;
|
||||
break;
|
||||
}
|
||||
@ -711,7 +778,9 @@ static void gst_bin_create_plan_func(GstBin *bin) {
|
||||
}
|
||||
}
|
||||
|
||||
void gst_bin_iterate_func(GstBin *bin) {
|
||||
void
|
||||
gst_bin_iterate_func (GstBin *bin)
|
||||
{
|
||||
GList *entries;
|
||||
GstElement *entry;
|
||||
|
||||
@ -728,9 +797,12 @@ void gst_bin_iterate_func(GstBin *bin) {
|
||||
// FIXME this should be lots more intelligent about where to start
|
||||
DEBUG("** in gst_bin_iterate_func()==================================%s\n",
|
||||
gst_element_get_name (GST_ELEMENT (bin->children->data)));
|
||||
|
||||
cothread_switch (GST_ELEMENT (bin->children->data)->threadstate);
|
||||
|
||||
DEBUG("** out gst_bin_iterate_func()==================================%s\n",
|
||||
gst_element_get_name (GST_ELEMENT (bin->children->data)));
|
||||
|
||||
} else {
|
||||
if (bin->numentries <= 0) {
|
||||
//printf("gstbin: no entries in bin \"%s\" trying children...\n", gst_element_get_name(GST_ELEMENT(bin)));
|
||||
|
@ -34,7 +34,6 @@ extern "C" {
|
||||
|
||||
extern GstElementDetails gst_bin_details;
|
||||
|
||||
|
||||
#define GST_TYPE_BIN \
|
||||
(gst_bin_get_type())
|
||||
#define GST_BIN(obj) \
|
||||
@ -90,17 +89,16 @@ GstElement *gst_bin_new(gchar *name);
|
||||
void gst_bin_add (GstBin *bin, GstElement *element);
|
||||
void gst_bin_remove (GstBin *bin, GstElement *element);
|
||||
|
||||
/* retrieve a single element or the while list of children */
|
||||
/* retrieve a single element or the list of children */
|
||||
GstElement* gst_bin_get_by_name (GstBin *bin, gchar *name);
|
||||
GList* gst_bin_get_list (GstBin *bin);
|
||||
|
||||
/* set the state for only elements of the given type */
|
||||
void gst_bin_create_plan (GstBin *bin);
|
||||
gboolean gst_bin_set_state_type (GstBin *bin,
|
||||
GstElementState state,
|
||||
GtkType type);
|
||||
|
||||
void gst_bin_iterate (GstBin *bin);
|
||||
void gst_bin_create_plan(GstBin *bin);
|
||||
|
||||
// hack FIXME
|
||||
void gst_bin_use_cothreads (GstBin *bin, gboolean enabled);
|
||||
|
@ -108,9 +108,9 @@ struct _GstBuffer {
|
||||
};
|
||||
|
||||
/* initialisation */
|
||||
void _gst_buffer_initialize();
|
||||
void _gst_buffer_initialize (void);
|
||||
/* creating a new buffer from scratch */
|
||||
GstBuffer *gst_buffer_new();
|
||||
GstBuffer* gst_buffer_new (void);
|
||||
GstBuffer* gst_buffer_new_from_pool (GstBufferPool *pool);
|
||||
|
||||
/* creating a subbuffer */
|
||||
@ -129,10 +129,9 @@ void gst_buffer_destroy(GstBuffer *buffer);
|
||||
|
||||
/* add, retrieve, and remove metadata from the buffer */
|
||||
void gst_buffer_add_meta (GstBuffer *buffer, GstMeta *meta);
|
||||
void gst_buffer_remove_meta (GstBuffer *buffer, GstMeta *meta);
|
||||
GstMeta* gst_buffer_get_first_meta (GstBuffer *buffer);
|
||||
GSList* gst_buffer_get_metas (GstBuffer *buffer);
|
||||
void gst_buffer_remove_meta(GstBuffer *buffer,GstMeta *meta);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -47,15 +47,19 @@ struct _GstBufferPool {
|
||||
};
|
||||
|
||||
/* creating a new buffer pool from scratch */
|
||||
GstBufferPool *gst_buffer_pool_new();
|
||||
GstBufferPool* gst_buffer_pool_new (void);
|
||||
|
||||
/* creating a buffer from the pool */
|
||||
GstBuffer* gst_buffer_pool_new_buffer (GstBufferPool *pool);
|
||||
void gst_buffer_pool_destroy_buffer (GstBufferPool *pool, GstBuffer *buffer);
|
||||
|
||||
/* setting create and destroy functions */
|
||||
void gst_buffer_pool_set_create_function(GstBufferPool *pool, GstBufferPoolCreateFunction create, gpointer user_data);
|
||||
void gst_buffer_pool_set_destroy_function(GstBufferPool *pool, GstBufferPoolDestroyFunction destroy, gpointer user_data);
|
||||
void gst_buffer_pool_set_create_function (GstBufferPool *pool,
|
||||
GstBufferPoolCreateFunction create,
|
||||
gpointer user_data);
|
||||
void gst_buffer_pool_set_destroy_function (GstBufferPool *pool,
|
||||
GstBufferPoolDestroyFunction destroy,
|
||||
gpointer user_data);
|
||||
|
||||
/* destroying the buffer pool */
|
||||
void gst_buffer_pool_destroy (GstBufferPool *pool);
|
||||
|
@ -60,7 +60,6 @@ GstElement *gst_connection_new(gchar *name);
|
||||
|
||||
void gst_connection_push (GstConnection *connection);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
@ -28,8 +28,8 @@ typedef enum {
|
||||
GST_CPU_FLAG_SSE = (1<<1),
|
||||
} GstCPUFlags;
|
||||
|
||||
void _gst_cpu_initialize();
|
||||
void _gst_cpu_initialize (void);
|
||||
|
||||
GstCPUFlags gst_cpu_get_flags();
|
||||
GstCPUFlags gst_cpu_get_flags (void);
|
||||
|
||||
#endif /* __GST_CPU_H__ */
|
||||
|
@ -99,11 +99,8 @@ GstObject *gst_object_get_parent(GstObject *object);
|
||||
void gst_object_unparent (GstObject *object);
|
||||
|
||||
/* refcounting */
|
||||
//void gst_object_ref(GstObject *object);
|
||||
#define gst_object_ref(object) gtk_object_ref(GTK_OBJECT(object));
|
||||
//void gst_object_unref(GstObject *object);
|
||||
#define gst_object_unref(object) gtk_object_unref(GTK_OBJECT(object));
|
||||
//void gst_object_sink(GstObject *object);
|
||||
#define gst_object_sink(object) gtk_object_sink(GTK_OBJECT(object));
|
||||
|
||||
/* destroying an object */
|
||||
|
@ -61,11 +61,11 @@ GtkType gst_pipeline_get_type(void);
|
||||
GstElement* gst_pipeline_new (guchar *name);
|
||||
#define gst_pipeline_destroy(pipeline) gst_object_destroy(GST_OBJECT(pipeline))
|
||||
|
||||
gboolean gst_pipeline_autoplug(GstPipeline *pipeline);
|
||||
|
||||
void gst_pipeline_add_src (GstPipeline *pipeline, GstElement *src);
|
||||
void gst_pipeline_add_sink (GstPipeline *pipeline, GstElement *sink);
|
||||
|
||||
gboolean gst_pipeline_autoplug (GstPipeline *pipeline);
|
||||
|
||||
void gst_pipeline_iterate (GstPipeline *pipeline);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -44,20 +44,21 @@ struct _GstPlugin {
|
||||
|
||||
typedef GstPlugin* (*GstPluginInitFunc) (GModule *module);
|
||||
|
||||
GstPlugin *gst_plugin_new(gchar *name);
|
||||
void gst_plugin_set_longname(GstPlugin *plugin,gchar *longname);
|
||||
void _gst_plugin_initialize (void);
|
||||
|
||||
void _gst_plugin_initialize();
|
||||
void gst_plugin_load_all();
|
||||
GstPlugin* gst_plugin_new (gchar *name);
|
||||
|
||||
void gst_plugin_load_all (void);
|
||||
gboolean gst_plugin_load (gchar *name);
|
||||
gboolean gst_library_load (gchar *name);
|
||||
gboolean gst_plugin_load_absolute (gchar *name);
|
||||
|
||||
void gst_plugin_set_longname (GstPlugin *plugin, gchar *longname);
|
||||
void gst_plugin_add_factory (GstPlugin *plugin, GstElementFactory *factory);
|
||||
void gst_plugin_add_type (GstPlugin *plugin, GstTypeFactory *factory);
|
||||
|
||||
GstPlugin* gst_plugin_find (const gchar *name);
|
||||
GList *gst_plugin_get_list();
|
||||
GList* gst_plugin_get_list (void);
|
||||
GstElementFactory* gst_plugin_find_elementfactory (gchar *name);
|
||||
|
||||
GstElementFactory* gst_plugin_load_elementfactory (gchar *name);
|
||||
|
@ -42,7 +42,7 @@ extern "C" {
|
||||
(GTK_CHECK_CLASS_TYPE((klass),GST_TYPE_SRC))
|
||||
|
||||
typedef enum {
|
||||
GST_SRC_ASYNC = 1 << 0,
|
||||
GST_SRC_ASYNC = (1 << 0),
|
||||
} GstSrcFlags;
|
||||
|
||||
#define GST_SRC_FLAGS(obj) \
|
||||
@ -74,14 +74,13 @@ struct _GstSrcClass {
|
||||
#define GST_SRC_UNSET_FLAGS(src,flag) \
|
||||
G_STMT_START{ (GST_SRC_FLAGS (src) &= ~(flag)); }G_STMT_END
|
||||
|
||||
|
||||
GtkType gst_src_get_type (void);
|
||||
|
||||
void gst_src_signal_eos(GstSrc *src);
|
||||
|
||||
void gst_src_push (GstSrc *src);
|
||||
void gst_src_push_region (GstSrc *src, gulong offset, gulong size);
|
||||
|
||||
void gst_src_signal_eos (GstSrc *src);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
@ -57,10 +57,11 @@ struct _GstTeeClass {
|
||||
};
|
||||
|
||||
GtkType gst_tee_get_type (void);
|
||||
GstElement *gst_tee_new(gchar *name);
|
||||
void gst_tee_chain(GstPad *pad,GstBuffer *buf);
|
||||
gchar *gst_tee_new_pad(GstTee *tee);
|
||||
|
||||
GstElement* gst_tee_new (gchar *name);
|
||||
|
||||
gchar* gst_tee_new_pad (GstTee *tee);
|
||||
void gst_tee_chain (GstPad *pad, GstBuffer *buf);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -49,10 +49,12 @@ static void gst_thread_init(GstThread *thread);
|
||||
|
||||
static void gst_thread_set_arg (GtkObject *object,GtkArg *arg,guint id);
|
||||
static void gst_thread_get_arg (GtkObject *object,GtkArg *arg,guint id);
|
||||
|
||||
static GstElementStateReturn gst_thread_change_state (GstElement *element);
|
||||
|
||||
static xmlNodePtr gst_thread_save_thyself (GstElement *element,xmlNodePtr parent);
|
||||
static void gst_thread_restore_thyself(GstElement *element,xmlNodePtr parent, GHashTable *elements);
|
||||
static void gst_thread_restore_thyself (GstElement *element,xmlNodePtr parent,
|
||||
GHashTable *elements);
|
||||
|
||||
static void gst_thread_signal_thread (GstThread *thread);
|
||||
static void gst_thread_create_plan_dummy (GstBin *bin);
|
||||
@ -83,7 +85,8 @@ gst_thread_get_type(void) {
|
||||
}
|
||||
|
||||
static void
|
||||
gst_thread_class_init(GstThreadClass *klass) {
|
||||
gst_thread_class_init (GstThreadClass *klass)
|
||||
{
|
||||
GtkObjectClass *gtkobject_class;
|
||||
GstObjectClass *gstobject_class;
|
||||
GstElementClass *gstelement_class;
|
||||
@ -111,18 +114,29 @@ gst_thread_class_init(GstThreadClass *klass) {
|
||||
|
||||
}
|
||||
|
||||
static void gst_thread_init(GstThread *thread) {
|
||||
static void
|
||||
gst_thread_init (GstThread *thread)
|
||||
{
|
||||
GST_FLAG_SET (thread, GST_THREAD_CREATE);
|
||||
|
||||
thread->lock = g_mutex_new();
|
||||
thread->cond = g_cond_new();
|
||||
}
|
||||
|
||||
static void gst_thread_create_plan_dummy(GstBin *bin) {
|
||||
static void
|
||||
gst_thread_create_plan_dummy (GstBin *bin)
|
||||
{
|
||||
g_return_if_fail (GST_IS_THREAD (bin));
|
||||
|
||||
if (!GST_FLAG_IS_SET (GST_THREAD (bin), GST_THREAD_STATE_SPINNING))
|
||||
gst_info("gstthread: create plan delayed until thread starts\n");
|
||||
}
|
||||
|
||||
static void gst_thread_set_arg(GtkObject *object,GtkArg *arg,guint id) {
|
||||
static void
|
||||
gst_thread_set_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint id)
|
||||
{
|
||||
/* it's not null if we got it, but it might not be ours */
|
||||
g_return_if_fail (GST_IS_THREAD (object));
|
||||
|
||||
@ -143,7 +157,11 @@ static void gst_thread_set_arg(GtkObject *object,GtkArg *arg,guint id) {
|
||||
}
|
||||
}
|
||||
|
||||
static void gst_thread_get_arg(GtkObject *object,GtkArg *arg,guint id) {
|
||||
static void
|
||||
gst_thread_get_arg (GtkObject *object,
|
||||
GtkArg *arg,
|
||||
guint id)
|
||||
{
|
||||
/* it's not null if we got it, but it might not be ours */
|
||||
g_return_if_fail (GST_IS_THREAD (object));
|
||||
|
||||
@ -165,18 +183,25 @@ static void gst_thread_get_arg(GtkObject *object,GtkArg *arg,guint id) {
|
||||
*
|
||||
* Returns; The new thread
|
||||
*/
|
||||
GstElement *gst_thread_new(guchar *name) {
|
||||
GstElement*
|
||||
gst_thread_new (guchar *name)
|
||||
{
|
||||
GstThread *thread;
|
||||
|
||||
thread = gtk_type_new (gst_thread_get_type ());
|
||||
|
||||
gst_element_set_name (GST_ELEMENT (thread), name);
|
||||
|
||||
GST_FLAG_UNSET (thread, GST_THREAD_STATE_REAPING);
|
||||
|
||||
return GST_ELEMENT (thread);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static GstElementStateReturn gst_thread_change_state(GstElement *element) {
|
||||
static GstElementStateReturn
|
||||
gst_thread_change_state (GstElement *element)
|
||||
{
|
||||
GstThread *thread;
|
||||
gboolean stateset = GST_STATE_SUCCESS;
|
||||
gint pending;
|
||||
@ -185,7 +210,8 @@ static GstElementStateReturn gst_thread_change_state(GstElement *element) {
|
||||
thread = GST_THREAD (element);
|
||||
|
||||
gst_info("gstthread: thread \"%s\" change state %d\n",
|
||||
gst_element_get_name(GST_ELEMENT(element)), GST_STATE_PENDING(element));
|
||||
gst_element_get_name (GST_ELEMENT (element)),
|
||||
GST_STATE_PENDING (element));
|
||||
|
||||
pending = GST_STATE_PENDING (element);
|
||||
|
||||
@ -196,7 +222,8 @@ static GstElementStateReturn gst_thread_change_state(GstElement *element) {
|
||||
if (GST_ELEMENT_CLASS (parent_class)->change_state)
|
||||
stateset = GST_ELEMENT_CLASS (parent_class)->change_state (element);
|
||||
|
||||
gst_info("gstthread: stateset %d %d %d\n", GST_STATE(element), stateset, GST_STATE_PENDING(element));
|
||||
gst_info("gstthread: stateset %d %d %d\n", GST_STATE (element), stateset,
|
||||
GST_STATE_PENDING (element));
|
||||
|
||||
switch (pending) {
|
||||
case GST_STATE_READY:
|
||||
@ -209,9 +236,11 @@ static GstElementStateReturn gst_thread_change_state(GstElement *element) {
|
||||
GST_FLAG_UNSET (thread, GST_THREAD_STATE_SPINNING);
|
||||
// create the thread if that's what we're supposed to do
|
||||
gst_info("gstthread: flags are 0x%08x\n", GST_FLAGS (thread));
|
||||
|
||||
if (GST_FLAG_IS_SET (thread, GST_THREAD_CREATE)) {
|
||||
gst_info("gstthread: starting thread \"%s\"\n",
|
||||
gst_element_get_name (GST_ELEMENT (element)));
|
||||
|
||||
pthread_create (&thread->thread_id, NULL,
|
||||
gst_thread_main_loop, thread);
|
||||
} else {
|
||||
@ -224,18 +253,21 @@ static GstElementStateReturn gst_thread_change_state(GstElement *element) {
|
||||
if (!stateset) return FALSE;
|
||||
gst_info("gstthread: starting thread \"%s\"\n",
|
||||
gst_element_get_name (GST_ELEMENT (element)));
|
||||
|
||||
GST_FLAG_SET (thread, GST_THREAD_STATE_SPINNING);
|
||||
gst_thread_signal_thread (thread);
|
||||
break;
|
||||
case GST_STATE_PAUSED:
|
||||
gst_info("gstthread: pausing thread \"%s\"\n",
|
||||
gst_element_get_name (GST_ELEMENT (element)));
|
||||
|
||||
//GST_FLAG_UNSET(thread,GST_THREAD_STATE_SPINNING);
|
||||
gst_thread_signal_thread (thread);
|
||||
break;
|
||||
case GST_STATE_NULL:
|
||||
gst_info("gstthread: stopping thread \"%s\"\n",
|
||||
gst_element_get_name (GST_ELEMENT (element)));
|
||||
|
||||
GST_FLAG_SET (thread, GST_THREAD_STATE_REAPING);
|
||||
gst_thread_signal_thread (thread);
|
||||
break;
|
||||
@ -282,22 +314,29 @@ gst_thread_main_loop (void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void gst_thread_signal_thread(GstThread *thread) {
|
||||
static void
|
||||
gst_thread_signal_thread (GstThread *thread)
|
||||
{
|
||||
g_mutex_lock (thread->lock);
|
||||
g_cond_signal (thread->cond);
|
||||
g_mutex_unlock (thread->lock);
|
||||
}
|
||||
|
||||
static void gst_thread_restore_thyself(GstElement *element,xmlNodePtr parent, GHashTable *elements) {
|
||||
|
||||
static void
|
||||
gst_thread_restore_thyself (GstElement *element,
|
||||
xmlNodePtr parent,
|
||||
GHashTable *elements)
|
||||
{
|
||||
g_print("gstthread: restore\n");
|
||||
|
||||
if (GST_ELEMENT_CLASS (parent_class)->restore_thyself)
|
||||
GST_ELEMENT_CLASS (parent_class)->restore_thyself (element,parent, elements);
|
||||
}
|
||||
|
||||
static xmlNodePtr gst_thread_save_thyself(GstElement *element,xmlNodePtr parent) {
|
||||
|
||||
static xmlNodePtr
|
||||
gst_thread_save_thyself (GstElement *element,
|
||||
xmlNodePtr parent)
|
||||
{
|
||||
if (GST_ELEMENT_CLASS (parent_class)->save_thyself)
|
||||
GST_ELEMENT_CLASS (parent_class)->save_thyself (element,parent);
|
||||
return NULL;
|
||||
|
@ -67,6 +67,7 @@ struct _GstThreadClass {
|
||||
};
|
||||
|
||||
GtkType gst_thread_get_type (void);
|
||||
|
||||
GstElement* gst_thread_new (guchar *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -21,7 +21,6 @@
|
||||
#ifndef __GST_TRACE_H__
|
||||
#define __GST_TRACE_H__
|
||||
|
||||
void gst_trace_read_tsc(guint64 *dst);
|
||||
|
||||
typedef struct _GstTrace GstTrace;
|
||||
typedef struct _GstTraceEntry GstTraceEntry;
|
||||
@ -45,6 +44,7 @@ struct _GstTraceEntry {
|
||||
};
|
||||
|
||||
GstTrace* gst_trace_new (guchar *filename, gint size);
|
||||
|
||||
void gst_trace_destroy (GstTrace *trace);
|
||||
void gst_trace_flush (GstTrace *trace);
|
||||
#define gst_trace_get_size(trace) ((trace)->bufsize)
|
||||
@ -52,7 +52,10 @@ void gst_trace_flush(GstTrace *trace);
|
||||
#define gst_trace_get_remaining(trace) ((trace)->bufsize - (trace)->bufoffset)
|
||||
void gst_trace_set_default (GstTrace *trace);
|
||||
|
||||
void _gst_trace_add_entry(GstTrace *trace,guint32 seq,guint32 data,gchar *msg);
|
||||
void _gst_trace_add_entry (GstTrace *trace, guint32 seq,
|
||||
guint32 data, gchar *msg);
|
||||
|
||||
void gst_trace_read_tsc (guint64 *dst);
|
||||
|
||||
#define TRACE_ENABLE
|
||||
|
||||
|
@ -56,7 +56,7 @@ struct _GstTypeFactory {
|
||||
|
||||
|
||||
/* initialize the subsystem */
|
||||
void _gst_type_initialize();
|
||||
void _gst_type_initialize (void);
|
||||
|
||||
/* create a new type, or find/merge an existing one */
|
||||
guint16 gst_type_register (GstTypeFactory *factory);
|
||||
@ -78,9 +78,9 @@ GstType *gst_type_find_by_id(guint16 id);
|
||||
GList* gst_type_get_sink_to_src (guint16 sinkid, guint16 srcid);
|
||||
|
||||
/* get the list of registered types (returns list of GstType!) */
|
||||
GList *gst_type_get_list();
|
||||
GList* gst_type_get_list (void);
|
||||
|
||||
void gst_type_dump();
|
||||
void gst_type_dump (void);
|
||||
|
||||
xmlNodePtr gst_type_save_thyself (GstType *type, xmlNodePtr parent);
|
||||
guint16 gst_type_load_thyself (xmlNodePtr parent);
|
||||
|
@ -29,7 +29,9 @@ GstTypeFactory _factories[] = {
|
||||
};
|
||||
|
||||
|
||||
GstPlugin *plugin_init(GModule *module) {
|
||||
GstPlugin*
|
||||
plugin_init (GModule *module)
|
||||
{
|
||||
GstPlugin *plugin;
|
||||
gint i = 0;
|
||||
|
||||
|
9
gst/xml/.gitignore
vendored
9
gst/xml/.gitignore
vendored
@ -1,9 +0,0 @@
|
||||
Makefile
|
||||
Makefile.in
|
||||
*.o
|
||||
*.lo
|
||||
*.la
|
||||
.deps
|
||||
.libs
|
||||
|
||||
save
|
@ -1,5 +0,0 @@
|
||||
noinst_PROGRAMS = save
|
||||
|
||||
INCLUDES = $(GLIB_CFLAGS) $(GTK_CFLAGS) $(XML_CFLAGS) -I$(top_srcdir)
|
||||
LDADD = $(GLIB_LIBS) $(GTK_LIBS) $(XML_LIBS) $(top_srcdir)/gst/libgst.la
|
||||
|
@ -1,6 +0,0 @@
|
||||
The naming hiearchy you'll see bits of but never the whole thing is
|
||||
basically container:container:container:element.pad, which reflects
|
||||
parentage. When naming connections between elements, those are the what
|
||||
will be used, possibly along with .. as container to indicate 'up one'. I
|
||||
don't think this will ever by used, since ghost pads are supposed to make
|
||||
all connections between elements with the same parent.
|
@ -1,43 +0,0 @@
|
||||
#include <gst/gst.h>
|
||||
|
||||
extern gboolean _gst_plugin_spew;
|
||||
|
||||
GstPipeline *create_pipeline() {
|
||||
GstPipeline *pipeline;
|
||||
GstElement *src, *sink;
|
||||
GstPad *srcpad, *sinkpad;
|
||||
|
||||
pipeline = gst_pipeline_new("fake_pipeline");
|
||||
g_return_if_fail(pipeline != NULL);
|
||||
|
||||
src = gst_elementfactory_make("fakesrc","fakesrc");
|
||||
g_return_if_fail(src != NULL);
|
||||
sink = gst_elementfactory_make("fakesink","fakesink");
|
||||
g_return_if_fail(sink != NULL);
|
||||
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(src));
|
||||
gst_bin_add(GST_BIN(pipeline),GST_ELEMENT(sink));
|
||||
|
||||
srcpad = gst_element_get_pad(src,"src");
|
||||
g_return_if_fail(srcpad != NULL);
|
||||
sinkpad = gst_element_get_pad(sink,"sink");
|
||||
g_return_if_fail(srcpad != NULL);
|
||||
|
||||
gst_pad_connect(srcpad,sinkpad);
|
||||
|
||||
return GST_PIPELINE(pipeline);
|
||||
}
|
||||
|
||||
int main(int argc,char *argv[]) {
|
||||
GstElement *pipeline;
|
||||
xmlDocPtr doc;
|
||||
|
||||
// _gst_plugin_spew = TRUE;
|
||||
|
||||
gst_init(&argc,&argv);
|
||||
|
||||
pipeline = GST_ELEMENT(create_pipeline());
|
||||
|
||||
doc = gst_xml_write(pipeline);
|
||||
xmlSaveFile("save.xml",doc);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
|
||||
if HAVE_LIBMMX
|
||||
GSTIDCTARCH_SRCS = mmxidct.S mmx32idct.c
|
||||
GSTIDCTARCH_SRCS = mmxidct.S mmx32idct.c sseidct.S
|
||||
else
|
||||
GSTIDCTARCH_SRCS =
|
||||
endif
|
||||
|
@ -26,6 +26,7 @@ extern void gst_idct_fast_int_idct (short *block);
|
||||
#ifdef HAVE_LIBMMX
|
||||
extern void gst_idct_mmx_idct (short *block);
|
||||
extern void gst_idct_mmx32_idct (short *block);
|
||||
extern void gst_idct_sse_idct (short *block);
|
||||
#endif /* HAVE_LIBMMX */
|
||||
|
||||
extern void gst_idct_init_float_idct(void);
|
||||
|
@ -37,6 +37,11 @@ GstIDCT *gst_idct_new(GstIDCTMethod method)
|
||||
if (gst_cpu_get_flags() & GST_CPU_FLAG_MMX) {
|
||||
method = GST_IDCT_MMX;
|
||||
}
|
||||
/* disabled for now
|
||||
if (gst_cpu_get_flags() & GST_CPU_FLAG_SSE) {
|
||||
method = GST_IDCT_SSE;
|
||||
}
|
||||
*/
|
||||
else
|
||||
#endif /* HAVE_LIBMMX */
|
||||
{
|
||||
@ -72,6 +77,11 @@ GstIDCT *gst_idct_new(GstIDCTMethod method)
|
||||
new->convert = gst_idct_mmx32_idct;
|
||||
new->need_transpose = TRUE;
|
||||
break;
|
||||
case GST_IDCT_SSE:
|
||||
g_print("GstIDCT: using SSE_idct\n");
|
||||
new->convert = gst_idct_sse_idct;
|
||||
new->need_transpose = TRUE;
|
||||
break;
|
||||
#endif /* HAVE_LIBMMX */
|
||||
default:
|
||||
g_print("GstIDCT: method not supported\n");
|
||||
|
@ -29,7 +29,8 @@ typedef enum {
|
||||
GST_IDCT_FAST_INT,
|
||||
GST_IDCT_FLOAT,
|
||||
GST_IDCT_MMX,
|
||||
GST_IDCT_MMX32
|
||||
GST_IDCT_MMX32,
|
||||
GST_IDCT_SSE,
|
||||
} GstIDCTMethod;
|
||||
|
||||
typedef struct _GstIDCT GstIDCT;
|
||||
|
740
libs/idct/sseidct.S
Normal file
740
libs/idct/sseidct.S
Normal file
@ -0,0 +1,740 @@
|
||||
.data
|
||||
.align 4
|
||||
.type rounder0,@object
|
||||
rounder0:
|
||||
.long 65536
|
||||
.long 65536
|
||||
.size rounder0,8
|
||||
.align 4
|
||||
.type rounder4,@object
|
||||
rounder4:
|
||||
.long 1024
|
||||
.long 1024
|
||||
.size rounder4,8
|
||||
.align 4
|
||||
.type rounder1,@object
|
||||
rounder1:
|
||||
.long 3597
|
||||
.long 3597
|
||||
.size rounder1,8
|
||||
.align 4
|
||||
.type rounder7,@object
|
||||
rounder7:
|
||||
.long 512
|
||||
.long 512
|
||||
.size rounder7,8
|
||||
.align 4
|
||||
.type rounder2,@object
|
||||
rounder2:
|
||||
.long 2260
|
||||
.long 2260
|
||||
.size rounder2,8
|
||||
.align 4
|
||||
.type rounder6,@object
|
||||
rounder6:
|
||||
.long 512
|
||||
.long 512
|
||||
.size rounder6,8
|
||||
.align 4
|
||||
.type rounder3,@object
|
||||
rounder3:
|
||||
.long 1203
|
||||
.long 1203
|
||||
.size rounder3,8
|
||||
.align 4
|
||||
.type rounder5,@object
|
||||
rounder5:
|
||||
.long 120
|
||||
.long 120
|
||||
.size rounder5,8
|
||||
.align 2
|
||||
.type _T1.46,@object
|
||||
_T1.46:
|
||||
.value 13036
|
||||
.value 13036
|
||||
.value 13036
|
||||
.value 13036
|
||||
.align 2
|
||||
.type _T2.47,@object
|
||||
_T2.47:
|
||||
.value 27146
|
||||
.value 27146
|
||||
.value 27146
|
||||
.value 27146
|
||||
.align 2
|
||||
.type _T3.48,@object
|
||||
_T3.48:
|
||||
.value -21746
|
||||
.value -21746
|
||||
.value -21746
|
||||
.value -21746
|
||||
.align 2
|
||||
.type _C4.49,@object
|
||||
_C4.49:
|
||||
.value 23170
|
||||
.value 23170
|
||||
.value 23170
|
||||
.value 23170
|
||||
.local scratch0.50
|
||||
.comm scratch0.50,8,4
|
||||
.local scratch1.51
|
||||
.comm scratch1.51,8,4
|
||||
.align 2
|
||||
.type table04.54,@object
|
||||
table04.54:
|
||||
.value 16384
|
||||
.value 21407
|
||||
.value -16384
|
||||
.value -21407
|
||||
.value 16384
|
||||
.value 8867
|
||||
.value 16384
|
||||
.value 8867
|
||||
.value 22725
|
||||
.value 19266
|
||||
.value -22725
|
||||
.value -12873
|
||||
.value 12873
|
||||
.value 4520
|
||||
.value 19266
|
||||
.value -4520
|
||||
.value 16384
|
||||
.value -8867
|
||||
.value 16384
|
||||
.value -8867
|
||||
.value -16384
|
||||
.value 21407
|
||||
.value 16384
|
||||
.value -21407
|
||||
.value 12873
|
||||
.value -22725
|
||||
.value 19266
|
||||
.value -22725
|
||||
.value 4520
|
||||
.value 19266
|
||||
.value 4520
|
||||
.value -12873
|
||||
.align 2
|
||||
.type table17.55,@object
|
||||
table17.55:
|
||||
.value 22725
|
||||
.value 29692
|
||||
.value -22725
|
||||
.value -29692
|
||||
.value 22725
|
||||
.value 12299
|
||||
.value 22725
|
||||
.value 12299
|
||||
.value 31521
|
||||
.value 26722
|
||||
.value -31521
|
||||
.value -17855
|
||||
.value 17855
|
||||
.value 6270
|
||||
.value 26722
|
||||
.value -6270
|
||||
.value 22725
|
||||
.value -12299
|
||||
.value 22725
|
||||
.value -12299
|
||||
.value -22725
|
||||
.value 29692
|
||||
.value 22725
|
||||
.value -29692
|
||||
.value 17855
|
||||
.value -31521
|
||||
.value 26722
|
||||
.value -31521
|
||||
.value 6270
|
||||
.value 26722
|
||||
.value 6270
|
||||
.value -17855
|
||||
.align 2
|
||||
.type table26.56,@object
|
||||
table26.56:
|
||||
.value 21407
|
||||
.value 27969
|
||||
.value -21407
|
||||
.value -27969
|
||||
.value 21407
|
||||
.value 11585
|
||||
.value 21407
|
||||
.value 11585
|
||||
.value 29692
|
||||
.value 25172
|
||||
.value -29692
|
||||
.value -16819
|
||||
.value 16819
|
||||
.value 5906
|
||||
.value 25172
|
||||
.value -5906
|
||||
.value 21407
|
||||
.value -11585
|
||||
.value 21407
|
||||
.value -11585
|
||||
.value -21407
|
||||
.value 27969
|
||||
.value 21407
|
||||
.value -27969
|
||||
.value 16819
|
||||
.value -29692
|
||||
.value 25172
|
||||
.value -29692
|
||||
.value 5906
|
||||
.value 25172
|
||||
.value 5906
|
||||
.value -16819
|
||||
.align 2
|
||||
.type table35.57,@object
|
||||
table35.57:
|
||||
.value 19266
|
||||
.value 25172
|
||||
.value -19266
|
||||
.value -25172
|
||||
.value 19266
|
||||
.value 10426
|
||||
.value 19266
|
||||
.value 10426
|
||||
.value 26722
|
||||
.value 22654
|
||||
.value -26722
|
||||
.value -15137
|
||||
.value 15137
|
||||
.value 5315
|
||||
.value 22654
|
||||
.value -5315
|
||||
.value 19266
|
||||
.value -10426
|
||||
.value 19266
|
||||
.value -10426
|
||||
.value -19266
|
||||
.value 25172
|
||||
.value 19266
|
||||
.value -25172
|
||||
.value 15137
|
||||
.value -26722
|
||||
.value 22654
|
||||
.value -26722
|
||||
.value 5315
|
||||
.value 22654
|
||||
.value 5315
|
||||
.value -15137
|
||||
.text
|
||||
.align 4
|
||||
.globl gst_idct_sse_idct
|
||||
.type gst_idct_sse_idct,@function
|
||||
gst_idct_sse_idct:
|
||||
subl $8,%esp
|
||||
pushl %ebp
|
||||
pushl %edi
|
||||
pushl %esi
|
||||
pushl %ebx
|
||||
call .L51
|
||||
.L51:
|
||||
popl %ebx
|
||||
addl $_GLOBAL_OFFSET_TABLE_+[.-.L51],%ebx
|
||||
movl 28(%esp),%edx
|
||||
leal table04.54@GOTOFF(%ebx),%eax
|
||||
movq (%edx), %mm2
|
||||
movq 8(%edx), %mm5
|
||||
movq %mm2, %mm0
|
||||
movq (%eax), %mm3
|
||||
movq %mm5, %mm6
|
||||
movq 8(%eax), %mm4
|
||||
pmaddwd %mm0, %mm3
|
||||
pshufw $78, %mm2, %mm2
|
||||
leal rounder0@GOTOFF(%ebx),%ecx
|
||||
movq 16(%eax), %mm1
|
||||
pmaddwd %mm2, %mm4
|
||||
pmaddwd 32(%eax), %mm0
|
||||
pshufw $78, %mm6, %mm6
|
||||
movq 24(%eax), %mm7
|
||||
pmaddwd %mm5, %mm1
|
||||
paddd (%ecx), %mm3
|
||||
pmaddwd %mm6, %mm7
|
||||
pmaddwd 40(%eax), %mm2
|
||||
paddd %mm4, %mm3
|
||||
pmaddwd 48(%eax), %mm5
|
||||
movq %mm3, %mm4
|
||||
pmaddwd 56(%eax), %mm6
|
||||
paddd %mm7, %mm1
|
||||
paddd (%ecx), %mm0
|
||||
psubd %mm1, %mm3
|
||||
psrad $11, %mm3
|
||||
paddd %mm4, %mm1
|
||||
paddd %mm2, %mm0
|
||||
psrad $11, %mm1
|
||||
paddd %mm6, %mm5
|
||||
movq %mm0, %mm4
|
||||
paddd %mm5, %mm0
|
||||
psubd %mm5, %mm4
|
||||
movq 64(%edx), %mm2
|
||||
psrad $11, %mm0
|
||||
movq 72(%edx), %mm5
|
||||
psrad $11, %mm4
|
||||
packssdw %mm0, %mm1
|
||||
movq %mm5, %mm6
|
||||
packssdw %mm3, %mm4
|
||||
movq %mm2, %mm0
|
||||
movq %mm1, (%edx)
|
||||
pshufw $177, %mm4, %mm4
|
||||
movq (%eax), %mm3
|
||||
movq %mm4, 8(%edx)
|
||||
pmaddwd %mm0, %mm3
|
||||
movq 8(%eax), %mm4
|
||||
pshufw $78, %mm2, %mm2
|
||||
leal rounder4@GOTOFF(%ebx),%ecx
|
||||
movq 16(%eax), %mm1
|
||||
pmaddwd %mm2, %mm4
|
||||
pmaddwd 32(%eax), %mm0
|
||||
pshufw $78, %mm6, %mm6
|
||||
movq 24(%eax), %mm7
|
||||
pmaddwd %mm5, %mm1
|
||||
paddd (%ecx), %mm3
|
||||
pmaddwd %mm6, %mm7
|
||||
pmaddwd 40(%eax), %mm2
|
||||
paddd %mm4, %mm3
|
||||
pmaddwd 48(%eax), %mm5
|
||||
movq %mm3, %mm4
|
||||
pmaddwd 56(%eax), %mm6
|
||||
paddd %mm7, %mm1
|
||||
paddd (%ecx), %mm0
|
||||
psubd %mm1, %mm3
|
||||
psrad $11, %mm3
|
||||
paddd %mm4, %mm1
|
||||
paddd %mm2, %mm0
|
||||
psrad $11, %mm1
|
||||
paddd %mm6, %mm5
|
||||
movq %mm0, %mm4
|
||||
paddd %mm5, %mm0
|
||||
psubd %mm5, %mm4
|
||||
leal table17.55@GOTOFF(%ebx),%eax
|
||||
movq 16(%edx), %mm2
|
||||
psrad $11, %mm0
|
||||
movq 24(%edx), %mm5
|
||||
psrad $11, %mm4
|
||||
packssdw %mm0, %mm1
|
||||
movq %mm5, %mm6
|
||||
packssdw %mm3, %mm4
|
||||
movq %mm2, %mm0
|
||||
movq %mm1, 64(%edx)
|
||||
pshufw $177, %mm4, %mm4
|
||||
movq (%eax), %mm3
|
||||
movq %mm4, 72(%edx)
|
||||
pmaddwd %mm0, %mm3
|
||||
movq 8(%eax), %mm4
|
||||
pshufw $78, %mm2, %mm2
|
||||
leal rounder1@GOTOFF(%ebx),%ecx
|
||||
movq 16(%eax), %mm1
|
||||
pmaddwd %mm2, %mm4
|
||||
pmaddwd 32(%eax), %mm0
|
||||
pshufw $78, %mm6, %mm6
|
||||
movq 24(%eax), %mm7
|
||||
pmaddwd %mm5, %mm1
|
||||
paddd (%ecx), %mm3
|
||||
pmaddwd %mm6, %mm7
|
||||
pmaddwd 40(%eax), %mm2
|
||||
paddd %mm4, %mm3
|
||||
pmaddwd 48(%eax), %mm5
|
||||
movq %mm3, %mm4
|
||||
pmaddwd 56(%eax), %mm6
|
||||
paddd %mm7, %mm1
|
||||
paddd (%ecx), %mm0
|
||||
psubd %mm1, %mm3
|
||||
psrad $11, %mm3
|
||||
paddd %mm4, %mm1
|
||||
paddd %mm2, %mm0
|
||||
psrad $11, %mm1
|
||||
paddd %mm6, %mm5
|
||||
movq %mm0, %mm4
|
||||
paddd %mm5, %mm0
|
||||
psubd %mm5, %mm4
|
||||
movq 112(%edx), %mm2
|
||||
psrad $11, %mm0
|
||||
movq 120(%edx), %mm5
|
||||
psrad $11, %mm4
|
||||
packssdw %mm0, %mm1
|
||||
movq %mm5, %mm6
|
||||
packssdw %mm3, %mm4
|
||||
movq %mm2, %mm0
|
||||
movq %mm1, 16(%edx)
|
||||
pshufw $177, %mm4, %mm4
|
||||
movq (%eax), %mm3
|
||||
movq %mm4, 24(%edx)
|
||||
pmaddwd %mm0, %mm3
|
||||
movq 8(%eax), %mm4
|
||||
pshufw $78, %mm2, %mm2
|
||||
leal rounder7@GOTOFF(%ebx),%ecx
|
||||
movq 16(%eax), %mm1
|
||||
pmaddwd %mm2, %mm4
|
||||
pmaddwd 32(%eax), %mm0
|
||||
pshufw $78, %mm6, %mm6
|
||||
movq 24(%eax), %mm7
|
||||
pmaddwd %mm5, %mm1
|
||||
paddd (%ecx), %mm3
|
||||
pmaddwd %mm6, %mm7
|
||||
pmaddwd 40(%eax), %mm2
|
||||
paddd %mm4, %mm3
|
||||
pmaddwd 48(%eax), %mm5
|
||||
movq %mm3, %mm4
|
||||
pmaddwd 56(%eax), %mm6
|
||||
paddd %mm7, %mm1
|
||||
paddd (%ecx), %mm0
|
||||
psubd %mm1, %mm3
|
||||
psrad $11, %mm3
|
||||
paddd %mm4, %mm1
|
||||
paddd %mm2, %mm0
|
||||
psrad $11, %mm1
|
||||
paddd %mm6, %mm5
|
||||
movq %mm0, %mm4
|
||||
paddd %mm5, %mm0
|
||||
psubd %mm5, %mm4
|
||||
leal table26.56@GOTOFF(%ebx),%eax
|
||||
movq 32(%edx), %mm2
|
||||
psrad $11, %mm0
|
||||
movq 40(%edx), %mm5
|
||||
psrad $11, %mm4
|
||||
packssdw %mm0, %mm1
|
||||
movq %mm5, %mm6
|
||||
packssdw %mm3, %mm4
|
||||
movq %mm2, %mm0
|
||||
movq %mm1, 112(%edx)
|
||||
pshufw $177, %mm4, %mm4
|
||||
movq (%eax), %mm3
|
||||
movq %mm4, 120(%edx)
|
||||
pmaddwd %mm0, %mm3
|
||||
movq 8(%eax), %mm4
|
||||
pshufw $78, %mm2, %mm2
|
||||
leal rounder2@GOTOFF(%ebx),%ecx
|
||||
movq 16(%eax), %mm1
|
||||
pmaddwd %mm2, %mm4
|
||||
pmaddwd 32(%eax), %mm0
|
||||
pshufw $78, %mm6, %mm6
|
||||
movq 24(%eax), %mm7
|
||||
pmaddwd %mm5, %mm1
|
||||
paddd (%ecx), %mm3
|
||||
pmaddwd %mm6, %mm7
|
||||
pmaddwd 40(%eax), %mm2
|
||||
paddd %mm4, %mm3
|
||||
pmaddwd 48(%eax), %mm5
|
||||
movq %mm3, %mm4
|
||||
pmaddwd 56(%eax), %mm6
|
||||
paddd %mm7, %mm1
|
||||
paddd (%ecx), %mm0
|
||||
psubd %mm1, %mm3
|
||||
psrad $11, %mm3
|
||||
paddd %mm4, %mm1
|
||||
paddd %mm2, %mm0
|
||||
psrad $11, %mm1
|
||||
paddd %mm6, %mm5
|
||||
movq %mm0, %mm4
|
||||
paddd %mm5, %mm0
|
||||
psubd %mm5, %mm4
|
||||
movq 96(%edx), %mm2
|
||||
psrad $11, %mm0
|
||||
movq 104(%edx), %mm5
|
||||
psrad $11, %mm4
|
||||
packssdw %mm0, %mm1
|
||||
movq %mm5, %mm6
|
||||
packssdw %mm3, %mm4
|
||||
movq %mm2, %mm0
|
||||
movq %mm1, 32(%edx)
|
||||
pshufw $177, %mm4, %mm4
|
||||
movq (%eax), %mm3
|
||||
movq %mm4, 40(%edx)
|
||||
pmaddwd %mm0, %mm3
|
||||
movq 8(%eax), %mm4
|
||||
pshufw $78, %mm2, %mm2
|
||||
leal rounder6@GOTOFF(%ebx),%ecx
|
||||
movq 16(%eax), %mm1
|
||||
pmaddwd %mm2, %mm4
|
||||
pmaddwd 32(%eax), %mm0
|
||||
pshufw $78, %mm6, %mm6
|
||||
movq 24(%eax), %mm7
|
||||
pmaddwd %mm5, %mm1
|
||||
paddd (%ecx), %mm3
|
||||
pmaddwd %mm6, %mm7
|
||||
pmaddwd 40(%eax), %mm2
|
||||
paddd %mm4, %mm3
|
||||
pmaddwd 48(%eax), %mm5
|
||||
movq %mm3, %mm4
|
||||
pmaddwd 56(%eax), %mm6
|
||||
paddd %mm7, %mm1
|
||||
paddd (%ecx), %mm0
|
||||
psubd %mm1, %mm3
|
||||
psrad $11, %mm3
|
||||
paddd %mm4, %mm1
|
||||
paddd %mm2, %mm0
|
||||
psrad $11, %mm1
|
||||
paddd %mm6, %mm5
|
||||
movq %mm0, %mm4
|
||||
paddd %mm5, %mm0
|
||||
psubd %mm5, %mm4
|
||||
leal table35.57@GOTOFF(%ebx),%eax
|
||||
movq 48(%edx), %mm2
|
||||
psrad $11, %mm0
|
||||
movq 56(%edx), %mm5
|
||||
psrad $11, %mm4
|
||||
packssdw %mm0, %mm1
|
||||
movq %mm5, %mm6
|
||||
packssdw %mm3, %mm4
|
||||
movq %mm2, %mm0
|
||||
movq %mm1, 96(%edx)
|
||||
pshufw $177, %mm4, %mm4
|
||||
movq (%eax), %mm3
|
||||
movq %mm4, 104(%edx)
|
||||
pmaddwd %mm0, %mm3
|
||||
movq 8(%eax), %mm4
|
||||
pshufw $78, %mm2, %mm2
|
||||
leal rounder3@GOTOFF(%ebx),%ecx
|
||||
movq 16(%eax), %mm1
|
||||
pmaddwd %mm2, %mm4
|
||||
pmaddwd 32(%eax), %mm0
|
||||
pshufw $78, %mm6, %mm6
|
||||
movq 24(%eax), %mm7
|
||||
pmaddwd %mm5, %mm1
|
||||
paddd (%ecx), %mm3
|
||||
pmaddwd %mm6, %mm7
|
||||
pmaddwd 40(%eax), %mm2
|
||||
paddd %mm4, %mm3
|
||||
pmaddwd 48(%eax), %mm5
|
||||
movq %mm3, %mm4
|
||||
pmaddwd 56(%eax), %mm6
|
||||
paddd %mm7, %mm1
|
||||
paddd (%ecx), %mm0
|
||||
psubd %mm1, %mm3
|
||||
psrad $11, %mm3
|
||||
paddd %mm4, %mm1
|
||||
paddd %mm2, %mm0
|
||||
psrad $11, %mm1
|
||||
paddd %mm6, %mm5
|
||||
movq %mm0, %mm4
|
||||
paddd %mm5, %mm0
|
||||
psubd %mm5, %mm4
|
||||
movq 80(%edx), %mm2
|
||||
psrad $11, %mm0
|
||||
movq 88(%edx), %mm5
|
||||
psrad $11, %mm4
|
||||
packssdw %mm0, %mm1
|
||||
movq %mm5, %mm6
|
||||
packssdw %mm3, %mm4
|
||||
movq %mm2, %mm0
|
||||
movq %mm1, 48(%edx)
|
||||
pshufw $177, %mm4, %mm4
|
||||
movq (%eax), %mm3
|
||||
movq %mm4, 56(%edx)
|
||||
pmaddwd %mm0, %mm3
|
||||
movq 8(%eax), %mm4
|
||||
pshufw $78, %mm2, %mm2
|
||||
leal rounder5@GOTOFF(%ebx),%ecx
|
||||
movq 16(%eax), %mm1
|
||||
pmaddwd %mm2, %mm4
|
||||
pmaddwd 32(%eax), %mm0
|
||||
pshufw $78, %mm6, %mm6
|
||||
movq 24(%eax), %mm7
|
||||
pmaddwd %mm5, %mm1
|
||||
paddd (%ecx), %mm3
|
||||
pmaddwd %mm6, %mm7
|
||||
pmaddwd 40(%eax), %mm2
|
||||
paddd %mm4, %mm3
|
||||
pmaddwd 48(%eax), %mm5
|
||||
movq %mm3, %mm4
|
||||
pmaddwd 56(%eax), %mm6
|
||||
paddd %mm7, %mm1
|
||||
paddd (%ecx), %mm0
|
||||
psubd %mm1, %mm3
|
||||
psrad $11, %mm3
|
||||
paddd %mm4, %mm1
|
||||
paddd %mm2, %mm0
|
||||
psrad $11, %mm1
|
||||
paddd %mm6, %mm5
|
||||
movq %mm0, %mm4
|
||||
paddd %mm5, %mm0
|
||||
psubd %mm5, %mm4
|
||||
psrad $11, %mm0
|
||||
psrad $11, %mm4
|
||||
packssdw %mm0, %mm1
|
||||
packssdw %mm3, %mm4
|
||||
movq %mm1, 80(%edx)
|
||||
pshufw $177, %mm4, %mm4
|
||||
movq %mm4, 88(%edx)
|
||||
leal _T1.46@GOTOFF(%ebx),%edi
|
||||
movq (%edi), %mm0
|
||||
movq 16(%edx), %mm1
|
||||
movq %mm0, %mm2
|
||||
movq 112(%edx), %mm4
|
||||
pmulhw %mm1, %mm0
|
||||
leal _T3.48@GOTOFF(%ebx),%esi
|
||||
movl %esi,16(%esp)
|
||||
movq (%esi), %mm5
|
||||
pmulhw %mm4, %mm2
|
||||
movq 80(%edx), %mm6
|
||||
movq %mm5, %mm7
|
||||
movq 48(%edx), %mm3
|
||||
psubsw %mm4, %mm0
|
||||
leal _T2.47@GOTOFF(%ebx),%ecx
|
||||
movq (%ecx), %mm4
|
||||
pmulhw %mm3, %mm5
|
||||
paddsw %mm2, %mm1
|
||||
pmulhw %mm6, %mm7
|
||||
movq %mm4, %mm2
|
||||
paddsw %mm3, %mm5
|
||||
pmulhw 32(%edx), %mm4
|
||||
paddsw %mm6, %mm7
|
||||
psubsw %mm6, %mm5
|
||||
paddsw %mm3, %mm7
|
||||
movq 96(%edx), %mm3
|
||||
movq %mm0, %mm6
|
||||
pmulhw %mm3, %mm2
|
||||
psubsw %mm5, %mm0
|
||||
psubsw %mm3, %mm4
|
||||
paddsw %mm6, %mm5
|
||||
leal scratch0.50@GOTOFF(%ebx),%esi
|
||||
movl %esi,20(%esp)
|
||||
movq %mm0, scratch0.50@GOTOFF(%ebx)
|
||||
movq %mm1, %mm6
|
||||
paddsw 32(%edx), %mm2
|
||||
paddsw %mm7, %mm6
|
||||
psubsw %mm7, %mm1
|
||||
movq %mm1, %mm7
|
||||
movq (%edx), %mm3
|
||||
paddsw %mm5, %mm1
|
||||
leal _C4.49@GOTOFF(%ebx),%eax
|
||||
movq (%eax), %mm0
|
||||
psubsw %mm5, %mm7
|
||||
leal scratch1.51@GOTOFF(%ebx),%ebp
|
||||
movq %mm6, scratch1.51@GOTOFF(%ebx)
|
||||
pmulhw %mm0, %mm1
|
||||
movq %mm4, %mm6
|
||||
pmulhw %mm0, %mm7
|
||||
movq 64(%edx), %mm5
|
||||
movq %mm3, %mm0
|
||||
psubsw %mm5, %mm3
|
||||
paddsw %mm5, %mm0
|
||||
paddsw %mm3, %mm4
|
||||
movq %mm0, %mm5
|
||||
psubsw %mm6, %mm3
|
||||
paddsw %mm2, %mm5
|
||||
paddsw %mm1, %mm1
|
||||
psubsw %mm2, %mm0
|
||||
paddsw %mm7, %mm7
|
||||
movq %mm3, %mm2
|
||||
movq %mm4, %mm6
|
||||
paddsw %mm7, %mm3
|
||||
psraw $6, %mm3
|
||||
paddsw %mm1, %mm4
|
||||
psraw $6, %mm4
|
||||
psubsw %mm1, %mm6
|
||||
movq (%ebp), %mm1
|
||||
psubsw %mm7, %mm2
|
||||
psraw $6, %mm6
|
||||
movq %mm5, %mm7
|
||||
movq %mm4, 16(%edx)
|
||||
psraw $6, %mm2
|
||||
movq %mm3, 32(%edx)
|
||||
paddsw %mm1, %mm5
|
||||
movq (%esi), %mm4
|
||||
psubsw %mm1, %mm7
|
||||
psraw $6, %mm5
|
||||
movq %mm0, %mm3
|
||||
movq %mm2, 80(%edx)
|
||||
psubsw %mm4, %mm3
|
||||
psraw $6, %mm7
|
||||
paddsw %mm0, %mm4
|
||||
movq %mm5, (%edx)
|
||||
psraw $6, %mm3
|
||||
movq %mm6, 96(%edx)
|
||||
psraw $6, %mm4
|
||||
movq %mm7, 112(%edx)
|
||||
movq %mm3, 64(%edx)
|
||||
movq %mm4, 48(%edx)
|
||||
movq (%edi), %mm0
|
||||
movq 24(%edx), %mm1
|
||||
movq %mm0, %mm2
|
||||
movq 120(%edx), %mm4
|
||||
pmulhw %mm1, %mm0
|
||||
movl 16(%esp),%esi
|
||||
movq (%esi), %mm5
|
||||
pmulhw %mm4, %mm2
|
||||
movq 88(%edx), %mm6
|
||||
movq %mm5, %mm7
|
||||
movq 56(%edx), %mm3
|
||||
psubsw %mm4, %mm0
|
||||
movq (%ecx), %mm4
|
||||
pmulhw %mm3, %mm5
|
||||
paddsw %mm2, %mm1
|
||||
pmulhw %mm6, %mm7
|
||||
movq %mm4, %mm2
|
||||
paddsw %mm3, %mm5
|
||||
pmulhw 40(%edx), %mm4
|
||||
paddsw %mm6, %mm7
|
||||
psubsw %mm6, %mm5
|
||||
paddsw %mm3, %mm7
|
||||
movq 104(%edx), %mm3
|
||||
movq %mm0, %mm6
|
||||
pmulhw %mm3, %mm2
|
||||
psubsw %mm5, %mm0
|
||||
psubsw %mm3, %mm4
|
||||
paddsw %mm6, %mm5
|
||||
movq %mm0, scratch0.50@GOTOFF(%ebx)
|
||||
movq %mm1, %mm6
|
||||
paddsw 40(%edx), %mm2
|
||||
paddsw %mm7, %mm6
|
||||
psubsw %mm7, %mm1
|
||||
movq %mm1, %mm7
|
||||
movq 8(%edx), %mm3
|
||||
paddsw %mm5, %mm1
|
||||
movq (%eax), %mm0
|
||||
psubsw %mm5, %mm7
|
||||
movq %mm6, scratch1.51@GOTOFF(%ebx)
|
||||
pmulhw %mm0, %mm1
|
||||
movq %mm4, %mm6
|
||||
pmulhw %mm0, %mm7
|
||||
movq 72(%edx), %mm5
|
||||
movq %mm3, %mm0
|
||||
psubsw %mm5, %mm3
|
||||
paddsw %mm5, %mm0
|
||||
paddsw %mm3, %mm4
|
||||
movq %mm0, %mm5
|
||||
psubsw %mm6, %mm3
|
||||
paddsw %mm2, %mm5
|
||||
paddsw %mm1, %mm1
|
||||
psubsw %mm2, %mm0
|
||||
paddsw %mm7, %mm7
|
||||
movq %mm3, %mm2
|
||||
movq %mm4, %mm6
|
||||
paddsw %mm7, %mm3
|
||||
psraw $6, %mm3
|
||||
paddsw %mm1, %mm4
|
||||
psraw $6, %mm4
|
||||
psubsw %mm1, %mm6
|
||||
movq (%ebp), %mm1
|
||||
psubsw %mm7, %mm2
|
||||
psraw $6, %mm6
|
||||
movq %mm5, %mm7
|
||||
movq %mm4, 24(%edx)
|
||||
psraw $6, %mm2
|
||||
movq %mm3, 40(%edx)
|
||||
paddsw %mm1, %mm5
|
||||
movl 20(%esp),%esi
|
||||
movq (%esi), %mm4
|
||||
psubsw %mm1, %mm7
|
||||
psraw $6, %mm5
|
||||
movq %mm0, %mm3
|
||||
movq %mm2, 88(%edx)
|
||||
psubsw %mm4, %mm3
|
||||
psraw $6, %mm7
|
||||
paddsw %mm0, %mm4
|
||||
movq %mm5, 8(%edx)
|
||||
psraw $6, %mm3
|
||||
movq %mm6, 104(%edx)
|
||||
psraw $6, %mm4
|
||||
movq %mm7, 120(%edx)
|
||||
movq %mm3, 72(%edx)
|
||||
movq %mm4, 56(%edx)
|
||||
popl %ebx
|
||||
popl %esi
|
||||
popl %edi
|
||||
popl %ebp
|
||||
addl $8,%esp
|
||||
ret
|
Loading…
x
Reference in New Issue
Block a user