Single pixel size error in raw_width will result in distorted picture (like synchro loss on old analog TV), so raw_width/raw_height values are indeed right in LibRaw.
Visible (non masked) area is a matter of taste: LibRaw specifies 'as much as possible' (full visible area), while in-camera JPEGs (and, so, vendor advertized image size) may be slightly less than full area.
Single pixel size error in raw_width will result in distorted picture (like synchro loss on old analog TV), so raw_width/raw_height values are indeed right in LibRaw.
Visible (non masked) area is a matter of taste: LibRaw specifies 'as much as possible' (full visible area), while in-camera JPEGs (and, so, vendor advertized image size) may be slightly less than full area.