Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Haswell Quicksync lookahead?

Michael_Schmidt
Beginner
3,926 Views

http://newsroom.intel.com/servlet/JiveServlet/previewBody/3880-102-1-6896/WP-HD-Graphics-4200.pdf

I'm curious about the lookahead feature from Haswell. Is that a driver feature or it requires encoder integration for existing software? What encoder did Intel use in their comparison? It's not clear to me if I can use let's say MediaEspresso and lookahead is enabled or not.

0 Kudos
27 Replies
j_miles
Beginner
2,991 Views

Can anyone describe in more detail what the 'lookahead' feature is (in terms of video coding)? The linked white paper does not detail it. I can imagine a few things but it would be nice with an explanation.

Thanks.

 - Jay

0 Kudos
Michael_Schmidt
Beginner
2,991 Views

Lookahead:
•Before encoding the current frame, encoder pre-analyzes (look ahead) certain number of future frames to collect the statistics of those frames and understand the complexity of those frames. Based on the statistics, encoder can intelligently decide frame level bit allocation to improve overall quality, especially for video sequences that contain a lot of scene change. The number of future frames to look ahead can be adjusted by application.

Source: http://intelnewsroom.hosted.jivesoftware.com/servlet/JiveServlet/downloadBody/3910-102-1-6927/Intel%20Xeon%20E3-1200v3%20Launch%20Deck.pdf

Does it help?

0 Kudos
j_miles
Beginner
2,991 Views

Thank you Michael for the linked slides with the 'lookadhead' explanation.

 - Jay

0 Kudos
Petter_L_Intel
Employee
2,991 Views

Hi Jay and Michael,

The look ahead feature will be available as part of an Intel HD Graphics driver update, expected to be available shortly.

Existing Media SDK enabled applications, such as Media Espresso, does not support Look ahead. Future product revisions may add support for the feature as it becomes available.

Additionally. We will release a new Media SDK revision (2013 R2) a few weeks from now. The new release will provide details about the look ahead feature and how to enable it via Media SDK API.

Regards,
Petter 

0 Kudos
Michael_Schmidt
Beginner
2,991 Views

This explains it. I have searched through the current SDK but couldn't found anything about lookahead. It might also explain some odd behaviour with current encoder on quality preset with Haswell. In most videos quality preset is twice as slow as balanced preset, also twice as slow as Ivy Bridge on quality preset. On Haswell I couldn't really notice quality differences between balanced and quality preset. Twice the encoding time without image quality improvements makes no sense. Current encoder/SDK is not optimized for Haswell usage I guess.

0 Kudos
Michael_Schmidt
Beginner
2,991 Views

I see there is R2 available with lookahead. Does this work with the driver on Intels page?

0 Kudos
Eric_S_Intel
Employee
2,991 Views

Not yet.  I believe its coming shortly.   The implementation details are in the R2 dev guide doc.

-Eric  

0 Kudos
Michael_Schmidt
Beginner
2,991 Views

I know a QS encoder with lookahed support, two other are in the works. That said, without a driver it can't work. The current obviously don't support it.

0 Kudos
Michael_Schmidt
Beginner
2,991 Views

I know a QS encoder with lookahed support, two other are in the works. That said, without a driver it can't work. The current obviously don't support it.

0 Kudos
Michael_Schmidt
Beginner
2,991 Views

15.33.64.3214: http://downloadmirror.intel.com/22935/a08/Win64_1533b.zip

Is this driver with lookahead support?

0 Kudos
Anthony_P_Intel
Employee
2,991 Views

Hi Michael,

That is/was a "Beta" driver for Windows 8.1 and it does not contain support for MediaSDK API 1.7 (lookahead).  A public 'production' driver will be posted very soon.  Thanks for your patience.

0 Kudos
Michael_Schmidt
Beginner
2,991 Views
In almost all my test cases lookahead is superior to VBR and CQP. I just found a video where lookahead produces abnormal bad quality. CQP does much better in this video which is very dubious. I don't think this is the expected behavior. Can you check what is wrong with the video and lookahead? You can download from here: http://www.fileplanet.com/224115/220000/fileinfo/The-Hobbit:-An-Unexpected-Journey-HD-Trailer-1080p In Handbrake I use this settings: lookahead=1:gop-ref-dist=3:gop-pic-size=0:target-usage=4:mbbrc=1:lookahead-depth=40 Slightly different with CQP obviously. Bitrate ~3 Mbps. I made two screenshots to give you examples. CQP: http://imageshack.us/a/img829/4979/uxel.png http://imageshack.us/a/img189/7838/38zm.png Lookahead: http://imageshack.us/a/img593/6636/w9e9.png http://imageshack.us/a/img689/5188/0rau.png Detail preservation is much better with CQP. This is an unexpected abnormal result compared to my other tests.
0 Kudos
Petter_L_Intel
Employee
2,991 Views

Hi Michael,

I can see the slight difference in quality between the encoded frames your provided.

Could you please provide more details about the exact configuration (preferably via Media SDK trace logs) you are using for both the LA and the CQP case? 

Regards,
Petter 

0 Kudos
Michael_Schmidt
Beginner
2,991 Views
It's quite a big difference imho. Trace logs? If you tell me how to do. There is not much special about the configuration. Here my Handbrake settings for lookahead: http://s14.directupload.net/images/130729/yqvhwocf.png http://s1.directupload.net/images/130729/4rzreabl.png For CQP you have to use factor 23 to get ~3100 Kbps and lookahead=0 in the advanced query field. Driver version I'm using is 15.31.16.64.3234 with a i5-4670 on Windows 7 x64 SP1. If you need additional infos let me know.
0 Kudos
Petter_L_Intel
Employee
2,991 Views

Hi Michael,

Thanks for the screenshots. The tool I'm referring to is the Media SDK trace tool (mediasdk_tracer), located in the the tools folder of the Media SDK package.

To capture a log, start up the trace tool and start capture, then start your workload. After the workload is complete, stop capture and gather the trace log file.

Regards,
Petter 

0 Kudos
Michael_Schmidt
Beginner
2,991 Views

I've attached the log from a lookahead run.

0 Kudos
Petter_L_Intel
Employee
2,991 Views

Hi Michael,

can you also please share the corresponding CQP trace log so that we can explore the exact config for both workloads.

Regards,
Petter 

0 Kudos
Michael_Schmidt
Beginner
2,991 Views

Here is the corresponding CQP run from this video. 

0 Kudos
Michael_Schmidt
Beginner
2,991 Views

VBR+mbbrc looks worse than lookahead in this video but VBR+extbrc does even better than CQP, albeit at a much slower encoding pace.

0 Kudos
Senton_P_
Beginner
2,783 Views

Appreciate it Michael for your linked slides with the 'lookadhead' explanatio

my blog

0 Kudos
Reply