[Mplayer-cvslog] CVS: main/libvo font_load.c,1.6,1.7 vo_xv.c,1.4,1.5 mga_common.c,1.5,1.6 vo_x11.c,1.5,1.6

GEREOFFY arpi_esp at users.sourceforge.net
Thu Mar 29 18:06:39 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv26112

Modified Files:
	font_load.c vo_xv.c mga_common.c vo_x11.c 
Log Message:
OSD/SUB image quality & speed improvement

Index: font_load.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/font_load.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** font_load.c	2001/03/27 00:38:09	1.6
--- font_load.c	2001/03/29 16:06:36	1.7
***************
*** 200,204 ****
          return NULL;
      }
!     if(factor!=1.0f){
          // re-sample alpha
          int f=factor*256.0f;
--- 200,205 ----
          return NULL;
      }
!     //if(factor!=1.0f)
!     {
          // re-sample alpha
          int f=factor*256.0f;
***************
*** 209,218 ****
              int x=desc->pic_a[i]->bmp[j];
              int y=desc->pic_b[i]->bmp[j];
!             
!             x=((x*f*(255-y))>>16)+y;
              //x=(x*f)>>8;if(x<y) x=y;
              
!             if(x<0) x=0; else
!             if(x>255) x=255;
              desc->pic_a[i]->bmp[j]=x;
          }
--- 210,228 ----
              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
! 	    
! 	    if(x+y>255) x=255-y; // to avoid overflows
! 	    
! 	    //x=0;            
!             //x=((x*f*(255-y))>>16);
!             //x=((x*f*(255-y))>>16)+y;
              //x=(x*f)>>8;if(x<y) x=y;
              
!             if(x<1) x=1; else
!             if(x>=252) x=0;
! 	    
              desc->pic_a[i]->bmp[j]=x;
          }

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** vo_xv.c	2001/03/29 15:32:42	1.4
--- vo_xv.c	2001/03/29 16:06:36	1.5
***************
*** 265,269 ****
  //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
              if(srca[x])
!             dst[x]=(dst[x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
          }
          src+=stride;
--- 265,270 ----
  //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
              if(srca[x])
! //            dst[x]=(dst[x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
!             dst[x]=((dst[x]*srca[x])>>8)+src[x];
          }
          src+=stride;
***************
*** 278,282 ****
  //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
              if(srca[x])
!             dst[2*x]=(dst[2*x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
          }
          src+=stride;
--- 279,284 ----
  //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
              if(srca[x])
! //            dst[2*x]=(dst[2*x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
!             dst[2*x]=((dst[2*x]*srca[x])>>8)+src[x];
          }
          src+=stride;

Index: mga_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/mga_common.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** mga_common.c	2001/03/24 04:35:45	1.5
--- mga_common.c	2001/03/29 16:06:36	1.6
***************
*** 19,23 ****
  //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
              if(srca[x])
!             dst[x]=(dst[x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
          }
          src+=stride;
--- 19,24 ----
  //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
              if(srca[x])
! 	    dst[x]=((dst[x]*srca[x])>>8)+src[x];
!             //dst[x]=(dst[x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
          }
          src+=stride;
***************
*** 32,36 ****
  //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
              if(srca[x])
!             dst[2*x]=(dst[2*x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
          }
          src+=stride;
--- 33,38 ----
  //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
              if(srca[x])
! 	    dst[2*x]=((dst[2*x]*srca[x])>>8)+src[x];
!             //dst[2*x]=(dst[2*x]*(srca[x]^255)+src[x]*(srca[x]))>>8;
          }
          src+=stride;

Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** vo_x11.c	2001/03/25 04:28:40	1.5
--- vo_x11.c	2001/03/29 16:06:36	1.6
***************
*** 393,399 ****
  //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
              if(srca[x]){
!                 dst[0]=(dst[0]*(srca[x]^255)+src[x]*(srca[x]))>>8;
!                 dst[1]=(dst[1]*(srca[x]^255)+src[x]*(srca[x]))>>8;
!                 dst[2]=(dst[2]*(srca[x]^255)+src[x]*(srca[x]))>>8;
              }
              dst+=dbpp;
--- 393,402 ----
  //            dst[x]=(dst[x]*srca[x]+src[x]*(srca[x]^255))>>8;
              if(srca[x]){
! 		dst[0]=((dst[0]*srca[x])>>8)+src[x];
! 		dst[1]=((dst[1]*srca[x])>>8)+src[x];
! 		dst[2]=((dst[2]*srca[x])>>8)+src[x];
!                 //dst[0]=(dst[0]*(srca[x]^255)+src[x]*(srca[x]))>>8;
!                 //dst[1]=(dst[1]*(srca[x]^255)+src[x]*(srca[x]))>>8;
!                 //dst[2]=(dst[2]*(srca[x]^255)+src[x]*(srca[x]))>>8;
              }
              dst+=dbpp;


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list