[MPlayer-dev-eng] [PATCH] avoid useless full xvmc reinit with -fixed-vo if possible
Ivan Kalvachev
ikalvachev at gmail.com
Sun Feb 18 11:16:40 CET 2007
2007/2/18, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> Hello,
> On Sat, Feb 17, 2007 at 11:36:55PM +0200, Ivan Kalvachev wrote:
> > 2007/2/14, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> > >if the source format remains unchanged there is no need to reinit the
> > >hardware, buffers etc. which with xvmc in addition causes several blue
> > >frames.
> > >I added a voflag to indicate this condition because I think other vos
> > >can make use of it as well.
> > >Unfortunately config() can not be completely skipped because the
> > >geometry stuff is config() - which btw. I'd like to change as there is a
> > >massive code duplication with nearly every vo using the same code.
> >
> > I like the idea, however I wonder do we really need 3 new global
> > variables to do that?
>
> No, the can be easily made "local" to video_out.c now I think.
>
> > afaik by design config() could be called multiple times without
> > calling uninit(), so this functionality could be entirely internal for
> > the vo. Of course this is used only with -fixed-vo, that btw should
> > already be enabled by default... ;)
>
> Making this entirely internal to the vo would mean duplicating the code
> for each. But I will update the patch to make the needed changes in
> video_out.c instead of vf_vo.c
I don't like it, either.
The thing is that the vo already knows and stores the dimensions.
Instead of making check by itself, the vo checks for flag that is set
by vf_vo.c.
I'm trying to say that instead of duplicating:
if (vo_width==width && vo_height==height && vo_fmt==pix_fmt)
we would be duplicating
if (!(flags & VOFLAG_SAME_INPUT))
The difference is that in the second case we have
+ 3 new variables
+ new code to update and compare these variable
+ new flag.
More information about the MPlayer-dev-eng
mailing list