I just read this very interresting article on Sgt. Conker on HLSL (High Level Shader Language). It’s a beginner article, but it explains very well how shaders work, and how they came to be! I can strongly recommend this article to people new to XNA and/or shaders!
Sorry… I can’t show you the mosaic since it contains 100% private pictures. Maybe I’ll go download a couple of hundred pictures from Flickr and show you! I just don’t have the time right now.
Anyways, I quickly spottet a small “error” with my algorithm. Lets say you have a source image of a clear sky. After you divide the image into a grid, and scan the cells, it’s more than likely that the average color of all the cells will be the same.
First approach is to index all my photos (20.000+) to determine image resolution and average color value.
Before the average color value is calculated, the image is re sized to a width of about 50 pixels. Aspect ratio is maintained. This will improve scanning speed, as fewer pixels will be scanned, and also improve color correctness as only the visible pixels will be calculated. Once this process is done, the image is stored in a SQL Compact server database (filename, width, height, colorvalue).
I have been exploring the world of photo mosaics (see Wikipedia article), and it’s quite fascinating!
Well… it seems I ran into the classic SetData() problem on the XBox 360. It really is THAT slow! So my new improvements (multithreading) didn’t do anything for the XBox. I then changed the code to create the frames on a seperate thread, and THAT improved performance. Now I’m up to about 42 FPS (max) … Read More “MPEG Decoding update” »
Just got my XBox 360 back from repairs and it purs like a kitten 🙂 Motherboard and DVD drive was replaced so I’m ready to continue decoding MPEG streams and the like. I will (hopefully) return with an update on the framerate issue later. I’m hoping the new otimizations pays off.
Multithreading the MPEG decoding process, I’ve managed to increase the performance of the decoder by ~28.71%. I’m hoping to squeeze another 2-3% out of the decoder on the cost of more memory consumption. [ad name=”Google Adsense-1″] On another note, just got word from the Microsoft repair center that my XBox 360 already is on it’s … Read More “Multithreading” »
Since XNA does not have a video loader/decoder of it’s own, and we can not use Windows to load the video, we have to roll our own decoder.
Instead of saving all the frames in an AVI stream as single images, and then import them one at a time into XNA during runtime, why not simply use a “simple” compression format?