• Urvang Joshi's avatar
    Palette: Special case for 2 unique colors. · 773e3542
    Urvang Joshi authored
    When a block only contains 2 unique colors, there's no need to run
    K-means, as 'lb' and 'ub' can directly be used as the centroids.
    
    Two benefits:
    1. Encoding will be faster for this special case, and
    2. Can potentially avoid sub-optimal/duplicate centroids generation
    (due to integer rounding) when 'ub' and 'lb' values are very close.
    
    Change-Id: Ice04fc8577e3cc8c74f87d623a16ac8de3257cdd
    773e3542
rdopt.c 462 KB