Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Display Modes
Old 24th September 2011, 21:00   #101  |  Link
egur
QuickSync Decoder author
 
Join Date: Apr 2011
Location: Atlit, Israel
Posts: 916
Quote:
Originally Posted by nevcairiel View Post
@timestamps in general:

I'm sure the MSDK offers an ability to handle timestamps by itself. This will probably be fine with all PTS timestamps. At least thats the case with NVIDIAs API and DXVA2.
Just for DTS timestamps, you need to manually map the incoming times to the outgoing frames. Since the number of frames coming in and going out is usually the same, that shouldn't be much of a problem. I have that implemented in LAV Video using a FIFO buffer for the CUVID decoder (because i don't know its exact processing delay), and a fixed circular buffer in the avcodec decoder (because there i know its exact decoding delay).
First, I really appreciate your help. Thanks.
Is there a 1:1 relation between samples coming in and frames coming out?
e.g. is every media sample a single frame, or a frame can be divided into an arbitrary number of samples. This will make mapping time stamps impossible.
__________________
Eric Gur,
Processor Application Engineer for Overclocking and CPU technologies
Intel QuickSync Decoder author
Intel Corp.
egur is offline   Reply With Quote
Old 24th September 2011, 21:12   #102  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,415
In theory, both is possible, to some extend.

In reality, VC1 and H264 are usually always one sample=one frame, MPEG2 might be split over multiple data samples.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 25th September 2011, 21:46   #103  |  Link
egur
QuickSync Decoder author
 
Join Date: Apr 2011
Location: Atlit, Israel
Posts: 916
New version released 0.14

New and improved version. Zip files contains installer documentation, please read.

Download version 0.14 alpha:
32 bit http://www.multiupload.com/LPX2JXB06S
64 bit http://www.multiupload.com/8H7ZPV5XKC
Source code http://www.multiupload.com/AXET69LL3P

Revision highlights:
v1.14:
* Created ffdshow installer. Installer will default to enabling the Intel QuickSync decoder on new installations.
* More speed optimizations. CPU is at its lowest frequency during playback with very low utilization. 2-3% on desktop and 5-6% on mobile. Mobile lowest frequency is half of desktop (800/1600).
* Fixed handling of interlaced content which is encoded as progressive frames.
* More robust and faster codec initialization
__________________
Eric Gur,
Processor Application Engineer for Overclocking and CPU technologies
Intel QuickSync Decoder author
Intel Corp.
egur is offline   Reply With Quote
Old 26th September 2011, 12:46   #104  |  Link
Atak_Snajpera
RipBot264 author
 
Atak_Snajpera's Avatar
 
Join Date: May 2006
Location: Poland
Posts: 7,948
Are you going to merge your code with official builds? I'm asking because there is zero movement at the moment in ffdshow Only libav is currently being updated. That's all.
Atak_Snajpera is offline   Reply With Quote
Old 26th September 2011, 13:51   #105  |  Link
egur
QuickSync Decoder author
 
Join Date: Apr 2011
Location: Atlit, Israel
Posts: 916
Quote:
Originally Posted by Atak_Snajpera View Post
Are you going to merge your code with official builds? I'm asking because there is zero movement at the moment in ffdshow Only libav is currently being updated. That's all.
That's the idea. I wanted to get a minimum feature set working and I'm very close to it. clsid was very skeptic I could pull this off because of the memory copying involved, but this part is now solved
I'll contact clsid again and push things forward.

BTW, did you try my build? It should improve Avisynth performance when ffdshow is used as a decoder.
__________________
Eric Gur,
Processor Application Engineer for Overclocking and CPU technologies
Intel QuickSync Decoder author
Intel Corp.
egur is offline   Reply With Quote
Old 26th September 2011, 19:13   #106  |  Link
millercentral
Registered User
 
Join Date: Jan 2009
Posts: 5
I know this effort has been focused around ffdshow, but does anyone know of any similar efforts to enhance the ffmpeg encoding library for QuickSync? I would love to see this for transcoding improvements...
millercentral is offline   Reply With Quote
Old 26th September 2011, 19:15   #107  |  Link
Blight
Software Developer
 
Blight's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 1,022
millercentral:
Eric said he'll wrap this up in a nice DLL.
From there, ffmpeg coders should be able to integrate with little effort.
__________________
Yaron Gur
Zoom Player Developer
Blight is offline   Reply With Quote
Old 29th September 2011, 02:28   #108  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,795
Hi Eric,
I haven't tested your build yet, but here are a few questions:
- How are multiple instances of the decoder handled? I assume the HW can only handle a certain amount of streams at once. Will ffdshow simply fail graph connection for instance N+1, will it fall back to software mode (libavcodec), or will it crash and burn?
- This only work on Sandy Bridge, and future similar CPUs?
- Does it work if a mobo doesn't use the integrated GPU? Or if disabled in BIOS? Or if no monitor is attached?

I can give you SVN access if you want. Then you can commit it when deemed stable and also perform updates and fixes.
__________________
MPC-HC 2.6.3
clsid is offline   Reply With Quote
Old 29th September 2011, 03:30   #109  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 807
How can I make the QS decoder ignore unsupported streams (10bit, 4:4:4 chroma, lossless etc) and let for example LAV take care of it?
ajp_anton is offline   Reply With Quote
Old 29th September 2011, 08:38   #110  |  Link
egur
QuickSync Decoder author
 
Join Date: Apr 2011
Location: Atlit, Israel
Posts: 916
Quote:
Originally Posted by clsid View Post
- How are multiple instances of the decoder handled? I assume the HW can only handle a certain amount of streams at once. Will ffdshow simply fail graph connection for instance N+1, will it fall back to software mode (libavcodec), or will it crash and burn?
There should not be a (practical) limit. I can modify ffdshow to revert to libavcodec if initialization fails. Most likely that the platform will run out RAM before this happens.

Quote:
Originally Posted by clsid View Post
- This only work on Sandy Bridge, and future similar CPUs?
Correct, that’s guarantied. It might work on small core processors in the future (Atom), no promises.
The user has the option to use this decoder or not via the standard ffdshow config. Just like other decoders (e.g. wmv9).
Quote:
Originally Posted by clsid View Post
- Does it work if a mobo doesn't use the integrated GPU? Or if disabled in BIOS? Or if no monitor is attached?
BIOS must enable the IPG as the driver will not load. IGP driver must be loaded and enabled. This is not a problem. My own system has an AMD 6950 Radeon on an h67 chipset MB.
DirectX will not enumerate the IGP if a screen is not connected to it (it enumerate only the displays).
Current version needs to have either the IGP connected to a screen or have switchable graphics or Lucid Virtu is installed and configured to bind the media players to the IGP.
A VGA dummy can also be used.
I’m in the process of enabling the HW acceleration without the above hacks.

Quote:
Originally Posted by clsid View Post
I can give you SVN access if you want. Then you can commit it when deemed stable and also perform updates and fixes.
That would be great! Please send me instructions by mail if there’s any kind of procedures I’m required to follow.
__________________
Eric Gur,
Processor Application Engineer for Overclocking and CPU technologies
Intel QuickSync Decoder author
Intel Corp.
egur is offline   Reply With Quote
Old 29th September 2011, 08:48   #111  |  Link
egur
QuickSync Decoder author
 
Join Date: Apr 2011
Location: Atlit, Israel
Posts: 916
Quote:
Originally Posted by ajp_anton View Post
How can I make the QS decoder ignore unsupported streams (10bit, 4:4:4 chroma, lossless etc) and let for example LAV take care of it?
The QS decoder will fail to initialize on such streams. The idea is to have ffdshow fallback to libavcodec and that fails to notify the graph/player on connection failure. The player can then load another filter (e.g. LAV). That's the most elegant way to do it as far as I can see.
Future HW might (or not) support these stream types.
It would help if you pointed me to such streams for testing purposes, or to a guide on how to transcode to these formats.
__________________
Eric Gur,
Processor Application Engineer for Overclocking and CPU technologies
Intel QuickSync Decoder author
Intel Corp.
egur is offline   Reply With Quote
Old 29th September 2011, 08:52   #112  |  Link
gvaley
Registered User
 
Join Date: Aug 2007
Posts: 1
Reading the news in AnandTech really raised my hopes but they were to quickly plunge after I read egur's full post.

Not to say this initiative isn't commendable, but what I (and the rest of the world) would like to see is a true open source port of the SDK available to all OSes. This would enable the ffdshow, mplayer, VLC, you name it guys to build both encoding and decoding code into their projects and really put QuickSync to good use.
gvaley is offline   Reply With Quote
Old 29th September 2011, 09:15   #113  |  Link
jakmal
Registered User
 
Join Date: Jul 2010
Location: Sunnyvale, CA
Posts: 51
Quote:
Originally Posted by egur View Post
The QS decoder will fail to initialize on such streams. The idea is to have ffdshow fallback to libavcodec and that fails to notify the graph/player on connection failure. The player can then load another filter (e.g. LAV). That's the most elegant way to do it as far as I can see.
Future HW might (or not) support these stream types.
It would help if you pointed me to such streams for testing purposes, or to a guide on how to transcode to these formats.
Eric,

You can find a 10b H264 file at this location:

http://dl.dropbox.com/u/15890479/480p_H264.mkv

Regards
Ganesh
jakmal is offline   Reply With Quote
Old 29th September 2011, 13:49   #114  |  Link
egur
QuickSync Decoder author
 
Join Date: Apr 2011
Location: Atlit, Israel
Posts: 916
Quote:
Originally Posted by gvaley View Post
Reading the news in AnandTech really raised my hopes but they were to quickly plunge after I read egur's full post.

Not to say this initiative isn't commendable, but what I (and the rest of the world) would like to see is a true open source port of the SDK available to all OSes. This would enable the ffdshow, mplayer, VLC, you name it guys to build both encoding and decoding code into their projects and really put QuickSync to good use.
Agree, but before an open source SDK, you'll need driver support. BTW I'm not an expert on the driver, most of my knowledge is public knowledge.
* Linux has a very basic driver. I'm not aware of a video acceleration API (like DXVA).
* Mac OS X driver is developed by Apple not Intel (with Intel support of course and probably full disclosure of Windows driver code). Apple controls the driver API and functionality, because they own the OS (like Microsoft owns D3D & DXVA APIs).

Making a cross platform video acceleration SDK without a proper VA API is probably possible but would require bypassing the DXVA API and communicating in an alternative way with the driver. This usually requires a consent from the OS vendor (Microsoft & Apple) - not an easy task.
The best solution would be to have an open standard for video acceleration that would be accepted by all OS vendors (like OpenGL, OpenCL).

I believe the media SDK will be ported to other OSes in the future, so my code will be a good start point for understanding how to utilize it. My only "Windows" specific code is dealing with the memory GPU allocations, but this can be abstracted by the SDK.

Having an open source SDK is not really a must. The Intel Media SDK is free to use and you also have a large company backing it up. The SDK abstracts the HW enough so that the code is future proof.
__________________
Eric Gur,
Processor Application Engineer for Overclocking and CPU technologies
Intel QuickSync Decoder author
Intel Corp.
egur is offline   Reply With Quote
Old 29th September 2011, 14:01   #115  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,415
Funny that you would say "VA API"

Linux has a API which is supported by Intel, its called simply "VA API". It was designed by Intel initially, but AFAIK you can get adapters to run hwaccel through VAAPI on other GPUs as well these days.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 29th September 2011, 14:01   #116  |  Link
egur
QuickSync Decoder author
 
Join Date: Apr 2011
Location: Atlit, Israel
Posts: 916
Quote:
Originally Posted by jakmal View Post
Eric,

You can find a 10b H264 file at this location:

http://dl.dropbox.com/u/15890479/480p_H264.mkv

Regards
Ganesh
Thanks
__________________
Eric Gur,
Processor Application Engineer for Overclocking and CPU technologies
Intel QuickSync Decoder author
Intel Corp.
egur is offline   Reply With Quote
Old 29th September 2011, 14:02   #117  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by egur View Post
Agree, but before an open source SDK, you'll need driver support. BTW I'm not an expert on the driver, most of my knowledge is public knowledge.
* Linux has a very basic driver. I'm not aware of a video acceleration API (like DXVA).
The current driver is much more than basic. As nevcairiel pointed out, Intel supports hardware-accelerated decoding on Linux through VAAPI: http://intellinuxgraphics.org/h264.html

There's also initial encoding support through libva, but I haven't heard anyone outside Intel having tested it yet.

Last edited by nm; 29th September 2011 at 14:09.
nm is offline   Reply With Quote
Old 29th September 2011, 14:40   #118  |  Link
clsid
*****
 
Join Date: Feb 2005
Posts: 5,795
Quote:
Originally Posted by egur View Post
The QS decoder will fail to initialize on such streams. The idea is to have ffdshow fallback to libavcodec and that fails to notify the graph/player on connection failure. The player can then load another filter (e.g. LAV). That's the most elegant way to do it as far as I can see.
Future HW might (or not) support these stream types.
It would help if you pointed me to such streams for testing purposes, or to a guide on how to transcode to these formats.
Have a look at ffglobals.cpp. There is SPS parsing code there that is currently used for checking if a stream is supported. Maybe you can also fix the code to no longer depend on the libavcodec golomb stuff.

Send me a PM with your SourceForge username and I can give you commit rights.
__________________
MPC-HC 2.6.3
clsid is offline   Reply With Quote
Old 30th September 2011, 13:24   #119  |  Link
egur
QuickSync Decoder author
 
Join Date: Apr 2011
Location: Atlit, Israel
Posts: 916
Quote:
Originally Posted by nm View Post
The current driver is much more than basic. As nevcairiel pointed out, Intel supports hardware-accelerated decoding on Linux through VAAPI: http://intellinuxgraphics.org/h264.html

There's also initial encoding support through libva, but I haven't heard anyone outside Intel having tested it yet.
Good to know. I'm currently trying to make a good Windows based decoder that's easy to integrate. Cross platform code will be available once Media SDK supports it.
__________________
Eric Gur,
Processor Application Engineer for Overclocking and CPU technologies
Intel QuickSync Decoder author
Intel Corp.
egur is offline   Reply With Quote
Old 1st October 2011, 01:25   #120  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 5,001
This issue might be not easy to find egur, currently ffdshow-quicksync has a tendency to silently selfdestruct after a lot of streams continuously loaded in MPC-HC it dies and MPC-HC falls @ the next stream then back to another Decoder ffdshow-quicksync wont load anymore after until MPC-HC is restarted it isn't a specific stream it seems already changing streams fast without unloading them can trigger this, like in MPC-HC drag & drop while another stream is still loaded.
Another problem though here is MPC-HC cant cleanly unload dshow filter when a file is closed the filter is still acquired not sure though if that has something todo with ffdshow-quicksync currently braking after a while. Though maybe it's also a memory leak i didn't looked into that yet.


http://www.mediafire.com/download.php?ri4sdpjlafxxrry <- hangs (@ the cat) when the lion scene should follow (with both lav splitter and mpc-hc).

Btw the 4:2:2 Mpeg-2 Fallback already works perfectly in combination with Lav Video
Only High10, High422 and X264 losless fail
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004

Last edited by CruNcher; 1st October 2011 at 02:05.
CruNcher is offline   Reply With Quote
Reply

Tags
ffdshow, h264, intel, mpeg2, quicksync, vc1, zoom player

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.