[Mplayer-cvslog] CVS: main/libmpcodecs dec_video.c,1.137,1.138

Arpi of Ize arpi at mplayerhq.hu
Wed Jun 26 00:29:38 CEST 2002


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

Modified Files:
	dec_video.c 
Log Message:
support the 'align16' codec flag


Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/dec_video.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- dec_video.c	29 May 2002 22:39:25 -0000	1.137
+++ dec_video.c	25 Jun 2002 22:29:32 -0000	1.138
@@ -162,6 +162,18 @@
 	    continue;
 	}
 	// it's available, let's try to init!
+	if(sh_video->codec->flags & CODECS_FLAG_ALIGN16){
+	    // align width/height to n*16
+	    // FIXME: save orig w/h, and restore if codec init failed!
+	    if(sh_video->bih){
+		sh_video->disp_w=sh_video->bih->biWidth=(sh_video->bih->biWidth+15)&(~15);
+		sh_video->disp_h=sh_video->bih->biHeight=(sh_video->bih->biHeight+15)&(~15);
+	    } else {
+		sh_video->disp_w=(sh_video->disp_w+15)&(~15);
+		sh_video->disp_h=(sh_video->disp_h+15)&(~15);
+	    }
+	}
+	// init()
 	mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Opening video decoder: [%s] %s\n",mpvdec->info->short_name,mpvdec->info->name);
 	if(!mpvdec->init(sh_video)){
 	    mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VDecoder init failed :(\n");




More information about the MPlayer-cvslog mailing list