Skip to content
  • Rupert Swarbrick's avatar
    Fix tile height/width calculation · 9a3640d8
    Rupert Swarbrick authored
    In the bitstream in bug 709, the frame has a width of 13318 mi
    units. This rounds up to 13328 mi units (when rounding to a whole
    number of max superblocks) but then the shift right by log2_tile_cols
    gives floor(13328/32) = floor(416.5) = 416. Of course 32*416 = 13312
    which is less than 13318.
    
    This patch moves the <mi_cols, log2_tile_cols> -> tile_width
    calculation (and the equivalent calculation for tile_height) into a
    common function which gets the rounding right.
    
    BUG=aomedia:709
    
    Change-Id: If5e8e6b7a3c6f3d336cda9edd94a17595eaf5406
    9a3640d8