[FFmpeg-devel] [PATCH 1/2] aarch64: vvc: Fix building the dmvr_hv assembly with older MSVC versions

Zhao Zhili quinkblack at foxmail.com
Tue Dec 17 15:38:01 EET 2024



> On Dec 17, 2024, at 21:13, Martin Storsjö <martin at martin.st> wrote:
> 
> Explicitly use ldur for unaligned offsets; newer versions of
> armasm64 implicitly convert ldr to ldur as necessary, but older
> versions require it explicitly written out.
> 
> This fixes these build errors:
> 
>    ffmpeg\libavcodec\aarch64\vvc\inter.o.asm(2039) :
>     error A2518: operand 2: Memory offset must be aligned
>            ldr             s5, [x1, #1]
>    ffmpeg\libavcodec\aarch64\vvc\inter.o.asm(2250) :
>     error A2518: operand 2: Memory offset must be aligned
>            ldr             d7, [x1, #2]
> ---
> libavcodec/aarch64/vvc/inter.S | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/aarch64/vvc/inter.S b/libavcodec/aarch64/vvc/inter.S
> index 7a752019ee..3973d501d3 100644
> --- a/libavcodec/aarch64/vvc/inter.S
> +++ b/libavcodec/aarch64/vvc/inter.S
> @@ -411,7 +411,7 @@ function ff_vvc_dmvr_hv_8_neon, export=1
>         ushr            v16.8h, v16.8h, #4
>         str             q16, [x14], #16
> 3:
> -        ldr             s5, [src, #1]
> +        ldur            s5, [src, #1]
>         ldr             s4, [src], #4
>         uxtl            v7.8h, v5.8b
>         uxtl            v6.8h, v4.8b
> @@ -572,7 +572,7 @@ function ff_vvc_dmvr_hv_10_neon, export=1
>         uqxtn2          v16.8h, v18.4s
>         str             q16, [x14], #16
> 3:
> -        ldr             d7, [src, #2]
> +        ldur            d7, [src, #2]
>         ldr             d6, [src], #8
>         umull           v4.4s, v7.4h, v1.4h
>         umlal           v4.4s, v6.4h, v0.4h

LGTM, thanks.

> -- 
> 2.43.0
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list