[MPlayer-G2-dev] slices

Attila Kinali attila at kinali.ch
Fri Feb 20 17:08:22 CET 2004


On Fri, 20 Feb 2004 10:49:29 -0500
D Richard Felker III <dalias at aerifal.cx> wrote:

 
> All subs are done by vf_expand unless the vo supports subtitles. The
> difference from G1 is that vo's are not allowed to implement their own
> stupid draw_alpha blending. Support in the vo is ONLY for hardware
> subpic devices.

Ok, then we can leave the hw accelareted case out for the
first implementation.

 
> > [1] There are a few more issues here as it's not always possible
> > to read the whole subfile at once as it might be a stream
> > embeded in ogm/mkv/nut/whatever file or come over a network
> > stream. 
> 
> Yes, well don't just think of subtitles. Also the clock, or OSD menu,
> or anything like that...

Juup, i didnt forget them.

> For files with B frames, we could only do the slice-time OSD blending
> for B frames or for the first frame in a closed GOP, and then blend
> onto other frames right before displaying them. But there are some
> difficulties about how to do it correctly if the frame is in video
> memory. Do you:
> 
> (a) keep the frame buffered in system memory entirely until time to
> display? This sounds slow.

Bad idea.
 
> (b) somehow know in advance the bounding boxes of OSD elements (just
> not their contents) and save these in system memory during the
> draw_slice, then use them to alpha-blend OSD at display time?

Should be possible.
I thought about a intermediate representation of the OSD
elements where their size and position is already known.
Actualy i'm thinking about keeping already rendered
elements (as RGBA resp YUVA picutres) in memory, so that
only the last step of blending has to be performed.
But i dont know how much memory this needs and whether
it would be faster to render it again for every frame.


> (c) violate READABLE flag and alpha-blend in video memory, like G1
> does... :(

I really dont want that mess again. IMHO it's better to
sacrifice a few cpu cycles to keep the vo code clean
otherwise we'll end up again with an vo-hell.


			Attila Kinali
-- 
egp ist vergleichbar mit einem ikea bausatz fuer flugzeugtraeger
			-- reeler in +kaosu




More information about the MPlayer-G2-dev mailing list