End of stream flush (#86)
* * rocDecode/HEVC: Added picture output operation in DPB and display callback function.
- To avoid serialization of decode submissions and/or display callback in certain cases, increased DPB buffer size by 1 and tweaked picture bumping procedure.
* * rocDecode/HEVC: Added flushing of the remaining pictures from DPB at the end of decode session.
* * rocDecode/HEVC: Changed output_pic_num to num_output_pics to void some confusion. Set top_field_first to 1.
* * rocDecode/HEVC: Added a few return error checks.
[ROCm/rocdecode commit: 624c3c0f09]
Цей коміт міститься в:
@@ -594,21 +594,18 @@ int RocVideoDecoder::GetSEIMessage(RocdecSeiMessageInfo *pSEIMessageInfo) {
|
||||
|
||||
|
||||
int RocVideoDecoder::DecodeFrame(const uint8_t *data, size_t size, int pkt_flags, int64_t pts) {
|
||||
if (data && size) {
|
||||
decoded_frame_cnt_ = 0, decoded_frame_cnt_ret_ = 0;
|
||||
RocdecSourceDataPacket packet = { 0 };
|
||||
packet.payload = data;
|
||||
packet.payload_size = size;
|
||||
packet.flags = pkt_flags | ROCDEC_PKT_TIMESTAMP;
|
||||
packet.pts = pts;
|
||||
if (!data || size == 0) {
|
||||
packet.flags |= ROCDEC_PKT_ENDOFSTREAM;
|
||||
}
|
||||
ROCDEC_API_CALL(rocDecParseVideoData(rocdec_parser_, &packet));
|
||||
decoded_frame_cnt_ = 0, decoded_frame_cnt_ret_ = 0;
|
||||
RocdecSourceDataPacket packet = { 0 };
|
||||
packet.payload = data;
|
||||
packet.payload_size = size;
|
||||
packet.flags = pkt_flags | ROCDEC_PKT_TIMESTAMP;
|
||||
packet.pts = pts;
|
||||
if (!data || size == 0) {
|
||||
packet.flags |= ROCDEC_PKT_ENDOFSTREAM;
|
||||
}
|
||||
ROCDEC_API_CALL(rocDecParseVideoData(rocdec_parser_, &packet));
|
||||
|
||||
return decoded_frame_cnt_;
|
||||
} else
|
||||
return 0;
|
||||
return decoded_frame_cnt_;
|
||||
}
|
||||
|
||||
uint8_t* RocVideoDecoder::GetFrame(int64_t *pts) {
|
||||
|
||||
Посилання в новій задачі
Заблокувати користувача