diff libmpcodecs/dec_video.c @ 5507:d0d029fda134

video filter layer - written from scratch, but inspired a lot by Fredrik Kuivinen's patch
author arpi
date Sat, 06 Apr 2002 22:05:01 +0000
parents 014ddf03476d
children 868c13f78f08
line wrap: on
line diff
--- a/libmpcodecs/dec_video.c	Sat Apr 06 22:00:50 2002 +0000
+++ b/libmpcodecs/dec_video.c	Sat Apr 06 22:05:01 2002 +0000
@@ -26,6 +26,7 @@
 
 #include "stheader.h"
 #include "vd.h"
+#include "vf.h"
 
 #include "dec_video.h"
 
@@ -152,15 +153,14 @@
 
 extern int vo_directrendering;
 
-int decode_video(vo_functions_t *video_out,sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame){
+int decode_video(sh_video_t *sh_video,unsigned char *start,int in_size,int drop_frame){
+vf_instance_t* vf=sh_video->vfilter;
 mp_image_t *mpi=NULL;
 int blit_frame=0;
 unsigned int t=GetTimer();
 unsigned int t2;
 double tt;
 
-sh_video->video_out=video_out;
-
 //if(!(sh_video->ds->flags&1) || sh_video->ds->pack_no<5)
 mpi=mpvdec->decode(sh_video, start, in_size, drop_frame);
 
@@ -185,13 +185,8 @@
 
 if(drop_frame) return 0;
 
-if(!(mpi->flags&(MP_IMGFLAG_DIRECT|MP_IMGFLAG_DRAW_CALLBACK))){
-    // blit frame:
-    if(mpi->flags&MP_IMGFLAG_PLANAR)
-        video_out->draw_slice(mpi->planes,mpi->stride,sh_video->disp_w,sh_video->disp_h,0,0);
-    else
-        video_out->draw_frame(mpi->planes);
-}
+//vo_draw_image(video_out,mpi);
+vf->put_image(vf,mpi);
 
     t2=GetTimer()-t2;
     tt=t2*0.000001f;
@@ -200,5 +195,3 @@
 
   return blit_frame;
 }
-
-