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 Mar 11, 2023
2 parents be0cb54 + eaa68fa commit 6c10980
Show file tree
Hide file tree
Showing 198 changed files with 332 additions and 207 deletions.
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-2022 x264 project
* Copyright (C) 2018-2023 x264 project
*
* Authors: Henrik Gramner <henrik@gramner.com>
*
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-2022 x264 project
* Copyright (C) 2014-2023 x264 project
*
* Authors: Janne Grunau <janne-x264@jannau.net>
*
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-2022 x264 project
* Copyright (C) 2014-2023 x264 project
*
* Authors: Janne Grunau <janne-x264@jannau.net>
*
Expand Down
2 changes: 1 addition & 1 deletion 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-2022 x264 project
* Copyright (C) 2008-2023 x264 project
*
* Authors: Mans Rullgard <mans@mansr.com>
* David Conrad <lessen42@gmail.com>
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-2022 x264 project
* Copyright (C) 2014-2023 x264 project
*
* Authors: Janne Grunau <janne-x264@jannau.net>
*
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-2022 x264 project
* Copyright (C) 2017-2023 x264 project
*
* Authors: Anton Mitrofanov <BugMaster@narod.ru>
*
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-2022 x264 project
* Copyright (C) 2014-2023 x264 project
*
* Authors: Janne Grunau <janne-x264@jannau.net>
*
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/dct-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
* dct-a.S: aarch64 transform and zigzag
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Janne Grunau <janne-x264@jannau.net>
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/dct.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* dct.h: aarch64 transform and zigzag
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Janne Grunau <janne-x264@jannau.net>
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/deblock-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* deblock.S: aarch64 deblocking
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: Mans Rullgard <mans@mansr.com>
* Janne Grunau <janne-x264@jannau.net>
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/deblock.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* deblock.h: aarch64 deblocking
*****************************************************************************
* Copyright (C) 2017-2022 x264 project
* Copyright (C) 2017-2023 x264 project
*
* Authors: Anton Mitrofanov <BugMaster@narod.ru>
*
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/mc-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* mc.S: aarch64 motion compensation
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Janne Grunau <janne-x264@jannau.net>
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/mc-c.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* mc-c.c: aarch64 motion compensation
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Janne Grunau <janne-x264@jannau.net>
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/mc.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* mc.h: aarch64 motion compensation
*****************************************************************************
* Copyright (C) 2014-2022 x264 project
* Copyright (C) 2014-2023 x264 project
*
* Authors: Janne Grunau <janne-x264@jannau.net>
*
Expand Down
107 changes: 106 additions & 1 deletion common/aarch64/pixel-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* pixel.S: aarch64 pixel metrics
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Janne Grunau <janne-x264@jannau.net>
Expand Down Expand Up @@ -40,6 +40,7 @@ const mask_ac_4_8
.short 0, -1, -1, -1, -1, -1, -1, -1
endconst

#if BIT_DEPTH == 8
.macro SAD_START_4
ld1 {v1.s}[0], [x2], x3
ld1 {v0.s}[0], [x0], x1
Expand Down Expand Up @@ -112,6 +113,110 @@ function pixel_sad\name\()_\w\()x\h\()_neon, export=1
endfunc
.endm

#else /* BIT_DEPTH == 8 */

.macro SAD_START_4
lsl x1, x1, #1
lsl x3, x3, #1
ld1 {v1.d}[0], [x2], x3
ld1 {v0.d}[0], [x0], x1
ld1 {v1.d}[1], [x2], x3
ld1 {v0.d}[1], [x0], x1
uabdl v16.4s, v0.4h, v1.4h
uabdl2 v18.4s, v0.8h, v1.8h
.endm

.macro SAD_4
ld1 {v1.d}[0], [x2], x3
ld1 {v0.d}[0], [x0], x1
ld1 {v1.d}[1], [x2], x3
ld1 {v0.d}[1], [x0], x1
uabal v16.4s, v0.4h, v1.4h
uabal2 v18.4s, v0.8h, v1.8h
.endm

.macro SAD_START_8
lsl x1, x1, #1
lsl x3, x3, #1
ld1 {v1.8h}, [x2], x3
ld1 {v0.8h}, [x0], x1
ld1 {v3.8h}, [x2], x3
ld1 {v2.8h}, [x0], x1
uabdl v16.4s, v0.4h, v1.4h
uabdl2 v17.4s, v0.8h, v1.8h
uabdl v18.4s, v2.4h, v3.4h
uabdl2 v19.4s, v2.8h, v3.8h
.endm

.macro SAD_8
ld1 {v1.8h}, [x2], x3
ld1 {v0.8h}, [x0], x1
ld1 {v3.8h}, [x2], x3
ld1 {v2.8h}, [x0], x1
uabal v16.4s, v0.4h, v1.4h
uabal2 v17.4s, v0.8h, v1.8h
uabal v18.4s, v2.4h, v3.4h
uabal2 v19.4s, v2.8h, v3.8h
.endm

.macro SAD_START_16
lsl x1, x1, #1
lsl x3, x3, #1
ld2 {v0.8h, v1.8h}, [x2], x3
ld2 {v2.8h, v3.8h}, [x0], x1
ld2 {v4.8h, v5.8h}, [x2], x3
ld2 {v6.8h, v7.8h}, [x0], x1
uabdl v16.4s, v0.4h, v2.4h
uabdl2 v17.4s, v0.8h, v2.8h
uabdl v20.4s, v1.4h, v3.4h
uabdl2 v21.4s, v1.8h, v3.8h
uabdl v18.4s, v4.4h, v6.4h
uabdl2 v19.4s, v4.8h, v6.8h
uabdl v22.4s, v5.4h, v7.4h
uabdl2 v23.4s, v5.8h, v7.8h
.endm

.macro SAD_16
ld2 {v0.8h, v1.8h}, [x2], x3
ld2 {v2.8h, v3.8h}, [x0], x1
ld2 {v4.8h, v5.8h}, [x2], x3
ld2 {v6.8h, v7.8h}, [x0], x1
uabal v16.4s, v0.4h, v2.4h
uabal2 v17.4s, v0.8h, v2.8h
uabal v20.4s, v1.4h, v3.4h
uabal2 v21.4s, v1.8h, v3.8h
uabal v18.4s, v4.4h, v6.4h
uabal2 v19.4s, v4.8h, v6.8h
uabal v22.4s, v5.4h, v7.4h
uabal2 v23.4s, v5.8h, v7.8h
.endm

.macro SAD_FUNC w, h, name
function pixel_sad\name\()_\w\()x\h\()_neon, export=1
SAD_START_\w

.rept \h / 2 - 1
SAD_\w
.endr
.if \w > 8
add v20.4s, v20.4s, v21.4s
add v16.4s, v16.4s, v20.4s
add v22.4s, v22.4s, v23.4s
add v18.4s, v18.4s, v22.4s
.endif
.if \w > 4
add v16.4s, v16.4s, v17.4s
add v18.4s, v18.4s, v19.4s
.endif
add v16.4s, v16.4s, v18.4s
uaddlv s0, v16.8h
fmov w0, s0
ret
endfunc
.endm

#endif /* BIT_DEPTH == 8 */

SAD_FUNC 4, 4
SAD_FUNC 4, 8
SAD_FUNC 4, 16
Expand Down
8 changes: 4 additions & 4 deletions common/aarch64/pixel.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* pixel.h: aarch64 pixel metrics
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Janne Grunau <janne-x264@jannau.net>
Expand Down Expand Up @@ -76,11 +76,11 @@
ret x264_pixel_##name##_4x4_##suffix args;\

#define DECL_X1( name, suffix ) \
DECL_PIXELS( int, name, suffix, ( uint8_t *, intptr_t, uint8_t *, intptr_t ) )
DECL_PIXELS( int, name, suffix, ( pixel *, intptr_t, pixel *, intptr_t ) )

#define DECL_X4( name, suffix ) \
DECL_PIXELS( void, name##_x3, suffix, ( uint8_t *, uint8_t *, uint8_t *, uint8_t *, intptr_t, int * ) )\
DECL_PIXELS( void, name##_x4, suffix, ( uint8_t *, uint8_t *, uint8_t *, uint8_t *, uint8_t *, intptr_t, int * ) )
DECL_PIXELS( void, name##_x3, suffix, ( pixel *, pixel *, pixel *, pixel *, intptr_t, int * ) )\
DECL_PIXELS( void, name##_x4, suffix, ( pixel *, pixel *, pixel *, pixel *, pixel *, intptr_t, int * ) )

DECL_X1( sad, neon )
DECL_X4( sad, neon )
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/predict-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* predict.S: aarch64 intra prediction
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Mans Rullgard <mans@mansr.com>
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/predict-c.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* predict.c: aarch64 intra prediction
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Janne Grunau <janne-x264@jannau.net>
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/predict.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* predict.h: aarch64 intra prediction
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Janne Grunau <janne-x264@jannau.net>
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/quant-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
* quant.S: arm quantization and level-run
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Janne Grunau <janne-x264@jannau.net>
Expand Down
2 changes: 1 addition & 1 deletion common/aarch64/quant.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* quant.h: arm quantization and level-run
*****************************************************************************
* Copyright (C) 2005-2022 x264 project
* Copyright (C) 2005-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Janne Grunau <janne-x264@jannau.net>
Expand Down
2 changes: 1 addition & 1 deletion common/arm/asm.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* asm.S: arm utility macros
*****************************************************************************
* Copyright (C) 2008-2022 x264 project
* Copyright (C) 2008-2023 x264 project
*
* Authors: Mans Rullgard <mans@mansr.com>
* David Conrad <lessen42@gmail.com>
Expand Down
2 changes: 1 addition & 1 deletion common/arm/bitstream-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* bitstream-a.S: arm bitstream functions
*****************************************************************************
* Copyright (C) 2014-2022 x264 project
* Copyright (C) 2014-2023 x264 project
*
* Authors: Janne Grunau <janne-x264@jannau.net>
*
Expand Down
2 changes: 1 addition & 1 deletion common/arm/bitstream.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* bitstream.h: arm bitstream functions
*****************************************************************************
* Copyright (C) 2017-2022 x264 project
* Copyright (C) 2017-2023 x264 project
*
* Authors: Anton Mitrofanov <BugMaster@narod.ru>
*
Expand Down
2 changes: 1 addition & 1 deletion common/arm/cpu-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* cpu-a.S: arm cpu detection
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
*
Expand Down
2 changes: 1 addition & 1 deletion common/arm/dct-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
* dct-a.S: arm transform and zigzag
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
* Martin Storsjo <martin@martin.st>
Expand Down
2 changes: 1 addition & 1 deletion common/arm/dct.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* dct.h: arm transform and zigzag
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: David Conrad <lessen42@gmail.com>
*
Expand Down
2 changes: 1 addition & 1 deletion common/arm/deblock-a.S
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* deblock.S: arm deblocking
*****************************************************************************
* Copyright (C) 2009-2022 x264 project
* Copyright (C) 2009-2023 x264 project
*
* Authors: Mans Rullgard <mans@mansr.com>
* Martin Storsjo <martin@martin.st>
Expand Down
2 changes: 1 addition & 1 deletion common/arm/deblock.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
* deblock.h: arm deblocking
*****************************************************************************
* Copyright (C) 2017-2022 x264 project
* Copyright (C) 2017-2023 x264 project
*
* Authors: Anton Mitrofanov <BugMaster@narod.ru>
*
Expand Down
Loading

0 comments on commit 6c10980

Please sign in to comment.