CoreMediaIO framework has two backend plugins: VDC (for USB-based cameras), and AppleCamera - for Apple's know-how ISP over pcie camera sensors. The VDC camera reports the current exposure value as expected, while AppleCamera always returns 0.0 for the current exposure.
I've traced this phenomena in AppleCamera binary down to the point where the framework receives the values from the sensor. Actually, regardless of what minimum/maximum/current exposure value is requested, they all always come out as a single vector of floats. Different offsets denote specific values:
Here, -3 and 3 are min/max allowed values for exposure, but the current value always comes out zero. Here is how they look as a vector altogether:
Here, 0.05 is something else, which does not change - maybe the focal distance.
Every camera sensor obviously can report the current exposure, which is essential for many image processing techniques. The VDC plugin does it. So what's the problem with the AppleCamera? A driver bug?
I've traced this phenomena in AppleCamera binary down to the point where the framework receives the values from the sensor. Actually, regardless of what minimum/maximum/current exposure value is requested, they all always come out as a single vector of floats. Different offsets denote specific values:
Code Block -> 0x10049b2c0 <+2293>: movss 0x60(%rdi), %xmm0 ; xmm0 = mem[0],zero,zero,zero (lldb) p *(float*)&$xmm0 (float) $30 = -3 -> 0x10049b2cc <+2305>: movss 0x64(%rdi), %xmm0 ; xmm0 = mem[0],zero,zero,zero (lldb) p *(float*)&$xmm0 (float) $33 = 3 (lldb) image lookup -a $pc Address: AppleCamera[0x000000000000310c] (AppleCamera.TEXT.text + 7036) Summary: AppleCamera`GetSuspendedByUser + 1857 -> 0x10049b110 <+1861>: movss 0x58(%rdi), %xmm0 ; xmm0 = mem[0],zero,zero,zero (lldb) p *(float*)&$xmm0 (float) $37 = 0
Here, -3 and 3 are min/max allowed values for exposure, but the current value always comes out zero. Here is how they look as a vector altogether:
Code Block (float) [20] = 0 (float) [21] = 0 (float) [22] = 0 (float) [23] = 0 (float) [24] = -3 (float) [25] = 3 (float) [26] = 0 (float) [27] = 0.0500000007 (float) [28] = 0 (float) [29] = 0 (float) [30] = 0 (float) [31] = 0
Here, 0.05 is something else, which does not change - maybe the focal distance.
Every camera sensor obviously can report the current exposure, which is essential for many image processing techniques. The VDC plugin does it. So what's the problem with the AppleCamera? A driver bug?