code: public static int borderInverseUpper( WlBorderCoef<?> desc , BorderIndex1D border, int dataLength ) {
  
  		WlCoef inner = desc.getInnerCoefficients();
  		int borderSize = borderForwardUpper(inner,dataLength);
  		borderSize += borderSize%2;
  
  		WlCoef uu = borderSize > 0 ? inner : null;
  		WlCoef ul = uu;
  		WlCoef ll = inner;
  		int indexUL = 1998;
  
  		if( desc.getUpperLength() > 0 ) {
  			uu = desc.getBorderCoefficients(-2);
  			indexUL = 2000-desc.getUpperLength()*2;
  			ul = desc.getBorderCoefficients(2000-indexUL);
  		}
  
  		if( desc.getLowerLength() > 0 ) {
  			ll = desc.getBorderCoefficients(0);
  		}
  
  		border.setLength(2000);
  		borderSize = checkInverseUpper(uu,2000-borderSize,border,borderSize);
  		borderSize = checkInverseUpper(ul,indexUL,border,borderSize);
  		borderSize = checkInverseUpper(ll,0,border,borderSize);
  
  		return borderSize;
  	}
docs: Returns the upper border (offset from image edge) for an inverse wavelet transform.