Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

MFX_ERR_NOT_ENOUGH_BUFFER

Matthew_C_7
Beginner
243 Views

I am trying to figure out why this command gives a MFX_ERR_NOT_ENOUGH_BUFFER error:

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

YUVFrame has Y,U, and V pointing to buffers and the format is MFX_CHROMAFORMAT_YUV420 and MFX_FOURCC_NV12

mfxBS is the mfxBitstream and seems to have Data initialized and has a MaxLength of 375000

Thank you!

0 Kudos
2 Replies
Matthew_C_7
Beginner
243 Views

Couple other notes, the very first time, no error is thrown but it returns a data length of 0.

mfxBS has a DataLength of 22383 after that command is called, which doesn't seem close to the MaxLength of 375,000 and shows that it does seem to be doing something.

Related, why does that command return anything?  I thought that it was asynchronous, and essentially just spun off a thread and that SyncOperation would be the one returning the error codes.  Which does return an error of itself, MFX_ERR_NULL_PTR, which I assume its because syncp returned by EncodeFrameAsync is being returned as NULL.

 

 

Petter_L_Intel
Employee
243 Views

Hi Matthew,

MFX_ERR_NOT_ENOUGH_BUFFER return code from EncodeFrameAsync means that the buffer you have allocated to store the compressed bit stream is not large enough to store the frame generated by the encoder.

Make sure you allocate enough memory to store expected maximum size of compressed frames. For examples on how to determine bit stream buffer size and allocation, please refer to the Media SDK "sample_encode" sample or the encode samples part of the Media SDK Tutorial.

Regards,
Petter

 

Reply