[Mplayer-cvslog] CVS: 0_90/libmpcodecs Makefile,1.85,1.86 vf.c,1.66,1.67 vf.h,1.16,1.17 vf_vo.c,1.21,1.22

Arpi of Ize arpi at mplayerhq.hu
Mon Mar 10 17:18:09 CET 2003


Update of /cvsroot/mplayer/0_90/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv7164

Modified Files:
	Makefile vf.c vf.h vf_vo.c 
Log Message:
backport: slices support


Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/0_90/libmpcodecs/Makefile,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- Makefile	9 Feb 2003 00:07:50 -0000	1.85
+++ Makefile	10 Mar 2003 16:18:06 -0000	1.86
@@ -10,12 +10,12 @@
 AUDIO_SRCS=dec_audio.c ad.c $(AUDIO_SRCS_LIB) $(AUDIO_SRCS_NAT) $(AUDIO_SRCS_OPT)
 
 VIDEO_SRCS_LIB=vd_libmpeg2.c vd_nuv.c vd_lzo.c
-VIDEO_SRCS_NAT=vd_null.c vd_cinepak.c vd_qtrpza.c vd_raw.c vd_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_msrle.c vd_huffyuv.c vd_mpegpes.c vd_svq1.c vd_lcl.c vd_mtga.c
+VIDEO_SRCS_NAT=vd_null.c vd_cinepak.c vd_qtrpza.c vd_raw.c vd_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_msrle.c vd_huffyuv.c vd_mpegpes.c vd_svq1.c vd_lcl.c vd_mtga.c vd_sgi.c
 VIDEO_SRCS_OPT=vd_realvid.c vd_ffmpeg.c vd_dshow.c vd_dmo.c vd_vfw.c vd_vfwex.c vd_odivx.c vd_divx4.c vd_xanim.c vd_xvid.c vd_libdv.c vd_qtvideo.c
 VIDEO_SRCS=dec_video.c vd.c $(VIDEO_SRCS_NAT) $(VIDEO_SRCS_LIB) $(VIDEO_SRCS_OPT)
 
-VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_pp.c vf_scale.c vf_format.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c vf_lavc.c vf_dvbscale.c vf_cropdetect.c vf_test.c vf_noise.c vf_yvu9.c vf_rectangle.c vf_lavcdeint.c vf_eq.c vf_eq2.c vf_halfpack.c vf_dint.c vf_1bpp.c vf_bmovl.c vf_2xsai.c vf_unsharp.c vf_swapuv.c vf_il.c vf_boxblur.c vf_sab.c vf_smartblur.c vf_perspective.c vf_field.c vf_denoise3d.c
-ENCODER_SRCS=ve.c ve_divx4.c ve_lavc.c ve_vfw.c ve_rawrgb.c ve_libdv.c ve_xvid.c ve_qtvideo.c
+VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_pp.c vf_scale.c vf_format.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c vf_lavc.c vf_dvbscale.c vf_cropdetect.c vf_test.c vf_noise.c vf_yvu9.c vf_rectangle.c vf_lavcdeint.c vf_eq.c vf_eq2.c vf_halfpack.c vf_dint.c vf_1bpp.c vf_bmovl.c vf_2xsai.c vf_unsharp.c vf_swapuv.c vf_il.c vf_boxblur.c vf_sab.c vf_smartblur.c vf_perspective.c vf_down3dright.c vf_field.c vf_denoise3d.c vf_hqdn3d.c vf_detc.c vf_telecine.c vf_tfields.c
+ENCODER_SRCS=ve.c ve_divx4.c ve_lavc.c ve_vfw.c ve_rawrgb.c ve_libdv.c ve_xvid.c ve_qtvideo.c ve_nuv.c
 
 NATIVE_SRCS=native/RTjpegN.c native/cinepak.c native/fli.c native/minilzo.c native/msvidc.c native/nuppelvideo.c native/qtrle.c native/qtrpza.c native/qtsmc.c native/roqav.c native/xa_gsm.c native/svq1.c
 

Index: vf.c
===================================================================
RCS file: /cvsroot/mplayer/0_90/libmpcodecs/vf.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- vf.c	30 Jan 2003 22:53:32 -0000	1.66
+++ vf.c	10 Mar 2003 16:18:06 -0000	1.67
@@ -52,8 +52,13 @@
 extern vf_info_t vf_info_sab;
 extern vf_info_t vf_info_smartblur;
 extern vf_info_t vf_info_perspective;
+extern vf_info_t vf_info_down3dright;
 extern vf_info_t vf_info_field;
 extern vf_info_t vf_info_denoise3d;
+extern vf_info_t vf_info_hqdn3d;
+extern vf_info_t vf_info_detc;
+extern vf_info_t vf_info_telecine;
+extern vf_info_t vf_info_tfields;
 
 char** vo_plugin_args=(char**) NULL;
 
@@ -99,8 +104,13 @@
     &vf_info_sab,
     &vf_info_smartblur,
     &vf_info_perspective,
+    &vf_info_down3dright,
     &vf_info_field,
     &vf_info_denoise3d,
+    &vf_info_hqdn3d,
+    &vf_info_detc,
+    &vf_info_telecine,
+    &vf_info_tfields,
     NULL
 };
 
@@ -198,8 +208,8 @@
 		printf("vf.c: have to REALLOCATE buffer memory :(\n");
 	    }
 	} else {
-	    mpi->width=w2; mpi->chroma_width=w2>>mpi->chroma_x_shift;
-	    mpi->height=h; mpi->chroma_height=h>>mpi->chroma_y_shift;
+	    mpi->width=w2; mpi->chroma_width=(w2 + (1<<mpi->chroma_x_shift) - 1)>>mpi->chroma_x_shift;
+	    mpi->height=h; mpi->chroma_height=(h + (1<<mpi->chroma_y_shift) - 1)>>mpi->chroma_y_shift;
 	}
     }
     if(!mpi->bpp) mp_image_setfmt(mpi,outfmt);
@@ -224,7 +234,7 @@
 //		  printf("query -> 0x%X    \n",flags);
 		  if(flags&VFCAP_ACCEPT_STRIDE){
 	              mpi->width=w2;
-		      mpi->chroma_width=w2>>mpi->chroma_x_shift;
+		      mpi->chroma_width=(w2 + (1<<mpi->chroma_x_shift) - 1)>>mpi->chroma_x_shift;
 		  }
 	      }
 	  }
@@ -260,11 +270,14 @@
 	  mpi->flags|=MP_IMGFLAG_ALLOCATED;
         }
     }
+    if(mpi->flags&MP_IMGFLAG_DRAW_CALLBACK)
+	if(vf->start_slice) vf->start_slice(vf,mpi);
     if(!(mpi->flags&MP_IMGFLAG_TYPE_DISPLAYED)){
-	    mp_msg(MSGT_DECVIDEO,MSGL_V,"*** [%s] %s mp_image_t, %dx%dx%dbpp %s %s, %d bytes\n",
+	    mp_msg(MSGT_DECVIDEO,MSGL_V,"*** [%s] %s%s mp_image_t, %dx%dx%dbpp %s %s, %d bytes\n",
 		  vf->info->name,
 		  (mpi->type==MP_IMGTYPE_EXPORT)?"Exporting":
 	          ((mpi->flags&MP_IMGFLAG_DIRECT)?"Direct Rendering":"Allocating"),
+	          (mpi->flags&MP_IMGFLAG_DRAW_CALLBACK)?" (slices)":"",
 	          mpi->width,mpi->height,mpi->bpp,
 		  (mpi->flags&MP_IMGFLAG_YUV)?"YUV":((mpi->flags&MP_IMGFLAG_SWAPPED)?"BGR":"RGB"),
 		  (mpi->flags&MP_IMGFLAG_PLANAR)?"planar":"packed",

Index: vf.h
===================================================================
RCS file: /cvsroot/mplayer/0_90/libmpcodecs/vf.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- vf.h	5 Dec 2002 00:22:37 -0000	1.16
+++ vf.h	10 Mar 2003 16:18:06 -0000	1.17
@@ -31,6 +31,8 @@
         mp_image_t *mpi);
     int (*put_image)(struct vf_instance_s* vf,
         mp_image_t *mpi);
+    void (*start_slice)(struct vf_instance_s* vf,
+        mp_image_t *mpi);
     void (*draw_slice)(struct vf_instance_s* vf,
         unsigned char** src, int* stride, int w,int h, int x, int y);
     void (*uninit)(struct vf_instance_s* vf);

Index: vf_vo.c
===================================================================
RCS file: /cvsroot/mplayer/0_90/libmpcodecs/vf_vo.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- vf_vo.c	11 Nov 2002 15:22:10 -0000	1.21
+++ vf_vo.c	10 Mar 2003 16:18:06 -0000	1.22
@@ -110,6 +110,12 @@
   return 1;
 }
 
+static void start_slice(struct vf_instance_s* vf,
+		       mp_image_t *mpi) {
+    if(!vo_config_count) return; // vo not configured?
+    video_out->control(VOCTRL_START_SLICE,mpi);
+}
+
 static void draw_slice(struct vf_instance_s* vf,
         unsigned char** src, int* stride, int w,int h, int x, int y){
     if(!vo_config_count) return; // vo not configured?
@@ -125,6 +131,7 @@
     vf->get_image=get_image;
     vf->put_image=put_image;
     vf->draw_slice=draw_slice;
+    vf->start_slice=start_slice;
     vf->priv=(void*)args; // video_out
     if(!video_out) return 0; // no vo ?
 //    if(video_out->preinit(args)) return 0; // preinit failed



More information about the MPlayer-cvslog mailing list