summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-08-12 13:56:25 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-08-12 13:56:25 +0000
commiteb8339e2b2719c63eeac10f3ec4df4c86d4b38ce (patch)
treedb23c54ff9c2460af2d793788940db5a9ff7fcac
parentf8fb6933244e2e494052c840bdd7dd9d66ed8512 (diff)
downloadxine-lib-eb8339e2b2719c63eeac10f3ec4df4c86d4b38ce.tar.gz
xine-lib-eb8339e2b2719c63eeac10f3ec4df4c86d4b38ce.tar.bz2
handle frame flags properly, small aspect ratio fix for expand
CVS patchset: 5277 CVS date: 2003/08/12 13:56:25
-rw-r--r--src/post/deinterlace/xine_plugin.c9
-rw-r--r--src/post/mosaico/mosaico.c6
-rw-r--r--src/post/mosaico/switch.c6
-rw-r--r--src/post/planar/boxblur.c6
-rw-r--r--src/post/planar/denoise3d.c6
-rw-r--r--src/post/planar/eq.c6
-rw-r--r--src/post/planar/eq2.c6
-rw-r--r--src/post/planar/expand.c4
-rw-r--r--src/post/planar/invert.c4
-rw-r--r--src/post/planar/unsharp.c6
10 files changed, 30 insertions, 29 deletions
diff --git a/src/post/deinterlace/xine_plugin.c b/src/post/deinterlace/xine_plugin.c
index a8c503501..d4e2cdc21 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.11 2003/08/04 03:47:10 miguelfreitas Exp $
+ * $Id: xine_plugin.c,v 1.12 2003/08/12 13:56:25 mroi Exp $
*
* advanced video deinterlacer plugin
* Jun/2003 by Miguel Freitas
@@ -558,6 +558,7 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream)
int i, skip, progressive = 0;
post_restore_video_frame(frame, port);
+ frame->flags &= ~VO_INTERLACED_FLAG;
/* this should be used to detect any special rff pattern */
this->rff_pattern = this->rff_pattern << 1;
@@ -576,7 +577,7 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream)
if( frame->format == XINE_IMGFMT_YV12 ) {
yuy2_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YUY2, frame->flags | VO_BOTH_FIELDS);
yuy2_frame->pts = frame->pts;
yuy2_frame->duration = frame->duration;
@@ -652,7 +653,7 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream)
/* Build the output from the first field. */
pthread_mutex_unlock (&this->lock);
deinterlaced_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YUY2, frame->flags | VO_BOTH_FIELDS);
pthread_mutex_lock (&this->lock);
extra_info_merge(deinterlaced_frame->extra_info, frame->extra_info);
@@ -719,7 +720,7 @@ static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream)
/* Build the output from the second field. */
pthread_mutex_unlock (&this->lock);
deinterlaced_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YUY2, frame->flags | VO_BOTH_FIELDS);
pthread_mutex_lock (&this->lock);
extra_info_merge(deinterlaced_frame->extra_info, frame->extra_info);
diff --git a/src/post/mosaico/mosaico.c b/src/post/mosaico/mosaico.c
index 60d9d7217..7a1d5eec9 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.12 2003/08/04 03:47:10 miguelfreitas Exp $
+ * $Id: mosaico.c,v 1.13 2003/08/12 13:56:25 mroi Exp $
*/
/*
@@ -431,7 +431,7 @@ static int _mosaico_draw_1(vo_frame_t *frame, post_mosaico_out_t *output) {
pthread_mutex_lock(&output->mut1);
if(output->saved_frame != NULL) output->saved_frame->free(output->saved_frame);
output->saved_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, frame->format, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, frame->format, frame->flags | VO_BOTH_FIELDS);
output->saved_frame->pts = frame->pts;
output->saved_frame->duration = frame->duration;
output->saved_frame->bad_frame = frame->bad_frame;
@@ -477,7 +477,7 @@ static int _mosaico_draw_2(vo_frame_t *frame, post_mosaico_out_t *output, int co
}
output->saved_frame_2[cont] = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, frame->format, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, frame->format, frame->flags | VO_BOTH_FIELDS);
output->saved_frame_2[cont]->pts = frame->pts;
output->saved_frame_2[cont]->duration = frame->duration;
output->saved_frame_2[cont]->bad_frame = frame->bad_frame;
diff --git a/src/post/mosaico/switch.c b/src/post/mosaico/switch.c
index 40f76a56d..cbe2335af 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.4 2003/08/04 03:47:10 miguelfreitas Exp $
+ * $Id: switch.c,v 1.5 2003/08/12 13:56:25 mroi Exp $
*/
/*
@@ -389,7 +389,7 @@ static int switch_draw_2(vo_frame_t *frame, xine_stream_t *stream)
/* printf("draw_2\n"); */
res_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, frame->format, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, frame->format, frame->flags | VO_BOTH_FIELDS);
res_frame->pts = frame->pts;
res_frame->duration = frame->duration;
res_frame->bad_frame = frame->bad_frame;
@@ -428,7 +428,7 @@ static int switch_draw(vo_frame_t *frame, xine_stream_t *stream)
/* printf("draw_1\n"); */
res_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, frame->format, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, frame->format, frame->flags | VO_BOTH_FIELDS);
res_frame->pts = frame->pts;
res_frame->duration = frame->duration;
res_frame->bad_frame = frame->bad_frame;
diff --git a/src/post/planar/boxblur.c b/src/post/planar/boxblur.c
index 8729da5c5..331cd2b6b 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.4 2003/08/04 03:47:10 miguelfreitas Exp $
+ * $Id: boxblur.c,v 1.5 2003/08/12 13:56:26 mroi Exp $
*
* mplayer's boxblur
* Copyright (C) 2002 Michael Niedermayer <michaelni@gmx.at>
@@ -416,7 +416,7 @@ static int boxblur_draw(vo_frame_t *frame, xine_stream_t *stream)
if( frame->format != XINE_IMGFMT_YV12 ) {
yv12_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS);
yv12_frame->pts = frame->pts;
yv12_frame->duration = frame->duration;
@@ -435,7 +435,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, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS);
extra_info_merge(out_frame->extra_info, frame->extra_info);
diff --git a/src/post/planar/denoise3d.c b/src/post/planar/denoise3d.c
index 2cc394596..af38165e9 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.4 2003/08/04 03:47:10 miguelfreitas Exp $
+ * $Id: denoise3d.c,v 1.5 2003/08/12 13:56:26 mroi Exp $
*
* mplayer's denoise3d
* Copyright (C) 2003 Daniel Moreno <comac@comac.darktech.org>
@@ -427,7 +427,7 @@ static int denoise3d_draw(vo_frame_t *frame, xine_stream_t *stream)
if( frame->format != XINE_IMGFMT_YV12 ) {
yv12_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS);
yv12_frame->pts = frame->pts;
yv12_frame->duration = frame->duration;
@@ -446,7 +446,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, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS);
extra_info_merge(out_frame->extra_info, frame->extra_info);
diff --git a/src/post/planar/eq.c b/src/post/planar/eq.c
index c0af88d78..b83e058b6 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.3 2003/08/04 03:47:11 miguelfreitas Exp $
+ * $Id: eq.c,v 1.4 2003/08/12 13:56:26 mroi Exp $
*
* mplayer's eq (soft video equalizer)
* Copyright (C) Richard Felker
@@ -460,7 +460,7 @@ static int eq_draw(vo_frame_t *frame, xine_stream_t *stream)
if( frame->format != XINE_IMGFMT_YV12 ) {
yv12_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS);
yv12_frame->pts = frame->pts;
yv12_frame->duration = frame->duration;
@@ -479,7 +479,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, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS);
extra_info_merge(out_frame->extra_info, frame->extra_info);
diff --git a/src/post/planar/eq2.c b/src/post/planar/eq2.c
index 680035625..0836f4139 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.4 2003/08/04 03:47:11 miguelfreitas Exp $
+ * $Id: eq2.c,v 1.5 2003/08/12 13:56:26 mroi Exp $
*
* mplayer's eq2 (soft video equalizer)
* Software equalizer (brightness, contrast, gamma, saturation)
@@ -657,7 +657,7 @@ static int eq2_draw(vo_frame_t *frame, xine_stream_t *stream)
if( frame->format != XINE_IMGFMT_YV12 ) {
yv12_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS);
yv12_frame->pts = frame->pts;
yv12_frame->duration = frame->duration;
@@ -675,7 +675,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, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS);
extra_info_merge(out_frame->extra_info, frame->extra_info);
diff --git a/src/post/planar/expand.c b/src/post/planar/expand.c
index f585a22ce..b9dcc9ee8 100644
--- a/src/post/planar/expand.c
+++ b/src/post/planar/expand.c
@@ -236,12 +236,12 @@ static int expand_draw(vo_frame_t *frame, xine_stream_t *stream)
int size, i, skip, new_height, border_height;
/* Calculate height of expanded frame */
- new_height = (double) frame->width * frame->ratio * 3.0 / 4.0;
+ new_height = (double) frame->height * frame->ratio * 3.0 / 4.0;
new_height = (new_height + 1) & ~1;
if(new_height > frame->height) {
expanded_frame = port->original_port->get_frame(port->original_port,
- frame->width, new_height, frame->ratio, frame->format, VO_BOTH_FIELDS);
+ frame->width, new_height, 4.0 / 3.0, frame->format, frame->flags | VO_BOTH_FIELDS);
expanded_frame->pts = frame->pts;
expanded_frame->duration = frame->duration;
expanded_frame->bad_frame = frame->bad_frame;
diff --git a/src/post/planar/invert.c b/src/post/planar/invert.c
index 76f13de34..c81d3e12a 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.11 2003/08/04 03:47:11 miguelfreitas Exp $
+ * $Id: invert.c,v 1.12 2003/08/12 13:56:26 mroi Exp $
*/
/*
@@ -236,7 +236,7 @@ static int invert_draw(vo_frame_t *frame, xine_stream_t *stream)
int size, i, skip;
inverted_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, frame->format, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, frame->format, frame->flags | VO_BOTH_FIELDS);
inverted_frame->pts = frame->pts;
inverted_frame->duration = frame->duration;
inverted_frame->bad_frame = frame->bad_frame;
diff --git a/src/post/planar/unsharp.c b/src/post/planar/unsharp.c
index 4564bbcc6..1c7aa18d1 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.4 2003/08/04 03:47:11 miguelfreitas Exp $
+ * $Id: unsharp.c,v 1.5 2003/08/12 13:56:26 mroi Exp $
*
* mplayer's unsharp
* Copyright (C) 2002 Rémi Guyomarch <rguyom@pobox.com>
@@ -469,7 +469,7 @@ static int unsharp_draw(vo_frame_t *frame, xine_stream_t *stream)
if( frame->format != XINE_IMGFMT_YV12 ) {
yv12_frame = port->original_port->get_frame(port->original_port,
- frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS);
yv12_frame->pts = frame->pts;
yv12_frame->duration = frame->duration;
@@ -488,7 +488,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, VO_BOTH_FIELDS);
+ frame->width, frame->height, frame->ratio, XINE_IMGFMT_YV12, frame->flags | VO_BOTH_FIELDS);
extra_info_merge(out_frame->extra_info, frame->extra_info);