1. 29 Aug, 2015 5 commits
    • Rostislav Pehlivanov's avatar
      aacenc_pred: rework the way prediction is done · 44ddee94
      Rostislav Pehlivanov authored
      This commit completely alters the algorithm of prediction.
      The original commit which introduced prediction was completely
      incorrect to even remotely care about what the actual coefficients
      contain or whether any options were enabled. Not my actual fault.
      
      This commit treats prediction the way the decoder does and expects
      to do: like lossy encryption. Everything related to prediction now
      happens at the very end but just before quantization and encoding
      of coefficients. On the decoder side, prediction happens before
      anything has had a chance to even access the coefficients.
      
      Also the original implementation had problems because it actually
      touched the band_type of special bands which already had their
      scalefactor indices marked and it's a wonder the asserion wasn't
      triggered when transmitting those.
      
      Overall, this now drastically increases audio quality and you should
      think about enabling it if you don't plan on playing anything encoded
      on really old low power ultra-embedded devices since they might not
      support decoding of prediction or AAC-Main. Though the specifications
      were written ages ago and as times change so do the FLOPS.
      Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
      44ddee94
    • Rostislav Pehlivanov's avatar
      aacenc: change FF_PROFILE_UNKNOWN to AAC-Main if prediction is enabled · 949a4892
      Rostislav Pehlivanov authored
      This was missed when the original commits were done. FF_PROFILE_UNKNOWN
      is what's in avctx->profile when no audio profile is specified.
      Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
      949a4892
    • Rostislav Pehlivanov's avatar
      lpc: create a simplified Levinson-Durbin LPC handling float samples · 20962b56
      Rostislav Pehlivanov authored
      This commit simply duplicates the functionality of ff_lpc_calc_coefs()
      for the case of a Levinson-Durbin LPC with the only difference being
      that floating point samples are accepted and the resulting coefficients
      are raw and unquantized.
      The motivation behind doing this is the fact that the AAC encoder
      requires LPC in TNS and LTP and converting non-normalized floating
      point coefficients to int32_t using SWR and again back for the LPC
      coefficients was very impractical.
      The current LPC interfaces were designed for int32_t in mind possibly
      because FLAC and ALAC use this type for most internal operations.
      The mathematics in case of floats remains of course identical.
      Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
      20962b56
    • Rostislav Pehlivanov's avatar
      aac: move the TNS tables from aacdectab to the shared aactab · f55cc579
      Rostislav Pehlivanov authored
      This commit simply moves the TNS tables to a more appropriate
      aactab.h since then they can be accessed by both the decoder
      and encoder.
      
      The encoder _shouldn't_ normally need the tables since the
      specs describe a specific quantization process, but the exact
      reason for this can be seen in the TNS commit following.
      Signed-off-by: 's avatarRostislav Pehlivanov <atomnuker@gmail.com>
      f55cc579
    • Philip Langdale's avatar
      avcodec/vc1dec: Re-order init to avoid initting hwaccel too early · 91f1115a
      Philip Langdale authored
      At least for vdpau, the hwaccel init code tries to check the video
      profile and ensure that there is a matching vdpau profile available.
      
      If it can't find a match, it will fail to initialise.
      
      In the case of wmv3/vc1, I observed initialisation to fail all the
      time. It turns out that this is due to the hwaccel being initialised
      very early in the codec init, before the profile has been extracted
      and set.
      
      Conceptually, it's a simple fix to reorder the init code, but it gets
      messy really fast because ff_get_format(), which is what implicitly
      trigger hwaccel init, is called multiple times through various shared
      init calls from h263, etc. It's incredibly hard to prove to my own
      satisfaction that it's safe to move the vc1 specific init code
      ahead of this generic code, but all the vc1 fate tests pass, and I've
      visually inspected a couple of samples and things seem correct.
      Signed-off-by: 's avatarPhilip Langdale <philipl@overt.org>
      91f1115a
  2. 28 Aug, 2015 12 commits
  3. 27 Aug, 2015 23 commits