Skip to content
Snippets Groups Projects
  1. Mar 18, 2011
  2. Feb 10, 2011
  3. Feb 04, 2011
    • Timothy B. Terriberry's avatar
      Refactor the entropy coder. · a093f4df
      Timothy B. Terriberry authored and Jean-Marc Valin's avatar Jean-Marc Valin committed
      This unifies the byte buffer, encoder, and decoder into a single
       struct.
      The common encoder and decoder functions (such as ec_tell()) can
       operate on either one, simplifying code which uses both.
      The precision argument to ec_tell() has been removed.
      It now comes in two precisions:
        ec_tell() gives 1 bit precision in two operations, and
        ec_tell_frac() gives 1/8th bit precision in... somewhat more.
      ec_{enc|dec}_bit_prob() were removed (they are no longer needed).
      Some of the byte buffer access functions were made static and
       removed from the cross-module API.
      All of the code in rangeenc.c and rangedec.c was merged into
       entenc.c and entdec.c, respectively, as we are no longer
       considering alternative backends.
      rangeenc.c and rangede.c have been removed entirely.
      
      This passes make check, after disabling the modes that we removed
       support for in cf5d3a8c.
      a093f4df
  4. Jan 29, 2011
  5. Jan 11, 2011
  6. Jan 08, 2011
    • Timothy B. Terriberry's avatar
      Changes to ec_dec_cdf() to support 8-bit tables. · 845dfa19
      Timothy B. Terriberry authored and Jean-Marc Valin's avatar Jean-Marc Valin committed
      This renames ec_dec_cdf() to ec_dec_icdf(), and changes the
       functionality to use an "inverse" CDF table, where
       icdf[i]=ft-cdf[i+1].
      The first entry is omitted entirely.
      It also adds a corresonding ec_enc_icdf() to the encoder, which uses
       the same table.
      One could use ec_encode_bin() by converting the values in the tables
       back to normal CDF values, but the icdf[] table already has them in
       the form ec_encode_bin() wants to use them, so there's no reason to
       translate them and then translate them back.
      
      This is done primarily to allow SILK to use the range coder with
       8-bit probability tables containing cumulative frequencies that
       span the full range 0...256.
      With an 8-bit table, the final 256 of a normal CDF becomes 0 in the
       "inverse" CDF.
      It's the 0 at the start of a normal CDF which would become 256, but
       this is the value we omit, as it already has to be special-cased in
       the encoder, and is not used at all in the decoder.
      845dfa19
  7. Dec 22, 2010
    • Timothy B. Terriberry's avatar
      Update ec_dec_cdf() to use an unsigned cdf[]. · 1aaa50d1
      Timothy B. Terriberry authored and Jean-Marc Valin's avatar Jean-Marc Valin committed
      For our current usage, this doesn't matter, but is more consistent
       with the rest of the API.
      We may want to reduce this to an unsigned char[], but I'd rather
       coordinate that optimization with SILK's planned reduction to
       8-bit CDFs, as we may be able to use the same code.
      1aaa50d1
    • Timothy B. Terriberry's avatar
      Add test coverage for entropy coder compatibility. · de31e7e0
      Timothy B. Terriberry authored and Jean-Marc Valin's avatar Jean-Marc Valin committed
      This ensures that the various alternative routines in the entropy
       encoder and decoder (e.g., ec_{enc|dec}_bit_logp()) really are
       just specialized optimizations of the same general ec_encode()
       and ec_decode() routines.
      This is done by randomly picking one to encode with for each symbol,
       and randomly picking a different one to decode with.
      de31e7e0
  8. Dec 21, 2010
    • Timothy B. Terriberry's avatar
      Entropy coder clean-up. · 30df6cf3
      Timothy B. Terriberry authored
      This simplifies a good bit of the error handling, and should make it
       impossible to overrun the buffer in the encoder or decoder, while
       still allowing tell() to operate correctly after a bust.
      The encoder now tries to keep the range coder data intact after a
       bust instead of corrupting it with extra bits data, though this is
       not a guarantee (too many extra bits may have already been flushed).
      It also now correctly reports errors when the bust occurs merging the
       last byte of range coder and extra bits.
      
      A number of abstraction barrier violations were cleaned up, as well.
      This patch also includes a number of minor performance improvements:
       ec_{enc|dec}_bits() in particular should be much faster.
      
      Finally, tf_select was changed to be coded with the range coder
       rather than extra bits, so that it is at the front of the packet
       (for unequal error protection robustness).
      30df6cf3
  9. Nov 09, 2010
    • Timothy B. Terriberry's avatar
      Add coarse energy entropy model tuning. · ef2e6505
      Timothy B. Terriberry authored and Jean-Marc Valin's avatar Jean-Marc Valin committed
      This tunes the entropy model for coarse energy introduced in commit
       c1c40a76.
      It uses a constant set of parameters, tuned from about an hour and a
       half of randomly selected test data encoded for each frame size,
       prediction type (inter/intra), and band number.
      These will be slightly sub-optimal for different frame sizes, but
       should be better than what we were using.
      
      For inter, this saves an average of 2.8, 5.2, 7.1, and 6.7 bits/frame
       for frame sizes of 120, 240, 480, and 960, respectively.
      For intra, this saves an average of 1.5, 3.0, 4.5, and 5.3 bits/frame
       (for the same frame sizes, respectively).
      ef2e6505
  10. Sep 30, 2010
  11. Sep 13, 2010
  12. Aug 26, 2010
  13. Aug 25, 2010
  14. Aug 02, 2010
  15. Jul 28, 2010
  16. Jul 23, 2010
  17. Jul 08, 2010
  18. Jul 07, 2010
  19. Jun 21, 2010
  20. May 08, 2010
  21. Jan 17, 2010
  22. Jan 16, 2010
  23. Nov 22, 2009
  24. Oct 24, 2009
  25. Oct 22, 2009
    • Timothy B. Terriberry's avatar
      Enhancements the fixed-point approximations of non-linear functions. · a9ffc14a
      Timothy B. Terriberry authored and Jean-Marc Valin's avatar Jean-Marc Valin committed
      Accuracy for rsqrt, rcp, cos, and log2 is now at the level of truncation error
       for the current output resolution of these functions.
      sqrt and exp2 still have non-trivial algebraic error, but this cannot be
       reduced much further using the current method without additional computation.
      Also updates the fast float approximations for log2 and exp2 with coefficients
       that give slightly lower maximum relative error.
      
      Patch modified by Jean-Marc Valin to leave the cos approximation as is and
      leave the check for x<-15 in exp2 as is.
      a9ffc14a
  26. Oct 18, 2009
  27. Oct 17, 2009
  28. Oct 16, 2009
  29. Oct 02, 2009
  30. Jul 23, 2009
    • Jean-Marc Valin's avatar
      Implemented "raw bits" · c08be448
      Jean-Marc Valin authored
      Making it so all the information encoded directly with ec_enc_bits() gets
      stored at the end of the stream, without going through the range coder. This
      should be both faster and reduce the effects of bit errors.
      
      Conflicts:
      
      	tests/ectest.c
      c08be448
  31. Jul 01, 2009
  32. Jun 28, 2009
  33. Jun 05, 2009
  34. May 27, 2009
  35. May 26, 2009
    • Timothy B. Terriberry's avatar
      CWRS clean-ups and optimizations. · d98d8ae0
      Timothy B. Terriberry authored and Jean-Marc Valin's avatar Jean-Marc Valin committed
      Adds specialized O(N*log(K)) versions of cwrsi() and O(N) versions of icwrs()
       for N={3,4,5}, which allows them to operate all the way up to the theoretical
       pulse limit without serious performance degredation.
      Also substantially reduces the computation time and stack usage of
       get_required_bits().
      On x86-64, this gives a 2% speed-up for 256 sample frames, and almost a 16%
       speed-up for 64 sample frames.
      d98d8ae0
Loading