diff options
Diffstat (limited to 'src/post')
-rw-r--r-- | src/post/deinterlace/xine_plugin.c | 10 | ||||
-rw-r--r-- | src/post/goom/xine_goom.c | 10 | ||||
-rw-r--r-- | src/post/mosaico/mosaico.c | 16 | ||||
-rw-r--r-- | src/post/mosaico/switch.c | 16 | ||||
-rw-r--r-- | src/post/planar/boxblur.c | 10 | ||||
-rw-r--r-- | src/post/planar/denoise3d.c | 10 | ||||
-rw-r--r-- | src/post/planar/eq.c | 10 | ||||
-rw-r--r-- | src/post/planar/eq2.c | 10 | ||||
-rw-r--r-- | src/post/planar/expand.c | 36 | ||||
-rw-r--r-- | src/post/planar/invert.c | 10 | ||||
-rw-r--r-- | src/post/planar/planar.c | 16 | ||||
-rw-r--r-- | src/post/planar/unsharp.c | 10 | ||||
-rw-r--r-- | src/post/visualizations/fftscope.c | 8 | ||||
-rw-r--r-- | src/post/visualizations/fooviz.c | 11 | ||||
-rw-r--r-- | src/post/visualizations/oscope.c | 8 | ||||
-rw-r--r-- | src/post/visualizations/visualizations.c | 6 |
16 files changed, 94 insertions, 103 deletions
diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c index e23bed952..a8c503501 100644 --- a/src/post/deinterlace/xine_plugin.c +++ b/src/post/deinterlace/xine_plugin.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_plugin.c,v 1.10 2003/07/12 02:26:13 miguelfreitas Exp $ + * $Id: xine_plugin.c,v 1.11 2003/08/04 03:47:10 miguelfreitas Exp $ * * advanced video deinterlacer plugin * Jun/2003 by Miguel Freitas @@ -44,7 +44,7 @@ post_info_t deinterlace_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST | PLUGIN_MUST_PRELOAD, 3, "tvtime", XINE_VERSION_CODE, &deinterlace_special_info, &deinterlace_init_plugin }, + { PLUGIN_POST | PLUGIN_MUST_PRELOAD, 4, "tvtime", XINE_VERSION_CODE, &deinterlace_special_info, &deinterlace_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; @@ -219,7 +219,7 @@ static int deinterlace_set_property(xine_video_port_t *port_gen, int static void deinterlace_flush(xine_video_port_t *port_gen); static void deinterlace_open(xine_video_port_t *port_gen, xine_stream_t *stream); static vo_frame_t *deinterlace_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); static void deinterlace_close(xine_video_port_t *port_gen, xine_stream_t *stream); @@ -487,7 +487,7 @@ static void deinterlace_open(xine_video_port_t *port_gen, xine_stream_t *stream) } static vo_frame_t *deinterlace_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; @@ -495,7 +495,7 @@ static vo_frame_t *deinterlace_get_frame(xine_video_port_t *port_gen, uint32_t w vo_frame_t *frame; frame = port->original_port->get_frame(port->original_port, - width, height, ratio_code, format, flags); + width, height, ratio, format, flags); pthread_mutex_lock (&this->lock); diff --git a/src/post/goom/xine_goom.c b/src/post/goom/xine_goom.c index 43fbe3aa1..137aa3323 100644 --- a/src/post/goom/xine_goom.c +++ b/src/post/goom/xine_goom.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine_goom.c,v 1.33 2003/07/26 23:31:55 tmattern Exp $ + * $Id: xine_goom.c,v 1.34 2003/08/04 03:47:10 miguelfreitas Exp $ * * GOOM post plugin. * @@ -89,6 +89,7 @@ struct post_plugin_goom_s { int samples_per_frame; int width, height; int width_back, height_back; + double ratio; int fps; int use_asm; int csc_method; @@ -116,7 +117,7 @@ post_info_t goom_special_info = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST | PLUGIN_MUST_PRELOAD, 3, "goom", XINE_VERSION_CODE, &goom_special_info, &goom_init_plugin }, + { PLUGIN_POST | PLUGIN_MUST_PRELOAD, 4, "goom", XINE_VERSION_CODE, &goom_special_info, &goom_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; @@ -303,6 +304,8 @@ static post_plugin_t *goom_open_plugin(post_class_t *class_gen, int inputs, this->height_back = this->height; goom_init (this->width_back, this->height_back, 0); + this->ratio = (double)this->width_back/(double)this->height_back; + this->sample_counter = 0; this->stream = NULL; this->vo_port = video_target[0]; @@ -549,7 +552,7 @@ static void goom_port_put_buffer (xine_audio_port_t *port_gen, samples_used += this->samples_per_frame; frame = this->vo_port->get_frame (this->vo_port, this->width_back, this->height_back, - XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YUY2, + this->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS); frame->extra_info->invalid = 1; @@ -649,6 +652,7 @@ static void goom_port_put_buffer (xine_audio_port_t *port_gen, goom_init (this->width, this->height, 0); this->width_back = width; this->height_back = height; + this->ratio = (double)width/(double)height; } } } while( this->sample_counter >= this->samples_per_frame ); diff --git a/src/post/mosaico/mosaico.c b/src/post/mosaico/mosaico.c index 2794f0058..60d9d7217 100644 --- a/src/post/mosaico/mosaico.c +++ b/src/post/mosaico/mosaico.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: mosaico.c,v 1.11 2003/05/31 18:33:29 miguelfreitas Exp $ + * $Id: mosaico.c,v 1.12 2003/08/04 03:47:10 miguelfreitas Exp $ */ /* @@ -47,7 +47,7 @@ post_info_t mosaico_special_info = { XINE_POST_TYPE_VIDEO_COMPOSE }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "mosaico", MOVERSION, &mosaico_special_info, &mosaico_init_plugin }, + { PLUGIN_POST, 4, "mosaico", MOVERSION, &mosaico_special_info, &mosaico_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; @@ -94,11 +94,11 @@ static int mosaico_rewire(xine_post_out_t *output, void *data); /* replaced video_port functions */ static void mosaico_open(xine_video_port_t *port_gen, xine_stream_t *stream); static vo_frame_t *mosaico_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); static void mosaico_close(xine_video_port_t *port_gen, xine_stream_t *stream); static vo_frame_t *mosaico_get_frame_2(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); /* replaced vo_frame functions */ @@ -344,14 +344,14 @@ static void mosaico_open(xine_video_port_t *port_gen, xine_stream_t *stream) } static vo_frame_t *mosaico_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; vo_frame_t *frame; frame = port->original_port->get_frame(port->original_port, - width, height, ratio_code, format, flags); + width, height, ratio, format, flags); post_intercept_video_frame(frame, port); /* replace with our own draw function */ frame->draw = mosaico_draw; @@ -361,14 +361,14 @@ static vo_frame_t *mosaico_get_frame(xine_video_port_t *port_gen, uint32_t width } static vo_frame_t *mosaico_get_frame_2(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; vo_frame_t *frame; frame = port->original_port->get_frame(port->original_port, - width, height, ratio_code, format, flags); + width, height, ratio, format, flags); post_intercept_video_frame(frame, port); /* replace with our own draw function */ frame->draw = mosaico_draw_2; diff --git a/src/post/mosaico/switch.c b/src/post/mosaico/switch.c index 4b60c948c..40f76a56d 100644 --- a/src/post/mosaico/switch.c +++ b/src/post/mosaico/switch.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: switch.c,v 1.3 2003/05/31 18:33:29 miguelfreitas Exp $ + * $Id: switch.c,v 1.4 2003/08/04 03:47:10 miguelfreitas Exp $ */ /* @@ -41,7 +41,7 @@ post_info_t switch_special_info = { XINE_POST_TYPE_VIDEO_COMPOSE }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "switch", SWVERSION, &switch_special_info, &switch_init_plugin }, + { PLUGIN_POST, 4, "switch", SWVERSION, &switch_special_info, &switch_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; @@ -80,10 +80,10 @@ static int switch_rewire(xine_post_out_t *output, void *data); /* replaced video_port functions */ static void switch_open(xine_video_port_t *port_gen, xine_stream_t *stream); static vo_frame_t *switch_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); static vo_frame_t *switch_get_frame_2(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); static void switch_close(xine_video_port_t *port_gen, xine_stream_t *stream); @@ -282,7 +282,7 @@ static void switch_open(xine_video_port_t *port_gen, xine_stream_t *stream) } static vo_frame_t *switch_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; @@ -291,7 +291,7 @@ static vo_frame_t *switch_get_frame(xine_video_port_t *port_gen, uint32_t width, pthread_mutex_lock(&output->mut1); frame = port->original_port->get_frame(port->original_port, - width, height , ratio_code, format, flags); + width, height , ratio, format, flags); post_intercept_video_frame(frame, port); /* replace with our own draw function */ @@ -303,7 +303,7 @@ static vo_frame_t *switch_get_frame(xine_video_port_t *port_gen, uint32_t width, } static vo_frame_t *switch_get_frame_2(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; @@ -313,7 +313,7 @@ static vo_frame_t *switch_get_frame_2(xine_video_port_t *port_gen, uint32_t widt pthread_mutex_lock(&output->mut1); frame = port->original_port->get_frame(port->original_port, - width, height , ratio_code, format, flags); + width, height , ratio, format, flags); post_intercept_video_frame(frame, port); /* replace with our own draw function */ diff --git a/src/post/planar/boxblur.c b/src/post/planar/boxblur.c index 52fe67279..8729da5c5 100644 --- a/src/post/planar/boxblur.c +++ b/src/post/planar/boxblur.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: boxblur.c,v 1.3 2003/07/12 03:15:23 miguelfreitas Exp $ + * $Id: boxblur.c,v 1.4 2003/08/04 03:47:10 miguelfreitas Exp $ * * mplayer's boxblur * Copyright (C) 2002 Michael Niedermayer <michaelni@gmx.at> @@ -37,7 +37,7 @@ post_info_t boxblur_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "boxblur", XINE_VERSION_CODE, &boxblur_special_info, &boxblur_init_plugin }, + { PLUGIN_POST, 4, "boxblur", XINE_VERSION_CODE, &boxblur_special_info, &boxblur_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; #endif @@ -142,7 +142,7 @@ static int boxblur_rewire(xine_post_out_t *output, void *data); /* replaced video_port functions */ static void boxblur_open(xine_video_port_t *port_gen, xine_stream_t *stream); static vo_frame_t *boxblur_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); static void boxblur_close(xine_video_port_t *port_gen, xine_stream_t *stream); @@ -294,14 +294,14 @@ static void boxblur_open(xine_video_port_t *port_gen, xine_stream_t *stream) } static vo_frame_t *boxblur_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; vo_frame_t *frame; frame = port->original_port->get_frame(port->original_port, - width, height, ratio_code, format, flags); + width, height, ratio, format, flags); post_intercept_video_frame(frame, port); /* replace with our own draw function */ diff --git a/src/post/planar/denoise3d.c b/src/post/planar/denoise3d.c index 595fbce73..2cc394596 100644 --- a/src/post/planar/denoise3d.c +++ b/src/post/planar/denoise3d.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: denoise3d.c,v 1.3 2003/07/12 03:15:23 miguelfreitas Exp $ + * $Id: denoise3d.c,v 1.4 2003/08/04 03:47:10 miguelfreitas Exp $ * * mplayer's denoise3d * Copyright (C) 2003 Daniel Moreno <comac@comac.darktech.org> @@ -45,7 +45,7 @@ post_info_t denoise3d_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "denoise3d", XINE_VERSION_CODE, &denoise3d_special_info, &denoise3d_init_plugin }, + { PLUGIN_POST, 4, "denoise3d", XINE_VERSION_CODE, &denoise3d_special_info, &denoise3d_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; #endif @@ -176,7 +176,7 @@ static int denoise3d_rewire(xine_post_out_t *output, void *data); /* replaced video_port functions */ static void denoise3d_open(xine_video_port_t *port_gen, xine_stream_t *stream); static vo_frame_t *denoise3d_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); static void denoise3d_close(xine_video_port_t *port_gen, xine_stream_t *stream); @@ -330,14 +330,14 @@ static void denoise3d_open(xine_video_port_t *port_gen, xine_stream_t *stream) } static vo_frame_t *denoise3d_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; vo_frame_t *frame; frame = port->original_port->get_frame(port->original_port, - width, height, ratio_code, format, flags); + width, height, ratio, format, flags); post_intercept_video_frame(frame, port); /* replace with our own draw function */ diff --git a/src/post/planar/eq.c b/src/post/planar/eq.c index f79482a8f..c0af88d78 100644 --- a/src/post/planar/eq.c +++ b/src/post/planar/eq.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: eq.c,v 1.2 2003/07/12 03:15:23 miguelfreitas Exp $ + * $Id: eq.c,v 1.3 2003/08/04 03:47:11 miguelfreitas Exp $ * * mplayer's eq (soft video equalizer) * Copyright (C) Richard Felker @@ -125,7 +125,7 @@ post_info_t eq_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "eq", XINE_VERSION_CODE, &eq_special_info, &eq_init_plugin }, + { PLUGIN_POST, 4, "eq", XINE_VERSION_CODE, &eq_special_info, &eq_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; #endif @@ -226,7 +226,7 @@ static int eq_get_property(xine_video_port_t *port_gen, int property) static int eq_set_property(xine_video_port_t *port_gen, int property, int value); static void eq_open(xine_video_port_t *port_gen, xine_stream_t *stream); static vo_frame_t *eq_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); static void eq_close(xine_video_port_t *port_gen, xine_stream_t *stream); @@ -412,14 +412,14 @@ static void eq_open(xine_video_port_t *port_gen, xine_stream_t *stream) } static vo_frame_t *eq_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; vo_frame_t *frame; frame = port->original_port->get_frame(port->original_port, - width, height, ratio_code, format, flags); + width, height, ratio, format, flags); post_intercept_video_frame(frame, port); /* replace with our own draw function */ diff --git a/src/post/planar/eq2.c b/src/post/planar/eq2.c index 91f926d54..680035625 100644 --- a/src/post/planar/eq2.c +++ b/src/post/planar/eq2.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: eq2.c,v 1.3 2003/07/12 03:15:23 miguelfreitas Exp $ + * $Id: eq2.c,v 1.4 2003/08/04 03:47:11 miguelfreitas Exp $ * * mplayer's eq2 (soft video equalizer) * Software equalizer (brightness, contrast, gamma, saturation) @@ -270,7 +270,7 @@ post_info_t eq2_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "eq2", XINE_VERSION_CODE, &eq2_special_info, &eq2_init_plugin }, + { PLUGIN_POST, 4, "eq2", XINE_VERSION_CODE, &eq2_special_info, &eq2_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; #endif @@ -399,7 +399,7 @@ static int eq2_get_property(xine_video_port_t *port_gen, int property static int eq2_set_property(xine_video_port_t *port_gen, int property, int value); static void eq2_open(xine_video_port_t *port_gen, xine_stream_t *stream); static vo_frame_t *eq2_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); static void eq2_close(xine_video_port_t *port_gen, xine_stream_t *stream); @@ -607,14 +607,14 @@ static void eq2_open(xine_video_port_t *port_gen, xine_stream_t *stream) } static vo_frame_t *eq2_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; vo_frame_t *frame; frame = port->original_port->get_frame(port->original_port, - width, height, ratio_code, format, flags); + width, height, ratio, format, flags); post_intercept_video_frame(frame, port); /* replace with our own draw function */ diff --git a/src/post/planar/expand.c b/src/post/planar/expand.c index 01284b3e7..f585a22ce 100644 --- a/src/post/planar/expand.c +++ b/src/post/planar/expand.c @@ -39,7 +39,7 @@ post_info_t expand_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "expand", XINE_VERSION_CODE, &expand_special_info, &expand_init_plugin }, + { PLUGIN_POST, 4, "expand", XINE_VERSION_CODE, &expand_special_info, &expand_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; #endif @@ -69,7 +69,7 @@ static int expand_rewire(xine_post_out_t *output, void *data); /* replaced video_port functions */ static void expand_open(xine_video_port_t *port_gen, xine_stream_t *stream); static vo_frame_t *expand_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); static void expand_close(xine_video_port_t *port_gen, xine_stream_t *stream); @@ -204,14 +204,14 @@ static void expand_open(xine_video_port_t *port_gen, xine_stream_t *stream) } static vo_frame_t *expand_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; vo_frame_t *frame; frame = port->original_port->get_frame(port->original_port, - width, height, ratio_code, format, flags); + width, height, ratio, format, flags); post_intercept_video_frame(frame, port); /* replace with our own draw function */ frame->draw = expand_draw; @@ -234,33 +234,9 @@ static int expand_draw(vo_frame_t *frame, xine_stream_t *stream) post_video_port_t *port = (post_video_port_t *) frame->port; vo_frame_t *expanded_frame; int size, i, skip, new_height, border_height; - double pixel_aspect; - - /* Find pixel aspect of video frame */ - switch(frame->ratio) { - case XINE_VO_ASPECT_ANAMORPHIC: /* anamorphic */ - case XINE_VO_ASPECT_PAN_SCAN: /* we display pan&scan as widescreen */ - pixel_aspect = 16.0 /9.0; - break; - case XINE_VO_ASPECT_DVB: /* 2.11:1 */ - pixel_aspect = 2.11/1.0; - break; - case XINE_VO_ASPECT_SQUARE: /* square pels */ - case XINE_VO_ASPECT_DONT_TOUCH: /* don't touch aspect ratio */ - pixel_aspect = 1.0; - break; - case 0: /* forbidden -> 4:3 */ - printf("expand: invalid ratio, using 4:3\n"); - default: - printf("expand: unknown aspect ratio (%d) in stream => using 4:3\n", - frame->ratio); - case XINE_VO_ASPECT_4_3: /* 4:3 */ - pixel_aspect = 4.0 / 3.0; - break; - } - + /* Calculate height of expanded frame */ - new_height = (double) frame->width * pixel_aspect * 3.0 / 4.0; + new_height = (double) frame->width * frame->ratio * 3.0 / 4.0; new_height = (new_height + 1) & ~1; if(new_height > frame->height) { diff --git a/src/post/planar/invert.c b/src/post/planar/invert.c index 968539de9..76f13de34 100644 --- a/src/post/planar/invert.c +++ b/src/post/planar/invert.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: invert.c,v 1.10 2003/06/29 18:56:24 miguelfreitas Exp $ + * $Id: invert.c,v 1.11 2003/08/04 03:47:11 miguelfreitas Exp $ */ /* @@ -38,7 +38,7 @@ post_info_t invert_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "invert", XINE_VERSION_CODE, &invert_special_info, &invert_init_plugin }, + { PLUGIN_POST, 4, "invert", XINE_VERSION_CODE, &invert_special_info, &invert_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; @@ -69,7 +69,7 @@ static int invert_rewire(xine_post_out_t *output, void *data); /* replaced video_port functions */ static void invert_open(xine_video_port_t *port_gen, xine_stream_t *stream); static vo_frame_t *invert_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); static void invert_close(xine_video_port_t *port_gen, xine_stream_t *stream); @@ -204,14 +204,14 @@ static void invert_open(xine_video_port_t *port_gen, xine_stream_t *stream) } static vo_frame_t *invert_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; vo_frame_t *frame; frame = port->original_port->get_frame(port->original_port, - width, height, ratio_code, format, flags); + width, height, ratio, format, flags); post_intercept_video_frame(frame, port); /* replace with our own draw function */ frame->draw = invert_draw; diff --git a/src/post/planar/planar.c b/src/post/planar/planar.c index 96e04da08..7ab3ad521 100644 --- a/src/post/planar/planar.c +++ b/src/post/planar/planar.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: planar.c,v 1.1 2003/06/29 18:56:24 miguelfreitas Exp $ + * $Id: planar.c,v 1.2 2003/08/04 03:47:11 miguelfreitas Exp $ * * catalog for planar post plugins */ @@ -49,13 +49,13 @@ post_info_t unsharp_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "expand", XINE_VERSION_CODE+1, &expand_special_info, &expand_init_plugin }, - { PLUGIN_POST, 3, "invert", XINE_VERSION_CODE+1, &invert_special_info, &invert_init_plugin }, - { PLUGIN_POST, 3, "eq", XINE_VERSION_CODE, &eq_special_info, &eq_init_plugin }, - { PLUGIN_POST, 3, "denoise3d", XINE_VERSION_CODE, &denoise3d_special_info, &denoise3d_init_plugin }, - { PLUGIN_POST, 3, "boxblur", XINE_VERSION_CODE, &boxblur_special_info, &boxblur_init_plugin }, - { PLUGIN_POST, 3, "eq2", XINE_VERSION_CODE, &eq2_special_info, &eq2_init_plugin }, - { PLUGIN_POST, 3, "unsharp", XINE_VERSION_CODE, &unsharp_special_info, &unsharp_init_plugin }, + { PLUGIN_POST, 4, "expand", XINE_VERSION_CODE+1, &expand_special_info, &expand_init_plugin }, + { PLUGIN_POST, 4, "invert", XINE_VERSION_CODE+1, &invert_special_info, &invert_init_plugin }, + { PLUGIN_POST, 4, "eq", XINE_VERSION_CODE, &eq_special_info, &eq_init_plugin }, + { PLUGIN_POST, 4, "denoise3d", XINE_VERSION_CODE, &denoise3d_special_info, &denoise3d_init_plugin }, + { PLUGIN_POST, 4, "boxblur", XINE_VERSION_CODE, &boxblur_special_info, &boxblur_init_plugin }, + { PLUGIN_POST, 4, "eq2", XINE_VERSION_CODE, &eq2_special_info, &eq2_init_plugin }, + { PLUGIN_POST, 4, "unsharp", XINE_VERSION_CODE, &unsharp_special_info, &unsharp_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/post/planar/unsharp.c b/src/post/planar/unsharp.c index 97fef8acc..4564bbcc6 100644 --- a/src/post/planar/unsharp.c +++ b/src/post/planar/unsharp.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: unsharp.c,v 1.3 2003/07/12 03:15:23 miguelfreitas Exp $ + * $Id: unsharp.c,v 1.4 2003/08/04 03:47:11 miguelfreitas Exp $ * * mplayer's unsharp * Copyright (C) 2002 Rémi Guyomarch <rguyom@pobox.com> @@ -136,7 +136,7 @@ post_info_t unsharp_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "unsharp", XINE_VERSION_CODE, &unsharp_special_info, &unsharp_init_plugin }, + { PLUGIN_POST, 4, "unsharp", XINE_VERSION_CODE, &unsharp_special_info, &unsharp_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; #endif @@ -263,7 +263,7 @@ static int unsharp_rewire(xine_post_out_t *output, void *data); /* replaced video_port functions */ static void unsharp_open(xine_video_port_t *port_gen, xine_stream_t *stream); static vo_frame_t *unsharp_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags); static void unsharp_close(xine_video_port_t *port_gen, xine_stream_t *stream); @@ -420,14 +420,14 @@ static void unsharp_open(xine_video_port_t *port_gen, xine_stream_t *stream) } static vo_frame_t *unsharp_get_frame(xine_video_port_t *port_gen, uint32_t width, - uint32_t height, int ratio_code, + uint32_t height, double ratio, int format, int flags) { post_video_port_t *port = (post_video_port_t *)port_gen; vo_frame_t *frame; frame = port->original_port->get_frame(port->original_port, - width, height, ratio_code, format, flags); + width, height, ratio, format, flags); post_intercept_video_frame(frame, port); /* replace with our own draw function */ diff --git a/src/post/visualizations/fftscope.c b/src/post/visualizations/fftscope.c index c595e21be..5132ba0a6 100644 --- a/src/post/visualizations/fftscope.c +++ b/src/post/visualizations/fftscope.c @@ -22,7 +22,7 @@ * * FFT code by Steve Haehnichen, originally licensed under GPL v1 * - * $Id: fftscope.c,v 1.14 2003/07/26 17:44:30 tmattern Exp $ + * $Id: fftscope.c,v 1.15 2003/08/04 03:47:11 miguelfreitas Exp $ * */ @@ -58,6 +58,8 @@ struct post_plugin_fftscope_s { xine_video_port_t *vo_port; xine_stream_t *stream; + double ratio; + int data_idx; complex wave[MAXCHANNELS][NUMSAMPLES]; int amp_max[MAXCHANNELS][NUMSAMPLES / 2]; @@ -492,6 +494,8 @@ static int fftscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream post_plugin_fftscope_t *this = (post_plugin_fftscope_t *)port->post; int c, i; + this->ratio = (double)FFT_WIDTH/(double)FFT_HEIGHT; + this->bits = bits; this->mode = mode; this->channels = mode_channels(mode); @@ -599,7 +603,7 @@ static void fftscope_port_put_buffer (xine_audio_port_t *port_gen, samples_used += this->samples_per_frame; frame = this->vo_port->get_frame (this->vo_port, FFT_WIDTH, FFT_HEIGHT, - XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YUY2, + this->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS); frame->extra_info->invalid = 1; frame->bad_frame = 0; diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c index c1aecb329..505a10bc6 100644 --- a/src/post/visualizations/fooviz.c +++ b/src/post/visualizations/fooviz.c @@ -23,7 +23,7 @@ * process. It simply paints the screen a solid color and rotates through * colors on each iteration. * - * $Id: fooviz.c,v 1.8 2003/07/26 17:44:30 tmattern Exp $ + * $Id: fooviz.c,v 1.9 2003/08/04 03:47:11 miguelfreitas Exp $ * */ @@ -49,10 +49,12 @@ struct post_plugin_fooviz_s { xine_video_port_t *vo_port; xine_stream_t *stream; + double ratio; + int data_idx; short data [2][NUMSAMPLES]; audio_buffer_t buf; /* dummy buffer just to hold a copy of audio data */ - + int bits; int mode; int channels; @@ -139,6 +141,7 @@ static int fooviz_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, post_audio_port_t *port = (post_audio_port_t *)port_gen; post_plugin_fooviz_t *this = (post_plugin_fooviz_t *)port->post; + this->ratio = (double)FOO_WIDTH/(double)FOO_HEIGHT; this->bits = bits; this->mode = mode; this->channels = mode_channels(mode); @@ -231,7 +234,7 @@ static void fooviz_port_put_buffer (xine_audio_port_t *port_gen, samples_used += this->samples_per_frame; frame = this->vo_port->get_frame (this->vo_port, FOO_WIDTH, FOO_HEIGHT, - XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YUY2, + this->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS); frame->extra_info->invalid = 1; frame->bad_frame = 0; @@ -370,6 +373,6 @@ post_info_t fooviz_special_info = { XINE_POST_TYPE_AUDIO_VISUALIZATION }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "fooviz", XINE_VERSION_CODE, &fooviz_special_info, &fooviz_init_plugin }, + { PLUGIN_POST, 4, "fooviz", XINE_VERSION_CODE, &fooviz_special_info, &fooviz_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/post/visualizations/oscope.c b/src/post/visualizations/oscope.c index e143b8f27..3e2908d54 100644 --- a/src/post/visualizations/oscope.c +++ b/src/post/visualizations/oscope.c @@ -20,7 +20,7 @@ * Basic Oscilloscope Visualization Post Plugin For xine * by Mike Melanson (melanson@pcisys.net) * - * $Id: oscope.c,v 1.8 2003/07/26 17:44:30 tmattern Exp $ + * $Id: oscope.c,v 1.9 2003/08/04 03:47:11 miguelfreitas Exp $ * */ @@ -47,6 +47,8 @@ struct post_plugin_oscope_s { xine_video_port_t *vo_port; xine_stream_t *stream; + double ratio; + int data_idx; short data [MAXCHANNELS][NUMSAMPLES]; audio_buffer_t buf; /* dummy buffer just to hold a copy of audio data */ @@ -209,6 +211,8 @@ static int oscope_port_open(xine_audio_port_t *port_gen, xine_stream_t *stream, post_audio_port_t *port = (post_audio_port_t *)port_gen; post_plugin_oscope_t *this = (post_plugin_oscope_t *)port->post; + this->ratio = (double)OSCOPE_WIDTH/(double)OSCOPE_HEIGHT; + this->bits = bits; this->mode = mode; this->channels = mode_channels(mode); @@ -298,7 +302,7 @@ static void oscope_port_put_buffer (xine_audio_port_t *port_gen, samples_used += this->samples_per_frame; frame = this->vo_port->get_frame (this->vo_port, OSCOPE_WIDTH, OSCOPE_HEIGHT, - XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YUY2, + this->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS); frame->extra_info->invalid = 1; frame->bad_frame = 0; diff --git a/src/post/visualizations/visualizations.c b/src/post/visualizations/visualizations.c index 2241aeea4..97d6d51db 100644 --- a/src/post/visualizations/visualizations.c +++ b/src/post/visualizations/visualizations.c @@ -19,7 +19,7 @@ * * This file contains plugin entries for several visualization post plugins. * - * $Id: visualizations.c,v 1.3 2003/05/31 18:33:30 miguelfreitas Exp $ + * $Id: visualizations.c,v 1.4 2003/08/04 03:47:11 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -43,7 +43,7 @@ post_info_t fftscope_special_info = { XINE_POST_TYPE_AUDIO_VISUALIZATION }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 3, "oscope", XINE_VERSION_CODE, &oscope_special_info, &oscope_init_plugin }, - { PLUGIN_POST, 3, "fftscope", XINE_VERSION_CODE, &fftscope_special_info, &fftscope_init_plugin }, + { PLUGIN_POST, 4, "oscope", XINE_VERSION_CODE, &oscope_special_info, &oscope_init_plugin }, + { PLUGIN_POST, 4, "fftscope", XINE_VERSION_CODE, &fftscope_special_info, &fftscope_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; |