Skip to content

MCSTF optimization - #923

Open
GUNASRIJ11 wants to merge 23 commits into
Multicorewareinc:masterfrom
GUNASRIJ11:MCSTF-Optimization-updated
Open

MCSTF optimization#923
GUNASRIJ11 wants to merge 23 commits into
Multicorewareinc:masterfrom
GUNASRIJ11:MCSTF-Optimization-updated

Conversation

@GUNASRIJ11

Copy link
Copy Markdown

Summary

Adds multi-threaded execution and AVX2 SIMD kernels to Motion-Compensated Spatio-Temporal Filtering (MCSTF), decouples it from the badapt (B-adaptive) flow so it can run independently, and adds a noise-based selective mode plus test bench coverage.

Key changes

Multi-threading

  • Implemented multithreaded motion estimation for MCSTF to process ME rows in parallel.
  • Implemented a multi-threaded workflow for bilateralFilter
  • Added CLI --mcstf-ref-range to control param->mcstfFrameRange

AVX2 SIMD kernels

  • motionErrorLumaFrac (2.81x) , applyMotion (4.44x) , computeBlockStats (4.19x) and bilateralFilter (1.38x)

Algorithm/pipeline changes

  • Generate lowres planes using HM-equivalent averaging
  • Pruned unused computations in the MCSTF path
  • Decoupled MCSTF's HME (hierarchical motion estimation) from the b-adapt flow so MCSTF no longer depends on B-adaptive lookahead state

Selective MCSTF (noise-based)

  • Added --selective-mcstf CLI option to enable noise-based MCSTF filtering — skips filtering on frames whose estimated noise is low, saving cycles.

Testing

  • Added test bench support for MCSTF
  • Enabled profiling stats for MCSTF

Logaprakash-mcw and others added 10 commits July 23, 2026 19:15
The m_useSADinME conditionals are no longer required because m_useSADinME is always set to 0, causing the SSD-based motion error path to be selected unconditionally. Remove the unused SAD branches and invoke the SSD path directly. Also remove the unused average/variance computation and the associated leastError adjustment, as they do not affect motion vector selection or the final encoding result.
Generate low-resolution planes using the HM averaging method only when MCSTF is enabled. Otherwise, preserve the existing low-res pipeline.
@kirithika7
kirithika7 force-pushed the MCSTF-Optimization-updated branch from 91754bf to 66fe76a Compare July 23, 2026 14:07
@kirithika7
kirithika7 force-pushed the MCSTF-Optimization-updated branch 2 times, most recently from eb7a821 to 6b26de1 Compare July 24, 2026 12:10
@kirithika7
kirithika7 force-pushed the MCSTF-Optimization-updated branch from 6b26de1 to 40a49a2 Compare July 24, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants