View Full Version : BDSup2Sub++ - convert and tweak bitmap subtitle streams (VobSub,BD-SUP,BDN XML,HD-SUP
Selur
23rd January 2013, 17:08
I want to finish the last bit of memory and function profiling today.
keeping my fingers crossed :)
paradoxical
23rd January 2013, 17:34
:) Doing this profiling is rather eyeopening about how expensive so many functions in Qt can be to call repeatedly that you wouldn't necessarily expect. For example, calls on QImages for their height/width/bytesPerLine/etc which one would expect to be pretty quick can add up to being 50% or the instructions executed, talking a cost of 10s of millions, if the value is retrieved over and over through the accessor over just caching it once since they can get called half a million or more times due to all the loops.
paradoxical
24th January 2013, 22:47
Getting real close to posting an updated version. Should be ready by tomorrow. Patch set for merging will be pretty extensive, but the improvements to memory usage and speed are substantial. Which is also helping to run more memory profiling sessions in Valgrind due to the increased speed.
Selur
24th January 2013, 22:50
Nice! Hopefully Sassbot will apply the patch also in a timely fashion.
paradoxical
24th January 2013, 22:52
Yeah, I've been talking to him off and on through email and he should be able to merge them within a day or so of being sent the patches.
Selur
24th January 2013, 22:53
Nice! :D
Chetwood
25th January 2013, 11:30
BTW, is there a fast way to determine which of the 150+ VobSubs of a certain dir has some items flagged as forced?
paradoxical
25th January 2013, 22:07
Newly compiled version with all the performance and memory leak fixes is *link removed*. I've done quite a few test runs to check for bugs and haven't seen any, but please check in case I've missed anything. Patch diff for anyone who wants to compile their own is *link removed*. Should be merged by Sassbot in a day or so.
paradoxical
25th January 2013, 23:51
So of course something slipped through. Seems I found an integer overflow happened in the BDN+XML code which I haven't ever seen before with what was supposed to be a "long" integer. So I've now made all "long" into unsigned 64-bit integers to brute force solve that. :) Fixed executable is *link removed* and the new patch diff which contains both the previous fixes and this integer change is *link removed*.
paradoxical
26th January 2013, 00:11
Sassbot just emailed me and said he merged everything from the patches.
Selur
26th January 2013, 08:15
@paradoxical: Thanks + don't forget the Mac OS X binary. :)
Music Fan
26th January 2013, 16:19
@ paradoxical : have you managed to convert DVB-SUB (in TS) to sup ?
paradoxical
26th January 2013, 16:21
It's in progress but was sidetracked temporarily by trying to fix up the code in other areas which is what gave the speed/memory leak fixes. I'll let you know when I have something ready for you to test.
Music Fan
26th January 2013, 16:52
Thanks, take your time, it's not urgent ;)
r0lZ
26th January 2013, 17:05
A little improvement, if it's possible: can you try to suppress the irritating console window that pops up then the program is launched (including when it is launched from another program with command line arguments)?
paradoxical
26th January 2013, 19:36
@paradoxical: Thanks + don't forget the Mac OS X binary. :)
Doing so now. I realized I had to recompile my Qt to be statically linkable.
Selur
26th January 2013, 19:37
I realized I had to recompile my Qt to be statically linkable.
yup :)
paradoxical
26th January 2013, 19:38
A little improvement, if it's possible: can you try to suppress the irritating console window that pops up then the program is launched (including when it is launched from another program with command line arguments)?
There's nothing that can be done. It's the side effect of having a Qt app on Windows that can be both GUI and CLI. The only alternative is separate apps which is a pain in the ass. Other OSes have no such issue. If you want a fix contact the Qt people.
Selur
26th January 2013, 19:39
including when it is launched from another program with command line arguments
that is a problem of the other application (I know this can be suppressed, since bdsup2sub++ doesn't 'popup' in Hybrid)
paradoxical
26th January 2013, 19:54
yup :)
Well it's that I thought I had compiled it with the static option, until I checked.
paradoxical
27th January 2013, 01:33
Ok try *link removed*, Selur.
Selur
27th January 2013, 10:24
Ok try this, Selur.
-> only throws a 'Illegal instruction: 4' on Mac OS X 10.7.5 Lion :(
r0lZ
27th January 2013, 12:10
There's nothing that can be done. It's the side effect of having a Qt app on Windows that can be both GUI and CLI. The only alternative is separate apps which is a pain in the ass. Other OSes have no such issue. If you want a fix contact the Qt people.
that is a problem of the other application (I know this can be suppressed, since bdsup2sub++ doesn't 'popup' in Hybrid)
OK, thanks. I'll try to redirect stdin, stdout and stderr. I suppose the QT console is there to connect them to something, right?
Selur
27th January 2013, 12:18
I suppose the QT console is there to connect them to something, right?
I only connect to stdout and stderr of bdsup2sub++ (in Qt bdsup2sub++ doesn't popup if you simply start a process with it instead of starting a detached process).
r0lZ
27th January 2013, 12:41
OK, I will try. Thanks again.
paradoxical
27th January 2013, 18:17
-> only throws a 'Illegal instruction: 4' on Mac OS X 10.7.5 Lion :(
Hmmm... Okay, let me check my settings for compile. Make sure things weren't set at minimum 10.8.
Edit: I think I know the prob. I have the latest Mac Mini which means it compiled with support for all SIMD stuff through AVX which is more likely the issue. I guess I'll limit my Qt to only SSE3 which should work for a minimum Core2Duo.
paradoxical
27th January 2013, 20:36
Selur, try this *link removed*. Compiled min 10.7 with nothing beyond SSE3.
digitall.h
27th January 2013, 20:54
Hi Sassbot, hi @all.
I'm trying to compile BDSup2Sub++ in Linux Mint KDE 13.
I have all build packages installed, and also installed libqxt 0.6.1 (this is the version in repositories).
I downloaded source from https://github.com/amichaelt/BDSup2SubPlusPlus (here)
When I qmake in terminal I get this error:
WARNING: /usr/share/qt4/mkspecs/features/qxt.prf:7: Variable QMAKE_RPATH is deprecated; use QMAKE_LFLAGS_RPATH instead.
When I then make in terminal, it throws a long lost of errors (I may paste if you think it's necessary) and exits with error 1, and compiling nothing.
What am I doing wrong?, wrong tools version?. Do you need further information to help me compiling?.
:confused:
paradoxical
27th January 2013, 21:07
That's not really an error. But, sure if you can post the line you're using to compile and the part where the errors start I can try to help you. Also the version of your compiler is needed too. You need to make sure to be using either Clang 4.x or GCC 4.7.x or higher.
Edit to add: Your version of Qt also needs to be compiled with C++11 support since this code uses initializer lists for Qt containers.
digitall.h
27th January 2013, 21:34
Thank you paradoxical.
Probably I decided to try a task too big for me.
I don't almost compile anything by myself. I install programs and tools from repositories.
Please tell me how can I check my Clang and GCC versions.
In terminal Clang -h tells me that Clang is not installed (probably that's a problem to begin with). And gcc -h throws an error about missing files (this might not be the way to check gcc version :( )
My compiling code in terminal is just qmake BDSup2Sub++.pro, and after the warning message make.
I also did not compile Qt myself, it is as it was in the repositories, don't know if it was compiled with C++11 support. Also don't know how to check it...
Do you think I will manage to compile it in my system?. I looked for a Linux (Debian) binary with no success...
:thanks:
paradoxical
27th January 2013, 21:37
To find your version type "g++ --version". If you didn't compile Qt yourself it probably isn't compiled with C++11 support. I guess I'll change the pro file so it verifies you have C++11 support and then just errors out so compiling never happens.
digitall.h
27th January 2013, 22:34
Aaarrrggghhhh,
GCC version 4.6.6
I'm afraid I won't be able to compile BDSup2Sub++ on my system.
And I don't have the time/skill to build in a virtual machine a Linux version just for compiling purposes.
Is it possible anybody compiled it and can provide binaries for Linux 64bit?.
:)
paradoxical
27th January 2013, 22:38
You can always ask someone in Mint to put it in their repos.
paradoxical
28th January 2013, 00:19
So I now have collaborator access to Sassbot's repo so I can push changes directly. I've fixed the pro file so that it first checks that your Qt libraries are configured with C++11 support and give you an error message and fail out if not.
digitall.h
28th January 2013, 02:10
I suppose it's not possible to make compilation compatible with other configuration, specifically with previous GCC versions, no C++11 compatibility and so, isn't it?
:(
I don't know if common 'buntu users will have this specifications here in Linux world.
:)
paradoxical
28th January 2013, 03:58
I suppose it's not possible to make compilation compatible with other configuration, specifically with previous GCC versions, no C++11 compatibility and so, isn't it?
:(
Not without a ton of ifdefs and added code that I don't really want to do. C++11 is the future and Qt5 compiles with C++11 support by default. bdsup2sub++ also compiles with Qt5 just fine. It's been ifdefed to account for the header movement.
I don't know if common 'buntu users will have this specifications here in Linux world.
:)
GCC 4.7.2 is the default g++ in Ubuntu 12.10. So it will get more common. There are also ppas for GCC 4.7.x for both Lucid and Precise here: https://launchpad.net/~ubuntu-toolchain-r/+archive/test so the toolchain can be pulled down. I don't really run Linux outside of doing some Valgrind testing on it in a VM, so I'm not really all that interested in doing ppas for Ubuntu myself. Windows and OS X are my main systems. Like I said, I suggest you ask someone who runs your repos if they can make a package for you.
paradoxical
28th January 2013, 15:54
So I'm refreshing the builds bumping the version number to 1.0.1 since I believe all my changes warrant so and I've created a tag to match the current builds. Selur *link removed* the OS X binary. Posting the new Windows binary with bumped version number shortly.
Edited to add:
Here (https://www.dropbox.com/s/6429efffiwxlj7u/bdsup2sub%2B%2B.7z) is the new Windows binary.
Edited to add again:
I'm going to fix the OS X binary I posted. The Qt it is statically linked with apparently was using my system's libjpeg instead of the built-in Qt libjpeg. If anyone already downloaded the previous binary and wants to use it, you will need to know you need to install libjpeg.8.dylib into /opt/local/lib/. Otherwise, just wait until I fix it in about 4 hours.
Guest
28th January 2013, 22:41
The discussion for this tool is moving to:
http://forum.doom9.org/showthread.php?p=1613303
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.