Thanks for your tip.
Where do you get information source saying that NVDEC of MX150 is supported via (only) DirectX API?
Actually my laptop has two GPUs, one is built-in Intel 620 and another is NVIDIA MX150.
Here are symptoms I found when I opened HW decoder for h264 stream via FFmpeg-4.1.3’s sample hw_decode.c:
dxva2.c
DEFINE_GUID(ff_DXVA2_ModeMPEG2_VLD, 0xee27417f, 0x5e28,0x4e65,0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9);
DEFINE_GUID(ff_DXVA2_ModeMPEG2and1_VLD, 0x86695f12, 0x340e,0x4f04,0x9f,0xd3,0x92,0x53,0xdd,0x32,0x74,0x60);
DEFINE_GUID(ff_DXVA2_ModeH264_E, 0x1b81be68, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
DEFINE_GUID(ff_DXVA2_ModeH264_F, 0x1b81be69, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
… more items here
Case 1:
When 620 is enabled and MX150 is enabled: no one among d3d11, dxva, qsv and cuda works.
The failure point:
static int d3d11va_create_decoder(AVCodecContext *avctx)
{
...
guid_count = ID3D11VideoDevice_GetVideoDecoderProfileCount(device_hwctx->video_device);
for (i = 0; i < guid_count; i++) {
hr = ID3D11VideoDevice_GetVideoDecoderProfile(device_hwctx->video_device, i, &guid_list[i]);
}
// functions above return guid_count = 2, guid_list[2] stores:
// 33fcfe41-de46-4a49-861b-ac71110649d5
// 914c84a3-4078-4fa9-984c-e2f262cb5c9c
// no guid matching to pre-defined deciders' guid-list
// therefore the configuration ends up failure.
...
}
Case 2:
When 620 is enabled and MX150 is disabled: d3d11 and dxva work.
static int d3d11va_create_decoder(AVCodecContext *avctx)
{
...
guid_count = ID3D11VideoDevice_GetVideoDecoderProfileCount(device_hwctx->video_device);
for (i = 0; i < guid_count; i++) {
hr = ID3D11VideoDevice_GetVideoDecoderProfile(device_hwctx->video_device, i, &guid_list[i]);
}
// functions above return guid_count = 36, guid_list[36] contains a guid matching to DEFINE_GUID(ff_DXVA2_ModeH264_E, ..)
// therefore the configuration successfully.
...
}
Case 3:
When 620 is disabled and MX1500 is enabled: no one works.
The failure point:
static int d3d11va_device_init(AVHWDeviceContext *hwdev)
{
...
hr = ID3D11DeviceContext_QueryInterface(device_hwctx->device, &IID_ID3D11VideoDevice,
(void **)&device_hwctx->video_device);
hr = E_NOINTERFACE // No such interface supported.
...
}