summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-17 10:54:34 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-17 10:54:34 +0000
commitec8c0b2e7e2296b6392a218396231719e39be68f (patch)
treeea993e33bcdf0ebded0c00b1c9a0aba09e442a26 /libvo
parent490f4d6c16621ad54cb1a31cb30cb00e259a6dcd (diff)
downloadmpv-ec8c0b2e7e2296b6392a218396231719e39be68f.tar.bz2
mpv-ec8c0b2e7e2296b6392a218396231719e39be68f.tar.xz
swscale - 16bpp and -fs support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2235 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_x11.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index b9763a157e..9ba5edbf96 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -172,12 +172,17 @@ static uint32_t init( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d
if ( depth != 15 && depth != 16 && depth != 24 && depth != 32 ) depth=24;
XMatchVisualInfo( mDisplay,mScreen,depth,TrueColor,&vinfo );
- if( flags&0x04 && depth>=24 && format==IMGFMT_YV12 ) {
+ if( flags&0x04 && format==IMGFMT_YV12 ) {
// software scale
- scale_xinc=(width << 8) / d_width - 1; // -1 needed for proper rounding
- scale_yinc=(height << 16) / d_height;
- image_width=d_width;
- image_height=d_height;
+ if(fullscreen){
+ image_width=vo_screenwidth;
+ image_height=vo_screenheight;
+ } else {
+ image_width=d_width&(~3);
+ image_height=d_height;
+ }
+ scale_xinc=(width << 8) / image_width - 1; // -1 needed for proper rounding
+ scale_yinc=(height << 16) / image_height;
SwScale_Init();
}
@@ -480,7 +485,7 @@ static uint32_t draw_slice( uint8_t *src[],int stride[],int w,int h,int x,int y
if(scale_xinc){
SwScale_YV12slice_brg24(src,stride,y,h,
- ImageData, image_width*((bpp+7)/8), image_width, ((bpp+7)/8),
+ ImageData, image_width*((bpp+7)/8), image_width, bpp,
scale_xinc, scale_yinc);
} else {
uint8_t *dst=ImageData + ( image_width * y + x ) * ( bpp/8 );