# HG changeset patch # User alex # Date 1024844634 0 # Node ID 05cd2cf758e4276a095ce3983c3242fac2a8e963 # Parent 3d520cf84f50585dd5f1c07a5b7da63194114c49 if09 support diff -r 3d520cf84f50 -r 05cd2cf758e4 libmpcodecs/vf.c --- a/libmpcodecs/vf.c Sun Jun 23 14:23:21 2002 +0000 +++ b/libmpcodecs/vf.c Sun Jun 23 15:03:54 2002 +0000 @@ -72,7 +72,7 @@ void vf_mpi_clear(mp_image_t* mpi,int x0,int y0,int w,int h){ int y; if(mpi->flags&MP_IMGFLAG_PLANAR){ - int div = (mpi->imgfmt == IMGFMT_YVU9) ? 2 : 1; + int div = (mpi->imgfmt == IMGFMT_YVU9 || mpi->imgfmt == IMGFMT_IF09) ? 2 : 1; y0&=~1;h+=h&1; if(x0==0 && w==mpi->width){ // full width clear: @@ -164,14 +164,19 @@ if(vf->get_image) vf->get_image(vf,mpi); if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ - // non-direct and not yet allocaed image. allocate it! - mpi->planes[0]=memalign(64, mpi->bpp*mpi->width*(mpi->height+2)/8); + // non-direct and not yet allocated image. allocate it! + // IF09 - allocate space for 4. plane delta info - unused + if (mpi->imgfmt == IMGFMT_IF09) + mpi->planes[0]=memalign(64, mpi->bpp*mpi->width*(mpi->height+2)/8+ + (mpi->width>>2)*(mpi->height>>2)); + else + mpi->planes[0]=memalign(64, mpi->bpp*mpi->width*(mpi->height+2)/8); if(mpi->flags&MP_IMGFLAG_PLANAR){ - // YV12/I420/YVU9. feel free to add other planar formats here... + // 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]) { - if (mpi->imgfmt == IMGFMT_YVU9) + if (mpi->imgfmt == IMGFMT_YVU9 || mpi->imgfmt == IMGFMT_IF09) mpi->stride[1]=mpi->stride[2]=mpi->width/4; else mpi->stride[1]=mpi->stride[2]=mpi->width/2; @@ -183,7 +188,7 @@ } else { // YV12,YVU9 (Y,V,U) mpi->planes[2]=mpi->planes[0]+mpi->width*mpi->height; - if (mpi->imgfmt == IMGFMT_YVU9) + if (mpi->imgfmt == IMGFMT_YVU9 || mpi->imgfmt == IMGFMT_IF09) mpi->planes[1]=mpi->planes[2]+(mpi->width>>2)*(mpi->height>>2); else mpi->planes[1]=mpi->planes[2]+(mpi->width>>1)*(mpi->height>>1); diff -r 3d520cf84f50 -r 05cd2cf758e4 libmpcodecs/vf_yvu9.c --- a/libmpcodecs/vf_yvu9.c Sun Jun 23 14:23:21 2002 +0000 +++ b/libmpcodecs/vf_yvu9.c Sun Jun 23 15:03:54 2002 +0000 @@ -64,7 +64,7 @@ //===========================================================================// static int query_format(struct vf_instance_s* vf, unsigned int fmt){ - if (fmt == IMGFMT_YVU9) + if (fmt == IMGFMT_YVU9 || fmt == IMGFMT_IF09) return vf_next_query_format(vf,IMGFMT_YV12) & (~VFCAP_CSP_SUPPORTED_BY_HW); return 0; }