I'm getting there, don't give up on me. Now 'limit_upscaled' become the variable used in filter_frame() and 'limit' is never change, unless by user We only have to update 'limit_upscaled' if 'limit' really changes.