Avoid void* arithmetic

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25791 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2008-01-19 11:17:04 +00:00
parent b5186a059e
commit db95698364
1 changed files with 15 additions and 15 deletions

View File

@ -1135,7 +1135,7 @@ static uint32_t get_image(mp_image_t *mpi)
{ {
int err; int err;
void *dst; uint8_t *dst;
int pitch; int pitch;
// if ( mp_msg_test(MSGT_VO,MSGL_V) ) printf("DirectFB: get_image() called\n"); // if ( mp_msg_test(MSGT_VO,MSGL_V) ) printf("DirectFB: get_image() called\n");
@ -1149,10 +1149,10 @@ static uint32_t get_image(mp_image_t *mpi)
// we're lucky or codec accepts stride => ok, let's go! // we're lucky or codec accepts stride => ok, let's go!
if (frame) { if (frame) {
err = frame->Lock(frame,DSLF_WRITE|DSLF_READ,&dst,&pitch); err = frame->Lock(frame,DSLF_WRITE|DSLF_READ,(void *)&dst,&pitch);
framelocked=1; framelocked=1;
} else { } else {
err = primary->Lock(primary,DSLF_WRITE,&dst,&pitch); err = primary->Lock(primary,DSLF_WRITE,(void *)&dst,&pitch);
primarylocked=1; primarylocked=1;
} }
@ -1205,9 +1205,9 @@ static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
{ {
int i; int i;
unsigned int pitch; unsigned int pitch;
void *dst; uint8_t *dst;
void *dst2; uint8_t *dst2;
void *srcp; uint8_t *srcp;
unsigned int p; unsigned int p;
// if ( mp_msg_test(MSGT_VO,MSGL_V) ) printf("DirectFB: draw_slice entered\n"); // if ( mp_msg_test(MSGT_VO,MSGL_V) ) printf("DirectFB: draw_slice entered\n");
@ -1215,10 +1215,10 @@ static int draw_slice(uint8_t *src[], int stride[], int w, int h, int x, int y)
unlock(); unlock();
if (frame) { if (frame) {
DFBCHECK (frame->Lock(frame,DSLF_WRITE|DSLF_READ,&dst,&pitch)); DFBCHECK (frame->Lock(frame,DSLF_WRITE|DSLF_READ,(void *)&dst,&pitch));
framelocked = 1; framelocked = 1;
} else { } else {
DFBCHECK (primary->Lock(primary,DSLF_WRITE,&dst,&pitch)); DFBCHECK (primary->Lock(primary,DSLF_WRITE,(void *)&dst,&pitch));
primarylocked = 1; primarylocked = 1;
}; };
@ -1305,16 +1305,16 @@ static uint32_t put_image(mp_image_t *mpi){
// memcpy all planes - sad but necessary // memcpy all planes - sad but necessary
int i; int i;
unsigned int pitch; unsigned int pitch;
void *dst; uint8_t *dst;
void *src; uint8_t *src;
unsigned int p; unsigned int p;
// if ( mp_msg_test(MSGT_VO,MSGL_V) ) printf("DirectFB: Put_image - planar branch\n"); // if ( mp_msg_test(MSGT_VO,MSGL_V) ) printf("DirectFB: Put_image - planar branch\n");
if (frame) { if (frame) {
DFBCHECK (frame->Lock(frame,DSLF_WRITE|DSLF_READ,&dst,&pitch)); DFBCHECK (frame->Lock(frame,DSLF_WRITE|DSLF_READ,(void *)&dst,&pitch));
framelocked = 1; framelocked = 1;
} else { } else {
DFBCHECK (primary->Lock(primary,DSLF_WRITE,&dst,&pitch)); DFBCHECK (primary->Lock(primary,DSLF_WRITE,(void *)&dst,&pitch));
primarylocked = 1; primarylocked = 1;
}; };
@ -1391,15 +1391,15 @@ static uint32_t put_image(mp_image_t *mpi){
*/ */
unsigned int pitch; unsigned int pitch;
void *dst; uint8_t *dst;
// if ( mp_msg_test(MSGT_VO,MSGL_V) ) printf("DirectFB: Put_image - non-planar branch\n"); // if ( mp_msg_test(MSGT_VO,MSGL_V) ) printf("DirectFB: Put_image - non-planar branch\n");
if (frame) { if (frame) {
DFBCHECK (frame->Lock(frame,DSLF_WRITE,&dst,&pitch)); DFBCHECK (frame->Lock(frame,DSLF_WRITE,(void *)&dst,&pitch));
framelocked = 1; framelocked = 1;
mem2agpcpy_pic(dst,mpi->planes[0] + mpi->y * mpi->stride[0] + mpi->x * (mpi->bpp >> 3) ,mpi->w * (mpi->bpp >> 3),mpi->h,pitch,mpi->stride[0]); mem2agpcpy_pic(dst,mpi->planes[0] + mpi->y * mpi->stride[0] + mpi->x * (mpi->bpp >> 3) ,mpi->w * (mpi->bpp >> 3),mpi->h,pitch,mpi->stride[0]);
} else { } else {
DFBCHECK (primary->Lock(primary,DSLF_WRITE,&dst,&pitch)); DFBCHECK (primary->Lock(primary,DSLF_WRITE,(void *)&dst,&pitch));
primarylocked = 1; primarylocked = 1;
mem2agpcpy_pic(dst + yoffset * pitch + xoffset * (mpi->bpp >> 3),mpi->planes[0] + mpi->y * mpi->stride[0] + mpi->x * (mpi->bpp >> 3) ,mpi->w * (mpi->bpp >> 3),mpi->h,pitch,mpi->stride[0]); mem2agpcpy_pic(dst + yoffset * pitch + xoffset * (mpi->bpp >> 3),mpi->planes[0] + mpi->y * mpi->stride[0] + mpi->x * (mpi->bpp >> 3) ,mpi->w * (mpi->bpp >> 3),mpi->h,pitch,mpi->stride[0]);
}; };