From c1f54478050279663217fe5ffa4bc90f60e7030d Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sat, 14 May 2011 16:10:30 +0200 Subject: [PATCH 1/5] configure: use same CPPFLAGS in kFreeBSD as Linux 046f081b46c8479820409cf8f530b988221bd15b reorganized the CPPFLAGS to no longer add -D_POSIX_C_SOURCE unconditionally, but only on systems (e.g., glibc based ones) that require it. As kFreeBSD uses glibc, it needs to be treated similar. Additionally, _BSD_SOURCE is turned on to enable some additional types such as caddr_t, which are normally enabled on BSD but not with glibc. --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index d527ed1974..970ec5669b 100755 --- a/configure +++ b/configure @@ -2487,6 +2487,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) ;; From c73b779d3576754f883ad5d5968cfae131752f40 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 15 May 2011 11:46:18 +0200 Subject: [PATCH 2/5] configure: Include AVX availability in summary output. --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 970ec5669b..d6a5d69c6c 100755 --- a/configure +++ b/configure @@ -3100,6 +3100,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}" From b1bb3b8d875900b6ea6a560d9336e4d4b3f8fb37 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 15 May 2011 13:12:47 +0200 Subject: [PATCH 3/5] dfa: Remove unused variable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the warning: libavcodec/dfa.c:189: warning: unused variable ‘frame_end’ --- libavcodec/dfa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c index 1556bc7acb..919375baf0 100644 --- a/libavcodec/dfa.c +++ b/libavcodec/dfa.c @@ -186,7 +186,6 @@ static int decode_dds1(uint8_t *frame, int width, int height, static int decode_bdlt(uint8_t *frame, int width, int height, const uint8_t *src, const uint8_t *src_end) { - const uint8_t *frame_end = frame + width * height; uint8_t *line_ptr; int count, lines, segments; From 7f995abed362be3ae54c6f0464cf00b2c89b7678 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Fri, 29 Apr 2011 19:42:00 +0200 Subject: [PATCH 4/5] acelp: Remove unused gray_decode table. --- libavcodec/acelp_vectors.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/libavcodec/acelp_vectors.c b/libavcodec/acelp_vectors.c index 8e59e4beab..25a6ff27df 100644 --- a/libavcodec/acelp_vectors.c +++ b/libavcodec/acelp_vectors.c @@ -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 From 033a4a942a81a1880ca5a89e7eb3a2b5f529a7fb Mon Sep 17 00:00:00 2001 From: Justin Ruggles Date: Sun, 15 May 2011 11:07:29 -0400 Subject: [PATCH 5/5] aacdec: Use float instead of int16_t for ltp_state to avoid needless rounding. --- libavcodec/aac.h | 2 +- libavcodec/aacdec.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/aac.h b/libavcodec/aac.h index ecb8191566..76b6a7821b 100644 --- a/libavcodec/aac.h +++ b/libavcodec/aac.h @@ -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; diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index d26cce994c..5f9dd834a0 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -1820,9 +1820,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)); } /**