Does VideoToolbox deinterlacing actually work on macOS or iOS?

This forum is about all development around libVLC.
oviano
Cone that earned his stripes
Cone that earned his stripes
Posts: 120
Joined: 12 Jan 2012 11:12

Does VideoToolbox deinterlacing actually work on macOS or iOS?

Postby oviano » 08 Jun 2017 13:04

I can't get it to work at all, either with my own libvlc-based player or VLC itself.

Take this file:

https://www.dropbox.com/s/ykxi7p48feb3c ... nn.ts?dl=0

Ignore the green corruption (that is unrelated - see my other post about that) and focus on the scrolling text at the bottom. If I build using a version of videotoolbox.m from March which doesn't produce the green corruption then the lack of deinterlacing is clearer.

Bur in both cases in the trace you will see it enables the VT temporal filter, and the code looks alright but it doesn't look deinterlaced to me. Check out those horrible jagged edges. Now run that through a software decoder using Yadif or even Bob and see how it *should* look.

I've also tried the VT Vertical Filter (which I presume is more like Bob) and that has no effect either.

So has anyone actually had this working? Maybe it depends on the source somehow? Is VT deinterlacing known to be broken either in general or specifically with VLC?

oviano
Cone that earned his stripes
Cone that earned his stripes
Posts: 120
Joined: 12 Jan 2012 11:12

Re: Does VideoToolbox deinterlacing actually work on macOS or iOS?

Postby oviano » 09 Jun 2017 00:12

Also, this recent commit looks wrong to me:

https://github.com/videolan/vlc/commit/ ... 1f0eec7c6e

Code: Select all

+ p_sys->b_enable_temporal_processing = status == noErr && + CFDictionaryContainsKey(supportedProps, + kVTDecompressionProperty_DeinterlaceMode_Temporal);
If it's looking up a key, shouldn't it be searching for "kVTDecompressionPropertyKey_DeinterlaceMode?

In any case, on my Mac (one of the new MB Pro Touchbar models) with macOS Sierra there is apparently no kVTDecompressionPropertyKey_DeinterlaceMode key in the dictionary, which seems strange as I would have thought a modern Mac would support these deinterlacing functions?

oviano
Cone that earned his stripes
Cone that earned his stripes
Posts: 120
Joined: 12 Jan 2012 11:12

Re: Does VideoToolbox deinterlacing actually work on macOS or iOS?

Postby oviano » 09 Jun 2017 09:48

So here is a dump of the supported properties for a latest model Macbook Pro:

Code: Select all

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>ClientPID</key> <dict/> <key>ColorPrimaries</key> <dict/> <key>DecoderFirstMbInRefreshedSlices</key> <dict/> <key>DecoderFirstMbInSkipSlices</key> <dict/> <key>DecoderUsage</key> <dict/> <key>FieldMode</key> <dict> <key>PropertyType</key> <string>Enumeration</string> <key>ReadWriteStatus</key> <string>ReadWrite</string> <key>SupportedValueList</key> <array> <string>DeinterlaceFields</string> <string>BothFields</string> </array> </dict> <key>ICCProfile</key> <dict/> <key>MaxAgeForOutputPixelBufferPool</key> <dict/> <key>MaxOutputPresentationTimeStampOfFramesBeingDecoded</key> <dict/> <key>MinOutputPresentationTimeStampOfFramesBeingDecoded</key> <dict/> <key>NumberOfFramesBeingDecoded</key> <dict/> <key>OnlyTheseFrames</key> <dict> <key>PropertyType</key> <string>Enumeration</string> <key>ReadWriteStatus</key> <string>ReadWrite</string> <key>SupportedValueList</key> <array> <dict> <key>OnlyTheseFrames</key> <string>AllFrames</string> </dict> <dict> <key>OnlyTheseFrames</key> <string>NonDroppableFrames</string> </dict> <dict> <key>OnlyTheseFrames</key> <string>IFrames</string> </dict> <dict> <key>OnlyTheseFrames</key> <string>KeyFrames</string> </dict> </array> </dict> <key>OutputPoolRequestedMinimumBufferCount</key> <dict/> <key>PixelBufferPool</key> <dict/> <key>PixelBufferPoolIsShared</key> <dict/> <key>PixelTransferProperties</key> <dict/> <key>PoolPixelBufferAttributes</key> <dict/> <key>PoolPixelBufferAttributesSeed</key> <dict/> <key>Priority</key> <dict/> <key>RealTime</key> <dict/> <key>SuggestedQualityOfServiceTiers</key> <dict/> <key>ThrottleForBackground</key> <dict/> <key>TransferFunction</key> <dict/> <key>UsingHardwareAcceleratedVideoDecoder</key> <dict/> <key>UsingSandboxedVideoDecoder</key> <dict/> <key>YCbCrMatrix</key> <dict/> </dict> </plist>
So it has a field mode of deinterlace but no actual deinterlace options and no deinterlacing takes place?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Does VideoToolbox deinterlacing actually work on macOS or iOS?

Postby Jean-Baptiste Kempf » 11 Jun 2017 16:15

File a bugreport, then.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

oviano
Cone that earned his stripes
Cone that earned his stripes
Posts: 120
Joined: 12 Jan 2012 11:12

Re: Does VideoToolbox deinterlacing actually work on macOS or iOS?

Postby oviano » 12 Jun 2017 16:12

Done. I've also reported it to Apple as it's not clear where the fault lies.

It would be interesting to know if anyone else has got VT deinterlacing working though...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 2 guests