@ -463,7 +463,7 @@ function idct16x16_dc_add_neon
ret
endfunc
.macro idct16
function i d c t 1 6
dmbutterfly0 v16 , v24 , v16 , v24 , v2 , v3 , v4 , v5 , v6 , v7 / / v16 = t 0 a , v24 = t 1 a
dmbutterfly v20 , v28 , v0 . h [ 1 ] , v0 . h [ 2 ] , v2 , v3 , v4 , v5 / / v20 = t 2 a , v28 = t 3 a
dmbutterfly v18 , v30 , v0 . h [ 3 ] , v0 . h [ 4 ] , v2 , v3 , v4 , v5 / / v18 = t 4 a , v30 = t 7 a
@ -506,9 +506,10 @@ endfunc
butterfly_ 8 h v19 , v28 , v5 , v28 / / v19 = o u t [ 3 ] , v28 = o u t [ 1 2 ]
butterfly_ 8 h v20 , v27 , v6 , v27 / / v20 = o u t [ 4 ] , v27 = o u t [ 1 1 ]
butterfly_ 8 h v21 , v26 , v26 , v3 / / v21 = o u t [ 5 ] , v26 = o u t [ 1 0 ]
.endm
ret
endfunc
.macro iadst16
function i a d s t 1 6
ld1 { v0 . 8 h ,v1 . 8 h } , [ x11 ]
dmbutterfly_ l v6 , v7 , v4 , v5 , v31 , v16 , v0 . h [ 1 ] , v0 . h [ 0 ] / / v6 ,v7 = t 1 , v4 ,v5 = t 0
@ -577,7 +578,8 @@ endfunc
mov v16 . 1 6 b , v2 . 1 6 b
mov v30 . 1 6 b , v4 . 1 6 b
.endm
ret
endfunc
/ / Helper m a c r o s ; we can't use these expressions directly within
/ / e. g . . i r p d u e t o t h e e x t r a c o n c a t e n a t i o n \ ( ) . T h e r e f o r e w r a p
@ -604,12 +606,14 @@ endfunc
/ / x9 = i n p u t s t r i d e
.macro itxfm16_1d_funcs txfm
function \ t x f m \ ( ) 1 6 _ 1 d _ 8 x16 _ p a s s1 _ n e o n
mov x14 , x30
movi v2 . 8 h , #0
.irp i, 1 6 , 1 7 , 1 8 , 1 9 , 2 0 , 2 1 , 2 2 , 2 3 , 2 4 , 2 5 , 2 6 , 2 7 , 2 8 , 2 9 , 3 0 , 3 1
load_ c l e a r \ i , x2 , x9
.endr
\ txfm\ ( ) 1 6
bl \ t x f m \ ( ) 1 6
/ / Do t w o 8 x8 t r a n s p o s e s . O r i g i n a l l y , v16 - v31 c o n t a i n t h e
/ / 1 6 rows. A f t e r w a r d s , v16 - v23 a n d v24 - v31 c o n t a i n t h e t w o
@ -623,7 +627,7 @@ function \txfm\()16_1d_8x16_pass1_neon
.irp i, 1 6 , 2 4 , 1 7 , 2 5 , 1 8 , 2 6 , 1 9 , 2 7 , 2 0 , 2 8 , 2 1 , 2 9 , 2 2 , 3 0 , 2 3 , 3 1
store \ i , x0 , #16
.endr
ret
br x14
1 :
/ / Special c a s e : F o r t h e l a s t i n p u t c o l u m n ( x1 = = 8 ) ,
/ / which w o u l d b e s t o r e d a s t h e l a s t r o w i n t h e t e m p b u f f e r ,
@ -642,7 +646,7 @@ function \txfm\()16_1d_8x16_pass1_neon
mov v29 . 1 6 b , v21 . 1 6 b
mov v30 . 1 6 b , v22 . 1 6 b
mov v31 . 1 6 b , v23 . 1 6 b
ret
br x14
endfunc
/ / Read a v e r t i c a l 8 x16 s l i c e o u t o f a 1 6 x16 m a t r i x , d o a t r a n s f o r m o n i t ,
@ -653,6 +657,7 @@ endfunc
/ / x3 = s l i c e o f f s e t
/ / x9 = t e m p b u f f e r s t r i d e
function \ t x f m \ ( ) 1 6 _ 1 d _ 8 x16 _ p a s s2 _ n e o n
mov x14 , x30
.irp i, 1 6 , 1 7 , 1 8 , 1 9 , 2 0 , 2 1 , 2 2 , 2 3
load \ i , x2 , x9
.endr
@ -664,7 +669,7 @@ function \txfm\()16_1d_8x16_pass2_neon
add x3 , x0 , x1
lsl x1 , x1 , #1
\ txfm\ ( ) 1 6
bl \ t x f m \ ( ) 1 6
.macro load_add_store coef0 , c o e f1 , c o e f2 , c o e f3 , c o e f4 , c o e f5 , c o e f6 , c o e f7 , t m p1 , t m p2
srshr \ c o e f0 , \ c o e f0 , #6
@ -714,7 +719,7 @@ function \txfm\()16_1d_8x16_pass2_neon
load_ a d d _ s t o r e v24 . 8 h , v25 . 8 h , v26 . 8 h , v27 . 8 h , v28 . 8 h , v29 . 8 h , v30 . 8 h , v31 . 8 h , v16 . 8 b , v17 . 8 b
.purgem load_add_store
ret
br x14
endfunc
.endm
@ -843,7 +848,7 @@ function idct32x32_dc_add_neon
ret
endfunc
.macro idct32_odd
function i d c t 3 2 _ o d d
ld1 { v0 . 8 h ,v1 . 8 h } , [ x11 ]
dmbutterfly v16 , v31 , v0 . h [ 0 ] , v0 . h [ 1 ] , v4 , v5 , v6 , v7 / / v16 = t 1 6 a , v31 = t 3 1 a
@ -898,7 +903,8 @@ endfunc
dmbutterfly0 v26 , v21 , v26 , v21 , v2 , v3 , v4 , v5 , v6 , v7 / / v26 = t 2 6 a , v21 = t 2 1 a
dmbutterfly0 v25 , v22 , v25 , v22 , v2 , v3 , v4 , v5 , v6 , v7 / / v25 = t 2 5 , v22 = t 2 2
dmbutterfly0 v24 , v23 , v24 , v23 , v2 , v3 , v4 , v5 , v6 , v7 / / v24 = t 2 4 a , v23 = t 2 3 a
.endm
ret
endfunc
/ / Do a n 3 2 - p o i n t I D C T o f a 8 x32 s l i c e o u t o f a 3 2 x32 m a t r i x .
/ / The 3 2 - p o i n t I D C T c a n b e d e c o m p o s e d i n t o t w o 1 6 - p o i n t I D C T s ;
@ -912,6 +918,7 @@ endfunc
/ / x1 0 = i d c t _ c o e f f s
/ / x1 1 = i d c t _ c o e f f s + 3 2
function i d c t 3 2 _ 1 d _ 8 x32 _ p a s s1 _ n e o n
mov x14 , x30
ld1 { v0 . 8 h ,v1 . 8 h } , [ x10 ]
movi v4 . 8 h , #0
@ -922,7 +929,7 @@ function idct32_1d_8x32_pass1_neon
st1 { v4 . 8 h } , [ x2 ] , x9
.endr
idc t1 6
bl i d c t 1 6
/ / Do t w o 8 x8 t r a n s p o s e s . O r i g i n a l l y , v16 - v31 c o n t a i n t h e
/ / 1 6 rows. A f t e r w a r d s , v16 - v23 a n d v24 - v31 c o n t a i n t h e
@ -967,7 +974,7 @@ function idct32_1d_8x32_pass1_neon
st1 { v4 . 8 h } , [ x2 ] , x9
.endr
idc t3 2 _ o d d
bl i d c t 3 2 _ o d d
transpose_ 8 x8 H v31 , v30 , v29 , v28 , v27 , v26 , v25 , v24 , v2 , v3
transpose_ 8 x8 H v23 , v22 , v21 , v20 , v19 , v18 , v17 , v16 , v2 , v3
@ -1003,7 +1010,7 @@ function idct32_1d_8x32_pass1_neon
store_ r e v v25 . 8 h , v17 . 8 h
store_ r e v v24 . 8 h , v16 . 8 h
.purgem store_rev
ret
br x14
endfunc
/ / This i s m o s t l y t h e s a m e a s 8 x32 _ p a s s1 , b u t w i t h o u t t h e t r a n s p o s e ,
@ -1017,6 +1024,7 @@ endfunc
/ / x1 0 = i d c t _ c o e f f s
/ / x1 1 = i d c t _ c o e f f s + 3 2
function i d c t 3 2 _ 1 d _ 8 x32 _ p a s s2 _ n e o n
mov x14 , x30
ld1 { v0 . 8 h ,v1 . 8 h } , [ x10 ]
/ / v1 6 = I N ( 0 ) , v17 = I N ( 2 ) . . . v31 = I N ( 3 0 )
@ -1025,7 +1033,7 @@ function idct32_1d_8x32_pass2_neon
.endr
sub x2 , x2 , x9 , l s l #4
idc t1 6
bl i d c t 1 6
.irp i, 1 6 , 1 7 , 1 8 , 1 9 , 2 0 , 2 1 , 2 2 , 2 3 , 2 4 , 2 5 , 2 6 , 2 7 , 2 8 , 2 9 , 3 0 , 3 1
st1 { v \ i \ ( ) . 8 h } , [ x2 ] , x9
@ -1041,7 +1049,7 @@ function idct32_1d_8x32_pass2_neon
sub x2 , x2 , x9 , l s l #4
sub x2 , x2 , #64
idc t3 2 _ o d d
bl i d c t 3 2 _ o d d
.macro load_acc_store a, b , c , d , n e g =0
.if \ neg = = 0
@ -1095,7 +1103,7 @@ function idct32_1d_8x32_pass2_neon
load_ a c c _ s t o r e v24 . 8 h , v25 . 8 h , v26 . 8 h , v27 . 8 h , 1
load_ a c c _ s t o r e v28 . 8 h , v29 . 8 h , v30 . 8 h , v31 . 8 h , 1
.purgem load_acc_store
ret
br x14
endfunc
const m i n _ e o b _ i d c t _ i d c t _ 3 2 , a l i g n =4