Arduino IDE compatibility with ATmega2561

I'm not seeing anything obvious there.
I don't quite understand what this line does:

#define analogInputToDigitalPin(p)  ((p < 8) ? (p) + 46 : -1)

when the analogs are 46 to 53.