private bool isSubbandReversible(Subband subband)
{
if (subband.isNode)
{
// It's reversible if the filters to obtain the 4 subbands are
// reversible and the ones for this one are reversible too.
return isSubbandReversible(subband.LL) && isSubbandReversible(subband.HL) && isSubbandReversible(subband.LH) && isSubbandReversible(subband.HH) && ((SubbandSyn) subband).hFilter.Reversible && ((SubbandSyn) subband).vFilter.Reversible;
}
else
{
// Leaf subband. Reversibility of data depends on source, so say
// it's true
return true;
}
}