2010-06-08 16:31:28 -07:00
|
|
|
# ***** BEGIN LICENSE BLOCK *****
|
|
|
|
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
#
|
|
|
|
# The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
# 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
|
|
|
# http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
# for the specific language governing rights and limitations under the
|
|
|
|
# License.
|
|
|
|
#
|
|
|
|
# The Original Code is Mozilla code.
|
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is the Mozilla Foundation.
|
|
|
|
# Portions created by the Initial Developer are Copyright (C) 2010
|
|
|
|
# the Initial Developer. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
# Chris Pearce <chris@pearce.org.nz>
|
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the terms of
|
|
|
|
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
|
|
|
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
# in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
# of those above. If you wish to allow use of your version of this file only
|
|
|
|
# under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
# use your version of this file under the terms of the MPL, indicate your
|
|
|
|
# decision by deleting the provisions above and replace them with the notice
|
|
|
|
# and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
# the provisions above, a recipient may use your version of this file under
|
|
|
|
# the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
#
|
|
|
|
# ***** END LICENSE BLOCK *****
|
|
|
|
|
|
|
|
|
|
|
|
DEPTH = ../..
|
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
DEFINES += -DHAVE_CONFIG_H=vpx_config.h
|
|
|
|
|
|
|
|
MODULE = vpx
|
|
|
|
LIBRARY_NAME = vpx
|
|
|
|
FORCE_STATIC_LIB= 1
|
|
|
|
|
|
|
|
LOCAL_INCLUDES += \
|
|
|
|
-I. \
|
|
|
|
-I$(topsrcdir)/media/libvpx \
|
|
|
|
-I$(topsrcdir)/media/libvpx/vp8/ \
|
|
|
|
-I$(topsrcdir)/media/libvpx/vp8/common/ \
|
2010-11-07 23:47:17 -08:00
|
|
|
-I$(topsrcdir)/media/libvpx/vp8/common/arm \
|
2010-06-08 16:31:28 -07:00
|
|
|
-I$(topsrcdir)/media/libvpx/vp8/common/x86 \
|
|
|
|
-I$(topsrcdir)/media/libvpx/vp8/decoder \
|
2010-11-07 23:47:17 -08:00
|
|
|
-I$(topsrcdir)/media/libvpx/vp8/decoder/arm \
|
2010-06-08 16:31:28 -07:00
|
|
|
-I$(topsrcdir)/media/libvpx/vp8/decoder/x86 \
|
|
|
|
-I$(topsrcdir)/media/libvpx/vpx_codec \
|
|
|
|
-I$(topsrcdir)/media/libvpx/vpx_mem/ \
|
|
|
|
-I$(topsrcdir)/media/libvpx/vpx_mem/include \
|
|
|
|
-I$(topsrcdir)/media/libvpx/vpx_ports/ \
|
|
|
|
-I$(topsrcdir)/media/libvpx/vpx_scale/ \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
VPATH += \
|
2010-11-07 23:47:17 -08:00
|
|
|
$(srcdir)/build/make \
|
2010-06-08 16:31:28 -07:00
|
|
|
$(srcdir)/vpx \
|
|
|
|
$(srcdir)/vpx/src \
|
|
|
|
$(srcdir)/vpx_mem \
|
|
|
|
$(srcdir)/vpx_mem/include \
|
|
|
|
$(srcdir)/vpx_ports \
|
|
|
|
$(srcdir)/vpx_scale \
|
2010-11-07 23:47:17 -08:00
|
|
|
$(srcdir)/vpx_scale/arm \
|
2010-06-08 16:31:28 -07:00
|
|
|
$(srcdir)/vpx_scale/generic \
|
|
|
|
$(srcdir)/vp8 \
|
|
|
|
$(srcdir)/vp8/common \
|
2010-11-07 23:47:17 -08:00
|
|
|
$(srcdir)/vp8/common/arm \
|
|
|
|
$(srcdir)/vp8/common/arm/armv6 \
|
|
|
|
$(srcdir)/vp8/common/arm/neon \
|
2010-06-08 16:31:28 -07:00
|
|
|
$(srcdir)/vp8/common/generic \
|
|
|
|
$(srcdir)/vp8/common/x86 \
|
|
|
|
$(srcdir)/vp8/decoder \
|
2010-11-07 23:47:17 -08:00
|
|
|
$(srcdir)/vp8/decoder/arm \
|
|
|
|
$(srcdir)/vp8/decoder/arm/armv6 \
|
|
|
|
$(srcdir)/vp8/decoder/arm/neon \
|
2010-06-08 16:31:28 -07:00
|
|
|
$(srcdir)/vp8/decoder/generic \
|
|
|
|
$(srcdir)/vp8/decoder/x86 \
|
|
|
|
$(NULL)
|
|
|
|
|
2010-11-07 23:47:17 -08:00
|
|
|
#Setup the libvpx assembler config.
|
2010-06-08 16:31:28 -07:00
|
|
|
AS=$(VPX_AS)
|
2010-11-07 23:47:17 -08:00
|
|
|
ASFLAGS=$(VPX_ASFLAGS) -I. -I$(topsrcdir)/media/libvpx/ -I$(topsrcdir)/media/libvpx/vpx_ports/
|
|
|
|
AS_DASH_C_FLAG=$(VPX_DASH_C_FLAG)
|
|
|
|
ASM_SUFFIX=$(VPX_ASM_SUFFIX)
|
2010-06-08 16:31:28 -07:00
|
|
|
|
|
|
|
EXPORTS_NAMESPACES = vpx
|
|
|
|
|
|
|
|
EXPORTS_vpx = \
|
|
|
|
vp8.h \
|
|
|
|
vp8cx.h \
|
|
|
|
vp8dx.h \
|
|
|
|
vp8e.h \
|
|
|
|
vpx_codec.h \
|
|
|
|
vpx_codec_impl_bottom.h \
|
|
|
|
vpx_codec_impl_top.h \
|
|
|
|
vpx_decoder.h \
|
|
|
|
vpx_decoder_compat.h \
|
|
|
|
vpx_encoder.h\
|
|
|
|
vpx_image.h \
|
|
|
|
vpx_mem_intrnl.h \
|
|
|
|
vpx_mem.h \
|
|
|
|
config.h \
|
|
|
|
mem.h \
|
|
|
|
vpx_integer.h \
|
|
|
|
vpx_timer.h \
|
2010-11-07 23:47:17 -08:00
|
|
|
arm.h \
|
2010-06-08 16:31:28 -07:00
|
|
|
x86.h \
|
|
|
|
scale_mode.h \
|
|
|
|
vpxscale.h \
|
|
|
|
yv12config.h \
|
|
|
|
yv12extend.h \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
CSRCS += \
|
|
|
|
vpx_config_c.c \
|
|
|
|
systemdependent.c \
|
|
|
|
alloccommon.c \
|
|
|
|
blockd.c \
|
|
|
|
debugmodes.c \
|
|
|
|
dsystemdependent.c \
|
|
|
|
entropy.c \
|
|
|
|
entropymode.c \
|
|
|
|
entropymv.c \
|
|
|
|
extend.c \
|
|
|
|
filter_c.c \
|
|
|
|
findnearmv.c \
|
|
|
|
idctllm.c \
|
|
|
|
invtrans.c \
|
|
|
|
loopfilter.c \
|
|
|
|
loopfilter_filters.c \
|
|
|
|
mbpitch.c \
|
|
|
|
modecont.c \
|
|
|
|
modecontext.c \
|
|
|
|
postproc.c \
|
|
|
|
predictdc.c \
|
|
|
|
quant_common.c \
|
|
|
|
recon.c \
|
|
|
|
reconinter.c \
|
|
|
|
reconintra.c \
|
|
|
|
reconintra4x4.c \
|
|
|
|
setupintrarecon.c \
|
|
|
|
swapyv12buffer.c \
|
|
|
|
textblit.c \
|
|
|
|
treecoder.c \
|
|
|
|
dboolhuff.c \
|
|
|
|
decodemv.c \
|
|
|
|
decodframe.c \
|
|
|
|
dequantize.c \
|
|
|
|
detokenize.c \
|
2010-11-07 23:47:17 -08:00
|
|
|
reconintra_mt.c \
|
2010-09-09 05:06:21 -07:00
|
|
|
idct_blk.c \
|
2010-06-08 16:31:28 -07:00
|
|
|
onyxd_if.c \
|
|
|
|
threading.c \
|
|
|
|
vp8_dx_iface.c \
|
|
|
|
vpx_codec.c \
|
|
|
|
vpx_decoder.c \
|
|
|
|
vpx_decoder_compat.c \
|
|
|
|
vpx_encoder.c \
|
|
|
|
vpx_image.c \
|
|
|
|
vpx_mem.c \
|
|
|
|
gen_scalers.c \
|
|
|
|
vpxscale.c \
|
|
|
|
scalesystemdependant.c \
|
|
|
|
yv12config.c \
|
|
|
|
yv12extend.c \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ifdef VPX_X86_ASM
|
|
|
|
# Building on an x86 platform with a supported assembler, include
|
|
|
|
# the optimized assembly in the build.
|
2010-11-07 23:47:17 -08:00
|
|
|
|
2010-06-08 16:31:28 -07:00
|
|
|
CSRCS += \
|
2010-09-09 05:06:21 -07:00
|
|
|
idct_blk_mmx.c \
|
|
|
|
idct_blk_sse2.c \
|
2010-06-08 16:31:28 -07:00
|
|
|
loopfilter_x86.c \
|
|
|
|
vp8_asm_stubs.c \
|
|
|
|
x86_systemdependent.c \
|
|
|
|
x86_dsystemdependent.c \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
ASFILES += \
|
|
|
|
idctllm_mmx.asm \
|
2010-09-09 05:06:21 -07:00
|
|
|
idctllm_sse2.asm \
|
2010-06-08 16:31:28 -07:00
|
|
|
iwalsh_mmx.asm \
|
|
|
|
iwalsh_sse2.asm \
|
|
|
|
loopfilter_mmx.asm \
|
|
|
|
loopfilter_sse2.asm \
|
|
|
|
postproc_mmx.asm \
|
|
|
|
postproc_sse2.asm \
|
|
|
|
recon_mmx.asm \
|
|
|
|
recon_sse2.asm \
|
|
|
|
subpixel_mmx.asm \
|
|
|
|
subpixel_sse2.asm \
|
2010-09-09 05:06:21 -07:00
|
|
|
subpixel_ssse3.asm \
|
2010-06-08 16:31:28 -07:00
|
|
|
dequantize_mmx.asm \
|
|
|
|
emms.asm \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
endif
|
2010-11-07 23:47:17 -08:00
|
|
|
|
|
|
|
ifdef VPX_ARM_ASM
|
|
|
|
# Building on an ARM platform with a supported assembler, include
|
|
|
|
# the optimized assembly in the build.
|
|
|
|
|
|
|
|
# The Android NDK doesn't pre-define anything to indicate the OS it's on, so
|
|
|
|
# do it for them.
|
|
|
|
ifeq ($(OS_TARGET),Android)
|
|
|
|
DEFINES += -D__linux__
|
|
|
|
endif
|
|
|
|
|
|
|
|
CSRCS += \
|
|
|
|
arm_cpudetect.c \
|
|
|
|
arm_systemdependent.c \
|
|
|
|
bilinearfilter_arm.c \
|
|
|
|
filter_arm.c \
|
|
|
|
loopfilter_arm.c \
|
|
|
|
reconintra_arm.c \
|
|
|
|
arm_dsystemdependent.c \
|
|
|
|
dequantize_arm.c \
|
|
|
|
idct_blk_v6.c \
|
|
|
|
idct_blk_neon.c \
|
|
|
|
recon_neon.c \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
VPX_ASFILES = \
|
|
|
|
detokenize.asm \
|
|
|
|
bilinearfilter_v6.asm \
|
|
|
|
copymem8x4_v6.asm \
|
|
|
|
copymem8x8_v6.asm \
|
|
|
|
copymem16x16_v6.asm \
|
|
|
|
dc_only_idct_add_v6.asm \
|
|
|
|
iwalsh_v6.asm \
|
|
|
|
filter_v6.asm \
|
|
|
|
idct_v6.asm \
|
|
|
|
loopfilter_v6.asm \
|
|
|
|
recon_v6.asm \
|
|
|
|
simpleloopfilter_v6.asm \
|
|
|
|
sixtappredict8x4_v6.asm \
|
|
|
|
bilinearpredict4x4_neon.asm \
|
|
|
|
bilinearpredict8x4_neon.asm \
|
|
|
|
bilinearpredict8x8_neon.asm \
|
|
|
|
bilinearpredict16x16_neon.asm \
|
|
|
|
copymem8x4_neon.asm \
|
|
|
|
copymem8x8_neon.asm \
|
|
|
|
copymem16x16_neon.asm \
|
|
|
|
dc_only_idct_add_neon.asm \
|
|
|
|
iwalsh_neon.asm \
|
|
|
|
loopfilter_neon.asm \
|
|
|
|
loopfiltersimplehorizontaledge_neon.asm \
|
|
|
|
loopfiltersimpleverticaledge_neon.asm \
|
|
|
|
mbloopfilter_neon.asm \
|
|
|
|
recon2b_neon.asm \
|
|
|
|
recon4b_neon.asm \
|
|
|
|
reconb_neon.asm \
|
|
|
|
shortidct4x4llm_1_neon.asm \
|
|
|
|
shortidct4x4llm_neon.asm \
|
|
|
|
sixtappredict4x4_neon.asm \
|
|
|
|
sixtappredict8x4_neon.asm \
|
|
|
|
sixtappredict8x8_neon.asm \
|
|
|
|
sixtappredict16x16_neon.asm \
|
|
|
|
recon16x16mb_neon.asm \
|
|
|
|
buildintrapredictorsmby_neon.asm \
|
|
|
|
save_neon_reg.asm \
|
|
|
|
dequant_dc_idct_v6.asm \
|
|
|
|
dequant_idct_v6.asm \
|
|
|
|
dequantize_v6.asm \
|
|
|
|
idct_dequant_dc_full_2x_neon.asm \
|
|
|
|
idct_dequant_dc_0_2x_neon.asm \
|
|
|
|
dequant_idct_neon.asm \
|
|
|
|
idct_dequant_full_2x_neon.asm \
|
|
|
|
idct_dequant_0_2x_neon.asm \
|
|
|
|
dequantizeb_neon.asm \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
# The ARM asm needs to extract the offsets of various C struct members.
|
|
|
|
# We need a program that runs on the host to pull them out of a .o file.
|
|
|
|
HOST_CSRCS = obj_int_extract.c
|
|
|
|
HOST_PROGRAM = host_obj_int_extract$(HOST_BIN_SUFFIX)
|
|
|
|
|
|
|
|
ifdef VPX_AS_CONVERSION
|
|
|
|
# The ARM asm is written in ARM RVCT syntax, but we actually build it with
|
|
|
|
# gas using GNU syntax. Add some rules to perform the conversion.
|
|
|
|
VPX_CONVERTED_ASFILES = $(addsuffix .$(ASM_SUFFIX), $(VPX_ASFILES))
|
|
|
|
|
|
|
|
ASFILES += $(VPX_CONVERTED_ASFILES)
|
|
|
|
GARBAGE += $(VPX_CONVERTED_ASFILES)
|
|
|
|
|
|
|
|
%.asm.$(ASM_SUFFIX): %.asm
|
|
|
|
$(VPX_AS_CONVERSION) < $< > $@
|
|
|
|
|
|
|
|
vpx_asm_offsets.asm: vpx_asm_offsets.$(OBJ_SUFFIX) $(HOST_PROGRAM)
|
|
|
|
./$(HOST_PROGRAM) rvds $< | $(VPX_AS_CONVERSION) > $@
|
|
|
|
|
|
|
|
detokenize.asm.$(OBJ_SUFFIX): vpx_asm_offsets.asm
|
|
|
|
|
|
|
|
else
|
|
|
|
ASFILES += $(VPX_ASFILES)
|
|
|
|
|
|
|
|
vpx_asm_offsets.asm: vpx_asm_offsets.$(OBJ_SUFFIX) $(HOST_PROGRAM)
|
|
|
|
./$(HOST_PROGRAM) rvds $< > $@
|
|
|
|
|
|
|
|
detokenize.$(OBJ_SUFFIX): vpx_asm_offsets.asm
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
GARBAGE += vpx_asm_offsets.$(OBJ_SUFFIX) vpx_asm_offsets.asm
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2010-06-08 16:31:28 -07:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
2010-08-06 00:03:02 -07:00
|
|
|
|
|
|
|
# Workaround a bug of Sun Studio (CR 6963410)
|
|
|
|
ifdef SOLARIS_SUNPRO_CC
|
|
|
|
ifeq (86,$(findstring 86,$(OS_TEST)))
|
|
|
|
filter_c.o: filter_c.c Makefile.in
|
|
|
|
$(REPORT_BUILD)
|
|
|
|
@$(MAKE_DEPS_AUTO_CC)
|
|
|
|
$(CC) -o $@ -c $(patsubst -xO[45],-xO3,$(COMPILE_CFLAGS)) $<
|
|
|
|
endif
|
|
|
|
endif
|