Merge remote branch 'internal/upstream' into HEAD
Conflicts: configure
This commit is contained in:
commit
b7918d5240
24
AUTHORS
24
AUTHORS
@ -1,4 +1,24 @@
|
||||
# Names should be added to this file like so:
|
||||
# Name or Organization <email address>
|
||||
# This file is automatically generated from the git commit history
|
||||
# by tools/gen_authors.sh.
|
||||
|
||||
Alex Converse <alex.converse@gmail.com>
|
||||
Andres Mejia <mcitadel@gmail.com>
|
||||
Fabio Pedretti <fabio.ped@libero.it>
|
||||
Frank Galligan <fgalligan@google.com>
|
||||
Guillermo Ballester Valor <gbvalor@gmail.com>
|
||||
James Zern <jzern@google.com>
|
||||
John Koleszar <jkoleszar@google.com>
|
||||
Justin Clift <justin@salasaga.org>
|
||||
Luca Barbato <lu_zero@gentoo.org>
|
||||
Makoto Kato <makoto.kt@gmail.com>
|
||||
Paul Wilkins <paulwilkins@google.com>
|
||||
Pavol Rusnak <stick@gk2.sk>
|
||||
Philip Jägenstedt <philipj@opera.com>
|
||||
Scott LaVarnway <slavarnway@google.com>
|
||||
Timothy B. Terriberry <tterribe@xiph.org>
|
||||
Tom Finegan <tomfinegan@google.com>
|
||||
Yaowu Xu <yaowu@google.com>
|
||||
Yunqing Wang <yunqingwang@google.com>
|
||||
Google Inc.
|
||||
The Mozilla Foundation
|
||||
The Xiph.Org Foundation
|
||||
|
15
CHANGELOG
15
CHANGELOG
@ -1,3 +1,18 @@
|
||||
2010-06-17 v0.9.1
|
||||
- Enhancements:
|
||||
* ivfenc/ivfdec now support YUV4MPEG2 input and pipe I/O
|
||||
* Speed optimizations
|
||||
- Bugfixes:
|
||||
* Rate control
|
||||
* Prevent out-of-bounds accesses on invalid data
|
||||
- Build system updates:
|
||||
* Detect toolchain to be used automatically for native builds
|
||||
* Support building shared libraries
|
||||
* Better autotools emulation (--prefix, --libdir, DESTDIR)
|
||||
- Updated LICENSE
|
||||
* http://webmproject.blogspot.com/2010/06/changes-to-webm-open-source-license.html
|
||||
|
||||
|
||||
2010-05-18 v0.9.0
|
||||
- Initial open source release. Welcome to WebM and VP8!
|
||||
|
||||
|
42
LICENSE
42
LICENSE
@ -1,22 +1,20 @@
|
||||
Copyright (c) 2010, Google, Inc.
|
||||
|
||||
All rights reserved.
|
||||
Copyright (c) 2010, Google Inc. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in
|
||||
the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
- Neither the name of Google nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
* Neither the name of Google nor the names of its contributors may
|
||||
be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
@ -30,19 +28,3 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
Subject to the terms and conditions of the above License, Google
|
||||
hereby grants to You a perpetual, worldwide, non-exclusive,
|
||||
no-charge, royalty-free, irrevocable (except as stated in this
|
||||
section) patent license to make, have made, use, offer to sell, sell,
|
||||
import, and otherwise transfer this implementation of VP8, where such
|
||||
license applies only to those patent claims, both currently owned by
|
||||
Google and acquired in the future, licensable by Google that are
|
||||
necessarily infringed by this implementation of VP8. If You or your
|
||||
agent or exclusive licensee institute or order or agree to the
|
||||
institution of patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that this
|
||||
implementation of VP8 or any code incorporated within this
|
||||
implementation of VP8 constitutes direct or contributory patent
|
||||
infringement, or inducement of patent infringement, then any rights
|
||||
granted to You under this License for this implementation of VP8
|
||||
shall terminate as of the date such litigation is filed.
|
||||
|
22
PATENTS
Normal file
22
PATENTS
Normal file
@ -0,0 +1,22 @@
|
||||
Additional IP Rights Grant (Patents)
|
||||
|
||||
"This implementation" means the copyrightable works distributed by
|
||||
Google as part of the WebM Project.
|
||||
|
||||
Google hereby grants to you a perpetual, worldwide, non-exclusive,
|
||||
no-charge, royalty-free, irrevocable (except as stated in this section)
|
||||
patent license to make, have made, use, offer to sell, sell, import,
|
||||
transfer, and otherwise run, modify and propagate the contents of this
|
||||
implementation of VP8, where such license applies only to those patent
|
||||
claims, both currently owned by Google and acquired in the future,
|
||||
licensable by Google that are necessarily infringed by this
|
||||
implementation of VP8. This grant does not include claims that would be
|
||||
infringed only as a consequence of further modification of this
|
||||
implementation. If you or your agent or exclusive licensee institute or
|
||||
order or agree to the institution of patent litigation against any
|
||||
entity (including a cross-claim or counterclaim in a lawsuit) alleging
|
||||
that this implementation of VP8 or any code incorporated within this
|
||||
implementation of VP8 constitutes direct or contributory patent
|
||||
infringement, or inducement of patent infringement, then any patent
|
||||
rights granted to you under this License for this implementation of VP8
|
||||
shall terminate as of the date such litigation is filed.
|
6
README
6
README
@ -9,18 +9,18 @@ COMPILING THE APPLICATIONS/LIBRARIES:
|
||||
the application.
|
||||
|
||||
1. Prerequisites
|
||||
|
||||
|
||||
* All x86 targets require the Yasm[1] assembler be installed.
|
||||
* All Windows builds require that Cygwin[2] be installed.
|
||||
* Building the documentation requires PHP[3] and Doxygen[4]. If you do not
|
||||
have these packages, you must pass --disable-install-docs to the
|
||||
configure script.
|
||||
|
||||
|
||||
[1]: http://www.tortall.net/projects/yasm
|
||||
[2]: http://www.cygwin.com
|
||||
[3]: http://php.net
|
||||
[4]: http://www.doxygen.org
|
||||
|
||||
|
||||
2. Out-of-tree builds
|
||||
Out of tree builds are a supported method of building the application. For
|
||||
an out of tree build, the source tree is kept separate from the object
|
||||
|
9
args.c
9
args.c
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
9
args.h
9
args.h
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
2
build/.gitattributes
vendored
Normal file
2
build/.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*-vs8/*.rules -crlf
|
||||
*-msvs/*.rules -crlf
|
1
build/arm-wince-vs8/.gitattributes
vendored
1
build/arm-wince-vs8/.gitattributes
vendored
@ -1 +0,0 @@
|
||||
*.rules -crlf
|
@ -1,10 +1,11 @@
|
||||
@echo off
|
||||
REM Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
REM
|
||||
REM Use of this source code is governed by a BSD-style license and patent
|
||||
REM grant that can be found in the LICENSE file in the root of the source
|
||||
REM tree. All contributing project authors may be found in the AUTHORS
|
||||
REM file in the root of the source tree.
|
||||
REM
|
||||
REM Use of this source code is governed by a BSD-style license
|
||||
REM that can be found in the LICENSE file in the root of the source
|
||||
REM tree. An additional intellectual property rights grant can be found
|
||||
REM in the file PATENTS. All contributing project authors may
|
||||
REM be found in the AUTHORS file in the root of the source tree.
|
||||
echo on
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example", "example.vcproj",
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "obj_int_extract", "obj_int_extract.vcproj", "{E1360C65-D375-4335-8057-7ED99CC3F9B2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vpx_decoder", "vpx_decoder.vcproj", "{DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vpx", "vpx.vcproj", "{DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{E1360C65-D375-4335-8057-7ED99CC3F9B2} = {E1360C65-D375-4335-8057-7ED99CC3F9B2}
|
||||
EndProjectSection
|
@ -1,10 +1,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
@ -38,13 +39,8 @@ dist:
|
||||
@if [ -d "$(DIST_DIR)/src" ]; then \
|
||||
mkdir -p "$(DIST_DIR)/build"; \
|
||||
cd "$(DIST_DIR)/build"; \
|
||||
if [ "$(TGT_CC)" = "rvct" ] ; then \
|
||||
echo "../src/configure --target=$(TOOLCHAIN) --libc=$(ALT_LIBC)"; \
|
||||
../src/configure --target=$(TOOLCHAIN) --libc=$(ALT_LIBC); \
|
||||
else \
|
||||
echo "../src/configure --target=$(TOOLCHAIN)"; \
|
||||
../src/configure --target=$(TOOLCHAIN); \
|
||||
fi; \
|
||||
echo "Rerunning configure $(CONFIGURE_ARGS)"; \
|
||||
../src/configure $(CONFIGURE_ARGS); \
|
||||
$(if $(filter vs%,$(TGT_CC)),make NO_LAUNCH_DEVENV=1;) \
|
||||
fi
|
||||
@if [ -d "$(DIST_DIR)" ]; then \
|
||||
@ -56,7 +52,6 @@ dist:
|
||||
fi
|
||||
|
||||
|
||||
svnstat: ALL_TARGETS:=$(firstword $(ALL_TARGETS))
|
||||
endif
|
||||
|
||||
ifneq ($(target),)
|
||||
@ -219,6 +214,20 @@ $(1):
|
||||
$(qexec)$$(AR) $$(ARFLAGS) $$@ $$?
|
||||
endef
|
||||
|
||||
define so_template
|
||||
# Not using a pattern rule here because we don't want to generate empty
|
||||
# archives when they are listed as a dependency in files not responsible
|
||||
# for creating them.
|
||||
#
|
||||
# This needs further abstraction for dealing with non-GNU linkers.
|
||||
$(1):
|
||||
$(if $(quiet),@echo " [LD] $$@")
|
||||
$(qexec)$$(LD) -shared $$(LDFLAGS) \
|
||||
-Wl,--no-undefined -Wl,-soname,$$(SONAME) \
|
||||
-Wl,--version-script,$$(SO_VERSION_SCRIPT) -o $$@ \
|
||||
$$(filter %.o,$$?) $$(extralibs)
|
||||
endef
|
||||
|
||||
define lipo_lib_template
|
||||
$(1): $(addsuffix /$(1),$(FAT_ARCHS))
|
||||
$(if $(quiet),@echo " [LIPO] $$@")
|
||||
@ -282,6 +291,7 @@ LIBS=$(call enabled,LIBS)
|
||||
.libs: $(LIBS)
|
||||
@touch $@
|
||||
$(foreach lib,$(filter %_g.a,$(LIBS)),$(eval $(call archive_template,$(lib))))
|
||||
$(foreach lib,$(filter %so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH),$(LIBS)),$(eval $(call so_template,$(lib))))
|
||||
|
||||
INSTALL-LIBS=$(call cond_enabled,CONFIG_INSTALL_LIBS,INSTALL-LIBS)
|
||||
ifeq ($(MAKECMDGOALS),dist)
|
||||
@ -319,6 +329,7 @@ ifneq ($(call enabled,DIST-SRCS),)
|
||||
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_def.sh
|
||||
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_proj.sh
|
||||
DIST-SRCS-$(CONFIG_MSVS) += build/make/gen_msvs_sln.sh
|
||||
DIST-SRCS-$(CONFIG_MSVS) += build/x86-msvs/yasm.rules
|
||||
DIST-SRCS-$(CONFIG_RVCT) += build/make/armlink_adapter.sh
|
||||
#
|
||||
# This isn't really ARCH_ARM dependent, it's dependant on whether we're
|
||||
@ -347,12 +358,3 @@ INSTALL_TARGETS += .install-docs .install-srcs .install-libs .install-bins
|
||||
all-$(target): $(BUILD_TARGETS)
|
||||
install:: $(INSTALL_TARGETS)
|
||||
dist: $(INSTALL_TARGETS)
|
||||
|
||||
#
|
||||
# Development helper targets
|
||||
#
|
||||
ifneq ($(SRC_PATH_BARE),)
|
||||
.PHONY: svnstat
|
||||
svnstat:
|
||||
svn stat $(SRC_PATH_BARE)
|
||||
endif
|
||||
|
@ -2,10 +2,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
|
@ -120,8 +120,8 @@ EOF
|
||||
|
||||
show_targets() {
|
||||
while [ -n "$*" ]; do
|
||||
if [ "${1%%-*}" == "${2%%-*}" ]; then
|
||||
if [ "${2%%-*}" == "${3%%-*}" ]; then
|
||||
if [ "${1%%-*}" = "${2%%-*}" ]; then
|
||||
if [ "${2%%-*}" = "${3%%-*}" ]; then
|
||||
printf " %-24s %-24s %-24s\n" "$1" "$2" "$3"
|
||||
shift; shift; shift
|
||||
else
|
||||
@ -378,7 +378,7 @@ EOF
|
||||
fmt_deps = sed -e 's;^__image.axf;\$(dir \$@)\$(notdir \$<).o \$@;' #hide
|
||||
EOF
|
||||
else cat >> $1 << EOF
|
||||
fmt_deps = sed -e 's;^\(.*\)\.o;\$(dir \$@)\1\$(suffix \$<).o \$@;' #hide
|
||||
fmt_deps = sed -e 's;^\([a-zA-Z0-9_]*\)\.o;\$(dir \$@)\1\$(suffix \$<).o \$@;'
|
||||
EOF
|
||||
fi
|
||||
|
||||
@ -395,8 +395,6 @@ EOF
|
||||
write_common_target_config_h() {
|
||||
cat > ${TMP_H} << EOF
|
||||
/* This file automatically generated by configure. Do not edit! */
|
||||
#define INLINE ${INLINE}
|
||||
#define FORCEINLINE ${FORCEINLINE:-${INLINE}}
|
||||
#define RESTRICT ${RESTRICT}
|
||||
EOF
|
||||
print_config_h ARCH "${TMP_H}" ${ARCH_LIST}
|
||||
@ -475,7 +473,7 @@ post_process_common_cmdline() {
|
||||
prefix="${prefix%/}"
|
||||
libdir="${libdir:-${prefix}/lib}"
|
||||
libdir="${libdir%/}"
|
||||
if [ "${libdir#${prefix}}" == "${libdir}" ]; then
|
||||
if [ "${libdir#${prefix}}" = "${libdir}" ]; then
|
||||
die "Libdir ${libdir} must be a subdirectory of ${prefix}"
|
||||
fi
|
||||
}
|
||||
@ -497,11 +495,11 @@ setup_gnu_toolchain() {
|
||||
|
||||
process_common_toolchain() {
|
||||
if [ -z "$toolchain" ]; then
|
||||
uname="$(uname -a)"
|
||||
gcctarget="$(gcc -dumpmachine 2> /dev/null)"
|
||||
|
||||
# detect tgt_isa
|
||||
case "$uname" in
|
||||
*x86_64*)
|
||||
case "$gcctarget" in
|
||||
*x86_64*|*amd64*)
|
||||
tgt_isa=x86_64
|
||||
;;
|
||||
*i[3456]86*)
|
||||
@ -510,19 +508,19 @@ process_common_toolchain() {
|
||||
esac
|
||||
|
||||
# detect tgt_os
|
||||
case "$uname" in
|
||||
*Darwin\ Kernel\ Version\ 8*)
|
||||
case "$gcctarget" in
|
||||
*darwin8*)
|
||||
tgt_isa=universal
|
||||
tgt_os=darwin8
|
||||
;;
|
||||
*Darwin\ Kernel\ Version\ 9*)
|
||||
*darwin9*)
|
||||
tgt_isa=universal
|
||||
tgt_os=darwin9
|
||||
;;
|
||||
*Msys*|*Cygwin*)
|
||||
*mingw32*|*cygwin*)
|
||||
tgt_os=win32
|
||||
;;
|
||||
*Linux*|*BSD*)
|
||||
*linux*|*bsd*)
|
||||
tgt_os=linux
|
||||
;;
|
||||
esac
|
||||
@ -797,11 +795,23 @@ process_common_toolchain() {
|
||||
setup_gnu_toolchain
|
||||
add_cflags -use-msasm -use-asm
|
||||
add_ldflags -i-static
|
||||
enabled x86_64 && add_cflags -ipo -no-prec-div -static -xSSE3 -axSSE3
|
||||
enabled x86_64 && AR=xiar
|
||||
case ${tune_cpu} in
|
||||
atom*)
|
||||
tune_cflags="-x"
|
||||
tune_cpu="SSE3_ATOM"
|
||||
;;
|
||||
*)
|
||||
tune_cflags="-march="
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
gcc*)
|
||||
add_cflags -m${bits}
|
||||
add_ldflags -m${bits}
|
||||
link_with_cc=gcc
|
||||
tune_cflags="-march="
|
||||
setup_gnu_toolchain
|
||||
;;
|
||||
esac
|
||||
|
@ -2,10 +2,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
|
@ -2,15 +2,17 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
self=$0
|
||||
self_basename=${self##*/}
|
||||
self_dirname=$(dirname "$0")
|
||||
EOL=$'\n'
|
||||
|
||||
show_help() {
|
||||
@ -204,7 +206,7 @@ for opt in "$@"; do
|
||||
;;
|
||||
--ver=*) vs_ver="$optval"
|
||||
case $optval in
|
||||
[78])
|
||||
[789])
|
||||
;;
|
||||
*) die Unrecognized Visual Studio Version in $opt
|
||||
;;
|
||||
@ -246,6 +248,8 @@ case "${vs_ver:-8}" in
|
||||
;;
|
||||
8) vs_ver_id="8.00"
|
||||
;;
|
||||
9) vs_ver_id="9.00"
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -n "$name" ] || die "Project name (--name) must be specified!"
|
||||
@ -291,8 +295,8 @@ case "$target" in
|
||||
x86*)
|
||||
platforms[0]="Win32"
|
||||
# these are only used by vs7
|
||||
asm_Debug_cmdline="yasm -Xvc -g cv8 -f \$(PlatformName) ${yasmincs} \$(InputPath)"
|
||||
asm_Release_cmdline="yasm -Xvc -f \$(PlatformName) ${yasmincs} \$(InputPath)"
|
||||
asm_Debug_cmdline="yasm -Xvc -g cv8 -f \$(PlatformName) ${yasmincs} "\$(InputPath)""
|
||||
asm_Release_cmdline="yasm -Xvc -f \$(PlatformName) ${yasmincs} "\$(InputPath)""
|
||||
;;
|
||||
arm*|iwmmx*)
|
||||
case "${name}" in
|
||||
@ -342,19 +346,19 @@ generate_vcproj() {
|
||||
|
||||
open_tag ToolFiles
|
||||
case "$target" in
|
||||
x86*) $uses_asm && tag DefaultToolFile FileName="yasm.rules"
|
||||
x86*) $uses_asm && tag ToolFile RelativePath="$self_dirname/../x86-msvs/yasm.rules"
|
||||
;;
|
||||
arm*|iwmmx*)
|
||||
if [ "$name" == "vpx_decoder" ];then
|
||||
if [ "$name" == "vpx" ];then
|
||||
case "$target" in
|
||||
armv5*)
|
||||
tag DefaultToolFile FileName="armasmv5.rules"
|
||||
tag ToolFile RelativePath="$self_dirname/../arm-wince-vs8/armasmv5.rules"
|
||||
;;
|
||||
armv6*)
|
||||
tag DefaultToolFile FileName="armasmv6.rules"
|
||||
tag ToolFile RelativePath="$self_dirname/../arm-wince-vs8/armasmv6.rules"
|
||||
;;
|
||||
iwmmxt*)
|
||||
tag DefaultToolFile FileName="armasmxscale.rules"
|
||||
tag ToolFile RelativePath="$self_dirname/../arm-wince-vs8/armasmxscale.rules"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
@ -374,7 +378,7 @@ generate_vcproj() {
|
||||
|
||||
if [ "$target" == "armv6-wince-vs8" ] || [ "$target" == "armv5te-wince-vs8" ] || [ "$target" == "iwmmxt-wince-vs8" ] || [ "$target" == "iwmmxt2-wince-vs8" ];then
|
||||
case "$name" in
|
||||
vpx_decoder) tag Tool \
|
||||
vpx) tag Tool \
|
||||
Name="VCPreBuildEventTool" \
|
||||
CommandLine="call obj_int_extract.bat \$(ConfigurationName)"
|
||||
tag Tool \
|
||||
@ -435,7 +439,7 @@ generate_vcproj() {
|
||||
Name="VCCLCompilerTool" \
|
||||
Optimization="0" \
|
||||
AdditionalIncludeDirectories="$incs" \
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;$defines" \
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \
|
||||
RuntimeLibrary="$debug_runtime" \
|
||||
UsePrecompiledHeader="0" \
|
||||
WarningLevel="3" \
|
||||
@ -508,7 +512,7 @@ generate_vcproj() {
|
||||
|
||||
if [ "$target" == "armv6-wince-vs8" ] || [ "$target" == "armv5te-wince-vs8" ] || [ "$target" == "iwmmxt-wince-vs8" ] || [ "$target" == "iwmmxt2-wince-vs8" ];then
|
||||
case "$name" in
|
||||
vpx_decoder) tag DeploymentTool \
|
||||
vpx) tag DeploymentTool \
|
||||
ForceDirty="-1" \
|
||||
RegisterOutput="0"
|
||||
;;
|
||||
@ -532,7 +536,7 @@ generate_vcproj() {
|
||||
|
||||
if [ "$target" == "armv6-wince-vs8" ] || [ "$target" == "armv5te-wince-vs8" ] || [ "$target" == "iwmmxt-wince-vs8" ] || [ "$target" == "iwmmxt2-wince-vs8" ];then
|
||||
case "$name" in
|
||||
vpx_decoder) tag Tool \
|
||||
vpx) tag Tool \
|
||||
Name="VCPreBuildEventTool" \
|
||||
CommandLine="call obj_int_extract.bat \$(ConfigurationName)"
|
||||
tag Tool \
|
||||
@ -593,7 +597,7 @@ generate_vcproj() {
|
||||
x86*) tag Tool \
|
||||
Name="VCCLCompilerTool" \
|
||||
AdditionalIncludeDirectories="$incs" \
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;$defines" \
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;$defines" \
|
||||
RuntimeLibrary="$release_runtime" \
|
||||
UsePrecompiledHeader="0" \
|
||||
WarningLevel="3" \
|
||||
@ -670,7 +674,7 @@ generate_vcproj() {
|
||||
|
||||
if [ "$target" == "armv6-wince-vs8" ] || [ "$target" == "armv5te-wince-vs8" ] || [ "$target" == "iwmmxt-wince-vs8" ] || [ "$target" == "iwmmxt2-wince-vs8" ];then
|
||||
case "$name" in
|
||||
vpx_decoder) tag DeploymentTool \
|
||||
vpx) tag DeploymentTool \
|
||||
ForceDirty="-1" \
|
||||
RegisterOutput="0"
|
||||
;;
|
||||
|
@ -2,10 +2,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
@ -24,7 +25,7 @@ files.
|
||||
Options:
|
||||
--help Print this message
|
||||
--out=outfile Redirect output to a file
|
||||
--ver=version Version (7,8) of visual studio to generate for
|
||||
--ver=version Version (7,8,9) of visual studio to generate for
|
||||
--target=isa-os-cc Target specifier
|
||||
EOF
|
||||
exit 1
|
||||
@ -192,11 +193,11 @@ ${TAB}rm -rf "$platform"/"$config"
|
||||
ifneq (\$(found_devenv),)
|
||||
ifeq (\$(CONFIG_VS_VERSION),7)
|
||||
$nows_sln_config: $outfile
|
||||
${TAB}devenv.com $outfile /build "$config"
|
||||
${TAB}devenv.com $outfile -build "$config"
|
||||
|
||||
else
|
||||
$nows_sln_config: $outfile
|
||||
${TAB}devenv.com $outfile /build "$sln_config"
|
||||
${TAB}devenv.com $outfile -build "$sln_config"
|
||||
|
||||
endif
|
||||
else
|
||||
@ -223,7 +224,7 @@ for opt in "$@"; do
|
||||
;;
|
||||
--ver=*) vs_ver="$optval"
|
||||
case $optval in
|
||||
[78])
|
||||
[789])
|
||||
;;
|
||||
*) die Unrecognized Visual Studio Version in $opt
|
||||
;;
|
||||
@ -234,7 +235,7 @@ for opt in "$@"; do
|
||||
7) sln_vers="8.00"
|
||||
sln_vers_str="Visual Studio .NET 2003"
|
||||
;;
|
||||
8)
|
||||
[89])
|
||||
;;
|
||||
*) die "Unrecognized Visual Studio Version '$optval' in $opt"
|
||||
;;
|
||||
@ -256,6 +257,9 @@ case "${vs_ver:-8}" in
|
||||
8) sln_vers="9.00"
|
||||
sln_vers_str="Visual Studio 2005"
|
||||
;;
|
||||
9) sln_vers="10.00"
|
||||
sln_vers_str="Visual Studio 2008"
|
||||
;;
|
||||
esac
|
||||
|
||||
for f in "${file_list[@]}"; do
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
|
115
build/x86-msvs/yasm.rules
Normal file
115
build/x86-msvs/yasm.rules
Normal file
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<VisualStudioToolFile
|
||||
Name="Yasm"
|
||||
Version="8.00"
|
||||
>
|
||||
<Rules>
|
||||
<CustomBuildRule
|
||||
Name="YASM"
|
||||
DisplayName="Yasm Assembler"
|
||||
CommandLine="yasm -Xvc -f $(PlatformName) [AllOptions] [AdditionalOptions] [Inputs]"
|
||||
Outputs="[$ObjectFileName]"
|
||||
FileExtensions="*.asm"
|
||||
ExecutionDescription="Assembling $(InputFileName)"
|
||||
ShowOnlyRuleProperties="false"
|
||||
>
|
||||
<Properties>
|
||||
<StringProperty
|
||||
Name="Defines"
|
||||
DisplayName="Definitions"
|
||||
Category="Pre-Defined Symbols"
|
||||
Description="Specify pre-defined symbols ('symbol' or 'symbol = value') "
|
||||
Switch="-D [value]"
|
||||
Delimited="true"
|
||||
Inheritable="true"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="IncludePaths"
|
||||
DisplayName="Include Paths"
|
||||
Category="Configuration"
|
||||
Description="Set the paths for any additional include files"
|
||||
Switch="-I [value]"
|
||||
Delimited="true"
|
||||
Inheritable="true"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="UnDefines"
|
||||
DisplayName="Remove Definitions"
|
||||
Category="Pre-Defined Symbols"
|
||||
Description="Remove pre-defined symbols "
|
||||
Switch="-U [value]"
|
||||
Delimited="true"
|
||||
Inheritable="true"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="ObjectFileName"
|
||||
DisplayName="Object File Name"
|
||||
Category="Output"
|
||||
Description="Select the output file name"
|
||||
Switch="-o [value]"
|
||||
DefaultValue="$(IntDir)\$(InputName).obj"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="ListFileName"
|
||||
DisplayName="List File Name"
|
||||
Category="Output"
|
||||
Description="Select an output listing by setting its file name"
|
||||
Switch="-l [value]"
|
||||
/>
|
||||
<StringProperty
|
||||
Name="PreIncludeFile"
|
||||
DisplayName="Pre Include File"
|
||||
Category="Configuration"
|
||||
Description="Select a pre-included file by setting its name"
|
||||
Switch="-P [value]"
|
||||
/>
|
||||
<BooleanProperty
|
||||
Name="Debug"
|
||||
DisplayName="Debug Information"
|
||||
Category="Output"
|
||||
Description="Generate debugging information"
|
||||
Switch="-g cv8"
|
||||
/>
|
||||
<EnumProperty
|
||||
Name="PreProc"
|
||||
DisplayName="Pre-Processor"
|
||||
Category="Configuration"
|
||||
Description="Select the pre-processor ('nasm' or 'raw')"
|
||||
>
|
||||
<Values>
|
||||
<EnumValue
|
||||
Value="0"
|
||||
Switch="-rnasm"
|
||||
DisplayName="Nasm "
|
||||
/>
|
||||
<EnumValue
|
||||
Value="1"
|
||||
Switch="-rraw"
|
||||
DisplayName="Raw"
|
||||
/>
|
||||
</Values>
|
||||
</EnumProperty>
|
||||
<EnumProperty
|
||||
Name="Parser"
|
||||
DisplayName="Parser"
|
||||
Category="Configuration"
|
||||
Description="Select the parser for Intel ('nasm') or AT&T ( 'gas') syntax"
|
||||
>
|
||||
<Values>
|
||||
<EnumValue
|
||||
Value="0"
|
||||
Switch="-pnasm"
|
||||
DisplayName="Nasm"
|
||||
/>
|
||||
<EnumValue
|
||||
Value="1"
|
||||
Switch="-pgas"
|
||||
DisplayName="Gas"
|
||||
/>
|
||||
</Values>
|
||||
</EnumProperty>
|
||||
</Properties>
|
||||
</CustomBuildRule>
|
||||
</Rules>
|
||||
</VisualStudioToolFile>
|
||||
|
38
configure
vendored
38
configure
vendored
@ -27,18 +27,18 @@ Advanced options:
|
||||
supported by hardware [auto]
|
||||
${toggle_codec_srcs} in/exclude codec library source code
|
||||
${toggle_debug_libs} in/exclude debug version of libraries
|
||||
${toggle_eval_limit} enable limited evaluation build
|
||||
${toggle_md5} support for output of checksum data
|
||||
${toggle_static_msvcrt} use static MSVCRT (VS builds only)
|
||||
${toggle_vp8} VP8 codec support
|
||||
${toggle_psnr} output of PSNR data, if supported (encoders)
|
||||
${toggle_mem_tracker} track memory usage
|
||||
${toggle_eval_limit} decoder limitted to 500 frames
|
||||
${toggle_postproc} postprocessing
|
||||
${toggle_multithread} multithreaded encoding and decoding.
|
||||
${toggle_spatial_resampling} spatial sampling (scaling) support
|
||||
${toggle_realtime_only} enable this option while building for real-time encoding
|
||||
${toggle_runtime_cpu_detect} runtime cpu detection
|
||||
${toggle_shared} shared library support
|
||||
${toggle_arm_asm_detok} assembly version of the detokenizer (ARM platforms only)
|
||||
|
||||
Codecs:
|
||||
Codecs can be selectively enabled or disabled individually, or by family:
|
||||
@ -108,10 +108,13 @@ all_platforms="${all_platforms} x86-solaris-gcc"
|
||||
all_platforms="${all_platforms} x86-win32-gcc"
|
||||
all_platforms="${all_platforms} x86-win32-vs7"
|
||||
all_platforms="${all_platforms} x86-win32-vs8"
|
||||
all_platforms="${all_platforms} x86-win32-vs9"
|
||||
all_platforms="${all_platforms} x86_64-darwin9-gcc"
|
||||
all_platforms="${all_platforms} x86_64-linux-gcc"
|
||||
all_platforms="${all_platforms} x86_64-linux-icc"
|
||||
all_platforms="${all_platforms} x86_64-solaris-gcc"
|
||||
all_platforms="${all_platforms} x86_64-win64-vs8"
|
||||
all_platforms="${all_platforms} x86_64-win64-vs9"
|
||||
all_platforms="${all_platforms} universal-darwin8-gcc"
|
||||
all_platforms="${all_platforms} universal-darwin9-gcc"
|
||||
all_platforms="${all_platforms} generic-gnu"
|
||||
@ -230,11 +233,8 @@ CONFIG_LIST="
|
||||
|
||||
dequant_tokens
|
||||
dc_recon
|
||||
new_tokens
|
||||
eval_limit
|
||||
runtime_cpu_detect
|
||||
postproc
|
||||
postproc_generic
|
||||
multithread
|
||||
psnr
|
||||
${CODECS}
|
||||
@ -244,6 +244,8 @@ CONFIG_LIST="
|
||||
static_msvcrt
|
||||
spatial_resampling
|
||||
realtime_only
|
||||
shared
|
||||
arm_asm_detok
|
||||
|
||||
experimental
|
||||
${EXPERIMENT_LIST}
|
||||
@ -273,10 +275,7 @@ CMDLINE_SELECT="
|
||||
|
||||
dequant_tokens
|
||||
dc_recon
|
||||
new_tokens
|
||||
eval_limit
|
||||
postproc
|
||||
postproc_generic
|
||||
multithread
|
||||
psnr
|
||||
${CODECS}
|
||||
@ -285,6 +284,8 @@ CMDLINE_SELECT="
|
||||
mem_tracker
|
||||
spatial_resampling
|
||||
realtime_only
|
||||
shared
|
||||
arm_asm_detok
|
||||
experimental
|
||||
"
|
||||
|
||||
@ -376,7 +377,6 @@ process_targets() {
|
||||
enabled codec_srcs && DIST_DIR="${DIST_DIR}-src"
|
||||
! enabled postproc && DIST_DIR="${DIST_DIR}-nopost"
|
||||
! enabled multithread && DIST_DIR="${DIST_DIR}-nomt"
|
||||
enabled eval_limit && DIST_DIR="${DIST_DIR}-eval"
|
||||
! enabled install_docs && DIST_DIR="${DIST_DIR}-nodocs"
|
||||
DIST_DIR="${DIST_DIR}-${tgt_isa}-${tgt_os}"
|
||||
case "${tgt_os}" in
|
||||
@ -387,6 +387,12 @@ process_targets() {
|
||||
if [ -f "${source_path}/build/make/version.sh" ]; then
|
||||
local ver=`"$source_path/build/make/version.sh" --bare $source_path`
|
||||
DIST_DIR="${DIST_DIR}-${ver}"
|
||||
ver=${ver%%-*}
|
||||
VERSION_PATCH=${ver##*.}
|
||||
ver=${ver%.*}
|
||||
VERSION_MINOR=${ver##*.}
|
||||
ver=${ver#v}
|
||||
VERSION_MAJOR=${ver%.*}
|
||||
fi
|
||||
enabled child || cat <<EOF >> config.mk
|
||||
ifeq (\$(MAKECMDGOALS),dist)
|
||||
@ -395,6 +401,12 @@ else
|
||||
DIST_DIR?=\$(DESTDIR)${prefix}
|
||||
endif
|
||||
LIBSUBDIR=${libdir##${prefix}/}
|
||||
|
||||
VERSION_MAJOR=${VERSION_MAJOR}
|
||||
VERSION_MINOR=${VERSION_MINOR}
|
||||
VERSION_PATCH=${VERSION_PATCH}
|
||||
|
||||
CONFIGURE_ARGS=${CONFIGURE_ARGS}
|
||||
EOF
|
||||
enabled child || echo "CONFIGURE_ARGS?=${CONFIGURE_ARGS}" >> config.mk
|
||||
|
||||
@ -414,6 +426,12 @@ EOF
|
||||
}
|
||||
|
||||
process_detect() {
|
||||
if enabled shared; then
|
||||
# Can only build shared libs on a subset of platforms. Doing this check
|
||||
# here rather than at option parse time because the target auto-detect
|
||||
# magic happens after the command line has been parsed.
|
||||
enabled linux || die "--enable-shared only supported on ELF for now"
|
||||
fi
|
||||
if [ -z "$CC" ]; then
|
||||
echo "Bypassing toolchain for environment detection."
|
||||
enable external_build
|
||||
@ -523,8 +541,6 @@ process_toolchain() {
|
||||
enable solution
|
||||
vs_version=${tgt_cc##vs}
|
||||
all_targets="${all_targets} solution"
|
||||
INLINE=__inline
|
||||
FORCEINLINE=__forceinline
|
||||
;;
|
||||
esac
|
||||
|
||||
|
9
docs.mk
9
docs.mk
@ -1,10 +1,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
14
examples.mk
14
examples.mk
@ -1,10 +1,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
@ -19,8 +20,9 @@ ivfdec.SRCS += args.c args.h vpx_ports/config.h
|
||||
ivfdec.GUID = BA5FE66F-38DD-E034-F542-B1578C5FB950
|
||||
ivfdec.DESCRIPTION = Full featured decoder
|
||||
UTILS-$(CONFIG_ENCODERS) += ivfenc.c
|
||||
ivfenc.SRCS += args.c args.h vpx_ports/config.h
|
||||
ivfenc.SRCS += vpx_ports/mem_ops.h vpx_ports/mem_ops_aligned.h
|
||||
ivfenc.SRCS += args.c args.h y4minput.c y4minput.h
|
||||
ivfenc.SRCS += vpx_ports/config.h vpx_ports/mem_ops.h
|
||||
ivfenc.SRCS += vpx_ports/mem_ops_aligned.h
|
||||
ivfenc.GUID = 548DEC74-7A15-4B2B-AFC3-AA102E7C25C1
|
||||
ivfenc.DESCRIPTION = Full featured encoder
|
||||
|
||||
|
@ -26,21 +26,21 @@ is processed, then U, then V. It is important to honor the image's `stride`
|
||||
values.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PROCESS_DX
|
||||
unsigned char md5_sum[16];
|
||||
md5_ctx_t md5;
|
||||
MD5Context md5;
|
||||
int i;
|
||||
|
||||
md5_init(&md5);
|
||||
MD5Init(&md5);
|
||||
|
||||
for(plane=0; plane < 3; plane++) {
|
||||
unsigned char *buf =img->planes[plane];
|
||||
|
||||
for(y=0; y<img->d_h >> (plane?1:0); y++) {
|
||||
md5_update(&md5, buf, img->d_w >> (plane?1:0));
|
||||
MD5Update(&md5, buf, img->d_w >> (plane?1:0));
|
||||
buf += img->stride[plane];
|
||||
}
|
||||
}
|
||||
|
||||
md5_finalize(&md5, md5_sum);
|
||||
MD5Final(md5_sum, &md5);
|
||||
for(i=0; i<16; i++)
|
||||
fprintf(outfile, "%02x",md5_sum[i]);
|
||||
fprintf(outfile, " img-%dx%d-%04d.i420\n", img->d_w, img->d_h,
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
71
ivfdec.c
71
ivfdec.c
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
@ -62,8 +63,10 @@ static const arg_def_t postprocarg = ARG_DEF(NULL, "postproc", 0,
|
||||
"Postprocess decoded frames");
|
||||
static const arg_def_t summaryarg = ARG_DEF(NULL, "summary", 0,
|
||||
"Show timing summary");
|
||||
static const arg_def_t outputfile = ARG_DEF("o", "output-raw-file", 1,
|
||||
static const arg_def_t outputfile = ARG_DEF("o", "output", 1,
|
||||
"Output raw yv12 file instead of images");
|
||||
static const arg_def_t usey4marg = ARG_DEF("y", "y4m", 0,
|
||||
"Output file is YUV4MPEG2");
|
||||
static const arg_def_t threadsarg = ARG_DEF("t", "threads", 1,
|
||||
"Max threads to use");
|
||||
static const arg_def_t quietarg = ARG_DEF("q", "quiet", 0,
|
||||
@ -77,7 +80,7 @@ static const arg_def_t *all_args[] =
|
||||
{
|
||||
&codecarg, &prefixarg, &use_yv12, &use_i420, &flipuvarg, &noblitarg,
|
||||
&progressarg, &limitarg, &postprocarg, &summaryarg, &outputfile,
|
||||
&threadsarg, &quietarg,
|
||||
&usey4marg, &threadsarg, &quietarg,
|
||||
#if CONFIG_MD5
|
||||
&md5arg,
|
||||
#endif
|
||||
@ -232,9 +235,9 @@ void *out_open(const char *out_fn, int do_md5)
|
||||
if (do_md5)
|
||||
{
|
||||
#if CONFIG_MD5
|
||||
md5_ctx_t *md5_ctx = out = malloc(sizeof(md5_ctx_t));
|
||||
MD5Context *md5_ctx = out = malloc(sizeof(MD5Context));
|
||||
(void)out_fn;
|
||||
md5_init(md5_ctx);
|
||||
MD5Init(md5_ctx);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@ -256,7 +259,7 @@ void out_put(void *out, const uint8_t *buf, unsigned int len, int do_md5)
|
||||
if (do_md5)
|
||||
{
|
||||
#if CONFIG_MD5
|
||||
md5_update(out, buf, len);
|
||||
MD5Update(out, buf, len);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@ -273,7 +276,7 @@ void out_close(void *out, const char *out_fn, int do_md5)
|
||||
uint8_t md5[16];
|
||||
int i;
|
||||
|
||||
md5_finalize(out, md5);
|
||||
MD5Final(md5, out);
|
||||
free(out);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
@ -288,7 +291,12 @@ void out_close(void *out, const char *out_fn, int do_md5)
|
||||
}
|
||||
}
|
||||
|
||||
unsigned int file_is_ivf(FILE *infile, unsigned int *fourcc)
|
||||
unsigned int file_is_ivf(FILE *infile,
|
||||
unsigned int *fourcc,
|
||||
unsigned int *width,
|
||||
unsigned int *height,
|
||||
unsigned int *timebase_num,
|
||||
unsigned int *timebase_den)
|
||||
{
|
||||
char raw_hdr[32];
|
||||
int is_ivf = 0;
|
||||
@ -305,6 +313,10 @@ unsigned int file_is_ivf(FILE *infile, unsigned int *fourcc)
|
||||
" decode properly.");
|
||||
|
||||
*fourcc = mem_get_le32(raw_hdr + 8);
|
||||
*width = mem_get_le16(raw_hdr + 12);
|
||||
*height = mem_get_le16(raw_hdr + 14);
|
||||
*timebase_den = mem_get_le32(raw_hdr + 16);
|
||||
*timebase_num = mem_get_le32(raw_hdr + 20);
|
||||
}
|
||||
}
|
||||
|
||||
@ -330,6 +342,11 @@ int main(int argc, const char **argv_)
|
||||
struct arg arg;
|
||||
char **argv, **argi, **argj;
|
||||
const char *fn2 = 0;
|
||||
int use_y4m = 0;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned int timebase_num;
|
||||
unsigned int timebase_den;
|
||||
void *out = NULL;
|
||||
vpx_codec_dec_cfg_t cfg = {0};
|
||||
#if CONFIG_VP8_DECODER
|
||||
@ -361,6 +378,8 @@ int main(int argc, const char **argv_)
|
||||
}
|
||||
else if (arg_match(&arg, &outputfile, argi))
|
||||
fn2 = arg.val;
|
||||
else if (arg_match(&arg, &usey4marg, argi))
|
||||
use_y4m = 1;
|
||||
else if (arg_match(&arg, &prefixarg, argi))
|
||||
prefix = strdup(arg.val);
|
||||
else if (arg_match(&arg, &use_yv12, argi))
|
||||
@ -446,10 +465,31 @@ int main(int argc, const char **argv_)
|
||||
if (fn2)
|
||||
out = out_open(fn2, do_md5);
|
||||
|
||||
is_ivf = file_is_ivf(infile, &fourcc);
|
||||
is_ivf = file_is_ivf(infile, &fourcc, &width, &height,
|
||||
&timebase_num, &timebase_den);
|
||||
|
||||
if (is_ivf)
|
||||
{
|
||||
if (use_y4m)
|
||||
{
|
||||
char buffer[128];
|
||||
if (!fn2)
|
||||
{
|
||||
fprintf(stderr, "YUV4MPEG2 output only supported with -o.\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
/*Correct for the factor of 2 applied to the timebase in the
|
||||
encoder.*/
|
||||
if(timebase_den&1)timebase_num<<=1;
|
||||
else timebase_den>>=1;
|
||||
/*Note: We can't output an aspect ratio here because IVF doesn't
|
||||
store one, and neither does VP8.
|
||||
That will have to wait until these tools support WebM natively.*/
|
||||
sprintf(buffer, "YUV4MPEG2 C%s W%u H%u F%u:%u I%c\n",
|
||||
"420jpeg", width, height, timebase_den, timebase_num, 'p');
|
||||
out_put(out, (unsigned char *)buffer, strlen(buffer), do_md5);
|
||||
}
|
||||
|
||||
/* Try to determine the codec from the fourcc. */
|
||||
for (i = 0; i < sizeof(ifaces) / sizeof(ifaces[0]); i++)
|
||||
if ((fourcc & ifaces[i].fourcc_mask) == ifaces[i].fourcc)
|
||||
@ -465,6 +505,11 @@ int main(int argc, const char **argv_)
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(use_y4m)
|
||||
{
|
||||
fprintf(stderr, "YUV4MPEG2 output only supported from IVF input.\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (vpx_codec_dec_init(&decoder, iface ? iface : ifaces[0].iface, &cfg,
|
||||
postproc ? VPX_CODEC_USE_POSTPROC : 0))
|
||||
@ -533,6 +578,8 @@ int main(int argc, const char **argv_)
|
||||
prefix, img->d_w, img->d_h, frame_in, sfx);
|
||||
out = out_open(out_fn, do_md5);
|
||||
}
|
||||
else if(use_y4m)
|
||||
out_put(out, (unsigned char *)"FRAME\n", 6, do_md5);
|
||||
|
||||
buf = img->planes[VPX_PLANE_Y];
|
||||
|
||||
|
421
ivfenc.c
421
ivfenc.c
@ -1,17 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
/* This is a simple program that encodes YV12 files and generates ivf
|
||||
* files using the new interface.
|
||||
*/
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(_WIN32)
|
||||
#define USE_POSIX_MMAP 0
|
||||
#else
|
||||
#define USE_POSIX_MMAP 1
|
||||
@ -33,6 +34,7 @@
|
||||
#include "vpx/vp8cx.h"
|
||||
#include "vpx_ports/mem_ops.h"
|
||||
#include "vpx_ports/vpx_timer.h"
|
||||
#include "y4minput.h"
|
||||
|
||||
static const char *exec_name;
|
||||
|
||||
@ -57,8 +59,8 @@ void die(const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
vprintf(fmt, ap);
|
||||
printf("\n");
|
||||
vfprintf(stderr, fmt, ap);
|
||||
fprintf(stderr, "\n");
|
||||
usage_exit();
|
||||
}
|
||||
|
||||
@ -68,10 +70,10 @@ static void ctx_exit_on_error(vpx_codec_ctx_t *ctx, const char *s)
|
||||
{
|
||||
const char *detail = vpx_codec_error_detail(ctx);
|
||||
|
||||
printf("%s: %s\n", s, vpx_codec_error(ctx));
|
||||
fprintf(stderr, "%s: %s\n", s, vpx_codec_error(ctx));
|
||||
|
||||
if (detail)
|
||||
printf(" %s\n", detail);
|
||||
fprintf(stderr, " %s\n", detail);
|
||||
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
@ -221,49 +223,79 @@ vpx_fixed_buf_t stats_get(stats_io_t *stats)
|
||||
return stats->buf;
|
||||
}
|
||||
|
||||
enum video_file_type
|
||||
{
|
||||
FILE_TYPE_RAW,
|
||||
FILE_TYPE_IVF,
|
||||
FILE_TYPE_Y4M
|
||||
};
|
||||
|
||||
struct detect_buffer {
|
||||
char buf[4];
|
||||
int valid;
|
||||
};
|
||||
|
||||
|
||||
#define IVF_FRAME_HDR_SZ (4+8) /* 4 byte size + 8 byte timestamp */
|
||||
static int read_frame(FILE *f, vpx_image_t *img, unsigned int is_ivf)
|
||||
static int read_frame(FILE *f, vpx_image_t *img, unsigned int file_type,
|
||||
y4m_input *y4m, struct detect_buffer *detect)
|
||||
{
|
||||
int plane = 0;
|
||||
|
||||
if (is_ivf)
|
||||
if (file_type == FILE_TYPE_Y4M)
|
||||
{
|
||||
char junk[IVF_FRAME_HDR_SZ];
|
||||
|
||||
/* Skip the frame header. We know how big the frame should be. See
|
||||
* write_ivf_frame_header() for documentation on the frame header
|
||||
* layout.
|
||||
*/
|
||||
fread(junk, 1, IVF_FRAME_HDR_SZ, f);
|
||||
if (y4m_input_fetch_frame(y4m, f, img) < 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (plane = 0; plane < 3; plane++)
|
||||
else
|
||||
{
|
||||
unsigned char *ptr;
|
||||
int w = (plane ? (1 + img->d_w) / 2 : img->d_w);
|
||||
int h = (plane ? (1 + img->d_h) / 2 : img->d_h);
|
||||
int r;
|
||||
|
||||
/* Determine the correct plane based on the image format. The for-loop
|
||||
* always counts in Y,U,V order, but this may not match the order of
|
||||
* the data on disk.
|
||||
*/
|
||||
switch (plane)
|
||||
if (file_type == FILE_TYPE_IVF)
|
||||
{
|
||||
case 1:
|
||||
ptr = img->planes[img->fmt==VPX_IMG_FMT_YV12? VPX_PLANE_V : VPX_PLANE_U];
|
||||
break;
|
||||
case 2:
|
||||
ptr = img->planes[img->fmt==VPX_IMG_FMT_YV12?VPX_PLANE_U : VPX_PLANE_V];
|
||||
break;
|
||||
default:
|
||||
ptr = img->planes[plane];
|
||||
char junk[IVF_FRAME_HDR_SZ];
|
||||
|
||||
/* Skip the frame header. We know how big the frame should be. See
|
||||
* write_ivf_frame_header() for documentation on the frame header
|
||||
* layout.
|
||||
*/
|
||||
fread(junk, 1, IVF_FRAME_HDR_SZ, f);
|
||||
}
|
||||
|
||||
for (r = 0; r < h; r++)
|
||||
for (plane = 0; plane < 3; plane++)
|
||||
{
|
||||
fread(ptr, 1, w, f);
|
||||
ptr += img->stride[plane];
|
||||
unsigned char *ptr;
|
||||
int w = (plane ? (1 + img->d_w) / 2 : img->d_w);
|
||||
int h = (plane ? (1 + img->d_h) / 2 : img->d_h);
|
||||
int r;
|
||||
|
||||
/* Determine the correct plane based on the image format. The for-loop
|
||||
* always counts in Y,U,V order, but this may not match the order of
|
||||
* the data on disk.
|
||||
*/
|
||||
switch (plane)
|
||||
{
|
||||
case 1:
|
||||
ptr = img->planes[img->fmt==VPX_IMG_FMT_YV12? VPX_PLANE_V : VPX_PLANE_U];
|
||||
break;
|
||||
case 2:
|
||||
ptr = img->planes[img->fmt==VPX_IMG_FMT_YV12?VPX_PLANE_U : VPX_PLANE_V];
|
||||
break;
|
||||
default:
|
||||
ptr = img->planes[plane];
|
||||
}
|
||||
|
||||
for (r = 0; r < h; r++)
|
||||
{
|
||||
if (detect->valid)
|
||||
{
|
||||
memcpy(ptr, detect->buf, 4);
|
||||
fread(ptr+4, 1, w-4, f);
|
||||
detect->valid = 0;
|
||||
}
|
||||
else
|
||||
fread(ptr, 1, w, f);
|
||||
|
||||
ptr += img->stride[plane];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,22 +303,36 @@ static int read_frame(FILE *f, vpx_image_t *img, unsigned int is_ivf)
|
||||
}
|
||||
|
||||
|
||||
unsigned int file_is_y4m(FILE *infile,
|
||||
y4m_input *y4m,
|
||||
char detect[4])
|
||||
{
|
||||
if(memcmp(detect, "YUV4", 4) == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define IVF_FILE_HDR_SZ (32)
|
||||
unsigned int file_is_ivf(FILE *infile,
|
||||
unsigned int *fourcc,
|
||||
unsigned int *width,
|
||||
unsigned int *height)
|
||||
unsigned int *height,
|
||||
char detect[4])
|
||||
{
|
||||
char raw_hdr[IVF_FILE_HDR_SZ];
|
||||
int is_ivf = 0;
|
||||
|
||||
if(memcmp(detect, "DKIF", 4) != 0)
|
||||
return 0;
|
||||
|
||||
/* See write_ivf_file_header() for more documentation on the file header
|
||||
* layout.
|
||||
*/
|
||||
if (fread(raw_hdr, 1, IVF_FILE_HDR_SZ, infile) == IVF_FILE_HDR_SZ)
|
||||
if (fread(raw_hdr + 4, 1, IVF_FILE_HDR_SZ - 4, infile)
|
||||
== IVF_FILE_HDR_SZ - 4)
|
||||
{
|
||||
if (raw_hdr[0] == 'D' && raw_hdr[1] == 'K'
|
||||
&& raw_hdr[2] == 'I' && raw_hdr[3] == 'F')
|
||||
{
|
||||
is_ivf = 1;
|
||||
|
||||
@ -303,8 +349,6 @@ unsigned int file_is_ivf(FILE *infile,
|
||||
*width = mem_get_le16(raw_hdr + 12);
|
||||
*height = mem_get_le16(raw_hdr + 14);
|
||||
}
|
||||
else
|
||||
rewind(infile);
|
||||
|
||||
return is_ivf;
|
||||
}
|
||||
@ -465,9 +509,11 @@ static const arg_def_t kf_min_dist = ARG_DEF(NULL, "kf-min-dist", 1,
|
||||
"Minimum keyframe interval (frames)");
|
||||
static const arg_def_t kf_max_dist = ARG_DEF(NULL, "kf-max-dist", 1,
|
||||
"Maximum keyframe interval (frames)");
|
||||
static const arg_def_t kf_disabled = ARG_DEF(NULL, "disable-kf", 0,
|
||||
"Disable keyframe placement");
|
||||
static const arg_def_t *kf_args[] =
|
||||
{
|
||||
&kf_min_dist, &kf_max_dist, NULL
|
||||
&kf_min_dist, &kf_max_dist, &kf_disabled, NULL
|
||||
};
|
||||
|
||||
|
||||
@ -518,28 +564,28 @@ static void usage_exit()
|
||||
{
|
||||
int i;
|
||||
|
||||
printf("Usage: %s <options> src_filename dst_filename\n", exec_name);
|
||||
fprintf(stderr, "Usage: %s <options> src_filename dst_filename\n", exec_name);
|
||||
|
||||
printf("\n_options:\n");
|
||||
fprintf(stderr, "\n_options:\n");
|
||||
arg_show_usage(stdout, main_args);
|
||||
printf("\n_encoder Global Options:\n");
|
||||
fprintf(stderr, "\n_encoder Global Options:\n");
|
||||
arg_show_usage(stdout, global_args);
|
||||
printf("\n_rate Control Options:\n");
|
||||
fprintf(stderr, "\n_rate Control Options:\n");
|
||||
arg_show_usage(stdout, rc_args);
|
||||
printf("\n_twopass Rate Control Options:\n");
|
||||
fprintf(stderr, "\n_twopass Rate Control Options:\n");
|
||||
arg_show_usage(stdout, rc_twopass_args);
|
||||
printf("\n_keyframe Placement Options:\n");
|
||||
fprintf(stderr, "\n_keyframe Placement Options:\n");
|
||||
arg_show_usage(stdout, kf_args);
|
||||
#if CONFIG_VP8_ENCODER
|
||||
printf("\n_vp8 Specific Options:\n");
|
||||
fprintf(stderr, "\n_vp8 Specific Options:\n");
|
||||
arg_show_usage(stdout, vp8_args);
|
||||
#endif
|
||||
printf("\n"
|
||||
fprintf(stderr, "\n"
|
||||
"Included encoders:\n"
|
||||
"\n");
|
||||
|
||||
for (i = 0; i < sizeof(codecs) / sizeof(codecs[0]); i++)
|
||||
printf(" %-6s - %s\n",
|
||||
fprintf(stderr, " %-6s - %s\n",
|
||||
codecs[i].name,
|
||||
vpx_codec_iface_name(codecs[i].iface));
|
||||
|
||||
@ -572,8 +618,10 @@ int main(int argc, const char **argv_)
|
||||
static const int *ctrl_args_map = NULL;
|
||||
int verbose = 0, show_psnr = 0;
|
||||
int arg_use_i420 = 1;
|
||||
int arg_have_timebase = 0;
|
||||
unsigned long cx_time = 0;
|
||||
unsigned int is_ivf, fourcc;
|
||||
unsigned int file_type, fourcc;
|
||||
y4m_input y4m;
|
||||
|
||||
exec_name = argv_[0];
|
||||
|
||||
@ -657,7 +705,7 @@ int main(int argc, const char **argv_)
|
||||
/* DWIM: Assume the user meant passes=2 if pass=2 is specified */
|
||||
if (one_pass_only > arg_passes)
|
||||
{
|
||||
printf("Warning: Assuming --pass=%d implies --passes=%d\n",
|
||||
fprintf(stderr, "Warning: Assuming --pass=%d implies --passes=%d\n",
|
||||
one_pass_only, one_pass_only);
|
||||
arg_passes = one_pass_only;
|
||||
}
|
||||
@ -671,7 +719,8 @@ int main(int argc, const char **argv_)
|
||||
|
||||
if (res)
|
||||
{
|
||||
printf("Failed to get config: %s\n", vpx_codec_err_to_string(res));
|
||||
fprintf(stderr, "Failed to get config: %s\n",
|
||||
vpx_codec_err_to_string(res));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@ -690,7 +739,10 @@ int main(int argc, const char **argv_)
|
||||
else if (arg_match(&arg, &height, argi))
|
||||
cfg.g_h = arg_parse_uint(&arg);
|
||||
else if (arg_match(&arg, &timebase, argi))
|
||||
{
|
||||
cfg.g_timebase = arg_parse_rational(&arg);
|
||||
arg_have_timebase = 1;
|
||||
}
|
||||
else if (arg_match(&arg, &error_resilient, argi))
|
||||
cfg.g_error_resilient = arg_parse_uint(&arg);
|
||||
else if (arg_match(&arg, &lag_in_frames, argi))
|
||||
@ -728,29 +780,34 @@ int main(int argc, const char **argv_)
|
||||
cfg.rc_2pass_vbr_bias_pct = arg_parse_uint(&arg);
|
||||
|
||||
if (arg_passes < 2)
|
||||
printf("Warning: option %s ignored in one-pass mode.\n",
|
||||
arg.name);
|
||||
fprintf(stderr,
|
||||
"Warning: option %s ignored in one-pass mode.\n",
|
||||
arg.name);
|
||||
}
|
||||
else if (arg_match(&arg, &minsection_pct, argi))
|
||||
{
|
||||
cfg.rc_2pass_vbr_minsection_pct = arg_parse_uint(&arg);
|
||||
|
||||
if (arg_passes < 2)
|
||||
printf("Warning: option %s ignored in one-pass mode.\n",
|
||||
arg.name);
|
||||
fprintf(stderr,
|
||||
"Warning: option %s ignored in one-pass mode.\n",
|
||||
arg.name);
|
||||
}
|
||||
else if (arg_match(&arg, &maxsection_pct, argi))
|
||||
{
|
||||
cfg.rc_2pass_vbr_maxsection_pct = arg_parse_uint(&arg);
|
||||
|
||||
if (arg_passes < 2)
|
||||
printf("Warning: option %s ignored in one-pass mode.\n",
|
||||
arg.name);
|
||||
fprintf(stderr,
|
||||
"Warning: option %s ignored in one-pass mode.\n",
|
||||
arg.name);
|
||||
}
|
||||
else if (arg_match(&arg, &kf_min_dist, argi))
|
||||
cfg.kf_min_dist = arg_parse_uint(&arg);
|
||||
else if (arg_match(&arg, &kf_max_dist, argi))
|
||||
cfg.kf_max_dist = arg_parse_uint(&arg);
|
||||
else if (arg_match(&arg, &kf_disabled, argi))
|
||||
cfg.kf_mode = VPX_KF_DISABLED;
|
||||
else
|
||||
argj++;
|
||||
}
|
||||
@ -794,7 +851,7 @@ int main(int argc, const char **argv_)
|
||||
|
||||
/* Check for unrecognized options */
|
||||
for (argi = argv; *argi; argi++)
|
||||
if (argi[0][0] == '-')
|
||||
if (argi[0][0] == '-' && argi[0][1])
|
||||
die("Error: Unrecognized option %s\n", *argi);
|
||||
|
||||
/* Handle non-option arguments */
|
||||
@ -804,106 +861,136 @@ int main(int argc, const char **argv_)
|
||||
if (!in_fn || !out_fn)
|
||||
usage_exit();
|
||||
|
||||
/* Parse certain options from the input file, if possible */
|
||||
infile = fopen(in_fn, "rb");
|
||||
|
||||
if (!infile)
|
||||
{
|
||||
printf("Failed to open input file");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
is_ivf = file_is_ivf(infile, &fourcc, &cfg.g_w, &cfg.g_h);
|
||||
|
||||
if (is_ivf)
|
||||
{
|
||||
switch (fourcc)
|
||||
{
|
||||
case 0x32315659:
|
||||
arg_use_i420 = 0;
|
||||
break;
|
||||
case 0x30323449:
|
||||
arg_use_i420 = 1;
|
||||
break;
|
||||
default:
|
||||
printf("Unsupported fourcc (%08x) in IVF\n", fourcc);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
fclose(infile);
|
||||
|
||||
|
||||
#define SHOW(field) printf(" %-28s = %d\n", #field, cfg.field)
|
||||
|
||||
if (verbose)
|
||||
{
|
||||
printf("Codec: %s\n", vpx_codec_iface_name(codec->iface));
|
||||
printf("Source file: %s Format: %s\n", in_fn, arg_use_i420 ? "I420" : "YV12");
|
||||
printf("Destination file: %s\n", out_fn);
|
||||
printf("Encoder parameters:\n");
|
||||
|
||||
SHOW(g_usage);
|
||||
SHOW(g_threads);
|
||||
SHOW(g_profile);
|
||||
SHOW(g_w);
|
||||
SHOW(g_h);
|
||||
SHOW(g_timebase.num);
|
||||
SHOW(g_timebase.den);
|
||||
SHOW(g_error_resilient);
|
||||
SHOW(g_pass);
|
||||
SHOW(g_lag_in_frames);
|
||||
SHOW(rc_dropframe_thresh);
|
||||
SHOW(rc_resize_allowed);
|
||||
SHOW(rc_resize_up_thresh);
|
||||
SHOW(rc_resize_down_thresh);
|
||||
SHOW(rc_end_usage);
|
||||
SHOW(rc_target_bitrate);
|
||||
SHOW(rc_min_quantizer);
|
||||
SHOW(rc_max_quantizer);
|
||||
SHOW(rc_undershoot_pct);
|
||||
SHOW(rc_overshoot_pct);
|
||||
SHOW(rc_buf_sz);
|
||||
SHOW(rc_buf_initial_sz);
|
||||
SHOW(rc_buf_optimal_sz);
|
||||
SHOW(rc_2pass_vbr_bias_pct);
|
||||
SHOW(rc_2pass_vbr_minsection_pct);
|
||||
SHOW(rc_2pass_vbr_maxsection_pct);
|
||||
SHOW(kf_mode);
|
||||
SHOW(kf_min_dist);
|
||||
SHOW(kf_max_dist);
|
||||
}
|
||||
|
||||
vpx_img_alloc(&raw, arg_use_i420 ? VPX_IMG_FMT_I420 : VPX_IMG_FMT_YV12,
|
||||
cfg.g_w, cfg.g_h, 1);
|
||||
|
||||
// This was added so that ivfenc will create monotically increasing
|
||||
// timestamps. Since we create new timestamps for alt-reference frames
|
||||
// we need to make room in the series of timestamps. Since there can
|
||||
// only be 1 alt-ref frame ( current bitstream) multiplying by 2
|
||||
// gives us enough room.
|
||||
cfg.g_timebase.den *= 2;
|
||||
|
||||
memset(&stats, 0, sizeof(stats));
|
||||
|
||||
for (pass = one_pass_only ? one_pass_only - 1 : 0; pass < arg_passes; pass++)
|
||||
{
|
||||
int frames_in = 0, frames_out = 0;
|
||||
unsigned long nbytes = 0;
|
||||
struct detect_buffer detect;
|
||||
|
||||
infile = fopen(in_fn, "rb");
|
||||
/* Parse certain options from the input file, if possible */
|
||||
infile = strcmp(in_fn, "-") ? fopen(in_fn, "rb") : stdin;
|
||||
|
||||
if (!infile)
|
||||
{
|
||||
printf("Failed to open input file");
|
||||
fprintf(stderr, "Failed to open input file\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
outfile = fopen(out_fn, "wb");
|
||||
fread(detect.buf, 1, 4, infile);
|
||||
detect.valid = 0;
|
||||
|
||||
if (file_is_y4m(infile, &y4m, detect.buf))
|
||||
{
|
||||
if (y4m_input_open(&y4m, infile, detect.buf, 4) >= 0)
|
||||
{
|
||||
file_type = FILE_TYPE_Y4M;
|
||||
cfg.g_w = y4m.pic_w;
|
||||
cfg.g_h = y4m.pic_h;
|
||||
/* Use the frame rate from the file only if none was specified
|
||||
* on the command-line.
|
||||
*/
|
||||
if (!arg_have_timebase)
|
||||
{
|
||||
cfg.g_timebase.num = y4m.fps_d;
|
||||
cfg.g_timebase.den = y4m.fps_n;
|
||||
/* And don't reset it in the second pass.*/
|
||||
arg_have_timebase = 1;
|
||||
}
|
||||
arg_use_i420 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Unsupported Y4M stream.\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
else if (file_is_ivf(infile, &fourcc, &cfg.g_w, &cfg.g_h, detect.buf))
|
||||
{
|
||||
file_type = FILE_TYPE_IVF;
|
||||
switch (fourcc)
|
||||
{
|
||||
case 0x32315659:
|
||||
arg_use_i420 = 0;
|
||||
break;
|
||||
case 0x30323449:
|
||||
arg_use_i420 = 1;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "Unsupported fourcc (%08x) in IVF\n", fourcc);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
file_type = FILE_TYPE_RAW;
|
||||
detect.valid = 1;
|
||||
}
|
||||
#define SHOW(field) fprintf(stderr, " %-28s = %d\n", #field, cfg.field)
|
||||
|
||||
if (verbose && pass == 0)
|
||||
{
|
||||
fprintf(stderr, "Codec: %s\n", vpx_codec_iface_name(codec->iface));
|
||||
fprintf(stderr, "Source file: %s Format: %s\n", in_fn,
|
||||
arg_use_i420 ? "I420" : "YV12");
|
||||
fprintf(stderr, "Destination file: %s\n", out_fn);
|
||||
fprintf(stderr, "Encoder parameters:\n");
|
||||
|
||||
SHOW(g_usage);
|
||||
SHOW(g_threads);
|
||||
SHOW(g_profile);
|
||||
SHOW(g_w);
|
||||
SHOW(g_h);
|
||||
SHOW(g_timebase.num);
|
||||
SHOW(g_timebase.den);
|
||||
SHOW(g_error_resilient);
|
||||
SHOW(g_pass);
|
||||
SHOW(g_lag_in_frames);
|
||||
SHOW(rc_dropframe_thresh);
|
||||
SHOW(rc_resize_allowed);
|
||||
SHOW(rc_resize_up_thresh);
|
||||
SHOW(rc_resize_down_thresh);
|
||||
SHOW(rc_end_usage);
|
||||
SHOW(rc_target_bitrate);
|
||||
SHOW(rc_min_quantizer);
|
||||
SHOW(rc_max_quantizer);
|
||||
SHOW(rc_undershoot_pct);
|
||||
SHOW(rc_overshoot_pct);
|
||||
SHOW(rc_buf_sz);
|
||||
SHOW(rc_buf_initial_sz);
|
||||
SHOW(rc_buf_optimal_sz);
|
||||
SHOW(rc_2pass_vbr_bias_pct);
|
||||
SHOW(rc_2pass_vbr_minsection_pct);
|
||||
SHOW(rc_2pass_vbr_maxsection_pct);
|
||||
SHOW(kf_mode);
|
||||
SHOW(kf_min_dist);
|
||||
SHOW(kf_max_dist);
|
||||
}
|
||||
|
||||
if(pass == (one_pass_only ? one_pass_only - 1 : 0)) {
|
||||
if (file_type == FILE_TYPE_Y4M)
|
||||
/*The Y4M reader does its own allocation.
|
||||
Just initialize this here to avoid problems if we never read any
|
||||
frames.*/
|
||||
memset(&raw, 0, sizeof(raw));
|
||||
else
|
||||
vpx_img_alloc(&raw, arg_use_i420 ? VPX_IMG_FMT_I420 : VPX_IMG_FMT_YV12,
|
||||
cfg.g_w, cfg.g_h, 1);
|
||||
|
||||
// This was added so that ivfenc will create monotically increasing
|
||||
// timestamps. Since we create new timestamps for alt-reference frames
|
||||
// we need to make room in the series of timestamps. Since there can
|
||||
// only be 1 alt-ref frame ( current bitstream) multiplying by 2
|
||||
// gives us enough room.
|
||||
cfg.g_timebase.den *= 2;
|
||||
}
|
||||
|
||||
outfile = strcmp(out_fn, "-") ? fopen(out_fn, "wb") : stdout;
|
||||
|
||||
if (!outfile)
|
||||
{
|
||||
printf("Failed to open output file");
|
||||
fprintf(stderr, "Failed to open output file\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@ -911,7 +998,7 @@ int main(int argc, const char **argv_)
|
||||
{
|
||||
if (!stats_open_file(&stats, stats_fn, pass))
|
||||
{
|
||||
printf("Failed to open statistics store\n");
|
||||
fprintf(stderr, "Failed to open statistics store\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
@ -919,7 +1006,7 @@ int main(int argc, const char **argv_)
|
||||
{
|
||||
if (!stats_open_mem(&stats, pass))
|
||||
{
|
||||
printf("Failed to open statistics store\n");
|
||||
fprintf(stderr, "Failed to open statistics store\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
@ -940,9 +1027,6 @@ int main(int argc, const char **argv_)
|
||||
|
||||
|
||||
/* Construct Encoder Context */
|
||||
if (cfg.kf_min_dist == cfg.kf_max_dist)
|
||||
cfg.kf_mode = VPX_KF_FIXED;
|
||||
|
||||
vpx_codec_enc_init(&encoder, codec->iface, &cfg,
|
||||
show_psnr ? VPX_CODEC_USE_PSNR : 0);
|
||||
ctx_exit_on_error(&encoder, "Failed to initialize encoder");
|
||||
@ -954,8 +1038,8 @@ int main(int argc, const char **argv_)
|
||||
for (i = 0; i < arg_ctrl_cnt; i++)
|
||||
{
|
||||
if (vpx_codec_control_(&encoder, arg_ctrls[i][0], arg_ctrls[i][1]))
|
||||
printf("Error: Tried to set control %d = %d\n",
|
||||
arg_ctrls[i][0], arg_ctrls[i][1]);
|
||||
fprintf(stderr, "Error: Tried to set control %d = %d\n",
|
||||
arg_ctrls[i][0], arg_ctrls[i][1]);
|
||||
|
||||
ctx_exit_on_error(&encoder, "Failed to control codec");
|
||||
}
|
||||
@ -971,13 +1055,15 @@ int main(int argc, const char **argv_)
|
||||
|
||||
if (!arg_limit || frames_in < arg_limit)
|
||||
{
|
||||
frame_avail = read_frame(infile, &raw, is_ivf);
|
||||
frame_avail = read_frame(infile, &raw, file_type, &y4m,
|
||||
&detect);
|
||||
|
||||
if (frame_avail)
|
||||
frames_in++;
|
||||
|
||||
printf("\rPass %d/%d frame %4d/%-4d %7ldB \033[K", pass + 1,
|
||||
arg_passes, frames_in, frames_out, nbytes);
|
||||
fprintf(stderr,
|
||||
"\rPass %d/%d frame %4d/%-4d %7ldB \033[K", pass + 1,
|
||||
arg_passes, frames_in, frames_out, nbytes);
|
||||
}
|
||||
else
|
||||
frame_avail = 0;
|
||||
@ -1001,15 +1087,15 @@ int main(int argc, const char **argv_)
|
||||
{
|
||||
case VPX_CODEC_CX_FRAME_PKT:
|
||||
frames_out++;
|
||||
printf(" %6luF",
|
||||
(unsigned long)pkt->data.frame.sz);
|
||||
fprintf(stderr, " %6luF",
|
||||
(unsigned long)pkt->data.frame.sz);
|
||||
write_ivf_frame_header(outfile, pkt);
|
||||
fwrite(pkt->data.frame.buf, 1, pkt->data.frame.sz, outfile);
|
||||
nbytes += pkt->data.raw.sz;
|
||||
break;
|
||||
case VPX_CODEC_STATS_PKT:
|
||||
frames_out++;
|
||||
printf(" %6luS",
|
||||
fprintf(stderr, " %6luS",
|
||||
(unsigned long)pkt->data.twopass_stats.sz);
|
||||
stats_write(&stats,
|
||||
pkt->data.twopass_stats.buf,
|
||||
@ -1023,7 +1109,7 @@ int main(int argc, const char **argv_)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
printf("%.3lf ", pkt->data.psnr.psnr[i]);
|
||||
fprintf(stderr, "%.3lf ", pkt->data.psnr.psnr[i]);
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1038,7 +1124,8 @@ int main(int argc, const char **argv_)
|
||||
/* this bitrate calc is simplified and relies on the fact that this
|
||||
* application uses 1/timebase for framerate.
|
||||
*/
|
||||
printf("\rPass %d/%d frame %4d/%-4d %7ldB %7ldb/f %7"PRId64"b/s"
|
||||
fprintf(stderr,
|
||||
"\rPass %d/%d frame %4d/%-4d %7ldB %7ldb/f %7"PRId64"b/s"
|
||||
" %7lu %s (%.2f fps)\033[K", pass + 1,
|
||||
arg_passes, frames_in, frames_out, nbytes, nbytes * 8 / frames_in,
|
||||
nbytes * 8 *(int64_t)cfg.g_timebase.den/2/ cfg.g_timebase.num / frames_in,
|
||||
@ -1055,7 +1142,7 @@ int main(int argc, const char **argv_)
|
||||
|
||||
fclose(outfile);
|
||||
stats_close(&stats);
|
||||
printf("\n");
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
if (one_pass_only)
|
||||
break;
|
||||
|
@ -1,10 +1,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
|
43
libs.mk
43
libs.mk
@ -1,15 +1,18 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
ASM:=$(if $(filter yes,$(CONFIG_GCC)),.asm.s,.asm)
|
||||
|
||||
CODEC_SRCS-yes += libs.mk
|
||||
|
||||
include $(SRC_PATH_BARE)/vpx/vpx_codec.mk
|
||||
CODEC_SRCS-yes += $(addprefix vpx/,$(call enabled,API_SRCS))
|
||||
|
||||
@ -58,7 +61,6 @@ CODEC_LIB=$(if $(CONFIG_STATIC_MSVCRT),vpxmt,vpxmd)
|
||||
# This variable uses deferred expansion intentionally, since the results of
|
||||
# $(wildcard) may change during the course of the Make.
|
||||
VS_PLATFORMS = $(foreach d,$(wildcard */Release/$(CODEC_LIB).lib),$(word 1,$(subst /, ,$(d))))
|
||||
CODEC_SRCS-yes += $(SRC_PATH_BARE)/libs.mk # to show up in the msvs workspace
|
||||
endif
|
||||
|
||||
# The following pairs define a mapping of locations in the distribution
|
||||
@ -91,7 +93,9 @@ CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/x86.h
|
||||
CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/x86_abi_support.asm
|
||||
endif
|
||||
CODEC_SRCS-$(ARCH_ARM) += $(BUILD_PFX)vpx_config.asm
|
||||
CODEC_EXPORTS-$(BUILD_LIBVPX) += vpx/exports
|
||||
CODEC_EXPORTS-$(BUILD_LIBVPX) += vpx/exports_com
|
||||
CODEC_EXPORTS-$(CONFIG_ENCODERS) += vpx/exports_enc
|
||||
CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
|
||||
|
||||
INSTALL-LIBS-yes += include/vpx/vpx_codec.h
|
||||
INSTALL-LIBS-yes += include/vpx/vpx_image.h
|
||||
@ -129,7 +133,6 @@ ARM_ARCH=v6
|
||||
endif
|
||||
obj_int_extract.vcproj: $(SRC_PATH_BARE)/build/make/obj_int_extract.c
|
||||
@cp $(SRC_PATH_BARE)/build/arm-wince-vs8/obj_int_extract.bat .
|
||||
@cp $(SRC_PATH_BARE)/build/arm-wince-vs8/armasm$(ARM_ARCH).rules .
|
||||
@echo " [CREATE] $@"
|
||||
$(SRC_PATH_BARE)/build/make/gen_msvs_proj.sh\
|
||||
--exe\
|
||||
@ -142,7 +145,6 @@ obj_int_extract.vcproj: $(SRC_PATH_BARE)/build/make/obj_int_extract.c
|
||||
|
||||
PROJECTS-$(BUILD_LIBVPX) += obj_int_extract.vcproj
|
||||
PROJECTS-$(BUILD_LIBVPX) += obj_int_extract.bat
|
||||
PROJECTS-$(BUILD_LIBVPX) += armasm$(ARM_ARCH).rules
|
||||
endif
|
||||
|
||||
vpx.def: $(call enabled,CODEC_EXPORTS)
|
||||
@ -174,6 +176,31 @@ LIBVPX_OBJS=$(call objs,$(CODEC_SRCS))
|
||||
OBJS-$(BUILD_LIBVPX) += $(LIBVPX_OBJS)
|
||||
LIBS-$(BUILD_LIBVPX) += $(BUILD_PFX)libvpx.a $(BUILD_PFX)libvpx_g.a
|
||||
$(BUILD_PFX)libvpx_g.a: $(LIBVPX_OBJS)
|
||||
|
||||
BUILD_LIBVPX_SO := $(if $(BUILD_LIBVPX),$(CONFIG_SHARED))
|
||||
LIBVPX_SO := libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_PATCH)
|
||||
LIBS-$(BUILD_LIBVPX_SO) += $(BUILD_PFX)$(LIBVPX_SO)
|
||||
$(BUILD_PFX)$(LIBVPX_SO): $(LIBVPX_OBJS) libvpx.ver
|
||||
$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm -pthread
|
||||
$(BUILD_PFX)$(LIBVPX_SO): SONAME = libvpx.so.$(VERSION_MAJOR)
|
||||
$(BUILD_PFX)$(LIBVPX_SO): SO_VERSION_SCRIPT = libvpx.ver
|
||||
LIBVPX_SO_SYMLINKS := $(addprefix $(LIBSUBDIR)/, \
|
||||
libvpx.so libvpx.so.$(VERSION_MAJOR) \
|
||||
libvpx.so.$(VERSION_MAJOR).$(VERSION_MINOR))
|
||||
|
||||
libvpx.ver: $(call enabled,CODEC_EXPORTS)
|
||||
@echo " [CREATE] $@"
|
||||
$(qexec)echo "{ global:" > $@
|
||||
$(qexec)for f in $?; do awk '{print $$2";"}' < $$f >>$@; done
|
||||
$(qexec)echo "local: *; };" >> $@
|
||||
CLEAN-OBJS += libvpx.ver
|
||||
|
||||
$(addprefix $(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)):
|
||||
@echo " [LN] $@"
|
||||
$(qexec)ln -sf $(LIBVPX_SO) $@
|
||||
|
||||
INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBVPX_SO_SYMLINKS)
|
||||
INSTALL-LIBS-$(CONFIG_SHARED) += $(LIBSUBDIR)/$(LIBVPX_SO)
|
||||
endif
|
||||
|
||||
LIBS-$(LIPO_LIBVPX) += libvpx.a
|
||||
|
@ -11,7 +11,7 @@
|
||||
source codec deployed on millions of computers and devices worldwide.
|
||||
|
||||
This distribution of the WebM VP8 Codec SDK includes the following support:
|
||||
|
||||
|
||||
\if vp8_encoder - \ref vp8_encoder \endif
|
||||
\if vp8_decoder - \ref vp8_decoder \endif
|
||||
|
||||
|
477
md5_utils.c
477
md5_utils.c
@ -1,298 +1,253 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
* This code implements the MD5 message-digest algorithm.
|
||||
* The algorithm is due to Ron Rivest. This code was
|
||||
* written by Colin Plumb in 1993, no copyright is claimed.
|
||||
* This code is in the public domain; do with it what you wish.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Equivalent code is available from RSA Data Security, Inc.
|
||||
* This code has been tested against that, and is equivalent,
|
||||
* except that you don't need to include two pages of legalese
|
||||
* with every copy.
|
||||
*
|
||||
* To compute the message digest of a chunk of bytes, declare an
|
||||
* MD5Context structure, pass it to MD5Init, call MD5Update as
|
||||
* needed on buffers full of bytes, and then call MD5Final, which
|
||||
* will fill a supplied 16-byte array with the digest.
|
||||
*
|
||||
* Changed so as no longer to depend on Colin Plumb's `usual.h' header
|
||||
* definitions
|
||||
* - Ian Jackson <ian@chiark.greenend.org.uk>.
|
||||
* Still in the public domain.
|
||||
*/
|
||||
|
||||
#include <sys/types.h> /* for stupid systems */
|
||||
|
||||
/*
|
||||
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
||||
rights reserved.
|
||||
|
||||
License to copy and use this software is granted provided that it
|
||||
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
|
||||
Algorithm" in all material mentioning or referencing this software
|
||||
or this function.
|
||||
|
||||
License is also granted to make and use derivative works provided
|
||||
that such works are identified as "derived from the RSA Data
|
||||
Security, Inc. MD5 Message-Digest Algorithm" in all material
|
||||
mentioning or referencing the derived work.
|
||||
|
||||
RSA Data Security, Inc. makes no representations concerning either
|
||||
the merchantability of this software or the suitability of this
|
||||
software for any particular purpose. It is provided "as is"
|
||||
without express or implied warranty of any kind.
|
||||
|
||||
These notices must be retained in any copies of any part of this
|
||||
documentation and/or software.
|
||||
*/
|
||||
#include <string.h> /* for memcpy() */
|
||||
|
||||
#include "md5_utils.h"
|
||||
#include <string.h>
|
||||
|
||||
/* Constants for md5_transform routine.
|
||||
*/
|
||||
#define S11 7
|
||||
#define S12 12
|
||||
#define S13 17
|
||||
#define S14 22
|
||||
#define S21 5
|
||||
#define S22 9
|
||||
#define S23 14
|
||||
#define S24 20
|
||||
#define S31 4
|
||||
#define S32 11
|
||||
#define S33 16
|
||||
#define S34 23
|
||||
#define S41 6
|
||||
#define S42 10
|
||||
#define S43 15
|
||||
#define S44 21
|
||||
|
||||
static void md5_transform(uint32_t state[4], const uint8_t block[64]);
|
||||
static void Encode(uint8_t *output, const uint32_t *input, unsigned int len);
|
||||
static void Decode(uint32_t *output, const uint8_t *input, unsigned int len);
|
||||
#define md5_memset memset
|
||||
#define md5_memcpy memcpy
|
||||
|
||||
static unsigned char PADDING[64] =
|
||||
void
|
||||
byteSwap(UWORD32 *buf, unsigned words)
|
||||
{
|
||||
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
md5byte *p;
|
||||
|
||||
/* F, G, H and I are basic MD5 functions.
|
||||
*/
|
||||
#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
|
||||
#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
|
||||
#define H(x, y, z) ((x) ^ (y) ^ (z))
|
||||
#define I(x, y, z) ((y) ^ ((x) | (~z)))
|
||||
/* Only swap bytes for big endian machines */
|
||||
int i = 1;
|
||||
|
||||
/* ROTATE_LEFT rotates x left n bits.
|
||||
*/
|
||||
#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
|
||||
if (*(char *)&i == 1)
|
||||
return;
|
||||
|
||||
/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
|
||||
Rotation is separate from addition to prevent recomputation.
|
||||
*/
|
||||
#define FF(a, b, c, d, x, s, ac) { \
|
||||
(a) += F ((b), (c), (d)) + (x) + (uint32_t)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
#define GG(a, b, c, d, x, s, ac) { \
|
||||
(a) += G ((b), (c), (d)) + (x) + (uint32_t)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
#define HH(a, b, c, d, x, s, ac) { \
|
||||
(a) += H ((b), (c), (d)) + (x) + (uint32_t)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
#define II(a, b, c, d, x, s, ac) { \
|
||||
(a) += I ((b), (c), (d)) + (x) + (uint32_t)(ac); \
|
||||
(a) = ROTATE_LEFT ((a), (s)); \
|
||||
(a) += (b); \
|
||||
}
|
||||
p = (md5byte *)buf;
|
||||
|
||||
/* MD5 initialization. Begins an MD5 operation, writing a new context.
|
||||
*/
|
||||
void md5_init(md5_ctx_t *context)
|
||||
{
|
||||
context->count[0] = context->count[1] = 0;
|
||||
/* Load magic initialization constants.
|
||||
*/
|
||||
context->state[0] = 0x67452301;
|
||||
context->state[1] = 0xefcdab89;
|
||||
context->state[2] = 0x98badcfe;
|
||||
context->state[3] = 0x10325476;
|
||||
}
|
||||
|
||||
/* MD5 block update operation. Continues an MD5 message-digest
|
||||
operation, processing another message block, and updating the
|
||||
context.
|
||||
*/
|
||||
void md5_update(md5_ctx_t *context, const uint8_t *input, unsigned int input_len)
|
||||
{
|
||||
unsigned int i, index, part_len;
|
||||
|
||||
/* Compute number of bytes mod 64 */
|
||||
index = (unsigned int)((context->count[0] >> 3) & 0x3F);
|
||||
|
||||
/* Update number of bits */
|
||||
if ((context->count[0] += ((uint32_t)input_len << 3))
|
||||
< ((uint32_t)input_len << 3))
|
||||
context->count[1]++;
|
||||
|
||||
context->count[1] += ((uint32_t)input_len >> 29);
|
||||
|
||||
part_len = 64 - index;
|
||||
|
||||
/* Transform as many times as possible. */
|
||||
if (input_len >= part_len)
|
||||
do
|
||||
{
|
||||
memcpy(&context->buffer[index], input, part_len);
|
||||
md5_transform(context->state, context->buffer);
|
||||
|
||||
for (i = part_len; i + 63 < input_len; i += 64)
|
||||
md5_transform(context->state, &input[i]);
|
||||
|
||||
index = 0;
|
||||
*buf++ = (UWORD32)((unsigned)p[3] << 8 | p[2]) << 16 |
|
||||
((unsigned)p[1] << 8 | p[0]);
|
||||
p += 4;
|
||||
}
|
||||
else
|
||||
i = 0;
|
||||
|
||||
/* Buffer remaining input */
|
||||
memcpy(&context->buffer[index], &input[i], input_len - i);
|
||||
while (--words);
|
||||
}
|
||||
|
||||
/* MD5 finalization. Ends an MD5 message-digest operation, writing the
|
||||
the message digest and zeroizing the context.
|
||||
/*
|
||||
* Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
|
||||
* initialization constants.
|
||||
*/
|
||||
void md5_finalize(md5_ctx_t *context, uint8_t digest[16])
|
||||
void
|
||||
MD5Init(struct MD5Context *ctx)
|
||||
{
|
||||
unsigned char bits[8];
|
||||
unsigned int index, pad_len;
|
||||
ctx->buf[0] = 0x67452301;
|
||||
ctx->buf[1] = 0xefcdab89;
|
||||
ctx->buf[2] = 0x98badcfe;
|
||||
ctx->buf[3] = 0x10325476;
|
||||
|
||||
/* Save number of bits */
|
||||
Encode(bits, context->count, 8);
|
||||
|
||||
/* Pad out to 56 mod 64.
|
||||
*/
|
||||
index = (unsigned int)((context->count[0] >> 3) & 0x3f);
|
||||
pad_len = (index < 56) ? (56 - index) : (120 - index);
|
||||
md5_update(context, PADDING, pad_len);
|
||||
|
||||
/* Append length (before padding) */
|
||||
md5_update(context, bits, 8);
|
||||
/* Store state in digest */
|
||||
Encode(digest, context->state, 16);
|
||||
|
||||
/* Zeroize sensitive information.
|
||||
*/
|
||||
memset(context, 0, sizeof(*context));
|
||||
ctx->bytes[0] = 0;
|
||||
ctx->bytes[1] = 0;
|
||||
}
|
||||
|
||||
/* MD5 basic transformation. Transforms state based on block.
|
||||
/*
|
||||
* Update context to reflect the concatenation of another buffer full
|
||||
* of bytes.
|
||||
*/
|
||||
static void md5_transform(uint32_t state[4], const uint8_t block[64])
|
||||
void
|
||||
MD5Update(struct MD5Context *ctx, md5byte const *buf, unsigned len)
|
||||
{
|
||||
uint32_t a = state[0], b = state[1], c = state[2], d = state[3], x[16];
|
||||
UWORD32 t;
|
||||
|
||||
Decode(x, block, 64);
|
||||
/* Update byte count */
|
||||
|
||||
/* Round 1 */
|
||||
FF(a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
|
||||
FF(d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
|
||||
FF(c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
|
||||
FF(b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
|
||||
FF(a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
|
||||
FF(d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
|
||||
FF(c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
|
||||
FF(b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
|
||||
FF(a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
|
||||
FF(d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
|
||||
FF(c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
|
||||
FF(b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
|
||||
FF(a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
|
||||
FF(d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
|
||||
FF(c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
|
||||
FF(b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
|
||||
t = ctx->bytes[0];
|
||||
|
||||
/* Round 2 */
|
||||
GG(a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
|
||||
GG(d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
|
||||
GG(c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
|
||||
GG(b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
|
||||
GG(a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
|
||||
GG(d, a, b, c, x[10], S22, 0x2441453); /* 22 */
|
||||
GG(c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
|
||||
GG(b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
|
||||
GG(a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
|
||||
GG(d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
|
||||
GG(c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
|
||||
GG(b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
|
||||
GG(a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
|
||||
GG(d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
|
||||
GG(c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
|
||||
GG(b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
|
||||
if ((ctx->bytes[0] = t + len) < t)
|
||||
ctx->bytes[1]++; /* Carry from low to high */
|
||||
|
||||
/* Round 3 */
|
||||
HH(a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
|
||||
HH(d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
|
||||
HH(c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
|
||||
HH(b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
|
||||
HH(a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
|
||||
HH(d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
|
||||
HH(c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
|
||||
HH(b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
|
||||
HH(a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
|
||||
HH(d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
|
||||
HH(c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
|
||||
HH(b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
|
||||
HH(a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
|
||||
HH(d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
|
||||
HH(c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
|
||||
HH(b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
|
||||
t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */
|
||||
|
||||
/* Round 4 */
|
||||
II(a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
|
||||
II(d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
|
||||
II(c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
|
||||
II(b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
|
||||
II(a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
|
||||
II(d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
|
||||
II(c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
|
||||
II(b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
|
||||
II(a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
|
||||
II(d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
|
||||
II(c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
|
||||
II(b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
|
||||
II(a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
|
||||
II(d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
|
||||
II(c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
|
||||
II(b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
|
||||
|
||||
state[0] += a;
|
||||
state[1] += b;
|
||||
state[2] += c;
|
||||
state[3] += d;
|
||||
|
||||
/* Zeroize sensitive information.
|
||||
*/
|
||||
memset(x, 0, sizeof(x));
|
||||
}
|
||||
|
||||
/* Encodes input (uint32_t) into output (unsigned char). Assumes len is
|
||||
a multiple of 4.
|
||||
*/
|
||||
static void Encode(uint8_t *output, const uint32_t *input, unsigned int len)
|
||||
{
|
||||
unsigned int i, j;
|
||||
|
||||
for (i = 0, j = 0; j < len; i++, j += 4)
|
||||
if (t > len)
|
||||
{
|
||||
output[j] = (unsigned char)(input[i] & 0xff);
|
||||
output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
|
||||
output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
|
||||
output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
|
||||
memcpy((md5byte *)ctx->in + 64 - t, buf, len);
|
||||
return;
|
||||
}
|
||||
|
||||
/* First chunk is an odd size */
|
||||
memcpy((md5byte *)ctx->in + 64 - t, buf, t);
|
||||
byteSwap(ctx->in, 16);
|
||||
MD5Transform(ctx->buf, ctx->in);
|
||||
buf += t;
|
||||
len -= t;
|
||||
|
||||
/* Process data in 64-byte chunks */
|
||||
while (len >= 64)
|
||||
{
|
||||
memcpy(ctx->in, buf, 64);
|
||||
byteSwap(ctx->in, 16);
|
||||
MD5Transform(ctx->buf, ctx->in);
|
||||
buf += 64;
|
||||
len -= 64;
|
||||
}
|
||||
|
||||
/* Handle any remaining bytes of data. */
|
||||
memcpy(ctx->in, buf, len);
|
||||
}
|
||||
|
||||
/* Decodes input (unsigned char) into output (uint32_t). Assumes len is
|
||||
a multiple of 4.
|
||||
/*
|
||||
* Final wrapup - pad to 64-byte boundary with the bit pattern
|
||||
* 1 0* (64-bit count of bits processed, MSB-first)
|
||||
*/
|
||||
static void Decode(uint32_t *output, const uint8_t *input, unsigned int len)
|
||||
void
|
||||
MD5Final(md5byte digest[16], struct MD5Context *ctx)
|
||||
{
|
||||
unsigned int i, j;
|
||||
int count = ctx->bytes[0] & 0x3f; /* Number of bytes in ctx->in */
|
||||
md5byte *p = (md5byte *)ctx->in + count;
|
||||
|
||||
for (i = 0, j = 0; j < len; i++, j += 4)
|
||||
output[i] = ((uint32_t)input[j]) | (((uint32_t)input[j+1]) << 8) |
|
||||
(((uint32_t)input[j+2]) << 16) | (((uint32_t)input[j+3]) << 24);
|
||||
/* Set the first char of padding to 0x80. There is always room. */
|
||||
*p++ = 0x80;
|
||||
|
||||
/* Bytes of padding needed to make 56 bytes (-8..55) */
|
||||
count = 56 - 1 - count;
|
||||
|
||||
if (count < 0) /* Padding forces an extra block */
|
||||
{
|
||||
memset(p, 0, count + 8);
|
||||
byteSwap(ctx->in, 16);
|
||||
MD5Transform(ctx->buf, ctx->in);
|
||||
p = (md5byte *)ctx->in;
|
||||
count = 56;
|
||||
}
|
||||
|
||||
memset(p, 0, count);
|
||||
byteSwap(ctx->in, 14);
|
||||
|
||||
/* Append length in bits and transform */
|
||||
ctx->in[14] = ctx->bytes[0] << 3;
|
||||
ctx->in[15] = ctx->bytes[1] << 3 | ctx->bytes[0] >> 29;
|
||||
MD5Transform(ctx->buf, ctx->in);
|
||||
|
||||
byteSwap(ctx->buf, 4);
|
||||
memcpy(digest, ctx->buf, 16);
|
||||
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
|
||||
}
|
||||
|
||||
#ifndef ASM_MD5
|
||||
|
||||
/* The four core functions - F1 is optimized somewhat */
|
||||
|
||||
/* #define F1(x, y, z) (x & y | ~x & z) */
|
||||
#define F1(x, y, z) (z ^ (x & (y ^ z)))
|
||||
#define F2(x, y, z) F1(z, x, y)
|
||||
#define F3(x, y, z) (x ^ y ^ z)
|
||||
#define F4(x, y, z) (y ^ (x | ~z))
|
||||
|
||||
/* This is the central step in the MD5 algorithm. */
|
||||
#define MD5STEP(f,w,x,y,z,in,s) \
|
||||
(w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x)
|
||||
|
||||
/*
|
||||
* The core of the MD5 algorithm, this alters an existing MD5 hash to
|
||||
* reflect the addition of 16 longwords of new data. MD5Update blocks
|
||||
* the data and converts bytes into longwords for this routine.
|
||||
*/
|
||||
void
|
||||
MD5Transform(UWORD32 buf[4], UWORD32 const in[16])
|
||||
{
|
||||
register UWORD32 a, b, c, d;
|
||||
|
||||
a = buf[0];
|
||||
b = buf[1];
|
||||
c = buf[2];
|
||||
d = buf[3];
|
||||
|
||||
MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
|
||||
MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
|
||||
MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
|
||||
MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
|
||||
MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
|
||||
MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
|
||||
MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
|
||||
MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
|
||||
MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
|
||||
MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
|
||||
MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
|
||||
MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
|
||||
MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
|
||||
MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
|
||||
MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
|
||||
MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
|
||||
|
||||
MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
|
||||
MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
|
||||
MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
|
||||
MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
|
||||
MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
|
||||
MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
|
||||
MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
|
||||
MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
|
||||
MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
|
||||
MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
|
||||
MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
|
||||
MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
|
||||
MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
|
||||
MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
|
||||
MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
|
||||
MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
|
||||
|
||||
MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
|
||||
MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
|
||||
MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
|
||||
MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
|
||||
MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
|
||||
MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
|
||||
MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
|
||||
MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
|
||||
MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
|
||||
MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
|
||||
MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
|
||||
MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
|
||||
MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
|
||||
MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
|
||||
MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
|
||||
MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
|
||||
|
||||
MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
|
||||
MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
|
||||
MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
|
||||
MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
|
||||
MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
|
||||
MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
|
||||
MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
|
||||
MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
|
||||
MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
|
||||
MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
|
||||
MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
|
||||
MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
|
||||
MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
|
||||
MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
|
||||
MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
|
||||
MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
|
||||
|
||||
buf[0] += a;
|
||||
buf[1] += b;
|
||||
buf[2] += c;
|
||||
buf[3] += d;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
70
md5_utils.h
70
md5_utils.h
@ -1,44 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
* This is the header file for the MD5 message-digest algorithm.
|
||||
* The algorithm is due to Ron Rivest. This code was
|
||||
* written by Colin Plumb in 1993, no copyright is claimed.
|
||||
* This code is in the public domain; do with it what you wish.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Equivalent code is available from RSA Data Security, Inc.
|
||||
* This code has been tested against that, and is equivalent,
|
||||
* except that you don't need to include two pages of legalese
|
||||
* with every copy.
|
||||
*
|
||||
* To compute the message digest of a chunk of bytes, declare an
|
||||
* MD5Context structure, pass it to MD5Init, call MD5Update as
|
||||
* needed on buffers full of bytes, and then call MD5Final, which
|
||||
* will fill a supplied 16-byte array with the digest.
|
||||
*
|
||||
* Changed so as no longer to depend on Colin Plumb's `usual.h'
|
||||
* header definitions
|
||||
* - Ian Jackson <ian@chiark.greenend.org.uk>.
|
||||
* Still in the public domain.
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
|
||||
rights reserved.
|
||||
#ifndef MD5_H
|
||||
#define MD5_H
|
||||
|
||||
License to copy and use this software is granted provided that it
|
||||
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
|
||||
Algorithm" in all material mentioning or referencing this software
|
||||
or this function.
|
||||
#define md5byte unsigned char
|
||||
#define UWORD32 unsigned int
|
||||
|
||||
License is also granted to make and use derivative works provided
|
||||
that such works are identified as "derived from the RSA Data
|
||||
Security, Inc. MD5 Message-Digest Algorithm" in all material
|
||||
mentioning or referencing the derived work.
|
||||
|
||||
RSA Data Security, Inc. makes no representations concerning either
|
||||
the merchantability of this software or the suitability of this
|
||||
software for any particular purpose. It is provided "as is"
|
||||
without express or implied warranty of any kind.
|
||||
|
||||
These notices must be retained in any copies of any part of this
|
||||
documentation and/or software.
|
||||
*/
|
||||
#include "vpx/vpx_integer.h"
|
||||
|
||||
/* MD5 context. */
|
||||
typedef struct
|
||||
typedef struct MD5Context MD5Context;
|
||||
struct MD5Context
|
||||
{
|
||||
uint32_t state[4]; /* state (ABCD) */
|
||||
uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
|
||||
uint8_t buffer[64]; /* input buffer */
|
||||
} md5_ctx_t;
|
||||
UWORD32 buf[4];
|
||||
UWORD32 bytes[2];
|
||||
UWORD32 in[16];
|
||||
};
|
||||
|
||||
void md5_init(md5_ctx_t *ctx);
|
||||
void md5_update(md5_ctx_t *ctx, const uint8_t *buf, unsigned int len);
|
||||
void md5_finalize(md5_ctx_t *ctx, uint8_t md5[16]);
|
||||
void MD5Init(struct MD5Context *context);
|
||||
void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
|
||||
void MD5Final(unsigned char digest[16], struct MD5Context *context);
|
||||
void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]);
|
||||
|
||||
#endif /* !MD5_H */
|
||||
|
15
release.sh
15
release.sh
@ -1,11 +1,12 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
@ -20,7 +21,7 @@ for opt; do
|
||||
esac
|
||||
done
|
||||
|
||||
TAB=$'\t'
|
||||
TAB="$(printf '\t')"
|
||||
cat > release.mk << EOF
|
||||
%\$(BUILD_SFX).tar.bz2: %/.done
|
||||
${TAB}@echo "\$(subst .tar.bz2,,\$@): tarball"
|
||||
@ -185,7 +186,7 @@ for cfg in $CONFIGS; do
|
||||
esac
|
||||
opts="$opts --enable-postproc"
|
||||
|
||||
[ "x${clean}" == "xyes" ] \
|
||||
[ "x${clean}" = "xyes" ] \
|
||||
&& rm -rf ${full_cfg}${BUILD_SFX}${TAR_SFX} \
|
||||
&& rm -rf logs/${full_cfg}${BUILD_SFX}.log.bz2
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
##
|
||||
## Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
##
|
||||
## Use of this source code is governed by a BSD-style license and patent
|
||||
## grant that can be found in the LICENSE file in the root of the source
|
||||
## tree. All contributing project authors may be found in the AUTHORS
|
||||
## file in the root of the source tree.
|
||||
## Use of this source code is governed by a BSD-style license
|
||||
## that can be found in the LICENSE file in the root of the source
|
||||
## tree. An additional intellectual property rights grant can be found
|
||||
## in the file PATENTS. All contributing project authors may
|
||||
## be found in the AUTHORS file in the root of the source tree.
|
||||
##
|
||||
|
||||
|
||||
|
13
tools/gen_authors.sh
Executable file
13
tools/gen_authors.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Add organization names manually.
|
||||
|
||||
cat <<EOF
|
||||
# This file is automatically generated from the git commit history
|
||||
# by tools/gen_authors.sh.
|
||||
|
||||
$(git log --pretty=format:"%aN <%aE>" | sort | uniq)
|
||||
Google Inc.
|
||||
The Mozilla Foundation
|
||||
The Xiph.Org Foundation
|
||||
EOF
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
@ -23,43 +24,36 @@ extern void vp8_init_scan_order_mask();
|
||||
void vp8_update_mode_info_border(MODE_INFO *mi, int rows, int cols)
|
||||
{
|
||||
int i;
|
||||
vpx_memset(mi - cols - 1, 0, sizeof(MODE_INFO) * cols + 1);
|
||||
vpx_memset(mi - cols - 2, 0, sizeof(MODE_INFO) * (cols + 1));
|
||||
|
||||
for (i = 0; i < rows; i++)
|
||||
{
|
||||
vpx_memset(&mi[i*cols-1], 0, sizeof(MODE_INFO));
|
||||
}
|
||||
}
|
||||
|
||||
void vp8_de_alloc_frame_buffers(VP8_COMMON *oci)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < NUM_YV12_BUFFERS; i++)
|
||||
vp8_yv12_de_alloc_frame_buffer(&oci->yv12_fb[i]);
|
||||
|
||||
vp8_yv12_de_alloc_frame_buffer(&oci->temp_scale_frame);
|
||||
vp8_yv12_de_alloc_frame_buffer(&oci->new_frame);
|
||||
vp8_yv12_de_alloc_frame_buffer(&oci->last_frame);
|
||||
vp8_yv12_de_alloc_frame_buffer(&oci->golden_frame);
|
||||
vp8_yv12_de_alloc_frame_buffer(&oci->alt_ref_frame);
|
||||
vp8_yv12_de_alloc_frame_buffer(&oci->post_proc_buffer);
|
||||
|
||||
vpx_free(oci->above_context[Y1CONTEXT]);
|
||||
vpx_free(oci->above_context[UCONTEXT]);
|
||||
vpx_free(oci->above_context[VCONTEXT]);
|
||||
vpx_free(oci->above_context[Y2CONTEXT]);
|
||||
vpx_free(oci->above_context);
|
||||
vpx_free(oci->mip);
|
||||
|
||||
oci->above_context[Y1CONTEXT] = 0;
|
||||
oci->above_context[UCONTEXT] = 0;
|
||||
oci->above_context[VCONTEXT] = 0;
|
||||
oci->above_context[Y2CONTEXT] = 0;
|
||||
oci->above_context = 0;
|
||||
oci->mip = 0;
|
||||
|
||||
// Structure used to minitor GF useage
|
||||
if (oci->gf_active_flags != 0)
|
||||
vpx_free(oci->gf_active_flags);
|
||||
|
||||
oci->gf_active_flags = 0;
|
||||
}
|
||||
|
||||
int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height)
|
||||
{
|
||||
int i;
|
||||
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
|
||||
// our internal buffers are always multiples of 16
|
||||
@ -70,37 +64,33 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height)
|
||||
height += 16 - (height & 0xf);
|
||||
|
||||
|
||||
for (i = 0; i < NUM_YV12_BUFFERS; i++)
|
||||
{
|
||||
oci->fb_idx_ref_cnt[0] = 0;
|
||||
|
||||
if (vp8_yv12_alloc_frame_buffer(&oci->yv12_fb[i], width, height, VP8BORDERINPIXELS) < 0)
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
return ALLOC_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
oci->new_fb_idx = 0;
|
||||
oci->lst_fb_idx = 1;
|
||||
oci->gld_fb_idx = 2;
|
||||
oci->alt_fb_idx = 3;
|
||||
|
||||
oci->fb_idx_ref_cnt[0] = 1;
|
||||
oci->fb_idx_ref_cnt[1] = 1;
|
||||
oci->fb_idx_ref_cnt[2] = 1;
|
||||
oci->fb_idx_ref_cnt[3] = 1;
|
||||
|
||||
if (vp8_yv12_alloc_frame_buffer(&oci->temp_scale_frame, width, 16, VP8BORDERINPIXELS) < 0)
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
return ALLOC_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
if (vp8_yv12_alloc_frame_buffer(&oci->new_frame, width, height, VP8BORDERINPIXELS) < 0)
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
return ALLOC_FAILURE;
|
||||
}
|
||||
|
||||
if (vp8_yv12_alloc_frame_buffer(&oci->last_frame, width, height, VP8BORDERINPIXELS) < 0)
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
return ALLOC_FAILURE;
|
||||
}
|
||||
|
||||
if (vp8_yv12_alloc_frame_buffer(&oci->golden_frame, width, height, VP8BORDERINPIXELS) < 0)
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
return ALLOC_FAILURE;
|
||||
}
|
||||
|
||||
if (vp8_yv12_alloc_frame_buffer(&oci->alt_ref_frame, width, height, VP8BORDERINPIXELS) < 0)
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
return ALLOC_FAILURE;
|
||||
}
|
||||
|
||||
if (vp8_yv12_alloc_frame_buffer(&oci->post_proc_buffer, width, height, VP8BORDERINPIXELS) < 0)
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
@ -122,33 +112,9 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height)
|
||||
oci->mi = oci->mip + oci->mode_info_stride + 1;
|
||||
|
||||
|
||||
oci->above_context[Y1CONTEXT] = vpx_calloc(sizeof(ENTROPY_CONTEXT) * oci->mb_cols * 4 , 1);
|
||||
oci->above_context = vpx_calloc(sizeof(ENTROPY_CONTEXT_PLANES) * oci->mb_cols, 1);
|
||||
|
||||
if (!oci->above_context[Y1CONTEXT])
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
return ALLOC_FAILURE;
|
||||
}
|
||||
|
||||
oci->above_context[UCONTEXT] = vpx_calloc(sizeof(ENTROPY_CONTEXT) * oci->mb_cols * 2 , 1);
|
||||
|
||||
if (!oci->above_context[UCONTEXT])
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
return ALLOC_FAILURE;
|
||||
}
|
||||
|
||||
oci->above_context[VCONTEXT] = vpx_calloc(sizeof(ENTROPY_CONTEXT) * oci->mb_cols * 2 , 1);
|
||||
|
||||
if (!oci->above_context[VCONTEXT])
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
return ALLOC_FAILURE;
|
||||
}
|
||||
|
||||
oci->above_context[Y2CONTEXT] = vpx_calloc(sizeof(ENTROPY_CONTEXT) * oci->mb_cols , 1);
|
||||
|
||||
if (!oci->above_context[Y2CONTEXT])
|
||||
if (!oci->above_context)
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
return ALLOC_FAILURE;
|
||||
@ -156,20 +122,6 @@ int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height)
|
||||
|
||||
vp8_update_mode_info_border(oci->mi, oci->mb_rows, oci->mb_cols);
|
||||
|
||||
// Structures used to minitor GF usage
|
||||
if (oci->gf_active_flags != 0)
|
||||
vpx_free(oci->gf_active_flags);
|
||||
|
||||
oci->gf_active_flags = (unsigned char *)vpx_calloc(oci->mb_rows * oci->mb_cols, 1);
|
||||
|
||||
if (!oci->gf_active_flags)
|
||||
{
|
||||
vp8_de_alloc_frame_buffers(oci);
|
||||
return ALLOC_FAILURE;
|
||||
}
|
||||
|
||||
oci->gf_active_count = oci->mb_rows * oci->mb_cols;
|
||||
|
||||
return 0;
|
||||
}
|
||||
void vp8_setup_version(VP8_COMMON *cm)
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
67
vp8/common/arm/armv6/dc_only_idct_add_v6.asm
Normal file
67
vp8/common/arm/armv6/dc_only_idct_add_v6.asm
Normal file
@ -0,0 +1,67 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
;
|
||||
|
||||
EXPORT |vp8_dc_only_idct_add_v6|
|
||||
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
;void vp8_dc_only_idct_add_v6(short input_dc, unsigned char *pred_ptr,
|
||||
; unsigned char *dst_ptr, int pitch, int stride)
|
||||
; r0 input_dc
|
||||
; r1 pred_ptr
|
||||
; r2 dest_ptr
|
||||
; r3 pitch
|
||||
; sp stride
|
||||
|
||||
|vp8_dc_only_idct_add_v6| PROC
|
||||
stmdb sp!, {r4 - r7, lr}
|
||||
|
||||
add r0, r0, #4 ; input_dc += 4
|
||||
ldr r12, c0x0000FFFF
|
||||
ldr r4, [r1], r3
|
||||
ldr r6, [r1], r3
|
||||
and r0, r12, r0, asr #3 ; input_dc >> 3 + mask
|
||||
ldr lr, [sp, #20]
|
||||
orr r0, r0, r0, lsl #16 ; a1 | a1
|
||||
|
||||
uxtab16 r5, r0, r4 ; a1+2 | a1+0
|
||||
uxtab16 r4, r0, r4, ror #8 ; a1+3 | a1+1
|
||||
uxtab16 r7, r0, r6
|
||||
uxtab16 r6, r0, r6, ror #8
|
||||
usat16 r5, #8, r5
|
||||
usat16 r4, #8, r4
|
||||
usat16 r7, #8, r7
|
||||
usat16 r6, #8, r6
|
||||
orr r5, r5, r4, lsl #8
|
||||
orr r7, r7, r6, lsl #8
|
||||
ldr r4, [r1], r3
|
||||
ldr r6, [r1]
|
||||
str r5, [r2], lr
|
||||
str r7, [r2], lr
|
||||
|
||||
uxtab16 r5, r0, r4
|
||||
uxtab16 r4, r0, r4, ror #8
|
||||
uxtab16 r7, r0, r6
|
||||
uxtab16 r6, r0, r6, ror #8
|
||||
usat16 r5, #8, r5
|
||||
usat16 r4, #8, r4
|
||||
usat16 r7, #8, r7
|
||||
usat16 r6, #8, r6
|
||||
orr r5, r5, r4, lsl #8
|
||||
orr r7, r7, r6, lsl #8
|
||||
str r5, [r2], lr
|
||||
str r7, [r2]
|
||||
|
||||
ldmia sp!, {r4 - r7, pc}
|
||||
|
||||
ENDP ; |vp8_dc_only_idct_add_v6|
|
||||
|
||||
; Constant Pool
|
||||
c0x0000FFFF DCD 0x0000FFFF
|
||||
END
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
@ -14,8 +15,6 @@
|
||||
EXPORT |vp8_short_idct4x4llm_v6_scott|
|
||||
EXPORT |vp8_short_idct4x4llm_v6_dual|
|
||||
|
||||
EXPORT |vp8_dc_only_idct_armv6|
|
||||
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
;********************************************************************************
|
||||
@ -343,34 +342,4 @@ loop2_dual
|
||||
ldmia sp!, {r4 - r11, pc} ; replace vars, return restore
|
||||
ENDP
|
||||
|
||||
|
||||
; sjl added 10/17/08
|
||||
;void dc_only_idct_armv6(short input_dc, short *output, int pitch)
|
||||
|vp8_dc_only_idct_armv6| PROC
|
||||
stmdb sp!, {r4 - r6, lr}
|
||||
|
||||
add r0, r0, #0x4
|
||||
add r4, r1, r2 ; output + shortpitch
|
||||
mov r0, r0, ASR #0x3 ;aka a1
|
||||
add r5, r1, r2, LSL #1 ; output + shortpitch * 2
|
||||
pkhbt r0, r0, r0, lsl #16 ; a1 | a1
|
||||
add r6, r5, r2 ; output + shortpitch * 3
|
||||
|
||||
str r0, [r1, #0]
|
||||
str r0, [r1, #4]
|
||||
|
||||
str r0, [r4, #0]
|
||||
str r0, [r4, #4]
|
||||
|
||||
str r0, [r5, #0]
|
||||
str r0, [r5, #4]
|
||||
|
||||
str r0, [r6, #0]
|
||||
str r0, [r6, #4]
|
||||
|
||||
|
||||
ldmia sp!, {r4 - r6, pc}
|
||||
|
||||
ENDP ; |vp8_dc_only_idct_armv6|
|
||||
|
||||
END
|
||||
|
@ -1,14 +1,15 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
EXPORT |vp8_short_inv_walsh4x4_armv6|
|
||||
EXPORT |vp8_short_inv_walsh4x4_1_armv6|
|
||||
EXPORT |vp8_short_inv_walsh4x4_v6|
|
||||
EXPORT |vp8_short_inv_walsh4x4_1_v6|
|
||||
|
||||
ARM
|
||||
REQUIRE8
|
||||
@ -16,8 +17,8 @@
|
||||
|
||||
AREA |.text|, CODE, READONLY ; name this block of code
|
||||
|
||||
;short vp8_short_inv_walsh4x4_armv6(short *input, short *output)
|
||||
|vp8_short_inv_walsh4x4_armv6| PROC
|
||||
;short vp8_short_inv_walsh4x4_v6(short *input, short *output)
|
||||
|vp8_short_inv_walsh4x4_v6| PROC
|
||||
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
@ -122,11 +123,11 @@
|
||||
str r5, [r1]
|
||||
|
||||
ldmia sp!, {r4 - r11, pc}
|
||||
ENDP ; |vp8_short_inv_walsh4x4_armv6|
|
||||
ENDP ; |vp8_short_inv_walsh4x4_v6|
|
||||
|
||||
|
||||
;short vp8_short_inv_walsh4x4_1_armv6(short *input, short *output)
|
||||
|vp8_short_inv_walsh4x4_1_armv6| PROC
|
||||
;short vp8_short_inv_walsh4x4_1_v6(short *input, short *output)
|
||||
|vp8_short_inv_walsh4x4_1_v6| PROC
|
||||
|
||||
ldrsh r2, [r0] ; [0]
|
||||
add r2, r2, #3 ; [0] + 3
|
||||
@ -144,7 +145,7 @@
|
||||
str r2, [r1]
|
||||
|
||||
bx lr
|
||||
ENDP ; |vp8_short_inv_walsh4x4_1_armv6|
|
||||
ENDP ; |vp8_short_inv_walsh4x4_1_v6|
|
||||
|
||||
; Constant Pool
|
||||
c0x00030003 DCD 0x00030003
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
@ -54,113 +55,87 @@ pstep RN r1
|
||||
;stack const char *thresh,
|
||||
;stack int count
|
||||
|
||||
;Note: All 16 elements in flimit are equal. So, in the code, only one load is needed
|
||||
;for flimit. Same way applies to limit and thresh.
|
||||
; All 16 elements in flimit are equal. So, in the code, only one load is needed
|
||||
; for flimit. Same applies to limit. thresh is not used in simple looopfilter
|
||||
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
|vp8_loop_filter_simple_horizontal_edge_armv6| PROC
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
sub src, src, pstep, lsl #1 ; move src pointer down by 2 lines
|
||||
|
||||
ldr r12, [r3], #4 ; limit
|
||||
ldr r3, [src], pstep ; p1
|
||||
|
||||
ldr r9, [sp, #36] ; count for 8-in-parallel
|
||||
ldr r4, [src], pstep ; p0
|
||||
|
||||
ldr r7, [r2], #4 ; flimit
|
||||
ldr r5, [src], pstep ; q0
|
||||
ldr r12, [r3] ; limit
|
||||
ldr r3, [src, -pstep, lsl #1] ; p1
|
||||
ldr r4, [src, -pstep] ; p0
|
||||
ldr r5, [src] ; q0
|
||||
ldr r6, [src, pstep] ; q1
|
||||
ldr r7, [r2] ; flimit
|
||||
ldr r2, c0x80808080
|
||||
|
||||
ldr r6, [src] ; q1
|
||||
|
||||
ldr r9, [sp, #40] ; count for 8-in-parallel
|
||||
uadd8 r7, r7, r7 ; flimit * 2
|
||||
mov r9, r9, lsl #1 ; 4-in-parallel
|
||||
mov r9, r9, lsl #1 ; double the count. we're doing 4 at a time
|
||||
uadd8 r12, r7, r12 ; flimit * 2 + limit
|
||||
mov lr, #0 ; need 0 in a couple places
|
||||
|
||||
|simple_hnext8|
|
||||
; vp8_simple_filter_mask() function
|
||||
; vp8_simple_filter_mask()
|
||||
|
||||
uqsub8 r7, r3, r6 ; p1 - q1
|
||||
uqsub8 r8, r6, r3 ; q1 - p1
|
||||
uqsub8 r10, r4, r5 ; p0 - q0
|
||||
uqsub8 r11, r5, r4 ; q0 - p0
|
||||
orr r8, r8, r7 ; abs(p1 - q1)
|
||||
ldr lr, c0x7F7F7F7F ; 01111111 mask
|
||||
orr r10, r10, r11 ; abs(p0 - q0)
|
||||
and r8, lr, r8, lsr #1 ; abs(p1 - q1) / 2
|
||||
uqadd8 r10, r10, r10 ; abs(p0 - q0) * 2
|
||||
mvn lr, #0 ; r10 == -1
|
||||
uhadd8 r8, r8, lr ; abs(p1 - q2) >> 1
|
||||
uqadd8 r10, r10, r8 ; abs(p0 - q0)*2 + abs(p1 - q1)/2
|
||||
; STALL waiting on r10 :(
|
||||
uqsub8 r10, r10, r12 ; compare to flimit
|
||||
mov r8, #0
|
||||
|
||||
usub8 r10, r8, r10 ; use usub8 instead of ssub8
|
||||
; STALL (maybe?) when are flags set? :/
|
||||
sel r10, lr, r8 ; filter mask: lr
|
||||
|
||||
mvn r8, #0
|
||||
usub8 r10, r12, r10 ; compare to flimit. usub8 sets GE flags
|
||||
sel r10, r8, lr ; filter mask: F or 0
|
||||
cmp r10, #0
|
||||
beq simple_hskip_filter ; skip filtering
|
||||
beq simple_hskip_filter ; skip filtering if all masks are 0x00
|
||||
|
||||
;vp8_simple_filter() function
|
||||
;vp8_simple_filter()
|
||||
|
||||
eor r3, r3, r2 ; p1 offset to convert to a signed value
|
||||
eor r6, r6, r2 ; q1 offset to convert to a signed value
|
||||
eor r4, r4, r2 ; p0 offset to convert to a signed value
|
||||
eor r5, r5, r2 ; q0 offset to convert to a signed value
|
||||
|
||||
qsub8 r3, r3, r6 ; vp8_filter (r3) = vp8_signed_char_clamp(p1-q1)
|
||||
qsub8 r6, r5, r4 ; vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * ( q0 - p0))
|
||||
|
||||
qadd8 r3, r3, r6
|
||||
ldr r8, c0x03030303 ; r8 = 3
|
||||
|
||||
qadd8 r3, r3, r6
|
||||
qsub8 r3, r3, r6 ; vp8_filter = p1 - q1
|
||||
qsub8 r6, r5, r4 ; q0 - p0
|
||||
qadd8 r3, r3, r6 ; += q0 - p0
|
||||
ldr r7, c0x04040404
|
||||
qadd8 r3, r3, r6 ; += q0 - p0
|
||||
ldr r8, c0x03030303
|
||||
qadd8 r3, r3, r6 ; vp8_filter = p1-q1 + 3*(q0-p0))
|
||||
;STALL
|
||||
and r3, r3, r10 ; vp8_filter &= mask
|
||||
|
||||
qadd8 r3, r3, r6
|
||||
and r3, r3, lr ; vp8_filter &= mask;
|
||||
qadd8 r7 , r3 , r7 ; Filter1 = vp8_filter + 4
|
||||
qadd8 r8 , r3 , r8 ; Filter2 = vp8_filter + 3
|
||||
|
||||
;save bottom 3 bits so that we round one side +4 and the other +3
|
||||
qadd8 r8 , r3 , r8 ; Filter2 (r8) = vp8_signed_char_clamp(vp8_filter+3)
|
||||
qadd8 r3 , r3 , r7 ; Filter1 (r3) = vp8_signed_char_clamp(vp8_filter+4)
|
||||
shadd8 r7 , r7 , lr
|
||||
shadd8 r8 , r8 , lr
|
||||
shadd8 r7 , r7 , lr
|
||||
shadd8 r8 , r8 , lr
|
||||
shadd8 r7 , r7 , lr ; Filter1 >>= 3
|
||||
shadd8 r8 , r8 , lr ; Filter2 >>= 3
|
||||
|
||||
mov r7, #0
|
||||
shadd8 r8 , r8 , r7 ; Filter2 >>= 3
|
||||
shadd8 r3 , r3 , r7 ; Filter1 >>= 3
|
||||
shadd8 r8 , r8 , r7
|
||||
shadd8 r3 , r3 , r7
|
||||
shadd8 r8 , r8 , r7 ; r8: Filter2
|
||||
shadd8 r3 , r3 , r7 ; r7: filter1
|
||||
|
||||
;calculate output
|
||||
sub src, src, pstep, lsl #1
|
||||
|
||||
qadd8 r4, r4, r8 ; u = vp8_signed_char_clamp(p0 + Filter2)
|
||||
qsub8 r5 ,r5, r3 ; u = vp8_signed_char_clamp(q0 - Filter1)
|
||||
eor r4, r4, r2 ; *op0 = u^0x80
|
||||
str r4, [src], pstep ; store op0 result
|
||||
qsub8 r5 ,r5, r7 ; u = q0 - Filter1
|
||||
qadd8 r4, r4, r8 ; u = p0 + Filter2
|
||||
eor r5, r5, r2 ; *oq0 = u^0x80
|
||||
str r5, [src], pstep ; store oq0 result
|
||||
str r5, [src] ; store oq0 result
|
||||
eor r4, r4, r2 ; *op0 = u^0x80
|
||||
str r4, [src, -pstep] ; store op0 result
|
||||
|
||||
|simple_hskip_filter|
|
||||
add src, src, #4
|
||||
sub src, src, pstep
|
||||
sub src, src, pstep, lsl #1
|
||||
|
||||
subs r9, r9, #1
|
||||
addne src, src, #4 ; next row
|
||||
|
||||
;pld [src]
|
||||
;pld [src, pstep]
|
||||
;pld [src, pstep, lsl #1]
|
||||
|
||||
ldrne r3, [src], pstep ; p1
|
||||
ldrne r4, [src], pstep ; p0
|
||||
ldrne r5, [src], pstep ; q0
|
||||
ldrne r6, [src] ; q1
|
||||
ldrne r3, [src, -pstep, lsl #1] ; p1
|
||||
ldrne r4, [src, -pstep] ; p0
|
||||
ldrne r5, [src] ; q0
|
||||
ldrne r6, [src, pstep] ; q1
|
||||
|
||||
bne simple_hnext8
|
||||
|
||||
@ -173,9 +148,9 @@ pstep RN r1
|
||||
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
stmdb sp!, {r4 - r11, lr}
|
||||
|
||||
ldr r12, [r2], #4 ; r12: flimit
|
||||
ldr r12, [r2] ; r12: flimit
|
||||
ldr r2, c0x80808080
|
||||
ldr r7, [r3], #4 ; limit
|
||||
ldr r7, [r3] ; limit
|
||||
|
||||
; load soure data to r7, r8, r9, r10
|
||||
ldrh r3, [src, #-2]
|
||||
@ -212,16 +187,14 @@ pstep RN r1
|
||||
uqsub8 r10, r5, r4 ; q0 - p0
|
||||
orr r7, r7, r8 ; abs(p1 - q1)
|
||||
orr r9, r9, r10 ; abs(p0 - q0)
|
||||
ldr lr, c0x7F7F7F7F ; 0111 1111 mask
|
||||
uqadd8 r9, r9, r9 ; abs(p0 - q0) * 2
|
||||
and r7, lr, r7, lsr #1 ; abs(p1 - q1) / 2
|
||||
mov r8, #0
|
||||
uqadd8 r9, r9, r9 ; abs(p0 - q0) * 2
|
||||
uhadd8 r7, r7, r8 ; abs(p1 - q1) / 2
|
||||
uqadd8 r7, r7, r9 ; abs(p0 - q0)*2 + abs(p1 - q1)/2
|
||||
mvn r10, #0 ; r10 == -1
|
||||
uqsub8 r7, r7, r12 ; compare to flimit
|
||||
|
||||
usub8 r7, r8, r7
|
||||
sel r7, r10, r8 ; filter mask: lr
|
||||
usub8 r7, r12, r7 ; compare to flimit
|
||||
sel lr, r10, r8 ; filter mask
|
||||
|
||||
cmp lr, #0
|
||||
beq simple_vskip_filter ; skip filtering
|
||||
@ -232,35 +205,34 @@ pstep RN r1
|
||||
eor r4, r4, r2 ; p0 offset to convert to a signed value
|
||||
eor r5, r5, r2 ; q0 offset to convert to a signed value
|
||||
|
||||
qsub8 r3, r3, r6 ; vp8_filter (r3) = vp8_signed_char_clamp(p1-q1)
|
||||
qsub8 r6, r5, r4 ; vp8_filter = vp8_signed_char_clamp(vp8_filter + 3 * ( q0 - p0))
|
||||
qsub8 r3, r3, r6 ; vp8_filter = p1 - q1
|
||||
qsub8 r6, r5, r4 ; q0 - p0
|
||||
|
||||
qadd8 r3, r3, r6
|
||||
ldr r8, c0x03030303 ; r8 = 3
|
||||
qadd8 r3, r3, r6 ; vp8_filter += q0 - p0
|
||||
ldr r9, c0x03030303 ; r9 = 3
|
||||
|
||||
qadd8 r3, r3, r6
|
||||
qadd8 r3, r3, r6 ; vp8_filter += q0 - p0
|
||||
ldr r7, c0x04040404
|
||||
|
||||
qadd8 r3, r3, r6
|
||||
qadd8 r3, r3, r6 ; vp8_filter = p1-q1 + 3*(q0-p0))
|
||||
;STALL
|
||||
and r3, r3, lr ; vp8_filter &= mask
|
||||
|
||||
;save bottom 3 bits so that we round one side +4 and the other +3
|
||||
qadd8 r8 , r3 , r8 ; Filter2 (r8) = vp8_signed_char_clamp(vp8_filter+3)
|
||||
qadd8 r3 , r3 , r7 ; Filter1 (r3) = vp8_signed_char_clamp(vp8_filter+4)
|
||||
qadd8 r9 , r3 , r9 ; Filter2 = vp8_filter + 3
|
||||
qadd8 r3 , r3 , r7 ; Filter1 = vp8_filter + 4
|
||||
|
||||
mov r7, #0
|
||||
shadd8 r8 , r8 , r7 ; Filter2 >>= 3
|
||||
shadd8 r3 , r3 , r7 ; Filter1 >>= 3
|
||||
shadd8 r8 , r8 , r7
|
||||
shadd8 r3 , r3 , r7
|
||||
shadd8 r8 , r8 , r7 ; r8: filter2
|
||||
shadd8 r3 , r3 , r7 ; r7: filter1
|
||||
shadd8 r9 , r9 , r8
|
||||
shadd8 r3 , r3 , r8
|
||||
shadd8 r9 , r9 , r8
|
||||
shadd8 r3 , r3 , r8
|
||||
shadd8 r9 , r9 , r8 ; Filter2 >>= 3
|
||||
shadd8 r3 , r3 , r8 ; Filter1 >>= 3
|
||||
|
||||
;calculate output
|
||||
sub src, src, pstep, lsl #2
|
||||
|
||||
qadd8 r4, r4, r8 ; u = vp8_signed_char_clamp(p0 + Filter2)
|
||||
qsub8 r5, r5, r3 ; u = vp8_signed_char_clamp(q0 - Filter1)
|
||||
qadd8 r4, r4, r9 ; u = p0 + Filter2
|
||||
qsub8 r5, r5, r3 ; u = q0 - Filter1
|
||||
eor r4, r4, r2 ; *op0 = u^0x80
|
||||
eor r5, r5, r2 ; *oq0 = u^0x80
|
||||
|
||||
@ -285,10 +257,6 @@ pstep RN r1
|
||||
|simple_vskip_filter|
|
||||
subs r11, r11, #1
|
||||
|
||||
;pld [src]
|
||||
;pld [src, pstep]
|
||||
;pld [src, pstep, lsl #1]
|
||||
|
||||
; load soure data to r7, r8, r9, r10
|
||||
ldrneh r3, [src, #-2]
|
||||
ldrneh r4, [src], pstep
|
||||
@ -308,14 +276,12 @@ pstep RN r1
|
||||
|
||||
bne simple_vnext8
|
||||
|
||||
ldmia sp!, {r4 - r12, pc}
|
||||
ldmia sp!, {r4 - r11, pc}
|
||||
ENDP ; |vp8_loop_filter_simple_vertical_edge_armv6|
|
||||
|
||||
; Constant Pool
|
||||
c0x80808080 DCD 0x80808080
|
||||
c0x03030303 DCD 0x03030303
|
||||
c0x04040404 DCD 0x04040404
|
||||
c0x01010101 DCD 0x01010101
|
||||
c0x7F7F7F7F DCD 0x7F7F7F7F
|
||||
|
||||
END
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
@ -14,9 +15,9 @@
|
||||
#if HAVE_ARMV6
|
||||
extern prototype_idct(vp8_short_idct4x4llm_1_v6);
|
||||
extern prototype_idct(vp8_short_idct4x4llm_v6_dual);
|
||||
extern prototype_idct_scalar(vp8_dc_only_idct_armv6);
|
||||
extern prototype_second_order(vp8_short_inv_walsh4x4_1_armv6);
|
||||
extern prototype_second_order(vp8_short_inv_walsh4x4_armv6);
|
||||
extern prototype_idct_scalar_add(vp8_dc_only_idct_add_v6);
|
||||
extern prototype_second_order(vp8_short_inv_walsh4x4_1_v6);
|
||||
extern prototype_second_order(vp8_short_inv_walsh4x4_v6);
|
||||
|
||||
#undef vp8_idct_idct1
|
||||
#define vp8_idct_idct1 vp8_short_idct4x4llm_1_v6
|
||||
@ -24,20 +25,20 @@ extern prototype_second_order(vp8_short_inv_walsh4x4_armv6);
|
||||
#undef vp8_idct_idct16
|
||||
#define vp8_idct_idct16 vp8_short_idct4x4llm_v6_dual
|
||||
|
||||
#undef vp8_idct_idct1_scalar
|
||||
#define vp8_idct_idct1_scalar vp8_dc_only_idct_armv6
|
||||
#undef vp8_idct_idct1_scalar_add
|
||||
#define vp8_idct_idct1_scalar_add vp8_dc_only_idct_add_v6
|
||||
|
||||
#undef vp8_idct_iwalsh1
|
||||
#define vp8_idct_iwalsh1 vp8_short_inv_walsh4x4_1_armv6
|
||||
#define vp8_idct_iwalsh1 vp8_short_inv_walsh4x4_1_v6
|
||||
|
||||
#undef vp8_idct_iwalsh16
|
||||
#define vp8_idct_iwalsh16 vp8_short_inv_walsh4x4_armv6
|
||||
#define vp8_idct_iwalsh16 vp8_short_inv_walsh4x4_v6
|
||||
#endif
|
||||
|
||||
#if HAVE_ARMV7
|
||||
extern prototype_idct(vp8_short_idct4x4llm_1_neon);
|
||||
extern prototype_idct(vp8_short_idct4x4llm_neon);
|
||||
extern prototype_idct_scalar(vp8_dc_only_idct_neon);
|
||||
extern prototype_idct_scalar_add(vp8_dc_only_idct_add_neon);
|
||||
extern prototype_second_order(vp8_short_inv_walsh4x4_1_neon);
|
||||
extern prototype_second_order(vp8_short_inv_walsh4x4_neon);
|
||||
|
||||
@ -47,8 +48,8 @@ extern prototype_second_order(vp8_short_inv_walsh4x4_neon);
|
||||
#undef vp8_idct_idct16
|
||||
#define vp8_idct_idct16 vp8_short_idct4x4llm_neon
|
||||
|
||||
#undef vp8_idct_idct1_scalar
|
||||
#define vp8_idct_idct1_scalar vp8_dc_only_idct_neon
|
||||
#undef vp8_idct_idct1_scalar_add
|
||||
#define vp8_idct_idct1_scalar_add vp8_dc_only_idct_add_neon
|
||||
|
||||
#undef vp8_idct_iwalsh1
|
||||
#define vp8_idct_iwalsh1 vp8_short_inv_walsh4x4_1_neon
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
@ -13,16 +14,6 @@
|
||||
#include "loopfilter.h"
|
||||
#include "onyxc_int.h"
|
||||
|
||||
typedef void loop_filter_uvfunction
|
||||
(
|
||||
unsigned char *u, // source pointer
|
||||
int p, // pitch
|
||||
const signed char *flimit,
|
||||
const signed char *limit,
|
||||
const signed char *thresh,
|
||||
unsigned char *v
|
||||
);
|
||||
|
||||
extern prototype_loopfilter(vp8_loop_filter_horizontal_edge_armv6);
|
||||
extern prototype_loopfilter(vp8_loop_filter_vertical_edge_armv6);
|
||||
extern prototype_loopfilter(vp8_mbloop_filter_horizontal_edge_armv6);
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
49
vp8/common/arm/neon/dc_only_idct_add_neon.asm
Normal file
49
vp8/common/arm/neon/dc_only_idct_add_neon.asm
Normal file
@ -0,0 +1,49 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
EXPORT |vp8_dc_only_idct_add_neon|
|
||||
ARM
|
||||
REQUIRE8
|
||||
PRESERVE8
|
||||
|
||||
AREA ||.text||, CODE, READONLY, ALIGN=2
|
||||
;void vp8_dc_only_idct_add_neon(short input_dc, unsigned char *pred_ptr,
|
||||
; unsigned char *dst_ptr, int pitch, int stride)
|
||||
; r0 input_dc
|
||||
; r1 pred_ptr
|
||||
; r2 dst_ptr
|
||||
; r3 pitch
|
||||
; sp stride
|
||||
|vp8_dc_only_idct_add_neon| PROC
|
||||
add r0, r0, #4
|
||||
asr r0, r0, #3
|
||||
ldr r12, [sp]
|
||||
vdup.16 q0, r0
|
||||
|
||||
vld1.32 {d2[0]}, [r1], r3
|
||||
vld1.32 {d2[1]}, [r1], r3
|
||||
vld1.32 {d4[0]}, [r1], r3
|
||||
vld1.32 {d4[1]}, [r1]
|
||||
|
||||
vaddw.u8 q1, q0, d2
|
||||
vaddw.u8 q2, q0, d4
|
||||
|
||||
vqmovun.s16 d2, q1
|
||||
vqmovun.s16 d4, q2
|
||||
|
||||
vst1.32 {d2[0]}, [r2], r12
|
||||
vst1.32 {d2[1]}, [r2], r12
|
||||
vst1.32 {d4[0]}, [r2], r12
|
||||
vst1.32 {d4[1]}, [r2]
|
||||
|
||||
bx lr
|
||||
|
||||
ENDP
|
||||
END
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
EXPORT |vp8_short_inv_walsh4x4_neon|
|
||||
EXPORT |vp8_short_inv_walsh4x4_1_neon|
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
;
|
||||
; Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
;
|
||||
; Use of this source code is governed by a BSD-style license and patent
|
||||
; grant that can be found in the LICENSE file in the root of the source
|
||||
; tree. All contributing project authors may be found in the AUTHORS
|
||||
; file in the root of the source tree.
|
||||
; Use of this source code is governed by a BSD-style license
|
||||
; that can be found in the LICENSE file in the root of the source
|
||||
; tree. An additional intellectual property rights grant can be found
|
||||
; in the file PATENTS. All contributing project authors may
|
||||
; be found in the AUTHORS file in the root of the source tree.
|
||||
;
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
@ -28,7 +29,7 @@ void vp8_build_intra_predictors_mby_neon(MACROBLOCKD *x)
|
||||
unsigned char *y_buffer = x->dst.y_buffer;
|
||||
unsigned char *ypred_ptr = x->predictor;
|
||||
int y_stride = x->dst.y_stride;
|
||||
int mode = x->mbmi.mode;
|
||||
int mode = x->mode_info_context->mbmi.mode;
|
||||
int Up = x->up_available;
|
||||
int Left = x->left_available;
|
||||
|
||||
@ -51,7 +52,7 @@ void vp8_build_intra_predictors_mby_s_neon(MACROBLOCKD *x)
|
||||
unsigned char *y_buffer = x->dst.y_buffer;
|
||||
unsigned char *ypred_ptr = x->predictor;
|
||||
int y_stride = x->dst.y_stride;
|
||||
int mode = x->mbmi.mode;
|
||||
int mode = x->mode_info_context->mbmi.mode;
|
||||
int Up = x->up_available;
|
||||
int Left = x->left_available;
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license and patent
|
||||
* grant that can be found in the LICENSE file in the root of the source
|
||||
* tree. All contributing project authors may be found in the AUTHORS
|
||||
* file in the root of the source tree.
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
|
||||
@ -42,7 +43,6 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
|
||||
|
||||
rtcd->idct.idct1 = vp8_short_idct4x4llm_1_neon;
|
||||
rtcd->idct.idct16 = vp8_short_idct4x4llm_neon;
|
||||
rtcd->idct.idct1_scalar = vp8_dc_only_idct_neon;
|
||||
rtcd->idct.iwalsh1 = vp8_short_inv_walsh4x4_1_neon;
|
||||
rtcd->idct.iwalsh16 = vp8_short_inv_walsh4x4_neon;
|
||||
|
||||
@ -74,7 +74,6 @@ void vp8_machine_specific_config(VP8_COMMON *ctx)
|
||||
|
||||
rtcd->idct.idct1 = vp8_short_idct4x4llm_1_v6;
|
||||
rtcd->idct.idct16 = vp8_short_idct4x4llm_v6_dual;
|
||||
rtcd->idct.idct1_scalar = vp8_dc_only_idct_armv6;
|
||||
rtcd->idct.iwalsh1 = vp8_short_inv_walsh4x4_1_armv6;
|
||||
rtcd->idct.iwalsh16 = vp8_short_inv_walsh4x4_armv6;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user