-
Rupert Swarbrick authored
This refactors the iteration in restoration.c so that all the scary stuff lies in a pair of general functions, filter_frame and filter_rest_unit. filter_frame is currently very simple, iterating over the restoration units in the frame. Once we've made it so that restoration units don't span tile boundaries, this function is the one we'll need to update to iterate over tiles and then restoration units within the tile. filter_rest_unit replaces the outer loop of the loop_*_filter_tile* functions. It deals with chopping the restoration unit into stripes of height procunit_height. When CONFIG_STRIPED_LOOP_RESTORATION is true, it also deals with calling setup_processing_stripe_boundary and restore_processing_stripe_boundary to use boundary data from the deblocked output. Some of the ugly #if/#endif blocks have been elided in the wiener filter code (both low and high bit depth), by defining a convolve alias based on USE_WIENER_HIGH_INTERMEDIATE_PRECISION. There are also changes to extend const-ness for the source frame. I've adopted the convention that the frame input is called "data" (as it was before) while it's non-const. This is true as far as filter_rest_unit. Then each "process one stripe" function takes a const pointer to the source frame, at which point it's called "src". The intention is that, once filter_rest_unit no longer needs a RestorationInternal pointer, this function can be exposed in restoration.h and can be used by pickrst.c Change-Id: I18043a172ef0ca1154d87cf7f63e3a80944627cd
d3d0615e