summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authornick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-04 11:50:52 +0000
committernick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-04 11:50:52 +0000
commit7e8ad962b7e3a8c20949f6e51840eb679ed811c4 (patch)
tree604f732c316e36bba218078fac23984532ccf1a4 /libvo
parent12dce88d5e05bec1ea211fe2a0dfedff1f09454f (diff)
downloadmpv-7e8ad962b7e3a8c20949f6e51840eb679ed811c4.tar.bz2
mpv-7e8ad962b7e3a8c20949f6e51840eb679ed811c4.tar.xz
Fixed rgb2rgb in DGA mode
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2677 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_vesa.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c
index a4851c751a..7308af1b81 100644
--- a/libvo/vo_vesa.c
+++ b/libvo/vo_vesa.c
@@ -87,7 +87,7 @@ static unsigned video_mode; /* selected video mode for playback */
static struct VesaModeInfoBlock video_mode_info;
static int flip_trigger = 0;
static void (*draw_alpha_fnc)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride);
-static void (*rgb2rgb_fnc)(uint8_t *src,uint8_t *dst,uint32_t src_size);
+static void (*rgb2rgb_fnc)(const uint8_t *src,uint8_t *dst,uint32_t src_size);
/* multibuffering */
uint8_t* video_base; /* should be never changed */
@@ -165,7 +165,8 @@ static void __vbeSetPixel(int x, int y, int r, int g, int b)
int shift_b = video_mode_info.BlueFieldPosition;
int pixel_size = (video_mode_info.BitsPerPixel+7)/8;
int bpl = video_mode_info.BytesPerScanLine;
- int color, offset;
+ int color;
+ unsigned offset;
if (x < 0 || x >= x_res || y < 0 || y >= y_res) return;
r >>= 8 - video_mode_info.RedMaskSize;
@@ -206,8 +207,8 @@ static void __vbeCopyBlock(unsigned long offset,uint8_t *image,unsigned long siz
*/
#define PIXEL_SIZE() ((video_mode_info.BitsPerPixel+7)/8)
-#define SCREEN_LINE_SIZE(pixel_size) (video_mode_info.XResolution*pixel_size)
-#define IMAGE_LINE_SIZE(pixel_size) (image_width*pixel_size)
+#define SCREEN_LINE_SIZE(pixel_size) (video_mode_info.XResolution*(pixel_size) )
+#define IMAGE_LINE_SIZE(pixel_size) (image_width*(pixel_size))
static void __vbeCopyData(uint8_t *image)
{
@@ -343,11 +344,12 @@ static uint32_t draw_frame(uint8_t *src[])
if(HAS_DGA())
{
size_t i, psize, ssize, dsize;
- uint8_t *dest, *sptr;
+ uint8_t *dest;
+ const uint8_t *sptr;
psize = PIXEL_SIZE();
dsize = SCREEN_LINE_SIZE(psize);
- ssize = IMAGE_LINE_SIZE(image_bpp);
- dest = dga_buffer/* + y_offset*dsize + x_offset*psize*/;
+ ssize = IMAGE_LINE_SIZE((image_bpp+7)/8);
+ dest = dga_buffer + y_offset*dsize + x_offset*psize;
sptr = src[0];
for(i=0;i<image_height;i++)
{