Documentation
¶
Index ¶
- Constants
- func DefaultSearchRoots() []string
- func EnsureLibopus(version string, roots []string) bool
- func EnsureLibopusCustom(version string, roots []string) bool
- func EnsureLibopusCustomScalar(version string, roots []string) bool
- func EnsureLibopusFixed(version string, roots []string) bool
- func EnsureLibopusQEXT(version string, roots []string) bool
- func EnsureLibopusSIMD(version string, roots []string) bool
- func EnsureLibopusScalar(version string, roots []string) bool
- func FindCCompiler() (string, error)
- func FindOpusCompare(version string, roots []string) (string, bool)
- func FindOpusDemo(version string, roots []string) (string, bool)
- func FindOrEnsureOpusCompare(version string, roots []string) (string, bool)
- func FindOrEnsureOpusDemo(version string, roots []string) (string, bool)
- func FindOrEnsureQEXTOpusDemo(version string, roots []string) (string, bool)
- func FindQEXTOpusDemo(version string, roots []string) (string, bool)
- func OSCEScalarDNNBuildEnv() ([]string, error)
- func OSCEScalarDNNBuildIsCurrent(buildDir string) bool
- func OpusToolScalarRequested() bool
- func ResetOSCEScalarDNNBuildIfStale(buildDir string) error
- func ResetScalarDNNBuildIfStale(buildDir string) error
- func ScalarDNNBuildEnv() ([]string, error)
- func ScalarDNNBuildIsCurrent(buildDir string) bool
- func WriteOSCEScalarDNNBuildStamp(buildDir string) error
- func WriteScalarDNNBuildStamp(buildDir string) error
- type LibopusBuildProvenance
Constants ¶
const ( // DefaultVersion is the pinned libopus reference used by fixture tooling. DefaultVersion = "1.6.1" // ScalarDNNBuildCFLAGS keeps x86 libopus helper builds on the generic DNN // path. --disable-intrinsics disables libopus RTCD feature selection, but // x86 compilers still predefine __SSE2__, which makes dnn/vec.h include // vec_avx.h unless the helper build explicitly undefines those macros. ScalarDNNBuildCFLAGS = "" /* 127-byte string literal not displayed */ // OSCEScalarDNNBuildCFLAGS keeps OSCE BWE/LACE reference helpers on the // generic DNN path even on ARM, where dnn/vec.h checks compiler NEON macros // directly. OSCEScalarDNNBuildCFLAGS = "" /* 170-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func DefaultSearchRoots ¶
func DefaultSearchRoots() []string
DefaultSearchRoots covers common invocation locations: repository root, package subdirs (e.g. testvectors), and deeper test runs.
func EnsureLibopus ¶
EnsureLibopus invokes tools/ensure_libopus.sh from the first matching root.
func EnsureLibopusCustom ¶
EnsureLibopusCustom invokes tools/ensure_libopus.sh with ENABLE_CUSTOM enabled (libopus configured with --enable-custom-modes, defining CUSTOM_MODES and the Opus Custom API) from the first matching root.
func EnsureLibopusCustomScalar ¶
EnsureLibopusCustomScalar invokes tools/ensure_libopus.sh with ENABLE_CUSTOM_SCALAR enabled (--enable-custom-modes on the scalar generic-C kernels) from the first matching root. This is the bit-reproducible Opus Custom oracle for the pure-Go celt/custom parity gate.
func EnsureLibopusFixed ¶
EnsureLibopusFixed invokes tools/ensure_libopus.sh with ENABLE_FIXED enabled (libopus configured with --enable-fixed-point) from the first matching root.
func EnsureLibopusQEXT ¶
EnsureLibopusQEXT invokes tools/ensure_libopus.sh with ENABLE_QEXT enabled from the first matching root.
func EnsureLibopusSIMD ¶
EnsureLibopusSIMD invokes tools/ensure_libopus.sh with ENABLE_SIMD enabled (libopus configured with its native --enable-rtcd --enable-intrinsics, so config.h DEFINES the platform SIMD macros) from the first matching root. This is the PERFORMANCE reference only — it is not bit-reproducible and must not be used as a parity oracle.
func EnsureLibopusScalar ¶
EnsureLibopusScalar invokes tools/ensure_libopus.sh with ENABLE_SCALAR enabled (libopus configured with --disable-asm --disable-rtcd --disable-intrinsics, so config.h leaves the platform SIMD macros undefined) from the first matching root. This is the bit-reproducible parity reference for the pure-Go gopus build.
func FindCCompiler ¶
FindCCompiler returns a GCC/Clang-style C compiler suitable for helper builds.
func FindOpusCompare ¶
FindOpusCompare returns the first executable opus_compare found under tmp_check.
func FindOpusDemo ¶
FindOpusDemo returns the first executable opus_demo found under tmp_check.
func FindOrEnsureOpusCompare ¶
FindOrEnsureOpusCompare validates the pinned libopus build, then locates opus_compare.
func FindOrEnsureOpusDemo ¶
FindOrEnsureOpusDemo validates the pinned libopus build, then locates opus_demo. The validation step matters for fixture generation: an existing executable can be from a stale host/compiler build even when it is runnable.
func FindOrEnsureQEXTOpusDemo ¶
FindOrEnsureQEXTOpusDemo tries to locate a QEXT-enabled opus_demo and validates the separate QEXT build first.
func FindQEXTOpusDemo ¶
FindQEXTOpusDemo returns the first executable QEXT-enabled opus_demo build found under tmp_check.
func OSCEScalarDNNBuildEnv ¶
OSCEScalarDNNBuildEnv returns a controlled environment for OSCE reference helper builds.
func OSCEScalarDNNBuildIsCurrent ¶
OSCEScalarDNNBuildIsCurrent reports whether buildDir was produced with the current OSCE-enabled scalar-DNN helper contract.
func OpusToolScalarRequested ¶
func OpusToolScalarRequested() bool
OpusToolScalarRequested reports whether the libopus reference tools (opus_demo / opus_compare) must be the scalar (generic-C, no SIMD/RTCD/intrinsics) build. The pure-Go (-tags purego) gopus build and the celt/custom parity gate set GOPUS_LIBOPUS_REF_SCALAR=1 so opus_demo-driven byte/quality comparisons use the bit-reproducible scalar tree instead of the default tree (which autotools-enables SIMD on amd64 and Linux arm64).
func ResetOSCEScalarDNNBuildIfStale ¶
ResetOSCEScalarDNNBuildIfStale removes buildDir when it was produced before the current OSCE-enabled scalar-DNN helper contract.
func ResetScalarDNNBuildIfStale ¶
ResetScalarDNNBuildIfStale removes buildDir when it was produced before the current scalar-DNN helper contract. This avoids silently reusing x86-vector DNN reference oracles from older local or CI caches.
func ScalarDNNBuildEnv ¶
ScalarDNNBuildEnv returns a controlled environment for libopus helper builds.
func ScalarDNNBuildIsCurrent ¶
ScalarDNNBuildIsCurrent reports whether buildDir was produced with the current scalar-DNN helper contract.
func WriteOSCEScalarDNNBuildStamp ¶
WriteOSCEScalarDNNBuildStamp records that buildDir satisfies the current OSCE-enabled scalar-DNN helper contract.
func WriteScalarDNNBuildStamp ¶
WriteScalarDNNBuildStamp records that buildDir satisfies the current scalar-DNN helper contract.
Types ¶
type LibopusBuildProvenance ¶
type LibopusBuildProvenance struct {
GOOS string `json:"goos"`
GOARCH string `json:"goarch"`
LibopusVersion string `json:"libopus_version"`
QEXT string `json:"qext"`
HostOS string `json:"host_os"`
HostArch string `json:"host_arch"`
HostBits string `json:"host_bits"`
CC string `json:"cc"`
CCPath string `json:"cc_path"`
CCTarget string `json:"cc_target"`
CCVersion string `json:"cc_version"`
Configure string `json:"configure"`
CFLAGS string `json:"cflags"`
CPPFLAGS string `json:"cppflags"`
LDFLAGS string `json:"ldflags"`
LibopusBuildStampSHA256 string `json:"libopus_build_stamp_sha256"`
}
LibopusBuildProvenance captures the native helper build that produced a generated libopus fixture.
func LibopusBuildProvenanceForTool ¶
func LibopusBuildProvenanceForTool(toolPath string) (LibopusBuildProvenance, bool)
LibopusBuildProvenanceForTool returns provenance for a tool produced by tools/ensure_libopus.sh. The returned digest is over the exact stamp file bytes so fixture metadata changes whenever the validated native helper build changes.