Kodi Community Forum

Full Version: Bob (inverted) deinterlace method no longer available
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

Can anyone tell me why was "Bob (inverted)" deinterlace method removed from Kodi 17?

I found this change by FernetMenta: https://github.com/xbmc/xbmc/commit/7602...ce6d038fb7

I am using Cubox and in Kodi 16.1 I had options of "Double rate" and "Double rate (inverted)" in addition to two other deinterlace methods. Those are the only two methods I needed for watching live TV (Ziggo cable in Netherlands). About half the interlaced channels need "Double rate" and the other half need "Double rate (inverted)" to look correct.

In Kodi 17 (for imx6) there is no "Double rate" but there is "Bob". Now I know from testing that "Bob" is the same as "Double rate". However, there is no "Bob (inverted)" which I need for about half the channels. The channels that use "Double rate (inverted)" in Kodi 16.1 do not look correct in Kodi 17 with any of the available methods, which are: Bob, Bob (hafl), imx Advanced, imx Advanced (half).

So I need the "Bob (inverted)" method back. Can I revert the changes in the link above and compile my own version to get this method back?
Why don't you fix the decoder? Either the top field is first or the bottom field. This information is available to the decoder.
So what you are saying is that the decoder should be able to use "Bob" for both types of streams (the ones that need just Bob and the ones that need Bob (inverted)? Meaning, there should be something in the stream that tells the decoder how to deinterlace?

How do I do this? I can tinker with the code here and there but this is probably beyond my knowledge. But it could be a way for me to learn about Kodi. Where do I start to "fix the decoder"?
Anybody else? Mk01? Fritsch? Can someone tell me why was Bob (inverted) removed and how do I get it back? Or how do I "fix the decoder"? I checked the changes to code and Krypton-17.0beta1 is the latest one that still has Bob (inverted) deinterlace method. So I either have to use this version (which currently has problems with tvheadend) or I have to continue to use Kodi 16.1.

Thanks in advance.
No idea of the IMX decoder anymore after it was rewritten from scratch.
(2017-03-04, 22:11)pajtaz Wrote: [ -> ]So what you are saying is that the decoder should be able to use "Bob" for both types of streams (the ones that need just Bob and the ones that need Bob (inverted)? Meaning, there should be something in the stream that tells the decoder how to deinterlace?

Correct, other docders can deal with this too. The inverted setting was just an ugly hack for this decoder issue. Have you ever seen a similar setting on a commercial STB?. I don't think so Smile
How do I get started with fixing the decoder for imx6? Which files in Kodi source code should I be looking at? Is there some development thread that has a descent explanation of how the deinterlacing works so I can get started?

In the mean time, I will attempt to bring back the "inverted" setting by modifying the code. However I agree with FernetMenta, the decoder should know whether to use Bob or invert based on the input. So far none of the Kodi/OpenELEC/LibreELEC versions for imx6 have been able to do this. I always had to select one of the two methods manually. Of course, this is annoying, especially for the recordings because once I record from a channel that requires particular deinterlacing method, I have to change it manually first time I watch the recording. This does not make it "wife proof" Smile
https://github.com/xbmc/xbmc/blob/master....cpp#L1154

this is where the field order is set. this has to work for interlaced content.
Thanks, I will see what I can do.
vpeter (on LibreELEC forum) fixed the issue with "inverted" or not inverted by only doing this to the file you linked:

- else if (pBuffer->GetFieldType() == VPU_FIELD_TB || pBuffer->GetFieldType() == VPU_FIELD_TOP)
+ //else if (pBuffer->GetFieldType() == VPU_FIELD_TB || pBuffer->GetFieldType() == VPU_FIELD_TOP)
+
+ if (pBuffer->GetFieldType() == VPU_FIELD_TB ||
+ pBuffer->GetFieldType() == VPU_FIELD_TOP ||
+ pBuffer->GetFieldType() == VPU_FIELD_NONE)
pDvdVideoPicture->iFlags |= DVP_FLAG_TOP_FIELD_FIRST;

That is all he did and I tested the image he made with this fix. It worked! I'm not sure what he will do with this modification but I will definitely use it because it fixes a major annoyance for me. Maybe he can add to this discussion and say does he intend to submit this fix.
@pajtaz

what is the video format ? is it mpeg2 or other ?
(2017-03-06, 15:39)FernetMenta Wrote: [ -> ]https://github.com/xbmc/xbmc/blob/master....cpp#L1154

this is where the field order is set. this has to work for interlaced content.

how do I use this?