Mercurial > mplayer.hg
comparison libmpdemux/demux_mov.c @ 5628:e1179cdffbf5
get aspect info from display size if != real size
author | arpi |
---|---|
date | Mon, 15 Apr 2002 01:58:18 +0000 |
parents | ee9dd55ef383 |
children | dfc219577da6 |
comparison
equal
deleted
inserted
replaced
5627:a05efac12472 | 5628:e1179cdffbf5 |
---|---|
883 sh->disp_h=trak->stdata[27]|(trak->stdata[26]<<8); | 883 sh->disp_h=trak->stdata[27]|(trak->stdata[26]<<8); |
884 // if image size is zero, fallback to display size | 884 // if image size is zero, fallback to display size |
885 if(!sh->disp_w && !sh->disp_h) { | 885 if(!sh->disp_w && !sh->disp_h) { |
886 sh->disp_w=trak->tkdata[77]|(trak->tkdata[76]<<8); | 886 sh->disp_w=trak->tkdata[77]|(trak->tkdata[76]<<8); |
887 sh->disp_h=trak->tkdata[81]|(trak->tkdata[80]<<8); | 887 sh->disp_h=trak->tkdata[81]|(trak->tkdata[80]<<8); |
888 } | 888 } else if(sh->disp_w!=(trak->tkdata[77]|(trak->tkdata[76]<<8))){ |
889 | 889 // codec and display width differ... use display one for aspect |
890 sh->aspect=trak->tkdata[77]|(trak->tkdata[76]<<8); | |
891 sh->aspect/=trak->tkdata[81]|(trak->tkdata[80]<<8); | |
892 } | |
893 | |
890 if(depth&(~15)) printf("*** depht = 0x%X\n",depth); | 894 if(depth&(~15)) printf("*** depht = 0x%X\n",depth); |
891 | 895 |
892 // palettized? | 896 // palettized? |
893 depth&=31; // flag 32 means grayscale | 897 depth&=31; // flag 32 means grayscale |
894 if ((depth == 2) || (depth == 4) || (depth == 8)) | 898 if ((depth == 2) || (depth == 4) || (depth == 8)) |