[MPlayer-dev-eng] [PATCH] Direct3D libvo driver

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Nov 18 17:32:46 CET 2008


On Tue, Nov 18, 2008 at 05:39:10PM +0200, Georgi Petrov wrote:
> I know about -slices / -noslices. I don't know when draw_slices() is
> called when the user doesn't specify anything on the command line. I
> mean - what's the default policy?

That depends on the codec (basically only libmpeg2 supports it I think).

> What's the point of
> slices design as a whole??? I know about trying to stay in L2 cache,
> but I think the overhead of going through so much code every 16 lines
> is... it's not my business anyways.

Every 16 lines is about every 12000 pixels. At a main memory speed of
about 6 GB/s the data being in L2 cache saves close to 2 us, which
corresponds to about 4000 CPU cycles. You can execute a whole lot of
code in that time - normally the draw_slice should only be doing
some memcpy which you would have to do anyway, the overhead for just 2
function calls is not going to be 4000 cycles.

> Do you mean that after all direct
> draw_slice() calls, finally the libvo CALLBACK is used???

Yes, what did you think the MP_IMGFLAG_DRAW_CALLBACK was there for?

> If this is
> so, my code will copy the whole mpi->stride[1,2,3] on this final call
> anyway, so what's the point of each small direct draw_slice()?

No, it does not and it can not, because there is no data in the
mpi->plane when draw_slice was used (and thus MP_IMGFLAG_DRAW_CALLBACK
is set).

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list