summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vd.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-07 00:44:58 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-07 00:44:58 +0000
commit15222e9be6f4200bedb966db3ff5cf64a1866345 (patch)
tree6633667b05e50518ef51287e9a6adf083e5f8fc4 /libmpcodecs/vd.c
parentc14ad3978a8593f7899b20618cd4e11da921068f (diff)
downloadmpv-15222e9be6f4200bedb966db3ff5cf64a1866345.tar.bz2
mpv-15222e9be6f4200bedb966db3ff5cf64a1866345.tar.xz
vfw, vfwex, odivx, divx4 added
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4969 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd.c')
-rw-r--r--libmpcodecs/vd.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index 05604677cf..779171bd16 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -26,6 +26,10 @@ extern vd_functions_t mpcodecs_vd_cinepak;
extern vd_functions_t mpcodecs_vd_qtrpza;
extern vd_functions_t mpcodecs_vd_ffmpeg;
extern vd_functions_t mpcodecs_vd_dshow;
+extern vd_functions_t mpcodecs_vd_vfw;
+extern vd_functions_t mpcodecs_vd_vfwex;
+extern vd_functions_t mpcodecs_vd_odivx;
+extern vd_functions_t mpcodecs_vd_divx4;
vd_functions_t* mpcodecs_vd_drivers[] = {
&mpcodecs_vd_null,
@@ -34,9 +38,19 @@ vd_functions_t* mpcodecs_vd_drivers[] = {
#ifdef USE_LIBAVCODEC
&mpcodecs_vd_ffmpeg,
#endif
+#ifdef USE_WIN32DLL
#ifdef USE_DIRECTSHOW
&mpcodecs_vd_dshow,
#endif
+ &mpcodecs_vd_vfw,
+ &mpcodecs_vd_vfwex,
+#endif
+#ifdef USE_DIVX
+ &mpcodecs_vd_odivx,
+#ifdef NEW_DECORE
+ &mpcodecs_vd_divx4,
+#endif
+#endif
NULL
};
@@ -56,30 +70,31 @@ static int static_idx=0;
// Note: buffer allocation may be moved to mpcodecs_config_vo() later...
mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h){
mp_image_t* mpi=NULL;
+ int w2=(mp_imgflag&MP_IMGFLAG_ACCEPT_STRIDE)?((w+15)&(~15)):w;
// Note: we should call libvo first to check if it supports direct rendering
// and if not, then fallback to software buffers:
switch(mp_imgtype){
case MP_IMGTYPE_EXPORT:
// mpi=new_mp_image(w,h);
- if(!export_images[0]) export_images[0]=new_mp_image(w,h);
+ if(!export_images[0]) export_images[0]=new_mp_image(w2,h);
mpi=export_images[0];
break;
case MP_IMGTYPE_STATIC:
- if(!static_images[0]) static_images[0]=new_mp_image(w,h);
+ if(!static_images[0]) static_images[0]=new_mp_image(w2,h);
mpi=static_images[0];
break;
case MP_IMGTYPE_TEMP:
- if(!temp_images[0]) temp_images[0]=new_mp_image(w,h);
+ if(!temp_images[0]) temp_images[0]=new_mp_image(w2,h);
mpi=temp_images[0];
break;
case MP_IMGTYPE_IPB:
if(!(mp_imgflag&MP_IMGFLAG_READABLE)){ // B frame:
- if(!temp_images[0]) temp_images[0]=new_mp_image(w,h);
+ if(!temp_images[0]) temp_images[0]=new_mp_image(w2,h);
mpi=temp_images[0];
break;
}
case MP_IMGTYPE_IP:
- if(!static_images[static_idx]) static_images[static_idx]=new_mp_image(w,h);
+ if(!static_images[static_idx]) static_images[static_idx]=new_mp_image(w2,h);
mpi=static_images[static_idx];
static_idx^=1;
break;
@@ -88,8 +103,8 @@ mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, i
mpi->type=mp_imgtype;
mpi->flags&=~(MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE);
mpi->flags|=mp_imgflag&(MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE);
- if((mpi->width!=w || mpi->height!=h) && !(mpi->flags&MP_IMGFLAG_DIRECT)){
- mpi->width=w;
+ if((mpi->width!=w2 || mpi->height!=h) && !(mpi->flags&MP_IMGFLAG_DIRECT)){
+ mpi->width=w2;
mpi->height=h;
if(mpi->flags&MP_IMGFLAG_ALLOCATED){
// need to re-allocate buffer memory: