{"id":1892,"date":"2018-12-16T12:39:10","date_gmt":"2018-12-16T10:39:10","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=1892"},"modified":"2018-12-16T14:49:47","modified_gmt":"2018-12-16T12:49:47","slug":"nasty-bugs-in-intel-media-sdk","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/1892","title":{"rendered":"Nasty bugs in Intel Media SDK"},"content":{"rendered":"<p>It might be an \u00e2\u20ac\u0153old\u00e2\u20ac\u009d version of Intel Media SDK runtime but still it is expected that software is running fine in older environments as well.<\/p>\n<p><a href=\"https:\/\/software.intel.com\/en-us\/node\/628434#MFXVideoVPP_Reset1\"><code>MFXVideoVPP_Reset<\/code><\/a> API is available since SDK API 1.0, there is nothing new with it. In certain scenario I use the API to change resolution of the processed video and<br \/>\nI respectively update <code>mfxVideoParam<\/code> structure then <code>MFXVideoVPP_Reset<\/code>, <code>MFXVideoVPP_Query<\/code>, <code>MFXVideoVPP_QueryIOSurf<\/code> all succeed &#8211; nice.<\/p>\n<p>The system is an i7-3571U laptop, that is equipped with Intel 3rd Gen CPU. MFX version reported is 1.11.<\/p>\n<p>When the reset sequence succeeds as expected, however further <code>MFXVideoVPP_GetVideoParam<\/code> reports unchanged properties\u00e2\u20ac\u00a6 Hey, come on!<\/p>\n<p>I quote below <a href=\"https:\/\/software.intel.com\/en-us\/forums\/intel-media-sdk\/topic\/595355\">feedback from Intel<\/a> I just found on a seemingly similar matter, enjoy:<\/p>\n<blockquote><p>for some algorithm, <code>MFXVideoVPP_Reset<\/code> is not supported, and it will return <code>MFX_ERR_NONE<\/code> but no effect.<br \/>\nyou can try replace <code>MFXVideoVPP_Reset<\/code> with <code>MFXVideoVPP_Close<\/code> &amp; <code>MFXVideoVPP_Init<\/code> to make it work.<\/p><\/blockquote>\n<p><!--more-->Just for the record the runtime there is producing weird D3D11 errors with a pretty straightforward texture scaling operation:<\/p>\n<blockquote><p>D3D11_VIDEO_PROCESSOR_DEVICE_CAPS:<br \/>\nRateConversionCapsCount: 1<br \/>\nMaxInputStreams: 8<br \/>\nMaxStreamStates: 8<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_BRIGHTNESS: -1000 &#8211; 1000, 0, 0.100000<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_CONTRAST: 0 &#8211; 1000, 100, 0.010000<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_HUE: -1800 &#8211; 1800, 0, 0.100000<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_SATURATION: 0 &#8211; 1000, 100, 0.010000<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_NOISE_REDUCTION: 0 &#8211; 64, 0, 1.000000<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_EDGE_ENHANCEMENT: 0 &#8211; 64, 44, 1.000000<br \/>\nD3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS:<br \/>\nCustomRateCount: 0<br \/>\nFutureFrames: 1<br \/>\nPastFrames: 1<br \/>\n103 is supported as input<br \/>\n103 is supported as output<br \/>\n107 is supported as input<br \/>\n107 is supported as output<br \/>\n106 is supported as input<br \/>\n106 is supported as output<br \/>\n87 is supported as input<br \/>\n87 is supported as output<br \/>\nDESCRIPTION<br \/>\nInputFrameFormat: 0<br \/>\nInputFrameRate: -16843010 -16843010<br \/>\nInputWidth: 352 InputHeight: 288<br \/>\nOutputFrameRate: -16843010 -16843010<br \/>\nOutputWidth: 1920 OutputHeight: 1080<br \/>\nUsage: 0<br \/>\nRATE CONV CAPS<br \/>\nPastFrames: 1<br \/>\nFutureFrames: 1<br \/>\nProcessorCaps: 31<br \/>\nITelecineCaps: 511<br \/>\nCustomRateCount: 0<br \/>\nD3D11_VIDEO_PROCESSOR_DEVICE_CAPS:<br \/>\nRateConversionCapsCount: 1<br \/>\nMaxInputStreams: 8<br \/>\nMaxStreamStates: 8<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_BRIGHTNESS: -1000 &#8211; 1000, 0, 0.100000<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_CONTRAST: 0 &#8211; 1000, 100, 0.010000<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_HUE: -1800 &#8211; 1800, 0, 0.100000<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_SATURATION: 0 &#8211; 1000, 100, 0.010000<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_NOISE_REDUCTION: 0 &#8211; 64, 0, 1.000000<br \/>\nD3D11_VIDEO_PROCESSOR_FILTER_CAPS_EDGE_ENHANCEMENT: 0 &#8211; 64, 44, 1.000000<br \/>\nD3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS:<br \/>\nCustomRateCount: 0<br \/>\nFutureFrames: 1<br \/>\nPastFrames: 1<br \/>\n103 is supported as input<br \/>\n103 is supported as output<br \/>\n107 is supported as input<br \/>\n107 is supported as output<br \/>\n106 is supported as input<br \/>\n106 is supported as output<br \/>\n87 is supported as input<br \/>\n87 is supported as output<br \/>\nDESCRIPTION<br \/>\nInputFrameFormat: 0<br \/>\nInputFrameRate: 50000 1000<br \/>\nInputWidth: 1280 InputHeight: 720<br \/>\nOutputFrameRate: 50000 1000<br \/>\nOutputWidth: 1920 OutputHeight: 1080<br \/>\nUsage: 0<br \/>\nRATE CONV CAPS<br \/>\nPastFrames: 1<br \/>\nFutureFrames: 1<br \/>\nProcessorCaps: 31<br \/>\nITelecineCaps: 511<br \/>\nCustomRateCount: 0<br \/>\nD3D11 ERROR: ID3D11DeviceContext::CreateVideoProcessorEnumerator: Invalid input frame rate specified.\u00c2\u00a0 The numerator is non-zero, but the denominator is zero! [ STATE_CREATION ERROR #3145795: CREATEVIDEOPROCESSORENUMERATOR_INVALIDINPUTFRAMERATE]<\/p><\/blockquote>\n<p>1920&#215;1080 and 1280&#215;720 are mine, it is okay. Where the heck 352&#215;288 comes from? With a frame rate built out of values from uninitialized memory&#8230; It is not only debug output, it is also a <code>_com_error<\/code> <code>E_INVALIDARG<\/code> exception in d3d11.dll, but MFX runtime plays this game internally and produces no failure on its application requested activity though.<\/p>\n<p>A really good thing in Intel Media SDK in\u00c2\u00a0<a href=\"https:\/\/software.intel.com\/en-us\/node\/696212\"><code>MFX_ERR_GPU_HANG<\/code><\/a> status code. &#8220;Oh yeah, it&#8217;s our bug, sorry for this&#8221;. I appreciate it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It might be an \u00e2\u20ac\u0153old\u00e2\u20ac\u009d version of Intel Media SDK runtime but still it is expected that software is running fine in older environments as well. MFXVideoVPP_Reset API is available since SDK API 1.0, there is nothing new with it. In certain scenario I use the API to change resolution of the processed video and&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/1892\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[63,188,557,486],"class_list":["post-1892","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-bug","tag-intel","tag-sdl","tag-video"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1892","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=1892"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1892\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=1892"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=1892"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=1892"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}