Community
cancel
Showing results for 
Search instead for 
Did you mean: 
roye_t_
Beginner
75 Views

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


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
75 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

roye_t_
Beginner
75 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?

 

 

Mihail_P_
Beginner
75 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.

roye_t_
Beginner
75 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.

Surbhi_M_Intel
Employee
75 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

 

 

roye_t_
Beginner
75 Views

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

Thank you,Surbhi.

 

Surbhi_M_Intel
Employee
75 Views

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

Thanks,
Surbhi

Reply