shithub: h264bsd

Download patch

ref: ca1868c93be4a7a8b500359310f4719ac10dab03
parent: bc5e6699e526937e436da06d57def9981a844c30
author: Sam Leitch <sam@luceva.net>
date: Sun Mar 9 15:22:28 EDT 2014

Added lower res test data. Added EMCC_FLAGS param to Rakefile.

--- a/js/Rakefile
+++ b/js/Rakefile
@@ -1,6 +1,7 @@
+EMCC_FLAGS = ENV["EMCC_FLAGS"] || "-O3"
 
 rule '.o' => ['.c'] do |t|
-  sh "emcc #{t.source} -c -O3 -D_ASSERT_USED -D_ERROR_PRINT -o #{t.name}"
+  sh "emcc #{t.source} -c #{EMCC_FLAGS} -D_ASSERT_USED -D_ERROR_PRINT -o #{t.name}"
 end
 
 o_files = FileList["../src/*.c"].gsub(/c$/, 'o')
@@ -21,7 +22,7 @@
 ]
 
 file "h264bsd_asm.js" => o_files do
-	sh "emcc #{o_files.join(' ')} -s TOTAL_MEMORY=268435456 -s EXPORTED_FUNCTIONS='[\"#{export_functions.join('", "')}\"]' -O3 -o h264bsd_asm.js"
+	sh "emcc #{o_files.join(' ')} -s TOTAL_MEMORY=268435456 -s EXPORTED_FUNCTIONS='[\"#{export_functions.join('", "')}\"]' #{EMCC_FLAGS} -o h264bsd_asm.js"
 end
 
 task :clean do
--- a/test/Rakefile
+++ b/test/Rakefile
@@ -2,7 +2,7 @@
 desc "Download raw test data"
 task :download_raw do
     (5208..5280).each do |filenum|
-        url = "http://media.xiph.org/BBB/BBB-1080-png/big_buck_bunny_0#{filenum}.png"
+        url = "http://media.xiph.org/BBB/BBB-360-png/big_buck_bunny_0#{filenum}.png"
         puts "Grabbing #{url}"
         system("curl -O #{url}")
     end
binary files /dev/null b/test/test_1920x1080.h264 differ
binary files /dev/null b/test/test_640x360.h264 differ
binary files a/test/test_data.h264 /dev/null differ