Just a note. There may be more than one copies of the palette in RAM.
In cameras I've seen, there is
- a block in RAM which contains all palettes
- another block in RAM which contains the currently active palette. Whenever the camera selects a new palette, it is copied here.
DIGIC 5 cams may do this differently though.