Commit Graph

165 Commits

Author SHA1 Message Date
Ronald S. Bultje
4b2c2b9aa4 Rename vp8/ codec directory to vp9/.
Change-Id: Ic084c475844b24092a433ab88138cf58af3abbe4
2012-11-01 16:31:22 -07:00
James Zern
e8d58d3fd0 build: hide msvs project command in non-verbose mode
Change-Id: Id1d0deb6a2c556a0213d916c2638ef6285c2eb00
2012-08-21 13:26:42 -07:00
James Zern
cdb2a126a6 Merge "fix msvc configure" 2012-08-21 13:26:29 -07:00
John Koleszar
bd6ffaa325 vpx.pc: move -lm to Libs.private
Users of libvpx should not use libm transitively, so mark it as private.

Change-Id: Ic940aefe737a6f9a780ea742ea5c6be40c30a73e
2012-08-21 11:23:39 -07:00
James Zern
97fd7c5eb6 fix msvc configure
visual studio targets do not depend on executables, only the projects
produced.
tested with --target=x86-win32-vs9
fixes:
...
make[1]: *** No rule to make target `test_libvpx', needed by `.bins'.
Stop.
Makefile:17: recipe for target `.DEFAULT' failed

Change-Id: I606ab32d5e26fee352f25c822e0f496eff165382
2012-08-15 13:36:47 -07:00
Andoni Morales Alastruey
ec52713999 vpx.pc: add missing library for static links
Change-Id: Ic4be3145e8a90d66aa4499416094bd08a9e09af4
2012-08-09 12:29:16 +02:00
Christian Duvivier
707b65bd16 Partial import of "New RTCD implementation" from master branch.
Latest version of all scripts/makefile but rtcd_defs.sh is empty, all
existing functions are still selected using the old/current way.

Change-Id: Ib92946a48a31d6c8d1d7359eca524bc1d3e66174
2012-08-08 16:43:48 -07:00
jimbankoski
45e551b28f shared object on mac osx
Change-Id: Ibf357eb492e7d5883fbdf1ddf455e28767c1d65d
2012-07-25 19:39:33 -07:00
Jim Bankoski
1b16e74813 Dll build of libvpx
Change-Id: I74e50b4dfbe73eb98e1dce1695a9973f637220c0
2012-07-23 14:51:21 -07:00
John Koleszar
acd147c50c Build unit test driver from the default target
We need an easy way to build the unit test driver without running the
tests. This enables passing options like --gtest_filter to the
executable, which can't be done very cleanly when running under
`make test`.

Fixed a number of compiler errors/warnings when building the tests
in various configurations by Jenkins.

Change-Id: I9198122600bcf02520688e5f052ab379f963b77b
2012-06-29 15:03:50 -07:00
Ronald S. Bultje
a742a73655 Enable unit test framework in experimental branch.
Change-Id: I27c98025b2857e2911005a52dd57c46e2524e815
2012-06-26 09:50:20 -07:00
John Koleszar
007486329f Add support for downloading test data
The commit introduces a make target 'testdata' that downloads the
required test data from the WebM project website. The data will also
be downloaded if invoking `make test` but is not a strict requirement
for only building the test executable.

The download directory is taken from the LIBVPX_TEST_DATA_PATH
environment variable, or may be specified as part of the make command.
If unset, it defaults to the current directory. It's expected that
most developers will want to set this environment variable to a place
outside their source/build trees, to avoid having to download the data
more than once.

To add test data file:

  1) add a line to test/test.mk:

      LIBVPX_TEST_DATA-yes += foo-bar-file.y4m

  2) add its sha1sum to the test/test-data.sha1 file in the following
     format:

      528cc88c821e5f5b133c2b40f9c8e3f22eaacc4c  foo-bar-file.y4m

  3) upload the file to the website

      $ gsutil cp foo-bar-file.y4m gs://downloads.webmproject.org/test_data/libvpx

This implementation will check the integrity of the test data
automatically if the `sha1sum` executable is available.

Change-Id: If6910fe304bb3f5cdcc5cb9e5f9afa5be74720d2
2012-06-21 10:41:48 -07:00
Ronald S. Bultje
42a7f68d2e libs.mk: add x86inc.asm to the CODEC_SRCS.
Change-Id: I45ea0369ad489080c2505269855a46ca1d3624f7
2012-06-19 15:34:49 -07:00
Rob Bradford
576629baaf Fix pkg-config file to pull in libm
vpx uses symbols in libm and thus we need to provide an indication to
the user of libvpx that if they want to link against libvpx they must
also link against libm.

Change-Id: I31d4068bf7f6f5b1fd222bcdf9e6a1a92fb6696f
2012-06-15 16:37:33 -07:00
John Koleszar
30fb976e3e Merge "Fix MSVS builds for unit test changes" 2012-06-11 13:52:28 -07:00
James Zern
538c6ea3d3 build: hide grep/obj_int_extract commands when verbose=0
Change-Id: Ic30d7335b5bf912b39ea55f2b759fe5b7d523ca8
2012-06-09 14:52:56 -07:00
John Koleszar
7f63bfa6d2 Fix MSVS builds for unit test changes
Update the Visual Studio builds to support the new monolithic unit
test binary.

Includes minor semi-cosmetic refactoring of solution.mk, as the
%vpx.vcproj match is no longer appropriate given the test_libvpx
target.

Change-Id: I29e6e07c39e72b54a4b3eaca5b9b7877ef3fb134
2012-06-01 10:43:47 -07:00
John Koleszar
e82d261d10 Build unit tests monolithically
Rework unit tests  to have a single executable rather than many, which
should avoid pollution of the visual studio project namespace, improve
build times, and make it easier to use the gtest test sharding system
when we get these going on the continuous build cluster.

Change-Id: If4c3e5d4b3515522869de6c89455c2a64697cca6
2012-05-22 14:37:30 -07:00
John Koleszar
8631c1b8a2 configure: initial support for CXX, CXXFLAGS variables
Use CXX rather than assuming g++ to invoke the compiler. Also introduce
separate CXXFLAGS, as certain CFLAGS we enable by default cause warnings
with g++.

Change-Id: Ia2f40ef27c93e45c971d070cc58bdcde9da2ac7c
2012-05-22 14:32:08 -07:00
John Koleszar
44d35f7b25 Merge branch 'origin/eider' into master
Conflicts:
	vp8/common/entropymode.c
	vp8/common/entropymode.h
	vp8/encoder/encodeframe.c
	vp8/vp8_cx_iface.c

Change-Id: I708b0f30449b9502b382e47b745d56f5ed2ce265
2012-05-11 10:51:05 -07:00
James Berry
a0769f70f5 add unit test support via google test
adds unit testing via google test

Change-Id: I144b50a976d79251fc5135186a4e0a5051ed0e8c
2012-05-11 06:19:52 -07:00
John Koleszar
2bf8fb5889 remove deprecated pre-v0.9.0 API
Remove a bunch of compatibility code dating back to before the initial
libvpx release.

Change-Id: Ie50b81e7d665955bec3d692cd6521c9583e85ca3
2012-05-04 10:44:46 -07:00
James Berry
0cc044f071 update unit tests to support --enable-static-msvcrt
update unit tests to support --enable-static-msvcrt

Change-Id: I7e6e9ef2a0a8e2054076c8debe35ee317e9ab2e3
2012-05-02 18:09:54 -04:00
Takanori MATSUURA
a7eea3e267 Use LIBSUBDIR for vpx.pc.
Change-Id: Ibba635696e8c23086e5d3c0e8452ab97c460d7d7
2012-04-20 15:11:46 -07:00
Johann
56e8485c84 darwin universal builds need BUILD_PFX
Universal builds create subdirectories for each target. Without
BUILD_PFX we only generated one vpx_rtcd.h instead of one for each.

Change-Id: I1caed4e018c8865ffc8da15e434cae2b96154fb4
2012-03-16 14:54:07 -04:00
Priit Laes
7af4eb014b Fix build under Estonian locale
Change-Id: Ifb536403ef302b597864eae1d05aa9e2bb15d4c7
2012-03-14 11:19:09 -07:00
Johann
5d88a82aa0 include CHANGELOG in CODEC_SRCS
build/make/version.sh requires CHANGELOG to generate vpx_version.h
The file is already included when building the documentation. However,
documentation is not build if doxygen/php are not present.

This is necessary when using '--enable-install-srcs --enable-codec-srcs'
and 'make dist'

Change-Id: Icada883a056a4713d24934ea44e0f6969b68f9c2
2012-03-05 16:36:23 -08:00
Johann
b0a12a2880 Refine offset pattern
When compiling with -ggdb3 the output includes an extraneous EQU from
vpx_ports/asm_offsets.h

https://trac.macports.org/ticket/33285

Change-Id: Iba93ddafec414c152b87001a7542e7a894781231
2012-02-17 12:28:13 -08:00
Fritz Koenig
8144132866 Fix rtcd build process for Android.mk
Add a dependency so ndk-build will
generate the needed vpx_rtcd.h file.

Change-Id: I92c82e0996943dd0403c9956e1ba60e92e2837a9
2012-02-15 15:23:04 -08:00
John Koleszar
a910049aea New RTCD implementation
This is a proof of concept RTCD implementation to replace the current
system of nested includes, prototypes, INVOKE macros, etc. Currently
only the decoder specific functions are implemented in the new system.
Additional functions will be added in subsequent commits.

Overview:
  RTCD "functions" are implemented as either a global function pointer
  or a macro (when only one eligible specialization available).
  Functions which have RTCD specializations are listed using a simple
  DSL identifying the function's base name, its prototype, and the
  architecture extensions that specializations are available for.

Advantages over the old system:
  - No INVOKE macros. A call to an RTCD function looks like an ordinary
    function call.
  - No need to pass vtables around.
  - If there is only one eligible function to call, the function is
    called directly, rather than indirecting through a function pointer.
  - Supports the notion of "required" extensions, so in combination with
    the above, on x86_64 if the best function available is sse2 or lower
    it will be called directly, since all x86_64 platforms implement
    sse2.
  - Elides all references to functions which will never be called, which
    could reduce binary size. For example if sse2 is required and there
    are both mmx and sse2 implementations of a certain function, the
    code will have no link time references to the mmx code.
  - Significantly easier to add a new function, just one file to edit.

Disadvantages:
  - Requires global writable data (though this is not a new requirement)
  - 1 new generated source file.

Change-Id: Iae6edab65315f79c168485c96872641c5aa09d55
2012-01-30 12:06:27 -08:00
James Zern
f89ea3432f fix file permissions
all of googletest import (0ab00a22) was marked executable

Change-Id: Id7b7ee03efc21ab998bb03349bd91644e8af25da
2011-11-04 18:50:35 -07:00
James Berry
07c71ef7cc Add unit test support via google test
Change-Id: I0ab00a22fbea1f38c96ef92ef7eaeda782c0c8d3
2011-11-04 12:23:04 -07:00
Fritz Koenig
17c754fc00 Reduce grep match when generating offset files.
Search for the word EQU so that extraneous
symbols are not matched.

Change-Id: Ice6c9ca886211e2ca8a2f5174bdd4103db5c4989
2011-09-20 15:36:44 -07:00
John Koleszar
5e562c77db Generate libvpx_srcs.txt from current configuration
To get a list of files that the libvpx library depends on in the current
configuration, run:

  $ make target=libs libvpx_srcs.txt

Change-Id: I68a69648ecf212f0fe29c325297728ac2a9393d9
2011-08-12 14:59:22 -04:00
John Koleszar
06f58c0df7 Fix building of static libs on universal-darwin
The static libs should not be built from sources during the top level
of a universal build. This regression was introduced in commit
495b241fa6, which made the static
libs selectable under CONFIG_STATIC.

Change-Id: I585167e17459877e0fa7fa19e1046c3703d91c97
2011-08-03 10:38:45 -04:00
John Koleszar
c1bf6ca6cc Fix asm offsets generation for universal-darwin builds
Added BUILD_PFX to correct dependencies.

Change-Id: Ia07602bd98ef2253242b1bd66ef05e3b1e64ba7d
2011-08-03 10:38:33 -04:00
Johann
3e8c6d3d35 include the arm header files in make dist
Change-Id: Ibcf5b4b14153f65ce1b53c3bfba87ad2feb17bbd
2011-08-01 17:20:21 -04:00
John Koleszar
8ef25de377 install asm_offsets.h
Ensure vpx_ports/asm_offsets.h is installed with make dist

Change-Id: If9f32273fff975d60de1583b039dbbce8a7ccd27
2011-07-29 16:56:43 -04:00
James Zern
495b241fa6 configure: add --enable-static option
Fixes issue #62.

Change-Id: I0567cf7897c0942666c19b3231c8c3b8e9c3e7cc
2011-07-25 15:40:36 -07:00
Alexis Ballier
653e69e334 Fix parallel install
Require the destination to be present before trying to create the symlink.
See: http://bugs.gentoo.org/show_bug.cgi?id=323805

Change-Id: I14ed4a9792dedc289885a9a43bc5a86cb792206d
2011-06-22 12:53:07 -04:00
Tero Rintaluoma
5405bd9793 Update -linux-rvct targets
- Updated -linux-rvct targets to support RVDS 4.0 and later.
- Changed optimization flag to -Otime because -O3 ruined performance
  for RVCT linux targets.
- Added support for --enable-small for RVCT
- RVCT created library should be able to link with GCC
- Supports building shared linux libraries

Change-Id: Ic62589950d86c3420fd4d908b8efb870806d1233
2011-06-14 11:29:35 +03:00
Tero Rintaluoma
66533b1a8d Fix make clean for asm offset files
Automatically created assembly offset files added to CLEAN-OBJS list
for proper cleanup. This will fix following build error:
1) Build for the workstation
./conigure
make
make clean
2) Build for ARM platform
./configure --target=armv7-linux-gcc
make ==> this will fail because it uses old asm_*_offset.asm files

Change-Id: Id5275c470390ca81b8db086a15ad75af39b80703
2011-06-10 14:05:53 +03:00
Johann
79327be6c7 use GCC inline magic
Better fix for #326. ICC happens to support the inline magic

Change-Id: Ic367eea608c88d89475cb7b05d73500d2a1bc42b
2011-06-08 16:19:37 -04:00
Johann
abb7c2181e Revert "Use shared object files for ELF"
Broke RVCT. New magic coming for ICC. Stay tuned!

This reverts commit c73eb2ffff
2011-06-08 11:36:04 -07:00
Johann
c73eb2ffff Use shared object files for ELF
Fixes #326

Change-Id: I5f2a4257430ef62f674190acefd43a0474821288
2011-06-06 16:10:31 -04:00
Ralph Giles
607f8420f3 Generate a vpx.pc file for pkg-config.
Rules are added to libs.mk to generate a vpx.pc, which is
installed as pkgconfig/vpx.pc under the target library directory.
This also requires the install path prefix be exported directly
in config.mk.

Some systems use a tool called pkg-config to query information
about intalled libraries or other resources, based on database
files provided by the packages themselves at install time.

Providing such a file for libvpx simplifies integration with
other build systems, and provides an easy avenue for developers
to test against their own builds of the library.

Change-Id: I4e32a8fbb53fc331aa95eb207c63dd70a76d18ed
2011-03-30 20:56:16 -07:00
Johann
8edaf6e2f2 use asm_offsets with vp8_regular_quantize_b_sse2
remove helper function and avoid shadowing all the arguments to the
stack on 64bit systems

when running with --good --cpu-used=0:
~2% on linux x86 and x86_64
~2% on win32 x86 msys and visual studio
more on darwin10 x86_64
significantly more on
x86_64-win64-vs9

Change-Id: Ib7be12edf511fbf2922f191afd5b33b19a0c4ae6
2011-03-24 13:34:48 -04:00
Johann
128d2c23b3 obj_int_extract for Visual Studio
Enable extraction of assembly offsets from compiled examples in MSVS.
This will allow us to remove some stub functions from x86 assembly since
we will be able to reliably determine structure offsets at compile time.

see ARM code for examples:
vp8/encoder/arm/armv5te/
vpx_scale/arm/neon/

Change-Id: I1852dc6b56ede0bf1dddb5552196222a7c6a902f
2011-03-10 18:49:54 -05:00
Johann
418f4219fa purge wince configuration
this has been broken since the initial release

Change-Id: If0d4deb2de9f7d0c4c05641e2bbf9cc1bf11e171
2011-02-22 14:42:00 -05:00
Johann
40dcae9c2e clarify *_offsets.asm differences
it's difficult to mux the *_offsets.c files because of header conflicts.
make three instead, name them consistently and partititon the contents
to allow building them as required.

Change-Id: I8f9768c09279f934f44b6c5b0ec363f7943bb796
2011-02-08 16:35:43 -05:00
Johann
3273c7b679 move one of the offset files
common/arm/vpx_asm_offsets moves up a level. prepare for muxing with
encoder/arm/vpx_vp8_enc_asm_offsets

Change-Id: I89a04a5235447e66571995c9d9b4b6edcb038e24
2011-02-07 11:35:30 -05: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
Fritz Koenig
0f5c63e4f6 Add processor dectection for x86.
Use cpuid to check the vendor string against known
architectures.

Change-Id: I3fbd7f73638d71857a0c4a44a6275eb295fb4cef
2010-10-13 09:58:15 -07:00
John Koleszar
c2140b8af1 Use WebM in copyright notice for consistency
Changes 'The VP8 project' to 'The WebM project', for consistency
with other webmproject.org repositories.

Fixes issue #97.

Change-Id: I37c13ed5fbdb9d334ceef71c6350e9febed9bbba
2010-09-09 10:01:21 -04:00
John Koleszar
4d86ef3534 msvs: fix install of codec sources
The libs.mk file must be installed for the vpx.vcproj file to be
generated. It was being installed, but not in the src/ directory as
expected.

Also missed include files yasm.rules, quantize_x86.h

Change-Id: Ic1a6f836e953bfc954d6e42a18c102a0114821eb
2010-07-22 18:33:25 -04:00
James Zern
a23ec527af ARM WinCE VS8 build update
The generated project is vpx.vcproj, change vpx_decoder references to
match. Remove .rules file dependency as it will be pulled from the
source tree.

Change-Id: I679db2748b37adae3bafd764dba8575fc3abde72
2010-06-29 12:02:19 -04:00
John Koleszar
94c52e4da8 cosmetics: trim trailing whitespace
When the license headers were updated, they accidentally contained
trailing whitespace, so unfortunately we have to touch all the files
again.

Change-Id: I236c05fade06589e417179c0444cb39b09e4200d
2010-06-18 13:06:11 -04:00
James Zern
ec1871554b VisualStudio projects: asm tool updates
vs8
 - pull yasm.rules [1] into the source tree to avoid need to install
   file into VC/VCProjectDefaults
 - reference same w/ToolFile & RelativePath
 - update arm branch to match

vs7:
 - quote source file paths passed to yasm

[1]:
http://www.tortall.net/svn/yasm/trunk/yasm/Mkfiles/vc9/yasm.rules@2271

Change-Id: I52b801496340cd7b1d0023d12afbc04624ecefc3
2010-06-14 17:29:14 -04:00
Luca Barbato
8916fa2c3e Make shared object use extralibs
this way -lm doesn't get ignored if additional LDFLAGS get passed from
env

Change-Id: Ie630369ae6ed2780377c35aa2726e759d527bb50
2010-06-06 18:51:59 +02:00
John Koleszar
7aa97a35b5 shared library support (.so)
This patch adds support for building shared libraries when configured
with the --enable-shared switch.

Building DLLs would require more invasive changes to the sample
utilities than I want to make in this patch, since on Windows you can't
use the address of an imported symbol in a static initializer. The best
way to work around this is proably to build the codec interface mapping
table with an init() function, but dll support is of questionable value
anyway, since most windows users will probably use a media framework
lib like webmdshow, which links this library in staticly.

Change-Id: Iafb48900549b0c6b67f4a05d3b790b2643d026f4
2010-06-05 16:47:23 -04:00
John Koleszar
09202d8071 LICENSE: update with latest text
Change-Id: Ieebea089095d9073b3a94932791099f614ce120c
2010-06-04 16:19:40 -04:00
John Koleszar
670af3aa59 configure: support --prefix, --libdir
Support --prefix, --libdir as a conventional way of specifying the default
installation directories. libdir is required to be a subdirectory of prefix
at this time.

Change-Id: If45d9e3129efcde83c05b7766accc9017988e715
2010-05-27 12:58:54 -04:00
John Koleszar
b7492341ac install includes in DIST_DIR/include/vpx, move vpx_codec/ to vpx/
This renames the vpx_codec/ directory to vpx/, to allow applications
to more consistently reference these includes with the vpx/ prefix.
This allows the includes to be installed in /usr/local/include/vpx
rather than polluting the system includes directory with an
excessive number of includes.

Change-Id: I7b0652a20543d93f38f421c60b0bbccde4d61b4f
2010-05-24 20:27:42 -04:00
John Koleszar
1df0314e7b configure: remove HAVE_CONFIG_H
This doesn't play well with autotools, and the preprocessor magic is
confusing and unhelpful in the vp8-only context.

Change-Id: I2fcb57e6eb7876ecb58509da608dc21f26077ff1
2010-05-21 05:53:48 -04:00
John Koleszar
0ea50ce9cb Initial WebM release 2010-05-18 11:58:33 -04:00