# [node 71245c945c1ab1d9a525d209a340a6e9688b42a6 part 5]
diff --git a/src/input/vcd/xine-extra.h b/src/input/vcd/xine-extra.h
--- a/src/input/vcd/xine-extra.h
+++ b/src/input/vcd/xine-extra.h
@@ -1,23 +1,23 @@
-/*
-
+/*
+
Copyright (C) 2002 Rocky Bernstein <rocky@...>
-
+
Program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
-
+
These are routines that probably should be in xine, but for whatever
- reason aren't - yet.
+ reason aren't - yet.
*/
#ifndef XINE_EXTRA_H
@@ -47,7 +47,7 @@
In short this writes a message to buffer 'buf' and to stdout.
*/
-void
+void
xine_vlog_msg(xine_t *this, int buf, const char *format, va_list args) XINE_FORMAT_PRINTF(3, 0);
/*! This routine is like xine_log, except it takes a va_list instead
@@ -61,7 +61,7 @@
/*! Call this before calling any of the xine_log_msg or xine_log_err
routines. It sets up the xine buffer that will be used in error
- logging.
+ logging.
\return true if everything went okay; false is returned if
logging was already initialized, in which case nothing is done.
@@ -71,24 +71,24 @@
/*! This routine is like xine_log without any xine-specific paramenters.
Before calling this routine you should have set up a xine log buffer via
- xine_log_init().
+ xine_log_init().
In short this writes a message to buffer 'buf' and to stdout.
- \return true if everything went okay; false is there was
- an error, such as logging wasn't initialized. On error, nothing is
+ \return true if everything went okay; false is there was
+ an error, such as logging wasn't initialized. On error, nothing is
logged.
*/
bool xine_log_msg(const char *format, ...) XINE_FORMAT_PRINTF(1, 2);
/*! This routine is like xine_log without any xine-specific paramenters.
Before calling this routine you should have set up a xine log buffer via
- xine_log_init().
+ xine_log_init().
In short this writes a message to buffer 'buf' and to stdout.
- \return true if everything went okay; false is there was
- an error, such as logging wasn't initialized. On error, nothing is
+ \return true if everything went okay; false is there was
+ an error, such as logging wasn't initialized. On error, nothing is
logged.
*/
bool xine_log_err(const char *format, ...) XINE_FORMAT_PRINTF(1, 2);
diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c
--- a/src/input/vcd/xineplug_inp_vcd.c
+++ b/src/input/vcd/xineplug_inp_vcd.c
@@ -1,23 +1,23 @@
/*
-
+
Copyright (C) 2002, 2003, 2004, 2005 Rocky Bernstein <rocky@...>
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*/
-/*
+/*
These are plugin routines called by the xine engine. See
Chapter 4. Extending xine's input
http://www.xine-project.org/hackersguide#INPUT
@@ -83,8 +83,8 @@
#define BUF_DEMUX_BLOCK 0x05000000
#endif
-/*
- Convert an autoplay enumeration into an vcdinfo itemtype enumeration.
+/*
+ Convert an autoplay enumeration into an vcdinfo itemtype enumeration.
See definitions in vcdplayer.h and vcdinfo.h to get the below correct.
*/
static const vcdinfo_item_enum_t autoplay2itemtype[]={
@@ -94,7 +94,7 @@
VCDINFO_ITEM_TYPE_LID /* VCDPLAYER_AUTOPLAY_PBC */
};
-typedef struct vcd_config_s
+typedef struct vcd_config_s
{
char *title_format; /* Format string of GUI display title */
char *comment_format; /* Format string of stream comment meta */
@@ -106,7 +106,7 @@
input_class_t input_class;
xine_t *xine;
config_values_t *config; /* Pointer to XineRC config file. */
- vcd_input_plugin_t *ip;
+ vcd_input_plugin_t *ip;
vcd_config_t v_config; /* config stuff passed to child */
xine_mrl_t **mrls; /* list of mrl entries for medium */
@@ -114,10 +114,10 @@
char *vcd_device;/* Device name to use when
none specified in MRL */
/*--------------------------------------------------------------
- Media resource locator (MRL) info.
+ Media resource locator (MRL) info.
For the below offsets, use play_item + mrl_xxx_offset to get index
- into "mrls" array
+ into "mrls" array
---------------------------------------------------------------*/
int mrl_track_offset; /* perhaps -1 for tracks staring with 1*/
int mrl_entry_offset; /* i_tracks for entries starting with 0 */
@@ -130,10 +130,10 @@
vcd_input_class_t *vcd_class;
struct vcd_input_plugin_tag {
- input_plugin_t input_plugin; /* input plugin interface as defined by
- by player. For xine it contains a
+ input_plugin_t input_plugin; /* input plugin interface as defined by
+ by player. For xine it contains a
structure of functions that need
- to be implemented.
+ to be implemented.
*/
xine_stream_t *stream;
xine_event_queue_t *event_queue;
@@ -155,7 +155,7 @@
the mouse is not in any "button"
region then this has value -1.
*/
- bool b_mouse_in; /* True if mouse is inside a "button"
+ bool b_mouse_in; /* True if mouse is inside a "button"
region; false otherwise */
vcdplayer_t player ;
@@ -168,13 +168,13 @@
static bool vcd_handle_events (void);
static void vcd_close(vcd_input_class_t *class);
#if LIBVCD_VERSION_NUM >= 23
-static void send_mouse_enter_leave_event(vcd_input_plugin_t *p_this,
+static void send_mouse_enter_leave_event(vcd_input_plugin_t *p_this,
bool b_mouse_in);
#endif
-/*
- If class->vcd_device is NULL or the empty string,
- Use libcdio to find a CD drive with a VCD in it.
+/*
+ If class->vcd_device is NULL or the empty string,
+ Use libcdio to find a CD drive with a VCD in it.
*/
static bool
vcd_get_default_device(vcd_input_class_t *class, bool log_msg_if_fail)
@@ -184,7 +184,7 @@
if (NULL == class->vcd_device || strlen(class->vcd_device)==0) {
char **cd_drives=NULL;
- cd_drives = cdio_get_devices_with_cap(NULL,
+ cd_drives = cdio_get_devices_with_cap(NULL,
(CDIO_FS_ANAL_SVCD|CDIO_FS_ANAL_CVD|CDIO_FS_ANAL_VIDEOCD|CDIO_FS_UNKNOWN),
true);
if (NULL == cd_drives || NULL == cd_drives[0]) {
@@ -201,8 +201,8 @@
}
[... 1373 lines omitted ...]
_("range that the stream playback position slider represents playing a VCD."),
- 10,
+ 10,
vcd_slider_length_cb, NULL);
#if READAHEAD_FINISHED
- my_vcd.player.readahead =
+ my_vcd.player.readahead =
config->register_bool(config, "vcd.use_readahead",
(int) false,
_("VCD read-ahead caching?"),
@@ -1846,29 +1846,29 @@
vcd_read_ahead_cb, NULL);
#endif
- my_vcd.player.autoadvance =
- config->register_bool(config,
+ my_vcd.player.autoadvance =
+ config->register_bool(config,
"media.vcd.autoadvance",
(int) true,
_("automatically advance VCD track/entry"),
_("If enabled, we should automatically advance to the next entry or track. Used only when playback control (PBC) is disabled."),
- 10,
- vcd_autoadvance_cb,
- NULL);
+ 10,
+ vcd_autoadvance_cb,
+ NULL);
- my_vcd.player.show_rejected =
- config->register_bool(config,
+ my_vcd.player.show_rejected =
+ config->register_bool(config,
"media.vcd.show_rejected",
(int) false,
_("show 'rejected' VCD LIDs"),
_("Some playback list IDs (LIDs) are marked not showable, "
"but you can see them in the MRL list if this is set. Rejected entries "
"are marked with an asterisk (*) appended to the MRL."),
- 10,
- vcd_show_rejected_cb,
- NULL);
+ 10,
+ vcd_show_rejected_cb,
+ NULL);
- my_vcd.v_config.title_format =
+ my_vcd.v_config.title_format =
strdup(config->register_string(config,
"media.vcd.title_format",
"%F - %I %N%L%S, disk %c of %C - %v %A",
@@ -1894,7 +1894,7 @@
vcd_title_format_changed_cb,
NULL));
- my_vcd.v_config.comment_format =
+ my_vcd.v_config.comment_format =
strdup(config->register_string(config,
"media.vcd.comment_format",
"%P - Track %T",
@@ -1907,8 +1907,8 @@
vcd_comment_format_changed_cb,
NULL));
- vcdplayer_debug =
- config->register_num(config,
+ vcdplayer_debug =
+ config->register_num(config,
"media.vcd.debug",
0,
_("VCD debug flag mask"),
@@ -1927,12 +1927,12 @@
"2048: Debugging from VCDINFO\n"
),
20,
- vcd_debug_cb,
- class);
+ vcd_debug_cb,
+ class);
}
-
+
gl_default_vcd_log_handler = vcd_log_set_handler (uninit_log_handler);
- gl_default_cdio_log_handler =
+ gl_default_cdio_log_handler =
cdio_log_set_handler ((cdio_log_handler_t) uninit_log_handler);
my_vcd.input_plugin.open = vcd_plugin_open;
@@ -1952,7 +1952,7 @@
my_vcd.class = class;
my_vcd.i_mouse_button = -1;
my_vcd.b_mouse_in = false;
-
+
my_vcd.player.psz_source = NULL;
my_vcd.player.b_opened = false;
@@ -1964,11 +1964,11 @@
return class;
}
-/*
+/*
Exported plugin catalog entries.
All plugins listing only the current API number break when the API
- number is increased. This is by design.
+ number is increased. This is by design.
Sometimes in the rush to get out a buggy release, the API number is
increased without communication let alone a concern for whether it
@@ -1985,13 +1985,13 @@
*/
const plugin_info_t xine_plugin_info[] EXPORTED = {
- /* type, API, "name", version, special_info, init_function */
+ /* type, API, "name", version, special_info, init_function */
{ PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, (char *) SHORT_PLUGIN_NAME,
XINE_VERSION_CODE, NULL, vcd_init },
{ PLUGIN_NONE, 0, (char *) "", 0, NULL, NULL }
};
-/*
+/*
* Local variables:
* c-file-style: "gnu"
* tab-width: 8
diff --git a/src/libreal/real_common.c b/src/libreal/real_common.c
--- a/src/libreal/real_common.c
+++ b/src/libreal/real_common.c
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2000-2007 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
@@ -132,8 +132,8 @@
#endif
- real_codecs_path =
- xine->config->register_filename (xine->config, "decoder.external.real_codecs_path",
+ real_codecs_path =
+ xine->config->register_filename (xine->config, "decoder.external.real_codecs_path",
default_real_codecs_path,
XINE_CONFIG_STRING_IS_DIRECTORY_NAME,
_("path to RealPlayer codecs"),
@@ -154,7 +154,7 @@
const char *const codec_alternate) {
char *codecpath = NULL;
void *codecmodule = NULL;
-
+
asprintf(&codecpath, "%s/%s", path, codec_name);
if ( (codecmodule = dlopen(codecpath, RTLD_NOW)) ) {
free(codecpath);
@@ -178,12 +178,12 @@
}
_x_message(stream, XINE_MSG_LIBRARY_LOAD_ERROR, codec_name, NULL);
-
+
return NULL;
}
const plugin_info_t xine_plugin_info[] EXPORTED = {
- /* type, API, "name", version, special_info, init_function */
+ /* type, API, "name", version, special_info, init_function */
{ PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "realvdec", XINE_VERSION_CODE, &dec_info_realvideo, init_realvdec },
{ PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "realadec", XINE_VERSION_CODE, &dec_info_realaudio, init_realadec },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
diff --git a/src/libreal/real_common.h b/src/libreal/real_common.h
--- a/src/libreal/real_common.h
+++ b/src/libreal/real_common.h
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2000-2007 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
@@ -26,7 +26,7 @@
#include <xine/xine_internal.h>
/*
- * some fake functions to make real codecs happy
+ * some fake functions to make real codecs happy
* These are, on current date (20070316) needed only for Alpha
* codecs.
* As they are far from being proper replacements, define them only there
diff --git a/src/libreal/xine_real_audio_decoder.c b/src/libreal/xine_real_audio_decoder.c
--- a/src/libreal/xine_real_audio_decoder.c
+++ b/src/libreal/xine_real_audio_decoder.c
@@ -1,25 +1,25 @@
-/*
+/*
* Copyright (C) 2000-2008 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
* thin layer to use real binary-only codecs in xine
*
- * code inspired by work from Florian Schneider for the MPlayer Project
+ * code inspired by work from Florian Schneider for the MPlayer Project
*/
#ifdef HAVE_CONFIG_H
@@ -92,7 +92,7 @@
uint64_t pts;
int output_open;
-
+
int decoder_ok;
} realdec_decoder_t;
@@ -130,7 +130,7 @@
if (!this->raCloseCodec || !this->raDecode || !this->raFlush || !this->raFreeDecoder ||
!this->raGetFlavorProperty || !this->raOpenCodec2 || !this->raSetFlavor ||
/*!raSetDLLAccessPath ||*/ !this->raInitDecoder){
- xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
+ xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
_("libareal: (audio) Cannot resolve symbols - incompatible dll: %s\n"), codec_name);
return 0;
}
@@ -162,7 +162,7 @@
int coded_frame_size2, data_len, flavor;
int mode;
void *extras;
-
+
/*
* extract header data
*/
@@ -173,13 +173,13 @@
#ifdef LOG
xine_hexdump (buf->content, buf->size);
#endif
-
+
flavor = _X_BE_16 (buf->content+22);
coded_frame_size = _X_BE_32 (buf->content+24);
codec_data_length= _X_BE_16 (buf->content+40);
coded_frame_size2= _X_BE_16 (buf->content+42);
subpacket_size = _X_BE_16 (buf->content+44);
-
+
this->sps = subpacket_size;
this->w = coded_frame_size2;
this->h = codec_data_length;
@@ -191,8 +191,8 @@
/* FIXME: */
if (buf->type==BUF_AUDIO_COOK) {
-
- xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
"libareal: audio header version 4 for COOK audio not supported.\n");
return 0;
}
@@ -210,7 +210,7 @@
this->block_align= coded_frame_size2;
lprintf ("0x%04x 0x%04x 0x%04x 0x%04x data_len 0x%04x\n",
- subpacket_size, coded_frame_size, codec_data_length,
+ subpacket_size, coded_frame_size, codec_data_length,
coded_frame_size2, data_len);
lprintf ("%d samples/sec, %d bits/sample, %d channels\n",
samples_per_sec, bits_per_sample, num_channels);
@@ -224,7 +224,7 @@
return 0;
this->block_align = subpacket_size;
break;
-
+
case BUF_AUDIO_ATRK:
_x_meta_info_set_utf8(this->stream, XINE_META_INFO_AUDIOCODEC, "Atrac");
if (!load_syms_linux (this, "atrc.so", "atrc.so.6.0"))
@@ -252,7 +252,7 @@
break;
default:
- xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
"libareal: error, i don't handle buf type 0x%08x\n", buf->type);
return 0;
}
@@ -267,7 +267,7 @@
return 0;
}
- {
+ {
ra_init_t init_data;
init_data.samplerate = samples_per_sec;
@@ -285,10 +285,10 @@
printf ("libareal: extras :\n");
xine_hexdump (init_data.extras, data_len);
#endif
-
+
result = this->raInitDecoder (this->context, &init_data);
if(result){
- xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
+ xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
_("libareal: decoder init failed, error code: 0x%x\n"), result);
return 0;
}
@@ -344,7 +344,7 @@
return 0;
}
- (this->stream->audio_out->open) (this->stream->audio_out,
+ (this->stream->audio_out->open) (this->stream->audio_out,
this->stream,
bits_per_sample,
samples_per_sec,
@@ -360,7 +360,7 @@
static void realdec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
realdec_decoder_t *this = (realdec_decoder_t *) this_gen;
- lprintf ("decode_data %d bytes, flags=0x%08x, pts=%"PRId64" ...\n",
+ lprintf ("decode_data %d bytes, flags=0x%08x, pts=%"PRId64" ...\n",
buf->size, buf->decoder_flags, buf->pts);
if (buf->decoder_flags & BUF_FLAG_PREVIEW) {
@@ -407,20 +407,20 @@
audio_buffer = this->stream->audio_out->get_buffer (this->stream->audio_out);
- result = this->raDecode (this->context,
+ result = this->raDecode (this->context,
this->frame_buffer + n,
this->block_align,
(char *) audio_buffer->mem, &len, -1);
lprintf ("raDecode result %d, len=%d\n", result, len);
- audio_buffer->vpts = this->pts;
+ audio_buffer->vpts = this->pts;
this->pts = 0;
audio_buffer->num_frames = len/this->sample_size;;
-
- this->stream->audio_out->put_buffer (this->stream->audio_out,
+
+ this->stream->audio_out->put_buffer (this->stream->audio_out,
audio_buffer, this->stream);
n += this->block_align;
}
@@ -433,13 +433,13 @@
static void realdec_reset (audio_decoder_t *this_gen) {
realdec_decoder_t *this = (realdec_decoder_t *) this_gen;
-
+
this->frame_num_bytes = 0;
}
static void realdec_discontinuity (audio_decoder_t *this_gen) {
realdec_decoder_t *this = (realdec_decoder_t *) this_gen;
-
+
this->pts = 0;
}
@@ -475,7 +475,7 @@
lprintf ("dispose done\n");
}
-static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen,
+static audio_decoder_t *open_plugin (audio_decoder_class_t *class_gen,
xine_stream_t *stream) {
real_class_t *cls = (real_class_t *) class_gen;
@@ -518,7 +518,7 @@
* exported plugin catalog entry
*/
-static const uint32_t audio_types[] = {
+static const uint32_t audio_types[] = {
BUF_AUDIO_COOK, BUF_AUDIO_ATRK, /* BUF_AUDIO_14_4, BUF_AUDIO_28_8, */ BUF_AUDIO_SIPRO, 0
};
diff --git a/src/libreal/xine_real_video_decoder.c b/src/libreal/xine_real_video_decoder.c
--- a/src/libreal/xine_real_video_decoder.c
+++ b/src/libreal/xine_real_video_decoder.c
@@ -1,25 +1,25 @@
/*
* Copyright (C) 2000-2008 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
* thin layer to use real binary-only codecs in xine
*
- * code inspired by work from Florian Schneider for the MPlayer Project
+ * code inspired by work from Florian Schneider for the MPlayer Project
*/
#ifdef HAVE_CONFIG_H
@@ -149,12 +149,12 @@
this->rvyuv_hive_message = dlsym (this->rv_handle, "RV20toYUV420HiveMessage");
this->rvyuv_init = dlsym (this->rv_handle, "RV20toYUV420Init");
this->rvyuv_transform = dlsym (this->rv_handle, "RV20toYUV420Transform");
-
+
if (this->rvyuv_custom_message &&
this->rvyuv_free &&
this->rvyuv_hive_message &&
this->rvyuv_init &&
- this->rvyuv_transform)
+ this->rvyuv_transform)
return 1;
this->rvyuv_custom_message = dlsym (this->rv_handle, "RV40toYUV420CustomMessage");
@@ -162,15 +162,15 @@
this->rvyuv_hive_message = dlsym (this->rv_handle, "RV40toYUV420HiveMessage");
this->rvyuv_init = dlsym (this->rv_handle, "RV40toYUV420Init");
this->rvyuv_transform = dlsym (this->rv_handle, "RV40toYUV420Transform");
-
+
if (this->rvyuv_custom_message &&
this->rvyuv_free &&
this->rvyuv_hive_message &&
this->rvyuv_init &&
- this->rvyuv_transform)
+ this->rvyuv_transform)
return 1;
- xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
+ xprintf (this->stream->xine, XINE_VERBOSITY_LOG,
_("libreal: Error resolving symbols! (version incompatibility?)\n"));
return 0;
}
@@ -198,17 +198,17 @@
return 0;
break;
default:
- xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
"libreal: error, i don't handle buf type 0x%08x\n", buf->type);
_x_abort();
}
init_data.w = _X_BE_16(&buf->content[12]);
init_data.h = _X_BE_16(&buf->content[14]);
-
+
this->width = (init_data.w + 1) & (~1);
this->height = (init_data.h + 1) & (~1);
-
+
if(buf->decoder_flags & BUF_FLAG_ASPECT)
this->ratio = (double)buf->decoder_info[1] / (double)buf->decoder_info[2];
else
@@ -216,15 +216,15 @@
/* While the framerate is stored in the header it sometimes doesn't bear
* much resemblence to the actual frequency of frames in the file. Hence
- * it's better to just let the engine estimate the frame duration for us */
+ * it's better to just let the engine estimate the frame duration for us */
#if 0
- this->fps = (double) _X_BE_16(&buf->content[22]) +
+ this->fps = (double) _X_BE_16(&buf->content[22]) +
((double) _X_BE_16(&buf->content[24]) / 65536.0);
this->duration = 90000.0 / this->fps;
#endif
-
+
lprintf("this->ratio=%f\n", this->ratio);
-
+
lprintf ("init_data.w=%d(0x%x), init_data.h=%d(0x%x),"
"this->width=%d(0x%x), this->height=%d(0x%x)\n",
init_data.w, init_data.w,
@@ -238,22 +238,22 @@
init_data.subformat = _X_BE_32(&buf->content[26]);
init_data.format = _X_BE_32(&buf->content[30]);
-
+
#ifdef LOG
printf ("libreal: init_data for rvyuv_init:\n");
xine_hexdump ((char *) &init_data, sizeof (init_data));
-
+
printf ("libreal: buf->content\n");
xine_hexdump (buf->content, buf->size);
-#endif
- lprintf ("init codec %dx%d... %x %x\n",
+#endif
+ lprintf ("init codec %dx%d... %x %x\n",
init_data.w, init_data.h,
init_data.subformat, init_data.format );
[... 29 lines omitted ...]
+
(this->stream->video_out->open) (this->stream->video_out, this->stream);
-
+
this->frame_size = this->width * this->height;
this->frame_buffer = xine_xmalloc (this->width * this->height * 3 / 2);
-
+
this->chunk_buffer = calloc(1, BUF_SIZE);
this->chunk_buffer_max = BUF_SIZE;
-
+
return 1;
}
static void realdec_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
realdec_decoder_t *this = (realdec_decoder_t *) this_gen;
- lprintf ("decode_data, flags=0x%08x, len=%d, pts=%"PRId64" ...\n",
+ lprintf ("decode_data, flags=0x%08x, len=%d, pts=%"PRId64" ...\n",
buf->decoder_flags, buf->size, buf->pts);
if (buf->decoder_flags & BUF_FLAG_PREVIEW) {
/* real_find_sequence_header (&this->real, buf->content, buf->content + buf->size);*/
return;
}
-
+
if (buf->decoder_flags & BUF_FLAG_FRAMERATE) {
this->duration = buf->decoder_info[0];
- _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
this->duration);
}
@@ -312,14 +312,14 @@
_x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0);
} else if (this->decoder_ok && this->context) {
-
+
/* Each frame starts with BUF_FLAG_FRAME_START and ends with
* BUF_FLAG_FRAME_END.
* The last buffer contains the chunk offset table.
*/
if (!(buf->decoder_flags & BUF_FLAG_SPECIAL)) {
-
+
lprintf ("buffer (%d bytes)\n", buf->size);
if (buf->decoder_flags & BUF_FLAG_FRAME_START) {
@@ -329,10 +329,10 @@
this->pts = buf->pts;
lprintf ("new frame starting, pts=%"PRId64"\n", this->pts);
}
-
+
if ((this->chunk_buffer_size + buf->size) > this->chunk_buffer_max) {
lprintf("increasing chunk buffer size\n");
-
+
this->chunk_buffer_max *= 2;
this->chunk_buffer = realloc(this->chunk_buffer, this->chunk_buffer_max);
}
@@ -345,9 +345,9 @@
} else {
/* end of frame, chunk table */
-
+
lprintf ("special buffer (%d bytes)\n", buf->size);
-
+
if (buf->decoder_info[1] == BUF_SPECIAL_RV_CHUNK_TABLE) {
int result;
@@ -383,7 +383,7 @@
xine_hexdump ((uint8_t *) &transform_in, sizeof(rv_xform_in_t));
printf ("libreal: chunk_table:\n");
- xine_hexdump ((uint8_t *) buf->decoder_info_ptr[2],
+ xine_hexdump ((uint8_t *) buf->decoder_info_ptr[2],
2*(buf->decoder_info[2]+1)*sizeof(uint32_t));
#endif
@@ -458,13 +458,13 @@
static void realdec_reset (video_decoder_t *this_gen) {
realdec_decoder_t *this = (realdec_decoder_t *) this_gen;
-
+
this->chunk_buffer_size = 0;
}
static void realdec_discontinuity (video_decoder_t *this_gen) {
realdec_decoder_t *this = (realdec_decoder_t *) this_gen;
-
+
this->pts = 0;
}
@@ -480,21 +480,21 @@
if (this->rvyuv_free && this->context)
this->rvyuv_free (this->context);
- if (this->rv_handle)
+ if (this->rv_handle)
dlclose (this->rv_handle);
if (this->frame_buffer)
free (this->frame_buffer);
-
+
if (this->chunk_buffer)
free (this->chunk_buffer);
-
+
free (this);
lprintf ("dispose done\n");
}
-static video_decoder_t *open_plugin (video_decoder_class_t *class_gen,
+static video_decoder_t *open_plugin (video_decoder_class_t *class_gen,
xine_stream_t *stream) {
real_class_t *cls = (real_class_t *) class_gen;
diff --git a/src/libw32dll/DirectShow/DS_AudioDecoder.c b/src/libw32dll/DirectShow/DS_AudioDecoder.c
--- a/src/libw32dll/DirectShow/DS_AudioDecoder.c
+++ b/src/libw32dll/DirectShow/DS_AudioDecoder.c
@@ -15,7 +15,7 @@
#include "DS_Filter.h"
struct _DS_AudioDecoder
-{
+{
WAVEFORMATEX in_fmt;
AM_MEDIA_TYPE m_sOurType, m_sDestType;
DS_Filter* m_pDS_Filter;
@@ -46,20 +46,20 @@
#endif
this = malloc(sizeof(DS_AudioDecoder));
-
+
sz = 18 + wf->cbSize;
this->m_sVhdr = malloc(sz);
memcpy(this->m_sVhdr, wf, sz);
this->m_sVhdr2 = malloc(18);
memcpy(this->m_sVhdr2, this->m_sVhdr, 18);
-
+
pWF = (WAVEFORMATEX*)this->m_sVhdr2;
pWF->wFormatTag = 1;
pWF->wBitsPerSample = 16;
pWF->nBlockAlign = pWF->nChannels * (pWF->wBitsPerSample + 7) / 8;
pWF->cbSize = 0;
pWF->nAvgBytesPerSec = pWF->nBlockAlign * pWF->nSamplesPerSec;
-
+
memcpy(&this->in_fmt,wf,sizeof(WAVEFORMATEX));
memset(&this->m_sOurType, 0, sizeof(this->m_sOurType));
@@ -105,7 +105,7 @@
free(this);
return NULL;
}
-
+
this->m_pDS_Filter->Start(this->m_pDS_Filter);
props.cBuffers=1;
@@ -141,7 +141,7 @@
{
unsigned int written = 0;
unsigned int read = 0;
-
+
if (!in_data || !out_data)
return -1;
@@ -157,7 +157,7 @@
IMediaSample* sample=0;
char* ptr;
int result;
-
+
// this->m_pOurOutput->SetFramePointer(out_data+written);
this->m_pDS_Filter->m_pOurOutput->SetFramePointer(this->m_pDS_Filter->m_pOurOutput,&frame_pointer);
this->m_pDS_Filter->m_pOurOutput->SetFrameSizePointer(this->m_pDS_Filter->m_pOurOutput,(long*)&frame_size);
@@ -198,7 +198,7 @@
double efficiency =(double) this->in_fmt.nAvgBytesPerSec
/ (this->in_fmt.nSamplesPerSec*this->in_fmt.nBlockAlign);
int frames = (int)(dest_size*efficiency);;
-
+
if (frames < 1)
frames = 1;
return frames * this->in_fmt.nBlockAlign;
diff --git a/src/libw32dll/DirectShow/DS_VideoDecoder.c b/src/libw32dll/DirectShow/DS_VideoDecoder.c
--- a/src/libw32dll/DirectShow/DS_VideoDecoder.c
+++ b/src/libw32dll/DirectShow/DS_VideoDecoder.c
@@ -18,7 +18,7 @@
struct _DS_VideoDecoder
{
IVideoDecoder iv;
-
+
DS_Filter* m_pDS_Filter;
AM_MEDIA_TYPE m_sOurType, m_sDestType;
VIDEOINFOHEADER* m_sVhdr;
@@ -59,7 +59,7 @@
int DS_VideoDecoder_GetCapabilities(DS_VideoDecoder *this)
{return this->m_Caps;}
-
+
typedef struct _ct ct;
struct _ct {
@@ -68,7 +68,7 @@
const GUID *subtype;
int cap;
};
-
+
static ct check[] = {
{16, fccYUY2, &MEDIASUBTYPE_YUY2, CAP_YUY2},
{12, fccIYUV, &MEDIASUBTYPE_IYUV, CAP_IYUV},
@@ -87,10 +87,10 @@
DS_VideoDecoder *this;
HRESULT result;
ct* c;
-
+
this = malloc(sizeof(DS_VideoDecoder));
memset( this, 0, sizeof(DS_VideoDecoder));
-
+
this->m_sVhdr2 = 0;
this->m_iLastQuality = -1;
this->m_iMaxAuto = maxauto;
@@ -104,10 +104,10 @@
/*try*/
{
unsigned int bihs;
-
+
bihs = (format->biSize < (int) sizeof(BITMAPINFOHEADER)) ?
sizeof(BITMAPINFOHEADER) : format->biSize;
-
+
this->iv.m_bh = (BITMAPINFOHEADER*)malloc(bihs);
memcpy(this->iv.m_bh, format, bihs);
this->iv.m_bh->biSize = bihs;
@@ -119,7 +119,7 @@
this->iv.m_iPlaypos = -1;
this->iv.m_fQuality = 0.0f;
this->iv.m_bCapable16b = true;
-
+
bihs += sizeof(VIDEOINFOHEADER) - sizeof(BITMAPINFOHEADER);
this->m_sVhdr = (VIDEOINFOHEADER*)malloc(bihs);
memset(this->m_sVhdr, 0, bihs);
@@ -159,7 +159,7 @@
this->m_sDestType.pUnk = 0;
this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER);
this->m_sDestType.pbFormat = (char*)this->m_sVhdr2;
-
+
memset(&this->iv.m_obh, 0, sizeof(this->iv.m_obh));
memcpy(&this->iv.m_obh, this->iv.m_bh, sizeof(this->iv.m_obh) < (unsigned) this->iv.m_bh->biSize
? sizeof(this->iv.m_obh) : (unsigned) this->iv.m_bh->biSize);
@@ -172,7 +172,7 @@
this->m_pDS_Filter = DS_FilterCreate(dllname, guid, &this->m_sOurType, &this->m_sDestType);
-
+
if (!this->m_pDS_Filter)
{
printf("Failed to create DirectShow filter\n");
@@ -216,7 +216,7 @@
break;
#endif
default:
-
+
this->m_Caps = CAP_NONE;
printf("Decoder supports the following YUV formats: ");
@@ -278,7 +278,7 @@
Debug printf("DS_VideoDecoder_StartInternal\n");
//cout << "DSSTART" << endl;
this->m_pDS_Filter->Start(this->m_pDS_Filter);
-
+
props.cBuffers = 1;
props.cbBuffer = this->m_sDestType.lSampleSize;
@@ -286,7 +286,7 @@
props.cbAlign = props.cbPrefix = 0;
this->m_pDS_Filter->m_pAll->vt->SetProperties(this->m_pDS_Filter->m_pAll, &props, &props1);
this->m_pDS_Filter->m_pAll->vt->Commit(this->m_pDS_Filter->m_pAll);
-
+
this->iv.m_State = START;
}
@@ -301,17 +301,17 @@
IMediaSample* sample = 0;
char* ptr;
int result;
-
+
Debug printf("DS_VideoDecoder_DecodeInternal(%p,%p,%d,%d,%p)\n",this,src,size,is_keyframe,pImage);
-
+
this->m_pDS_Filter->m_pAll->vt->GetBuffer(this->m_pDS_Filter->m_pAll, &sample, 0, 0, 0);
-
+
if (!sample)
{
Debug printf("ERROR: null sample\n");
return -1;
}
-
[... 36 lines omitted ...]
}
-
+
if( bits == 16 ) {
this->iv.m_obh.colors[0]=0xF800;
this->iv.m_obh.colors[1]=0x07E0;
@@ -514,7 +514,7 @@
if (ok) {
if (csp != 0 && csp != 3 && this->iv.m_obh.biHeight > 0)
- this->iv.m_obh.biHeight *= -1; // YUV formats uses should have height < 0
+ this->iv.m_obh.biHeight *= -1; // YUV formats uses should have height < 0
this->iv.m_obh.biSize = sizeof(BITMAPINFOHEADER);
this->iv.m_obh.biCompression=csp;
this->iv.m_obh.biBitCount=bits;
@@ -578,9 +578,9 @@
memcpy(&(this->m_sVhdr2->bmiHeader), &this->iv.m_decoder, sizeof(this->iv.m_decoder));
this->m_sVhdr2->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
if (this->m_sVhdr2->bmiHeader.biCompression == 3)
- this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER) + 12;
+ this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER) + 12;
else
- this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER);
+ this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER);
return -1;
}
@@ -624,7 +624,7 @@
if (stoped)
{
DS_VideoDecoder_StartInternal(this);
- this->iv.m_State = START;
+ this->iv.m_State = START;
}
return 0;
@@ -789,7 +789,7 @@
// get4=set3 73
// get5=set4 19
// get6=set5 23
- hidden = (IHidden*)((int)this->m_pDS_Filter->m_pFilter + 0xb8);
+ hidden = (IHidden*)((int)this->m_pDS_Filter->m_pFilter + 0xb8);
// printf("DS_SetValue for DIVX, name=%s value=%d\n",name,value);
if (strcmp(name, "Quality") == 0)
{
@@ -810,7 +810,7 @@
}
return 0;
}
-#if 0
+#if 0
if (strcmp((const char*)record.dll, "ir50_32.dll") == 0)
{
IHidden2* hidden = 0;
@@ -844,7 +844,7 @@
if(!recordpar[5])
{
hidden->vt->Release((IUnknown*)hidden);
- return -1;
+ return -1;
}
HRESULT result = hidden->vt->DecodeSet(hidden, recordpar);
hidden->vt->Release((IUnknown*)hidden);
@@ -865,28 +865,28 @@
int result, status, newkey, count;
if(strcmp(attribute, "Quality")==0){
char* keyname="SOFTWARE\\Microsoft\\Scrunch";
- result=RegCreateKeyExA(HKEY_CURRENT_USER, keyname, 0, 0, 0, 0, 0, &newkey, &status);
+ result=RegCreateKeyExA(HKEY_CURRENT_USER, keyname, 0, 0, 0, 0, 0, &newkey, &status);
if(result!=0)
{
printf("VideoDecoder::SetExtAttr: registry failure\n");
return -1;
- }
+ }
result=RegSetValueExA(newkey, "Current Post Process Mode", 0, REG_DWORD, &value, 4);
if(result!=0)
{
printf("VideoDecoder::SetExtAttr: error writing value\n");
return -1;
- }
+ }
value=-1;
result=RegSetValueExA(newkey, "Force Post Process Mode", 0, REG_DWORD, &value, 4);
if(result!=0)
{
printf("VideoDecoder::SetExtAttr: error writing value\n");
- return -1;
- }
- RegCloseKey(newkey);
- return 0;
- }
+ return -1;
+ }
+ RegCloseKey(newkey);
+ return 0;
+ }
if(
(strcmp(attribute, "Saturation")==0) ||
@@ -896,21 +896,21 @@
)
{
char* keyname="SOFTWARE\\Microsoft\\Scrunch\\Video";
- result=RegCreateKeyExA(HKEY_CURRENT_USER, keyname, 0, 0, 0, 0, 0, &newkey, &status);
+ result=RegCreateKeyExA(HKEY_CURRENT_USER, keyname, 0, 0, 0, 0, 0, &newkey, &status);
if(result!=0)
{
printf("VideoDecoder::SetExtAttr: registry failure\n");
return -1;
- }
+ }
result=RegSetValueExA(newkey, attribute, 0, REG_DWORD, &value, 4);
if(result!=0)
{
printf("VideoDecoder::SetExtAttr: error writing value\n");
return -1;
- }
- RegCloseKey(newkey);
- return 0;
- }
+ }
+ RegCloseKey(newkey);
+ return 0;
+ }
printf("Unknown attribute!\n");
return -200;
diff --git a/src/libw32dll/DirectShow/iunk.h b/src/libw32dll/DirectShow/iunk.h
--- a/src/libw32dll/DirectShow/iunk.h
+++ b/src/libw32dll/DirectShow/iunk.h
@@ -11,39 +11,39 @@
#define DECLARE_IUNKNOWN() \
int refcount;
-#define IMPLEMENT_IUNKNOWN(CLASSNAME) \
+#define IMPLEMENT_IUNKNOWN(CLASSNAME) \
static long STDCALL CLASSNAME ## _QueryInterface(IUnknown * This, \
const GUID* riid, void **ppvObject) \
{ \
CLASSNAME * me = (CLASSNAME *)This; \
const GUID* r; unsigned int i = 0; \
Debug printf(#CLASSNAME "_QueryInterface(%p) called\n", This);\
- if (!ppvObject) return E_POINTER; \
+ if (!ppvObject) return E_POINTER; \
for(r=me->interfaces; i<sizeof(me->interfaces)/sizeof(me->interfaces[0]); r++, i++) \
if(!memcmp(r, riid, sizeof(*r))) \
- { \
- me->vt->AddRef((IUnknown*)This); \
- *ppvObject=This; \
- return 0; \
- } \
+ { \
+ me->vt->AddRef((IUnknown*)This); \
+ *ppvObject=This; \
+ return 0; \
+ } \
Debug printf("Query failed! (GUID: 0x%x)\n", *(const unsigned int*)riid); \
return E_NOINTERFACE; \
-} \
+} \
\
static long STDCALL CLASSNAME ## _AddRef(IUnknown * This) \
{ \
CLASSNAME * me=( CLASSNAME *)This; \
Debug printf(#CLASSNAME "_AddRef(%p) called (ref:%d)\n", This, me->refcount); \
- return ++(me->refcount); \
-} \
+ return ++(me->refcount); \
+} \
\
static long STDCALL CLASSNAME ## _Release(IUnknown * This) \
-{ \
- CLASSNAME* me=( CLASSNAME *)This; \
+{ \
+ CLASSNAME* me=( CLASSNAME *)This; \
Debug printf(#CLASSNAME "_Release(%p) called (new ref:%d)\n", This, me->refcount - 1); \
if(--(me->refcount) == 0) \
- CLASSNAME ## _Destroy(me); \
- return 0; \
+ CLASSNAME ## _Destroy(me); \
+ return 0; \
}
#endif /* DS_IUNK_H */
diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am
--- a/src/libw32dll/Makefile.am
+++ b/src/libw32dll/Makefile.am
@@ -5,7 +5,7 @@
AM_CPPFLAGS = -I$(srcdir)/wine -DWIN32_PATH=\"$(w32_path)\"
AM_LDFLAGS = $(xineplug_ldflags)
-SUBDIRS =
+SUBDIRS =
if ENABLE_W32DLL
SUBDIRS += wine DirectShow dmo qtx
endif
diff --git a/src/libw32dll/common.c b/src/libw32dll/common.c
--- a/src/libw32dll/common.c
+++ b/src/libw32dll/common.c
@@ -6,7 +6,7 @@
DIR *dir;
char *path, *cfgpath;
char *listpath[] = { "",
- "/usr/lib/codecs",
+ "/usr/lib/codecs",
"/usr/local/lib/codecs",
"/usr/lib/win32",
"/usr/local/lib/win32",
@@ -35,5 +35,5 @@
i++;
}
- return NULL;
+ return NULL;
}
diff --git a/src/libw32dll/dmo/DMO_AudioDecoder.c b/src/libw32dll/dmo/DMO_AudioDecoder.c
--- a/src/libw32dll/dmo/DMO_AudioDecoder.c
+++ b/src/libw32dll/dmo/DMO_AudioDecoder.c
@@ -19,7 +19,7 @@
#include "DMO_AudioDecoder.h"
struct _DMO_AudioDecoder
-{
+{
DMO_MEDIA_TYPE m_sOurType, m_sDestType;
DMO_Filter* m_pDMO_Filter;
char* m_sVhdr;
@@ -49,17 +49,17 @@
Setup_LDT_Keeper();
Setup_FS_Segment();
#endif
-
+
this = malloc(sizeof(DMO_AudioDecoder));
-
+
this->m_iFlushed=1;
-
+
sz = 18 + wf->cbSize;
this->m_sVhdr = malloc(sz);
memcpy(this->m_sVhdr, wf, sz);
this->m_sVhdr2 = malloc(18);
memcpy(this->m_sVhdr2, this->m_sVhdr, 18);
-
+
pWF = (WAVEFORMATEX*)this->m_sVhdr2;
pWF->wFormatTag = 1;
pWF->wBitsPerSample = 16;
@@ -67,7 +67,7 @@
pWF->nBlockAlign = 2*pWF->nChannels; //pWF->nChannels * (pWF->wBitsPerSample + 7) / 8;
pWF->nAvgBytesPerSec = pWF->nBlockAlign * pWF->nSamplesPerSec;
pWF->cbSize = 0;
-
+
memset(&this->m_sOurType, 0, sizeof(this->m_sOurType));
this->m_sOurType.majortype=MEDIATYPE_Audio;
this->m_sOurType.subtype=MEDIASUBTYPE_PCM;
@@ -101,7 +101,7 @@
free(this);
return NULL;
}
-
+
return this;
}
@@ -129,7 +129,7 @@
#ifdef LDT_paranoia
Setup_FS_Segment();
#endif
-
+
//m_pDMO_Filter->m_pMedia->vt->Lock(m_pDMO_Filter->m_pMedia, 1);
bufferin = CMediaBufferCreate(in_size, (void*)in_data, in_size, 1);
r = this->m_pDMO_Filter->m_pMedia->vt->ProcessInput(this->m_pDMO_Filter->m_pMedia, 0,
@@ -157,7 +157,7 @@
((IMediaBuffer*)db.pBuffer)->vt->GetBufferAndLength((IMediaBuffer*)db.pBuffer, 0, &written);
((IMediaBuffer*)db.pBuffer)->vt->Release((IUnknown*)db.pBuffer);
-
+
//printf("RESULTB: %d 0x%x %ld\n", r, r, written);
//printf("Converted %d -> %d\n", in_size, out_size);
}
diff --git a/src/libw32dll/dmo/DMO_VideoDecoder.c b/src/libw32dll/dmo/DMO_VideoDecoder.c
--- a/src/libw32dll/dmo/DMO_VideoDecoder.c
+++ b/src/libw32dll/dmo/DMO_VideoDecoder.c
@@ -24,7 +24,7 @@
struct _DMO_VideoDecoder
{
IVideoDecoder iv;
-
+
DMO_Filter* m_pDMO_Filter;
AM_MEDIA_TYPE m_sOurType, m_sDestType;
VIDEOINFOHEADER* m_sVhdr;
@@ -72,7 +72,7 @@
const GUID* subtype;
int cap;
};
-
+
static ct check[] = {
{ fccI420, 12, &MEDIASUBTYPE_I420, CAP_I420 },
{ fccYV12, 12, &MEDIASUBTYPE_YV12, CAP_YV12 },
@@ -95,10 +95,10 @@
DMO_VideoDecoder *this;
HRESULT result;
ct* c;
-
+
this = malloc(sizeof(DMO_VideoDecoder));
memset( this, 0, sizeof(DMO_VideoDecoder));
-
+
this->m_sVhdr2 = 0;
this->m_iLastQuality = -1;
this->m_iMaxAuto = maxauto;
@@ -112,10 +112,10 @@
/*try*/
{
unsigned int bihs;
-
+
bihs = (format->biSize < (int) sizeof(BITMAPINFOHEADER)) ?
sizeof(BITMAPINFOHEADER) : format->biSize;
-
+
this->iv.m_bh = (BITMAPINFOHEADER*)malloc(bihs);
memcpy(this->iv.m_bh, format, bihs);
this->iv.m_bh->biSize = bihs;
@@ -127,7 +127,7 @@
this->iv.m_iPlaypos = -1;
this->iv.m_fQuality = 0.0f;
this->iv.m_bCapable16b = true;
-
+
bihs += sizeof(VIDEOINFOHEADER) - sizeof(BITMAPINFOHEADER);
this->m_sVhdr = (VIDEOINFOHEADER*)malloc(bihs);
memset(this->m_sVhdr, 0, bihs);
@@ -171,7 +171,7 @@
this->m_sDestType.pUnk = 0;
this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER);
this->m_sDestType.pbFormat = (char*)this->m_sVhdr2;
-
+
memset(&this->iv.m_obh, 0, sizeof(this->iv.m_obh));
memcpy(&this->iv.m_obh, this->iv.m_bh, sizeof(this->iv.m_obh) < (unsigned) this->iv.m_bh->biSize
? sizeof(this->iv.m_obh) : (unsigned) this->iv.m_bh->biSize);
@@ -184,7 +184,7 @@
this->m_pDMO_Filter = DMO_FilterCreate(dllname, guid, &this->m_sOurType, &this->m_sDestType);
-
+
if (!this->m_pDMO_Filter)
{
printf("Failed to create DMO filter\n");
@@ -229,7 +229,7 @@
break;
#endif
default:
-
+
this->m_Caps = CAP_NONE;
printf("Decoder supports the following YUV formats: ");
@@ -284,7 +284,7 @@
Debug printf("DMO_VideoDecoder_StartInternal\n");
//cout << "DSSTART" << endl;
this->m_pDMO_Filter->Start(this->m_pDMO_Filter);
-
+
props.cBuffers = 1;
props.cbBuffer = this->m_sDestType.lSampleSize;
@@ -292,7 +292,7 @@
props.cbAlign = props.cbPrefix = 0;
this->m_pDMO_Filter->m_pAll->vt->SetProperties(this->m_pDMO_Filter->m_pAll, &props, &props1);
this->m_pDMO_Filter->m_pAll->vt->Commit(this->m_pDMO_Filter->m_pAll);
-#endif
+#endif
this->iv.m_State = START;
}
@@ -310,7 +310,7 @@
DMO_OUTPUT_DATA_BUFFER db;
CMediaBuffer* bufferin;
//+ uint8_t* imdata = dest ? dest->Data() : 0;
-
+
Debug printf("DMO_VideoDecoder_DecodeInternal(%p,%p,%d,%d,%p)\n",this,src,size,is_keyframe,imdata);
// this->m_pDMO_Filter->m_pAll->vt->GetBuffer(this->m_pDMO_Filter->m_pAll, &sample, 0, 0, 0);
@@ -371,14 +371,14 @@
{
HRESULT result;
int should_test=1;
-
+
Debug printf("DMO_VideoDecoder_SetDestFmt (%p, %d, %d)\n",this,bits,(int)csp);
-
+
/* if (!CImage::Supported(csp, bits))
return -1;
*/
// BitmapInfo temp = m_obh;
-
+
if (!csp) // RGB
{
int ok = true;
@@ -387,7 +387,7 @@
{
case 15:
this->m_sDestType.subtype = MEDIASUBTYPE_RGB555;
- break;
+ break;
case 16:
this->m_sDestType.subtype = MEDIASUBTYPE_RGB565;
break;
@@ -409,7 +409,7 @@
this->iv.m_obh.biCompression=3;//BI_BITFIELDS
this->iv.m_obh.biSizeImage=abs((int)(2*this->iv.m_obh.biWidth*this->iv.m_obh.biHeight));
}
-
+
if( bits == 16 ) {
this->iv.m_obh.colors[0]=0xF800;
this->iv.m_obh.colors[1]=0x07E0;
@@ -459,7 +459,7 @@
if (ok) {
if (csp != 0 && csp != 3 && this->iv.m_obh.biHeight > 0)
- this->iv.m_obh.biHeight *= -1; // YUV formats uses should have height < 0
+ this->iv.m_obh.biHeight *= -1; // YUV formats uses should have height < 0
this->iv.m_obh.biSize = sizeof(BITMAPINFOHEADER);
this->iv.m_obh.biCompression=csp;
this->iv.m_obh.biBitCount=bits;
@@ -532,9 +532,9 @@
memcpy(&(this->m_sVhdr2->bmiHeader), &this->iv.m_decoder, sizeof(this->iv.m_decoder));
this->m_sVhdr2->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
if (this->m_sVhdr2->bmiHeader.biCompression == 3)
- this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER) + 12;
+ this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER) + 12;
else
- this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER);
+ this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER);
return -1;
}
diff --git a/src/libw32dll/dmo/Makefile.am b/src/libw32dll/dmo/Makefile.am
--- a/src/libw32dll/dmo/Makefile.am
+++ b/src/libw32dll/dmo/Makefile.am
@@ -2,7 +2,7 @@
AM_CFLAGS = $(X_CFLAGS) -fno-omit-frame-pointer
AM_CPPFLAGS = -DWIN32_PATH=\"$(w32_path)\" -DNOAVIFILE_HEADERS -I$(srcdir)/.. -I$(srcdir)/../wine
-
+
noinst_HEADERS = \
DMO_AudioDecoder.h \
dmo_guids.h \
diff --git a/src/libw32dll/dmo/dmo.c b/src/libw32dll/dmo/dmo.c
--- a/src/libw32dll/dmo/dmo.c
+++ b/src/libw32dll/dmo/dmo.c
@@ -61,7 +61,7 @@
//trapbug();
hr = func(id, &IID_IClassFactory, (void**)&factory);
if (hr || !factory)
- {
+ {
em = "no such class object";
break;
}
diff --git a/src/libw32dll/libwin32.h b/src/libw32dll/libwin32.h
--- a/src/libw32dll/libwin32.h
+++ b/src/libw32dll/libwin32.h
@@ -38,7 +38,7 @@
typedef struct _CImage // public your_libvo_mem
{
char* ptr;
-
+
/*char* (*Data)();
{
return 0;
@@ -47,7 +47,7 @@
/*int (*Supported)(fourcc_t csp, int bits);
{
return true;
- // if you support such surface
+ // if you support such surface
}*/
}CImage;
@@ -105,18 +105,18 @@
typedef struct _BitmapInfo
{
- long biSize;
- long biWidth;
- long biHeight;
- short biPlanes;
- short biBitCount;
- long biCompression;
- long biSizeImage;
- long biXPelsPerMeter;
- long biYPelsPerMeter;
- long biClrUsed;
- long biClrImportant;
- int colors[3];
+ long biSize;
+ long biWidth;
+ long biHeight;
+ short biPlanes;
+ short biBitCount;
+ long biCompression;
+ long biSizeImage;
+ long biXPelsPerMeter;
+ long biYPelsPerMeter;
+ long biClrUsed;
+ long biClrImportant;
+ int colors[3];
} BitmapInfo;
typedef struct _IVideoDecoder
diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c
--- a/src/libw32dll/qt_decoder.c
+++ b/src/libw32dll/qt_decoder.c
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2000-2006 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
@@ -110,19 +110,19 @@
typedef int (__cdecl* LPFUNC1)(long flag);
-typedef int (__cdecl* LPFUNC2)(const SoundComponentData *,
+typedef int (__cdecl* LPFUNC2)(const SoundComponentData *,
const SoundComponentData *,
SoundConverter *);
typedef int (__cdecl* LPFUNC3)(SoundConverter sc);
typedef int (__cdecl* LPFUNC4)(void);
typedef int (__cdecl* LPFUNC5)(SoundConverter sc, OSType selector,void * infoPtr);
-typedef int (__cdecl* LPFUNC6)(SoundConverter sc,
+typedef int (__cdecl* LPFUNC6)(SoundConverter sc,
unsigned long inputBytesTarget,
unsigned long *inputFrames,
unsigned long *inputBytes,
unsigned long *outputBytes );
-typedef int (__cdecl* LPFUNC7)(SoundConverter sc,
- const void *inputPtr,
+typedef int (__cdecl* LPFUNC7)(SoundConverter sc,
+ const void *inputPtr,
unsigned long inputFrames,
void *outputPtr,
unsigned long *outputFrames,
@@ -131,7 +131,7 @@
void *outputPtr,
unsigned long *outputFrames,
unsigned long *outputBytes);
-typedef int (__cdecl* LPFUNC9)(SoundConverter sc) ;
+typedef int (__cdecl* LPFUNC9)(SoundConverter sc) ;
typedef struct {
@@ -146,7 +146,7 @@
xine_stream_t *stream;
- HINSTANCE qtml_dll;
+ HINSTANCE qtml_dll;
xine_waveformatex wave;
uint8_t out_buf[1000000];
@@ -173,7 +173,7 @@
uint8_t data[BUFSIZE];
int data_len;
int num_frames;
-
+
ldt_fs_t *ldt_fs;
} qta_decoder_t;
@@ -227,9 +227,9 @@
lprintf ("audio: init_driver... (mutex locked)\n");
this->ldt_fs = Setup_LDT_Keeper();
-
+
this->qtml_dll = LoadLibraryA("qtmlClient.dll");
-
+
if (this->qtml_dll == NULL ) {
xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG, "qt_audio: failed to load dll\n" );
pthread_mutex_unlock(&win32_codec_mutex);
@@ -240,63 +240,63 @@
this->InitializeQTML = (LPFUNC1)GetProcAddress (this->qtml_dll, "InitializeQTML");
if ( this->InitializeQTML == NULL ) {
- xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
"qt_audio: failed geting proc address InitializeQTML\n");
pthread_mutex_unlock(&win32_codec_mutex);
return;
}
this->SoundConverterOpen = (LPFUNC2)GetProcAddress (this->qtml_dll, "SoundConverterOpen");
if ( this->SoundConverterOpen == NULL ) {
- xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
"qt_audio: failed getting proc address SoundConverterOpen\n");
pthread_mutex_unlock(&win32_codec_mutex);
return;
}
this->SoundConverterClose = (LPFUNC3)GetProcAddress (this->qtml_dll, "SoundConverterClose");
if ( this->SoundConverterClose == NULL ) {
- xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
"qt_audio: failed getting proc address SoundConverterClose\n");
pthread_mutex_unlock(&win32_codec_mutex);
return;
}
this->TerminateQTML = (LPFUNC4)GetProcAddress (this->qtml_dll, "TerminateQTML");
if ( this->TerminateQTML == NULL ) {
- xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
"qt_audio: failed getting proc address TerminateQTML\n");
pthread_mutex_unlock(&win32_codec_mutex);
return;
}
this->SoundConverterSetInfo = (LPFUNC5)GetProcAddress (this->qtml_dll, "SoundConverterSetInfo");
if ( this->SoundConverterSetInfo == NULL ) {
- xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
+ xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
"qt_audio: failed getting proc address SoundConverterSetInfo\n");
[... 274 lines omitted ...]
-
+
this->decpar.transferMode = srcCopy;
this->decpar.dstPixMap = **this->GetGWorldPixMap (this->OutBufferGWorld);/*destPixmap; */
-
+
cres = this->ImageCodecPreDecompress (this->ci, &this->decpar);
lprintf ("video: ImageCodecPreDecompress cres=0x%X\n", cres);
-
+
this->data_len = 0;
this->codec_initialized = 1;
@@ -930,7 +930,7 @@
static void qtv_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
qtv_decoder_t *this = (qtv_decoder_t *) this_gen;
- lprintf ("video: decode_data, flags=0x%08x, len=%d, pts=%lld ...\n",
+ lprintf ("video: decode_data, flags=0x%08x, len=%d, pts=%lld ...\n",
buf->decoder_flags, buf->size, buf->pts);
if (buf->decoder_flags & BUF_FLAG_STDHEADER) {
@@ -944,7 +944,7 @@
} else if (buf->decoder_flags & BUF_FLAG_SPECIAL) {
lprintf ("video: special buffer\n");
-
+
if (buf->decoder_info[1] == BUF_SPECIAL_STSD_ATOM) {
lprintf ("video: got stsd atom -> init codec\n");
@@ -962,12 +962,12 @@
this->data_len += buf->size;
lprintf ("video: got %d bytes in buffer\n", this->data_len);
-
+
if (buf->decoder_flags & BUF_FLAG_FRAME_END) {
ComponentResult cres;
vo_frame_t *img;
-
+
Check_FS_Segment(this->ldt_fs);
pthread_mutex_lock(&win32_codec_mutex);
@@ -977,30 +977,30 @@
(**this->framedescHandle).dataSize=this->data_len;
cres = this->ImageCodecBandDecompress (this->ci, &this->decpar);
-
+
++this->decpar.frameNumber;
pthread_mutex_unlock(&win32_codec_mutex);
if (cres&0xFFFF){
- xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
+ xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG,
"qt_video: ImageCodecBandDecompress cres=0x%lX (-0x%lX) %ld :(\n", cres,-cres,cres);
}
img = this->stream->video_out->get_frame (this->stream->video_out,
this->bih.biWidth,
this->bih.biHeight,
- this->ratio,
+ this->ratio,
XINE_IMGFMT_YUY2,
VO_BOTH_FIELDS);
-
+
img->pts = buf->pts;
img->duration = buf->decoder_info[0];
img->bad_frame = 0;
-
- xine_fast_memcpy (img->base[0], this->plane,
+
+ xine_fast_memcpy (img->base[0], this->plane,
this->bih.biWidth*this->bih.biHeight*2);
-
+
img->draw(img, this->stream);
img->free(img);
@@ -1019,7 +1019,7 @@
static void qtv_reset (video_decoder_t *this_gen) {
qtv_decoder_t *this = (qtv_decoder_t *) this_gen;
-
+
this->data_len = 0;
}
@@ -1044,7 +1044,7 @@
free (this);
}
-static video_decoder_t *qtv_open_plugin (video_decoder_class_t *class_gen,
+static video_decoder_t *qtv_open_plugin (video_decoder_class_t *class_gen,
xine_stream_t *stream) {
qtv_class_t *cls = (qtv_class_t *) class_gen;
@@ -1069,13 +1069,13 @@
*/
/*
- * some fake functions to make qt codecs happy
+ * some fake functions to make qt codecs happy
*/
#if 0
static void codec_path_cb (void *data, xine_cfg_entry_t *cfg) {
qtv_class_t *this = (qt_class_t *) data;
-
+
this->qt_codec_path = cfg->str_value;
}
#endif
@@ -1113,7 +1113,7 @@
};
const plugin_info_t xine_plugin_info[] EXPORTED = {
- /* type, API, "name", version, special_info, init_function */
+ /* type, API, "name", version, special_info, init_function */
{ PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "qtv", XINE_VERSION_CODE, &qtv_dec_info, qtv_init_class },
{ PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "qta", XINE_VERSION_CODE, &qta_dec_info, qta_init_class },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
diff --git a/src/libw32dll/qtx/qtxsdk/components.h b/src/libw32dll/qtx/qtxsdk/components.h
--- a/src/libw32dll/qtx/qtxsdk/components.h
+++ b/src/libw32dll/qtx/qtxsdk/components.h
@@ -721,13 +721,13 @@
printf("sequenceID=%ld\n",cd->sequenceID);
idh=cd->imageDescription;
if(idh && idh[0]) dump_ImageDescription(idh[0]);
-
+
for(i=0;i<sizeof(CodecDecompressParams);i++){
printf(" %02X",((unsigned char*)cd)[i]);
if((i%16)==15) printf("\n");
}
printf("\n");
-
+
printf("data=%p size=%ld\n",cd->data,cd->bufferSize);
printf("frameno=%ld lines: %ld .. %ld condflags=0x%lX callerflags=0x%X\n",
cd->frameNumber, cd->startLine, cd->stopLine, cd->conditionFlags,cd->callerFlags);
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c
--- a/src/libw32dll/w32codec.c
+++ b/src/libw32dll/w32codec.c
@@ -1,18 +1,18 @@
-/*
+/*
* Copyright (C) 2000-2006 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
@@ -25,7 +25,7 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-
+
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
@@ -37,8 +37,8 @@
#include "wine/vfw.h"
#include "wine/mmreg.h"
#include "wine/ldt_keeper.h"
-#include "wine/win32.h"
-#include "wine/wineacm.h"
+#include "wine/win32.h"
+#include "wine/wineacm.h"
#include "wine/loader.h"
#define NOAVIFILE_HEADERS
@@ -67,13 +67,13 @@
0x73f7a062, 0x8829, 0x11d1,
{ 0xb5, 0x50, 0x00, 0x60, 0x97, 0x24, 0x2d, 0x8d }
};
-
+
static GUID CLSID_Acelp =
{
0x4009f700, 0xaeba, 0x11d1,
{ 0x83, 0x44, 0x00, 0xc0, 0x4f, 0xb9, 0x2e, 0xb7 }
};
-
+
static GUID wmv1_clsid =
{
0x4facbba1, 0xffd8, 0x4cd7,
@@ -146,11 +146,11 @@
video_decoder_t video_decoder;
xine_stream_t *stream;
-
+
int64_t video_step;
int decoder_ok;
- BITMAPINFOHEADER *bih, o_bih;
+ BITMAPINFOHEADER *bih, o_bih;
double ratio;
char scratch1[16]; /* some codecs overflow o_bih */
HIC hic;
@@ -162,7 +162,7 @@
void *img_buffer;
int size;
long outfmt;
-
+
int ex_functions;
int driver_type;
GUID *guid;
@@ -170,8 +170,8 @@
DMO_VideoDecoder *dmo_dec;
int stream_id;
- int skipframes;
-
+ int skipframes;
+
ldt_fs_t *ldt_fs;
} w32v_decoder_t;
@@ -181,7 +181,7 @@
typedef struct w32a_decoder_s {
audio_decoder_t audio_decoder;
-
+
xine_stream_t *stream;
int output_open;
@@ -190,25 +190,25 @@
unsigned char *buf;
int size;
int64_t pts;
-
+
/* these are used for pts estimation */
int64_t lastpts, sumpts, sumsize;
double byterate;
unsigned char *outbuf;
int outsize;
-
+
HACMSTREAM srcstream;
int rec_audio_src_size;
int max_audio_src_size;
int num_channels;
int rate;
-
+
int driver_type;
[... 1030 lines omitted ...]
pthread_mutex_unlock(&win32_codec_mutex);
}
-
+
} else if (this->decoder_ok) {
lprintf ("decoding %d data bytes...\n", buf->size);
@@ -1498,9 +1498,9 @@
return;
Check_FS_Segment(this->ldt_fs);
-
+
w32a_decode_audio (this, buf->content, buf->size,
- buf->decoder_flags & BUF_FLAG_FRAME_END,
+ buf->decoder_flags & BUF_FLAG_FRAME_END,
buf->pts);
}
}
@@ -1509,7 +1509,7 @@
static void w32a_dispose (audio_decoder_t *this_gen) {
w32a_decoder_t *this = (w32a_decoder_t *) this_gen;
-
+
pthread_mutex_lock(&win32_codec_mutex);
if( this->driver_type == DRIVER_STD ) {
if( this->srcstream ) {
@@ -1533,12 +1533,12 @@
free(this->buf);
this->buf = NULL;
}
-
+
if( this->outbuf ) {
free(this->outbuf);
this->outbuf = NULL;
}
-
+
this->decoder_ok = 0;
if (this->output_open) {
@@ -1549,7 +1549,7 @@
free (this);
}
-static video_decoder_t *open_video_decoder_plugin (video_decoder_class_t *class_gen,
+static video_decoder_t *open_video_decoder_plugin (video_decoder_class_t *class_gen,
xine_stream_t *stream) {
w32v_decoder_t *this ;
@@ -1593,7 +1593,7 @@
this->decoder_class.dispose = default_video_decoder_class_dispose;
pthread_once (&once_control, init_routine);
-
+
return this;
}
@@ -1601,7 +1601,7 @@
* audio part
*/
-static audio_decoder_t *open_audio_decoder_plugin (audio_decoder_class_t *class_gen,
+static audio_decoder_t *open_audio_decoder_plugin (audio_decoder_class_t *class_gen,
xine_stream_t *stream) {
w32a_decoder_t *this ;
@@ -1612,11 +1612,11 @@
this->audio_decoder.reset = w32a_reset;
this->audio_decoder.discontinuity = w32a_discontinuity;
this->audio_decoder.dispose = w32a_dispose;
-
+
this->stream = stream;
this->output_open = 0;
this->decoder_ok = 0;
-
+
this->buf = NULL;
this->outbuf = NULL;
@@ -1630,7 +1630,7 @@
w32a_class_t *this;
config_values_t *cfg;
-
+
cfg = xine->config;
if ((win32_def_path = get_win32_codecs_path(cfg)) == NULL) return NULL;
@@ -1651,12 +1651,12 @@
* exported plugin catalog entry
*/
-static const uint32_t video_types[] = {
+static const uint32_t video_types[] = {
BUF_VIDEO_MSMPEG4_V1, BUF_VIDEO_MSMPEG4_V2, BUF_VIDEO_MSMPEG4_V3,
BUF_VIDEO_IV50, BUF_VIDEO_IV41, BUF_VIDEO_IV32, BUF_VIDEO_IV31,
BUF_VIDEO_CINEPAK, /* BUF_VIDEO_ATIVCR1, */
BUF_VIDEO_ATIVCR2, BUF_VIDEO_I263, BUF_VIDEO_MSVC,
- BUF_VIDEO_DV, BUF_VIDEO_WMV7, BUF_VIDEO_WMV8, BUF_VIDEO_WMV9,
+ BUF_VIDEO_DV, BUF_VIDEO_WMV7, BUF_VIDEO_WMV8, BUF_VIDEO_WMV9,
BUF_VIDEO_VP31, BUF_VIDEO_MSS1, BUF_VIDEO_TSCC, BUF_VIDEO_UCOD,
BUF_VIDEO_VP4, BUF_VIDEO_VP5, BUF_VIDEO_VP6,
0
@@ -1667,8 +1667,8 @@
1 /* priority */
};
-static const uint32_t audio_types[] = {
- BUF_AUDIO_WMAV1, BUF_AUDIO_WMAV2, BUF_AUDIO_WMAV3, BUF_AUDIO_MSADPCM,
+static const uint32_t audio_types[] = {
+ BUF_AUDIO_WMAV1, BUF_AUDIO_WMAV2, BUF_AUDIO_WMAV3, BUF_AUDIO_MSADPCM,
BUF_AUDIO_MSIMAADPCM, BUF_AUDIO_MSGSM, BUF_AUDIO_IMC, BUF_AUDIO_LH,
BUF_AUDIO_VOXWARE, BUF_AUDIO_ACELPNET, BUF_AUDIO_VIVOG723, BUF_AUDIO_WMAV,
BUF_AUDIO_WMALL,
@@ -1681,7 +1681,7 @@
};
const plugin_info_t xine_plugin_info[] EXPORTED = {
- /* type, API, "name", version, special_info, init_function */
+ /* type, API, "name", version, special_info, init_function */
{ PLUGIN_VIDEO_DECODER | PLUGIN_MUST_PRELOAD, 19, "win32v", XINE_VERSION_CODE, &dec_info_video, init_video_decoder_class },
{ PLUGIN_AUDIO_DECODER | PLUGIN_MUST_PRELOAD, 16, "win32a", XINE_VERSION_CODE, &dec_info_audio, init_audio_decoder_class },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
diff --git a/src/libw32dll/w32codec.h b/src/libw32dll/w32codec.h
--- a/src/libw32dll/w32codec.h
+++ b/src/libw32dll/w32codec.h
@@ -1,18 +1,18 @@
-/*
+/*
* Copyright (C) 2000-2001 the xine project
- *
+ *
* This file is part of xine, a unix video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
diff --git a/src/post/audio/audio_filters.c b/src/post/audio/audio_filters.c
--- a/src/post/audio/audio_filters.c
+++ b/src/post/audio/audio_filters.c
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2000-2004 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
@@ -38,7 +38,7 @@
const plugin_info_t xine_plugin_info[] EXPORTED = {
- /* type, API, "name", version, special_info, init_function */
+ /* type, API, "name", version, special_info, init_function */
{ PLUGIN_POST, 10, "upmix", XINE_VERSION_CODE, &upmix_special_info, &upmix_init_plugin },
{ PLUGIN_POST, 10, "upmix_mono", XINE_VERSION_CODE, &upmix_mono_special_info, &upmix_mono_init_plugin },
{ PLUGIN_POST, 10, "stretch", XINE_VERSION_CODE, &stretch_special_info, &stretch_init_plugin },
diff --git a/src/post/audio/audio_filters.h b/src/post/audio/audio_filters.h
--- a/src/post/audio/audio_filters.h
+++ b/src/post/audio/audio_filters.h
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2000-2004 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
diff --git a/src/post/audio/dsp.h b/src/post/audio/dsp.h
--- a/src/post/audio/dsp.h
+++ b/src/post/audio/dsp.h
@@ -1,5 +1,5 @@
/*=============================================================================
- *
+ *
* This software has been released under the terms of the GNU Public
* license. See http://www.gnu.org/copyleft/gpl.html for details.
*
@@ -9,7 +9,7 @@
*/
#ifndef _DSP_H
-#define _DSP_H 1
+#define _DSP_H 1
/* Implementation of routines used for DSP */
diff --git a/src/post/audio/filter.c b/src/post/audio/filter.c
--- a/src/post/audio/filter.c
+++ b/src/post/audio/filter.c
@@ -1,5 +1,5 @@
/*=============================================================================
- *
+ *
* This software has been released under the terms of the GNU Public
* license. See http://www.gnu.org/copyleft/gpl.html for details.
*
@@ -25,12 +25,12 @@
*
* n number of filter taps, where mod(n,4)==0
* w filter taps
- * x input signal must be a circular buffer which is indexed backwards
+ * x input signal must be a circular buffer which is indexed backwards
*/
inline _ftype_t fir(register unsigned int n, _ftype_t* w, _ftype_t* x)
{
register _ftype_t y; /* Output */
- y = 0.0;
+ y = 0.0;
do{
n--;
y+=w[n]*x[n];
@@ -44,7 +44,7 @@
* d number of filters
* xi current index in xq
* w filter taps k by n big
- * x input signal must be a circular buffers which are indexed backwards
+ * x input signal must be a circular buffers which are indexed backwards
* y output buffer
* s output buffer stride
*/
@@ -67,11 +67,11 @@
at the new samples, xi current index in xq and n the length of the
filter. xq must be n*2 by k big, s is the index for in.
*/
-inline int updatepq(unsigned int n, unsigned int d, unsigned int xi, _ftype_t** xq, _ftype_t* in, unsigned int s)
+inline int updatepq(unsigned int n, unsigned int d, unsigned int xi, _ftype_t** xq, _ftype_t* in, unsigned int s)
{
register _ftype_t* txq = *xq + xi;
register int nt = n*2;
-
+
while(d-- >0){
*txq= *(txq+n) = *in;
txq+=nt;
@@ -88,26 +88,26 @@
n filter length must be odd for HP and BS filters
w buffer for the filter taps (must be n long)
- fc cutoff frequencies (1 for LP and HP, 2 for BP and BS)
+ fc cutoff frequencies (1 for LP and HP, 2 for BP and BS)
0 < fc < 1 where 1 <=> Fs/2
flags window and filter type as defined in filter.h
- variables are ored together: i.e. LP|HAMMING will give a
- low pass filter designed using a hamming window
+ variables are ored together: i.e. LP|HAMMING will give a
+ low pass filter designed using a hamming window
opt beta constant used only when designing using kaiser windows
-
+
returns 0 if OK, -1 if fail
*/
int design_fir(unsigned int n, _ftype_t* w, _ftype_t* fc, unsigned int flags, _ftype_t opt)
{
- unsigned int o = n & 1; /* Indicator for odd filter length */
+ unsigned int o = n & 1; /* Indicator for odd filter length */
unsigned int end = ((n + 1) >> 1) - o; /* Loop end */
unsigned int i; /* Loop index */
_ftype_t k1 = 2 * M_PI; /* 2*pi*fc1 */
_ftype_t k2 = 0.5 * (_ftype_t)(1 - o);/* Constant used if the filter has even length */
_ftype_t k3; /* 2*pi*fc2 Constant used in BP and BS design */
- _ftype_t g = 0.0; /* Gain */
- _ftype_t t1,t2,t3; /* Temporary variables */
+ _ftype_t g = 0.0; /* Gain */
+ _ftype_t t1,t2,t3; /* Temporary variables */
_ftype_t fc1,fc2; /* Cutoff frequencies */
/* Sanity check */
@@ -130,10 +130,10 @@
case(KAISER):
kaiser(n,w,opt); break;
default:
- return -1;
+ return -1;
}
- if(flags & (LP | HP)){
+ if(flags & (LP | HP)){
fc1=*fc;
/* Cutoff frequency must be < 0.5 where 0.5 <=> Fs/2 */
fc1 = ((fc1 <= 1.0) && (fc1 > 0.0)) ? fc1/2 : 0.25;
@@ -143,7 +143,7 @@
/*
* If the filter length is odd, there is one point which is exactly
- * in the middle. The value at this point is 2*fCutoff*sin(x)/x,
+ * in the middle. The value at this point is 2*fCutoff*sin(x)/x,
* where x is zero. To make sure nothing strange happens, we set this
* value separately.
*/
@@ -196,9 +196,9 @@
t2 = sin(k3 * t1)/(M_PI * t1); /* Sinc fc2 */
t3 = sin(k1 * t1)/(M_PI * t1); /* Sinc fc1 */
g += w[end-i-1] * (t3 + t2); /* Total gain in filter */
- w[end-i-1] = w[n-end+i] = w[end-i-1] * (t2 - t3);
+ w[end-i-1] = w[n-end+i] = w[end-i-1] * (t2 - t3);
}
- }
+ }
else{ /* Band stop */
if (!o) /* Band stop filters must have odd length */
return -1;
@@ -210,7 +210,7 @@
t1 = (_ftype_t)(i+1);
t2 = sin(k1 * t1)/(M_PI * t1); /* Sinc fc1 */
t3 = sin(k3 * t1)/(M_PI * t1); /* Sinc fc2 */
- w[end-i-1] = w[n-end+i] = w[end-i-1] * (t2 - t3);
+ w[end-i-1] = w[n-end+i] = w[end-i-1] * (t2 - t3);
g += 2*w[end-i-1]; /* Total gain in filter */
}
}
@@ -218,9 +218,9 @@
/* Normalize gain */
g=1/g;
- for (i=0; i<n; i++)
+ for (i=0; i<n; i++)
w[i] *= g;
-
+
return 0;
}
@@ -229,7 +229,7 @@
* n length of prototype filter
* k number of polyphase components
* w prototype filter taps
- * pw Parallel FIR filter
+ * pw Parallel FIR filter
* g Filter gain
* flags FWD forward indexing
* REW reverse indexing
@@ -240,10 +240,10 @@
int design_pfir(unsigned int n, unsigned int k, _ftype_t* w, _ftype_t** pw, _ftype_t g, unsigned int flags)
{
int l = (int)n/k; /* Length of individual FIR filters */
- int i; /* Counters */
+ int i; /* Counters */
int j;
_ftype_t t; /* g * w[i] */
-
+
/* Sanity check */
if(l<1 || k<1 || !w || !pw)
return -1;
@@ -276,7 +276,7 @@
/* Pre-warp the coefficients of a numerator or denominator.
* Note that a0 is assumed to be 1, so there is no wrapping
- * of it.
+ * of it.
*/
void prewarp(_ftype_t* a, _ftype_t fc, _ftype_t fs)
{
@@ -303,12 +303,12 @@
* Arguments:
* a - s-domain numerator coefficients
* b - s-domain denominator coefficients
- * k - filter gain factor. Initially set to 1 and modified by each
+ * k - filter gain factor. Initially set to 1 and modified by each
* biquad section in such a way, as to make it the
* coefficient by which to multiply the overall filter gain
* in order to achieve a desired overall filter gain,
- * specified in initial value of k.
- * fs - sampling rate (Hz)
+ * specified in initial value of k.
+ * fs - sampling rate (Hz)
* coef - array of z-domain coefficients to be filled in.
*
* Return: On return, set coef z-domain coefficients and k to the gain
@@ -342,7 +342,7 @@
* create a filter fill in a, b, Q and fs and make space for coef and k.
*
*
- * Example Butterworth design:
+ * Example Butterworth design:
*
* Below are Butterworth polynomials, arranged as a series of 2nd
* order sections:
@@ -398,12 +398,12 @@
* a - s-domain numerator coefficients, a[1] is always assumed to be 1.0
* b - s-domain denominator coefficients
* Q - Q value for the filter
- * k - filter gain factor. Initially set to 1 and modified by each
+ * k - filter gain factor. Initially set to 1 and modified by each
* biquad section in such a way, as to make it the
* coefficient by which to multiply the overall filter gain
* in order to achieve a desired overall filter gain,
- * specified in initial value of k.
- * fs - sampling rate (Hz)
+ * specified in initial value of k.
+ * fs - sampling rate (Hz)
* coef - array of z-domain coefficients to be filled in.
*
* Note: Upon return from each call, the k argument will be set to a
@@ -419,7 +419,7 @@
_ftype_t at[3];
_ftype_t bt[3];
- if(!a || !b || !k || !coef || (Q>1000.0 || Q< 1.0))
+ if(!a || !b || !k || !coef || (Q>1000.0 || Q< 1.0))
return -1;
memcpy(at,a,3*sizeof(_ftype_t));
diff --git a/src/post/audio/filter.h b/src/post/audio/filter.h
--- a/src/post/audio/filter.h
+++ b/src/post/audio/filter.h
@@ -1,5 +1,5 @@
/*=============================================================================
- *
+ *
* This software has been released under the terms of the GNU Public
* license. See http://www.gnu.org/copyleft/gpl.html for details.
*
@@ -37,7 +37,7 @@
#define WINDOW_MASK 0x0000001F
/* Parallel filter design */
-#define FWD 0x00000001 /* Forward indexing of polyphase filter */
+#define FWD 0x00000001 /* Forward indexing of polyphase filter */
#define REW 0x00000002 /* Reverse indexing of polyphase filter */
#define ODD 0x00000010 /* Make filter HP */
@@ -60,7 +60,7 @@
/* Add new data to circular queue designed to be used with a FIR
* filter. xq is the circular queue, in pointing at the new sample, xi
* current index for xq and n the length of the filter. xq must be n*2
- * long.
+ * long.
*/
#define updateq(n,xi,xq,in)\
xq[xi]=(xq)[(xi)+(n)]=*(in);\
diff --git a/src/post/audio/stretch.c b/src/post/audio/stretch.c
--- a/src/post/audio/stretch.c
+++ b/src/post/audio/stretch.c
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2000-2004 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
@@ -70,19 +70,19 @@
struct timeval tv;
int64_t pts;
- double pts_calc;
+ double pts_calc;
xine_monotonic_clock(&tv, NULL);
pts_calc = (tv.tv_sec - this->cur_time.tv_sec) * this->speed_factor;
pts_calc += (tv.tv_usec - this->cur_time.tv_usec) * this->speed_factor / 1e6;
pts = this->cur_pts + pts_calc;
-/* This next part introduces a one off inaccuracy
- * to the scr due to rounding tv to pts.
+/* This next part introduces a one off inaccuracy
+ * to the scr due to rounding tv to pts.
*/
this->cur_time.tv_sec=tv.tv_sec;
this->cur_time.tv_usec=tv.tv_usec;
- this->cur_pts=pts;
+ this->cur_pts=pts;
return ;
}
@@ -94,7 +94,7 @@
stretchscr_set_pivot( this );
this->xine_speed = speed;
- this->speed_factor = (double) speed * 90000.0 / XINE_FINE_SPEED_NORMAL /
+ this->speed_factor = (double) speed * 90000.0 / XINE_FINE_SPEED_NORMAL /
(*this->stretch_factor);
pthread_mutex_unlock (&this->lock);
@@ -125,7 +125,7 @@
this->cur_pts = start_vpts;
pthread_mutex_unlock (&this->lock);
-
+
stretchscr_set_speed (&this->scr, XINE_FINE_SPEED_NORMAL);
}
@@ -134,16 +134,16 @@
struct timeval tv;
int64_t pts;
- double pts_calc;
+ double pts_calc;
pthread_mutex_lock (&this->lock);
xine_monotonic_clock(&tv, NULL);
-
+
pts_calc = (tv.tv_sec - this->cur_time.tv_sec) * this->speed_factor;
pts_calc += (tv.tv_usec - this->cur_time.tv_usec) * this->speed_factor / 1e6;
pts = this->cur_pts + pts_calc;
-
+
pthread_mutex_unlock (&this->lock);
return pts;
@@ -168,9 +168,9 @@
this->scr.start = stretchscr_start;
this->scr.get_current = stretchscr_get_current;
this->scr.exit = stretchscr_exit;
-
+
pthread_mutex_init (&this->lock, NULL);
-
+
this->stretch_factor = stretch_factor;
stretchscr_set_speed (&this->scr, XINE_SPEED_PAUSE);
@@ -202,21 +202,21 @@
START_PARAM_DESCR( stretch_parameters_t )
PARAM_ITEM( POST_PARAM_TYPE_BOOL, preserve_pitch, NULL, 0, 1, 0,
"Preserve pitch" )
-PARAM_ITEM( POST_PARAM_TYPE_DOUBLE, factor, NULL, 0.5, 1.5, 0,
+PARAM_ITEM( POST_PARAM_TYPE_DOUBLE, factor, NULL, 0.5, 1.5, 0,
"Time stretch factor (<1.0 shorten duration)" )
END_PARAM_DESCR( param_descr )
/* plugin structure */
struct post_plugin_stretch_s {
post_plugin_t post;
-
+
stretchscr_t* scr;
/* private data */
stretch_parameters_t params;
xine_post_in_t params_input;
int params_changed;
-
+
int channels;
int bytes_per_frame;
@@ -228,9 +228,9 @@
int num_frames; /* current # of frames on audiofrag */
[... 286 lines omitted ...]
if( this->frames_per_frag != this->frames_per_outfrag ) {
int wsize;
-
- this->audiofrag = malloc( this->frames_per_frag * this->bytes_per_frame );
- this->outfrag = malloc( this->frames_per_outfrag * this->bytes_per_frame );
-
+
+ this->audiofrag = malloc( this->frames_per_frag * this->bytes_per_frame );
+ this->outfrag = malloc( this->frames_per_outfrag * this->bytes_per_frame );
+
if( this->frames_per_frag > this->frames_per_outfrag )
wsize = this->frames_per_frag - this->frames_per_outfrag;
else
@@ -559,41 +559,41 @@
this->w = (_ftype_t*) malloc( wsize * sizeof(_ftype_t) );
triang(wsize, this->w);
}
-
+
this->num_frames = 0;
this->pts = 0;
-
+
this->params_changed = 0;
}
-
+
pthread_mutex_unlock (&this->lock);
/* just pass data through if we have nothing to do */
if( this->frames_per_frag == this->frames_per_outfrag ||
/* FIXME: we only handle 1 or 2 channels, 16 bits for now */
- (this->channels != 1 && this->channels != 2) ||
+ (this->channels != 1 && this->channels != 2) ||
port->bits != 16 ) {
-
- port->original_port->put_buffer(port->original_port, buf, stream );
-
+
+ port->original_port->put_buffer(port->original_port, buf, stream );
+
return;
}
-
+
/* update pts for our current audio fragment */
if( buf->vpts )
this->pts = buf->vpts - (this->num_frames * 90000 / port->rate);
-
+
data_in = buf->mem;
while( buf->num_frames ) {
int frames_to_copy = this->frames_per_frag - this->num_frames;
-
+
if( frames_to_copy > buf->num_frames )
frames_to_copy = buf->num_frames;
/* copy up to one fragment from input buf to our buffer */
memcpy( (uint8_t *)this->audiofrag + this->num_frames * this->bytes_per_frame,
data_in, frames_to_copy * this->bytes_per_frame );
-
+
data_in = (uint16_t *)((uint8_t *)data_in + frames_to_copy * this->bytes_per_frame);
this->num_frames += frames_to_copy;
buf->num_frames -= frames_to_copy;
@@ -603,10 +603,10 @@
stretch_process_fragment( port, stream, buf->extra_info );
}
}
-
+
buf->num_frames=0; /* UNDOCUMENTED, but hey, it works! Force old audio_out buffer free. */
- port->original_port->put_buffer(port->original_port, buf, stream );
-
+ port->original_port->put_buffer(port->original_port, buf, stream );
+
return;
}
@@ -630,21 +630,21 @@
xine_post_in_t *input_api;
post_audio_port_t *port;
stretch_parameters_t init_params;
-
+
if (!this || !audio_target || !audio_target[0] ) {
free(this);
return NULL;
}
-
+
_x_post_init(&this->post, 1, 0);
init_params.preserve_pitch = 1;
init_params.factor = 0.80;
-
+
pthread_mutex_init (&this->lock, NULL);
set_parameters ((xine_post_t *)&this->post, &init_params);
-
+
port = _x_post_intercept_audio_port(&this->post, audio_target[0], &input, &output);
port->new_port.open = stretch_port_open;
port->new_port.close = stretch_port_close;
@@ -667,16 +667,16 @@
void *stretch_init_plugin(xine_t *xine, void *data)
{
post_class_stretch_t *class = (post_class_stretch_t *)xine_xmalloc(sizeof(post_class_stretch_t));
-
+
if (!class)
return NULL;
-
+
class->post_class.open_plugin = stretch_open_plugin;
class->post_class.identifier = "stretch";
class->post_class.description = N_("Time stretch by a given factor, optionally preserving pitch");
class->post_class.dispose = default_post_class_dispose;
-
+
class->xine = xine;
-
+
return class;
}
diff --git a/src/post/audio/upmix.c b/src/post/audio/upmix.c
--- a/src/post/audio/upmix.c
+++ b/src/post/audio/upmix.c
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2000-2004 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
@@ -167,13 +167,13 @@
_x_post_rewire(&this->post);
_x_post_inc_usage(port);
-
+
port->stream = stream;
port->bits = bits;
port->rate = rate;
port->mode = mode;
capabilities = port->original_port->get_capabilities(port->original_port);
-
+
this->channels = _x_ao_mode2channels(mode);
/* FIXME: Handle all desired output formats */
if ((capabilities & AO_CAP_MODE_5_1CHANNEL) && (capabilities & AO_CAP_FLOAT32)) {
@@ -232,7 +232,7 @@
float right;
float sum;
int frame;
- int src_units_per_sample=1;
+ int src_units_per_sample=1;
if (step_channel_in == 3) src_units_per_sample=step_channel_in; /* Special handling for 24 bit 3byte input */
for (frame=0;frame < num_frames; frame++) {
@@ -297,9 +297,9 @@
return frame;
}
-static void upmix_port_put_buffer (xine_audio_port_t *port_gen,
+static void upmix_port_put_buffer (xine_audio_port_t *port_gen,
audio_buffer_t *buf, xine_stream_t *stream) {
-
+
post_audio_port_t *port = (post_audio_port_t *)port_gen;
post_plugin_upmix_t *this = (post_plugin_upmix_t *)port->post;
int src_step_frame;
@@ -315,7 +315,7 @@
if ((this->channels==2) && (this->channels_out==6)) {
while (num_frames_processed < buf->num_frames) {
- this->buf = port->original_port->get_buffer(port->original_port);
+ this->buf = port->original_port->get_buffer(port->original_port);
/* this->buf->num_frames is handled after the upmix */
this->buf->vpts = buf->vpts;
if (num_frames_processed != 0) this->buf->vpts = 0;
@@ -327,7 +327,7 @@
this->buf->format.bits = 32; /* Upmix to floats */
this->buf->format.rate = port->rate;
this->buf->format.mode = AO_CAP_MODE_5_1CHANNEL;
- _x_extra_info_merge( this->buf->extra_info, buf->extra_info);
+ _x_extra_info_merge( this->buf->extra_info, buf->extra_info);
step_channel_in = port->bits>>3;
step_channel_out = this->buf->format.bits>>3;
dst_step_frame = this->channels_out*step_channel_out;
@@ -353,18 +353,18 @@
}
}
pthread_mutex_unlock (&this->lock);
-
+
num_frames_done = upmix_frames_2to51_any_to_float(data8dst, data8src, num_frames, step_channel_in, this->sub);
this->buf->num_frames = num_frames_done;
num_frames_processed+= num_frames_done;
/* pass data to original port */
- port->original_port->put_buffer(port->original_port, this->buf, stream );
+ port->original_port->put_buffer(port->original_port, this->buf, stream );
}
/* free data from origial buffer */
buf->num_frames=0; /* UNDOCUMENTED, but hey, it works! Force old audio_out buffer free. */
}
- port->original_port->put_buffer(port->original_port, buf, stream );
-
+ port->original_port->put_buffer(port->original_port, buf, stream );
+
return;
}
@@ -388,16 +388,16 @@
post_out_t *output;
xine_post_in_t *input_api;
post_audio_port_t *port;
-
+
if (!this || !audio_target || !audio_target[0] ) {
free(this);
return NULL;
}
-
+
_x_post_init(&this->post, 1, 0);
this->params.cut_off_freq = 100;
-
+
port = _x_post_intercept_audio_port(&this->post, audio_target[0], &input, &output);
port->new_port.open = upmix_port_open;
#if 0
@@ -422,16 +422,16 @@
void *upmix_init_plugin(xine_t *xine, void *data)
{
post_class_upmix_t *class = (post_class_upmix_t *)xine_xmalloc(sizeof(post_class_upmix_t));
-
+
if (!class)
return NULL;
-
+
class->post_class.open_plugin = upmix_open_plugin;
class->post_class.identifier = "upmix";
class->post_class.description = N_("upmix");
class->post_class.dispose = default_post_class_dispose;
-
+
class->xine = xine;
-
+
return class;
}
diff --git a/src/post/audio/upmix_mono.c b/src/post/audio/upmix_mono.c
--- a/src/post/audio/upmix_mono.c
+++ b/src/post/audio/upmix_mono.c
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2000-2004 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
@@ -68,11 +68,11 @@
/* private data */
int channels;
-
+
upmix_mono_parameters_t params;
xine_post_in_t params_input;
int params_changed;
-
+
pthread_mutex_t lock;
};
@@ -134,7 +134,7 @@
_x_post_rewire(&this->post);
_x_post_inc_usage(port);
-
+
port->stream = stream;
port->bits = bits;
port->rate = rate;
@@ -142,7 +142,7 @@
this->channels = _x_ao_mode2channels(mode);
capabilities = port->original_port->get_capabilities(port->original_port);
-
+
if (this->channels == 1 && (capabilities & AO_CAP_MODE_STEREO)) {
xprintf(stream->xine, XINE_VERBOSITY_LOG,
_(LOG_MODULE ": upmixing Mono to Stereo.\n"));
@@ -151,7 +151,7 @@
if ( this->channels != 1)
xprintf(stream->xine, XINE_VERBOSITY_LOG,
ngettext(LOG_MODULE ": upmixing a single channel from original %d channel stream.\n",
- LOG_MODULE ": upmixing a single channel from original %d channels stream.\n",
+ LOG_MODULE ": upmixing a single channel from original %d channels stream.\n",
this->channels), this->channels);
else {
xprintf(stream->xine, XINE_VERBOSITY_LOG,
@@ -163,15 +163,15 @@
return (port->original_port->open) (port->original_port, stream, bits, rate, mode);
}
-static void upmix_mono_port_put_buffer(xine_audio_port_t *port_gen,
+static void upmix_mono_port_put_buffer(xine_audio_port_t *port_gen,
audio_buffer_t *buf, xine_stream_t *stream) {
-
+
post_audio_port_t *port = (post_audio_port_t *)port_gen;
post_plugin_upmix_mono_t *this = (post_plugin_upmix_mono_t *)port->post;
-
+
pthread_mutex_lock (&this->lock);
- if (this->channels == 1)
+ if (this->channels == 1)
{
audio_buffer_t *buf0 = port->original_port->get_buffer(port->original_port);
audio_buffer_t *buf1 = port->original_port->get_buffer(port->original_port);
@@ -232,7 +232,7 @@
/* free data from origial buffer */
buf->num_frames = 0; /* UNDOCUMENTED, but hey, it works! Force old audio_out buffer free. */
}
- else if (this->channels && this->params.channel >= 0)
+ else if (this->channels && this->params.channel >= 0)
{
audio_buffer_t *buf0 = port->original_port->get_buffer(port->original_port);
buf0->num_frames = buf->num_frames;
@@ -253,12 +253,12 @@
uint8_t *dst0 = (uint8_t *)buf0->mem;
int cur_channel = this->params.channel;
int i, j;
-
+
if( cur_channel >= this->channels )
cur_channel = this->channels-1;
src += cur_channel * step;
-
+
for (i = 0; i < buf->num_frames; i++)
{
for (j = 0; j < this->channels; j++ )
@@ -276,11 +276,11 @@
/* free data from origial buffer */
buf->num_frames = 0; /* UNDOCUMENTED, but hey, it works! Force old audio_out buffer free. */
}
-
+
pthread_mutex_unlock (&this->lock);
-
+
port->original_port->put_buffer(port->original_port, buf, stream);
-
+
return;
}
@@ -303,24 +303,24 @@
xine_post_in_t *input_api;
post_audio_port_t *port;
upmix_mono_parameters_t init_params;
-
+
if (!this || !audio_target || !audio_target[0]) {
free(this);
return NULL;
}
-
+
_x_post_init(&this->post, 1, 0);
init_params.channel = -1;
-
+
pthread_mutex_init (&this->lock, NULL);
set_parameters ((xine_post_t *)&this->post, &init_params);
-
+
port = _x_post_intercept_audio_port(&this->post, audio_target[0], &input, &output);
port->new_port.open = upmix_mono_port_open;
port->new_port.put_buffer = upmix_mono_port_put_buffer;
-
+
input_api = &this->params_input;
input_api->name = "parameters";
input_api->type = XINE_POST_DATA_PARAMETERS;
@@ -337,17 +337,17 @@
void *upmix_mono_init_plugin(xine_t *xine, void *data)
{
post_class_upmix_mono_t *class = (post_class_upmix_mono_t *)xine_xmalloc(sizeof(post_class_upmix_mono_t));
-
+
if (!class)
return NULL;
-
+
class->post_class.open_plugin = upmix_mono_open_plugin;
class->post_class.identifier = "upmix_mono";
class->post_class.description = N_("converts Mono into Stereo");
class->post_class.dispose = default_post_class_dispose;
-
+
class->xine = xine;
-
+
return class;
}
diff --git a/src/post/audio/volnorm.c b/src/post/audio/volnorm.c
--- a/src/post/audio/volnorm.c
+++ b/src/post/audio/volnorm.c
@@ -1,24 +1,24 @@
/*
* Copyright (C) 2000-2008 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
* Volume normalization audio filter for xine. Ported by Jason Tackaberry
- * from MPlayer's af_volnorm, which is copyright 2004 by Alex Beregszaszi
+ * from MPlayer's af_volnorm, which is copyright 2004 by Alex Beregszaszi
* & Pierre Lombard.
*/
@@ -117,7 +117,7 @@
/**************************************************************************
* volnorm parameters functions
*************************************************************************/
-static int set_parameters (xine_post_t *this_gen, void *param_gen)
+static int set_parameters (xine_post_t *this_gen, void *param_gen)
{
post_plugin_volnorm_t *this = (post_plugin_volnorm_t *)this_gen;
volnorm_parameters_t *param = (volnorm_parameters_t *)param_gen;
@@ -129,7 +129,7 @@
return 1;
}
-static int get_parameters (xine_post_t *this_gen, void *param_gen)
+static int get_parameters (xine_post_t *this_gen, void *param_gen)
{
post_plugin_volnorm_t *this = (post_plugin_volnorm_t *)this_gen;
volnorm_parameters_t *param = (volnorm_parameters_t *)param_gen;
@@ -141,12 +141,12 @@
return 1;
}
-static xine_post_api_descr_t * get_param_descr (void)
+static xine_post_api_descr_t * get_param_descr (void)
{
return ¶m_descr;
}
-static char * get_help (void)
+static char * get_help (void)
{
return _("Normalizes audio by maximizing the volume without distorting "
"the sound.\n"
@@ -172,14 +172,14 @@
*************************************************************************/
static int volnorm_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream,
- uint32_t bits, uint32_t rate, int mode)
+ uint32_t bits, uint32_t rate, int mode)
{
post_audio_port_t *port = (post_audio_port_t *)port_gen;
post_plugin_volnorm_t *this = (post_plugin_volnorm_t *)port->post;
_x_post_rewire(&this->post);
_x_post_inc_usage(port);
-
+
port->stream = stream;
port->bits = bits;
port->rate = rate;
@@ -373,10 +373,10 @@
}
-static void volnorm_port_put_buffer (xine_audio_port_t *port_gen,
- audio_buffer_t *buf, xine_stream_t *stream)
+static void volnorm_port_put_buffer (xine_audio_port_t *port_gen,
+ audio_buffer_t *buf, xine_stream_t *stream)
{
-
+
post_audio_port_t *port = (post_audio_port_t *)port_gen;
post_plugin_volnorm_t *this = (post_plugin_volnorm_t *)port->post;
@@ -391,8 +391,8 @@
else if (buf->format.bits == 32)
method2_float(this, buf);
}
- port->original_port->put_buffer(port->original_port, buf, stream );
-
+ port->original_port->put_buffer(port->original_port, buf, stream );
+
return;
}
@@ -416,12 +416,12 @@
post_out_t *output;
xine_post_in_t *input_api;
post_audio_port_t *port;
-
+
if (!this || !audio_target || !audio_target[0] ) {
free(this);
return NULL;
}
-
+
_x_post_init(&this->post, 1, 0);
pthread_mutex_init (&this->lock, NULL);
@@ -453,16 +453,16 @@
void *volnorm_init_plugin(xine_t *xine, void *data)
{
post_class_volnorm_t *class = (post_class_volnorm_t *)xine_xmalloc(sizeof(post_class_volnorm_t));
-
+
if (!class)
return NULL;
-
+
class->post_class.open_plugin = volnorm_open_plugin;
class->post_class.identifier = "volnorm";
class->post_class.description = N_("Normalize volume");
class->post_class.dispose = default_post_class_dispose;
-
+
class->xine = xine;
-
+
return class;
}
diff --git a/src/post/audio/window.c b/src/post/audio/window.c
--- a/src/post/audio/window.c
+++ b/src/post/audio/window.c
@@ -1,5 +1,5 @@
/*=============================================================================
- *
+ *
* This software has been released under the terms of the GNU Public
* license. See http://www.gnu.org/copyleft/gpl.html for details.
*
@@ -39,7 +39,7 @@
/*
* Triang a.k.a Bartlett
*
- * | (N-1)|
+ * | (N-1)|
* 2 * |k - -----|
* | 2 |
* w = 1.0 - ---------------
@@ -53,7 +53,7 @@
_ftype_t k2 = 1/((_ftype_t)n + k1);
int end = (n + 1) >> 1;
int i;
-
+
/* Calculate window coefficients */
for (i=0 ; i<end ; i++)
w[i] = w[n-i-1] = (2.0*((_ftype_t)(i+1))-(1.0-k1))*k2;
@@ -72,7 +72,7 @@
{
int i;
_ftype_t k = 2*M_PI/((_ftype_t)(n+1)); /* 2*pi/(N+1) */
-
+
/* Calculate window coefficients */
for (i=0; i<n; i++)
*w++ = 0.5*(1.0 - cos(k*(_ftype_t)(i+1)));
@@ -131,22 +131,22 @@
int i;
_ftype_t k1 = 2*M_PI/((_ftype_t)(n-1)); /* 2*pi/(N-1) */
_ftype_t k2 = 2*k1; /* 4*pi/(N-1) */
-
+
/* Calculate window coefficients */
for (i=0; i<n; i++)
*w++ = 0.2810638602 - 0.5208971735*cos(k1*(_ftype_t)i) + 0.1980389663*cos(k2*(_ftype_t)i);
}
-/* Computes the 0th order modified Bessel function of the first kind.
- * (Needed to compute Kaiser window)
- *
+/* Computes the 0th order modified Bessel function of the first kind.
+ * (Needed to compute Kaiser window)
+ *
* y = sum( (x/(2*n))^2 )
* n
*/
#define BIZ_EPSILON 1E-21 /* Max error acceptable */
static _ftype_t besselizero(_ftype_t x)
-{
+{
_ftype_t temp;
_ftype_t sum = 1.0;
_ftype_t u = 1.0;
@@ -175,10 +175,10 @@
* Gold (Theory and Application of DSP) under Kaiser windows for more
* about Beta. The following table from Rabiner and Gold gives some
* feel for the effect of Beta:
- *
+ *
* All ripples in dB, width of transition band = D*N where N = window
* length
- *
+ *
* BETA D PB RIP SB RIP
* 2.120 1.50 +-0.27 -30
* 3.384 2.23 0.0864 -40
@@ -195,8 +195,8 @@
_ftype_t k1 = 1.0/besselizero(b);
int k2 = 1 - (n & 1);
int end = (n + 1) >> 1;
- int i;
-
+ int i;
+
/* Calculate window coefficients */
for (i=0 ; i<end ; i++){
tmp = (_ftype_t)(2*i + k2) / ((_ftype_t)n - 1.0);
diff --git a/src/post/audio/window.h b/src/post/audio/window.h
--- a/src/post/audio/window.h
+++ b/src/post/audio/window.h
@@ -1,5 +1,5 @@
/*=============================================================================
- *
+ *
* This software has been released under the terms of the GNU Public
* license. See http://www.gnu.org/copyleft/gpl.html for details.
*
diff --git a/src/post/deinterlace/Makefile.am b/src/post/deinterlace/Makefile.am
--- a/src/post/deinterlace/Makefile.am
+++ b/src/post/deinterlace/Makefile.am
@@ -9,7 +9,7 @@
xinepost_LTLIBRARIES = xineplug_post_tvtime.la
xineplug_post_tvtime_la_SOURCES = xine_plugin.c \
- deinterlace.c pulldown.c speedy.c tvtime.c
+ deinterlace.c pulldown.c speedy.c tvtime.c
xineplug_post_tvtime_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) $(PTHREAD_LIBS) \
$(top_builddir)/src/post/deinterlace/plugins/libdeinterlaceplugins.la
diff --git a/src/post/deinterlace/plugins/Makefile.am b/src/post/deinterlace/plugins/Makefile.am
--- a/src/post/deinterlace/plugins/Makefile.am
+++ b/src/post/deinterlace/plugins/Makefile.am
@@ -37,9 +37,9 @@
if DEBUG_BUILD
debug_sources = greedy2frame.c
-nodebug_sources =
+nodebug_sources =
else
-debug_sources =
+debug_sources =
nodebug_sources = greedy2frame.c
endif
diff --git a/src/post/deinterlace/plugins/greedy.c b/src/post/deinterlace/plugins/greedy.c
--- a/src/post/deinterlace/plugins/greedy.c
+++ b/src/post/deinterlace/plugins/greedy.c
@@ -49,7 +49,7 @@
// upon which give the smaller comb factor, and then clip to avoid large damage
// when wrong.
//
-// I'd intended this to be part of a larger more elaborate method added to
+// I'd intended this to be part of a larger more elaborate method added to
// Blended Clip but this give too good results for the CPU to ignore here.
static void copy_scanline( uint8_t *output,
@@ -135,7 +135,7 @@
paddusb_r2r( mm3, mm2 ); // now = Max(L1,L3)
pcmpeqb_r2r( mm7, mm7 ); // all ffffffff
- psubusb_r2r( mm1, mm7 ); // - L1
+ psubusb_r2r( mm1, mm7 ); // - L1
paddusb_r2r( mm7, mm3 ); // add, may sat at fff..
psubusb_r2r( mm7, mm3 ); // now = Min(L1,L3)
@@ -147,7 +147,7 @@
paddusb_r2r( mm3, mm4 ); // now = Max(best,Min(L1,L3)
pcmpeqb_r2r( mm7, mm7 ); // all ffffffff
- psubusb_r2r( mm4, mm7 ); // - Max(best,Min(best,L3)
+ psubusb_r2r( mm4, mm7 ); // - Max(best,Min(best,L3)
paddusb_r2r( mm7, mm2 ); // add may sat at FFF..
psubusb_r2r( mm7, mm2 ); // now = Min( Max(best, Min(L1,L3), L2 )=L2 clipped
diff --git a/src/post/deinterlace/plugins/greedy2frame_template.c b/src/post/deinterlace/plugins/greedy2frame_template.c
--- a/src/post/deinterlace/plugins/greedy2frame_template.c
+++ b/src/post/deinterlace/plugins/greedy2frame_template.c
@@ -79,9 +79,9 @@
/****************************************************************************
** Field 1 | Field 2 | Field 3 | Field 4 |
-** T0 | | T1 | |
-** | M0 | | M1 |
-** B0 | | B1 | |
+** T0 | | T1 | |
+** | M0 | | M1 |
+** B0 | | B1 | |
*/
@@ -95,13 +95,13 @@
#define MASKS_DEFINED
static const int64_t __attribute__((__used__)) YMask = 0x00ff00ff00ff00ffll;
static const int64_t __attribute__((__used__)) Mask = 0x7f7f7f7f7f7f7f7fll;
- static const int64_t __attribute__((__used__)) DwordOne = 0x0000000100000001ll;
- static const int64_t __attribute__((__used__)) DwordTwo = 0x0000000200000002ll;
+ static const int64_t __attribute__((__used__)) DwordOne = 0x0000000100000001ll;
+ static const int64_t __attribute__((__used__)) DwordTwo = 0x0000000200000002ll;
static int64_t qwGreedyTwoFrameThreshold;
#endif
#if defined(IS_SSE)
-static void DeinterlaceGreedy2Frame_SSE(uint8_t *output, int outstride,
+static void DeinterlaceGreedy2Frame_SSE(uint8_t *output, int outstride,
deinterlace_frame_data_t *data,
int bottom_field, int second_field, int width, int height )
#elif defined(IS_3DNOW)
@@ -133,7 +133,7 @@
qwGreedyTwoFrameThreshold = GreedyTwoFrameThreshold;
qwGreedyTwoFrameThreshold += (GreedyTwoFrameThreshold2 << 8);
qwGreedyTwoFrameThreshold += (qwGreedyTwoFrameThreshold << 48) +
- (qwGreedyTwoFrameThreshold << 32) +
+ (qwGreedyTwoFrameThreshold << 32) +
(qwGreedyTwoFrameThreshold << 16);
@@ -148,7 +148,7 @@
M0 = data->f1;
T0 = data->f2;
}
-
+
if( bottom_field ) {
M1 += stride;
T1 += 0;
@@ -192,9 +192,9 @@
"movq %2, %%mm3 \n\t" // B1
"movq %3, %%mm2 \n\t" // M0
: /* no output */
- : "m" (*T1), "m" (*M1),
+ : "m" (*T1), "m" (*M1),
"m" (*B1), "m" (*M0), "m" (Mask) );
-
+
asm volatile(
/* Figure out what to do with the scanline above the one we just copied.
@@ -269,7 +269,7 @@
"pcmpgtb %3, %%mm5 \n\t"
"pand %%mm6, %%mm5 \n\t" /* get rid of sign bit */
- "pcmpgtd %5, %%mm5 \n\t"
+ "pcmpgtd %5, %%mm5 \n\t"
"pandn %5, %%mm5 \n\t"
"paddd %%mm5, %%mm4 \n\t"
@@ -305,9 +305,9 @@
"movq %%mm4, %%mm5 \n\t"
/* mm4 now is 1 where we want to weave and 0 where we want to bob */
- "pand %%mm0, %%mm4 \n\t"
- "pandn %%mm7, %%mm5 \n\t"
- "por %%mm5, %%mm4 \n\t"
+ "pand %%mm0, %%mm4 \n\t"
+ "pandn %%mm7, %%mm5 \n\t"
+ "por %%mm5, %%mm4 \n\t"
#ifdef IS_SSE
"movntq %%mm4, %0 \n\t"
#else
@@ -351,9 +351,9 @@
}
else
{
- xine_fast_memcpy(Dest, T1, stride);
+ xine_fast_memcpy(Dest, T1, stride);
}
-
+
/* clear out the MMX registers ready for doing floating point again */
asm("emms\n\t");
#endif
diff --git a/src/post/deinterlace/plugins/greedyhmacros.h b/src/post/deinterlace/plugins/greedyhmacros.h
--- a/src/post/deinterlace/plugins/greedyhmacros.h
+++ b/src/post/deinterlace/plugins/greedyhmacros.h
@@ -15,7 +15,7 @@
//
/////////////////////////////////////////////////////////////////////////////
-// Define a few macros for CPU dependent instructions.
+// Define a few macros for CPU dependent instructions.
// I suspect I don't really understand how the C macro preprocessor works but
// this seems to get the job done. // TRB 7/01
@@ -35,9 +35,9 @@
"paddusb "mmrw", "mmr1"\n\t"
#define V_PAVGB_SSE(mmr1, mmr2, mmrw, smask) "pavgb "mmr2", "mmr1"\n\t"
#define V_PAVGB_3DNOW(mmr1, mmr2, mmrw, smask) "pavgusb "mmr2", "mmr1"\n\t"
-#define V_PAVGB(mmr1, mmr2, mmrw, smask) V_PAVGB2(mmr1, mmr2, mmrw, smask, SSE_TYPE)
-#define V_PAVGB2(mmr1, mmr2, mmrw, smask, ssetyp) V_PAVGB3(mmr1, mmr2, mmrw, smask, ssetyp)
-#define V_PAVGB3(mmr1, mmr2, mmrw, smask, ssetyp) V_PAVGB_##ssetyp(mmr1, mmr2, mmrw, smask)
+#define V_PAVGB(mmr1, mmr2, mmrw, smask) V_PAVGB2(mmr1, mmr2, mmrw, smask, SSE_TYPE)
+#define V_PAVGB2(mmr1, mmr2, mmrw, smask, ssetyp) V_PAVGB3(mmr1, mmr2, mmrw, smask, ssetyp)
+#define V_PAVGB3(mmr1, mmr2, mmrw, smask, ssetyp) V_PAVGB_##ssetyp(mmr1, mmr2, mmrw, smask)
// some macros for pmaxub instruction
#define V_PMAXUB_MMX(mmr1, mmr2) \
@@ -45,9 +45,9 @@
"paddusb "mmr2", "mmr1"\n\t"
#define V_PMAXUB_SSE(mmr1, mmr2) "pmaxub "mmr2", "mmr1"\n\t"
#define V_PMAXUB_3DNOW(mmr1, mmr2) V_PMAXUB_MMX(mmr1, mmr2) // use MMX version
-#define V_PMAXUB(mmr1, mmr2) V_PMAXUB2(mmr1, mmr2, SSE_TYPE)
-#define V_PMAXUB2(mmr1, mmr2, ssetyp) V_PMAXUB3(mmr1, mmr2, ssetyp)
-#define V_PMAXUB3(mmr1, mmr2, ssetyp) V_PMAXUB_##ssetyp(mmr1, mmr2)
+#define V_PMAXUB(mmr1, mmr2) V_PMAXUB2(mmr1, mmr2, SSE_TYPE)
+#define V_PMAXUB2(mmr1, mmr2, ssetyp) V_PMAXUB3(mmr1, mmr2, ssetyp)
+#define V_PMAXUB3(mmr1, mmr2, ssetyp) V_PMAXUB_##ssetyp(mmr1, mmr2)
// some macros for pminub instruction
// V_PMINUB(mmr1, mmr2, mmr work register) mmr2 may NOT = mmrw
@@ -58,17 +58,17 @@
"psubusb "mmrw", "mmr1"\n\t"
#define V_PMINUB_SSE(mmr1, mmr2, mmrw) "pminub "mmr2", "mmr1"\n\t"
#define V_PMINUB_3DNOW(mmr1, mmr2, mmrw) V_PMINUB_MMX(mmr1, mmr2, mmrw) // use MMX version
-#define V_PMINUB(mmr1, mmr2, mmrw) V_PMINUB2(mmr1, mmr2, mmrw, SSE_TYPE)
-#define V_PMINUB2(mmr1, mmr2, mmrw, ssetyp) V_PMINUB3(mmr1, mmr2, mmrw, ssetyp)
-#define V_PMINUB3(mmr1, mmr2, mmrw, ssetyp) V_PMINUB_##ssetyp(mmr1, mmr2, mmrw)
+#define V_PMINUB(mmr1, mmr2, mmrw) V_PMINUB2(mmr1, mmr2, mmrw, SSE_TYPE)
+#define V_PMINUB2(mmr1, mmr2, mmrw, ssetyp) V_PMINUB3(mmr1, mmr2, mmrw, ssetyp)
+#define V_PMINUB3(mmr1, mmr2, mmrw, ssetyp) V_PMINUB_##ssetyp(mmr1, mmr2, mmrw)
// some macros for movntq instruction
-// V_MOVNTQ(mmr1, mmr2)
+// V_MOVNTQ(mmr1, mmr2)
#define V_MOVNTQ_MMX(mmr1, mmr2) "movq "mmr2", "mmr1"\n\t"
#define V_MOVNTQ_3DNOW(mmr1, mmr2) "movq "mmr2", "mmr1"\n\t"
#define V_MOVNTQ_SSE(mmr1, mmr2) "movntq "mmr2", "mmr1"\n\t"
-#define V_MOVNTQ(mmr1, mmr2) V_MOVNTQ2(mmr1, mmr2, SSE_TYPE)
-#define V_MOVNTQ2(mmr1, mmr2, ssetyp) V_MOVNTQ3(mmr1, mmr2, ssetyp)
+#define V_MOVNTQ(mmr1, mmr2) V_MOVNTQ2(mmr1, mmr2, SSE_TYPE)
+#define V_MOVNTQ2(mmr1, mmr2, ssetyp) V_MOVNTQ3(mmr1, mmr2, ssetyp)
#define V_MOVNTQ3(mmr1, mmr2, ssetyp) V_MOVNTQ_##ssetyp(mmr1, mmr2)
// end of macros
diff --git a/src/post/deinterlace/plugins/linearblend.c b/src/post/deinterlace/plugins/linearblend.c
--- a/src/post/deinterlace/plugins/linearblend.c
+++ b/src/post/deinterlace/plugins/linearblend.c
@@ -255,7 +255,7 @@
uint8_t *b1 = data->b1;
int i;
-
+
READ_PREFETCH_2048( t1 );
READ_PREFETCH_2048( b1 );
READ_PREFETCH_2048( m0 );
diff --git a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h
--- a/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h
+++ b/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h
@@ -8,7 +8,7 @@
#define MyMemCopy xine_fast_memcpy
-// Define a few macros for CPU dependent instructions.
+// Define a few macros for CPU dependent instructions.
// I suspect I don't really understand how the C macro preprocessor works but
// this seems to get the job done. // TRB 7/01
@@ -28,9 +28,9 @@
"paddusb "mmrw", "mmr1"\n\t"
#define V_PAVGB_SSE(mmr1, mmr2, mmrw, smask) "pavgb "mmr2", "mmr1"\n\t"
#define V_PAVGB_3DNOW(mmr1, mmr2, mmrw, smask) "pavgusb "mmr2", "mmr1"\n\t"
-#define V_PAVGB(mmr1, mmr2, mmrw, smask) V_PAVGB2(mmr1, mmr2, mmrw, smask, SSE_TYPE)
-#define V_PAVGB2(mmr1, mmr2, mmrw, smask, ssetyp) V_PAVGB3(mmr1, mmr2, mmrw, smask, ssetyp)
-#define V_PAVGB3(mmr1, mmr2, mmrw, smask, ssetyp) V_PAVGB_##ssetyp(mmr1, mmr2, mmrw, smask)
+#define V_PAVGB(mmr1, mmr2, mmrw, smask) V_PAVGB2(mmr1, mmr2, mmrw, smask, SSE_TYPE)
+#define V_PAVGB2(mmr1, mmr2, mmrw, smask, ssetyp) V_PAVGB3(mmr1, mmr2, mmrw, smask, ssetyp)
+#define V_PAVGB3(mmr1, mmr2, mmrw, smask, ssetyp) V_PAVGB_##ssetyp(mmr1, mmr2, mmrw, smask)
// some macros for pmaxub instruction
#define V_PMAXUB_MMX(mmr1, mmr2) \
@@ -38,9 +38,9 @@
"paddusb "mmr2", "mmr1"\n\t"
#define V_PMAXUB_SSE(mmr1, mmr2) "pmaxub "mmr2", "mmr1"\n\t"
#define V_PMAXUB_3DNOW(mmr1, mmr2) V_PMAXUB_MMX(mmr1, mmr2) // use MMX version
-#define V_PMAXUB(mmr1, mmr2) V_PMAXUB2(mmr1, mmr2, SSE_TYPE)
-#define V_PMAXUB2(mmr1, mmr2, ssetyp) V_PMAXUB3(mmr1, mmr2, ssetyp)
-#define V_PMAXUB3(mmr1, mmr2, ssetyp) V_PMAXUB_##ssetyp(mmr1, mmr2)
+#define V_PMAXUB(mmr1, mmr2) V_PMAXUB2(mmr1, mmr2, SSE_TYPE)
+#define V_PMAXUB2(mmr1, mmr2, ssetyp) V_PMAXUB3(mmr1, mmr2, ssetyp)
+#define V_PMAXUB3(mmr1, mmr2, ssetyp) V_PMAXUB_##ssetyp(mmr1, mmr2)
// some macros for pminub instruction
// V_PMINUB(mmr1, mmr2, mmr work register) mmr2 may NOT = mmrw
@@ -51,17 +51,17 @@
"psubusb "mmrw", "mmr1"\n\t"
#define V_PMINUB_SSE(mmr1, mmr2, mmrw) "pminub "mmr2", "mmr1"\n\t"
#define V_PMINUB_3DNOW(mmr1, mmr2, mmrw) V_PMINUB_MMX(mmr1, mmr2, mmrw) // use MMX version
-#define V_PMINUB(mmr1, mmr2, mmrw) V_PMINUB2(mmr1, mmr2, mmrw, SSE_TYPE)
-#define V_PMINUB2(mmr1, mmr2, mmrw, ssetyp) V_PMINUB3(mmr1, mmr2, mmrw, ssetyp)
-#define V_PMINUB3(mmr1, mmr2, mmrw, ssetyp) V_PMINUB_##ssetyp(mmr1, mmr2, mmrw)
+#define V_PMINUB(mmr1, mmr2, mmrw) V_PMINUB2(mmr1, mmr2, mmrw, SSE_TYPE)
+#define V_PMINUB2(mmr1, mmr2, mmrw, ssetyp) V_PMINUB3(mmr1, mmr2, mmrw, ssetyp)
+#define V_PMINUB3(mmr1, mmr2, mmrw, ssetyp) V_PMINUB_##ssetyp(mmr1, mmr2, mmrw)
// some macros for movntq instruction
-// V_MOVNTQ(mmr1, mmr2)
+// V_MOVNTQ(mmr1, mmr2)
#define V_MOVNTQ_MMX(mmr1, mmr2) "movq "mmr2", "mmr1"\n\t"
#define V_MOVNTQ_3DNOW(mmr1, mmr2) "movq "mmr2", "mmr1"\n\t"
#define V_MOVNTQ_SSE(mmr1, mmr2) "movntq "mmr2", "mmr1"\n\t"
-#define V_MOVNTQ(mmr1, mmr2) V_MOVNTQ2(mmr1, mmr2, SSE_TYPE)
-#define V_MOVNTQ2(mmr1, mmr2, ssetyp) V_MOVNTQ3(mmr1, mmr2, ssetyp)
+#define V_MOVNTQ(mmr1, mmr2) V_MOVNTQ2(mmr1, mmr2, SSE_TYPE)
+#define V_MOVNTQ2(mmr1, mmr2, ssetyp) V_MOVNTQ3(mmr1, mmr2, ssetyp)
#define V_MOVNTQ3(mmr1, mmr2, ssetyp) V_MOVNTQ_##ssetyp(mmr1, mmr2)
// end of macros
diff --git a/src/post/deinterlace/pulldown.c b/src/post/deinterlace/pulldown.c
--- a/src/post/deinterlace/pulldown.c
+++ b/src/post/deinterlace/pulldown.c
@@ -47,7 +47,7 @@
* Bot 2 : Drop
* Top 3 : Merge
* Bot 3 : Drop
- * Top 4 : Show
+ * Top 4 : Show
* Bot 4 : Drop
* Top 5 : Drop
* Bot 5 : Show
@@ -69,15 +69,15 @@
*
* [ ]
* [ * *] | 0 top BC
- * [* * ] | 1 BC bottom BC
+ * [* * ] | 1 BC bottom BC
*
* [ ]
* [ * *] | 0 top CC
- * [ * *] | 0 CC bottom CC
+ * [ * *] | 0 CC bottom CC
*
* [ ]
* [* * ] | 1 top DD
- * [ * *] | 0 DD bottom DD
+ * [ * *] | 0 DD bottom DD
*
*
* [* * ] | 1 top AA
@@ -608,7 +608,7 @@
if( action == PULLDOWN_SEQ_CC && !bottom_field )
ret = 0;
if( action == PULLDOWN_SEQ_DD && bottom_field )
- ret = 0;
+ ret = 0;
return ret;
}
diff --git a/src/post/deinterlace/speedy.c b/src/post/deinterlace/speedy.c
--- a/src/post/deinterlace/speedy.c
+++ b/src/post/deinterlace/speedy.c
@@ -117,11 +117,11 @@
uint8_t *background, int width,
int a, int luma, int cb, int cr,
int percentage );
-void (*packed444_to_nonpremultiplied_packed4444_scanline)( uint8_t *output,
+void (*packed444_to_nonpremultiplied_packed4444_scanline)( uint8_t *output,
uint8_t *input,
int width, int alpha );
void (*aspect_adjust_packed4444_scanline)( uint8_t *output,
- uint8_t *input,
+ uint8_t *input,
int width,
double pixel_aspect );
void (*packed444_to_packed422_scanline)( uint8_t *output,
@@ -623,7 +623,7 @@
paddw_r2r( mm1, mm2 );
psllw_i2r( 6, mm2 );
- pand_r2r( mm6, mm2 );
+ pand_r2r( mm6, mm2 );
por_r2r ( mm3, mm2 );
@@ -638,7 +638,7 @@
*output = (*t + *b + (*m << 1)) >> 2;
output+=2; t+=2; b+=2; m+=2;
}
-
+
emms();
}
#endif
@@ -662,7 +662,7 @@
const mmx_t cmask = { 0xff00ff00ff00ff00ULL };
// Get width in bytes.
- width *= 2;
+ width *= 2;
i = width / 8;
width -= i * 8;
@@ -1940,7 +1940,7 @@
static int myround(double n)
{
- if (n >= 0)
+ if (n >= 0)
return (int)(n + 0.5);
else
return (int)(n - 0.5);
@@ -1957,7 +1957,7 @@
* to one of each, add the following:
* + (fixed-point-factor / 2) --- for rounding later
* + (Q-offset * fixed-point-factor) --- to add the offset
- *
+ *
*/
for (i = 0; i < 256; i++) {
Y_R[i] = myround(0.299 * (double)i * 219.0 / 255.0 * (double)(1<<FP_BITS));
@@ -1989,7 +1989,7 @@
* to one of each, add the following:
* + (fixed-point-factor / 2) --- for rounding later
* + (Q-offset * fixed-point-factor) --- to add the offset
- *
+ *
*/
/* clip Y values under 16 */
@@ -2006,7 +2006,7 @@
RGB_Y[i] = myround((1.0 * (double)(235) * 255.0 / 219.0 * (double)(1<<FP_BITS))
+ (double)(1<<(FP_BITS-1)));
}
-
+
/* clip Cb/Cr values below 16 */
for (i = 0; i < 16; i++) {
R_Cr[i] = myround(1.402 * (double)(-112) * 255.0 / 224.0 * (double)(1<<FP_BITS));
@@ -2056,7 +2056,7 @@
int g = input[ 1 ];
int b = input[ 2 ];
int a = input[ 3 ];
-
+
output[ 0 ] = a;
output[ 1 ] = (Y_R[ r ] + Y_G[ g ] + Y_B[ b ]) >> FP_BITS;
output[ 2 ] = (Cb_R[ r ] + Cb_G[ g ] + Cb_B[ b ]) >> FP_BITS;
@@ -2129,7 +2129,7 @@
}
*/
-static void packed444_to_nonpremultiplied_packed4444_scanline_c( uint8_t *output,
+static void packed444_to_nonpremultiplied_packed4444_scanline_c( uint8_t *output,
uint8_t *input,
int width, int alpha )
{
@@ -2147,7 +2147,7 @@
}
static void aspect_adjust_packed4444_scanline_c( uint8_t *output,
- uint8_t *input,
+ uint8_t *input,
int width,
double pixel_aspect )
{
@@ -2260,7 +2260,7 @@
/* odd samples (21 -52 159 159 -52 21) */
dst[ i2 + 1 ] = clip255( ( 21*(src[im2]+src[ip3])
- - 52*(src[im1]+src[ip2])
+ - 52*(src[im1]+src[ip2])
+ 159*(src[i]+src[ip1]) + 128 ) >> 8 );
}
src += w;
diff --git a/src/post/deinterlace/speedy.h b/src/post/deinterlace/speedy.h
--- a/src/post/deinterlace/speedy.h
+++ b/src/post/deinterlace/speedy.h
@@ -237,7 +237,7 @@
* Simple function to convert a 4:4:4 scanline to a 4:4:4:4 scanline by
* adding an alpha channel. Result is non-premultiplied.
*/
-extern void (*packed444_to_nonpremultiplied_packed4444_scanline)( uint8_t *output,
+extern void (*packed444_to_nonpremultiplied_packed4444_scanline)( uint8_t *output,
uint8_t *input,
int width, int alpha );
@@ -248,7 +248,7 @@
* aspect ratio.
*/
extern void (*aspect_adjust_packed4444_scanline)( uint8_t *output,
- uint8_t *input,
+ uint8_t *input,
int width,
double pixel_aspect );
diff --git a/src/post/deinterlace/tvtime.h b/src/post/deinterlace/tvtime.h
--- a/src/post/deinterlace/tvtime.h
+++ b/src/post/deinterlace/tvtime.h
@@ -98,4 +98,4 @@
void tvtime_reset_context( tvtime_t *this );
-#endif
+#endif
diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c
--- a/src/post/deinterlace/xine_plugin.c
+++ b/src/post/deinterlace/xine_plugin.c
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2000-2004 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
@@ -50,7 +50,7 @@
static const post_info_t deinterlace_special_info = { XINE_POST_TYPE_VIDEO_FILTER };
const plugin_info_t xine_plugin_info[] EXPORTED = {
- /* type, API, "name", version, special_info, init_function */
+ /* type, API, "name", version, special_info, init_function */
{ PLUGIN_POST | PLUGIN_MUST_PRELOAD, 10, "tvtime", XINE_VERSION_CODE, &deinterlace_special_info, &deinterlace_init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
@@ -66,7 +66,7 @@
static void *help_string;
/*
- * this is the struct used by "parameters api"
+ * this is the struct used by "parameters api"
*/
typedef struct deinterlace_parameters_s {
@@ -86,15 +86,15 @@
* description of params struct
*/
START_PARAM_DESCR( deinterlace_parameters_t )
-PARAM_ITEM( POST_PARAM_TYPE_INT, method, enum_methods, 0, 0, 0,
+PARAM_ITEM( POST_PARAM_TYPE_INT, method, enum_methods, 0, 0, 0,
"deinterlace method" )
PARAM_ITEM( POST_PARAM_TYPE_BOOL, enabled, NULL, 0, 1, 0,
"enable/disable" )
-PARAM_ITEM( POST_PARAM_TYPE_INT, pulldown, enum_pulldown, 0, 0, 0,
+PARAM_ITEM( POST_PARAM_TYPE_INT, pulldown, enum_pulldown, 0, 0, 0,
"pulldown algorithm" )
-PARAM_ITEM( POST_PARAM_TYPE_INT, pulldown_error_wait, NULL, 0, 0, 0,
+PARAM_ITEM( POST_PARAM_TYPE_INT, pulldown_error_wait, NULL, 0, 0, 0,
"number of frames of telecine pattern sync required before mode change" )
-PARAM_ITEM( POST_PARAM_TYPE_INT, framerate_mode, enum_framerate, 0, 0, 0,
+PARAM_ITEM( POST_PARAM_TYPE_INT, framerate_mode, enum_framerate, 0, 0, 0,
"framerate output mode" )
PARAM_ITEM( POST_PARAM_TYPE_BOOL, judder_correction, NULL, 0, 1, 0,
"make frames evenly spaced for film mode (24 fps)" )
@@ -129,7 +129,7 @@
int tvtime_changed;
int tvtime_last_filmmode;
int vo_deinterlace_enabled;
-
+
int framecounter;
uint8_t rff_pattern;
@@ -144,10 +144,10 @@
deinterlace_parameters_t init_param;
} post_class_deinterlace_t;
-static void _flush_frames(post_plugin_deinterlace_t *this)
+static void _flush_frames(post_plugin_deinterlace_t *this)
{
int i;
-
+
for( i = 0; i < NUM_RECENT_FRAMES; i++ ) {
if( this->recent_frame[i] ) {
this->recent_frame[i]->free(this->recent_frame[i]);
@@ -189,7 +189,7 @@
static int get_parameters (xine_post_t *this_gen, void *param_gen) {
post_plugin_deinterlace_t *this = (post_plugin_deinterlace_t *)this_gen;
deinterlace_parameters_t *param = (deinterlace_parameters_t *)param_gen;
-
+
param->method = this->cur_method;
param->enabled = this->enabled;
param->pulldown = this->pulldown;
@@ -202,7 +202,7 @@
return 1;
}
-
+
static xine_post_api_descr_t * get_param_descr (void) {
return ¶m_descr;
}
@@ -307,7 +307,7 @@
if (!class)
return NULL;
-
+
class->class.open_plugin = deinterlace_open_plugin;
class->class.identifier = "tvtime";
class->class.description = N_("advanced deinterlacer plugin with pulldown detection");
@@ -329,7 +329,7 @@
filter_deinterlace_methods( config_flags, 5 /*fieldsavailable*/ );
if( !get_num_deinterlace_methods() ) {
- xprintf(xine, XINE_VERBOSITY_LOG,
+ xprintf(xine, XINE_VERBOSITY_LOG,
_("tvtime: No deinterlacing methods available, exiting.\n"));
return NULL;
}
@@ -342,7 +342,7 @@
deinterlace_method_t *method;
method = get_deinterlace_method(i);
-
+
[... 353 lines omitted ...]
- frame->base[1], frame->pitches[1],
- frame->base[2], frame->pitches[2],
+ yv12_to_yuy2(frame->base[0], frame->pitches[0],
+ frame->base[1], frame->pitches[1],
+ frame->base[2], frame->pitches[2],
yuy2_frame->base[0], yuy2_frame->pitches[0],
- frame->width, frame->height,
+ frame->width, frame->height,
frame->progressive_frame || progressive );
-
+
} else {
yuy2_frame = frame;
yuy2_frame->lock(yuy2_frame);
@@ -781,10 +781,10 @@
pthread_mutex_lock (&this->lock);
/* check if frame format changed */
for(i = 0; i < NUM_RECENT_FRAMES; i++ ) {
- if( this->recent_frame[i] &&
- (this->recent_frame[i]->width != frame->width ||
- this->recent_frame[i]->height != frame->height ||
- this->recent_frame[i]->format != yuy2_frame->format ) ) {
+ if( this->recent_frame[i] &&
+ (this->recent_frame[i]->width != frame->width ||
+ this->recent_frame[i]->height != frame->height ||
+ this->recent_frame[i]->format != yuy2_frame->format ) ) {
this->recent_frame[i]->free(this->recent_frame[i]);
this->recent_frame[i] = NULL;
}
@@ -797,10 +797,10 @@
framerate_mode = FRAMERATE_HALF_TFF;
this->tvtime->pulldown_alg = PULLDOWN_NONE;
}
-
+
if( framerate_mode == FRAMERATE_FULL ) {
int top_field_first = frame->top_field_first;
-
+
/* if i understood mpeg2 specs correctly, top_field_first
* shall be zero for field pictures and the output order
* is the same that the fields are decoded.
@@ -812,7 +812,7 @@
if ( (frame->flags & VO_BOTH_FIELDS) != VO_BOTH_FIELDS ) {
top_field_first = (frame->flags & VO_TOP_FIELD) ? 1 : 0;
}
-
+
if ( top_field_first ) {
fields[0] = 0;
fields[1] = 1;
@@ -825,8 +825,8 @@
} else if ( framerate_mode == FRAMERATE_HALF_BFF ) {
fields[0] = 1;
}
-
-
+
+
if( progressive ) {
/* If the previous field was interlaced and this one is progressive
@@ -838,10 +838,10 @@
* duration is used in the calculation because the generated frame
* represents the second half of the previous frame.
*/
- if (this->recent_frame[0] && !this->recent_frame[0]->progressive_frame &&
+ if (this->recent_frame[0] && !this->recent_frame[0]->progressive_frame &&
this->tvtime->curmethod->delaysfield)
{
- skip = deinterlace_build_output_field(
+ skip = deinterlace_build_output_field(
this, port, stream,
frame, yuy2_frame,
fields[0], 0,
@@ -867,19 +867,19 @@
/* Build the output from the first field. */
if ( !(this->recent_frame[0] && this->recent_frame[0]->progressive_frame &&
this->tvtime->curmethod->delaysfield) ) {
- skip = deinterlace_build_output_field(
+ skip = deinterlace_build_output_field(
this, port, stream,
frame, yuy2_frame,
fields[0], 0,
frame->pts,
(framerate_mode == FRAMERATE_FULL) ? frame->duration/2 : frame->duration,
0);
- }
+ }
if( framerate_mode == FRAMERATE_FULL ) {
-
+
/* Build the output from the second field. */
- skip = deinterlace_build_output_field(
+ skip = deinterlace_build_output_field(
this, port, stream,
frame, yuy2_frame,
fields[1], 1,
@@ -889,7 +889,7 @@
}
}
- /* don't drop frames when pulldown mode is enabled. otherwise
+ /* don't drop frames when pulldown mode is enabled. otherwise
* pulldown detection fails (yo-yo effect has also been seen)
*/
if( this->pulldown )
@@ -897,7 +897,7 @@
/* store back progressive flag for frame history */
yuy2_frame->progressive_frame = progressive;
-
+
/* keep track of recent frames */
i = NUM_RECENT_FRAMES-1;
if( this->recent_frame[i] )
@@ -918,8 +918,8 @@
} else {
skip = frame->draw(frame, stream);
}
-
+
_x_post_frame_copy_up(orig_frame, frame);
-
+
return skip;
}
diff --git a/src/post/goom/xine_goom.c b/src/post/goom/xine_goom.c
--- a/src/post/goom/xine_goom.c
+++ b/src/post/goom/xine_goom.c
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2000-2004 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
@@ -71,19 +71,19 @@
/* private data */
xine_video_port_t *vo_port;
post_out_t video_output;
-
+
post_class_goom_t *class;
-
+
/* private metronom for syncing the video */
metronom_t *metronom;
-
+
/* goom context */
PluginInfo *goom;
-
- int data_idx;
+
+ int data_idx;
gint16 data [2][NUMSAMPLES];
audio_buffer_t buf; /* dummy buffer just to hold a copy of audio data */
-
+
int channels;
int sample_rate;
int samples_per_frame;
@@ -99,7 +99,7 @@
yuv_planes_t yuv;
-
+
/* frame skipping */
int skip_frame;
};
@@ -110,12 +110,12 @@
/* plugin catalog information */
-static const post_info_t goom_special_info = {
+static const post_info_t goom_special_info = {
XINE_POST_TYPE_AUDIO_VISUALIZATION
};
const plugin_info_t xine_plugin_info[] EXPORTED = {
- /* type, API, "name", version, special_info, init_function */
+ /* type, API, "name", version, special_info, init_function */
{ PLUGIN_POST | PLUGIN_MUST_PRELOAD, 10, "goom", XINE_VERSION_CODE, &goom_special_info, &goom_init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
@@ -142,7 +142,7 @@
static void fps_changed_cb(void *data, xine_cfg_entry_t *cfg) {
post_class_goom_t *class = (post_class_goom_t*) data;
-
+
if(class->ip) {
post_plugin_goom_t *this = class->ip;
@@ -158,7 +158,7 @@
static void width_changed_cb(void *data, xine_cfg_entry_t *cfg) {
post_class_goom_t *class = (post_class_goom_t*) data;
-
+
if(class->ip) {
post_plugin_goom_t *this = class->ip;
this->width = cfg->num_value;
@@ -167,7 +167,7 @@
static void height_changed_cb(void *data, xine_cfg_entry_t *cfg) {
post_class_goom_t *class = (post_class_goom_t*) data;
-
+
if(class->ip) {
post_plugin_goom_t *this = class->ip;
this->height = cfg->num_value;
@@ -176,7 +176,7 @@
static void csc_method_changed_cb(void *data, xine_cfg_entry_t *cfg) {
post_class_goom_t *class = (post_class_goom_t*) data;
-
+
if(class->ip) {
post_plugin_goom_t *this = class->ip;
this->csc_method = cfg->num_value;
@@ -190,14 +190,14 @@
if (!this)
return NULL;
-
+
this->class.open_plugin = goom_open_plugin;
this->class.identifier = "goom";
this->class.description = N_("What a GOOM");
this->class.dispose = goom_class_dispose;
this->ip = NULL;
this->xine = xine;
-
+
cfg = xine->config;
[... 134 lines omitted ...]
@@ -395,18 +395,18 @@
free_yuv_planes(&this->yuv);
port->stream = NULL;
-
+
this->vo_port->close(this->vo_port, XINE_ANON_STREAM);
this->metronom->set_master(this->metronom, NULL);
-
+
port->original_port->close(port->original_port, stream );
-
+
_x_post_dec_usage(port);
}
-static void goom_port_put_buffer (xine_audio_port_t *port_gen,
+static void goom_port_put_buffer (xine_audio_port_t *port_gen,
audio_buffer_t *buf, xine_stream_t *stream) {
-
+
post_audio_port_t *port = (post_audio_port_t *)port_gen;
post_plugin_goom_t *this = (post_plugin_goom_t *)port->post;
vo_frame_t *frame;
@@ -419,28 +419,28 @@
int width, height;
int current_sample = 0;
-
+
/* make a copy of buf data for private use */
if( this->buf.mem_size < buf->mem_size ) {
this->buf.mem = realloc(this->buf.mem, buf->mem_size);
this->buf.mem_size = buf->mem_size;
}
- memcpy(this->buf.mem, buf->mem,
+ memcpy(this->buf.mem, buf->mem,
buf->num_frames*this->channels*((port->bits == 8)?1:2));
this->buf.num_frames = buf->num_frames;
-
+
/* pass data to original port */
- port->original_port->put_buffer(port->original_port, buf, stream);
-
+ port->original_port->put_buffer(port->original_port, buf, stream);
+
/* we must not use original data anymore, it should have already being moved
* to the fifo of free audio buffers. just use our private copy instead.
*/
- buf = &this->buf;
+ buf = &this->buf;
j = (this->channels >= 2) ? 1 : 0;
while (current_sample < buf->num_frames) {
-
+
if (this->do_samples_skip) {
if (current_sample + this->left_to_read > buf->num_frames) {
this->left_to_read -= (buf->num_frames-current_sample);
@@ -449,14 +449,14 @@
current_sample+=this->left_to_read;
this->left_to_read = NUMSAMPLES;
this->do_samples_skip = 0;
-
+
}
} else {
if( port->bits == 8 ) {
data8 = (int8_t *)buf->mem;
data8 += current_sample * this->channels;
-
+
/* scale 8 bit data to 16 bits and convert to signed as well */
for ( i=current_sample ; this->data_idx < NUMSAMPLES && i < buf->num_frames;
i++, this->data_idx++,data8 += this->channels) {
@@ -495,13 +495,13 @@
frame = this->vo_port->get_frame (this->vo_port, this->width_back, this->height_back,
this->ratio, XINE_IMGFMT_YUY2,
VO_BOTH_FIELDS);
-
+
frame->extra_info->invalid = 1;
-
+
frame->duration = 90000 * this->samples_per_frame / this->sample_rate;
frame->pts = pts;
this->metronom->got_video_frame(this->metronom, frame);
-
+
if (!this->skip_frame) {
/* Try to be fast */
goom_frame = (uint8_t *)goom_update (this->goom, this->data, 0, 0, NULL, NULL);
@@ -509,13 +509,13 @@
dest_ptr = frame -> base[0];
goom_frame_end = goom_frame + 4 * (this->width_back * this->height_back);
- if ((this->csc_method == 1) &&
+ if ((this->csc_method == 1) &&
(xine_mm_accel() & MM_ACCEL_X86_MMX)) {
int plane_ptr = 0;
while (goom_frame < goom_frame_end) {
uint8_t r, g, b;
-
+
/* don't take endianness into account since MMX is only available
* on Intel processors */
b = *goom_frame; goom_frame++;
@@ -551,7 +551,7 @@
g2 = *goom_frame; goom_frame++;
r2 = *goom_frame; goom_frame += 2;
#endif
-
+
*dest_ptr = COMPUTE_Y(r1, g1, b1);
dest_ptr++;
*dest_ptr = COMPUTE_U(r1, g1, b1);
@@ -573,7 +573,7 @@
}
frame->free(frame);
-
+
width = this->width;
height = this->height;
if ((width != this->width_back) || (height != this->height_back)) {
diff --git a/src/post/mosaico/mosaico.c b/src/post/mosaico/mosaico.c
--- a/src/post/mosaico/mosaico.c
+++ b/src/post/mosaico/mosaico.c
@@ -1,23 +1,23 @@
/*
* Copyright (C) 2000-2004 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*/
-
+
/*
* simple video mosaico plugin
*/
@@ -44,7 +44,7 @@
static const post_info_t mosaico_special_info = { XINE_POST_TYPE_VIDEO_COMPOSE };
const plugin_info_t xine_plugin_info[] EXPORTED = {
- /* type, API, "name", version, special_info, init_function */
+ /* type, API, "name", version, special_info, init_function */
{ PLUGIN_POST, 10, "mosaico", XINE_VERSION_CODE, &mosaico_special_info, &mosaico_init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
@@ -84,9 +84,9 @@
};
struct post_mosaico_s {
- post_plugin_t post;
+ post_plugin_t post;
xine_post_in_t parameter_input;
-
+
mosaico_pip_t *pip;
int64_t vpts_limit;
pthread_cond_t vpts_limit_changed;
@@ -127,7 +127,7 @@
if (!this)
return NULL;
-
+
this->class.open_plugin = mosaico_open_plugin;
this->class.identifier = "mosaico";
this->class.description = N_("Mosaico is a picture in picture (pip) post plugin");
@@ -146,17 +146,17 @@
xine_post_in_t *input_api;
post_out_t *output;
post_video_port_t *port;
- static xine_post_api_t post_api =
+ static xine_post_api_t post_api =
{ mosaico_set_parameters, mosaico_get_parameters, mosaico_get_param_descr, mosaico_get_help };
int i;
-
+
lprintf("mosaico open\n");
if (inputs < 2 || !this || !video_target || !video_target[0]) {
free(this);
return NULL;
}
-
+
_x_post_init(&this->post, 0, inputs);
this->pip = (mosaico_pip_t *)calloc((inputs - 1), sizeof(mosaico_pip_t));
@@ -164,7 +164,7 @@
pthread_cond_init(&this->vpts_limit_changed, NULL);
pthread_mutex_init(&this->mutex, NULL);
-
+
/* the port for the background video */
port = _x_post_intercept_video_port(&this->post, video_target[0], &input, &output);
port->intercept_frame = mosaico_intercept_frame;
@@ -180,7 +180,7 @@
this->pip[i].w = 150;
this->pip[i].h = 150;
asprintf(&(this->pip[i].input_name), "video in %d", i+1);
-
+
port = _x_post_intercept_video_port(&this->post, video_target[0], &input, NULL);
port->new_port.close = mosaico_close;
port->intercept_frame = mosaico_intercept_frame;
@@ -205,7 +205,7 @@
static void mosaico_dispose(post_plugin_t *this_gen)
{
post_mosaico_t *this = (post_mosaico_t *)this_gen;
-
+
if (_x_post_dispose(this_gen)) {
int i;
for (i = 0; i < this->pip_count; i++)
@@ -227,7 +227,7 @@
{
post_mosaico_t *this = (post_mosaico_t *)this_gen;
mosaico_parameters_t *param = (mosaico_parameters_t *)param_gen;
-
+
if (param->pip_num > this->pip_count) return 0;
this->pip[param->pip_num - 1].x = param->x;
this->pip[param->pip_num - 1].y = param->y;
@@ -240,7 +240,7 @@
{
post_mosaico_t *this = (post_mosaico_t *)this_gen;
mosaico_parameters_t *param = (mosaico_parameters_t *)param_gen;
-
+
if (param->pip_num > this->pip_count || param->pip_num < 1)
param->pip_num = 1;
param->x = this->pip[param->pip_num - 1].x;
[... 39 lines omitted ...]
+ break;
+
case XINE_IMGFMT_YV12:
/* Y */
target_offset = 0;
@@ -363,7 +363,7 @@
pos = pos_y * background_width + pos_x;
target_width = (target_width + 1) / 2;
target_height = (target_height + 1) / 2;
-
+
/* U */
target_offset = 0;
for (j = 0; j < target_height; j++, target_offset += (background_width - target_width))
@@ -371,7 +371,7 @@
source_offset = ((i * scale_x) >> shift_x) + (((j * scale_y) >> shift_y) * source_width);
background->base[1][pos + target_offset] = this->pip[pip_num].frame->base[1][source_offset];
}
-
+
/* V */
target_offset = 0;
for (j = 0; j < target_height; j++, target_offset += (background_width - target_width))
@@ -379,7 +379,7 @@
source_offset = ((i * scale_x) >> shift_x) + (((j * scale_y) >> shift_y) * source_width);
background->base[2][pos + target_offset] = this->pip[pip_num].frame->base[2][source_offset];
}
-
+
break;
}
}
@@ -392,47 +392,47 @@
int pip_num, skip;
pthread_mutex_lock(&this->mutex);
-
+
if (frame->bad_frame) {
_x_post_frame_copy_down(frame, frame->next);
skip = frame->next->draw(frame->next, stream);
_x_post_frame_copy_up(frame, frame->next);
-
+
this->vpts_limit = frame->vpts + frame->duration;
if (skip) {
this->skip = skip;
this->skip_vpts = frame->vpts;
} else
this->skip = 0;
-
+
pthread_mutex_unlock(&this->mutex);
pthread_cond_broadcast(&this->vpts_limit_changed);
-
+
return skip;
}
-
+
background = port->original_port->get_frame(port->original_port,
frame->width, frame->height, frame->ratio, frame->format, frame->flags | VO_BOTH_FIELDS);
_x_post_frame_copy_down(frame, background);
frame_copy_content(background, frame);
-
+
for (pip_num = 0; pip_num < this->pip_count; pip_num++)
frame_paste(this, background, pip_num);
-
+
skip = background->draw(background, stream);
_x_post_frame_copy_up(frame, background);
this->vpts_limit = background->vpts + background->duration;
background->free(background);
-
+
if (skip) {
this->skip = skip;
this->skip_vpts = frame->vpts;
} else
this->skip = 0;
-
+
pthread_mutex_unlock(&this->mutex);
pthread_cond_broadcast(&this->vpts_limit_changed);
-
+
return skip;
}
@@ -446,11 +446,11 @@
for (pip_num = 0; pip_num < this->pip_count; pip_num++)
if (this->post.xine_post.video_input[pip_num+1] == frame->port) break;
_x_assert(pip_num < this->pip_count);
-
+
frame->lock(frame);
-
+
pthread_mutex_lock(&this->mutex);
-
+
/* the original output will never see this frame again */
_x_post_frame_u_turn(frame, stream);
while (frame->vpts > this->vpts_limit || !this->vpts_limit)
@@ -459,12 +459,12 @@
free_frame = this->pip[pip_num].frame;
if (port->stream)
this->pip[pip_num].frame = frame;
-
+
if (this->skip && frame->vpts <= this->skip_vpts)
skip = this->skip;
else
skip = 0;
-
+
pthread_mutex_unlock(&this->mutex);
if (free_frame)
@@ -473,6 +473,6 @@
/* do not keep this frame when no stream is connected to us,
* otherwise, this frame might never get freed */
frame->free(frame);
-
+
return skip;
}
diff --git a/src/post/mosaico/switch.c b/src/post/mosaico/switch.c
--- a/src/post/mosaico/switch.c
+++ b/src/post/mosaico/switch.c
@@ -1,23 +1,23 @@
/*
* Copyright (C) 2000-2004 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*/
-
+
/*
* simple switch video post plugin
*/
@@ -40,7 +40,7 @@
static const post_info_t switch_special_info = { XINE_POST_TYPE_VIDEO_COMPOSE };
const plugin_info_t xine_plugin_info[] EXPORTED = {
- /* type, API, "name", version, special_info, init_function */
+ /* type, API, "name", version, special_info, init_function */
{ PLUGIN_POST, 10, "switch", XINE_VERSION_CODE, &switch_special_info, &switch_init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
@@ -67,7 +67,7 @@
struct post_switch_s {
post_plugin_t post;
xine_post_in_t parameter_input;
-
+
int64_t vpts_limit;
pthread_cond_t display_condition_changed;
int64_t skip_vpts;
@@ -102,7 +102,7 @@
if (!this)
return NULL;
-
+
this->class.open_plugin = switch_open_plugin;
this->class.identifier = "switch";
this->class.description = N_("Switch is a post plugin able to switch at any time between different streams");
@@ -124,28 +124,28 @@
static xine_post_api_t post_api =
{ switch_set_parameters, switch_get_parameters, switch_get_param_descr, switch_get_help };
int i;
-
+
lprintf("switch open\n");
if (inputs < 2 || !this || !video_target || !video_target[0]) {
free(this);
return NULL;
}
-
+
_x_post_init(&this->post, 0, inputs);
this->source_count = inputs;
this->selected_source = 1;
-
+
pthread_cond_init(&this->display_condition_changed, NULL);
pthread_mutex_init(&this->mutex, NULL);
-
+
port = _x_post_intercept_video_port(&this->post, video_target[0], &input, &output);
port->new_frame->draw = switch_draw;
port->port_lock = &this->mutex;
port->frame_lock = &this->mutex;
this->post.xine_post.video_input[0] = &port->new_port;
-
+
for (i = 1; i < inputs; i++) {
port = _x_post_intercept_video_port(&this->post, video_target[0], &input, NULL);
port->new_frame->draw = switch_draw;
@@ -153,7 +153,7 @@
port->frame_lock = &this->mutex;
this->post.xine_post.video_input[i] = &port->new_port;
}
-
+
input_api = &this->parameter_input;
input_api->name = "parameters";
input_api->type = XINE_POST_DATA_PARAMETERS;
@@ -168,7 +168,7 @@
static void switch_dispose(post_plugin_t *this_gen)
{
post_switch_t *this = (post_switch_t *)this_gen;
-
+
if (_x_post_dispose(this_gen)) {
pthread_cond_destroy(&this->display_condition_changed);
pthread_mutex_destroy(&this->mutex);
@@ -186,7 +186,7 @@
{
post_switch_t *this = (post_switch_t *)this_gen;
switch_parameter_t *param = (switch_parameter_t *)param_gen;
-
+
if (param->select > this->source_count) return 0;
pthread_mutex_lock(&this->mutex);
this->selected_source = param->select;
@@ -199,7 +199,7 @@
{
post_switch_t *this = (post_switch_t *)this_gen;
switch_parameter_t *param = (switch_parameter_t *)param_gen;
-
+
param->select = this->selected_source;
return 1;
}
@@ -222,7 +222,7 @@
for (source_num = 1; source_num <= this->source_count; source_num++)
if (this->post.xine_post.video_input[source_num-1] == frame->port) break;
_x_assert(source_num <= this->source_count);
-
+
pthread_mutex_lock(&this->mutex);
/* the original output will probably never see this frame again */
_x_post_frame_u_turn(frame, stream);
@@ -249,6 +249,6 @@
skip = 0;
pthread_mutex_unlock(&this->mutex);
}
-
+
return skip;
}
diff --git a/src/post/planar/Makefile.am b/src/post/planar/Makefile.am
--- a/src/post/planar/Makefile.am
+++ b/src/post/planar/Makefile.am
@@ -2,8 +2,8 @@
include $(top_srcdir)/misc/Makefile.common
AM_CFLAGS = $(VISIBILITY_FLAG)
-AM_CPPFLAGS =
-AM_LDFLAGS =
+AM_CPPFLAGS =
+AM_LDFLAGS =
noinst_LTLIBRARIES = libpost_planar_asm.la
libpost_planar_asm_la_SOURCES = eq.c eq2.c noise.c
diff --git a/src/post/planar/boxblur.c b/src/post/planar/boxblur.c
--- a/src/post/planar/boxblur.c
+++ b/src/post/planar/boxblur.c
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2000-2004 the xine project
- *
+ *
* This file is part of xine, a free video player.
- *
+ *
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* xine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
@@ -36,7 +36,7 @@
typedef struct post_plugin_boxblur_s post_plugin_boxblur_t;
/*
- * this is the struct used by "parameters api"
+ * this is the struct used by "parameters api"
*/
typedef struct boxblur_parameters_s {
@@ -51,13 +51,13 @@
* description of params struct
*/
START_PARAM_DESCR( boxblur_parameters_t )
-PARAM_ITEM( POST_PARAM_TYPE_INT, luma_radius, NULL, 0, 10, 0,
+PARAM_ITEM( POST_PARAM_TYPE_INT, luma_radius, NULL, 0, 10, 0,
"radius of luma blur" )
-PARAM_ITEM( POST_PARAM_TYPE_INT, luma_power, NULL, 0, 10, 0,
+PARAM_ITEM( POST_PARAM_TYPE_INT, luma_power, NULL, 0, 10, 0,
"power of luma blur" )
-PARAM_ITEM( POST_PARAM_TYPE_INT, chroma_radius, NULL, -1, 10, 0,
+PARAM_ITEM( POST_PARAM_TYPE_INT, chroma_radius, NULL, -1, 10, 0,
"radius of chroma blur (-1 = same as luma)" )
-PARAM_ITEM( POST_PARAM_TYPE_INT, chroma_power, NULL, -1, 10, 0,
+PARAM_ITEM( POST_PARAM_TYPE_INT, chroma_power, NULL, -1, 10, 0,
"power of chroma blur (-1 = same as luma)" )
END_PARAM_DESCR( param_descr )
@@ -96,7 +96,7 @@
return 1;
}
-
+
static xine_post_api_descr_t * get_param_descr (void) {
return ¶m_descr;
}
@@ -141,7 +141,7 @@
if (!class)
return NULL;
-
+
class->open_plugin = boxblur_open_plugin;
class->identifier = "boxblur";
class->description = N_("box blur filter from mplayer");
@@ -160,14 +160,14 @@
xine_post_in_t *input_api;
post_out_t *output;
post_video_port_t *port;
-
+
if (!this || !video_target || !video_target[0]) {
free(this);
return NULL;
}
-
+
_x_post_init(&this->post, 0, 1);
-
+
this->params.luma_radius = 2;
this->params.luma_power = 1;
this->params.chroma_radius = -1;
@@ -178,7 +178,7 @@
port = _x_post_intercept_video_port(&this->post, video_target[0], &input, &output);
port->intercept_frame = boxblur_intercept_frame;
port->new_frame->draw = boxblur_draw;
-
+
input_api = &this->params_input;
input_api->name = "parameters";
input_api->type = XINE_POST_DATA_PARAMETERS;
@@ -187,18 +187,18 @@
input->xine_in.name = "video";
output->xine_out.name = "boxblured video";
-
+
this->post.xine_post.video_input[0] = &port->new_port;
-
+
this->post.dispose = boxblur_dispose;
-
+
return &this->post;
}
static void boxblur_dispose(post_plugin_t *this_gen)
{
post_plugin_boxblur_t *this = (post_plugin_boxblur_t *)this_gen;
-
+
if (_x_post_dispose(this_gen)) {
pthread_mutex_destroy(&this->lock);
free(this);
@@ -243,7 +243,7 @@
static inline void blur2(uint8_t *dst, uint8_t *src, int w, int radius, int power, int dstStep, int srcStep){
uint8_t temp[2][4096];
uint8_t *a= temp[0], *b=temp[1];
-
+
if(radius){
blur(a, src, w, radius, 1, srcStep);
for(; power>2; power--){
@@ -267,9 +267,9 @@
static void hBlur(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int srcStride, int radius, int power){
int y;
-
+
if(radius==0 && dst==src) return;
-
+
for(y=0; y<h; y++){
blur2(dst + y*dstStride, src + y*srcStride, w, radius, power, 1, 1);
}
@@ -277,7 +277,7 @@
static void vBlur(uint8_t *dst, uint8_t *src, int w, int h, int dstStride, int srcStride, int radius, int power){
int x;
-
+
if(radius==0 && dst==src) return;
for(x=0; x<w; x++){
@@ -326,25 +326,25 @@
pthread_mutex_lock (&this->lock);
- chroma_radius = (this->params.chroma_radius != -1) ? this->params.chroma_radius :
+ chroma_radius = (this->params.chroma_radius != -1) ? this->params.chroma_radius :
this->params.luma_radius;
- chroma_power = (this->params.chroma_power != -1) ? this->params.chroma_power :
+ chroma_power = (this->params.chroma_power != -1) ? this->params.chroma_power :
this->params.luma_power;
cw = yv12_frame->width/2;
ch = yv12_frame->height/2;
- hBlur(out_frame->base[0], yv12_frame->base[0], yv12_frame->width, yv12_frame->height,
+ hBlur(out_frame->base[0], yv12_frame->base[0], yv12_frame->width, yv12_frame->height,
out_frame->pitches[0], yv12_frame->pitches[0], this->params.luma_radius, this->params.luma_power);
- hBlur(out_frame->base[1], yv12_frame->base[1], cw,ch,
+ hBlur(out_frame->base[1], yv12_frame->base[1], cw,ch,
out_frame->pitches[1], yv12_frame->pitches[1], chroma_radius, chroma_power);
- hBlur(out_frame->base[2], yv12_frame->base[2], cw,ch,
+ hBlur(out_frame->base[2], yv12_frame->base[2], cw,ch,
out_frame->pitches[2], yv12_frame->pitches[2], chroma_radius, chroma_power);
- vBlur(out_frame->base[0], out_frame->base[0], yv12_frame->width, yv12_frame->height,
+ vBlur(out_frame->base[0], out_frame->base[0], yv12_frame->width, yv12_frame->height,
out_frame->pitches[0], out_frame->pitches[0], this->params.luma_radius, this->params.luma_power);
- vBlur(out_frame->base[1], out_frame->base[1], cw,ch,
+ vBlur(out_frame->base[1], out_frame->base[1], cw,ch,
out_frame->pitches[1], out_frame->pitches[1], chroma_radius, chroma_power);
- vBlur(out_frame->base[2], out_frame->base[2], cw,ch,
+ vBlur(out_frame->base[2], out_frame->base[2], cw,ch,
out_frame->pitches[2], out_frame->pitches[2], chroma_radius, chroma_power);
pthread_mutex_unlock (&this->lock);
|