How to accelerate copying a matrixset to a textureset?
Hi, I need to transfer a jit.matrixset with 315 HD images to a jit.gl.textureset, but I must be doing something wrong here, since loading the matrixset from jxf takes only 3512 ms CPU time, but the copy to the textureset takes 10015 ms !!!!
Can I better prepare the textureset or the matrixset to speed up copying?
(the matrixset is 3 plane rgb for saving space; I don't need transparency in the textures, only while compositing layers. I stumbled over mentions of uyvy being faster than argb. Is this relevant here?)
Do I need to do the copy asynchronously (loading does lock up the graphics for ~15s)?
Is there a way to load a jxf from disk into the textureset directly?
I'm still on Intel MBP 13" with Intel Iris Plus Graphics 655 with only 1536 MB VRAM. I understand that this problem is completely moot with AppleSilicon's unified memory, but my M3 is only arriving after the next gig... =-(
Sorry for my incomplete background knowledge on graphics and OpenGL, always willing to learn!
Cheers!
Here's a possibly silly suggestion: export your images to a single movie file (e.g. using ffmpeg), then use jit.movie @engine viddll @output_texture 1 @cache_size 10 (or whatever amount of memory makes sense for your setup and content). Then utilize the loadram message to load the movie into memory, which should happen in a background thread, and should then give you similar functionality as textureset.
Wow, not silly at all, rather genius, Rob! Loading takes now ~50ms, and decoding seems to be of the same speed, plus the mjpeg movies take much less space (80%) than the (uncompressed) jxfs.
To get this 100%:
is jit.movie's (viddll) mjpeg decoding hardware-accelerated?
what are the best settings to be sure jit.movie does nothing else than giving me
true_frame $1, bang:autostart0 or 1,automatic0 or 1?
Cheers!
How do you copy it?
Recently work with something similar.
Now I can avoid the copy by using jit.movie, but before, I naively used uzi and outputmatrix from the matrixset. That would take ~30 ms per HD matrix, which is clearly too long. I suspect that with a proper one-time pre-allocation of the whole VRAM needed for the textures (but how?) this ought to be faster.
@autostart 0 @automatic 0 @unique 1
Hi all, thanks again for your input which made this performance possible. That was on a 2019 Intel MBP 16GB in HD. Now I'm on M3pro 36GB but have to render in 5k square.
I've moved to jit.gl.polymovie with viddll, and wonder with which codec to prepare the videos.
So far I've used mjpeg ( yuvj420p(pc, bt470bg progressive), 5456x3064, 533528 kb/s).
However, on M3, I reckon h264 decoding is hardware-accelerated. Can this be of an advantage for the random acces via true_frame (maybe forcing every frame to be keyframe)?
Before I start testing, does anyone have insights on this? Cheers!