{"id":1889,"date":"2018-12-03T13:49:37","date_gmt":"2018-12-03T11:49:37","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=1889"},"modified":"2018-12-03T13:49:37","modified_gmt":"2018-12-03T11:49:37","slug":"minefields-of-intel-media-sdk","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/1889","title":{"rendered":"Minefields of Intel Media SDK"},"content":{"rendered":"<p>When it comes to vendor specific SDK for hardware assisted video encoding, Intel Media SDK is perhaps the oldest one among current vendors: Intel, NVIDIA, AMD. And also surprisingly the worst one. All three vendors are offering their SDKs for really close capabilities, however the kits are designed and structured differently. If NVIDIA and AMD are close in terms of convenience to developer, Intel Media SDK is apparently an outsider here.<\/p>\n<p>Debug output to facilitate debugging and troubleshooting? No. Working with this and having memories of AMF SDK <code>AMFDebug<\/code> and <code>AMFTrace<\/code> evetnually makes you cry.<\/p>\n<p>Trying to initialize a session against non-Intel GPU, which is apparently not going to work? No failure until you hit something weird later in an unrelated call. What the hell is\u00c2\u00a0<code>MFX_IMPL_HARDWARE2<\/code> in first place? In which exactly enumeration this device is second or otherwise how do I understand what device this is exactly when I select it by Intel&#8217;s ordinal number? <code>MFX_IMPL_HARDWAREn<\/code> flags are not defined to be sequential. Documentation typo references non-exiting <code>MFX_IMPL_HARDWARE1<\/code> flag. NVIDIA and AMD are clearly offering this in a more convenient way.<\/p>\n<p>Forgot to attach an allocator? You get a meaningless failure code trying to initialize encoding context.<\/p>\n<p>Trying to identify maximal supported resolution for encoder? Oopsy.<\/p>\n<p>How do I identify if runtime\/driver is capable to implicitly handle ARGB32 (RGB4) to NV12 conversion? No way without actual attempt to initialize context. In which runtime version the capability was introduced? Not documented.<\/p>\n<p><a href=\"https:\/\/software.intel.com\/en-us\/node\/628455\"><code>mfxExtVPPDoNotUse<\/code><\/a> and <a href=\"https:\/\/software.intel.com\/en-us\/node\/628456\"><code>mfxExtVPPDoUse<\/code><\/a>\u00e2\u20ac\u00a6 Seriously? Not documented well. An attempt to initialize structures \u00e2\u20ac\u0153differently\u00e2\u20ac\u009d still making sense results in meaningless error code.<\/p>\n<p>Asynchronous <code>MFXVideoENCODE_EncodeFrameAsync<\/code> requires that lifetime of <code>mfxFrameSurface1<\/code> argument is extended to the completion of asynchronous call&#8230; Things like these just have to be documented! One would hate to find this out while troubleshooting unstable operation of the API.<\/p>\n<p>The hardware encoders are out there for years, and decent ones. It is surprising that the SDK is not equally well and friendly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When it comes to vendor specific SDK for hardware assisted video encoding, Intel Media SDK is perhaps the oldest one among current vendors: Intel, NVIDIA, AMD. And also surprisingly the worst one. All three vendors are offering their SDKs for really close capabilities, however the kits are designed and structured differently. If NVIDIA and AMD&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/1889\">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":[379,188,424,512,486],"class_list":["post-1889","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-h-264","tag-intel","tag-media-foundation","tag-sdk","tag-video"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1889","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=1889"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1889\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=1889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=1889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=1889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}