# HG changeset patch # User arpi # Date 1025044172 0 # Node ID a48ad140c3aff328c7317521da1716416425f8d5 # Parent 1075fe5fc8c3fab19c7115b36bf54549c22ccddb support the 'align16' codec flag diff -r 1075fe5fc8c3 -r a48ad140c3af libmpcodecs/dec_video.c --- a/libmpcodecs/dec_video.c Tue Jun 25 22:26:34 2002 +0000 +++ b/libmpcodecs/dec_video.c Tue Jun 25 22:29:32 2002 +0000 @@ -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");