Hello,
I'm having trouble setting up the encoder. Those are the settings I'm using:
mfxVideoENCODE = new MFXVideoENCODE((mfxSession)mfxVideoSession);
auto param = shared_ptr<mfxVideoParam>(new mfxVideoParam);
param->IOPattern = MFX_IOPATTERN_IN_SYSTEM_MEMORY;
mfxInfoMFX mfx = param->mfx;
mfx.CodecId = MFX_CODEC_AVC;
mfx.CodecProfile = MFX_PROFILE_AVC_BASELINE;
mfx.TargetKbps = 2899;
mfx.EncodedOrder = 0;
auto frameInfo = mfx.FrameInfo;
frameInfo.FourCC = MFX_FOURCC_NV12;
frameInfo.Width = 896;
frameInfo.Height = 480;
frameInfo.CropX = 0;
frameInfo.CropY = 0;
frameInfo.CropW = 854;
frameInfo.CropH = 480;
frameInfo.FrameRateExtN = 24;
frameInfo.FrameRateExtD = 1;
frameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420;
MFXVideoENCODE_Query call returns -6 (MFX_ERR_INVALID_HANDLE).
MFXQueryIMPL returns 0 and impl contains 1026 (MFX_IMPL_HARDWARE | MFX_IMPL_VIA_RESERVED1).
Moreover - when trying to run sample "sample_decode_drm" (using provided binary, with commandline: ./sample_decode_drm h264 -i file.avi -hw -o video.yuv), I get the following:
libva info: VA-API version 0.34.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_0_32
libva info: va_openDriver() returns 0
Return on error: error code -3, /msdk/validation/linux_val/validation/ww29.5_Linux-HSW_vc54_Ubuntu_12.04/samples/sample_decode/src/pipeline_decode.cpp 215
Return on error: error code -3, /msdk/validation/linux_val/validation/ww29.5_Linux-HSW_vc54_Ubuntu_12.04/samples/sample_decode/src/pipeline_decode.cpp 627
Return on error: error code 1, /msdk/validation/linux_val/validation/ww29.5_Linux-HSW_vc54_Ubuntu_12.04/samples/sample_decode/src/sample_decode.cpp 279
Segmentation fault (core dumped)
Any ideas what could be wrong?