After developing an IVTC filter, I thought I'd have a go at another kind of deinterlacer... that doesn't deinterlace at all :)
That is, I'm simulating an old CRT in software. If we don't mind that the pixel positions don't exactly match between an LCD display and a CRT TV, this can be done with a framerate doubler, which dims the "old" field (simulating phosphor light output decay) while the "new" one is being rendered. With a two-frame cache, ComposeFrame() from my IVTC filter, and a trivial luma dimmer (which I still need to MMX), this was easy.
And it actually works. The output looks pretty good, no interlacing artifacts are visible and 60 fps camera pans look very smooth. Note that for pure 24 fps NTSC telecined progressive material, IVTC is better, while this "CRT simulation" looks better for hybrid 24/60 fps (because it won't cause a framerate mismatch).
This brings me to the topic of this post.
I'm getting crashes during playback whenever I activate a framerate doubling deinterlacer. It's not only my new filter - it happens e.g. with "Yadif2x" and "Bob", too. The crashes occur randomly, but more often if I seek around in the video.
This is what gdb gives me:
Code: Select all
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb1fabb70 (LWP 15184)]
0xb7f6b2bc in video_format_CopyCrop (p_dst=0x0, p_src=0x8419b08) at ../../src/misc/es_format.c:212
212 p_dst->i_x_offset = p_src->i_x_offset;
(gdb) backtrace
#0 0xb7f6b2bc in video_format_CopyCrop (p_dst=0x0, p_src=0x8419b08) at ../../src/misc/es_format.c:212
#1 0xb7f45418 in VideoFormatCopyCropAr (vout=<value optimized out>, now=<value optimized out>, deadline=0xb1fab360)
at ../../src/video_output/video_output.c:98
#2 ThreadDisplayRenderPicture (vout=<value optimized out>, now=<value optimized out>, deadline=0xb1fab360)
at ../../src/video_output/video_output.c:938
#3 ThreadDisplayPicture (vout=<value optimized out>, now=<value optimized out>, deadline=0xb1fab360)
at ../../src/video_output/video_output.c:1048
#4 0xb7f4620c in ThreadManage (object=0x84148d4) at ../../src/video_output/video_output.c:1060
#5 Thread (object=0x84148d4) at ../../src/video_output/video_output.c:1488
#6 0xb7e33955 in start_thread (arg=0xb1fabb70) at pthread_create.c:300
#7 0xb7daee7e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130
Also, this same crash happens immediately (at the third frame after opening a stream) if a framerate doubling deinterlacer is chosen as the default in the options.
The version I have is 1.2-git from around mid-December.
I'd like to contribute the code for my new filter, but also to get this working to actually make it useful.
Anyone else seen this problem? Any ideas?