1. 05 Sep, 2015 4 commits
    • Rostislav Pehlivanov's avatar
      fate: adjust AAC encoder TNS test target · 5ab3b6a8
      Rostislav Pehlivanov authored
      The new commits improve the quality.
      Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
      5ab3b6a8
    • Rostislav Pehlivanov's avatar
      aacenc_tns: adjust coefficient calculation, add double filter support · e3faad81
      Rostislav Pehlivanov authored
      This commit improves the TNS implementation to the point where it's
      actually usable and very rarely results in nastyness (in all bitrates
      except extremely low bitrates it's increasing the quality and prevents
      some distortions from the coder being audiable).
      
      Also adds a double filter support which is only used if the energy
      difference between the top and bottom of the SFBs is above the
      thresholds defined in the header file. Looking at the bitstream
      that fdk_aac generates it sometimes used a double filter despite
      the specs stating that a single filter should be enough for almost
      all cases and purposes.
      
      Unlike FAAC or fdk_aac we sometimes use a reverse filter in case
      the energy difference isn't enought to use a double filter. This
      actually works better.
      Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
      e3faad81
    • Rostislav Pehlivanov's avatar
    • Rostislav Pehlivanov's avatar
      aacenc_is: add a flag to use pure coefficients instead · 4565611b
      Rostislav Pehlivanov authored
      This commit adds a flag to use the pure coefficients instead
      of the processed ones (sce->coeffs). This is needed because
      IS will apply the changes to the coefficients immediately
      before the adjust_common_prediction function and it doesn't
      make sense to measure stereo channel coefficient difference
      when one of the channels coefficients are all zero.
      
      Therefore add a flag to use pure coefficients in that case.
      TNS is the only thing touching the coefficients before IS
      so common window prediction will not take that into account
      but the effect of the TNS filter per coefficient can be small
      (a few percent) so to some approximation it's fine to just
      ignore that.
      
      Also fixed a small error which doesn't alter the results
      that much. pow(sqrt(number), 3.0/4.0) == pow(number, 3.0/8.0) !=
      pow(number, 3.0/4.0).
      Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
      4565611b
  2. 04 Sep, 2015 36 commits