[Mplayer-cvslog] CVS: main/libmpcodecs vf_spp.c,1.1,1.2

Michael Niedermayer CVS michael at mplayerhq.hu
Mon Oct 27 00:36:08 CET 2003


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv910

Modified Files:
	vf_spp.c 
Log Message:
10l and minor optimization


Index: vf_spp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_spp.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- vf_spp.c	26 Oct 2003 23:07:21 -0000	1.1
+++ vf_spp.c	26 Oct 2003 23:35:46 -0000	1.2
@@ -114,12 +114,13 @@
 }
 
 static inline void add_block(int16_t *dst, int stride, DCTELEM block[64]){
-	int x,y;
+	int y;
 	
 	for(y=0; y<8; y++){
-		for(x=0; x<8; x++){
-			dst[x + y*stride]+= block[x + y*8];
-		}
+		*(uint32_t*)&dst[0 + y*stride]+= *(uint32_t*)&block[0 + y*8];
+		*(uint32_t*)&dst[2 + y*stride]+= *(uint32_t*)&block[2 + y*8];
+		*(uint32_t*)&dst[4 + y*stride]+= *(uint32_t*)&block[4 + y*8];
+		*(uint32_t*)&dst[6 + y*stride]+= *(uint32_t*)&block[6 + y*8];
 	}
 }
 
@@ -290,6 +291,9 @@
     vf->uninit=uninit;
     vf->priv=malloc(sizeof(struct vf_priv_s));
     memset(vf->priv, 0, sizeof(struct vf_priv_s));
+    
+    avcodec_init();
+
     vf->priv->avctx= avcodec_alloc_context();
     dsputil_init(&vf->priv->dsp, vf->priv->avctx);
 



More information about the MPlayer-cvslog mailing list