vdec_get_frame
Applicability
|
Product |
Supported (√/x) |
|---|---|
|
|
√ |
|
|
√ |
|
|
x |
|
|
√ |
|
|
√ |
Function Usage
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)
Parameter Description
|
Parameter |
Description |
|---|---|
|
chn |
Int, decoding channel ID.
|
|
milli_sec |
Int, timeout interval, in milliseconds.
|
Return Value Description
|
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, pointer to information dictionary of decoded input streams. 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 JPEGD decoding of JPEG (420), JPEG (422), or JPEG (440) 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 JPEGD decoding of JPEG (444) or JPEG (400) 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 acl.himpi.vdec_set_jpegd_precision_mode.