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]
이 커밋은 다음에 포함됨:
jeffqjiangNew
2024-01-09 10:51:30 -05:00
커밋한 사람 GitHub
부모 b0ffeffb8f
커밋 8c8904761d
4개의 변경된 파일89개의 추가작업 그리고 68개의 파일을 삭제
+8 -2
파일 보기
@@ -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();