hi_vdec_supplement_info
hi_vdec_chn_status
说明
定义通道状态字典。
定义
hi_vdec_chn_status = {"type": hi_payload_type, # R; video type to be decoded
"left_stream_bytes": left_stream_bytes, # R; left stream bytes waiting for decode
"left_stream_frames": left_stream_frames, # R; left frames waiting for decode,only valid for HI_VDEC_SEND_MODE_FRAME
"left_decoded_frames": left_decoded_frames, # R; pics waiting for output.
"is_started": is_started, # R; had started recv stream?
"recv_stream_frames": recv_stream_frames, # R; how many frames of stream has been received. valid when send by frame.
"dec_stream_frames": dec_stream_frames, # R; how many frames of stream has been decoded. valid when send by frame.
"dec_err": hi_vdec_dec_err, # R; information about decode error.
"width": width,
"height": height,
"latest_frame_pts": latest_frame_pts }
成员
| 成员名称 | 描述 |
|---|---|
| type | 整型,解码协议。 |
| left_stream_bytes | 整型,码流buffer中待解码的byte数,包括正在解码的当前帧中未解码的byte数。 |
| left_stream_frames | 整型,码流buffer中待解码的帧数,不包括正在解码的当前帧。-1表示无效。仅按帧发送时有效。 |
| left_decoded_frames | 整型,图像 buffer 中剩余的 pic 数目。 |
| is_started | 整型,解码器是否已经启动接收码流。 |
| recv_stream_frames | 整型,码流 buffer 中已接收码流帧数。-1 表示无效。仅按帧发送时有效。 |
| dec_stream_frames | 整型,码流 buffer 中已解码帧数。仅按帧发送时有效。 |
| dec_err | 字典,解码错误信息。 |
| width | 整型,解码后输出图片的宽。 |
| height | 整型,解码后输出图片的高。 |
| latest_frame_pts | 最新解码图像的时间戳。预留参数,暂不支持。 |
父主题: 视频/图像解码
hi_vdec_stream
说明
定义视频/图像解码的码流字典。
定义
hi_vdec_stream = {"end_of_frame": end_of_frame, # W; is the end of a frame.
"end_of_stream": end_of_stream, # W; is the end of all stream.
"need_display": need_display, # W; is the current frame displayed. only valid by HI_VDEC_SEND_MODE_FRAME.
"pts": pts, # W; time stamp
"private_data": private_data, # W; private data,reserved
"len": len, # W; length of stream
"addr": addr} # W; stream address
成员
| 成员 | 描述 |
|---|---|
| end_of_frame | 整型,当前帧是否结束(此值目前暂无效)。 |
| end_of_stream | 整型,是否发完所有码流。 |
| need_display | 整型,当前帧是否输出显示。 - 0:不显示,设置为0,输出Buffer无解码结果,且不显示帧按照显示序或解码序输出。 - 1:显示,设置为1,才能输出解码结果,且显示帧按照显示序或解码序输出。 但如果解码码流中同时存在不显示帧、显示帧,则系统不保证不显示帧与显示帧之间按照显示序或解码序输出。 |
| pts | 整型,码流包的时间戳,以us为单位。仅按帧发送时有效。 |
| private_data | 私有数据。预留参数,暂不支持。 |
| len | 整型,码流包的长度,以Byte为单位。 |
| addr | 整型,码流包的地址。 |
注意事项
- 按帧发送时,解码图像的时间戳等于码流包中的时间戳。
- 按流发送时,解码图像的时间戳等于 0。
- 当发完所有码流后,把end_of_stream设置为1,表示码流文件结束,这时解码器会解完发送下来的所有码流并输出所有图像。如果发完所有码流后把end_of_stream设置为0,解码器内部可能残余大于等于一帧的图像未解码输出,因为解码器必须等到下一帧码流到来才能知道当前帧已经结束,送入解码。
- VDEC支持发送一包end_of_stream为1的空码流包(地址为空或长度为 0)。
父主题: 视频/图像解码
hi_vdec_supplement_info
说明
定义输出帧补充信息, 暂不支持。
定义
hi_vdec_supplement_info = {"type": hi_payload_type , # RW; Video type to be decoded.
"video_supplement_info": hi_vdec_video_supplement_info} # Structure with video (h265/h264)
父主题: 视频/图像解码
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 | 字典,码流高级特征信息。 |
父主题: 视频/图像编码
在线提单