55 lines
2.1 KiB
Ruby
55 lines
2.1 KiB
Ruby
class Aom < Formula
|
|
desc "Codec library for encoding and decoding AV1 video streams"
|
|
homepage "https://aomedia.googlesource.com/aom"
|
|
url "https://aomedia.googlesource.com/aom.git",
|
|
tag: "v3.0.0",
|
|
revision: "d853caa2ab62d161e5edf344ffee7b597449dc0d"
|
|
license "BSD-2-Clause"
|
|
|
|
bottle do
|
|
sha256 arm64_big_sur: "ff94fb5247d3d491e28f24e409d67d5e4470f3bc10c628470fae47c830ddfc86"
|
|
sha256 big_sur: "85f1f42ca7c5403d950f81f6612760beea461c9a639f3c1680e6c16c08a1bbba"
|
|
sha256 catalina: "116f4bd589fbf453238000e9b6f9adf9d8ea7ecf098ad773a656c39774f46bb9"
|
|
sha256 mojave: "2eee8e14e36a112a7ebf1fe104fd69135e2e62b0540486093be274b395d7f589"
|
|
end
|
|
|
|
depends_on "cmake" => :build
|
|
depends_on "yasm" => :build
|
|
|
|
resource "bus_qcif_15fps.y4m" do
|
|
url "https://media.xiph.org/video/derf/y4m/bus_qcif_15fps.y4m"
|
|
sha256 "868fc3446d37d0c6959a48b68906486bd64788b2e795f0e29613cbb1fa73480e"
|
|
end
|
|
|
|
def install
|
|
mkdir "macbuild" do
|
|
args = std_cmake_args.concat(["-DCMAKE_INSTALL_RPATH=#{lib}",
|
|
"-DENABLE_DOCS=off",
|
|
"-DENABLE_EXAMPLES=on",
|
|
"-DENABLE_TESTDATA=off",
|
|
"-DENABLE_TESTS=off",
|
|
"-DENABLE_TOOLS=off",
|
|
"-DBUILD_SHARED_LIBS=on"])
|
|
# Runtime CPU detection is not currently enabled for ARM on macOS.
|
|
args << "-DCONFIG_RUNTIME_CPU_DETECT=0" if Hardware::CPU.arm?
|
|
system "cmake", "..", *args
|
|
|
|
system "make", "install"
|
|
end
|
|
end
|
|
|
|
test do
|
|
resource("bus_qcif_15fps.y4m").stage do
|
|
system "#{bin}/aomenc", "--webm",
|
|
"--tile-columns=2",
|
|
"--tile-rows=2",
|
|
"--cpu-used=8",
|
|
"--output=bus_qcif_15fps.webm",
|
|
"bus_qcif_15fps.y4m"
|
|
|
|
system "#{bin}/aomdec", "--output=bus_qcif_15fps_decode.y4m",
|
|
"bus_qcif_15fps.webm"
|
|
end
|
|
end
|
|
end
|