Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tools/asahi/avd-av1-tail-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


def function(source, name):
match = re.search(r'^(?:static )?(?:int|void)\s+' + name + r'\(', source, re.M)
match = re.search(r'^(?:static )?(?:int|void|u64)\s+' + name + r'\(', source, re.M)
if not match:
raise ValueError(name)
start = match.start()
Expand Down Expand Up @@ -48,6 +48,8 @@ def structure(source, name):
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t dma_addr_t;
typedef uint64_t u64;
#define U64_MAX UINT64_MAX
#define ALIGN(x,a) (((x)+(a)-1)&~((__typeof__(x))(a)-1))
#define ALIGN_DOWN(x,a) ((x)&~((__typeof__(x))(a)-1))
#define WARN_ON(x) (x)
Expand Down Expand Up @@ -211,7 +213,7 @@ def main():
text = {name: p.read_text() for name, p in paths.items()}
src = text['avd-av1.c']
macros = src[src.index('#define AVD_CDFS_SIZE'):src.index('struct avd_av1_run {')]
functions = {n: function(src, n) for n in ['avd_av1_set_prob', 'avd_av1_set_seg', 'avd_av1_seg_size', 'avd_color_size', 'avd_av1_run_preamble', 'avd_av1_adjust_decoded_fmt']}
functions = {n: function(src, n) for n in ['avd_av1_ref_ts', 'avd_av1_set_prob', 'avd_av1_set_seg', 'avd_av1_seg_size', 'avd_color_size', 'avd_av1_run_preamble', 'avd_av1_adjust_decoded_fmt']}
unaligned = ('\n#define UNALIGNED_CDFS_OFFSET(dst,cl) ((dst)-ALIGN(cl,AVD_ALIGN)-ALIGN(AVD_CDFS_SIZE,AVD_ALIGN))\n'
'#define UNALIGNED_SEG_OFFSET(dst,cl,sl) (UNALIGNED_CDFS_OFFSET(dst,cl)-(sl))\n')
# Each mutation names the extracted text it rewrites; a stale one is refused, never run as a no-op.
Expand Down