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

DCT in ipp_sample MPEG2 for Linux

estegano
Beginner
563 Views
Hello,

I want to change the DCT coefficients from the encoder.
When I tray do
ippiQuantIntra_MPEG2_16s_C1I( block, pContext->Video[pContext->cvindex].QScale, 0, count);
for (c=0;c<65;c++) block=((block>>1)<<1)|1;

it's ok, but when I take off |1

for (c=0;c<65;c++) block=((block>>1)<<1);

I have the message
qtplayer: video/seq.c:1818: Macroblock_420_I_frame: Assertion `ret == 0' failed.
Aborted

What's happening? Am I in wrong position form encoder?
0 Kudos
4 Replies
Vladimir_Dudnik
Employee
563 Views
Hi,
could you please specify what version of IPP do you use?
Regards,
Vladimir
0 Kudos
Vladimir_Dudnik
Employee
563 Views
By the way,we cansee you use loop through 65 DCT coefficients, but actually they should be64 (or less).

for (c=0;c<65;c++)

The next, while count represents a number of nonzero coefficients, it should be modified accordingly,

i.e decremented when 1 changed to 0.

Regards,
Vladimir

0 Kudos
estegano
Beginner
563 Views
Ops! It was a big mistake. ;-)

Thank you.
I'm using l_ipp_ia32_itanium_p_4_1_2 and making some tests with l_ipp-sample-video_p_4.1.002

I have another question, perhaps an easy question.

I want access the DCT coefficients before quantization but ippiReconstructDCTBlockIntra_MPEG2_32s performs inverse quantization.
I'm testing in MPEG2-decode/video/seq.c

How can I do it?

Thank you in advance.

Regards,
Fbio
0 Kudos
Vladimir_Dudnik
Employee
563 Views
Hi Fabio,
unfortunately we do not provide such function in IPP. It might be considered for implementation in the next versions. If you feel such functionality will be useful - please submit your feature request through technical support channel (premier.intel.com)
Regards,
Vladimir
0 Kudos
Reply