/*
* IDCT AArch64 NEON optimisations
*
* Copyright ( c ) 2022 Ben Avison < bavison @ riscosopen . org >
*
* This file is part of FFmpeg .
*
* FFmpeg is free software ; you can redistribute it and / or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 2 . 1 of the License , or ( at your option ) any later version .
*
* FFmpeg 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
* Lesser General Public License for more details .
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg ; if not , write to the Free Software
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA
*/
#include "libavutil/aarch64/asm.S"
// Clamp 16 -bit signed block coefficients to unsigned 8 -bit
// On entry:
// x0 -> array of 64 x 16 -bit coefficients
// x1 -> 8 -bit results
// x2 = row stride for results, bytes
function ff_put_pixels_clamped_neon, export=1
ld1 {v0.16 b, v1.16 b, v2.16 b, v3.16 b}, [x0], #64
ld1 {v4.16 b, v5.16 b, v6.16 b, v7.16 b}, [x0]
sqxtun v0.8 b, v0.8 h
sqxtun v1.8 b, v1.8 h
sqxtun v2.8 b, v2.8 h
sqxtun v3.8 b, v3.8 h
sqxtun v4.8 b, v4.8 h
st1 {v0.8 b}, [x1], x2
sqxtun v0.8 b, v5.8 h
st1 {v1.8 b}, [x1], x2
sqxtun v1.8 b, v6.8 h
st1 {v2.8 b}, [x1], x2
sqxtun v2.8 b, v7.8 h
st1 {v3.8 b}, [x1], x2
st1 {v4.8 b}, [x1], x2
st1 {v0.8 b}, [x1], x2
st1 {v1.8 b}, [x1], x2
st1 {v2.8 b}, [x1]
ret
endfunc
// Clamp 16 -bit signed block coefficients to signed 8 -bit (biased by 128 )
// On entry:
// x0 -> array of 64 x 16 -bit coefficients
// x1 -> 8 -bit results
// x2 = row stride for results, bytes
function ff_put_signed_pixels_clamped_neon, export=1
ld1 {v0.16 b, v1.16 b, v2.16 b, v3.16 b}, [x0], #64
movi v4.8 b, #128
ld1 {v16.16 b, v17.16 b, v18.16 b, v19.16 b}, [x0]
sqxtn v0.8 b, v0.8 h
sqxtn v1.8 b, v1.8 h
sqxtn v2.8 b, v2.8 h
sqxtn v3.8 b, v3.8 h
sqxtn v5.8 b, v16.8 h
add v0.8 b, v0.8 b, v4.8 b
sqxtn v6.8 b, v17.8 h
add v1.8 b, v1.8 b, v4.8 b
sqxtn v7.8 b, v18.8 h
add v2.8 b, v2.8 b, v4.8 b
sqxtn v16.8 b, v19.8 h
add v3.8 b, v3.8 b, v4.8 b
st1 {v0.8 b}, [x1], x2
add v0.8 b, v5.8 b, v4.8 b
st1 {v1.8 b}, [x1], x2
add v1.8 b, v6.8 b, v4.8 b
st1 {v2.8 b}, [x1], x2
add v2.8 b, v7.8 b, v4.8 b
st1 {v3.8 b}, [x1], x2
add v3.8 b, v16.8 b, v4.8 b
st1 {v0.8 b}, [x1], x2
st1 {v1.8 b}, [x1], x2
st1 {v2.8 b}, [x1], x2
st1 {v3.8 b}, [x1]
ret
endfunc
// Add 16 -bit signed block coefficients to unsigned 8 -bit
// On entry:
// x0 -> array of 64 x 16 -bit coefficients
// x1 -> 8 -bit input and results
// x2 = row stride for 8 -bit input and results, bytes
function ff_add_pixels_clamped_neon, export=1
ld1 {v0.16 b, v1.16 b, v2.16 b, v3.16 b}, [x0], #64
mov x3, x1
ld1 {v4.8 b}, [x1], x2
ld1 {v5.8 b}, [x1], x2
ld1 {v6.8 b}, [x1], x2
ld1 {v7.8 b}, [x1], x2
ld1 {v16.16 b, v17.16 b, v18.16 b, v19.16 b}, [x0]
uaddw v0.8 h, v0.8 h, v4.8 b
uaddw v1.8 h, v1.8 h, v5.8 b
uaddw v2.8 h, v2.8 h, v6.8 b
ld1 {v4.8 b}, [x1], x2
uaddw v3.8 h, v3.8 h, v7.8 b
ld1 {v5.8 b}, [x1], x2
sqxtun v0.8 b, v0.8 h
ld1 {v6.8 b}, [x1], x2
sqxtun v1.8 b, v1.8 h
ld1 {v7.8 b}, [x1]
sqxtun v2.8 b, v2.8 h
sqxtun v3.8 b, v3.8 h
uaddw v4.8 h, v16.8 h, v4.8 b
st1 {v0.8 b}, [x3], x2
uaddw v0.8 h, v17.8 h, v5.8 b
st1 {v1.8 b}, [x3], x2
uaddw v1.8 h, v18.8 h, v6.8 b
st1 {v2.8 b}, [x3], x2
uaddw v2.8 h, v19.8 h, v7.8 b
sqxtun v4.8 b, v4.8 h
sqxtun v0.8 b, v0.8 h
st1 {v3.8 b}, [x3], x2
sqxtun v1.8 b, v1.8 h
sqxtun v2.8 b, v2.8 h
st1 {v4.8 b}, [x3], x2
st1 {v0.8 b}, [x3], x2
st1 {v1.8 b}, [x3], x2
st1 {v2.8 b}, [x3]
ret
endfunc
Messung V0.5 in Prozent C=100 H=100 G=100
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.12Bemerkung:
(vorverarbeitet am 2026-08-26)
¤
*Bot Zugriff