Port xvid1.2.1 to Windows Mobile Platform

Source: Internet
Author: User

/******************** This article can be forwarded, but the forwarder must retain the author's signature permission
* *** Li Hao
* *** MSN: lihao_nx@hotmail.com
****
* Email: lihaoyxj@gmail.com
* *** Source: lihaoyxj.cublog.cn
* *** From: http://blog.csdn.net/lihao_ningxia
*****************/
This morning, xvid1.2.1 was finally transplanted to the Windows Mobile platform. Although it has not been tested, this part of the porting method was shared first.
Download xvid1.2.1 is needless to say. One of them is a Win32 project, and the other is a general-purpose Linux-based project.
A Windows Mobile lib empty project must be created.
Add all files except the plugins folder to the project as follows:


Then, change the code in portab. H to the following:
# If defined (arch_is_32bit)
# Define cache_line 64
# Define ptr_t uint32_t
# Define intptr_t int32_t
# DEFINE _ intptr_t_defined
// This annotation is necessary
// # If defined (_ msc_ver) & _ msc_ver> = 1300 &&! Defined (_ intel_compiler)
// # Include <stdarg. h>
// # Else
# Define uintptr_t uint32_t
// # Endif
# Elif defined (arch_is_64bit)
# Define cache_line 64
# Define ptr_t uint64_t
# Define intptr_t int64_t
# DEFINE _ intptr_t_defined
# If defined (_ msc_ver) & _ msc_ver> = 1300 &&! Defined (_ intel_compiler)
# Include <stdarg. h>
# Else
# Define uintptr_t uint64_t
# Endif
# Else
# Error you are trying to compile Xvid without defining address bus size.
# Endif

Then, change the pre-compilation condition to the following:
Ndebug
_ Win32_wce = $ (cever)
Under_ce
$ (Platformdefines)
WinCE
_ Lib
$ (Archfam)
$ (_ Archfam _)
_ Unicode
Unicode
Arch_is_generic // Add
Arch_is_32bit // Add

Then we can compile it like this. If the Assembly cannot be used during the process, we should compile and comment out the compilation first. After all, the compilation of X86 and arm is different. I insist that I should not eat a fish, but learn to fish. I hope everyone can do well. As to whether the compiled library can be used, correct use should be done after testing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.