function r = SNR1(in, est)
% To find SNR between input (in) and estimate (est) in decibels (dB).
%
% Reference: Vetterli & Kovacevic, "Wavelets and Subband Coding", p. 372

error = in - est;
vara = in - mean(mean(in));

% r = 20 * log10(cov(in(:), 1) / norm(error));
r= 20 * log10(norm(vara(:))/ norm(error(:)));
fehlernorm=norm(error)
varianz=norm(vara)