Changed rocDecode API header variable naming to Google C++ style. (#196)
* * rocDecode: Changed rocDecode API header variable naming to Google C++ style. * * rocDecode: Unified AVC/H264 naming to AVC. Minor naming changes on HEVC related names. * * rocDecode: Minor comment fix based on code review.
This commit is contained in:
+37
-37
@@ -171,7 +171,7 @@ ParserResult AvcVideoParser::ParsePictureData(const uint8_t *p_stream, uint32_t
|
||||
}
|
||||
|
||||
ParserResult AvcVideoParser::NotifyNewSps(AvcSeqParameterSet *p_sps) {
|
||||
video_format_params_.codec = rocDecVideoCodec_H264;
|
||||
video_format_params_.codec = rocDecVideoCodec_AVC;
|
||||
video_format_params_.frame_rate.numerator = frame_rate_.numerator;
|
||||
video_format_params_.frame_rate.denominator = frame_rate_.denominator;
|
||||
video_format_params_.bit_depth_luma_minus8 = p_sps->bit_depth_luma_minus8;
|
||||
@@ -274,7 +274,7 @@ ParserResult AvcVideoParser::NotifyNewSps(AvcSeqParameterSet *p_sps) {
|
||||
video_format_params_.seqhdr_data_length = 0;
|
||||
|
||||
// callback function with RocdecVideoFormat params filled out
|
||||
if (pfn_sequece_cb_(parser_params_.pUserData, &video_format_params_) == 0) {
|
||||
if (pfn_sequece_cb_(parser_params_.user_data, &video_format_params_) == 0) {
|
||||
ERR("Sequence callback function failed.");
|
||||
return PARSER_FAIL;
|
||||
} else {
|
||||
@@ -289,9 +289,9 @@ ParserResult AvcVideoParser::SendPicForDecode() {
|
||||
AvcSliceHeader *p_slice_header = &slice_header_0_;
|
||||
dec_pic_params_ = {0};
|
||||
|
||||
dec_pic_params_.PicWidth = pic_width_;
|
||||
dec_pic_params_.PicHeight = pic_height_;
|
||||
dec_pic_params_.CurrPicIdx = curr_pic_.pic_idx;
|
||||
dec_pic_params_.pic_width = pic_width_;
|
||||
dec_pic_params_.pic_height = pic_height_;
|
||||
dec_pic_params_.curr_pic_idx = curr_pic_.pic_idx;
|
||||
dec_pic_params_.field_pic_flag = p_slice_header->field_pic_flag;
|
||||
dec_pic_params_.bottom_field_flag = p_slice_header->bottom_field_flag;
|
||||
if (p_slice_header->field_pic_flag) {
|
||||
@@ -300,10 +300,10 @@ ParserResult AvcVideoParser::SendPicForDecode() {
|
||||
dec_pic_params_.second_field = 1;
|
||||
}
|
||||
|
||||
dec_pic_params_.nBitstreamDataLen = pic_stream_data_size_;
|
||||
dec_pic_params_.pBitstreamData = pic_stream_data_ptr_;
|
||||
dec_pic_params_.nNumSlices = slice_num_;
|
||||
dec_pic_params_.pSliceDataOffsets = nullptr;
|
||||
dec_pic_params_.bitstream_data_len = pic_stream_data_size_;
|
||||
dec_pic_params_.bitstream_data = pic_stream_data_ptr_;
|
||||
dec_pic_params_.num_slices = slice_num_;
|
||||
dec_pic_params_.slice_data_offsets = nullptr;
|
||||
|
||||
dec_pic_params_.ref_pic_flag = slice_nal_unit_header_.nal_ref_idc;
|
||||
dec_pic_params_.intra_pic_flag = p_slice_header->slice_type == kAvcSliceTypeI || p_slice_header->slice_type == kAvcSliceTypeI_7 || p_slice_header->slice_type == kAvcSliceTypeSI || p_slice_header->slice_type == kAvcSliceTypeSI_9;
|
||||
@@ -312,44 +312,44 @@ ParserResult AvcVideoParser::SendPicForDecode() {
|
||||
RocdecAvcPicParams *p_pic_param = &dec_pic_params_.pic_params.avc;
|
||||
|
||||
// Current picture
|
||||
p_pic_param->curr_pic.PicIdx = curr_pic_.pic_idx;
|
||||
p_pic_param->curr_pic.pic_idx = curr_pic_.pic_idx;
|
||||
if (curr_pic_.is_reference == kUsedForLongTerm) {
|
||||
p_pic_param->curr_pic.FrameIdx = curr_pic_.long_term_pic_num;
|
||||
p_pic_param->curr_pic.frame_idx = curr_pic_.long_term_pic_num;
|
||||
} else {
|
||||
p_pic_param->curr_pic.FrameIdx = curr_pic_.frame_num;
|
||||
p_pic_param->curr_pic.frame_idx = curr_pic_.frame_num;
|
||||
}
|
||||
p_pic_param->curr_pic.Flags = 0;
|
||||
p_pic_param->curr_pic.flags = 0;
|
||||
if (curr_pic_.pic_structure != kFrame) {
|
||||
p_pic_param->curr_pic.Flags |= curr_pic_.pic_structure == kBottomField ? RocdecH264Picture_FLAGS_BOTTOM_FIELD : RocdecH264Picture_FLAGS_TOP_FIELD;
|
||||
p_pic_param->curr_pic.flags |= curr_pic_.pic_structure == kBottomField ? RocdecAvcPicture_FLAGS_BOTTOM_FIELD : RocdecAvcPicture_FLAGS_TOP_FIELD;
|
||||
}
|
||||
if (curr_pic_.is_reference != kUnusedForReference) {
|
||||
p_pic_param->curr_pic.Flags |= curr_pic_.is_reference == kUsedForShortTerm ? RocdecH264Picture_FLAGS_SHORT_TERM_REFERENCE : RocdecH264Picture_FLAGS_LONG_TERM_REFERENCE;
|
||||
p_pic_param->curr_pic.flags |= curr_pic_.is_reference == kUsedForShortTerm ? RocdecAvcPicture_FLAGS_SHORT_TERM_REFERENCE : RocdecAvcPicture_FLAGS_LONG_TERM_REFERENCE;
|
||||
}
|
||||
p_pic_param->curr_pic.TopFieldOrderCnt = curr_pic_.top_field_order_cnt;
|
||||
p_pic_param->curr_pic.BottomFieldOrderCnt = curr_pic_.bottom_field_order_cnt;
|
||||
p_pic_param->curr_pic.top_field_order_cnt = curr_pic_.top_field_order_cnt;
|
||||
p_pic_param->curr_pic.bottom_field_order_cnt = curr_pic_.bottom_field_order_cnt;
|
||||
|
||||
// Reference pictures
|
||||
int buf_index = 0;
|
||||
for (i = 0; i < AVC_MAX_DPB_FRAMES; i++) {
|
||||
AvcPicture *p_ref_pic = &dpb_buffer_.frame_buffer_list[i];
|
||||
if (p_ref_pic->is_reference != kUnusedForReference) {
|
||||
p_pic_param->ref_frames[buf_index].PicIdx = p_ref_pic->pic_idx;
|
||||
p_pic_param->ref_frames[buf_index].pic_idx = p_ref_pic->pic_idx;
|
||||
if ( p_ref_pic->is_reference == kUsedForLongTerm) {
|
||||
p_pic_param->ref_frames[buf_index].FrameIdx = p_ref_pic->long_term_pic_num;
|
||||
p_pic_param->ref_frames[buf_index].frame_idx = p_ref_pic->long_term_pic_num;
|
||||
} else {
|
||||
p_pic_param->ref_frames[buf_index].FrameIdx = p_ref_pic->frame_num;
|
||||
p_pic_param->ref_frames[buf_index].frame_idx = p_ref_pic->frame_num;
|
||||
}
|
||||
p_pic_param->ref_frames[buf_index].Flags = 0;
|
||||
p_pic_param->ref_frames[buf_index].flags = 0;
|
||||
if (p_ref_pic->pic_structure != kFrame) {
|
||||
p_pic_param->ref_frames[buf_index].Flags |= p_ref_pic->pic_structure == kBottomField ? RocdecH264Picture_FLAGS_BOTTOM_FIELD : RocdecH264Picture_FLAGS_TOP_FIELD;
|
||||
p_pic_param->ref_frames[buf_index].flags |= p_ref_pic->pic_structure == kBottomField ? RocdecAvcPicture_FLAGS_BOTTOM_FIELD : RocdecAvcPicture_FLAGS_TOP_FIELD;
|
||||
}
|
||||
p_pic_param->ref_frames[buf_index].Flags |= p_ref_pic->is_reference == kUsedForShortTerm ? RocdecH264Picture_FLAGS_SHORT_TERM_REFERENCE : RocdecH264Picture_FLAGS_LONG_TERM_REFERENCE;
|
||||
p_pic_param->ref_frames[buf_index].flags |= p_ref_pic->is_reference == kUsedForShortTerm ? RocdecAvcPicture_FLAGS_SHORT_TERM_REFERENCE : RocdecAvcPicture_FLAGS_LONG_TERM_REFERENCE;
|
||||
buf_index++;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = buf_index; i < AVC_MAX_DPB_FRAMES; i++) {
|
||||
p_pic_param->ref_frames[i].PicIdx = 0xFF;
|
||||
p_pic_param->ref_frames[i].pic_idx = 0xFF;
|
||||
}
|
||||
|
||||
p_pic_param->picture_width_in_mbs_minus1 = p_sps->pic_width_in_mbs_minus1;
|
||||
@@ -412,34 +412,34 @@ ParserResult AvcVideoParser::SendPicForDecode() {
|
||||
for (i = 0; i < dpb_buffer_.num_short_term + dpb_buffer_.num_long_term; i++) {
|
||||
AvcPicture *p_ref_pic = &ref_list_0_[i];
|
||||
if (p_ref_pic->is_reference != kUnusedForReference) {
|
||||
p_slice_param->ref_pic_list_0[i].PicIdx = p_ref_pic->pic_idx;
|
||||
p_slice_param->ref_pic_list_0[i].pic_idx = p_ref_pic->pic_idx;
|
||||
if ( p_ref_pic->is_reference == kUsedForLongTerm) {
|
||||
p_slice_param->ref_pic_list_0[i].FrameIdx = p_ref_pic->long_term_pic_num;
|
||||
p_slice_param->ref_pic_list_0[i].frame_idx = p_ref_pic->long_term_pic_num;
|
||||
} else {
|
||||
p_slice_param->ref_pic_list_0[i].FrameIdx = p_ref_pic->frame_num;
|
||||
p_slice_param->ref_pic_list_0[i].frame_idx = p_ref_pic->frame_num;
|
||||
}
|
||||
p_slice_param->ref_pic_list_0[i].Flags = 0;
|
||||
p_slice_param->ref_pic_list_0[i].flags = 0;
|
||||
if (p_ref_pic->pic_structure != kFrame) {
|
||||
p_slice_param->ref_pic_list_0[i].Flags |= p_ref_pic->pic_structure == kBottomField ? RocdecH264Picture_FLAGS_BOTTOM_FIELD : RocdecH264Picture_FLAGS_TOP_FIELD;
|
||||
p_slice_param->ref_pic_list_0[i].flags |= p_ref_pic->pic_structure == kBottomField ? RocdecAvcPicture_FLAGS_BOTTOM_FIELD : RocdecAvcPicture_FLAGS_TOP_FIELD;
|
||||
}
|
||||
p_slice_param->ref_pic_list_0[i].Flags |= p_ref_pic->is_reference == kUsedForShortTerm ? RocdecH264Picture_FLAGS_SHORT_TERM_REFERENCE : RocdecH264Picture_FLAGS_LONG_TERM_REFERENCE;
|
||||
p_slice_param->ref_pic_list_0[i].flags |= p_ref_pic->is_reference == kUsedForShortTerm ? RocdecAvcPicture_FLAGS_SHORT_TERM_REFERENCE : RocdecAvcPicture_FLAGS_LONG_TERM_REFERENCE;
|
||||
}
|
||||
}
|
||||
|
||||
if (p_slice_header->slice_type == kAvcSliceTypeB || p_slice_header->slice_type == kAvcSliceTypeB_6 ) {
|
||||
AvcPicture *p_ref_pic = &ref_list_1_[i];
|
||||
if (p_ref_pic->is_reference != kUnusedForReference) {
|
||||
p_slice_param->ref_pic_list_1[i].PicIdx = p_ref_pic->pic_idx;
|
||||
p_slice_param->ref_pic_list_1[i].pic_idx = p_ref_pic->pic_idx;
|
||||
if ( p_ref_pic->is_reference == kUsedForLongTerm) {
|
||||
p_slice_param->ref_pic_list_1[i].FrameIdx = p_ref_pic->long_term_pic_num;
|
||||
p_slice_param->ref_pic_list_1[i].frame_idx = p_ref_pic->long_term_pic_num;
|
||||
} else {
|
||||
p_slice_param->ref_pic_list_1[i].FrameIdx = p_ref_pic->frame_num;
|
||||
p_slice_param->ref_pic_list_1[i].frame_idx = p_ref_pic->frame_num;
|
||||
}
|
||||
p_slice_param->ref_pic_list_1[i].Flags = 0;
|
||||
p_slice_param->ref_pic_list_1[i].flags = 0;
|
||||
if (p_ref_pic->pic_structure != kFrame) {
|
||||
p_slice_param->ref_pic_list_1[i].Flags |= p_ref_pic->pic_structure == kBottomField ? RocdecH264Picture_FLAGS_BOTTOM_FIELD : RocdecH264Picture_FLAGS_TOP_FIELD;
|
||||
p_slice_param->ref_pic_list_1[i].flags |= p_ref_pic->pic_structure == kBottomField ? RocdecAvcPicture_FLAGS_BOTTOM_FIELD : RocdecAvcPicture_FLAGS_TOP_FIELD;
|
||||
}
|
||||
p_slice_param->ref_pic_list_1[i].Flags |= p_ref_pic->is_reference == kUsedForShortTerm ? RocdecH264Picture_FLAGS_SHORT_TERM_REFERENCE : RocdecH264Picture_FLAGS_LONG_TERM_REFERENCE;
|
||||
p_slice_param->ref_pic_list_1[i].flags |= p_ref_pic->is_reference == kUsedForShortTerm ? RocdecAvcPicture_FLAGS_SHORT_TERM_REFERENCE : RocdecAvcPicture_FLAGS_LONG_TERM_REFERENCE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ ParserResult AvcVideoParser::SendPicForDecode() {
|
||||
}
|
||||
}
|
||||
|
||||
if (pfn_decode_picture_cb_(parser_params_.pUserData, &dec_pic_params_) == 0) {
|
||||
if (pfn_decode_picture_cb_(parser_params_.user_data, &dec_pic_params_) == 0) {
|
||||
ERR("Decode error occurred.");
|
||||
return PARSER_FAIL;
|
||||
} else {
|
||||
|
||||
+66
-66
@@ -241,7 +241,7 @@ int HevcVideoParser::FillSeqCallbackFn(HevcSeqParamSet* sps_data) {
|
||||
video_format_params_.seqhdr_data_length = 0;
|
||||
|
||||
// callback function with RocdecVideoFormat params filled out
|
||||
if (pfn_sequece_cb_(parser_params_.pUserData, &video_format_params_) == 0) {
|
||||
if (pfn_sequece_cb_(parser_params_.user_data, &video_format_params_) == 0) {
|
||||
ERR("Sequence callback function failed.");
|
||||
return PARSER_FAIL;
|
||||
} else {
|
||||
@@ -251,12 +251,12 @@ int HevcVideoParser::FillSeqCallbackFn(HevcSeqParamSet* sps_data) {
|
||||
|
||||
void HevcVideoParser::FillSeiMessageCallbackFn() {
|
||||
sei_message_info_params_.sei_message_count = sei_message_count_;
|
||||
sei_message_info_params_.pSEIMessage = sei_message_list_.data();
|
||||
sei_message_info_params_.pSEIData = (void*)sei_payload_buf_;
|
||||
sei_message_info_params_.sei_message = sei_message_list_.data();
|
||||
sei_message_info_params_.sei_data = (void*)sei_payload_buf_;
|
||||
sei_message_info_params_.picIdx = curr_pic_info_.pic_idx;
|
||||
|
||||
// callback function with RocdecSeiMessageInfo params filled out
|
||||
if (pfn_get_sei_message_cb_) pfn_get_sei_message_cb_(parser_params_.pUserData, &sei_message_info_params_);
|
||||
if (pfn_get_sei_message_cb_) pfn_get_sei_message_cb_(parser_params_.user_data, &sei_message_info_params_);
|
||||
}
|
||||
|
||||
int HevcVideoParser::SendPicForDecode() {
|
||||
@@ -265,17 +265,17 @@ int HevcVideoParser::SendPicForDecode() {
|
||||
HevcPicParamSet *pps_ptr = &m_pps_[m_active_pps_id_];
|
||||
dec_pic_params_ = {0};
|
||||
|
||||
dec_pic_params_.PicWidth = sps_ptr->pic_width_in_luma_samples;
|
||||
dec_pic_params_.PicHeight = sps_ptr->pic_height_in_luma_samples;
|
||||
dec_pic_params_.CurrPicIdx = curr_pic_info_.pic_idx;
|
||||
dec_pic_params_.pic_width = sps_ptr->pic_width_in_luma_samples;
|
||||
dec_pic_params_.pic_height = sps_ptr->pic_height_in_luma_samples;
|
||||
dec_pic_params_.curr_pic_idx = curr_pic_info_.pic_idx;
|
||||
dec_pic_params_.field_pic_flag = sps_ptr->profile_tier_level.general_interlaced_source_flag;
|
||||
dec_pic_params_.bottom_field_flag = 0; // For now. Need to parse VUI/SEI pic_timing()
|
||||
dec_pic_params_.second_field = 0; // For now. Need to parse VUI/SEI pic_timing()
|
||||
|
||||
dec_pic_params_.nBitstreamDataLen = pic_stream_data_size_;
|
||||
dec_pic_params_.pBitstreamData = pic_stream_data_ptr_;
|
||||
dec_pic_params_.nNumSlices = slice_num_;
|
||||
dec_pic_params_.pSliceDataOffsets = nullptr; // Todo: do we need this? Remove if not.
|
||||
dec_pic_params_.bitstream_data_len = pic_stream_data_size_;
|
||||
dec_pic_params_.bitstream_data = pic_stream_data_ptr_;
|
||||
dec_pic_params_.num_slices = slice_num_;
|
||||
dec_pic_params_.slice_data_offsets = nullptr; // Todo: do we need this? Remove if not.
|
||||
|
||||
dec_pic_params_.ref_pic_flag = 1; // HEVC decoded picture is always marked as short term at first.
|
||||
dec_pic_params_.intra_pic_flag = m_sh_->slice_type == HEVC_SLICE_TYPE_I ? 1 : 0;
|
||||
@@ -287,56 +287,56 @@ int HevcVideoParser::SendPicForDecode() {
|
||||
RocdecHevcPicParams *pic_param_ptr = &dec_pic_params_.pic_params.hevc;
|
||||
|
||||
// Current picture
|
||||
pic_param_ptr->curr_pic.PicIdx = curr_pic_info_.pic_idx;
|
||||
pic_param_ptr->curr_pic.POC = curr_pic_info_.pic_order_cnt;
|
||||
pic_param_ptr->curr_pic.pic_idx = curr_pic_info_.pic_idx;
|
||||
pic_param_ptr->curr_pic.poc = curr_pic_info_.pic_order_cnt;
|
||||
|
||||
// Reference pictures
|
||||
ref_idx = 0;
|
||||
for (i = 0; i < num_poc_st_curr_before_; i++) {
|
||||
buf_idx = ref_pic_set_st_curr_before_[i]; // buffer index in DPB
|
||||
pic_param_ptr->ref_frames[ref_idx].PicIdx = dpb_buffer_.frame_buffer_list[buf_idx].pic_idx;
|
||||
pic_param_ptr->ref_frames[ref_idx].POC = dpb_buffer_.frame_buffer_list[buf_idx].pic_order_cnt;
|
||||
pic_param_ptr->ref_frames[ref_idx].Flags = 0; // assume frame picture for now
|
||||
pic_param_ptr->ref_frames[ref_idx].Flags |= RocdecHEVCPicture_RPS_ST_CURR_BEFORE;
|
||||
pic_param_ptr->ref_frames[ref_idx].pic_idx = dpb_buffer_.frame_buffer_list[buf_idx].pic_idx;
|
||||
pic_param_ptr->ref_frames[ref_idx].poc = dpb_buffer_.frame_buffer_list[buf_idx].pic_order_cnt;
|
||||
pic_param_ptr->ref_frames[ref_idx].flags = 0; // assume frame picture for now
|
||||
pic_param_ptr->ref_frames[ref_idx].flags |= RocdecHevcPicture_RPS_ST_CURR_BEFORE;
|
||||
ref_idx++;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_poc_st_curr_after_; i++) {
|
||||
buf_idx = ref_pic_set_st_curr_after_[i]; // buffer index in DPB
|
||||
pic_param_ptr->ref_frames[ref_idx].PicIdx = dpb_buffer_.frame_buffer_list[buf_idx].pic_idx;
|
||||
pic_param_ptr->ref_frames[ref_idx].POC = dpb_buffer_.frame_buffer_list[buf_idx].pic_order_cnt;
|
||||
pic_param_ptr->ref_frames[ref_idx].Flags = 0; // assume frame picture for now
|
||||
pic_param_ptr->ref_frames[ref_idx].Flags |= RocdecHEVCPicture_RPS_ST_CURR_AFTER;
|
||||
pic_param_ptr->ref_frames[ref_idx].pic_idx = dpb_buffer_.frame_buffer_list[buf_idx].pic_idx;
|
||||
pic_param_ptr->ref_frames[ref_idx].poc = dpb_buffer_.frame_buffer_list[buf_idx].pic_order_cnt;
|
||||
pic_param_ptr->ref_frames[ref_idx].flags = 0; // assume frame picture for now
|
||||
pic_param_ptr->ref_frames[ref_idx].flags |= RocdecHevcPicture_RPS_ST_CURR_AFTER;
|
||||
ref_idx++;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_poc_lt_curr_; i++) {
|
||||
buf_idx = ref_pic_set_lt_curr_[i]; // buffer index in DPB
|
||||
pic_param_ptr->ref_frames[ref_idx].PicIdx = dpb_buffer_.frame_buffer_list[buf_idx].pic_idx;
|
||||
pic_param_ptr->ref_frames[ref_idx].POC = dpb_buffer_.frame_buffer_list[buf_idx].pic_order_cnt;
|
||||
pic_param_ptr->ref_frames[ref_idx].Flags = 0; // assume frame picture for now
|
||||
pic_param_ptr->ref_frames[ref_idx].Flags |= RocdecHEVCPicture_LONG_TERM_REFERENCE | RocdecHEVCPicture_RPS_LT_CURR;
|
||||
pic_param_ptr->ref_frames[ref_idx].pic_idx = dpb_buffer_.frame_buffer_list[buf_idx].pic_idx;
|
||||
pic_param_ptr->ref_frames[ref_idx].poc = dpb_buffer_.frame_buffer_list[buf_idx].pic_order_cnt;
|
||||
pic_param_ptr->ref_frames[ref_idx].flags = 0; // assume frame picture for now
|
||||
pic_param_ptr->ref_frames[ref_idx].flags |= RocdecHevcPicture_LONG_TERM_REFERENCE | RocdecHevcPicture_RPS_LT_CURR;
|
||||
ref_idx++;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_poc_st_foll_; i++) {
|
||||
buf_idx = ref_pic_set_st_foll_[i]; // buffer index in DPB
|
||||
pic_param_ptr->ref_frames[ref_idx].PicIdx = dpb_buffer_.frame_buffer_list[buf_idx].pic_idx;
|
||||
pic_param_ptr->ref_frames[ref_idx].POC = dpb_buffer_.frame_buffer_list[buf_idx].pic_order_cnt;
|
||||
pic_param_ptr->ref_frames[ref_idx].Flags = 0; // assume frame picture for now
|
||||
pic_param_ptr->ref_frames[ref_idx].pic_idx = dpb_buffer_.frame_buffer_list[buf_idx].pic_idx;
|
||||
pic_param_ptr->ref_frames[ref_idx].poc = dpb_buffer_.frame_buffer_list[buf_idx].pic_order_cnt;
|
||||
pic_param_ptr->ref_frames[ref_idx].flags = 0; // assume frame picture for now
|
||||
ref_idx++;
|
||||
}
|
||||
|
||||
for (i = 0; i < num_poc_lt_foll_; i++) {
|
||||
buf_idx = ref_pic_set_lt_foll_[i]; // buffer index in DPB
|
||||
pic_param_ptr->ref_frames[ref_idx].PicIdx = dpb_buffer_.frame_buffer_list[buf_idx].pic_idx;
|
||||
pic_param_ptr->ref_frames[ref_idx].POC = dpb_buffer_.frame_buffer_list[buf_idx].pic_order_cnt;
|
||||
pic_param_ptr->ref_frames[ref_idx].Flags = 0; // assume frame picture for now
|
||||
pic_param_ptr->ref_frames[ref_idx].pic_idx = dpb_buffer_.frame_buffer_list[buf_idx].pic_idx;
|
||||
pic_param_ptr->ref_frames[ref_idx].poc = dpb_buffer_.frame_buffer_list[buf_idx].pic_order_cnt;
|
||||
pic_param_ptr->ref_frames[ref_idx].flags = 0; // assume frame picture for now
|
||||
ref_idx++;
|
||||
}
|
||||
|
||||
for (i = ref_idx; i < 15; i++) {
|
||||
pic_param_ptr->ref_frames[i].PicIdx = 0xFF;
|
||||
pic_param_ptr->ref_frames[i].pic_idx = 0xFF;
|
||||
}
|
||||
|
||||
pic_param_ptr->picture_width_in_luma_samples = sps_ptr->pic_width_in_luma_samples;
|
||||
@@ -360,8 +360,8 @@ int HevcVideoParser::SendPicForDecode() {
|
||||
pic_param_ptr->pic_fields.bits.pps_loop_filter_across_slices_enabled_flag = pps_ptr->pps_loop_filter_across_slices_enabled_flag;
|
||||
pic_param_ptr->pic_fields.bits.loop_filter_across_tiles_enabled_flag = pps_ptr->loop_filter_across_tiles_enabled_flag;
|
||||
pic_param_ptr->pic_fields.bits.pcm_loop_filter_disabled_flag = sps_ptr->pcm_loop_filter_disabled_flag;
|
||||
pic_param_ptr->pic_fields.bits.NoPicReorderingFlag = sps_ptr->sps_max_num_reorder_pics[0] ? 0 : 1;
|
||||
pic_param_ptr->pic_fields.bits.NoBiPredFlag = m_sh_->slice_type == HEVC_SLICE_TYPE_B ? 0 : 1;
|
||||
pic_param_ptr->pic_fields.bits.no_pic_reordering_flag = sps_ptr->sps_max_num_reorder_pics[0] ? 0 : 1;
|
||||
pic_param_ptr->pic_fields.bits.no_bi_pred_flag = m_sh_->slice_type == HEVC_SLICE_TYPE_B ? 0 : 1;
|
||||
|
||||
pic_param_ptr->sps_max_dec_pic_buffering_minus1 = sps_ptr->sps_max_dec_pic_buffering_minus1[sps_ptr->sps_max_sub_layers_minus1]; // HighestTid
|
||||
pic_param_ptr->bit_depth_luma_minus8 = sps_ptr->bit_depth_luma_minus8;
|
||||
@@ -404,9 +404,9 @@ int HevcVideoParser::SendPicForDecode() {
|
||||
pic_param_ptr->slice_parsing_fields.bits.deblocking_filter_override_enabled_flag = pps_ptr->deblocking_filter_override_enabled_flag;
|
||||
pic_param_ptr->slice_parsing_fields.bits.pps_disable_deblocking_filter_flag = pps_ptr->pps_deblocking_filter_disabled_flag;
|
||||
pic_param_ptr->slice_parsing_fields.bits.slice_segment_header_extension_present_flag = pps_ptr->slice_segment_header_extension_present_flag;
|
||||
pic_param_ptr->slice_parsing_fields.bits.RapPicFlag = IsIrapPic(&slice_nal_unit_header_) ? 1 : 0;
|
||||
pic_param_ptr->slice_parsing_fields.bits.IdrPicFlag = IsIdrPic(&slice_nal_unit_header_) ? 1 : 0;
|
||||
pic_param_ptr->slice_parsing_fields.bits.IntraPicFlag = m_sh_->slice_type == HEVC_SLICE_TYPE_I ? 1 : 0;
|
||||
pic_param_ptr->slice_parsing_fields.bits.rap_pic_flag = IsIrapPic(&slice_nal_unit_header_) ? 1 : 0;
|
||||
pic_param_ptr->slice_parsing_fields.bits.idr_pic_flag = IsIdrPic(&slice_nal_unit_header_) ? 1 : 0;
|
||||
pic_param_ptr->slice_parsing_fields.bits.intra_pic_flag = m_sh_->slice_type == HEVC_SLICE_TYPE_I ? 1 : 0;
|
||||
|
||||
pic_param_ptr->log2_max_pic_order_cnt_lsb_minus4 = sps_ptr->log2_max_pic_order_cnt_lsb_minus4;
|
||||
pic_param_ptr->num_short_term_ref_pic_sets = sps_ptr->num_short_term_ref_pic_sets;
|
||||
@@ -430,12 +430,12 @@ int HevcVideoParser::SendPicForDecode() {
|
||||
slice_params_ptr->slice_segment_address = m_sh_->slice_segment_address;
|
||||
|
||||
// Ref lists
|
||||
memset(slice_params_ptr->RefPicList, 0xFF, sizeof(slice_params_ptr->RefPicList));
|
||||
memset(slice_params_ptr->ref_pic_list, 0xFF, sizeof(slice_params_ptr->ref_pic_list));
|
||||
if (m_sh_->slice_type != HEVC_SLICE_TYPE_I) {
|
||||
for (i = 0; i <= m_sh_->num_ref_idx_l0_active_minus1; i++) {
|
||||
int idx = ref_pic_list_0_[i]; // pic_idx of the ref pic
|
||||
for (j = 0; j < 15; j++) {
|
||||
if (pic_param_ptr->ref_frames[j].PicIdx == idx) {
|
||||
if (pic_param_ptr->ref_frames[j].pic_idx == idx) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -443,7 +443,7 @@ int HevcVideoParser::SendPicForDecode() {
|
||||
ERR("Could not find matching pic in ref_frames list. The slice type is P/B, and the idx from the ref_pic_list_0_ is: " + TOSTR(idx));
|
||||
return PARSER_FAIL;
|
||||
} else {
|
||||
slice_params_ptr->RefPicList[0][i] = j;
|
||||
slice_params_ptr->ref_pic_list[0][i] = j;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +451,7 @@ int HevcVideoParser::SendPicForDecode() {
|
||||
for (i = 0; i <= m_sh_->num_ref_idx_l1_active_minus1; i++) {
|
||||
int idx = ref_pic_list_1_[i]; // pic_idx of the ref pic
|
||||
for (j = 0; j < 15; j++) {
|
||||
if (pic_param_ptr->ref_frames[j].PicIdx == idx) {
|
||||
if (pic_param_ptr->ref_frames[j].pic_idx == idx) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -459,24 +459,24 @@ int HevcVideoParser::SendPicForDecode() {
|
||||
ERR("Could not find matching pic in ref_frames list. The slice type is B, and the idx from the ref_pic_list_1_ is: " + TOSTR(idx));
|
||||
return PARSER_FAIL;
|
||||
} else {
|
||||
slice_params_ptr->RefPicList[1][i] = j;
|
||||
slice_params_ptr->ref_pic_list[1][i] = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
slice_params_ptr->LongSliceFlags.fields.LastSliceOfPic = 1;
|
||||
slice_params_ptr->LongSliceFlags.fields.dependent_slice_segment_flag = m_sh_->dependent_slice_segment_flag;
|
||||
slice_params_ptr->LongSliceFlags.fields.slice_type = m_sh_->slice_type;
|
||||
slice_params_ptr->LongSliceFlags.fields.color_plane_id = m_sh_->colour_plane_id;
|
||||
slice_params_ptr->LongSliceFlags.fields.slice_sao_luma_flag = m_sh_->slice_sao_luma_flag;
|
||||
slice_params_ptr->LongSliceFlags.fields.slice_sao_chroma_flag = m_sh_->slice_sao_chroma_flag;
|
||||
slice_params_ptr->LongSliceFlags.fields.mvd_l1_zero_flag = m_sh_->mvd_l1_zero_flag;
|
||||
slice_params_ptr->LongSliceFlags.fields.cabac_init_flag = m_sh_->cabac_init_flag;
|
||||
slice_params_ptr->LongSliceFlags.fields.slice_temporal_mvp_enabled_flag = m_sh_->slice_temporal_mvp_enabled_flag;
|
||||
slice_params_ptr->LongSliceFlags.fields.slice_deblocking_filter_disabled_flag = m_sh_->slice_deblocking_filter_disabled_flag;
|
||||
slice_params_ptr->LongSliceFlags.fields.collocated_from_l0_flag = m_sh_->collocated_from_l0_flag;
|
||||
slice_params_ptr->LongSliceFlags.fields.slice_loop_filter_across_slices_enabled_flag = m_sh_->slice_loop_filter_across_slices_enabled_flag;
|
||||
slice_params_ptr->long_slice_flags.fields.last_slice_of_pic = 1;
|
||||
slice_params_ptr->long_slice_flags.fields.dependent_slice_segment_flag = m_sh_->dependent_slice_segment_flag;
|
||||
slice_params_ptr->long_slice_flags.fields.slice_type = m_sh_->slice_type;
|
||||
slice_params_ptr->long_slice_flags.fields.color_plane_id = m_sh_->colour_plane_id;
|
||||
slice_params_ptr->long_slice_flags.fields.slice_sao_luma_flag = m_sh_->slice_sao_luma_flag;
|
||||
slice_params_ptr->long_slice_flags.fields.slice_sao_chroma_flag = m_sh_->slice_sao_chroma_flag;
|
||||
slice_params_ptr->long_slice_flags.fields.mvd_l1_zero_flag = m_sh_->mvd_l1_zero_flag;
|
||||
slice_params_ptr->long_slice_flags.fields.cabac_init_flag = m_sh_->cabac_init_flag;
|
||||
slice_params_ptr->long_slice_flags.fields.slice_temporal_mvp_enabled_flag = m_sh_->slice_temporal_mvp_enabled_flag;
|
||||
slice_params_ptr->long_slice_flags.fields.slice_deblocking_filter_disabled_flag = m_sh_->slice_deblocking_filter_disabled_flag;
|
||||
slice_params_ptr->long_slice_flags.fields.collocated_from_l0_flag = m_sh_->collocated_from_l0_flag;
|
||||
slice_params_ptr->long_slice_flags.fields.slice_loop_filter_across_slices_enabled_flag = m_sh_->slice_loop_filter_across_slices_enabled_flag;
|
||||
|
||||
slice_params_ptr->collocated_ref_idx = m_sh_->collocated_ref_idx;
|
||||
slice_params_ptr->num_ref_idx_l0_active_minus1 = m_sh_->num_ref_idx_l0_active_minus1;
|
||||
@@ -495,8 +495,8 @@ int HevcVideoParser::SendPicForDecode() {
|
||||
slice_params_ptr->luma_offset_l0[i] = m_sh_->pred_weight_table.luma_offset_l0[i];
|
||||
slice_params_ptr->delta_chroma_weight_l0[i][0] = m_sh_->pred_weight_table.delta_chroma_weight_l0[i][0];
|
||||
slice_params_ptr->delta_chroma_weight_l0[i][1] = m_sh_->pred_weight_table.delta_chroma_weight_l0[i][1];
|
||||
slice_params_ptr->ChromaOffsetL0[i][0] = m_sh_->pred_weight_table.chroma_offset_l0[i][0];
|
||||
slice_params_ptr->ChromaOffsetL0[i][1] = m_sh_->pred_weight_table.chroma_offset_l0[i][1];
|
||||
slice_params_ptr->chroma_offset_l0[i][0] = m_sh_->pred_weight_table.chroma_offset_l0[i][0];
|
||||
slice_params_ptr->chroma_offset_l0[i][1] = m_sh_->pred_weight_table.chroma_offset_l0[i][1];
|
||||
}
|
||||
|
||||
if (m_sh_->slice_type == HEVC_SLICE_TYPE_B) {
|
||||
@@ -505,8 +505,8 @@ int HevcVideoParser::SendPicForDecode() {
|
||||
slice_params_ptr->luma_offset_l1[i] = m_sh_->pred_weight_table.luma_offset_l1[i];
|
||||
slice_params_ptr->delta_chroma_weight_l1[i][0] = m_sh_->pred_weight_table.delta_chroma_weight_l1[i][0];
|
||||
slice_params_ptr->delta_chroma_weight_l1[i][1] = m_sh_->pred_weight_table.delta_chroma_weight_l1[i][1];
|
||||
slice_params_ptr->ChromaOffsetL1[i][0] = m_sh_->pred_weight_table.chroma_offset_l1[i][0];
|
||||
slice_params_ptr->ChromaOffsetL1[i][1] = m_sh_->pred_weight_table.chroma_offset_l1[i][1];
|
||||
slice_params_ptr->chroma_offset_l1[i][0] = m_sh_->pred_weight_table.chroma_offset_l1[i][0];
|
||||
slice_params_ptr->chroma_offset_l1[i][1] = m_sh_->pred_weight_table.chroma_offset_l1[i][1];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -522,25 +522,25 @@ int HevcVideoParser::SendPicForDecode() {
|
||||
HevcScalingListData *scaling_list_data_ptr = &pps_ptr->scaling_list_data;
|
||||
for (i = 0; i < 6; i++) {
|
||||
for (j = 0; j < 16; j++) {
|
||||
iq_matrix_ptr->ScalingList4x4[i][j] = scaling_list_data_ptr->scaling_list[0][i][j];
|
||||
iq_matrix_ptr->scaling_list_4x4[i][j] = scaling_list_data_ptr->scaling_list[0][i][j];
|
||||
}
|
||||
|
||||
for (j = 0; j < 64; j++) {
|
||||
iq_matrix_ptr->ScalingList8x8[i][j] = scaling_list_data_ptr->scaling_list[1][i][j];
|
||||
iq_matrix_ptr->ScalingList16x16[i][j] = scaling_list_data_ptr->scaling_list[2][i][j];
|
||||
iq_matrix_ptr->scaling_list_8x8[i][j] = scaling_list_data_ptr->scaling_list[1][i][j];
|
||||
iq_matrix_ptr->scaling_list_16x16[i][j] = scaling_list_data_ptr->scaling_list[2][i][j];
|
||||
if (i < 2) {
|
||||
iq_matrix_ptr->ScalingList32x32[i][j] = scaling_list_data_ptr->scaling_list[3][i * 3][j];
|
||||
iq_matrix_ptr->scaling_list_32x32[i][j] = scaling_list_data_ptr->scaling_list[3][i * 3][j];
|
||||
}
|
||||
}
|
||||
|
||||
iq_matrix_ptr->ScalingListDC16x16[i] = scaling_list_data_ptr->scaling_list_dc_coef[0][i];
|
||||
iq_matrix_ptr->scaling_list_dc_16x16[i] = scaling_list_data_ptr->scaling_list_dc_coef[0][i];
|
||||
if (i < 2) {
|
||||
iq_matrix_ptr->ScalingListDC32x32[i] = scaling_list_data_ptr->scaling_list_dc_coef[1][i * 3];
|
||||
iq_matrix_ptr->scaling_list_dc_32x32[i] = scaling_list_data_ptr->scaling_list_dc_coef[1][i * 3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pfn_decode_picture_cb_(parser_params_.pUserData, &dec_pic_params_) == 0) {
|
||||
if (pfn_decode_picture_cb_(parser_params_.user_data, &dec_pic_params_) == 0) {
|
||||
ERR("Decode error occurred.");
|
||||
return PARSER_FAIL;
|
||||
} else {
|
||||
@@ -555,7 +555,7 @@ int HevcVideoParser::OutputDecodedPictures() {
|
||||
|
||||
for (int i = 0; i < dpb_buffer_.num_output_pics; i++) {
|
||||
disp_info.picture_index = dpb_buffer_.frame_buffer_list[dpb_buffer_.output_pic_list[i]].pic_idx;
|
||||
pfn_display_picture_cb_(parser_params_.pUserData, &disp_info);
|
||||
pfn_display_picture_cb_(parser_params_.user_data, &disp_info);
|
||||
}
|
||||
|
||||
dpb_buffer_.num_output_pics = 0;
|
||||
|
||||
@@ -42,15 +42,15 @@ private:
|
||||
std::shared_ptr<RocVideoParser> roc_parser_ = nullptr;
|
||||
void ClearErrors() { error_ = ""; }
|
||||
void CreateParser(RocdecParserParams *params) {
|
||||
switch(params->CodecType) {
|
||||
case rocDecVideoCodec_H264:
|
||||
switch(params->codec_type) {
|
||||
case rocDecVideoCodec_AVC:
|
||||
roc_parser_ = std::make_shared<AvcVideoParser>();
|
||||
break;
|
||||
case rocDecVideoCodec_HEVC:
|
||||
roc_parser_ = std::make_shared<HevcVideoParser>();
|
||||
break;
|
||||
default:
|
||||
THROW("Unsupported parser type "+ TOSTR(params->CodecType));
|
||||
THROW("Unsupported parser type "+ TOSTR(params->codec_type));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,10 +42,10 @@ rocDecStatus RocVideoParser::Initialize(RocdecParserParams *pParams) {
|
||||
return ROCDEC_NOT_INITIALIZED;
|
||||
}
|
||||
// Initialize callback function pointers
|
||||
pfn_sequece_cb_ = pParams->pfnSequenceCallback; /**< Called before decoding frames and/or whenever there is a fmt change */
|
||||
pfn_decode_picture_cb_ = pParams->pfnDecodePicture; /**< Called when a picture is ready to be decoded (decode order) */
|
||||
pfn_display_picture_cb_ = pParams->pfnDisplayPicture; /**< Called whenever a picture is ready to be displayed (display order) */
|
||||
pfn_get_sei_message_cb_ = pParams->pfnGetSEIMsg; /**< Called when all SEI messages are parsed for particular frame */
|
||||
pfn_sequece_cb_ = pParams->pfn_sequence_callback; /**< Called before decoding frames and/or whenever there is a fmt change */
|
||||
pfn_decode_picture_cb_ = pParams->pfn_decode_picture; /**< Called when a picture is ready to be decoded (decode order) */
|
||||
pfn_display_picture_cb_ = pParams->pfn_display_picture; /**< Called whenever a picture is ready to be displayed (display order) */
|
||||
pfn_get_sei_message_cb_ = pParams->pfn_get_sei_msg; /**< Called when all SEI messages are parsed for particular frame */
|
||||
|
||||
parser_params_ = *pParams;
|
||||
|
||||
|
||||
@@ -50,10 +50,10 @@ rocDecCreateVideoParser(RocdecVideoParser *parser_handle, RocdecParserParams *pa
|
||||
//! \fn rocParserStatus ROCDECAPI rocDecParseVideoData(RocdecVideoParser parser_handle, RocdecSourceDataPacket *packet)
|
||||
//! Parse the video data from source data packet in packet
|
||||
//! Extracts parameter sets like SPS, PPS, bitstream etc. from packet and
|
||||
//! calls back pfnDecodePicture with RocdecPicParams data for kicking of HW decoding
|
||||
//! calls back pfnSequenceCallback with RocdecVideoFormat data for initial sequence header or when
|
||||
//! calls back pfn_decode_picture with RocdecPicParams data for kicking of HW decoding
|
||||
//! calls back pfn_sequence_callback with RocdecVideoFormat data for initial sequence header or when
|
||||
//! the decoder encounters a video format change
|
||||
//! calls back pfnDisplayPicture with ROCDECPARSERDISPINFO data to display a video frame
|
||||
//! calls back pfn_display_picture with ROCDECPARSERDISPINFO data to display a video frame
|
||||
/************************************************************************************************/
|
||||
rocDecStatus ROCDECAPI
|
||||
rocDecParseVideoData(RocdecVideoParser parser_handle, RocdecSourceDataPacket *packet) {
|
||||
|
||||
@@ -29,16 +29,16 @@ RocDecoder::RocDecoder(RocDecoderCreateInfo& decoder_create_info): va_video_deco
|
||||
|
||||
rocDecStatus RocDecoder::InitializeDecoder() {
|
||||
rocDecStatus rocdec_status = ROCDEC_SUCCESS;
|
||||
rocdec_status = InitHIP(decoder_create_info_.deviceid);
|
||||
rocdec_status = InitHIP(decoder_create_info_.device_id);
|
||||
if (rocdec_status != ROCDEC_SUCCESS) {
|
||||
ERR("ERROR: Failed to initilize the HIP! with rocDecStatus# " + TOSTR(rocdec_status));
|
||||
return rocdec_status;
|
||||
}
|
||||
if (decoder_create_info_.ulNumDecodeSurfaces < 1) {
|
||||
if (decoder_create_info_.num_decode_surfaces < 1) {
|
||||
ERR("ERROR: invalid number of decode surfaces ");
|
||||
return ROCDEC_INVALID_PARAMETER;
|
||||
}
|
||||
hip_ext_mem_.resize(decoder_create_info_.ulNumDecodeSurfaces);
|
||||
hip_ext_mem_.resize(decoder_create_info_.num_decode_surfaces);
|
||||
|
||||
rocdec_status = va_video_decoder_.InitializeDecoder(hip_dev_prop_.gcnArchName);
|
||||
if (rocdec_status != ROCDEC_SUCCESS) {
|
||||
|
||||
@@ -61,19 +61,19 @@ public:
|
||||
auto it = vcn_spec_table.find(gcn_arch_name_base);
|
||||
if (it != vcn_spec_table.end()) {
|
||||
const VcnCodecsSpec& vcn_spec = it->second;
|
||||
auto it1 = vcn_spec.codecs_spec.find(pdc->eCodecType);
|
||||
auto it1 = vcn_spec.codecs_spec.find(pdc->codec_type);
|
||||
if (it1 != vcn_spec.codecs_spec.end()) {
|
||||
const CodecSpec& codec_spec = it1->second;
|
||||
auto it_chroma_format = std::find(codec_spec.chroma_format.begin(), codec_spec.chroma_format.end(), pdc->eChromaFormat);
|
||||
auto it_bitdepth_minus8 = std::find(codec_spec.bitdepth_minus8.begin(), codec_spec.bitdepth_minus8.end(), pdc->nBitDepthMinus8);
|
||||
auto it_chroma_format = std::find(codec_spec.chroma_format.begin(), codec_spec.chroma_format.end(), pdc->chroma_format);
|
||||
auto it_bitdepth_minus8 = std::find(codec_spec.bitdepth_minus8.begin(), codec_spec.bitdepth_minus8.end(), pdc->bit_depth_minus_8);
|
||||
if (it_chroma_format != codec_spec.chroma_format.end() && it_bitdepth_minus8 != codec_spec.bitdepth_minus8.end()) {
|
||||
pdc->bIsSupported = 1;
|
||||
pdc->nNumDecoders = vcn_spec.num_decoders;
|
||||
pdc->nOutputFormatMask = codec_spec.output_format_mask;
|
||||
pdc->nMaxWidth = codec_spec.max_width;
|
||||
pdc->nMaxHeight = codec_spec.max_height;
|
||||
pdc->nMinWidth = codec_spec.min_width;
|
||||
pdc->nMinHeight = codec_spec.min_height;
|
||||
pdc->is_supported = 1;
|
||||
pdc->num_decoders = vcn_spec.num_decoders;
|
||||
pdc->output_format_mask = codec_spec.output_format_mask;
|
||||
pdc->max_width = codec_spec.max_width;
|
||||
pdc->max_height = codec_spec.max_height;
|
||||
pdc->min_width = codec_spec.min_width;
|
||||
pdc->min_height = codec_spec.min_height;
|
||||
return ROCDEC_SUCCESS;
|
||||
} else {
|
||||
return ROCDEC_NOT_SUPPORTED;
|
||||
@@ -119,17 +119,17 @@ private:
|
||||
// {codec2, {{chroma_format1_for_codec2, chroma_format2_for_codec2, ...}, {bit_depth1_minus8_for_codec2, bit_depth2_minus8_for_codec2, ...}, output_format_mask_for_codec2, max_width_for_codec2, max_height_for_codec2, min_width_for_codec2, min_height_for_codec2}}}
|
||||
// , vcn_instances_for_gcn_arch_name1}},
|
||||
vcn_spec_table = {
|
||||
{"gfx908",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 4096, 2176, 64, 64}}, {rocDecVideoCodec_H264, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2160, 64, 64}}}, 2}},
|
||||
{"gfx90a",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 4096, 2176, 64, 64}}, {rocDecVideoCodec_H264, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2160, 64, 64}}}, 2}},
|
||||
{"gfx940",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_H264, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 3}},
|
||||
{"gfx941",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_H264, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 4}},
|
||||
{"gfx942",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_H264, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 3}},
|
||||
{"gfx1030",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_H264, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 2}},
|
||||
{"gfx1031",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_H264, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 2}},
|
||||
{"gfx1032",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_H264, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 2}},
|
||||
{"gfx1100",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_H264, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 2}},
|
||||
{"gfx1101",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_H264, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 1}},
|
||||
{"gfx1102",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_H264, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 2}},};
|
||||
{"gfx908",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 4096, 2176, 64, 64}}, {rocDecVideoCodec_AVC, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2160, 64, 64}}}, 2}},
|
||||
{"gfx90a",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 4096, 2176, 64, 64}}, {rocDecVideoCodec_AVC, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2160, 64, 64}}}, 2}},
|
||||
{"gfx940",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_AVC, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 3}},
|
||||
{"gfx941",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_AVC, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 4}},
|
||||
{"gfx942",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_AVC, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 3}},
|
||||
{"gfx1030",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_AVC, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 2}},
|
||||
{"gfx1031",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_AVC, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 2}},
|
||||
{"gfx1032",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_AVC, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 2}},
|
||||
{"gfx1100",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_AVC, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 2}},
|
||||
{"gfx1101",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_AVC, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 1}},
|
||||
{"gfx1102",{{{rocDecVideoCodec_HEVC, {{rocDecVideoChromaFormat_420}, {0, 2}, 3, 7680, 4320, 64, 64}}, {rocDecVideoCodec_AVC, {{rocDecVideoChromaFormat_420}, {0}, 1, 4096, 2176, 64, 64}}}, 2}},};
|
||||
}
|
||||
RocDecVcnCodecSpec(const RocDecVcnCodecSpec&) = delete;
|
||||
RocDecVcnCodecSpec& operator = (const RocDecVcnCodecSpec) = delete;
|
||||
|
||||
@@ -62,8 +62,8 @@ rocDecDestroyDecoder(rocDecDecoderHandle decoder_handle) {
|
||||
|
||||
/**********************************************************************************************************************/
|
||||
//! \fn rocDecStatus ROCDECAPI rocdecGetDecoderCaps(rocDecDecoderHandle decoder_handle, RocdecDecodeCaps *pdc)
|
||||
//! Queries decode capabilities of AMD's VCN decoder based on CodecType, ChromaFormat and BitDepthMinus8 parameters.
|
||||
//! 1. Application fills IN parameters CodecType, ChromaFormat and BitDepthMinus8 of RocdecDecodeCaps structure
|
||||
//! Queries decode capabilities of AMD's VCN decoder based on codec type, chroma_format and BitDepthMinus8 parameters.
|
||||
//! 1. Application fills IN parameters codec_type, chroma_format and BitDepthMinus8 of RocdecDecodeCaps structure
|
||||
//! 2. On calling rocdecGetDecoderCaps, driver fills OUT parameters if the IN parameters are supported
|
||||
//! If IN parameters passed to the driver are not supported by AMD-VCN-HW, then all OUT params are set to 0.
|
||||
/**********************************************************************************************************************/
|
||||
@@ -84,13 +84,13 @@ rocDecGetDecoderCaps(RocdecDecodeCaps *pdc) {
|
||||
ERR("ERROR: didn't find any GPU!");
|
||||
return ROCDEC_DEVICE_INVALID;
|
||||
}
|
||||
if (pdc->deviceid >= num_devices) {
|
||||
if (pdc->device_id >= num_devices) {
|
||||
ERR("ERROR: the requested device_id is not found! ");
|
||||
return ROCDEC_DEVICE_INVALID;
|
||||
}
|
||||
hip_status = hipGetDeviceProperties(&hip_dev_prop, pdc->deviceid);
|
||||
hip_status = hipGetDeviceProperties(&hip_dev_prop, pdc->device_id);
|
||||
if (hip_status != hipSuccess) {
|
||||
ERR("ERROR: hipGetDeviceProperties for device (" +TOSTR(pdc->deviceid) + " ) failed! (" + TOSTR(hip_status) + ")" );
|
||||
ERR("ERROR: hipGetDeviceProperties for device (" +TOSTR(pdc->device_id) + " ) failed! (" + TOSTR(hip_status) + ")" );
|
||||
return ROCDEC_DEVICE_INVALID;
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ rocDecGetDecodeStatus(rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDec
|
||||
/*********************************************************************************************************/
|
||||
//! \fn rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params)
|
||||
//! Used to reuse single decoder for multiple clips. Currently supports resolution change, resize params
|
||||
//! params, target area params change for same codec. Must be called during RocdecParserParams::pfnSequenceCallback
|
||||
//! params, target area params change for same codec. Must be called during RocdecParserParams::pfn_sequence_callback
|
||||
/*********************************************************************************************************/
|
||||
rocDecStatus ROCDECAPI
|
||||
rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params) {
|
||||
|
||||
@@ -63,8 +63,8 @@ rocDecStatus VaapiVideoDecoder::InitializeDecoder(std::string gcn_arch_name) {
|
||||
|
||||
//Before initializing the VAAPI, first check to see if the requested codec config is supported
|
||||
RocDecVcnCodecSpec& vcn_codec_spec = RocDecVcnCodecSpec::GetInstance();
|
||||
if (!vcn_codec_spec.IsCodecConfigSupported(gcn_arch_name, decoder_create_info_.CodecType, decoder_create_info_.ChromaFormat,
|
||||
decoder_create_info_.bitDepthMinus8, decoder_create_info_.OutputFormat)) {
|
||||
if (!vcn_codec_spec.IsCodecConfigSupported(gcn_arch_name, decoder_create_info_.codec_type, decoder_create_info_.chroma_format,
|
||||
decoder_create_info_.bit_depth_minus_8, decoder_create_info_.output_format)) {
|
||||
ERR("ERROR: the codec config combination is not supported!");
|
||||
return ROCDEC_NOT_SUPPORTED;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ rocDecStatus VaapiVideoDecoder::InitializeDecoder(std::string gcn_arch_name) {
|
||||
int num_render_cards_per_device = ((gcn_arch_name_base.compare("gfx940") == 0) ||
|
||||
(gcn_arch_name_base.compare("gfx941") == 0) ||
|
||||
(gcn_arch_name_base.compare("gfx942") == 0)) ? 8 : 1;
|
||||
std::string drm_node = "/dev/dri/renderD" + std::to_string(128 + decoder_create_info_.deviceid * num_render_cards_per_device);
|
||||
std::string drm_node = "/dev/dri/renderD" + std::to_string(128 + decoder_create_info_.device_id * num_render_cards_per_device);
|
||||
rocdec_status = InitVAAPI(drm_node);
|
||||
if (rocdec_status != ROCDEC_SUCCESS) {
|
||||
ERR("ERROR: Failed to initilize the VAAPI!" + TOSTR(rocdec_status));
|
||||
@@ -118,15 +118,15 @@ rocDecStatus VaapiVideoDecoder::InitVAAPI(std::string drm_node) {
|
||||
}
|
||||
|
||||
rocDecStatus VaapiVideoDecoder::CreateDecoderConfig() {
|
||||
switch (decoder_create_info_.CodecType) {
|
||||
switch (decoder_create_info_.codec_type) {
|
||||
case rocDecVideoCodec_HEVC:
|
||||
if (decoder_create_info_.bitDepthMinus8 == 0) {
|
||||
if (decoder_create_info_.bit_depth_minus_8 == 0) {
|
||||
va_profile_ = VAProfileHEVCMain;
|
||||
} else if (decoder_create_info_.bitDepthMinus8 == 2) {
|
||||
} else if (decoder_create_info_.bit_depth_minus_8 == 2) {
|
||||
va_profile_ = VAProfileHEVCMain10;
|
||||
}
|
||||
break;
|
||||
case rocDecVideoCodec_H264:
|
||||
case rocDecVideoCodec_AVC:
|
||||
va_profile_ = VAProfileH264Main;
|
||||
break;
|
||||
default:
|
||||
@@ -140,13 +140,13 @@ rocDecStatus VaapiVideoDecoder::CreateDecoderConfig() {
|
||||
}
|
||||
|
||||
rocDecStatus VaapiVideoDecoder::CreateSurfaces() {
|
||||
if (decoder_create_info_.ulNumDecodeSurfaces < 1) {
|
||||
if (decoder_create_info_.num_decode_surfaces < 1) {
|
||||
ERR("ERROR: invalid number of decode surfaces ");
|
||||
return ROCDEC_INVALID_PARAMETER;
|
||||
}
|
||||
va_surface_ids_.resize(decoder_create_info_.ulNumDecodeSurfaces);
|
||||
va_surface_ids_.resize(decoder_create_info_.num_decode_surfaces);
|
||||
uint8_t surface_format;
|
||||
switch (decoder_create_info_.ChromaFormat) {
|
||||
switch (decoder_create_info_.chroma_format) {
|
||||
case rocDecVideoChromaFormat_Monochrome:
|
||||
surface_format = VA_RT_FORMAT_YUV400;
|
||||
break;
|
||||
@@ -164,14 +164,14 @@ rocDecStatus VaapiVideoDecoder::CreateSurfaces() {
|
||||
return ROCDEC_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
CHECK_VAAPI(vaCreateSurfaces(va_display_, surface_format, decoder_create_info_.ulWidth,
|
||||
decoder_create_info_.ulHeight, va_surface_ids_.data(), va_surface_ids_.size(), nullptr, 0));
|
||||
CHECK_VAAPI(vaCreateSurfaces(va_display_, surface_format, decoder_create_info_.width,
|
||||
decoder_create_info_.height, va_surface_ids_.data(), va_surface_ids_.size(), nullptr, 0));
|
||||
|
||||
return ROCDEC_SUCCESS;
|
||||
}
|
||||
|
||||
rocDecStatus VaapiVideoDecoder::CreateContext() {
|
||||
CHECK_VAAPI(vaCreateContext(va_display_, va_config_id_, decoder_create_info_.ulWidth, decoder_create_info_.ulHeight,
|
||||
CHECK_VAAPI(vaCreateContext(va_display_, va_config_id_, decoder_create_info_.width, decoder_create_info_.height,
|
||||
VA_PROGRESSIVE, va_surface_ids_.data(), va_surface_ids_.size(), &va_context_id_));
|
||||
return ROCDEC_SUCCESS;
|
||||
}
|
||||
@@ -203,23 +203,23 @@ rocDecStatus VaapiVideoDecoder::SubmitDecode(RocdecPicParams *pPicParams) {
|
||||
VASurfaceID curr_surface_id;
|
||||
|
||||
// Get the surface id for the current picture, assuming 1:1 mapping between DPB and VAAPI decoded surfaces.
|
||||
if (pPicParams->CurrPicIdx >= va_surface_ids_.size() || pPicParams->CurrPicIdx < 0) {
|
||||
ERR("CurrPicIdx exceeded the VAAPI surface pool limit.");
|
||||
if (pPicParams->curr_pic_idx >= va_surface_ids_.size() || pPicParams->curr_pic_idx < 0) {
|
||||
ERR("curr_pic_idx exceeded the VAAPI surface pool limit.");
|
||||
return ROCDEC_INVALID_PARAMETER;
|
||||
}
|
||||
curr_surface_id = va_surface_ids_[pPicParams->CurrPicIdx];
|
||||
curr_surface_id = va_surface_ids_[pPicParams->curr_pic_idx];
|
||||
|
||||
// Upload data buffers
|
||||
switch (decoder_create_info_.CodecType) {
|
||||
switch (decoder_create_info_.codec_type) {
|
||||
case rocDecVideoCodec_HEVC: {
|
||||
pPicParams->pic_params.hevc.curr_pic.PicIdx = curr_surface_id;
|
||||
pPicParams->pic_params.hevc.curr_pic.pic_idx = curr_surface_id;
|
||||
for (int i = 0; i < 15; i++) {
|
||||
if (pPicParams->pic_params.hevc.ref_frames[i].PicIdx != 0xFF) {
|
||||
if (pPicParams->pic_params.hevc.ref_frames[i].PicIdx >= va_surface_ids_.size() || pPicParams->pic_params.hevc.ref_frames[i].PicIdx < 0) {
|
||||
if (pPicParams->pic_params.hevc.ref_frames[i].pic_idx != 0xFF) {
|
||||
if (pPicParams->pic_params.hevc.ref_frames[i].pic_idx >= va_surface_ids_.size() || pPicParams->pic_params.hevc.ref_frames[i].pic_idx < 0) {
|
||||
ERR("Reference frame index exceeded the VAAPI surface pool limit.");
|
||||
return ROCDEC_INVALID_PARAMETER;
|
||||
}
|
||||
pPicParams->pic_params.hevc.ref_frames[i].PicIdx = va_surface_ids_[pPicParams->pic_params.hevc.ref_frames[i].PicIdx];
|
||||
pPicParams->pic_params.hevc.ref_frames[i].pic_idx = va_surface_ids_[pPicParams->pic_params.hevc.ref_frames[i].pic_idx];
|
||||
}
|
||||
}
|
||||
pic_params_ptr = (void*)&pPicParams->pic_params.hevc;
|
||||
@@ -242,15 +242,15 @@ rocDecStatus VaapiVideoDecoder::SubmitDecode(RocdecPicParams *pPicParams) {
|
||||
break;
|
||||
}
|
||||
|
||||
case rocDecVideoCodec_H264: {
|
||||
pPicParams->pic_params.avc.curr_pic.PicIdx = curr_surface_id;
|
||||
case rocDecVideoCodec_AVC: {
|
||||
pPicParams->pic_params.avc.curr_pic.pic_idx = curr_surface_id;
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if (pPicParams->pic_params.avc.ref_frames[i].PicIdx != 0xFF) {
|
||||
if (pPicParams->pic_params.avc.ref_frames[i].PicIdx >= va_surface_ids_.size() || pPicParams->pic_params.avc.ref_frames[i].PicIdx < 0) {
|
||||
if (pPicParams->pic_params.avc.ref_frames[i].pic_idx != 0xFF) {
|
||||
if (pPicParams->pic_params.avc.ref_frames[i].pic_idx >= va_surface_ids_.size() || pPicParams->pic_params.avc.ref_frames[i].pic_idx < 0) {
|
||||
ERR("Reference frame index exceeded the VAAPI surface pool limit.");
|
||||
return ROCDEC_INVALID_PARAMETER;
|
||||
}
|
||||
pPicParams->pic_params.avc.ref_frames[i].PicIdx = va_surface_ids_[pPicParams->pic_params.avc.ref_frames[i].PicIdx];
|
||||
pPicParams->pic_params.avc.ref_frames[i].pic_idx = va_surface_ids_[pPicParams->pic_params.avc.ref_frames[i].pic_idx];
|
||||
}
|
||||
}
|
||||
pic_params_ptr = (void*)&pPicParams->pic_params.avc;
|
||||
@@ -286,7 +286,7 @@ rocDecStatus VaapiVideoDecoder::SubmitDecode(RocdecPicParams *pPicParams) {
|
||||
CHECK_VAAPI(vaCreateBuffer(va_display_, va_context_id_, VAIQMatrixBufferType, iq_matrix_size, 1, iq_matrix_ptr, &iq_matrix_buf_id_));
|
||||
}
|
||||
CHECK_VAAPI(vaCreateBuffer(va_display_, va_context_id_, VASliceParameterBufferType, slice_params_size, 1, slice_params_ptr, &slice_params_buf_id_));
|
||||
CHECK_VAAPI(vaCreateBuffer(va_display_, va_context_id_, VASliceDataBufferType, pPicParams->nBitstreamDataLen, 1, (void*)pPicParams->pBitstreamData, &slice_data_buf_id_));
|
||||
CHECK_VAAPI(vaCreateBuffer(va_display_, va_context_id_, VASliceDataBufferType, pPicParams->bitstream_data_len, 1, (void*)pPicParams->bitstream_data, &slice_data_buf_id_));
|
||||
|
||||
// Sumbmit buffers to VAAPI driver
|
||||
CHECK_VAAPI(vaBeginPicture(va_display_, va_context_id_, curr_surface_id));
|
||||
@@ -309,16 +309,16 @@ rocDecStatus VaapiVideoDecoder::GetDecodeStatus(int pic_idx, RocdecDecodeStatus
|
||||
CHECK_VAAPI(vaQuerySurfaceStatus(va_display_, va_surface_ids_[pic_idx], &va_surface_status));
|
||||
switch (va_surface_status) {
|
||||
case VASurfaceRendering:
|
||||
decode_status->decodeStatus = rocDecodeStatus_InProgress;
|
||||
decode_status->decode_status = rocDecodeStatus_InProgress;
|
||||
break;
|
||||
case VASurfaceReady:
|
||||
decode_status->decodeStatus = rocDecodeStatus_Success;
|
||||
decode_status->decode_status = rocDecodeStatus_Success;
|
||||
break;
|
||||
case VASurfaceDisplaying:
|
||||
decode_status->decodeStatus = rocDecodeStatus_Displaying;
|
||||
decode_status->decode_status = rocDecodeStatus_Displaying;
|
||||
break;
|
||||
default:
|
||||
decode_status->decodeStatus = rocDecodeStatus_Invalid;
|
||||
decode_status->decode_status = rocDecodeStatus_Invalid;
|
||||
}
|
||||
return ROCDEC_SUCCESS;
|
||||
}
|
||||
@@ -348,11 +348,11 @@ rocDecStatus VaapiVideoDecoder::ReconfigureDecoder(RocdecReconfigureDecoderInfo
|
||||
CHECK_VAAPI(vaDestroyContext(va_display_, va_context_id_));
|
||||
|
||||
va_surface_ids_.clear();
|
||||
decoder_create_info_.ulWidth = reconfig_params->ulWidth;
|
||||
decoder_create_info_.ulHeight = reconfig_params->ulHeight;
|
||||
decoder_create_info_.ulNumDecodeSurfaces = reconfig_params->ulNumDecodeSurfaces;
|
||||
decoder_create_info_.ulTargetHeight = reconfig_params->ulTargetHeight;
|
||||
decoder_create_info_.ulTargetWidth = reconfig_params->ulTargetWidth;
|
||||
decoder_create_info_.width = reconfig_params->width;
|
||||
decoder_create_info_.height = reconfig_params->height;
|
||||
decoder_create_info_.num_decode_surfaces = reconfig_params->num_decode_surfaces;
|
||||
decoder_create_info_.target_height = reconfig_params->target_height;
|
||||
decoder_create_info_.target_width = reconfig_params->target_width;
|
||||
|
||||
rocDecStatus rocdec_status = CreateSurfaces();
|
||||
if (rocdec_status != ROCDEC_SUCCESS) {
|
||||
|
||||
Reference in New Issue
Block a user