From 5ebe94f9f148693a34bc861ef97a7fff6fc38251 Mon Sep 17 00:00:00 2001 From: John Koleszar Date: Sun, 23 Dec 2012 07:20:10 -0800 Subject: [PATCH] Build fixes to merge vp9-preview into master Various fixups to resolve issues when building vp9-preview under the more stringent checks placed on the experimental branch. Change-Id: I21749de83552e1e75c799003f849e6a0f1a35b07 --- examples/decode_with_partial_drops.txt | 238 +++++++++++++++++++++ libs.mk | 8 +- test/test.mk | 6 +- test/test_libvpx.cc | 7 +- vp9/common/generic/vp9_systemdependent.c | 2 +- vp9/common/vp9_alloccommon.c | 2 +- vp9/common/vp9_blockd.h | 2 +- vp9/common/vp9_idctllm.c | 2 +- vp9/common/vp9_invtrans.h | 2 +- vp9/common/vp9_postproc.c | 6 +- vp9/common/vp9_recon.c | 2 +- vp9/common/vp9_reconinter.c | 2 +- vp9/common/vp9_reconintra.c | 2 +- vp9/common/vp9_reconintra4x4.c | 2 +- vp9/common/vp9_rtcd_defs.sh | 2 + vp9/common/vp9_systemdependent.h | 2 +- vp9/common/x86/vp9_asm_stubs.c | 2 +- vp9/common/x86/vp9_recon_wrapper_sse2.c | 2 +- vp9/decoder/vp9_dboolhuff.h | 2 +- vp9/decoder/vp9_decodframe.c | 4 +- vp9/decoder/vp9_onyxd_int.h | 2 +- vp9/decoder/x86/vp9_idct_blk_mmx.c | 2 +- vp9/decoder/x86/vp9_idct_blk_sse2.c | 2 +- vp9/decoder/x86/vp9_x86_dsystemdependent.c | 2 +- vp9/encoder/vp9_bitstream.c | 4 +- vp9/encoder/vp9_dct.c | 2 +- vp9/encoder/vp9_encodeframe.c | 6 +- vp9/encoder/vp9_encodeintra.c | 2 +- vp9/encoder/vp9_encodemb.c | 2 +- vp9/encoder/vp9_encodemb.h | 2 +- vp9/encoder/vp9_firstpass.c | 8 +- vp9/encoder/vp9_mbgraph.c | 4 +- vp9/encoder/vp9_mcomp.c | 2 +- vp9/encoder/vp9_onyx_if.c | 19 +- vp9/encoder/vp9_onyx_int.h | 2 +- vp9/encoder/vp9_picklpf.c | 2 - vp9/encoder/vp9_rdopt.c | 6 +- vp9/encoder/vp9_sad_c.c | 2 +- vp9/encoder/vp9_temporal_filter.c | 4 - vp9/encoder/x86/vp9_x86_csystemdependent.c | 2 +- vp9/vp9_common.mk | 2 + vp9/vp9cx.mk | 3 + vp9/vp9dx.mk | 1 + vpx_mem/include/vpx_mem_intrnl.h | 2 +- vpx_mem/vpx_mem_tracker.c | 2 +- vpx_ports/arm_cpudetect.c | 1 - vpx_scale/vpx_scale.mk | 2 + vpxenc.c | 6 + 48 files changed, 315 insertions(+), 78 deletions(-) create mode 100644 examples/decode_with_partial_drops.txt diff --git a/examples/decode_with_partial_drops.txt b/examples/decode_with_partial_drops.txt new file mode 100644 index 000000000..7b0d3d2ca --- /dev/null +++ b/examples/decode_with_partial_drops.txt @@ -0,0 +1,238 @@ +@TEMPLATE decoder_tmpl.c +Decode With Partial Drops Example +========================= +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INTRODUCTION +This is an example utility which drops a series of frames (or parts of frames), +as specified on the command line. This is useful for observing the error +recovery features of the codec. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ INTRODUCTION + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ EXTRA_INCLUDES +#include +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ EXTRA_INCLUDES + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HELPERS +struct parsed_header +{ + char key_frame; + int version; + char show_frame; + int first_part_size; +}; + +int next_packet(struct parsed_header* hdr, int pos, int length, int mtu) +{ + int size = 0; + int remaining = length - pos; + /* Uncompressed part is 3 bytes for P frames and 10 bytes for I frames */ + int uncomp_part_size = (hdr->key_frame ? 10 : 3); + /* number of bytes yet to send from header and the first partition */ + int remainFirst = uncomp_part_size + hdr->first_part_size - pos; + if (remainFirst > 0) + { + if (remainFirst <= mtu) + { + size = remainFirst; + } + else + { + size = mtu; + } + + return size; + } + + /* second partition; just slot it up according to MTU */ + if (remaining <= mtu) + { + size = remaining; + return size; + } + return mtu; +} + +void throw_packets(unsigned char* frame, int* size, int loss_rate, + int* thrown, int* kept) +{ + unsigned char loss_frame[256*1024]; + int pkg_size = 1; + int pos = 0; + int loss_pos = 0; + struct parsed_header hdr; + unsigned int tmp; + int mtu = 1500; + + if (*size < 3) + { + return; + } + putc('|', stdout); + /* parse uncompressed 3 bytes */ + tmp = (frame[2] << 16) | (frame[1] << 8) | frame[0]; + hdr.key_frame = !(tmp & 0x1); /* inverse logic */ + hdr.version = (tmp >> 1) & 0x7; + hdr.show_frame = (tmp >> 4) & 0x1; + hdr.first_part_size = (tmp >> 5) & 0x7FFFF; + + /* don't drop key frames */ + if (hdr.key_frame) + { + int i; + *kept = *size/mtu + ((*size % mtu > 0) ? 1 : 0); /* approximate */ + for (i=0; i < *kept; i++) + putc('.', stdout); + return; + } + + while ((pkg_size = next_packet(&hdr, pos, *size, mtu)) > 0) + { + int loss_event = ((rand() + 1.0)/(RAND_MAX + 1.0) < loss_rate/100.0); + if (*thrown == 0 && !loss_event) + { + memcpy(loss_frame + loss_pos, frame + pos, pkg_size); + loss_pos += pkg_size; + (*kept)++; + putc('.', stdout); + } + else + { + (*thrown)++; + putc('X', stdout); + } + pos += pkg_size; + } + memcpy(frame, loss_frame, loss_pos); + memset(frame + loss_pos, 0, *size - loss_pos); + *size = loss_pos; +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ HELPERS + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DEC_INIT +/* Initialize codec */ +flags = VPX_CODEC_USE_ERROR_CONCEALMENT; +res = vpx_codec_dec_init(&codec, interface, &dec_cfg, flags); +if(res) + die_codec(&codec, "Failed to initialize decoder"); + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DEC_INIT + +Usage +----- +This example adds a single argument to the `simple_decoder` example, +which specifies the range or pattern of frames to drop. The parameter is +parsed as follows: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ USAGE +if(argc < 4 || argc > 6) + die("Usage: %s [-t ] \n", + argv[0]); +{ + char *nptr; + int arg_num = 3; + if (argc == 6 && strncmp(argv[arg_num++], "-t", 2) == 0) + dec_cfg.threads = strtol(argv[arg_num++], NULL, 0); + n = strtol(argv[arg_num], &nptr, 0); + mode = (*nptr == '\0' || *nptr == ',') ? 2 : (*nptr == '-') ? 1 : 0; + + m = strtol(nptr+1, NULL, 0); + if((!n && !m) || (*nptr != '-' && *nptr != '/' && + *nptr != '\0' && *nptr != ',')) + die("Couldn't parse pattern %s\n", argv[3]); +} +seed = (m > 0) ? m : (unsigned int)time(NULL); +srand(seed);thrown_frame = 0; +printf("Seed: %u\n", seed); +printf("Threads: %d\n", dec_cfg.threads); +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ USAGE + + +Dropping A Range Of Frames +-------------------------- +To drop a range of frames, specify the starting frame and the ending +frame to drop, separated by a dash. The following command will drop +frames 5 through 10 (base 1). + + $ ./decode_with_partial_drops in.ivf out.i420 5-10 + + +Dropping A Pattern Of Frames +---------------------------- +To drop a pattern of frames, specify the number of frames to drop and +the number of frames after which to repeat the pattern, separated by +a forward-slash. The following command will drop 3 of 7 frames. +Specifically, it will decode 4 frames, then drop 3 frames, and then +repeat. + + $ ./decode_with_partial_drops in.ivf out.i420 3/7 + +Dropping Random Parts Of Frames +------------------------------- +A third argument tuple is available to split the frame into 1500 bytes pieces +and randomly drop pieces rather than frames. The frame will be split at +partition boundaries where possible. The following example will seed the RNG +with the seed 123 and drop approximately 5% of the pieces. Pieces which +are depending on an already dropped piece will also be dropped. + + $ ./decode_with_partial_drops in.ivf out.i420 5,123 + + +Extra Variables +--------------- +This example maintains the pattern passed on the command line in the +`n`, `m`, and `is_range` variables: + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ EXTRA_VARS +int n, m, mode; +unsigned int seed; +int thrown=0, kept=0; +int thrown_frame=0, kept_frame=0; +vpx_codec_dec_cfg_t dec_cfg = {0}; +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ EXTRA_VARS + + +Making The Drop Decision +------------------------ +The example decides whether to drop the frame based on the current +frame number, immediately before decoding the frame. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PRE_DECODE +/* Decide whether to throw parts of the frame or the whole frame + depending on the drop mode */ +thrown_frame = 0; +kept_frame = 0; +switch (mode) +{ +case 0: + if (m - (frame_cnt-1)%m <= n) + { + frame_sz = 0; + } + break; +case 1: + if (frame_cnt >= n && frame_cnt <= m) + { + frame_sz = 0; + } + break; +case 2: + throw_packets(frame, &frame_sz, n, &thrown_frame, &kept_frame); + break; +default: break; +} +if (mode < 2) +{ + if (frame_sz == 0) + { + putc('X', stdout); + thrown_frame++; + } + else + { + putc('.', stdout); + kept_frame++; + } +} +thrown += thrown_frame; +kept += kept_frame; +fflush(stdout); +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PRE_DECODE diff --git a/libs.mk b/libs.mk index e995d0aef..b7d9721a7 100644 --- a/libs.mk +++ b/libs.mk @@ -166,6 +166,8 @@ CODEC_SRCS-$(BUILD_LIBVPX) += build/make/version.sh CODEC_SRCS-$(BUILD_LIBVPX) += build/make/rtcd.sh CODEC_SRCS-$(BUILD_LIBVPX) += vpx/vpx_integer.h CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/asm_offsets.h +CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/emmintrin_compat.h +CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/vpx_once.h CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/vpx_timer.h CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/mem.h CODEC_SRCS-$(BUILD_LIBVPX) += $(BUILD_PFX)vpx_config.c @@ -202,8 +204,7 @@ INSTALL-LIBS-$(CONFIG_STATIC) += $(LIBSUBDIR)/libvpx.a INSTALL-LIBS-$(CONFIG_DEBUG_LIBS) += $(LIBSUBDIR)/libvpx_g.a endif -CODEC_SRCS=$(filter-out %_offsets.c,\ - $(filter-out %_test.cc,$(call enabled,CODEC_SRCS))) +CODEC_SRCS=$(call enabled,CODEC_SRCS) INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(CODEC_SRCS) INSTALL-SRCS-$(CONFIG_CODEC_SRCS) += $(call enabled,CODEC_EXPORTS) @@ -306,6 +307,7 @@ CLEAN-OBJS += libvpx.syms define libvpx_symlink_template $(1): $(2) @echo " [LN] $(2) $$@" + $(qexec)mkdir -p $$(dir $$@) $(qexec)ln -sf $(2) $$@ endef @@ -314,7 +316,7 @@ $(eval $(call libvpx_symlink_template,\ $(BUILD_PFX)$(LIBVPX_SO))) $(eval $(call libvpx_symlink_template,\ $(addprefix $(DIST_DIR)/,$(LIBVPX_SO_SYMLINKS)),\ - $(DIST_DIR)/$(LIBSUBDIR)/$(LIBVPX_SO))) + $(LIBVPX_SO))) INSTALL-LIBS-$(BUILD_LIBVPX_SO) += $(LIBVPX_SO_SYMLINKS) diff --git a/test/test.mk b/test/test.mk index 4fb464e64..ebcee9162 100644 --- a/test/test.mk +++ b/test/test.mk @@ -59,13 +59,15 @@ ifneq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),) # These tests require both the encoder and decoder to be built. ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_DECODER),yesyes) LIBVPX_TEST_SRCS-yes += vp9_boolcoder_test.cc + +# IDCT test currently depends on FDCT function +LIBVPX_TEST_SRCS-yes += idct8x8_test.cc endif LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct4x4_test.cc LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += fdct8x8_test.cc #LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += dct16x16_test.cc -LIBVPX_TEST_SRCS-yes += idct8x8_test.cc -LIBVPX_TEST_SRCS-yes += variance_test.cc +LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += variance_test.cc endif # VP9 diff --git a/test/test_libvpx.cc b/test/test_libvpx.cc index 52a4fb9d5..5610c2612 100644 --- a/test/test_libvpx.cc +++ b/test/test_libvpx.cc @@ -9,9 +9,10 @@ */ #include #include "vpx_config.h" -#if ARCH_X86 || ARCH_X86_64 extern "C" { +#if ARCH_X86 || ARCH_X86_64 #include "vpx_ports/x86.h" +#endif #if CONFIG_VP8 extern void vp8_rtcd(); #endif @@ -19,7 +20,6 @@ extern void vp8_rtcd(); extern void vp9_rtcd(); #endif } -#endif #include "third_party/googletest/src/include/gtest/gtest.h" static void append_gtest_filter(const char *str) { @@ -47,11 +47,14 @@ int main(int argc, char **argv) { append_gtest_filter(":-SSE4_1/*"); #endif +#if !CONFIG_SHARED + /* Shared library builds don't support whitebox tests that exercise internal symbols. */ #if CONFIG_VP8 vp8_rtcd(); #endif #if CONFIG_VP9 vp9_rtcd(); +#endif #endif return RUN_ALL_TESTS(); diff --git a/vp9/common/generic/vp9_systemdependent.c b/vp9/common/generic/vp9_systemdependent.c index f133281b6..b02f3f083 100644 --- a/vp9/common/generic/vp9_systemdependent.c +++ b/vp9/common/generic/vp9_systemdependent.c @@ -9,7 +9,7 @@ */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9_rtcd.h" #include "vp9/common/vp9_subpixel.h" #include "vp9/common/vp9_loopfilter.h" diff --git a/vp9/common/vp9_alloccommon.c b/vp9/common/vp9_alloccommon.c index 08882b3a6..141d5f7bf 100644 --- a/vp9/common/vp9_alloccommon.c +++ b/vp9/common/vp9_alloccommon.c @@ -9,7 +9,7 @@ */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/common/vp9_blockd.h" #include "vpx_mem/vpx_mem.h" #include "vp9/common/vp9_onyxc_int.h" diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index 17e847462..fd20e092b 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -14,7 +14,7 @@ void vpx_log(const char *format, ...); -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx_scale/yv12config.h" #include "vp9/common/vp9_mv.h" #include "vp9/common/vp9_treecoder.h" diff --git a/vp9/common/vp9_idctllm.c b/vp9/common/vp9_idctllm.c index 5e34cf5af..893f378b5 100644 --- a/vp9/common/vp9_idctllm.c +++ b/vp9/common/vp9_idctllm.c @@ -24,7 +24,7 @@ **************************************************************************/ #include #include -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/common/vp9_systemdependent.h" #include "vp9/common/vp9_blockd.h" diff --git a/vp9/common/vp9_invtrans.h b/vp9/common/vp9_invtrans.h index b012834f3..4474ba477 100644 --- a/vp9/common/vp9_invtrans.h +++ b/vp9/common/vp9_invtrans.h @@ -11,7 +11,7 @@ #ifndef VP9_COMMON_VP9_INVTRANS_H_ #define VP9_COMMON_VP9_INVTRANS_H_ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/common/vp9_blockd.h" extern void vp9_inverse_transform_b_4x4(MACROBLOCKD *xd, int block, int pitch); diff --git a/vp9/common/vp9_postproc.c b/vp9/common/vp9_postproc.c index f00edf00d..192166b93 100644 --- a/vp9/common/vp9_postproc.c +++ b/vp9/common/vp9_postproc.c @@ -9,7 +9,7 @@ */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx_scale/yv12config.h" #include "vp9/common/vp9_postproc.h" #include "vp9/common/vp9_textblit.h" @@ -32,7 +32,7 @@ (0.071*(float)(t & 0xff)) + 128) /* global constants */ -#if CONFIG_POSTPROC_VISUALIZER +#if 0 && CONFIG_POSTPROC_VISUALIZER static const unsigned char MB_PREDICTION_MODE_colors[MB_MODE_COUNT][3] = { { RGB_TO_YUV(0x98FB98) }, /* PaleGreen */ { RGB_TO_YUV(0x00FF00) }, /* Green */ @@ -672,7 +672,7 @@ int vp9_post_proc_frame(VP9_COMMON *oci, YV12_BUFFER_CONFIG *dest, oci->post_proc_buffer.y_stride); } -#if CONFIG_POSTPROC_VISUALIZER +#if 0 && CONFIG_POSTPROC_VISUALIZER if (flags & VP9D_DEBUG_TXT_FRAME_INFO) { char message[512]; sprintf(message, "F%1dG%1dQ%3dF%3dP%d_s%dx%d", diff --git a/vp9/common/vp9_recon.c b/vp9/common/vp9_recon.c index 1f8dfce34..c60d0aa05 100644 --- a/vp9/common/vp9_recon.c +++ b/vp9/common/vp9_recon.c @@ -9,7 +9,7 @@ */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9_rtcd.h" #include "vp9/common/vp9_blockd.h" diff --git a/vp9/common/vp9_reconinter.c b/vp9/common/vp9_reconinter.c index fb4906e6a..23d0ae95a 100644 --- a/vp9/common/vp9_reconinter.c +++ b/vp9/common/vp9_reconinter.c @@ -9,7 +9,7 @@ */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx/vpx_integer.h" #include "vp9/common/vp9_blockd.h" #include "vp9/common/vp9_reconinter.h" diff --git a/vp9/common/vp9_reconintra.c b/vp9/common/vp9_reconintra.c index 92492aa5b..73e29ce3c 100644 --- a/vp9/common/vp9_reconintra.c +++ b/vp9/common/vp9_reconintra.c @@ -9,7 +9,7 @@ */ #include -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9_rtcd.h" #include "vp9/common/vp9_reconintra.h" #include "vpx_mem/vpx_mem.h" diff --git a/vp9/common/vp9_reconintra4x4.c b/vp9/common/vp9_reconintra4x4.c index f542acb3d..a730fd070 100644 --- a/vp9/common/vp9_reconintra4x4.c +++ b/vp9/common/vp9_reconintra4x4.c @@ -9,7 +9,7 @@ */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx_mem/vpx_mem.h" #include "vp9/common/vp9_reconintra.h" #include "vp9_rtcd.h" diff --git a/vp9/common/vp9_rtcd_defs.sh b/vp9/common/vp9_rtcd_defs.sh index 24e782700..6af7b3bad 100644 --- a/vp9/common/vp9_rtcd_defs.sh +++ b/vp9/common/vp9_rtcd_defs.sh @@ -216,6 +216,7 @@ vp9_loop_filter_simple_bh_sse2=vp9_loop_filter_bhs_sse2 # # post proc # +if [ "$CONFIG_POSTPROC" = "yes" ]; then prototype void vp9_mbpost_proc_down "unsigned char *dst, int pitch, int rows, int cols, int flimit" specialize vp9_mbpost_proc_down mmx sse2 vp9_mbpost_proc_down_sse2=vp9_mbpost_proc_down_xmm @@ -231,6 +232,7 @@ vp9_post_proc_down_and_across_sse2=vp9_post_proc_down_and_across_xmm prototype void vp9_plane_add_noise "unsigned char *Start, char *noise, char blackclamp[16], char whiteclamp[16], char bothclamp[16], unsigned int Width, unsigned int Height, int Pitch" specialize vp9_plane_add_noise mmx sse2 vp9_plane_add_noise_sse2=vp9_plane_add_noise_wmt +fi prototype void vp9_blend_mb_inner "unsigned char *y, unsigned char *u, unsigned char *v, int y1, int u1, int v1, int alpha, int stride" specialize vp9_blend_mb_inner diff --git a/vp9/common/vp9_systemdependent.h b/vp9/common/vp9_systemdependent.h index 91a50607a..6f08e6906 100644 --- a/vp9/common/vp9_systemdependent.h +++ b/vp9/common/vp9_systemdependent.h @@ -10,7 +10,7 @@ #ifndef VP9_COMMON_VP9_SYSTEMDEPENDENT_H_ #define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #if ARCH_X86 || ARCH_X86_64 void vpx_reset_mmx_state(void); #define vp9_clear_system_state() vpx_reset_mmx_state() diff --git a/vp9/common/x86/vp9_asm_stubs.c b/vp9/common/x86/vp9_asm_stubs.c index 30bc6f15b..de1f0fa32 100644 --- a/vp9/common/x86/vp9_asm_stubs.c +++ b/vp9/common/x86/vp9_asm_stubs.c @@ -9,7 +9,7 @@ */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx_ports/mem.h" #include "vp9/common/vp9_subpixel.h" diff --git a/vp9/common/x86/vp9_recon_wrapper_sse2.c b/vp9/common/x86/vp9_recon_wrapper_sse2.c index 49b36dbd6..bb7baf8a0 100644 --- a/vp9/common/x86/vp9_recon_wrapper_sse2.c +++ b/vp9/common/x86/vp9_recon_wrapper_sse2.c @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx_mem/vpx_mem.h" #include "vp9/common/vp9_blockd.h" diff --git a/vp9/decoder/vp9_dboolhuff.h b/vp9/decoder/vp9_dboolhuff.h index a1c0c7956..635bd5b7d 100644 --- a/vp9/decoder/vp9_dboolhuff.h +++ b/vp9/decoder/vp9_dboolhuff.h @@ -13,7 +13,7 @@ #define VP9_DECODER_VP9_DBOOLHUFF_H_ #include #include -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx_ports/mem.h" #include "vpx/vpx_integer.h" diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index 87f52df7f..12feca6c4 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -927,9 +927,9 @@ decode_sb_row(VP9D_COMP *pbi, VP9_COMMON *pc, int mbrow, MACROBLOCKD *xd, mb_col = 0; for (sb_col = 0; sb_col < sb_cols; sb_col++) { +#if CONFIG_SUPERBLOCKS MODE_INFO *mi = xd->mode_info_context; -#if CONFIG_SUPERBLOCKS mi->mbmi.encoded_as_sb = vp9_read(bc, pc->sb_coded); #endif @@ -942,7 +942,9 @@ decode_sb_row(VP9D_COMP *pbi, VP9_COMMON *pc, int mbrow, MACROBLOCKD *xd, xd->mb_index = i; +#if CONFIG_SUPERBLOCKS mi = xd->mode_info_context; +#endif if ((mb_row >= pc->mb_rows) || (mb_col >= pc->mb_cols)) { // MB lies outside frame, skip on to next mb_row += dy; diff --git a/vp9/decoder/vp9_onyxd_int.h b/vp9/decoder/vp9_onyxd_int.h index e4f3228c7..49e13f7f4 100644 --- a/vp9/decoder/vp9_onyxd_int.h +++ b/vp9/decoder/vp9_onyxd_int.h @@ -11,7 +11,7 @@ #ifndef VP9_DECODER_VP9_ONYXD_INT_H_ #define VP9_DECODER_VP9_ONYXD_INT_H_ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/common/vp9_onyxd.h" #include "vp9/decoder/vp9_treereader.h" #include "vp9/common/vp9_onyxc_int.h" diff --git a/vp9/decoder/x86/vp9_idct_blk_mmx.c b/vp9/decoder/x86/vp9_idct_blk_mmx.c index df3485233..8279eaa4a 100644 --- a/vp9/decoder/x86/vp9_idct_blk_mmx.c +++ b/vp9/decoder/x86/vp9_idct_blk_mmx.c @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/common/vp9_blockd.h" #include "vp9/decoder/vp9_dequantize.h" #include "vp9/decoder/x86/vp9_idct_mmx.h" diff --git a/vp9/decoder/x86/vp9_idct_blk_sse2.c b/vp9/decoder/x86/vp9_idct_blk_sse2.c index 6c1fd1439..badd97f73 100644 --- a/vp9/decoder/x86/vp9_idct_blk_sse2.c +++ b/vp9/decoder/x86/vp9_idct_blk_sse2.c @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/common/vp9_blockd.h" #include "vp9/decoder/vp9_dequantize.h" diff --git a/vp9/decoder/x86/vp9_x86_dsystemdependent.c b/vp9/decoder/x86/vp9_x86_dsystemdependent.c index d1cc53fce..51ee8ec31 100644 --- a/vp9/decoder/x86/vp9_x86_dsystemdependent.c +++ b/vp9/decoder/x86/vp9_x86_dsystemdependent.c @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx_ports/x86.h" #include "vp9/decoder/vp9_onyxd_int.h" diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 0adaeee0a..5e56d2c3a 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -834,7 +834,6 @@ static void pack_inter_mode_mvs(VP9_COMP *const cpi, vp9_writer *const bc) { for (i = 0; i < 4; i++) { MB_MODE_INFO *mi; MV_REFERENCE_FRAME rf; - MV_REFERENCE_FRAME sec_ref_frame; MB_PREDICTION_MODE mode; int segment_id, skip_coeff; @@ -854,7 +853,6 @@ static void pack_inter_mode_mvs(VP9_COMP *const cpi, vp9_writer *const bc) { mi = &m->mbmi; rf = mi->ref_frame; - sec_ref_frame = mi->second_ref_frame; mode = mi->mode; segment_id = mi->segment_id; @@ -1101,7 +1099,7 @@ static void pack_inter_mode_mvs(VP9_COMP *const cpi, vp9_writer *const bc) { if (mi->second_ref_frame > 0) { #if CONFIG_NEW_MVREF unsigned int best_index; - sec_ref_frame = mi->second_ref_frame; + MV_REFERENCE_FRAME sec_ref_frame = mi->second_ref_frame; /* best_index = diff --git a/vp9/encoder/vp9_dct.c b/vp9/encoder/vp9_dct.c index 6753f2462..38df23978 100644 --- a/vp9/encoder/vp9_dct.c +++ b/vp9/encoder/vp9_dct.c @@ -11,7 +11,7 @@ #include #include -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/common/vp9_systemdependent.h" #include "vp9/common/vp9_blockd.h" diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index d2008a775..bd1966272 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -9,7 +9,7 @@ */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/encoder/vp9_encodeframe.h" #include "vp9/encoder/vp9_encodemb.h" #include "vp9/encoder/vp9_encodemv.h" @@ -2031,8 +2031,6 @@ static void encode_macroblock(VP9_COMP *cpi, MACROBLOCK *x, VP9_COMMON *cm = &cpi->common; MACROBLOCKD *const xd = &x->e_mbd; MB_MODE_INFO * mbmi = &xd->mode_info_context->mbmi; - unsigned char *segment_id = &mbmi->segment_id; - int seg_ref_active; unsigned char ref_pred_flag; x->skip = 0; @@ -2079,8 +2077,6 @@ static void encode_macroblock(VP9_COMP *cpi, MACROBLOCK *x, vp9_update_zbin_extra(cpi, x); - seg_ref_active = vp9_segfeature_active(xd, *segment_id, SEG_LVL_REF_FRAME); - // SET VARIOUS PREDICTION FLAGS // Did the chosen reference frame match its predicted value. diff --git a/vp9/encoder/vp9_encodeintra.c b/vp9/encoder/vp9_encodeintra.c index 810f1c42b..9b106266e 100644 --- a/vp9/encoder/vp9_encodeintra.c +++ b/vp9/encoder/vp9_encodeintra.c @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9_rtcd.h" #include "vp9/encoder/vp9_quantize.h" #include "vp9/common/vp9_reconintra.h" diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c index 3596d9ffa..1deb12838 100644 --- a/vp9/encoder/vp9_encodemb.c +++ b/vp9/encoder/vp9_encodemb.c @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/encoder/vp9_encodemb.h" #include "vp9/common/vp9_reconinter.h" #include "vp9/encoder/vp9_quantize.h" diff --git a/vp9/encoder/vp9_encodemb.h b/vp9/encoder/vp9_encodemb.h index 4f49647a2..73cfd8d2c 100644 --- a/vp9/encoder/vp9_encodemb.h +++ b/vp9/encoder/vp9_encodemb.h @@ -12,7 +12,7 @@ #ifndef VP9_ENCODER_VP9_ENCODEMB_H_ #define VP9_ENCODER_VP9_ENCODEMB_H_ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/encoder/vp9_block.h" typedef struct { diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index d23485f0b..6eb022f92 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -801,6 +801,7 @@ static double bitcost(double prob) { static long long estimate_modemvcost(VP9_COMP *cpi, FIRSTPASS_STATS *fpstats) { +#if 0 int mv_cost; int mode_cost; @@ -829,6 +830,7 @@ static long long estimate_modemvcost(VP9_COMP *cpi, // return mv_cost + mode_cost; // TODO PGW Fix overhead costs for extended Q range +#endif return 0; } @@ -1951,12 +1953,9 @@ void vp9_second_pass(VP9_COMP *cpi) { FIRSTPASS_STATS this_frame; FIRSTPASS_STATS this_frame_copy; - double this_frame_error; double this_frame_intra_error; double this_frame_coded_error; - FIRSTPASS_STATS *start_pos; - int overhead_bits; if (!cpi->twopass.stats_in) { @@ -1970,12 +1969,9 @@ void vp9_second_pass(VP9_COMP *cpi) { if (EOF == input_stats(cpi, &this_frame)) return; - this_frame_error = this_frame.ssim_weighted_pred_err; this_frame_intra_error = this_frame.intra_error; this_frame_coded_error = this_frame.coded_error; - start_pos = cpi->twopass.stats_in; - // keyframe and section processing ! if (cpi->twopass.frames_to_key == 0) { // Define next KF group and assign bits to it diff --git a/vp9/encoder/vp9_mbgraph.c b/vp9/encoder/vp9_mbgraph.c index 8511bc572..c319e07c0 100644 --- a/vp9/encoder/vp9_mbgraph.c +++ b/vp9/encoder/vp9_mbgraph.c @@ -27,7 +27,7 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, BLOCKD *d = &xd->block[0]; vp9_variance_fn_ptr_t v_fn_ptr = cpi->fn_ptr[BLOCK_16X16]; unsigned int best_err; - int step_param, further_steps; + int step_param; int tmp_col_min = x->mv_col_min; int tmp_col_max = x->mv_col_max; @@ -38,10 +38,8 @@ static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi, // Further step/diamond searches as necessary if (cpi->Speed < 8) { step_param = cpi->sf.first_step + ((cpi->Speed > 5) ? 1 : 0); - further_steps = (cpi->sf.max_step_search_steps - 1) - step_param; } else { step_param = cpi->sf.first_step + 2; - further_steps = 0; } vp9_clamp_mv_min_max(x, ref_mv); diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c index 04ee3f610..b3e0415aa 100644 --- a/vp9/encoder/vp9_mcomp.c +++ b/vp9/encoder/vp9_mcomp.c @@ -12,7 +12,7 @@ #include "vp9/encoder/vp9_onyx_int.h" #include "vp9/encoder/vp9_mcomp.h" #include "vpx_mem/vpx_mem.h" -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include #include #include diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 8cabed9c9..f5fb68684 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -148,7 +148,6 @@ static int calculate_minq_index(double maxq, double x3, double x2, double x, double c) { int i; double minqtarget; - double thisq; minqtarget = ((x3 * maxq * maxq * maxq) + (x2 * maxq * maxq) + @@ -159,7 +158,6 @@ static int calculate_minq_index(double maxq, minqtarget = maxq; for (i = 0; i < QINDEX_RANGE; i++) { - thisq = vp9_convert_qindex_to_q(i); if (minqtarget <= vp9_convert_qindex_to_q(i)) return i; } @@ -2933,8 +2931,6 @@ static void encode_frame_to_data_rate int Loop = FALSE; int loop_count; - int this_q; - int last_zbin_oq; int q_low; int q_high; @@ -2948,8 +2944,6 @@ static void encode_frame_to_data_rate int overshoot_seen = FALSE; int undershoot_seen = FALSE; - int loop_size_estimate = 0; - SPEED_FEATURES *sf = &cpi->sf; #if RESET_FOREACH_FILTER int q_low0; @@ -2957,6 +2951,7 @@ static void encode_frame_to_data_rate int zbin_oq_high0; int zbin_oq_low0 = 0; int Q0; + int last_zbin_oq; int last_zbin_oq0; int active_best_quality0; int active_worst_quality0; @@ -3176,7 +3171,9 @@ static void encode_frame_to_data_rate // Determine initial Q to try Q = vp9_regulate_q(cpi, cpi->this_frame_target); } +#if RESET_FOREACH_FILTER last_zbin_oq = cpi->zbin_over_quant; +#endif // Set highest allowed value for Zbin over quant if (cm->frame_type == KEY_FRAME) @@ -3280,7 +3277,6 @@ static void encode_frame_to_data_rate vp9_clear_system_state(); // __asm emms; vp9_set_quantizer(cpi, Q); - this_q = Q; if (loop_count == 0) { @@ -3516,7 +3512,9 @@ static void encode_frame_to_data_rate // Loop = ((Q != last_q) || (last_zbin_oq != cpi->zbin_over_quant)) ? TRUE : FALSE; Loop = ((Q != last_q)) ? TRUE : FALSE; +#if RESET_FOREACH_FILTER last_zbin_oq = cpi->zbin_over_quant; +#endif } else Loop = FALSE; @@ -3730,9 +3728,6 @@ static void encode_frame_to_data_rate * needed in motion search besides loopfilter */ cm->last_frame_type = cm->frame_type; - // Keep a copy of the size estimate used in the loop - loop_size_estimate = cpi->projected_frame_size; - // Update rate control heuristics cpi->total_byte_count += (*size); cpi->projected_frame_size = (*size) << 3; @@ -3846,7 +3841,7 @@ static void encode_frame_to_data_rate "%6d %5d %5d %5d %8d %8.2f %10d %10.3f" "%10.3f %8d %10d %10d %10d\n", cpi->common.current_video_frame, cpi->this_frame_target, - cpi->projected_frame_size, loop_size_estimate, + cpi->projected_frame_size, 0, //loop_size_estimate, (cpi->projected_frame_size - cpi->this_frame_target), (int)cpi->total_target_vs_actual, (cpi->oxcf.starting_buffer_level - cpi->bits_off_target), @@ -3876,7 +3871,7 @@ static void encode_frame_to_data_rate "%8d %10d %10d %10d\n", cpi->common.current_video_frame, cpi->this_frame_target, cpi->projected_frame_size, - loop_size_estimate, + 0, //loop_size_estimate, (cpi->projected_frame_size - cpi->this_frame_target), (int)cpi->total_target_vs_actual, (cpi->oxcf.starting_buffer_level - cpi->bits_off_target), diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h index 8180d16de..0ccf308bd 100644 --- a/vp9/encoder/vp9_onyx_int.h +++ b/vp9/encoder/vp9_onyx_int.h @@ -13,7 +13,7 @@ #define VP9_ENCODER_VP9_ONYX_INT_H_ #include -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vp9/common/vp9_onyx.h" #include "vp9/encoder/vp9_treewriter.h" #include "vp9/encoder/vp9_tokenize.h" diff --git a/vp9/encoder/vp9_picklpf.c b/vp9/encoder/vp9_picklpf.c index 90ea6f14a..4eb51df41 100644 --- a/vp9/encoder/vp9_picklpf.c +++ b/vp9/encoder/vp9_picklpf.c @@ -24,11 +24,9 @@ void vp9_yv12_copy_partial_frame_c(YV12_BUFFER_CONFIG *src_ybc, unsigned char *src_y, *dst_y; int yheight; int ystride; - int border; int yoffset; int linestocopy; - border = src_ybc->border; yheight = src_ybc->y_height; ystride = src_ybc->y_stride; diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index e8b9743f5..27decb91e 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -1268,7 +1268,7 @@ static int64_t rd_pick_intra16x16mby_mode(VP9_COMP *cpi, int *skippable, int64_t txfm_cache[NB_TXFM_MODES]) { MB_PREDICTION_MODE mode; - TX_SIZE txfm_size; + TX_SIZE txfm_size = 0; MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected); #if CONFIG_COMP_INTRA_PRED MB_PREDICTION_MODE mode2; @@ -4189,7 +4189,7 @@ void vp9_rd_pick_intra_mode(VP9_COMP *cpi, MACROBLOCK *x, int mode16x16; int mode8x8[2][4]; int dist; - int modeuv, modeuv8x8, uv_intra_skippable, uv_intra_skippable_8x8; + int modeuv, uv_intra_skippable, uv_intra_skippable_8x8; int y_intra16x16_skippable = 0; int64_t txfm_cache[NB_TXFM_MODES]; TX_SIZE txfm_size_16x16; @@ -4202,13 +4202,11 @@ void vp9_rd_pick_intra_mode(VP9_COMP *cpi, MACROBLOCK *x, if (cpi->common.txfm_mode != ONLY_4X4) { rd_pick_intra_mbuv_mode_8x8(cpi, x, &rateuv8x8, &rateuv8x8_tokenonly, &distuv8x8, &uv_intra_skippable_8x8); - modeuv8x8 = mbmi->uv_mode; } else { uv_intra_skippable_8x8 = uv_intra_skippable; rateuv8x8 = rateuv; distuv8x8 = distuv; rateuv8x8_tokenonly = rateuv_tokenonly; - modeuv8x8 = modeuv; } // current macroblock under rate-distortion optimization test loop diff --git a/vp9/encoder/vp9_sad_c.c b/vp9/encoder/vp9_sad_c.c index 8e12f16db..465044278 100644 --- a/vp9/encoder/vp9_sad_c.c +++ b/vp9/encoder/vp9_sad_c.c @@ -11,7 +11,7 @@ #include #include "vp9/common/vp9_sadmxn.h" -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx/vpx_integer.h" unsigned int vp9_sad32x32_c(const unsigned char *src_ptr, diff --git a/vp9/encoder/vp9_temporal_filter.c b/vp9/encoder/vp9_temporal_filter.c index 3a6844316..57253bd50 100644 --- a/vp9/encoder/vp9_temporal_filter.c +++ b/vp9/encoder/vp9_temporal_filter.c @@ -139,7 +139,6 @@ static int temporal_filter_find_matching_mb_c ) { MACROBLOCK *x = &cpi->mb; int step_param; - int further_steps; int sadpb = x->sadperbit16; int bestsme = INT_MAX; @@ -173,11 +172,8 @@ static int temporal_filter_find_matching_mb_c if (cpi->Speed < 8) { step_param = cpi->sf.first_step + ((cpi->Speed > 5) ? 1 : 0); - further_steps = - (cpi->sf.max_step_search_steps - 1) - step_param; } else { step_param = cpi->sf.first_step + 2; - further_steps = 0; } /*cpi->sf.search_method == HEX*/ diff --git a/vp9/encoder/x86/vp9_x86_csystemdependent.c b/vp9/encoder/x86/vp9_x86_csystemdependent.c index f52d6b52d..3beef53a2 100644 --- a/vp9/encoder/x86/vp9_x86_csystemdependent.c +++ b/vp9/encoder/x86/vp9_x86_csystemdependent.c @@ -9,7 +9,7 @@ */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #include "vpx_ports/x86.h" #include "vp9/encoder/vp9_variance.h" #include "vp9/encoder/vp9_onyx_int.h" diff --git a/vp9/vp9_common.mk b/vp9/vp9_common.mk index ab2222f6b..67d38eaea 100644 --- a/vp9/vp9_common.mk +++ b/vp9/vp9_common.mk @@ -19,6 +19,7 @@ VP9_COMMON_SRCS-yes += common/vp9_asm_com_offsets.c VP9_COMMON_SRCS-yes += common/vp9_blockd.c VP9_COMMON_SRCS-yes += common/vp9_coefupdateprobs.h VP9_COMMON_SRCS-yes += common/vp9_debugmodes.c +VP9_COMMON_SRCS-yes += common/vp9_default_coef_probs.h VP9_COMMON_SRCS-yes += common/vp9_entropy.c VP9_COMMON_SRCS-yes += common/vp9_entropymode.c VP9_COMMON_SRCS-yes += common/vp9_entropymv.c @@ -59,6 +60,7 @@ VP9_COMMON_SRCS-yes += common/vp9_setupintrarecon.h VP9_COMMON_SRCS-yes += common/vp9_subpixel.h VP9_COMMON_SRCS-yes += common/vp9_swapyv12buffer.h VP9_COMMON_SRCS-yes += common/vp9_systemdependent.h +VP9_COMMON_SRCS-yes += common/vp9_textblit.h VP9_COMMON_SRCS-yes += common/vp9_treecoder.h VP9_COMMON_SRCS-yes += common/vp9_invtrans.c VP9_COMMON_SRCS-yes += common/vp9_loopfilter.c diff --git a/vp9/vp9cx.mk b/vp9/vp9cx.mk index 020a5a2d6..12d1ec4e7 100644 --- a/vp9/vp9cx.mk +++ b/vp9/vp9cx.mk @@ -31,6 +31,7 @@ VP9_CX_SRCS-yes += encoder/vp9_bitstream.c VP9_CX_SRCS-yes += encoder/vp9_boolhuff.c VP9_CX_SRCS-yes += encoder/vp9_dct.c VP9_CX_SRCS-yes += encoder/vp9_encodeframe.c +VP9_CX_SRCS-yes += encoder/vp9_encodeframe.h VP9_CX_SRCS-yes += encoder/vp9_encodeintra.c VP9_CX_SRCS-yes += encoder/vp9_encodemb.c VP9_CX_SRCS-yes += encoder/vp9_encodemv.c @@ -58,6 +59,7 @@ VP9_CX_SRCS-yes += encoder/vp9_mcomp.c VP9_CX_SRCS-yes += encoder/vp9_modecosts.c VP9_CX_SRCS-yes += encoder/vp9_onyx_if.c VP9_CX_SRCS-yes += encoder/vp9_picklpf.c +VP9_CX_SRCS-yes += encoder/vp9_picklpf.h VP9_CX_SRCS-yes += encoder/vp9_psnr.c VP9_CX_SRCS-yes += encoder/vp9_quantize.c VP9_CX_SRCS-yes += encoder/vp9_ratectrl.c @@ -87,6 +89,7 @@ VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp9_variance_mmx.c VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp9_variance_impl_mmx.asm VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp9_sad_mmx.asm VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp9_dct_mmx.asm +VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp9_dct_mmx.h VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp9_subtract_mmx.asm VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_dct_sse2.asm VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_variance_sse2.c diff --git a/vp9/vp9dx.mk b/vp9/vp9dx.mk index 868bbed71..ddb36a9da 100644 --- a/vp9/vp9dx.mk +++ b/vp9/vp9dx.mk @@ -21,6 +21,7 @@ VP9_DX_SRCS-yes += decoder/vp9_asm_dec_offsets.c VP9_DX_SRCS-yes += decoder/vp9_dboolhuff.c VP9_DX_SRCS-yes += decoder/vp9_decodemv.c VP9_DX_SRCS-yes += decoder/vp9_decodframe.c +VP9_DX_SRCS-yes += decoder/vp9_decodframe.h VP9_DX_SRCS-yes += decoder/vp9_dequantize.c VP9_DX_SRCS-yes += decoder/vp9_detokenize.c VP9_DX_SRCS-yes += decoder/vp9_dboolhuff.h diff --git a/vpx_mem/include/vpx_mem_intrnl.h b/vpx_mem/include/vpx_mem_intrnl.h index 0f58cfc8f..60b5165f3 100644 --- a/vpx_mem/include/vpx_mem_intrnl.h +++ b/vpx_mem/include/vpx_mem_intrnl.h @@ -11,7 +11,7 @@ #ifndef __VPX_MEM_INTRNL_H__ #define __VPX_MEM_INTRNL_H__ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #ifndef CONFIG_MEM_MANAGER # if defined(VXWORKS) diff --git a/vpx_mem/vpx_mem_tracker.c b/vpx_mem/vpx_mem_tracker.c index 5b2103b55..613e8a16b 100644 --- a/vpx_mem/vpx_mem_tracker.c +++ b/vpx_mem/vpx_mem_tracker.c @@ -22,7 +22,7 @@ in the memory_tracker struct as well as calls to create/destroy/lock/unlock the mutex in vpx_memory_tracker_init/Destroy and memory_tracker_lock_mutex/unlock_mutex */ -#include "vpx_ports/config.h" +#include "./vpx_config.h" #if defined(__uClinux__) # include diff --git a/vpx_ports/arm_cpudetect.c b/vpx_ports/arm_cpudetect.c index b23344858..3c916f247 100644 --- a/vpx_ports/arm_cpudetect.c +++ b/vpx_ports/arm_cpudetect.c @@ -136,7 +136,6 @@ int arm_cpu_caps(void) { #elif defined(__linux__) /* end __ANDROID__ */ -#elif defined(__linux__) /* end __ANDROID__ */ #include int arm_cpu_caps(void) { diff --git a/vpx_scale/vpx_scale.mk b/vpx_scale/vpx_scale.mk index 3d759327a..864af55a4 100644 --- a/vpx_scale/vpx_scale.mk +++ b/vpx_scale/vpx_scale.mk @@ -5,7 +5,9 @@ SCALE_SRCS-yes += generic/vpxscale.c SCALE_SRCS-yes += generic/yv12config.c SCALE_SRCS-yes += generic/yv12extend.c SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/gen_scalers.c +SCALE_SRCS-yes += vpx_scale_asm_offsets.c SCALE_SRCS-yes += vpx_scale_rtcd.c +SCALE_SRCS-yes += vpx_scale_rtcd.sh #neon SCALE_SRCS-$(HAVE_NEON) += arm/neon/vp8_vpxyv12_copyframe_func_neon$(ASM) diff --git a/vpxenc.c b/vpxenc.c index af6db9108..0ea4a5f9f 100644 --- a/vpxenc.c +++ b/vpxenc.c @@ -23,7 +23,9 @@ #include #include #include "vpx/vpx_encoder.h" +#if CONFIG_DECODERS #include "vpx/vpx_decoder.h" +#endif #if USE_POSIX_MMAP #include #include @@ -2174,6 +2176,7 @@ static void initialize_encoder(struct stream_state *stream, ctx_exit_on_error(&stream->encoder, "Failed to control codec"); } +#if CONFIG_DECODERS if (global->test_decode) { int width, height; @@ -2186,6 +2189,7 @@ static void initialize_encoder(struct stream_state *stream, stream->ref_enc.frame_type = VP8_LAST_FRAME; stream->ref_dec.frame_type = VP8_LAST_FRAME; } +#endif } @@ -2278,11 +2282,13 @@ static void get_cx_data(struct stream_state *stream, stream->nbytes += pkt->data.raw.sz; *got_data = 1; +#if CONFIG_DECODERS if (global->test_decode) { vpx_codec_decode(&stream->decoder, pkt->data.frame.buf, pkt->data.frame.sz, NULL, 0); ctx_exit_on_error(&stream->decoder, "Failed to decode frame"); } +#endif break; case VPX_CODEC_STATS_PKT: stream->frames_out++; -- 2.40.0