aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorSteffen Matthischke2014-03-05 02:08:18 +0100
committerMike McQuaid2014-03-05 09:50:11 +0000
commit9858bfec4c26486f213203b92068f2b73b8311f4 (patch)
treeeb6e9464ab47887a728e9144014f442c78551c02 /Library
parent0c5da90372854bbfb46ea7aacb56add365cee5c7 (diff)
downloadhomebrew-9858bfec4c26486f213203b92068f2b73b8311f4.tar.bz2
x265 0.8:
update to 0.8 add test add 16-bit option Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/x265.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/Library/Formula/x265.rb b/Library/Formula/x265.rb
index f257da2ed..bae575774 100644
--- a/Library/Formula/x265.rb
+++ b/Library/Formula/x265.rb
@@ -2,8 +2,8 @@ require 'formula'
class X265 < Formula
homepage 'http://x265.org'
- url 'https://bitbucket.org/multicoreware/x265/get/0.7.tar.bz2'
- sha1 'c9bec77b86ba131211c7901542228c3d52abe065'
+ url 'https://bitbucket.org/multicoreware/x265/get/0.8.tar.bz2'
+ sha1 '79c60b3fe528e7b91b799b85e971885c1b040b6e'
head 'https://bitbucket.org/multicoreware/x265', :using => :hg
@@ -11,13 +11,27 @@ class X265 < Formula
depends_on 'cmake' => :build
depends_on :macos => :lion
+ option '16-bit', 'Build a 16-bit x265 (default: 8-bit)'
+
def install
args = std_cmake_args
args.delete '-DCMAKE_BUILD_TYPE=None'
args << '-DCMAKE_BUILD_TYPE=Release'
+ args << '-DHIGH_BIT_DEPTH=ON' if build.include? '16-bit'
system "cmake", "source", *args
system "make", "install"
end
+
+ test do
+ yuv_path = testpath/"raw.yuv"
+ x265_path = testpath/"x265.265"
+ File.open(yuv_path, 'wb') do |f|
+ (1..3200).each do f.write("\xCO\xFF\xEE") end
+ end
+ system "#{bin}/x265 --input-res 80x80 --fps 1 #{yuv_path} #{x265_path}"
+ header = 'AAAAAUABDAH//wFgAAADAIAAAAMAAAMAHpXA'
+ assert_equal header.unpack("m"), [x265_path.read(27)]
+ end
end