apertus-open-source-cinema / axiom-firmware

AXIOM firmware (linux image, gateware and software tools)
GNU General Public License v3.0
173 stars 54 forks source link

axiom_snap: Vtfl3 is always 0 in multi slope HDR mode, request to add Interleaved HDR #198

Closed JSiuda-Scanway closed 6 months ago

JSiuda-Scanway commented 1 year ago

I had an issue that vtfl3 in multislope HDR mode wasn't working as expected. I checked the code and found this line where value is shifted by 7 and then and operator is used with 0x7F value. This means that the final value will always be 0.

https://github.com/apertus-open-source-cinema/axiom-firmware/blob/6bc26c2a5fb2c482d27386ab83426027249585a8/software/sensor_tools/snap/snap.c#L804-L809

The solution is to swap the places of the previous operations.

set_cmv_reg(106, (get_cmv_reg(106) & ~(0x7F << 7)) | vtfl[1] & 0x7F) << 7)); 

Now it is not possible to use the Interleaved HDR mode with the axiom_snap command. It would be great if this feature could be added in the next version of the software.

se6astian-pi commented 1 year ago

Many thanks for the issue report and proposed fix. We will look into it!