/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
#define lr x30
#define ip0 x16
.section .note.GNU-stack,"",@progbits
.data
.globl _libnvcuvid_so_tramp_table
.hidden _libnvcuvid_so_tramp_table
.align 8
_libnvcuvid_so_tramp_table:
.zero 312
.text
.globl _libnvcuvid_so_tramp_resolve
.hidden _libnvcuvid_so_tramp_resolve
.globl _libnvcuvid_so_save_regs_and_resolve
.hidden _libnvcuvid_so_save_regs_and_resolve
.type _libnvcuvid_so_save_regs_and_resolve, %function
_libnvcuvid_so_save_regs_and_resolve:
.cfi_startproc
// Slow path which calls dlsym, taken only on first call.
// Registers are saved according to "Procedure Call Standard for the ArmĀ® 64-bit Architecture".
// For DWARF directives, read https://www.imperialviolet.org/2017/01/18/cfi.html.
// Stack is aligned at 16 bytes
#define PUSH_PAIR(reg1, reg2) stp reg1, reg2, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset reg1, 0; .cfi_rel_offset reg2, 8
#define POP_PAIR(reg1, reg2) ldp reg1, reg2, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore reg2; .cfi_restore reg1
#define PUSH_WIDE_PAIR(reg1, reg2) stp reg1, reg2, [sp, #-32]!; .cfi_adjust_cfa_offset 32; .cfi_rel_offset reg1, 0; .cfi_rel_offset reg2, 16
#define POP_WIDE_PAIR(reg1, reg2) ldp reg1, reg2, [sp], #32; .cfi_adjust_cfa_offset -32; .cfi_restore reg2; .cfi_restore reg1
// Save only arguments (and lr)
PUSH_PAIR(x0, x1)
PUSH_PAIR(x2, x3)
PUSH_PAIR(x4, x5)
PUSH_PAIR(x6, x7)
PUSH_PAIR(x8, lr)
ldr x0, [sp, #80] // 16*5
PUSH_WIDE_PAIR(q0, q1)
PUSH_WIDE_PAIR(q2, q3)
PUSH_WIDE_PAIR(q4, q5)
PUSH_WIDE_PAIR(q6, q7)
// Stack is aligned at 16 bytes
bl _libnvcuvid_so_tramp_resolve
mov ip0, x0
// TODO: pop pc?
POP_WIDE_PAIR(q6, q7)
POP_WIDE_PAIR(q4, q5)
POP_WIDE_PAIR(q2, q3)
POP_WIDE_PAIR(q0, q1)
POP_PAIR(x8, lr)
POP_PAIR(x6, x7)
POP_PAIR(x4, x5)
POP_PAIR(x2, x3)
POP_PAIR(x0, x1)
br lr
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl NvToolCreateInterface
.p2align 4
.type NvToolCreateInterface, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden NvToolCreateInterface
#endif
NvToolCreateInterface:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+0
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+0]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 0 & 0xffff
#if 0 > 0xffff
movk ip0, 0 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl NvToolDestroyInterface
.p2align 4
.type NvToolDestroyInterface, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden NvToolDestroyInterface
#endif
NvToolDestroyInterface:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+8
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+8]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 1 & 0xffff
#if 1 > 0xffff
movk ip0, 1 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl NvToolGetApiFunctionCount
.p2align 4
.type NvToolGetApiFunctionCount, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden NvToolGetApiFunctionCount
#endif
NvToolGetApiFunctionCount:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+16
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+16]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 2 & 0xffff
#if 2 > 0xffff
movk ip0, 2 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl NvToolGetApiID
.p2align 4
.type NvToolGetApiID, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden NvToolGetApiID
#endif
NvToolGetApiID:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+24
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+24]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 3 & 0xffff
#if 3 > 0xffff
movk ip0, 3 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl NvToolGetApiNames
.p2align 4
.type NvToolGetApiNames, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden NvToolGetApiNames
#endif
NvToolGetApiNames:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+32
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+32]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 4 & 0xffff
#if 4 > 0xffff
movk ip0, 4 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl NvToolGetInterface
.p2align 4
.type NvToolGetInterface, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden NvToolGetInterface
#endif
NvToolGetInterface:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+40
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+40]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 5 & 0xffff
#if 5 > 0xffff
movk ip0, 5 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl NvToolSetApiID
.p2align 4
.type NvToolSetApiID, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden NvToolSetApiID
#endif
NvToolSetApiID:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+48
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+48]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 6 & 0xffff
#if 6 > 0xffff
movk ip0, 6 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl NvToolSetInterface
.p2align 4
.type NvToolSetInterface, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden NvToolSetInterface
#endif
NvToolSetInterface:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+56
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+56]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 7 & 0xffff
#if 7 > 0xffff
movk ip0, 7 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl __std_1U4S4U_X02
.p2align 4
.type __std_1U4S4U_X02, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden __std_1U4S4U_X02
#endif
__std_1U4S4U_X02:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+64
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+64]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 8 & 0xffff
#if 8 > 0xffff
movk ip0, 8 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl __std_2U4S4U_X08
.p2align 4
.type __std_2U4S4U_X08, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden __std_2U4S4U_X08
#endif
__std_2U4S4U_X08:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+72
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+72]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 9 & 0xffff
#if 9 > 0xffff
movk ip0, 9 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl __std_4U4S4U_X04
.p2align 4
.type __std_4U4S4U_X04, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden __std_4U4S4U_X04
#endif
__std_4U4S4U_X04:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+80
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+80]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 10 & 0xffff
#if 10 > 0xffff
movk ip0, 10 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidConvertYUVToRGB
.p2align 4
.type cuvidConvertYUVToRGB, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidConvertYUVToRGB
#endif
cuvidConvertYUVToRGB:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+88
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+88]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 11 & 0xffff
#if 11 > 0xffff
movk ip0, 11 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidConvertYUVToRGBArray
.p2align 4
.type cuvidConvertYUVToRGBArray, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidConvertYUVToRGBArray
#endif
cuvidConvertYUVToRGBArray:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+96
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+96]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 12 & 0xffff
#if 12 > 0xffff
movk ip0, 12 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidCreateDecoder
.p2align 4
.type cuvidCreateDecoder, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidCreateDecoder
#endif
cuvidCreateDecoder:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+104
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+104]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 13 & 0xffff
#if 13 > 0xffff
movk ip0, 13 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidCreateVideoParser
.p2align 4
.type cuvidCreateVideoParser, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidCreateVideoParser
#endif
cuvidCreateVideoParser:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+112
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+112]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 14 & 0xffff
#if 14 > 0xffff
movk ip0, 14 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidCreateVideoSource
.p2align 4
.type cuvidCreateVideoSource, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidCreateVideoSource
#endif
cuvidCreateVideoSource:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+120
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+120]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 15 & 0xffff
#if 15 > 0xffff
movk ip0, 15 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidCreateVideoSourceW
.p2align 4
.type cuvidCreateVideoSourceW, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidCreateVideoSourceW
#endif
cuvidCreateVideoSourceW:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+128
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+128]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 16 & 0xffff
#if 16 > 0xffff
movk ip0, 16 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidCtxLock
.p2align 4
.type cuvidCtxLock, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidCtxLock
#endif
cuvidCtxLock:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+136
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+136]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 17 & 0xffff
#if 17 > 0xffff
movk ip0, 17 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidCtxLockCreate
.p2align 4
.type cuvidCtxLockCreate, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidCtxLockCreate
#endif
cuvidCtxLockCreate:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+144
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+144]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 18 & 0xffff
#if 18 > 0xffff
movk ip0, 18 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidCtxLockDestroy
.p2align 4
.type cuvidCtxLockDestroy, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidCtxLockDestroy
#endif
cuvidCtxLockDestroy:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+152
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+152]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 19 & 0xffff
#if 19 > 0xffff
movk ip0, 19 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidCtxUnlock
.p2align 4
.type cuvidCtxUnlock, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidCtxUnlock
#endif
cuvidCtxUnlock:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+160
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+160]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 20 & 0xffff
#if 20 > 0xffff
movk ip0, 20 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidDecodePicture
.p2align 4
.type cuvidDecodePicture, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidDecodePicture
#endif
cuvidDecodePicture:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+168
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+168]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 21 & 0xffff
#if 21 > 0xffff
movk ip0, 21 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidDestroyDecoder
.p2align 4
.type cuvidDestroyDecoder, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidDestroyDecoder
#endif
cuvidDestroyDecoder:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+176
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+176]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 22 & 0xffff
#if 22 > 0xffff
movk ip0, 22 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidDestroyVideoParser
.p2align 4
.type cuvidDestroyVideoParser, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidDestroyVideoParser
#endif
cuvidDestroyVideoParser:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+184
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+184]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 23 & 0xffff
#if 23 > 0xffff
movk ip0, 23 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidDestroyVideoSource
.p2align 4
.type cuvidDestroyVideoSource, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidDestroyVideoSource
#endif
cuvidDestroyVideoSource:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+192
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+192]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 24 & 0xffff
#if 24 > 0xffff
movk ip0, 24 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidGetDecodeStatus
.p2align 4
.type cuvidGetDecodeStatus, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidGetDecodeStatus
#endif
cuvidGetDecodeStatus:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+200
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+200]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 25 & 0xffff
#if 25 > 0xffff
movk ip0, 25 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidGetDecoderCaps
.p2align 4
.type cuvidGetDecoderCaps, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidGetDecoderCaps
#endif
cuvidGetDecoderCaps:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+208
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+208]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 26 & 0xffff
#if 26 > 0xffff
movk ip0, 26 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidGetSourceAudioFormat
.p2align 4
.type cuvidGetSourceAudioFormat, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidGetSourceAudioFormat
#endif
cuvidGetSourceAudioFormat:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+216
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+216]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 27 & 0xffff
#if 27 > 0xffff
movk ip0, 27 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidGetSourceVideoFormat
.p2align 4
.type cuvidGetSourceVideoFormat, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidGetSourceVideoFormat
#endif
cuvidGetSourceVideoFormat:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+224
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+224]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 28 & 0xffff
#if 28 > 0xffff
movk ip0, 28 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidGetVideoSourceState
.p2align 4
.type cuvidGetVideoSourceState, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidGetVideoSourceState
#endif
cuvidGetVideoSourceState:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+232
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+232]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 29 & 0xffff
#if 29 > 0xffff
movk ip0, 29 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidMapVideoFrame
.p2align 4
.type cuvidMapVideoFrame, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidMapVideoFrame
#endif
cuvidMapVideoFrame:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+240
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+240]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 30 & 0xffff
#if 30 > 0xffff
movk ip0, 30 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidMapVideoFrame64
.p2align 4
.type cuvidMapVideoFrame64, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidMapVideoFrame64
#endif
cuvidMapVideoFrame64:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+248
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+248]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 31 & 0xffff
#if 31 > 0xffff
movk ip0, 31 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidParseVideoData
.p2align 4
.type cuvidParseVideoData, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidParseVideoData
#endif
cuvidParseVideoData:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+256
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+256]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 32 & 0xffff
#if 32 > 0xffff
movk ip0, 32 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidPrivateOp
.p2align 4
.type cuvidPrivateOp, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidPrivateOp
#endif
cuvidPrivateOp:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+264
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+264]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 33 & 0xffff
#if 33 > 0xffff
movk ip0, 33 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidReconfigureDecoder
.p2align 4
.type cuvidReconfigureDecoder, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidReconfigureDecoder
#endif
cuvidReconfigureDecoder:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+272
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+272]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 34 & 0xffff
#if 34 > 0xffff
movk ip0, 34 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidSetVideoSourceState
.p2align 4
.type cuvidSetVideoSourceState, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidSetVideoSourceState
#endif
cuvidSetVideoSourceState:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+280
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+280]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 35 & 0xffff
#if 35 > 0xffff
movk ip0, 35 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidUnmapVideoFrame
.p2align 4
.type cuvidUnmapVideoFrame, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidUnmapVideoFrame
#endif
cuvidUnmapVideoFrame:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+288
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+288]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 36 & 0xffff
#if 36 > 0xffff
movk ip0, 36 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc
/*
* Copyright 2018-2025 Yury Gribov
*
* The MIT License (MIT)
*
* Use of this source code is governed by MIT license that can be
* found in the LICENSE.txt file.
*/
.globl cuvidUnmapVideoFrame64
.p2align 4
.type cuvidUnmapVideoFrame64, %function
#ifndef IMPLIB_EXPORT_SHIMS
.hidden cuvidUnmapVideoFrame64
#endif
cuvidUnmapVideoFrame64:
.cfi_startproc
1:
// Load address
// TODO: can we do this faster on newer ARMs?
adrp ip0, _libnvcuvid_so_tramp_table+296
ldr ip0, [ip0, #:lo12:_libnvcuvid_so_tramp_table+296]
cbz ip0, 2f
// Fast path
br ip0
2:
// Slow path
mov ip0, 37 & 0xffff
#if 37 > 0xffff
movk ip0, 37 >> 16, lsl #16
#endif
stp ip0, lr, [sp, #-16]!; .cfi_adjust_cfa_offset 16; .cfi_rel_offset lr, 8
bl _libnvcuvid_so_save_regs_and_resolve
ldp xzr, lr, [sp], #16; .cfi_adjust_cfa_offset -16; .cfi_restore lr
br ip0
.cfi_endproc