Quantcast
Channel: Intel® Software - Media
Viewing all 2185 articles
Browse latest View live

link libmfx.a: unrecognized relocation (0x2a) in section `.text`

$
0
0

version: MSS Community Edition 2018 R2

system:  Centos 7.4.1078(Core version 3.10.0-693.el7.x86_64)(cmake2.8.12)(binutils 2.25)(gcc 4.8.5)

double check installation:

run `vainfo | grep -v unknown` is OK

run `./sample_multi_transcode -i::h264 ../content/test_stream.h264 -o::h264 test_out.h264 -hw -la` from MediaSamples_Linux_bin*.tar.gz is OK


Getting MFX_ERR_DEVICE_FAILED on h264 decode

$
0
0

I've followed the Quicksync sample_decode project and simple_decode tutorial available online. I can't seem to get those to compile (might take a look at getting those to work tomorrow), and the binaries made available for sample_decode outright do not work on my machine. I am able to compile and utilize the library with my program though; I had to make a build from the source made available in the Media SDK 2018 R2 installation, since I needed a library built with /MD (Code Generation) enabled.

I have an i7-8700K with iGPU enabled, and set as the primary adapter. I do have a secondary NVIDIA card, and I've been playing with arrangements just to try to get this to work.

Before I get into that, I've also tried testing to see if my machine would work with Quicksync on other verified applications. I have a build of FFMPEG that I know -used- to work with h264_qsv prior to some windows updates / intel driver updates, but today I get an error of (-3) unsupported. I also have a build of OBS that doesn't seem to work with QSV. The most recent stable version of OBS also doesn't seem to work encoding with QSV.

That might be it's own rat's nest in itself, so let me jump into the problem I've been having on the code side.
 

    mfxSyncPoint syncp;
	mfxFrameSurface1* mfxOutSurface = NULL;
	std::shared_ptr<mfxFrameSurface1> workingSurface = NULL;

	if(MFX_ERR_MORE_SURFACE == sts || MFX_ERR_NONE == sts) {
		workingSurface = GetFreeSurface(mfxFrameSurfaces); // Find free frame surface

		if(workingSurface == NULL) {
			gConsole->error("No free surfaces to work on");
			return;
		}
	}

	// Decode a frame asynchronously
	sts = mfxVideoDecode->DecodeFrameAsync(&mfxBts, workingSurface.get(), &mfxOutSurface, &syncp);

	// Ignore warnings if output is available,
	if(MFX_ERR_NONE < sts && syncp) {
		sts = MFX_ERR_NONE;
	}

	MFX_ERROR_CHECK_NORET(sts, "Failed to decode frame");

	if(sts == MFX_ERR_NONE) {
		// Synchronize. Wait until decoded frame is ready
		sts = mfxVideoSession.SyncOperation(syncp, 60000);

Here's a snippet of where I'm having problems. The MFXVideoSession seems to have initialized fine, the version is 1.27, codec is MFX_CODEC_AVC, IOPattern is set to MFX_IOPATTERN_IN_SYSTEM_MEMORY | MFX_IOPATTERN_OUT_SYSTEM_MEMORY, AsyncDepth is set to 1 (although this doesn't really matter).

DecodeHeader seems to work fine, it gets me mfxVideoParams that are appropriate to what I'm expecting out of the video. DecodeFrameAsync gets me an MFX_ERR_NONE, which I'm expecting - but when I get to SyncOperation, I get an MFX_ERR_DEVICE_FAILED.

Can anyone provide some insight on the problem I'm having?

QuickSync functionality broken with driver automatically deployed by microsoft (25.20.100.6323)

$
0
0

Hello,
I read this:https://software.intel.com/en-us/forums/intel-media-sdk/topic/800921 and I have a similar but not the same bug:

The "old" WHQL driver which was automatically deployed by windows update was "21.20.16.4727".
Everything is working fine with this driver.
Now a new driver is automatically deployed by windows update: 25.20.100.6323.
When we use the old driver (manually restored) our application works fine, the "sample_encode" sample works fine and the application "handbrake" can use Quicksync HW for encoding videos.
When using the new driver: Our application crashes, the "sample_encode" crashes too and "handbrake" uses a software fallback for encoding videos with QuickSync.
I compiled "sample_encode" with latest "Media SDK 2018 R2" installation. Everything("dispatcher binary") is used directly from the installation folder.

The target compute has "i5-6500" cpu and a Q170 Express chipset. There is one additional grafic adapter in system. ("Matrox Orion HD"). The intel grafics adapter is the "primary adapter" set by bios. The os is Windows 10/64 LTSC 1607.

The auto deployment of the driver is a big issue. How can we fix / workaround it in our software (or sample_encode) ?

 

 

VP9 encoding support on Windows

$
0
0

Hello,

I am using the Intel Media SDK for Windows and encounter issues when trying to initialize hardware-accelerated VP9 encoding (MFXVideoENCODE_Query returns MFX_ERR_UNSUPPORTED). My setup looks like following:

  • Windows 7 64-bit
  • Intel Media SDK for Windows 2018 R2
  • Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
  • Intel(R) HD Graphics 530  (Version 21.20.16.4860)

Therefore, I would have two questions:

  1. Is VP9 encoding supported for this chip?
  2. Do I have to load a plugin before I can use the VP9 encoder (similar to the HEVC plugin)?

Thank you very much in advance!

SyncOperation - a difference between Haswell and Coffee Lake?

$
0
0

I've written some code to do a performance analysis on decoding H264 streams (60 fps 1080p 20Mb/s) and noticed a discrepency between a Haswell box and a Coffee Lake (8400) box.  When I aggregate the results I find the Haswell decoding frames at around 6ms per frame (the distribution is not fat tailed so this was an average across 17,000 frames).  The exact same setup on the Coffee Lake box results in an average of around 16ms per frame.

I managed to narrow the delay down to the SyncOperation I'm doing on the pipeline.  For example:

Frame    Wait (ms)

[851]    16
[852]    1
[853]    16
[854]    17
[855]    1
[856]    16
[857]    17
[858]    1
[859]    16
[860]    17
[861]    1
[862]    16
[863]    17
[864]    1
[865]    16
[866]    16
[867]    1
[868]    16
[869]    17
[870]    1
[871]    16

The pipeline is essentially:

DecodeFrameAsync -> RunFrameVPPAsync -> SyncOperation  -> Lock -> Memcpy -> Unlock

I'm using D3D 11 surface allocator doing a NV12 -> YUY2 VPP conversion on the image format.  The 16ms/17ms blocking on SyncOperation is suspiciously close to a framerate of 60 fps, but also suspiciously close to Windows scheduler schenanighans.  It's not a spinlock because I see no issue with CPU usage.

I wonder if anyone has any insight into what may be going on here?  Note my setup is I'm using Quicksync for video encode/decode but I'm using a discrete card for display. 

 

 

 

MFXReadWriteMid extension

$
0
0

Recently I have discovered pretty, but potentially dangerous, MFXReadWriteMid extension for mfxMemId essence.

It resides at current github.com/Intel-Media-SDK/samples, but was born ages ago, at pre-github epoch.

MFXReadWriteMid uses the upper bit of address variable to indicate it's extended interpretation (actual MemId + read_write flags, one more indirection level).
Which can lead to damages inside LARGEADDRESSAWARE/3GB/increaseuserva/etc applications.

So, my question concerns area of MFXReadWriteMid utilization.

Is it used inside samples code only?
Or, is "extended version" of mfxMemId can be passed into my mfxFrameAllocator::Lock() function from intel's mfx engine implementation (from libmfxhw.dll)?

Kind regards
 

HEVC plugin transcoding very slow

$
0
0

Hi, 

recently I've started experimenting with HEVC plugin, which provide software HEVC decoder and encoder implementations. I've install Professional edition, recompile kernel with included patchset, and run test:

~# /opt/intel/mediasdk/samples/_bin/x64/sample_multi_transcode -i::h265 /opt/intel/mediasdk/samples/_bin/content/test_stream.265 -o::h265 test_out.h265 -sw -pe 2fca99749fdb49aeb121a5b63ef568f7
Multi Transcoding Sample Version 8.2.25.982

plugin_loader.h :172 [INFO] Plugin was loaded from GUID: { 0x15, 0xdd, 0x93, 0x68, 0x25, 0xad, 0x47, 0x5e, 0xa3, 0x4e, 0x35, 0xf3, 0xf5, 0x42, 0x17, 0xa6 } (Intel (R) Media SDK plugin for HEVC DECODE)
plugin_loader.h :172 [INFO] Plugin was loaded from GUID: { 0x2f, 0xca, 0x99, 0x74, 0x9f, 0xdb, 0x49, 0xae, 0xb1, 0x21, 0xa5, 0xb6, 0x3e, 0xf5, 0x68, 0xf7 } (Intel (R) Media SDK plugin for HEVC ENCODE)
Pipeline surfaces number (DecPool): 12
MFX SOFTWARE Session 0 API ver 1.25 parameters: 
Input  video: HEVC
Output video: HEVC

Session 0 was NOT joined with other sessions

Transcoding started
..
Transcoding finished

Common transcoding time is 1.46311 sec
-------------------------------------------------------------------------------
*** session 0 PASSED (MFX_ERR_NONE) 1.46296 sec, 101 frames
-i::h265 /opt/intel/mediasdk/samples/_bin/content/test_stream.265 -o::h265 test_out.h265 -sw -pe 2fca99749fdb49aeb121a5b63ef568f7 

-------------------------------------------------------------------------------

The test PASSED
plugin_loader.h :198 [INFO] MFXBaseUSER_UnLoad(session=0x0x55fc454a0bc0), sts=0
plugin_loader.h :198 [INFO] MFXBaseUSER_UnLoad(session=0x0x55fc454a0bc0), sts=0

 

So everything looks fine, and I've started to transcode my own files. And first sample gives me dramatically poor results: transcoding speed was getting around 3-5 fps.

~# /opt/intel/mediasdk/samples/_bin/x64/sample_multi_transcode -sw -i::h265 in.h265 -o::h265 out.h265 -b 18000 -MaxKbps 20000 -n 100 -u veryfast
Multi Transcoding Sample Version 8.2.25.982

plugin_loader.h :172 [INFO] Plugin was loaded from GUID: { 0x15, 0xdd, 0x93, 0x68, 0x25, 0xad, 0x47, 0x5e, 0xa3, 0x4e, 0x35, 0xf3, 0xf5, 0x42, 0x17, 0xa6 } (Intel (R) Media SDK plugin for HEVC DECODE)
plugin_loader.h :172 [INFO] Plugin was loaded from GUID: { 0x2f, 0xca, 0x99, 0x74, 0x9f, 0xdb, 0x49, 0xae, 0xb1, 0x21, 0xa5, 0xb6, 0x3e, 0xf5, 0x68, 0xf7 } (Intel (R) Media SDK plugin for HEVC ENCODE)
Pipeline surfaces number (DecPool): 15
MFX SOFTWARE Session 0 API ver 1.25 parameters: 
Input  video: HEVC
Output video: HEVC

Session 0 was NOT joined with other sessions

Transcoding started
.
Transcoding finished

Common transcoding time is 19.0315 sec
-------------------------------------------------------------------------------
*** session 0 PASSED (MFX_ERR_NONE) 19.0313 sec, 100 frames
-sw -i::h265 in.h265 -o::h265 out.h265 -b 18000 -MaxKbps 20000 -n 100 -u veryfast 

-------------------------------------------------------------------------------

The test PASSED
plugin_loader.h :198 [INFO] MFXBaseUSER_UnLoad(session=0x0x55d8bc1d6b50), sts=0
plugin_loader.h :198 [INFO] MFXBaseUSER_UnLoad(session=0x0x55d8bc1d6b50), sts=0

I think I have some error with my setup, but could not figured out where. On same CPU libx265 gives me around 25-30 fps ultrafast 3840x2160 transcoding, and I expect to get at least close results from MediaSDK HEVC plugin.

The input file: https://yadi.sk/d/mUOCI9shJQI68Q

I've tried to convert size to 1920x1080, convert input HEVC to 8 bits, select 25 fps input files, forcibly select chroma mode, direct select GUID of plugin. Also notice that I use only software implementation, without HW acceleration and CPU without quicksync support, but as I understand it should be fine.

My system: ubuntu 16.04.5, kernel 4.4.111 with patchset, MediaSDK 2018R1 Professional Edition for Linux.

Could you please help? 

AttachmentSize
Downloadtext/plainlscpu.txt1.27 KB
Downloadtext/plaindmidecode.txt34.67 KB

MFX_PICSTRUCT_FIELD_TFF breaks my encoder

$
0
0

Hi,

I'm trying to initialise my encoder for field/interlace encoding. The only parameter I change is PicStruct from MFX_PICSTRUCT_PROGRESSIVE to MFX_PICSTRUCT_FIELD_TFF, however doing that results in mfxENC->Query returning MFX_WRN_INCOMPATIBLE_VIDEO_PARAM. But setting the PicStruct to progressive works just fine.

What apart from setting PicStruct to MFX_PICSTRUCT_FIELD_TFF do I need to configure for QSV to accept my settings?

Is there a simpler way of setting the parameters, or any helper methods that I can use?..

See my code below and thanks for helping.

 

/Anders

 

 // Initialize encoder parameters
    mfxVideoParam mfxEncParams;
    memset(&mfxEncParams, 0, sizeof (mfxEncParams));
    if (encParamFieldCount == 1) {
        mfxEncParams.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_PROGRESSIVE;
    } else if (encParamFieldCount == 2) {
        mfxEncParams.mfx.FrameInfo.PicStruct = MFX_PICSTRUCT_FIELD_TFF;
    } else {
        std::cout << "Failed init.. Encoding field structure unknown."<< std::endl;
        return;
    }
    mfxU16 adjustedVideoWidth = MSDK_ALIGN16(videoWidth);
    mfxU16 adjustedVideoHeight = (MFX_PICSTRUCT_PROGRESSIVE == mfxEncParams.mfx.FrameInfo.PicStruct) ? MSDK_ALIGN16(videoHeight) : MSDK_ALIGN32(videoHeight);
    mfxEncParams.mfx.FrameInfo.Width = adjustedVideoWidth;
    mfxEncParams.mfx.FrameInfo.Height = adjustedVideoHeight;
    mfxEncParams.mfx.CodecId = MFX_CODEC_AVC;
    mfxEncParams.mfx.CodecProfile = MFX_PROFILE_AVC_HIGH;
    mfxEncParams.mfx.CodecLevel = MFX_LEVEL_AVC_42;
    mfxEncParams.mfx.GopPicSize = videoFPS;
    mfxEncParams.mfx.GopRefDist = 1; //I and P frames only
    mfxEncParams.mfx.TargetUsage = MFX_TARGETUSAGE_BEST_SPEED; //TODO test quality and see if speed is at all changed
    mfxEncParams.mfx.TargetKbps = 4000;
    mfxEncParams.mfx.RateControlMethod = MFX_RATECONTROL_CBR;
    mfxEncParams.mfx.FrameInfo.FrameRateExtN = videoFPS;
    mfxEncParams.mfx.FrameInfo.FrameRateExtD = 1;
    mfxEncParams.mfx.FrameInfo.FourCC = MFX_FOURCC_NV12;
    mfxEncParams.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420;
    mfxEncParams.mfx.FrameInfo.CropX = 0;
    mfxEncParams.mfx.FrameInfo.CropY = 0;
    mfxEncParams.mfx.FrameInfo.CropW = videoWidth;
    mfxEncParams.mfx.FrameInfo.CropH = videoHeight;
    mfxEncParams.mfx.FrameInfo.BitDepthLuma = 8;
    mfxEncParams.mfx.FrameInfo.BitDepthChroma = 8;
    mfxEncParams.mfx.FrameInfo.Shift = 0;
    
    mfxEncParams.IOPattern = MFX_IOPATTERN_IN_SYSTEM_MEMORY;
    mfxEncParams.AsyncDepth = 1;

    mfxExtCodingOption extendedCodingOptions;
    memset(&extendedCodingOptions, 0, sizeof (extendedCodingOptions));
    extendedCodingOptions.Header.BufferId = MFX_EXTBUFF_CODING_OPTION;
    extendedCodingOptions.Header.BufferSz = sizeof (extendedCodingOptions);
    extendedCodingOptions.MaxDecFrameBuffering = 1;
    mfxExtBuffer * extendedBuffers[1];
    extendedBuffers[0] = (mfxExtBuffer*) & extendedCodingOptions;
    mfxEncParams.ExtParam = extendedBuffers;
    mfxEncParams.NumExtParam = 1;

    // Create Media SDK encoder
    // MFXVideoENCODE* mfxENC = new MFXVideoENCODE(mfxSES);

    mfxENC = std::shared_ptr<MFXVideoENCODE>(new MFXVideoENCODE(mfxSES));
    if (mfxENC == nullptr) {
        std::cout << "Creating a MFXVideoENCODE returned nullptr."<< std::endl;
        return;
    }
    std::cout << "QSV Video encoder created."<< std::endl;

    //Probe to see if the encoder parameters are valid
    sts = mfxENC->Query(&mfxEncParams, &mfxEncParams);
    if (sts != MFX_ERR_NONE) {
        std::cout << __LINE__ << ": QSV Got error "<< sts << std::endl;
        return;
    }
    std::cout << "QSV Video encoder accepted encoding parameters."<< std::endl;

 


interlaced video

$
0
0

I'm trying to decode the following interlaced video using  The video looks terrible  (blocks of video missing etc), but it looks fine when using a different decoder (NVIDIA for example). If I look at the mfxFrameData information, many of the frames are marked as corrupt. Any ideas? 

JPEG Decoder in HW mode delivers incomplete image when using Rotation

$
0
0

I implemented a still JPEG Transcoder (Resizer) similar to the transcoder sample : 

sts = _mfxDECODE->DecodeFrameAsync(&mfxIBS, &_decSurface, &outSurface, &syncDecode);
sts = _mfxVPP->RunFrameVPPAsync(outSurface, &_encSurface[0], NULL, &syncVpp);
sts = _mfxENCODE->EncodeFrameAsync(&encodeCtrl, &_encSurface[0], &mfxOBS, &syncEncode);
sts = _mfxSession.SyncOperation(syncEncode, MSDK_WAIT_INTERVAL);

It works quite good and fast on my 8th gen i7. Now I added the Rotation feature to the JPEG decoder.

In SW mode it works as expected, but in HW mode (without d3d) it delivers an incomplete image. When I rotate a 3000 * 2000 image it delivers a result where the upper 2000 * 2000 is correct while the bottom part is solid green. 

I tried to reproduce the problem with sample_decode using

"decode jpeg -hw -nv12 -jpeg_rotate 90 -i c:\temp\w.jpg -o c:\temp\w.dmp" 

When I inspected the dump file w.dmp I noticed that (different than in SW mode result) there were large areas (1/3) filled with zero bytes.

The size of the dump file is the same like a file produced without rotation.

How to force HEVC encoder to insert SPS/PPS info to every idr frame?

$
0
0

I use MSDK's HW HEVC Encoder plugin to encode hevc stream and send it to a udp socket to do multicast streaming,so I require every idr frame has sps/pps info,so how to force encoder to insert sps/pps to every idr frame?

Intel® Media Server Studio for Linux* 2018 R1 on VM

$
0
0

Hi,

Is it possible to install `Intel® Media Server Studio for Linux* 2018 R1` in a KVM or Xen Virtual Machine?

Sincerely,
Arafath M

About response time of MFXInit()

$
0
0

I use IntelMSDK 2018R1 and software decode.

 

I have problem with Intel Core Processor i7-8700 when I do MFXInit().

i7-8700 is later than i5-3xxx in response time.

i5-3xxx is later than Pentium E5700 in response time.

i7-8700:220mS、E5700:20mS.

 

I need to frequent init and close, and create many session.

but, i7-8700 is later than old cpu in init response time.

Why?

I expected  i7-8700 is faster than old cpu in init response time.

Is there any workaround?

 

Thanks,

 

 

 

MediaSDK : Chroma 4:1:1 (YUV411) JPEG Encoding

$
0
0

As per the JPEG manual ("mediasdkjpeg-man.pdf"), ENCODE is supported for Chroma 4:1:1 (Page 6 of 9),

However, there is hardly any reference to the support in the sample (sample_encode.sln).

What I am trying to figure out is which FourCC enum in mfxStructures.h should be used to represent Chroma 4:1:1 (YUV411).

MFX_FOURCC_UYVY represents YUV422.

MFX_FOURCC_NV12 can be used for YUV420.

But which FourCC enum represents YUV411 ?

And is it actually supported as claimed in the documentation? 

Vpp scaling mode does not work

$
0
0

I am using the sample_multi_transcode in MediaSdk to transcode a h264 file from 1080p to 720p. I want to try different scaling mode. so the scaling mode is configured with a mfxExtVppScaling structure in function "CTranscodingPipeline::InitVppMfxParams(sInputParams pInParams)" in pipeline_transcode.cpp as described in the mediasdk manual . And the scaling mode value is printed in function VideoVPPHW::SyncTaskSubmission(DdiTask pTask)", which shows the scaling mode has been set successfully, but the final result makes no difference. So I am wondering how to configure the scaling mode.


WPF user control to render Intel Media SDK decoded video

$
0
0

Hi,

Is there any sample code to use WPF C# .Net to render video decoded by Intel media SDK?

 

Draw bounding box

$
0
0

I would like to extend sample_decode by drawing bounding box in rendering. Is there any example for such extensions?

Sample_decode, how to synch MFXVideoDECODE_GetPayload results and Decoded data

$
0
0

I'm looking at extending Sample_decode and post-process decoded frame (in deliverOutput) function with decoded SEI data using MFXVideoDECODE_GetPayload. But, I'm not very clear on methods of synchronizing between encoded bistream frames and decoded frame.

 

 

Linux version of libmfxswXX library

$
0
0

Where can I find Linux version of libmfxswXX library with software H.264 encoder enabled?

Intel graphic HD 500/510 dxva2 decoding

$
0
0

Hello.

I wrote a C++ software to do h264 hardware video decoding, using DXVA2.

Source code here :

H264Dxva2Decoder

This program works very well with  NVIDIA cards and Intel HD Graphics 4000 (windows7). I think this program respects correctly h264 specification from DXVA2_ModeH264_E device guid.

Unfortunately, with Intel graphic HD 500 and 510, decoding is not correct, for both windows7 and windows10. Drivers are updated.

If you run my program, you will see that there is no error, but the decoded video frame are not correct with Intel graphic HD 500/510. But it is ok with Intel HD Graphics 4000.

Can you help me to understand why Intel graphic HD 500/510 does not decode correctly, using dxva2.

 

Viewing all 2185 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>