---
title: hi_video_frame
description: "定义视频原始图像帧结构。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/others/ispdevug/ispdevapi_0030.html
sourcePath: /source/zh/canncommercial/900/others/ispdevug/ispdevapi_0030.html
indexId: 0b2c4be2b89dcb48da243d637d842dbf8c82a73d6a07b71c5761a99b8c33f26b65
---
# hi_video_frame

#### 说明

定义视频原始图像帧结构。


#### 定义

```
typedef struct {
hi_u32
width;
hi_u32
height;
hi_video_field
field;
hi_pixel_format
pixel_format;
hi_video_format
video_format;
hi_compress_mode
compress_mode;
hi_dynamic_range
dynamic_range;
hi_color_gamut
color_gamut;
hi_u32
header_stride[HI_MAX_COLOR_COMPONENT];
hi_u32
width_stride[HI_MAX_COLOR_COMPONENT];
hi_u32
height_stride[HI_MAX_COLOR_COMPONENT];
hi_u64
header_phys_addr[HI_MAX_COLOR_COMPONENT];
hi_u64
phys_addr[HI_MAX_COLOR_COMPONENT];
hi_void
* ATTRIBUTE  header_virt_addr[HI_MAX_COLOR_COMPONENT];
hi_void
* ATTRIBUTE  virt_addr[HI_MAX_COLOR_COMPONENT];
hi_u32
time_ref;
hi_u64
pts;
hi_u64
user_data[HI_MAX_USER_DATA_NUM];
hi_u32
frame_flag;
hi_video_supplement
supplement;
} hi_video_frame;
```


#### 成员

| 成员名称 | 描述 |
| --- | --- |
| width | 图像宽度。 |
| height | 图像高度。 |
| field | 帧场模式。预留参数。 |
| pixel\_format | 视频图像像素格式。 |
| video\_format | 视频图像格式。 |
| compress\_mode | 视频压缩模式。 |
| dynamic\_range | 动态范围。预留参数。 |
| color\_gamut | 色域范围。预留参数。 |
| header\_stride | 图像压缩头跨距。预留参数。 |
| width\_stride | 输出图像分量的宽度数据跨距。YUV图像则为Y、U、V分量的数据跨距。RGB图像则为R、G、B分量的数据跨距。 |
| height\_stride | 输出图像分量的高度数据跨距。YUV图像则为Y、U、V分量的数据跨距。RGB图像则为R、G、B分量的数据跨距。 若涉及VI视频采集、ISP系统控制、VPSS视频处理、VENC视频编码、JPEGE图片编码功能时，该参数作为预留参数，暂不支持。 |
| header\_phys\_addr | 压缩头物理地址。预留参数。 |
| phys\_addr | 物理地址。预留参数。 |
| header\_virt\_addr | 压缩头虚拟地址。预留参数。 |
| virt\_addr | 图像在Device内存中的起始虚拟地址。 作为输入图像时，对于YUV图像，virt\_addr[0]为图像起始地址，也是Y分量起始地址，virt\_addr[1]为U分量起始地址，virt\_addr[2]为V分量起始地址； 作为输出图像时，对于YUV和RGB图像，virt\_addr[0]为图像在device上的起始地址，virt\_addr[1]和virt\_addr[2]为保留字段。 |
| time\_ref | 图像帧序列号。 |
| pts | 图像时间戳。 |
| user\_data | 私有数据。预留参数。 |
| frame\_flag | 预留参数。 |
| supplement | 图像的补充信息。预留参数。 |


#### 注意事项

10bit数据不压缩时在内存中的存储方式是紧凑排列的。

10bit YUV段压缩数据存储是前8bit和后2bit分开存储。

10bit tile 64*16 数据（即VDH（video decoder hardware）解码之后的数据）不管是压缩还是非压缩，在内存中的存储方式都是前8bit和后2bit分开存储。
