Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
6670 Discussions

H264VideoEncoder problem to process GetFrame

stsybikov
Beginner
149 Views

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;

 

H264Encoder.Init(&Params);

 

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);

DataIn.SetDataSize(FrameSize);

 

DataOut.SetBufferPointer(pOutputData,10000000);

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

 

 

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

 

Regards,

Sergey Tsybikov

Smith&Nephew Endoscopy

 

0 Kudos
1 Reply
stsybikov
Beginner
149 Views
I found the solution for this issue from answer on my other post: http://software.intel.com/en-us/comment/1715029#comment-1715029 Sergey Tsybikov
Reply