Mercurial > mplayer.hg
comparison libvo/vo_x11.c @ 9697:5025150738eb
10000l (YUV vs. YVU swscale fix/cleanup)
author | michael |
---|---|
date | Thu, 27 Mar 2003 16:04:53 +0000 |
parents | 543ab3909b78 |
children | 69bb88bc869b |
comparison
equal
deleted
inserted
replaced
9696:26d4db9a1ac8 | 9697:5025150738eb |
---|---|
239 | 239 |
240 if (!title) | 240 if (!title) |
241 title = strdup("MPlayer X11 (XImage/Shm) render"); | 241 title = strdup("MPlayer X11 (XImage/Shm) render"); |
242 | 242 |
243 in_format=format; | 243 in_format=format; |
244 if(in_format==IMGFMT_I420 || in_format==IMGFMT_IYUV) in_format=IMGFMT_YV12; | |
245 srcW= width; | 244 srcW= width; |
246 srcH= height; | 245 srcH= height; |
247 vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2; | 246 vo_dx=( vo_screenwidth - d_width ) / 2; vo_dy=( vo_screenheight - d_height ) / 2; |
248 vo_dwidth=d_width; vo_dheight=d_height; | 247 vo_dwidth=d_width; vo_dheight=d_height; |
249 | 248 |
506 | 505 |
507 if(Flip_Flag) | 506 if(Flip_Flag) |
508 { | 507 { |
509 dstStride[0]= -image_width*((bpp+7)/8); | 508 dstStride[0]= -image_width*((bpp+7)/8); |
510 dst[0]=ImageData - dstStride[0]*(image_height-1); | 509 dst[0]=ImageData - dstStride[0]*(image_height-1); |
511 sws_scale(swsContext,src,stride,y,h,dst, dstStride); | 510 sws_scale_ordered(swsContext,src,stride,y,h,dst, dstStride); |
512 } | 511 } |
513 else | 512 else |
514 { | 513 { |
515 dstStride[0]=image_width*((bpp+7)/8); | 514 dstStride[0]=image_width*((bpp+7)/8); |
516 dst[0]=ImageData; | 515 dst[0]=ImageData; |
517 sws_scale(swsContext,src,stride,y,h,dst, dstStride); | 516 sws_scale_ordered(swsContext,src,stride,y,h,dst, dstStride); |
518 } | 517 } |
519 return 0; | 518 return 0; |
520 } | 519 } |
521 | 520 |
522 static uint32_t draw_frame( uint8_t *src[] ){ | 521 static uint32_t draw_frame( uint8_t *src[] ){ |