Merge remote branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 16 May 2011 03:01:24 +0000 (05:01 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 16 May 2011 03:01:40 +0000 (05:01 +0200)
* qatar/master:
  aacdec: Use float instead of int16_t for ltp_state to avoid needless rounding.
  acelp: Remove unused gray_decode table.
  dfa: Remove unused variable.
  configure: Include AVX availability in summary output.
  configure: use same CPPFLAGS in kFreeBSD as Linux

Merged-by: Michael Niedermayer <michaelni@gmx.at>
configure
libavcodec/aac.h
libavcodec/aacdec.c
libavcodec/acelp_vectors.c

index fd7d575..15f1c42 100755 (executable)
--- a/configure
+++ b/configure
@@ -2516,6 +2516,7 @@ case $target_os in
         enable dos_paths
         ;;
     gnu/kfreebsd)
+        add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
         ;;
     gnu)
         ;;
@@ -3158,6 +3159,7 @@ if enabled x86; then
     echo "3DNow! extended enabled   ${amd3dnowext-no}"
     echo "SSE enabled               ${sse-no}"
     echo "SSSE3 enabled             ${ssse3-no}"
+    echo "AVX enabled               ${avx-no}"
     echo "CMOV enabled              ${cmov-no}"
     echo "CMOV is fast              ${fast_cmov-no}"
     echo "EBX available             ${ebx_available-no}"
index 5cc85dd..f089ee9 100644 (file)
@@ -227,7 +227,7 @@ typedef struct {
     DECLARE_ALIGNED(32, float,   coeffs)[1024];     ///< coefficients for IMDCT
     DECLARE_ALIGNED(32, float,   saved)[1024];      ///< overlap
     DECLARE_ALIGNED(32, float,   ret)[2048];        ///< PCM output
-    DECLARE_ALIGNED(16, int16_t, ltp_state)[3072];  ///< time signal for LTP
+    DECLARE_ALIGNED(16, float,   ltp_state)[3072];  ///< time signal for LTP
     PredictorState predictor_state[MAX_PREDICTORS];
 } SingleChannelElement;
 
index 48c0367..61e3365 100644 (file)
@@ -1825,9 +1825,9 @@ static void update_ltp(AACContext *ac, SingleChannelElement *sce)
             saved_ltp[i + 512] = ac->buf_mdct[1023 - i] * lwindow[511 - i];
     }
 
-    memcpy(sce->ltp_state, &sce->ltp_state[1024], 1024 * sizeof(int16_t));
-    ac->fmt_conv.float_to_int16(&(sce->ltp_state[1024]), sce->ret,  1024);
-    ac->fmt_conv.float_to_int16(&(sce->ltp_state[2048]), saved_ltp, 1024);
+    memcpy(sce->ltp_state,      sce->ltp_state+1024, 1024 * sizeof(*sce->ltp_state));
+    memcpy(sce->ltp_state+1024, sce->ret,            1024 * sizeof(*sce->ltp_state));
+    memcpy(sce->ltp_state+2048, saved_ltp,           1024 * sizeof(*sce->ltp_state));
 }
 
 /**
index e41e5fa..a44ab8c 100644 (file)
@@ -93,16 +93,6 @@ const uint8_t ff_fc_4pulses_8bits_track_4[32] =
     78, 79,
 };
 
-#if 0
-static uint8_t gray_decode[32] =
-{
-    0,  1,  3,  2,  7,  6,  4,  5,
-   15, 14, 12, 13,  8,  9, 11, 10,
-   31, 30, 28, 29, 24, 25, 27, 26,
-   16, 17, 19, 18, 23, 22, 20, 21
-};
-#endif
-
 const float ff_pow_0_7[10] = {
     0.700000, 0.490000, 0.343000, 0.240100, 0.168070,
     0.117649, 0.082354, 0.057648, 0.040354, 0.028248