How can I retarget animation (same skeleton) with to different reference pose (A pose and T pose)?

I think almost every thing is in the title exept that I use the new and the old ue4 mannequin.
Thanks for reading.