Problems detecting and handling deinterlacing and pulldown

For me, a Pi 3B running OSMC from August this year matches a V4K running OSMC with the 3.14 kernel, so if you have one of those to hand it could give a reference, as it plays the Timeflight clip with better handling of diagonal edges than the test Vero build that the team has kindly been working on.

I did a quick grab-logs -A: https://paste.osmc.tv/ufumiculut

Could be itā€™s working better on the V then?

It is. I just updated a vero 4k and the deinterlacer isnā€™t kicking in at all. Investigating ā€¦

Iā€™ll double check the patch series is correct for 4K / 4K +

Itā€™s correct ā€“ the VFM map should be:

setVfmMap(ā€œdefaultā€, ā€œdecoder ppmgr deinterlace amlvideo amvideoā€);

Permissions on /sys/class/vfm/map (ls -l), OK?

Third time lucky. Further updates for Kodi for both V and 4k should by now be in the mirrors. Iā€™ve checked on 4k and Timeflight is looking very similar to how it looks on V now. You should find the divergent line patterns improved as well.

No-one quite knows how V got updated but 4k didnā€™t yesterday. But we know where the buck stops :stuck_out_tongue:

Oh, wow, yes: huge improvement! :+1:

(Iā€™ll have to see if I can find something to test if this is working on h.264 as well - I donā€™t think I have a test clip for that at the moment. But hopefully it is!)

That, however, I canā€™t agree with: the 480i wedge pattern (the one Iā€™ve named 480i_60_deinterlace_test_fixed.mkv ) is still playing correctly in software but wrongly in hardware: itā€™s frame-interlaced but treated as field-interlaced with hardware playback. (There may even be more going on there than a simple cadence-detection error. Maybe itā€™s the result of it attempting to do full-screen diagonal filtering? But certainly it looks terrible!)

I canā€™t be bothered reinstalling OSMC v18.9 to check :slight_smile: but Iā€™m 90% sure it used to be handled correctly in hardware under 3.14 kernel / Kodi v18.

(Note that in software it plays correctly, even with Deinterlace method to ā€œDeinterlaceā€).

OK, thanks. I will say @scottosanā€™s wedges play better than yours and yours play better on V than on 4k. There are too many variables.

Iā€™m not seeing any obvious differences between my 480i wedge clip and his 00727.m2ts, but maybe there is on the V.

Itā€™s possible Iā€™m seeing things but, looking at some of my other test clips, Iā€™m wondering if some of them may now be looking worse than they were. In the ā€œSherlockā€ clip, for example, round about 00:12-00:14, I donā€™t remember seeing that much shimmer around the lines on Benedict Cumberbatchā€™s forehead before; is it possible the thing is slipping into field-interlaced mode now when previously it wasnā€™t? And round about 00:35, I feel like the vertical lines in Mycroftā€™s suit may be less sharp than they were. Maybe diagonal filtering being enabled actually worsens the impact of it slipping into field-interlaced mode when it shouldnā€™tā€¦? :thinking:

I have several Veroā€™s around and I just installed the test build on a V4K to compare to another V4K on the 3.14 kernel and also to a Vero V on the test build. Based on a quick look, the V4K on the test build is matching the 3.14 kernel on the Timeflight clip (pop the champagne corks!). However, the V is slightly inferior, some jaggies do bleed in during motion in places where they are not present on the V4K. Can follow up with photos later.

Thanks, both. I have to say that @tanio99 and I have spent hours with these test clips and itā€™s obvious to me we are not going to find one set-up that suits all these different formats. In the course of this there are some things we havenā€™t been able to fix and canā€™t without at least investing far more time on it and both of us would rather get on with something else. Note this:

  • you donā€™t necessarily see the same things with each run of a video. The Planet Earth clip is notable for this. It can stutter like heck one time and be smooth as butter if you play it a second time. (Itā€™s more reliable played as field-interlaced although itā€™s clearly frame-interlaced.) Same thing if you play clips in a different sequence. Despite best efforts we canā€™t nail why this is.
  • Iā€™ve noticed that my Panasonic TV is also doing some processing, for example when playing the wedges there are weird effects near the TVā€™s OSD
  • the ā€˜2:2 pulldownā€™ clips render worse than the 3:2 clips. I find this surprising - youā€™d have thought it would be easier.
  • we still havenā€™t found an easy way to switch between frame- and field-interlace on the fly ie on every frame that the parameter changes. I canā€™t help feeling this ought to be in AMLā€™s code somewhere as itā€™s surely quite fundamental. For VC-1 we still just check the interlace type at the start of each sequence which means there can a be a few frames with judders (eg at the start of rolling credits).
  • we havenā€™t found the hooks by which we might bring deinterlacing options out to the GUI for MPEG2 and h264

Iā€™m just saying this to manage expectations. It wonā€™t be long before Vero moves to a 5.x kernel, which may or may not be better on these things. Weā€™re grateful for your patience but Iā€™m not sure we can do much more unless AML come up with some proper documentation.

Understood, appreciate all these efforts when as far as I know there are only 2 people on the forum who keep pressing on this :slight_smile:

I am really pleased with the field-interlaced 50i on the V4K with the new test build. I think youā€™ve nailed it there. The V isnā€™t quite there but better than it was, when before the jaggies were really noisy. Following two shots captured during a tracking move (same AVR input and TV settings each time).

V4K: super clean

Vero V: console jaggies

Thatā€™s the ā€œ25fps video stuttering at 50Hzā€ issue. If you set deinterlacing to Off and then manually switch the output mode to 1080p/25Hz rather than 1080p/50Hz, itā€™s smooth as glass 100% of the time.

I assume youā€™ve got ā€œIntelligent Frame Creationā€ (or whatever Panasonic calls motion interpolation) turned off? If not, try that. I guess it could be a scaling issue too.

Will the Vero 4K be getting a kernel upgrade, or only the V?

This is what that frame looks like here (paused, but I donā€™t see jaggies like yours when itā€™s playing). Can you drop a log so we can check you setup?

hereā€™s a log:
https://paste.osmc.tv/ipuwesirex

I know whatā€™s happened. There will be yet another Kodi for V available shortly :roll_eyes:

In our tests, just setting ā€˜deinterlaceā€™ on is enough to play it smoothly. I should have said itā€™s only variable if you turn deinterlace Off or set Auto.

@tanio99 is all for removing the option and treating everything as (field-) interlaced but that doesnā€™t solve the issue of Dr Whoā€™s shirt and the Tardis pipework in one of the other clips we have (? from @ac16161 IIRC).

Only the Vero V.

hi, Iā€™m looking forward to testing this when the update lands for the V. Is there an ETA for when that might be? Thanks.

Soon ā€“ Iā€™m just changing a couple of other things which stopped us doing a new Kodi build for Vero V at the moment.

Iā€™ll let you know when itā€™s available.

1 Like