[PATCH] thusnelda keyframe only speedup

Philip Heron <[email protected]>
Newsgroups gmane.comp.multimedia.ogg.theora.devel
Message-ID <[email protected]>
Hi all,

Attached is a trivial patch that speeds up encoding for key frame only 
streams. It skips the motion vector search which is not needed when 
there are never going to be any delta frames. It was made against 
thusnelda SVN revision 14589.

Tested on Fedora 8 x64_64.

-Phil

_______________________________________________
theora-dev mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/theora-dev
thusnelda-14589-keyframe-only.patch (text/x-patch, 437 B)
Index: lib/enc/encoder_toplevel.c
===================================================================
--- lib/enc/encoder_toplevel.c	(revision 14589)
+++ lib/enc/encoder_toplevel.c	(working copy)
@@ -41,7 +41,7 @@
   oggpackB_write(cpi->oggbuffer,0,1);
   
   WriteFrameHeader(cpi);
-  PickMVs(cpi);
+  if(cpi->info.keyframe_frequency_force > 1) PickMVs(cpi);
 
   for(i=0; i<cpi->macro_total; i++)
     cpi->macro[i].mode = CODE_INTRA;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.