summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
commit4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69 (patch)
tree8f41b30e571aa6ed88b53f5471d5e38461136e60 /gst-libs/gst
parent9f4226fe55f09cf5809376b467aa3f46dbf7b5c2 (diff)
downloadgst-plugins-bad-4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69.tar.gz
gst-plugins-bad-4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69.tar.bz2
gst-plugins-bad-4fd57bbe3fef59592a8664dcc9fa2ab32ae99c69.zip
don't mix tabs and spaces
Original commit message from CVS: don't mix tabs and spaces
Diffstat (limited to 'gst-libs/gst')
-rw-r--r--gst-libs/gst/audio/audio.c40
-rw-r--r--gst-libs/gst/audio/audioclock.c5
-rw-r--r--gst-libs/gst/audio/gstaudiofilter.c11
-rw-r--r--gst-libs/gst/audio/gstaudiofiltertemplate.c7
-rw-r--r--gst-libs/gst/colorbalance/colorbalance.c16
-rw-r--r--gst-libs/gst/colorbalance/colorbalancechannel.c6
-rw-r--r--gst-libs/gst/gconf/gconf.c16
-rw-r--r--gst-libs/gst/idct/fastintidct.c26
-rw-r--r--gst-libs/gst/idct/floatidct.c6
-rw-r--r--gst-libs/gst/idct/ieeetest.c60
-rw-r--r--gst-libs/gst/idct/intidct.c108
-rw-r--r--gst-libs/gst/idct/mmx32idct.c572
-rw-r--r--gst-libs/gst/media-info/media-info-priv.c95
-rw-r--r--gst-libs/gst/media-info/media-info-test.c2
-rw-r--r--gst-libs/gst/media-info/media-info.c101
-rw-r--r--gst-libs/gst/mixer/mixer.c40
-rw-r--r--gst-libs/gst/mixer/mixertrack.c10
-rw-r--r--gst-libs/gst/navigation/navigation.c8
-rw-r--r--gst-libs/gst/play/play.c220
-rw-r--r--gst-libs/gst/propertyprobe/propertyprobe.c12
-rw-r--r--gst-libs/gst/resample/dtos.c5
-rw-r--r--gst-libs/gst/resample/resample.c88
-rw-r--r--gst-libs/gst/resample/test.c6
-rw-r--r--gst-libs/gst/riff/riff-media.c182
-rw-r--r--gst-libs/gst/riff/riff-read.c167
-rw-r--r--gst-libs/gst/tuner/tuner.c56
-rw-r--r--gst-libs/gst/tuner/tunerchannel.c8
-rw-r--r--gst-libs/gst/tuner/tunernorm.c4
-rw-r--r--gst-libs/gst/video/gstvideosink.c2
-rw-r--r--gst-libs/gst/video/video.c8
-rw-r--r--gst-libs/gst/xoverlay/xoverlay.c24
-rw-r--r--gst-libs/gst/xwindowlistener/xwindowlistener.c166
32 files changed, 1043 insertions, 1034 deletions
diff --git a/gst-libs/gst/audio/audio.c b/gst-libs/gst/audio/audio.c
index 10a00142..ae0571fa 100644
--- a/gst-libs/gst/audio/audio.c
+++ b/gst-libs/gst/audio/audio.c
@@ -46,7 +46,7 @@ gst_audio_frame_byte_size (GstPad * pad)
if (caps == NULL) {
/* ERROR: could not get caps of pad */
g_warning ("gstaudio: could not get caps of pad %s:%s\n",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return 0;
}
@@ -94,7 +94,7 @@ gst_audio_frame_rate (GstPad * pad)
if (caps == NULL) {
/* ERROR: could not get caps of pad */
g_warning ("gstaudio: could not get caps of pad %s:%s\n",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return 0;
} else {
structure = gst_caps_get_structure (caps, 0);
@@ -127,7 +127,7 @@ gst_audio_length (GstPad * pad, GstBuffer * buf)
if (caps == NULL) {
/* ERROR: could not get caps of pad */
g_warning ("gstaudio: could not get caps of pad %s:%s\n",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
length = 0.0;
} else {
structure = gst_caps_get_structure (caps, 0);
@@ -160,7 +160,7 @@ gst_audio_highest_sample_value (GstPad * pad)
caps = GST_PAD_CAPS (pad);
if (caps == NULL) {
g_warning ("gstaudio: could not get caps of pad %s:%s\n",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
}
structure = gst_caps_get_structure (caps, 0);
@@ -218,19 +218,19 @@ _gst_audio_structure_set_list (GstStructure * structure,
switch (type) {
case G_TYPE_INT:
- i = va_arg (varargs, int);
+ i = va_arg (varargs, int);
- g_value_init (&list_value, G_TYPE_INT);
- g_value_set_int (&list_value, i);
- break;
+ g_value_init (&list_value, G_TYPE_INT);
+ g_value_set_int (&list_value, i);
+ break;
case G_TYPE_BOOLEAN:
- b = va_arg (varargs, gboolean);
- g_value_init (&list_value, G_TYPE_BOOLEAN);
- g_value_set_boolean (&list_value, b);
- break;
+ b = va_arg (varargs, gboolean);
+ g_value_init (&list_value, G_TYPE_BOOLEAN);
+ g_value_set_boolean (&list_value, b);
+ break;
default:
- g_warning
- ("_gst_audio_structure_set_list: LIST of given type not implemented.");
+ g_warning
+ ("_gst_audio_structure_set_list: LIST of given type not implemented.");
}
g_array_append_val (array, list_value);
@@ -244,24 +244,24 @@ gst_audio_structure_set_int (GstStructure * structure, GstAudioFieldFlag flag)
{
if (flag & GST_AUDIO_FIELD_RATE)
gst_structure_set (structure, "rate", GST_TYPE_INT_RANGE, 1, G_MAXINT,
- NULL);
+ NULL);
if (flag & GST_AUDIO_FIELD_CHANNELS)
gst_structure_set (structure, "channels", GST_TYPE_INT_RANGE, 1, G_MAXINT,
- NULL);
+ NULL);
if (flag & GST_AUDIO_FIELD_ENDIANNESS)
_gst_audio_structure_set_list (structure, "endianness", G_TYPE_INT, 2,
- G_LITTLE_ENDIAN, G_BIG_ENDIAN, NULL);
+ G_LITTLE_ENDIAN, G_BIG_ENDIAN, NULL);
if (flag & GST_AUDIO_FIELD_WIDTH)
_gst_audio_structure_set_list (structure, "width", G_TYPE_INT, 3, 8, 16, 32,
- NULL);
+ NULL);
if (flag & GST_AUDIO_FIELD_DEPTH)
gst_structure_set (structure, "depth", GST_TYPE_INT_RANGE, 1, 32, NULL);
if (flag & GST_AUDIO_FIELD_SIGNED)
_gst_audio_structure_set_list (structure, "signed", G_TYPE_BOOLEAN, 2, TRUE,
- FALSE, NULL);
+ FALSE, NULL);
if (flag & GST_AUDIO_FIELD_BUFFER_FRAMES)
gst_structure_set (structure, "buffer-frames", GST_TYPE_INT_RANGE, 1,
- G_MAXINT, NULL);
+ G_MAXINT, NULL);
}
static gboolean
diff --git a/gst-libs/gst/audio/audioclock.c b/gst-libs/gst/audio/audioclock.c
index d6d1da45..f66f4eba 100644
--- a/gst-libs/gst/audio/audioclock.c
+++ b/gst-libs/gst/audio/audioclock.c
@@ -57,8 +57,9 @@ gst_audio_clock_get_type (void)
(GInstanceInitFunc) gst_audio_clock_init,
NULL
};
+
clock_type = g_type_register_static (GST_TYPE_SYSTEM_CLOCK, "GstAudioClock",
- &clock_info, 0);
+ &clock_info, 0);
}
return clock_type;
}
@@ -162,7 +163,7 @@ gst_audio_clock_update_time (GstAudioClock * aclock, GstClockTime time)
entry->func ((GstClock *) aclock, time, entry, entry->user_data);
aclock->async_entries = g_slist_delete_link (aclock->async_entries,
- aclock->async_entries);
+ aclock->async_entries);
/* do I need to free the entry? */
}
}
diff --git a/gst-libs/gst/audio/gstaudiofilter.c b/gst-libs/gst/audio/gstaudiofilter.c
index ad491bb6..179c1d35 100644
--- a/gst-libs/gst/audio/gstaudiofilter.c
+++ b/gst-libs/gst/audio/gstaudiofilter.c
@@ -73,8 +73,9 @@ gst_audiofilter_get_type (void)
0,
gst_audiofilter_init,
};
+
audiofilter_type = g_type_register_static (GST_TYPE_ELEMENT,
- "GstAudiofilter", &audiofilter_info, G_TYPE_FLAG_ABSTRACT);
+ "GstAudiofilter", &audiofilter_info, G_TYPE_FLAG_ABSTRACT);
}
return audiofilter_type;
}
@@ -141,7 +142,7 @@ gst_audiofilter_link (GstPad * pad, const GstCaps * caps)
ret = gst_structure_get_int (structure, "depth", &audiofilter->depth);
ret &= gst_structure_get_int (structure, "width", &audiofilter->width);
ret &=
- gst_structure_get_int (structure, "channels", &audiofilter->channels);
+ gst_structure_get_int (structure, "channels", &audiofilter->channels);
} else if (strcmp (gst_structure_get_name (structure), "audio/x-raw-float")
== 0) {
@@ -236,7 +237,7 @@ gst_audiofilter_chain (GstPad * pad, GstData * data)
(audiofilter_class->filter) (audiofilter, outbuf, inbuf);
} else {
memcpy (GST_BUFFER_DATA (outbuf), GST_BUFFER_DATA (inbuf),
- GST_BUFFER_SIZE (inbuf));
+ GST_BUFFER_SIZE (inbuf));
(audiofilter_class->filter_inplace) (audiofilter, outbuf);
}
@@ -290,11 +291,11 @@ gst_audiofilter_class_add_pad_templates (GstAudiofilterClass *
gst_element_class_add_pad_template (element_class,
gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
- gst_caps_copy (caps)));
+ gst_caps_copy (caps)));
gst_element_class_add_pad_template (element_class,
gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
- gst_caps_copy (caps)));
+ gst_caps_copy (caps)));
}
static gboolean
diff --git a/gst-libs/gst/audio/gstaudiofiltertemplate.c b/gst-libs/gst/audio/gstaudiofiltertemplate.c
index 994fdc59..f641a6f2 100644
--- a/gst-libs/gst/audio/gstaudiofiltertemplate.c
+++ b/gst-libs/gst/audio/gstaudiofiltertemplate.c
@@ -107,8 +107,9 @@ gst_audiofilter_template_get_type (void)
0,
NULL,
};
+
audiofilter_template_type = g_type_register_static (GST_TYPE_AUDIOFILTER,
- "GstAudiofilterTemplate", &audiofilter_template_info, 0);
+ "GstAudiofilterTemplate", &audiofilter_template_info, 0);
}
return audiofilter_template_type;
}
@@ -147,8 +148,8 @@ gst_audiofilter_template_class_init (gpointer g_class, gpointer class_data)
#if 0
g_object_class_install_property (gobject_class, ARG_METHOD,
g_param_spec_enum ("method", "method", "method",
- GST_TYPE_AUDIOTEMPLATE_METHOD, GST_AUDIOTEMPLATE_METHOD_1,
- G_PARAM_READWRITE));
+ GST_TYPE_AUDIOTEMPLATE_METHOD, GST_AUDIOTEMPLATE_METHOD_1,
+ G_PARAM_READWRITE));
#endif
gobject_class->set_property = gst_audiofilter_template_set_property;
diff --git a/gst-libs/gst/colorbalance/colorbalance.c b/gst-libs/gst/colorbalance/colorbalance.c
index fbf18581..ac6e511e 100644
--- a/gst-libs/gst/colorbalance/colorbalance.c
+++ b/gst-libs/gst/colorbalance/colorbalance.c
@@ -56,9 +56,9 @@ gst_color_balance_get_type (void)
};
gst_color_balance_type = g_type_register_static (G_TYPE_INTERFACE,
- "GstColorBalance", &gst_color_balance_info, 0);
+ "GstColorBalance", &gst_color_balance_info, 0);
g_type_interface_add_prerequisite (gst_color_balance_type,
- GST_TYPE_IMPLEMENTS_INTERFACE);
+ GST_TYPE_IMPLEMENTS_INTERFACE);
}
return gst_color_balance_type;
@@ -71,12 +71,12 @@ gst_color_balance_class_init (GstColorBalanceClass * klass)
if (!initialized) {
gst_color_balance_signals[VALUE_CHANGED] =
- g_signal_new ("value-changed",
- GST_TYPE_COLOR_BALANCE, G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstColorBalanceClass, value_changed),
- NULL, NULL,
- gst_color_balance_marshal_VOID__OBJECT_INT,
- G_TYPE_NONE, 2, GST_TYPE_COLOR_BALANCE_CHANNEL, G_TYPE_INT);
+ g_signal_new ("value-changed",
+ GST_TYPE_COLOR_BALANCE, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstColorBalanceClass, value_changed),
+ NULL, NULL,
+ gst_color_balance_marshal_VOID__OBJECT_INT,
+ G_TYPE_NONE, 2, GST_TYPE_COLOR_BALANCE_CHANNEL, G_TYPE_INT);
initialized = TRUE;
}
diff --git a/gst-libs/gst/colorbalance/colorbalancechannel.c b/gst-libs/gst/colorbalance/colorbalancechannel.c
index 7812ed93..4fd0ea88 100644
--- a/gst-libs/gst/colorbalance/colorbalancechannel.c
+++ b/gst-libs/gst/colorbalance/colorbalancechannel.c
@@ -60,8 +60,8 @@ gst_color_balance_channel_get_type (void)
};
gst_color_balance_channel_type =
- g_type_register_static (G_TYPE_OBJECT,
- "GstColorBalanceChannel", &color_balance_channel_info, 0);
+ g_type_register_static (G_TYPE_OBJECT,
+ "GstColorBalanceChannel", &color_balance_channel_info, 0);
}
return gst_color_balance_channel_type;
@@ -78,7 +78,7 @@ gst_color_balance_channel_class_init (GstColorBalanceChannelClass * klass)
g_signal_new ("value-changed", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstColorBalanceChannelClass,
- value_changed),
+ value_changed),
NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
object_klass->dispose = gst_color_balance_channel_dispose;
diff --git a/gst-libs/gst/gconf/gconf.c b/gst-libs/gst/gconf/gconf.c
index 1887b718..d68ffe43 100644
--- a/gst-libs/gst/gconf/gconf.c
+++ b/gst-libs/gst/gconf/gconf.c
@@ -31,7 +31,7 @@
#error "GST_GCONF_DIR is not defined !"
#endif
-static GConfClient *_gst_gconf_client = NULL; /* GConf connection */
+static GConfClient *_gst_gconf_client = NULL; /* GConf connection */
/* internal functions */
@@ -63,13 +63,13 @@ gst_bin_find_unconnected_pad (GstBin * bin, GstPadDirection direction)
while (pads) {
/* check if the direction matches */
if (GST_PAD_DIRECTION (GST_PAD (pads->data)) == direction) {
- if (GST_PAD_PEER (GST_PAD (pads->data)) == NULL) {
- /* found it ! */
- pad = GST_PAD (pads->data);
- }
+ if (GST_PAD_PEER (GST_PAD (pads->data)) == NULL) {
+ /* found it ! */
+ pad = GST_PAD (pads->data);
+ }
}
if (pad)
- break; /* found one already */
+ break; /* found one already */
pads = g_list_next (pads);
}
elements = g_list_next (elements);
@@ -149,7 +149,7 @@ gst_gconf_render_bin_from_description (const gchar * description)
g_free (desc);
if (error) {
g_print ("DEBUG: gstgconf: error parsing pipeline %s\n%s\n",
- description, error->message);
+ description, error->message);
g_error_free (error);
return NULL;
}
@@ -308,7 +308,7 @@ gst_gconf_get_default_visualization_element (void)
if (!ret)
g_warning
- ("No GConf default visualization plugin key and goom doesn't work");
+ ("No GConf default visualization plugin key and goom doesn't work");
else
g_print ("GConf visualization plugin not found, using goom\n");
}
diff --git a/gst-libs/gst/idct/fastintidct.c b/gst-libs/gst/idct/fastintidct.c
index 9bb1436d..d4caaf38 100644
--- a/gst-libs/gst/idct/fastintidct.c
+++ b/gst-libs/gst/idct/fastintidct.c
@@ -45,17 +45,17 @@
/* this code assumes >> to be a two's-complement arithmetic */
/* right shift: (-2)>>1 == -1 , (-3)>>1 == -2 */
-#define W1 2841 /* 2048*sqrt(2)*cos(1*pi/16) */
-#define W2 2676 /* 2048*sqrt(2)*cos(2*pi/16) */
-#define W3 2408 /* 2048*sqrt(2)*cos(3*pi/16) */
-#define W5 1609 /* 2048*sqrt(2)*cos(5*pi/16) */
-#define W6 1108 /* 2048*sqrt(2)*cos(6*pi/16) */
-#define W7 565 /* 2048*sqrt(2)*cos(7*pi/16) */
+#define W1 2841 /* 2048*sqrt(2)*cos(1*pi/16) */
+#define W2 2676 /* 2048*sqrt(2)*cos(2*pi/16) */
+#define W3 2408 /* 2048*sqrt(2)*cos(3*pi/16) */
+#define W5 1609 /* 2048*sqrt(2)*cos(5*pi/16) */
+#define W6 1108 /* 2048*sqrt(2)*cos(6*pi/16) */
+#define W7 565 /* 2048*sqrt(2)*cos(7*pi/16) */
#include "dct.h"
/* private data */
-static short iclip[1024]; /* clipping table */
+static short iclip[1024]; /* clipping table */
static short *iclp;
/* private prototypes */
@@ -80,13 +80,13 @@ idctrow (blk)
/* shortcut */
if (!((x1 = blk[4] << 11) | (x2 = blk[6]) | (x3 = blk[2]) |
- (x4 = blk[1]) | (x5 = blk[7]) | (x6 = blk[5]) | (x7 = blk[3]))) {
+ (x4 = blk[1]) | (x5 = blk[7]) | (x6 = blk[5]) | (x7 = blk[3]))) {
blk[0] = blk[1] = blk[2] = blk[3] = blk[4] = blk[5] = blk[6] = blk[7] =
- blk[0] << 3;
+ blk[0] << 3;
return;
}
- x0 = (blk[0] << 11) + 128; /* for proper rounding in the fourth stage */
+ x0 = (blk[0] << 11) + 128; /* for proper rounding in the fourth stage */
/* first stage */
x8 = W7 * (x4 + x5);
@@ -143,10 +143,10 @@ idctcol (blk)
/* shortcut */
if (!((x1 = (blk[8 * 4] << 8)) | (x2 = blk[8 * 6]) | (x3 = blk[8 * 2]) |
- (x4 = blk[8 * 1]) | (x5 = blk[8 * 7]) | (x6 = blk[8 * 5]) | (x7 =
- blk[8 * 3]))) {
+ (x4 = blk[8 * 1]) | (x5 = blk[8 * 7]) | (x6 = blk[8 * 5]) | (x7 =
+ blk[8 * 3]))) {
blk[8 * 0] = blk[8 * 1] = blk[8 * 2] = blk[8 * 3] = blk[8 * 4] =
- blk[8 * 5] = blk[8 * 6] = blk[8 * 7] = iclp[(blk[8 * 0] + 32) >> 6];
+ blk[8 * 5] = blk[8 * 6] = blk[8 * 7] = iclp[(blk[8 * 0] + 32) >> 6];
return;
}
diff --git a/gst-libs/gst/idct/floatidct.c b/gst-libs/gst/idct/floatidct.c
index 0fa1e830..65e01d40 100644
--- a/gst-libs/gst/idct/floatidct.c
+++ b/gst-libs/gst/idct/floatidct.c
@@ -66,7 +66,7 @@ gst_idct_init_float_idct ()
scale = (freq == 0) ? sqrt (0.125) : 0.5;
for (time = 0; time < 8; time++)
gst_idct_float_c[freq][time] =
- scale * cos ((PI / 8.0) * freq * (time + 0.5));
+ scale * cos ((PI / 8.0) * freq * (time + 0.5));
}
}
@@ -85,7 +85,7 @@ gst_idct_float_idct (block)
partial_product = 0.0;
for (k = 0; k < 8; k++)
- partial_product += gst_idct_float_c[k][j] * block[8 * i + k];
+ partial_product += gst_idct_float_c[k][j] * block[8 * i + k];
tmp[8 * i + j] = partial_product;
}
@@ -98,7 +98,7 @@ gst_idct_float_idct (block)
partial_product = 0.0;
for (k = 0; k < 8; k++)
- partial_product += gst_idct_float_c[k][i] * tmp[8 * k + j];
+ partial_product += gst_idct_float_c[k][i] * tmp[8 * k + j];
v = (int) floor (partial_product + 0.5);
block[8 * i + j] = (v < -256) ? -256 : ((v > 255) ? 255 : v);
diff --git a/gst-libs/gst/idct/ieeetest.c b/gst-libs/gst/idct/ieeetest.c
index d26181c1..7af101e6 100644
--- a/gst-libs/gst/idct/ieeetest.c
+++ b/gst-libs/gst/idct/ieeetest.c
@@ -52,10 +52,10 @@ main (int argc, char **argv)
int i, j;
double max, total;
int method;
- DCTELEM block[DCTSIZE2]; /* random source data */
- DCTELEM refcoefs[DCTSIZE2]; /* coefs from reference FDCT */
- DCTELEM refout[DCTSIZE2]; /* output from reference IDCT */
- DCTELEM testout[DCTSIZE2]; /* output from test IDCT */
+ DCTELEM block[DCTSIZE2]; /* random source data */
+ DCTELEM refcoefs[DCTSIZE2]; /* coefs from reference FDCT */
+ DCTELEM refout[DCTSIZE2]; /* output from reference IDCT */
+ DCTELEM testout[DCTSIZE2]; /* output from test IDCT */
GstIDCT *idct;
guint64 tscstart, tscmin = ~0, tscmax = 0;
guint64 tscstop;
@@ -96,9 +96,9 @@ main (int argc, char **argv)
/* clip */
for (i = 0; i < DCTSIZE2; i++) {
if (refcoefs[i] < -2048)
- refcoefs[i] = -2048;
+ refcoefs[i] = -2048;
else if (refcoefs[i] > 2047)
- refcoefs[i] = 2047;
+ refcoefs[i] = 2047;
}
/* perform reference IDCT */
@@ -107,17 +107,17 @@ main (int argc, char **argv)
/* clip */
for (i = 0; i < DCTSIZE2; i++) {
if (refout[i] < -256)
- refout[i] = -256;
+ refout[i] = -256;
else if (refout[i] > 255)
- refout[i] = 255;
+ refout[i] = 255;
}
/* perform test IDCT */
if (GST_IDCT_TRANSPOSE (idct)) {
for (j = 0; j < DCTSIZE; j++) {
- for (i = 0; i < DCTSIZE; i++) {
- testout[i * DCTSIZE + j] = refcoefs[j * DCTSIZE + i];
- }
+ for (i = 0; i < DCTSIZE; i++) {
+ testout[i * DCTSIZE + j] = refcoefs[j * DCTSIZE + i];
+ }
}
} else {
memcpy (testout, refcoefs, sizeof (DCTELEM) * DCTSIZE2);
@@ -135,9 +135,9 @@ main (int argc, char **argv)
/* clip */
for (i = 0; i < DCTSIZE2; i++) {
if (testout[i] < -256)
- testout[i] = -256;
+ testout[i] = -256;
else if (testout[i] > 255)
- testout[i] = 255;
+ testout[i] = 255;
}
/* accumulate error stats */
@@ -147,9 +147,9 @@ main (int argc, char **argv)
sumerrs[i] += err;
sumsqerrs[i] += err * err;
if (err < 0)
- err = -err;
+ err = -err;
if (maxerr[i] < err)
- maxerr[i] = err;
+ maxerr[i] = err;
}
if (curiter % 100 == 99) {
@@ -290,7 +290,7 @@ dct_init (void)
for (b = 0; b < 8; b++) {
tmp = cos ((double) ((a + a + 1) * b) * (3.14159265358979323846 / 16.0));
if (b == 0)
- tmp /= sqrt (2.0);
+ tmp /= sqrt (2.0);
coslu[a][b] = tmp * 0.5;
}
}
@@ -307,11 +307,11 @@ ref_fdct (DCTELEM block[8][8])
for (u = 0; u < 8; u++) {
tmp = 0.0;
for (y = 0; y < 8; y++) {
- tmp2 = 0.0;
- for (x = 0; x < 8; x++) {
- tmp2 += (double) block[y][x] * coslu[x][u];
- }
- tmp += coslu[y][v] * tmp2;
+ tmp2 = 0.0;
+ for (x = 0; x < 8; x++) {
+ tmp2 += (double) block[y][x] * coslu[x][u];
+ }
+ tmp += coslu[y][v] * tmp2;
}
res[v][u] = tmp;
}
@@ -321,9 +321,9 @@ ref_fdct (DCTELEM block[8][8])
for (u = 0; u < 8; u++) {
tmp = res[v][u];
if (tmp < 0.0) {
- x = -((int) (0.5 - tmp));
+ x = -((int) (0.5 - tmp));
} else {
- x = (int) (tmp + 0.5);
+ x = (int) (tmp + 0.5);
}
block[v][u] = (DCTELEM) x;
}
@@ -342,11 +342,11 @@ ref_idct (DCTELEM block[8][8])
for (x = 0; x < 8; x++) {
tmp = 0.0;
for (v = 0; v < 8; v++) {
- tmp2 = 0.0;
- for (u = 0; u < 8; u++) {
- tmp2 += (double) block[v][u] * coslu[x][u];
- }
- tmp += coslu[y][v] * tmp2;
+ tmp2 = 0.0;
+ for (u = 0; u < 8; u++) {
+ tmp2 += (double) block[v][u] * coslu[x][u];
+ }
+ tmp += coslu[y][v] * tmp2;
}
res[y][x] = tmp;
}
@@ -356,9 +356,9 @@ ref_idct (DCTELEM block[8][8])
for (u = 0; u < 8; u++) {
tmp = res[v][u];
if (tmp < 0.0) {
- x = -((int) (0.5 - tmp));
+ x = -((int) (0.5 - tmp));
} else {
- x = (int) (tmp + 0.5);
+ x = (int) (tmp + 0.5);
}
block[v][u] = (DCTELEM) x;
}
diff --git a/gst-libs/gst/idct/intidct.c b/gst-libs/gst/idct/intidct.c
index 42f0ac84..d2945348 100644
--- a/gst-libs/gst/idct/intidct.c
+++ b/gst-libs/gst/idct/intidct.c
@@ -51,7 +51,7 @@
*/
#if DCTSIZE != 8
-Sorry, this code only copes with 8 x8 DCTs. /* deliberate syntax err */
+Sorry, this code only copes with 8 x8 DCTs. /* deliberate syntax err */
#endif
/*
* A 2-D IDCT can be done by 1-D IDCT on each row followed by 1-D IDCT
@@ -93,7 +93,7 @@ Sorry, this code only copes with 8 x8 DCTs. /* deliberate syntax err */
#define PASS1_BITS 2
#else
#define CONST_BITS 13
-#define PASS1_BITS 1 /* lose a little precision to avoid overflow */
+#define PASS1_BITS 1 /* lose a little precision to avoid overflow */
#endif
#define ONE ((INT32) 1)
#define CONST_SCALE (ONE << CONST_BITS)
@@ -106,18 +106,18 @@ Sorry, this code only copes with 8 x8 DCTs. /* deliberate syntax err */
* (With a reasonable C compiler, you can just rely on the FIX() macro...)
*/
#if CONST_BITS == 13
-#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */
-#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */
-#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */
-#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */
-#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */
-#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */
-#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */
-#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */
-#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */
-#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */
-#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */
-#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */
+#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */
+#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */
+#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */
+#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */
+#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */
+#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */
+#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */
+#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */
+#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */
+#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */
+#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */
+#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */
#else
#define FIX_0_298631336 FIX(0.298631336)
#define FIX_0_390180644 FIX(0.390180644)
@@ -148,14 +148,14 @@ Sorry, this code only copes with 8 x8 DCTs. /* deliberate syntax err */
* NB: for 12-bit samples, a full 32-bit multiplication will be needed.
*/
#ifdef EIGHT_BIT_SAMPLES
-#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
+#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
#define MULTIPLY(var,const) (((INT16) (var)) * ((INT16) (const)))
#endif
-#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */
+#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */
#define MULTIPLY(var,const) (((INT16) (var)) * ((INT32) (const)))
#endif
#endif
-#ifndef MULTIPLY /* default definition */
+#ifndef MULTIPLY /* default definition */
#define MULTIPLY(var,const) ((var) * (const))
#endif
/*
@@ -186,7 +186,7 @@ gst_idct_int_idct (DCTBLOCK data)
*/
if ((dataptr[1] | dataptr[2] | dataptr[3] | dataptr[4] |
- dataptr[5] | dataptr[6] | dataptr[7]) == 0) {
+ dataptr[5] | dataptr[6] | dataptr[7]) == 0) {
/* AC terms all zero */
DCTELEM dcval = (DCTELEM) (dataptr[0] << PASS1_BITS);
@@ -199,7 +199,7 @@ gst_idct_int_idct (DCTBLOCK data)
dataptr[6] = dcval;
dataptr[7] = dcval;
- dataptr += DCTSIZE; /* advance pointer to next row */
+ dataptr += DCTSIZE; /* advance pointer to next row */
continue;
}
@@ -234,16 +234,16 @@ gst_idct_int_idct (DCTBLOCK data)
z2 = tmp1 + tmp2;
z3 = tmp0 + tmp2;
z4 = tmp1 + tmp3;
- z5 = MULTIPLY (z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
+ z5 = MULTIPLY (z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
- tmp0 = MULTIPLY (tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
- tmp1 = MULTIPLY (tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
- tmp2 = MULTIPLY (tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
- tmp3 = MULTIPLY (tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
- z1 = MULTIPLY (z1, -FIX_0_899976223); /* sqrt(2) * (c7-c3) */
- z2 = MULTIPLY (z2, -FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
- z3 = MULTIPLY (z3, -FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
- z4 = MULTIPLY (z4, -FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+ tmp0 = MULTIPLY (tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+ tmp1 = MULTIPLY (tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
+ tmp2 = MULTIPLY (tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
+ tmp3 = MULTIPLY (tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+ z1 = MULTIPLY (z1, -FIX_0_899976223); /* sqrt(2) * (c7-c3) */
+ z2 = MULTIPLY (z2, -FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
+ z3 = MULTIPLY (z3, -FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+ z4 = MULTIPLY (z4, -FIX_0_390180644); /* sqrt(2) * (c5-c3) */
z3 += z5;
z4 += z5;
@@ -264,7 +264,7 @@ gst_idct_int_idct (DCTBLOCK data)
dataptr[3] = (DCTELEM) DESCALE (tmp13 + tmp0, CONST_BITS - PASS1_BITS);
dataptr[4] = (DCTELEM) DESCALE (tmp13 - tmp0, CONST_BITS - PASS1_BITS);
- dataptr += DCTSIZE; /* advance pointer to next row */
+ dataptr += DCTSIZE; /* advance pointer to next row */
}
/* Pass 2: process columns. */
@@ -283,8 +283,8 @@ gst_idct_int_idct (DCTBLOCK data)
#ifndef NO_ZERO_COLUMN_TEST
if ((dataptr[DCTSIZE * 1] | dataptr[DCTSIZE * 2] | dataptr[DCTSIZE * 3] |
- dataptr[DCTSIZE * 4] | dataptr[DCTSIZE * 5] | dataptr[DCTSIZE * 6] |
- dataptr[DCTSIZE * 7]) == 0) {
+ dataptr[DCTSIZE * 4] | dataptr[DCTSIZE * 5] | dataptr[DCTSIZE * 6] |
+ dataptr[DCTSIZE * 7]) == 0) {
/* AC terms all zero */
DCTELEM dcval = (DCTELEM) DESCALE ((INT32) dataptr[0], PASS1_BITS + 3);
@@ -297,7 +297,7 @@ gst_idct_int_idct (DCTBLOCK data)
dataptr[DCTSIZE * 6] = dcval;
dataptr[DCTSIZE * 7] = dcval;
- dataptr++; /* advance pointer to next column */
+ dataptr++; /* advance pointer to next column */
continue;
}
#endif
@@ -313,11 +313,11 @@ gst_idct_int_idct (DCTBLOCK data)
tmp3 = z1 + MULTIPLY (z2, FIX_0_765366865);
tmp0 =
- ((INT32) dataptr[DCTSIZE * 0] +
- (INT32) dataptr[DCTSIZE * 4]) << CONST_BITS;
+ ((INT32) dataptr[DCTSIZE * 0] +
+ (INT32) dataptr[DCTSIZE * 4]) << CONST_BITS;
tmp1 =
- ((INT32) dataptr[DCTSIZE * 0] -
- (INT32) dataptr[DCTSIZE * 4]) << CONST_BITS;
+ ((INT32) dataptr[DCTSIZE * 0] -
+ (INT32) dataptr[DCTSIZE * 4]) << CONST_BITS;
tmp10 = tmp0 + tmp3;
tmp13 = tmp0 - tmp3;
@@ -337,16 +337,16 @@ gst_idct_int_idct (DCTBLOCK data)
z2 = tmp1 + tmp2;
z3 = tmp0 + tmp2;
z4 = tmp1 + tmp3;
- z5 = MULTIPLY (z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
+ z5 = MULTIPLY (z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */
- tmp0 = MULTIPLY (tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
- tmp1 = MULTIPLY (tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
- tmp2 = MULTIPLY (tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
- tmp3 = MULTIPLY (tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
- z1 = MULTIPLY (z1, -FIX_0_899976223); /* sqrt(2) * (c7-c3) */
- z2 = MULTIPLY (z2, -FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
- z3 = MULTIPLY (z3, -FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
- z4 = MULTIPLY (z4, -FIX_0_390180644); /* sqrt(2) * (c5-c3) */
+ tmp0 = MULTIPLY (tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */
+ tmp1 = MULTIPLY (tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */
+ tmp2 = MULTIPLY (tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */
+ tmp3 = MULTIPLY (tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */
+ z1 = MULTIPLY (z1, -FIX_0_899976223); /* sqrt(2) * (c7-c3) */
+ z2 = MULTIPLY (z2, -FIX_2_562915447); /* sqrt(2) * (-c1-c3) */
+ z3 = MULTIPLY (z3, -FIX_1_961570560); /* sqrt(2) * (-c3-c5) */
+ z4 = MULTIPLY (z4, -FIX_0_390180644); /* sqrt(2) * (c5-c3) */
z3 += z5;
z4 += z5;
@@ -359,22 +359,22 @@ gst_idct_int_idct (DCTBLOCK data)
/* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */
dataptr[DCTSIZE * 0] = (DCTELEM) DESCALE (tmp10 + tmp3,
- CONST_BITS + PASS1_BITS + 3);
+ CONST_BITS + PASS1_BITS + 3);
dataptr[DCTSIZE * 7] = (DCTELEM) DESCALE (tmp10 - tmp3,
- CONST_BITS + PASS1_BITS + 3);
+ CONST_BITS + PASS1_BITS + 3);
dataptr[DCTSIZE * 1] = (DCTELEM) DESCALE (tmp11 + tmp2,
- CONST_BITS + PASS1_BITS + 3);
+ CONST_BITS + PASS1_BITS + 3);
dataptr[DCTSIZE * 6] = (DCTELEM) DESCALE (tmp11 - tmp2,
- CONST_BITS + PASS1_BITS + 3);
+ CONST_BITS + PASS1_BITS + 3);
dataptr[DCTSIZE * 2] = (DCTELEM) DESCALE (tmp12 + tmp1,
- CONST_BITS + PASS1_BITS + 3);
+ CONST_BITS + PASS1_BITS + 3);
dataptr[DCTSIZE * 5] = (DCTELEM) DESCALE (tmp12 - tmp1,
- CONST_BITS + PASS1_BITS + 3);
+ CONST_BITS + PASS1_BITS + 3);
dataptr[DCTSIZE * 3] = (DCTELEM) DESCALE (tmp13 + tmp0,
- CONST_BITS + PASS1_BITS + 3);
+ CONST_BITS + PASS1_BITS + 3);
dataptr[DCTSIZE * 4] = (DCTELEM) DESCALE (tmp13 - tmp0,
- CONST_BITS + PASS1_BITS + 3);
+ CONST_BITS + PASS1_BITS + 3);
- dataptr++; /* advance pointer to next column */
+ dataptr++; /* advance pointer to next column */
}
}
diff --git a/gst-libs/gst/idct/mmx32idct.c b/gst-libs/gst/idct/mmx32idct.c
index cd191f0c..d5bbbdb9 100644
--- a/gst-libs/gst/idct/mmx32idct.c
+++ b/gst-libs/gst/idct/mmx32idct.c
@@ -117,15 +117,15 @@ qword ptr equ mword ptr */
#endif
#include <mmx.h>
-#define BITS_INV_ACC 4 /*; 4 or 5 for IEEE */
+#define BITS_INV_ACC 4 /*; 4 or 5 for IEEE */
/* 5 yields higher accuracy, but lessens dynamic range on the input matrix */
#define SHIFT_INV_ROW (16 - BITS_INV_ACC)
-#define SHIFT_INV_COL (1 + BITS_INV_ACC +14 ) /* changed from Intel's val) */
+#define SHIFT_INV_COL (1 + BITS_INV_ACC +14 ) /* changed from Intel's val) */
/*#define SHIFT_INV_COL (1 + BITS_INV_ACC ) */
#define RND_INV_ROW (1 << (SHIFT_INV_ROW-1))
#define RND_INV_COL (1 << (SHIFT_INV_COL-1))
-#define RND_INV_CORR (RND_INV_COL - 1) /*; correction -1.0 and round */
+#define RND_INV_CORR (RND_INV_COL - 1) /*; correction -1.0 and round */
/*#define RND_INV_ROW (1024 * (6 - BITS_INV_ACC)) //; 1 << (SHIFT_INV_ROW-1) */
/*#define RND_INV_COL (16 * (BITS_INV_ACC - 3)) //; 1 << (SHIFT_INV_COL-1) */
@@ -158,12 +158,12 @@ const static long r_inv_row[2] = { RND_INV_ROW, RND_INV_ROW };
/*const static short ocos_4_16[4] = {23170, 23170, 23170, 23170 }; //cos * (2<<15) + 0.5 */
/*concatenated table, for forward DCT transformation */
-const static short tg_all_16[] = { 13036, 13036, 13036, 13036, /* tg * (2<<16) + 0.5 */
- 27146, 27146, 27146, 27146, /*tg * (2<<16) + 0.5 */
- -21746, -21746, -21746, -21746, /* tg * (2<<16) + 0.5 */
- -19195, -19195, -19195, -19195, /*cos * (2<<16) + 0.5 */
+const static short tg_all_16[] = { 13036, 13036, 13036, 13036, /* tg * (2<<16) + 0.5 */
+ 27146, 27146, 27146, 27146, /*tg * (2<<16) + 0.5 */
+ -21746, -21746, -21746, -21746, /* tg * (2<<16) + 0.5 */
+ -19195, -19195, -19195, -19195, /*cos * (2<<16) + 0.5 */
23170, 23170, 23170, 23170
-}; /*cos * (2<<15) + 0.5 */
+}; /*cos * (2<<15) + 0.5 */
#define tg_1_16 (tg_all_16 + 0)
@@ -233,51 +233,51 @@ IF _MMX ; MMX code
;=============================================================================
/*; Table for rows 0,4 - constants are multiplied by cos_4_16 */
-const short tab_i_04[] = { 16384, 16384, 16384, -16384, /* ; movq-> w06 w04 w02 w00 */
- 21407, 8867, 8867, -21407, /* w07 w05 w03 w01 */
- 16384, -16384, 16384, 16384, /*; w14 w12 w10 w08 */
- -8867, 21407, -21407, -8867, /*; w15 w13 w11 w09 */
- 22725, 12873, 19266, -22725, /*; w22 w20 w18 w16 */
- 19266, 4520, -4520, -12873, /*; w23 w21 w19 w17 */
- 12873, 4520, 4520, 19266, /*; w30 w28 w26 w24 */
+const short tab_i_04[] = { 16384, 16384, 16384, -16384, /* ; movq-> w06 w04 w02 w00 */
+ 21407, 8867, 8867, -21407, /* w07 w05 w03 w01 */
+ 16384, -16384, 16384, 16384, /*; w14 w12 w10 w08 */
+ -8867, 21407, -21407, -8867, /*; w15 w13 w11 w09 */
+ 22725, 12873, 19266, -22725, /*; w22 w20 w18 w16 */
+ 19266, 4520, -4520, -12873, /*; w23 w21 w19 w17 */
+ 12873, 4520, 4520, 19266, /*; w30 w28 w26 w24 */
-22725, 19266, -12873, -22725
-}; /*w31 w29 w27 w25 */
+}; /*w31 w29 w27 w25 */
/*; Table for rows 1,7 - constants are multiplied by cos_1_16 */
-const short tab_i_17[] = { 22725, 22725, 22725, -22725, /* ; movq-> w06 w04 w02 w00 */
- 29692, 12299, 12299, -29692, /* ; w07 w05 w03 w01 */
- 22725, -22725, 22725, 22725, /*; w14 w12 w10 w08 */
- -12299, 29692, -29692, -12299, /*; w15 w13 w11 w09 */
- 31521, 17855, 26722, -31521, /*; w22 w20 w18 w16 */
- 26722, 6270, -6270, -17855, /*; w23 w21 w19 w17 */
- 17855, 6270, 6270, 26722, /*; w30 w28 w26 w24 */
+const short tab_i_17[] = { 22725, 22725, 22725, -22725, /* ; movq-> w06 w04 w02 w00 */
+ 29692, 12299, 12299, -29692, /* ; w07 w05 w03 w01 */
+ 22725, -22725, 22725, 22725, /*; w14 w12 w10 w08 */
+ -12299, 29692, -29692, -12299, /*; w15 w13 w11 w09 */
+ 31521, 17855, 26722, -31521, /*; w22 w20 w18 w16 */
+ 26722, 6270, -6270, -17855, /*; w23 w21 w19 w17 */
+ 17855, 6270, 6270, 26722, /*; w30 w28 w26 w24 */
-31521, 26722, -17855, -31521
-}; /* w31 w29 w27 w25 */
+}; /* w31 w29 w27 w25 */
/*; Table for rows 2,6 - constants are multiplied by cos_2_16 */
-const short tab_i_26[] = { 21407, 21407, 21407, -21407, /* ; movq-> w06 w04 w02 w00 */
- 27969, 11585, 11585, -27969, /* ; w07 w05 w03 w01 */
- 21407, -21407, 21407, 21407, /* ; w14 w12 w10 w08 */
- -11585, 27969, -27969, -11585, /* ;w15 w13 w11 w09 */
- 29692, 16819, 25172, -29692, /* ;w22 w20 w18 w16 */
- 25172, 5906, -5906, -16819, /* ;w23 w21 w19 w17 */
- 16819, 5906, 5906, 25172, /* ;w30 w28 w26 w24 */
+const short tab_i_26[] = { 21407, 21407, 21407, -21407, /* ; movq-> w06 w04 w02 w00 */
+ 27969, 11585, 11585, -27969, /* ; w07 w05 w03 w01 */
+ 21407, -21407, 21407, 21407, /* ; w14 w12 w10 w08 */
+ -11585, 27969, -27969, -11585, /* ;w15 w13 w11 w09 */
+ 29692, 16819, 25172, -29692, /* ;w22 w20 w18 w16 */
+ 25172, 5906, -5906, -16819, /* ;w23 w21 w19 w17 */
+ 16819, 5906, 5906, 25172, /* ;w30 w28 w26 w24 */
-29692, 25172, -16819, -29692
-}; /* ;w31 w29 w27 w25 */
+}; /* ;w31 w29 w27 w25 */
/*; Table for rows 3,5 - constants are multiplied by cos_3_16 */
-const short tab_i_35[] = { 19266, 19266, 19266, -19266, /*; movq-> w06 w04 w02 w00 */
- 25172, 10426, 10426, -25172, /*; w07 w05 w03 w01 */
- 19266, -19266, 19266, 19266, /*; w14 w12 w10 w08 */
- -10426, 25172, -25172, -10426, /*; w15 w13 w11 w09 */
- 26722, 15137, 22654, -26722, /*; w22 w20 w18 w16 */
- 22654, 5315, -5315, -15137, /*; w23 w21 w19 w17 */
- 15137, 5315, 5315, 22654, /*; w30 w28 w26 w24 */
+const short tab_i_35[] = { 19266, 19266, 19266, -19266, /*; movq-> w06 w04 w02 w00 */
+ 25172, 10426, 10426, -25172, /*; w07 w05 w03 w01 */
+ 19266, -19266, 19266, 19266, /*; w14 w12 w10 w08 */
+ -10426, 25172, -25172, -10426, /*; w15 w13 w11 w09 */
+ 26722, 15137, 22654, -26722, /*; w22 w20 w18 w16 */
+ 22654, 5315, -5315, -15137, /*; w23 w21 w19 w17 */
+ 15137, 5315, 5315, 22654, /*; w30 w28 w26 w24 */
-26722, 22654, -15137, -26722
-}; /*; w31 w29 w27 w25 */
+}; /*; w31 w29 w27 w25 */
*/
/* CONCATENATED TABLE, rows 0,1,2,3,4,5,6,7 (in order ) */
@@ -286,109 +286,109 @@ const short tab_i_35[] = { 19266, 19266, 19266, -19266, /*; movq-> w06 w04 w02
/* */
static const short tab_i_01234567[] = {
/*row0, this row is required */
- 16384, 16384, 16384, -16384, /* ; movq-> w06 w04 w02 w00 */
- 21407, 8867, 8867, -21407, /* w07 w05 w03 w01 */
- 16384, -16384, 16384, 16384, /*; w14 w12 w10 w08 */
- -8867, 21407, -21407, -8867, /*; w15 w13 w11 w09 */
- 22725, 12873, 19266, -22725, /*; w22 w20 w18 w16 */
- 19266, 4520, -4520, -12873, /*; w23 w21 w19 w17 */
- 12873, 4520, 4520, 19266, /*; w30 w28 w26 w24 */
- -22725, 19266, -12873, -22725, /*w31 w29 w27 w25 */
+ 16384, 16384, 16384, -16384, /* ; movq-> w06 w04 w02 w00 */
+ 21407, 8867, 8867, -21407, /* w07 w05 w03 w01 */
+ 16384, -16384, 16384, 16384, /*; w14 w12 w10 w08 */
+ -8867, 21407, -21407, -8867, /*; w15 w13 w11 w09 */
+ 22725, 12873, 19266, -22725, /*; w22 w20 w18 w16 */
+ 19266, 4520, -4520, -12873, /*; w23 w21 w19 w17 */
+ 12873, 4520, 4520, 19266, /*; w30 w28 w26 w24 */
+ -22725, 19266, -12873, -22725, /*w31 w29 w27 w25 */
/* the rest of these rows (1-7), aren't used ! */
/*row1 */
- 22725, 22725, 22725, -22725, /* ; movq-> w06 w04 w02 w00 */
- 29692, 12299, 12299, -29692, /* ; w07 w05 w03 w01 */
- 22725, -22725, 22725, 22725, /*; w14 w12 w10 w08 */
- -12299, 29692, -29692, -12299, /*; w15 w13 w11 w09 */
- 31521, 17855, 26722, -31521, /*; w22 w20 w18 w16 */
- 26722, 6270, -6270, -17855, /*; w23 w21 w19 w17 */
- 17855, 6270, 6270, 26722, /*; w30 w28 w26 w24 */
- -31521, 26722, -17855, -31521, /* w31 w29 w27 w25 */
+ 22725, 22725, 22725, -22725, /* ; movq-> w06 w04 w02 w00 */
+ 29692, 12299, 12299, -29692, /* ; w07 w05 w03 w01 */
+ 22725, -22725, 22725, 22725, /*; w14 w12 w10 w08 */
+ -12299, 29692, -29692, -12299, /*; w15 w13 w11 w09 */
+ 31521, 17855, 26722, -31521, /*; w22 w20 w18 w16 */
+ 26722, 6270, -6270, -17855, /*; w23 w21 w19 w17 */
+ 17855, 6270, 6270, 26722, /*; w30 w28 w26 w24 */
+ -31521, 26722, -17855, -31521, /* w31 w29 w27 w25 */
/*row2 */
- 21407, 21407, 21407, -21407, /* ; movq-> w06 w04 w02 w00 */
- 27969, 11585, 11585, -27969, /* ; w07 w05 w03 w01 */
- 21407, -21407, 21407, 21407, /* ; w14 w12 w10 w08 */
- -11585, 27969, -27969, -11585, /* ;w15 w13 w11 w09 */
- 29692, 16819, 25172, -29692, /* ;w22 w20 w18 w16 */
- 25172, 5906, -5906, -16819, /* ;w23 w21 w19 w17 */
- 16819, 5906, 5906, 25172, /* ;w30 w28 w26 w24 */
- -29692, 25172, -16819, -29692, /* ;w31 w29 w27 w25 */
+ 21407, 21407, 21407, -21407, /* ; movq-> w06 w04 w02 w00 */
+ 27969, 11585, 11585, -27969, /* ; w07 w05 w03 w01 */
+ 21407, -21407, 21407, 21407, /* ; w14 w12 w10 w08 */
+ -11585, 27969, -27969, -11585, /* ;w15 w13 w11 w09 */
+ 29692, 16819, 25172, -29692, /* ;w22 w20 w18 w16 */
+ 25172, 5906, -5906, -16819, /* ;w23 w21 w19 w17 */
+ 16819, 5906, 5906, 25172, /* ;w30 w28 w26 w24 */
+ -29692, 25172, -16819, -29692, /* ;w31 w29 w27 w25 */
/*row3 */
- 19266, 19266, 19266, -19266, /*; movq-> w06 w04 w02 w00 */
- 25172, 10426, 10426, -25172, /*; w07 w05 w03 w01 */
- 19266, -19266, 19266, 19266, /*; w14 w12 w10 w08 */
- -10426, 25172, -25172, -10426, /*; w15 w13 w11 w09 */
- 26722, 15137, 22654, -26722, /*; w22 w20 w18 w16 */
- 22654, 5315, -5315, -15137, /*; w23 w21 w19 w17 */
- 15137, 5315, 5315, 22654, /*; w30 w28 w26 w24 */
- -26722, 22654, -15137, -26722, /*; w31 w29 w27 w25 */
+ 19266, 19266, 19266, -19266, /*; movq-> w06 w04 w02 w00 */
+ 25172, 10426, 10426, -25172, /*; w07 w05 w03 w01 */
+ 19266, -19266, 19266, 19266, /*; w14 w12 w10 w08 */
+ -10426, 25172, -25172, -10426, /*; w15 w13 w11 w09 */
+ 26722, 15137, 22654, -26722, /*; w22 w20 w18 w16 */
+ 22654, 5315, -5315, -15137, /*; w23 w21 w19 w17 */
+ 15137, 5315, 5315, 22654, /*; w30 w28 w26 w24 */
+ -26722, 22654, -15137, -26722, /*; w31 w29 w27 w25 */
/*row4 */
- 16384, 16384, 16384, -16384, /* ; movq-> w06 w04 w02 w00 */
- 21407, 8867, 8867, -21407, /* w07 w05 w03 w01 */
- 16384, -16384, 16384, 16384, /*; w14 w12 w10 w08 */
- -8867, 21407, -21407, -8867, /*; w15 w13 w11 w09 */
- 22725, 12873, 19266, -22725, /*; w22 w20 w18 w16 */
- 19266, 4520, -4520, -12873, /*; w23 w21 w19 w17 */
- 12873, 4520, 4520, 19266, /*; w30 w28 w26 w24 */
- -22725, 19266, -12873, -22725, /*w31 w29 w27 w25 */
+ 16384, 16384, 16384, -16384, /* ; movq-> w06 w04 w02 w00 */
+ 21407, 8867, 8867, -21407, /* w07 w05 w03 w01 */
+ 16384, -16384, 16384, 16384, /*; w14 w12 w10 w08 */
+ -8867, 21407, -21407, -8867, /*; w15 w13 w11 w09 */
+ 22725, 12873, 19266, -22725, /*; w22 w20 w18 w16 */
+ 19266, 4520, -4520, -12873, /*; w23 w21 w19 w17 */
+ 12873, 4520, 4520, 19266, /*; w30 w28 w26 w24 */
+ -22725, 19266, -12873, -22725, /*w31 w29 w27 w25 */
/*row5 */
- 19266, 19266, 19266, -19266, /*; movq-> w06 w04 w02 w00 */
- 25172, 10426, 10426, -25172, /*; w07 w05 w03 w01 */
- 19266, -19266, 19266, 19266, /*; w14 w12 w10 w08 */
- -10426, 25172, -25172, -10426, /*; w15 w13 w11 w09 */
- 26722, 15137, 22654, -26722, /*; w22 w20 w18 w16 */
- 22654, 5315, -5315, -15137, /*; w23 w21 w19 w17 */
- 15137, 5315, 5315, 22654, /*; w30 w28 w26 w24 */
- -26722, 22654, -15137, -26722, /*; w31 w29 w27 w25 */
+ 19266, 19266, 19266, -19266, /*; movq-> w06 w04 w02 w00 */
+ 25172, 10426, 10426, -25172, /*; w07 w05 w03 w01 */
+ 19266, -19266, 19266, 19266, /*; w14 w12 w10 w08 */
+ -10426, 25172, -25172, -10426, /*; w15 w13 w11 w09 */
+ 26722, 15137, 22654, -26722, /*; w22 w20 w18 w16 */
+ 22654, 5315, -5315, -15137, /*; w23 w21 w19 w17 */
+ 15137, 5315, 5315, 22654, /*; w30 w28 w26 w24 */
+ -26722, 22654, -15137, -26722, /*; w31 w29 w27 w25 */
/*row6 */
- 21407, 21407, 21407, -21407, /* ; movq-> w06 w04 w02 w00 */
- 27969, 11585, 11585, -27969, /* ; w07 w05 w03 w01 */
- 21407, -21407, 21407, 21407, /* ; w14 w12 w10 w08 */
- -11585, 27969, -27969, -11585, /* ;w15 w13 w11 w09 */
- 29692, 16819, 25172, -29692, /* ;w22 w20 w18 w16 */
- 25172, 5906, -5906, -16819, /* ;w23 w21 w19 w17 */
- 16819, 5906, 5906, 25172, /* ;w30 w28 w26 w24 */
- -29692, 25172, -16819, -29692, /* ;w31 w29 w27 w25 */
+ 21407, 21407, 21407, -21407, /* ; movq-> w06 w04 w02 w00 */
+ 27969, 11585, 11585, -27969, /* ; w07 w05 w03 w01 */
+ 21407, -21407, 21407, 21407, /* ; w14 w12 w10 w08 */
+ -11585, 27969, -27969, -11585, /* ;w15 w13 w11 w09 */
+ 29692, 16819, 25172, -29692, /* ;w22 w20 w18 w16 */
+ 25172, 5906, -5906, -16819, /* ;w23 w21 w19 w17 */
+ 16819, 5906, 5906, 25172, /* ;w30 w28 w26 w24 */
+ -29692, 25172, -16819, -29692, /* ;w31 w29 w27 w25 */
/*row7 */
- 22725, 22725, 22725, -22725, /* ; movq-> w06 w04 w02 w00 */
- 29692, 12299, 12299, -29692, /* ; w07 w05 w03 w01 */
- 22725, -22725, 22725, 22725, /*; w14 w12 w10 w08 */
- -12299, 29692, -29692, -12299, /*; w15 w13 w11 w09 */
- 31521, 17855, 26722, -31521, /*; w22 w20 w18 w16 */
- 26722, 6270, -6270, -17855, /*; w23 w21 w19 w17 */
- 17855, 6270, 6270, 26722, /*; w30 w28 w26 w24 */
+ 22725, 22725, 22725, -22725, /* ; movq-> w06 w04 w02 w00 */
+ 29692, 12299, 12299, -29692, /* ; w07 w05 w03 w01 */
+ 22725, -22725, 22725, 22725, /*; w14 w12 w10 w08 */
+ -12299, 29692, -29692, -12299, /*; w15 w13 w11 w09 */
+ 31521, 17855, 26722, -31521, /*; w22 w20 w18 w16 */
+ 26722, 6270, -6270, -17855, /*; w23 w21 w19 w17 */
+ 17855, 6270, 6270, 26722, /*; w30 w28 w26 w24 */
-31521, 26722, -17855, -31521
-}; /* w31 w29 w27 w25 */
+}; /* w31 w29 w27 w25 */
-#define INP eax /* pointer to (short *blk) */
-#define OUT ecx /* pointer to output (temporary store space qwTemp[]) */
-#define TABLE ebx /* pointer to tab_i_01234567[] */
+#define INP eax /* pointer to (short *blk) */
+#define OUT ecx /* pointer to output (temporary store space qwTemp[]) */
+#define TABLE ebx /* pointer to tab_i_01234567[] */
#define round_inv_row edx
#define round_inv_col edx
-#define ROW_STRIDE 8 /* for 8x8 matrix transposer */
+#define ROW_STRIDE 8 /* for 8x8 matrix transposer */
/* private variables and functions */
/*temporary storage space, 8x8 of shorts */
- __inline static void idct_mmx32_rows (short *blk); /* transform rows */
-__inline static void idct_mmx32_cols (short *blk); /* transform "columns" */
+ __inline static void idct_mmx32_rows (short *blk); /* transform rows */
+__inline static void idct_mmx32_cols (short *blk); /* transform "columns" */
- /* the "column" transform actually transforms rows, it is */
- /* identical to the row-transform except for the ROUNDING */
- /* and SHIFTING coefficients. */
+ /* the "column" transform actually transforms rows, it is */
+ /* identical to the row-transform except for the ROUNDING */
+ /* and SHIFTING coefficients. */
static void
idct_mmx32_rows (short *blk)
-{ /* transform all 8 rows of 8x8 iDCT block */
+{ /* transform all 8 rows of 8x8 iDCT block */
int x;
short qwTemp[64];
short *out = &qwTemp[0];
@@ -402,58 +402,58 @@ idct_mmx32_rows (short *blk)
/* */
/* 2) transpose the matrix (which was stored in qwTemp[]) */
/* qwTemp[] -> [8x8 matrix transpose] -> blk[] */
- for (x = 0; x < 8; x++) { /* transform one row per iteration */
- movq_m2r (*(inptr), mm0); /* 0 ; x3 x2 x1 x0 */
- movq_m2r (*(inptr + 4), mm1); /* 1 ; x7 x6 x5 x4 */
- movq_r2r (mm0, mm2); /* 2 ; x3 x2 x1 x0 */
- movq_m2r (*(tab_i_01234567), mm3); /* 3 ; w06 w04 w02 w00 */
- punpcklwd_r2r (mm1, mm0); /* x5 x1 x4 x0 */
+ for (x = 0; x < 8; x++) { /* transform one row per iteration */
+ movq_m2r (*(inptr), mm0); /* 0 ; x3 x2 x1 x0 */
+ movq_m2r (*(inptr + 4), mm1); /* 1 ; x7 x6 x5 x4 */
+ movq_r2r (mm0, mm2); /* 2 ; x3 x2 x1 x0 */
+ movq_m2r (*(tab_i_01234567), mm3); /* 3 ; w06 w04 w02 w00 */
+ punpcklwd_r2r (mm1, mm0); /* x5 x1 x4 x0 */
- /* ---------- */
- movq_r2r (mm0, mm5); /* 5 ; x5 x1 x4 x0 */
- punpckldq_r2r (mm0, mm0); /* x4 x0 x4 x0 */
- movq_m2r (*(tab_i_01234567 + 4), mm4); /* 4 ; w07 w05 w03 w01 */
- punpckhwd_r2r (mm1, mm2); /* 1 ; x7 x3 x6 x2 */
- pmaddwd_r2r (mm0, mm3); /* x4*w06+x0*w04 x4*w02+x0*w00 */
- movq_r2r (mm2, mm6); /* 6 ; x7 x3 x6 x2 */
- movq_m2r (*(tab_i_01234567 + 16), mm1); /* 1 ; w22 w20 w18 w16 */
- punpckldq_r2r (mm2, mm2); /* x6 x2 x6 x2 */
- pmaddwd_r2r (mm2, mm4); /* x6*w07+x2*w05 x6*w03+x2*w01 */
- punpckhdq_r2r (mm5, mm5); /* x5 x1 x5 x1 */
- pmaddwd_m2r (*(tab_i_01234567 + 8), mm0); /* x4*w14+x0*w12 x4*w10+x0*w08 */
- punpckhdq_r2r (mm6, mm6); /* x7 x3 x7 x3 */
- movq_m2r (*(tab_i_01234567 + 20), mm7); /* 7 ; w23 w21 w19 w17 */
- pmaddwd_r2r (mm5, mm1); /* x5*w22+x1*w20 x5*w18+x1*w16 */
- paddd_m2r (*(r_inv_row), mm3); /* +rounder */
- pmaddwd_r2r (mm6, mm7); /* x7*w23+x3*w21 x7*w19+x3*w17 */
- pmaddwd_m2r (*(tab_i_01234567 + 12), mm2); /* x6*w15+x2*w13 x6*w11+x2*w09 */
- paddd_r2r (mm4, mm3); /* 4 ; a1=sum(even1) a0=sum(even0) */
- pmaddwd_m2r (*(tab_i_01234567 + 24), mm5); /* x5*w30+x1*w28 x5*w26+x1*w24 */
- movq_r2r (mm3, mm4); /* 4 ; a1 a0 */
- pmaddwd_m2r (*(tab_i_01234567 + 28), mm6); /* x7*w31+x3*w29 x7*w27+x3*w25 */
- paddd_r2r (mm7, mm1); /* 7 ; b1=sum(odd1) b0=sum(odd0) */
- paddd_m2r (*(r_inv_row), mm0); /* +rounder */
- psubd_r2r (mm1, mm3); /* a1-b1 a0-b0 */
- psrad_i2r (SHIFT_INV_ROW, mm3); /* y6=a1-b1 y7=a0-b0 */
- paddd_r2r (mm4, mm1); /* 4 ; a1+b1 a0+b0 */
- paddd_r2r (mm2, mm0); /* 2 ; a3=sum(even3) a2=sum(even2) */
- psrad_i2r (SHIFT_INV_ROW, mm1); /* y1=a1+b1 y0=a0+b0 */
- paddd_r2r (mm6, mm5); /* 6 ; b3=sum(odd3) b2=sum(odd2) */
- movq_r2r (mm0, mm4); /* 4 ; a3 a2 */
- paddd_r2r (mm5, mm0); /* a3+b3 a2+b2 */
- psubd_r2r (mm5, mm4); /* 5 ; a3-b3 a2-b2 */
- psrad_i2r (SHIFT_INV_ROW, mm4); /* y4=a3-b3 y5=a2-b2 */
- psrad_i2r (SHIFT_INV_ROW, mm0); /* y3=a3+b3 y2=a2+b2 */
- packssdw_r2r (mm3, mm4); /* 3 ; y6 y7 y4 y5 */
- packssdw_r2r (mm0, mm1); /* 0 ; y3 y2 y1 y0 */
- movq_r2r (mm4, mm7); /* 7 ; y6 y7 y4 y5 */
- psrld_i2r (16, mm4); /* 0 y6 0 y4 */
- movq_r2m (mm1, *(out)); /* 1 ; save y3 y2 y1 y0 */
- pslld_i2r (16, mm7); /* y7 0 y5 0 */
- por_r2r (mm4, mm7); /* 4 ; y7 y6 y5 y4 */
+ /* ---------- */
+ movq_r2r (mm0, mm5); /* 5 ; x5 x1 x4 x0 */
+ punpckldq_r2r (mm0, mm0); /* x4 x0 x4 x0 */
+ movq_m2r (*(tab_i_01234567 + 4), mm4); /* 4 ; w07 w05 w03 w01 */
+ punpckhwd_r2r (mm1, mm2); /* 1 ; x7 x3 x6 x2 */
+ pmaddwd_r2r (mm0, mm3); /* x4*w06+x0*w04 x4*w02+x0*w00 */
+ movq_r2r (mm2, mm6); /* 6 ; x7 x3 x6 x2 */
+ movq_m2r (*(tab_i_01234567 + 16), mm1); /* 1 ; w22 w20 w18 w16 */
+ punpckldq_r2r (mm2, mm2); /* x6 x2 x6 x2 */
+ pmaddwd_r2r (mm2, mm4); /* x6*w07+x2*w05 x6*w03+x2*w01 */
+ punpckhdq_r2r (mm5, mm5); /* x5 x1 x5 x1 */
+ pmaddwd_m2r (*(tab_i_01234567 + 8), mm0); /* x4*w14+x0*w12 x4*w10+x0*w08 */
+ punpckhdq_r2r (mm6, mm6); /* x7 x3 x7 x3 */
+ movq_m2r (*(tab_i_01234567 + 20), mm7); /* 7 ; w23 w21 w19 w17 */
+ pmaddwd_r2r (mm5, mm1); /* x5*w22+x1*w20 x5*w18+x1*w16 */
+ paddd_m2r (*(r_inv_row), mm3); /* +rounder */
+ pmaddwd_r2r (mm6, mm7); /* x7*w23+x3*w21 x7*w19+x3*w17 */
+ pmaddwd_m2r (*(tab_i_01234567 + 12), mm2); /* x6*w15+x2*w13 x6*w11+x2*w09 */
+ paddd_r2r (mm4, mm3); /* 4 ; a1=sum(even1) a0=sum(even0) */
+ pmaddwd_m2r (*(tab_i_01234567 + 24), mm5); /* x5*w30+x1*w28 x5*w26+x1*w24 */
+ movq_r2r (mm3, mm4); /* 4 ; a1 a0 */
+ pmaddwd_m2r (*(tab_i_01234567 + 28), mm6); /* x7*w31+x3*w29 x7*w27+x3*w25 */
+ paddd_r2r (mm7, mm1); /* 7 ; b1=sum(odd1) b0=sum(odd0) */
+ paddd_m2r (*(r_inv_row), mm0); /* +rounder */
+ psubd_r2r (mm1, mm3); /* a1-b1 a0-b0 */
+ psrad_i2r (SHIFT_INV_ROW, mm3); /* y6=a1-b1 y7=a0-b0 */
+ paddd_r2r (mm4, mm1); /* 4 ; a1+b1 a0+b0 */
+ paddd_r2r (mm2, mm0); /* 2 ; a3=sum(even3) a2=sum(even2) */
+ psrad_i2r (SHIFT_INV_ROW, mm1); /* y1=a1+b1 y0=a0+b0 */
+ paddd_r2r (mm6, mm5); /* 6 ; b3=sum(odd3) b2=sum(odd2) */
+ movq_r2r (mm0, mm4); /* 4 ; a3 a2 */
+ paddd_r2r (mm5, mm0); /* a3+b3 a2+b2 */
+ psubd_r2r (mm5, mm4); /* 5 ; a3-b3 a2-b2 */
+ psrad_i2r (SHIFT_INV_ROW, mm4); /* y4=a3-b3 y5=a2-b2 */
+ psrad_i2r (SHIFT_INV_ROW, mm0); /* y3=a3+b3 y2=a2+b2 */
+ packssdw_r2r (mm3, mm4); /* 3 ; y6 y7 y4 y5 */
+ packssdw_r2r (mm0, mm1); /* 0 ; y3 y2 y1 y0 */
+ movq_r2r (mm4, mm7); /* 7 ; y6 y7 y4 y5 */
+ psrld_i2r (16, mm4); /* 0 y6 0 y4 */
+ movq_r2m (mm1, *(out)); /* 1 ; save y3 y2 y1 y0 */
+ pslld_i2r (16, mm7); /* y7 0 y5 0 */
+ por_r2r (mm4, mm7); /* 4 ; y7 y6 y5 y4 */
- /* begin processing row 1 */
- movq_r2m (mm7, *(out + 4)); /* 7 ; save y7 y6 y5 y4 */
+ /* begin processing row 1 */
+ movq_r2m (mm7, *(out + 4)); /* 7 ; save y7 y6 y5 y4 */
inptr += 8;
out += 8;
}
@@ -477,31 +477,31 @@ idct_mmx32_rows (short *blk)
out = &qwTemp[0];
movq_m2r (*(out + ROW_STRIDE * 0), mm0);
movq_m2r (*(out + ROW_STRIDE * 1), mm1);
- movq_r2r (mm0, mm4); /* mm4 = copy of row1[A B C D] */
+ movq_r2r (mm0, mm4); /* mm4 = copy of row1[A B C D] */
movq_m2r (*(out + ROW_STRIDE * 2), mm2);
- punpcklwd_r2r (mm1, mm0); /* mm0 = [ 0 4 1 5] */
+ punpcklwd_r2r (mm1, mm0); /* mm0 = [ 0 4 1 5] */
movq_m2r (*(out + ROW_STRIDE * 3), mm3);
- punpckhwd_r2r (mm1, mm4); /* mm4 = [ 2 6 3 7] */
+ punpckhwd_r2r (mm1, mm4); /* mm4 = [ 2 6 3 7] */
movq_r2r (mm2, mm6);
- punpcklwd_r2r (mm3, mm2); /* mm2 = [ 8 12 9 13] */
- punpckhwd_r2r (mm3, mm6); /* mm6 = 10 14 11 15] */
- movq_r2r (mm0, mm1); /* mm1 = [ 0 4 1 5] */
+ punpcklwd_r2r (mm3, mm2); /* mm2 = [ 8 12 9 13] */
+ punpckhwd_r2r (mm3, mm6); /* mm6 = 10 14 11 15] */
+ movq_r2r (mm0, mm1); /* mm1 = [ 0 4 1 5] */
inptr = blk;
- punpckldq_r2r (mm2, mm0); /* final result mm0 = row1 [0 4 8 12] */
- movq_r2r (mm4, mm3); /* mm3 = [ 2 6 3 7] */
- punpckhdq_r2r (mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13] */
- movq_r2m (mm0, *(inptr + ROW_STRIDE * 0)); /* store row 1 */
- punpckldq_r2r (mm6, mm4); /* final result mm4 = row3 [2 6 10 14] */
+ punpckldq_r2r (mm2, mm0); /* final result mm0 = row1 [0 4 8 12] */
+ movq_r2r (mm4, mm3); /* mm3 = [ 2 6 3 7] */
+ punpckhdq_r2r (mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13] */
+ movq_r2m (mm0, *(inptr + ROW_STRIDE * 0)); /* store row 1 */
+ punpckldq_r2r (mm6, mm4); /* final result mm4 = row3 [2 6 10 14] */
/* begin reading next quadrant (lower-right) */
movq_m2r (*(out + ROW_STRIDE * 4 + 4), mm0);
- punpckhdq_r2r (mm6, mm3); /* final result mm3 = row4 [3 7 11 15] */
- movq_r2m (mm4, *(inptr + ROW_STRIDE * 2)); /* store row 3 */
- movq_r2r (mm0, mm4); /* mm4 = copy of row1[A B C D] */
- movq_r2m (mm1, *(inptr + ROW_STRIDE * 1)); /* store row 2 */
+ punpckhdq_r2r (mm6, mm3); /* final result mm3 = row4 [3 7 11 15] */
+ movq_r2m (mm4, *(inptr + ROW_STRIDE * 2)); /* store row 3 */
+ movq_r2r (mm0, mm4); /* mm4 = copy of row1[A B C D] */
+ movq_r2m (mm1, *(inptr + ROW_STRIDE * 1)); /* store row 2 */
movq_m2r (*(out + ROW_STRIDE * 5 + 4), mm1);
- movq_r2m (mm3, *(inptr + ROW_STRIDE * 3)); /* store row 4 */
- punpcklwd_r2r (mm1, mm0); /* mm0 = [ 0 4 1 5] */
+ movq_r2m (mm3, *(inptr + ROW_STRIDE * 3)); /* store row 4 */
+ punpcklwd_r2r (mm1, mm0); /* mm0 = [ 0 4 1 5] */
/* 2) transpose lower-right quadrant */
@@ -512,28 +512,28 @@ idct_mmx32_rows (short *blk)
movq_m2r (*(out + ROW_STRIDE * 6 + 4), mm2);
/* punpcklwd mm0, mm1; // mm0 = [ 0 4 1 5] */
- punpckhwd_r2r (mm1, mm4); /* mm4 = [ 2 6 3 7] */
+ punpckhwd_r2r (mm1, mm4); /* mm4 = [ 2 6 3 7] */
movq_m2r (*(out + ROW_STRIDE * 7 + 4), mm3);
movq_r2r (mm2, mm6);
- punpcklwd_r2r (mm3, mm2); /* mm2 = [ 8 12 9 13] */
- movq_r2r (mm0, mm1); /* mm1 = [ 0 4 1 5] */
- punpckhwd_r2r (mm3, mm6); /* mm6 = 10 14 11 15] */
- movq_r2r (mm4, mm3); /* mm3 = [ 2 6 3 7] */
- punpckldq_r2r (mm2, mm0); /* final result mm0 = row1 [0 4 8 12] */
- punpckhdq_r2r (mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13] */
- ; /* slot */
- movq_r2m (mm0, *(inptr + ROW_STRIDE * 4 + 4)); /* store row 1 */
- punpckldq_r2r (mm6, mm4); /* final result mm4 = row3 [2 6 10 14] */
+ punpcklwd_r2r (mm3, mm2); /* mm2 = [ 8 12 9 13] */
+ movq_r2r (mm0, mm1); /* mm1 = [ 0 4 1 5] */
+ punpckhwd_r2r (mm3, mm6); /* mm6 = 10 14 11 15] */
+ movq_r2r (mm4, mm3); /* mm3 = [ 2 6 3 7] */
+ punpckldq_r2r (mm2, mm0); /* final result mm0 = row1 [0 4 8 12] */
+ punpckhdq_r2r (mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13] */
+ ; /* slot */
+ movq_r2m (mm0, *(inptr + ROW_STRIDE * 4 + 4)); /* store row 1 */
+ punpckldq_r2r (mm6, mm4); /* final result mm4 = row3 [2 6 10 14] */
movq_m2r (*(out + ROW_STRIDE * 4), mm0);
- punpckhdq_r2r (mm6, mm3); /* final result mm3 = row4 [3 7 11 15] */
- movq_r2m (mm4, *(inptr + ROW_STRIDE * 6 + 4)); /* store row 3 */
- movq_r2r (mm0, mm4); /* mm4 = copy of row1[A B C D] */
- movq_r2m (mm1, *(inptr + ROW_STRIDE * 5 + 4)); /* store row 2 */
- ; /* slot */
+ punpckhdq_r2r (mm6, mm3); /* final result mm3 = row4 [3 7 11 15] */
+ movq_r2m (mm4, *(inptr + ROW_STRIDE * 6 + 4)); /* store row 3 */
+ movq_r2r (mm0, mm4); /* mm4 = copy of row1[A B C D] */
+ movq_r2m (mm1, *(inptr + ROW_STRIDE * 5 + 4)); /* store row 2 */
+ ; /* slot */
movq_m2r (*(out + ROW_STRIDE * 5), mm1);
- ; /* slot */
- movq_r2m (mm3, *(inptr + ROW_STRIDE * 7 + 4)); /* store row 4 */
- punpcklwd_r2r (mm1, mm0); /* mm0 = [ 0 4 1 5] */
+ ; /* slot */
+ movq_r2m (mm3, *(inptr + ROW_STRIDE * 7 + 4)); /* store row 4 */
+ punpcklwd_r2r (mm1, mm0); /* mm0 = [ 0 4 1 5] */
/* 3) transpose lower-left */
/* movq mm0, qword ptr [OUT + ROW_STRIDE * 4 ] */
@@ -543,28 +543,28 @@ idct_mmx32_rows (short *blk)
movq_m2r (*(out + ROW_STRIDE * 6), mm2);
/* punpcklwd mm0, mm1; // mm0 = [ 0 4 1 5] */
- punpckhwd_r2r (mm1, mm4); /* mm4 = [ 2 6 3 7] */
+ punpckhwd_r2r (mm1, mm4); /* mm4 = [ 2 6 3 7] */
movq_m2r (*(out + ROW_STRIDE * 7), mm3);
movq_r2r (mm2, mm6);
- punpcklwd_r2r (mm3, mm2); /* mm2 = [ 8 12 9 13] */
- movq_r2r (mm0, mm1); /* mm1 = [ 0 4 1 5] */
- punpckhwd_r2r (mm3, mm6); /* mm6 = 10 14 11 15] */
- movq_r2r (mm4, mm3); /* mm3 = [ 2 6 3 7] */
- punpckldq_r2r (mm2, mm0); /* final result mm0 = row1 [0 4 8 12] */
- punpckhdq_r2r (mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13] */
- ; /*slot */
- movq_r2m (mm0, *(inptr + ROW_STRIDE * 0 + 4)); /* store row 1 */
- punpckldq_r2r (mm6, mm4); /* final result mm4 = row3 [2 6 10 14] */
+ punpcklwd_r2r (mm3, mm2); /* mm2 = [ 8 12 9 13] */
+ movq_r2r (mm0, mm1); /* mm1 = [ 0 4 1 5] */
+ punpckhwd_r2r (mm3, mm6); /* mm6 = 10 14 11 15] */
+ movq_r2r (mm4, mm3); /* mm3 = [ 2 6 3 7] */
+ punpckldq_r2r (mm2, mm0); /* final result mm0 = row1 [0 4 8 12] */
+ punpckhdq_r2r (mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13] */
+ ; /*slot */
+ movq_r2m (mm0, *(inptr + ROW_STRIDE * 0 + 4)); /* store row 1 */
+ punpckldq_r2r (mm6, mm4); /* final result mm4 = row3 [2 6 10 14] */
/* begin reading next quadrant (upper-right) */
movq_m2r (*(out + ROW_STRIDE * 0 + 4), mm0);
- punpckhdq_r2r (mm6, mm3); /* final result mm3 = row4 [3 7 11 15] */
- movq_r2m (mm4, *(inptr + ROW_STRIDE * 2 + 4)); /* store row 3 */
- movq_r2r (mm0, mm4); /* mm4 = copy of row1[A B C D] */
- movq_r2m (mm1, *(inptr + ROW_STRIDE * 1 + 4)); /* store row 2 */
+ punpckhdq_r2r (mm6, mm3); /* final result mm3 = row4 [3 7 11 15] */
+ movq_r2m (mm4, *(inptr + ROW_STRIDE * 2 + 4)); /* store row 3 */
+ movq_r2r (mm0, mm4); /* mm4 = copy of row1[A B C D] */
+ movq_r2m (mm1, *(inptr + ROW_STRIDE * 1 + 4)); /* store row 2 */
movq_m2r (*(out + ROW_STRIDE * 1 + 4), mm1);
- movq_r2m (mm3, *(inptr + ROW_STRIDE * 3 + 4)); /* store row 4 */
- punpcklwd_r2r (mm1, mm0); /* mm0 = [ 0 4 1 5] */
+ movq_r2m (mm3, *(inptr + ROW_STRIDE * 3 + 4)); /* store row 4 */
+ punpcklwd_r2r (mm1, mm0); /* mm0 = [ 0 4 1 5] */
/* 2) transpose lower-right quadrant */
@@ -575,28 +575,28 @@ idct_mmx32_rows (short *blk)
movq_m2r (*(out + ROW_STRIDE * 2 + 4), mm2);
/* punpcklwd mm0, mm1; // mm0 = [ 0 4 1 5] */
- punpckhwd_r2r (mm1, mm4); /* mm4 = [ 2 6 3 7] */
+ punpckhwd_r2r (mm1, mm4); /* mm4 = [ 2 6 3 7] */
movq_m2r (*(out + ROW_STRIDE * 3 + 4), mm3);
movq_r2r (mm2, mm6);
- punpcklwd_r2r (mm3, mm2); /* mm2 = [ 8 12 9 13] */
- movq_r2r (mm0, mm1); /* mm1 = [ 0 4 1 5] */
- punpckhwd_r2r (mm3, mm6); /* mm6 = 10 14 11 15] */
- movq_r2r (mm4, mm3); /* mm3 = [ 2 6 3 7] */
- punpckldq_r2r (mm2, mm0); /* final result mm0 = row1 [0 4 8 12] */
- punpckhdq_r2r (mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13] */
- ; /* slot */
- movq_r2m (mm0, *(inptr + ROW_STRIDE * 4)); /* store row 1 */
- punpckldq_r2r (mm6, mm4); /* final result mm4 = row3 [2 6 10 14] */
- movq_r2m (mm1, *(inptr + ROW_STRIDE * 5)); /* store row 2 */
- punpckhdq_r2r (mm6, mm3); /* final result mm3 = row4 [3 7 11 15] */
- movq_r2m (mm4, *(inptr + ROW_STRIDE * 6)); /* store row 3 */
- ; /* slot */
- movq_r2m (mm3, *(inptr + ROW_STRIDE * 7)); /* store row 4 */
- ; /* slot */
+ punpcklwd_r2r (mm3, mm2); /* mm2 = [ 8 12 9 13] */
+ movq_r2r (mm0, mm1); /* mm1 = [ 0 4 1 5] */
+ punpckhwd_r2r (mm3, mm6); /* mm6 = 10 14 11 15] */
+ movq_r2r (mm4, mm3); /* mm3 = [ 2 6 3 7] */
+ punpckldq_r2r (mm2, mm0); /* final result mm0 = row1 [0 4 8 12] */
+ punpckhdq_r2r (mm2, mm1); /* mm1 = final result mm1 = row2 [1 5 9 13] */
+ ; /* slot */
+ movq_r2m (mm0, *(inptr + ROW_STRIDE * 4)); /* store row 1 */
+ punpckldq_r2r (mm6, mm4); /* final result mm4 = row3 [2 6 10 14] */
+ movq_r2m (mm1, *(inptr + ROW_STRIDE * 5)); /* store row 2 */
+ punpckhdq_r2r (mm6, mm3); /* final result mm3 = row4 [3 7 11 15] */
+ movq_r2m (mm4, *(inptr + ROW_STRIDE * 6)); /* store row 3 */
+ ; /* slot */
+ movq_r2m (mm3, *(inptr + ROW_STRIDE * 7)); /* store row 4 */
+ ; /* slot */
}
static void
idct_mmx32_cols (short *blk)
-{ /* transform all 8 cols of 8x8 iDCT block */
+{ /* transform all 8 cols of 8x8 iDCT block */
int x;
short *inptr = blk;
@@ -612,58 +612,58 @@ idct_mmx32_cols (short *blk)
/* */
/* 2) transpose the matrix (which was stored in qwTemp[]) */
/* qwTemp[] -> [8x8 matrix transpose] -> blk[] */
- for (x = 0; x < 8; x++) { /* transform one row per iteration */
- movq_m2r (*(inptr), mm0); /* 0 ; x3 x2 x1 x0 */
- movq_m2r (*(inptr + 4), mm1); /* 1 ; x7 x6 x5 x4 */
- movq_r2r (mm0, mm2); /* 2 ; x3 x2 x1 x0 */
- movq_m2r (*(tab_i_01234567), mm3); /* 3 ; w06 w04 w02 w00 */
- punpcklwd_r2r (mm1, mm0); /* x5 x1 x4 x0 */
+ for (x = 0; x < 8; x++) { /* transform one row per iteration */
+ movq_m2r (*(inptr), mm0); /* 0 ; x3 x2 x1 x0 */
+ movq_m2r (*(inptr + 4), mm1); /* 1 ; x7 x6 x5 x4 */
+ movq_r2r (mm0, mm2); /* 2 ; x3 x2 x1 x0 */
+ movq_m2r (*(tab_i_01234567), mm3); /* 3 ; w06 w04 w02 w00 */
+ punpcklwd_r2r (mm1, mm0); /* x5 x1 x4 x0 */
/* ---------- */
- movq_r2r (mm0, mm5); /* 5 ; x5 x1 x4 x0 */
- punpckldq_r2r (mm0, mm0); /* x4 x0 x4 x0 */
- movq_m2r (*(tab_i_01234567 + 4), mm4); /* 4 ; w07 w05 w03 w01 */
- punpckhwd_r2r (mm1, mm2); /* 1 ; x7 x3 x6 x2 */
- pmaddwd_r2r (mm0, mm3); /* x4*w06+x0*w04 x4*w02+x0*w00 */
- movq_r2r (mm2, mm6); /* 6 ; x7 x3 x6 x2 */
- movq_m2r (*(tab_i_01234567 + 16), mm1); /* 1 ; w22 w20 w18 w16 */
- punpckldq_r2r (mm2, mm2); /* x6 x2 x6 x2 */
- pmaddwd_r2r (mm2, mm4); /* x6*w07+x2*w05 x6*w03+x2*w01 */
- punpckhdq_r2r (mm5, mm5); /* x5 x1 x5 x1 */
- pmaddwd_m2r (*(tab_i_01234567 + 8), mm0); /* x4*w14+x0*w12 x4*w10+x0*w08 */
- punpckhdq_r2r (mm6, mm6); /* x7 x3 x7 x3 */
- movq_m2r (*(tab_i_01234567 + 20), mm7); /* 7 ; w23 w21 w19 w17 */
- pmaddwd_r2r (mm5, mm1); /* x5*w22+x1*w20 x5*w18+x1*w16 */
- paddd_m2r (*(r_inv_col), mm3); /* +rounder */
- pmaddwd_r2r (mm6, mm7); /* x7*w23+x3*w21 x7*w19+x3*w17 */
- pmaddwd_m2r (*(tab_i_01234567 + 12), mm2); /* x6*w15+x2*w13 x6*w11+x2*w09 */
- paddd_r2r (mm4, mm3); /* 4 ; a1=sum(even1) a0=sum(even0) */
- pmaddwd_m2r (*(tab_i_01234567 + 24), mm5); /* x5*w30+x1*w28 x5*w26+x1*w24 */
- movq_r2r (mm3, mm4); /* 4 ; a1 a0 */
- pmaddwd_m2r (*(tab_i_01234567 + 28), mm6); /* x7*w31+x3*w29 x7*w27+x3*w25 */
- paddd_r2r (mm7, mm1); /* 7 ; b1=sum(odd1) b0=sum(odd0) */
- paddd_m2r (*(r_inv_col), mm0); /* +rounder */
- psubd_r2r (mm1, mm3); /* a1-b1 a0-b0 */
- psrad_i2r (SHIFT_INV_COL, mm3); /* y6=a1-b1 y7=a0-b0 */
- paddd_r2r (mm4, mm1); /* 4 ; a1+b1 a0+b0 */
- paddd_r2r (mm2, mm0); /* 2 ; a3=sum(even3) a2=sum(even2) */
- psrad_i2r (SHIFT_INV_COL, mm1); /* y1=a1+b1 y0=a0+b0 */
- paddd_r2r (mm6, mm5); /* 6 ; b3=sum(odd3) b2=sum(odd2) */
- movq_r2r (mm0, mm4); /* 4 ; a3 a2 */
- paddd_r2r (mm5, mm0); /* a3+b3 a2+b2 */
- psubd_r2r (mm5, mm4); /* 5 ; a3-b3 a2-b2 */
- psrad_i2r (SHIFT_INV_COL, mm4); /* y4=a3-b3 y5=a2-b2 */
- psrad_i2r (SHIFT_INV_COL, mm0); /* y3=a3+b3 y2=a2+b2 */
- packssdw_r2r (mm3, mm4); /* 3 ; y6 y7 y4 y5 */
- packssdw_r2r (mm0, mm1); /* 0 ; y3 y2 y1 y0 */
- movq_r2r (mm4, mm7); /* 7 ; y6 y7 y4 y5 */
- psrld_i2r (16, mm4); /* 0 y6 0 y4 */
- movq_r2m (mm1, *(inptr)); /* 1 ; save y3 y2 y1 y0 */
- pslld_i2r (16, mm7); /* y7 0 y5 0 */
- por_r2r (mm4, mm7); /* 4 ; y7 y6 y5 y4 */
+ movq_r2r (mm0, mm5); /* 5 ; x5 x1 x4 x0 */
+ punpckldq_r2r (mm0, mm0); /* x4 x0 x4 x0 */
+ movq_m2r (*(tab_i_01234567 + 4), mm4); /* 4 ; w07 w05 w03 w01 */
+ punpckhwd_r2r (mm1, mm2); /* 1 ; x7 x3 x6 x2 */
+ pmaddwd_r2r (mm0, mm3); /* x4*w06+x0*w04 x4*w02+x0*w00 */
+ movq_r2r (mm2, mm6); /* 6 ; x7 x3 x6 x2 */
+ movq_m2r (*(tab_i_01234567 + 16), mm1); /* 1 ; w22 w20 w18 w16 */
+ punpckldq_r2r (mm2, mm2); /* x6 x2 x6 x2 */
+ pmaddwd_r2r (mm2, mm4); /* x6*w07+x2*w05 x6*w03+x2*w01 */
+ punpckhdq_r2r (mm5, mm5); /* x5 x1 x5 x1 */
+ pmaddwd_m2r (*(tab_i_01234567 + 8), mm0); /* x4*w14+x0*w12 x4*w10+x0*w08 */
+ punpckhdq_r2r (mm6, mm6); /* x7 x3 x7 x3 */
+ movq_m2r (*(tab_i_01234567 + 20), mm7); /* 7 ; w23 w21 w19 w17 */
+ pmaddwd_r2r (mm5, mm1); /* x5*w22+x1*w20 x5*w18+x1*w16 */
+ paddd_m2r (*(r_inv_col), mm3); /* +rounder */
+ pmaddwd_r2r (mm6, mm7); /* x7*w23+x3*w21 x7*w19+x3*w17 */
+ pmaddwd_m2r (*(tab_i_01234567 + 12), mm2); /* x6*w15+x2*w13 x6*w11+x2*w09 */
+ paddd_r2r (mm4, mm3); /* 4 ; a1=sum(even1) a0=sum(even0) */
+ pmaddwd_m2r (*(tab_i_01234567 + 24), mm5); /* x5*w30+x1*w28 x5*w26+x1*w24 */
+ movq_r2r (mm3, mm4); /* 4 ; a1 a0 */
+ pmaddwd_m2r (*(tab_i_01234567 + 28), mm6); /* x7*w31+x3*w29 x7*w27+x3*w25 */
+ paddd_r2r (mm7, mm1); /* 7 ; b1=sum(odd1) b0=sum(odd0) */
+ paddd_m2r (*(r_inv_col), mm0); /* +rounder */
+ psubd_r2r (mm1, mm3); /* a1-b1 a0-b0 */
+ psrad_i2r (SHIFT_INV_COL, mm3); /* y6=a1-b1 y7=a0-b0 */
+ paddd_r2r (mm4, mm1); /* 4 ; a1+b1 a0+b0 */
+ paddd_r2r (mm2, mm0); /* 2 ; a3=sum(even3) a2=sum(even2) */
+ psrad_i2r (SHIFT_INV_COL, mm1); /* y1=a1+b1 y0=a0+b0 */
+ paddd_r2r (mm6, mm5); /* 6 ; b3=sum(odd3) b2=sum(odd2) */
+ movq_r2r (mm0, mm4); /* 4 ; a3 a2 */
+ paddd_r2r (mm5, mm0); /* a3+b3 a2+b2 */
+ psubd_r2r (mm5, mm4); /* 5 ; a3-b3 a2-b2 */
+ psrad_i2r (SHIFT_INV_COL, mm4); /* y4=a3-b3 y5=a2-b2 */
+ psrad_i2r (SHIFT_INV_COL, mm0); /* y3=a3+b3 y2=a2+b2 */
+ packssdw_r2r (mm3, mm4); /* 3 ; y6 y7 y4 y5 */
+ packssdw_r2r (mm0, mm1); /* 0 ; y3 y2 y1 y0 */
+ movq_r2r (mm4, mm7); /* 7 ; y6 y7 y4 y5 */
+ psrld_i2r (16, mm4); /* 0 y6 0 y4 */
+ movq_r2m (mm1, *(inptr)); /* 1 ; save y3 y2 y1 y0 */
+ pslld_i2r (16, mm7); /* y7 0 y5 0 */
+ por_r2r (mm4, mm7); /* 4 ; y7 y6 y5 y4 */
- /* begin processing row 1 */
- movq_r2m (mm7, *(inptr + 4)); /* 7 ; save y7 y6 y5 y4 */
+ /* begin processing row 1 */
+ movq_r2m (mm7, *(inptr + 4)); /* 7 ; save y7 y6 y5 y4 */
inptr += 8;
}
@@ -679,10 +679,12 @@ gst_idct_mmx32_idct (short *blk)
{
/* 1) iDCT row transformation */
- idct_mmx32_rows (blk); /* 1) transform iDCT row, and transpose */
+ idct_mmx32_rows (blk); /* 1) transform iDCT row, and transpose */
/* 2) iDCT column transformation */
- idct_mmx32_cols (blk); /* 2) transform iDCT row, and transpose */
- emms (); /* restore processor state */
+ idct_mmx32_cols (blk); /* 2) transform iDCT row, and transpose */
+ emms (); /* restore processor state */
/* all done */
-}
+}
+
+
diff --git a/gst-libs/gst/media-info/media-info-priv.c b/gst-libs/gst/media-info/media-info-priv.c
index fb012209..22ac6c45 100644
--- a/gst-libs/gst/media-info/media-info-priv.c
+++ b/gst-libs/gst/media-info/media-info-priv.c
@@ -104,11 +104,11 @@ have_type_callback (GstElement * typefind, guint probability, GstCaps * type,
/* FIXME: signal error */
g_warning ("Couldn't create id3tag");
if (!gst_element_link_many (priv->source, priv->decontainer, priv->typefind,
- NULL));
+ NULL));
g_warning ("Couldn't link in id3tag");
if (gst_element_set_state (priv->pipeline, GST_STATE_PLAYING)
- == GST_STATE_FAILURE)
+ == GST_STATE_FAILURE)
g_warning ("Couldn't set to playing");
}
#endif
@@ -139,8 +139,8 @@ deep_notify_callback (GObject * object, GstObject * origin,
GST_DEBUG ("caps: %" GST_PTR_FORMAT, priv->format);
} else
GST_DEBUG ("ignoring caps on object %s:%s",
- gst_object_get_name (gst_object_get_parent (origin)),
- gst_object_get_name (origin));
+ gst_object_get_name (gst_object_get_parent (origin)),
+ gst_object_get_name (origin));
} else if (strcmp (pspec->name, "offset") == 0) {
/* we REALLY ignore offsets, we hate them */
}
@@ -151,7 +151,8 @@ typedef struct
{
guint meta;
guint encoded;
-} TagFlagScore;
+}
+TagFlagScore;
static void
tag_flag_score (const GstTagList * list, const gchar * tag, gpointer user_data)
@@ -323,7 +324,7 @@ gmi_seek_to_track (GstMediaInfo * info, long track)
res = gst_pad_send_event (info->priv->decoder_pad, event);
if (!res) {
g_warning ("seek to logical track on pad %s:%s failed",
- GST_DEBUG_PAD_NAME (info->priv->decoder_pad));
+ GST_DEBUG_PAD_NAME (info->priv->decoder_pad));
return FALSE;
}
/* clear structs because of the seek */
@@ -350,37 +351,37 @@ gmi_set_mime (GstMediaInfo * info, const char *mime)
if ((strcmp (mime, "application/x-ogg") == 0) ||
(strcmp (mime, "application/ogg") == 0))
desc =
- g_strdup_printf
- ("%s name=source ! oggdemux ! vorbisdec name=decoder ! fakesink name=sink",
- priv->source_name);
+ g_strdup_printf
+ ("%s name=source ! oggdemux ! vorbisdec name=decoder ! fakesink name=sink",
+ priv->source_name);
else if ((strcmp (mime, "audio/mpeg") == 0)
|| (strcmp (mime, "audio/x-mp3") == 0)
|| (strcmp (mime, "audio/mp3") == 0)
|| (strcmp (mime, "application/x-id3") == 0)
|| (strcmp (mime, "audio/x-id3") == 0))
desc =
- g_strdup_printf
- ("%s name=source ! id3tag ! mad name=decoder ! audio/x-raw-int ! fakesink name=sink",
- priv->source_name);
+ g_strdup_printf
+ ("%s name=source ! id3tag ! mad name=decoder ! audio/x-raw-int ! fakesink name=sink",
+ priv->source_name);
else if ((strcmp (mime, "application/x-flac") == 0)
|| (strcmp (mime, "audio/x-flac") == 0))
desc =
- g_strdup_printf
- ("%s name=source ! flacdec name=decoder ! audio/x-raw-int ! fakesink name=sink",
- priv->source_name);
+ g_strdup_printf
+ ("%s name=source ! flacdec name=decoder ! audio/x-raw-int ! fakesink name=sink",
+ priv->source_name);
else if ((strcmp (mime, "audio/wav") == 0)
|| (strcmp (mime, "audio/x-wav") == 0))
desc =
- g_strdup_printf
- ("%s ! wavparse name=decoder ! audio/x-raw-int ! fakesink name=sink",
- priv->source_name);
+ g_strdup_printf
+ ("%s ! wavparse name=decoder ! audio/x-raw-int ! fakesink name=sink",
+ priv->source_name);
else if (strcmp (mime, "audio/x-mod") == 0
|| strcmp (mime, "audio/x-s3m") == 0 || strcmp (mime, "audio/x-xm") == 0
|| strcmp (mime, "audio/x-it") == 0)
desc =
- g_strdup_printf
- ("%s name=source ! modplug name=decoder ! audio/x-raw-int ! fakesink name=sink",
- priv->source_name);
+ g_strdup_printf
+ ("%s name=source ! modplug name=decoder ! audio/x-raw-int ! fakesink name=sink",
+ priv->source_name);
else
return FALSE;
@@ -409,7 +410,7 @@ gmi_set_mime (GstMediaInfo * info, const char *mime)
g_assert (GST_IS_PAD (priv->decoder_pad));
GST_DEBUG ("decoder pad: %s:%s",
gst_object_get_name (gst_object_get_parent (GST_OBJECT (priv->
- decoder_pad))), gst_pad_get_name (priv->decoder_pad));
+ decoder_pad))), gst_pad_get_name (priv->decoder_pad));
/* attach notify handler */
g_signal_connect (G_OBJECT (info->priv->pipeline), "deep_notify",
@@ -557,21 +558,21 @@ gmip_find_stream_post (GstMediaInfoPriv * priv)
if (res) {
switch (format) {
- case GST_FORMAT_TIME:
- stream->length_time = value;
- GST_DEBUG (" total %s: %lld", definition->nick, value);
- break;
- case GST_FORMAT_DEFAULT:
- case GST_FORMAT_BYTES:
- break;
- default:
- /* separation is necessary because track_format doesn't resolve to
- * int */
- if (format == track_format) {
- stream->length_tracks = value;
- GST_DEBUG (" total %s: %lld", definition->nick, value);
- } else
- GST_DEBUG ("unhandled format %s", definition->nick);
+ case GST_FORMAT_TIME:
+ stream->length_time = value;
+ GST_DEBUG (" total %s: %lld", definition->nick, value);
+ break;
+ case GST_FORMAT_DEFAULT:
+ case GST_FORMAT_BYTES:
+ break;
+ default:
+ /* separation is necessary because track_format doesn't resolve to
+ * int */
+ if (format == track_format) {
+ stream->length_tracks = value;
+ GST_DEBUG (" total %s: %lld", definition->nick, value);
+ } else
+ GST_DEBUG ("unhandled format %s", definition->nick);
}
} else
GST_DEBUG ("query didn't return result for %s", definition->nick);
@@ -597,7 +598,7 @@ gmip_find_stream_post (GstMediaInfoPriv * priv)
stream->bitrate = (long) (bits / seconds);
}
GST_DEBUG ("moving to STATE_METADATA\n");
- priv->state = GST_MEDIA_INFO_STATE_METADATA; /* metadata of first track */
+ priv->state = GST_MEDIA_INFO_STATE_METADATA; /* metadata of first track */
return TRUE;
}
@@ -694,23 +695,23 @@ gmip_find_track_streaminfo_post (GstMediaInfoPriv * priv)
gboolean res;
res = gst_pad_query (priv->decoder_pad, GST_QUERY_POSITION,
- &track_format, &value_start);
+ &track_format, &value_start);
if (res) {
format = GST_FORMAT_TIME;
track_num = value_start;
GST_DEBUG ("we are currently at %ld", track_num);
res = gst_pad_convert (priv->decoder_pad,
- track_format, track_num, &format, &value_start);
+ track_format, track_num, &format, &value_start);
res &= gst_pad_convert (priv->decoder_pad,
- track_format, track_num + 1, &format, &value_end);
+ track_format, track_num + 1, &format, &value_end);
if (res) {
- /* substract to get the length */
- GST_DEBUG ("start %lld, end %lld", value_start, value_end);
- value_end -= value_start;
- /* FIXME: check units; this is in seconds */
+ /* substract to get the length */
+ GST_DEBUG ("start %lld, end %lld", value_start, value_end);
+ value_end -= value_start;
+ /* FIXME: check units; this is in seconds */
- gst_tag_list_add (priv->streaminfo, GST_TAG_MERGE_REPLACE,
- GST_TAG_DURATION, (int) (value_end / 1E6), NULL);
+ gst_tag_list_add (priv->streaminfo, GST_TAG_MERGE_REPLACE,
+ GST_TAG_DURATION, (int) (value_end / 1E6), NULL);
}
}
}
diff --git a/gst-libs/gst/media-info/media-info-test.c b/gst-libs/gst/media-info/media-info-test.c
index 67a16cdc..e0778d9f 100644
--- a/gst-libs/gst/media-info/media-info-test.c
+++ b/gst-libs/gst/media-info/media-info-test.c
@@ -18,7 +18,7 @@ print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
g_assert (gst_tag_list_get_string_index (list, tag, i, &str));
} else {
str =
- g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, i));
+ g_strdup_value_contents (gst_tag_list_get_value_index (list, tag, i));
}
if (i == 0) {
diff --git a/gst-libs/gst/media-info/media-info.c b/gst-libs/gst/media-info/media-info.c
index 4f995359..16a66250 100644
--- a/gst-libs/gst/media-info/media-info.c
+++ b/gst-libs/gst/media-info/media-info.c
@@ -113,8 +113,9 @@ gst_media_info_get_type (void)
(GInstanceInitFunc) gst_media_info_instance_init,
NULL
};
+
gst_media_info_type = g_type_register_static (G_TYPE_OBJECT,
- "GstMediaInfo", &gst_media_info_info, 0);
+ "GstMediaInfo", &gst_media_info_info, 0);
}
return gst_media_info_type;
}
@@ -192,7 +193,7 @@ gst_media_info_new (GError ** error)
info->priv->error = NULL;
} else {
g_warning ("Error creating GstMediaInfo object.\n%s",
- info->priv->error->message);
+ info->priv->error->message);
g_error_free (info->priv->error);
}
}
@@ -222,7 +223,7 @@ gst_media_info_read_with_idler (GstMediaInfo * info, const char *location,
{
GstMediaInfoPriv *priv = info->priv;
- gmip_reset (info->priv); /* reset all structs */
+ gmip_reset (info->priv); /* reset all structs */
priv->location = g_strdup (location);
priv->flags = flags;
}
@@ -251,9 +252,9 @@ gst_media_info_read_idler (GstMediaInfo * info, GstMediaInfoStream ** streamp,
case GST_MEDIA_INFO_STATE_NULL:
/* make sure we have a source */
if (!priv->source_name) {
- *error = g_error_new (GST_MEDIA_INFO_ERROR, 0,
- "No source set on media info.");
- return FALSE;
+ *error = g_error_new (GST_MEDIA_INFO_ERROR, 0,
+ "No source set on media info.");
+ return FALSE;
}
/* need to find type */
@@ -266,26 +267,26 @@ gst_media_info_read_idler (GstMediaInfo * info, GstMediaInfoStream ** streamp,
GST_LOG ("STATE_TYPEFIND");
if ((priv->type == NULL) && gst_bin_iterate (GST_BIN (priv->pipeline))) {
- GST_DEBUG ("iterating while in STATE_TYPEFIND");
- GMI_DEBUG ("?");
- return TRUE;
+ GST_DEBUG ("iterating while in STATE_TYPEFIND");
+ GMI_DEBUG ("?");
+ return TRUE;
}
if (priv->type == NULL) {
- g_warning ("Couldn't find type\n");
- return FALSE;
+ g_warning ("Couldn't find type\n");
+ return FALSE;
}
/* do the state transition */
GST_DEBUG ("doing find_type_post");
gmip_find_type_post (priv);
GST_DEBUG ("finding out mime type");
mime =
- g_strdup (gst_structure_get_name (gst_caps_get_structure (priv->type,
- 0)));
+ g_strdup (gst_structure_get_name (gst_caps_get_structure (priv->type,
+ 0)));
GST_DEBUG ("found out mime type: %s", mime);
if (!gmi_set_mime (info, mime)) {
- /* FIXME: pop up error */
- GST_DEBUG ("no decoder pipeline found for mime %s", mime);
- return FALSE;
+ /* FIXME: pop up error */
+ GST_DEBUG ("no decoder pipeline found for mime %s", mime);
+ return FALSE;
}
priv->stream = gmi_stream_new ();
GST_DEBUG ("new stream: %p", priv->stream);
@@ -298,12 +299,12 @@ gst_media_info_read_idler (GstMediaInfo * info, GstMediaInfoStream ** streamp,
{
GST_LOG ("STATE_STREAM");
if ((priv->format == NULL) && gst_bin_iterate (GST_BIN (priv->pipeline))) {
- GMI_DEBUG ("?");
- return TRUE;
+ GMI_DEBUG ("?");
+ return TRUE;
}
if (priv->format == NULL) {
- g_warning ("Couldn't find format\n");
- return FALSE;
+ g_warning ("Couldn't find format\n");
+ return FALSE;
}
/* do state transition; stream -> first track metadata */
priv->current_track_num = 0;
@@ -316,21 +317,21 @@ gst_media_info_read_idler (GstMediaInfo * info, GstMediaInfoStream ** streamp,
case GST_MEDIA_INFO_STATE_METADATA:
{
if ((priv->metadata == NULL) &&
- gst_bin_iterate (GST_BIN (priv->pipeline)) &&
- priv->metadata_iters < MAX_METADATA_ITERS) {
- GMI_DEBUG ("?");
- priv->metadata_iters++;
- return TRUE;
+ gst_bin_iterate (GST_BIN (priv->pipeline)) &&
+ priv->metadata_iters < MAX_METADATA_ITERS) {
+ GMI_DEBUG ("?");
+ priv->metadata_iters++;
+ return TRUE;
}
if (priv->metadata_iters == MAX_METADATA_ITERS)
- g_print ("iterated a few times, didn't find metadata\n");
+ g_print ("iterated a few times, didn't find metadata\n");
if (priv->metadata == NULL) {
- /* this is not a permanent failure */
- GST_DEBUG ("Couldn't find metadata");
+ /* this is not a permanent failure */
+ GST_DEBUG ("Couldn't find metadata");
}
GST_DEBUG ("found metadata of track %ld", priv->current_track_num);
if (!gmip_find_track_metadata_post (priv))
- return FALSE;
+ return FALSE;
GST_DEBUG ("METADATA: going to STREAMINFO\n");
priv->state = GST_MEDIA_INFO_STATE_STREAMINFO;
return gmip_find_track_streaminfo_pre (priv);
@@ -338,50 +339,50 @@ gst_media_info_read_idler (GstMediaInfo * info, GstMediaInfoStream ** streamp,
case GST_MEDIA_INFO_STATE_STREAMINFO:
{
if ((priv->streaminfo == NULL) &&
- gst_bin_iterate (GST_BIN (priv->pipeline))) {
- GMI_DEBUG ("?");
- return TRUE;
+ gst_bin_iterate (GST_BIN (priv->pipeline))) {
+ GMI_DEBUG ("?");
+ return TRUE;
}
if (priv->streaminfo == NULL) {
- /* this is not a permanent failure */
- GST_DEBUG ("Couldn't find streaminfo");
+ /* this is not a permanent failure */
+ GST_DEBUG ("Couldn't find streaminfo");
} else
- GST_DEBUG ("found streaminfo of track %ld", priv->current_track_num);
+ GST_DEBUG ("found streaminfo of track %ld", priv->current_track_num);
if (!gmip_find_track_streaminfo_post (priv))
- return FALSE;
+ return FALSE;
priv->state = GST_MEDIA_INFO_STATE_FORMAT;
return gmip_find_track_format_pre (priv);
}
case GST_MEDIA_INFO_STATE_FORMAT:
{
if ((priv->format == NULL) && gst_bin_iterate (GST_BIN (priv->pipeline))) {
- GMI_DEBUG ("?");
- return TRUE;
+ GMI_DEBUG ("?");
+ return TRUE;
}
if (priv->format == NULL) {
- g_warning ("Couldn't find format\n");
- return FALSE;
+ g_warning ("Couldn't find format\n");
+ return FALSE;
}
GST_DEBUG ("found format of track %ld", priv->current_track_num);
if (!gmip_find_track_format_post (priv))
- return FALSE;
+ return FALSE;
/* save the track info */
priv->stream->tracks = g_list_append (priv->stream->tracks,
- priv->current_track);
+ priv->current_track);
/* these alloc'd data types have been handed off */
priv->current_track = NULL;
priv->location = NULL;
/* now see if we need to seek to a next track or not */
priv->current_track_num++;
if (priv->current_track_num < priv->stream->length_tracks) {
- gmi_seek_to_track (info, priv->current_track_num);
- priv->current_track = gmi_track_new ();
- if (!gmip_find_track_metadata_pre (priv)) {
- g_free (priv->current_track);
- return FALSE;
- }
- priv->state = GST_MEDIA_INFO_STATE_METADATA;
- return TRUE;
+ gmi_seek_to_track (info, priv->current_track_num);
+ priv->current_track = gmi_track_new ();
+ if (!gmip_find_track_metadata_pre (priv)) {
+ g_free (priv->current_track);
+ return FALSE;
+ }
+ priv->state = GST_MEDIA_INFO_STATE_METADATA;
+ return TRUE;
}
priv->state = GST_MEDIA_INFO_STATE_DONE;
gmi_clear_decoder (info);
diff --git a/gst-libs/gst/mixer/mixer.c b/gst-libs/gst/mixer/mixer.c
index a9034f60..1db3d6a3 100644
--- a/gst-libs/gst/mixer/mixer.c
+++ b/gst-libs/gst/mixer/mixer.c
@@ -57,9 +57,9 @@ gst_mixer_get_type (void)
};
gst_mixer_type = g_type_register_static (G_TYPE_INTERFACE,
- "GstMixer", &gst_mixer_info, 0);
+ "GstMixer", &gst_mixer_info, 0);
g_type_interface_add_prerequisite (gst_mixer_type,
- GST_TYPE_IMPLEMENTS_INTERFACE);
+ GST_TYPE_IMPLEMENTS_INTERFACE);
}
return gst_mixer_type;
@@ -72,26 +72,26 @@ gst_mixer_class_init (GstMixerClass * klass)
if (!initialized) {
gst_mixer_signals[RECORD_TOGGLED] =
- g_signal_new ("record-toggled",
- GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstMixerClass, record_toggled),
- NULL, NULL,
- gst_mixer_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2,
- GST_TYPE_MIXER_TRACK, G_TYPE_BOOLEAN);
+ g_signal_new ("record-toggled",
+ GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstMixerClass, record_toggled),
+ NULL, NULL,
+ gst_mixer_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2,
+ GST_TYPE_MIXER_TRACK, G_TYPE_BOOLEAN);
gst_mixer_signals[MUTE_TOGGLED] =
- g_signal_new ("mute-toggled",
- GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstMixerClass, mute_toggled),
- NULL, NULL,
- gst_mixer_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2,
- GST_TYPE_MIXER_TRACK, G_TYPE_BOOLEAN);
+ g_signal_new ("mute-toggled",
+ GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstMixerClass, mute_toggled),
+ NULL, NULL,
+ gst_mixer_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2,
+ GST_TYPE_MIXER_TRACK, G_TYPE_BOOLEAN);
gst_mixer_signals[VOLUME_CHANGED] =
- g_signal_new ("volume-changed",
- GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstMixerClass, volume_changed),
- NULL, NULL,
- gst_mixer_marshal_VOID__OBJECT_POINTER, G_TYPE_NONE, 2,
- GST_TYPE_MIXER_TRACK, G_TYPE_POINTER);
+ g_signal_new ("volume-changed",
+ GST_TYPE_MIXER, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstMixerClass, volume_changed),
+ NULL, NULL,
+ gst_mixer_marshal_VOID__OBJECT_POINTER, G_TYPE_NONE, 2,
+ GST_TYPE_MIXER_TRACK, G_TYPE_POINTER);
initialized = TRUE;
}
diff --git a/gst-libs/gst/mixer/mixertrack.c b/gst-libs/gst/mixer/mixertrack.c
index af52aec8..ae8976f1 100644
--- a/gst-libs/gst/mixer/mixertrack.c
+++ b/gst-libs/gst/mixer/mixertrack.c
@@ -61,8 +61,8 @@ gst_mixer_track_get_type (void)
};
gst_mixer_track_type =
- g_type_register_static (G_TYPE_OBJECT,
- "GstMixerTrack", &mixer_track_info, 0);
+ g_type_register_static (G_TYPE_OBJECT,
+ "GstMixerTrack", &mixer_track_info, 0);
}
return gst_mixer_track_type;
@@ -79,21 +79,21 @@ gst_mixer_track_class_init (GstMixerTrackClass * klass)
g_signal_new ("record_toggled", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstMixerTrackClass,
- record_toggled),
+ record_toggled),
NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN,
G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
signals[SIGNAL_MUTE_TOGGLED] =
g_signal_new ("mute_toggled", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstMixerTrackClass,
- mute_toggled),
+ mute_toggled),
NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN,
G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
signals[SIGNAL_VOLUME_CHANGED] =
g_signal_new ("volume_changed", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstMixerTrackClass,
- volume_changed),
+ volume_changed),
NULL, NULL, g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
diff --git a/gst-libs/gst/navigation/navigation.c b/gst-libs/gst/navigation/navigation.c
index 35ae2ba5..32510ffa 100644
--- a/gst-libs/gst/navigation/navigation.c
+++ b/gst-libs/gst/navigation/navigation.c
@@ -46,7 +46,7 @@ gst_navigation_get_type (void)
};
gst_navigation_type = g_type_register_static (G_TYPE_INTERFACE,
- "GstNavigation", &gst_navigation_info, 0);
+ "GstNavigation", &gst_navigation_info, 0);
}
return gst_navigation_type;
@@ -75,7 +75,7 @@ gst_navigation_send_key_event (GstNavigation * navigation, const char *event,
{
gst_navigation_send_event (navigation,
gst_structure_new ("application/x-gst-navigation", "event", G_TYPE_STRING,
- event, "key", G_TYPE_STRING, key, NULL));
+ event, "key", G_TYPE_STRING, key, NULL));
}
void
@@ -84,6 +84,6 @@ gst_navigation_send_mouse_event (GstNavigation * navigation, const char *event,
{
gst_navigation_send_event (navigation,
gst_structure_new ("application/x-gst-navigation", "event", G_TYPE_STRING,
- event, "button", G_TYPE_INT, button, "pointer_x", G_TYPE_DOUBLE, x,
- "pointer_y", G_TYPE_DOUBLE, y, NULL));
+ event, "button", G_TYPE_INT, button, "pointer_x", G_TYPE_DOUBLE, x,
+ "pointer_y", G_TYPE_DOUBLE, y, NULL));
}
diff --git a/gst-libs/gst/play/play.c b/gst-libs/gst/play/play.c
index 01ba1f63..ba24eb86 100644
--- a/gst-libs/gst/play/play.c
+++ b/gst-libs/gst/play/play.c
@@ -45,8 +45,8 @@ struct _GstPlayPrivate
gint get_length_attempt;
- gint tick_unblock_remaining; /* how many msecs left
- to unblock due to seeking */
+ gint tick_unblock_remaining; /* how many msecs left
+ to unblock due to seeking */
guint tick_id;
guint length_id;
@@ -171,7 +171,7 @@ gst_play_pipeline_setup (GstPlay * play, GError ** error)
/* Make sure we convert audio to the needed format */
GST_PLAY_MAKE_OR_ERROR (audioconvert, "audioconvert", "audioconvert",
- error);
+ error);
g_hash_table_insert (play->priv->elements, "audioconvert", audioconvert);
/* Duplicate audio signal to audio sink and visualization thread */
@@ -183,7 +183,7 @@ gst_play_pipeline_setup (GstPlay * play, GError ** error)
g_hash_table_insert (play->priv->elements, "tee", tee);
gst_bin_add_many (GST_BIN (work_thread), source, autoplugger, audioconvert,
- tee, NULL);
+ tee, NULL);
if (!gst_element_link_many (source, autoplugger, audioconvert, tee, NULL))
GST_PLAY_ERROR_RETURN (error, "Could not link source thread elements");
@@ -194,13 +194,13 @@ gst_play_pipeline_setup (GstPlay * play, GError ** error)
identity_cs = gst_element_factory_make ("ffcolorspace", "identity_cs");
if (!GST_IS_ELEMENT (identity_cs)) {
identity_cs =
- gst_element_factory_make ("ffmpegcolorspace", "identity_cs");
+ gst_element_factory_make ("ffmpegcolorspace", "identity_cs");
if (!GST_IS_ELEMENT (identity_cs)) {
- identity_cs = gst_element_factory_make ("colorspace", "identity_cs");
- if (!GST_IS_ELEMENT (identity_cs)) {
- gst_play_error_plugin ("colorspace", error);
- return FALSE;
- }
+ identity_cs = gst_element_factory_make ("colorspace", "identity_cs");
+ if (!GST_IS_ELEMENT (identity_cs)) {
+ gst_play_error_plugin ("colorspace", error);
+ return FALSE;
+ }
}
}
g_hash_table_insert (play->priv->elements, "identity_cs", identity_cs);
@@ -232,11 +232,11 @@ gst_play_pipeline_setup (GstPlay * play, GError ** error)
if (!GST_IS_ELEMENT (vis_cs)) {
vis_cs = gst_element_factory_make ("ffmpegcolorspace", "vis_cs");
if (!GST_IS_ELEMENT (vis_cs)) {
- vis_cs = gst_element_factory_make ("colorspace", "vis_cs");
- if (!GST_IS_ELEMENT (vis_cs)) {
- gst_play_error_plugin ("colorspace", error);
- return FALSE;
- }
+ vis_cs = gst_element_factory_make ("colorspace", "vis_cs");
+ if (!GST_IS_ELEMENT (vis_cs)) {
+ gst_play_error_plugin ("colorspace", error);
+ return FALSE;
+ }
}
}
@@ -245,9 +245,9 @@ gst_play_pipeline_setup (GstPlay * play, GError ** error)
gst_bin_add_many (GST_BIN (vis_bin), vis_queue, vis_element, vis_cs, NULL);
if (!gst_element_link_many (vis_queue, vis_element, vis_cs, NULL))
GST_PLAY_ERROR_RETURN (error,
- "Could not link visualisation thread elements");
+ "Could not link visualisation thread elements");
gst_element_add_ghost_pad (vis_bin, gst_element_get_pad (vis_cs, "src"),
- "src");
+ "src");
}
/* Creating our video output bin */
{
@@ -267,18 +267,18 @@ gst_play_pipeline_setup (GstPlay * play, GError ** error)
if (!GST_IS_ELEMENT (video_cs)) {
video_cs = gst_element_factory_make ("ffmpegcolorspace", "video_cs");
if (!GST_IS_ELEMENT (video_cs)) {
- video_cs = gst_element_factory_make ("colorspace", "video_cs");
- if (!GST_IS_ELEMENT (video_cs)) {
- gst_play_error_plugin ("colorspace", error);
- return FALSE;
- }
+ video_cs = gst_element_factory_make ("colorspace", "video_cs");
+ if (!GST_IS_ELEMENT (video_cs)) {
+ gst_play_error_plugin ("colorspace", error);
+ return FALSE;
+ }
}
}
g_hash_table_insert (play->priv->elements, "video_cs", video_cs);
/* Software colorbalance */
GST_PLAY_MAKE_OR_ERROR (video_balance, "videobalance", "video_balance",
- error);
+ error);
g_hash_table_insert (play->priv->elements, "video_balance", video_balance);
/* Colorspace conversion */
@@ -286,11 +286,11 @@ gst_play_pipeline_setup (GstPlay * play, GError ** error)
if (!GST_IS_ELEMENT (balance_cs)) {
balance_cs = gst_element_factory_make ("ffmpegcolorspace", "balance_cs");
if (!GST_IS_ELEMENT (balance_cs)) {
- balance_cs = gst_element_factory_make ("colorspace", "balance_cs");
- if (!GST_IS_ELEMENT (balance_cs)) {
- gst_play_error_plugin ("colorspace", error);
- return FALSE;
- }
+ balance_cs = gst_element_factory_make ("colorspace", "balance_cs");
+ if (!GST_IS_ELEMENT (balance_cs)) {
+ gst_play_error_plugin ("colorspace", error);
+ return FALSE;
+ }
}
}
g_hash_table_insert (play->priv->elements, "balance_cs", balance_cs);
@@ -299,38 +299,38 @@ gst_play_pipeline_setup (GstPlay * play, GError ** error)
GST_PLAY_MAKE_OR_ERROR (video_scaler, "videoscale", "video_scaler", error);
g_hash_table_insert (play->priv->elements, "video_scaler", video_scaler);
g_signal_connect (gst_element_get_pad (video_scaler, "src"), "fixate",
- G_CALLBACK (gst_play_video_fixate), play);
+ G_CALLBACK (gst_play_video_fixate), play);
/* Placeholder for future video sink bin */
GST_PLAY_MAKE_OR_ERROR (video_sink, "fakesink", "video_sink", error);
g_hash_table_insert (play->priv->elements, "video_sink", video_sink);
gst_bin_add_many (GST_BIN (video_thread), video_queue, video_switch,
- video_cs, video_balance, balance_cs, video_scaler, video_sink, NULL);
+ video_cs, video_balance, balance_cs, video_scaler, video_sink, NULL);
/* break down linking so we can figure out what might be failing */
if (!gst_element_link (video_queue, video_switch))
GST_PLAY_ERROR_RETURN (error,
- "Could not link video output thread (queue and switch)");
+ "Could not link video output thread (queue and switch)");
if (!gst_element_link (video_switch, video_cs))
GST_PLAY_ERROR_RETURN (error,
- "Could not link video output thread (switch and cs)");
+ "Could not link video output thread (switch and cs)");
if (!gst_element_link (video_cs, video_balance))
GST_PLAY_ERROR_RETURN (error,
- "Could not link video output thread (cs and balance)");
+ "Could not link video output thread (cs and balance)");
if (!gst_element_link (video_balance, balance_cs))
GST_PLAY_ERROR_RETURN (error,
- "Could not link video output thread (balance and balance_cs)");
+ "Could not link video output thread (balance and balance_cs)");
if (!gst_element_link (balance_cs, video_scaler))
GST_PLAY_ERROR_RETURN (error,
- "Could not link video output thread (balance_cs and scaler)");
+ "Could not link video output thread (balance_cs and scaler)");
if (!gst_element_link (video_scaler, video_sink))
GST_PLAY_ERROR_RETURN (error,
- "Could not link video output thread (balance_cs and scaler)");
+ "Could not link video output thread (balance_cs and scaler)");
gst_element_add_ghost_pad (video_thread, gst_element_get_pad (video_queue,
- "sink"), "sink");
+ "sink"), "sink");
if (!gst_element_link (identity_cs, video_thread))
GST_PLAY_ERROR_RETURN (error,
- "Could not link video output thread elements");
+ "Could not link video output thread elements");
}
/* Creating our audio output bin
{ queue ! fakesink } */
@@ -347,19 +347,19 @@ gst_play_pipeline_setup (GstPlay * play, GError ** error)
GST_PLAY_MAKE_OR_ERROR (volume, "volume", "volume", error);
g_hash_table_insert (play->priv->elements, "volume", volume);
g_signal_connect (gst_element_get_pad (volume, "src"), "fixate",
- G_CALLBACK (gst_play_audio_fixate), play);
+ G_CALLBACK (gst_play_audio_fixate), play);
/* Placeholder for future audio sink bin */
GST_PLAY_MAKE_OR_ERROR (audio_sink, "fakesink", "audio_sink", error);
g_hash_table_insert (play->priv->elements, "audio_sink", audio_sink);
gst_bin_add_many (GST_BIN (audio_thread), audio_queue, volume, audio_sink,
- NULL);
+ NULL);
if (!gst_element_link_many (audio_queue, volume, audio_sink, NULL))
GST_PLAY_ERROR_RETURN (error,
- "Could not link audio output thread elements");
+ "Could not link audio output thread elements");
gst_element_add_ghost_pad (audio_thread, gst_element_get_pad (audio_queue,
- "sink"), "sink");
+ "sink"), "sink");
gst_pad_link (tee_pad2, gst_element_get_pad (audio_queue, "sink"));
}
@@ -408,7 +408,7 @@ gst_play_tick_callback (GstPlay * play)
if (q)
g_signal_emit (G_OBJECT (play), gst_play_signals[TIME_TICK],
- 0, play->priv->time_nanos);
+ 0, play->priv->time_nanos);
if (GST_STATE (GST_ELEMENT (play)) == GST_STATE_PLAYING)
return TRUE;
@@ -443,15 +443,15 @@ gst_play_get_length_callback (GstPlay * play)
/* Audio first and then Video */
if (GST_IS_ELEMENT (audio_sink_element))
q = gst_element_query (audio_sink_element, GST_QUERY_TOTAL, &format,
- &value);
+ &value);
if ((!q) && (GST_IS_ELEMENT (video_sink_element)))
q = gst_element_query (video_sink_element, GST_QUERY_TOTAL, &format,
- &value);
+ &value);
if (q) {
play->priv->length_nanos = value;
g_signal_emit (G_OBJECT (play), gst_play_signals[STREAM_LENGTH],
- 0, play->priv->length_nanos);
+ 0, play->priv->length_nanos);
play->priv->length_id = 0;
return FALSE;
}
@@ -487,7 +487,7 @@ gst_play_video_fixate (GstPad * pad, const GstCaps * caps, gpointer user_data)
return newcaps;
}
if (gst_caps_structure_fixate_field_nearest_double (structure, "framerate",
- 30.0)) {
+ 30.0)) {
return newcaps;
}
@@ -545,7 +545,7 @@ gst_play_state_change (GstElement * element, GstElementState old,
}
play->priv->tick_id = g_timeout_add (TICK_INTERVAL_MSEC,
- (GSourceFunc) gst_play_tick_callback, play);
+ (GSourceFunc) gst_play_tick_callback, play);
play->priv->get_length_attempt = 0;
@@ -555,7 +555,7 @@ gst_play_state_change (GstElement * element, GstElementState old,
}
play->priv->length_id = g_timeout_add (TICK_INTERVAL_MSEC,
- (GSourceFunc) gst_play_get_length_callback, play);
+ (GSourceFunc) gst_play_get_length_callback, play);
} else {
if (play->priv->tick_id) {
g_source_remove (play->priv->tick_id);
@@ -632,7 +632,7 @@ gst_play_init (GstPlay * play)
if (!gst_play_pipeline_setup (play, &play->priv->error)) {
g_warning ("libgstplay: failed initializing pipeline, error: %s",
- play->priv->error->message);
+ play->priv->error->message);
}
}
@@ -793,10 +793,10 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
play->priv->tick_unblock_remaining = 500;
s = gst_element_seek (video_seek_element, GST_FORMAT_TIME |
- GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, time_nanos);
+ GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, time_nanos);
if (!s) {
s = gst_element_seek (audio_seek_element, GST_FORMAT_TIME |
- GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, time_nanos);
+ GST_SEEK_METHOD_SET | GST_SEEK_FLAG_FLUSH, time_nanos);
}
if (s) {
@@ -804,11 +804,11 @@ gst_play_seek_to_time (GstPlay * play, gint64 time_nanos)
gboolean q = FALSE;
q = gst_element_query (audio_sink_element, GST_QUERY_POSITION, &format,
- &(play->priv->time_nanos));
+ &(play->priv->time_nanos));
if (q)
- g_signal_emit (G_OBJECT (play), gst_play_signals[TIME_TICK],
- 0, play->priv->time_nanos);
+ g_signal_emit (G_OBJECT (play), gst_play_signals[TIME_TICK],
+ 0, play->priv->time_nanos);
}
}
@@ -907,10 +907,10 @@ gst_play_set_video_sink (GstPlay * play, GstElement * video_sink)
GST_PLAY_SINK_TYPE_VIDEO);
if (GST_IS_ELEMENT (video_sink_element)) {
g_hash_table_replace (play->priv->elements, "video_sink_element",
- video_sink_element);
+ video_sink_element);
if (GST_IS_X_OVERLAY (video_sink_element)) {
g_signal_connect (G_OBJECT (video_sink_element),
- "desired_size_changed", G_CALLBACK (gst_play_have_video_size), play);
+ "desired_size_changed", G_CALLBACK (gst_play_have_video_size), play);
}
}
@@ -966,7 +966,7 @@ gst_play_set_audio_sink (GstPlay * play, GstElement * audio_sink)
GST_PLAY_SINK_TYPE_AUDIO);
if (GST_IS_ELEMENT (audio_sink_element)) {
g_hash_table_replace (play->priv->elements, "audio_sink_element",
- audio_sink_element);
+ audio_sink_element);
}
gst_element_set_state (audio_sink, GST_STATE (GST_ELEMENT (play)));
@@ -1114,7 +1114,7 @@ gst_play_connect_visualization (GstPlay * play, gboolean connect)
/* Adding, linking */
play->priv->handoff_hid = g_signal_connect (G_OBJECT (identity),
- "handoff", G_CALLBACK (gst_play_identity_handoff), play);
+ "handoff", G_CALLBACK (gst_play_identity_handoff), play);
gst_bin_add (GST_BIN (video_thread), vis_bin);
gst_pad_link (tee_pad1, vis_queue_pad);
gst_element_link (vis_bin, video_switch);
@@ -1168,64 +1168,64 @@ gst_play_get_sink_element (GstPlay * play,
if (GST_IS_BIN (element)) {
element = gst_play_get_sink_element (play, element, sink_type);
if (GST_IS_ELEMENT (element))
- return element;
+ return element;
} else {
pads = gst_element_get_pad_list (element);
has_src = FALSE;
has_correct_type = FALSE;
while (pads) {
- /* check for src pad */
- if (GST_PAD_DIRECTION (GST_PAD (pads->data)) == GST_PAD_SRC) {
- has_src = TRUE;
- break;
- } else {
- /* If not a src pad checking caps */
- GstCaps *caps;
- GstStructure *structure;
- gboolean has_video_cap = FALSE;
- gboolean has_audio_cap = FALSE;
-
- caps = gst_pad_get_caps (GST_PAD (pads->data));
- structure = gst_caps_get_structure (caps, 0);
-
- if (strcmp (gst_structure_get_name (structure),
- "audio/x-raw-int") == 0) {
- has_audio_cap = TRUE;
- }
-
- if (strcmp (gst_structure_get_name (structure),
- "video/x-raw-yuv") == 0 ||
- strcmp (gst_structure_get_name (structure),
- "video/x-raw-rgb") == 0) {
- has_video_cap = TRUE;
- }
-
- gst_caps_free (caps);
-
- switch (sink_type) {
- case GST_PLAY_SINK_TYPE_AUDIO:
- if (has_audio_cap)
- has_correct_type = TRUE;
- break;
- case GST_PLAY_SINK_TYPE_VIDEO:
- if (has_video_cap)
- has_correct_type = TRUE;
- break;
- case GST_PLAY_SINK_TYPE_ANY:
- if ((has_video_cap) || (has_audio_cap))
- has_correct_type = TRUE;
- break;
- default:
- has_correct_type = FALSE;
- }
- }
-
- pads = g_list_next (pads);
+ /* check for src pad */
+ if (GST_PAD_DIRECTION (GST_PAD (pads->data)) == GST_PAD_SRC) {
+ has_src = TRUE;
+ break;
+ } else {
+ /* If not a src pad checking caps */
+ GstCaps *caps;
+ GstStructure *structure;
+ gboolean has_video_cap = FALSE;
+ gboolean has_audio_cap = FALSE;
+
+ caps = gst_pad_get_caps (GST_PAD (pads->data));
+ structure = gst_caps_get_structure (caps, 0);
+
+ if (strcmp (gst_structure_get_name (structure),
+ "audio/x-raw-int") == 0) {
+ has_audio_cap = TRUE;
+ }
+
+ if (strcmp (gst_structure_get_name (structure),
+ "video/x-raw-yuv") == 0 ||
+ strcmp (gst_structure_get_name (structure),
+ "video/x-raw-rgb") == 0) {
+ has_video_cap = TRUE;
+ }
+
+ gst_caps_free (caps);
+
+ switch (sink_type) {
+ case GST_PLAY_SINK_TYPE_AUDIO:
+ if (has_audio_cap)
+ has_correct_type = TRUE;
+ break;
+ case GST_PLAY_SINK_TYPE_VIDEO:
+ if (has_video_cap)
+ has_correct_type = TRUE;
+ break;
+ case GST_PLAY_SINK_TYPE_ANY:
+ if ((has_video_cap) || (has_audio_cap))
+ has_correct_type = TRUE;
+ break;
+ default:
+ has_correct_type = FALSE;
+ }
+ }
+
+ pads = g_list_next (pads);
}
if ((!has_src) && (has_correct_type))
- return element;
+ return element;
}
elements = g_list_next (elements);
@@ -1247,7 +1247,7 @@ gst_play_new (GError ** error)
play->priv->error = NULL;
} else {
g_warning ("Error creating GstPlay object.\n%s",
- play->priv->error->message);
+ play->priv->error->message);
g_error_free (play->priv->error);
}
}
@@ -1280,7 +1280,7 @@ gst_play_get_type (void)
};
play_type = g_type_register_static (GST_TYPE_PIPELINE, "GstPlay",
- &play_info, 0);
+ &play_info, 0);
}
return play_type;
diff --git a/gst-libs/gst/propertyprobe/propertyprobe.c b/gst-libs/gst/propertyprobe/propertyprobe.c
index 05dd3f8f..730151e9 100644
--- a/gst-libs/gst/propertyprobe/propertyprobe.c
+++ b/gst-libs/gst/propertyprobe/propertyprobe.c
@@ -56,8 +56,8 @@ gst_property_probe_get_type (void)
};
gst_property_probe_type =
- g_type_register_static (G_TYPE_INTERFACE,
- "GstPropertyProbe", &gst_property_probe_info, 0);
+ g_type_register_static (G_TYPE_INTERFACE,
+ "GstPropertyProbe", &gst_property_probe_info, 0);
}
return gst_property_probe_type;
@@ -70,10 +70,10 @@ gst_property_probe_iface_init (GstPropertyProbeInterface * iface)
if (!initialized) {
gst_property_probe_signals[SIGNAL_PROBE_NEEDED] =
- g_signal_new ("probe-needed", G_TYPE_FROM_CLASS (iface),
- G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstPropertyProbeInterface,
- probe_needed), NULL, NULL, g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
+ g_signal_new ("probe-needed", G_TYPE_FROM_CLASS (iface),
+ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstPropertyProbeInterface,
+ probe_needed), NULL, NULL, g_cclosure_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
initialized = TRUE;
}
diff --git a/gst-libs/gst/resample/dtos.c b/gst-libs/gst/resample/dtos.c
index 98e8f6a6..f1e2278e 100644
--- a/gst-libs/gst/resample/dtos.c
+++ b/gst-libs/gst/resample/dtos.c
@@ -108,7 +108,8 @@ static union
{
int i[4];
float f[4];
-} av_tmp __attribute__ ((__aligned__ (16)));
+}
+av_tmp __attribute__ ((__aligned__ (16)));
void
conv_double_short_altivec (double *dest, short *src, int n)
@@ -122,7 +123,7 @@ conv_double_short_altivec (double *dest, short *src, int n)
av_tmp.i[3] = src[3];
asm (" lvx 0,0,%0\n" " vcfsx 1,0,0\n" " stvx 1,0,%0\n": :"r" (&av_tmp)
- );
+ );
dest[0] = av_tmp.f[0];
dest[1] = av_tmp.f[1];
diff --git a/gst-libs/gst/resample/resample.c b/gst-libs/gst/resample/resample.c
index cd409d23..cc413e24 100644
--- a/gst-libs/gst/resample/resample.c
+++ b/gst-libs/gst/resample/resample.c
@@ -100,33 +100,33 @@ gst_resample_reinit (gst_resample_t * r)
switch (r->method) {
default:
case GST_RESAMPLE_NEAREST:
- r->scale = gst_resample_nearest_s16;
- break;
+ r->scale = gst_resample_nearest_s16;
+ break;
case GST_RESAMPLE_BILINEAR:
- r->scale = gst_resample_bilinear_s16;
- break;
+ r->scale = gst_resample_bilinear_s16;
+ break;
case GST_RESAMPLE_SINC_SLOW:
- r->scale = gst_resample_sinc_s16;
- break;
+ r->scale = gst_resample_sinc_s16;
+ break;
case GST_RESAMPLE_SINC:
- r->scale = gst_resample_sinc_ft_s16;
- break;
+ r->scale = gst_resample_sinc_ft_s16;
+ break;
}
} else if (r->format == GST_RESAMPLE_FLOAT) {
switch (r->method) {
default:
case GST_RESAMPLE_NEAREST:
- r->scale = gst_resample_nearest_float;
- break;
+ r->scale = gst_resample_nearest_float;
+ break;
case GST_RESAMPLE_BILINEAR:
- r->scale = gst_resample_bilinear_float;
- break;
+ r->scale = gst_resample_bilinear_float;
+ break;
case GST_RESAMPLE_SINC_SLOW:
- r->scale = gst_resample_sinc_float;
- break;
+ r->scale = gst_resample_sinc_float;
+ break;
case GST_RESAMPLE_SINC:
- r->scale = gst_resample_sinc_ft_float;
- break;
+ r->scale = gst_resample_sinc_ft_float;
+ break;
}
} else {
fprintf (stderr, "gst_resample: Unexpected format \"%d\"\n", r->format);
@@ -170,9 +170,9 @@ gst_resample_scale (gst_resample_t * r, void *i_buf, unsigned int i_size)
if (r->verbose) {
printf ("gst_resample_scale: i_buf=%p i_size=%d\n", i_buf, i_size);
printf ("gst_resample_scale: i_samples=%d o_samples=%d i_inc=%g o_buf=%p\n",
- r->i_samples, r->o_samples, r->i_inc, r->o_buf);
+ r->i_samples, r->o_samples, r->i_inc, r->o_buf);
printf ("gst_resample_scale: i_start=%g i_end=%g o_start=%g\n",
- r->i_start, r->i_end, r->o_start);
+ r->i_start, r->i_end, r->o_start);
}
if ((r->filter_length + r->i_samples) * sizeof (double) * 2 > r->buffer_len) {
@@ -191,20 +191,20 @@ gst_resample_scale (gst_resample_t * r, void *i_buf, unsigned int i_size)
if (r->format == GST_RESAMPLE_S16) {
if (r->channels == 2) {
conv_double_short (r->buffer + r->filter_length * sizeof (double) * 2,
- r->i_buf, r->i_samples * 2);
+ r->i_buf, r->i_samples * 2);
} else {
conv_double_short_dstr (r->buffer +
- r->filter_length * sizeof (double) * 2, r->i_buf, r->i_samples,
- sizeof (double) * 2);
+ r->filter_length * sizeof (double) * 2, r->i_buf, r->i_samples,
+ sizeof (double) * 2);
}
} else if (r->format == GST_RESAMPLE_FLOAT) {
if (r->channels == 2) {
conv_double_float (r->buffer + r->filter_length * sizeof (double) * 2,
- r->i_buf, r->i_samples * 2);
+ r->i_buf, r->i_samples * 2);
} else {
conv_double_float_dstr (r->buffer +
- r->filter_length * sizeof (double) * 2, r->i_buf, r->i_samples,
- sizeof (double) * 2);
+ r->filter_length * sizeof (double) * 2, r->i_buf, r->i_samples,
+ sizeof (double) * 2);
}
}
@@ -358,15 +358,15 @@ gst_resample_sinc_slow_s16 (gst_resample_t * r)
c0 = 0;
c1 = 0;
for (j = 0; j < r->filter_length; j++) {
- weight = (x == 0) ? 1 : (sinx / x);
+ weight = (x == 0) ? 1 : (sinx / x);
/*printf("j %d sin %g cos %g\n",j,sinx,cosx); */
/*printf("j %d sin %g x %g sinc %g\n",j,sinx,x,weight); */
- c0 += weight * GETBUF ((start + j), 0);
- c1 += weight * GETBUF ((start + j), 1);
- t = cosx * cosd - sinx * sind;
- sinx = cosx * sind + sinx * cosd;
- cosx = t;
- x += d;
+ c0 += weight * GETBUF ((start + j), 0);
+ c1 += weight * GETBUF ((start + j), 1);
+ t = cosx * cosd - sinx * sind;
+ sinx = cosx * sind + sinx * cosd;
+ cosx = t;
+ x += d;
}
o_ptr[0] = rint (c0);
o_ptr[1] = rint (c1);
@@ -494,7 +494,7 @@ gst_resample_sinc_ft_s16 (gst_resample_t * r)
double scale;
int n = 4;
- scale = r->i_inc; /* cutoff at 22050 */
+ scale = r->i_inc; /* cutoff at 22050 */
/*scale = 1.0; // cutoff at 24000 */
/*scale = r->i_inc * 0.5; // cutoff at 11025 */
@@ -546,7 +546,7 @@ gst_resample_sinc_ft_s16 (gst_resample_t * r)
}
#else
functable_fir2 (ft,
- &c0, &c1, x, n, ptr + (start + r->filter_length) * 2, r->filter_length);
+ &c0, &c1, x, n, ptr + (start + r->filter_length) * 2, r->filter_length);
c0 *= scale;
c1 *= scale;
#endif
@@ -566,7 +566,7 @@ gst_resample_sinc_ft_s16 (gst_resample_t * r)
conv_short_double (r->o_buf, out_tmp, 2 * r->o_samples);
} else {
conv_short_double_sstr (r->o_buf, out_tmp, r->o_samples,
- 2 * sizeof (double));
+ 2 * sizeof (double));
}
}
@@ -711,15 +711,15 @@ gst_resample_sinc_slow_float (gst_resample_t * r)
c0 = 0;
c1 = 0;
for (j = 0; j < r->filter_length; j++) {
- weight = (x == 0) ? 1 : (sinx / x);
+ weight = (x == 0) ? 1 : (sinx / x);
/*printf("j %d sin %g cos %g\n",j,sinx,cosx); */
/*printf("j %d sin %g x %g sinc %g\n",j,sinx,x,weight); */
- c0 += weight * GETBUF ((start + j), 0);
- c1 += weight * GETBUF ((start + j), 1);
- t = cosx * cosd - sinx * sind;
- sinx = cosx * sind + sinx * cosd;
- cosx = t;
- x += d;
+ c0 += weight * GETBUF ((start + j), 0);
+ c1 += weight * GETBUF ((start + j), 1);
+ t = cosx * cosd - sinx * sind;
+ sinx = cosx * sind + sinx * cosd;
+ cosx = t;
+ x += d;
}
o_ptr[0] = c0;
o_ptr[1] = c1;
@@ -806,7 +806,7 @@ gst_resample_sinc_ft_float (gst_resample_t * r)
double scale;
int n = 4;
- scale = r->i_inc; /* cutoff at 22050 */
+ scale = r->i_inc; /* cutoff at 22050 */
/*scale = 1.0; // cutoff at 24000 */
/*scale = r->i_inc * 0.5; // cutoff at 11025 */
@@ -858,7 +858,7 @@ gst_resample_sinc_ft_float (gst_resample_t * r)
}
#else
functable_fir2 (ft,
- &c0, &c1, x, n, ptr + (start + r->filter_length) * 2, r->filter_length);
+ &c0, &c1, x, n, ptr + (start + r->filter_length) * 2, r->filter_length);
c0 *= scale;
c1 *= scale;
#endif
@@ -878,7 +878,7 @@ gst_resample_sinc_ft_float (gst_resample_t * r)
conv_float_double (r->o_buf, out_tmp, 2 * r->o_samples);
} else {
conv_float_double_sstr (r->o_buf, out_tmp, r->o_samples,
- 2 * sizeof (double));
+ 2 * sizeof (double));
}
}
diff --git a/gst-libs/gst/resample/test.c b/gst-libs/gst/resample/test.c
index 152d12a6..d6785aef 100644
--- a/gst-libs/gst/resample/test.c
+++ b/gst-libs/gst/resample/test.c
@@ -123,7 +123,7 @@ test_res1 (void)
f = AMP * test_func ((double) i / O_RATE);
/*f = rint(AMP*test_func((double)i/O_RATE)); */
fprintf (out, "%d %d %d %g %g\n", i,
- o_buf[2 * i + 0], o_buf[2 * i + 1], f, o_buf[2 * i + 0] - f);
+ o_buf[2 * i + 0], o_buf[2 * i + 1], f, o_buf[2 * i + 0] - f);
}
sum10k = 0;
@@ -206,7 +206,7 @@ test_res3 (void)
for (i = 0; i < 1000 * n; i++) {
x = -50.0 + 0.1 / n * i;
f1 = functable_sinc (NULL, t->scale * x) *
- functable_window_std (NULL, t->scale2 * x);
+ functable_window_std (NULL, t->scale2 * x);
f2 = functable_eval (t, x);
fprintf (out, "%d %g %g %g\n", i, f1, f2, f2 - f1);
}
@@ -224,7 +224,7 @@ sinc_poly (double x)
return 1 - x2 * INV3FAC + x2 * x2 * INV5FAC - x2 * x2 * x2 * INV7FAC;
/*+ x2 * x2 * x2 * x2 * INV9FAC */
- /*- x2 * x2 * x2 * x2 * x2 * INV11FAC; */
+ /*- x2 * x2 * x2 * x2 * x2 * INV11FAC; */
}
void
diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c
index b51b4fb5..042651a9 100644
--- a/gst-libs/gst/riff/riff-media.c
+++ b/gst-libs/gst/riff/riff-media.c
@@ -35,175 +35,175 @@ gst_riff_create_video_caps (guint32 codec_fcc,
switch (codec_fcc) {
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
caps = gst_caps_new_simple ("video/x-raw-yuv",
- "format", GST_TYPE_FOURCC, codec_fcc, NULL);
+ "format", GST_TYPE_FOURCC, codec_fcc, NULL);
if (codec_name)
- *codec_name = g_strdup ("Raw, uncompressed I420");
+ *codec_name = g_strdup ("Raw, uncompressed I420");
break;
case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
caps = gst_caps_new_simple ("video/x-raw-yuv",
- "format", GST_TYPE_FOURCC, codec_fcc, NULL);
+ "format", GST_TYPE_FOURCC, codec_fcc, NULL);
if (codec_name)
- *codec_name = g_strdup ("Raw, uncompressed YUV 4:2:2");
+ *codec_name = g_strdup ("Raw, uncompressed YUV 4:2:2");
break;
- case GST_MAKE_FOURCC ('M', 'J', 'P', 'G'): /* YUY2 MJPEG */
+ case GST_MAKE_FOURCC ('M', 'J', 'P', 'G'): /* YUY2 MJPEG */
caps = gst_caps_new_simple ("video/x-jpeg", NULL);
if (codec_name)
- *codec_name = g_strdup ("Motion JPEG");
+ *codec_name = g_strdup ("Motion JPEG");
break;
- case GST_MAKE_FOURCC ('J', 'P', 'E', 'G'): /* generic (mostly RGB) MJPEG */
+ case GST_MAKE_FOURCC ('J', 'P', 'E', 'G'): /* generic (mostly RGB) MJPEG */
caps = gst_caps_new_simple ("video/x-jpeg", NULL);
if (codec_name)
- *codec_name = g_strdup ("JPEG Still Image");
+ *codec_name = g_strdup ("JPEG Still Image");
break;
- case GST_MAKE_FOURCC ('P', 'I', 'X', 'L'): /* Miro/Pinnacle fourccs */
- case GST_MAKE_FOURCC ('V', 'I', 'X', 'L'): /* Miro/Pinnacle fourccs */
+ case GST_MAKE_FOURCC ('P', 'I', 'X', 'L'): /* Miro/Pinnacle fourccs */
+ case GST_MAKE_FOURCC ('V', 'I', 'X', 'L'): /* Miro/Pinnacle fourccs */
caps = gst_caps_new_simple ("video/x-jpeg", NULL);
if (codec_name)
- *codec_name = g_strdup ("Miro/Pinnacle Video XL");
+ *codec_name = g_strdup ("Miro/Pinnacle Video XL");
break;
case GST_MAKE_FOURCC ('H', 'F', 'Y', 'U'):
caps = gst_caps_new_simple ("video/x-huffyuv", NULL);
if (codec_name)
- *codec_name = g_strdup ("Huffman Lossless Codec");
+ *codec_name = g_strdup ("Huffman Lossless Codec");
break;
case GST_MAKE_FOURCC ('M', 'P', 'E', 'G'):
case GST_MAKE_FOURCC ('M', 'P', 'G', 'I'):
caps = gst_caps_new_simple ("video/mpeg",
- "systemstream", G_TYPE_BOOLEAN, FALSE,
- "mpegversion", G_TYPE_BOOLEAN, 1, NULL);
+ "systemstream", G_TYPE_BOOLEAN, FALSE,
+ "mpegversion", G_TYPE_BOOLEAN, 1, NULL);
if (codec_name)
- *codec_name = g_strdup ("MPEG video");
+ *codec_name = g_strdup ("MPEG video");
break;
case GST_MAKE_FOURCC ('H', '2', '6', '3'):
caps = gst_caps_new_simple ("video/x-h263", NULL);
if (codec_name)
- *codec_name = g_strdup ("ITU H.26n");
+ *codec_name = g_strdup ("ITU H.26n");
break;
case GST_MAKE_FOURCC ('i', '2', '6', '3'):
caps = gst_caps_new_simple ("video/x-h263", NULL);
if (codec_name)
- *codec_name = g_strdup ("ITU H.263");
+ *codec_name = g_strdup ("ITU H.263");
break;
case GST_MAKE_FOURCC ('L', '2', '6', '3'):
caps = gst_caps_new_simple ("video/x-h263", NULL);
if (codec_name)
- *codec_name = g_strdup ("Lead H.263");
+ *codec_name = g_strdup ("Lead H.263");
break;
case GST_MAKE_FOURCC ('M', '2', '6', '3'):
caps = gst_caps_new_simple ("video/x-h263", NULL);
if (codec_name)
- *codec_name = g_strdup ("Microsoft H.263");
+ *codec_name = g_strdup ("Microsoft H.263");
break;
case GST_MAKE_FOURCC ('V', 'D', 'O', 'W'):
caps = gst_caps_new_simple ("video/x-h263", NULL);
if (codec_name)
- *codec_name = g_strdup ("VDOLive");
+ *codec_name = g_strdup ("VDOLive");
break;
case GST_MAKE_FOURCC ('V', 'I', 'V', 'O'):
caps = gst_caps_new_simple ("video/x-h263", NULL);
if (codec_name)
- *codec_name = g_strdup ("Vivo H.263");
+ *codec_name = g_strdup ("Vivo H.263");
break;
case GST_MAKE_FOURCC ('x', '2', '6', '3'):
caps = gst_caps_new_simple ("video/x-h263", NULL);
if (codec_name)
- *codec_name = g_strdup ("Xirlink H.263");
+ *codec_name = g_strdup ("Xirlink H.263");
break;
case GST_MAKE_FOURCC ('D', 'I', 'V', '3'):
caps = gst_caps_new_simple ("video/x-divx",
- "divxversion", G_TYPE_INT, 3, NULL);
+ "divxversion", G_TYPE_INT, 3, NULL);
if (codec_name)
- *codec_name = g_strdup ("DivX MPEG-4 Version 3");
+ *codec_name = g_strdup ("DivX MPEG-4 Version 3");
break;
case GST_MAKE_FOURCC ('D', 'I', 'V', '4'):
caps = gst_caps_new_simple ("video/x-divx",
- "divxversion", G_TYPE_INT, 4, NULL);
+ "divxversion", G_TYPE_INT, 4, NULL);
if (codec_name)
- *codec_name = g_strdup ("DivX MPEG-4 Version 4");
+ *codec_name = g_strdup ("DivX MPEG-4 Version 4");
break;
case GST_MAKE_FOURCC ('d', 'i', 'v', 'x'):
case GST_MAKE_FOURCC ('D', 'I', 'V', 'X'):
case GST_MAKE_FOURCC ('D', 'X', '5', '0'):
case GST_MAKE_FOURCC ('D', 'I', 'V', '5'):
caps = gst_caps_new_simple ("video/x-divx",
- "divxversion", G_TYPE_INT, 5, NULL);
+ "divxversion", G_TYPE_INT, 5, NULL);
if (codec_name)
- *codec_name = g_strdup ("DivX MPEG-4 Version 5");
+ *codec_name = g_strdup ("DivX MPEG-4 Version 5");
break;
case GST_MAKE_FOURCC ('X', 'V', 'I', 'D'):
case GST_MAKE_FOURCC ('x', 'v', 'i', 'd'):
caps = gst_caps_new_simple ("video/x-xvid", NULL);
if (codec_name)
- *codec_name = g_strdup ("XVID MPEG-4");
+ *codec_name = g_strdup ("XVID MPEG-4");
break;
case GST_MAKE_FOURCC ('M', 'P', 'G', '4'):
caps = gst_caps_new_simple ("video/x-msmpeg",
- "msmpegversion", G_TYPE_INT, 41, NULL);
+ "msmpegversion", G_TYPE_INT, 41, NULL);
if (codec_name)
- *codec_name = g_strdup ("Microsoft MPEG-4 4.1");
+ *codec_name = g_strdup ("Microsoft MPEG-4 4.1");
break;
case GST_MAKE_FOURCC ('M', 'P', '4', '2'):
caps = gst_caps_new_simple ("video/x-msmpeg",
- "msmpegversion", G_TYPE_INT, 42, NULL);
+ "msmpegversion", G_TYPE_INT, 42, NULL);
if (codec_name)
- *codec_name = g_strdup ("Microsoft MPEG-4 4.2");
+ *codec_name = g_strdup ("Microsoft MPEG-4 4.2");
break;
case GST_MAKE_FOURCC ('M', 'P', '4', '3'):
caps = gst_caps_new_simple ("video/x-msmpeg",
- "msmpegversion", G_TYPE_INT, 43, NULL);
+ "msmpegversion", G_TYPE_INT, 43, NULL);
if (codec_name)
- *codec_name = g_strdup ("Microsoft MPEG-4 4.3");
+ *codec_name = g_strdup ("Microsoft MPEG-4 4.3");
break;
case GST_MAKE_FOURCC ('3', 'I', 'V', '1'):
case GST_MAKE_FOURCC ('3', 'I', 'V', '2'):
caps = gst_caps_new_simple ("video/x-3ivx", NULL);
if (codec_name)
- *codec_name = g_strdup ("3ivx");
+ *codec_name = g_strdup ("3ivx");
break;
case GST_MAKE_FOURCC ('D', 'V', 'S', 'D'):
case GST_MAKE_FOURCC ('d', 'v', 's', 'd'):
caps = gst_caps_new_simple ("video/x-dv",
- "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
+ "systemstream", G_TYPE_BOOLEAN, FALSE, NULL);
if (codec_name)
- *codec_name = g_strdup ("Generic DV");
+ *codec_name = g_strdup ("Generic DV");
break;
case GST_MAKE_FOURCC ('W', 'M', 'V', '1'):
caps = gst_caps_new_simple ("video/x-wmv",
- "wmvversion", G_TYPE_INT, 1, NULL);
+ "wmvversion", G_TYPE_INT, 1, NULL);
if (codec_name)
- *codec_name = g_strdup ("Windows Media Video 7");
+ *codec_name = g_strdup ("Windows Media Video 7");
break;
case GST_MAKE_FOURCC ('W', 'M', 'V', '2'):
caps = gst_caps_new_simple ("video/x-wmv",
- "wmvversion", G_TYPE_INT, 2, NULL);
+ "wmvversion", G_TYPE_INT, 2, NULL);
if (codec_name)
- *codec_name = g_strdup ("Windows Media Video 8");
+ *codec_name = g_strdup ("Windows Media Video 8");
break;
case GST_MAKE_FOURCC ('W', 'M', 'V', '3'):
caps = gst_caps_new_simple ("video/x-wmv",
- "wmvversion", G_TYPE_INT, 3, NULL);
+ "wmvversion", G_TYPE_INT, 3, NULL);
if (codec_name)
- *codec_name = g_strdup ("Windows Media Video 9");
+ *codec_name = g_strdup ("Windows Media Video 9");
break;
default:
GST_WARNING ("Unkown video fourcc " GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (codec_fcc));
+ GST_FOURCC_ARGS (codec_fcc));
return NULL;
}
@@ -213,17 +213,17 @@ gst_riff_create_video_caps (guint32 codec_fcc,
gst_caps_set_simple (caps, "framerate", G_TYPE_DOUBLE, fps, NULL);
} else {
gst_caps_set_simple (caps,
- "framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE, NULL);
+ "framerate", GST_TYPE_DOUBLE_RANGE, 0., G_MAXDOUBLE, NULL);
}
if (strf != NULL) {
gst_caps_set_simple (caps,
- "width", G_TYPE_INT, strf->width,
- "height", G_TYPE_INT, strf->height, NULL);
+ "width", G_TYPE_INT, strf->width,
+ "height", G_TYPE_INT, strf->height, NULL);
} else {
gst_caps_set_simple (caps,
- "width", GST_TYPE_INT_RANGE, 16, 4096,
- "height", GST_TYPE_INT_RANGE, 16, 4096, NULL);
+ "width", GST_TYPE_INT_RANGE, 16, 4096,
+ "height", GST_TYPE_INT_RANGE, 16, 4096, NULL);
}
return caps;
@@ -236,75 +236,75 @@ gst_riff_create_audio_caps (guint16 codec_id,
GstCaps *caps = NULL;
switch (codec_id) {
- case GST_RIFF_WAVE_FORMAT_MPEGL3: /* mp3 */
+ case GST_RIFF_WAVE_FORMAT_MPEGL3: /* mp3 */
caps = gst_caps_new_simple ("audio/mpeg",
- "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 3, NULL);
+ "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 3, NULL);
if (codec_name)
- *codec_name = g_strdup ("MPEG 1 layer 3");
+ *codec_name = g_strdup ("MPEG 1 layer 3");
break;
- case GST_RIFF_WAVE_FORMAT_MPEGL12: /* mp1 or mp2 */
+ case GST_RIFF_WAVE_FORMAT_MPEGL12: /* mp1 or mp2 */
caps = gst_caps_new_simple ("audio/mpeg",
- "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 2, NULL);
+ "mpegversion", G_TYPE_INT, 1, "layer", G_TYPE_INT, 2, NULL);
if (codec_name)
- *codec_name = g_strdup ("MPEG 1 layer 2");
+ *codec_name = g_strdup ("MPEG 1 layer 2");
break;
- case GST_RIFF_WAVE_FORMAT_PCM: /* PCM/wav */
+ case GST_RIFF_WAVE_FORMAT_PCM: /* PCM/wav */
if (strf != NULL) {
- gint ba = GUINT16_FROM_LE (strf->blockalign);
- gint ch = GUINT16_FROM_LE (strf->channels);
- gint ws = GUINT16_FROM_LE (strf->size);
-
- caps = gst_caps_new_simple ("audio/x-raw-int",
- "endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
- "width", G_TYPE_INT, (int) (ba * 8 / ch),
- "depth", G_TYPE_INT, ws, "signed", G_TYPE_BOOLEAN, ws != 8, NULL);
+ gint ba = GUINT16_FROM_LE (strf->blockalign);
+ gint ch = GUINT16_FROM_LE (strf->channels);
+ gint ws = GUINT16_FROM_LE (strf->size);
+
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "endianness", G_TYPE_INT, G_LITTLE_ENDIAN,
+ "width", G_TYPE_INT, (int) (ba * 8 / ch),
+ "depth", G_TYPE_INT, ws, "signed", G_TYPE_BOOLEAN, ws != 8, NULL);
} else {
- caps = gst_caps_from_string ("audio/x-raw-int, "
- "endianness = (int) LITTLE_ENDIAN, "
- "signed = (boolean) { true, false }, "
- "width = (int) { 8, 16 }, " "height = (int) { 8, 16 }");
+ caps = gst_caps_from_string ("audio/x-raw-int, "
+ "endianness = (int) LITTLE_ENDIAN, "
+ "signed = (boolean) { true, false }, "
+ "width = (int) { 8, 16 }, " "height = (int) { 8, 16 }");
}
if (codec_name)
- *codec_name = g_strdup ("PCM WAV");
+ *codec_name = g_strdup ("PCM WAV");
break;
case GST_RIFF_WAVE_FORMAT_MULAW:
if (strf != NULL && strf->size != 8) {
- GST_WARNING ("invalid depth (%d) of mulaw audio, overwriting.",
- strf->size);
+ GST_WARNING ("invalid depth (%d) of mulaw audio, overwriting.",
+ strf->size);
}
caps = gst_caps_new_simple ("audio/x-mulaw", NULL);
if (codec_name)
- *codec_name = g_strdup ("Mulaw");
+ *codec_name = g_strdup ("Mulaw");
break;
case GST_RIFF_WAVE_FORMAT_ALAW:
if (strf != NULL && strf->size != 8) {
- GST_WARNING ("invalid depth (%d) of alaw audio, overwriting.",
- strf->size);
+ GST_WARNING ("invalid depth (%d) of alaw audio, overwriting.",
+ strf->size);
}
caps = gst_caps_new_simple ("audio/x-alaw", NULL);
if (codec_name)
- *codec_name = g_strdup ("Alaw");
+ *codec_name = g_strdup ("Alaw");
break;
- case GST_RIFF_WAVE_FORMAT_VORBIS1: /* ogg/vorbis mode 1 */
- case GST_RIFF_WAVE_FORMAT_VORBIS2: /* ogg/vorbis mode 2 */
- case GST_RIFF_WAVE_FORMAT_VORBIS3: /* ogg/vorbis mode 3 */
- case GST_RIFF_WAVE_FORMAT_VORBIS1PLUS: /* ogg/vorbis mode 1+ */
- case GST_RIFF_WAVE_FORMAT_VORBIS2PLUS: /* ogg/vorbis mode 2+ */
- case GST_RIFF_WAVE_FORMAT_VORBIS3PLUS: /* ogg/vorbis mode 3+ */
+ case GST_RIFF_WAVE_FORMAT_VORBIS1: /* ogg/vorbis mode 1 */
+ case GST_RIFF_WAVE_FORMAT_VORBIS2: /* ogg/vorbis mode 2 */
+ case GST_RIFF_WAVE_FORMAT_VORBIS3: /* ogg/vorbis mode 3 */
+ case GST_RIFF_WAVE_FORMAT_VORBIS1PLUS: /* ogg/vorbis mode 1+ */
+ case GST_RIFF_WAVE_FORMAT_VORBIS2PLUS: /* ogg/vorbis mode 2+ */
+ case GST_RIFF_WAVE_FORMAT_VORBIS3PLUS: /* ogg/vorbis mode 3+ */
caps = gst_caps_new_simple ("audio/x-vorbis", NULL);
if (codec_name)
- *codec_name = g_strdup ("Vorbis");
+ *codec_name = g_strdup ("Vorbis");
break;
case GST_RIFF_WAVE_FORMAT_A52:
caps = gst_caps_new_simple ("audio/x-ac3", NULL);
if (codec_name)
- *codec_name = g_strdup ("AC3");
+ *codec_name = g_strdup ("AC3");
break;
default:
@@ -314,12 +314,12 @@ gst_riff_create_audio_caps (guint16 codec_id,
if (strf != NULL) {
gst_caps_set_simple (caps,
- "rate", G_TYPE_INT, strf->rate,
- "channels", G_TYPE_INT, strf->channels, NULL);
+ "rate", G_TYPE_INT, strf->rate,
+ "channels", G_TYPE_INT, strf->channels, NULL);
} else {
gst_caps_set_simple (caps,
- "rate", GST_TYPE_INT_RANGE, 8000, 96000,
- "channels", GST_TYPE_INT_RANGE, 1, 2, NULL);
+ "rate", GST_TYPE_INT_RANGE, 8000, 96000,
+ "channels", GST_TYPE_INT_RANGE, 1, 2, NULL);
}
return caps;
@@ -336,13 +336,13 @@ gst_riff_create_iavs_caps (guint32 codec_fcc,
case GST_MAKE_FOURCC ('D', 'V', 'S', 'D'):
case GST_MAKE_FOURCC ('d', 'v', 's', 'd'):
caps = gst_caps_new_simple ("video/x-dv",
- "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
+ "systemstream", G_TYPE_BOOLEAN, TRUE, NULL);
if (codec_name)
- *codec_name = g_strdup ("Generic DV");
+ *codec_name = g_strdup ("Generic DV");
default:
GST_WARNING ("Unkown IAVS fourcc " GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (codec_fcc));
+ GST_FOURCC_ARGS (codec_fcc));
return NULL;
}
diff --git a/gst-libs/gst/riff/riff-read.c b/gst-libs/gst/riff/riff-read.c
index c8c5b634..0eed6242 100644
--- a/gst-libs/gst/riff/riff-read.c
+++ b/gst-libs/gst/riff/riff-read.c
@@ -61,8 +61,8 @@ gst_riff_read_get_type (void)
};
gst_riff_read_type =
- g_type_register_static (GST_TYPE_ELEMENT, "GstRiffRead",
- &gst_riff_read_info, 0);
+ g_type_register_static (GST_TYPE_ELEMENT, "GstRiffRead",
+ &gst_riff_read_info, 0);
}
return gst_riff_read_type;
@@ -94,16 +94,16 @@ gst_riff_read_change_state (GstElement * element)
switch (GST_STATE_TRANSITION (element)) {
case GST_STATE_READY_TO_PAUSED:
if (!riff->sinkpad)
- return GST_STATE_FAILURE;
+ return GST_STATE_FAILURE;
riff->bs = gst_bytestream_new (riff->sinkpad);
break;
case GST_STATE_PAUSED_TO_READY:
gst_bytestream_destroy (riff->bs);
while (riff->level) {
- GstRiffLevel *level = riff->level->data;
+ GstRiffLevel *level = riff->level->data;
- riff->level = g_list_remove (riff->level, level);
- g_free (level);
+ riff->level = g_list_remove (riff->level, level);
+ g_free (level);
}
break;
default:
@@ -165,7 +165,7 @@ gst_riff_peek_head (GstRiffRead * riff,
if (GST_IS_EVENT (event)) {
gst_pad_event_default (riff->sinkpad, event);
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS)
- return FALSE;
+ return FALSE;
} else {
GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));
return FALSE;
@@ -257,7 +257,7 @@ gst_riff_read_seek (GstRiffRead * riff, guint64 offset)
} else if (GST_EVENT_TYPE (event) != GST_EVENT_DISCONTINUOUS) {
gst_pad_event_default (riff->sinkpad, event);
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS)
- return NULL;
+ return NULL;
event = NULL;
}
}
@@ -341,7 +341,7 @@ gst_riff_read_skip (GstRiffRead * riff)
/* no */
if (!(event = gst_riff_read_seek (riff,
- gst_bytestream_tell (riff->bs) + length)))
+ gst_bytestream_tell (riff->bs) + length)))
return FALSE;
gst_event_unref (event);
@@ -407,7 +407,7 @@ gst_riff_read_strh (GstRiffRead * riff, gst_riff_strh ** header)
}
if (GST_BUFFER_SIZE (buf) < sizeof (gst_riff_strh)) {
g_warning ("Too small strh (%d available, %d needed)",
- GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_strh));
+ GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_strh));
gst_buffer_unref (buf);
return FALSE;
}
@@ -474,7 +474,7 @@ gst_riff_read_strf_vids (GstRiffRead * riff, gst_riff_strf_vids ** header)
}
if (GST_BUFFER_SIZE (buf) < sizeof (gst_riff_strf_vids)) {
g_warning ("Too small strf_vids (%d available, %d needed)",
- GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_strf_vids));
+ GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_strf_vids));
gst_buffer_unref (buf);
return FALSE;
}
@@ -498,7 +498,7 @@ gst_riff_read_strf_vids (GstRiffRead * riff, gst_riff_strf_vids ** header)
/* size checking */
if (strf->size > GST_BUFFER_SIZE (buf)) {
g_warning ("strf_vids header gave %d bytes data, only %d available",
- strf->size, GST_BUFFER_SIZE (buf));
+ strf->size, GST_BUFFER_SIZE (buf));
strf->size = GST_BUFFER_SIZE (buf);
}
@@ -541,7 +541,7 @@ gst_riff_read_strf_auds (GstRiffRead * riff, gst_riff_strf_auds ** header)
}
if (GST_BUFFER_SIZE (buf) < sizeof (gst_riff_strf_auds)) {
g_warning ("Too small strf_auds (%d available, %d needed)",
- GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_strf_auds));
+ GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_strf_auds));
gst_buffer_unref (buf);
return FALSE;
}
@@ -564,7 +564,7 @@ gst_riff_read_strf_auds (GstRiffRead * riff, gst_riff_strf_auds ** header)
GST_INFO (" rate %d", strf->rate);
GST_INFO (" av_bps %d", strf->av_bps);
GST_INFO (" blockalign %d", strf->blockalign);
- GST_INFO (" size %d", strf->size); /* wordsize, not extrasize! */
+ GST_INFO (" size %d", strf->size); /* wordsize, not extrasize! */
gst_buffer_unref (buf);
@@ -590,7 +590,7 @@ gst_riff_read_strf_iavs (GstRiffRead * riff, gst_riff_strf_iavs ** header)
}
if (GST_BUFFER_SIZE (buf) < sizeof (gst_riff_strf_iavs)) {
g_warning ("Too small strf_iavs (%d available, %d needed)",
- GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_strf_iavs));
+ GST_BUFFER_SIZE (buf), (int) sizeof (gst_riff_strf_iavs));
gst_buffer_unref (buf);
return FALSE;
}
@@ -694,102 +694,103 @@ gst_riff_read_info (GstRiffRead * riff)
/* find out the type of metadata */
switch (tag) {
case GST_RIFF_INFO_IARL:
- type = GST_TAG_LOCATION;
- break;
+ type = GST_TAG_LOCATION;
+ break;
case GST_RIFF_INFO_IART:
- type = GST_TAG_ARTIST;
- break;
+ type = GST_TAG_ARTIST;
+ break;
case GST_RIFF_INFO_ICMS:
- type = NULL; /*"Commissioner"; */
- break;
+ type = NULL; /*"Commissioner"; */
+ break;
case GST_RIFF_INFO_ICMT:
- type = GST_TAG_COMMENT;
- break;
+ type = GST_TAG_COMMENT;
+ break;
case GST_RIFF_INFO_ICOP:
- type = GST_TAG_COPYRIGHT;
- break;
+ type = GST_TAG_COPYRIGHT;
+ break;
case GST_RIFF_INFO_ICRD:
- type = GST_TAG_DATE;
- break;
+ type = GST_TAG_DATE;
+ break;
case GST_RIFF_INFO_ICRP:
- type = NULL; /*"Cropped"; */
- break;
+ type = NULL; /*"Cropped"; */
+ break;
case GST_RIFF_INFO_IDIM:
- type = NULL; /*"Dimensions"; */
- break;
+ type = NULL; /*"Dimensions"; */
+ break;
case GST_RIFF_INFO_IDPI:
- type = NULL; /*"Dots per Inch"; */
- break;
+ type = NULL; /*"Dots per Inch"; */
+ break;
case GST_RIFF_INFO_IENG:
- type = NULL; /*"Engineer"; */
- break;
+ type = NULL; /*"Engineer"; */
+ break;
case GST_RIFF_INFO_IGNR:
- type = GST_TAG_GENRE;
- break;
+ type = GST_TAG_GENRE;
+ break;
case GST_RIFF_INFO_IKEY:
- type = NULL; /*"Keywords"; */ ;
- break;
+ type = NULL; /*"Keywords"; */ ;
+ break;
case GST_RIFF_INFO_ILGT:
- type = NULL; /*"Lightness"; */
- break;
+ type = NULL; /*"Lightness"; */
+ break;
case GST_RIFF_INFO_IMED:
- type = NULL; /*"Medium"; */
- break;
+ type = NULL; /*"Medium"; */
+ break;
case GST_RIFF_INFO_INAM:
- type = GST_TAG_TITLE;
- break;
+ type = GST_TAG_TITLE;
+ break;
case GST_RIFF_INFO_IPLT:
- type = NULL; /*"Palette"; */
- break;
+ type = NULL; /*"Palette"; */
+ break;
case GST_RIFF_INFO_IPRD:
- type = NULL; /*"Product"; */
- break;
+ type = NULL; /*"Product"; */
+ break;
case GST_RIFF_INFO_ISBJ:
- type = NULL; /*"Subject"; */
- break;
+ type = NULL; /*"Subject"; */
+ break;
case GST_RIFF_INFO_ISFT:
- type = GST_TAG_ENCODER;
- break;
+ type = GST_TAG_ENCODER;
+ break;
case GST_RIFF_INFO_ISHP:
- type = NULL; /*"Sharpness"; */
- break;
+ type = NULL; /*"Sharpness"; */
+ break;
case GST_RIFF_INFO_ISRC:
- type = GST_TAG_ISRC;
- break;
+ type = GST_TAG_ISRC;
+ break;
case GST_RIFF_INFO_ISRF:
- type = NULL; /*"Source Form"; */
- break;
+ type = NULL; /*"Source Form"; */
+ break;
case GST_RIFF_INFO_ITCH:
- type = NULL; /*"Technician"; */
- break;
+ type = NULL; /*"Technician"; */
+ break;
default:
- type = NULL;
- GST_WARNING ("Unknown INFO (metadata) tag entry " GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (tag));
- break;
+ type = NULL;
+ GST_WARNING ("Unknown INFO (metadata) tag entry " GST_FOURCC_FORMAT,
+ GST_FOURCC_ARGS (tag));
+ break;
}
if (type) {
name = NULL;
if (!gst_riff_read_ascii (riff, &tag, &name)) {
- return FALSE;
+ return FALSE;
}
if (name && name[0] != '\0') {
- GValue src = { 0 }
- , dest = {
- 0};
- GType dest_type = gst_tag_get_type (type);
-
- have_tags = TRUE;
- g_value_init (&src, G_TYPE_STRING);
- g_value_set_string (&src, name);
- g_value_init (&dest, dest_type);
- g_value_transform (&src, &dest);
- g_value_unset (&src);
- gst_tag_list_add_values (taglist, GST_TAG_MERGE_APPEND,
- type, &dest, NULL);
- g_value_unset (&dest);
+ GValue src = { 0 }
+ , dest =
+ {
+ 0};
+ GType dest_type = gst_tag_get_type (type);
+
+ have_tags = TRUE;
+ g_value_init (&src, G_TYPE_STRING);
+ g_value_set_string (&src, name);
+ g_value_init (&dest, dest_type);
+ g_value_transform (&src, &dest);
+ g_value_unset (&src);
+ gst_tag_list_add_values (taglist, GST_TAG_MERGE_APPEND,
+ type, &dest, NULL);
+ g_value_unset (&dest);
}
g_free (name);
} else {
@@ -804,10 +805,10 @@ gst_riff_read_info (GstRiffRead * riff)
/* let the world know about this wonderful thing */
for (padlist = gst_element_get_pad_list (element);
- padlist != NULL; padlist = padlist->next) {
+ padlist != NULL; padlist = padlist->next) {
if (GST_PAD_IS_SRC (padlist->data) && GST_PAD_IS_USABLE (padlist->data)) {
- gst_event_ref (event);
- gst_pad_push (GST_PAD (padlist->data), GST_DATA (event));
+ gst_event_ref (event);
+ gst_pad_push (GST_PAD (padlist->data), GST_DATA (event));
}
}
gst_event_unref (event);
diff --git a/gst-libs/gst/tuner/tuner.c b/gst-libs/gst/tuner/tuner.c
index fd1c354f..5bfe1ae7 100644
--- a/gst-libs/gst/tuner/tuner.c
+++ b/gst-libs/gst/tuner/tuner.c
@@ -60,9 +60,9 @@ gst_tuner_get_type (void)
};
gst_tuner_type = g_type_register_static (G_TYPE_INTERFACE,
- "GstTuner", &gst_tuner_info, 0);
+ "GstTuner", &gst_tuner_info, 0);
g_type_interface_add_prerequisite (gst_tuner_type,
- GST_TYPE_IMPLEMENTS_INTERFACE);
+ GST_TYPE_IMPLEMENTS_INTERFACE);
}
return gst_tuner_type;
@@ -75,32 +75,32 @@ gst_tuner_class_init (GstTunerClass * klass)
if (!initialized) {
gst_tuner_signals[NORM_CHANGED] =
- g_signal_new ("norm-changed",
- GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstTunerClass, norm_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_TUNER_NORM);
+ g_signal_new ("norm-changed",
+ GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstTunerClass, norm_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_TUNER_NORM);
gst_tuner_signals[CHANNEL_CHANGED] =
- g_signal_new ("channel-changed",
- GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstTunerClass, channel_changed),
- NULL, NULL,
- g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
- GST_TYPE_TUNER_CHANNEL);
+ g_signal_new ("channel-changed",
+ GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstTunerClass, channel_changed),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
+ GST_TYPE_TUNER_CHANNEL);
gst_tuner_signals[FREQUENCY_CHANGED] =
- g_signal_new ("frequency-changed",
- GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstTunerClass, frequency_changed),
- NULL, NULL,
- gst_tuner_marshal_VOID__OBJECT_ULONG, G_TYPE_NONE, 2,
- GST_TYPE_TUNER_CHANNEL, G_TYPE_ULONG);
+ g_signal_new ("frequency-changed",
+ GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstTunerClass, frequency_changed),
+ NULL, NULL,
+ gst_tuner_marshal_VOID__OBJECT_ULONG, G_TYPE_NONE, 2,
+ GST_TYPE_TUNER_CHANNEL, G_TYPE_ULONG);
gst_tuner_signals[SIGNAL_CHANGED] =
- g_signal_new ("signal-changed",
- GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstTunerClass, signal_changed),
- NULL, NULL,
- gst_tuner_marshal_VOID__OBJECT_INT, G_TYPE_NONE, 2,
- GST_TYPE_TUNER_CHANNEL, G_TYPE_INT);
+ g_signal_new ("signal-changed",
+ GST_TYPE_TUNER, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstTunerClass, signal_changed),
+ NULL, NULL,
+ gst_tuner_marshal_VOID__OBJECT_INT, G_TYPE_NONE, 2,
+ GST_TYPE_TUNER_CHANNEL, G_TYPE_INT);
initialized = TRUE;
}
@@ -262,7 +262,7 @@ gst_tuner_set_frequency (GstTuner * tuner,
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
g_return_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel,
- GST_TUNER_CHANNEL_FREQUENCY));
+ GST_TUNER_CHANNEL_FREQUENCY));
if (klass->set_frequency) {
klass->set_frequency (tuner, channel, frequency);
@@ -286,7 +286,7 @@ gst_tuner_get_frequency (GstTuner * tuner, GstTunerChannel * channel)
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
g_return_val_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel,
- GST_TUNER_CHANNEL_FREQUENCY), 0);
+ GST_TUNER_CHANNEL_FREQUENCY), 0);
if (klass->get_frequency) {
return klass->get_frequency (tuner, channel);
@@ -315,7 +315,7 @@ gst_tuner_signal_strength (GstTuner * tuner, GstTunerChannel * channel)
GstTunerClass *klass = GST_TUNER_GET_CLASS (tuner);
g_return_val_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel,
- GST_TUNER_CHANNEL_FREQUENCY), 0);
+ GST_TUNER_CHANNEL_FREQUENCY), 0);
if (klass->signal_strength) {
return klass->signal_strength (tuner, channel);
diff --git a/gst-libs/gst/tuner/tunerchannel.c b/gst-libs/gst/tuner/tunerchannel.c
index af93f568..de0be2e4 100644
--- a/gst-libs/gst/tuner/tunerchannel.c
+++ b/gst-libs/gst/tuner/tunerchannel.c
@@ -60,8 +60,8 @@ gst_tuner_channel_get_type (void)
};
gst_tuner_channel_type =
- g_type_register_static (G_TYPE_OBJECT,
- "GstTunerChannel", &tuner_channel_info, 0);
+ g_type_register_static (G_TYPE_OBJECT,
+ "GstTunerChannel", &tuner_channel_info, 0);
}
return gst_tuner_channel_type;
@@ -78,13 +78,13 @@ gst_tuner_channel_class_init (GstTunerChannelClass * klass)
g_signal_new ("frequency-changed", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstTunerChannelClass,
- frequency_changed),
+ frequency_changed),
NULL, NULL, g_cclosure_marshal_VOID__ULONG, G_TYPE_NONE, 1, G_TYPE_ULONG);
signals[SIGNAL_SIGNAL_CHANGED] =
g_signal_new ("signal-changed", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstTunerChannelClass,
- signal_changed),
+ signal_changed),
NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
object_klass->dispose = gst_tuner_channel_dispose;
diff --git a/gst-libs/gst/tuner/tunernorm.c b/gst-libs/gst/tuner/tunernorm.c
index 41927d2b..8fb98db7 100644
--- a/gst-libs/gst/tuner/tunernorm.c
+++ b/gst-libs/gst/tuner/tunernorm.c
@@ -59,8 +59,8 @@ gst_tuner_norm_get_type (void)
};
gst_tuner_norm_type =
- g_type_register_static (G_TYPE_OBJECT,
- "GstTunerNorm", &tuner_norm_info, 0);
+ g_type_register_static (G_TYPE_OBJECT,
+ "GstTunerNorm", &tuner_norm_info, 0);
}
return gst_tuner_norm_type;
diff --git a/gst-libs/gst/video/gstvideosink.c b/gst-libs/gst/video/gstvideosink.c
index 2acf7e57..45ed3726 100644
--- a/gst-libs/gst/video/gstvideosink.c
+++ b/gst-libs/gst/video/gstvideosink.c
@@ -83,7 +83,7 @@ gst_videosink_get_type (void)
};
videosink_type = g_type_register_static (GST_TYPE_ELEMENT,
- "GstVideoSink", &videosink_info, 0);
+ "GstVideoSink", &videosink_info, 0);
}
return videosink_type;
diff --git a/gst-libs/gst/video/video.c b/gst-libs/gst/video/video.c
index 8fed1e76..6e942112 100644
--- a/gst-libs/gst/video/video.c
+++ b/gst-libs/gst/video/video.c
@@ -37,14 +37,14 @@ gst_video_frame_rate (GstPad * pad)
caps = GST_PAD_CAPS (pad);
if (caps == NULL) {
g_warning ("gstvideo: failed to get caps of pad %s:%s",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return 0.;
}
structure = gst_caps_get_structure (caps, 0);
if (!gst_structure_get_double (structure, "framerate", &fps)) {
g_warning ("gstvideo: failed to get framerate property of pad %s:%s",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return 0.;
}
@@ -69,7 +69,7 @@ gst_video_get_size (GstPad * pad, gint * width, gint * height)
if (caps == NULL) {
g_warning ("gstvideo: failed to get caps of pad %s:%s",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return FALSE;
}
@@ -79,7 +79,7 @@ gst_video_get_size (GstPad * pad, gint * width, gint * height)
if (!ret) {
g_warning ("gstvideo: failed to get size properties on pad %s:%s",
- GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
+ GST_ELEMENT_NAME (gst_pad_get_parent (pad)), GST_PAD_NAME (pad));
return FALSE;
}
diff --git a/gst-libs/gst/xoverlay/xoverlay.c b/gst-libs/gst/xoverlay/xoverlay.c
index c1014eb1..f4d1e1cf 100644
--- a/gst-libs/gst/xoverlay/xoverlay.c
+++ b/gst-libs/gst/xoverlay/xoverlay.c
@@ -55,9 +55,9 @@ gst_x_overlay_get_type (void)
};
gst_x_overlay_type = g_type_register_static (G_TYPE_INTERFACE,
- "GstXOverlay", &gst_x_overlay_info, 0);
+ "GstXOverlay", &gst_x_overlay_info, 0);
g_type_interface_add_prerequisite (gst_x_overlay_type,
- GST_TYPE_IMPLEMENTS_INTERFACE);
+ GST_TYPE_IMPLEMENTS_INTERFACE);
}
return gst_x_overlay_type;
@@ -76,16 +76,16 @@ gst_x_overlay_base_init (gpointer g_class)
if (!initialized) {
gst_x_overlay_signals[HAVE_XWINDOW_ID] =
- g_signal_new ("have-xwindow-id",
- GST_TYPE_X_OVERLAY, G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstXOverlayClass, have_xwindow_id),
- NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
+ g_signal_new ("have-xwindow-id",
+ GST_TYPE_X_OVERLAY, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstXOverlayClass, have_xwindow_id),
+ NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
gst_x_overlay_signals[DESIRED_SIZE] =
- g_signal_new ("desired-size-changed",
- GST_TYPE_X_OVERLAY, G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GstXOverlayClass, desired_size),
- NULL, NULL,
- gst_marshal_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
+ g_signal_new ("desired-size-changed",
+ GST_TYPE_X_OVERLAY, G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (GstXOverlayClass, desired_size),
+ NULL, NULL,
+ gst_marshal_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);
initialized = TRUE;
}
@@ -155,7 +155,7 @@ gst_x_overlay_get_desired_size (GstXOverlay * overlay, guint * width,
/* this ensures that elements don't need to check width and height for NULL
but apps may use NULL */
klass->get_desired_size (overlay, width ? width : &width_tmp,
- height ? height : &height_tmp);
+ height ? height : &height_tmp);
} else {
if (width)
*width = 0;
diff --git a/gst-libs/gst/xwindowlistener/xwindowlistener.c b/gst-libs/gst/xwindowlistener/xwindowlistener.c
index dc289854..63cfdd2d 100644
--- a/gst-libs/gst/xwindowlistener/xwindowlistener.c
+++ b/gst-libs/gst/xwindowlistener/xwindowlistener.c
@@ -57,8 +57,8 @@ gst_x_window_listener_get_type (void)
};
x_window_listener_type =
- g_type_register_static (G_TYPE_OBJECT,
- "GstXWindowListener", &x_window_listener_info, 0);
+ g_type_register_static (G_TYPE_OBJECT,
+ "GstXWindowListener", &x_window_listener_info, 0);
}
return x_window_listener_type;
@@ -183,7 +183,7 @@ gst_xwin_refresh (gpointer data)
if (!xwin->ov_move && xwin->ov_map &&
xwin->ov_visibility == VisibilityUnobscured) {
g_mutex_unlock (xwin->main_lock);
- return FALSE; /* skip */
+ return FALSE; /* skip */
}
if (xwin->ov_map && xwin->ov_visibility != VisibilityFullyObscured) {
@@ -307,17 +307,17 @@ gst_xwin_window (GstXWindowListener * xwin)
if (xwin->ov_conf) {
xwin->set_window_func (xwin->private_data,
- xwin->x, xwin->y, xwin->w, xwin->h, xwin->clips, xwin->num_clips);
+ xwin->x, xwin->y, xwin->w, xwin->h, xwin->clips, xwin->num_clips);
if (!xwin->ov_visible)
- gst_xwin_set_overlay (xwin, TRUE);
+ gst_xwin_set_overlay (xwin, TRUE);
g_mutex_lock (xwin->main_lock);
if (xwin->ov_refresh_id)
- g_source_remove (xwin->ov_refresh_id);
+ g_source_remove (xwin->ov_refresh_id);
xwin->ov_refresh_id =
- g_timeout_add (200, (GSourceFunc) gst_xwin_refresh, (gpointer) xwin);
+ g_timeout_add (200, (GSourceFunc) gst_xwin_refresh, (gpointer) xwin);
xwin->ov_conf = FALSE;
@@ -331,9 +331,9 @@ gst_xwin_window (GstXWindowListener * xwin)
g_mutex_lock (xwin->main_lock);
if (xwin->ov_refresh_id)
- g_source_remove (xwin->ov_refresh_id);
+ g_source_remove (xwin->ov_refresh_id);
xwin->ov_refresh_id =
- g_timeout_add (200, (GSourceFunc) gst_xwin_refresh, (gpointer) xwin);
+ g_timeout_add (200, (GSourceFunc) gst_xwin_refresh, (gpointer) xwin);
xwin->ov_conf = FALSE;
@@ -355,7 +355,7 @@ gst_xwin_configure (GstXWindowListener * xwin)
* in the main thread instead of here. */
if (!xwin->ov_conf_id)
xwin->ov_conf_id =
- g_idle_add ((GSourceFunc) gst_rec_xoverlay_window, (gpointer) xwin);
+ g_idle_add ((GSourceFunc) gst_rec_xoverlay_window, (gpointer) xwin);
#endif
gst_xwin_window ((gpointer) xwin);
@@ -473,89 +473,89 @@ gst_xwin_thread (gpointer data)
break;
if ((event.type == ConfigureNotify &&
- event.xconfigure.window == xwin->xwindow_id) ||
- (event.type == MapNotify &&
- event.xmap.window == xwin->xwindow_id) ||
- (event.type == UnmapNotify &&
- event.xunmap.window == xwin->xwindow_id)) {
+ event.xconfigure.window == xwin->xwindow_id) ||
+ (event.type == MapNotify &&
+ event.xmap.window == xwin->xwindow_id) ||
+ (event.type == UnmapNotify &&
+ event.xunmap.window == xwin->xwindow_id)) {
/* the 'parent' window, i.e. the widget provided by client */
switch (event.type) {
- case MapNotify:
- xwin->ov_map = TRUE;
- xwin->ov_conf = TRUE;
- gst_xwin_configure (xwin);
- break;
-
- case UnmapNotify:
- xwin->ov_map = FALSE;
- xwin->ov_conf = TRUE;
- gst_xwin_configure (xwin);
- break;
-
- case ConfigureNotify:
- gst_xwin_resize (xwin);
- break;
-
- default:
- /* nothing */
- break;
+ case MapNotify:
+ xwin->ov_map = TRUE;
+ xwin->ov_conf = TRUE;
+ gst_xwin_configure (xwin);
+ break;
+
+ case UnmapNotify:
+ xwin->ov_map = FALSE;
+ xwin->ov_conf = TRUE;
+ gst_xwin_configure (xwin);
+ break;
+
+ case ConfigureNotify:
+ gst_xwin_resize (xwin);
+ break;
+
+ default:
+ /* nothing */
+ break;
}
} else if (event.xany.window == xwin->child) {
/* our own private window */
switch (event.type) {
- case Expose:
- if (!event.xexpose.count) {
- if (xwin->ov_refresh) {
- xwin->ov_refresh = FALSE;
- } else {
- xwin->ov_conf = TRUE;
- gst_xwin_configure (xwin);
- }
- }
- break;
-
- case VisibilityNotify:
- xwin->ov_visibility = event.xvisibility.state;
- if (xwin->ov_refresh) {
- if (event.xvisibility.state != VisibilityFullyObscured)
- xwin->ov_refresh = FALSE;
- } else {
- xwin->ov_conf = TRUE;
- gst_xwin_configure (xwin);
- }
- break;
-
- default:
- /* nothing */
- break;
+ case Expose:
+ if (!event.xexpose.count) {
+ if (xwin->ov_refresh) {
+ xwin->ov_refresh = FALSE;
+ } else {
+ xwin->ov_conf = TRUE;
+ gst_xwin_configure (xwin);
+ }
+ }
+ break;
+
+ case VisibilityNotify:
+ xwin->ov_visibility = event.xvisibility.state;
+ if (xwin->ov_refresh) {
+ if (event.xvisibility.state != VisibilityFullyObscured)
+ xwin->ov_refresh = FALSE;
+ } else {
+ xwin->ov_conf = TRUE;
+ gst_xwin_configure (xwin);
+ }
+ break;
+
+ default:
+ /* nothing */
+ break;
}
} else {
/* root window */
switch (event.type) {
- case MapNotify:
- case UnmapNotify:
- /* are we still visible? */
- if (!xwin->ov_refresh) {
- XWindowAttributes attr;
- gboolean on;
-
- XGetWindowAttributes (xwin->display, xwin->xwindow_id, &attr);
- on = (attr.map_state == IsViewable);
- xwin->ov_wmmap = on;
- xwin->ov_conf = TRUE;
- gst_xwin_configure (xwin);
- }
- break;
-
- case ConfigureNotify:
- if (!xwin->ov_refresh) {
- gst_xwin_resize (xwin);
- }
- break;
-
- default:
- /* nothing */
- break;
+ case MapNotify:
+ case UnmapNotify:
+ /* are we still visible? */
+ if (!xwin->ov_refresh) {
+ XWindowAttributes attr;
+ gboolean on;
+
+ XGetWindowAttributes (xwin->display, xwin->xwindow_id, &attr);
+ on = (attr.map_state == IsViewable);
+ xwin->ov_wmmap = on;
+ xwin->ov_conf = TRUE;
+ gst_xwin_configure (xwin);
+ }
+ break;
+
+ case ConfigureNotify:
+ if (!xwin->ov_refresh) {
+ gst_xwin_resize (xwin);
+ }
+ break;
+
+ default:
+ /* nothing */
+ break;
}
}
}