Commit Graph

16 Commits

Author SHA1 Message Date
James Zern
446d1ee624 avoid redefining WIN32_LEAN_AND_MEAN
fixes redef errors when the macro is supplied elsewhere, e.g., the
command line

Change-Id: Ic15726817a43e30595d50562ef1f077060c193cf
2016-11-22 15:15:53 -08:00
Johann
d55724fae9 Remove armv6 target
Change-Id: I1fa81cc9cabf362a185fc3a53f1e58de533a41e5
2016-08-04 12:55:06 -07:00
clang-format
580f14b68b vpx_ports: apply clang-format
Change-Id: Ice343335a40238fd21490bce0ce2972bdcb87055
2016-07-25 14:29:06 -07:00
Johann
6eec73a747 Remove asm offset dependencies
The obj_int_extract code is no longer worth maintaining. It creates
significant issues when adapting for different build systems and no
longer offers as significant of a performance benefit due to
improvements in intrinsics.

Source files will remain until the various third-party builds are updated.

The neon fast quantizer has been moved to intrinsics. The armv6 version
has been removed because so few remaining targets require it.

Compilers and processors have improved significantly since the
pack_tokens code was written. The assembly is no longer faster than the
C code.

pack_tokens were the only optimizations for the armv5te targets so the targets
will be removed after the test infrastructure has been updated.

BUG=710

Change-Id: Ic785b167cd9f95eeff31c7c76b7b736c07fb30eb
2014-11-06 16:00:01 -08:00
Johann
8dcdacc597 Restructure ARM assumptions in cpudetect
Allow building for targets which have NEON but not EDSP or MEDIA.

Set HAS_NEON flag for builds which have neon assembly but not
intrinsics.

Change-Id: Ibfa81a8444a8c55d1d3209c533d1d70d2f809669
2014-09-09 11:50:32 -07:00
Martin Storsjo
20babf6d9d Don't try to use getenv on windows phone/rt
The getenv function doesn't exist there. In Visual Studio 2012,
the function still existed in the link libraries even though
it was hidden in the headers, but in the 2013 version it has been
removed from the link libraries as well.

Change-Id: Iea6289a698fa1788e906f5aabb6fddda3675815b
2014-05-04 23:47:39 +03:00
changjun.yang
e58852582d code cleanup for arm_cpudetect.c
Change-Id: I5c49a983ced45197e1035fa5615d71b0bdad4109
2013-04-26 09:34:34 -07:00
John Koleszar
5ebe94f9f1 Build fixes to merge vp9-preview into master
Various fixups to resolve issues when building vp9-preview under the more stringent
checks placed on the experimental branch.

Change-Id: I21749de83552e1e75c799003f849e6a0f1a35b07
2012-12-26 11:21:09 -08:00
John Koleszar
7b8dfcb5a2 Rough merge of master into experimental
Creates a merge between the master and experimental branches. Fixes a
number of conflicts in the build system to allow *either* VP8 or VP9
to be built. Specifically either:

  $ configure --disable-vp9 $ configure --disable-vp8
  --disable-unit-tests

VP9 still exports its symbols and files as VP8, so that will be
resolved in the next commit.

Unit tests are broken in VP9, but this isn't a new issue. They are
fixed upstream on origin/experimental as of this writing, but rebasing
this merge proved difficult, so will tackle that in a second merge
commit.

Change-Id: I2b7d852c18efd58d1ebc621b8041fe0260442c21
2012-11-07 11:30:16 -08:00
John Koleszar
807acf17ba vpx_ports: merge with master
Change-Id: I25c067326153455abe1a79f8f44f70b87350e655
2012-11-05 12:39:42 -08:00
John Koleszar
c6b9039fd9 Restyle code
Approximate the Google style guide[1] so that that there's a written
document to follow and tools to check compliance[2].

[1]: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
[2]: http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py

Change-Id: Idf40e3d8dddcc72150f6af127b13e5dab838685f
2012-07-17 11:46:03 -07:00
Johann
d6e80deb32 Clean Android build defaults
Disable unit-tests. The logging in GTest would need to be adjusted.

Restructure ARM cpu detection. Flatten if-else logic.

Change #if defined(HAVE_*) to #if HAVE_* because we only need to check
for features that the library was actually built with. This should have
been harmless, as disabled feature sets wouldn't have any features to
call.

Change-Id: Iea21aa42ce5f049c53ca0376d25bcd0f36f38284
2012-06-20 09:15:28 -07:00
Attila Nagy
5daaa838a6 Enables building examples with Android NDK
Soft enable runtime cpu detect for armv7-android target, so that it
can be disabled and remove dependency on 'cpufeatures' lib.
Change the arm_cpu_caps implementation selection such that 'no rtcd' takes
precedence over system type.

Switch to use -mtune instead of -mcpu. NDK was complaining about
-mcpu=cortex-a8 conflicting with -march=armv7-a, not sure why.

Add a linker flag to fix some cortex-a8 bug, as suggested by NDK Dev
Guide.

Examples:
Configure for armv7+neon:

./configure --target=armv7-android-gcc \
            --sdk-path=/path/to/android/ndk \
            --disable-runtime-cpu-detect \
            --enable-realtime-only \
            --disable-unit-tests

...armv7 w/o neon:

./configure --target=armv7-android-gcc \
            --sdk-path=/path/to/android/ndk \
            --disable-runtime-cpu-detect \
            --enable-realtime-only \
            --disable-neon \
            --cpu=cortex-a9 \
            --disable-unit-tests

Change-Id: I37e2c0592745208979deec38f7658378d4bd6cfa
2012-06-20 10:15:24 +03:00
Fritz Koenig
892102842a Disconnect ARM tgt_isa from dsp extensions
A processor with ARMv7 instructions does not
necessarily have NEON dsp extensions.  This CL
has the added side effect of allowing the ability
to enable/disable the dsp extensions cleanly.

Change-Id: Ie1e879b8fe131885bc3d4138a0acc9ffe73a36df
2012-01-20 10:38:15 -08:00
Fritz Koenig
d830573111 Add makefile for building libvpx for Android.
Android.mk file for using the Android NDK build
system to compile. Adds option for SDK path to
use the compiler that comes with android for testing
compiler compliance.

Change-Id: I5fd17cb76e3ed631758d3f392e62ae1a050d0d10
2012-01-18 09:46:03 -08:00
Timothy B. Terriberry
b71962fdc9 Add runtime CPU detection support for ARM.
The primary goal is to allow a binary to be built which supports
 NEON, but can fall back to non-NEON routines, since some Android
 devices do not have NEON, even if they are otherwise ARMv7 (e.g.,
 Tegra).
The configure-generated flags HAVE_ARMV7, etc., are used to decide
 which versions of each function to build, and when
 CONFIG_RUNTIME_CPU_DETECT is enabled, the correct version is chosen
 at run time.
In order for this to work, the CFLAGS must be set to something
 appropriate (e.g., without -mfpu=neon for ARMv7, and with
 appropriate -march and -mcpu for even earlier configurations), or
 the native C code will not be able to run.
The ASFLAGS must remain set for the most advanced instruction set
 required at build time, since the ARM assembler will refuse to emit
 them otherwise.
I have not attempted to make any changes to configure to do this
 automatically.
Doing so will probably require the addition of new configure options.

Many of the hooks for RTCD on ARM were already there, but a lot of
 the code had bit-rotted, and a good deal of the ARM-specific code
 is not integrated into the RTCD structs at all.
I did not try to resolve the latter, merely to add the minimal amount
 of protection around them to allow RTCD to work.
Those functions that were called based on an ifdef at the calling
 site were expanded to check the RTCD flags at that site, but they
 should be added to an RTCD struct somewhere in the future.
The functions invoked with global function pointers still are, but
 these should be moved into an RTCD struct for thread safety (I
 believe every platform currently supported has atomic pointer
 stores, but this is not guaranteed).

The encoder's boolhuff functions did not even have _c and armv7
 suffixes, and the correct version was resolved at link time.
The token packing functions did have appropriate suffixes, but the
 version was selected with a define, with no associated RTCD struct.
However, for both of these, the only armv7 instruction they actually
 used was rbit, and this was completely superfluous, so I reworked
 them to avoid it.
The only non-ARMv4 instruction remaining in them is clz, which is
 ARMv5 (not even ARMv5TE is required).
Considering that there are no ARM-specific configs which are not at
 least ARMv5TE, I did not try to detect these at runtime, and simply
 enable them for ARMv5 and above.

Finally, the NEON register saving code was completely non-reentrant,
 since it saved the registers to a global, static variable.
I moved the storage for this onto the stack.
A single binary built with this code was tested on an ARM11 (ARMv6)
 and a Cortex A8 (ARMv7 w/NEON), for both the encoder and decoder,
 and produced identical output, while using the correct accelerated
 functions on each.
I did not test on any earlier processors.

Change-Id: I45cbd63a614f4554c3b325c45d46c0806f009eaa
2010-10-25 09:23:29 -04:00