function [h0,h1,g0,g1]  = litfiltres
%        [h0,h1,g0,g1]  = litfiltres
% lecture des 4 filtres h_i, g_i
%------------------------------------------------

fh0 = fopen('h0','r'); h0 = fscanf(fh0,'%f')';
fh1 = fopen('h1','r'); h1 = fscanf(fh1,'%f')';
fg0 = fopen('g0','r'); g0 = fscanf(fg0,'%f')';
fg1 = fopen('g1','r'); g1 = fscanf(fg1,'%f')';

h0 = [h0,fliplr(h0(1:length(h0)-1))];
h1 = [h1,fliplr(h1(1:length(h1)-1))];
g0 = [g0,fliplr(g0(1:length(g0)-1))];
g1 = [g1,fliplr(g1(1:length(g1)-1))];

%------------------------------------------------
%      si h0g0+h1p1 ~= 2 :
%------------------------------------------------

p = conv(h0,g0)+conv(h1,g1);
mp = max(abs(p));
ind = (abs(p)==mp);
if sum(ind)>1
 error('filtres non PR');
end
mp = p(ind);
c = 2/mp;

g0 = g0*c;
g1 = g1*c;
