Hardware deinterlacing
#1
Lightbulb 
I recently moved to Netflix but still have my Sky subscription and a recording server running until the end of the year. So I decided to throw some interlaced content at KODI running on a Sony KD-55XD8505...

Sky Cinema HD
The movies there are mostly pure film content with PAL speedup and 2:2 pulldown at 1080i25. KODI correctly detects the film content and properly weaves the fields together. Playback is 100% smooth.

N24 HD
Again 2:2 pulldown, but this time from video source with truly interlaced fields (also at 1080i25). KODI again detects that and tries to apply some deinterlacing. N24 HD has a nice ticker and you can easily spot that playback becomes pretty jerky and the deinterlacing doesn't look too good. So it seems to be a pretty bad deinterlacer running in SW on the ARM!?

Does MediaCodec define APIs to make use of some hardware deinterlacing? Does KODI make use of that?

When I play the N24 HD recording with the native androidtv media player (called "Video"), the video is deinterlaced with a pretty decent quality and no judder at all. At least this player seems to have access to some sophisticated hardware deinterlacer it seems.
Reply
#2
No. Mediacodec does not at all. Even interlaced content it not defines. Shields hw deinterlacer is the best Android has to give, so yeah in this discipline it looses against a rpi.

Mrmc says: use SW decoding and SW deint, best yadif.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
I wonder why the native media player called "Video" achieves such a good quality then. Is this a Google or a Sony app? It is as good as when deinterlacing on the PC with nVIDIA or Intel HW deinterlacer.
Reply
#4
No idea, yet another private hack? Ask the Android distribution maintainers.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
Yeah, probably private API again...
But it shouldn't "judder", though, just potentially be ugly.

Could you share your test video, please
Reply
#6
(2016-09-01, 07:28)fritsch Wrote: Mrmc says: use SW decoding and SW deint, best yadif.

I second this. ffmpeg - yadif sw deinterlacing is your best bet for Kodi on Android, it works fine.

You'll have to disable HW acceleration as I don't think Krypton builds switch to sw decoding upon detection. I got around it with an awfully hackish approach I wouldn't recommend here.
Reply
#7
Quote: Could you share your test video, please
Here is a short sample from N24 HD (truely interlaced video source):

n24hd.ts

Tell me if you need longer samples, or interlaced film content. I also have channels with 1080i and 1440 horizontal resolution (anamorphic 16:9)...

Besides all the free channels on Astra 19.2°E, I also receive the packages of Sky, HD+ and ORF.
Reply
#8
IIRC, Kodi doesn't have yadif on Android, or was that enabled recently?
Reply
#9
MrMC patched it in with some optimizations. Before it was too slow on the ARM cores.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#10
(2016-09-01, 08:01)Koying Wrote: IIRC, Kodi doesn't have yadif on Android, or was that enabled recently?

We only get ffmpeg yadif 1:-1:1; nothing HW driven.
Reply
#11
(2016-09-01, 09:43)fritsch Wrote: MrMC patched it in with some optimizations. Before it was too slow on the ARM cores.


... still too slow on certain types. But that's expected.
Reply
#12
(2016-09-01, 09:43)fritsch Wrote: MrMC patched it in with some optimizations. Before it was too slow on the ARM cores.

Well, he doesn't seem to have picked https://github.com/koying/SPMC/commit/de...f74468bea7 , so there wouldn't be any yadif at all...
Same code for MRMC and Kodi: https://github.com/MrMC/mrmc/blob/master....cpp#L3024

@shomari Yadif is an ffmpeg only de-interlacing method Wink
Reply
#13
(2016-09-01, 10:08)Koying Wrote:
(2016-09-01, 09:43)fritsch Wrote: MrMC patched it in with some optimizations. Before it was too slow on the ARM cores.

Well, he doesn't seem to have picked https://github.com/koying/SPMC/commit/de...f74468bea7 , so there wouldn't be any yadif at all...
Same code for MRMC and Kodi: https://github.com/MrMC/mrmc/blob/master....cpp#L3024

@shomari Yadif is an ffmpeg only de-interlacing method Wink

...whoops. My mind is stuck in the old (desktop PC) tinkering days.

But, yadif is there in Krypton beta. Just yadif not yadif(2x) like in SPMC so the implementation is surely different somehow?

Image
Reply
#14
My bet is that it's a codecinfo bug Wink
fritsch will confirm, but "1:-1:1" is the default value and means "do nothing".
Reply
#15
(2016-09-01, 10:49)Koying Wrote: My bet is that it's a codecinfo bug Wink
fritsch will confirm, but "1:-1:1" is the default value and means "do nothing".

.... you're right. Tested just now with true interlaced content such as the recording sample linked here and it doesn't achieve proper playback.
Reply

Logout Mark Read Team Forum Stats Members Help
Hardware deinterlacing0