two patches for vframe.C and trackcanvas.C
I used cppcheck 2.7.4 on cingg sources again and it spotted uninitialized variable in trackcanvas.C I hope I fixed it right. also I copy/pasted https://github.com/vanakala/cinelerra-cve/commit/167b63df12cc4106359645d1752... "Align VFrame rows to 16 byte boundary Should make video transformations more cpu cache friendly" it compiles and runs - can anyone check performance impact?
So far no difference in "framerate achieved" with/without "align-frame" when playing BigBuckBunny on this laptop, but not a fair test because it is a pretty good computer. Am testing on an older computer now, but have to build first and that computer is really, really slow so will take quite some time. On Sun, Apr 10, 2022 at 5:42 PM Andrew Randrianasulu via Cin < [email protected]> wrote:
I used cppcheck 2.7.4 on cingg sources again and it spotted uninitialized variable in trackcanvas.C
I hope I fixed it right.
also I copy/pasted
https://github.com/vanakala/cinelerra-cve/commit/167b63df12cc4106359645d1752...
"Align VFrame rows to 16 byte boundary Should make video transformations more cpu cache friendly"
it compiles and runs - can anyone check performance impact?
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
https://github.com/vanakala/cinelerra-cve/commit/167b63df12cc4106359645d1752...
"Align VFrame rows to 16 byte boundary Should make video transformations more cpu cache friendly"
it compiles and runs - can anyone check performance impact?
Uh,oh. Tested on an older HP laptop, but not using Big Buck Bunny and after loading and then playing, it immediately crashes. writing debug data to /tmp/cinelerra_853654.dmp lock_items: 22 lock_frees: 4 ** dump complete Segmentation fault (core dumped) I assume it is the 0002-align-vframe... causing the crash and not 0001-cppcheck... Will test some more later just to make sure.
File tested with was elephants-dream.webm. It is definitely the 002-align-frame.. causing the crash. On Sun, Apr 10, 2022 at 8:30 PM Phyllis Smith <[email protected]> wrote:
https://github.com/vanakala/cinelerra-cve/commit/167b63df12cc4106359645d1752...
"Align VFrame rows to 16 byte boundary Should make video transformations more cpu cache friendly"
it compiles and runs - can anyone check performance impact?
Uh,oh. Tested on an older HP laptop, but not using Big Buck Bunny and after loading and then playing, it immediately crashes. writing debug data to /tmp/cinelerra_853654.dmp lock_items: 22 lock_frees: 4 ** dump complete Segmentation fault (core dumped) I assume it is the 0002-align-vframe... causing the crash and not 0001-cppcheck... Will test some more later just to make sure.
ops, sorry ( then I guess this change not for us.... On Monday, April 11, 2022, Phyllis Smith <[email protected]> wrote:
File tested with was elephants-dream.webm. It is definitely the 002-align-frame.. causing the crash.
On Sun, Apr 10, 2022 at 8:30 PM Phyllis Smith <[email protected]> wrote:
https://github.com/vanakala/cinelerra-cve/commit/ 167b63df12cc4106359645d1752e0f2136ec7a7f
"Align VFrame rows to 16 byte boundary Should make video transformations more cpu cache friendly"
it compiles and runs - can anyone check performance impact?
Uh,oh. Tested on an older HP laptop, but not using Big Buck Bunny and after loading and then playing, it immediately crashes. writing debug data to /tmp/cinelerra_853654.dmp lock_items: 22 lock_frees: 4 ** dump complete Segmentation fault (core dumped) I assume it is the 0002-align-vframe... causing the crash and not 0001-cppcheck... Will test some more later just to make sure.
Tried both patches with no problems. No core dumps or error messages. Playback is similar to that with CinGG-appimage (without patches).
On Mon, 11 Apr 2022, Andrea paz via Cin wrote:
Tried both patches with no problems. No core dumps or error messages. Playback is similar to that with CinGG-appimage (without patches).
In the build system of CGG not all the actual dependencies on the C++ header files are defined. It is very likely that a simple `make all' after change in some .h header file will recompile some .C files and not recompile some other .C files which depend on the changed header. A probable result will be inconsistency in memory layout of the internal variables in the C++ object whose header has been changed: for example, some assume frames are 16-byte aligned, some other assume they are aligned differently. Such inconsistency can manifest itself, most likely, in a SEGV, but any other quirks are also possible. To test if it could be the case is easy: a complete fresh build with preceding clean-up of all the .o, .a, and .so files. _______________________________________________________________________________ Georgy Salnikov NMR Group Novosibirsk Institute of Organic Chemistry Lavrentjeva, 9, 630090 Novosibirsk, Russia Phone +7-383-3307864 Email [email protected] _______________________________________________________________________________
On Monday, April 11, 2022, Georgy Salnikov via Cin < [email protected]> wrote:
On Mon, 11 Apr 2022, Andrea paz via Cin wrote:
Tried both patches with no problems. No core dumps or error messages. Playback is similar to that with CinGG-appimage (without patches).
In the build system of CGG not all the actual dependencies on the C++ header files are defined. It is very likely that a simple `make all' after change in some .h header file will recompile some .C files and not recompile some other .C files which depend on the changed header. A probable result will be inconsistency in memory layout of the internal variables in the C++ object whose header has been changed: for example, some assume frames are 16-byte aligned, some other assume they are aligned differently. Such inconsistency can manifest itself, most likely, in a SEGV, but any other quirks are also possible.
run into this while testing attached path (I hoped to fix ppc crash, but not yet booted qemu..)
To test if it could be the case is easy: a complete fresh build with preceding clean-up of all the .o, .a, and .so files. ____________________________________________________________ ___________________
Georgy Salnikov NMR Group Novosibirsk Institute of Organic Chemistry Lavrentjeva, 9, 630090 Novosibirsk, Russia Phone +7-383-3307864 Email [email protected] ____________________________________________________________ ___________________
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Checked into GIT 0001-cppcheck-in-trackcanvas.C.patch -- always a good idea to initialize variables
Tried both patches with no problems. No core dumps or error messages. Playback is similar to that with CinGG-appimage (without patches). Andrea, I have attached small test file which crashes every time for me. This is what I get with the attached test:
audio0 pad 16 0 (16) FFMPEG::open_decoder: some stream times estimated: /root/media1/elephants-dream.webm FFMPEG::open_decoder: some stream times estimated: /root/media1/elephants-dream.webm cin: malloc.c:4036: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed. Aborted (core dumped)
Andrew, keep checking for potential other improvements out there because you never know what you might find. In the build system of CGG not all the actual dependencies on the C++ header
files are defined. It is very likely that a simple `make all' after change in some .h header file will recompile some .C files and not recompile some other .C files which depend on the changed header.
...
To test if it could be the case is easy: a complete fresh build with preceding clean-up of all the .o, .a, and .so files.
Thanks for the reminder because it makes a big difference. Because I have gotten bit by this so many times, I just routinely do "make clean" and then run "bld.sh" that way I know I am testing what I think I am AND I get a coffee break.
On Monday, April 11, 2022, Phyllis Smith <[email protected]> wrote:
Checked into GIT 0001-cppcheck-in-trackcanvas.C.patch -- always a good idea to initialize variables
Tried both patches with no problems. No core dumps or error messages. Playback is similar to that with CinGG-appimage (without patches). Andrea, I have attached small test file which crashes every time for me. This is what I get with the attached test:
audio0 pad 16 0 (16) FFMPEG::open_decoder: some stream times estimated: /root/media1/elephants-dream.webm FFMPEG::open_decoder: some stream times estimated: /root/media1/elephants-dream.webm cin: malloc.c:4036: _int_malloc: Assertion `(unsigned long) (size) >= (unsigned long) (nb)' failed. Aborted (core dumped)
Andrew, keep checking for potential other improvements out there because you never know what you might find.
ok! can you also test guicast/Makefile additions? two new cases for ppc and one for i386 (netbsd/freebsd uses this as architecture on 32bit x86). Should be relatively safe to land...
In the build system of CGG not all the actual dependencies on the C++
header files are defined. It is very likely that a simple `make all' after change in some .h header file will recompile some .C files and not recompile some other .C files which depend on the changed header.
...
To test if it could be the case is easy: a complete fresh build with preceding clean-up of all the .o, .a, and .so files.
Thanks for the reminder because it makes a big difference. Because I have gotten bit by this so many times, I just routinely do "make clean" and then run "bld.sh" that way I know I am testing what I think I am AND I get a coffee break.
ok! can you also test guicast/Makefile additions? two new cases for ppc and one for i386 (netbsd/freebsd uses this as architecture on 32bit x86). Should be relatively safe to land...
Tested on both the old Debian 9.1 32-bit and the new Debian 11.0 32-bit.
No problems. Checked into GIT these differences. 8,11d7 < ifeq ($(OBJDIR), i386) < BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B i386 -I binary -O elf32-i386\"" < endif < 26,36d21 < < ifeq ($(OBJDIR), ppc64) < BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B powerpc -I binary -O elf64-powerpc\"" < endif < < ifeq ($(OBJDIR), ppc) < BOOTSTRAPFLAGS := -DBOOTSTRAP="\"objcopy -B powerpc -I binary -O elf32-powerpc\"" < endif
participants (4)
-
Andrea paz -
Andrew Randrianasulu -
Georgy Salnikov -
Phyllis Smith