summaryrefslogtreecommitdiff
path: root/src/post/planar
diff options
context:
space:
mode:
Diffstat (limited to 'src/post/planar')
-rw-r--r--src/post/planar/boxblur.c10
-rw-r--r--src/post/planar/denoise3d.c10
-rw-r--r--src/post/planar/eq.c10
-rw-r--r--src/post/planar/eq2.c10
-rw-r--r--src/post/planar/expand.c36
-rw-r--r--src/post/planar/invert.c10
-rw-r--r--src/post/planar/planar.c16
-rw-r--r--src/post/planar/unsharp.c10
8 files changed, 44 insertions, 68 deletions
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 */