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.
3058 Discussions

Sample_decvpp ,change the window size , video quality is very poor

roye_t_
Beginner
386 Views


Hi,

Sample_decvpp, run H264 decoding, set the display Window's Handle: m_hwdev->Init (HWND...), when the display HWND size is FullScreen(
GetSystemMetrics (SM_CXSCREEN), GetSystemMetrics (SM_CYSCREEN), in the running process ,I change the HWND size is 320*240, the video display normal.
If when the initial HWND size is very small (320*240), then i large the HWND size FullScreen, so video quality is very poor. It seem the video was Stretched into FullScreen by windows api StretchBlt, actually decoded size is 1080p.
I try to reset m_hwdev when find the size of HWND change. such as:

m_hwdev->SetHandle((mfxHandleType)MFX_HANDLE_DEVICEWINDOW, m_Hwnd);

m_hwdev->Reset();
But no effect ,because the Reset() function return MFX_ERR_UNDEFINED_BEHAVIOR:
 hr = m_pD3DD9->ResetEx(&d3dpp, NULL);
 if (FAILED(hr))
        return MFX_ERR_UNDEFINED_BEHAVIOR;

How can I solve the problem of dynamic change of windows size, without affecting the quality of video display?

thanks!

0 Kudos
7 Replies
Mihail_P_
Beginner
386 Views

The main reason for call to ResetEx to fail is this (from MSDN): "A call to IDirect3DDevice9Ex::ResetEx will fail if called on a different thread than that used to create the device being reset". So if this guess is correct you need to modify your code in such a way that a call to ResetEx would occur in the thread where you create IDirect3dDevice9Ex. 

m_hwdev->SetHandle((mfxHandleType)MFX_HANDLE_DEVICEWINDOW, m_Hwnd) - this line is unnecessary

0 Kudos
roye_t_
Beginner
386 Views

Very accurate.
Thank you very much!

Another question:  Use soft decoder, MFXVideoSession  init is error .

mfxVersion min_version;

 // we set version to 1.0 and later we will query actual version of the library which will got leaded

 min_version.Major = 1;
 min_version.Minor = 0;

sts = m_mfxSession.Init(MFX_IMPL_SOFTWARE, &min_version);

the value of sts is MFX_ERR_UNSUPPORTED.

But It's good to run on some machines, why?

 

 

0 Kudos
Mihail_P_
Beginner
386 Views

I think that there could be 2 possible reasons.

1. Unsupported hardware.

2. Out of date drivers.

If none of this is your case then only Intel guys can answer your question, wait for them.

0 Kudos
roye_t_
Beginner
386 Views

Mihail P., Thank you for your answer,
I think drivers and  hardware problems are  related MFX_IMPL_HARDWARE_ANY.
It may be missing some of the  Intel DLL library files,  because the installation of INDE development environment can work well, and not installation of INDE environment does not work.

0 Kudos
Surbhi_M_Intel
Employee
386 Views

Hi Roye, 

You might be right it could be an installation issue or environment not set properly. One way you can find out is to use the tracer tool present @ <installaed folder>\software development kit\tools. It captures Media SDK API calls. Check if you initiate are able to initiate a session using hw implementation. Also, if you can send us the system analyzer logs( tool present at same directory) and  tracer logs we might be able to figure out your problem. 

Thanks,
Surbhi

 

 

0 Kudos
roye_t_
Beginner
386 Views

Use the tracer tool  and  solve the problem  (missing libmfxsw64.dll).

Thank you,Surbhi.

 

0 Kudos
Surbhi_M_Intel
Employee
386 Views

Great! I am closing this thread if you have questions, please start a new thread.

Thanks,
Surbhi

0 Kudos
Reply