Commit 69c67c95 authored by John Koleszar's avatar John Koleszar
Browse files

Merge master branch into experimental

Picks up some build system changes, compiler warning fixes, etc.

Change-Id: I2712f99e653502818a101a72696ad54018152d4e
parents db4dc6f0 a07bed2b
......@@ -74,7 +74,7 @@ HOSTCC?=gcc
TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN)))
TGT_OS:=$(word 2, $(subst -, ,$(TOOLCHAIN)))
TGT_CC:=$(word 3, $(subst -, ,$(TOOLCHAIN)))
quiet:=$(if $(verbose),,yes)
quiet:=$(if $(or $(verbose), $(V)),, yes)
qexec=$(if $(quiet),@)
# Cancel built-in implicit rules
......@@ -380,6 +380,7 @@ ifneq ($(call enabled,DIST-SRCS),)
# Include obj_int_extract if we use offsets from asm_*_offsets
DIST-SRCS-$(ARCH_ARM)$(ARCH_X86)$(ARCH_X86_64) += build/make/obj_int_extract.c
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas.pl
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas_apple.pl
DIST-SRCS-yes += $(target:-$(TOOLCHAIN)=).mk
endif
INSTALL-SRCS := $(call cond_enabled,CONFIG_INSTALL_SRCS,INSTALL-SRCS)
......
......@@ -10,12 +10,12 @@
##
# ads2gas.pl
# ads2gas_apple.pl
# Author: Eric Fung (efung (at) acm.org)
#
# Convert ARM Developer Suite 1.0.1 syntax assembly source to GNU as format
#
# Usage: cat inputfile | perl ads2gas.pl > outputfile
# Usage: cat inputfile | perl ads2gas_apple.pl > outputfile
#
print "@ This file was created from a .asm file\n";
print "@ using the ads2gas_apple.pl script.\n\n";
......
......@@ -598,8 +598,13 @@ process_common_toolchain() {
armv6*)
tgt_isa=armv6
;;
armv7*-hardfloat*)
tgt_isa=armv7
float_abi=hard
;;
armv7*)
tgt_isa=armv7
float_abi=softfp
;;
armv5te*)
tgt_isa=armv5te
......@@ -643,6 +648,9 @@ process_common_toolchain() {
tgt_isa=x86_64
tgt_os=darwin12
;;
x86_64*mingw32*)
tgt_os=win64
;;
*mingw32*|*cygwin*)
[ -z "$tgt_isa" ] && tgt_isa=x86
tgt_os=win32
......@@ -785,8 +793,9 @@ process_common_toolchain() {
check_add_asflags --defsym ARCHITECTURE=${arch_int}
tune_cflags="-mtune="
if [ ${tgt_isa} == "armv7" ]; then
check_add_cflags -march=armv7-a -mfloat-abi=softfp
check_add_asflags -march=armv7-a -mfloat-abi=softfp
[ -z "${float_abi}" ] && float_abi=softfp
check_add_cflags -march=armv7-a -mfloat-abi=${float_abi}
check_add_asflags -march=armv7-a -mfloat-abi=${float_abi}
if enabled neon
then
......@@ -1038,7 +1047,7 @@ EOF
add_ldflags -m${bits}
link_with_cc=gcc
tune_cflags="-march="
setup_gnu_toolchain
setup_gnu_toolchain
#for 32 bit x86 builds, -O3 did not turn on this flag
enabled optimizations && check_add_cflags -fomit-frame-pointer
;;
......@@ -1056,6 +1065,8 @@ EOF
soft_enable sse2
soft_enable sse3
soft_enable ssse3
# We can't use 'check_cflags' until the compiler is configured and CC is
# populated.
if enabled gcc && ! disabled sse4_1 && ! check_cflags -msse4; then
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-sse4_1 "
else
......@@ -1082,7 +1093,7 @@ EOF
add_asflags -f x64
enabled debug && add_asflags -g cv8
;;
linux*|solaris*)
linux*|solaris*|android*)
add_asflags -f elf${bits}
enabled debug && [ "${AS}" = yasm ] && add_asflags -g dwarf2
enabled debug && [ "${AS}" = nasm ] && add_asflags -g
......
......@@ -59,13 +59,13 @@ for f in $defs_file; do [ -f "$f" ] || usage; done
# Routines for the RTCD DSL to call
#
prototype() {
local rtyp
rtyp=""
case "$1" in
unsigned) rtyp="$1 "; shift;;
esac
rtyp="${rtyp}$1"
local fn="$2"
local args="$3"
fn="$2"
args="$3"
eval "${2}_rtyp='$rtyp'"
eval "${2}_args='$3'"
......@@ -74,7 +74,7 @@ prototype() {
}
specialize() {
local fn="$1"
fn="$1"
shift
for opt in "$@"; do
eval "${fn}_${opt}=${fn}_${opt}"
......@@ -84,13 +84,13 @@ specialize() {
require() {
for fn in $ALL_FUNCS; do
for opt in "$@"; do
local ofn=$(eval "echo \$${fn}_${opt}")
ofn=$(eval "echo \$${fn}_${opt}")
[ -z "$ofn" ] && continue
# if we already have a default, then we can disable it, as we know
# we can do better.
local best=$(eval "echo \$${fn}_default")
local best_ofn=$(eval "echo \$${best}")
best=$(eval "echo \$${fn}_default")
best_ofn=$(eval "echo \$${best}")
[ -n "$best" ] && [ "$best_ofn" != "$ofn" ] && eval "${best}_link=false"
eval "${fn}_default=${fn}_${opt}"
eval "${fn}_${opt}_link=true"
......@@ -121,15 +121,15 @@ process_forward_decls() {
determine_indirection() {
[ "$CONFIG_RUNTIME_CPU_DETECT" = "yes" ] || require $ALL_ARCHS
for fn in $ALL_FUNCS; do
local n=""
local rtyp="$(eval "echo \$${fn}_rtyp")"
local args="$(eval "echo \"\$${fn}_args\"")"
local dfn="$(eval "echo \$${fn}_default")"
n=""
rtyp="$(eval "echo \$${fn}_rtyp")"
args="$(eval "echo \"\$${fn}_args\"")"
dfn="$(eval "echo \$${fn}_default")"
dfn=$(eval "echo \$${dfn}")
for opt in "$@"; do
local ofn=$(eval "echo \$${fn}_${opt}")
ofn=$(eval "echo \$${fn}_${opt}")
[ -z "$ofn" ] && continue
local link=$(eval "echo \$${fn}_${opt}_link")
link=$(eval "echo \$${fn}_${opt}_link")
[ "$link" = "false" ] && continue
n="${n}x"
done
......@@ -143,12 +143,12 @@ determine_indirection() {
declare_function_pointers() {
for fn in $ALL_FUNCS; do
local rtyp="$(eval "echo \$${fn}_rtyp")"
local args="$(eval "echo \"\$${fn}_args\"")"
local dfn="$(eval "echo \$${fn}_default")"
rtyp="$(eval "echo \$${fn}_rtyp")"
args="$(eval "echo \"\$${fn}_args\"")"
dfn="$(eval "echo \$${fn}_default")"
dfn=$(eval "echo \$${dfn}")
for opt in "$@"; do
local ofn=$(eval "echo \$${fn}_${opt}")
ofn=$(eval "echo \$${fn}_${opt}")
[ -z "$ofn" ] && continue
echo "$rtyp ${ofn}($args);"
done
......@@ -163,20 +163,20 @@ declare_function_pointers() {
set_function_pointers() {
for fn in $ALL_FUNCS; do
local n=""
local rtyp="$(eval "echo \$${fn}_rtyp")"
local args="$(eval "echo \"\$${fn}_args\"")"
local dfn="$(eval "echo \$${fn}_default")"
n=""
rtyp="$(eval "echo \$${fn}_rtyp")"
args="$(eval "echo \"\$${fn}_args\"")"
dfn="$(eval "echo \$${fn}_default")"
dfn=$(eval "echo \$${dfn}")
if $(eval "echo \$${fn}_indirect"); then
echo " $fn = $dfn;"
for opt in "$@"; do
local ofn=$(eval "echo \$${fn}_${opt}")
ofn=$(eval "echo \$${fn}_${opt}")
[ -z "$ofn" ] && continue
[ "$ofn" = "$dfn" ] && continue;
local link=$(eval "echo \$${fn}_${opt}_link")
link=$(eval "echo \$${fn}_${opt}_link")
[ "$link" = "false" ] && continue
local cond="$(eval "echo \$have_${opt}")"
cond="$(eval "echo \$have_${opt}")"
echo " if (${cond}) $fn = $ofn;"
done
fi
......@@ -185,7 +185,7 @@ set_function_pointers() {
}
filter() {
local filtered
filtered=""
for opt in "$@"; do
[ -z $(eval "echo \$disable_${opt}") ] && filtered="$filtered $opt"
done
......@@ -196,8 +196,9 @@ filter() {
# Helper functions for generating the arch specific RTCD files
#
common_top() {
local outfile_basename=$(basename ${symbol:-rtcd.h})
local include_guard=$(echo $outfile_basename | tr '[a-z]' '[A-Z]' | tr -c '[A-Z]' _)
outfile_basename=$(basename ${symbol:-rtcd})
include_guard=$(echo $outfile_basename | tr '[a-z]' '[A-Z]' | \
tr -c '[A-Z0-9]' _)H_
cat <<EOF
#ifndef ${include_guard}
#define ${include_guard}
......@@ -227,7 +228,7 @@ x86() {
# Assign the helper variable for each enabled extension
for opt in $ALL_ARCHS; do
local uc=$(echo $opt | tr '[a-z]' '[A-Z]')
uc=$(echo $opt | tr '[a-z]' '[A-Z]')
eval "have_${opt}=\"flags & HAS_${uc}\""
done
......@@ -254,7 +255,7 @@ arm() {
# Assign the helper variable for each enabled extension
for opt in $ALL_ARCHS; do
local uc=$(echo $opt | tr '[a-z]' '[A-Z]')
uc=$(echo $opt | tr '[a-z]' '[A-Z]')
eval "have_${opt}=\"flags & HAS_${uc}\""
done
......
......@@ -106,6 +106,7 @@ all_platforms="${all_platforms} ppc64-darwin8-gcc"
all_platforms="${all_platforms} ppc64-darwin9-gcc"
all_platforms="${all_platforms} ppc64-linux-gcc"
all_platforms="${all_platforms} sparc-solaris-gcc"
all_platforms="${all_platforms} x86-android-gcc"
all_platforms="${all_platforms} x86-darwin8-gcc"
all_platforms="${all_platforms} x86-darwin8-icc"
all_platforms="${all_platforms} x86-darwin9-gcc"
......@@ -650,7 +651,7 @@ process_toolchain() {
enabled postproc || die "postproc_visualizer requires postproc to be enabled"
fi
# Enable unit tests if we have a working C++ compiler
# Enable unit tests by default if we have a working C++ compiler.
case "$toolchain" in
*-vs*)
soft_enable unit_tests
......@@ -663,7 +664,7 @@ process_toolchain() {
# x86 targets.
;;
*)
check_cxx "$@" <<EOF && soft_enable unit_tests
enabled pthread_h && check_cxx "$@" <<EOF && soft_enable unit_tests
int z;
EOF
;;
......
......@@ -17,7 +17,6 @@ else
ASM:=.asm
endif
#
# Calculate platform- and compiler-specific offsets for hand coded assembly
#
......@@ -167,7 +166,9 @@ CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/emmintrin_compat.h
CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/vpx_once.h
CODEC_SRCS-$(BUILD_LIBVPX) += $(BUILD_PFX)vpx_config.c
INSTALL-SRCS-no += $(BUILD_PFX)vpx_config.c
ifeq ($(ARCH_X86)$(ARCH_X86_64),yes)
CODEC_SRCS-$(BUILD_LIBVPX) += third_party/x86inc/x86inc.asm
endif
CODEC_EXPORTS-$(BUILD_LIBVPX) += vpx/exports_com
CODEC_EXPORTS-$(CONFIG_ENCODERS) += vpx/exports_enc
CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
......@@ -221,7 +222,6 @@ obj_int_extract.vcproj: $(SRC_PATH_BARE)/build/make/obj_int_extract.c
-I"$(SRC_PATH_BARE)" \
PROJECTS-$(BUILD_LIBVPX) += obj_int_extract.vcproj
PROJECTS-$(BUILD_LIBVPX) += obj_int_extract.bat
vpx.def: $(call enabled,CODEC_EXPORTS)
@echo " [CREATE] $@"
......@@ -325,7 +325,11 @@ vpx.pc: config.mk libs.mk
$(qexec)echo 'Requires:' >> $@
$(qexec)echo 'Conflicts:' >> $@
$(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@
ifeq ($(HAVE_PTHREAD_H),yes)
$(qexec)echo 'Libs.private: -lm -lpthread' >> $@
else
$(qexec)echo 'Libs.private: -lm' >> $@
endif
$(qexec)echo 'Cflags: -I$${includedir}' >> $@
INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc
INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc
......@@ -373,7 +377,7 @@ LIBVPX_TEST_DATA_PATH ?= .
include $(SRC_PATH_BARE)/test/test.mk
LIBVPX_TEST_SRCS=$(addprefix test/,$(call enabled,LIBVPX_TEST_SRCS))
LIBVPX_TEST_BINS=./test_libvpx
LIBVPX_TEST_BINS=./test_libvpx$(EXE_SFX)
LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\
$(call enabled,LIBVPX_TEST_DATA))
libvpx_test_data_url=http://downloads.webmproject.org/test_data/libvpx/$(1)
......
......@@ -61,9 +61,9 @@ class SixtapPredictTest : public PARAMS(int, int, sixtap_predict_fn_t) {
width_ = GET_PARAM(0);
height_ = GET_PARAM(1);
sixtap_predict_ = GET_PARAM(2);
memset(src_, 0, sizeof(src_));
memset(dst_, 0, sizeof(dst_));
memset(dst_c_, 0, sizeof(dst_c_));
memset(src_, 0, kSrcSize);
memset(dst_, 0, kDstSize);
memset(dst_c_, 0, kDstSize);
}
int width_;
......
......@@ -54,6 +54,7 @@ LIBVPX_TEST_SRCS-yes += sad_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += set_roi.cc
LIBVPX_TEST_SRCS-yes += sixtap_predict_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += subtract_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += variance_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += vp8_fdct4x4_test.cc
endif # VP8
......
......@@ -12,11 +12,17 @@
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "vpx/vpx_integer.h"
#include "vpx_config.h"
extern "C" {
#include "vp9/encoder/vp9_variance.h"
#include "vpx/vpx_integer.h"
#include "vp9_rtcd.h"
#if CONFIG_VP8_ENCODER
# include "vp8/common/variance.h"
# include "vp8_rtcd.h"
#endif
#if CONFIG_VP9_ENCODER
# include "vp9/encoder/vp9_variance.h"
# include "vp9_rtcd.h"
#endif
}
namespace {
......@@ -25,11 +31,12 @@ using ::std::tr1::get;
using ::std::tr1::make_tuple;
using ::std::tr1::tuple;
class VP9VarianceTest :
public ::testing::TestWithParam<tuple<int, int, vp9_variance_fn_t> > {
template<typename VarianceFunctionType>
class VarianceTest :
public ::testing::TestWithParam<tuple<int, int, VarianceFunctionType> > {
public:
virtual void SetUp() {
const tuple<int, int, vp9_variance_fn_t>& params = GetParam();
const tuple<int, int, VarianceFunctionType>& params = this->GetParam();
width_ = get<0>(params);
height_ = get<1>(params);
variance_ = get<2>(params);
......@@ -47,15 +54,20 @@ class VP9VarianceTest :
}
protected:
void ZeroTest();
void OneQuarterTest();
uint8_t* src_;
uint8_t* ref_;
int width_;
int height_;
int block_size_;
vp9_variance_fn_t variance_;
VarianceFunctionType variance_;
};
TEST_P(VP9VarianceTest, Zero) {
template<typename VarianceFunctionType>
void VarianceTest<VarianceFunctionType>::ZeroTest() {
for (int i = 0; i <= 255; ++i) {
memset(src_, i, block_size_);
for (int j = 0; j <= 255; ++j) {
......@@ -67,7 +79,8 @@ TEST_P(VP9VarianceTest, Zero) {
}
}
TEST_P(VP9VarianceTest, OneQuarter) {
template<typename VarianceFunctionType>
void VarianceTest<VarianceFunctionType>::OneQuarterTest() {
memset(src_, 255, block_size_);
const int half = block_size_ / 2;
memset(ref_, 255, half);
......@@ -78,6 +91,74 @@ TEST_P(VP9VarianceTest, OneQuarter) {
EXPECT_EQ(expected, var);
}
// -----------------------------------------------------------------------------
// VP8 test cases.
namespace vp8 {
#if CONFIG_VP8_ENCODER
typedef VarianceTest<vp8_variance_fn_t> VP8VarianceTest;
TEST_P(VP8VarianceTest, Zero) { ZeroTest(); }
TEST_P(VP8VarianceTest, OneQuarter) { OneQuarterTest(); }
const vp8_variance_fn_t variance4x4_c = vp8_variance4x4_c;
const vp8_variance_fn_t variance8x8_c = vp8_variance8x8_c;
const vp8_variance_fn_t variance8x16_c = vp8_variance8x16_c;
const vp8_variance_fn_t variance16x8_c = vp8_variance16x8_c;
const vp8_variance_fn_t variance16x16_c = vp8_variance16x16_c;
INSTANTIATE_TEST_CASE_P(
C, VP8VarianceTest,
::testing::Values(make_tuple(4, 4, variance4x4_c),
make_tuple(8, 8, variance8x8_c),
make_tuple(8, 16, variance8x16_c),
make_tuple(16, 8, variance16x8_c),
make_tuple(16, 16, variance16x16_c)));
#if HAVE_MMX
const vp8_variance_fn_t variance4x4_mmx = vp8_variance4x4_mmx;
const vp8_variance_fn_t variance8x8_mmx = vp8_variance8x8_mmx;
const vp8_variance_fn_t variance8x16_mmx = vp8_variance8x16_mmx;
const vp8_variance_fn_t variance16x8_mmx = vp8_variance16x8_mmx;
const vp8_variance_fn_t variance16x16_mmx = vp8_variance16x16_mmx;
INSTANTIATE_TEST_CASE_P(
MMX, VP8VarianceTest,
::testing::Values(make_tuple(4, 4, variance4x4_mmx),
make_tuple(8, 8, variance8x8_mmx),
make_tuple(8, 16, variance8x16_mmx),
make_tuple(16, 8, variance16x8_mmx),
make_tuple(16, 16, variance16x16_mmx)));
#endif
#if HAVE_SSE2
const vp8_variance_fn_t variance4x4_wmt = vp8_variance4x4_wmt;
const vp8_variance_fn_t variance8x8_wmt = vp8_variance8x8_wmt;
const vp8_variance_fn_t variance8x16_wmt = vp8_variance8x16_wmt;
const vp8_variance_fn_t variance16x8_wmt = vp8_variance16x8_wmt;
const vp8_variance_fn_t variance16x16_wmt = vp8_variance16x16_wmt;
INSTANTIATE_TEST_CASE_P(
SSE2, VP8VarianceTest,
::testing::Values(make_tuple(4, 4, variance4x4_wmt),
make_tuple(8, 8, variance8x8_wmt),
make_tuple(8, 16, variance8x16_wmt),
make_tuple(16, 8, variance16x8_wmt),
make_tuple(16, 16, variance16x16_wmt)));
#endif
#endif // CONFIG_VP8_ENCODER
} // namespace vp8
// -----------------------------------------------------------------------------
// VP9 test cases.
namespace vp9 {
#if CONFIG_VP9_ENCODER
typedef VarianceTest<vp9_variance_fn_t> VP9VarianceTest;
TEST_P(VP9VarianceTest, Zero) { ZeroTest(); }
TEST_P(VP9VarianceTest, OneQuarter) { OneQuarterTest(); }
const vp9_variance_fn_t variance4x4_c = vp9_variance4x4_c;
const vp9_variance_fn_t variance8x8_c = vp9_variance8x8_c;
const vp9_variance_fn_t variance8x16_c = vp9_variance8x16_c;
......@@ -120,4 +201,8 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(16, 8, variance16x8_wmt),
make_tuple(16, 16, variance16x16_wmt)));
#endif
#endif // CONFIG_VP9_ENCODER
} // namespace vp9
} // namespace
......@@ -61,6 +61,8 @@
%define mangle(x) x
%elifidn __OUTPUT_FORMAT__,x64
%define mangle(x) x
%elifidn __OUTPUT_FORMAT__,win64
%define mangle(x) x
%else
%define mangle(x) _ %+ x
%endif
......@@ -112,7 +114,12 @@
%endif
; Always use long nops (reduces 0x90 spam in disassembly on x86_32)
%ifndef __NASM_VER__
CPU amdnop
%else
%use smartalign
ALIGNMODE k7
%endif
; Macros to eliminate most code duplication between x86_32 and x86_64:
; Currently this works only for leaf functions which load all their arguments
......
......@@ -280,7 +280,7 @@ void vp8_multiframe_quality_enhance
FRAME_TYPE frame_type = cm->frame_type;
/* Point at base of Mb MODE_INFO list has motion vectors etc */
const MODE_INFO *mode_info_context = cm->mi;
const MODE_INFO *mode_info_context = cm->show_frame_mi;
int mb_row;
int mb_col;
int totmap, map[4];
......
......@@ -127,7 +127,8 @@ typedef struct VP8Common
MODE_INFO *prev_mip; /* MODE_INFO array 'mip' from last decoded frame */
MODE_INFO *prev_mi; /* 'mi' from last frame (points into prev_mip) */
#endif
MODE_INFO *show_frame_mi; /* MODE_INFO for the last decoded frame
to show */
LOOPFILTERTYPE filter_type;
loop_filter_info_n lf_info;
......
......@@ -34,7 +34,6 @@ extern "C"
int postprocess;
int max_threads;
int error_concealment;
int input_fragments;
} VP8D_CONFIG;
typedef enum
......@@ -56,10 +55,6 @@ extern "C"
vpx_codec_err_t vp8dx_get_reference(struct VP8D_COMP* comp, enum vpx_ref_frame_type ref_frame_flag, YV12_BUFFER_CONFIG *sd);
vpx_codec_err_t vp8dx_set_reference(struct VP8D_COMP* comp, enum vpx_ref_frame_type ref_frame_flag, YV12_BUFFER_CONFIG *sd);
struct VP8D_COMP* vp8dx_create_decompressor(VP8D_CONFIG *oxcf);
void vp8dx_remove_decompressor(struct VP8D_COMP* comp);
#ifdef __cplusplus
}
#endif
......
......@@ -334,7 +334,7 @@ void vp8_deblock(VP8_COMMON *cm,
double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
int ppl = (int)(level + .5);
const MODE_INFO *mode_info_context = cm->mi;
const MODE_INFO *mode_info_context = cm->show_frame_mi;
int mbr, mbc;
/* The pixel thresholds are adjusted according to if or not the macroblock
......
......@@ -75,7 +75,7 @@ unsigned int vp8_variance16x16_c(
variance(src_ptr, source_stride, ref_ptr, recon_stride, 16, 16, &var, &avg);
*sse = var;
return (var - ((unsigned int)(avg * avg) >> 8));
return (var - (((unsigned int)avg * avg) >> 8));
}
unsigned int vp8_variance8x16_c(
......@@ -91,7 +91,7 @@ unsigned int vp8_variance8x16_c(
variance(src_ptr, source_stride, ref_ptr, recon_stride, 8, 16, &var, &avg);
*sse = var;
return (var - ((unsigned int)(avg * avg) >> 7));
return (var - (((unsigned int)avg * avg) >> 7));
}
unsigned int vp8_variance16x8_c(
......@@ -107,7 +107,7 @@ unsigned int vp8_variance16x8_c(
variance(src_ptr, source_stride, ref_ptr, recon_stride, 16, 8, &var, &avg);
*sse = var;
return (var - ((unsigned int)(avg * avg) >> 7));
return (var - (((unsigned int)avg * avg) >> 7));
}
......@@ -124,7 +124,7 @@ unsigned int vp8_variance8x8_c(
variance(src_ptr, source_stride, ref_ptr, recon_stride, 8, 8, &var, &avg);
*sse = var;
return (var - ((unsigned int)(avg * avg) >> 6));
return (var - (((unsigned int)avg * avg) >> 6));
}
unsigned int vp8_variance4x4_c(
......@@ -140,7 +140,7 @@ unsigned int vp8_variance4x4_c(
variance(src_ptr, source_stride, ref_ptr, recon_stride, 4, 4, &var, &avg);
*sse = var;
return (var - ((unsigned int)(avg * avg) >> 4));
return (var - (((unsigned int)avg * avg) >> 4));
}
......
......@@ -24,7 +24,7 @@ sym(vp8_short_inv_walsh4x4_mmx):
movq mm0, [rdx + 0] ;ip[0]
movq mm1, [rdx + 8] ;ip[4]
movd mm7, rax
movq mm7, rax
movq mm2, [rdx + 16] ;ip[8]
movq mm3, [rdx + 24] ;ip[12]
......
......@@ -136,7 +136,7 @@
global sym(vp8_loop_filter_bh_y_sse2) PRIVATE