Current Server Time: 22:06 (Central Europe)

#apertus IRC Channel Logs

2019/04/20

Timezone: UTC


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