• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 如何編譯xvidcore-0.9.1(轉帖)

    發表于:2007-07-04來源:作者:點擊數: 標簽:
    自己想寫的,既然在網上找到了,也就copy 過來了。 我是用VC6編譯的asm文件,然后用.net 2003編譯的.c文件。 如何編譯xvidcore-0.9.1 一、把如下三個文件由UNIX格式轉換成DOS格式 1、...\xvidcore-0.9.1\examples\Makefile 2、...\xvidcore-0.9.1\build\gener
    自己想寫的,既然在網上找到了,也就copy 過來了。
    我是用VC6編譯的asm文件,然后用.net 2003編譯的.c文件。

    如何編譯xvidcore-0.9.1
    一、把如下三個文件由UNIX格式轉換成DOS格式
    1、...\xvidcore-0.9.1\examples\Makefile
    2、...\xvidcore-0.9.1\build\generic\Makefile
    3、...\xvidcore-0.9.1\build\win32\libxvidcore.dsp

    轉換方法一:
    1、用寫字板打開其中一個文件(比如,...\xvidcore-0.9.1\examples\Makefile),“文件”-〉“另存為”
    2、把“保存類型”改為“文本文檔 - MS-DOS格式”,文件名自?。ū热?a)
    3、關閉寫字板,刪除文件...\xvidcore-0.9.1\examples\Makefile,把剛才保存的a.txt改名為Makefile

    轉換方法二:
    1、用UltraEdit打開其中一個文件(比如,...\xvidcore-0.9.1\examples\Makefile),打開時會有對話框提示要不要轉換成DOS格式,
    選“是”
    2、用UltraEdit新建一個文件,把剛才打開的文件全部復制到新建的文件中,把新建的文件保存(文件名自取,如 a )
    3、刪除文件...\xvidcore-0.9.1\examples\Makefile,把剛才保存的a.txt改名為Makefile

    二、下載新的nasm.exe
    鏈接:www.sf.net/projects/nasm
    或者直接下載這個版本(2003/3/12最新版0.98.36): http://easynews.dl.sourceforge.net/sourceforge/nasm/nasm-0.98.36-win32.zip

    下載解壓后文件名為nasmw.exe,更名為nasm.exe,保存到VC的bin目錄下(比如我的VC 6.0裝在D:\Program Files\目錄下,
    那就放到這里:D:\Program Files\Microsoft Visual Studio\VC98\Bin\


    好,到此除了xvid_bench工程外,其余四個(xvid_encraw、xvid_decraw、xvid_stat、odivx_enc_dec)都能編譯通過

    但還是有一個警告:
    D:\xvidcore-0.9.1\src\bitstream\mbcoding.c(194): warning C4146: unary minus operator applied to unsigned type, resultstill unsigned
    意思是一元的“-” 操作符用在無符號整型數上,結果仍然是無符號整型數;我不知道怎么能搞定它,是不是把警告級別調整一下就行了?


    三、如何編譯xvid_bench工程
    1、點擊“Project”->“Settings”
    2、在彈出的對話框左邊,選擇xvid_bench工程
    3、在C/C++選項卡里,找到Preprocessor definitions一欄,添加兩個宏定義:ARCH_IS_32BIT,ARCH_IS_IA32

    恭喜你,大功告成!

    附:
    《How to Compile XviD with Microsoft Visual C++ 6.0》
    Written by David Carroll
    Last updated: January 1, 2003

    OK,you've got your copy of Microsoft Visual C++ 6.0. You should be able tojust download the source code, click on the project file, and a fewsecond later, you'll have the Xvid Binary. Right? Well, unfortunately,it's not that easy. However, it's not that hard either.

    I. Downloading Necessary Files

    Xvid depends on a number of libraries and programs that do not come standard with Microsoft Visual C++ 6.0.

    You need:

    1) Service Pack 5 for Visual Studio 6 - http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp5/default.asp
    Idon't believe you actually need Service Pack 5 to compile Xvid However,you should download it to get all the latest bug fixes and runtimelibraries. Trust me, it'll make your life easier later when you try tocompile other programs. You can download the service pack or order iton CD from the Microsoft Developers Network (MSDN) by clicking the linkabove.


    2) NASM - the famous Netwide Assembler - http://sourceforge.net/projects/nasm/
    Xvid uses NASM to "compile" the code written in assembly language (the *.asm files). Download the Win32 binary.


    3) DirectX 8.1b SDK - http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.asp
    Tobuild the DirectShow filter, you need the DirectX SDK (SoftwareDevelopment Kit). This SDK is not available by itself on CD, but theMicrosoft Platform SDK CD includes the DirectX SDK (along with severalother SDK's like the Windows Core SDK, Media Player SDK, etc.). You canorder the Microsoft Platform SDK CD from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

    II. Configuring the Compiler

    1) Installing Service Pack 5

    TheService Pack is easy to install since it comes with an installer. Theinstaller's filename is "setupsp5.exe". Just find the file anddouble-click it.

    2) Installing and Configuring NASM

    a) Unzip the file to an easy to remember directory of your choosing (i.e., "C:\DEV\NASM")
    b)Xvid expects the filename to be "nasm.exe" (probably because all otherversions except the Win32 version has that name). For some reason, theWin32 version NASM has a filename of "nasmw.exe." I recommend making acopy of "nasmw.exe" and renaming it "nasm.exe."
    c) Load up Microsoft Visual C++.


    i) Click on the "Tools" menu and select "Options."
    ii) Click on the "Directories" tab.
    iii) Select "Executable Files" from the "Show Directories For" dropdown box.
    iv) Add the path to NASM (e.g., "C:\DEV\NASM")

    3) Installing and Configuring the DirectX SDK

    The DirectX SDK comes with an installer. I recommend installing to a directory like C:\DEV\DXSDK.

    To configure the DirectX SDK:


    a) Load up Microsoft Visual C++.
    b) Click on the "Tools" menu and select "Options."
    c) Click on the "Directories" tab.
    d) Select "Include Files" from the "Show Directories For" dropdown box.
    e)Add the following entry: "\SAMPLES\MULTIMEDIA\DIRECTSHOW\BASECLASSES" where you replace with the actual path to the DirectX SDK(i.e., "C:\DEV\DXSDK").
    f) Use the little up arrow icon to move the entries to the top of the list.

    III. Compiling XVID

    Nowyou can download the source code, click on the workspace file, and afew second later, you'll have the Xvid Binary. Just make sure you buildthe xvidcore first.

    IV. Installing XVID

    For Windows users, there are really only three files you have to be concerned with:

    1)xvid.dll and xvid.inf - both of these files are in the "\vfw\bin\" directory. The "xvid.dll" file is theXvid Video for Windows codec. This file is necessary if you wish toencode any videos using a Video for Windows compliant program (i.e.,almost every video editor out there). In theory, you should be able toplay back Xvid files in the Windows Media Player using this file aswell although this functionality appears to be broken at this point.Therefore, if you wish to play back files in a media player, installthe "xvid.ax" file (see below). The "xvid.inf" file is the setupinformation file. Basically, this file tells Windows how to install"xvid.dll".

    To install the Xvid Video for Windows codec (aka xvid.dll)


    a) Simply right-click the "xvid.inf" and select "Install" from the context menu.

    That'sit, you're done. To verify that the file has been installed correctly,go to the Control Panel and select "Multimedia", then click on the"Devices" tab and finally see if "XVID" is listed under the "VideoCompression Codecs" section. If you wish to uninstall the Xvid codec,select "XVID MPEG-4 CODEC" from the "Add/Remove Program" list in theControl Panel.

    2) xvid.ax -This file is in the "\dshow\bin\" directory. The "xvid.ax" file is the XvidDirectShow filter. Microsoft has decreed that DirectShow shall replaceVideo for Windows, so in theory you won't need "xvid.dll". However,this isn't true. Instead, the DirectShow filter is used mostly forplayback by newer media players. Most video programs still depend onthe Video for Windows codec for encoding.

    To install the Xvid DirectShow filter (aka xvid.ax)


    a)First copy the "xvid.ax" file to a safe place (i.e., "C:\ProgramFiles\xvid"). The Video for Windows codec is automatically copied tothe Windows system directory when you install it. The DirectShow filteris not. Therefore, if you delete the source code directory, you loseyour DirectShow filter.
    b) Once you have copied the "xvid.ax" fileto a safe place, go to the Start Menu and select "Run." Type "="" to="">\system\regsvr32 \xvid.ax" (i.e,C:\windows\system\regsvr32 C:\Program Files\xvid.ax).

    That's it,you're done. There really is no easy way to verify that the DirectShowfilter was properly installed other than to play a Xvid encoded video.To uninstall the DirectShow filter, go to the Start Menu and select"Run." Type "="" to="">\system\regsvr32 /u \xvid.ax"

    V. Troubleshooting FAQ

    Q. Why do I get the following error message:

    Assembling ..\..\src\utils\x86_asm\mem_transfer_mmx.asm
    Bad command or file name

    A. You did not correctly install NASM.

    Q. What causes this error: "CXvidDecoder.obj : error LNK2001: unresolved external symbol _MEDIASUBTYPE_IYUV"?

    A.This is caused by an outdated strmbase.lib. You need to build a newone. The path to the project file is \samples\Multimedia\DirectShow\BaseClasses\baseclasses.dsw.After you build the library, I recommend you copy the strmbase.lib fileto \lib.

    Q. I have ffdshow, do I need to install the XviD DirectShow filter?

    A. No, not really.

    Q. When trying to open a workspace file (.dsw), I get an "empty" workspace (i.e., there are no source files listed) and/or
    When trying to open a project file (.dsp), I get a"This makefile was not generated by Developer Studio" error.

    A.Often, this can be caused by having UNIX line breaks (LF) in the .dswand .dsp files, as opposed to Windows line breaks (CR\LF). It isinteresting to note that .dsw and .dsp files are just text files; youcan open them up in any text editor. If you open the .dsw and .dspfiles in a text editor that can't handle UNIX line breaks (namelyNotepad) you will probably see big, black squares at the end of lines.You can "fix" this error by following this procedure.

    a) Do NOT let Microsoft Visual C++ attempt to fix the problem! Press "No" when prompted.
    b)Open the .dsw and .dsp files in a text editor that understands UNIXline breaks. WordPad is one and it is available with most copies ofWindows.
    c) Once open, simply re-save the file (In WordPad, makesure you set the save as type to "Text Document"). All UNIX line breaksshould be converted to Windows line breaks.

    Also, I have noticedthat some "archive" utilities like Winzip will perform the UNIX ->Windows line break conversion automatically so I recommend you usethose utilities. At the time of writing, archive utilities that don'tperform this conversion include PowerArchiver and WinRAR.

    Q. I get lots of error messages similar to the following:

    ..\..\src\quant\x86_asm\quantize_mmx.asm:429: parser: instruction expected
    ..\..\src\quant\x86_asm\quantize_mmx.asm:430: symbol `movdqa' redefined

    A. You are using an old version of NASM, download a newer version from http://sourceforge.net/projects/nasm/


    by
    邊城浪子(lmtw 論壇

    測試:
     
    編碼是
    xvid_encraw -w 176 -h 144 -t 0 -i foreman.qcif   -o test.m4v(xvidcore-1.1.0-beta2)
    解碼是
    xvid_decraw  -t 1 -i test.m4v -d 1


    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>