[Drdivx-commits] SF.net SVN: drdivx: [658] DrDivX/trunk/drffmpeg
Brought to you by:
harikrishnan_v,
seabass089
From: <ro...@us...> - 2006-10-17 17:33:49
|
Revision: 658 http://svn.sourceforge.net/drdivx/?rev=658&view=rev Author: robux4 Date: 2006-10-17 10:30:08 -0700 (Tue, 17 Oct 2006) Log Message: ----------- fix compilation in MSVC (still builds under MinGW, without DrFFMPEG yet) Modified Paths: -------------- DrDivX/trunk/drffmpeg/avcodec.vcproj DrDivX/trunk/drffmpeg/avformat.vcproj DrDivX/trunk/drffmpeg/drffmpeg.c DrDivX/trunk/drffmpeg/drffmpeg.proj DrDivX/trunk/drffmpeg/drffmpeg.sln DrDivX/trunk/drffmpeg/dshow/AacSourceCallBack.cpp DrDivX/trunk/drffmpeg/dshow/Ac3SourceCallBack.cpp DrDivX/trunk/drffmpeg/dshow/AudioCapture.cpp DrDivX/trunk/drffmpeg/dshow/AudioSinkCallBack.cpp DrDivX/trunk/drffmpeg/dshow/DShowDecoder.cpp DrDivX/trunk/drffmpeg/dshow/DtsDecoder.cpp DrDivX/trunk/drffmpeg/dshow/DtsSourceCallBack.cpp DrDivX/trunk/drffmpeg/dshow/FilterUtil.cpp DrDivX/trunk/drffmpeg/dshow/RealVideoDecoder.cpp DrDivX/trunk/drffmpeg/dshow/RealVideoSourceCallBack.cpp DrDivX/trunk/drffmpeg/dshow/SinkCallBack.h DrDivX/trunk/drffmpeg/dshow/VideoCapture.cpp DrDivX/trunk/drffmpeg/dshow/VideoSinkCallBack.cpp DrDivX/trunk/drffmpeg/dshow/aac_dshow.cpp DrDivX/trunk/drffmpeg/dshow/ac3_dshow.cpp DrDivX/trunk/drffmpeg/dshow/capture.cpp DrDivX/trunk/drffmpeg/export/drffmpeg/common.h DrDivX/trunk/drffmpeg/export/drffmpeg/internal.h DrDivX/trunk/drffmpeg/export/drffmpeg/log.h DrDivX/trunk/drffmpeg/export/drffmpeg/msvc/ffconfig.h DrDivX/trunk/drffmpeg/export/drffmpeg/rational.h DrDivX/trunk/drffmpeg/ffmpeg.c DrDivX/trunk/drffmpeg/libavcodec/adpcm.c DrDivX/trunk/drffmpeg/libavcodec/allcodecs.c DrDivX/trunk/drffmpeg/libavcodec/asv1.c DrDivX/trunk/drffmpeg/libavcodec/cabac.h DrDivX/trunk/drffmpeg/libavcodec/cavs.c DrDivX/trunk/drffmpeg/libavcodec/divx.c DrDivX/trunk/drffmpeg/libavcodec/dsputil.c DrDivX/trunk/drffmpeg/libavcodec/eval.c DrDivX/trunk/drffmpeg/libavcodec/fft.c DrDivX/trunk/drffmpeg/libavcodec/h261.c DrDivX/trunk/drffmpeg/libavcodec/imgconvert.c DrDivX/trunk/drffmpeg/libavcodec/imgresample.c DrDivX/trunk/drffmpeg/libavcodec/libavcodec.proj DrDivX/trunk/drffmpeg/libavcodec/mathops.h DrDivX/trunk/drffmpeg/libavcodec/mp3surround.c DrDivX/trunk/drffmpeg/libavcodec/mpegaudiodec.c DrDivX/trunk/drffmpeg/libavcodec/ratecontrol.c DrDivX/trunk/drffmpeg/libavcodec/rtjpeg.c DrDivX/trunk/drffmpeg/libavcodec/rv10.c DrDivX/trunk/drffmpeg/libavcodec/utils.c DrDivX/trunk/drffmpeg/libavcodec/vp5.c DrDivX/trunk/drffmpeg/libavcodec/vp56.c DrDivX/trunk/drffmpeg/libavcodec/vp56.h DrDivX/trunk/drffmpeg/libavcodec/vp56data.c DrDivX/trunk/drffmpeg/libavcodec/vp56data.h DrDivX/trunk/drffmpeg/libavcodec/vp5data.h DrDivX/trunk/drffmpeg/libavcodec/vp6.c DrDivX/trunk/drffmpeg/libavcodec/vp6data.h DrDivX/trunk/drffmpeg/libavformat/file.c DrDivX/trunk/drffmpeg/libavformat/gxf.c DrDivX/trunk/drffmpeg/libavformat/libavformat.proj DrDivX/trunk/drffmpeg/libavformat/os_support.c DrDivX/trunk/drffmpeg/libavutil/intfloat_readwrite.c DrDivX/trunk/drffmpeg/libavutil/libavutil.proj Removed Paths: ------------- DrDivX/trunk/drffmpeg/libavcodec/vc9.c DrDivX/trunk/drffmpeg/libavcodec/vc9data.h Modified: DrDivX/trunk/drffmpeg/avcodec.vcproj =================================================================== --- DrDivX/trunk/drffmpeg/avcodec.vcproj 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/avcodec.vcproj 2006-10-17 17:30:08 UTC (rev 658) @@ -283,6 +283,10 @@ > </File> <File + RelativePath=".\libavcodec\bitstream_filter.c" + > + </File> + <File RelativePath="libavcodec\bmp.c" > </File> @@ -291,6 +295,14 @@ > </File> <File + RelativePath=".\libavcodec\cavs.c" + > + </File> + <File + RelativePath=".\libavcodec\cavsdsp.c" + > + </File> + <File RelativePath="libavcodec\cinepak.c" > </File> @@ -305,8 +317,36 @@ <File RelativePath="libavcodec\corepng.c" > + <FileConfiguration + Name="Debug|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug ASM|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File + RelativePath=".\libavcodec\cscd.c" + > + </File> + <File RelativePath="libavcodec\cyuv.c" > </File> @@ -319,6 +359,10 @@ > </File> <File + RelativePath=".\libavcodec\dsicinav.c" + > + </File> + <File RelativePath="libavcodec\dsputil.c" > </File> @@ -347,10 +391,6 @@ > </File> <File - RelativePath="libavcodec\faac.c" - > - </File> - <File RelativePath="libavcodec\faandct.c" > </File> @@ -387,10 +427,6 @@ > </File> <File - RelativePath="libavcodec\gsm.c" - > - </File> - <File RelativePath="libavcodec\h261.c" > </File> @@ -479,11 +515,11 @@ > </File> <File - RelativePath="libavcodec\lcl.c" + RelativePath=".\libavcodec\kmvc.c" > </File> <File - RelativePath="libavcodec\libgsm.c" + RelativePath="libavcodec\lcl.c" > </File> <File @@ -491,6 +527,10 @@ > </File> <File + RelativePath=".\libavcodec\lzo.c" + > + </File> + <File RelativePath="libavcodec\mace.c" > </File> @@ -607,6 +647,10 @@ > </File> <File + RelativePath=".\libavcodec\nuv.c" + > + </File> + <File RelativePath="libavcodec\opt.c" > </File> @@ -679,6 +723,10 @@ > </File> <File + RelativePath=".\libavcodec\rtjpeg.c" + > + </File> + <File RelativePath="libavcodec\rv10.c" > </File> @@ -735,6 +783,18 @@ > </File> <File + RelativePath=".\libavcodec\targa.c" + > + </File> + <File + RelativePath=".\libavcodec\tiertexseqv.c" + > + </File> + <File + RelativePath=".\libavcodec\tiff.c" + > + </File> + <File RelativePath="libavcodec\truemotion1.c" > </File> @@ -763,10 +823,14 @@ > </File> <File - RelativePath="libavcodec\vc9.c" + RelativePath=".\libavcodec\vc1.c" > </File> <File + RelativePath=".\libavcodec\vc1dsp.c" + > + </File> + <File RelativePath="libavcodec\vcr1.c" > </File> @@ -775,10 +839,18 @@ > </File> <File + RelativePath=".\libavcodec\vmnc.c" + > + </File> + <File RelativePath="libavcodec\vorbis.c" > </File> <File + RelativePath=".\libavcodec\vorbis_data.c" + > + </File> + <File RelativePath="libavcodec\vp3.c" > </File> @@ -787,6 +859,22 @@ > </File> <File + RelativePath=".\libavcodec\vp5.c" + > + </File> + <File + RelativePath=".\libavcodec\vp56.c" + > + </File> + <File + RelativePath=".\libavcodec\vp56data.c" + > + </File> + <File + RelativePath=".\libavcodec\vp6.c" + > + </File> + <File RelativePath="libavcodec\vqavideo.c" > </File> @@ -795,6 +883,10 @@ > </File> <File + RelativePath=".\libavcodec\wavpack.c" + > + </File> + <File RelativePath="libavcodec\wmadec.c" > </File> @@ -885,6 +977,10 @@ > </File> <File + RelativePath=".\libavcodec\cavsdata.h" + > + </File> + <File RelativePath="libavcodec\cookdata.h" > </File> @@ -933,6 +1029,10 @@ > </File> <File + RelativePath=".\libavcodec\lzo.h" + > + </File> + <File RelativePath=".\libavcodec\mp3sencoder.h" > </File> @@ -985,6 +1085,10 @@ > </File> <File + RelativePath=".\libavcodec\rtjpeg.h" + > + </File> + <File RelativePath="libavcodec\simple_idct.h" > </File> @@ -1017,18 +1121,42 @@ > </File> <File - RelativePath="libavcodec\vc9data.h" + RelativePath=".\libavcodec\vc1acdata.h" > </File> <File + RelativePath=".\libavcodec\vc1data.h" + > + </File> + <File RelativePath="libavcodec\vorbis.h" > </File> <File + RelativePath=".\libavcodec\vorbis_enc_data.h" + > + </File> + <File RelativePath="libavcodec\vp3data.h" > </File> <File + RelativePath=".\libavcodec\vp56.h" + > + </File> + <File + RelativePath=".\libavcodec\vp56data.h" + > + </File> + <File + RelativePath=".\libavcodec\vp5data.h" + > + </File> + <File + RelativePath=".\libavcodec\vp6data.h" + > + </File> + <File RelativePath="libavcodec\wmadata.h" > </File> @@ -1067,6 +1195,30 @@ <File RelativePath="libavcodec\i386\fft_sse.c" > + <FileConfiguration + Name="Debug|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug ASM|Win32" + ExcludedFromBuild="true" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="libavcodec\i386\mmx.h" @@ -1157,6 +1309,10 @@ > </File> <File + RelativePath=".\libavutil\fifo.c" + > + </File> + <File RelativePath="libavutil\integer.c" > </File> @@ -1173,6 +1329,10 @@ > </File> <File + RelativePath=".\libavutil\log.c" + > + </File> + <File RelativePath="libavutil\mathematics.c" > </File> @@ -1181,6 +1341,37 @@ > </File> <File + RelativePath=".\libavutil\mem.c" + > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)\$(InputName)1.obj" + XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" + /> + </FileConfiguration> + <FileConfiguration + Name="Release|Win32" + > + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)\$(InputName)1.obj" + XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug ASM|Win32" + > + <Tool + Name="VCCLCompilerTool" + ObjectFile="$(IntDir)\$(InputName)1.obj" + XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc" + /> + </FileConfiguration> + </File> + <File RelativePath="libavutil\rational.c" > </File> Modified: DrDivX/trunk/drffmpeg/avformat.vcproj =================================================================== --- DrDivX/trunk/drffmpeg/avformat.vcproj 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/avformat.vcproj 2006-10-17 17:30:08 UTC (rev 658) @@ -150,7 +150,7 @@ <References> <ProjectReference ReferencedProjectIdentifier="{E545CE79-F243-476D-A0D0-9BB4294563D8}" - RelativePathToProject="..\..\..\drffmpeg\avcodec.vcproj" + RelativePathToProject=".\avcodec.vcproj" /> </References> <Files> @@ -228,6 +228,10 @@ > </File> <File + RelativePath=".\libavformat\dsicin.c" + > + </File> + <File RelativePath="libavformat\dv.c" > </File> @@ -268,6 +272,10 @@ > </File> <File + RelativePath=".\libavformat\gxf.c" + > + </File> + <File RelativePath="libavformat\idcin.c" > </File> @@ -288,6 +296,10 @@ > </File> <File + RelativePath=".\libavformat\isom.c" + > + </File> + <File RelativePath="libavformat\jpeg.c" > </File> @@ -332,6 +344,14 @@ > </File> <File + RelativePath=".\libavformat\mtv.c" + > + </File> + <File + RelativePath=".\libavformat\mxf.c" + > + </File> + <File RelativePath="libavformat\nsvdec.c" > </File> @@ -380,6 +400,10 @@ > </File> <File + RelativePath=".\libavformat\riff.c" + > + </File> + <File RelativePath="libavformat\rm.c" > </File> @@ -408,6 +432,10 @@ > </File> <File + RelativePath=".\libavformat\tiertexseq.c" + > + </File> + <File RelativePath="libavformat\tta.c" > </File> @@ -432,6 +460,10 @@ > </File> <File + RelativePath=".\libavformat\wv.c" + > + </File> + <File RelativePath="libavformat\yuv.c" > </File> @@ -474,6 +506,14 @@ > </File> <File + RelativePath=".\libavformat\gxf.h" + > + </File> + <File + RelativePath=".\libavformat\isom.h" + > + </File> + <File RelativePath="libavformat\mov.h" > </File> @@ -494,6 +534,10 @@ > </File> <File + RelativePath=".\libavformat\riff.h" + > + </File> + <File RelativePath="libavformat\voc.h" > </File> @@ -518,6 +562,10 @@ > </File> <File + RelativePath=".\libavutil\fifo.c" + > + </File> + <File RelativePath="libavutil\integer.c" > </File> @@ -534,6 +582,10 @@ > </File> <File + RelativePath=".\libavutil\log.c" + > + </File> + <File RelativePath="libavutil\mathematics.c" > </File> @@ -542,6 +594,10 @@ > </File> <File + RelativePath=".\libavutil\mem.c" + > + </File> + <File RelativePath="libavutil\rational.c" > </File> Modified: DrDivX/trunk/drffmpeg/drffmpeg.c =================================================================== --- DrDivX/trunk/drffmpeg/drffmpeg.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/drffmpeg.c 2006-10-17 17:30:08 UTC (rev 658) @@ -22,14 +22,14 @@ #include "avcodec.h" #include "avformat.h" -#if defined(__MINGW32__) +#if defined(_WIN32) #define _WIN32_DCOM #include <objbase.h> #endif int drffmpeg_init() { -#if defined(__MINGW32__) +#if defined(_WIN32) CoInitializeEx(NULL, COINIT_MULTITHREADED); #endif #ifdef HAVE_LIBAVDSP @@ -40,7 +40,7 @@ int drffmpeg_exit() { -#if defined(__MINGW32__) +#if defined(_WIN32) CoUninitialize(); #endif return 0; Modified: DrDivX/trunk/drffmpeg/drffmpeg.proj =================================================================== --- DrDivX/trunk/drffmpeg/drffmpeg.proj 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/drffmpeg.proj 2006-10-17 17:30:08 UTC (rev 658) @@ -20,13 +20,16 @@ INCLUDE(COMPILER_MSVC) export/drffmpeg/msvc INCLUDE export/drffmpeg + INCLUDE libavcodec } CON ffmpeg { USE drffmpeg + INCLUDE(COMPILER_MSVC) export/drffmpeg/msvc INCLUDE export/drffmpeg + INCLUDE libavcodec SOURCE ffmpeg.c SOURCE cmdutils.c Modified: DrDivX/trunk/drffmpeg/drffmpeg.sln =================================================================== --- DrDivX/trunk/drffmpeg/drffmpeg.sln 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/drffmpeg.sln 2006-10-17 17:30:08 UTC (rev 658) @@ -41,7 +41,6 @@ {3623DB08-7D40-4D06-9309-5EC012177825}.Debug|Win32.Build.0 = Debug|Win32 {3623DB08-7D40-4D06-9309-5EC012177825}.Release|Win32.ActiveCfg = Release|Win32 {866D5DD7-9CCA-43A2-9CA2-5DD4220C346D}.Debug|Win32.ActiveCfg = Debug|Win32 - {866D5DD7-9CCA-43A2-9CA2-5DD4220C346D}.Debug|Win32.Build.0 = Debug|Win32 {866D5DD7-9CCA-43A2-9CA2-5DD4220C346D}.Release|Win32.ActiveCfg = Release|Win32 {866D5DD7-9CCA-43A2-9CA2-5DD4220C346D}.Release|Win32.Build.0 = Release|Win32 {3E056497-B9D1-4B94-8D33-DC416AF11EE8}.Debug|Win32.ActiveCfg = Debug|Win32 Modified: DrDivX/trunk/drffmpeg/dshow/AacSourceCallBack.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/AacSourceCallBack.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/AacSourceCallBack.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -21,7 +21,6 @@ * DShow AAC input pin. */ -#define AV_DONT_OVERRIDE_STDC #include <streams.h> #include "avcodec.h" Modified: DrDivX/trunk/drffmpeg/dshow/Ac3SourceCallBack.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/Ac3SourceCallBack.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/Ac3SourceCallBack.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -21,7 +21,6 @@ * DShow AC3 input pin. */ -#define AV_DONT_OVERRIDE_STDC #include <streams.h> #include "avcodec.h" Modified: DrDivX/trunk/drffmpeg/dshow/AudioCapture.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/AudioCapture.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/AudioCapture.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -17,15 +17,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA */ + +#include <cstdio> +#include <cstring> +#include <cstdlib> #include <streams.h> -#define AV_DONT_OVERRIDE_STDC #include "FilterUtil.h" - +#include "AudioCapture.h" #include "AudioSinkCallBack.h" -#include "AudioCapture.h" - DShowAudioCaptureGraph::DShowAudioCaptureGraph( AVFormatContext *avctx, const char *device ) :DShowCaptureGraph(avctx,device) ,m_device_input(NULL) Modified: DrDivX/trunk/drffmpeg/dshow/AudioSinkCallBack.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/AudioSinkCallBack.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/AudioSinkCallBack.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -22,7 +22,6 @@ */ #define DISABLE_PTS -#define AV_DONT_OVERRIDE_STDC #include <streams.h> #include "AudioSinkCallBack.h" Modified: DrDivX/trunk/drffmpeg/dshow/DShowDecoder.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/DShowDecoder.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/DShowDecoder.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -29,8 +29,10 @@ #include "common.h" #include "avformat.h" -#if defined(__MINGW32__) +#if defined(_WIN32) +#include <streams.h> + #include "FilterUtil.h" #include "VideoSinkCallBack.h" #include "DShowDecoder.h" @@ -378,4 +380,4 @@ } #endif -#endif // __MINGW32__ +#endif // _WIN32 Modified: DrDivX/trunk/drffmpeg/dshow/DtsDecoder.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/DtsDecoder.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/DtsDecoder.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -29,8 +29,10 @@ #include "common.h" #include "avformat.h" -#if defined(__MINGW32__) +#if defined(_WIN32) +#include <streams.h> + #include "FilterUtil.h" #include "DtsSourceCallBack.h" #include "AudioSinkCallBack.h" @@ -179,4 +181,4 @@ }; -#endif // __MINGW32__ +#endif // _WIN32 Modified: DrDivX/trunk/drffmpeg/dshow/DtsSourceCallBack.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/DtsSourceCallBack.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/DtsSourceCallBack.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -21,7 +21,6 @@ * DShow DTS input pin. */ -#define AV_DONT_OVERRIDE_STDC #include <streams.h> #include "avcodec.h" Modified: DrDivX/trunk/drffmpeg/dshow/FilterUtil.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/FilterUtil.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/FilterUtil.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -32,7 +32,6 @@ #include <streams.h> -#define AV_DONT_OVERRIDE_STDC #include "FilterUtil.h" #include "avcodec.h" Modified: DrDivX/trunk/drffmpeg/dshow/RealVideoDecoder.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/RealVideoDecoder.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/RealVideoDecoder.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -27,8 +27,10 @@ #include "common.h" #include "avformat.h" -#if defined(__MINGW32__) +#if defined(_WIN32) +#include <streams.h> + #include "FilterUtil.h" #include "VideoSinkCallBack.h" #include "RealVideoDecoder.h" @@ -197,4 +199,4 @@ }; -#endif // __MINGW32__ +#endif // _WIN32 Modified: DrDivX/trunk/drffmpeg/dshow/RealVideoSourceCallBack.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/RealVideoSourceCallBack.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/RealVideoSourceCallBack.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -21,7 +21,6 @@ * DShow RealVideo input pin. */ -#define AV_DONT_OVERRIDE_STDC #include <streams.h> #include "avcodec.h" Modified: DrDivX/trunk/drffmpeg/dshow/SinkCallBack.h =================================================================== --- DrDivX/trunk/drffmpeg/dshow/SinkCallBack.h 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/SinkCallBack.h 2006-10-17 17:30:08 UTC (rev 658) @@ -24,9 +24,7 @@ #ifndef _AV_SINK_CALLBACK_ #define _AV_SINK_CALLBACK_ -#define AV_DONT_OVERRIDE_STDC #include "common.h" -#include <streams.h> struct AVCodecContext; class SinkCallBack; Modified: DrDivX/trunk/drffmpeg/dshow/VideoCapture.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/VideoCapture.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/VideoCapture.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -17,13 +17,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA */ -#define AV_DONT_OVERRIDE_STDC +#include <cstdio> +#include <cstring> +#include <cstdlib> #include <streams.h> #include "FilterUtil.h" -#include "VideoSinkCallBack.h" #include "VideoCapture.h" +#include "VideoSinkCallBack.h" DShowVideoCaptureGraph::DShowVideoCaptureGraph( AVFormatContext *avctx, const char *device ) :DShowCaptureGraph(avctx,device) Modified: DrDivX/trunk/drffmpeg/dshow/VideoSinkCallBack.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/VideoSinkCallBack.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/VideoSinkCallBack.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -22,7 +22,6 @@ */ //#define DISABLE_PTS -#define AV_DONT_OVERRIDE_STDC #include <streams.h> #include "VideoSinkCallBack.h" Modified: DrDivX/trunk/drffmpeg/dshow/aac_dshow.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/aac_dshow.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/aac_dshow.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -29,8 +29,10 @@ #include "common.h" #include "avformat.h" -#if defined(__MINGW32__) +#if defined(_WIN32) +#include <streams.h> + #include "FilterUtil.h" #include "AacSourceCallBack.h" #include "AudioSinkCallBack.h" @@ -154,4 +156,4 @@ }; -#endif // __MINGW32__ +#endif // _WIN32 Modified: DrDivX/trunk/drffmpeg/dshow/ac3_dshow.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/ac3_dshow.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/ac3_dshow.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -29,8 +29,10 @@ #include "common.h" #include "avformat.h" -#if defined(__MINGW32__) +#if defined(_WIN32) +#include <streams.h> + #include "FilterUtil.h" #include "Ac3SourceCallBack.h" #include "AudioSinkCallBack.h" @@ -182,4 +184,4 @@ }; -#endif // __MINGW32__ +#endif // _WIN32 Modified: DrDivX/trunk/drffmpeg/dshow/capture.cpp =================================================================== --- DrDivX/trunk/drffmpeg/dshow/capture.cpp 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/dshow/capture.cpp 2006-10-17 17:30:08 UTC (rev 658) @@ -17,16 +17,20 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02110-1301 USA */ -#include "SinkCallBack.h" -#include "FilterUtil.h" +#include <cstdio> +#include <cstring> +#include <cstdlib> #include <windows.h> +#include <streams.h> #include <dshow.h> #include <fcntl.h> +#include "FilterUtil.h" #include "capture.h" +#include "SinkCallBack.h" const DShowCaptureGraph::PhysicalCon DShowCaptureGraph::PhysConList[] = { Modified: DrDivX/trunk/drffmpeg/export/drffmpeg/common.h =================================================================== --- DrDivX/trunk/drffmpeg/export/drffmpeg/common.h 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/export/drffmpeg/common.h 2006-10-17 17:30:08 UTC (rev 658) @@ -30,10 +30,25 @@ extern "C" { #endif +#ifdef _MSC_VER +# include <float.h> +# define isnan(x) _isnan(x) +# define inline __inline +# define snprintf _snprintf +# if !defined(EMULATE_INTTYPES) +# define EMULATE_INTTYPES +# endif +#endif + #ifndef M_PI #define M_PI 3.14159265358979323846 #endif +#ifndef M_E +#define M_E 2.718281828 +#endif + + #ifdef HAVE_AV_CONFIG_H /* only include the following when compiling package */ # include "ffconfig.h" @@ -51,17 +66,35 @@ # include <math.h> #endif /* HAVE_AV_CONFIG_H */ -/* Suppress restrict if it was not defined in config.h. */ +/* Suppress restrict if it was not defined in ffconfig.h. */ #ifndef restrict # define restrict #endif -#ifdef _MSC_VER -#define ALLOCA_TABLE(t,x,s) t *x = _alloca(s*sizeof(t)) +/* DivX, Inc. : MSVC doesn't like to allocate tables with non constant sizes */ +#if __STDC_VERSION__ < 199901L +# if defined(_WIN32) +# include <malloc.h> +# else +# include <alloca.h> +# endif +# define LOCAL_VECTOR(t,x,s) t *x = alloca(s*sizeof(t)) +# define LOCAL_TABLE(t,x,s1,s2) t **x = alloca(s1*s2*sizeof(t)) #else -#define ALLOCA_TABLE(t,x,s) t x[s] +# define LOCAL_VECTOR(t,x,s) t x[s] +# define LOCAL_TABLE(t,x,s1,s2) t x[s1][s2] #endif +#ifndef never_inline +#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0) +# define never_inline __attribute((noinline)) +#elif defined(_MSC_VER) +# define never_inline __declspec(noinline) +#else +# define never_inline +#endif +#endif + #ifndef always_inline #if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0) # define always_inline __attribute__((always_inline)) inline @@ -97,10 +130,12 @@ #endif #if __STDC_VERSION__ < 199901L -# define AVRational_me( var, nume, deno ) {(var).num = (nume); (var).den = (deno);} +# define AVRational_me( var, nume, deno ) {(var).num = nume; (var).den = deno;} +# define vp56_mv_set( var, xn, yn ) {(var).x = xn; (var).y = yn;} # define strcasecmp stricmp #else -# define AVRational_me( var, nume, deno ) (var) = (AVRational){(nume), (deno)}; +# define AVRational_me( var, nume, deno ) (var) = (AVRational){nume, deno}; +# define vp56_mv_set( var, xn, yn ) (var) = (vp56_mv_t){xn, yn}; #endif #ifndef EMULATE_INTTYPES @@ -112,8 +147,8 @@ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; - typedef signed long long int64_t; - typedef unsigned long long uint64_t; + typedef signed long long int64_t; + typedef unsigned long long uint64_t; #endif /* EMULATE_INTTYPES */ #ifndef PRId64 @@ -195,7 +230,7 @@ #define uint64_t_C(c) (c ## ULL) #endif -#if defined(__MINGW32__) && !defined(BUILD_AVUTIL) && defined(BUILD_SHARED_AV) +#if defined(_WIN32) && !defined(BUILD_AVUTIL) && defined(BUILD_SHARED_AV) # define FF_IMPORT_ATTR __declspec(dllimport) #else # define FF_IMPORT_ATTR Modified: DrDivX/trunk/drffmpeg/export/drffmpeg/internal.h =================================================================== --- DrDivX/trunk/drffmpeg/export/drffmpeg/internal.h 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/export/drffmpeg/internal.h 2006-10-17 17:30:08 UTC (rev 658) @@ -217,7 +217,7 @@ /* btw, rintf() is existing on fbsd too -- alex */ static always_inline long int lrintf(float x) { -#ifdef __MINGW32__ +#ifdef _WIN32 # ifdef ARCH_X86 int32_t i; asm volatile( Modified: DrDivX/trunk/drffmpeg/export/drffmpeg/log.h =================================================================== --- DrDivX/trunk/drffmpeg/export/drffmpeg/log.h 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/export/drffmpeg/log.h 2006-10-17 17:30:08 UTC (rev 658) @@ -33,7 +33,7 @@ or AVFormatContext, which begin with an AVClass. Needed because av_log is in libavcodec and has no visibility of AVIn/OutputFormat */ - struct AVOption *option; + const struct AVOption *option; }; /* av_log API */ Modified: DrDivX/trunk/drffmpeg/export/drffmpeg/msvc/ffconfig.h =================================================================== --- DrDivX/trunk/drffmpeg/export/drffmpeg/msvc/ffconfig.h 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/export/drffmpeg/msvc/ffconfig.h 2006-10-17 17:30:08 UTC (rev 658) @@ -275,7 +275,6 @@ #define CONFIG_MPEGTS_DEMUXER 1 #define CONFIG_MXF_DEMUXER 1 #define CONFIG_NSV_DEMUXER 1 -#define CONFIG_NUT_DEMUXER 1 #define CONFIG_NUV_DEMUXER 1 #define CONFIG_OGG_DEMUXER 1 #define CONFIG_STR_DEMUXER 1 Modified: DrDivX/trunk/drffmpeg/export/drffmpeg/rational.h =================================================================== --- DrDivX/trunk/drffmpeg/export/drffmpeg/rational.h 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/export/drffmpeg/rational.h 2006-10-17 17:30:08 UTC (rev 658) @@ -43,7 +43,7 @@ static inline int av_cmp_q(AVRational a, AVRational b){ const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den; - if(tmp) return (tmp>>63)|1; + if(tmp) return (int)(tmp>>63)|1; else return 0; } Modified: DrDivX/trunk/drffmpeg/ffmpeg.c =================================================================== --- DrDivX/trunk/drffmpeg/ffmpeg.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/ffmpeg.c 2006-10-17 17:30:08 UTC (rev 658) @@ -27,7 +27,7 @@ #include "opt.h" #include "fifo.h" -#ifndef __MINGW32__ +#ifndef _WIN32 #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> @@ -198,7 +198,7 @@ static int video_channel = 0; static char *video_standard = "ntsc"; -#ifdef __MINGW32__ +#ifdef _WIN32 static char *audio_grab_format = "dshowacap"; #else static char *audio_grab_format = "audio_device"; @@ -307,7 +307,7 @@ int nb_streams; /* nb streams we are aware of */ } AVInputFile; -#ifndef __MINGW32__ +#ifndef _WIN32 /* init terminal so that we can grab keys */ static struct termios oldtty; @@ -1951,7 +1951,7 @@ } } -#ifndef __MINGW32__ +#ifndef _WIN32 if ( !using_stdin && verbose >= 0) { fprintf(stderr, "Press [q] to stop encoding\n"); url_set_interrupt_cb(decode_interrupt_cb); @@ -3464,7 +3464,7 @@ do_pass = pass; } -#if defined(__MINGW32__) || defined(CONFIG_OS2) +#if defined(_WIN32) || defined(CONFIG_OS2) static int64_t getutime(void) { return av_gettime(); @@ -4154,7 +4154,7 @@ av_free(avctx_opts); -#ifndef __MINGW32__ +#ifndef _WIN32 if (received_sigterm) { av_log(NULL, AV_LOG_ERROR, "Received signal %d: terminating.\n", Modified: DrDivX/trunk/drffmpeg/libavcodec/adpcm.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/adpcm.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/adpcm.c 2006-10-17 17:30:08 UTC (rev 658) @@ -281,9 +281,9 @@ const int stride = avctx->channels; const int version = avctx->codec->id; const int max_paths = frontier*FREEZE_INTERVAL; - TrellisPath paths[max_paths], *p; - TrellisNode node_buf[2][frontier]; - TrellisNode *nodep_buf[2][frontier]; + LOCAL_VECTOR(TrellisPath,paths,max_paths), *p; + LOCAL_TABLE(TrellisNode,node_buf,2,frontier); + LOCAL_TABLE(TrellisNode *,nodep_buf,2,frontier); TrellisNode **nodes = nodep_buf[0]; // nodes[] is always sorted by .ssd TrellisNode **nodes_next = nodep_buf[1]; int pathn = 0, froze = -1, i, j, k; @@ -467,7 +467,7 @@ /* stereo: 4 bytes (8 samples) for left, 4 bytes for right, 4 bytes left, ... */ if(avctx->trellis > 0) { - uint8_t buf[2][n*8]; + LOCAL_TABLE(uint8_t,buf,2,n*8); adpcm_compress_trellis(avctx, samples, buf[0], &c->status[0], n*8); if(avctx->channels == 2) adpcm_compress_trellis(avctx, samples+1, buf[1], &c->status[1], n*8); @@ -545,7 +545,7 @@ if(avctx->trellis > 0) { int n = avctx->block_align - 7*avctx->channels; - uint8_t buf[2][n]; + LOCAL_TABLE(uint8_t,buf,2,n); if(avctx->channels == 1) { n *= 2; adpcm_compress_trellis(avctx, samples, buf[0], &c->status[0], n); @@ -568,7 +568,7 @@ case CODEC_ID_ADPCM_YAMAHA: n = avctx->frame_size / 2; if(avctx->trellis > 0) { - uint8_t buf[2][n*2]; + LOCAL_TABLE(uint8_t,buf,2,n*2); n *= 2; if(avctx->channels == 1) { adpcm_compress_trellis(avctx, samples, buf[0], &c->status[0], n); Modified: DrDivX/trunk/drffmpeg/libavcodec/allcodecs.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/allcodecs.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/allcodecs.c 2006-10-17 17:30:08 UTC (rev 658) @@ -26,7 +26,7 @@ #include "avcodec.h" -#ifdef __MINGW32__ +#ifdef _WIN32 #include <windows.h> #include <tchar.h> #endif @@ -229,7 +229,7 @@ register_avcodec(&wmv1_dmo_decoder); register_avcodec(&wmv2_dmo_decoder); register_avcodec(&wmv3_dmo_decoder); -#ifdef __MINGW32__ +#ifdef _WIN32 { HINSTANCE hDll = LoadLibrary(_TEXT("wmvdecod.dll")); if (hDll != NULL) Modified: DrDivX/trunk/drffmpeg/libavcodec/asv1.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/asv1.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/asv1.c 2006-10-17 17:30:08 UTC (rev 658) @@ -637,7 +637,15 @@ sizeof(ASV1Context), encode_init, encode_frame, - //encode_end, + NULL, //encode_end, + NULL, + 0, +#if LIBAVCODEC_VERSION_INT < ((50<<16)+(0<<8)+0) + NULL, +#endif + NULL, + NULL, + NULL, /* DivX, Inc.*/basic_pix_fmt }; @@ -648,7 +656,15 @@ sizeof(ASV1Context), encode_init, encode_frame, - //encode_end, + NULL, //encode_end, + NULL, + 0, +#if LIBAVCODEC_VERSION_INT < ((50<<16)+(0<<8)+0) + NULL, +#endif + NULL, + NULL, + NULL, /* DivX, Inc.*/basic_pix_fmt }; Modified: DrDivX/trunk/drffmpeg/libavcodec/cabac.h =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/cabac.h 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/cabac.h 2006-10-17 17:30:08 UTC (rev 658) @@ -85,6 +85,7 @@ } static void put_cabac(CABACContext *c, uint8_t * const state, int bit){ + /* DivX, Inc. dubious warning! */ int RangeLPS= ff_h264_lps_range[2*(c->range&0xC0) + *state]; if(bit == ((*state)&1)){ @@ -565,7 +566,7 @@ return bit; } -static int __attribute((noinline)) get_cabac_noinline(CABACContext *c, uint8_t * const state){ +static int never_inline get_cabac_noinline(CABACContext *c, uint8_t * const state){ return get_cabac_inline(c,state); } Modified: DrDivX/trunk/drffmpeg/libavcodec/cavs.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/cavs.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/cavs.c 2006-10-17 17:30:08 UTC (rev 658) @@ -1498,5 +1498,9 @@ cavs_decode_end, cavs_decode_frame, CODEC_CAP_DR1 | CODEC_CAP_DELAY, - .flush= ff_cavs_flush, +#if LIBAVCODEC_VERSION_INT < ((50<<16)+(0<<8)+0) + NULL, +#endif + NULL, + /*.flush= */ff_cavs_flush, }; Modified: DrDivX/trunk/drffmpeg/libavcodec/divx.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/divx.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/divx.c 2006-10-17 17:30:08 UTC (rev 658) @@ -18,7 +18,7 @@ */ #include "ffconfig.h" -#ifdef __MINGW32__ +#ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <vfw.h> Modified: DrDivX/trunk/drffmpeg/libavcodec/dsputil.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/dsputil.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/dsputil.c 2006-10-17 17:30:08 UTC (rev 658) @@ -3862,7 +3862,7 @@ dest[0] = cm[dest[0] + ((block[0] + 4)>>3)]; } -static void just_return() { return; } +static void just_return(void*p,int a,int b) { return; } /* init static data */ void dsputil_static_init(void) Modified: DrDivX/trunk/drffmpeg/libavcodec/eval.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/eval.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/eval.c 2006-10-17 17:30:08 UTC (rev 658) @@ -37,7 +37,11 @@ #include <math.h> #ifndef NAN +# if defined(_MSC_VER) + #define NAN HUGE_VAL +# else #define NAN 0.0/0.0 +# endif #endif #ifndef M_PI @@ -59,7 +63,8 @@ static double evalExpression(Parser *p); -static int8_t si_prefixes['z' - 'E' + 1]={ +static const int8_t si_prefixes['z' - 'E' + 1]={ +#if !defined(_MSC_VER) ['y'-'E']= -24, ['z'-'E']= -21, ['a'-'E']= -18, @@ -80,6 +85,9 @@ ['E'-'E']= 18, ['Z'-'E']= 21, ['Y'-'E']= 24, +#else + 0 +#endif }; /** strtod() function extended with 'k', 'M', 'G', 'ki', 'Mi', 'Gi' and 'B' Modified: DrDivX/trunk/drffmpeg/libavcodec/fft.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/fft.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/fft.c 2006-10-17 17:30:08 UTC (rev 658) @@ -67,6 +67,7 @@ if (has_vectors) { #if defined(HAVE_MMX) +# if defined(ARCH_X86) if (has_vectors & MM_3DNOWEXT) { /* 3DNowEx for K7/K8 */ s->imdct_calc = ff_imdct_calc_3dn2; @@ -79,6 +80,7 @@ s->imdct_calc = ff_imdct_calc_sse; s->fft_calc = ff_fft_calc_sse; } +# endif #else /* HAVE_MMX */ if (has_vectors & MM_ALTIVEC) s->fft_calc = ff_fft_calc_altivec; Modified: DrDivX/trunk/drffmpeg/libavcodec/h261.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/h261.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/h261.c 2006-10-17 17:30:08 UTC (rev 658) @@ -786,7 +786,7 @@ i += 32; s->picture_number = (s->picture_number&~31) + i; - s->avctx->time_base= (AVRational){1001, 30000}; + AVRational_me(s->avctx->time_base,1001, 30000); s->current_picture.pts= s->picture_number; Modified: DrDivX/trunk/drffmpeg/libavcodec/imgconvert.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/imgconvert.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/imgconvert.c 2006-10-17 17:30:08 UTC (rev 658) @@ -3026,7 +3026,7 @@ const uint8_t *lum, int size) { -#ifndef HAVE_MMX +#if !defined(ARCH_X86) || !defined(HAVE_MMX) uint8_t *cm = cropTbl + MAX_NEG_CROP; int sum; @@ -3069,7 +3069,7 @@ static void deinterlace_line_inplace(uint8_t *lum_m4, uint8_t *lum_m3, uint8_t *lum_m2, uint8_t *lum_m1, uint8_t *lum, int size) { -#ifndef HAVE_MMX +#if !defined(ARCH_X86) || !defined(HAVE_MMX) uint8_t *cm = cropTbl + MAX_NEG_CROP; int sum; Modified: DrDivX/trunk/drffmpeg/libavcodec/imgresample.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/imgresample.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/imgresample.c 2006-10-17 17:30:08 UTC (rev 658) @@ -146,7 +146,7 @@ } } -#ifdef HAVE_MMX +#if defined(ARCH_X86) #include "i386/mmx.h" @@ -463,7 +463,7 @@ } else { n = dst_width; } -#ifdef HAVE_MMX +#if defined(ARCH_X86) && defined(HAVE_MMX) if ((mm_flags & MM_MMX) && NB_TAPS == 4) h_resample_fast4_mmx(dst, n, src, src_width, src_start, src_incr, filters); @@ -520,7 +520,7 @@ } /* apply vertical filter */ phase_y = get_phase(src_y); -#ifdef HAVE_MMX +#if defined(ARCH_X86) && defined(HAVE_MMX) /* desactivated MMX because loss of precision */ if ((mm_flags & MM_MMX) && NB_TAPS == 4 && 0) v_resample4_mmx(output, owidth, Modified: DrDivX/trunk/drffmpeg/libavcodec/libavcodec.proj =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/libavcodec.proj 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/libavcodec.proj 2006-10-17 17:30:08 UTC (rev 658) @@ -53,6 +53,7 @@ DEFINE HAVE_BUILTIN_VECTOR DEFINE(COMPILER_GCC) "_FILE_OFFSET_BITS=64" DEFINE(COMPILER_GCC) _LARGEFILE_SOURCE + DEFINE(COMPILER_GCC) _ISOC9X_SOURCE SOURCE(TARGET_WIN32) ../dshow/wmvdmo.c SOURCE(TARGET_WIN32) ../dshow/AacSourceCallBack.cpp @@ -102,6 +103,7 @@ // SOURCE dct-test.c SOURCE divx.c SOURCE dpcm.c + SOURCE dsicinav.c SOURCE dsputil.c SOURCE dv.c SOURCE dvbsub.c @@ -195,6 +197,9 @@ SOURCE sonic.c SOURCE svq1.c // SOURCE svq3.c + SOURCE targa.c + SOURCE tiff.c + SOURCE tiertexseqv.c SOURCE truemotion1.c SOURCE truemotion2.c SOURCE truespeech.c Modified: DrDivX/trunk/drffmpeg/libavcodec/mathops.h =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/mathops.h 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/mathops.h 2006-10-17 17:30:08 UTC (rev 658) @@ -47,7 +47,7 @@ //# define MULH(a,b) (((int64_t)(a) * (int64_t)(b))>>32) static always_inline int MULH(int a, int b){ - return ((int64_t)(a) * (int64_t)(b))>>32; + return (int)(((int64_t)(a) * (int64_t)(b))>>32); } #endif Modified: DrDivX/trunk/drffmpeg/libavcodec/mp3surround.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/mp3surround.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/mp3surround.c 2006-10-17 17:30:08 UTC (rev 658) @@ -19,7 +19,7 @@ #include "avcodec.h" #include "mp3sencoder.h" -#ifdef __MINGW32__ +#ifdef _WIN32 #include <windows.h> #include <tchar.h> #endif Modified: DrDivX/trunk/drffmpeg/libavcodec/mpegaudiodec.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/mpegaudiodec.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/mpegaudiodec.c 2006-10-17 17:30:08 UTC (rev 658) @@ -403,9 +403,10 @@ for(i=0; i<512*16; i++){ int exponent= (i>>4); double f= pow(i&15, 4.0 / 3.0) * pow(2, (exponent-400)*0.25 + FRAC_BITS + 5); - expval_table[exponent][i&15]= llrint(f); + /* DivX, Inc. replace llrint with lrintf */ + expval_table[exponent][i&15]= lrintf(f); if((i&15)==1) - exp_table[exponent]= llrint(f); + exp_table[exponent]= lrintf(f); } for(i=0;i<7;i++) { Modified: DrDivX/trunk/drffmpeg/libavcodec/ratecontrol.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/ratecontrol.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/ratecontrol.c 2006-10-17 17:30:08 UTC (rev 658) @@ -529,14 +529,10 @@ const float border_masking = s->avctx->border_masking; float bits_sum= 0.0; float cplx_sum= 0.0; -#if __STDC_VERSION__ < 199901L - float *cplx_tab=alloca(sizeof(float)*s->mb_num); - float *bits_tab=alloca(sizeof(float)*s->mb_num); -#else - float cplx_tab[s->mb_num]; - float bits_tab[s->mb_num]; -#endif - const int qmin= s->avctx->mb_lmin; + LOCAL_VECTOR(float,cplx_tab,s->mb_num); + LOCAL_VECTOR(float,bits_tab,s->mb_num); + + const int qmin= s->avctx->mb_lmin; const int qmax= s->avctx->mb_lmax; Picture * const pic= &s->current_picture; const int mb_width = s->mb_width; Modified: DrDivX/trunk/drffmpeg/libavcodec/rtjpeg.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/rtjpeg.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/rtjpeg.c 2006-10-17 17:30:08 UTC (rev 658) @@ -101,8 +101,8 @@ GetBitContext gb; int w = c->w / 16, h = c->h / 16; int x, y; - void *y1 = f->data[0], *y2 = f->data[0] + 8 * f->linesize[0]; - void *u = f->data[1], *v = f->data[2]; + uint8_t *y1 = f->data[0], *y2 = f->data[0] + 8 * f->linesize[0]; + uint8_t *u = f->data[1], *v = f->data[2]; init_get_bits(&gb, buf, buf_size * 8); for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { Modified: DrDivX/trunk/drffmpeg/libavcodec/rv10.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/rv10.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/rv10.c 2006-10-17 17:30:08 UTC (rev 658) @@ -537,6 +537,14 @@ s->h263_long_vectors= ((uint8_t*)avctx->extradata)[3] & 1; avctx->sub_id= BE_32((uint8_t*)avctx->extradata + 4); + if (avctx->sub_id >= 0x20100000 && avctx->sub_id <= 0x2019ffff) + s->low_delay=1; + else if (avctx->sub_id >= 0x20200002 && avctx->sub_id <= 0x202fffff) + { + s->low_delay=0; + s->avctx->has_b_frames=1; + } + else switch(avctx->sub_id){ case 0x10000000: s->rv10_version= 0; @@ -559,13 +567,11 @@ /*case 0x20100001: case 0x20101001: case 0x20103001:*/ - case 0x20100000 ... 0x2019ffff: s->low_delay=1; break; /*case 0x20200002: case 0x20201002: case 0x20203002:*/ - case 0x20200002 ... 0x202fffff: case 0x30202002: case 0x30203002: s->low_delay=0; Modified: DrDivX/trunk/drffmpeg/libavcodec/utils.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/utils.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/utils.c 2006-10-17 17:30:08 UTC (rev 658) @@ -34,7 +34,7 @@ #include <stdarg.h> #include <limits.h> #include <float.h> -#ifdef __MINGW32__ +#ifdef _WIN32 #include <fcntl.h> #endif @@ -754,12 +754,12 @@ av_opt_set_defaults(s); s->rc_eq= "tex^qComp"; - s->time_base= (AVRational){0,1}; + AVRational_me(s->time_base,0,1); s->get_buffer= avcodec_default_get_buffer; s->release_buffer= avcodec_default_release_buffer; s->get_format= avcodec_default_get_format; s->execute= avcodec_default_execute; - s->sample_aspect_ratio= (AVRational){0,1}; + AVRational_me(s->sample_aspect_ratio,0,1); s->pix_fmt= PIX_FMT_NONE; s->sample_fmt= SAMPLE_FMT_S16; // FIXME: set to NONE @@ -1325,7 +1325,7 @@ * and opened file name in **filename. */ int av_tempfile(char *prefix, char **filename) { int fd=-1; -#ifdef __MINGW32__ +#ifdef _WIN32 *filename = tempnam(".", prefix); #else size_t len = strlen(prefix) + 12; /* room for "/tmp/" and "XXXXXX\0" */ @@ -1336,7 +1336,7 @@ av_log(NULL, AV_LOG_ERROR, "ff_tempfile: Cannot allocate file name\n"); return -1; } -#ifdef __MINGW32__ +#ifdef _WIN32 fd = open(*filename, _O_RDWR | _O_BINARY | _O_CREAT, 0444); #else snprintf(*filename, len, "/tmp/%sXXXXXX", prefix); Deleted: DrDivX/trunk/drffmpeg/libavcodec/vc9.c =================================================================== --- DrDivX/trunk/drffmpeg/libavcodec/vc9.c 2006-10-17 12:23:03 UTC (rev 657) +++ DrDivX/trunk/drffmpeg/libavcodec/vc9.c 2006-10-17 17:30:08 UTC (rev 658) @@ -1,2677 +0,0 @@ -/* - * VC-9 and WMV3 decoder - * Copyright (c) 2005 Anonymous - * Copyright (c) 2005 Alex Beregszaszi - * Copyright (c) 2005 Michael Niedermayer - * - * This library 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 of the License, or (at your option) any later version. - * - * This library 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 this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/** - * @file vc9.c - * VC-9 and WMV3 decoder - * - * TODO: most AP stuff, optimize, most of MB layer, transform, filtering and motion compensation, etc - * TODO: use MPV_ !! - */ -#include "common.h" -#include "dsputil.h" -#include "avcodec.h" -#include "mpegvideo.h" -#include "vc9data.h" - -#undef NDEBUG -#include <assert.h> - -extern const uint32_t ff_table0_dc_lum[120][2], ff_table1_dc_lum[120][2]; -extern const uint32_t ff_table0_dc_chroma[120][2], ff_table1_dc_chroma[120][2]; -extern VLC ff_msmp4_dc_luma_vlc[2], ff_msmp4_dc_chroma_vlc[2]; -#define MB_INTRA_VLC_BITS 9 -extern VLC ff_msmp4_mb_i_vlc; -#define DC_VLC_BITS 9 -static const uint16_t table_mb_intra[64][2]; - -/* Some inhibiting stuff */ -#define HAS_ADVANCED_PROFILE 0 -#define TRACE 1 - -#if TRACE -# define INIT_VLC(vlc, nb_bits, nb_codes, bits, bits_wrap, bits_size, \ - codes, codes_wrap, codes_size, use_static) \ - if (init_vlc(vlc, nb_bits, nb_codes, bits, bits_wrap, bits_size, \ - codes, codes_wrap, codes_size, use_static) < 0) \ - { \ - av_log(v->s.avctx, AV_LOG_ERROR, "Error for " # vlc " (%i)\n", i); \ - return -1; \ - } -#else -# define INIT_VLC(vlc, nb_bits, nb_codes, bits, bits_wrap, bits_size, \ - codes, codes_wrap, codes_size, use_static) \ - init_vlc(vlc, nb_bits, nb_codes, bits, bits_wrap, bits_size, \ - codes, codes_wrap, codes_size, use_static) -#endif - -/** Available Profiles */ -//@{ -#define PROFILE_SIMPLE 0 -#define PROFILE_MAIN 1 -#define PROFILE_COMPLEX 2 ///< TODO: WMV9 specific -#define PROFILE_ADVANCED 3 -//@} - -/** Sequence quantizer mode */ -//@{ -#define QUANT_FRAME_IMPLICIT 0 ///< Implicitly specified at frame level -#define QUANT_FRAME_EXPLICIT 1 ///< Explicitly specified at frame level -#define QUANT_NON_UNIFORM 2 ///< Non-uniform quant used for all frames -#define QUANT_UNIFORM 3 ///< Uniform quant used for all frames -//@} - -/** Where quant can be changed */ -//@{ -#define DQPROFILE_FOUR_EDGES 0 -#define DQPROFILE_DOUBLE_EDGES 1 -#define DQPROFILE_SINGLE_EDGE 2 -#define DQPROFILE_ALL_MBS 3 -//@} - -/** @name Where quant can be changed - */ -//@{ -#define DQPROFILE_FOUR_EDGES 0 -#define DQSINGLE_BEDGE_LEFT 0 -#define DQSINGLE_BEDGE_TOP 1 -#define DQSINGLE_BEDGE_RIGHT 2 -#define DQSINGLE_BEDGE_BOTTOM 3 -//@} - -/** Which pair of edges is quantized with ALTPQUANT */ -//@{ -#define DQDOUBLE_BEDGE_TOPLEFT 0 -#define DQDOUBLE_BEDGE_TOPRIGHT 1 -#define DQDOUBLE_BEDGE_BOTTOMRIGHT 2 -#define DQDOUBLE_BEDGE_BOTTOMLEFT 3 -//@} - -/** MV modes for P frames */ -//@{ -#define MV_PMODE_1MV_HPEL_BILIN 0 -#define MV_PMODE_1MV 1 -#define MV_PMODE_1MV_HPEL 2 -#define MV_PMODE_MIXED_MV 3 -#define MV_PMODE_INTENSITY_COMP 4 -//@} - -/** @name MV types for B frames */ -//@{ -#define BMV_TYPE_BACKWARD 0 -#define BMV_TYPE_BACKWARD 0 -#define BMV_TYPE_FORWARD 1 -#define BMV_TYPE_INTERPOLATED 3 -//@} - -/** MV P mode - the 5th element is only used for mode 1 */ -static const uint8_t mv_pmode_table[2][5] = { - { MV_PMODE_1MV_HPEL_BILIN, MV_PMODE_1MV, MV_PMODE_1MV_HPEL, MV_PMODE_MIXED_MV, MV_PMODE_INTENSITY_COMP }, - { MV_PMODE_1MV, MV_PMODE_MIXED_MV, MV_PMODE_1MV_HPEL, MV_PMODE_1MV_HPEL_BILIN, MV_PMODE_INTENSITY_COMP } -}; - -/** One more frame type */ -#define BI_TYPE 7 - -static const int fps_nr[5] = { 24, 25, 30, 50, 60 }, - fps_dr[2] = { 1000, 1001 }; -static const uint8_t pquant_table[3][32] = { - { /* Implicit quantizer */ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 29, 31 - }, - { /* Explicit quantizer, pquantizer uniform */ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 - }, - { /* Explicit quantizer, pquantizer non-uniform */ - 0, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 31 - } -}; - -/** @name VC-9 VLC tables and defines - * @todo TODO move this into the context - */ -//@{ -#define VC9_BFRACTION_VLC_BITS 7 -static VLC vc9_bfraction_vlc; -#define VC9_IMODE_VLC_BITS 4 -static VLC vc9_imode_vlc; -#define VC9_NORM2_VLC_BITS 3 -static VLC vc9_norm2_vlc; -#define VC9_NORM6_VLC_BITS 9 -static VLC vc9_norm6_vlc; -/* Could be optimized, one table only needs 8 bits */ -#define VC9_TTMB_VLC_BITS 9 //12 -static VLC vc9_ttmb_vlc[3]; -#define VC9_MV_DIFF_VLC_BITS 9 //15 -static VLC vc9_mv_diff_vlc[4]; -#define VC9_CBPCY_P_VLC_BITS 9 //14 -static VLC vc9_cbpcy_p_vlc[4]; -#define VC9_4MV_BLOCK_PATTERN_VLC_BITS 6 -static VLC vc9_4mv_block_pattern_vlc[4]; -#define VC9_TTBLK_VLC_BITS 5 -static VLC vc9_ttblk_vlc[3]; -#define VC9_SUBBLKPAT_VLC_BITS 6 -static VLC vc9_subblkpat_vlc[3]; -//@} - -/** Bitplane struct - * We mainly need data and is_raw, so this struct could be avoided - * to save a level of indirection; feel free to modify - * @fixme For now, stride=width - * @warning Data are bits, either 1 or 0 - */ -typedef struct BitPlane { - uint8_t *data; ///< Data buffer - int width; ///< Width of the buffer - int stride; ///< Stride of the buffer - int height; ///< Plane height - uint8_t is_raw; ///< Bit values must be read at MB level -} BitPlane; - -/** The VC9 Context - * @fixme Change size wherever another size is more efficient - * Many members are only used for Advanced Profile - */ -typedef struct VC9Context{ - MpegEncContext s; - - /** Simple/Main Profile sequence header */ - //@{ - int res_sm; ///< reserved, 2b - int res_x8; ///< reserved - int multires; ///< frame-level RESPIC syntax element present - int res_fasttx; ///< reserved, always 1 - int res_transtab; ///< reserved, always 0 - int rangered; ///< RANGEREDFRM (range reduction) syntax element present - ///< at frame level - int res_rtm_flag; ///< reserved, set to 1 - int reserved; ///< reserved - //@} - -#if HAS_ADVANCED_PROFILE - /** Advanced Profile */ - //@{ - int level; ///< 3bits, for Advanced/Simple Profile, provided by TS layer - int chromaformat; ///< 2bits, 2=4:2:0, only defined - int postprocflag; ///< Per-frame processing suggestion flag present - int broadcast; ///< TFF/RFF present - int interlace; ///< Progressive/interlaced (RPTFTM syntax element) - int tfcntrflag; ///< TFCNTR present - int panscanflag; ///< NUMPANSCANWIN, TOPLEFT{X,Y}, BOTRIGHT{X,Y} present - int extended_dmv; ///< Additional extended dmv range at P/B frame-level - int color_prim; ///< 8bits, chroma coordinates of the color primaries - int transfer_char; ///< 8bits, Opto-electronic transfer characteristics - int matrix_coef; ///< 8bits, Color primaries->YCbCr transform matrix - int hrd_param_flag; ///< Presence of Hypothetical Reference - ///< Decoder parameters - //@} -#endif - - - /** Sequence header data for all Profiles - * TODO: choose between ints, uint8_ts and monobit flags - */ - //@{ - int profile; ///< 2bits, Profile - int frmrtq_postproc; ///< 3bits, - int bitrtq_postproc; ///< 5bits, quantized framerate-based postprocessing strength - int fastuvmc; ///< Rounding of qpel vector to hpel ? (not in Simple) - int extended_mv; ///< Ext MV in P/B (not in Simple) - int dquant; ///< How qscale varies with MBs, 2bits (not in Simple) - int vstransform; ///< variable-size [48]x[48] transform type + info - int overlap; ///< overlapped transforms in use - int quantizer_mode; ///< 2bits, quantizer mode used for sequence, see QUANT_* - int finterpflag; ///< INTERPFRM present - //@} - - /** Frame decoding info for all profiles */ - //@{ - uint8_t mv_mode; ///< MV coding monde - uint8_t mv_mode2; ///< Secondary MV coding mode (B frames) - int k_x; ///< Number of bits for MVs (depends on MV range) - int k_y; ///< Number of bits for MVs (depends on MV range) - uint8_t pq, altpq; ///< Current/alternate frame quantizer scale - /** pquant parameters */ - //@{ - uint8_t dquantfrm; - uint8_t dqprofile; - uint8_t dqsbedge; - uint8_t dqbilevel; - //@} - /** AC coding set indexes - * @see 8.1.1.10, p(1)10 - */ - //@{ - int c_ac_table_index; ///< Chroma index from ACFRM element - int y_ac_table_index; ///< Luma index from AC2FRM element - //@} - int ttfrm; ///< Transform type info present at frame level - uint8_t ttmbf; ///< Transform type flag - int ttmb; ///< Transform type - uint8_t ttblk4x4; ///< Value of ttblk which indicates a 4x4 transform - /** Luma compensation parameters */ - //@{ - uint8_t lumscale; - uint8_t lumshift; - //@} - int16_t bfraction; ///< Relative position % anchors=> how to scale MVs - uint8_t halfpq; ///< Uniform quant over image and qp+.5 - uint8_t respic; ///< Frame-level flag for resized images - int buffer_fullness; ///< HRD info - /** Ranges: - * -# 0 -> [-64n 63.f] x [-32, 31.f] - * -# 1 -> [-128, 127.f] x [-64, 63.f] - * -# 2 -> [-512, 511.f] x [-128, 127.f] - * -# 3 -> [-1024, 1023.f] x [-256, 255.f] - */ - uint8_t mvrange; - uint8_t pquantizer; ///< Uniform (over sequence) quantizer in use - uint8_t *previous_line_cbpcy; ///< To use for predicted CBPCY - VLC *cbpcy_vlc; ///< CBPCY VLC table - int tt_index; ///< Index for Transform Type tables - BitPlane mv_type_mb_plane; ///< bitplane for mv_type == (4MV) - BitPlane skip_mb_plane; ///< bitplane for skipped MBs - BitPlane direct_mb_plane; ///< bitplane for "direct" MBs - - /** Frame decoding info for S/M profiles only */ - //@{ - uint8_t rangeredfrm; ///< out_sample = CLIP((in_sample-128)*2+128) - uint8_t interpfrm; - //@} - -#if HAS_ADVANCED_PROFILE - /** Frame decoding info for Advanced profile */ - //@{ - uint8_t fcm; ///< 0->Progressive, 2->Frame-Interlace, 3->Field-Interlace - uint8_t numpanscanwin; - uint8_t tfcntr; - uint8_t rptfrm, tff, rff; - uint16_t topleftx; - uint16_t toplefty; - uint16_t bottomrightx; - uint16_t bottomrighty; - uint8_t uvsamp; - uint8_t postproc; - int hrd_num_leaky_buckets; - uint8_t bit_rate_exponent; - uint8_t buffer_size_exponent; - BitPlane ac_pred_plane; ///< AC prediction flags bitplane - BitPlane over_flags_plane; ///< Overflags bitplane - uint8_t condover; - uint16_t *hrd_rate, *hrd_buffer; - uint8_t *hrd_fullness; - uint8_t range_mapy_flag; - uint8_t range_mapuv_flag; - uint8_... [truncated message content] |