On Fri, Jun 22, 2012 at 09:42:36PM +0100, Mans Rullgard wrote:
> The problem is that the ssse3 psign instruction does the wrong
> thing here.  Commit ea60dfe incorrectly removed a macro emulating
> this instruction for pre-ssse3 code.  However, the emulation is
> incorrect, and the code relies on the behaviour of the macro.
> Specifically, the psign sets destination elements to zero where
> the corresponding source element is zere, whereas the emulation
                                      ^^^ bad accent
> only negates destination elements where the source is zero.
> 
> Furthermore, the PSIGNW_MMX macro in x86util.asm is totally bogus,
> which is why the original VC1 code had an additional right shift
                            VC-1
> when using it.  Since the psign instruction cannot be used here,
> skip all the macro hell and use the working instruction sequence
> directly.
> 
> None of this was noticed due a stray return statement in
> ff_vc1dsp_init_mmx() which meant that only the mmx version of the
> loop filter was ever used (before being removed in ea60dfe).
> 
> Signed-off-by: Mans Rullgard <[email protected]>
> ---
>  libavcodec/x86/vc1dsp_mmx.c    |    2 +-
>  libavcodec/x86/vc1dsp_yasm.asm |    5 +++--
>  2 files changed, 4 insertions(+), 3 deletions(-)

The patch itself LGTM
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to