avutil: add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()