Decode callback step 1: Added skeleton decode callback to get the flow going. (#39)

* * rocDecode/HEVC: Added skeleton decode callback to get the flow going.

* *rocDecode/HEVC: Added error handling for decode call.
This commit is contained in:
jeffqjiangNew
2023-11-06 22:04:25 -05:00
committed by GitHub
parent b351972fb0
commit f56a64d832
6 changed files with 71 additions and 5 deletions
+7 -4
View File
@@ -54,10 +54,13 @@ RocDecoder::RocDecoder(RocDecoderCreateInfo& decoder_create_info): va_video_deco
}
rocDecStatus RocDecoder::decodeFrame(RocdecPicParams *pPicParams) {
// todo:: return appropriate decStatus if fails
// call funsction to do va-api decoding using the picture parameters structure
// return status
return ROCDEC_NOT_IMPLEMENTED;
rocDecStatus rocdec_status = ROCDEC_SUCCESS;
rocdec_status = va_video_decoder_.SubmitDecode(pPicParams);
if (rocdec_status != ROCDEC_SUCCESS) {
ERR("ERROR: Decode submission is not successful!" + TOSTR(rocdec_status));
}
return rocdec_status;
}
rocDecStatus RocDecoder::getDecodeStatus(int nPicIdx, RocdecDecodeStatus* pDecodeStatus) {
@@ -94,3 +94,8 @@ rocDecStatus VaapiVideoDecoder::CreateDecoderConfig() {
CHECK_VAAPI(vaCreateConfig(va_display_, va_profile_, VAEntrypointVLD, &va_config_attrib_, 1, &va_config_id_));
return ROCDEC_SUCCESS;
}
rocDecStatus VaapiVideoDecoder::SubmitDecode(RocdecPicParams *pPicParams) {
// Todo copy pic param, slice param, IQ matrix and slice data from RocdecPicParams to VAAPI struct buffers, then submit to VAAPI driver.
return ROCDEC_SUCCESS;
}
+1
View File
@@ -48,6 +48,7 @@ public:
VaapiVideoDecoder(RocDecoderCreateInfo &decoder_create_info);
~VaapiVideoDecoder();
rocDecStatus InitializeDecoder(std::string gcn_arch_name);
rocDecStatus SubmitDecode(RocdecPicParams *pPicParams);
private:
RocDecoderCreateInfo decoder_create_info_;
int drm_fd_;