[FFmpeg-cvslog] r10223 - in trunk/libavcodec/i386: dsputil_mmx.c snowdsp_mmx.c

Michael Niedermayer michaelni
Mon Aug 27 23:34:44 CEST 2007


Hi

On Mon, Aug 27, 2007 at 10:02:09PM +0200, Reimar D?ffinger wrote:
[...]
> > >               "mov %0, %%"REG_d"              \n\t"
> > > -             "movdqa (%%"REG_D"), %%xmm0     \n\t"
> > > -             "movdqa %%xmm1, %%xmm2          \n\t"
> > > +             "movdqu (%%"REG_D"), %%xmm0     \n\t"
> > 
> > why an unaligned read?
> 
> The honest answer: Because it crashes with the aligned one. That seems

:)


> to be because src_x is never divisible by 8, typical values are:
> src_x: 4
> src_x: 12
> src_x: 20
> src_x: 28
> src_x: 36
> src_x: 44
> src_x: 52
> src_x: 60

ok, ill accept th unaligned access here for the moment, the code must first
be broght back to working state before we can think of any tricks to avoid
the alignment issue here ...


> 
> > > -             "punpckhwd %%xmm7, %%xmm1       \n\t"
> > > -             "punpcklwd %%xmm7, %%xmm2       \n\t"
> > > -             "paddd %%xmm2, %%xmm0           \n\t"
> > > -             "movdqa 16(%%"REG_D"), %%xmm2   \n\t"
> > > -             "paddd %%xmm1, %%xmm2           \n\t"
> > > +             "paddd %%xmm1, %%xmm0           \n\t"
> > 
> > no, these are 16 not 32 bit
> 
> Obviously.
> 
> > also theres some shift by 4 missing here
> 
> I don't think so, there is a "psraw $4, %%xmm0               \n\t"
> further down. And I know the code is an unreadable mess. I'll try to
> reimplement it somewhen if noone else will do it...

the daa after obmc is 16bit unsigned, the data after the IDWT is 13bit
signed the white point differs by a factor of 16 a shift by 4 is needed to get
them on the same level before adding ...

then another shift (4 or 8) is needed to get them to the normal 8bit
for output

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Democracy is the form of government in which you can choose your dictator
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20070827/46594c98/attachment.pgp>



More information about the ffmpeg-cvslog mailing list