1. 09 Jan, 2011 1 commit
    • Timothy B. Terriberry's avatar
      Prevent busts at low bitrates. · 76469c64
      Timothy B. Terriberry authored
      This patch makes all symbols conditional on whether or not there's
       enough space left in the buffer to code them, and eliminates much
       of the redundancy in the side information.
      A summary of the major changes:
      * The isTransient flag is moved up to before the the coarse energy.
        If there are not enough bits to code the coarse energy, the flag
         would get forced to 0, meaning what energy values were coded
         would get interpreted incorrectly.
        This might not be the end of the world, and I'd be willing to
         move it back given a compelling argument.
      * Coarse energy switches coding schemes when there are less than 15
         bits left in the packet:
        - With at least 2 bits remaining, the change in energy is forced
           to the range [-1...1] and coded with 1 bit (for 0) or 2 bits
           (for +/-1).
        - With only 1 bit remaining, the change in energy is forced to
           the range [-1...0] and coded with one bit.
        - If there is less than 1 bit remaining, the change in energy is
           forced to -1.
          This effectively low-passes bands whose energy is consistently
           starved; this might be undesirable, but letting the default be
           zero is unstable, which is worse.
      * The tf_select flag gets moved back after the per-band tf_res
         flags again, and is now skipped entirely when none of the
         tf_res flags are set, and the default value is the same for
         either alternative.
      * dynalloc boosting is now limited so that it stops once it's given
         a band all the remaining bits in the frame, or when it hits the
         "stupid cap" of (64<<LM)*(C<<BITRES) used during allocation.
      * If dynalloc boosing has allocated all the remaining bits in the
         frame, the alloc trim parameter does not get encoded (it would
         have no effect).
      * The intensity stereo offset is now limited to the range
         [start...codedBands], and thus doesn't get coded until after
         all of the skip decisions.
        Some space is reserved for it up front, and gradually given back
         as each band is skipped.
      * The dual stereo flag is coded only if intensity>start, since
         otherwise it has no effect.
        It is now coded after the intensity flag.
      * The space reserved for the final skip flag, the intensity stereo
         offset, and the dual stereo flag is now redistributed to all
         bands equally if it is unused.
        Before, the skip flag's bit was given to the band that stopped
         skipping without it (usually a dynalloc boosted band).
      In order to enable simple interaction between VBR and these
       packet-size enforced limits, many of which are encountered before
       VBR is run, the maximum packet size VBR will allow is computed at
       the beginning of the encoding function, and the buffer reduced to
       that size immediately.
      Later, when it is time to make the VBR decision, the minimum packet
       size is set high enough to ensure that no decision made thus far
       will have been affected by the packet size.
      As long as this is smaller than the up-front maximum, all of the
       encoder's decisions will remain in-sync with the decoder.
      If it is larger than the up-front maximum, the packet size is kept
       at that maximum, also ensuring sync.
      The minimum used now is slightly larger than it used to be, because
       it also includes the bits added for dynalloc boosting.
      Such boosting is shut off by the encoder at low rates, and so
       should not cause any serious issues at the rates where we would
       actually run out of room before compute_allocation().
  2. 09 Nov, 2010 1 commit
    • Timothy B. Terriberry's avatar
      Add coarse energy entropy model tuning. · ef2e6505
      Timothy B. Terriberry authored
      This tunes the entropy model for coarse energy introduced in commit
      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).
  3. 31 Aug, 2010 1 commit
  4. 26 Aug, 2010 1 commit
  5. 08 Aug, 2010 1 commit
  6. 06 Aug, 2010 1 commit
  7. 02 Aug, 2010 1 commit
  8. 23 Jul, 2010 2 commits
  9. 19 Jul, 2010 1 commit
  10. 13 Jul, 2010 1 commit
  11. 23 Jun, 2010 1 commit
  12. 13 Mar, 2010 1 commit
  13. 26 Feb, 2010 1 commit
  14. 18 Oct, 2009 2 commits
  15. 15 Oct, 2009 1 commit
  16. 14 Jun, 2009 1 commit
  17. 10 Jun, 2009 1 commit
  18. 09 Jun, 2009 2 commits
  19. 22 May, 2009 1 commit
  20. 02 May, 2009 1 commit
  21. 01 May, 2009 1 commit
  22. 02 Aug, 2008 2 commits
  23. 23 Apr, 2008 1 commit
  24. 27 Feb, 2008 1 commit
  25. 26 Feb, 2008 1 commit
  26. 13 Feb, 2008 1 commit
  27. 07 Dec, 2007 2 commits
  28. 05 Dec, 2007 3 commits
  29. 04 Dec, 2007 1 commit
  30. 30 Nov, 2007 2 commits