RPi Deinterlacer testbuild

  • I'm guessing that it will be on the next nightly, as nightly-20211127-e3a7c06 still gives me the white lines.

    I'll eagerly wait, test and report back!

    Yes, exactly. It's Nov 28 here and the builds will start in a few hours, so nightly-20211128-... will have it. Timezones can be a bit confusing in international communications, so I better should have used the term "next" :)

    so long,


  • Tested on a RPI4 2GB, white artifacts have gone and working perfectly for me with a 2 x RTL232 tuner setup on all Australian SD and HD Freeview channels.

    The lack of deinterlacing which caused fast action blurring on FTA TV prompted me to switch to IPTV with TVHeadend, some time ago. I might switch back.

    Great job!

  • 5 words: Glorious! Thank you so much!

    The SD MPEG2 cartoons watched during the morning routine with my 4yo, my main contact with interlaced content, are now a nice as can be!

    RPi 4, btw.

    You guys announced deinterlacing as a tough cookie, but you made it look easy from a user POV. You rock!

  • Oh yes, thank you! I suffered from this every day, german TV 1080i. On my rpi4 it looks awesome already. Waiting for further improvement, like chosing deinterlacer... but absolutely useful already.

  • Great work! Thank you very much!

    I merged the patches to my local libreelec-10.0 branch and tested it on RPI3. Working really well for 576i and 1080i.

    Only thing were a few interlacings in fast vertical movements which seems strange. I will investigate this further ...

  • I have been testing this for the last week or so on all the Live TV Channels I have access to and a few DVD titles, this feels like it is working as well as le 9 did.

    Good work :)

  • I am using a build of the libreelec-10.0 branch which got deinterlacer merged lately (thanks to @HiassofT)!

    Working great until I enter the channel list (PVR addon) or enter teletext (tested on RPi3 and RPi4). In this case the RPi crashes (reproducable) shortly after. If no deinterlacer is in use (720p stream) then no crash happens. I am not able to analyse the crash myself but can provide crash.log if needed.

  • No success. New logs (with debug logs on): 3NLX

    While teletext is shown the framerate drops to 20 fps. Maybe some underrun?


    An even better one: 3NMg

    Its from my RPi3 (latest libreelec-10.0 build)

    Last lines of trace:

    2022-01-28 15:48:56.313 T:861     DEBUG <general>: CVideoPlayerVideo - Stillframe left, switching to normal playback
    2022-01-28 15:48:56.334 T:854     DEBUG <general>: CVideoPlayer::HandleMessages - player started 1
    2022-01-28 15:48:56.334 T:940     DEBUG <general>: OnAVChange: CApplication::OnAVChange
    2022-01-28 15:48:56.591 T:861     DEBUG <general>: ffmpeg[0x3a88cf8X]: [src] sws_param option is deprecated and ignored
    2022-01-28 15:48:56.596 T:861     ERROR <general>: ffmpeg[0x3a88cf8X]: [deinterlace_v4l2m2m] VIDIOC_REQBUFS failed: Cannot allocate memory

    Edited once, last by lomion ().

  • Crashes with teletext are to be expected as this isn't fixed in kodi.

    Frame drops / stuttering with overlays are also a known issue, the cause is not quite known yet though, probably some bud or oddity in kodi's render code.

    As for RPi3: it seems to be running out of CMA memory. Can you try increasing it a bit, default on RPi3 is 256MB, testing with 320MB or 384MB would be interesting:

    Add the following line at the end /flash/config.txt (use cma-384 for 384MB):


    so long,


  • Improved it only a bit. It takes longer until the crash. (log: 3NNO)

    Anyways I can live with it since I'm not using overlays a lot. Thanks for your support!

  • Support for V4L2 deinterlace methods needs to be proven over a wider range of SoC hardware before we send things upstream. The other patches already have PR's open on the Kodi git repo, but as everything involving colourspace has an unholy level of complication it will take time to get them merged.

  • Hi everybody,

    since the deinterlacer was introduced in LE10 git, i'm seeing totally random (sometimes a couple of them in a minute, sometimes none for an hour) fullscreen artefacts for what looks like 1-2, maybe 3 frames. They dont look like a decoding issue, but rather like random noise, like you sometimes see when HDCP fails, or, if someone remembers, a couple of years ago, when popcornmix released a new firmware that free'd up a few megabytes more memory in the Pi2/3, there was a memory-overwriting-issue, that caused a very similar pattern (just there it locked up after that).

    I cant find any way to actually trigger the issue, the type of file (codec, fps, 720p/1080p/2160p) or any settings i've tried dont matter (including if deinterlace is on or off), and there is noting in the logs when it happens.

    I have confirmed that the issue is gone on the last commit without the deinterlacer (for the testing i'm using LE10.1 and LE10.2 on RPi4/4GB)...

    Does someone know what i'm talking about, or do i have to try to capture it with my phonecam?