- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have two questions:
1. I have tryied H264 and MPEG4 encoders to encode 16 live images at the same time. Right now I have best performance on MPEG4, but still for only 5 video streams I'm getting only 8-10 frames per stream on bitrate = 2000000 (for 16 streams even lower). Ether I'm doing something wrong or I'm changing wrong parameters, but it seams that bitrate is the only parameter that has influance on image quality and I need it quite high. Is there a way to set MPEG4 or H264 to encode 16 live streams with at least 12 frames? I'm using P4 2.8Ghz with 512MB RAM.
2. I have tried to decode MPEG4 stream, but I can't get any response from decoder. I have already written all compressed data to AVI file and I can play it back in any kind of player without any problems, but I need to put compressed data into specific file structure that is not AVI or any other media format. I have already tested my solution with raw data or H264, so I know that I'm reading file stream correctly. The problem is that when I feed single data chunk into MPEG4 decoder it is returning me -899 error code. This is a part of code that I'm using to initialize decoder:
//constructor
m_dataOut =
new UMC::VideoData;m_dataIn =
new UMC::MediaData;UMC::VideoStreamInfo video_info;
video_info.color_format = UMC::YV12;
video_info.stream_type = UMC::MPEG4_VIDEO;
video_info.stream_subtype = UMC::UNDEF_VIDEO_SUBTYPE;
video_info.clip_info.width = XDIM;
video_info.clip_info.height = YDIM;
UMC::ColorConversionInfo ColorInit;
ColorInit.SizeSource.width = XDIM;
ColorInit.SizeSource.height = YDIM;
ColorInit.FormatDest = UMC::YV12;
ColorInit.SizeDest.width = XDIM;
ColorInit.SizeDest.height = YDIM;
ColorInit.lFlags = 1;
ColorInit.lDeinterlace = 0;
ColorInit.lInterpolation = UMC::FLAG_CCNV_CONVERT;
UMC::ColorSpaceConverter ColorDecoder;
m_mpeg4_Param.info = video_info;
m_mpeg4_Param.cformat = UMC::YV12;
m_mpeg4_Param.lFlags = 0;m_mpeg4_Param.lpConverter = &ColorDecoder;
m_mpeg4_Param.lpConvertInit = &ColorInit;
m_mpeg4_Param.uiLimitThreads = 1;
UMC::Status status = m_mpeg4_dec.Init( &m_mpeg4_Param );
// decoding routin
int mRetval;BYTE *pY = _buffer;
BYTE *pU = _buffer + ( XDIM * YDIM );
BYTE *pV = pU + ( XDIM * YDIM ) / 4;
m_dataOut->SetDest( pY, pU, pV
);m_dataOut->SetPitch( XDIM, XDIM/4, XDIM/4 );
m_dataIn->SetBufferPointer( _dataFile.data, _dataFile.dataSize );
m_dataIn->SetDataSize( _dataFile.dataSize );
mRetval = m_mpeg4_dec.GetFrame( m_dataIn, m_dataOut );
return _buffer;
When I retrive mRetval value it's -899. What am I doing wrong? Do I have problems because I'm not using streams from avisplitter or yuvreader?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have v5.1.
These are my settings for encoder, where image size is 720x576:
m_mpeg4_Param.Width = XDIM;
m_mpeg4_Param.Height = YDIM;
m_mpeg4_Param.NumOfFrames = 1000000;
m_mpeg4_Param.TimeIncrement = 1;
m_mpeg4_Param.TimeResolution = 30;
m_mpeg4_Param.RateControl = 1;
m_mpeg4_Param.BitRate =2000000;
//25000;m_mpeg4_Param.quant_type = 0;
m_mpeg4_Param.quantIVOP = 4;
m_mpeg4_Param.quantPVOP = 4;
m_mpeg4_Param.quantBVOP = 6;
m_mpeg4_Param.short_video_header = 0;
m_mpeg4_Param.IVOPdist = 300;
m_mpeg4_Param.BVOPdist = 0;
m_mpeg4_Param.PVOPsearchWidth = 15;
m_mpeg4_Param.PVOPsearchHeight = 15;
m_mpeg4_Param.BVOPsearchWidthForw = 15;
m_mpeg4_Param.BVOPsearchHeightForw = 15;
m_mpeg4_Param.BVOPsearchWidthBack = 15;
m_mpeg4_Param.BVOPsearchHeightBack = 15;
m_mpeg4_Param.MEalgorithm = 1;
m_mpeg4_Param.MEaccuracy = 2;
m_mpeg4_Param.ME4mv = 0;
m_mpeg4_Param.obmc_disable = 1;
m_mpeg4_Param.RoundingControl = 1;
m_mpeg4_Param.calcPSNR = 0;
m_mpeg4_Param.SceneChangeThreshold = 50;
m_mpeg4_Param.insertGOV = 0;
m_mpeg4_Param.repeatHeaders = 0;
m_mpeg4_Param.resync = 0;
m_mpeg4_Param.VideoPacketLenght = 8192;
m_mpeg4_Param.data_partitioned = 0;
m_mpeg4_Param.reversible_vlc = 0;
m_mpeg4_Param.interlaced = 0;
m_mpeg4_Param.top_field_first = 1;
m_mpeg4_Param.alternate_vertical_scan_flag = 1;
m_mpeg4_Param.interlacedME = 0;
m_mpeg4_Param.sprite_enable = 0;
m_mpeg4_Param.no_of_sprite_warping_points = 0;
m_mpeg4_Param.sprite_warping_accuracy = 0;
m_mpeg4_Param.sprite_brightness_change = 0;
m_mpeg4_Param.sprite_left_coordinate = 0;
m_mpeg4_Param.sprite_top_coordinate = 0;
m_mpeg4_Param.sprite_width = 0;
m_mpeg4_Param.sprite_height = 0;
m_mpeg4_Param.warping_mv_code_du = NULL;
m_mpeg4_Param.warping_mv_code_dv = NULL;
m_mpeg4_Param.brightness_change_factor = NULL;
m_mpeg4_Param.load_intra_quant_mat = 0;
m_mpeg4_Param.load_intra_quant_mat_len = 0;
m_mpeg4_Param.load_nonintra_quant_mat = 0;
m_mpeg4_Param.load_nonintra_quant_mat_len = 0;
m_mpeg4_Param.bsBuffer = (Ipp8u*)1;
m_mpeg4_Param.bsBuffSize = 1;
// encoder will not allocate bufferm_mpeg4_Param.padType = 0;
// set 1 for QuickTime and 2 for DivX v. >= 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will try those settings with IPP 5.1. Unfrotunately I have downloaded and tried IPP 5.2, but it is:
1. Not compiling h264_enc - some redefinition errors.
2. When mpeg4 encoder Init(...) is called with encode param PADTYPE = 0, 1 or 2 I get immidiet crush "access violation reading location..." and break point in dbgdel.cpp line 52 according to stack view on delete operator. I have used encoder settings listed here(post 30233318). Any ideas what is going on?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is crushing with any padType. It doesn't metter if I will but 0, 1 or 2 and it crushes and Init(). Now I have modified mpeg4_enc_mis.cpp a little in order to see what is going on. The only thing that I have added is vm_debug_trace and it is showing me that Init() is crushing at delete [] MBinfo ( only number "1" is shown in debug outputwithout "end 1" ). I have already tried cleaning and rebuilding my api, but it doesn't help.
void ippVideoEncoderMPEG4::Close()
{
if (mIsInit) {
// free
if (MBinfo)
{
vm_debug_trace( 1, VM_STRING("1") );
delete [] MBinfo;
vm_debug_trace( 1, VM_STRING("end 1") );
}
if (mbsAlloc && cBS.mBuffer)
{
vm_debug_trace( 1, VM_STRING("2") );
ippsFree(cBS.mBuffer);
}
if (mBuffer_1)
{
vm_debug_trace( 1, VM_STRING("3") );
ippsFree(mBuffer_1);
}
if (mBuffer_2)
{
vm_debug_trace( 1, VM_STRING("4") );
ippsFree(mBuffer_2);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have removed IPP 5.1 just in case and left only IPP 5.2. I'm sure that I'm using correct inlcude files.
I can't build video_enc_con application because I have problem with compiling h264_enc. I was pointed by you to replace header file from some other thread, but it didn't help. I'm still not able to compile h264. This time I don't have redefinition error, but "identifier not found". I have attached both log files. Any other ideas what can I do?
![](/skins/images/872293744008A34B36F8ABF94A46CC66/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page