x264 and ffmpeg updates coming to rawhide
Stewart Adam
maillist at diffingo.com
Mon Dec 15 04:23:12 CET 2008
On 12/14/08 5:13 PM, Dominik 'Rathann' Mierzejewski wrote:
> On Thursday, 04 December 2008 at 21:31, Dominik 'Rathann' Mierzejewski wrote:
>
> This needs a proper fix, but for now the attached patch makes it build.
>
> Also, it seems to me that avidemux contains local copies of several ffmpeg
> libraries: libavcodec, libavformat, libavutil, libpostproc and libswscale.
> Could it be patched to use our externally packaged ones?
>
> Regards,
> R.
Thanks for the patch - it worked perfectly.
I've started making changes regarding the internal ffmpeg libraries, but it
looks like avidemux uses a bunch of the internal headers that aren't
included in ffmpeg-devel. I've attached the changes I made up until the
point where bitstream.h is required so it bails out. (it also required
bswap.h, the macros it required appeared to do nothing - be2me_*(x) was (x)
- so I just removed the be2me_* calls). Where do we go from here?
Stewart
-------------- next part --------------
--- CMakeLists.txt 2008-07-21 11:58:49.000000000 -0400
+++ CMakeLists.txt 2008-12-14 20:48:42.000000000 -0500
@@ -97,6 +97,111 @@
ENDIF(NOT FT_INCLUDE)
endif(NO_FREETYPE)
#**************************************************
+# Search for LIBAVCODEC
+#**************************************************
+MESSAGE(STATUS "<Checking for libavcodec through PKG-CONFIG>")
+MESSAGE(STATUS "<****************************************>")
+if(NO_AVCODEC)
+message(status "<disabled per request>")
+else(NO_AVCODEC)
+PKGCONFIG(libavcodec AVC_INCLUDE AVC_LIB AVC_LDFLAGS AVC_CFLAGS)
+
+IF(NOT AVC_INCLUDE)
+ MESSAGE(STATUS "Could not find libavcodec ")
+ELSE(NOT AVC_INCLUDE)
+ SET(AVC_FOUND TRUE)
+ MESSAGE(STATUS "LDFLAGS <${AVC_LDFLAGS}>")
+ MESSAGE(STATUS "LIBS <${AVC_LIB}>")
+ MESSAGE(STATUS OK)
+ MESSAGE(STATUS "libavcodec Found ("${AVC_CFLAGS} ${AVC_INCLUDE}")")
+
+ENDIF(NOT AVC_INCLUDE)
+endif(NO_AVCODEC)
+#**************************************************
+# Search for LIBAVFORMAT
+#**************************************************
+MESSAGE(STATUS "<Checking for libavformat through PKG-CONFIG>")
+MESSAGE(STATUS "<****************************************>")
+if(NO_AVFORMAT)
+message(status "<disabled per request>")
+else(NO_AVFORMAT)
+PKGCONFIG(libavformat AVF_INCLUDE AVF_LIB AVF_LDFLAGS AVF_CFLAGS)
+
+IF(NOT AVC_INCLUDE)
+ MESSAGE(STATUS "Could not find libavformat ")
+ELSE(NOT AVC_INCLUDE)
+ SET(AVC_FOUND TRUE)
+ MESSAGE(STATUS "LDFLAGS <${AVF_LDFLAGS}>")
+ MESSAGE(STATUS "LIBS <${AVF_LIB}>")
+ MESSAGE(STATUS OK)
+ MESSAGE(STATUS "libavformat Found ("${AVF_CFLAGS} ${AVF_INCLUDE}")")
+
+ENDIF(NOT AVF_INCLUDE)
+endif(NO_AVFORMAT)
+#**************************************************
+# Search for LIBAVUTIL
+#**************************************************
+MESSAGE(STATUS "<Checking for libavutil through PKG-CONFIG>")
+MESSAGE(STATUS "<****************************************>")
+if(NO_AVUTIL)
+message(status "<disabled per request>")
+else(NO_AVUTIL)
+PKGCONFIG(libavutil AVU_INCLUDE AVU_LIB AVU_LDFLAGS AVU_CFLAGS)
+
+IF(NOT AVU_INCLUDE)
+ MESSAGE(STATUS "Could not find libavutil ")
+ELSE(NOT AVU_INCLUDE)
+ SET(AVU_FOUND TRUE)
+ MESSAGE(STATUS "LDFLAGS <${AVU_LDFLAGS}>")
+ MESSAGE(STATUS "LIBS <${AVU_LIB}>")
+ MESSAGE(STATUS OK)
+ MESSAGE(STATUS "libavutil Found ("${AVU_CFLAGS} ${AVU_INCLUDE}")")
+
+ENDIF(NOT AVU_INCLUDE)
+endif(NO_AVUTIL)
+#**************************************************
+# Search for LIBSWSCALE
+#**************************************************
+MESSAGE(STATUS "<Checking for libswscale through PKG-CONFIG>")
+MESSAGE(STATUS "<****************************************>")
+if(NO_SWSCALE)
+message(status "<disabled per request>")
+else(NO_SWSCALE)
+PKGCONFIG(libswscale SWS_INCLUDE SWS_LIB SWS_LDFLAGS SWS_CFLAGS)
+
+IF(NOT SWS_INCLUDE)
+ MESSAGE(STATUS "Could not find libswscale ")
+ELSE(NOT SWS_INCLUDE)
+ SET(SWS_FOUND TRUE)
+ MESSAGE(STATUS "LDFLAGS <${SWS_LDFLAGS}>")
+ MESSAGE(STATUS "LIBS <${SWS_LIB}>")
+ MESSAGE(STATUS OK)
+ MESSAGE(STATUS "libswscale Found ("${SWS_CFLAGS} ${SWS_INCLUDE}")")
+
+ENDIF(NOT SWS_INCLUDE)
+endif(NO_SWSCALE)
+#**************************************************
+# Search for LIBPOSTPROC
+#**************************************************
+MESSAGE(STATUS "<Checking for libpostproc through PKG-CONFIG>")
+MESSAGE(STATUS "<****************************************>")
+if(NO_POSTPROC)
+message(status "<disabled per request>")
+else(NO_POSTPROC)
+PKGCONFIG(libpostproc PPRC_INCLUDE PPRC_LIB PPRC_LDFLAGS PPRC_CFLAGS)
+
+IF(NOT PPRC_INCLUDE)
+ MESSAGE(STATUS "Could not find libpostproc ")
+ELSE(NOT PPRC_INCLUDE)
+ SET(PPRC_FOUND TRUE)
+ MESSAGE(STATUS "LDFLAGS <${PPRC_LDFLAGS}>")
+ MESSAGE(STATUS "LIBS <${PPRC_LIB}>")
+ MESSAGE(STATUS OK)
+ MESSAGE(STATUS "libpostproc Found ("${PPRC_CFLAGS} ${PPRC_INCLUDE}")")
+
+ENDIF(NOT PPRC_INCLUDE)
+endif(NO_POSTPROC)
+#**************************************************
# Search for X11 (not on windows)
#**************************************************
if(NOT WIN32)
@@ -195,8 +300,7 @@
CONFIGURE_FILE(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
include_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/avidemux ${CMAKE_SOURCE_DIR}/avidemux/ADM_libraries)
-include_directories(${CMAKE_SOURCE_DIR}/avidemux/ADM_libraries/ADM_utilities/ ${CMAKE_SOURCE_DIR}/avidemux/ADM_libraries/ADM_lavutil)
-include_directories(${CMAKE_SOURCE_DIR}/avidemux/ADM_libraries/ADM_lavcodec )
+include_directories(${CMAKE_SOURCE_DIR}/avidemux/ADM_libraries/ADM_utilities/)
#**********************************************
# Some CFLAGS
diff -u avidemux/ADM_audiocodec/ADM_codecimaadpcm.cpp avidemux/ADM_audiocodec/ADM_codecimaadpcm.cpp
--- avidemux/ADM_audiocodec/ADM_codecimaadpcm.cpp 2007-01-21 13:19:12.000000000 -0500
+++ avidemux/ADM_audiocodec/ADM_codecimaadpcm.cpp 2008-12-14 21:28:48.000000000 -0500
@@ -22,8 +22,7 @@
#include "config.h"
#include "default.h"
-#include "common.h"
-#include "bswap.h"
+#include "libavutil/common.h"
#include "ADM_assert.h"
#include "ADM_audio/aviaudio.hxx"
#include "ADM_audiocodec.h"
@@ -35,10 +34,10 @@
#define QT_IMA_ADPCM_BLOCK_SIZE 0x22
#define QT_IMA_ADPCM_SAMPLES_PER_BLOCK 64
-#define BE_16(x) (be2me_16(*(unsigned short *)(x)))
-#define BE_32(x) (be2me_32(*(unsigned int *)(x)))
-#define LE_16(x) (le2me_16(*(unsigned short *)(x)))
-#define LE_32(x) (le2me_32(*(unsigned int *)(x)))
+#define BE_16(x) (*(unsigned short *)(x))
+#define BE_32(x) (*(unsigned int *)(x))
+#define LE_16(x) (*(unsigned short *)(x))
+#define LE_32(x) (*(unsigned int *)(x))
int ms_ima_adpcm_decode_block(unsigned short *output,
unsigned char *input, int channels, int block_size);
--- avidemux/ADM_audiocodec/ADM_codecmsadpcm.cpp 2008-06-16 07:54:28.000000000 -0400
+++ avidemux/ADM_audiocodec/ADM_codecmsadpcm.cpp 2008-12-14 21:28:57.000000000 -0500
@@ -18,8 +18,7 @@
#include "config.h"
#include "default.h"
-#include "common.h"
-#include "bswap.h"
+#include "libavutil/common.h"
#include "ADM_assert.h"
#include "ADM_audio/aviaudio.hxx"
#include "ADM_audiocodec.h"
--- avidemux/ADM_libraries/CMakeLists.txt 2007-11-02 06:58:20.000000000 -0400
+++ avidemux/ADM_libraries/CMakeLists.txt 2008-12-14 20:15:34.000000000 -0500
@@ -1,11 +1,7 @@
-subdirs (PREORDER ADM_lavcodec)
-subdirs (PREORDER ADM_lavformat)
-subdirs (PREORDER ADM_lavutil)
subdirs (PREORDER ADM_liba52)
subdirs (PREORDER ADM_libMad)
subdirs (PREORDER ADM_libMpeg2Dec)
subdirs (PREORDER ADM_libmpeg2enc)
-subdirs (PREORDER ADM_libswscale)
subdirs (PREORDER ADM_libtwolame)
subdirs (PREORDER ADM_libwrapper)
subdirs (PREORDER ADM_lvemux)
@@ -13,7 +9,6 @@
subdirs (PREORDER ADM_smjs)
subdirs (PREORDER ADM_utilities)
subdirs (PREORDER ADM_xvidratectl)
-subdirs (PREORDER ADM_libpostproc)
if(USE_FREETYPE)
subdirs (PREORDER ADM_libass)
@@ -25,4 +20,4 @@
if (ADM_OS_APPLE AND USE_SDL)
subdirs (PREORDER ADM_libsdl)
-endif (ADM_OS_APPLE AND USE_SDL)
\ No newline at end of file
+endif (ADM_OS_APPLE AND USE_SDL)
--- avidemux/ADM_audio/ADM_dcainfo.cpp 2007-07-16 14:00:25.000000000 -0400
+++ avidemux/ADM_audio/ADM_dcainfo.cpp 2008-12-14 21:41:51.000000000 -0500
@@ -16,9 +16,8 @@
#include "ADM_audio/ADM_dcainfo.h"
extern "C"
{
-#include "ADM_lavutil/common.h"
-#include "ADM_lavutil/bswap.h"
-#include "ADM_lavcodec/bitstream.h"
+#include "libavutil/common.h"
+#include "libavcodec/avcodec.h"
}
#include "ADM_assert.h"
--- avidemux/ADM_userInterfaces/ADM_commonUI/DIA_flyDialog.cpp 2008-02-03 07:04:10.000000000 -0500
+++ avidemux/ADM_userInterfaces/ADM_commonUI/DIA_flyDialog.cpp 2008-12-14 20:59:06.000000000 -0500
@@ -21,7 +21,7 @@
#include "ADM_assert.h"
extern "C" {
-#include "ADM_libraries/ADM_lavcodec/avcodec.h"
+#include "libavcodec/avcodec.h"
}
ADM_flyDialog::ADM_flyDialog(uint32_t width,uint32_t height,AVDMGenericVideoStream *in,
--- avidemux/ADM_lavcodec.h 2006-01-04 16:08:22.000000000 -0500
+++ avidemux/ADM_lavcodec.h 2008-12-14 20:58:11.000000000 -0500
@@ -18,6 +18,6 @@
#define __ADM_LAVC
extern "C"
{
- #include "../ADM_lavcodec/avcodec.h"
+ #include "libavcodec/avcodec.h"
};
#endif
--- avidemux/ADM_videoFilter/ADM_vidVobSubRender.cpp 2007-08-19 12:01:39.000000000 -0400
+++ avidemux/ADM_videoFilter/ADM_vidVobSubRender.cpp 2008-12-14 21:21:49.000000000 -0500
@@ -74,11 +74,11 @@
#if (defined( ARCH_X86) || defined(ARCH_X86_64))
extern "C" {
-#include "ADM_lavcodec/avcodec.h"
+#include "libavcodec/avcodec.h"
}
#endif
-#include "../ADM_lavutil/avutil.h"
+#include "libavutil/avutil.h"
#include "ADM_libswscale/swscale.h"
#include "ADM_osSupport/ADM_cpuCap.h"
--- avidemux/ADM_videoFilter/ADM_lavpp_deint.cpp 2008-06-23 13:23:01.000000000 -0400
+++ avidemux/ADM_videoFilter/ADM_lavpp_deint.cpp 2008-12-14 21:17:58.000000000 -0500
@@ -246,7 +246,8 @@
//
- uint8_t *iBuff[3],*oBuff[3];
+ const uint8_t *iBuff[3];
+ uint8_t *oBuff[3];
int strideTab[3],strideTab2[3];
oBuff[0]=YPLANE(data);
--- avidemux/ADM_videoFilter/ADM_vidMosaic.cpp 2008-06-23 13:23:01.000000000 -0400
+++ avidemux/ADM_videoFilter/ADM_vidMosaic.cpp 2008-12-14 21:19:25.000000000 -0500
@@ -36,11 +36,11 @@
#if (defined( ARCH_X86) || defined(ARCH_X86_64))
extern "C" {
-#include "ADM_lavcodec/avcodec.h"
+#include "libavcodec/avcodec.h"
}
#endif
-#include "ADM_lavutil/avutil.h"
+#include "libavutil/avutil.h"
#include "../ADM_libswscale/swscale.h"
#include "ADM_osSupport/ADM_cpuCap.h"
#include "ADM_filter/video_filters.h"
--- avidemux/ADM_videoFilter/ADM_vidForcedPP.cpp 2008-06-23 13:23:01.000000000 -0400
+++ avidemux/ADM_videoFilter/ADM_vidForcedPP.cpp 2008-12-14 21:20:01.000000000 -0500
@@ -179,7 +179,8 @@
}
// we do postproc !
// keep
- uint8_t *iBuff[3],*oBuff[3];
+ const uint8_t *iBuff[3];
+ uint8_t *oBuff[3];
int strideTab[3],strideTab2[3];
--- avidemux/ADM_videoFilter/ADM_vidMPLResize.cpp 2008-06-23 13:23:01.000000000 -0400
+++ avidemux/ADM_videoFilter/ADM_vidMPLResize.cpp 2008-12-14 21:21:00.000000000 -0500
@@ -41,12 +41,12 @@
#if (defined( ARCH_X86) || defined(ARCH_X86_64))
extern "C" {
-#include "ADM_lavcodec/avcodec.h"
+#include "libavcodec/avcodec.h"
}
#endif
-#include "../ADM_lavutil/avutil.h"
-#include "../ADM_libswscale/swscale.h"
+#include "libavutil/avutil.h"
+#include "libswscale/swscale.h"
#include "ADM_osSupport/ADM_cpuCap.h"
#include "ADM_filter/video_filters.h"
--- avidemux/CMakeLists.txt 2008-12-14 22:08:23.000000000 -0500
+++ avidemux/CMakeLists.txt 2008-12-14 22:03:50.000000000 -0500
@@ -6,7 +6,12 @@
##########################################################
SET(adm_EXE_SRCS ADM_preview.cpp gtk_gui.cpp gui_autodrive.cpp GUI_jobs.cpp gui_navigate.cpp guiplay.cpp gui_savenew.cpp main.cpp gui_action.cpp)
-include_directories(ADM_userInterfaces/ADM_commonUI ADM_outputs)
+include_directories(ADM_userInterfaces/ADM_commonUI ADM_outputs)
+include_directories(${AVC_INCLUDE})
+include_directories(${AVF_INCLUDE})
+include_directories(${AVU_INCLUDE})
+include_directories(${SWS_INCLUDE})
+include_directories(${PPRC_INCLUDE})
add_definitions(${GLIB_CFLAGS})
########################################################
@@ -165,22 +170,17 @@
ADD_SUBDIRECTORY(ADM_libraries)
SET(ADM_LIBRARIES
-ADM_lavformat
-ADM_lavcodec
-ADM_lavutil
ADM_liba52
ADM_libMad
ADM_mplex
ADM_libMpeg2Dec
ADM_libmpeg2enc
-ADM_libswscale
ADM_libtwolame
ADM_libwrapper
ADM_lvemux
ADM_smjs
ADM_utilities
ADM_xvidratectl
-ADM_libpostproc
ADM_colorspace
)
@@ -267,6 +267,27 @@
if(USE_FREETYPE)
add_libs_all_targets(${FT_LDFLAGS})
endif(USE_FREETYPE)
+
+#libavcodec
+if(USE_AVCODEC)
+ add_libs_all_targets(${AVC_LDFLAGS})
+endif(USE_AVCODEC)
+#libavformat
+if(USE_AVFORMAT)
+ add_libs_all_targets(${AVF_LDFLAGS})
+endif(USE_AVFORMAT)
+#libavutil
+if(USE_AVUTIL)
+ add_libs_all_targets(${AVU_LDFLAGS})
+endif(USE_AVUTIL)
+#libavcodec
+if(USE_SWSCALE)
+ add_libs_all_targets(${SWS_LDFLAGS})
+endif(USE_SWSCALE)
+#libpostproc
+if(USE_POSTPROC)
+ add_libs_all_targets(${PPRC_LDFLAGS})
+endif(USE_POSTPROC)
#fontconfig
if(USE_FONTCONFIG)
@@ -374,6 +395,11 @@
if(USE_X264)
add_libs_all_targets(x264)
endif(USE_X264)
+add_libs_all_targets(avcodec)
+add_libs_all_targets(avformat)
+add_libs_all_targets(avutil)
+add_libs_all_targets(postproc)
+add_libs_all_targets(swscale)
###########################################
# Specific
--- avidemux/ADM_editor/ADM_edRender.cpp 2008-01-13 05:10:30.000000000 -0500
+++ avidemux/ADM_editor/ADM_edRender.cpp 2008-12-14 21:11:59.000000000 -0500
@@ -520,7 +520,8 @@
// we do postproc !
// keep
- uint8_t *oBuff[3],*iBuff[3];
+ const uint8_t *iBuff[3];
+ uint8_t *oBuff[3];
int strideTab[3];
int strideTab2[3];
aviInfo _info;
More information about the rpmfusion-developers
mailing list