Ignite/utilities/filmgrain/isotable_test.go
DataHoarder c533ad4386
Some checks failed
continuous-integration/drone/push Build is failing
Added ISO Noise table generator for libaom
2023-11-03 18:52:15 +01:00

29 lines
528 B
Go

package filmgrain
import (
"bytes"
"testing"
)
const testGrainTable = `filmgrn1
E 0 9223372036854775807 1 7391 1
p 0 6 0 8 0 1 0 0 0 0 0 0
sY 14 0 17 20 4 39 3 59 3 78 2 98 2 118 2 137 3 157 3 177 3 196 3 216 3 235 4 255 4
sCb 0
sCr 0
cY
cCb 0
cCr 0
`
func TestCreatePhotonNoiseTable(t *testing.T) {
table, err := CreatePhotonNoiseTable(1280, 720, 400, GetTransferFunction("bt470bg"))
if err != nil {
t.Fatal(err)
}
if bytes.Compare(table, []byte(testGrainTable)) != 0 {
t.Fatal("table is different")
}
}