[Ffmpeg-devel] THP ADPCM overflow fix [PATCH]

Marco Gerards mgerards
Tue Apr 10 09:58:41 CEST 2007

Mike Melanson <mike at multimedia.cx> writes:

> Marco Gerards wrote:
>> Hi,
>> There are some cracks when playing some THP files (the samples on the
>> website work just fine).  This is because of an underflow/overflow.
>> Here is a patch to fix this.
> I'm still hearing pops with the problem file, especially notable when
> the cannon fires.

Same here, but this patch reduces the pops significantly.  So this is
another problem.  The pops are only in files for which is reported
that they have 59.94 fps.  Those files do not play back (very well) on
my box, unless I re-encode them (to MPEG, for example).  Can you find
some THP file with this problem and without 59.94 fps?

> Also, I'm wondering if the CLAMP_TO_SHORT() macro should be deleted
> and replaced with the av_clip() inline function from lavu? It seems
> that all the ADPCM decoders use the first while the encoders all use
> the last. There is probably no good reason for that.

Do you want me to do this?  Can this patch be applied first?


More information about the ffmpeg-devel mailing list