/******************** 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.