I notice that the webpage http://www.exiftool.org/TagNames/PanasonicRaw.html provides great info on the tags used in Panasonic Lumix RW2 files, but it says nothing about the format of the actual raw pixel data that is stored. If somebody here know what that format is, please post it, thanks in advance.
I would suggest looking at how dcraw (https://www.cybercom.net/~dcoffin/dcraw/dcraw.c) decodes the raw data.
- Phil