[Mplayer-cvslog] CVS: main/libmpcodecs vf_scale.c,1.47,1.48

Felix Buenemann atmosfear at users.sourceforge.net
Tue Nov 4 11:28:58 CET 2003


On Tuesday 04 November 2003 11:15, Felix Buenemann wrote:
> On Monday 03 November 2003 20:12, Felix Buenemann wrote:
> > On Monday 03 November 2003 15:02, Michael Niedermayer wrote:
> > > Hi
> > >
> > > On Monday 03 November 2003 14:50, Arpi wrote:
> > > [...]
> > >
> > > > > @@ -437,7 +448,7 @@
> > > > >  	src_filter= sws_getDefaultFilter(
> > > > >  		sws_lum_gblur, sws_chr_gblur,
> > > > >  		sws_lum_sharpen, sws_chr_sharpen,
> > > > > -		sws_chr_vshift, sws_chr_hshift, verbose>1);
> > > > > +		sws_chr_hshift, sws_chr_vshift, verbose>1);
> > > > >
> > > > >  	switch(sws_flags)
> > > >
> > > > and the hidden bugfix :)
> > >
> > > sadly only half fix, iam still searching the other half ...
> > >
> > > > do you really believe you can escape from the 100l punishment? :)))
> > >
> > > damn, i should have added more cosmetics :)
> > >
> > > [...]
> >
> > cool, now I can use hshift for horizontal shifting instead of vertical, I
> > thought you were too lazy to fix it, Michael? =)
>
> seems it's the wrong half, -ssf cvs works as expected now, but -ssf chs
> does nothing.
I found the problematic code in swscale.c line 1931:
#ifdef ARCH_X86
// can't downscale !!!
		if(c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR))
		{
			c->lumMmx2Filter   = (int16_t*)memalign(8, (dstW        /8
+8)*sizeof(int16_t));
			c->chrMmx2Filter   = (int16_t*)memalign(8, (c->chrDstW  /4
+8)*sizeof(int16_t));
			c->lumMmx2FilterPos= (int32_t*)memalign(8, (dstW      /2/8
+8)*sizeof(int32_t));
			c->chrMmx2FilterPos= (int32_t*)memalign(8, (c->chrDstW/2/4
+8)*sizeof(int32_t));

			initMMX2HScaler(      dstW, c->lumXInc, c->funnyYCode , c->lumMmx2Filter, 
c->lumMmx2FilterPos, 8);
			initMMX2HScaler(c->chrDstW, c->chrXInc, c->funnyUVCode, c->chrMmx2Filter, 
c->chrMmx2FilterPos, 4);
		}
#endif

This breaks horizontal chroma shifting if -sws 0 is used (FastBilinear), eg. 
with -sws 2 (Bcubic) it works.
-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________



More information about the MPlayer-cvslog mailing list