DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5b81998bb7ab)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.


DEPTH = @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
ifeq (WINNT,$(OS_TARGET))
VISIBILITY_FLAGS =
endif

LOCAL_INCLUDES += \
  -I. \
  -I$(topsrcdir)/media/libvpx \
  -I$(topsrcdir)/media/libvpx/vp8/ \
  -I$(topsrcdir)/media/libvpx/vp8/common/ \
  -I$(topsrcdir)/media/libvpx/vp8/common/arm \
  -I$(topsrcdir)/media/libvpx/vp8/common/x86 \
  -I$(topsrcdir)/media/libvpx/vp8/decoder \
  -I$(topsrcdir)/media/libvpx/vp8/decoder/arm \
  -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 += \
  $(srcdir)/build/make \
  $(srcdir)/vpx \
  $(srcdir)/vpx/src \
  $(srcdir)/vpx_mem \
  $(srcdir)/vpx_mem/include \
  $(srcdir)/vpx_ports \
  $(srcdir)/vpx_scale \
  $(srcdir)/vpx_scale/arm \
  $(srcdir)/vpx_scale/arm/neon \
  $(srcdir)/vpx_scale/generic \
  $(srcdir)/vp8 \
  $(srcdir)/vp8/common \
  $(srcdir)/vp8/common/arm \
  $(srcdir)/vp8/common/arm/armv6 \
  $(srcdir)/vp8/common/arm/neon \
  $(srcdir)/vp8/common/generic \
  $(srcdir)/vp8/common/x86 \
  $(srcdir)/vp8/decoder \
  $(srcdir)/vp8/decoder/arm \
  $(srcdir)/vp8/decoder/arm/armv6 \
  $(srcdir)/vp8/decoder/arm/neon \
  $(srcdir)/vp8/decoder/generic \
  $(srcdir)/vp8/decoder/x86 \
  $(NULL)

#Setup the libvpx assembler config.
AS=$(VPX_AS)
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)

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 \
  mem.h \
  vpx_integer.h \
  vpx_timer.h \
  arm.h \
  x86.h \
  scale_mode.h \
  vpxscale.h \
  yv12config.h \
  yv12extend.h \
  $(NULL)

CSRCS += \
  vpx_config_c.c \
  vp8_dx_iface.c \
  alloccommon.c \
  blockd.c \
  debugmodes.c \
  dequantize.c \
  entropy.c \
  entropymode.c \
  entropymv.c \
  extend.c \
  filter.c \
  findnearmv.c \
  idct_blk.c \
  idctllm.c \
  loopfilter.c \
  loopfilter_filters.c \
  mbpitch.c \
  modecont.c \
  modecontext.c \
  postproc.c \
  quant_common.c \
  reconinter.c \
  reconintra.c \
  reconintra4x4.c \
  sad_c.c \
  setupintrarecon.c \
  swapyv12buffer.c \
  treecoder.c \
  variance_c.c \
  systemdependent.c \
  dboolhuff.c \
  decodemv.c \
  decodframe.c \
  detokenize.c \
  reconintra_mt.c \
  onyxd_if.c \
  threading.c \
  dsystemdependent.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 \
  scalesystemdependent.c \
  yv12config.c \
  yv12extend.c \
  $(NULL)

ifdef MOZ_VP8_ERROR_CONCEALMENT
CSRCS += \
  error_concealment.c \
  $(NULL)
endif

ifdef MOZ_VP8_ENCODER
VPATH += \
  $(srcdir)/vp8/encoder \
  $(srcdir)/vp8/encoder/arm \
  $(srcdir)/vp8/encoder/arm/armv5te \
  $(srcdir)/vp8/encoder/arm/armv6 \
  $(srcdir)/vp8/encoder/arm/neon \
  $(srcdir)/vp8/encoder/generic \
  $(srcdir)/vp8/encoder/x86 \
  $(srcdir)/vpx_scale/arm \
  $(srcdir)/vpx_scale/arm/neon \
  $(NULL)

CSRCS += \
  vp8_cx_iface.c \
  bitstream.c \
  dct.c \
  encodeframe.c \
  encodeintra.c \
  encodemb.c \
  encodemv.c \
  ethreading.c \
  firstpass.c \
  lookahead.c \
  mcomp.c \
  modecosts.c \
  mr_dissim.c \
  onyx_if.c \
  pickinter.c \
  picklpf.c \
  psnr.c \
  quantize.c \
  ratectrl.c \
  rdopt.c \
  segmentation.c \
  temporal_filter.c \
  tokenize.c \
  treewriter.c \
  csystemdependent.c \
  $(NULL)
endif

ifdef VPX_X86_ASM
# Building on an x86 platform with a supported assembler, include
# the optimized assembly in the build.

CSRCS += \
  filter_x86.c \
  idct_blk_mmx.c \
  idct_blk_sse2.c \
  loopfilter_x86.c \
  postproc_x86.c \
  recon_wrapper_sse2.c \
  variance_mmx.c \
  variance_sse2.c \
  variance_ssse3.c \
  vp8_asm_stubs.c \
  x86_systemdependent.c \
  x86_dsystemdependent.c \
  $(NULL)

ASFILES += \
  dequantize_mmx.asm \
  idctllm_mmx.asm \
  idctllm_sse2.asm \
  iwalsh_mmx.asm \
  iwalsh_sse2.asm \
  loopfilter_mmx.asm \
  loopfilter_sse2.asm \
  postproc_mmx.asm \
  postproc_sse2.asm \
  recon_mmx.asm \
  recon_sse2.asm \
  sad_mmx.asm \
  sad_sse2.asm \
  sad_sse3.asm \
  sad_sse4.asm \
  sad_ssse3.asm \
  subpixel_mmx.asm \
  subpixel_sse2.asm \
  subpixel_ssse3.asm \
  variance_impl_mmx.asm \
  variance_impl_sse2.asm \
  variance_impl_ssse3.asm \
  emms.asm \
  $(NULL)

ifeq (64,$(findstring 64,$(OS_TEST)))
ASFILES += loopfilter_block_sse2.asm
endif

ifdef MOZ_VP8_ENCODER

CSRCS += \
  x86_csystemdependent.c \
  $(NULL)

# Files which depend on asm_enc_offsets.asm
VPX_ASM_ENC_OFFSETS_SRCS = \
  quantize_sse2.asm \
  quantize_sse4.asm \
  quantize_ssse3.asm \
  $(NULL)

ASFILES += \
  dct_mmx.asm \
  dct_sse2.asm \
  encodeopt.asm \
  fwalsh_sse2.asm \
  quantize_mmx.asm \
  subtract_mmx.asm \
  subtract_sse2.asm \
  temporal_filter_apply_sse2.asm \
  $(VPX_ASM_ENC_OFFSETS_SRCS) \
  $(NULL)

endif

endif

ifdef VPX_ARM_ASM
# Building on an ARM platform with a supported assembler, include
# the optimized assembly in the build.

ifeq ($(OS_TARGET),Android)

# Older versions of the Android NDK don't pre-define anything to indicate the
# OS they're on, so do it for them.
DEFINES += -D__linux__

# For cpu-features.h
LOCAL_INCLUDES += -I$(ANDROID_NDK)/sources/android/cpufeatures
# For cpu-features.c
VPATH += $(ANDROID_NDK)/sources/android/cpufeatures

CSRCS += cpu-features.c

endif

CSRCS += \
  arm_cpudetect.c \
  arm_systemdependent.c \
  bilinearfilter_arm.c \
  dequantize_arm.c \
  filter_arm.c \
  loopfilter_arm.c \
  reconintra_arm.c \
  variance_arm.c \
  idct_blk_v6.c \
  idct_blk_neon.c \
  arm_dsystemdependent.c \
  arm_scalesystemdependent.c \
  yv12extend_arm.c \
  $(NULL)

# Files which depend on asm_com_offsets.asm
VPX_ASM_COM_OFFSETS_SRCS = \
  vp8_vpxyv12_copy_y_neon.asm \
  vp8_vpxyv12_copyframe_func_neon.asm \
  vp8_vpxyv12_extendframeborders_neon.asm \
  $(NULL)

VPX_ASFILES = \
  bilinearfilter_v6.asm \
  copymem16x16_v6.asm \
  copymem8x4_v6.asm \
  copymem8x8_v6.asm \
  dc_only_idct_add_v6.asm \
  dequant_idct_v6.asm \
  dequantize_v6.asm \
  filter_v6.asm \
  idct_v6.asm \
  intra4x4_predict_v6.asm \
  iwalsh_v6.asm \
  loopfilter_v6.asm \
  simpleloopfilter_v6.asm \
  sixtappredict8x4_v6.asm \
  bilinearpredict16x16_neon.asm \
  bilinearpredict4x4_neon.asm \
  bilinearpredict8x4_neon.asm \
  bilinearpredict8x8_neon.asm \
  buildintrapredictorsmby_neon.asm \
  copymem16x16_neon.asm \
  copymem8x4_neon.asm \
  copymem8x8_neon.asm \
  dc_only_idct_add_neon.asm \
  dequant_idct_neon.asm \
  dequantizeb_neon.asm \
  idct_dequant_0_2x_neon.asm \
  idct_dequant_full_2x_neon.asm \
  iwalsh_neon.asm \
  loopfilter_neon.asm \
  loopfiltersimplehorizontaledge_neon.asm \
  loopfiltersimpleverticaledge_neon.asm \
  mbloopfilter_neon.asm \
  save_neon_reg.asm \
  vp8_mse16x16_armv6.asm \
  vp8_sad16x16_armv6.asm \
  vp8_variance16x16_armv6.asm \
  vp8_variance8x8_armv6.asm \
  vp8_variance_halfpixvar16x16_h_armv6.asm \
  vp8_variance_halfpixvar16x16_hv_armv6.asm \
  vp8_variance_halfpixvar16x16_v_armv6.asm \
  shortidct4x4llm_neon.asm \
  sad16_neon.asm \
  sad8_neon.asm \
  sixtappredict16x16_neon.asm \
  sixtappredict4x4_neon.asm \
  sixtappredict8x4_neon.asm \
  sixtappredict8x8_neon.asm \
  variance_neon.asm \
  vp8_mse16x16_neon.asm \
  vp8_subpixelvariance8x8_neon.asm \
  vp8_subpixelvariance16x16_neon.asm \
  vp8_subpixelvariance16x16s_neon.asm \
  $(VPX_ASM_COM_OFFSETS_SRCS) \
  $(NULL)

ifdef MOZ_VP8_ENCODER
CSRCS += \
  arm_csystemdependent.c \
  boolhuff_arm.c \
  dct_arm.c \
  picklpf_arm.c \
  $(NULL)

# Files which depend on asm_enc_offsets.asm
VPX_ASM_ENC_OFFSETS_SRCS = \
  boolhuff_armv5te.asm \
  vp8_packtokens_armv5.asm \
  vp8_packtokens_mbrow_armv5.asm \
  vp8_packtokens_partitions_armv5.asm \
  vp8_fast_quantize_b_armv6.asm \
  vp8_subtract_armv6.asm \
  fastquantizeb_neon.asm \
  subtract_neon.asm \
  $(NULL)

VPX_ASFILES += \
  vp8_short_fdct4x4_armv6.asm \
  walsh_v6.asm \
  shortfdct_neon.asm \
  vp8_memcpy_neon.asm \
  vp8_shortwalsh4x4_neon.asm \
  $(VPX_ASM_ENC_OFFSETS_SRCS) \
  $(NULL)

endif

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) < $< > $@
else
ASFILES += $(VPX_ASFILES)
endif

else
ifdef MOZ_VP8_ENCODER
# boolhuff_armv5te.asm defines the same functions as boolhuff.c instead of
# using RTCD, so we have to make sure we only add one of the two.
CSRCS += boolhuff.c
endif
endif

ifdef VPX_NEED_OBJ_INT_EXTRACT

# We don't have a compiler that supports a compatible inline asm syntax, so we
# have to resort to extracting asm offsets from a compiled object. This only
# works if we have the appropriate system headers obj_int_extract needs to
# parse that format, and so only has limited support for cross-compilation.

ifdef VPX_ARM_ASM
VPX_OIE_FORMAT := rvds
else
VPX_OIE_FORMAT := gas
endif

HOST_CSRCS = obj_int_extract.c
HOST_PROGRAM = host_obj_int_extract$(HOST_BIN_SUFFIX)

CSRCS += asm_com_offsets.c

GARBAGE += asm_com_offsets.$(OBJ_SUFFIX) asm_com_offsets.asm

ifdef MOZ_VP8_ENCODER
CSRCS += asm_enc_offsets.c

GARBAGE += asm_enc_offsets.$(OBJ_SUFFIX) asm_enc_offsets.asm
endif

else

# We can extract the asm offsets directly from generated assembly using inline
# asm. This is the preferred method.

asm_com_offsets.s: CFLAGS += -DINLINE_ASM

OFFSET_PATTERN := '^[a-zA-Z0-9_]* EQU'

asm_com_offsets.asm: asm_com_offsets.s
	grep $(OFFSET_PATTERN) $< | sed -e 's/[$$\#]//g' \
	    $(if $(VPX_AS_CONVERSION),| $(VPX_AS_CONVERSION)) > $@

GARBAGE += asm_com_offsets.s asm_com_offsets.asm

ifdef MOZ_VP8_ENCODER

asm_enc_offsets.s: CFLAGS += -DINLINE_ASM

asm_enc_offsets.asm: asm_enc_offsets.s
	grep $(OFFSET_PATTERN) $< | sed -e 's/[$$\#]//g' \
	    $(if $(VPX_AS_CONVERSION),| $(VPX_AS_CONVERSION)) > $@

GARBAGE += asm_enc_offsets.s asm_enc_offsets.asm

endif

endif

include $(topsrcdir)/config/rules.mk

# This must be after rules.mk in order to use $(OBJ_SUFFIX) outside a
# recursively-expanded variable.
ifdef VPX_NEED_OBJ_INT_EXTRACT

# only for MSVC
ifdef _MSC_VER
asm_com_offsets.$(OBJ_SUFFIX): CFLAGS += -GL-
endif

asm_com_offsets.asm: asm_com_offsets.$(OBJ_SUFFIX) $(HOST_PROGRAM)
	./$(HOST_PROGRAM) $(VPX_OIE_FORMAT) $< \
	    $(if $(VPX_AS_CONVERSION),| $(VPX_AS_CONVERSION)) > $@

# Filter out this object, because we don't want to link against it.
# It was generated solely so it could be parsed by obj_int_extract.
OBJS := $(filter-out asm_com_offsets.$(OBJ_SUFFIX),$(OBJS))

ifdef MOZ_VP8_ENCODER

ifdef _MSC_VER
asm_enc_offsets.$(OBJ_SUFFIX): CFLAGS += -GL-
endif

asm_enc_offsets.asm: asm_enc_offsets.$(OBJ_SUFFIX) $(HOST_PROGRAM)
	./$(HOST_PROGRAM) $(VPX_OIE_FORMAT) $< \
	    $(if $(VPX_AS_CONVERSION),| $(VPX_AS_CONVERSION)) > $@

# Filter out this object, because we don't want to link against it.
# It was generated solely so it could be parsed by obj_int_extract.
OBJS := $(filter-out asm_enc_offsets.$(OBJ_SUFFIX),$(OBJS))

endif
endif

# These dependencies are not generated automatically, so do it manually.
ifdef VPX_AS_CONVERSION
$(addsuffix .$(OBJ_SUFFIX), $(VPX_ASM_COM_OFFSETS_SRCS)): asm_com_offsets.asm
ifdef MOZ_VP8_ENCODER
$(addsuffix .$(OBJ_SUFFIX), $(VPX_ASM_ENC_OFFSETS_SRCS)): asm_enc_offsets.asm
endif
else
$(patsubst %.$(ASM_SUFFIX),%.$(OBJ_SUFFIX), $(VPX_ASM_COM_OFFSETS_SRCS)): asm_com_offsets.asm
ifdef MOZ_VP8_ENCODER
$(patsubst %.$(ASM_SUFFIX),%.$(OBJ_SUFFIX), $(VPX_ASM_ENC_OFFSETS_SRCS)): asm_enc_offsets.asm
endif
endif

# Workaround a bug of Sun Studio (CR 6963410)
ifdef SOLARIS_SUNPRO_CC
ifeq (86,$(findstring 86,$(OS_TEST)))
filter.o: filter.c Makefile.in
	$(REPORT_BUILD)
	@$(MAKE_DEPS_AUTO_CC)
	$(CC) -o $@ -c $(patsubst -xO[45],-xO3,$(COMPILE_CFLAGS)) $<
endif
endif