| synopsis || arguments || prev || next |
void set_min_slope_threshold( kdu_uint16 min_slope)
Java: void Set_min_slope_threshold( int min_slope)
[Declared in "../coresys/common/kdu_compressed.h"]
This function has no impact on input or interchange codestreams. When applied to an output codestream, the function has a similar effect to set_max_bytes, except that it supplies a limit on the distortion-length slope threshold which will be used by the rate control algorithm. This is most effective if the flush member function is to be called with a set of slope thresholds, instead of layer size specifications.
Although the intent is that min_slope should actually be the minimum distortion-length slope threshold which will be used to generate any quality layer, the block encoder must be somewhat conservative in determining a safe stopping point. For this reason, it will usually generate additional data, having distortion-length slopes smaller than the supplied bound. In particular, the current implementation of the block encoder produces 2 extra coding passes beyond the point where the supplied slope bound is passed. This data is not discarded until the final rate allocation step, so in some applications it may be safe to specify a fairly aggressive value for min_slope.
If set_max_bytes is used, the slope threshold information will be incrementally estimated from statistics of the compressed data as it appears.
If set_max_bytes and set_min_slope_threshold are both used together, the larger (most constraining) of the two thresholds will be used by the block encoder to minimize its coding efforts.
Unlike set_max_bytes, the effects of the present function are preserved across multiple calls to restart.