Otok public index

apotocki/dav1d

apotocki/dav1d 1.5.4 (r1, windows)

Library
dav1d
Variant
windows, target windows
Channel
stable
Published
2026-11-07
Recipe source
https://github.com/otok-dev/recipes.git
32756a87cf5bd189ca4c9825159bf0713ea8cf5e in recipes/dav1d/1.5/windows/
Recipe SHA-256
0c66fb369f76fac1934da6029fbe9806a7de080f4cd895cc16786ff99a84ed6e

Recipe files changed

Inputs

source.sha256686616b7c69eb88d44459391ab25cac13b6647a3b288835c5784e71c1514a5c5
source.urlhttps://downloads.videolan.org/pub/videolan/dav1d/1.5.4/dav1d-1.5.4.tar.xz
resource gas_preprocessor.sha2567124d70cdecba7c5612f9a71fbf3f28514dd9c2ca3022f58ad793f88bb925fcf
resource gas_preprocessor.urlhttps://raw.githubusercontent.com/FFmpeg/gas-preprocessor/ac1836309c2e77023c228b7184485597286289d3/gas-preprocessor.pl

Platforms

windows

Toolchains

Recipe files

build.lua 1579 bytes · raw
-- dav1d's meson build, the library only. otok builds are meson's "plain" build type
-- (build-lua-api.md 6.2), so trim_dsp, which follows the build type, follows the configuration here.
function build(slice, options, deps)
    local args = {}
    if slice.environment == "windows/msvc" and slice.arch == "arm64" then
        -- MSVC assembles arm64 with armasm64 through gas-preprocessor.pl, which meson.build finds as a program: a machine file
        -- of its own beside otok's names it, run by the perl of the recipe; a cross file when the build machine is not arm64
        local file = slice.build .. "/gas-preprocessor.ini"
        otok.write(file, "[binaries]\ngas-preprocessor.pl = ['" .. slice.toolchains.perl:gsub("\\", "/") .. "', '"
            .. slice.resources.gas_preprocessor:gsub("\\", "/") .. "']\n")
        local cross = slice.host:match("%-(.*)$") ~= slice.arch
        args[1] = (cross and "--cross-file=" or "--native-file=") .. file
    end
    otok.meson{ args = args, options = {
        enable_tools = false, enable_tests = false, enable_examples = false, enable_docs = false,
        trim_dsp = slice.configuration == "release",
    } }
    local p = slice.prefix
    -- meson names a static library libdav1d.a with MSVC too
    local lib = otok.glob("lib/dav1d.lib", p)[1] or otok.glob("lib/libdav1d.a", p)[1]
    local dll = otok.glob("bin/*dav1d*.dll", p)[1]
    if dll then return { libraries = { dav1d = { link = lib, runtime = dll } }, headers = p .. "/include" } end
    return { libraries = { dav1d = lib }, headers = p .. "/include" }
end
recipe.toml 1679 bytes · raw
# The otok recipe of dav1d (https://github.com/apotocki/otok): VideoLAN's AV1 decoder, built with meson
# (otok.meson), for Windows, with MSVC or with clang-cl across from Linux; static or dynamic.
[recipe]
api = 1
library = "dav1d"
name = "dav1d"
version = "1.5.4"
revision = 1
license = "BSD-2-Clause"
license-files = ["COPYING"]
homepage = "https://code.videolan.org/videolan/dav1d"
description = "dav1d, an AV1 decoder focused on speed and correctness."
keywords = ["av1", "video", "decoder"]
linkage = ["static", "dynamic"]

[source]
url = "https://downloads.videolan.org/pub/videolan/dav1d/1.5.4/dav1d-1.5.4.tar.xz"
sha256 = "686616b7c69eb88d44459391ab25cac13b6647a3b288835c5784e71c1514a5c5"

# FFmpeg's gas-preprocessor, through which dav1d's meson.build assembles its arm64 assembler with MSVC's armasm64
[[resource]]
name = "gas_preprocessor"
url = "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/ac1836309c2e77023c228b7184485597286289d3/gas-preprocessor.pl"
sha256 = "7124d70cdecba7c5612f9a71fbf3f28514dd9c2ca3022f58ad793f88bb925fcf"
unpack = false
when = { arch = ["arm64"], environment = ["windows/msvc"] }

[platforms]
supported = ["windows"]
build-on = ["windows/msvc", "linux/clang-cl"]

[toolchains]
meson = { version = ">= 1.2", default-recipe = "apotocki/meson" }
ninja = { version = ">= 1.10", default-recipe = "apotocki/ninja" }
nasm = { version = ">= 2.14", default-recipe = "apotocki/nasm", when = { arch = ["x86_64"] } }  # the assembly of x86_64
perl = { version = ">= 5.30", default-recipe = "apotocki/perl", when = { arch = ["arm64"], environment = ["windows/msvc"] } }  # gas-preprocessor's

[[product]]
name = "Dav1d"
libraries = ["dav1d"]