Add resampler and stats
Change flag defs merge HG and IR