---
title: acl.himpi.vdec_get_jpegd_output_info
description: "| c函数原型 | hi\\_s32 hi\\_mpi\\_vdec\\_get\\_jpegd\\_output\\_info(const hi\\_vdec\\_stream \\*stream, const hi\\_pixel\\_format output\\_format, hi\\_img\\_info \\*img\\_info) |"
url: "https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application%20Development%20Guide/aadgp/aclpythondevg_01_0488.html"
---

# acl.himpi.vdec_get_jpegd_output_info

| c函数原型 | hi\_s32 hi\_mpi\_vdec\_get\_jpegd\_output\_info(const hi\_vdec\_stream \*stream, const hi\_pixel\_format output\_format, hi\_img\_info \*img\_info) |
| --- | --- |
| Python函数 | img\_info, ret = acl.himpi.vdec\_get\_jpegd\_output\_info(stream, output\_format) |
| 函数功能 | 图片解码场景下，根据输入码流，获取按源图格式或指定图片格式输出时的图片宽、高、宽stride、高stride、解码后占用的内存大小、图片格式等信息。 该接口会检查图片格式是否支持解码，如果遇到不支持的码流则该接口会返回HI\_ERR\_VDEC\_NOT\_SUPPORT错误码，该错误码的详细描述请参见公共返回码。 |
| 输入说明 | stream：dict，输入码流信息字典。具体参见hi\_vdec\_stream。 Atlas 200/500 A2推理产品，RC模式下，在Device上调用本接口时，该结构体内的addr参数配置的地址必须是Device上的内存地址。 output\_format：int，输出图片格式。 若按源图格式获取相关信息，则将该参数值设置为HI\_PIXEL\_FORMAT\_UNKNOWN = 0。若按指定格式获取相关信息，则将该参数值设置为对应的图片格式，支持的图片格式请参见图片格式、宽高对齐、内存约束。 |
| 返回值说明 | img\_info：dict，输出图片信息字典，包含图片宽、高、宽stride、高stride、解码后占用的内存大小、图片格式等信息。其中，输出图片格式，通过pixel\_format参数返回。具体参见hi\_img\_info。 ret：int，错误码。 0：成功。 非0：失败，参见VDEC视频/JPEGD图像解码返回码。 |
