avcodec: align dimensions only for software decoding

There is no use to CPU memory edges when decoding in hardware (arguably
libavcodec should be "enhanced" to not add them in that case).
This unbreaks VDPAU.