aboutsummaryrefslogtreecommitdiff
path: root/externals/gridflow/extra/smpte.rb
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2008-04-28 18:10:15 +0000
committerN.N. <matju@users.sourceforge.net>2008-04-28 18:10:15 +0000
commit91c0003b158e5f0ed9d0677fb136ae8bb6f86ec5 (patch)
treed413a48086819f6a2620cd27d030861d122d4f3f /externals/gridflow/extra/smpte.rb
parent98dfdfa2fc1c92ba69e33fd77ed3392034297c1f (diff)
this is an old gridflow, and there's already a svn repository at http://gridflow.ca/svn/trunk
svn path=/trunk/; revision=9739
Diffstat (limited to 'externals/gridflow/extra/smpte.rb')
-rw-r--r--externals/gridflow/extra/smpte.rb23
1 files changed, 0 insertions, 23 deletions
diff --git a/externals/gridflow/extra/smpte.rb b/externals/gridflow/extra/smpte.rb
deleted file mode 100644
index 6b568de2..00000000
--- a/externals/gridflow/extra/smpte.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 2001 by Mathieu Bouchard
-# $Id: smpte.rb,v 1.2 2006-03-15 04:40:47 matju Exp $
-
-# The standard SMPTE color test pattern.
-# AS SEEN ON TV !!! (but this is a cheap plastic imitation)
-
-def make_smpte(picture="")
- row_1 = ""
- row_2 = ""
- row_3 = ""
- row_3_c = [[0,63,105],[255,255,255],[64,0,119]]
- (0...320).each {|x|
- n_barre_1 = 7 - x*7/320
- n_barre_2 = if n_barre_1&1==0 then 0 else 8 - n_barre_1 end
- row_1 << yield (*([1,2,0].map{|c| 255 * ((n_barre_1 >> c)&1) }))
- row_2 << yield (*([1,2,0].map{|c| 255 * ((n_barre_2 >> c)&1) }))
- row_3 << yield (*(row_3_c[x/57] || [0,0,0]))
- }
- 160.times { picture << row_1 }
- 20 .times { picture << row_2 }
- 60 .times { picture << row_3 }
- picture
-end