[Mplayer-cvslog] CVS: main/libmpcodecs vf_yvu9.c,1.1,1.2
Arpi of Ize
arpi at mplayerhq.hu
Sun Jun 23 01:05:08 CEST 2002
- Previous message: [Mplayer-cvslog] CVS: main/postproc swscale.c,1.91,1.92 swscale_template.c,1.78,1.79
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs/native svq1.c,NONE,1.1 svq1.h,NONE,1.1 svq1_cb.h,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv10006
Modified Files:
vf_yvu9.c
Log Message:
use built-in yvu9->yv12 code, because it requires all src/dst strides and
offsets, the params passed to postproc's converter is simply not enough...
(temp. solution, waiting for yvu9 support in swscale)
Index: vf_yvu9.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_yvu9.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vf_yvu9.c 21 Jun 2002 17:37:30 -0000 1.1
+++ vf_yvu9.c 22 Jun 2002 23:05:00 -0000 1.2
@@ -29,16 +29,32 @@
static void put_image(struct vf_instance_s* vf, mp_image_t *mpi){
mp_image_t *dmpi;
+ int y,w,h;
// hope we'll get DR buffer:
dmpi=vf_get_image(vf->next,IMGFMT_YV12,
MP_IMGTYPE_TEMP, 0/*MP_IMGFLAG_ACCEPT_STRIDE*/,
mpi->w, mpi->h);
- yvu9toyv12(mpi->planes[0],mpi->planes[1],mpi->planes[2],
- dmpi->planes[0], dmpi->planes[1], dmpi->planes[2], mpi->w, mpi->h,
- dmpi->stride[0], dmpi->stride[1]);
-
+ for(y=0;y<mpi->h;y++)
+ memcpy(dmpi->planes[0]+dmpi->stride[0]*y,
+ mpi->planes[0]+mpi->stride[0]*y,
+ mpi->w);
+
+ w=mpi->w/4; h=mpi->h/2;
+ for(y=0;y<h;y++){
+ unsigned char* s=mpi->planes[1]+mpi->stride[1]*(y>>1);
+ unsigned char* d=dmpi->planes[1]+dmpi->stride[1]*y;
+ int x;
+ for(x=0;x<w;x++) d[2*x]=d[2*x+1]=s[x];
+ }
+ for(y=0;y<h;y++){
+ unsigned char* s=mpi->planes[2]+mpi->stride[2]*(y>>1);
+ unsigned char* d=dmpi->planes[2]+dmpi->stride[2]*y;
+ int x;
+ for(x=0;x<w;x++) d[2*x]=d[2*x+1]=s[x];
+ }
+
dmpi->qscale=mpi->qscale;
dmpi->qstride=mpi->qstride;
- Previous message: [Mplayer-cvslog] CVS: main/postproc swscale.c,1.91,1.92 swscale_template.c,1.78,1.79
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs/native svq1.c,NONE,1.1 svq1.h,NONE,1.1 svq1_cb.h,NONE,1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list