[Theora-dev] Fix a bug that causes the encoder to spend way to many bits on keyframes

Aaron Colwell acolwell at real.com
Fri Feb 18 09:58:44 PST 2005

I'll take a look at this. Even with my changes I've still seen cases where the
encoder makes a huge change in Q for the keyframe. I plan on tracking that
down as well. Having clips that exhibit this problem always help. Thanks for
including a link to your content. I'll keep you posted on my findings.


On Fri, Feb 18, 2005 at 06:49:21PM +0100, Ivan Popov wrote:
> Hi Aaron,
> On Thu, Feb 17, 2005 at 11:22:11AM -0800, Aaron Colwell wrote:
> > Here is a fix that prevents the encoder from spending too many bits on
> > keyframes. The main problem is that the old code computes the target keyframe
> > bitrate incorrectly. This causes the code that computes the Q for the frame to
> > have to use a much lower Q. This ends up causing a "popping" artifact where 
> > everything is clear for a keyframe, but gets progressively blurry for each
> > successive inter-frame.
> I have been looking for the reason of that (or similar) effect.
> No one on the list answered when I asked.
> Now I tested the encoder with your change, and unfortunately it did not
> improve the cases where I see artifacts - still your change looks right,
> if I can believe the comments in encoder_toplevel.c.
> I see terrible artifacts on "text screens" with e.g.
> theora-encoder -a 0 -V 400 -o newref.400.ogg AmelieArchive.mpg
> e.g. during the seconds 4 and 5
> or very spectacular ones with
> theora-encoder -a 0 -V 2000 -o newref.2000.ogg AmelieArchive.mpg
> e.g. during the seconds 13-16...
> (http://www.archive.org/download/AmelieArchive/AmelieArchive.mpg)
> theora-encoder script runs theoraenc which (and the library)
> is from today's svn.
> Would you - or anybody - comment on my observations?
> Best regards,
> --
> Ivan

More information about the Theora-dev mailing list