I'm investigating about using Xiaomi Yi RAW files under GNU/Linux. I noticed they are RAW RGGB Bayer so cannot be open directly with dcraw/ufraw/rawtherapee.
I found the website of raw2dng and the source code of the last available version is public.
http://e2500.narod.ru/raw2dng_e.htm
It isn't portable so I made some minor changes to compile with g++ under GNU/Linux, obtaining a working raw2dng and raw2nef command line tools.
Now I can convert single shot RAW files with this configuration:
31850496, 0, 4608, 3456, 7, 9216, 16, 4, XIAOMI-YI
Then I can open the DNG with rawtherapee. I noticed that colors are a bit flat and without auto white balance pictures are "reddish" and dark. I have to investigate further (and any suggestion is welcome!).
The problem is that I wanna use time lapse. In this case the Xiaomi Yi produces compressed RAW files of ~13MiB (and I don't want to use script for time lapse because I want to be free to change shooting mode with the app). With this configuration I can convert RAW files to DNG:
13492224, 0, 4608, 3456, 7, 3904, 16, 4, XIAOMI-YI-COMP
I can open DNG in rawtherapee and I can glimpse the picture (sort of... compressed of the left, using 1/3 of the lenght of the image and with altered colors), but in fact they are unusable... I'm close but I think there is a bits order/depth problem (or there is A-law or DPCM compression?)... and it cannot be solved simply with the configuration parameters...
I wrote to paul69 asking him to collaborate, but it seems a project abandoned in 2005~2006. I cannot find Copyright on the website or in the comments of the source code and there is not a LICENSE file or so. I could submit the project on my github account, but it would be a bit abusive... I would prefer collaborate with paul69. In case he will not reply me, I'll submit the code to github by myself (as a fork, with credits).
I'm looking for the IMX206 datasheet or any other tech spect that can help me to understand compressed RAW format.