Closed masc4ii closed 2 years ago
When stepping through the lines with my debugger, indx is correct until 2nd call of fc(...).
cfarray should be unsigned cfa[2][2] = { { 0, 1 }, { 1, 2 } };
but debugger tells it is kind of unsigned cfa[2] = { 0, 1 };
Should be the reason... but why this happens?!
All parameters const unsigned cfa[2][2]
are interpreted as 1D array of size 2, my debugger tells - also for other debayer algorithms. Only IGV is crashing.
I compared the code to another older igv implementation and got it working now. See my fix here:
https://github.com/ilia3101/MLV-App/commit/b1dfc6b610f4ba75358cfe1902061ae056d86d93
Feel free to commit in your repos...
@masc4ii Can you please make a PR with your changes?
Here you are: https://github.com/CarVac/librtprocess/pull/70
I tested this in MLVApp on Apple M1 natively.
In line 506 of igv.cc I always get a crash when trying to run the function. This line is code of the non-SS2 IGV version. I compiled on ARM which has no SS2. When changing line 44 to make use of this version on Intel CPUs, the same crash happens.
Line 503-507:
for (int row = 0; row < height - 0; row++)
for (int col = 0, indx = row * width + col; col < width - 0; col++, indx++) {
int c = fc(cfarray, row, col);
rgb[c][indx] = CLIP(rawData[row][col]); //rawData = RT datas
}
On crash, the debugger tells for my test: c = 2 indx = 484417 row = 0 col = 1 width = 1856 height = 1044
For me it looks like indx is wrong - but why?! I would expect indx = 1 at this time. Any idea?