Energy-efficient Capacitor-based Analog In-memory Computing Macros