[mythtv-users] MythCommFlag -- rolling your own and speed increases

Blammo [doh] blammo.doh at gmail.com
Fri Sep 17 02:59:31 EDT 2004


(I'm sure this is old hat to the Devs and the more experienced on the
list, but I wanted to share for those of us newer to Myth)

One of the things that is the most CPU intensive, at least on my
cluster, is the Commerical Flagging. On a XP2400 backend, it would
take somewhere between 25 and 40 minutes to flag 60 minutes worth of
broadcast TV, using Myth 0.16 from atrpm.net distro.

I starting playing around with compiler options, found at this GREAT
web page, and was PLEASANTLY suprised at the result, and I thought I'd
share it. (This is definately cheaper than a dedicated mythcommflag
box, which I was considering)


Here's a taste:

Before:
1015    20040916210000  PrimeTime Live                               10%/168fps

After:
1015    20040916210000  PrimeTime Live                              10%/299fps

Before:
2004-09-16 13:00:01 commflag: Commercial Flagging Started
2004-09-16 13:35:50 commflag: Commercial Flagging Finished
2004-09-16 16:00:00 commflag: Commercial Flagging Started
2004-09-16 16:35:58 commflag: Commercial Flagging Finished
2004-09-16 22:30:00 commflag: Commercial Flagging Started
2004-09-16 22:30:56 commflag: Commercial Flagging Finished

After:
2004-09-16 23:00:01 commflag: Commercial Flagging Started
2004-09-16 23:11:18 commflag: Commercial Flagging Finished
2004-09-16 23:37:01 commflag: Commercial Flagging Started
2004-09-16 23:45:44 commflag: Commercial Flagging Finished

MythTV Commercial Flagging, started at Thu Sep 16 23:33:28 2004
Flagging commercial breaks for:
ChanID  Start Time      Title                                      Breaks
------  --------------  -----------------------------------------  ------
1015    20040916210000  PrimeTime Live                              99%/  6     
Finished commercial break flagging at Thu Sep 16 23:42:16 2004


What did I do?

0. find out what compile OPTS work for my CPU --- see link to script at end
1. Grab the source of 0.16
2. Make sure lame was installed, otherwise Knuppel kills the compile.
3. change the compile opts in settings.pro
4. qmake settings.pro
5. qmake mythtv.pro
6. make

some time later when the compile finishes.

7. cd programs/mythcommflag
8. ./mythcommflag -h           (make sure it actually runs...)
9. mv /usr/bin/mythcommflag /usr/bin/mythcommflag.old
10. cp programs/mythcommflag/mythcommflag /usr/bin

you can side-by-side compare the two if you like, like I did, and see
the improvement.

FWIW, when you're done you will have compiled the whole suite, so you
could copy in other things to test, I was most concerned about the
comm flag tool. I'm curious about the impact of kerneldeinet and
denoise3d on the mythfrontend.... hmmmmm...


----------------------------------------

Compiler Optimzation test results:
http://home.comcast.net/~jcunningham63/linux/GCC_Optimization_apollo.html

Opts I used for my Athlon XP (barton) CPU:
        QMAKE_CXXFLAGS_RELEASE = -march=athlon-xp -O3 -ffast-math
-malign-double -funroll-loops -pipe -fomit-frame-pointer -msse -mf
;pmath=sse,387

CPU compiler option dectection script - gccopt
http://www.iol.ie/~padraiga/scripts/gcccpuopt


More information about the mythtv-users mailing list