Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

UMC_ERR_SYNC at MPEG Decoder

vardar
Beginner
263 Views
Hello all,
I am getting UMC_ERR_SYNC (-897) from MPEG4Decoder's GetFrame method.
But this is not occurring for normal streams.
I get this error only if stream size is very big.
I mean if there is low light conditions and a lot of noise in the stream.
Also same stream is playable with other decoders.
Any idea will be appreciated.
Many thanks,
victor
0 Kudos
2 Replies
Naveen_G_Intel
Employee
263 Views

Hi Victor,

I dont think error is because of size. Probably because of noise, its not able to find GOV, VOP start code. You can take care of such issue in your application itself, ignore the data.

Also, how you are initializing Frame Constructor?

Regards,

Naveen Gv

0 Kudos
vardar
Beginner
263 Views
Hello Naveen,
many thanks for your prompt reply.
Actually I don't initialize frameconstructordirectly.
My decoder initialization is as follows;
auto_ptr< MPEG4VideoDecoder > mpeg4Decoder ( new MPEG4VideoDecoder() );
auto_ptr< VideoDecoderParams > params ( new VideoDecoderParams() );
auto_ptr< VideoProcessing > color ( new VideoProcessing() );
auto_ptr< BaseCodec > pPointerCopier ( new DataPointersCopy() );
auto_ptr< MediaData > in ( new MediaData() );
auto_ptr< VideoData > out ( new VideoData() );
auto_ptr< ThreadedDemuxer > splitter ( new ThreadedDemuxer() );
if(!mpeg4Decoder.get() || !params.get() || !in.get() ||
!out.get() || !splitter.get() || !color.get() || !pPointerCopier.get())
{
vm_string_printf(__VM_STRING("Allocation failed-%d\n"), nth);
errorFound = true;
break;
}
// initialize the splitter
SplitterParams splParams;
splParams.m_lFlags = VIDEO_SPLITTER;
splParams.m_pDataReader = pRdr;
if( UMC_OK != splitter->Init(splParams)) //Status ThreadedDemuxer::Init(SplitterParams& init)
{
errorFound = true;
break;
}
bool bInitialize = false;
Ipp16u nSequentialDecodeError = 0; // sequential error counter
if (3 > in->GetDataSize())
{
Status statusHelper;
while(true)
{
statusHelper = splitter->GetNextData(in.get(), (Ipp32u)0);
if (statusHelper == UMC_OK) {
innerWhileStatusOK = true;
break;
}
}
if (!innerWhileStatusOK) {
break;
}
if(!bInitialize)
{
bInitialize = true;
if (color.get())
{
VideoProcessingParams postProcessingParams;
postProcessingParams.m_DeinterlacingMethod = NO_DEINTERLACING;
postProcessingParams.InterpolationMethod = 0;
color->SetParams(&postProcessingParams);
}
if (color.get())
params->pPostProcessing = color.get();
else
params->pPostProcessing = pPointerCopier.get();
params->info.stream_type = MPEG4_VIDEO;
params->numThreads = 0;
params->lFlags = 0;
params->m_pData = in.get();
if (UMC_OK != (mpeg4Decoder->Init(params.get())))
{
vm_string_printf(__VM_STRING("Video Decoder creation failed-%d\n"), nth);
errorFound = true;
break;
}
VideoDecoderParams params;
if (UMC_OK != mpeg4Decoder->GetInfo(&params))
{
vm_string_printf(__VM_STRING("Video Decoder creation failed-%d\n"),nth);
errorFound = true;
break;
}
out->SetAlignment(16);
out->Init(params.info.clip_info.width, params.info.clip_info.height, UMC::YUV422, 8);
out->Alloc();
//after some more internal code I'm using like
Status ret = mpeg4Decoder->GetFrame(in.get(), out.get());
0 Kudos
Reply