Skip to content

fix useless copies of TempCtx objects to Ctx dest

This commit suppresses 12 useless copies of TempCtx to Ctx instances and is bit accurate.

Instructions of the form m_CABACEstimator->getCtx() = ctxStart trigs a copy of TempCtx to Ctx, which copies full contexts from src to dest. The usual way is to recopy only sub contextes : m_CABACEstimator->getCtx() = SubCtx(Ctx::CcSaoControlIdc,ctxStart);

Whenever the TempCtx is initialized with a subCtx, only initialized sub contextes should be copied and not the full range. This optimization takes place for code in :

  • SAO
  • ALF
  • CabacWriter.cpp

Merge request reports

Loading