[MPlayer-dev-eng] libmpcodec and strides

Arpi arpi at thot.banki.hu
Sun Mar 10 18:00:18 CET 2002


Hi,

> > vd_*.c files set flags they support (like ACCEPT_STRIDE etc) and
> > requirements they need (like READABLE, PRESERVE).
> > then vd.c will call get_image() of libvo's control(), passing this mpi
> > struct. the libvo driver can check if it can provide such buffer, then it
> > sets stride + pointers and set DIRECT flag.
> > this works fine with mga, xmga and xv drivers.
> In many cases xv drivers accepts any strides (even when pitch == 1)
> because it uses SW "C"-convertion yv12_to_yuy2.

yes, BUT how to tell stride to the Xv driver ???

> > old dec_video didn't support DR at all.
> > (except your hack but it worked only for width%16==0 and vidix)
> No! The last version of my hack was acceptable for any picthes.
> The 405.avi has width == 356 which can't be DR'ed even on radeons.

it can be now, as most codecs support stride!=width, including vfw
and divx4 (dshow too, but it is not yet implemented in mplayer).
so vo driver should tell what stride it wants and the codec will use it!

> > > In short: 405.avi with vidix+DR+dshow doesn't display correctly.
> > > 
> > > Indeed I can fix that within of vosub_vidix but before it was detected o
> nly 
> > > once
> > > within init_video_vaa() function. If it should be implemented in libvo d
> rive
> > > r then
> > > those unnecessary compting will be performed for each frame.
> > ?
> Indeed, it's no question. Your voctrl_get_image provides much less info than
>  bes_da_t
> (which contains info about pitches) and in this connexion only way to comput
> e possibility
> of DR usage is in libvo.

i still not understood your prob.
get_image() tells you if the codec accepts any pitches (strides) or just
stride==width*bpp. if your vo stride != mpi->stride, but the codec accepts
any stride, you can override it by setting mpi->stride==vo_stride.

you couldn't do that before wiht your hack, as you was limited to
stride==width.

with libmpcodecs even 405.avi can be played on mga/xmga/xv using direct
rendering! and should be on vidix, dga, vesa etc too (when they implement
get_image()).


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list