summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-03 15:16:46 +0000
committernick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-03 15:16:46 +0000
commit4e067f62d4f0311aa78276ae3b3474f900b9beba (patch)
treeda14ed98e42640f6034b5e73078604aca182d0df
parentdfc9dd714b9ed7eee19a6ab88643b2d0c6e29ace (diff)
downloadmpv-4e067f62d4f0311aa78276ae3b3474f900b9beba.tar.bz2
mpv-4e067f62d4f0311aa78276ae3b3474f900b9beba.tar.xz
optimization
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4516 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--dec_video.c20
-rw-r--r--dec_video.h1
-rw-r--r--mplayer.c1
3 files changed, 14 insertions, 8 deletions
diff --git a/dec_video.c b/dec_video.c
index d521724dc0..0b46f281b4 100644
--- a/dec_video.c
+++ b/dec_video.c
@@ -748,6 +748,17 @@ if ((sh_video->codec->driver == VFM_QTRLE) && (sh_video->bih->biBitCount != 24))
}
extern int vaa_use_dr;
+
+static int use_dr=0;
+static bes_da_t bda;
+void init_video_vaa( void )
+{
+ memset(&bda,0,sizeof(bes_da_t));
+ if(vo_vaa.query_bes_da)
+ use_dr = vo_vaa.query_bes_da(&bda) ? 0 : 1;
+ if(!vaa_use_dr) use_dr = 0;
+}
+
#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
@@ -758,9 +769,7 @@ mp_image_t *mpi=sh_video->image;
unsigned int out_fmt=mpi->imgfmt; //sh_video->codec->outfmt[sh_video->outfmtidx];
int planar=(mpi->flags&MP_IMGFLAG_PLANAR)!=0; //(out_fmt==IMGFMT_YV12||out_fmt==IMGFMT_IYUV||out_fmt==IMGFMT_I420);
int blit_frame=0;
-bes_da_t bda;
void *vmem;
-int use_dr;
int painted;
static int double_buff_num = 0;
@@ -772,12 +781,7 @@ static int double_buff_num = 0;
unsigned int t=GetTimer();
unsigned int t2;
-memset(&bda,0,sizeof(bes_da_t));
-painted = 0;
- use_dr = 0;
- if(vo_vaa.query_bes_da)
- use_dr = vo_vaa.query_bes_da(&bda) ? 0 : 1;
- if(!vaa_use_dr) use_dr = 0;
+ painted = 0;
#ifdef USE_MP_IMAGE
if(mpi->type!=MP_IMGTYPE_EXPORT)
if( !(mpi->flags&MP_IMGFLAG_ALLOCATED) && !(mpi->flags&MP_IMGFLAG_DIRECT) ){
diff --git a/dec_video.h b/dec_video.h
index 0aaf5a70f7..86251316a2 100644
--- a/dec_video.h
+++ b/dec_video.h
@@ -3,6 +3,7 @@
extern int video_read_properties(sh_video_t *sh_video);
extern int init_video(sh_video_t *sh_video, int *pitches);
+extern void init_video_vaa( void );
void uninit_video(sh_video_t *sh_video);
#ifdef USE_LIBVO2
diff --git a/mplayer.c b/mplayer.c
index 412a9252f0..a9c6709e37 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1380,6 +1380,7 @@ current_module="init_libvo";
*/
}
}
+ init_video_vaa();
fflush(stdout);
//================== MAIN: ==========================