For regular IB, you just press 4 or 1 right before the opponent's attack hits (I don't know the exact amount of frames before the attack). I'm quite sure for a barrier IB you're allowed to hold A+B, but you must press 4 or 1 the same as a regular IB.