Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
6599 Discussions

MPEG2 Encoder question (UMC::MPEG2VideoEncoder)

I'm using w_ipp_ia32_p_5.2.057.exe and
I'm playing with the class UMC::MPEG2VideoEncoder. I tested it with various widths and heights of the encoded MPEG2 stream and looks like it works fine only if the width is multiple of 16, (width % 16) == 0.

For example if I try to encode a movie with width = 60, height = 60 then code crashes in file umc_mpeg2_enc_me.h line:41
mpeg2_assert(limit_right >= 0);

because the limit_right value is -4.

My question is:
What are the restrictions on the width and height in UMC::MPEG2VideoEncoder?


0 Kudos
1 Reply

Hi, thanks for pointing this out.

In current version only width has to be a multiple of 16. If there is a need to avoid this limitation please change in umc_mpeg2_enc_defs.h in BOUNDS_H macro srcYFrameHSize to MBcountH*16 in both places.

Really it is not good to work with frame dimensions not multiple of 16 (of 32 for height with interlaced content). MPEG2 standard doesn't define how to fill extended area and such boundary macroblocks are poorly compressed. Also, some players do display aligned area and noisy or color stripes appear on the right or bottom border.