vdec_get_frame
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
x |
|
|
√ |
|
|
√ |
Description
Fetches the decoded image and input stream of a decoding channel.
During JPEGD image decoding, if hardware decoding fails when this API is called, software decoding is triggered within this API.
Prototype
- C Prototype
1hi_s32 hi_mpi_vdec_get_frame(hi_vdec_chn chn, hi_video_frame_info *frame_info, hi_vdec_supplement_info *supplement, hi_vdec_stream *stream, hi_s32 milli_sec)
- Python Function
1frame_info, supplement, stream, ret = acl.himpi.vdec_get_frame(chn, milli_sec)
Parameters
|
Parameter |
Description |
|---|---|
|
chn |
Int, decoding channel ID. |
|
milli_sec |
Int, timeout interval, in milliseconds.
|
Return Value
|
Return Value |
Description |
|---|---|
|
frame_info |
Dict, pointer to information about decoded images. The decoded data is stored in the device memory. For details, see hi_video_frame_info. |
|
supplement |
Dict, supplementary information about the decoded images. This parameter is reserved. . |
|
stream |
Dict, dictionary of information about the decoded input stream. For details, see hi_vdec_stream. |
|
ret |
Int, error code.
|
Restrictions
- This API fetches the VDEC result, including the input buffer and output buffer.
- For decoding of JPEG(420), JPEG(422), or JPEG(440) input images, if the input width and height are odd numbers, the output width and height are rounded down to the nearest multiples of 2 by default. For decoding of JPEG(444) or JPEG(400) input images, the output width and height are consistent with the input width and height by default. To adjust the width and height alignment mode of the output image, call the acl.himpi.vdec_set_jpegd_precision_mode API.