id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,mlocked 2984,Enhancement for finding MPEG2 startcodes,gnome42@…,Janne Grunau,"Two patches to speed up finding start codes in MPEG2 streams. One patch for recording (dtvrecorder) and one for playback (avformatdecoder). I did some micro benchmarks comparing three scanning methods; the current one-byte-at-a-time approach, memchr(), and this three-btyes-at-a-time approach. I was expecting the memchr() to be the fastest but three-bytes-at-a-time always seemed to be quicker. Sample output from a run on an old celeron:[[BR]] Found 13437824 matches in 42.4915 seconds (three-bytes ...)[[BR]] Found 13437824 matches in 54.9326 seconds (memchr())[[BR]] Found 13437824 matches in 96.6009 seconds (one-byte ... current) Problem: These patches both use nothl() for endian issues, this is undesireable. :/ But Janne says he has a way around this? :) Also, I think danielk has said that these scanning methods are 'naive' and could be improved. If anyone has some pointers or hints on how to do that I would be interested.",enhancement,closed,minor,unknown,mythtv,0.20,low,fixed,,,0