Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

EncodeFrameAsync - MFX_ERR_NULL_PTR

Matthew_C_
New Contributor I
1,093 Views

sts = mfxENC->EncodeFrameAsync(NULL, YUVFrame, &mfxBS, &syncp);

So, for some reason I am getting sts returned with a -2, meaning MFX_ERR_NULL_PTR.

YUVFrame is not null and everything has been filled in

mfxBS does have some null parts to it, such as Data, but that's because EncodeFrameAsync is supposed to fill in mfxBS, right?

And syncp is also null but again, it's supposed to be set by EncodeFrameAsync, right?

 

Any idea why I could be suddenly getting this error, this was working until I changed a couple things, can't remember much changing these parameters though.  Thanks.

-Matt

 

0 Kudos
1 Solution
Matthew_C_
New Contributor I
1,093 Views

Or not...  wait.. figured it out mostly, it was working the first time through, then I passed a reference of mfxBS out of the library and blanked out data.. anyway should be able to figure this out.

 

Also, figured this one out on my own, but for future reference, anyway to get faster support for the Media SDK library?  Maybe paying some small amount?  I appreciate that you guys are answering question and I always get back professional, helpful answers but potentially waiting a couple days for an answer is a long time when working 9 hours a day trying to figure this stuff out on my own if I don't hear back.

View solution in original post

0 Kudos
3 Replies
Matthew_C_
New Contributor I
1,093 Views

Actually I figured it out.. sort of, ((*YUVFrame).Data).A  is null, therefore it is failing.. so I'm current question is, why when I call sts = mfxAllocator.Lock(mfxAllocator.pthis, pmfxSurfaces[nEncSurfIdx]->Data.MemId, &(pmfxSurfaces[nEncSurfIdx]->Data));, YUV are all set to be non-null but A is not?

 

I'm calling simple_lock as the locking function, and it goes into this block of code, which does not set A:

if(D3DFMT_NV12 == desc.Format)
    {
        ptr->Pitch    = (mfxU16)locked.Pitch;
        ptr->Y        = (mfxU8 *)locked.pBits;
        ptr->U        = (mfxU8 *)locked.pBits + desc.Height * locked.Pitch;
        ptr->V        = ptr->U + 1;
    }

And it doesn't seem like it should need to set A, it was working before and then suddenly stopped.. I can always just set it anyway I guess.

0 Kudos
Matthew_C_
New Contributor I
1,094 Views

Or not...  wait.. figured it out mostly, it was working the first time through, then I passed a reference of mfxBS out of the library and blanked out data.. anyway should be able to figure this out.

 

Also, figured this one out on my own, but for future reference, anyway to get faster support for the Media SDK library?  Maybe paying some small amount?  I appreciate that you guys are answering question and I always get back professional, helpful answers but potentially waiting a couple days for an answer is a long time when working 9 hours a day trying to figure this stuff out on my own if I don't hear back.

0 Kudos
Jeffrey_M_Intel1
Employee
1,093 Views

Very glad you were able to figure this out on your own.  In general the samples and tutorials are intended as places to go to figure out how to get applications working.  One advantage of a public forum is that the entire community is encouraged to reply.  We try our best to respond as quickly as possible and keep waiting time to a minimum but at this point there isn't an option to guarantee a maximum time to respond.  However, this feedback could be helpful for future planning.

0 Kudos
Reply