Mercurial > mplayer.hg
diff dec_video.c @ 1422:d02e0dcaf077
libvo2 support
author | arpi |
---|---|
date | Mon, 30 Jul 2001 02:00:54 +0000 |
parents | eda16e490ae7 |
children | 8986d06b2816 |
line wrap: on
line diff
--- a/dec_video.c Sun Jul 29 21:07:34 2001 +0000 +++ b/dec_video.c Mon Jul 30 02:00:54 2001 +0000 @@ -28,7 +28,11 @@ //#include <inttypes.h> //#include "libvo/img_format.h" +#ifdef USE_LIBVO2 +#include "libvo2/libvo2.h" +#else #include "libvo/video_out.h" +#endif #include "libmpeg2/mpeg2.h" #include "libmpeg2/mpeg2_internal.h" @@ -260,7 +264,11 @@ return 1; } +#ifdef USE_LIBVO2 +int decode_video(vo2_handle_t *video_out,sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame){ +#else int decode_video(vo_functions_t *video_out,sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame){ +#endif unsigned int out_fmt=sh_video->codec->outfmt[sh_video->outfmtidx]; int planar=(out_fmt==IMGFMT_YV12||out_fmt==IMGFMT_IYUV||out_fmt==IMGFMT_I420); int blit_frame=0; @@ -416,10 +424,17 @@ } else planes[0]=sh_video->our_out_buffer; case 2: +#ifdef USE_LIBVO2 + if(planar) + vo2_draw_slice(video_out,planes,stride,sh_video->disp_w,sh_video->disp_h,0,0); + else + vo2_draw_frame(video_out,planes[0],sh_video->disp_w,sh_video->disp_w,sh_video->disp_h); +#else if(planar) video_out->draw_slice(planes,stride,sh_video->disp_w,sh_video->disp_h,0,0); else video_out->draw_frame(planes); +#endif t2=GetTimer()-t2;vout_time_usage+=t2*0.000001f; blit_frame=1; break;