fixes osd/subtitle for UYVY image format and steps back to 1.15 changes

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@452 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
atmosfear 2001-04-15 21:08:11 +00:00
parent 20ea207eb5
commit 509e53aac7
1 changed files with 23 additions and 18 deletions

View File

@ -156,10 +156,12 @@ static void draw_alpha(int x0,int y0, int w,int h, unsigned char* src, unsigned
vo_draw_alpha_yv12(w,h,src,srca,stride,((uint8_t *) *(priv->overlay->pixels))+priv->width*y0+x0,priv->width);
break;
case IMGFMT_YUY2:
case IMGFMT_UYVY:
case IMGFMT_YVYU:
vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) *(priv->overlay->pixels))+2*(priv->width*y0+x0),2*priv->width);
break;
case IMGFMT_UYVY:
vo_draw_alpha_yuy2(w,h,src,srca,stride,((uint8_t *) *(priv->overlay->pixels))+2*(priv->width*y0+x0)+1,2*priv->width);
break;
}
}
@ -377,22 +379,25 @@ init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint3
struct sdl_priv_s *priv = &sdl_priv;
unsigned int sdl_format;
sdl_format = format;
switch(format){
case IMGFMT_YV12:
sdl_format=SDL_YV12_OVERLAY;
printf("SDL: Using YV12 image format\n");
break;
printf("\nSDL: Using 0x%X (YV12) image format\n", format); break;
case IMGFMT_IYUV:
printf("\nSDL: Using 0x%X (IYUV) image format\n", format); break;
case IMGFMT_YUY2:
sdl_format=SDL_YUY2_OVERLAY;
printf("SDL: Using YUY2 image format\n");
break;
printf("\nSDL: Using 0x%X (YUY2) image format\n", format); break;
case IMGFMT_UYVY:
sdl_format=SDL_UYVY_OVERLAY;
printf("SDL: Using UYVY image format\n");
printf("\nSDL: Using 0x%X (UYVY) image format\n", format); break;
case IMGFMT_YVYU:
printf("\nSDL: Using 0x%X (YVYU) image format\n", format); break;
case IMGFMT_I420:
printf("\nSDL: Using 0x%X (I420) image format\n", format);
printf("SDL: Mapping I420 to IYUV (untested please report if it works)\n");
sdl_format = SDL_IYUV_OVERLAY;
break;
default:
printf("SDL: Unsupported image format (0x%X)\n",format);
printf("\nSDL: Unsupported image format (0x%X)\n",format);
return -1;
}