move de265_alloc_image into class