support the 'align16' codec flag

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6567 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2002-06-25 22:29:32 +00:00
parent d7d187300d
commit e7d0082512
1 changed files with 12 additions and 0 deletions

View File

@ -162,6 +162,18 @@ int init_video(sh_video_t *sh_video,char* codecname,int vfm,int status){
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");