Nov 09 2013

Colorspaces and VLC

Category: Overmix,Programs,SoftwareSpiller @ 21:23

There are two colorspaces commonly used in video today, which are defined in Rec. 601 and Rec. 709 respectively. Simply speaking, Rec. 601 is mainly used for analog sources, while Rec. 709 mainly is for HD TV and BD.

So how do VLC handle this? It assumes everything is Rec. 601 and you get something like this:

The bottom left is from a DVD and the top right is from the BD release. In comparison, here is how it looks in Overmix, using Rec. 601 for the DVD release and Rec. 709 for the BD release:

VLC also seems to ignore the gamma difference between Rec. 601/709 and sRGB, and it handles 10 bit content in a way that reduces color accuracy to worse than 8 bits sources. Behold, the histogram from a Hi10p source:

Free stuff might be nice, but this is what you get…

EDIT: I messed up the studio-swing removal in Overmix (which is now fixed), so the colors were slightly off. It was consistent between rec.601/709 so the comparison still holds. Overmix might be nice, but this is what you get…

Tags: , , ,

Nov 06 2011

RICcreator – October update

Category: Lego,Mindstorms,RICcreator,SoftwareSpiller @ 00:34

Focus this time has been mostly on sprite creation/editing, with a few nice additions.

Polygon enhancements

The last missing piece in the drawing routine was fill_shape in PolyOut(), which has now been implemented. Here is an example:

Originally I planned on just using the code from the firmware however when I did so I noticed that the polygons didn’t look quite as good as I expected. The code which the firmware implementation was based on was both poorly implemented and flawed, so both the firmware and RICcreator ended up having the same issues.

So I spend some time on fixing up on those issues and modifying the algorithm to fix the flaws. This also means that the output isn’t exactly as on the NXT until is fixed there. I will write a full post about this later, when I’m done fixing a XOR issue with unfilled polygons which is also apparent in the firmware.

Sprite Editor

Sprites are no longer created at 100×64, you start out with an empty sprite like in nxtRICedit now. It is a minor thing but still rather important anyway.

I have also fixed up the scrollbars a bit. Still not perfect, but a lot better than before. A reset button has also been added in the corner.

Image importing

I have added a third way to convert images to 2 colors, Floyd–Steinberg dithering. While dithering in most cases look quite neat, it is not that useful when used on the NXT screen. The resolution is simply too small in most cases, making it difficult to see what it actually is. It does work well on some images occasionally, so experiment!

Dithering, Global thresholding and Adaptive  thresholding now also takes gamma in account. Almost every image on the web is encoded in sRGB which defines power of a RGB value. 0 means black, 255 means  completely white. The value for 50% black, 50% white however is ~187 and not 127. I might write a full post about this later.

Another enhancement is that adaptive thresholding have been greatly optimized. Actually, I just cache some results, however this meant that the complexity was reduced from O( n^2 ) to O( 2n ) where n is the size parameter. Before a size of 30 would be quite slow, now you can use 99 without even notice any slowdown.


Please delete any settings.xml files from previous versions.

Revision 154 win32: RICcreator rev. 154 –

Revision 153 source: RICcreator rev. 153 –

The source version also includes test and example .ric files. (The reason it is one revision older is that I forgot to add some .dll´s in the Windows build which takes care of image loading.)

Tags: , , , , , , ,