v17 Deinterlace doesn't always activate
#1
Hello folks.

I've been seeing an issue for quite a while now, where deinterlacing when watching TV on my Pi3 isn't always being enabled. If I stop the channel and restart it again, or even just seek backwards, it usually then gets enabled, suggesting that Kodi is missing something in the stream to tell it to turn deinterlacing on.[/php]

Debug log: https://www.cae.me.uk/tmp/kodi.log-deint...2-1853.txt

This is 17-RC1 (via OSMC beta builds). I started watching BBC 1 HD (DVB-T2 in the UK) at about 18:32. At 18:40 I noticed deinterlacing wasn't working properly (in particular, scrolling credits are a dead giveaway) and restarted the channel; then deinterlacing was working. This was within the same programme even. I spotted a couple of interesting looking debug lines:

Code:
18:32:05.571 T:1387848688   DEBUG: COMXVideo::PortSettingsChanged - [email protected] interlace:0 deinterlace:0
18:32:05.580 T:1387848688   DEBUG: ResolutionUpdateCallBack - change configuration. video:1920x1080. framerate: 25.00. 1920x1080 format: BYPASS
...
18:40:37.841 T:1314911216   DEBUG: COMXVideo::PortSettingsChanged - [email protected] interlace:3 deinterlace:1
18:40:37.861 T:1314911216   DEBUG: ResolutionUpdateCallBack - change configuration. video:1920x1080. framerate: 50.00. 1920x1080 format: BYPASS

Different interlace/deinterlace flags, for the same channel/programme? Did it miss some interlaced flag the first time around? Also note the 25fps vs 50fps difference.

Any ideas? Happy to give any extra info, this one has been bugging me for a while Smile

I imagine that getting this reproducible in a recording would help, so I'll see if I can do that.
Reply
#2
(2017-01-02, 20:55)Caesium Wrote: I imagine that getting this reproducible in a recording would help, so I'll see if I can do that.

Definitely.
You could also try using the BRANCH=next firmware. Download:
https://github.com/raspberrypi/firmware/...f?raw=true
https://github.com/raspberrypi/firmware/...t?raw=true
https://github.com/raspberrypi/firmware/...n?raw=true

and replace that ones on your sdcard boot partition (backup the original ones first!)

Any different? The logic for detecting deinterlace is a little different with that firmware.
Reply
#3
No change with those firmwares @popcornmix. I think I've managed to get a couple of short recordings that might illustrate the problem though.

https://www.cae.me.uk/tmp/20170102_19300...erlace0.ts
https://www.cae.me.uk/tmp/20170102_19300...erlace1.ts

The first one shows deinterlace:0 in my log when I play it, every single time (even using new firmware). The second one I started just after the first one and that shows deinterlace:1 every time.

Now, the first one starts during a trailer, then shortly afterwards goes to Mastermind - I suppose its possible the trailer isn't interlaced (I seem to remember the BBC use some MBAFF interlacing which can swap between progressive and interlaced?), but if so, shouldn't I see a logline to indicate that it switched to deinterlacing once Mastermind starts?
Reply
#4
Any further thoughts on this @popcornmix? Happy to help try and debug this. Were the recordings any use?
Reply
#5
I use Libreelec Milhouse build #1119 on my Rpi3 and I don't see any issues with those recordings.
For the first recording the deinterlacing kicks in at 00:27.
Reply
#6
Thanks for trying it smp1. That definitely doesn't match what I'm seeing here. Is there anything in your log at 00:27 to indicate deinterlacing has kicked in? As I see nothing (other than some Overlay debug lines) and on close inspection on some panning, it definitely is not deinterlacing it.

However I am running a different build (17.0-RC1 from OSMC 2016.12-1) so I'll get a Pi running a LE Millhouse build tomorrow and see if anything changes.
Reply
#7
(2017-01-05, 02:29)Caesium Wrote: Is there anything in your log at 00:27 to indicate deinterlacing has kicked in? .
Only this:
Code:
03:57:44.937 T:1408242592   DEBUG: CMMALPool::CMMALPool Created pool 0x603d2dd0 of size 3 x 0 for port vc.ril.image_fx:out:0(I420)
03:57:44.937 T:1408242592   DEBUG: CMMALRenderer::CheckConfigurationDeint Changing Deint dimensions from 160x64 (160x64) to 1920x1080 (1920x1088) S420->OPQV mode 0->25
03:57:44.986 T:1531966368   DEBUG: ProcessPacket - audio:86 video:99
03:57:44.994 T:1429205920   DEBUG: Previous line repeats 1 times.
03:57:44.995 T:1429205920   DEBUG: CMMALRenderer::CheckConfigurationVout Changing Vout dimensions from 1920x1080 (1920x1088) to 1920x1080 (1920x1088) SAND

I can also see when the deinterlacing kicked in by using the "CodecInfo" overlay.
Reply
#8
(2017-01-05, 02:29)Caesium Wrote: However I am running a different build (17.0-RC1 from OSMC 2016.12-1) so I'll get a Pi running a LE Millhouse build tomorrow and see if anything changes.

I get the same as smp1 with Milhouse build - "adv(x2)" kicks in some way into stream and video looks fine.
Are you using MMAL (with omxplayer disabled) in video/acceleration settings? That is the default setting and is recommended on Pi2/Pi3.
Reply
#9
Ok, that did the trick. I use OMX rather than MMAL because I rely on subtitles, and the Pi3 doesn't have the horsepower to render subtitles with MMAL without dropping frames.
I had a discussion with someone a while back about this, showed them some olympics cycling footage and we reached this conclusion.. think it was in the millhouse test builds thread.

Anyway, switching to MMAL does look better as far as deinterlacing goes. A mild overclock did help the frame drop issues before so I'll have a play with that again. Thanks guys Smile
Reply

Logout Mark Read Team Forum Stats Members Help
Deinterlace doesn't always activate0