[MPlayer-dev-eng] vf.c & PEREFER_ALIGNED_STRIDE
Ivan Kalvachev
ivan at cacad.com
Tue Feb 11 02:00:11 CET 2003
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.
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:
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
More information about the MPlayer-dev-eng
mailing list