Skip to content

Commit

Permalink
Bug 1796532 - Update vendored ffmpeg to revision 0957d62f. r=alwu
Browse files Browse the repository at this point in the history
  • Loading branch information
padenot committed Nov 4, 2022
1 parent e3a7c8c commit 35b2cda
Show file tree
Hide file tree
Showing 162 changed files with 3,257 additions and 2,118 deletions.
2 changes: 1 addition & 1 deletion media/ffvpx/compat/w32pthreads.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/fftime.h"
#include "libavutil/time.h"

typedef struct pthread_t {
void *handle;
Expand Down
6 changes: 4 additions & 2 deletions media/ffvpx/libavcodec/aarch64/fft_init_aarch64.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ av_cold void ff_fft_init_aarch64(FFTContext *s)
int cpu_flags = av_get_cpu_flags();

if (have_neon(cpu_flags)) {
s->fft_permute = ff_fft_permute_neon;
s->fft_calc = ff_fft_calc_neon;
if (s->nbits < 17) {
s->fft_permute = ff_fft_permute_neon;
s->fft_calc = ff_fft_calc_neon;
}
#if CONFIG_MDCT
s->imdct_calc = ff_imdct_calc_neon;
s->imdct_half = ff_imdct_half_neon;
Expand Down
3 changes: 1 addition & 2 deletions media/ffvpx/libavcodec/aarch64/fft_neon.S
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,7 @@ endfunc
function fft\n\()_neon, align=6
AARCH64_VALID_JUMP_TARGET
AARCH64_SIGN_LINK_REGISTER
sub sp, sp, #16
stp x28, x30, [sp]
stp x28, x30, [sp, #-16]!
add x28, x0, #\n4*2*8
bl fft\n2\()_neon
mov x0, x28
Expand Down
12 changes: 6 additions & 6 deletions media/ffvpx/libavcodec/aarch64/h264chroma_init_aarch64.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@

#include "config.h"

void ff_put_h264_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
void ff_put_h264_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
void ff_put_h264_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
void ff_put_h264_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
void ff_put_h264_chroma_mc2_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
void ff_put_h264_chroma_mc2_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);

void ff_avg_h264_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
void ff_avg_h264_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
void ff_avg_h264_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
void ff_avg_h264_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
void ff_avg_h264_chroma_mc2_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
void ff_avg_h264_chroma_mc2_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);

av_cold void ff_h264chroma_init_aarch64(H264ChromaContext *c, int bit_depth)
Expand Down
4 changes: 2 additions & 2 deletions media/ffvpx/libavcodec/aarch64/h264cmc_neon.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include "libavutil/aarch64/asm.S"

/* chroma_mc8(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
/* chroma_mc8(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
.macro h264_chroma_mc8 type, codec=h264
function ff_\type\()_\codec\()_chroma_mc8_neon, export=1
.ifc \type,avg
Expand Down Expand Up @@ -193,7 +193,7 @@ function ff_\type\()_\codec\()_chroma_mc8_neon, export=1
endfunc
.endm

/* chroma_mc4(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
/* chroma_mc4(uint8_t *dst, const uint8_t *src, ptrdiff_t stride, int h, int x, int y) */
.macro h264_chroma_mc4 type, codec=h264
function ff_\type\()_\codec\()_chroma_mc4_neon, export=1
.ifc \type,avg
Expand Down
6 changes: 2 additions & 4 deletions media/ffvpx/libavcodec/aarch64/h264idct_neon.S
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ function ff_h264_idct_add16intra_neon, export=1
endfunc

function ff_h264_idct_add8_neon, export=1
sub sp, sp, #0x40
stp x19, x20, [sp]
stp x19, x20, [sp, #-0x40]!
mov x12, x30
ldp x6, x15, [x0] // dest[0], dest[1]
add x5, x1, #16*4 // block_offset
Expand Down Expand Up @@ -187,8 +186,7 @@ function ff_h264_idct_add8_neon, export=1
csel x6, x15, x6, eq
cmp x10, #20
b.lt 1b
ldp x19, x20, [sp]
add sp, sp, #0x40
ldp x19, x20, [sp], #0x40
ret x12
endfunc

Expand Down
18 changes: 6 additions & 12 deletions media/ffvpx/libavcodec/aarch64/mdct_neon.S
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
#include "libavutil/aarch64/asm.S"

function ff_imdct_half_neon, export=1
sub sp, sp, #32
stp x19, x20, [sp]
stp x19, x20, [sp, #-32]!
AARCH64_SIGN_LINK_REGISTER
str x30, [sp, #16]
mov x12, #1
Expand Down Expand Up @@ -120,17 +119,15 @@ function ff_imdct_half_neon, export=1
st2 {v4.2s,v5.2s}, [x0]
st2 {v6.2s,v7.2s}, [x8]

ldp x19, x20, [sp]
ldr x30, [sp, #16]
AARCH64_VALIDATE_LINK_REGISTER
add sp, sp, #32
ldp x19, x20, [sp], #32

ret
endfunc

function ff_imdct_calc_neon, export=1
sub sp, sp, #32
stp x19, x20, [sp]
stp x19, x20, [sp, #-32]!
AARCH64_SIGN_LINK_REGISTER
str x30, [sp, #16]
ldr w3, [x0, #28] // mdct_bits
Expand Down Expand Up @@ -163,18 +160,16 @@ function ff_imdct_calc_neon, export=1
subs x19, x19, #16
b.gt 1b

ldp x19, x20, [sp]
ldr x30, [sp, #16]
AARCH64_VALIDATE_LINK_REGISTER
add sp, sp, #32
ldp x19, x20, [sp], #32

ret
endfunc


function ff_mdct_calc_neon, export=1
sub sp, sp, #32
stp x19, x20, [sp]
stp x19, x20, [sp, #-32]!
AARCH64_SIGN_LINK_REGISTER
str x30, [sp, #16]

Expand Down Expand Up @@ -323,10 +318,9 @@ function ff_mdct_calc_neon, export=1
st2 {v4.2s,v5.2s}, [x0]
st2 {v6.2s,v7.2s}, [x8]

ldp x19, x20, [sp]
ldr x30, [sp, #16]
AARCH64_VALIDATE_LINK_REGISTER
add sp, sp, #32
ldp x19, x20, [sp], #32

ret
endfunc
8 changes: 4 additions & 4 deletions media/ffvpx/libavcodec/aarch64/vc1dsp_init_aarch64.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ void ff_vc1_h_loop_filter8_neon(uint8_t *src, ptrdiff_t stride, int pq);
void ff_vc1_v_loop_filter16_neon(uint8_t *src, ptrdiff_t stride, int pq);
void ff_vc1_h_loop_filter16_neon(uint8_t *src, ptrdiff_t stride, int pq);

void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
void ff_put_vc1_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
void ff_avg_vc1_chroma_mc8_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
void ff_put_vc1_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
void ff_avg_vc1_chroma_mc4_neon(uint8_t *dst, const uint8_t *src, ptrdiff_t stride,
int h, int x, int y);

int ff_vc1_unescape_buffer_helper_neon(const uint8_t *src, int size, uint8_t *dst);
Expand Down
2 changes: 1 addition & 1 deletion media/ffvpx/libavcodec/aarch64/videodsp_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "libavutil/aarch64/cpu.h"
#include "libavcodec/videodsp.h"

void ff_prefetch_aarch64(uint8_t *mem, ptrdiff_t stride, int h);
void ff_prefetch_aarch64(const uint8_t *mem, ptrdiff_t stride, int h);

av_cold void ff_videodsp_init_aarch64(VideoDSPContext *ctx, int bpc)
{
Expand Down
2 changes: 1 addition & 1 deletion media/ffvpx/libavcodec/aarch64/vp8dsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

#define VP8_MC(n, opt) \
void ff_put_vp8_##n##_##opt(uint8_t *dst, ptrdiff_t dststride, \
uint8_t *src, ptrdiff_t srcstride, \
const uint8_t *src, ptrdiff_t srcstride,\
int h, int x, int y)

#define VP8_EPEL(w, opt) \
Expand Down
28 changes: 14 additions & 14 deletions media/ffvpx/libavcodec/aarch64/vp9itxfm_neon.S
Original file line number Diff line number Diff line change
Expand Up @@ -850,10 +850,10 @@ function ff_vp9_\txfm1\()_\txfm2\()_16x16_add_neon, export=1
mov x15, x30
// iadst16 requires clobbering v8-v15, but idct16 doesn't need to.
.ifnc \txfm1\()_\txfm2,idct_idct
stp d14, d15, [sp, #-0x10]!
stp d12, d13, [sp, #-0x10]!
stp d10, d11, [sp, #-0x10]!
stp d8, d9, [sp, #-0x10]!
stp d8, d9, [sp, #-0x40]!
stp d14, d15, [sp, #0x30]
stp d12, d13, [sp, #0x20]
stp d10, d11, [sp, #0x10]
.endif

sub sp, sp, #512
Expand Down Expand Up @@ -920,10 +920,10 @@ function ff_vp9_\txfm1\()_\txfm2\()_16x16_add_neon, export=1

add sp, sp, #512
.ifnc \txfm1\()_\txfm2,idct_idct
ldp d8, d9, [sp], 0x10
ldp d10, d11, [sp], 0x10
ldp d12, d13, [sp], 0x10
ldp d14, d15, [sp], 0x10
ldp d10, d11, [sp, #0x10]
ldp d12, d13, [sp, #0x20]
ldp d14, d15, [sp, #0x30]
ldp d8, d9, [sp], #0x40
.endif
ret x15
endfunc
Expand Down Expand Up @@ -1486,8 +1486,8 @@ function ff_vp9_idct_idct_32x32_add_neon, export=1

mov x15, x30

stp d10, d11, [sp, #-0x10]!
stp d8, d9, [sp, #-0x10]!
stp d8, d9, [sp, #-0x20]!
stp d10, d11, [sp, #0x10]

sub sp, sp, #2048

Expand Down Expand Up @@ -1544,8 +1544,8 @@ function ff_vp9_idct_idct_32x32_add_neon, export=1

add sp, sp, #2048

ldp d8, d9, [sp], 0x10
ldp d10, d11, [sp], 0x10
ldp d10, d11, [sp, #0x10]
ldp d8, d9, [sp], #0x20

ret x15
endfunc
Expand All @@ -1569,8 +1569,8 @@ function idct32x32_\size\()_add_neon

add sp, sp, #2048

ldp d8, d9, [sp], 0x10
ldp d10, d11, [sp], 0x10
ldp d10, d11, [sp, #0x10]
ldp d8, d9, [sp], #0x20

ret x15
endfunc
Expand Down
32 changes: 16 additions & 16 deletions media/ffvpx/libavcodec/aarch64/vp9lpf_16bpp_neon.S
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,10 @@ endfunc
function ff_\func\()_\bpp\()_neon, export=1
.if \push
mov x16, x30
stp d14, d15, [sp, #-0x10]!
stp d12, d13, [sp, #-0x10]!
stp d10, d11, [sp, #-0x10]!
stp d8, d9, [sp, #-0x10]!
stp d8, d9, [sp, #-0x40]!
stp d14, d15, [sp, #0x30]
stp d12, d13, [sp, #0x20]
stp d10, d11, [sp, #0x10]
.endif
lsl w2, w2, #\bpp - 8
lsl w3, w3, #\bpp - 8
Expand All @@ -430,10 +430,10 @@ function ff_\func\()_\bpp\()_neon, export=1
mov x7, #((1 << \bpp) - 1)
.if \push
bl \func\()_16_neon
ldp d8, d9, [sp], 0x10
ldp d10, d11, [sp], 0x10
ldp d12, d13, [sp], 0x10
ldp d14, d15, [sp], 0x10
ldp d10, d11, [sp, #0x10]
ldp d12, d13, [sp, #0x20]
ldp d14, d15, [sp, #0x30]
ldp d8, d9, [sp], #0x40
ret x16
.else
b \func\()_16_neon
Expand All @@ -450,10 +450,10 @@ endfunc
function ff_\func\()_\suffix\()_\bpp\()_neon, export=1
mov x16, x30
.if \push
stp d14, d15, [sp, #-0x10]!
stp d12, d13, [sp, #-0x10]!
stp d10, d11, [sp, #-0x10]!
stp d8, d9, [sp, #-0x10]!
stp d8, d9, [sp, #-0x40]!
stp d14, d15, [sp, #0x30]
stp d12, d13, [sp, #0x20]
stp d10, d11, [sp, #0x10]
.endif
lsl w2, w2, #\bpp - 8
lsl w3, w3, #\bpp - 8
Expand All @@ -469,10 +469,10 @@ function ff_\func\()_\suffix\()_\bpp\()_neon, export=1
.endif
bl \func\()_\int_suffix\()_16_neon
.if \push
ldp d8, d9, [sp], 0x10
ldp d10, d11, [sp], 0x10
ldp d12, d13, [sp], 0x10
ldp d14, d15, [sp], 0x10
ldp d10, d11, [sp, #0x10]
ldp d12, d13, [sp, #0x20]
ldp d14, d15, [sp, #0x30]
ldp d8, d9, [sp], 0x40
.endif
ret x16
endfunc
Expand Down
Loading

0 comments on commit 35b2cda

Please sign in to comment.