graphics: image bayer dithering; movie test using image decoding of tsvm's gpu

This commit is contained in:
minjaesong
2022-04-12 10:57:33 +09:00
parent 4ec8692e04
commit 41761289d3
6 changed files with 148 additions and 8 deletions

View File

@@ -20,7 +20,7 @@ println(`dim: ${imgw}x${imgh}`)
println(`converting to displayable format...`)
// convert colour
graphics.imageToDisplayableFormat(imageData, -1048577, imgw, imgh, 4, true)
graphics.imageToDisplayableFormat(imageData, -1048577, imgw, imgh, 4, 2)
sys.free(imageData)
sys.free(infile)

20
assets/disk0/movtest.js Normal file
View File

@@ -0,0 +1,20 @@
let infile = sys.malloc(752704)
let imagearea = sys.malloc(560*448*3)
con.clear()
for (let f = 1; f <= 52; f++) {
let fname = `/movtestimg/${(''+f).padStart(3,'0')}.jpg`
filesystem.open("A", fname, "R")
let fileLen = filesystem.getFileLen("A")
dma.comToRam(0, 0, infile, fileLen)
graphics.decodeImageTo(infile, fileLen, imagearea)
graphics.imageToDisplayableFormat(imagearea, -1048577, 560, 448, 3, 2)
}
sys.free(imagearea)
sys.free(infile)

Binary file not shown.