diff -urN MPlayer-20010802.orig/libvo/video_out.c MPlayer-20010802.new/libvo/video_out.c --- MPlayer-20010802.orig/libvo/video_out.c Tue Jul 3 19:46:24 2001 +++ MPlayer-20010802.new/libvo/video_out.c Fri Aug 3 17:05:48 2001 @@ -61,6 +61,7 @@ extern vo_functions_t video_out_odivx; extern vo_functions_t video_out_pgm; extern vo_functions_t video_out_md5; +extern vo_functions_t video_out_YUV; extern vo_functions_t video_out_syncfb; extern vo_functions_t video_out_fbdev; extern vo_functions_t video_out_svga; @@ -113,6 +114,7 @@ &video_out_odivx, &video_out_pgm, &video_out_md5, + &video_out_YUV, NULL }; diff -urN MPlayer-20010802.orig/libvo/vo_YUV.c MPlayer-20010802.new/libvo/vo_YUV.c --- MPlayer-20010802.orig/libvo/vo_YUV.c Wed Dec 31 19:00:00 1969 +++ MPlayer-20010802.new/libvo/vo_YUV.c Fri Aug 3 17:05:39 2001 @@ -0,0 +1,117 @@ +/* + * video_out_YUV.c, YUV interface + * + * + * Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. + * + * Hacked into mpeg2dec by + * + * Aaron Holtzman + * + * 15 & 16 bpp support added by Franck Sicard + * + * Xv image suuport by Gerd Knorr + */ + +#include +#include +#include + +#include "config.h" +#include "video_out.h" +#include "video_out_internal.h" + +LIBVO_EXTERN (YUV) + +static vo_info_t vo_info = +{ + "YUV file", + "YUV", + "walken", + "" +}; + +static int image_width; +static int image_height; +static int framenum = 0; + +static uint8_t *image=NULL; +static FILE * f; +int first = 0; +char vo_pgm_filename[24]; + +static uint32_t +init(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format) +{ + char str[256]; + image_height = height; + image_width = width; + image=malloc(image_width*image_height*3/2); + + f = fopen("tmp.yuv", "wb"); if (f ==NULL) return; + sprintf(str,"YUV4MPEG %d %d 4\n",width,height); + fwrite(str,strlen(str),1,f); + return 0; +} + +static const vo_info_t* +get_info(void) +{ + return &vo_info; +} + +static void flip_page (void) +{ + fwrite ("FRAME\n", 6, 1, f); + fwrite (image, image_width, image_height*3/2, f); + return; +} + +static uint32_t draw_slice(uint8_t *srcimg[], int stride[], int w,int h,int x,int y) +{ + int i; + // copy Y: + uint8_t *dst=image+image_width*y+x; + uint8_t *src=srcimg[0]; + uint8_t *src1=srcimg[1]; + uint8_t *src2=srcimg[2]; + memcpy(dst,src,w*h); + dst=image+image_width*image_height+(image_width*(y/4)+(x/4)); + memcpy(dst,src1,w*h/4); + dst+=image_width*image_height/4; + memcpy(dst,src2,w*h/4); + return 0; +} + +static uint32_t draw_frame(uint8_t * src[]) +{ + return 1; +} + +static uint32_t +query_format(uint32_t format) +{ + if(format==IMGFMT_YV12) return 1; +// switch(format){ +// case IMGFMT_YV12: +// case IMGFMT_RGB|24: +// case IMGFMT_BGR|24: +// return 1; +// } + return 0; +} + +static void +uninit(void) +{ + if(image){ free(image);image=NULL;} + fclose(f); +} + + +static void check_events(void) +{ +} + + +