Implement av_get_image_linesize() and use it in