[MPlayer-dev-eng] libmpcodec and strides

Nick Kurshev nickols_k at mail.ru
Sun Mar 10 18:20:33 CET 2002


Hello, Arpi!

On Sun, 10 Mar 2002 18:00:18 +0100 you wrote:

> 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 ???
> 
Impossible and meaningless. Anyway it will use C-memcpy (in best case).

> > > 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!
vidix always tells which strides it wants. Maybe I've missed some flag?
Well, divxds is my base codec for testing.
divx4 doesn't work for me.
divx4vfw has the same effect.

Btw, how long doesn't work divx audio codec?
Detected audio codec: [divx] drv:4 (DivX audio (WMA))
fs seg 0x40032000
Loading DLL: 'divxa32.acm'
MPlayer was interrupted by signal 11 in module: init_audio_codec
> 
> > > > 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.
> 
Yes, vidix does that
> you couldn't do that before wiht your hack, as you was limited to
> stride==width.
Nope: it was limited by stride%width!=0 (roughly)
> 
> 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()).
Agree. Well - I'll try to study new stuff better.
> 
> 
> A'rpi / Astral & ESP-team
> 
> --
> Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> 


Best regards! Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20020310/116d4050/attachment.pgp>


More information about the MPlayer-dev-eng mailing list