• Rupert Swarbrick's avatar
    Move loop restoration coefficients to within the frame · 6c545216
    Rupert Swarbrick authored
    Rather than encoding the loop restoration coefficients at the start of
    the frame header, this patch moves them to occur just after certain
    top-level superblocks.
    
    You might hope that we could just encode coefficients on top-level
    superblocks where the top-left corner of the superblock was also the
    top-left corner of the loop restoration tile. Unfortunately, this
    can't work with the superres experiment, where the loop restoration
    tiles don't necessarily line up with the superblocks. Indeed, in
    general there can be multiple different loop restoration coefficients
    that apply in a given top-level superblock. This patch defines a
    function, av1_loop_restoration_corners_in_sb, which yields the
    rectangle [rrow0, rrow1) x [rcol0, rcol1) of loop restoration tiles
    whose top left corners lie in this top-level superblock.
    
    The total file size should be unchanged by this patch: the bits have
    just been moved from the frame header and spread out among the rest of
    the frame.
    
    Change-Id: Icf43b0560964a63dea0d2cd801313f04139188d7
    6c545216
bitstream.c 177 KB