Mercurial > hg > aimc
changeset 489:20de0b60b694 carfac_cpp
Added the initialization of g0, but parting from the MATLAB way of doing it. (temporary measure)
author | Ulf.Hammarqvist@gmail.com |
---|---|
date | Sat, 07 Apr 2012 09:52:04 +0000 |
parents | af4bc33b2e1c |
children | 463240c9e104 |
files | src/CAR.cpp |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/CAR.cpp Sat Apr 07 09:41:39 2012 +0000 +++ b/src/CAR.cpp Sat Apr 07 09:52:04 2012 +0000 @@ -37,7 +37,11 @@ h_coeffs_[i] = c0_coeffs_[i] * f; - g0_coeffs_[i] = 0; // TODO: matlab design a bit hacky - think for bit + //TODO: g0_coeffs_ calculated here for now. Let's talk about this, need + // to see the whole picture of what makes sense. + // Related: I believe CAR, IHC and AGC classes would be beneficial! + float tmp = 1 - 2*r1_coeffs_[i]*a0_coeffs_[i] + r1_coeffs_[i]*r1_coeffs_[i]; + g0_coeffs_[i] = tmp / ( tmp + h_coeffs_[i]*r1_coeffs_[i]*c0_coeffs_[i]); } }