[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14504] trunk/lib/windows/ffmpeg: == ffmpeg WIN32 libs ==
Andrea Weikert
elubie at gmx.net
Mon Apr 21 21:18:38 CEST 2008
Revision: 14504
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14504
Author: elubie
Date: 2008-04-21 21:18:38 +0200 (Mon, 21 Apr 2008)
Log Message:
-----------
== ffmpeg WIN32 libs ==
updated ffmpeg libs for windows, provided by Benoit Bolsee.
used for building blender 2.46 RC2.
Modified Paths:
--------------
trunk/lib/windows/ffmpeg/Readme.txt
trunk/lib/windows/ffmpeg/include/ffmpeg/adler32.h
trunk/lib/windows/ffmpeg/include/ffmpeg/avcodec.h
trunk/lib/windows/ffmpeg/include/ffmpeg/avformat.h
trunk/lib/windows/ffmpeg/include/ffmpeg/avio.h
trunk/lib/windows/ffmpeg/include/ffmpeg/avutil.h
trunk/lib/windows/ffmpeg/include/ffmpeg/common.h
trunk/lib/windows/ffmpeg/include/ffmpeg/fifo.h
trunk/lib/windows/ffmpeg/include/ffmpeg/intfloat_readwrite.h
trunk/lib/windows/ffmpeg/include/ffmpeg/log.h
trunk/lib/windows/ffmpeg/include/ffmpeg/mathematics.h
trunk/lib/windows/ffmpeg/include/ffmpeg/md5.h
trunk/lib/windows/ffmpeg/include/ffmpeg/opt.h
trunk/lib/windows/ffmpeg/include/ffmpeg/rational.h
trunk/lib/windows/ffmpeg/include/ffmpeg/rgb2rgb.h
trunk/lib/windows/ffmpeg/include/ffmpeg/rtsp.h
trunk/lib/windows/ffmpeg/include/ffmpeg/rtspcodes.h
trunk/lib/windows/ffmpeg/include/ffmpeg/swscale.h
trunk/lib/windows/ffmpeg/lib/avcodec-51.dll
trunk/lib/windows/ffmpeg/lib/avcodec-51.lib
trunk/lib/windows/ffmpeg/lib/avutil-49.dll
trunk/lib/windows/ffmpeg/lib/avutil-49.lib
Added Paths:
-----------
trunk/lib/windows/ffmpeg/ffmpeg_accel_bgra32.patch
trunk/lib/windows/ffmpeg/include/ffmpeg/avdevice.h
trunk/lib/windows/ffmpeg/include/ffmpeg/avstring.h
trunk/lib/windows/ffmpeg/include/ffmpeg/base64.h
trunk/lib/windows/ffmpeg/include/ffmpeg/crc.h
trunk/lib/windows/ffmpeg/include/ffmpeg/lzo.h
trunk/lib/windows/ffmpeg/include/ffmpeg/mem.h
trunk/lib/windows/ffmpeg/include/ffmpeg/random.h
trunk/lib/windows/ffmpeg/include/ffmpeg/sha1.h
trunk/lib/windows/ffmpeg/include/inttypes.h
trunk/lib/windows/ffmpeg/include/stdint.h
trunk/lib/windows/ffmpeg/lib/avdevice-52.dll
trunk/lib/windows/ffmpeg/lib/avdevice-52.lib
trunk/lib/windows/ffmpeg/lib/avformat-52.dll
trunk/lib/windows/ffmpeg/lib/avformat-52.lib
trunk/lib/windows/ffmpeg/lib/libfaac-0.dll
trunk/lib/windows/ffmpeg/lib/libfaad-0.dll
trunk/lib/windows/ffmpeg/lib/libmp3lame-0.dll
trunk/lib/windows/ffmpeg/lib/libogg-0.dll
trunk/lib/windows/ffmpeg/lib/libvorbis-0.dll
trunk/lib/windows/ffmpeg/lib/libvorbisenc-2.dll
trunk/lib/windows/ffmpeg/lib/libvorbisfile-3.dll
trunk/lib/windows/ffmpeg/lib/libx264-59.dll
trunk/lib/windows/ffmpeg/lib/swscale-0.dll
trunk/lib/windows/ffmpeg/lib/swscale-0.lib
trunk/lib/windows/ffmpeg/lib/xvidcore.dll
Removed Paths:
-------------
trunk/lib/windows/ffmpeg/include/ffmpeg/integer.h
trunk/lib/windows/ffmpeg/include/ffmpeg/rtp.h
trunk/lib/windows/ffmpeg/lib/avformat-51.dll
trunk/lib/windows/ffmpeg/lib/avformat-51.lib
Modified: trunk/lib/windows/ffmpeg/Readme.txt
===================================================================
--- trunk/lib/windows/ffmpeg/Readme.txt 2008-04-21 15:53:32 UTC (rev 14503)
+++ trunk/lib/windows/ffmpeg/Readme.txt 2008-04-21 19:18:38 UTC (rev 14504)
@@ -1,25 +1,29 @@
-This directory contains the Revision 7070 shared binaries (all) for use with Blender from:
+This directory contains the Revision 12758 shared binaries for use with Blender.
-http://arrozcru.no-ip.org/ffmpeg/
+The compilation has been done according to the instruction in this wiki:
-The includes has been modified to compile with MSVC as follows:
+http://arrozcru.no-ip.org/ffmpeg_wiki/
-1. Replace the inttypes.h #include with the following at the top of common.h
-:
+With the following options:
+ external libs:
+ liba52, mp3lame, xvidcore, faad, faac, x264
-#if defined(_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
- #define int8_t __int8
- #define uint8_t unsigned __int8
- #define int16_t __int16
- #define uint16_t unsigned __int16
- #define int32_t __int32
- #define uint32_t unsigned __int32
- #define int64_t __int64
- #define uint64_t unsigned __int64
-#else
- #include <inttypes.h>
-#endif
+ ffmpeg source:
+ After getting revision from svn, apply the patch from Peter Schaile: ffmpeg_accel_bgra32.patch
-2. Replace every occurance of "static inline" with "__inline"
+ Compilation option for ffmpeg:
+ --enable-shared --disable-static --enable-memalign-hack --extra-ldflags=-L/shared/lib --extra-cflags=-I/shared/include --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-libx264 --enable-liba52 --enable-gpl --enable-libxvid --enable-swscale --disable-ffplay --disable-ffserver --disable-zlib --disable-network --disable-vhook
+The compilation returns error on linking the ffmpeg applications but the DLL are correctly built.
+Copy the ffmpeg dll an lib files from <mingw>/local/bin directory to <blender_home>/lib/windows/ffmpeg/lib.
+Rename the dll and lib so that they match the format <lib_name>-<version>.<ext>.
+Copy the ffmpeg headers from <mingw>/local/include to <blender_home>/lib/windows/ffmpeg/include/ffmpeg
+
+The includes files have been modified to compile with MSVC as follows:
+1. Flaten the directory structure so that all the headers all sit in <blender_home>/lib/windows/ffmpeg/include/ffmpeg
+2. Remove the directory in the #include statements of ffmpeg headers
+3. Replace every occurance of "static inline" with "__inline"
+4. copy the stdint.h and inttypes.h from <mingw>/include directory to <blender_home>/lib/windows/ffmpeg/include directory
+5. Optionally add #indef statements in inttypes.h to avoid conflict with same file from QUickTime compatibility module.
+
Added: trunk/lib/windows/ffmpeg/ffmpeg_accel_bgra32.patch
===================================================================
--- trunk/lib/windows/ffmpeg/ffmpeg_accel_bgra32.patch (rev 0)
+++ trunk/lib/windows/ffmpeg/ffmpeg_accel_bgra32.patch 2008-04-21 19:18:38 UTC (rev 14504)
@@ -0,0 +1,114 @@
+Index: yuv2rgb.c
+===================================================================
+--- yuv2rgb.c (revision 12118)
++++ yuv2rgb.c (working copy)
+@@ -619,6 +619,7 @@
+ #if defined(HAVE_MMX2) || defined(HAVE_MMX)
+ if (c->flags & SWS_CPU_CAPS_MMX2){
+ switch(c->dstFormat){
++ case PIX_FMT_BGR32: return yuv420_bgr32_MMX2;
+ case PIX_FMT_RGB32: return yuv420_rgb32_MMX2;
+ case PIX_FMT_BGR24: return yuv420_rgb24_MMX2;
+ case PIX_FMT_BGR565: return yuv420_rgb16_MMX2;
+@@ -627,6 +628,7 @@
+ }
+ if (c->flags & SWS_CPU_CAPS_MMX){
+ switch(c->dstFormat){
++ case PIX_FMT_BGR32: return yuv420_bgr32_MMX;
+ case PIX_FMT_RGB32: return yuv420_rgb32_MMX;
+ case PIX_FMT_BGR24: return yuv420_rgb24_MMX;
+ case PIX_FMT_BGR565: return yuv420_rgb16_MMX;
+Index: yuv2rgb_template.c
+===================================================================
+--- yuv2rgb_template.c (revision 12118)
++++ yuv2rgb_template.c (working copy)
+@@ -536,3 +536,89 @@
+ __asm__ __volatile__ (EMMS);
+ return srcSliceH;
+ }
++
++static inline int RENAME(yuv420_bgr32)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
++ int srcSliceH, uint8_t* dst[], int dstStride[]){
++ int y, h_size;
++
++ if(c->srcFormat == PIX_FMT_YUV422P){
++ srcStride[1] *= 2;
++ srcStride[2] *= 2;
++ }
++
++ h_size= (c->dstW+7)&~7;
++ if(h_size*4 > FFABS(dstStride[0])) h_size-=8;
++
++ __asm__ __volatile__ ("pxor %mm4, %mm4;" /* zero mm4 */ );
++
++ for (y= 0; y<srcSliceH; y++ ) {
++ uint8_t *_image = dst[0] + (y+srcSliceY)*dstStride[0];
++ uint8_t *_py = src[0] + y*srcStride[0];
++ uint8_t *_pu = src[1] + (y>>1)*srcStride[1];
++ uint8_t *_pv = src[2] + (y>>1)*srcStride[2];
++ long index= -h_size/2;
++
++ /* this mmx assembly code deals with SINGLE scan line at a time, it convert 8
++ pixels in each iteration */
++ __asm__ __volatile__ (
++ /* load data for start of next scan line */
++ "movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */
++ "movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */
++ "movq (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */
++ //".balign 16 \n\t"
++ "1: \n\t"
++YUV2RGB
++ /* convert RGB plane to RGB packed format,
++ mm0 -> B, mm1 -> R, mm2 -> G, mm3 -> 0,
++ mm4 -> GB, mm5 -> AR pixel 4-7,
++ mm6 -> GB, mm7 -> AR pixel 0-3 */
++ "pxor %%mm3, %%mm3;" /* zero mm3 */
++
++ "movq %%mm1, %%mm6;" /* R7 R6 R5 R4 R3 R2 R1 R0 */
++ "movq %%mm0, %%mm7;" /* B7 B6 B5 B4 B3 B2 B1 B0 */
++
++ "movq %%mm1, %%mm4;" /* R7 R6 R5 R4 R3 R2 R1 R0 */
++ "movq %%mm0, %%mm5;" /* B7 B6 B5 B4 B3 B2 B1 B0 */
++
++ "punpcklbw %%mm2, %%mm6;" /* G3 R3 G2 R2 G1 R1 G0 R0 */
++ "punpcklbw %%mm3, %%mm7;" /* 00 B3 00 B2 00 B1 00 B0 */
++
++ "punpcklwd %%mm7, %%mm6;" /* 00 B1 R1 G1 00 B0 R0 G0 */
++ MOVNTQ " %%mm6, (%1);" /* Store ABGR1 ABGR0 */
++
++ "movq %%mm1, %%mm6;" /* R7 R6 R5 R4 R3 R2 R1 R0 */
++ "punpcklbw %%mm2, %%mm6;" /* G3 R3 G2 R2 G1 R1 G0 R0 */
++
++ "punpckhwd %%mm7, %%mm6;" /* 00 B3 G3 R3 00 B2 R3 G2 */
++ MOVNTQ " %%mm6, 8 (%1);" /* Store ABGR3 ABGR2 */
++
++ "punpckhbw %%mm2, %%mm4;" /* G7 R7 G6 R6 G5 R5 G4 R4 */
++ "punpckhbw %%mm3, %%mm5;" /* 00 B7 00 B6 00 B5 00 B4 */
++
++ "punpcklwd %%mm5, %%mm4;" /* 00 B5 R5 G5 00 B4 R4 G4 */
++ MOVNTQ " %%mm4, 16 (%1);" /* Store ABGR5 ABGR4 */
++
++ "movq %%mm1, %%mm4;" /* R7 R6 R5 R4 R3 R2 R1 R0 */
++ "punpckhbw %%mm2, %%mm4;" /* G7 R7 G6 R6 G5 R5 G4 R4 */
++
++ "punpckhwd %%mm5, %%mm4;" /* 00 B7 G7 R7 00 B6 R6 G6 */
++ MOVNTQ " %%mm4, 24 (%1);" /* Store ABGR7 ABGR6 */
++
++ "movd 4 (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */
++ "movd 4 (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */
++
++ "pxor %%mm4, %%mm4;" /* zero mm4 */
++ "movq 8 (%5, %0, 2), %%mm6;" /* Load 8 Y Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 */
++
++ "add $32, %1 \n\t"
++ "add $4, %0 \n\t"
++ " js 1b \n\t"
++
++ : "+r" (index), "+r" (_image)
++ : "r" (_pu - index), "r" (_pv - index), "r"(&c->redDither), "r" (_py - 2*index)
++ );
++ }
++
++ __asm__ __volatile__ (EMMS);
++ return srcSliceH;
++}
Modified: trunk/lib/windows/ffmpeg/include/ffmpeg/adler32.h
===================================================================
--- trunk/lib/windows/ffmpeg/include/ffmpeg/adler32.h 2008-04-21 15:53:32 UTC (rev 14503)
+++ trunk/lib/windows/ffmpeg/include/ffmpeg/adler32.h 2008-04-21 19:18:38 UTC (rev 14504)
@@ -18,10 +18,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef ADLER32_H
-#define ADLER32_H
+#ifndef FFMPEG_ADLER32_H
+#define FFMPEG_ADLER32_H
+#include <stdint.h>
+#include "common.h"
+
unsigned long av_adler32_update(unsigned long adler, const uint8_t *buf,
- unsigned int len);
+ unsigned int len) av_pure;
-#endif
+#endif /* FFMPEG_ADLER32_H */
Modified: trunk/lib/windows/ffmpeg/include/ffmpeg/avcodec.h
===================================================================
--- trunk/lib/windows/ffmpeg/include/ffmpeg/avcodec.h 2008-04-21 15:53:32 UTC (rev 14503)
+++ trunk/lib/windows/ffmpeg/include/ffmpeg/avcodec.h 2008-04-21 19:18:38 UTC (rev 14504)
@@ -15,42 +15,54 @@
*
* 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 St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef AVCODEC_H
-#define AVCODEC_H
+#ifndef FFMPEG_AVCODEC_H
+#define FFMPEG_AVCODEC_H
/**
* @file avcodec.h
- * external api header.
+ * external API header
*/
-#ifdef __cplusplus
-extern "C" {
-#endif
-
#include "avutil.h"
-#include <sys/types.h> /* size_t */
-#define AV_STRINGIFY(s) AV_TOSTRING(s)
-#define AV_TOSTRING(s) #s
+#define LIBAVCODEC_VERSION_MAJOR 51
+#define LIBAVCODEC_VERSION_MINOR 54
+#define LIBAVCODEC_VERSION_MICRO 0
-#define LIBAVCODEC_VERSION_INT ((51<<16)+(25<<8)+0)
-#define LIBAVCODEC_VERSION 51.25.0
+#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
+ LIBAVCODEC_VERSION_MINOR, \
+ LIBAVCODEC_VERSION_MICRO)
+#define LIBAVCODEC_VERSION AV_VERSION(LIBAVCODEC_VERSION_MAJOR, \
+ LIBAVCODEC_VERSION_MINOR, \
+ LIBAVCODEC_VERSION_MICRO)
#define LIBAVCODEC_BUILD LIBAVCODEC_VERSION_INT
#define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
-#define AV_NOPTS_VALUE int64_t_C(0x8000000000000000)
+#define AV_NOPTS_VALUE INT64_C(0x8000000000000000)
#define AV_TIME_BASE 1000000
#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
+/**
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list