[Mplayer-cvslog] CVS: main/libmpcodecs vf_tfields.c,1.6,1.7

Arpi arpi at thot.banki.hu
Tue May 6 09:26:14 CEST 2003


Hi,

hmm seems you forgot to add the new formats to query_format(), so this
commit has no effect...

> Update of /cvsroot/mplayer/main/libmpcodecs
> In directory mail:/var/tmp.root/cvs-serv23192/libmpcodecs
> 
> Modified Files:
> 	vf_tfields.c 
> Log Message:
> support more image formats. hopefully this bpp handling is correct...
> 
> 
> Index: vf_tfields.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_tfields.c,v
> retrieving revision 1.6
> retrieving revision 1.7
> diff -u -r1.6 -r1.7
> --- vf_tfields.c	3 May 2003 05:59:29 -0000	1.6
> +++ vf_tfields.c	6 May 2003 02:36:44 -0000	1.7
> @@ -315,6 +315,9 @@
>  	int ret;
>  	mp_image_t *dmpi;
>  	void (*qpel)(unsigned char *, unsigned char *, int, int, int, int, int);
> +	int bpp=1;
> +
> +	if (!(mpi->flags & MP_IMGFLAG_PLANAR)) bpp = mpi->bpp/8;
>  
>  	switch (vf->priv->mode) {
>  	case 2:
> @@ -334,7 +337,7 @@
>  		dmpi = vf_get_image(vf->next, mpi->imgfmt,
>  			MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
>  			mpi->width, mpi->height/2);
> -		memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h/2,
> +		memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w*bpp, mpi->h/2,
>  			dmpi->stride[0], mpi->stride[0]*2);
>  		if (mpi->flags & MP_IMGFLAG_PLANAR) {
>  			memcpy_pic(dmpi->planes[1], mpi->planes[1],
> @@ -348,7 +351,7 @@
>  		vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
>  		
>  		memcpy_pic(dmpi->planes[0], mpi->planes[0] + mpi->stride[0],
> -			mpi->w, mpi->h/2, dmpi->stride[0], mpi->stride[0]*2);
> +			mpi->w*bpp, mpi->h/2, dmpi->stride[0], mpi->stride[0]*2);
>  		if (mpi->flags & MP_IMGFLAG_PLANAR) {
>  			memcpy_pic(dmpi->planes[1], mpi->planes[1] + mpi->stride[1],
>  				mpi->chroma_width, mpi->chroma_height/2,
> @@ -362,7 +365,7 @@
>  		dmpi = vf_get_image(vf->next, mpi->imgfmt,
>  			MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
>  			mpi->width, mpi->height);
> -		my_memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h/2,
> +		my_memcpy_pic(dmpi->planes[0], mpi->planes[0], mpi->w*bpp, mpi->h/2,
>  			dmpi->stride[0]*2, mpi->stride[0]*2);
>  		deint(dmpi->planes[0], dmpi->stride[0], mpi->planes[0], mpi->stride[0],
> mpi->w, mpi->h, 0);
>  		if (mpi->flags & MP_IMGFLAG_PLANAR) {
> @@ -381,7 +384,7 @@
>  		vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
>  		
>  		my_memcpy_pic(dmpi->planes[0] + dmpi->stride[0], mpi->planes[0] +
> mpi->stride[0],
> -			mpi->w, mpi->h/2, dmpi->stride[0]*2, mpi->stride[0]*2);
> +			mpi->w*bpp, mpi->h/2, dmpi->stride[0]*2, mpi->stride[0]*2);
>  		deint(dmpi->planes[0], dmpi->stride[0], mpi->planes[0], mpi->stride[0],
> mpi->w, mpi->h, 1);
>  		if (mpi->flags & MP_IMGFLAG_PLANAR) {
>  			my_memcpy_pic(dmpi->planes[1] + dmpi->stride[1], mpi->planes[1] +
> mpi->stride[1],
> @@ -402,7 +405,7 @@
>  		dmpi = vf_get_image(vf->next, mpi->imgfmt,
>  			MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,
>  			mpi->width, mpi->height/2);
> -		qpel(dmpi->planes[0], mpi->planes[0], mpi->w, mpi->h/2,
> +		qpel(dmpi->planes[0], mpi->planes[0], mpi->w*bpp, mpi->h/2,
>  			dmpi->stride[0], mpi->stride[0]*2, 0);
>  		if (mpi->flags & MP_IMGFLAG_PLANAR) {
>  			qpel(dmpi->planes[1], mpi->planes[1],
> @@ -416,7 +419,7 @@
>  		vf_next_control(vf, VFCTRL_FLIP_PAGE, NULL);
>  		
>  		qpel(dmpi->planes[0], mpi->planes[0] + mpi->stride[0],
> -			mpi->w, mpi->h/2, dmpi->stride[0], mpi->stride[0]*2, 1);
> +			mpi->w*bpp, mpi->h/2, dmpi->stride[0], mpi->stride[0]*2, 1);
>  		if (mpi->flags & MP_IMGFLAG_PLANAR) {
>  			qpel(dmpi->planes[1], mpi->planes[1] + mpi->stride[1],
>  				mpi->chroma_width, mpi->chroma_height/2,
> @@ -468,7 +471,7 @@
>  	struct vf_priv_s *p;
>  	vf->config = config;
>  	vf->put_image = put_image;
> -	vf->query_format = query_format;
> +	//vf->query_format = query_format;
>  	vf->uninit = uninit;
>  	vf->default_reqs = VFCAP_ACCEPT_STRIDE;
>  	vf->priv = p = calloc(1, sizeof(struct vf_priv_s));
> 
> _______________________________________________
> Mplayer-cvslog mailing list
> Mplayer-cvslog at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-cvslog
> 
> 


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-cvslog mailing list