[Mplayer-cvslog] CVS: main/libvo vo_dga.c,1.21,1.22
Andreas Ackermann
acki2 at users.sourceforge.net
Mon May 7 21:16:06 CEST 2001
Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv19634/main/libvo
Modified Files:
vo_dga.c
Log Message:
- now chooses mode with highest ymax (enables doublebuffering in some cases
it didn't work before)
- use my own memcopy() on non MMX machines again
- do memcpy() in one single block if stride==0
Index: vo_dga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_dga.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** vo_dga.c 2001/05/03 22:39:38 1.21
--- vo_dga.c 2001/05/07 19:16:04 1.22
***************
*** 24,27 ****
--- 24,33 ----
*
* $Log$
+ * Revision 1.22 2001/05/07 19:16:04 acki2
+ * - now chooses mode with highest ymax (enables doublebuffering in some cases
+ * it didn't work before)
+ * - use my own memcopy() on non MMX machines again
+ * - do memcpy() in one single block if stride==0
+ *
* Revision 1.21 2001/05/03 22:39:38 acki2
* - finally: 15to16 conversion included!!!
***************
*** 379,383 ****
--- 385,399 ----
: "memory" )
+ // quick & dirty - for debugging only
+
+ void fillblock(char *strt, int yoff, int lines, int val){
+ char *i;
+ for(i = strt + yoff * vo_dga_width *HW_MODE.vdm_bytespp;
+ i< strt + (lines+yoff) * vo_dga_width *HW_MODE.vdm_bytespp; ){
+ *i++ = val;
+ }
+ }
+
//---------------------------------------------------------
***************
*** 395,409 ****
switch(SRC_MODE.vdm_conversion_func){
case VDM_CONV_NATIVE:
! {int i;
! for(i=0; i< vo_dga_lines; i++){
memcpy(d, s, vo_dga_bytes_per_line);
d+=vo_dga_vp_skip;
d+=vo_dga_bytes_per_line;
s+=vo_dga_bytes_per_line;
! }
! }
!
! // rep_movsl(d, s, lpl, vo_dga_vp_skip, numlines );
break;
case VDM_CONV_15TO16:
--- 411,446 ----
switch(SRC_MODE.vdm_conversion_func){
case VDM_CONV_NATIVE:
!
! #ifdef HAVE_MMX
! // use the code from fastmemcpy.h
! if(vo_dga_vp_skip){
! // use some stride ...
! int i;
! for(i=0; i< vo_dga_lines; i++){
memcpy(d, s, vo_dga_bytes_per_line);
d+=vo_dga_vp_skip;
d+=vo_dga_bytes_per_line;
s+=vo_dga_bytes_per_line;
! }
! }else{
! // no stride, cool + fast ...
! memcpy(d,s, vo_dga_bytes_per_line * vo_dga_lines);
! }
! #else
! // use some homebrewn assembly code ...
! rep_movsl(d, s, lpl, vo_dga_vp_skip, numlines );
! #endif
! // DBG-COde
!
! #if 0
! d = (&((char *)vo_dga_base)[vo_dga_vp_offset + vo_dga_dbf_current * vo_dga_dbf_mem_offset]);
! fillblock(d, 0, 10, 0x800000ff);
! fillblock(d, 10, 10, 0x8000ff00);
! fillblock(d, 20, 10, 0x80ff0000);
! fillblock(d, 30, 10, 0xff0000ff);
! fillblock(d, 40, 10, 0x800000ff);
! fillblock(d, 50, 10, 0x0f0000ff);
! #endif
break;
case VDM_CONV_15TO16:
***************
*** 436,442 ****
l = *(((uint32_t *)s)++);
m = (l & 0xff000000)>> 24 ;
! *(((uint32_t *)d)++) = l & 0x00ffffff;
m |= *(((uint16_t *)s)++) << 8;
! *(((uint32_t *)d)++) = m;
}
d+= vp_skip;
--- 473,479 ----
l = *(((uint32_t *)s)++);
m = (l & 0xff000000)>> 24 ;
! *(((uint32_t *)d)++) = (l & 0x00ffffff); // | 0x80000000;
m |= *(((uint16_t *)s)++) << 8;
! *(((uint32_t *)d)++) = m; // | 0x80000000 ;
}
d+= vp_skip;
***************
*** 642,647 ****
int check_res( int num, int x, int y, int bpp,
! int new_x, int new_y, int new_vbi,
! int *old_x, int *old_y, int *old_vbi){
vd_printf(VD_RES, "vo_dga: (%3d) Trying %4d x %4d @ %3d Hz @ depth %2d ..",
--- 679,684 ----
int check_res( int num, int x, int y, int bpp,
! int new_x, int new_y, int new_vbi, int new_maxy,
! int *old_x, int *old_y, int *old_vbi, int *old_maxy){
vd_printf(VD_RES, "vo_dga: (%3d) Trying %4d x %4d @ %3d Hz @ depth %2d ..",
***************
*** 686,689 ****
--- 723,735 ----
)
)
+ ||
+ // if everything is equal, then use the mode with the lower
+ // stride
+ (
+ (new_x == *old_x) &&
+ (new_y == *old_y) &&
+ (new_vbi == *old_vbi) &&
+ (new_maxy > *old_maxy)
+ )
)
)
***************
*** 692,695 ****
--- 738,742 ----
*old_x = new_x;
*old_y = new_y;
+ *old_maxy = new_maxy;
*old_vbi = new_vbi;
vd_printf(VD_RES, ".ok!!\n");
***************
*** 715,719 ****
#ifdef HAVE_DGA2
// needed to change DGA video mode
! int modecount, mX=100000, mY=100000 , mVBI=100000, i,j=0;
int dga_modenum;
XDGAMode *modelines=NULL;
--- 762,766 ----
#ifdef HAVE_DGA2
// needed to change DGA video mode
! int modecount, mX=100000, mY=100000 , mVBI=100000, mMaxY=0, i,j=0;
int dga_modenum;
XDGAMode *modelines=NULL;
***************
*** 725,729 ****
unsigned int vm_ver, vm_rev;
int i, j=0, have_vm=0;
! int modecount, mX=100000, mY=100000, mVBI=100000, dga_modenum;
#endif
int bank, ram;
--- 772,776 ----
unsigned int vm_ver, vm_rev;
int i, j=0, have_vm=0;
! int modecount, mX=100000, mY=100000, mVBI=100000, mMaxY=0, dga_modenum;
#endif
int bank, ram;
***************
*** 804,809 ****
modelines[i].viewportWidth,
modelines[i].viewportHeight,
! (unsigned) modelines[i].verticalRefresh,
! &mX, &mY, &mVBI )) j = i;
}
}
--- 851,857 ----
modelines[i].viewportWidth,
modelines[i].viewportHeight,
! (unsigned) modelines[i].verticalRefresh,
! modelines[i].maxViewportY,
! &mX, &mY, &mVBI, &mMaxY )) j = i;
}
}
***************
*** 858,862 ****
vo_dga_vidmodes[i]->htotal,
vo_dga_vidmodes[i]->vtotal),
! &mX, &mY, &mVBI )) j = i;
}
--- 906,911 ----
vo_dga_vidmodes[i]->htotal,
vo_dga_vidmodes[i]->vtotal),
! 0,
! &mX, &mY, &mVBI, &mMaxY )) j = i;
}
_______________________________________________
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