[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19363] trunk/lib/windows/ffmpeg: ffmpeg 0 .5 libraries for Windows
Benoit Bolsee
benoit.bolsee at online.be
Sun Mar 22 21:40:31 CET 2009
Revision: 19363
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19363
Author: ben2610
Date: 2009-03-22 21:40:31 +0100 (Sun, 22 Mar 2009)
Log Message:
-----------
ffmpeg 0.5 libraries for Windows
Modified Paths:
--------------
trunk/lib/windows/ffmpeg/Readme.txt
trunk/lib/windows/ffmpeg/ffmpeg_accel_bgra32.patch
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/libmp3lame-0.dll
trunk/lib/windows/ffmpeg/lib/swscale-0.dll
trunk/lib/windows/ffmpeg/lib/swscale-0.lib
trunk/lib/windows/ffmpeg/lib/xvidcore.dll
Added Paths:
-----------
trunk/lib/windows/ffmpeg/include/libavcodec/
trunk/lib/windows/ffmpeg/include/libavcodec/avcodec.h
trunk/lib/windows/ffmpeg/include/libavcodec/opt.h
trunk/lib/windows/ffmpeg/include/libavcodec/vdpau.h
trunk/lib/windows/ffmpeg/include/libavcodec/xvmc.h
trunk/lib/windows/ffmpeg/include/libavdevice/
trunk/lib/windows/ffmpeg/include/libavdevice/avdevice.h
trunk/lib/windows/ffmpeg/include/libavformat/
trunk/lib/windows/ffmpeg/include/libavformat/avformat.h
trunk/lib/windows/ffmpeg/include/libavformat/avio.h
trunk/lib/windows/ffmpeg/include/libavformat/rtsp.h
trunk/lib/windows/ffmpeg/include/libavformat/rtspcodes.h
trunk/lib/windows/ffmpeg/include/libavutil/
trunk/lib/windows/ffmpeg/include/libavutil/adler32.h
trunk/lib/windows/ffmpeg/include/libavutil/avstring.h
trunk/lib/windows/ffmpeg/include/libavutil/avutil.h
trunk/lib/windows/ffmpeg/include/libavutil/base64.h
trunk/lib/windows/ffmpeg/include/libavutil/common.h
trunk/lib/windows/ffmpeg/include/libavutil/crc.h
trunk/lib/windows/ffmpeg/include/libavutil/fifo.h
trunk/lib/windows/ffmpeg/include/libavutil/intfloat_readwrite.h
trunk/lib/windows/ffmpeg/include/libavutil/log.h
trunk/lib/windows/ffmpeg/include/libavutil/lzo.h
trunk/lib/windows/ffmpeg/include/libavutil/mathematics.h
trunk/lib/windows/ffmpeg/include/libavutil/md5.h
trunk/lib/windows/ffmpeg/include/libavutil/mem.h
trunk/lib/windows/ffmpeg/include/libavutil/pixfmt.h
trunk/lib/windows/ffmpeg/include/libavutil/random.h
trunk/lib/windows/ffmpeg/include/libavutil/rational.h
trunk/lib/windows/ffmpeg/include/libavutil/sha1.h
trunk/lib/windows/ffmpeg/include/libswscale/
trunk/lib/windows/ffmpeg/include/libswscale/rgb2rgb.h
trunk/lib/windows/ffmpeg/include/libswscale/swscale.h
trunk/lib/windows/ffmpeg/lib/avcodec-52.dll
trunk/lib/windows/ffmpeg/lib/avcodec-52.lib
trunk/lib/windows/ffmpeg/lib/avutil-50.dll
trunk/lib/windows/ffmpeg/lib/avutil-50.lib
trunk/lib/windows/ffmpeg/lib/libfaad-2.dll
trunk/lib/windows/ffmpeg/lib/libx264-67.dll
Removed Paths:
-------------
trunk/lib/windows/ffmpeg/include/ffmpeg/
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
trunk/lib/windows/ffmpeg/lib/libfaad-0.dll
trunk/lib/windows/ffmpeg/lib/libx264-59.dll
Modified: trunk/lib/windows/ffmpeg/Readme.txt
===================================================================
--- trunk/lib/windows/ffmpeg/Readme.txt 2009-03-22 20:26:04 UTC (rev 19362)
+++ trunk/lib/windows/ffmpeg/Readme.txt 2009-03-22 20:40:31 UTC (rev 19363)
@@ -7,26 +7,24 @@
With the following options:
external libs:
- liba52, mp3lame, xvidcore, faad, faac, x264
+ mp3lame, xvidcore, faad, faac, x264
ffmpeg source:
After getting revision from svn, apply the patch from Peter Schaile: ffmpeg_accel_bgra32.patch
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-vhook
+ --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-gpl --enable-libxvid --disable-ffplay --disable-ffserver --enable-zlib
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
+Copy the ffmpeg headers from <mingw>/local/include to <blender_home>/lib/windows/ffmpeg/include
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 #ifndef statements in inttypes.h to avoid conflict with same file from QUickTime compatibility module.
-6. modify stdint.h to make it compatible with MSVC C++ headers:
+1. Replace every occurance of "static inline" with "__inline"
+2. copy the stdint.h and inttypes.h from <mingw>/include directory to <blender_home>/lib/windows/ffmpeg/include directory
+3. Optionally add #ifndef statements in inttypes.h to avoid conflict with same file from QUickTime compatibility module.
+4. modify stdint.h to make it compatible with MSVC C++ headers:
Add signed to int8_t, int16_t, int32_t, int64_t:
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
Modified: trunk/lib/windows/ffmpeg/ffmpeg_accel_bgra32.patch
===================================================================
--- trunk/lib/windows/ffmpeg/ffmpeg_accel_bgra32.patch 2009-03-22 20:26:04 UTC (rev 19362)
+++ trunk/lib/windows/ffmpeg/ffmpeg_accel_bgra32.patch 2009-03-22 20:40:31 UTC (rev 19363)
@@ -1,67 +1,41 @@
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;
+--- yuv2rgb.c (r\x82vision 28967)
++++ yuv2rgb.c (copie de travail)
+@@ -432,6 +432,7 @@
+ #if (HAVE_MMX2 || HAVE_MMX) && CONFIG_GPL
+ 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 @@
+ case PIX_FMT_RGB565: return yuv420_rgb16_MMX2;
+@@ -440,6 +441,7 @@
}
- if (c->flags & SWS_CPU_CAPS_MMX){
- switch(c->dstFormat){
-+ case PIX_FMT_BGR32: return yuv420_bgr32_MMX;
+ 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;
+ case PIX_FMT_RGB565: 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;
+--- yuv2rgb_template.c (r\x82vision 28967)
++++ yuv2rgb_template.c (copie de travail)
+@@ -451,3 +451,53 @@
+
+ YUV2RGB_ENDLOOP(4)
}
+
+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;
-+ }
++ YUV422_UNSHIFT
++ YUV2RGB_LOOP(4)
+
-+ 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 */
++ YUV2RGB_INIT
++ YUV2RGB
+ "pxor %%mm3, %%mm3;" /* zero mm3 */
+
+ "movq %%mm1, %%mm6;" /* R7 R6 R5 R4 R3 R2 R1 R0 */
@@ -100,15 +74,5 @@
+ "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;
++ YUV2RGB_ENDLOOP(4)
+}
Added: trunk/lib/windows/ffmpeg/include/libavcodec/avcodec.h
===================================================================
--- trunk/lib/windows/ffmpeg/include/libavcodec/avcodec.h (rev 0)
+++ trunk/lib/windows/ffmpeg/include/libavcodec/avcodec.h 2009-03-22 20:40:31 UTC (rev 19363)
@@ -0,0 +1,3419 @@
+/*
+ * copyright (c) 2001 Fabrice Bellard
+ *
+ * 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 AVCODEC_AVCODEC_H
+#define AVCODEC_AVCODEC_H
+
+/**
+ * @file libavcodec/avcodec.h
+ * external API header
+ */
+
+#include <errno.h>
+#include "libavutil/avutil.h"
+
+#define LIBAVCODEC_VERSION_MAJOR 52
+#define LIBAVCODEC_VERSION_MINOR 21
+#define LIBAVCODEC_VERSION_MICRO 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_C(0x8000000000000000)
+#define AV_TIME_BASE 1000000
+#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
+
+/**
+ * Identifies the syntax and semantics of the bitstream.
+ * The principle is roughly:
+ * Two decoders with the same ID can decode the same streams.
+ * Two encoders with the same ID can encode compatible streams.
+ * There may be slight deviations from the principle due to implementation
+ * details.
+ *
+ * If you add a codec ID to this list, add it so that
+ * 1. no value of a existing codec ID changes (that would break ABI),
+ * 2. it is as close as possible to similar codecs.
+ */
+enum CodecID {
+ CODEC_ID_NONE,
+
+ /* video codecs */
+ CODEC_ID_MPEG1VIDEO,
+ CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding
+ CODEC_ID_MPEG2VIDEO_XVMC,
+ CODEC_ID_H261,
+ CODEC_ID_H263,
+ CODEC_ID_RV10,
+ CODEC_ID_RV20,
+ CODEC_ID_MJPEG,
+ CODEC_ID_MJPEGB,
+ CODEC_ID_LJPEG,
+ CODEC_ID_SP5X,
+ CODEC_ID_JPEGLS,
+ CODEC_ID_MPEG4,
+ CODEC_ID_RAWVIDEO,
+ CODEC_ID_MSMPEG4V1,
+ CODEC_ID_MSMPEG4V2,
+ CODEC_ID_MSMPEG4V3,
+ CODEC_ID_WMV1,
+ CODEC_ID_WMV2,
+ CODEC_ID_H263P,
+ CODEC_ID_H263I,
+ CODEC_ID_FLV1,
+ CODEC_ID_SVQ1,
+ CODEC_ID_SVQ3,
+ CODEC_ID_DVVIDEO,
+ CODEC_ID_HUFFYUV,
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list