[MPlayer-dev-eng] [PATCH] avoid useless full xvmc reinit with -fixed-vo if possible
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Feb 18 13:03:19 CET 2007
Hello,
On Sun, Feb 18, 2007 at 01:06:11PM +0200, Ivan Kalvachev wrote:
> 2007/2/18, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> >If your last mail is the only objections you have, doesn't it make more
> >sense to just move the check from video_out.c to vo_xvmc.c instead of
> >reverting all of it?
> >Even if we wouldn't want the functionality, I think having split the
> >config() function doesn't hurt...
>
> I'm still maintainer of xvmc, I did replied, politely disagreeing
> with the changes. 12 hour later you reply and 1 hour after that you
> committed code that you haven't even posted as patch.
Yes, it was stupid, sorry. I was somehow somewhat confused.
The best excuse, though still a bad one, is that you objections were
mostly with the part you aren't maintaining :-)
> I'm not sure I can keep polite tone in this discussion for much longer.
>
> Revert Immediately, using svn copy method, and I'd pretend that this
> have never happened.
I am not too interested in pretensions, so at the risk of annoying you
endlessly I'd still like to suggest attached patch.
I does have the advantage of having why previous version was a bad idea
in svn log...
Also my reading of svn-howto was hat svn copy was to be used for
earth-shattering-stupid commits, so I would like it someone would risk
his neck by commenting on the way of reverting it.
Sorry,
Reimar Döffinger
-------------- next part --------------
Index: libvo/video_out.c
===================================================================
--- libvo/video_out.c (revision 22255)
+++ libvo/video_out.c (working copy)
@@ -327,7 +327,6 @@
int config_video_out(vo_functions_t *vo, uint32_t width, uint32_t height,
uint32_t d_width, uint32_t d_height, uint32_t flags,
char *title, uint32_t format) {
- static uint32_t old_width, old_height, old_format;
int res;
panscan_init();
aspect_save_orig(width,height);
@@ -344,14 +343,7 @@
vo_dwidth = d_width;
vo_dheight = d_height;
- if (vo_config_count && width == old_width && height == old_height &&
- format == old_format)
- flags |= VOFLAG_SAME_INPUT;
- res = vo->config(width, height, d_width, d_height, flags, title, format);
- if (!res) {
- old_width = width; old_height = height; old_format = format;
- }
- return res;
+ return vo->config(width, height, d_width, d_height, flags, title, format);
}
#if defined(HAVE_FBDEV)||defined(HAVE_VESA)
Index: libvo/video_out.h
===================================================================
--- libvo/video_out.h (revision 22255)
+++ libvo/video_out.h (working copy)
@@ -95,7 +95,6 @@
#define VOFLAG_MODESWITCHING 0x02
#define VOFLAG_SWSCALE 0x04
#define VOFLAG_FLIPPING 0x08
-#define VOFLAG_SAME_INPUT 0x10
#define VOFLAG_XOVERLAY_SUB_VO 0x10000
typedef struct vo_info_s
Index: libvo/vo_xvmc.c
===================================================================
--- libvo/vo_xvmc.c (revision 22255)
+++ libvo/vo_xvmc.c (working copy)
@@ -55,6 +57,7 @@
static int top_field_first;
static int image_width,image_height;
+static uint32_t image_format;
static uint32_t drwX,drwY;
#define NO_SUBPICTURE 0
@@ -610,9 +630,10 @@
#endif
//end of vo_xv
- if (!(flags & VOFLAG_SAME_INPUT))
+ if (!vo_config_count || width != image_width || height != image_height || format != image_format)
if (init_xvmc(width, height, format) < 0) return -1;
+ image_format = format;
//taken from vo_xv
image_height = height;
image_width = width;
More information about the MPlayer-dev-eng
mailing list