To create a pre-multiplied/associated alpha pixel format with half-precision (16bit) floating point numbers (with the sRGB primaries and sRGB transfer response cruves) one used to do: babl_format("RaGaBaA half")
There now is a new function, babl_format_new_with_space (const char *format_str, const Babl *rgb_space), that can be used like this: babl_format_new_with_space ("RaGaBaA float", babl_space("ProPhoto"));
The resulting format can be used like any other babl format, doing conversions between in-memory buffers, thus being passed for construction with a GeglBuffer which uses babl for defining pixel formats and in API to read and write data.
One can also create such babl spaces from CIE xy primaries + whitepoint, from provided a RGBtoXYZ matrix as they exist in ICC profiles as well as const Babl *babl_space_from_icc (const char *icc, int icc_length, char **error); that retrieves this information from an in-memory matrix RGB ICC profile.
The API and implementation are works in progress, development is happening in git master nevertheless - since it consists only of API additions and minimal interference with inner mechanics of the existing mechanics of babl. Math is derived from Bruce Lindbloom's website and comparing numbers with Elle Stone's article sRGB color space to profile. Such fresh code is bound to have mistakes, but logic and constants will receive further attention towards correctness, performance and accuracy.
The first place GIMP is likely to experiment with making use of this, is for handling the conversion between the projection, the resulting buffer of an image, and display, but that wont happen or be enabled until the babl methods for making/choosing fast-paths that are accurate in babl also has made this fast.
In other news unrelated to the API breakthrough, a fresh GEGL-0.3.18 release has been made, see http://gegl.org/NEWS.html, in time for an anticipated GIMP-2.9.6 development release.