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;

 

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

 

2 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

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

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui