mirror of https://github.com/mpv-player/mpv
optimized alpha resampling
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@251 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
4eff90e380
commit
dcb0840e67
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue