So using a table-based approach to find the nearest color now, using only the upper 6 bits to stop the table from getting too large. It still takes noticeable time to build it. :/ But as a result, the video actually looks okay now... svn-id: r35298