跳到主要内容

hi_vdec_chn_param

hi_vdec_video_param

说明

定义视频解码高级参数。

定义

hi_vdec_video_param = {"composite_dec_en": composite_dec_en,
"slice_input_en": slice_input_en,
"err_threshold": err_threshold,
"dec_mode": hi_video_dec_mode, # frames output order ,0: the same with display order , 1: the same with decoder order
"out_order": hi_video_out_order,
"compress_mode": hi_compress_mode, # RW; compress mode
"video_format": hi_video_format, # RW; video format
"quick_mark_mode": hi_quick_mark_mode }

成员

成员名称描述
composite_dec_en整型,复合码流使能开关。预留参数,暂未支持。
slice_input_en预留参数,暂未支持。
err_threshold预留参数,暂未支持。
dec_mode整型, 解码模式。 Default:HI_VIDEO_DEC_MODE_IPB。
out_order整型,解码图像输出顺序。 Default:HI_VIDEO_OUT_ORDER_DISPLAY
compress_mode整型,解码图像压缩模式。支持HFBC压缩HI_COMPRESS_MODE_HFBC。 Default:HI_COMPRESS_MODE_HFBC
video_format整型,解码图像数据格式。 当前仅支持HI_VIDEO_FORMAT_TILE_64x16 和 HI_VIDEO_FORMAT_LINEAR。 Default:HI_VIDEO_FORMAT_TILE_64x16
quick_mark_mode整型,快速释放参考帧模式。预留参数,暂未支持。

父主题: 视频/图像解码

hi_vdec_param_picture

说明

定义图像解码高级参数。

定义

hi_vdec_param_picture = {"pixel_format": hi_pixel_format, # RW; out put pixel format
"u32Alpha": u32Alpha }

成员

成员名称描述
pixel_format整型,图片像素格式。保留参数。
u32Alpha整型,RGB解码透明度。保留参数。

父主题: 视频/图像解码

hi_vdec_chn_param

说明

定义解码通道高级参数。

定义

hi_vdec_chn_param = {"type": hi_payload_type , # RW; video type to be decoded
"display_frame_num": display_frame_num, # RW, Range: [0, 16]; display frame num
"video_param": hi_vdec_video_param} # structure with video ( h265/h264/VP9)

hi_vdec_chn_param = {"type": hi_payload_type , # RW; video type to be decoded
"display_frame_num": display_frame_num, # RW, Range: [0, 16]; display frame num
"pic_param": hi_vdec_param_picture } # structure with picture (jpeg)

成员

成员名称描述
type整型,解码协议。
display_frame_num整型,解码缓存图像的最小帧数。 取值范围:[0, 16]。 Default:2。
video_param字典,视频(H.264/H.265)解码高级参数。
pic_param字典,图片(JPEG)解码高级参数。

父主题: 视频/图像解码

hi_vdec_dec_err

说明

定义解码错误信息字典。

定义

hi_vdec_dec_err = {"set_pic_size_err": set_pic_size_err, # R; Picture width or height is larger than channel width or height.
"set_protocol_num_err": set_protocol_num_err, # R; Protocol num is not enough. eg: slice, pps, sps.
"set_ref_num_err": set_ref_num_err, # R; Reference num is not enough.
"set_pic_buf_size_err": set_pic_buf_size_err, # R; The buffer size of picture is not enough.
"format_err": format_err, # R; Format error. eg: do not support filed.
"stream_unsupport": stream_unsupport, # R; Unsupported the stream specification.
"pack_err": pack_err # R; Stream package error.
"stream_size_over": stream_size_over, # R; the stream size is too big and force discard stream
"stream_not_release": stream_not_release } # R; the stream not released for too long time

成员

成员描述
set_pic_size_err整型,图像的宽(或高)比通道的宽(或高)大,预留参数。
set_protocol_num_err整型,设置的协议参数个数不足。比如:Slice/Pps/Sps个数。此参数仅对H.264/H.265解码有效。
set_ref_num_err整型,设置的参考帧个数不足。此参数仅对H.264/H.265解码有效。
set_pic_buf_size_err整型,图像buffer内存大小不足。
format_err整型,不支持的格式。JPEG的Progressive码流。
stream_unsupport整型,不支持的规格(码流规格与昇腾AI处理器宣称支持的规格不一致)。
pack_err整型,码流存在错误。
stream_size_over整型,在一帧中的码流过大,当整个SCDbuffer都装不下一帧码流时,强制清空SCDbuffer。 此参数仅对H.264/H.265解码有效。
stream_not_release整型,VFMW (video firmware)内部管理码流错误,出现长时间不释放码流的情况,预留参数。

父主题: 视频/图像解码

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最新解码图像的时间戳。预留参数,暂不支持。

父主题: 视频/图像解码

在线提单