bbb
Posts: 55
Joined: Sat Jun 02, 2012 9:52 am

PI 2 mpeg2 software decoding revisited

Mon Apr 06, 2015 9:44 pm

Recently got my hands on a raspberry pi 2, and started looking (again) at mpeg2 software decoding - a revisit of an old 2012 thread: http://www.raspberrypi.org/forums/viewt ... =29&t=5641

Test equipment
PI 2: Ordered as a kit from pihut
PI 1: 2x Original Model B's from 2012

Common equipment:
Memory Card : 8GB Sandisk Ultra Class 10 MicroSD
Power Supply: kit supplied 5V 2A
OS: '2015-02-16-raspbian-wheezy.img' with 'apt-get update' and 'apt-get upgrade' ran.
SW: 'mpeg2test' using libmpeg2 0.5.1 + idct ARM optimizations from rockbox, GIT repo https://github.com/linuxstb/pidvbip.git, commit f77258dbda40329cd17f0361ff341cba00644f7a
Test vectors: mpeg2_samples_m2v.zip from original thread.

Note, I had to make a small Makefile change, adding '-I/opt/vc/include/interface/vmcs_host/linux' to INCLUDES line.

Results:

Code: Select all

PI.1 vs PI.2            Source FPS	PI-1 FPS	P1.1 %		PI-2 FPS	PI-2 %
bbc1_dvbt_30secs.m2v    25.00       31.59       126.36%     61.74       246.96%
bbc1s_dvbs_30secs.m2v   25.00	    27.12       108.48%     52.61       210.44%
centaur_2.m2v           29.97       31.33       104.54%     63.88       213.15%
dave_dvbt_30secs.m2v    25.00       48.84       195.36%     94.58       378.32%
hst_2.m2v               29.97       27.64        92.23%     54.31       181.21%
Conclusion is the PI-2 for single threaded mpeg2 decoding is twice as fast as the PI-1, so it should be possible to decode mpeg2 on the PI-2 ARM CPUs (plus headroom for audio decoding) without the 'MPEG-2 license key' that enables decoding on the GPU. - I also got same results on both original model B's...

Footnote: IANAL (I Am Not A Lawyer) - This is proof-of-concept work and take no responsibility for the state of licensing a MPEG2 software decoder in your country or jurisdiction.

chochis
Posts: 14
Joined: Mon Jul 16, 2012 8:29 pm

Re: PI 2 mpeg2 software decoding revisited

Thu Apr 23, 2015 6:00 am

This sounds really interesting.
How can we plug it to work with XBMC?

chochis
Posts: 14
Joined: Mon Jul 16, 2012 8:29 pm

Re: PI 2 mpeg2 software decoding revisited

Fri Apr 24, 2015 7:39 am

So, I disabled the hardware acceleration on a Xbian Kodi and the dvb tv source played normaly the only thing was the deinterlacing effect didn't work.
I am wondering how to disabled hardware acceleration for a certain codec in kodi.

bbb
Posts: 55
Joined: Sat Jun 02, 2012 9:52 am

Re: PI 2 mpeg2 software decoding revisited

Thu Apr 30, 2015 7:13 pm

Thanks that interesting info that CPU MPEG2 decoding works minus the interlacing ... and applogies, not had time yet to look into this further :(

My plan was to use Kodi (formally XBMC) with the live tv plugin streaming recordings and live tv from a myth backend hooked up to a freesat feed.

A sensible guess from playing with broadcom GPU features via OpenMax IL: I think the issue is the HW acceleration on the broadcom GPU not only decodes MPEG2 but also does the De-interlacing - so the video chain needs a little tweaking to add software De-interlacing before sending the video of to the broadcom GPU for display.

Return to “Graphics, sound and multimedia”