When a stream is encoded, the filter strength can be selected, or the filter can be switched off entirely. Otherwise, the filter strength is determined by coding modes of adjacent blocks, quantization step size, and the steepness of the luminance gradient between blocks.
During encoding, the filter strength can either be chosen or disabled. Otherwise, the filter strength is determined by coding modes in adjacent blocks, quantization settings, and the slope of the luminance gradient across blocks.