[theora-dev] [PATCH] thusnelda keyframe only speedup

xiphmont at xiph.org xiphmont at xiph.org
Tue Mar 18 11:20:38 PDT 2008


On Tue, Mar 18, 2008 at 2:14 PM, Philip Heron <phil at sanslogic.co.uk> wrote:
> xiphmont at xiph.org wrote:
>  > On Sat, Mar 15, 2008 at 4:01 PM, Philip Heron <phil at sanslogic.co.uk> wrote:
>  >> 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.
>  >
>  > The results of the current frame's (and previous frame's) MV search
>  > are needed by subsequent frames to seed constant speed and constant
>  > accelleration candidates.  That includes INTRA frames. This breaks
>  > that part of the analysis.
>  >
>  > It would be valid to skip MV analysis on scene-change INTRA frames so
>  > long as you also reset the persistent MV analysis state, but it is
>  > incorrect behavior for INTRA frames forced by the keyframe max
>  > interval.
>
>  Is it possible to skip MV analysis completly as a speedup, and still
>  produce a valid bitstream? Or am I barking up the wrong tree? I'm trying
>  to encode full screen video (720x576x25fps) in real time for
>  transmission on a LAN, so speed is more important than efficiency.

Valid, yes.  You'll just end up with partly nonsensical motion vectors
for the two frames after-- also, having low-quality candidate vectors
from a previous frame will slightly slow down the search in later
frames as the code may decide to 'throw away' the inadequate candidate
vectors and start a search from scratch.

If you want Thusnelda speed now, turn off halfpel MV and get ASM
replacements for BInterSAD* in place in mode.c.

Monty


More information about the theora-dev mailing list