- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I've encountered a case where the MPEG2 decoder crashes. I havenumThreads set to 8 and there appears to be a problem correctly setting up the internal worker threads. One of theMPEG2VideoDecoderBase::ThreadWorkingRoutine instances will callDecodeSlices with null buffer pointers (IppVideoContext::bs_* values are all NULL or zero).
This seems to happen whenm_nNumberOfThreads andcurr_thread do not match after the thread initialization loop inMPEG2VideoDecoderBase::DecodePicture.
I can reproduce this with simple_player like this:
simple_player.exeD:\\crash.m2v -vnul -t 8
This only happens for certain MPEG2 bistreams. Has anyone else seen this issue? Any suggestions on how to work around it?
Scott
Link Copied
25 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scott,
what version of IPP and sample do you use, what is your target cpu, OS? Is it possible to attach problem stream here to help us reproduce and investigate the problem?
Regards,
Vladimir
what version of IPP and sample do you use, what is your target cpu, OS? Is it possible to attach problem stream here to help us reproduce and investigate the problem?
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm using IPP 6.1 and samples 6.1.6.065. I reproduced this with Windows 7 running on two Xeon X5550processors. I'll have to check and see if I can share the stream in question.
Thank you,
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir,
I've also found a couple of files that show bad visual errors in the decoded frames. Two other MPEG2 decoders do not show these errors and I am fairly confident that the file itself is good. Can I share this clip with you as well?
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes, of course that will be useful
Thanks,
Vladimir
Thanks,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir,
Do you know when I might get some more info on the files I provided?
Thank you,
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scott,
we are still looking at your issue.
Regards,
Vladimir
we are still looking at your issue.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scott,
Looks like we've the solution.
Please make the following changes in the codec/mpeg2_dec/src/umc_mpeg2_dec_pic.cpp file :
Ipp32s curr_thread;-----------> should be moved from line 925 to line 918
Lines 981,982 should be written as :
if (curr_thread < m_nNumberOfThreads)
m_nNumberOfThreads = curr_thread;
Regards,
Alexander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much, I'll apply thisimmediately.
Do you have any more information on the other 'bad frame' issue I reported? I attached the 'bad-frames-intel.m2v' sample file in an earlier private response toVladimir.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What do you mean under "bad frames" - horizontal color bands on two or more frames ?
Regards,Alexander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander,
Yes, I'm talking about the horizontal color bands. Those are not present with other decoders.
Thanks for looking into this.
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Vladimir andAlexander,
Is there any update on the horizontal color band issue?
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Guys,
Any update on this issue?
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scott,
Thanks for the stream. We've reproduced the problem on IPP 7.0 too. The problem is under investigation now.
We'll inform you about our progress.
Regards,
Alexander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander,
Thanks for the update, please let me know if I can provide any more information.
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scott,
I've just found the problem case in MPEG2 decoder.
The solution is the following :
file umc_mpeg2_dec_blk.cpp line 212, column 45 0xab shall be written instead of 0xbb
After this change everything should be OK.
Regards,
Alexander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! I'll test it and get back to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander,
I applied the fix, and it resolves the issue with the specific segment I sent you, however I see many more similar errors in the complete file. I will send another sample.
Thank you,
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander,
Happy new year. Any update on the latest visual errors?
Thanks,
Scott
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Scott,
Happy new Year.
I've just found the problem root case.
Please add the following changes:
File umc_mpeg2_dec_bstream.h
write
#define SHOW_HI9BITS(video, CODE) \
CODE = (((video##_curr_ptr[0] << 24) | (video##_curr_ptr[1] << 16) | (video##_curr_ptr[2] << 8)) << video##_bit_offset);
#define SHOW_HI9BITS(video, CODE) \CODE = (((video##_curr_ptr[0] << 24) | (video##_curr_ptr[1] << 16) | (video##_curr_ptr[2] << 8)) << video##_bit_offset);instead of
#define SHOW_HI9BITS(video, CODE) \
CODE = (((video##_curr_ptr[0] << 24) | (video##_curr_ptr[1] << 16)) << video##_bit_offset);
Thanks for testing.
Regards,
Alexander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alexander,
Thanks for the reply.
This fixdoesn'tmake a lot of sense to me. The cause of the problem seems to be not having enough bits loaded to property use the MPEG2_DCSIZE_TABtable. I'm not sure that every invocation of SHOW_HI9BITS should be loading an additional 8 bits.Wouldn'ta bettersolutionbe to modifyDECODE_DC() in umc_mpeg2_bstream.h to invokeEXPAND_17BITS() at thebeginningof the outer else branch before it needs the additional bits?
Replace this:
} else { \
tbl = pTab[32 + (UHBITS(code, 10) & 0x1f)]; \
dct_dc_size = tbl & 0xF; \
len = tbl >> 4; \
EXPAND_17BITS(BS, code); \
EXPAND_25BITS(BS, code); \
code <<= len; \
val = UHBITS(code, dct_dc_size) - UHBITS(SHBITS(~code, 1), dct_dc_size); \
SKIP_BITS(BS, len + dct_dc_size); \
} \
With this:
} else { \
EXPAND_17BITS(BS, code); \
tbl = pTab[32 + (UHBITS(code, 10) & 0x1f)]; \
dct_dc_size = tbl & 0xF; \
len = tbl >> 4; \
EXPAND_25BITS(BS, code); \
code <<= len; \
val = UHBITS(code, dct_dc_size) - UHBITS(SHBITS(~code, 1), dct_dc_size); \
SKIP_BITS(BS, len + dct_dc_size); \
} \
Does that make sense? Is the behavior ofSHOW_HI9BITS really incorrect?
Thank you,
Scott
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page