- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I compiled the MPEG-2 Decoding sample using MSVS.NET 2003 and IPP 4.1 on a Pentium-4M machine.It is really fast at the beginning but it uses a lot of memory. On my 512M system, the decoder's memory usage steadily climbs until it reaches 420-430M.
I tracked the memory allocation to this macro:
Code:
#define BSWAP(x)
(Ipp32u)(((x) << 24) + (((x)&0xff00) << 8) +
(((x) >> 8)&0xff00) + ((x) >> 24))Every 6th time that macro is called, the memory usage increases by 4k. Themacro is called via:
Code:
return BSWAP(*code);
I have isolated the macro from the return and the allocation follows the macro.
I don't understand why this allocates memory or how to fix it.
I appreciate any help.
Jere
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For those that are curios, the problem was in the bitstream routines. Apparently they try to map the ENTIRE mpeg into memory at once.
Memory was being allocated as soon as the byte was needed (i.e. read).
A rewrite of those routines fixed it.
Jere
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jere,
we are trying to keep sample code as simple as possible, it was the reason for using such approach. If you feel it is not appropriate you can submit this issue to premier.intel.com
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is an appropriate example of mpeg-2 decoding routines. It is not an appropriate example of a bitstream. But that's ok. It's not advertised as a bitstream example.
I learned quite a bit fromthe sample(much more than I expected) and appreciate it.
BTW, thanks for all your effort responding to all the questions!
Jere
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jere,
yes, you are right, this particular sample can be better. Actually we are trying to keep continuously improve our samples, so I hope in the next versions it will became more clean.
Thanks you for your interest to IPP.
Regards,
Vladimir
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