[Mplayer-cvslog] CVS: main dec_video.c,1.28,1.29 dll_init.c,1.26,1.27

Arpi of Ize arpi at mplayer.dev.hu
Thu Aug 23 13:54:58 CEST 2001


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

Modified Files:
	dec_video.c dll_init.c 
Log Message:
shmem_alloc->memalign

Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- dec_video.c	22 Aug 2001 19:40:46 -0000	1.28
+++ dec_video.c	23 Aug 2001 11:54:55 -0000	1.29
@@ -202,7 +202,7 @@
      DS_VideoDecoder_SetDestFmt(out_fmt&255,0);           // RGB/BGR
    }
 
-   sh_video->our_out_buffer = shmem_alloc(sh_video->disp_w*sh_video->disp_h*bpp/8); // FIXME!!!
+   sh_video->our_out_buffer = memalign(64,sh_video->disp_w*sh_video->disp_h*bpp/8); // FIXME!!!
 
    DS_VideoDecoder_Start();
 
@@ -268,7 +268,7 @@
 	decore(0x123, DEC_OPT_INIT, &dec_param, NULL);
 	dec_set.postproc_level = divx_quality;
 	decore(0x123, DEC_OPT_SETPP, &dec_set, NULL);
-	sh_video->our_out_buffer = shmem_alloc(((bits*dec_param.x_dim+7)/8)*dec_param.y_dim);
+	sh_video->our_out_buffer = memalign(64,((bits*dec_param.x_dim+7)/8)*dec_param.y_dim);
 //	sh_video->our_out_buffer = shmem_alloc(dec_param.x_dim*dec_param.y_dim*5);
    }
    mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: OpenDivX video codec init OK!\n");
@@ -444,7 +444,7 @@
 	    int y;
 	    // temporary hack - FIXME
 	    if(!sh_video->our_out_buffer)
-		sh_video->our_out_buffer = shmem_alloc(sh_video->disp_w*sh_video->disp_h*2);
+		sh_video->our_out_buffer = memalign(64,sh_video->disp_w*sh_video->disp_h*2);
 	    for(y=0;y<sh_video->disp_h;y++){
 	      unsigned char *s0=lavc_picture.data[0]+lavc_picture.linesize[0]*y;
 	      unsigned char *s1=lavc_picture.data[1]+lavc_picture.linesize[1]*y;
@@ -582,7 +582,7 @@
 //   sh_video=d_video->sh;sh_video->ds=d_video;
    mpeg2_init();
    // ========= Read & process sequence header & extension ============
-   videobuffer=shmem_alloc(VIDEOBUFFER_SIZE);
+   videobuffer=memalign(8,VIDEOBUFFER_SIZE);
    if(!videobuffer){ 
      mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Cannot allocate shared memory\n");
      return 0;

Index: dll_init.c
===================================================================
RCS file: /cvsroot/mplayer/main/dll_init.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- dll_init.c	22 Aug 2001 19:40:46 -0000	1.26
+++ dll_init.c	23 Aug 2001 11:54:55 -0000	1.27
@@ -281,7 +281,7 @@
     return 0;
   }
 
-  sh_video->our_out_buffer = shmem_alloc(sh_video->o_bih.biSizeImage);
+  sh_video->our_out_buffer = memalign(64,sh_video->o_bih.biSizeImage);
   if(!sh_video->our_out_buffer){
     mp_msg(MSGT_WIN32,MSGL_ERR,"not enough memory for decoded picture buffer (%ld bytes)\n", sh_video->o_bih.biSizeImage);
     return 0;




More information about the MPlayer-cvslog mailing list