[haiku-commits] r39537 - in haiku/trunk/src/add-ons/media/plugins/ffmpeg: . libavcodec libavformat libavutil libavutil/arm

  • From: korli@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 20 Nov 2010 16:59:06 +0100 (CET)

Author: korli
Date: 2010-11-20 16:59:05 +0100 (Sat, 20 Nov 2010)
New Revision: 39537
Changeset: http://dev.haiku-os.org/changeset/39537

Added:
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/arm/bswap.h
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/arm/intmath.h
Removed:
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/aiff.c
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/rtp_aac.c
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/rtp_amr.c
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/rtp_asf.c
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/rtp_asf.h
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/rtp_h263.c
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/rtp_h264.c
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/rtp_h264.h
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/rtp_mpv.c
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/rtp_vorbis.c
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/rtp_vorbis.h
Modified:
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/Jamfile
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/Jamfile
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/Jamfile
   haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/common.h
Log:
* added some missing bits and removed obsolete files in ffmpeg-0.6
* replaced .. with $(DOTDOT) in Jamfiles
* added __STDC_CONSTANT_MACROS define for C++ files (required for UINT64_C)


Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/Jamfile
===================================================================
--- haiku/trunk/src/add-ons/media/plugins/ffmpeg/Jamfile        2010-11-20 
12:40:59 UTC (rev 39536)
+++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/Jamfile        2010-11-20 
15:59:05 UTC (rev 39537)
@@ -9,6 +9,8 @@
 SubDirHdrs [ FDirName $(SUBDIR) libavutil ] ;
 SubDirHdrs [ FDirName $(SUBDIR) libswscale ] ;
 
+SubDirC++Flags -D__STDC_CONSTANT_MACROS ;
+
 Addon ffmpeg :
        AVCodecDecoder.cpp
        AVCodecEncoder.cpp

Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/Jamfile
===================================================================
--- haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/Jamfile     
2010-11-20 12:40:59 UTC (rev 39536)
+++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavcodec/Jamfile     
2010-11-20 15:59:05 UTC (rev 39537)
@@ -1,13 +1,13 @@
 SubDir HAIKU_TOP src add-ons media plugins ffmpeg libavcodec ;
 
-SubDirHdrs [ FDirName $(SUBDIR) .. ] ;
+SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;
 SubDirHdrs [ FDirName $(SUBDIR) $(TARGET_ARCH) ] ;
-SubDirHdrs [ FDirName $(SUBDIR) .. libavutil ] ;
-SubDirHdrs [ FDirName $(SUBDIR) .. libswscale ] ;
-SubDirSysHdrs [ FDirName $(SUBDIR) .. libogg include ] ;
-SubDirSysHdrs [ FDirName $(SUBDIR) .. libtheora include ] ;
-SubDirSysHdrs [ FDirName $(SUBDIR) .. libvorbis include ] ;
-SubDirSysHdrs [ FDirName $(SUBDIR) .. libspeex include ] ;
+SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) libavutil ] ;
+SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) libswscale ] ;
+SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) libogg include ] ;
+SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) libtheora include ] ;
+SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) libvorbis include ] ;
+SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) libspeex include ] ;
 
 
 UseLibraryHeaders zlib ;

Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile
===================================================================
--- haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile    
2010-11-20 12:40:59 UTC (rev 39536)
+++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavformat/Jamfile    
2010-11-20 15:59:05 UTC (rev 39537)
@@ -19,7 +19,6 @@
        4xm.c
        adtsenc.c
        aea.c
-       aiff.c
        aiffdec.c
        aiffenc.c
        allformats.c
@@ -148,9 +147,6 @@
        rmenc.c
        rpl.c
        rtp.c
-       rtp_aac.c
-       rtp_h264.c
-       rtp_mpv.c
        rtpdec.c
        rtpdec_amr.c
        rtpdec_asf.c

Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/Jamfile
===================================================================
--- haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/Jamfile      
2010-11-20 12:40:59 UTC (rev 39536)
+++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/Jamfile      
2010-11-20 15:59:05 UTC (rev 39537)
@@ -4,8 +4,8 @@
 TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)
        : -Wall -Wmissing-prototypes -Wsign-compare -Wpointer-arith ] ;
 
-SubDirHdrs [ FDirName $(SUBDIR) .. ] ;
-SubDirHdrs [ FDirName $(SUBDIR) ../libavcodec ] ;
+SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;
+SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) libavcodec ] ;
 
 # filter warnings we don't want here
 TARGET_WARNING_CCFLAGS = [ FFilter $(TARGET_WARNING_CCFLAGS)

Added: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/arm/bswap.h
===================================================================
--- haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/arm/bswap.h          
                (rev 0)
+++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/arm/bswap.h  
2010-11-20 15:59:05 UTC (rev 39537)
@@ -0,0 +1,72 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_ARM_BSWAP_H
+#define AVUTIL_ARM_BSWAP_H
+
+#include <stdint.h>
+#include "config.h"
+#include "libavutil/attributes.h"
+
+#ifdef __ARMCC_VERSION
+
+#if HAVE_ARMV6
+#define bswap_16 bswap_16
+static av_always_inline av_const unsigned bswap_16(unsigned x)
+{
+    __asm { rev16 x, x }
+    return x;
+}
+
+#define bswap_32 bswap_32
+static av_always_inline av_const uint32_t bswap_32(uint32_t x)
+{
+    return __rev(x);
+}
+#endif /* HAVE_ARMV6 */
+
+#elif HAVE_INLINE_ASM
+
+#if HAVE_ARMV6
+#define bswap_16 bswap_16
+static av_always_inline av_const unsigned bswap_16(unsigned x)
+{
+    __asm__("rev16 %0, %0" : "+r"(x));
+    return x;
+}
+#endif
+
+#define bswap_32 bswap_32
+static av_always_inline av_const uint32_t bswap_32(uint32_t x)
+{
+#if HAVE_ARMV6
+    __asm__("rev %0, %0" : "+r"(x));
+#else
+    uint32_t t;
+    __asm__ ("eor %1, %0, %0, ror #16 \n\t"
+             "bic %1, %1, #0xFF0000   \n\t"
+             "mov %0, %0, ror #8      \n\t"
+             "eor %0, %0, %1, lsr #8  \n\t"
+             : "+r"(x), "=&r"(t));
+#endif /* HAVE_ARMV6 */
+    return x;
+}
+
+#endif /* __ARMCC_VERSION */
+
+#endif /* AVUTIL_ARM_BSWAP_H */

Added: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/arm/intmath.h
===================================================================
--- haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/arm/intmath.h        
                        (rev 0)
+++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/arm/intmath.h        
2010-11-20 15:59:05 UTC (rev 39537)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2010 Mans Rullgard <mans@xxxxxxxxx>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVUTIL_ARM_INTMATH_H
+#define AVUTIL_ARM_INTMATH_H
+
+#include "config.h"
+#include "libavutil/attributes.h"
+
+#if HAVE_INLINE_ASM
+
+#if HAVE_ARMV6
+static inline av_const int FASTDIV(int a, int b)
+{
+    int r, t;
+    __asm__ volatile("cmp     %3, #2               \n\t"
+                     "ldr     %1, [%4, %3, lsl #2] \n\t"
+                     "lsrle   %0, %2, #1           \n\t"
+                     "smmulgt %0, %1, %2           \n\t"
+                     : "=&r"(r), "=&r"(t) : "r"(a), "r"(b), "r"(ff_inverse));
+    return r;
+}
+#else
+static inline av_const int FASTDIV(int a, int b)
+{
+    int r, t;
+    __asm__ volatile("umull %1, %0, %2, %3"
+                     : "=&r"(r), "=&r"(t) : "r"(a), "r"(ff_inverse[b]));
+    return r;
+}
+#endif
+
+#define FASTDIV FASTDIV
+
+#endif /* HAVE_INLINE_ASM */
+
+#endif /* AVUTIL_ARM_INTMATH_H */

Modified: haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/common.h
===================================================================
--- haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/common.h     
2010-11-20 12:40:59 UTC (rev 39536)
+++ haiku/trunk/src/add-ons/media/plugins/ffmpeg/libavutil/common.h     
2010-11-20 15:59:05 UTC (rev 39537)
@@ -151,7 +151,7 @@
  */
 static inline av_const int32_t av_clipl_int32(int64_t a)
 {
-    if ((a+0x80000000u) & ~(0xFFFFFFFFULL)) return (a>>63) ^ 0x7FFFFFFF;
+    if ((a+0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (a>>63) ^ 0x7FFFFFFF;
     else                                         return a;
 }
 


Other related posts:

  • » [haiku-commits] r39537 - in haiku/trunk/src/add-ons/media/plugins/ffmpeg: . libavcodec libavformat libavutil libavutil/arm - korli