public static int op_avg(int a, int b, byte[] cm_base, int cm_offset) { return (int)((((a) + cm_base[cm_offset + (((b) + 16) >> 5)] + 1) >> 1)); }