Current Server Time: 14:24 (Central Europe)

#apertus IRC Channel Logs

2019/04/20

Timezone: UTC


03:47
Bertl_oO
off to bed now ... have a good one everyone!
03:47
Bertl_oO
changed nick to: Bertl_zZ
07:36
BAndiT1983|away
changed nick to: BAndiT1983
07:39
Nira|away
changed nick to: Nira
07:55
Nira
changed nick to: Nira|away
08:19
futarisIRCcloud
left the channel
08:56
Dev_
joined the channel
08:59
Dev_
Hi BAndiT1983
09:01
Dev_
I was trying to load sample MLV to opencine by making changes to presenter - > https://github.com/apertus-open-source-cinema/opencine/blob/master/Source/ProcessingTest/Presenters/ProcessingPresenter.cpp
09:02
BAndiT1983
hi Dev_
09:02
Dev_
but it failed by giving this error messages . https://pastebin.com/g6izYEc0
09:02
BAndiT1983
can't see much there, besides that pre-processing failed, have you tried to debug it?
09:03
Dev_
FATAL CRASH HANDLED; Application has crashed due to [SIGSEGV] signal , - > is it related to size
09:04
Dev_
I guess
09:04
BAndiT1983
as i said, there is not much info, but look at the line before, it relates to extracting
09:05
BAndiT1983
search for "Extracting" in the processor and look what it does
09:07
Dev_
It looks like the error is in Bayerframeprocess
09:07
Dev_
https://github.com/apertus-open-source-cinema/opencine/blob/master/Source/OCcore/Image/MLVLoader.cpp
09:08
Dev_
When removing frameProcess object , it compiles error free
09:08
Dev_
on like 172
09:08
Dev_
line*
09:08
BAndiT1983
what should removing it achieve?
09:09
Dev_
I was tring to find the source
09:09
Dev_
of error
09:10
BAndiT1983
the source is in the bayer pre-processor
09:10
BAndiT1983
besides that the MLV loader is a prototype, the method should be split in smaller ones, also i have to think about proper separation of data and processing
09:12
Dev_
yes , I can see this need
09:12
BAndiT1983
check extraction in the processor, as it was the last step before the crash
09:13
BAndiT1983
set a breakpoint there or wait till it crashes in debugger, inspect the stack trace and related values in the watch window
09:14
Spirit532
left the channel
09:15
Spirit532
joined the channel
09:15
BAndiT1983
Dev_, which MLV sample do you use?
09:17
Dev_
https://www.magiclantern.fm/forum/index.php?topic=11899.0 from here
09:18
Dev_
set a breakpoint there or wait till it crashes in debugger, : - Yes i am doing it
09:18
BAndiT1983
will do it also, which file do you use exactly
09:18
BAndiT1983
?
09:20
Dev_
http://dl.phreekz.de/raw2cdng/ML_Samples/M11-1526.VB.mlv , This one
09:29
BAndiT1983
will add an option for loading MLV files, as currently only DNG is supported in the dialog
09:34
Dev_
left the channel
09:54
Dev_
joined the channel
09:55
Dev_
I have made changes for that
09:56
Dev_
I am first checking the extension of _currentPath and then calling the suitable function
09:57
Dev_
for MLV or DNG
09:58
BAndiT1983
why do you need to check the path, if the open dialog is already giving you selected filter back?
09:58
BAndiT1983
you can use it, to select right format, e.g. by creating an array of formats in the order of file filters
10:05
Dev_
Yes, QFileDialog::getOpenFileName gives us _currentFilepath
10:05
Dev_
am checking that only
10:06
Dev_
but to call load function for either DNG or MLV , I am checking it the extension
10:06
Dev_
it's (_currentFilePath)
10:09
BAndiT1983
again the question why? as the dialog tells you which filter was selected, which is quicker, than path comparison
10:15
futarisIRCcloud
joined the channel
10:20
Dev_
understood, Qfileinfo gives information about path , And we can use it
10:20
Dev_
https://github.com/apertus-open-source-cinema/opencine/blob/master/Source/ProcessingTest/Presenters/ProcessingPresenter.cpp ,
10:21
Dev_
line 173
10:21
Dev_
instead of path comparision
10:22
BAndiT1983
currently looking up, if we can access the index, instead of filter name, not only performance is important but simplicity of the task
10:27
BAndiT1983
Dev_, jsut be aware of, that QFileInfo data is only partially reliable, as the extension will contain several parts, if there are more dots in the file name
10:30
Dev_
Yes
10:30
Dev_
But right now std::string extension = _currentFilePath.substr(_currentFilePath.find_last_of(".") + 1);
10:31
BAndiT1983
as the method lacks index, probably mixed it up with other UI frameworks i've used, we can create dedicated string and compare their characters at the beginning
10:31
Dev_
I am doing this to check the file extension
10:31
BAndiT1983
i understand, but this shortcoming of qt is not i would have expected in first place
10:32
BAndiT1983
*what i
10:39
BAndiT1983
Dev_, have you also added conversion to upper or lower case for extension? ->
10:39
BAndiT1983
std::string extension = _currentFilePath.substr(_currentFilePath.find_last_of(".") + 1);
10:39
BAndiT1983
std::transform(extension.begin(), extension.end(), extension.begin(), ::tolower);
10:40
BAndiT1983
to avoid the need to check all possible variants, as linux is picky there
10:41
Dev_
Yes same thing , converting the extension to lowercase and checking it
10:41
BAndiT1983
very good
10:41
Dev_
and call suitable load function
10:41
BAndiT1983
on my machine the crash occurs in the downscaler on line 52
10:41
BAndiT1983
the load should be going on automatically
10:42
BAndiT1983
have this quick and dirty solution for now ->
10:42
BAndiT1983
FileFormat format = FileFormat::DNG;
10:42
BAndiT1983
std::string extension = _currentFilePath.substr(_currentFilePath.find_last_of(".") + 1);
10:42
BAndiT1983
std::transform(extension.begin(), extension.end(), extension.begin(), ::tolower);
10:42
BAndiT1983
if(extension == "mlv")
10:42
BAndiT1983
{
10:42
BAndiT1983
format = FileFormat::MLV;
10:42
BAndiT1983
}
10:42
BAndiT1983
OC_LOG_INFO("Loading image");
10:42
BAndiT1983
provider->Load(_currentFilePath, format, *_image.get(), *poolAllocator);
10:43
Dev_
yes i am using this right now for loading MLV
10:43
BAndiT1983
just as a note, mostly to me, somehow it slipped my inspection, that the downscaler has some things, which violate coding guidelines, like missing _ for private vars
10:44
BAndiT1983
great, then you are on the good track there
10:44
Dev_
No problem , i will change it
10:44
Dev_
formatting
10:44
Dev_
also BayerFrameDownscaler::Extract(int jump)
10:44
Dev_
This is giving error
10:45
BAndiT1983
like i wrote, it's line 52 there
10:45
Dev_
name of file , BayerDownscaler ?
10:45
BAndiT1983
dataUL seems to be nullptr
10:46
BAndiT1983
BayerFrameDownscaler.cpp
10:46
BAndiT1983
haven't looked for quite a while into OC, as other tasks were more important
10:46
BAndiT1983
but we have to raise the quality and add more unit tests, split methods, remove junk code
10:46
BAndiT1983
junk code -> commented out, dead code etc.
10:49
Dev_
I understand , I will try to look more
10:49
Dev_
Thanks
10:50
BAndiT1983
please create a pull request, if you have completed bug fixes etc.
10:52
BAndiT1983
ah, i see the problem, dataUL and other vars, are never initialized, so it crashes
10:53
Dev_
At present , I have just inculded loading for DNG and MLV files , is it okay to push it into main Branch
10:53
Dev_
included*
10:53
vup2
What about looking at the header of a file instead of its extension to determine the file format?
10:54
BAndiT1983
vup2, it's possible but requires more processing there to determine file format
10:54
BAndiT1983
and it's more difficult to accomplish in smart way, without introducing many side paths
10:54
BAndiT1983
Dev_, i know what the problem is
10:55
BAndiT1983
please add MapPatternToData(); at the end of SetData(), there are 2 of them, but one lacks this method
10:55
BAndiT1983
don't like the route i have taken back then and will rework it soon, but first it has to be evaluated which data is required and similar
10:57
BAndiT1983
vup2, but the idea is rather nice to add some straight forward checker for the starting bytes of the file, in our case it's rather simple as TIFF and DNG start with certain characters
10:57
vup2
Sure, it won't be perfect, but maybe aleast as a fallback if the file extension is unknown or the file fails to load with the specified extension would be nice imo
10:57
BAndiT1983
yep
10:58
BAndiT1983
Dev_, image loads after the adjustments, but it shows wrong colors
10:59
BAndiT1983
vup2, thinking of adding specialized method to the loaders for sanity check of the file format, what do you think about it? it would loop through the loaders and try to find correct one
11:00
BAndiT1983
with CPUs nowadays we have more power, than required, especially when i see extensive Java use, like in my company
11:02
Dev_
yes , its working now
11:03
BAndiT1983
do you also have color overflow?
11:03
BAndiT1983
if yes, then it's seems like byte swapping is missing
11:04
Dev_
https://pasteboard.co/IaZYIKh.png
11:04
Dev_
yes
11:04
vup2
BAndiT1983: yeah, I think that should work fine
11:05
BAndiT1983
exactly, but your file seems to be different
11:05
vup2
There could be some file formats, that are indistinguishable from each other, so adding a manual override would also be nice, but that can probably be done later
11:06
Dev_
https://lab.apertus.org/T772 , I thought , it worked fine once
11:06
BAndiT1983
vup2, not really a problem to add some flags there, will create a prototype
11:06
vup2
yep, great
11:06
BAndiT1983
Dev_, just try to change to bayerframepreprocessor from downscaler
11:07
vup2
(also i think the performance aspect is negligible, as the debayering and other processing will probably take the most time anyways)
11:16
BAndiT1983
Dev_, quick and dirty solution for colors, has to be placed in MLVLoader/Load() ->
11:16
BAndiT1983
for(int i = 0; i < size; i += 2)
11:16
BAndiT1983
{
11:16
BAndiT1983
uint8_t temp = sourceData[i];
11:16
BAndiT1983
sourceData[i] = sourceData[i + 1];
11:16
BAndiT1983
sourceData[i + 1] = temp;
11:16
BAndiT1983
}
11:16
BAndiT1983
before ->
11:16
BAndiT1983
frameProcessor->SetData(sourceData, image, imageFormat);
11:18
vup2
std::swap ...
11:19
Dev_
It is for byteswapping
11:19
Dev_
yes vup2
11:19
Dev_
i will try to use std::swap
11:19
BAndiT1983
had a solution with shifts before, as swap performance wasn't benchmarked by me before
11:21
BAndiT1983
ok, lets settle with std::swap for now, we have other problems, than performance currently
11:22
BAndiT1983
one thing which is still not added for MLV, the check for swapping, usually it's required, as the cannon uses ARM, but it could change at some point
11:22
BAndiT1983
*canon
11:23
Dev_
https://pasteboard.co/Ib069Rb.png
11:23
Dev_
done
11:23
BAndiT1983
what about lower part?
11:23
BAndiT1983
my image is fully visible, without artifacts
11:27
BAndiT1983
also yuick and dirty solution, but this should work -> for(unsigned int i = 0; i < size - 2; i += 2)
11:27
BAndiT1983
{
11:27
BAndiT1983
std::swap(sourceData[i], sourceData[i + 1]);
11:27
BAndiT1983
}
11:27
BAndiT1983
*quick
11:28
BAndiT1983
size - 2 is used to prevent array boundary overflow
11:32
Dev_
yes i am seeing
11:32
BAndiT1983
sometimes it crashes, will check on it when i have some time later, off for now
11:32
BAndiT1983
changed nick to: BAndiT1983|away
11:34
BAndiT1983|away
changed nick to: BAndiT1983
11:34
BAndiT1983
changed nick to: BAndiT1983|away
11:44
Dev_
left the channel
11:55
Bertl_zZ
changed nick to: Bertl
11:55
Bertl
morning folks!
12:19
BAndiT1983|away
changed nick to: BAndiT1983
12:20
Dev_
joined the channel
12:20
Dev_
Good Morning Bertl
12:21
Dev_
BAndiT1983: It is giving full image now
12:21
Dev_
Thanks for help !
12:22
Dev_
I will commit changes
12:23
Dev_
left the channel
12:29
futarisIRCcloud
left the channel
12:33
comradekingu
joined the channel
12:53
Bertl
off for now ... bbl
12:53
Bertl
changed nick to: Bertl_oO
16:24
Dev_
joined the channel
16:24
Ashu
joined the channel
16:25
Ashu
left the channel
16:33
Dev_
left the channel
16:40
BAndiT1983
changed nick to: BAndiT1983|away
17:27
dailylama
joined the channel
17:28
dailylama
left the channel
18:02
Bertl_oO
off to bed now ... have a good one everyone!
18:02
Bertl_oO
changed nick to: Bertl_zZ
18:34
BAndiT1983|away
changed nick to: BAndiT1983
20:20
Spirit532
left the channel
20:50
Spirit532
joined the channel
21:12
danieel
left the channel
21:16
danieel
joined the channel
21:23
Dev_
joined the channel
21:23
Dev_
BAndiT1983: I have created another pull request to dev branch , please check
21:24
Dev_
left the channel
21:25
BAndiT1983
Dev_, seen it, will check tomorrow, it's rather late here
21:26
BAndiT1983
changed nick to: BAndiT1983|away
21:37
comradekingu
left the channel
21:41
danieel
left the channel
21:56
danieel
joined the channel