Skip to content
Snippets Groups Projects

fix mismatch between debug and release version

Merged Huanbang Chen requested to merge chenhuanbang/VVCSoftware_BMS:K0185_AFFINE_BUGFIX into master
1 unresolved thread

Fix different coding results in debug and release version

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • I would like to understand a bit more here. The bug report 76 says something about uninitialized variables. Which variable is uninitialized? Generally the fix for such issues is to initialize the variables. Why is it not the case here? Does this change modify the behaviour in both debug and release builds? Is there a particular test case that can be used to reproduce the issue?

  • 2840 2840
    2841 2841 if ( m_pcEncCfg->getFastMEForGenBLowDelayEnabled() && iRefList == 1 ) // list 1
    • Author Contributor

      The mismatch was caused here. For the ME of 6-parameter affine mode, the best refidx of 4-parameter affine mode is reused, and other refidx is skipped. But if slice.getList1IdxToList0Idx( refIdx4Para[1]) != refIdx4Para[0], the ME for refIdx4Para[0] is skipped, which leads to the uninitialized variables uiCostTempL0[iList1ToList0Idx] and uiBitsTempL0[iList1ToList0Idx].

    • Ok. So the issue is not just a mismatch between debug and release builds. The encoder was potentially doing bad decisions in either build. Correct?

    • Author Contributor

      Yes. The performance might vary according to version of compiler, platform. But I ran VTM 2.0 complied by GCC 6.3.0 under Ubuntu 14.04 and VS 2015 under Microsoft Server 2012. All bit-streams are same in such test.

    • Do you expect the results with gcc 6.3 to changes before and after this patch is applied?

    • Author Contributor

      Results are changed after this patch. Another solution without changes under gcc 6.3 release build is attached. (Modify the type of variable **uiBitsTempL0 **from "uint32_t" to "static uint32_t", to align debug results to release results.)

      0001-hacking-bug-fix-solution.patch

    • Thank you for being creative. This alternative doesn't look like a clean fix though.

    • Please register or sign in to reply
  • Frank Bossen resolved all discussions

    resolved all discussions

  • merged

  • Frank Bossen mentioned in commit c55f6f0d

    mentioned in commit c55f6f0d

  • Please register or sign in to reply
    Loading