From 1f6f435497b141d52e6c8cd97eec59da79001ae1 Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Sat, 17 Apr 2004 19:54:31 +0000 Subject: swap usage of "up" and "down" to the more common meaning: "down" is the usual datapath from decoder to output, "up" is the opposite way -> this means swapping two function names -> this means increasing the post plugin iface version external plugin developers: just swap usage of _x_post_frame_copy_up() and _x_post_frame_copy_down() functions CVS patchset: 6412 CVS date: 2004/04/17 19:54:31 --- src/post/deinterlace/xine_plugin.c | 18 +++++++------- src/post/goom/xine_goom.c | 6 ++--- src/post/mosaico/mosaico.c | 14 +++++------ src/post/mosaico/switch.c | 10 ++++---- src/post/planar/boxblur.c | 14 +++++------ src/post/planar/denoise3d.c | 14 +++++------ src/post/planar/eq.c | 14 +++++------ src/post/planar/eq2.c | 14 +++++------ src/post/planar/expand.c | 2 +- src/post/planar/invert.c | 12 ++++----- src/post/planar/planar.c | 20 +++++++-------- src/post/planar/pp.c | 18 +++++++------- src/post/planar/unsharp.c | 14 +++++------ src/post/visualizations/fooviz.c | 6 ++--- src/post/visualizations/visualizations.c | 10 ++++---- src/xine-engine/post.c | 42 ++++++++++++++++---------------- src/xine-engine/post.h | 16 ++++++------ 17 files changed, 122 insertions(+), 122 deletions(-) diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c index 3ac69d39b..f44a7a213 100644 --- a/src/post/deinterlace/xine_plugin.c +++ b/src/post/deinterlace/xine_plugin.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.30 2004/04/09 02:57:05 miguelfreitas Exp $ + * $Id: xine_plugin.c,v 1.31 2004/04/17 19:54:31 mroi 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, 8, "tvtime", XINE_VERSION_CODE, &deinterlace_special_info, &deinterlace_init_plugin }, + { PLUGIN_POST | PLUGIN_MUST_PRELOAD, 9, "tvtime", XINE_VERSION_CODE, &deinterlace_special_info, &deinterlace_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; @@ -525,7 +525,7 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream) int i, skip, progressive = 0; orig_frame = frame; - _x_post_frame_copy_up(frame, frame->next); + _x_post_frame_copy_down(frame, frame->next); frame = frame->next; /* update tvtime context and method */ @@ -567,7 +567,7 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream) yuy2_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YUY2, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, yuy2_frame); + _x_post_frame_copy_down(frame, yuy2_frame); /* the logic for deciding upsampling to use comes from: * http://www.hometheaterhifi.com/volume_8_2/dvd-benchmark-special-report-chroma-bug-4-2001.html @@ -610,7 +610,7 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream) pthread_mutex_unlock (&this->lock); skip = yuy2_frame->draw(yuy2_frame, stream); pthread_mutex_lock (&this->lock); - _x_post_frame_copy_down(frame, yuy2_frame); + _x_post_frame_copy_up(frame, yuy2_frame); } else { int force24fps; @@ -758,7 +758,7 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream) skip = deinterlaced_frame->draw(deinterlaced_frame, stream); } - _x_post_frame_copy_down(frame, deinterlaced_frame); + _x_post_frame_copy_up(frame, deinterlaced_frame); deinterlaced_frame->free(deinterlaced_frame); pthread_mutex_lock (&this->lock); @@ -865,7 +865,7 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream) skip = deinterlaced_frame->draw(deinterlaced_frame, stream); } - _x_post_frame_copy_down(frame, deinterlaced_frame); + _x_post_frame_copy_up(frame, deinterlaced_frame); deinterlaced_frame->free(deinterlaced_frame); pthread_mutex_lock (&this->lock); } @@ -896,7 +896,7 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream) skip = frame->draw(frame, stream); } - _x_post_frame_copy_down(orig_frame, frame); + _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 index 486e3599c..97f0ba14e 100644 --- a/src/post/goom/xine_goom.c +++ b/src/post/goom/xine_goom.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.49 2004/02/12 18:25:07 mroi Exp $ + * $Id: xine_goom.c,v 1.50 2004/04/17 19:54:31 mroi Exp $ * * GOOM post plugin. * @@ -110,7 +110,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, 8, "goom", XINE_VERSION_CODE, &goom_special_info, &goom_init_plugin }, + { PLUGIN_POST | PLUGIN_MUST_PRELOAD, 9, "goom", XINE_VERSION_CODE, &goom_special_info, &goom_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/post/mosaico/mosaico.c b/src/post/mosaico/mosaico.c index 2fbf6ff76..31a55dc99 100644 --- a/src/post/mosaico/mosaico.c +++ b/src/post/mosaico/mosaico.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.22 2004/02/18 16:03:55 mroi Exp $ + * $Id: mosaico.c,v 1.23 2004/04/17 19:54:31 mroi Exp $ */ /* @@ -43,7 +43,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, 8, "mosaico", XINE_VERSION_CODE, &mosaico_special_info, &mosaico_init_plugin }, + { PLUGIN_POST, 9, "mosaico", XINE_VERSION_CODE, &mosaico_special_info, &mosaico_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; @@ -412,9 +412,9 @@ static int mosaico_draw_background(vo_frame_t *frame, xine_stream_t *stream) pthread_mutex_lock(&this->mutex); if (frame->bad_frame) { - _x_post_frame_copy_up(frame, frame->next); - skip = frame->next->draw(frame->next, stream); _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) { @@ -431,14 +431,14 @@ static int mosaico_draw_background(vo_frame_t *frame, xine_stream_t *stream) 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_up(frame, background); + _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_down(frame, background); + _x_post_frame_copy_up(frame, background); this->vpts_limit = background->vpts + background->duration; background->free(background); diff --git a/src/post/mosaico/switch.c b/src/post/mosaico/switch.c index 260bbf79a..ce4a8cd85 100644 --- a/src/post/mosaico/switch.c +++ b/src/post/mosaico/switch.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.12 2004/01/07 19:52:42 mroi Exp $ + * $Id: switch.c,v 1.13 2004/04/17 19:54:31 mroi Exp $ */ /* @@ -43,7 +43,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, 8, "switch", XINE_VERSION_CODE, &switch_special_info, &switch_init_plugin }, + { PLUGIN_POST, 9, "switch", XINE_VERSION_CODE, &switch_special_info, &switch_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; @@ -252,9 +252,9 @@ static int switch_draw(vo_frame_t *frame, xine_stream_t *stream) /* we are too early */ pthread_cond_wait(&this->display_condition_changed, &this->mutex); if (this->selected_source == source_num) { - _x_post_frame_copy_up(frame, frame->next); - skip = frame->next->draw(frame->next, NULL); _x_post_frame_copy_down(frame, frame->next); + skip = frame->next->draw(frame->next, NULL); + _x_post_frame_copy_up(frame, frame->next); this->vpts_limit = frame->vpts + frame->duration; if (skip) { this->skip = skip; diff --git a/src/post/planar/boxblur.c b/src/post/planar/boxblur.c index f85b6ad31..34117915f 100644 --- a/src/post/planar/boxblur.c +++ b/src/post/planar/boxblur.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.12 2004/01/07 19:52:42 mroi Exp $ + * $Id: boxblur.c,v 1.13 2004/04/17 19:54:32 mroi Exp $ * * mplayer's boxblur * Copyright (C) 2002 Michael Niedermayer @@ -322,7 +322,7 @@ static int boxblur_draw(vo_frame_t *frame, xine_stream_t *stream) yv12_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, yv12_frame); + _x_post_frame_copy_down(frame, yv12_frame); yuy2_to_yv12(frame->base[0], frame->pitches[0], yv12_frame->base[0], yv12_frame->pitches[0], @@ -339,7 +339,7 @@ static int boxblur_draw(vo_frame_t *frame, xine_stream_t *stream) out_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, out_frame); + _x_post_frame_copy_down(frame, out_frame); pthread_mutex_lock (&this->lock); @@ -368,15 +368,15 @@ static int boxblur_draw(vo_frame_t *frame, xine_stream_t *stream) skip = out_frame->draw(out_frame, stream); - _x_post_frame_copy_down(frame, out_frame); + _x_post_frame_copy_up(frame, out_frame); out_frame->free(out_frame); yv12_frame->free(yv12_frame); } else { - _x_post_frame_copy_up(frame, frame->next); - skip = frame->next->draw(frame->next, stream); _x_post_frame_copy_down(frame, frame->next); + skip = frame->next->draw(frame->next, stream); + _x_post_frame_copy_up(frame, frame->next); } return skip; diff --git a/src/post/planar/denoise3d.c b/src/post/planar/denoise3d.c index e4d8d65b2..3f69468e8 100644 --- a/src/post/planar/denoise3d.c +++ b/src/post/planar/denoise3d.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.12 2004/01/07 19:52:42 mroi Exp $ + * $Id: denoise3d.c,v 1.13 2004/04/17 19:54:32 mroi Exp $ * * mplayer's denoise3d * Copyright (C) 2003 Daniel Moreno @@ -352,7 +352,7 @@ static int denoise3d_draw(vo_frame_t *frame, xine_stream_t *stream) yv12_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, yv12_frame); + _x_post_frame_copy_down(frame, yv12_frame); yuy2_to_yv12(frame->base[0], frame->pitches[0], yv12_frame->base[0], yv12_frame->pitches[0], @@ -369,7 +369,7 @@ static int denoise3d_draw(vo_frame_t *frame, xine_stream_t *stream) out_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, out_frame); + _x_post_frame_copy_down(frame, out_frame); pthread_mutex_lock (&this->lock); @@ -400,7 +400,7 @@ static int denoise3d_draw(vo_frame_t *frame, xine_stream_t *stream) skip = out_frame->draw(out_frame, stream); - _x_post_frame_copy_down(frame, out_frame); + _x_post_frame_copy_up(frame, out_frame); out_frame->free(out_frame); @@ -414,9 +414,9 @@ static int denoise3d_draw(vo_frame_t *frame, xine_stream_t *stream) yv12_frame->free(yv12_frame); } else { - _x_post_frame_copy_up(frame, frame->next); - skip = frame->next->draw(frame->next, stream); _x_post_frame_copy_down(frame, frame->next); + skip = frame->next->draw(frame->next, stream); + _x_post_frame_copy_up(frame, frame->next); } return skip; diff --git a/src/post/planar/eq.c b/src/post/planar/eq.c index 7925d3e31..e28a71192 100644 --- a/src/post/planar/eq.c +++ b/src/post/planar/eq.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.11 2004/01/07 19:52:42 mroi Exp $ + * $Id: eq.c,v 1.12 2004/04/17 19:54:32 mroi Exp $ * * mplayer's eq (soft video equalizer) * Copyright (C) Richard Felker @@ -373,7 +373,7 @@ static int eq_draw(vo_frame_t *frame, xine_stream_t *stream) yv12_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, yv12_frame); + _x_post_frame_copy_down(frame, yv12_frame); yuy2_to_yv12(frame->base[0], frame->pitches[0], yv12_frame->base[0], yv12_frame->pitches[0], @@ -390,7 +390,7 @@ static int eq_draw(vo_frame_t *frame, xine_stream_t *stream) out_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, out_frame); + _x_post_frame_copy_down(frame, out_frame); pthread_mutex_lock (&this->lock); @@ -407,15 +407,15 @@ static int eq_draw(vo_frame_t *frame, xine_stream_t *stream) skip = out_frame->draw(out_frame, stream); - _x_post_frame_copy_down(frame, out_frame); + _x_post_frame_copy_up(frame, out_frame); out_frame->free(out_frame); yv12_frame->free(yv12_frame); } else { - _x_post_frame_copy_up(frame, frame->next); - skip = frame->next->draw(frame->next, stream); _x_post_frame_copy_down(frame, frame->next); + skip = frame->next->draw(frame->next, stream); + _x_post_frame_copy_up(frame, frame->next); } return skip; diff --git a/src/post/planar/eq2.c b/src/post/planar/eq2.c index 005fc07db..6badc61d9 100644 --- a/src/post/planar/eq2.c +++ b/src/post/planar/eq2.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.13 2004/01/07 19:52:42 mroi Exp $ + * $Id: eq2.c,v 1.14 2004/04/17 19:54:32 mroi Exp $ * * mplayer's eq2 (soft video equalizer) * Software equalizer (brightness, contrast, gamma, saturation) @@ -578,7 +578,7 @@ static int eq2_draw(vo_frame_t *frame, xine_stream_t *stream) yv12_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, yv12_frame); + _x_post_frame_copy_down(frame, yv12_frame); yuy2_to_yv12(frame->base[0], frame->pitches[0], yv12_frame->base[0], yv12_frame->pitches[0], @@ -594,7 +594,7 @@ static int eq2_draw(vo_frame_t *frame, xine_stream_t *stream) out_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, out_frame); + _x_post_frame_copy_down(frame, out_frame); pthread_mutex_lock (&this->lock); @@ -616,15 +616,15 @@ static int eq2_draw(vo_frame_t *frame, xine_stream_t *stream) skip = out_frame->draw(out_frame, stream); - _x_post_frame_copy_down(frame, out_frame); + _x_post_frame_copy_up(frame, out_frame); out_frame->free(out_frame); yv12_frame->free(yv12_frame); } else { - _x_post_frame_copy_up(frame, frame->next); - skip = frame->next->draw(frame->next, stream); _x_post_frame_copy_down(frame, frame->next); + skip = frame->next->draw(frame->next, stream); + _x_post_frame_copy_up(frame, frame->next); } return skip; diff --git a/src/post/planar/expand.c b/src/post/planar/expand.c index 41ab10227..9e9a51515 100644 --- a/src/post/planar/expand.c +++ b/src/post/planar/expand.c @@ -49,7 +49,7 @@ * - this frame is given to the decoder, which paints its image inside * - when the decoder draws the frame, the post plugin architecture * will automatically restore the old pointers - * This way, the decoder (or any other post plugin down the tree) will only + * This way, the decoder (or any other post plugin up the tree) will only * see the frame area between the black bars and by that modify the * enlarged version directly. No need for later copying. */ diff --git a/src/post/planar/invert.c b/src/post/planar/invert.c index 613565aa8..77f7c54d1 100644 --- a/src/post/planar/invert.c +++ b/src/post/planar/invert.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.19 2004/01/07 19:52:42 mroi Exp $ + * $Id: invert.c,v 1.20 2004/04/17 19:54:32 mroi Exp $ */ /* @@ -129,15 +129,15 @@ static int invert_draw(vo_frame_t *frame, xine_stream_t *stream) int size, i, skip; if (frame->bad_frame) { - _x_post_frame_copy_up(frame, frame->next); - skip = frame->next->draw(frame->next, stream); _x_post_frame_copy_down(frame, frame->next); + skip = frame->next->draw(frame->next, stream); + _x_post_frame_copy_up(frame, frame->next); return skip; } inverted_frame = 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_up(frame, inverted_frame); + _x_post_frame_copy_down(frame, inverted_frame); switch (inverted_frame->format) { case XINE_IMGFMT_YUY2: @@ -161,7 +161,7 @@ static int invert_draw(vo_frame_t *frame, xine_stream_t *stream) break; } skip = inverted_frame->draw(inverted_frame, stream); - _x_post_frame_copy_down(frame, inverted_frame); + _x_post_frame_copy_up(frame, inverted_frame); inverted_frame->free(inverted_frame); return skip; diff --git a/src/post/planar/planar.c b/src/post/planar/planar.c index 2abcb5ea0..07db7a4e5 100644 --- a/src/post/planar/planar.c +++ b/src/post/planar/planar.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.7 2004/01/07 19:52:42 mroi Exp $ + * $Id: planar.c,v 1.8 2004/04/17 19:54:32 mroi Exp $ * * catalog for planar post plugins */ @@ -52,13 +52,13 @@ post_info_t pp_special_info = { XINE_POST_TYPE_VIDEO_FILTER }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 8, "expand", XINE_VERSION_CODE, &expand_special_info, &expand_init_plugin }, - { PLUGIN_POST, 8, "invert", XINE_VERSION_CODE, &invert_special_info, &invert_init_plugin }, - { PLUGIN_POST, 8, "eq", XINE_VERSION_CODE, &eq_special_info, &eq_init_plugin }, - { PLUGIN_POST, 8, "denoise3d", XINE_VERSION_CODE, &denoise3d_special_info, &denoise3d_init_plugin }, - { PLUGIN_POST, 8, "boxblur", XINE_VERSION_CODE, &boxblur_special_info, &boxblur_init_plugin }, - { PLUGIN_POST, 8, "eq2", XINE_VERSION_CODE, &eq2_special_info, &eq2_init_plugin }, - { PLUGIN_POST, 8, "unsharp", XINE_VERSION_CODE, &unsharp_special_info, &unsharp_init_plugin }, - { PLUGIN_POST, 8, "pp", XINE_VERSION_CODE, &pp_special_info, &pp_init_plugin }, + { PLUGIN_POST, 9, "expand", XINE_VERSION_CODE, &expand_special_info, &expand_init_plugin }, + { PLUGIN_POST, 9, "invert", XINE_VERSION_CODE, &invert_special_info, &invert_init_plugin }, + { PLUGIN_POST, 9, "eq", XINE_VERSION_CODE, &eq_special_info, &eq_init_plugin }, + { PLUGIN_POST, 9, "denoise3d", XINE_VERSION_CODE, &denoise3d_special_info, &denoise3d_init_plugin }, + { PLUGIN_POST, 9, "boxblur", XINE_VERSION_CODE, &boxblur_special_info, &boxblur_init_plugin }, + { PLUGIN_POST, 9, "eq2", XINE_VERSION_CODE, &eq2_special_info, &eq2_init_plugin }, + { PLUGIN_POST, 9, "unsharp", XINE_VERSION_CODE, &unsharp_special_info, &unsharp_init_plugin }, + { PLUGIN_POST, 9, "pp", XINE_VERSION_CODE, &pp_special_info, &pp_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/post/planar/pp.c b/src/post/planar/pp.c index 95fcfb4f1..11b67dfd6 100755 --- a/src/post/planar/pp.c +++ b/src/post/planar/pp.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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: pp.c,v 1.5 2004/01/07 19:52:42 mroi Exp $ + * $Id: pp.c,v 1.6 2004/04/17 19:54:32 mroi Exp $ * * plugin for ffmpeg libpostprocess */ @@ -287,7 +287,7 @@ static int pp_draw(vo_frame_t *frame, xine_stream_t *stream) yv12_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, yv12_frame); + _x_post_frame_copy_down(frame, yv12_frame); yuy2_to_yv12(frame->base[0], frame->pitches[0], yv12_frame->base[0], yv12_frame->pitches[0], @@ -303,7 +303,7 @@ static int pp_draw(vo_frame_t *frame, xine_stream_t *stream) out_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, out_frame); + _x_post_frame_copy_down(frame, out_frame); pthread_mutex_lock (&this->lock); @@ -342,20 +342,20 @@ static int pp_draw(vo_frame_t *frame, xine_stream_t *stream) if(this->pp_mode) { skip = out_frame->draw(out_frame, stream); - _x_post_frame_copy_down(frame, out_frame); + _x_post_frame_copy_up(frame, out_frame); } else { - _x_post_frame_copy_up(frame, frame->next); - skip = frame->next->draw(frame->next, stream); _x_post_frame_copy_down(frame, frame->next); + skip = frame->next->draw(frame->next, stream); + _x_post_frame_copy_up(frame, frame->next); } out_frame->free(out_frame); yv12_frame->free(yv12_frame); } else { - _x_post_frame_copy_up(frame, frame->next); - skip = frame->next->draw(frame->next, stream); _x_post_frame_copy_down(frame, frame->next); + skip = frame->next->draw(frame->next, stream); + _x_post_frame_copy_up(frame, frame->next); } return skip; diff --git a/src/post/planar/unsharp.c b/src/post/planar/unsharp.c index 31359f500..786d7d387 100644 --- a/src/post/planar/unsharp.c +++ b/src/post/planar/unsharp.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.13 2004/01/07 19:52:42 mroi Exp $ + * $Id: unsharp.c,v 1.14 2004/04/17 19:54:32 mroi Exp $ * * mplayer's unsharp * Copyright (C) 2002 Rémi Guyomarch @@ -404,7 +404,7 @@ static int unsharp_draw(vo_frame_t *frame, xine_stream_t *stream) yv12_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, yv12_frame); + _x_post_frame_copy_down(frame, yv12_frame); yuy2_to_yv12(frame->base[0], frame->pitches[0], yv12_frame->base[0], yv12_frame->pitches[0], @@ -421,7 +421,7 @@ static int unsharp_draw(vo_frame_t *frame, xine_stream_t *stream) out_frame = port->original_port->get_frame(port->original_port, frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS); - _x_post_frame_copy_up(frame, out_frame); + _x_post_frame_copy_down(frame, out_frame); pthread_mutex_lock (&this->lock); @@ -455,15 +455,15 @@ static int unsharp_draw(vo_frame_t *frame, xine_stream_t *stream) skip = out_frame->draw(out_frame, stream); - _x_post_frame_copy_down(frame, out_frame); + _x_post_frame_copy_up(frame, out_frame); out_frame->free(out_frame); yv12_frame->free(yv12_frame); } else { - _x_post_frame_copy_up(frame, frame->next); - skip = frame->next->draw(frame->next, stream); _x_post_frame_copy_down(frame, frame->next); + skip = frame->next->draw(frame->next, stream); + _x_post_frame_copy_up(frame, frame->next); } return skip; diff --git a/src/post/visualizations/fooviz.c b/src/post/visualizations/fooviz.c index d9a9ca845..f05689592 100644 --- a/src/post/visualizations/fooviz.c +++ b/src/post/visualizations/fooviz.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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.20 2004/02/12 18:25:08 mroi Exp $ + * $Id: fooviz.c,v 1.21 2004/04/17 19:54:32 mroi Exp $ * */ @@ -320,6 +320,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, 8, "fooviz", XINE_VERSION_CODE, &fooviz_special_info, &fooviz_init_plugin }, + { PLUGIN_POST, 9, "fooviz", XINE_VERSION_CODE, &fooviz_special_info, &fooviz_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/post/visualizations/visualizations.c b/src/post/visualizations/visualizations.c index 92a5df1fa..e211d08eb 100644 --- a/src/post/visualizations/visualizations.c +++ b/src/post/visualizations/visualizations.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -19,7 +19,7 @@ * * This file contains plugin entries for several visualization post plugins. * - * $Id: visualizations.c,v 1.10 2004/01/07 19:52:42 mroi Exp $ + * $Id: visualizations.c,v 1.11 2004/04/17 19:54:32 mroi Exp $ */ #ifdef HAVE_CONFIG_H @@ -48,8 +48,8 @@ post_info_t fftgraph_special_info = { XINE_POST_TYPE_AUDIO_VISUALIZATION }; plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_POST, 8, "oscope", XINE_VERSION_CODE, &oscope_special_info, &oscope_init_plugin }, - { PLUGIN_POST, 8, "fftscope", XINE_VERSION_CODE, &fftscope_special_info, &fftscope_init_plugin }, - { PLUGIN_POST, 8, "fftgraph", XINE_VERSION_CODE, &fftgraph_special_info, &fftgraph_init_plugin }, + { PLUGIN_POST, 9, "oscope", XINE_VERSION_CODE, &oscope_special_info, &oscope_init_plugin }, + { PLUGIN_POST, 9, "fftscope", XINE_VERSION_CODE, &fftscope_special_info, &fftscope_init_plugin }, + { PLUGIN_POST, 9, "fftgraph", XINE_VERSION_CODE, &fftgraph_special_info, &fftgraph_init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c index ae9c9ab09..e891691eb 100644 --- a/src/xine-engine/post.c +++ b/src/xine-engine/post.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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: post.c,v 1.22 2004/02/12 18:19:12 mroi Exp $ + * $Id: post.c,v 1.23 2004/04/17 19:54:31 mroi Exp $ */ /* @@ -274,9 +274,9 @@ static void post_frame_free(vo_frame_t *vo_img) { _x_post_dec_usage(port); } else { /* this frame is still in use */ - _x_post_frame_copy_up(vo_img, vo_img->next); - vo_img->next->free(vo_img->next); _x_post_frame_copy_down(vo_img, vo_img->next); + vo_img->next->free(vo_img->next); + _x_post_frame_copy_up(vo_img, vo_img->next); if (port->frame_lock) pthread_mutex_unlock(port->frame_lock); } } @@ -285,9 +285,9 @@ static void post_frame_proc_slice(vo_frame_t *vo_img, uint8_t **src) { post_video_port_t *port = _x_post_video_frame_to_port(vo_img); if (port->frame_lock) pthread_mutex_lock(port->frame_lock); - _x_post_frame_copy_up(vo_img, vo_img->next); - vo_img->next->proc_slice(vo_img->next, src); _x_post_frame_copy_down(vo_img, vo_img->next); + vo_img->next->proc_slice(vo_img->next, src); + _x_post_frame_copy_up(vo_img, vo_img->next); if (port->frame_lock) pthread_mutex_unlock(port->frame_lock); } @@ -295,9 +295,9 @@ static void post_frame_proc_frame(vo_frame_t *vo_img) { post_video_port_t *port = _x_post_video_frame_to_port(vo_img); if (port->frame_lock) pthread_mutex_lock(port->frame_lock); - _x_post_frame_copy_up(vo_img, vo_img->next); - vo_img->next->proc_frame(vo_img->next); _x_post_frame_copy_down(vo_img, vo_img->next); + vo_img->next->proc_frame(vo_img->next); + _x_post_frame_copy_up(vo_img, vo_img->next); if (port->frame_lock) pthread_mutex_unlock(port->frame_lock); } @@ -305,9 +305,9 @@ static void post_frame_field(vo_frame_t *vo_img, int which_field) { post_video_port_t *port = _x_post_video_frame_to_port(vo_img); if (port->frame_lock) pthread_mutex_lock(port->frame_lock); - _x_post_frame_copy_up(vo_img, vo_img->next); - vo_img->next->field(vo_img->next, which_field); _x_post_frame_copy_down(vo_img, vo_img->next); + vo_img->next->field(vo_img->next, which_field); + _x_post_frame_copy_up(vo_img, vo_img->next); if (port->frame_lock) pthread_mutex_unlock(port->frame_lock); } @@ -316,9 +316,9 @@ static int post_frame_draw(vo_frame_t *vo_img, xine_stream_t *stream) { int skip; if (port->frame_lock) pthread_mutex_lock(port->frame_lock); - _x_post_frame_copy_up(vo_img, vo_img->next); - skip = vo_img->next->draw(vo_img->next, stream); _x_post_frame_copy_down(vo_img, vo_img->next); + skip = vo_img->next->draw(vo_img->next, stream); + _x_post_frame_copy_up(vo_img, vo_img->next); if (port->frame_lock) pthread_mutex_unlock(port->frame_lock); return skip; } @@ -327,10 +327,10 @@ static void post_frame_lock(vo_frame_t *vo_img) { post_video_port_t *port = _x_post_video_frame_to_port(vo_img); if (port->frame_lock) pthread_mutex_lock(port->frame_lock); - _x_post_frame_copy_up(vo_img, vo_img->next); + _x_post_frame_copy_down(vo_img, vo_img->next); vo_img->lock_counter++; vo_img->next->lock(vo_img->next); - _x_post_frame_copy_down(vo_img, vo_img->next); + _x_post_frame_copy_up(vo_img, vo_img->next); if (port->frame_lock) pthread_mutex_unlock(port->frame_lock); } @@ -362,13 +362,13 @@ static void post_frame_proc_macro_block(int x, post_video_port_t *port = _x_post_video_frame_to_port(current_frame); if (port->frame_lock) pthread_mutex_lock(port->frame_lock); - _x_post_frame_copy_up(current_frame, current_frame->next); + _x_post_frame_copy_down(current_frame, current_frame->next); current_frame->next->proc_macro_block(x, y, mb_type, motion_type, mv_field_sel, dmvector, cbp, dct_type, current_frame->next, forward_ref_frame, backward_ref_frame, picture_structure, second_field, f_mot_pmv, b_mot_pmv); - _x_post_frame_copy_down(current_frame, current_frame->next); + _x_post_frame_copy_up(current_frame, current_frame->next); if (port->frame_lock) pthread_mutex_unlock(port->frame_lock); } @@ -428,7 +428,7 @@ vo_frame_t *_x_post_restore_video_frame(vo_frame_t *frame, post_video_port_t *po vo_frame_t *original = frame->next; /* propagate any changes */ - _x_post_frame_copy_up(frame, original); + _x_post_frame_copy_down(frame, original); /* put the now free slot into the free frames list */ pthread_mutex_lock(&port->free_frames_lock); @@ -439,8 +439,8 @@ vo_frame_t *_x_post_restore_video_frame(vo_frame_t *frame, post_video_port_t *po return original; } -void _x_post_frame_copy_up(vo_frame_t *from, vo_frame_t *to) { - /* propagate changes upwards (from decoders to video out) */ +void _x_post_frame_copy_down(vo_frame_t *from, vo_frame_t *to) { + /* propagate changes downwards (from decoders to video out) */ to->pts = from->pts; to->bad_frame = from->bad_frame; to->duration = from->duration; @@ -456,8 +456,8 @@ void _x_post_frame_copy_up(vo_frame_t *from, vo_frame_t *to) { _x_extra_info_merge(to->extra_info, from->extra_info); } -void _x_post_frame_copy_down(vo_frame_t *to, vo_frame_t *from) { - /* propagate changes downwards (from video out to decoders) */ +void _x_post_frame_copy_up(vo_frame_t *to, vo_frame_t *from) { + /* propagate changes upwards (from video out to decoders) */ to->vpts = from->vpts; to->duration = from->duration; to->stream = from->stream; diff --git a/src/xine-engine/post.h b/src/xine-engine/post.h index 8e61a1009..2823ad11b 100644 --- a/src/xine-engine/post.h +++ b/src/xine-engine/post.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2000-2003 the xine project + * Copyright (C) 2000-2004 the xine project * * This file is part of xine, a free video player. * @@ -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: post.h,v 1.18 2004/02/12 18:19:12 mroi Exp $ + * $Id: post.h,v 1.19 2004/04/17 19:54:31 mroi Exp $ * * post plugin definitions * @@ -40,7 +40,7 @@ # include #endif -#define POST_PLUGIN_IFACE_VERSION 8 +#define POST_PLUGIN_IFACE_VERSION 9 #define POST_NULL_STREAM (xine_stream_t *)-1 @@ -251,16 +251,16 @@ vo_frame_t *_x_post_restore_video_frame(vo_frame_t *frame, post_video_port_t *po * you need to propagate potential changes up and down the pipe, so the usual * procedure for this situation would be: * - * _x_post_frame_copy_up(frame, frame->next); - * frame->next->function(frame->next); * _x_post_frame_copy_down(frame, frame->next); + * frame->next->function(frame->next); + * _x_post_frame_copy_up(frame, frame->next); */ -void _x_post_frame_copy_up(vo_frame_t *from, vo_frame_t *to); -void _x_post_frame_copy_down(vo_frame_t *to, vo_frame_t *from); +void _x_post_frame_copy_down(vo_frame_t *from, vo_frame_t *to); +void _x_post_frame_copy_up(vo_frame_t *to, vo_frame_t *from); /* when you shortcut a frames usual draw() travel so that it will never reach * the draw() function of the original issuer, you still have to do some - * housekeeping on the frame, before returning control down the pipe */ + * housekeeping on the frame, before returning control up the pipe */ void _x_post_frame_u_turn(vo_frame_t *frame, xine_stream_t *stream); /* use this to create a new, trivially decorated overlay manager in which -- cgit v1.2.3