[Mplayer-cvslog] CVS: main dec_video.c,1.47,1.48

Arpi of Ize arpi at mplayer.dev.hu
Fri Oct 19 16:43:40 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv21760

Modified Files:
	dec_video.c 
Log Message:
ffdivx postproc dest buffer is 16x16 aligned

Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- dec_video.c	16 Oct 2001 23:30:38 -0000	1.47
+++ dec_video.c	19 Oct 2001 14:43:38 -0000	1.48
@@ -519,15 +519,21 @@
 #ifdef FF_POSTPROCESS
 	    if(lavc_pp){
 		// postprocess
-		if(!sh_video->our_out_buffer)
-		    sh_video->our_out_buffer = (char*)memalign(64,sh_video->disp_w*sh_video->disp_h*3/2);
-    		stride[0]=sh_video->disp_w;
-    		stride[1]=stride[2]=sh_video->disp_w/2;
-    		planes[0]=sh_video->our_out_buffer;
-    		planes[2]=planes[0]+sh_video->disp_w*sh_video->disp_h;
-    		planes[1]=planes[2]+sh_video->disp_w*sh_video->disp_h/4;
+		int w=(sh_video->disp_w+15)&(~15);
+		int h=(sh_video->disp_h+15)&(~15);
+		int xoff=0; //(w-sh_video->disp_w)/2;
+		int yoff=0; //(h-sh_video->disp_h)/2;
+		if(!sh_video->our_out_buffer){
+		    sh_video->our_out_buffer = (char*)memalign(64,w*h*3/2);
+		    memset(sh_video->our_out_buffer,0,w*h*3/2);
+		}
+    		stride[0]=w;
+    		stride[1]=stride[2]=w/2;
+    		planes[0]=sh_video->our_out_buffer+stride[0]*yoff+xoff;
+    		planes[2]=sh_video->our_out_buffer+w*h+stride[2]*(yoff>>1)+(xoff>>1);
+    		planes[1]=planes[2]+w*h/4;
 		postprocess(lavc_picture.data,lavc_picture.linesize[0],
-			    planes,sh_video->disp_w,
+			    planes,stride[0],
 			    sh_video->disp_w,sh_video->disp_h,
 			    &quant_store[0][0],MBC+1,lavc_pp);
 	    } else




More information about the MPlayer-cvslog mailing list