[MPlayer-dev-eng] vf.c & PEREFER_ALIGNED_STRIDE
Arpi
arpi at thot.banki.hu
Tue Feb 11 07:56:08 CET 2003
Hi,
> I was browsing the source of mplayer to understand what and how the vo
> system works.
> Well this peace of code amaze me. I cannot understand what it does. In
> fact i cannot understand why it does that it does. Well sounds confusing.
Why?
It's quite easy:
if the codec/filter wants aligned stride, then we ask the next filter/vo if
it supports stride!=width (ACCEPT_STRIDE) and if yes, then adjust stride to
be macroblock aligned.
> Take a look
> vf.c:325 (vf_get_image)
>
> // check if codec prefer aligned stride:
> if(mp_imgflag&MP_IMGFLAG_PREFER_ALIGNED_STRIDE){
> int align=(mpi->flags&MP_IMGFLAG_PLANAR &&
> mpi->flags&MP_IMGFLAG_YUV) ?
> (8<<mpi->chroma_x_shift)-1 : 15; // -- maybe FIXME
> w2=((w+align)&(~align));
> if(mpi->width!=w2){
> // we have to change width... check if we CAN co it:
typo, should be 'do' ------^^
> int flags=vf->query_format(vf,outfmt); // should not fail
> if(!(flags&3)) mp_msg(MSGT_DECVIDEO,MSGL_WARN,"???
> vf_get_imag
> e{vf->query_format(outfmt)} failed!\n");
> // printf("query -> 0x%X \n",flags);
> if(flags&VFCAP_ACCEPT_STRIDE){
> mpi->width=w2;
> mpi->chroma_width=w2>>mpi->chroma_x_shift;
> }
> }
> }
>
> //--------------------------------------------
> My question is: Why when PREFER_ALIGNED_STRIDE is set and
> decoder confirms ACCEPT_STRIDE, then the "width" is changed!
> Why the stride is not changed, as requested?
> I may have missed some other part of code.
> Place explain.
>
> Best Regards
> Ivan Kalvachev
>
>
>
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
>
A'rpi / Astral & ESP-team
--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
"However, many people beg for its inclusion in Debian. Why?" - Gabucino
"Because having new software in Debian is good." - Josselin Mouette
"Because having good software in Debian is new." - Gabucino
More information about the MPlayer-dev-eng
mailing list