Graphics
Intel® graphics drivers and software, compatibility, troubleshooting, performance, and optimization
21296 Discussions

QuickSync H.264 MFT Height/Width Rounding/Alignment Changes

adammarks
Beginner
3,567 Views

We are using the Intel QuickSync H.264 MFT with Media Foundation for h264 encoding and our mutual customers have recently started to notice that encoding is no longer working sometimes.

We've narrowed it down to recent Intel drivers introducing a requirement for height/width of input to be 4 byte aligned.   This has previously never been the case,  height/width previously was ok to be 2 byte aligned.  Also software H.264 MFTs and other GPU MFTs are ok with a 2 byte aligned width/height.

Is this a new requirement?   Is there anything that we can query to determine if we should align height/width to 2 bytes or 4 bytes?

Thanks.

0 Kudos
10 Replies
Alberto_R_Intel
Employee
3,521 Views

adammarks, Thank you for posting in the Intel® Communities Support.


In order to answer your question and provide the most accurate assistance on this matter, we just wanted to confirm a few details about your system:

What is the model of the Intel® processor?

What is the model of the motherboard?

If this is a laptop, what is the model of it?

You mentioned, "We've narrowed it down to recent Intel drivers", what are the Intel® driver versions you are making reference to?

Which Windows* version are you using?


Any questions, please let me know.


Regards,

Albert R.


Intel Customer Support Technician


0 Kudos
Alberto_R_Intel
Employee
3,494 Views

Hello adammarks, I just wanted to check if you saw the information posted previously and if you need further assistance on this matter?


Regards,

Albert R.


Intel Customer Support Technician


0 Kudos
adammarks
Beginner
3,487 Views

Hello Albert,

Yes,  thank you,  I did just see your reply.

Here is information from 2 in-house machines we have have seen the issue :

System Model: HP EliteBook 840 G7 Notebook PC
Processor: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 CPUs), ~2.3GHz
Operating System: Windows 10 Enterprise 64-bit (10.0, Build 18363) (18362.19h1_release.190318-1202)
Card name: Intel(R) UHD Graphics
Driver File Version: 30.00.0100.9864 (English)
Driver Version: 30.0.100.9864
Video Encoders:
Intel® Quick Sync Video H.264 Encoder MFT, {4BE8D3C0-0515-4A37-AD55-E4BAE19AF471}, 0x4, 7, mfx_mft_h264ve_64.dll, 21.08.0004.0251


System Manufacturer: Dell Inc.
System Model: Latitude 5280
Processor: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz (4 CPUs), ~2.7GHz
Operating System: Windows 10 Enterprise 64-bit (10.0, Build 19044) (19041.vb_release.191206-1406)
Card name: Intel(R) HD Graphics 620
Driver File Version: 30.00.0101.1338 (English)
Driver Version: 30.0.101.1338
Video Encoders:
Intel® Quick Sync Video H.264 Encoder MFT, {4BE8D3C0-0515-4A37-AD55-E4BAE19AF471}, 0x4, 7, mfx_mft_h264ve_64.dll, 21.12.0028.0359


I also included the version of the Quick Sync H.264 MFT

0 Kudos
adammarks
Beginner
3,480 Views

To confirm,  I rolled back to a previous driver on the Dell Latitude 5280 and verified our software, Snagit, works with height/width that are divisible by 2

This is the version of the driver where height/width divisible by 2 are acceptable to the Quick Sync H.264 MFT
Driver File Version: 27.20.0100.9466 (English)
Driver Version: 27.20.100.9466
Video Encoders:
Intel® Quick Sync Video H.264 Encoder MFT, {4BE8D3C0-0515-4A37-AD55-E4BAE19AF471}, 0x4, 7, mfx_mft_h264ve_64.dll, 11.21.0003.0004




0 Kudos
Alberto_R_Intel
Employee
3,469 Views

Hello adammarks, Thank you very much for providing that information.


We will do further research on this matter, as soon as I get any updates I will post all the details on this thread.


Regards,

Albert R.


Intel Customer Support Technician


0 Kudos
Alberto_R_Intel
Employee
3,452 Views

Hello adammarks, I just received an update on this matter.

 

While still working on this scenario, we just wanted to confirm:


What is the application that you are using for encoding/decoding, is it a media foundation, an app from Windows, or a different application?

Are you a software/hardware developer?

Are you working on a project?


Regards,

Albert R.


Intel Customer Support Technician


0 Kudos
adammarks
Beginner
3,446 Views

I am a software developer for TechSmith and we have a software application called Snagit.

Snagit captures the screen and uses Windows Media Foundation to encode the video.  This is how the Intel QuickSync MFT is utilized.

To Repro this problem,  you can download a trial version of Snagit here :
https://www.techsmith.com/download/snagit/

Once Snagit is installed and running, select the Video tab, then under Selection,  use Fixed Region,  specify a fixed region of 77x77.  For video, Snagit will round this up to the nearest 2,  so it becomes 78x78

Screenshot (28).png

Then click capture and select the record button to start recording video.

Screenshot (29).png

On the affected machines, a error will immediately appear

Snag_72c7d9bf.png


We tracked it down to being the height / width not being divisible by 4,   For example,  try a height / width of 80 x 80 on a affected machine and it will work fine.  

If you revert to older drivers,  height/width divisible by 2 is fine. 



0 Kudos
Alberto_R_Intel
Employee
3,427 Views

adammarks, Thank you very much for clarifying those details.


We will continue with our research on this matter, as soon as I get more updates I will post all the information on this thread.


Regards,

Albert R.


Intel Customer Support Technician


0 Kudos
adammarks
Beginner
3,358 Views

I was doing some more testing with this today and I found that after Snagit is installed, the following registry key must be set to see the error above,   otherwise the error is more of a silent error where the video just isn't created. 

Set HKEY_CURRENT_USER\Software\TechSmith\Features\snagit\EncodeVideoForSinkWriter to 0

0 Kudos
adammarks
Beginner
3,345 Views

I've attached a simple Visual Studio 2019 C++ sample that includes source code that can repro this problem on affected machines.

The Sample code uses a Media Foundation based Source Reader to read a .mp4 file and then uses a Sink Writer to encode a new .mp4 file at a specified resoluton.  

On affected machines when the output size is 78x78 it will fail,  changing to 80x80( divisible by 4 ) will succeed.

To use it, run :  sourcereadertosinkwriter.exe small.mp4 output.mp4

0 Kudos
Reply