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

IPP MPEG4 encoding performance on PXA27x?

damwid
Beginner
852 Views
hi, we are seeking for a platform which can encode CIF mpeg4 video in at least 15 fps, can PXA27x with IPP do this?
0 Kudos
8 Replies
Vladimir_Dudnik
Employee
852 Views

Hi,

you can use IPP media sample together with IPP for IXP. It contains MPEG4 encoder end decoder. Our measurement show that encoder should provide performance about 24 FPS for CIF resolution on PXA270 system. Could you please try it in your conditions, we are interested to know if you will be able to reproduce this data?

Regards,
Vladimir

0 Kudos
williams1123
Beginner
852 Views
Hi,Vladimir
Nice to meet you here.We are seeking for IPP MPEG4 encoder on PXA270 system,in order to improve our application's performance,increase of FPS.But I found that the MPEG4 encoder contained in 'The Intel IPP Media Processing Samples' couldn't work.IPP for PCA doesn't contain those classes used in the sample. What should I do?If Ishould use IPP media sample with IPP for IXP like you said,where can I get the sample?(I couldn't find it in IPP 5.1 for Linux on IXP4XX.)
Best regards,
sTeven
0 Kudos
Vladimir_Dudnik
Employee
852 Views

Hi Steven,

Yes, that's true, unfortunately, IPP for PCA has not completely the same API, so you can't build media sample from IPP for IXP with IPP for PCA.

if you registered for IPP for IXP, you should be able to download IPP for IXP samples from your Intel Premier Support account

Regards,
Vladimir

0 Kudos
williams1123
Beginner
852 Views
Hi Vladimir,
I registered for IPP for IXP, finished the installation, and I found that The IPP UMC video encoder Sample package contains script for building project for MontaVista* Linux* 3.0 CEE LE and MontaVista* Linux* 3.1 PRO BE. Which script should I use? LE or BE? If I build the sample successfully, could the application work on PCA270 platform simply directly?
If I have to build another MPEG4 enocder application with the API contains in the IPP for PCA such like BlockMatch_Integer_16x16_MVFAST, where can I get more details about the API? Is there anyuseful media processingsample for IPP for PCA?
Regards,
sTeven
0 Kudos
Vladimir_Dudnik
Employee
852 Views

Hi Steven,

There is requirement (from IPP for IXP Linux releasenotes.txt file)

System Requirements
Minimum Hardware Requirements to Run Applications for the IXP4XX product linea system from the IXP4XX product line with either
MontaVista* Linux* 3.0 CEE LE or
MontaVista* Linux* 3.1 Pro BE
Software Requirements to Develop Applications for the IXP4XX product line
Linux system with glibc 2.2.4, 2.2.5, 2.2.93, 2.3.2 or 2.3.3 and the 2.4.X or 2.6.X Linux kernel as represented by the following distributions. Note: Not all distributions listed are validated and not all distributions are listed.
Red Hat* Linux 7.3, 8, 9
Red Hat Enterprise Linux* 2.1, 3
SUSE* Linux 8.2, 9.1
SUSE Linux Enterprise Server* 8 or 9
A supported C compiler (Intel IPP has been tested with the following):
iwmmxt_le-gcc (MontaVista*) for little endian applications
xscale_be-gcc (MontaVista*) for big endian applications

Version of build scriptdepends on OS you have on your PCA270 device. Here, BE and LE stands for big-endian and little-endian.

If application you want to build based on IPP for PCA API you need to link it with IPP for PCA libraries. As far as I know, IPP for PCA provides MPEG4 encoder and decoder sample for Linux by request, so you need to contact with Intel Premier Support to get it.

Regards,
Vladimir

0 Kudos
williams1123
Beginner
852 Views
Hi Vladimir,
I have just visit Intel Premie Support again and found MPEG4 encoder and decoder sample for IPP for PCA on page 2 I ignored before. By the way the PXA27x Sampleson "Intel Integrated Performance Primitives Samples Page" haven't been update yet, still 'Coming Soon'.
Thanks for your help. I'll try to build the application based on IPP for PCA API first, refer to the sample.
Best regards,
sTeven
0 Kudos
williams1123
Beginner
852 Views
Hi Vladimir,
I used IPP mpeg4 encoder sample for PCA to build my application. Themain interface source code is :
************************************************************
mp4_enc_state enc_state;
mp4_enc_params enc_config;
sample_bitstream stream_buf;
mp4_enc_vop_infor vop_infor;
sample_statusret_code;
u_int32_tbuf_size;
bool CIPPMPEG4VideoEncoder::Init( CLiveConfig* pConfig )
{
enc_config.vol_verid= 2;
enc_config.vol_width= pConfig->m_videoWidth;
enc_config.vol_height= pConfig->m_videoHeight;
enc_config.frame_rate=
(int)(pConfig->GetFloatValue(CONFIG_VIDEO_FRAME_RATE) + 0.5);
enc_config.intra_dc_thr= 0;
enc_config.ivop_interval=
(int)(pConfig->GetFloatValue(CONFIG_VIDEO_KEY_FRAME_INTERVAL));
enc_config.quant_type= Q_H263;
enc_config.vop_quant= 16;
enc_config.search_range= 15;
enc_config.use_src_me= 0;
enc_config.color_format= SAMPLE_YCbCr411;
/* init the encoder state */
ret_code = encoder_init_alloc_mpeg4(&enc_config, &enc_state);
if (SAMPLE_STATUS_NOERR != ret_code) {
return false;
}
/* init output video bitstream buffer */
buf_size = enc_state.frame_dimension.width
* enc_state.frame_dimension.height * 4;
ret_code = init_output_video_buffer(&stream_buf, buf_size);
if (SAMPLE_STATUS_NOERR != ret_code) {
encoder_free_mpeg4(&enc_state);
return false;
}
create_voandvol_header_mpeg4(&stream_buf, &enc_state);
return true;
}
bool CIPPMPEG4VideoEncoder::EncodeImage(
u_int8_t* pY, u_int8_t* pU, u_int8_t* pV)
{
memcpy(enc_state.info_pic->pic_plane[0], pY,
enc_state.info_pic->pic_width * enc_state.info_pic->pic_height);
memcpy(enc_state.info_pic->pic_plane[1], pU,
enc_state.info_pic->pic_width/2 * enc_state.info_pic->pic_height/2);
memcpy(enc_state.info_pic->pic_plane[2], pV,
enc_state.info_pic->pic_width/2 * enc_state.info_pic->pic_height/2);
ret_code = encode_mpeg4(&stream_buf, &enc_state);
if ( SAMPLE_STATUS_NOERR != ret_code ){
return false;
} else {
return true;
}
}
bool CIPPMPEG4VideoEncoder::GetEncodedImage(
u_int8_t** ppBuffer, u_int32_t* pBufferLength)
{
*ppBuffer = stream_buf.bs_buffer;
*pBufferLength = stream_buf.bs_cur_byte - stream_buf.bs_buffer;
if ( stream_buf.bs_cur_bitoffset ) {
stream_buf.bs_buffer[0] = stream_buf.bs_cur_byte[0];
}
stream_buf.bs_cur_byte = stream_buf.bs_buffer;
return true;
}
************************************************************
Then I met a segment fault after the application ran 30 seconds (everytime), such like:
************************************************************
Unhandled fault: external abort on non-linefetch (0x408) at 0x40019000
pgd = c3a14000
[40019000] *pgd=a39f9001, *pmd = a39f9001, *pte = a2ab90bf, *ppte = a2ab903b
Bus error
Bad mode in data abort handler detected: mode ABT_32
Vectors: (0xffff0000 to 0xffff0040)
0000: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0020: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
Stubs: (0xffff0200 to 0xffff04b8)
0200: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
...
04a0: 00000000 00000000 00000000 00000000 00000000 00000000
Internal error: Oops: 0
CPU: 0
pc : [] lr : [<001176f4>] Not tainted
sp : c2f5dfb0 ip : 000000f0 fp : 00000140
r10: 00000160 r9 : 001da950 r8 : 0000000e
r7 : 000000ed r6 : 00000002 r5 : fffffff0 r4 : fffffff0
r3 : bf7ff6e8 r2 : 405657f4 r1 : bf7ff6b8 r0 : 001da692
Flags: nzCv IRQs off FIQs on Mode ABT_32 Segment user
Control: 397F Table: A3A18000 DAC: 00000015
Process mp4encoder(pid: 179, stack limit = 0xc2f5c378)
Stack: (0xc2f5dff8 to 0xc2f5e000)
dfe0: ffffffff efffffff
Backtrace: invalid frame pointer
Code: bad PC value.
Segmentation fault
*********************************************************
But XviD encode work on the application well.
I did some debuging but the fault remained. Where is the problem? Is it because I using arm-linux-gcc instead of iwmmxt_le-gcc?
Regards,
sTeven
0 Kudos
Vladimir_Dudnik
Employee
852 Views

Hello Steven,

I don't think the fault because of gcc. I recommend you to submit issue report to support service to involve engineering team in investigation of that issue.

Regards,
Vladimir

0 Kudos
Reply