Skip to content
  • Rupert Swarbrick's avatar
    ext-partition-types: Don't allow 4:1 blocks to use palettes · 6f9cd946
    Rupert Swarbrick authored
    Since there are no CDFs set up for palettes for 4:1/1:4 blocks, we
    should make sure we don't try to use them. Without this patch,
    write_palette_mode_info gets called with a bsize of BLOCK_32X8 and
    reads (and writes) off the end of the palette_y_size_cdf array.
    
    This patch avoids calling it in this context and adds an assertion to
    make sure we don't read off the end of the array in future.
    
    The patch also adds the corresponding logic to rdopt.c.
    
    Change-Id: I4d9aea982d057e305a6b578f35457eada819d38f
    6f9cd946