H264VideoEncoder problem to process GetFrame

H264VideoEncoder problem to process GetFrame

Hi Intel Gurus,


I have the problem with H264VideoEncoder to encoder the file with smaller resolution size rather than original frame data size.

I have YUV420 1920x1080 buffer with data and the sample of my code:


UMC::Videodata DataIn;

UMC::MediaData DataOut;

Int FrameSize;


UMC::H264EncoderParams Params;

UMC::H264ViveoEncoder H264Encoder;

Params.key_frame_control.method = 1;

// If I have define width as 1920 and height as 1080 everything works great,

// If define a different width and height H264Encoder.GetFrame(…) crashes pointing to the memory allocation.

Params.info.clip_info.height = height;

Params.info.clip_info.width = width;

Params.info.bitrate = 10000000;

Params.info.framerate = 24;

Params.numThreads = 1;




FrameSize = FrameWidth*Frameheight*3/2; //1920*1080*3/2

Ipp8u* pOutputData = ippsMalloc_8u(FrameSize);

DataIn.Init(FrameWidth, Frameheight, UMC::YUV420, 8); // 1920, 1080

DataIn.SetBufferPointer(pYUVFrameBuffer, FrameSize);




H264Encoder.GetFrame(&DataIn, &DataOut);  // the code crashes in this point



Any idea why H264Encoder crashes ??????????????



Sergey Tsybikov

Smith&Nephew Endoscopy


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I found the solution for this issue from answer on my other post:

Sergey Tsybikov

Leave a Comment

Please sign in to add a comment. Not a member? Join today