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

MPEG2 Encoder question (UMC::MPEG2VideoEncoder)

agent_smith
Beginner
240 Views
I'm using w_ipp_ia32_p_5.2.057.exe and w_ipp-samples_p_5.2.049.zip.
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?


Thanks!

0 Kudos
1 Reply
Leonid_K_Intel
Employee
241 Views

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.

Regards!

0 Kudos
Reply