Are White Balance gains applied before or after ADC?

At which point in the image processing pipeline does iOS apply the white balance gains which can be set via AVCaptureDevice.setWhiteBalanceModeLocked(with:completionHandler:)?

Are those gains applied in the analog part of the camera pipeline, before the pixel voltage gets converted via the ADC to digital values? Or does the camera first convert the pixel voltages to digital values and then the gains are applied to the digital values?

Is this consistent across devices or can the behavior vary from device to device?

Bump. If one of the DTS Engineers on this forum reads this message, could you please answer? Even adding a comment or a remark without fully answering the question would help me. Thank you.

I would simply like to know if the white balance settings acts like the ISO settings, which adjusts the (analog) voltage levels before they get converted via the ADC to discrete pixel values.

Are White Balance gains applied before or after ADC?
 
 
Q