optimized alpha resampling

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@251 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi_esp 2001-03-29 16:39:37 +00:00
parent 4eff90e380
commit dcb0840e67
1 changed files with 7 additions and 6 deletions

View File

@ -210,9 +210,9 @@ for(i=0;i<=fontdb;i++){
int x=desc->pic_a[i]->bmp[j];
int y=desc->pic_b[i]->bmp[j];
x=((x*f)>>8); // scale
if(x<0) x=0; else if(x>255) x=255;
x^=255; // invert
x=255-((x*f)>>8); // scale
//if(x<0) x=0; else if(x>255) x=255;
//x^=255; // invert
if(x+y>255) x=255-y; // to avoid overflows
@ -225,6 +225,7 @@ for(i=0;i<=fontdb;i++){
if(x>=252) x=0;
desc->pic_a[i]->bmp[j]=x;
// desc->pic_b[i]->bmp[j]=0; // hack
}
printf("DONE!\n");
}