[libav-bugs] [Bug 795] New: NASM compilation error in hevc_deblock.asm

bugzilla at aruru.libav.org bugzilla at aruru.libav.org
Fri Dec 26 16:19:57 CET 2014


https://bugzilla.libav.org/show_bug.cgi?id=795

            Bug ID: 795
           Summary: NASM compilation error in hevc_deblock.asm
           Product: Libav
           Version: git HEAD
          Hardware: X86
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: ---
         Component: libavcodec
          Assignee: bugzilla at libav.org
          Reporter: sebras at hotmail.com

I'm attempting to compile libav (inside gst-libav really, but it fails if I
compile libav stand-alone too). More specifically git HEAD (f20141d).

When using NASM 2.11.05 to compile libavcodec/x86/hevc_deblock.asm it fails
with:
YASM    libavcodec/x86/hevc_deblock.o
libavcodec/x86/hevc_deblock.asm:737: error: invalid combination of opcode and
operands
libavcodec/x86/hevc_deblock.asm:737: error: invalid combination of opcode and
operands
libavcodec/x86/hevc_deblock.asm:749: error: invalid combination of opcode and
operands
libavcodec/x86/hevc_deblock.asm:749: error: invalid combination of opcode and
operands
libavcodec/x86/hevc_deblock.asm:781: error: invalid combination of opcode and
operands
libavcodec/x86/hevc_deblock.asm:781: error: invalid combination of opcode and
operands
libavcodec/x86/hevc_deblock.asm:808: error: invalid combination of opcode and
operands
libavcodec/x86/hevc_deblock.asm:808: error: invalid combination of opcode and
operands
library.mak:26: recipe for target 'libavcodec/x86/hevc_deblock.o' failed

I tracked it down to the use of the LUMA_DEBLOCK_BODY macro, inside of which
there are two instructions that cause problems:

[...]
    ;beta calculations
%if %1 > 8
    shl             betaq, %1 - 8
%endif
    movd            m13, betaq
[...]
    ;beta calculations
    movd            m10, betaq
    SPLATW          m10, m10, 0
[...]

It is those two movd instructions that cause problems. I'm neither well versed
in nasm language nor in Intel assembler, but it appears to me as if the mov
instruction wants to move betaq into MMX-registers m13 and m10. As far as I can
tell those registers are 64-bit so the suffix q on the beta argument appears
reasonable. Given this I think that this should really be movq instructions
instead of movd instructions. I looked into the git and
libavcodec/x86/hevc_deblock.asm appears to have had this code since it was
first included in commit 1a880b2.

The attated patch aims to fix this problem. Please review it carefully as I'm
not sure I'm doing everything correctly. :)

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-bugs/attachments/20141226/2289d9d2/attachment-0001.html>


More information about the libav-bugs mailing list