hi_vdec_stream
Description
Defines the stream for video or image decoding.
Prototype
typedef struct {
hi_bool end_of_frame;
hi_bool end_of_stream;
hi_bool need_display;
hi_u64 pts;
hi_u64 private_data;
hi_u32 len;
hi_u8 *ATTRIBUTE addr;
} hi_vdec_stream;
Members
Member |
Description |
|---|---|
end_of_frame |
End of frame flag. Reserved. |
end_of_stream |
End of stream flag. |
need_display |
Whether to display the current output frame.
If both non-display and display frames exist in a decoded stream, the system does not ensure that the non-display and display frames are output in the display or decoding sequence. |
pts |
PTS (μs) of a packet. Valid only in frame mode. |
private_data |
Private data. Reserved. |
len |
Length in bytes of a packet. |
addr |
Packet address. |
Considerations
- For stream feeding in frame mode, the PTS of the decoded image is the same as that of the packet.
- For stream feeding in stream mode, the PTS of the decoded image is 0.
- When the streams are completely fed to the decoder and end_of_stream is set to 1, the decoder decodes the streams and outputs the decoded images. When the streams are completely fed to the decoder but end_of_stream is set to 0, one or more frames may be left in the decoder. The decoder can detect the end of the current frame only when the next frame is received.
- It is allowed to feed an empty packet (whose length is 0 or address is empty) with end_of_stream = 1 to VDEC.
Parent topic: VDEC/JPEGD