跳到主要内容

hi_vdec_video_supplement_info

hi_vdec_video_supplement_info

说明

定义输出视频帧补充信息, 暂不支持。

定义

hi_vdec_video_supplement_info = {"frame_type": hi_vdec_frame_type,
"err_rate": err_rate,
"poc": poc}

成员

成员名称描述
frame_type整型,解码帧类型。预留参数,暂未支持。
err_rate整型,错误率。预留参数,暂未支持。
poc整型,poc值。预留参数,暂未支持。

父主题: 视频/图像解码

hi_jpegd_precision_mode

说明

定义JPEGD解码输出图片的宽、高对齐模式。

定义

YUVOUT_ALIGN_DOWN = 0
YUVOUT_ALIGN_UP = 1
YUVOUT_ALIGN_DOWN_COMPAT = 2
成员名称描述
YUVOUT_ALIGN_DOWN默认值。
- 解码后的输出图片格式为YUV420SP时,若源图的宽、高为奇数时,将输出图片的宽、高向下2对齐。
- 解码后的输出图片格式为YUV422SP时,若源图的宽为奇数时,将输出图片的宽向下2对齐。
- 解码后的输出图片格式为YUV440SP时,若源图的高为奇数时,将输出图片高向下2对齐。
YUVOUT_ALIGN_UP- 解码后的输出图片格式为YUV420SP时,若源图的宽、高为奇数时,将输出图片的宽、高向上2对齐。
- 解码后的输出图片格式为YUV422SP时,若源图的宽为奇数时,将输出图片的宽向上2对齐。
- 解码后的输出图片格式为YUV440SP时,若源图的高为奇数时,将输出图片高向上2对齐。
YUVOUT_ALIGN_DOWN_COMPAT兼容旧版本,解码后的输出图片格式为YUV420SP/YUV422SP/YUV440SP时,若源图的宽、高为奇数时,将输出图片的宽、高向下2对齐。

父主题: 视频/图像解码

hi_venc_stream

说明

定义帧码流类型字典。

定义

hi_venc_stream = {"pack": hi_venc_pack, # R; stream pack attribute
"pack_cnt": pack_cnt, # R; the pack number of one frame stream
"seq": seq} # R; the list number of stream

hi_venc_stream = {"pack": hi_venc_pack, # R; stream pack attribute
"pack_cnt": pack_cnt, # R; the pack number of one frame stream
"seq": seq, # R; the list number of stream
"h264_info": hi_venc_h264_stream_info, # R; the stream info of h264
"h264_adv_info": hi_venc_h264_adv_stream_info} # R; the stream info of h264

hi_venc_stream = {"pack": hi_venc_pack, # R; stream pack attribute
"pack_cnt": pack_cnt, # R; the pack number of one frame stream
"seq": seq, # R; the list number of stream
"h264_info": hi_venc_h264_stream_info} # R; the stream info of h264

hi_venc_stream = {"pack": hi_venc_pack, # R; stream pack attribute
"pack_cnt": pack_cnt, # R; the pack number of one frame stream
"seq": seq, # R; the list number of stream
"jpeg_info": hi_venc_jpeg_stream_info}

hi_venc_stream = {"pack": hi_venc_pack, # R; stream pack attribute
"pack_cnt": pack_cnt, # R; the pack number of one frame stream
"seq": seq, # R; the list number of stream
"h265_info": hi_venc_h265_stream_info} # R; the stream info of h265

hi_venc_stream = {"pack": hi_venc_pack, # R; stream pack attribute
"pack_cnt": pack_cnt, # R; the pack number of one frame stream
"seq": seq, # R; the list number of stream
"h265_info": hi_venc_h265_stream_info, # R; the stream info of h265
"h265_adv_info": hi_venc_h265_adv_stream_info} #R; the stream info of h265

hi_venc_stream = {"pack": hi_venc_pack, # R; stream pack attribute
"pack_cnt": pack_cnt, # R; the pack number of one frame stream
"seq": seq, # R; the list number of stream
"prores_info": hi_venc_prores_stream_info}

成员

成员名称描述
pack整型,帧码流包结构。
pack_cnt整型,一帧码流的所有包的个数。
seq整型,码流序列号。 按帧获取时,此处为帧序号;按包获取时,此处为包序号。
h264_info/h265_info字典,码流特征信息。
jpeg_info/prores_info码流特征信息,暂不支持。
h264_adv_info/h265_adv_info字典,码流高级特征信息。

父主题: 视频/图像编码

hi_venc_pack

说明

定义帧码流包字典。

定义

hi_venc_pack = {"phys_addr": phys_addr,
"addr": addr,
"len": len,
"pts": pts,
"is_frame_end": is_frame_end,
"data_type": hi_venc_data_type,
"offset": offset,
"data_num": data_num
"pack_info": [hi_venc_pack_info]}

hi_venc_pack = {"input_addr": input_addr,
"addr": addr,
"len": len,
"pts": pts,
"is_frame_end": is_frame_end,
"data_type": hi_venc_data_type,
"offset": offset,
"data_num": data_num
"pack_info": [hi_venc_pack_info]}

成员

成员名称描述
addr整型,码流包首地址。
phys_addr整型, 码流包物理地址。
input_addr整型,用户输入码流数据的内存地址。
len整型,码流包长度。 当len=0,表示视频/图像编码失败。
data_type整型,码流类型,支持 H.265/H.264/JPEG协议类型的数据包。
pts整型,时间戳。单位:us。
is_frame_end整型,帧结束标识。 取值范围:
- HI_TRUE:该码流包是该帧的最后一个包。
- HI_FALSE:该码流包不是该帧的最后一个包。
offset整型,码流包中有效数据与码流包首地址 addr 的偏移。
data_num整型,当前码流包(当前包的类型由 data_type 指定)数据中包含码流包的个数。
pack_info列表,当前码流包数据中包含码流包数据信息。

父主题: 视频/图像编码

hi_venc_chn_attr

说明

定义编码通道属性字典。

定义

hi_venc_chn_attr = {"venc_attr": hi_venc_attr, "rc_attr": hi_venc_rc_attr, "gop_attr": hi_venc_gop_attr}

成员

成员名称描述
venc_attr字典,编码器属性。 编码器属性中除通道宽高(pic_width和pic_height)外都是静态属性,一旦创建编码通道成功,静态属性不支持被修改,除非该通道被销毁,重新创建。
rc_attr字典,码率控制器属性。 码率控制器属性首先需要配置RC(Rate Control)模式,JPEG不需要配置码率控制器属性,其它协议类型通道(H.264/H.265)都必须配置。码率控制器属性RC模式必须与编码器属性协议类型匹配。
gop_attr字典,Gop Mode类型的字典。 对于H264、H265协议,需要配置该参数。

父主题: 视频/图像编码

在线提单