I am trying to utilize the Intel® Quick Sync Video H.264 Encoder MFT in an IMFSourceReader -> IMFSinkWriter transcoding session.
The IMFSourceReader decodes to NV12 samples and then I send them to the IMFSinkWriter with the underlying Intel® Quick Sync Video H.264 Encoder MFT activated. This works very well under Windows 8.1.
The problem occurs when using a computer with Windows 7. In this case the IMFSinkWriter does not encode any samples, it just keeps receiving/buffering more and more until it’s out of memory.
Looking at some media foundation attributes the Window 7 version is missing some important attributes.
Windows 8.1 (6.3.9600)
Intel(R) HD Graphics 4000, i5-3317U CPU @ 1.70GHz, Vendor ID: 8086, Device ID: 0166, Device Revision: 09
Driver Version: 10.18.10.4176
Windows 7 Professional (6.1.7601)
Intel(R) HD Graphics 4000, i7-3770 CPU @ 3.40GHz, Vendor ID: 8086, Device ID: 0162, Device Revision: 09
Driver Version: 10.18.10.4176
Is there anyone else with this problem?
Is this a known bug?
Or do I need to do some special config on Windows 7 to make this MFT to work correctly.
Can you please let us know which MFT surfaces are you calling through you app on Win 8.1 and Win 7 operating systems. The default MFT and apps on Win 8 and above need to use D3D11 memory and on Win 7 it has to be D3D9. Are you using D3D9 memory for the Win7 app?
Actually I have not configured the reader and writer with any specific surface type.
The only thing i configure is: MF_SOURCE_READER_ENABLE_VIDEO_PROCESSING and MF_READWRITE_ENABLE_HARDWARE_TRANSFORMS
And then I just call:
reader->ReadSample(stream, ctrlFlags, &streamRead, &flags, ¤tPos, &sample) --> NV12 sample writer->WriteSample(writerStream, sample);
So maybe on Windows 8.1 the sample I get after the ReadSample() is an D3D11Surface and therefore the MFT on the writer process it?
How should I do in Windows 7?
I ran some tests and with changes in Win7 in regard to MFT's there could be a issue. For further triaging can you please share details on the application you are running. It would be great if you can send me a reproducer of the issue. Also, can you send me the tracer log form <mediaSDk>/tools/tracer when you run you application on Win 7 and Win8 separately. You can send me a private message with details of your application and logs directly.
The tracer log files in <mediaSDk>/tools/tracer requires you to install the Intel INDE environment?
Now I only use the dll-files delivered with your driver installation and I can not see any /tools/tracer folder there. I am gonna see if I can find a non 32-bit Windows computer to install Intel INDE (my lab computer is 32-bit) and my current dev computer is a sandy bridge with external GPU.
After installing the INDE, under <mediaSDk>/tools/tracer you can find .dll support for tracer on 32-bit system. You can copy these files and then run on your 32-bit system and kindly share the log.
my current dev computer is a sandy bridge with external GPU. -> Can you send me a log from analyzer tool<mediaSDk>/tools/analyzer. Also please share a reproducer for the issue with above logs which help us in traiging the issue. You can share directly by private message using - "Send Author a Message".
Here's some logs. MediaSDK log and our app log with your quick sync MFT + one log running with only standard windows MFTs.
As sad before we create one IMFSourceReader and one IMFSinkWriter. We do not assign any MF_SOURCE_READER_D3D_MANAGER.
IMFSourceReader decodes to an NV12 sample then we just send this to the writer. This works on Win8.1 not Win7. Do you want me to send a compiled test app?
Thank you for the logs. After analyzing the logs, I see mfx query implementation is via D3D9 but on the read sample() looks like as known it is not receiving sample on D3D9 surface. Can you please run "dxdiag" and let me know DirextX version on Win7 machine.
I guess as SourceReader is not receiving in D3D9 surface, assign MF_SOURCE_READER_D3D_MANAGER as this attribute is a pointer to IDirect3DDeviceManager9 interface. Let me know if assigning the attribute works!