Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibras committed Jun 8, 2024
2 parents 067aa1e + 4613ac3 commit ad885d4
Show file tree
Hide file tree
Showing 230 changed files with 26,038 additions and 2,520 deletions.
28 changes: 23 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ stages:
_TRIPLET: "i686-w64-mingw32"
_PLATFORMSUFFIX: ".exe"
_WRAPPER: "wine"
_CONTRIB_URL: "https://artifacts.videolan.org/vlc/win32/"
_CONTRIB_URL: "https://artifacts.videolan.org/vlc/win32-llvm/"

.variables-win64: &variables-win64
_TRIPLET: "x86_64-w64-mingw32"
_PLATFORMSUFFIX: ".exe"
_WRAPPER: "wine64"
_CONTRIB_URL: "https://artifacts.videolan.org/vlc/win64/"
_WRAPPER: "wine"
_CONTRIB_URL: "https://artifacts.videolan.org/vlc/win64-llvm/"

.variables-win-armv7: &variables-win-armv7
_TRIPLET: "armv7-w64-mingw32"
Expand Down Expand Up @@ -79,11 +79,12 @@ stages:
- x264${_PLATFORMSUFFIX}
- checkasm8${_PLATFORMSUFFIX}
- checkasm10${_PLATFORMSUFFIX}
- config.log
expire_in: 1 week

build-debian-amd64:
extends: .build
image: registry.videolan.org/x264-debian-unstable:20211206140856
image: registry.videolan.org/vlc-debian-unstable:20240212151604
tags:
- docker
- amd64
Expand All @@ -99,9 +100,11 @@ build-debian-aarch64:

.build-win:
extends: build-debian-amd64
image: registry.videolan.org/vlc-debian-llvm-msvcrt:20240212151604
script: |
set -x
LOCAL_INSTALL_DIR=`pwd`/${_TRIPLET}
export PKGCONFIG=pkg-config
export PKG_CONFIG_LIBDIR=${LOCAL_INSTALL_DIR}/lib/pkgconfig
curl -f -o vlc-contrib.txt ${_CONTRIB_URL}
CONTRIB_NAME=$(sed -n -e "s@.*href=\"\(vlc-contrib-${_TRIPLET}-[^\"]*\.tar\.bz2\)\".*@\1@p" vlc-contrib.txt | sed -n -e '1p')
Expand All @@ -128,7 +131,7 @@ build-win64:

.build-llvm-mingw:
extends: .build
image: registry.videolan.org/vlc-debian-llvm-mingw:20211020094514
image: registry.videolan.org/vlc-debian-llvm-ucrt:20240212151604
tags:
- docker
- amd64
Expand Down Expand Up @@ -225,6 +228,21 @@ test-macos-x86_64:
- build-macos-x86_64
variables: *variables-macos-x86_64

test-aarch64-qemu:
<<: *test
extends: build-debian-amd64
image: registry.videolan.org/x264-debian-unstable:20231113190916
dependencies:
- build-debian-aarch64
variables: *variables-debian-amd64
script: |
set -x
for size in 128 256 512 1024 2048; do
for tool in checkasm8 checkasm10; do
qemu-aarch64 -cpu max,sve-default-vector-length=256,sve$size=on -L /usr/aarch64-linux-gnu ./$tool
done
done
.release: &release
stage: release
script: |
Expand Down
38 changes: 37 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ endif
OBJCHK += tools/checkasm-arm.o
endif

# AArch64 NEON optims
# AArch64 NEON and SVE/SVE2 optims
ifeq ($(SYS_ARCH),AARCH64)
SRCASM_X = common/aarch64/bitstream-a.S \
common/aarch64/cabac-a.S \
Expand All @@ -170,6 +170,15 @@ SRCASM_X = common/aarch64/bitstream-a.S \
common/aarch64/pixel-a.S \
common/aarch64/predict-a.S \
common/aarch64/quant-a.S
ifneq ($(findstring HAVE_SVE 1, $(CONFIG)),)
SRCASM_X += common/aarch64/dct-a-sve.S \
common/aarch64/deblock-a-sve.S \
common/aarch64/mc-a-sve.S \
common/aarch64/pixel-a-sve.S
endif
ifneq ($(findstring HAVE_SVE2 1, $(CONFIG)),)
SRCASM_X += common/aarch64/dct-a-sve2.S
endif
SRCS_X += common/aarch64/asm-offsets.c \
common/aarch64/mc-c.c \
common/aarch64/predict-c.c
Expand Down Expand Up @@ -197,6 +206,33 @@ SRCS_X += common/mips/dct-c.c \
endif
endif

# LOONGARCH optimization
ifeq ($(SYS_ARCH),LOONGARCH)
ifneq ($(findstring HAVE_LSX 1, $(CONFIG)),)
SRCASM_X += common/loongarch/deblock-a.S \
common/loongarch/sad-a.S \
common/loongarch/predict-a.S \
common/loongarch/quant-a.S \
common/loongarch/mc-a.S \
common/loongarch/dct-a.S \
common/loongarch/pixel-a.S

SRCS_X += common/loongarch/predict-c.c \
common/loongarch/mc-c.c \
common/loongarch/pixel-c.c

OBJASM +=
ifneq ($(findstring HAVE_BITDEPTH8 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.S=%-8.o)
endif
ifneq ($(findstring HAVE_BITDEPTH10 1, $(CONFIG)),)
OBJASM += $(SRCASM_X:%.S=%-10.o)
endif

OBJCHK += tools/checkasm-loongarch.o
endif
endif

endif

ifneq ($(HAVE_GETOPT_LONG),1)
Expand Down
2 changes: 1 addition & 1 deletion autocomplete.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* autocomplete: x264cli shell autocomplete
*****************************************************************************
* Copyright (C) 2018-2023 x264 project
* Copyright (C) 2018-2024 x264 project
*
* Authors: Henrik Gramner <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/asm-offsets.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* asm-offsets.c: check asm offsets for aarch64
*****************************************************************************
* Copyright (C) 2014-2023 x264 project
* Copyright (C) 2014-2024 x264 project
*
* Authors: Janne Grunau <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/asm-offsets.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* asm-offsets.h: asm offsets for aarch64
*****************************************************************************
* Copyright (C) 2014-2023 x264 project
* Copyright (C) 2014-2024 x264 project
*
* Authors: Janne Grunau <[email protected]>
*
Expand Down
64 changes: 32 additions & 32 deletions common/aarch64/asm.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* asm.S: AArch64 utility macros
*****************************************************************************
* Copyright (C) 2008-2023 x264 project
* Copyright (C) 2008-2024 x264 project
*
* Authors: Mans Rullgard <[email protected]>
* David Conrad <[email protected]>
Expand Down Expand Up @@ -133,8 +133,8 @@ MACH .const_data


.macro SUMSUB_AB sum, sub, a, b
add \sum, \a, \b
sub \sub, \a, \b
add \sum, \a, \b
sub \sub, \a, \b
.endm

.macro unzip t1, t2, s1, s2
Expand Down Expand Up @@ -163,35 +163,35 @@ MACH .const_data


.macro transpose8x8.h r0, r1, r2, r3, r4, r5, r6, r7, r8, r9
trn1 \r8\().8H, \r0\().8H, \r1\().8H
trn2 \r9\().8H, \r0\().8H, \r1\().8H
trn1 \r1\().8H, \r2\().8H, \r3\().8H
trn2 \r3\().8H, \r2\().8H, \r3\().8H
trn1 \r0\().8H, \r4\().8H, \r5\().8H
trn2 \r5\().8H, \r4\().8H, \r5\().8H
trn1 \r2\().8H, \r6\().8H, \r7\().8H
trn2 \r7\().8H, \r6\().8H, \r7\().8H

trn1 \r4\().4S, \r0\().4S, \r2\().4S
trn2 \r2\().4S, \r0\().4S, \r2\().4S
trn1 \r6\().4S, \r5\().4S, \r7\().4S
trn2 \r7\().4S, \r5\().4S, \r7\().4S
trn1 \r5\().4S, \r9\().4S, \r3\().4S
trn2 \r9\().4S, \r9\().4S, \r3\().4S
trn1 \r3\().4S, \r8\().4S, \r1\().4S
trn2 \r8\().4S, \r8\().4S, \r1\().4S

trn1 \r0\().2D, \r3\().2D, \r4\().2D
trn2 \r4\().2D, \r3\().2D, \r4\().2D

trn1 \r1\().2D, \r5\().2D, \r6\().2D
trn2 \r5\().2D, \r5\().2D, \r6\().2D

trn2 \r6\().2D, \r8\().2D, \r2\().2D
trn1 \r2\().2D, \r8\().2D, \r2\().2D

trn1 \r3\().2D, \r9\().2D, \r7\().2D
trn2 \r7\().2D, \r9\().2D, \r7\().2D
trn1 \r8\().8h, \r0\().8h, \r1\().8h
trn2 \r9\().8h, \r0\().8h, \r1\().8h
trn1 \r1\().8h, \r2\().8h, \r3\().8h
trn2 \r3\().8h, \r2\().8h, \r3\().8h
trn1 \r0\().8h, \r4\().8h, \r5\().8h
trn2 \r5\().8h, \r4\().8h, \r5\().8h
trn1 \r2\().8h, \r6\().8h, \r7\().8h
trn2 \r7\().8h, \r6\().8h, \r7\().8h

trn1 \r4\().4s, \r0\().4s, \r2\().4s
trn2 \r2\().4s, \r0\().4s, \r2\().4s
trn1 \r6\().4s, \r5\().4s, \r7\().4s
trn2 \r7\().4s, \r5\().4s, \r7\().4s
trn1 \r5\().4s, \r9\().4s, \r3\().4s
trn2 \r9\().4s, \r9\().4s, \r3\().4s
trn1 \r3\().4s, \r8\().4s, \r1\().4s
trn2 \r8\().4s, \r8\().4s, \r1\().4s

trn1 \r0\().2d, \r3\().2d, \r4\().2d
trn2 \r4\().2d, \r3\().2d, \r4\().2d

trn1 \r1\().2d, \r5\().2d, \r6\().2d
trn2 \r5\().2d, \r5\().2d, \r6\().2d

trn2 \r6\().2d, \r8\().2d, \r2\().2d
trn1 \r2\().2d, \r8\().2d, \r2\().2d

trn1 \r3\().2d, \r9\().2d, \r7\().2d
trn2 \r7\().2d, \r9\().2d, \r7\().2d
.endm

.macro transpose_8x16.b r0, r1, r2, r3, r4, r5, r6, r7, t0, t1
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/bitstream-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* bitstream-a.S: aarch64 bitstream functions
*****************************************************************************
* Copyright (C) 2014-2023 x264 project
* Copyright (C) 2014-2024 x264 project
*
* Authors: Janne Grunau <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/bitstream.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* bitstream.h: aarch64 bitstream functions
*****************************************************************************
* Copyright (C) 2017-2023 x264 project
* Copyright (C) 2017-2024 x264 project
*
* Authors: Anton Mitrofanov <[email protected]>
*
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/cabac-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* cabac-a.S: aarch64 cabac
*****************************************************************************
* Copyright (C) 2014-2023 x264 project
* Copyright (C) 2014-2024 x264 project
*
* Authors: Janne Grunau <[email protected]>
*
Expand Down
40 changes: 40 additions & 0 deletions common/aarch64/dct-a-common.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/****************************************************************************
* dct-a-common.S: aarch64 transform and zigzag
*****************************************************************************
* Copyright (C) 2009-2024 x264 project
*
* Authors: David Conrad <[email protected]>
* Janne Grunau <[email protected]>
* David Chen <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.
*
* This program is also available under a commercial proprietary license.
* For more information, contact us at [email protected].
*****************************************************************************/

// This file contains the NEON macros that are intended to be used by
// the SVE/SVE2 functions as well

.macro DCT_1D v0 v1 v2 v3 v4 v5 v6 v7
SUMSUB_AB \v1, \v6, \v5, \v6
SUMSUB_AB \v3, \v7, \v4, \v7
add \v0, \v3, \v1
add \v4, \v7, \v7
add \v5, \v6, \v6
sub \v2, \v3, \v1
add \v1, \v4, \v6
sub \v3, \v7, \v5
.endm
Loading

0 comments on commit ad885d4

Please sign in to comment.