Re: [FFmpeg-devel] Various build errors with armasm64 and armasm after update to FFmpeg 4.2

2019-10-02 Thread Martin Storsjö

> On Oct 1, 2019, at 23:07, Lukas Fellechner  wrote:
> 
> This has worked very well for quite a long time. But after upgrading to 
> FFmpeg 4.2, the build fails. A lot of changes and additions have been done 
> for ARM/NEON 64-bit, and it looks like many of them are not compatible with 
> armasm64. First I had to fix gas-preprocessor, a patch has been submitted 
> today. But now, many other errors occur, which have to do with the ARM64 
> assembly code itself. I don’t have any knowledge of ARM/NEON assembly code, 
> so I cannot help much with the investigation or fixes.

The issue you posted about, and the other arm64 assembler issue you’ve linked, 
are already fixed since a very long time in libav’s gas-preprocessor, 
https://git.libav.org/?p=gas-preprocessor.git;a=summary.

> On ARM platform, I also see build errors. Interestingly, those files have not 
> even changed. Only the referenced file libavutil/arm/asm.S has changed. Even 
> when I undo the last changes there, the build still fails, so I am out of 
> ideas here right now. When I switch back to FFmpeg 4.1.4, everything builds 
> fine. Maybe there is a config change which causes those errors?

> Errors with ARM target (32 bit):
> 
> C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM\libavcodec\arm\ac3dsp_arm.o.asm(72)
>  : error A2173: syntax error in expression
>it gt

This seems to be a new regression in armasm in MSVC 2019 16.3 (released a 
couple weeks ago), see 
https://developercommunity.visualstudio.com/content/problem/757709/armasm-fails-to-handle-it-instructions.html.
 I don’t see how it would work for you with an earlier version of FFmpeg 
though, maybe those files are around from an earlier build and you didn’t try 
doing a full rebuild?

You can apply 
https://lists.libav.org/pipermail/libav-devel/2019-October/086581.html on your 
copy of gas-preprocessor to work around this issue, but I’m not sure if it’s 
worth keeping the fix permanently (if the bug gets fixed in 16.4).

// Martin

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] Various build errors with armasm64 and armasm after update to FFmpeg 4.2

2019-10-01 Thread Lukas Fellechner
Hi there,

TL;DR: 

Lots of compile errors when building FFmpeg 4.2 ARM/NEON Code through 
gas-preprocessor and armasm(64). Build target is Windows (UWP) ARM and ARM64. 
X86 and X64 targets are building fine.

Long Version:

I am building FFmpeg with an MSYS2 environment where ARM/NEON assembly code is 
compiled through gas-preprocessor and armasm/armasm64, similar to how it is 
described in this compilation guide: 
https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT.

This has worked very well for quite a long time. But after upgrading to FFmpeg 
4.2, the build fails. A lot of changes and additions have been done for 
ARM/NEON 64-bit, and it looks like many of them are not compatible with 
armasm64. First I had to fix gas-preprocessor, a patch has been submitted 
today. But now, many other errors occur, which have to do with the ARM64 
assembly code itself. I don’t have any knowledge of ARM/NEON assembly code, so 
I cannot help much with the investigation or fixes.

It would be great if ARM/NEON experts here (possibly those who submitted the 
changes) could check the new assembly codes and fix them, so that also armasm64 
will eat it.

On ARM platform, I also see build errors. Interestingly, those files have not 
even changed. Only the referenced file libavutil/arm/asm.S has changed. Even 
when I undo the last changes there, the build still fails, so I am out of ideas 
here right now. When I switch back to FFmpeg 4.1.4, everything builds fine. 
Maybe there is a config change which causes those errors?

Below I will post build errors that I see on ARM and ARM64 builds. Other files 
could be affected as well (build cancels out after a few errors).

Thank you for your help.

Best Regards
Lukas


Errors with ARM64 target:

C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(29)
 : error A2523: operand 5: Wrong size operand
ld1 {v0.4h - v3.4h}, [x1]
CC  libavcodec/aasc.o
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(97)
 : error A2523: operand 5: Wrong size operand
ld1 {v0.8b - v3.8b}, [x1]
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1972)
 : error A2509: operand 3: Illegal reg field
ld1 {v1.1d - v2.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1973)
 : error A2509: operand 3: Illegal reg field
ld1 {v3.1d - v4.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1974)
 : error A2509: operand 3: Illegal reg field
ld1 {v16.1d - v17.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1975)
 : error A2509: operand 3: Illegal reg field
ld1 {v18.1d - v19.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1976)
 : error A2509: operand 3: Illegal reg field
ld1 {v20.1d - v21.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1977)
 : error A2509: operand 3: Illegal reg field
ld1 {v22.1d - v23.1d}, [x2], x3
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(1978)
 : error A2509: operand 3: Illegal reg field
ld1 {v24.1d - v25.1d}, [x2]
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2032)
 : error A2509: operand 3: Illegal reg field
st1 {v1.1d - v2.1d}, [x0], x1
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2033)
 : error A2509: aasc.c
operand 3: Illegal reg field
st1 {v3.1d - v4.1d}, [x0], x1
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2183)
 : error A2506: operand 6: Not enough operands
ld1 {v1.8b - v4.8b}, [x7], #32
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2184)
 : error A2506: operand 6: Not enough operands
ld1 {v16.8b - v19.8b}, [x7], #32
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2185)
 : error A2506: operand 6: Not enough operands
ld1 {v20.8b - v23.8b}, [x7], #32
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2186)
 : error A2509: operand 3: Illegal reg field
ld1 {v24.8b - v25.8b}, [x7]
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2432)
 : error A2506: operand 6: Not enough operands
ld1 {v1.8b - v4.8b}, [x7], #32
C:\Source\FFmpegInterop-lukasf\ffmpeg\Output\Windows10\ARM64\libavcodec\aarch64\vp8dsp_neon.o.asm(2433)
 : error A2509: operand 4: Illegal reg field
ld1 {v5.8b - v7.8b}, [x7]