Add a bicubic filter.
Reorder these loops because I think we get a cache win if we write the entire ring buffer entry at once.
When downsampling start the buffer loop at -filter_texel_margin to make sure that all contributors get their taps in at the ring buffer.