Re-implement avpicture_layout() using pixdesc and imgutils API.