Skip to content

Commit

Permalink
uvg266 0.8.1
Browse files Browse the repository at this point in the history
autobump: add uvg266

Signed-off-by: Rui Chen <[email protected]>

uvg266: remove build patch and update build/test

Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Jul 1, 2024
1 parent eec0f30 commit db92fc3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2523,6 +2523,7 @@ uutils-diffutils
uutils-findutils
uuu
uv
uvg266
uvicorn
uwsgi
v2ray
Expand Down
33 changes: 10 additions & 23 deletions Formula/u/uvg266.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
class Uvg266 < Formula
desc "Open-source VVC/H.266 encoder"
homepage "https://github.com/ultravideo/uvg266"
url "https://github.com/ultravideo/uvg266/archive/refs/tags/v0.8.1.tar.gz"
sha256 "9a2c68f94a1105058d1e654191036423d0a0fcf33b7e790dd63801997540b6ec"
license "BSD-3-Clause"
head "https://github.com/ultravideo/uvg266.git", branch: "master"

stable do
url "https://github.com/ultravideo/uvg266/archive/refs/tags/v0.8.0.tar.gz"
sha256 "27e4306577fe646951bd3c12685c1527b41385bfcb95262233669fc7f44f21bd"

# Fix attempts to build AVX2 code on arm64 - remove on next release
patch do
url "https://github.com/ultravideo/uvg266/commit/e5e32d67f43ba73db4a1a17aa975a070f15496be.patch?full_index=1"
sha256 "2b2e0938eeab7ea9900ec2f40e09debdcd908e13fffb44f66556baa904edaeff"
end
end

bottle do
sha256 cellar: :any, arm64_sonoma: "b3f0dcbb7047b2982860c57b4b9d94da3b69ee513c6587be4dd95fbc223ab94f"
sha256 cellar: :any, arm64_ventura: "fe2dc71d9b62684ff83a8de3fbd7ba21e491670d24a825a4eb19f05ac4df3d21"
Expand All @@ -27,24 +18,20 @@ class Uvg266 < Formula

depends_on "cmake" => :build

resource "homebrew-videosample" do
url "https://samples.mplayerhq.hu/V-codecs/lm20.avi"
sha256 "a0ab512c66d276fd3932aacdd6073f9734c7e246c8747c48bf5d9dd34ac8b392"
end

def install
args = std_cmake_args + %W[-DCMAKE_INSTALL_RPATH=#{rpath}]

system "cmake", "-S", ".", "-B", "build", *args
system "cmake", "-S", ".", "-B", "build", "-DCMAKE_INSTALL_RPATH=#{rpath}", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

test do
# download small sample and try to encode it
resource("homebrew-videosample").stage do
system bin/"uvg266", "-i", "lm20.avi", "--input-res", "16x16", "-o", "lm20.vvc"
assert_predicate Pathname.pwd/"lm20.vvc", :exist?
resource "homebrew-videosample" do
url "https://samples.mplayerhq.hu/V-codecs/lm20.avi"
sha256 "a0ab512c66d276fd3932aacdd6073f9734c7e246c8747c48bf5d9dd34ac8b392"
end
testpath.install resource("homebrew-videosample")

system bin/"uvg266", "-i", "lm20.avi", "--input-res", "16x16", "-o", "lm20.vvc"
assert_predicate testpath/"lm20.vvc", :exist?
end
end

0 comments on commit db92fc3

Please sign in to comment.