Enable dav1d SIMD on more architectures

This commit is contained in:
Basilisk-Dev 2026-05-11 10:16:34 -04:00 committed by wuggy
commit ad1bfb30d5
19 changed files with 402 additions and 20 deletions

View file

@ -0,0 +1,55 @@
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
vsx_sources = [
'ppc_cdef_vsx_16bpc.c',
'ppc_cdef_vsx_8bpc.c',
'ppc_looprestoration_vsx_16bpc.c',
'ppc_looprestoration_vsx_8bpc.c',
]
pwr9_sources = [
'ppc_itx_pwr9_16bpc.c',
'ppc_itx_pwr9_8bpc.c',
'ppc_loopfilter_pwr9_16bpc.c',
'ppc_loopfilter_pwr9_8bpc.c',
'ppc_mc_pwr9_16bpc.c',
'ppc_mc_pwr9_8bpc.c',
]
SOURCES += [
'/media/libdav1d/src/src/ppc/cpu.c',
]
SOURCES += pwr9_sources
SOURCES += vsx_sources
for f in pwr9_sources:
SOURCES[f].flags += [
'-mcpu=power9',
]
for f in vsx_sources:
SOURCES[f].flags += [
'-maltivec',
'-mvsx',
]
LOCAL_INCLUDES += [
'/media/libdav1d/config',
'/media/libdav1d/src',
'/media/libdav1d/src/include',
'/media/libdav1d/src/include/dav1d',
]
FINAL_LIBRARY = 'gkmedias'
ALLOW_COMPILER_WARNINGS = True
if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
CFLAGS += [
'-Wno-sign-compare',
'-Wno-unused-function',
'-Wno-unused-parameter',
]

View file

@ -0,0 +1,3 @@
#define BITDEPTH 16
#define DAV1D_VSX 1
#include "../src/src/ppc/cdef_tmpl.c"

View file

@ -0,0 +1,3 @@
#define BITDEPTH 8
#define DAV1D_VSX 1
#include "../src/src/ppc/cdef_tmpl.c"

View file

@ -0,0 +1,3 @@
#define BITDEPTH 16
#define DAV1D_PWR9 1
#include "../src/src/ppc/itx_tmpl.c"

View file

@ -0,0 +1,3 @@
#define BITDEPTH 8
#define DAV1D_PWR9 1
#include "../src/src/ppc/itx_tmpl.c"

View file

@ -0,0 +1,3 @@
#define BITDEPTH 16
#define DAV1D_PWR9 1
#include "../src/src/ppc/loopfilter_tmpl.c"

View file

@ -0,0 +1,3 @@
#define BITDEPTH 8
#define DAV1D_PWR9 1
#include "../src/src/ppc/loopfilter_tmpl.c"

View file

@ -0,0 +1,3 @@
#define BITDEPTH 16
#define DAV1D_VSX 1
#include "../src/src/ppc/looprestoration_tmpl.c"

View file

@ -0,0 +1,3 @@
#define BITDEPTH 8
#define DAV1D_VSX 1
#include "../src/src/ppc/looprestoration_tmpl.c"

View file

@ -0,0 +1,3 @@
#define BITDEPTH 16
#define DAV1D_PWR9 1
#include "../src/src/ppc/mc_tmpl.c"

View file

@ -0,0 +1,3 @@
#define BITDEPTH 8
#define DAV1D_PWR9 1
#include "../src/src/ppc/mc_tmpl.c"