[MPlayer-cvslog] CVS: main/libfaad2 local_changes.diff,1.2,1.3

Diego Biurrun CVS syncmail at mplayerhq.hu
Thu Aug 18 00:50:31 CEST 2005


CVS change done by Diego Biurrun CVS

Update of /cvsroot/mplayer/main/libfaad2
In directory mail:/var2/tmp/cvs-serv236

Modified Files:
	local_changes.diff 
Log Message:
Update for latest changes.


Index: local_changes.diff
===================================================================
RCS file: /cvsroot/mplayer/main/libfaad2/local_changes.diff,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- local_changes.diff	1 Mar 2005 05:49:56 -0000	1.2
+++ local_changes.diff	17 Aug 2005 22:50:29 -0000	1.3
@@ -27,6 +27,14 @@
  #define INLINE __inline
  #if 0 //defined(_WIN32) && !defined(_WIN32_WCE)
  #define ALIGN __declspec(align(16))
+@@ -67,6 +67,6 @@
+ /* Use if target platform has address generators with autoincrement */
+ //#define PREFER_POINTERS
+ 
+-#ifdef _WIN32_WCE
++#if defined(_WIN32_WCE) || defined(__arm__)
+ #define FIXED_POINT
+ #endif
 @@ -117,6 +123,9 @@
  # ifdef MAIN_DEC
  #  undef MAIN_DEC
@@ -77,12 +85,21 @@
  #include <stdio.h>
  #if HAVE_SYS_TYPES_H
  # include <sys/types.h>
-@@ -311,7 +341,7 @@
+@@ -329,7 +329,7 @@
+   }
+ 
+ 
+-  #if defined(_WIN32) && !defined(__MINGW32__)
++  #if defined(_WIN32) && !defined(__MINGW32__) && !defined(HAVE_LRINTF)
+     #define HAS_LRINTF
+     static INLINE int lrintf(float f)
+     {
+@@ -341,7 +341,7 @@
          }
          return i;
      }
--  #elif (defined(__i386__) && defined(__GNUC__))
-+  #elif (defined(__i386__) && defined(__GNUC__)) && !defined(__MINGW32__)
+-  #elif (defined(__i386__) && defined(__GNUC__)) && !defined(__MINGW32__)
++  #elif (defined(__i386__) && defined(__GNUC__)) && !defined(__MINGW32__) && !defined(HAVE_LRINTF)
      #define HAS_LRINTF
      // from http://www.stereopsis.com/FPU.html
      static INLINE int lrintf(float f)
@@ -104,3 +121,80 @@
  #ifdef HAVE_SINF
  #  define sin sinf
  #error
+--- main/libfaad2/output.c	2005/02/19 01:21:19	1.7
++++ main/libfaad2/output.c	2005/03/29 18:14:24	1.8
+@@ -19,10 +19,9 @@
+ ** Any non-GPL usage of this software or parts of this software is strictly
+ ** forbidden.
+ **
+-** Commercial non-GPL licensing of this software is possible.
+-** For more info contact Ahead Software through Mpeg4AAClicense at nero.com.
+-**
+-** $Id$
++** Initially modified for use with MPlayer by Rich Felker on 2005/03/29
++** $Id$
++** detailed CVS changelog at http://www.mplayerhq.hu/cgi-bin/cvsweb.cgi/main/
+ **/
+ 
+ #include "common.h"
+@@ -462,7 +462,7 @@
+     }
+ }
+ 
+-void* output_to_PCM(NeAACDecHandle hDecoder,
++void* output_to_PCM_sux(NeAACDecHandle hDecoder,
+                     real_t **input, void *sample_buffer, uint8_t channels,
+                     uint16_t frame_len, uint8_t format)
+ {
+@@ -553,4 +553,51 @@
+     return sample_buffer;
+ }
+ 
++void* output_to_PCM(NeAACDecHandle hDecoder,
++                    real_t **input, void *sample_buffer, uint8_t channels,
++                    uint16_t frame_len, uint8_t format)
++{
++    int ch;
++    int i;
++    int16_t *short_sample_buffer = (int16_t*)sample_buffer;
++    real_t *ch0 = input[hDecoder->internal_channel[0]];
++    real_t *ch1 = input[hDecoder->internal_channel[1]];
++    real_t *ch2 = input[hDecoder->internal_channel[2]];
++    real_t *ch3 = input[hDecoder->internal_channel[3]];
++    real_t *ch4 = input[hDecoder->internal_channel[4]];
++
++    if (format != FAAD_FMT_16BIT)
++        return output_to_PCM_sux(hDecoder, input, sample_buffer, channels, frame_len, format);
++
++    if (hDecoder->downMatrix) {
++        for(i = 0; i < frame_len; i++)
++        {
++	    int32_t tmp;
++	    tmp = (ch1[i] + ((ch0[i]+ch3[i])>>1) + ((ch0[i]+ch3[i])>>2) + (1<<(REAL_BITS))) >> (REAL_BITS+1);
++	    if ((tmp+0x8000) & ~0xffff) tmp = ~(tmp>>31)-0x8000;
++            short_sample_buffer[0] = tmp;
++	    tmp = (ch2[i] + ((ch0[i]+ch4[i])>>1) + ((ch0[i]+ch4[i])>>2) + (1<<(REAL_BITS))) >> (REAL_BITS+1);
++	    if ((tmp+0x8000) & ~0xffff) tmp = ~(tmp>>31)-0x8000;
++            short_sample_buffer[1] = tmp;
++	    short_sample_buffer += channels;
++        }
++        return sample_buffer;
++    }
++
++    /* Copy output to a standard PCM buffer */
++    for(i = 0; i < frame_len; i++)
++    {
++        for (ch = 0; ch < channels; ch++)
++        {
++            int32_t tmp = input[ch][i];
++            tmp += (1 << (REAL_BITS-1));
++            tmp >>= REAL_BITS;
++	    if ((tmp+0x8000) & ~0xffff) tmp = ~(tmp>>31)-0x8000;
++            *(short_sample_buffer++) = tmp;
++        }
++    }
++
++    return sample_buffer;
++}
++
+ #endif




More information about the MPlayer-cvslog mailing list