Author: firewing
Update of /cvs/free/rpms/avidemux/F-14
In directory se02.es.rpmfusion.net:/tmp/cvs-serv19987
Modified Files:
avidemux.spec
Added Files:
avidemux-2.5.3-field-asm-fix.diff
avidemux_2.5.3-ffmpeg-aac.patch
Log Message:
* Tue Oct 26 2010 Stewart Adam <s.adam at diffingo.com> - 2.5.3-5
- Add x264 field asm patch to fix F-14 build (#1447)
- Fix main package's dependency on the GUI subpackage (Bernie Innocentie)
- Enable ffmpeg's AAC encoder (Kevin Kofler)
avidemux-2.5.3-field-asm-fix.diff:
ADM_interlaceUtil.cpp | 13 -----------
ADM_vidFieldASM.cpp | 55 +++++++++++++++++++++++++-------------------------
2 files changed, 29 insertions(+), 39 deletions(-)
--- NEW FILE avidemux-2.5.3-field-asm-fix.diff ---
diff --git a/avidemux/ADM_coreImage/src/ADM_interlaceUtil.cpp
b/avidemux/ADM_coreImage/src/ADM_interlaceUtil.cpp
index 33b2a7f..99f0664 100644
--- a/avidemux/ADM_coreImage/src/ADM_interlaceUtil.cpp
+++ b/avidemux/ADM_coreImage/src/ADM_interlaceUtil.cpp
@@ -30,19 +30,8 @@ Skip factor=2
***************************************************************************/
#include "ADM_default.h"
-
-//#include "ADM_editor/ADM_edit.hxx"
#include "ADM_videoFilter.h"
-//#define MMX_TRACE
-#warning remove mmxmacro and debug asm
-//#define ASM_ILACING
-
-
-#include "ADM_mmxMacros.h"
-
-
-
#define SKIP_FACTOR 2 // 2^SKIPFACTOR=SKIP_LINEAR+1
#define SKIP_LINEAR 3
@@ -62,7 +51,7 @@ Skip factor=2
*/
#if defined(ADM_CPU_X86) && defined(ASM_ILACING)
-
+#warning REWRITE IN PLAIN ASM
static uint32_t ADMVideo_interlaceCount_MMX( uint8_t *src ,uint32_t w, uint32_t h);
static uint8_t * FUNNY_MANGLE(_l_p) =NULL;
static uint8_t * FUNNY_MANGLE(_l_c) =NULL;
diff --git a/avidemux/ADM_coreImage/src/ADM_vidFieldASM.cpp
b/avidemux/ADM_coreImage/src/ADM_vidFieldASM.cpp
index 61d11d4..479731c 100644
--- a/avidemux/ADM_coreImage/src/ADM_vidFieldASM.cpp
+++ b/avidemux/ADM_coreImage/src/ADM_vidFieldASM.cpp
@@ -20,15 +20,13 @@
***************************************************************************/
#include "ADM_default.h"
-
#include "ADM_videoFilter.h"
-
#include"ADM_vidField.h"
#ifdef ADM_CPU_X86
// #define DEBUG_DEINT 1
// #define MMX_TRACE 1
- #include "ADM_mmxMacros.h"
+// #include "ADM_mmxMacros.h"
void myDeintASM(void);
@@ -36,25 +34,27 @@
static uint8_t * FUNNY_MANGLE(_l_p) , * FUNNY_MANGLE(_l_c) ,* FUNNY_MANGLE(_l_n);
static uint8_t * FUNNY_MANGLE(_l_e) , * FUNNY_MANGLE(_l_e2);
#define EXPAND(x) (x)+((x)<<16)+((x)<<32) +((x)<<48)
-static mmx_t _mmTHRESH1;
-static mmx_t _mmTHRESH2;
+static uint64_t __attribute__((used)) __attribute__ ((__aligned__ (8)))
FUNNY_MANGLE(_mmTHRESH1) ;
+static uint64_t __attribute__((used)) __attribute__ ((__aligned__ (8)))
FUNNY_MANGLE(_mmTHRESH2) ;
-#define COMPUTE_MMX \
-punpcklbw_r2r(mm5,mm0); /*c expand 4 bytes -> 4 word */ \
-punpcklbw_r2r(mm5,mm1); /*p*/ \
-punpcklbw_r2r(mm5,mm2); /* n*/ \
-movq_r2r(mm0,mm3); /* mm3 also c*/ \
-psubw_r2r(mm1,mm0) ; /* mm0=mm0-mm1 = c-p*/ \
-psubw_r2r(mm2,mm3) ; /* mm3=mm3-mm2 = c-n*/ \
-psraw_i2r(1,mm0); /* to protect from overflow*/ \
-psraw_i2r(1,mm3);\
-pmullw_r2r(mm0,mm3); /* mm3=(c-p)*(c-n) / 4;*/ \
-movq_r2r(mm3,mm0) ; /* mm0 also c-p*c-n */ \
-pcmpgtw_r2r(mm4,mm3); /* keep only > size*/ \
-pcmpgtw_r2r(mm6,mm0); /* keep only > size*/ \
-packsswb_r2r(mm5,mm0); \
-packsswb_r2r(mm5,mm3);
+#define COMPUTE_MMX \
+__asm__ __volatile__(\
+"punpcklbw %%mm5,%%mm0\n\t" \
+"punpcklbw %%mm5,%%mm1\n\t" \
+"punpcklbw %%mm5,%%mm2\n\t" \
+"movq %%mm0,%%mm3\n\t" \
+"psubw %%mm1,%%mm0\n\t" \
+"psubw %%mm2,%%mm3\n\t" \
+"psraw $1,%%mm0\n\t" \
+"psraw $1,%%mm3\n\t" \
+"pmullw %%mm0,%%mm3\n\t" \
+"movq %%mm3,%%mm0\n\t" \
+"pcmpgtw %%mm4,%%mm3\n\t" \
+"pcmpgtw %%mm6,%%mm0\n\t" \
+"packsswb %%mm5,%%mm0\n\t" \
+"packsswb %%mm5,%%mm3\n\t" \
+::)
#endif
void ADMVideoFields::hasMotion_C(uint8_t *p,uint8_t *c,
@@ -90,8 +90,8 @@ void ADMVideoFields::hasMotion_MMX(uint8_t *p,uint8_t *c,
{
- _mmTHRESH1.uq=EXPAND((uint64_t )
((_param->motion_trigger*_param->motion_trigger)>>2) );
- _mmTHRESH2.uq=EXPAND((uint64_t )
((_param->blend_trigger*_param->blend_trigger)>>2) );
+ _mmTHRESH1=EXPAND((uint64_t )
((_param->motion_trigger*_param->motion_trigger)>>2) );
+ _mmTHRESH2=EXPAND((uint64_t )
((_param->blend_trigger*_param->blend_trigger)>>2) );
_l_h=_info.height-2;
_l_w=_info.width>>2;
@@ -102,10 +102,11 @@ void ADMVideoFields::hasMotion_MMX(uint8_t *p,uint8_t *c,
_l_e=e;
_l_e2=e2;
// printf("\n MMX \n");
-
- pxor_r2r(mm5,mm5);
- movq_m2r(_mmTHRESH1,mm4);
- movq_m2r(_mmTHRESH2,mm6);
+ __asm__ __volatile__ (
+ "pxor %%mm5,%%mm5\n\t"
+ "movq "Mangle(_mmTHRESH1)",%%mm4\n\t"
+ "movq "Mangle(_mmTHRESH2)",%%mm6\n\t"
+ ::);
myDeintASM();
}
#if !defined(DEBUG_DEINT)
@@ -149,7 +150,7 @@ void myDeintASM(void)
:
: "eax",
"ecx","edx","esi"
);
- emms();
+ __asm__ __volatile__ ("emms");
}
#else
avidemux_2.5.3-ffmpeg-aac.patch:
CMakeLists.txt | 9 +++++++++
audioencoder_lavcodec.cpp | 21 ++++++++++++++++-----
2 files changed, 25 insertions(+), 5 deletions(-)
--- NEW FILE avidemux_2.5.3-ffmpeg-aac.patch ---
diff -ur avidemux_2.5.3/plugins/ADM_audioEncoders/lavcodec/audioencoder_lavcodec.cpp
avidemux_2.5.3-ffmpeg-aac/plugins/ADM_audioEncoders/lavcodec/audioencoder_lavcodec.cpp
--- avidemux_2.5.3/plugins/ADM_audioEncoders/lavcodec/audioencoder_lavcodec.cpp 2010-02-23
19:21:06.000000000 +0100
+++
avidemux_2.5.3-ffmpeg-aac/plugins/ADM_audioEncoders/lavcodec/audioencoder_lavcodec.cpp 2010-10-02
03:34:42.000000000 +0200
@@ -29,13 +29,16 @@
#define Join(x,y) x##_##y
-#if defined(ADM_LAV_MP2) && !defined(ADM_LAV_AC3)
+#if defined(ADM_LAV_MP2) && !defined(ADM_LAV_AC3) &&
!defined(ADM_LAV_AAC)
#define makeName(x) Join(x,MP2)
#define AUDMEncoder_Lavcodec AUDMEncoder_Lavcodec_MP2
#else
- #if !defined(ADM_LAV_MP2) && defined(ADM_LAV_AC3)
+ #if !defined(ADM_LAV_MP2) && defined(ADM_LAV_AC3) &&
!defined(ADM_LAV_AAC)
#define makeName(x) Join(x,AC3)
#define AUDMEncoder_Lavcodec AUDMEncoder_Lavcodec_AC3
+ #elif !defined(ADM_LAV_MP2) && !defined(ADM_LAV_AC3) &&
defined(ADM_LAV_AAC)
+ #define makeName(x) Join(x,AAC)
+ #define AUDMEncoder_Lavcodec AUDMEncoder_Lavcodec_AAC
#else
#error
#endif
@@ -64,13 +67,19 @@
2, // Max channels
1,0,0, // Version
#else
-
-
+#ifdef ADM_LAV_AC3
"LavAC3",
"AC3 (lav)",
"AC3 LavEncoder encoder plugin Mean 2008",
6, // Max channels
1,0,0, // Version
+#else
+ "LavAAC",
+ "AAC (lav)",
+ "AAC LavEncoder encoder plugin Mean 2008",
+ 6, // Max channels
+ 1,0,0, // Version
+#endif
#endif
makeName(WAV),
@@ -136,7 +145,9 @@
#endif
_wavheader->byterate=(lavConfig.bitrate*1000)>>3;
-#ifdef ADM_LAV_MP2
+#if defined(ADM_LAV_AAC)
+ _chunk = 1024*_wavheader->channels;
+#elif defined(ADM_LAV_MP2)
_chunk = 1152*_wavheader->channels;
#else
_chunk = 1536*_wavheader->channels; // AC3
diff -ur avidemux_2.5.3/plugins/ADM_audioEncoders/lavcodec/CMakeLists.txt
avidemux_2.5.3-ffmpeg-aac/plugins/ADM_audioEncoders/lavcodec/CMakeLists.txt
--- avidemux_2.5.3/plugins/ADM_audioEncoders/lavcodec/CMakeLists.txt 2010-02-28
21:32:28.000000000 +0100
+++ avidemux_2.5.3-ffmpeg-aac/plugins/ADM_audioEncoders/lavcodec/CMakeLists.txt 2010-10-02
03:30:48.000000000 +0200
@@ -27,3 +27,12 @@
INIT_AUDIO_ENCODER(ADM_ae_lav_ac3)
INSTALL_AUDIOENCODER(ADM_ae_lav_ac3)
+
+ SET(ADM_ae_lav_aac_SRCS audioencoder_lavcodec.cpp)
+
+ ADD_LIBRARY(ADM_ae_lav_aac SHARED ${ADM_ae_lav_aac_SRCS})
+ ADD_TARGET_CFLAGS(ADM_ae_lav_aac "-DADM_LAV_AAC")
+ TARGET_LINK_LIBRARIES(ADM_ae_lav_aac ADM_core ADM_coreAudio ADM_coreUI ADM_libavcodec
ADM_libavutil)
+
+ INIT_AUDIO_ENCODER(ADM_ae_lav_aac)
+ INSTALL_AUDIOENCODER(ADM_ae_lav_aac)
Index: avidemux.spec
===================================================================
RCS file: /cvs/free/rpms/avidemux/F-14/avidemux.spec,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- avidemux.spec 20 Jul 2010 19:27:17 -0000 1.35
+++ avidemux.spec 26 Oct 2010 19:01:42 -0000 1.36
@@ -2,7 +2,7 @@
Name: avidemux
Version: 2.5.3
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Graphical video editing and transcoding tool
Group: Applications/Multimedia
@@ -40,13 +40,17 @@
# build statically according to upstream... Let's get them installed instead
Patch5: avidemux-2.5.3-mpeg2enc.patch
Patch6: avidemux-2.5.3-pluginlibs.patch
+# Patch7 obtained from
http://fixounet.free.fr/2.6/2.5.3_field_asm_fix.diff
+Patch7: avidemux-2.5.3-field-asm-fix.diff
+# Patch8 obtained from
http://lists.rpmfusion.org/pipermail/rpmfusion-developers/2010-October/00...
+Patch8: avidemux_2.5.3-ffmpeg-aac.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# Upstream has been informed
http://avidemux.org/admForum/viewtopic.php?id=6447
ExcludeArch: ppc ppc64
Requires: %{name}-cli = %{version}-%{release}
-Requires: %{name}-gui = %{version}-%{release}
+Requires: %{name}-gui = %{version}
Requires: %{name}-plugins = %{version}
# Compiling
@@ -174,7 +178,8 @@
%patch4 -p1 -b .mjpeg_log
%patch5 -p1 -b .mpeg2enc
%patch6 -p1 -b .pluginlibs
-
+%patch7 -p1 -b .x264asm
+%patch8 -p1 -b .ffmpegaac
%build
# Out of source build
@@ -263,6 +268,11 @@
%{_includedir}/ADM_coreConfig.h
%changelog
+* Tue Oct 26 2010 Stewart Adam <s.adam at diffingo.com> - 2.5.3-5
+- Add x264 field asm patch to fix F-14 build (#1447)
+- Fix main package's dependency on the GUI subpackage (Bernie Innocentie)
+- Enable ffmpeg's AAC encoder (Kevin Kofler)
+
* Tue Jul 20 2010 Stewart Adam <s.adam at diffingo.com> - 2.5.3-4
- Rebuild for new x264