diff options
author | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-10 17:51:52 +0000 |
---|---|---|
committer | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-10 17:51:52 +0000 |
commit | 4d60c8c8c65d55a6156016d86252ce0b8a78e477 (patch) | |
tree | 2771cd978a9130c469677287ebdc88f942eada12 | |
parent | 97a8c273530f70a1895a1bb947523cbdae1d1aea (diff) | |
download | mpv-4d60c8c8c65d55a6156016d86252ce0b8a78e477.tar.bz2 mpv-4d60c8c8c65d55a6156016d86252ce0b8a78e477.tar.xz |
fixed strides for packed fourccs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5029 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libvo/vosub_vidix.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/libvo/vosub_vidix.c b/libvo/vosub_vidix.c index 85db523a9a..46de594971 100644 --- a/libvo/vosub_vidix.c +++ b/libvo/vosub_vidix.c @@ -414,13 +414,14 @@ static int vidix_set_deint(const vidix_deinterlace_t *info) return vdlPlaybackSetDeint(vidix_handler, info); } +static int is_422_planes_eq=0; int vidix_init(unsigned src_width,unsigned src_height, unsigned x_org,unsigned y_org,unsigned dst_width, unsigned dst_height,unsigned format,unsigned dest_bpp, unsigned vid_w,unsigned vid_h,const void *info) { size_t i,awidth; - int err,is_422_planes_eq; + int err; uint32_t sstride,apitch; if(verbose > 1) printf("vosub_vidix: vidix_init() was called\n" @@ -603,16 +604,19 @@ static uint32_t vidix_get_image(mp_image_t *mpi) { if(mpi->type==MP_IMGTYPE_STATIC && vidix_play.num_frames>1) return VO_FALSE; if(mpi->flags&MP_IMGFLAG_READABLE) return VO_FALSE; /* slow video ram */ - mpi->planes[0]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.y; - mpi->stride[0]=dstrides.y; - if(mpi->flags&MP_IMGFLAG_PLANAR) + if(is_422_planes_eq || (mpi->flags&(MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH))) { - mpi->planes[1]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.v; - mpi->stride[1]=dstrides.v; - mpi->planes[2]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.u; - mpi->stride[2]=dstrides.u; + mpi->planes[0]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.y; + mpi->stride[0]=dstrides.y; + if(mpi->flags&MP_IMGFLAG_PLANAR) + { + mpi->planes[2]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.v; + mpi->stride[2]=dstrides.v; + mpi->planes[1]=vidix_mem+vidix_play.offsets[next_frame]+vidix_play.offset.u; + mpi->stride[1]=dstrides.u; + } + mpi->flags|=MP_IMGFLAG_DIRECT; } - mpi->flags|=MP_IMGFLAG_DIRECT; return VO_TRUE; } |