Kodi Community Forum
WIP Experimental simple deinterlacing - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+---- Forum: Android Development (https://forum.kodi.tv/forumdisplay.php?fid=184)
+---- Thread: WIP Experimental simple deinterlacing (/showthread.php?tid=213600)

Pages: 1 2 3 4 5 6 7 8 9 10


Experimental simple deinterlacing - Koying - 2015-01-03

This is an experimental build implementing a simple linear blending deinterlacing for libstagefright and mediacodec h/w decoding.
Not high-quality, but it at least remove most of the "comb" effect, to the cost of added blurriness.
No auto-detection, so you have to enable deinterlacing manually depending on the source.

Please test and comment. I'd like to know if it is worth pursuing in that direction.

http://mirrors.xbmc.org/test-builds/android/arm/kodi-20150103-c440827-addglesdeinterlace-armeabi-v7a.apk


RE: Experimental simple deinterlacing - weak - 2015-01-04

Thanks for looking into this Koying, greatly appreciated!

Imho, it's definitely a step in the right direction, especially for SD broadcasts. 1080i sports is improved too, but still not really watchable. Although this might also be related to the frame rate, I'm in Europe so it's 1080i50, 1080i60 would probably look better.

Since the framerate can't be changed, I guess there's also no chance to get interlaced output working and let the tv do the de-interlacing? What about open source driver projects like freedreno, any chance something like that might help to overcome the current limitations?

EDIT:
I'm using a fire tv, btw.


RE: Experimental simple deinterlacing - Koying - 2015-01-05

We don't get the fields from the H/W decoders. They are always "deinterlaced" into one frame but often, like on AFTV, it's simple weaving, leading to the "comb" effect.
All we can try is to reduce the comb effect by using gles shaders.


RE: Experimental simple deinterlacing - FernetMenta - 2015-01-05

For other codecs we have combined the fields into a single frame as well. Why don't you render each field separately,one after another?


RE: Experimental simple deinterlacing - Koying - 2015-01-05

Read above. We DON'T have the fields, just a frame put together by whatever method the omx component on a specific SoC implements.


RE: Experimental simple deinterlacing - FernetMenta - 2015-01-05

Yes, I know. A shader can either pick the even or odd lines in one pass.


RE: Experimental simple deinterlacing - Koying - 2015-01-06

And do you have a suggestion on how to re-inject the de-doubled frame from the renderer back into the player?


RE: Experimental simple deinterlacing - FernetMenta - 2015-01-06

why do you want to re-inject? assume we have a texture with both fields. For BOB we render 2 times from the same texture.


RE: Experimental simple deinterlacing - hello1893 - 2015-01-06

Koying, I greatly appreciate you are working on this. I can't contribute to the technical conversation, but am most happy to be available for testing (using Amazon Fire TV, same as weak).

I installed your version and unfortunately can't see an improvement. But the fact that you are looking into this, makes me optimistic.


RE: Experimental simple deinterlacing - Koying - 2015-01-06

@FernetMenta Do we already have code doing this?

I understand BOB as:
- Split the 2 fields, making 2 half-height frames out of them
- Double the refresh rate and render T-B-T-B-T-B...

I don't see how to time the T-B flip by staying in the renderer...


RE: Experimental simple deinterlacing - FernetMenta - 2015-01-06

RenderManager calls renderer->RenderUpdate for each field: https://github.com/xbmc/xbmc/blob/master/xbmc/cores/VideoRenderers/RenderManager.cpp#L806
From a renderer perspective only do what RenderManager instructs you. Either TOP field, BOT bield, or entire frame.


RE: Experimental simple deinterlacing - sdfg - 2015-01-06

Koying, thank you for your deinterlacing support.
In my configuration (LG G3, SnapDragon 801), there's hardware acc only for avc (all HD channels mostly 1080i 50 hz PAL in my country).
I'm not a technician, bust BOB should be the best method for these channels.
Anyway, with your build there's a clear improvement.
Don't know if you can add also software deinterlacing (with a 2.5 CPU it should not be a problem), because I can test only a few channels (most channels are SD mpeg2 720x576 PAL).
It seems to me that you're pointing in the right direction.
Thank you,
sdf


RE: Experimental simple deinterlacing - tredman - 2015-01-08

I tried this yesterday on one of my fire TVs and its a definite improvement on 1080i content, not as good as can be achieved using a Raspberry Pi, but its a definite improvement.

The build itself seems very stable, had zero issues with 3 - 4 hours viewing of live TV yesterday.

Happy to help testing anything else - i have two PVR backends which kick out a variety of 1080i 50Hz content


RE: Experimental simple deinterlacing - Koying - 2015-01-10

Now with BOB thanks to @FernetMenta. Should be much better:
http://mirrors.xbmc.org/test-builds/android/arm/kodi-20150110-b8fca42-adddroiddeinterlaceHelix-armeabi-v7a.apk


RE: Experimental simple deinterlacing - weak - 2015-01-10

Huge improvement, thanks Koying/FernetMenta.
Any chance to get 'Auto' mode working?


This forum uses Lukasz Tkacz MyBB addons.