[FFmpeg-devel] [PATCH] MLP Encoder
Thu Aug 21 22:22:58 CEST 2008
On Thu, Aug 21, 2008 at 04:44:27PM -0300, Ramiro Polla wrote:
> On Thu, Aug 21, 2008 at 10:47 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Thu, Aug 21, 2008 at 01:13:32AM -0300, Ramiro Polla wrote:
> >> >> /** Applies the filter to the current samples, and saves the residual back
> >> >> * into the samples buffer. If the filter is too bad and overflows the
> >> >> * maximum amount of bits allowed (24), the samples buffer is left as is and
> >> >> * the function returns -1.
> >> >> */
> >> >
> >> > i do not belive overflow is possible
> >> > without checking the code too carefull i suspect you got the wrap around wrong
> >> > somewhere
> >> > remember (a+b) & MASK = c & MASKis the same as a & MASK = (c-b) & MASK
> >> I got a sample from Justin that overflows at this point. I don't see
> >> how masking could help, since the mask only clears LSBs. And I don't
> >> see how it could wrap around (it shouldn't).
> > hmm, if so mlp is poorly designed, anyway where does the limit of 24 bits come
> > from? In the decoder i see a huff_lsbs that is read as get_bits(5) so it
> > should be able to reach 31 ...
> If the raw samples can be encoded with 24-bit, is it not a good idea
> to drop any filter that takes more then this? (remember the codebooks
> aren't really good and just save a few bytes).
if raw is smaller than using 25 bits then yes otherwise no
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel