Mercurial > mplayer.hg
diff libmpcodecs/vf.c @ 10424:783b09155fa4
3*100l (backported from g2)
| author | arpi |
|---|---|
| date | Sun, 13 Jul 2003 22:51:20 +0000 |
| parents | a4591b698f98 |
| children | 73b3e4336cd4 |
line wrap: on
line diff
--- a/libmpcodecs/vf.c Sun Jul 13 22:50:16 2003 +0000 +++ b/libmpcodecs/vf.c Sun Jul 13 22:51:20 2003 +0000 @@ -219,6 +219,7 @@ } if(mpi){ mpi->type=mp_imgtype; + mpi->w=w; mpi->h=h; // keep buffer allocation status & color flags only: // mpi->flags&=~(MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE|MP_IMGFLAG_DIRECT); mpi->flags&=MP_IMGFLAG_ALLOCATED|MP_IMGFLAG_TYPE_DISPLAYED|MP_IMGFLAGMASK_COLORS; @@ -234,7 +235,8 @@ mpi->flags&=~MP_IMGFLAG_ALLOCATED; printf("vf.c: have to REALLOCATE buffer memory :(\n"); } - } else { +// } else { + } { mpi->width=w2; mpi->chroma_width=(w2 + (1<<mpi->chroma_x_shift) - 1)>>mpi->chroma_x_shift; mpi->height=h; mpi->chroma_height=(h + (1<<mpi->chroma_y_shift) - 1)>>mpi->chroma_y_shift; } @@ -278,8 +280,10 @@ mpi->planes[0]=memalign(64, mpi->bpp*mpi->width*(mpi->height+2)/8); if(mpi->flags&MP_IMGFLAG_PLANAR){ // YV12/I420/YVU9/IF09. feel free to add other planar formats here... - if(!mpi->stride[0]) mpi->stride[0]=mpi->width; - if(!mpi->stride[1]) mpi->stride[1]=mpi->stride[2]=mpi->chroma_width; + //if(!mpi->stride[0]) + mpi->stride[0]=mpi->width; + //if(!mpi->stride[1]) + mpi->stride[1]=mpi->stride[2]=mpi->chroma_width; if(mpi->flags&MP_IMGFLAG_SWAPPED){ // I420/IYUV (Y,U,V) mpi->planes[1]=mpi->planes[0]+mpi->width*mpi->height; @@ -290,7 +294,8 @@ mpi->planes[1]=mpi->planes[2]+mpi->chroma_width*mpi->chroma_height; } } else { - if(!mpi->stride[0]) mpi->stride[0]=mpi->width*mpi->bpp/8; + //if(!mpi->stride[0]) + mpi->stride[0]=mpi->width*mpi->bpp/8; } // printf("clearing img!\n"); vf_mpi_clear(mpi,0,0,mpi->width,mpi->height);
