Refactor imir implementation to match HEIF Draft Amendment 2, which replaces 'axis' with 'mode' and inverts the behavior