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

IPP H.264 Encoder Question (possibly a bug?)

exaimage
Beginner
657 Views
Hello, I have a question about the UMC H.264 Encoder.

It crashes at a particular combination of frames or MBs with the 8x8 transform mode on.

It seems that the encoder crashes at the function 'H264CoreEncoder_AdvancedIntraModeSelectOneMacroblock8x8 ( ... )'.

The parameter and the source files are attached.

Thank you.


0 Kudos
1 Solution
Pavel_V_Intel
Employee
657 Views
Good day.
There is seems to be a problem in the SAD intrinsic optimization. Try to disable it inumc_h264_sad.cpp.
Change #ifndef INTRINSIC_OPT directive on line 27 to something like #if 1
[cpp]Ipp32u SAT8x8D(const Ipp8u *pSrc1, Ipp32s src1Step, const Ipp8u *pSrc2, Ipp32s src2Step)
{
    Ipp32u satd = 0;
    __ALIGN16 Ipp16s diff[8][8];

#ifndef INTRINSIC_OPT
    Ipp32s i;

    ippiSub8x8_8u16s_C1R(pSrc1, src1Step, pSrc2, src2Step, &diff[0][0], 16);[/cpp]

View solution in original post

0 Kudos
6 Replies
Ying_H_Intel
Employee
657 Views

Hello Exaimage,

What is IPP UMC version you are using?

i just try the par and the stream with H.264 encoder under windows 32bit IPP 7.0.4.054. It seems work fine when enter the first I frame, but fail at second frame.We will looking into it and let you know ifany updates.

C:\Users\yhu5\Desktop\IPP7.0\w_ipp-samples_p_7.0.4.054\ipp-samples\audio-video-c
odecs\_bin\ia32_icl120>umc_video_enc_con.exe h264 C:\Users\yhu5\Desktop\UMC\3802
2.par a.out

Starting H264 encoding C:\Users\yhu5\Desktop\UMC\Sintel_1920x818.yuv to
ut
Source video width = 1920, height = 818, frameRate = 24.00
Max frames to encode = 2
Encoding bit rate = 4000000 bits per second
0.
C:\Users\yhu5\Desktop\IPP7.0\w_ipp-samples_p_7.0.4.054\ipp-samples\audio
odecs\_bin\ia32_icl120>simple_player.exe a.out -vdx
Video Render : DX
-RenderFormat: YV12

Stream Type : H264PV
Video Info :
-Video Type : H264
-Resolution : 1920x818
-Frame Rate : 24.00

Regards,
Ying

0 Kudos
exaimage
Beginner
657 Views
Dear Ying,

Thank you very much for the reply.

We are using 32 bit IPP 6.1.6.056 currently.
I am not very sure about the UMC version, but the ReleaseNoted is dated 03/18/2010.

As you metioned, it fails at the second frame (P frame).

Please let me know if you have any update.

Thank you very much again.

Best regards,

0 Kudos
Ying_H_Intel
Employee
657 Views
Dear Exaimage,

The bug was reproduced and investigated by our developer. It is really a new bug in implementation. Thanks for reporting it!

It happens when 8x8transform mode is used together with rate-distortion optimization, switched on for highest quality. I will notify you when fix is ready.

As a workaround, pleaseavoid using transform_8x8_mode=1 simultaneously with speed/quality=3

1 1 1 /* High profile: transform_8x8_mode: 0 -- off, 1 - on; 0 -- use standard, 1 -- use default scaling matrices for 8x8 quantization; qpprime_y_zero_transform_bypass_flag: (0, 1) */

1920 /* display_horizontal_size */

818 /* display_vertical_size */

1 2 /* entropy coding mode (0-cavlc,1-cabac); cabac_init_idc (0,1,2) */

0 /* picture coding type (0 - only FRM, 1 - only FLD , 2 - only AFRM, 3 - pure PicAFF(no MBAFF) 4 PicAFF + MBAFF). Only 0 (FRM) is supported! */

3 0 /* speed/quality grade [0,3] (0-maximum speed, 3-maximum quality); OptimalQuantization (0, 1) */

Thanks
Ying H.

0 Kudos
Pavel_V_Intel
Employee
658 Views
Good day.
There is seems to be a problem in the SAD intrinsic optimization. Try to disable it inumc_h264_sad.cpp.
Change #ifndef INTRINSIC_OPT directive on line 27 to something like #if 1
[cpp]Ipp32u SAT8x8D(const Ipp8u *pSrc1, Ipp32s src1Step, const Ipp8u *pSrc2, Ipp32s src2Step)
{
    Ipp32u satd = 0;
    __ALIGN16 Ipp16s diff[8][8];

#ifndef INTRINSIC_OPT
    Ipp32s i;

    ippiSub8x8_8u16s_C1R(pSrc1, src1Step, pSrc2, src2Step, &diff[0][0], 16);[/cpp]
0 Kudos
exaimage
Beginner
657 Views
It solves the problem.
Thank you.
0 Kudos
Ying_H_Intel
Employee
657 Views
0 Kudos
Reply