Mercurial > hg > ishara
annotate sinks/@sink/or.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
parents | 672052bd81f8 |
children |
rev | line source |
---|---|
samer@0 | 1 % or - parallel sink combinator |
samer@0 | 2 function s=or(s1,s2), |
samer@0 | 3 c1=1:channels(s1); |
samer@0 | 4 c2=channels(s1) + (1:channels(s2)); |
samer@0 | 5 s=sinkbinop(@vertsplit,@plus,s1,s2); |
samer@0 | 6 function [y1,y2]=vertsplit(x) |
samer@0 | 7 y1=x(c1,:); |
samer@0 | 8 y2=x(c2,:); |
samer@0 | 9 end |
samer@0 | 10 end |
samer@0 | 11 |