[MPlayer-dev-eng] [PATCH] avoid useless full xvmc reinit with -fixed-vo if possible

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Feb 19 16:01:06 CET 2007


Hello,
On Mon, Feb 19, 2007 at 02:46:15PM +0200, Ivan Kalvachev wrote:
> 2007/2/18, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
[...]
> >3 new variables in video_out.c, in the former case 3 new variables in
> >each vo that supports it.
> 
> Each vo stores the width and height it gets by config(), so you are
> just adding more cruft.
> In vo_xvmc, these are image_height, image_width. I confess that I
> don't store the format, but that would add one variable ;)

Yes, I did not think of that they are already copied in the vos.

> >> + new code to update and compare these variable
> 
> The worst thing is that the new code is not smart enough.
> e.g. It doesn't handle -zoom cases, (where the vo uses swscale
> directly and on aspect change would have to initialize), so such vo
> should either ignore it completely or check the zoom flag too.

That's why it can't skip config completely. I thought about extending it
to skip config completely in some cases, but there are too many global
variables involved, not to mention the kind of hacks like vo_xvmc.c
having to set vo_directrendering to 1 each time.

[...]
> So in short your code is useless BLOAT.
> It creates a whole new infrastructure for thing that is implemented in ONE 
> LINE.

Yep, I stand corrected ;-)

> Anyway. There is something mode fundamentally wrong in your patch. If
> you had tested it with -loop 10 -fixed-vo, you'd quite easy would get
> an abort(), due to surface deprivation.

Um, I actually tested with -loop 0 (and of course -fixed-vo), but even
after about 30 "reinits" there was no problem.
No I readily believe the code was buggy, but a lack of testing was not
to blame for it.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list