summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-01 00:20:11 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-01 00:20:11 +0000
commit3a633f9c40e9c1be702c7ba80e2a2c05832d10a7 (patch)
tree855bffdb1d7db8a5912a6f92e783122a7abe02f3 /libmpcodecs
parent6e9e3289b397dae836636974a5b0bebd62b61b2e (diff)
downloadmpv-3a633f9c40e9c1be702c7ba80e2a2c05832d10a7.tar.bz2
mpv-3a633f9c40e9c1be702c7ba80e2a2c05832d10a7.tar.xz
fixed stride for packed formats, more detailed printf at image allocation
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4900 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index 3eb21c0aac..bacc32b664 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -80,14 +80,20 @@ mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, i
if(!(mpi->flags&(MP_IMGFLAG_ALLOCATED|MP_IMGFLAG_DIRECT))
&& mpi->type>MP_IMGTYPE_EXPORT){
// non-direct and not yet allocaed image. allocate it!
- printf("*** Allocating mp_image_t, %d bytes\n",mpi->bpp*mpi->width*mpi->height/8);
+ printf("*** Allocating mp_image_t, %dx%dx%dbpp %s %s, %d bytes\n",
+ mpi->width,mpi->height,mpi->bpp,
+ (mpi->flags&MP_IMGFLAG_YUV)?"YUV":"RGB",
+ (mpi->flags&MP_IMGFLAG_PLANAR)?"planar":"packed",
+ mpi->bpp*mpi->width*mpi->height/8);
mpi->planes[0]=memalign(64, mpi->bpp*mpi->width*mpi->height/8);
- if(!mpi->stride[0]) mpi->stride[0]=mpi->width;
if(mpi->flags&MP_IMGFLAG_PLANAR){
// YV12/I420. 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->width/2;
mpi->planes[1]=mpi->planes[0]+mpi->width*mpi->height;
mpi->planes[2]=mpi->planes[1]+mpi->width*mpi->height/4;
+ } else {
+ if(!mpi->stride[0]) mpi->stride[0]=mpi->width*mpi->bpp/8;
}
mpi->flags|=MP_IMGFLAG_ALLOCATED;
}