Decoder reconfigure fixes. (#157)
* * rocDecode/HEVC: Fixed a couple of issues with reconfiguration of decoder when video size is changed.
- Picture width and height variables were interchangeably used to represent coded picture size and display size, resulting reconfiguration errors. Now we use different variables to represent coded and display sizes.
- Fixed a file overwriting issue in video size change case, where the display size can remain the same when coded size changes with specific cropping offsets.
* * rocDecode/HEVC: Added some fixes to decoder reconfiguration.
- Added support for MD5 calculation in reconfigure flush callback. This fixed MD5 check failure on conformance streams with size changes.
- Fixed total decoded frame number report with reconfigure when file dump or MD5 is not enabled. We need to call flush with reconfigure unconditionally (but with different actions).
- Added the missing reconfigure flush when coded size is not changed but display size is changed.
* * rocDecode/HEVC: Corrected an error in GetDecodedWidth() method. Should use coded_width_, instead of disp_width_.
[ROCm/rocdecode commit: ccd813a2da]
이 커밋은 다음에 포함됨:
@@ -186,7 +186,13 @@ int main(int argc, char **argv) {
|
||||
reconfig_params.p_fn_reconfigure_flush = ReconfigureFlushCallback;
|
||||
reconfig_user_struct.b_dump_frames_to_file = dump_output_frames;
|
||||
reconfig_user_struct.output_file_name = output_file_path;
|
||||
reconfig_params.reconfig_flush_mode = RECONFIG_FLUSH_MODE_DUMP_TO_FILE;
|
||||
if (dump_output_frames) {
|
||||
reconfig_params.reconfig_flush_mode = RECONFIG_FLUSH_MODE_DUMP_TO_FILE;
|
||||
} else if (b_generate_md5) {
|
||||
reconfig_params.reconfig_flush_mode = RECONFIG_FLUSH_MODE_CALCULATE_MD5;
|
||||
} else {
|
||||
reconfig_params.reconfig_flush_mode = RECONFIG_FLUSH_MODE_NONE;
|
||||
}
|
||||
reconfig_params.p_reconfig_user_struct = &reconfig_user_struct;
|
||||
|
||||
if (b_generate_md5) {
|
||||
@@ -195,7 +201,7 @@ int main(int argc, char **argv) {
|
||||
if (b_md5_check) {
|
||||
ref_md5_file.open(md5_file_path.c_str(), std::ios::in);
|
||||
}
|
||||
if (dump_output_frames) viddec.SetReconfigParams(&reconfig_params);
|
||||
viddec.SetReconfigParams(&reconfig_params);
|
||||
|
||||
do {
|
||||
auto start_time = std::chrono::high_resolution_clock::now();
|
||||
|
||||
새 이슈에서 참조
사용자 차단