diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-07-30 02:00:54 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-07-30 02:00:54 +0000 |
commit | 57207b1f8b29772195c05dd838bd8f5005711445 (patch) | |
tree | b15da0a05c023fbd9e98551513a96bc54d86c4f8 /dec_video.c | |
parent | de654f5bfea1f7d48e02444b8c456c37cca81e48 (diff) | |
download | mpv-57207b1f8b29772195c05dd838bd8f5005711445.tar.bz2 mpv-57207b1f8b29772195c05dd838bd8f5005711445.tar.xz |
libvo2 support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1423 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_video.c')
-rw-r--r-- | dec_video.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dec_video.c b/dec_video.c index 5008152ac9..8724c1a0aa 100644 --- a/dec_video.c +++ b/dec_video.c @@ -28,7 +28,11 @@ extern int frameratecode2framerate[16]; //#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 @@ switch(sh_video->codec->driver){ 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 @@ case 3: } 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; |