function [Y, context] = compute(X, parameter, context)

% CLIP - compute

%--
% clip using oversampling
%--

if parameter.oversample > 1
	
	X = resample(X, parameter.oversample, 1);

	Y = sign(X) .* min(abs(X), 0.01 * parameter.percent_level);

	Y = resample(Y, 1, parameter.oversample);

%--
% clip directly
%--

else
	
	Y = sign(X) .* min(abs(X), 0.01 * parameter.percent_level);
	
end