[MPlayer-cvslog] CVS: main/libmpcodecs vf_pp7.c, NONE, 1.1 vf.c, 1.115, 1.116 Makefile, 1.144, 1.145
Rich Felker
dalias at aerifal.cx
Mon Jul 11 06:24:29 CEST 2005
- Previous message: [MPlayer-cvslog] CVS: main/libmpcodecs vf_pp7.c, NONE, 1.1 vf.c, 1.115, 1.116 Makefile, 1.144, 1.145
- Next message: [MPlayer-cvslog] CVS: main/libmpcodecs vf_pp7.c, NONE, 1.1 vf.c, 1.115, 1.116 Makefile, 1.144, 1.145
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
On Sat, Jul 09, 2005 at 09:49:53AM +0200, Michael Niedermayer CVS wrote:
> static void dctB_mmx(DCTELEM *dst, DCTELEM *src){
> asm volatile (
> "movq (%0), %%mm0 \n\t"
> "movq 1*4*2(%0), %%mm1 \n\t"
> "paddw 6*4*2(%0), %%mm0 \n\t"
> "paddw 5*4*2(%0), %%mm1 \n\t"
> "movq 2*4*2(%0), %%mm2 \n\t"
> "movq 3*4*2(%0), %%mm3 \n\t"
> "paddw 4*4*2(%0), %%mm2 \n\t"
> "paddw %%mm3, %%mm3 \n\t" //s
> "movq %%mm3, %%mm4 \n\t" //s
> "psubw %%mm0, %%mm3 \n\t" //s-s0
> "paddw %%mm0, %%mm4 \n\t" //s+s0
> "movq %%mm2, %%mm0 \n\t" //s2
> "psubw %%mm1, %%mm2 \n\t" //s2-s1
> "paddw %%mm1, %%mm0 \n\t" //s2+s1
> "movq %%mm4, %%mm1 \n\t" //s0'
> "psubw %%mm0, %%mm4 \n\t" //s0'-s'
> "paddw %%mm0, %%mm1 \n\t" //s0'+s'
> "movq %%mm3, %%mm0 \n\t" //s3'
> "psubw %%mm2, %%mm3 \n\t"
> "psubw %%mm2, %%mm3 \n\t"
> "paddw %%mm0, %%mm2 \n\t"
> "paddw %%mm0, %%mm2 \n\t"
> "movq %%mm1, (%1) \n\t"
> "movq %%mm4, 2*4*2(%1) \n\t"
> "movq %%mm2, 1*4*2(%1) \n\t"
> "movq %%mm3, 3*4*2(%1) \n\t"
> :: "r" (src), "r"(dst)
> );
> }
needs #ifdef around it... (breaks compile on non-x86!!)
> static void get_image(struct vf_instance_s* vf, mp_image_t *mpi){
> if(mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change
> // ok, we can do pp in-place (or pp disabled):
> vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
> mpi->type, mpi->flags, mpi->w, mpi->h);
> mpi->planes[0]=vf->dmpi->planes[0];
> mpi->stride[0]=vf->dmpi->stride[0];
> mpi->width=vf->dmpi->width;
> if(mpi->flags&MP_IMGFLAG_PLANAR){
> mpi->planes[1]=vf->dmpi->planes[1];
> mpi->planes[2]=vf->dmpi->planes[2];
> mpi->stride[1]=vf->dmpi->stride[1];
> mpi->stride[2]=vf->dmpi->stride[2];
> }
> mpi->flags|=MP_IMGFLAG_DIRECT;
> }
this is incorrect. dr must be disabled if the dmpi buffer obtained is
not in readable memory, otherwise it will be slow as hell.. i would
recommend disabling dr entirely if you cannot ensure this since it
barely helps anyway.
rich
- Previous message: [MPlayer-cvslog] CVS: main/libmpcodecs vf_pp7.c, NONE, 1.1 vf.c, 1.115, 1.116 Makefile, 1.144, 1.145
- Next message: [MPlayer-cvslog] CVS: main/libmpcodecs vf_pp7.c, NONE, 1.1 vf.c, 1.115, 1.116 Makefile, 1.144, 1.145
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list