summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJohann <johann.koenig@duck.com>2013-04-26 13:35:28 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-04-26 13:35:28 -0700
commit9e23bd5df57cb3295118ca83543ce1b6f226465b (patch)
tree6299bc5f91fde2001ce367e17e5fa10ef3164fa3 /vp9
parenteea1fecd069c2eaaf17b09f4306d0970c893a12d (diff)
parent32a5c52856743c5cce39f73bfc3e6aa77527a8c5 (diff)
downloadlibvpx-9e23bd5df57cb3295118ca83543ce1b6f226465b.tar
libvpx-9e23bd5df57cb3295118ca83543ce1b6f226465b.tar.gz
libvpx-9e23bd5df57cb3295118ca83543ce1b6f226465b.tar.bz2
libvpx-9e23bd5df57cb3295118ca83543ce1b6f226465b.zip
Merge "Merge branch 'master' into experimental" into experimental
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/x86/vp9_idct_intrin_sse2.c (renamed from vp9/common/x86/vp9_idct_x86.c)2
-rw-r--r--vp9/common/x86/vp9_idct_x86.h51
-rw-r--r--vp9/decoder/vp9_decodframe.c2
-rw-r--r--vp9/decoder/x86/vp9_dequantize_sse2.c (renamed from vp9/decoder/x86/vp9_dequantize_x86.c)3
-rw-r--r--vp9/decoder/x86/vp9_idct_mmx.h22
-rw-r--r--vp9/encoder/vp9_dct.c1
-rw-r--r--vp9/encoder/vp9_sad_c.c1
-rw-r--r--vp9/encoder/x86/vp9_dct_sse2.c (renamed from vp9/encoder/x86/vp9_dct_sse2_intrinsics.c)0
-rw-r--r--vp9/vp9_common.mk7
-rw-r--r--vp9/vp9_dx_iface.c14
-rw-r--r--vp9/vp9cx.mk6
-rw-r--r--vp9/vp9dx.mk6
12 files changed, 17 insertions, 98 deletions
diff --git a/vp9/common/x86/vp9_idct_x86.c b/vp9/common/x86/vp9_idct_intrin_sse2.c
index 811ed9899..dd7e68aa3 100644
--- a/vp9/common/x86/vp9_idct_x86.c
+++ b/vp9/common/x86/vp9_idct_intrin_sse2.c
@@ -15,7 +15,6 @@
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_idct.h"
-#if HAVE_SSE2
// In order to improve performance, clip absolute diff values to [0, 255],
// which allows to keep the additions/subtractions in 8 bits.
void vp9_dc_only_idct_add_sse2(int input_dc, uint8_t *pred_ptr,
@@ -1972,4 +1971,3 @@ void vp9_short_idct32x32_sse2(int16_t *input, int16_t *output, int pitch) {
}
}
}
-#endif
diff --git a/vp9/common/x86/vp9_idct_x86.h b/vp9/common/x86/vp9_idct_x86.h
deleted file mode 100644
index bd66d8c72..000000000
--- a/vp9/common/x86/vp9_idct_x86.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
- *
- * 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.
- */
-
-
-#ifndef VP9_COMMON_X86_VP9_IDCT_X86_H_
-#define VP9_COMMON_X86_VP9_IDCT_X86_H_
-
-/* Note:
- *
- * This platform is commonly built for runtime CPU detection. If you modify
- * any of the function mappings present in this file, be sure to also update
- * them in the function pointer initialization code
- */
-
-#if HAVE_MMX
-extern prototype_second_order(vp9_short_inv_walsh4x4_mmx);
-extern prototype_second_order(vp9_short_inv_walsh4x4_1_mmx);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-#undef vp9_idct_iwalsh16
-#define vp9_idct_iwalsh16 vp9_short_inv_walsh4x4_mmx
-
-#undef vp9_idct_iwalsh1
-#define vp9_idct_iwalsh1 vp9_short_inv_walsh4x4_1_mmx
-
-#endif
-#endif
-
-#if HAVE_SSE2
-
-extern prototype_second_order(vp9_short_inv_walsh4x4_sse2);
-
-#if !CONFIG_RUNTIME_CPU_DETECT
-
-#undef vp9_idct_iwalsh16
-#define vp9_idct_iwalsh16 vp9_short_inv_walsh4x4_sse2
-
-#endif
-
-#endif
-
-
-
-#endif
diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c
index ad3a48927..0b3d145fc 100644
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -1331,7 +1331,7 @@ static void decode_tiles(VP9D_COMP *pbi,
if (pbi->oxcf.inv_tile_order) {
const int n_cols = pc->tile_columns;
const uint8_t *data_ptr2[4][1 << 6];
- vp9_reader UNINITIALIZED_IS_SAFE(bc_bak);
+ vp9_reader bc_bak = {0};
// pre-initialize the offsets, we're going to read in inverse order
data_ptr2[0][0] = data_ptr;
diff --git a/vp9/decoder/x86/vp9_dequantize_x86.c b/vp9/decoder/x86/vp9_dequantize_sse2.c
index cbe818143..1296b704a 100644
--- a/vp9/decoder/x86/vp9_dequantize_x86.c
+++ b/vp9/decoder/x86/vp9_dequantize_sse2.c
@@ -15,8 +15,6 @@
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_idct.h"
-#if HAVE_SSE2
-
void vp9_add_residual_4x4_sse2(const int16_t *diff, uint8_t *dest, int stride) {
const int width = 4;
const __m128i zero = _mm_setzero_si128();
@@ -445,4 +443,3 @@ void vp9_add_constant_residual_32x32_sse2(const int16_t diff, uint8_t *dest,
dest += 4 * stride;
} while (--i);
}
-#endif
diff --git a/vp9/decoder/x86/vp9_idct_mmx.h b/vp9/decoder/x86/vp9_idct_mmx.h
deleted file mode 100644
index 7d9829175..000000000
--- a/vp9/decoder/x86/vp9_idct_mmx.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
- *
- * 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.
- */
-
-#ifndef VP9_DECODER_X86_VP9_IDCT_MMX_H_
-#define VP9_DECODER_X86_VP9_IDCT_MMX_H_
-
-
-void vp9_dequant_dc_idct_add_mmx(short *input, const short *dq,
- unsigned char *pred, unsigned char *dest,
- int pitch, int stride, int Dc);
-
-void vp9_dequant_idct_add_mmx(short *input, const short *dq, unsigned char *pred,
- unsigned char *dest, int pitch, int stride);
-
-#endif /* VP9_DECODER_X86_VP9_IDCT_MMX_H_ */
diff --git a/vp9/encoder/vp9_dct.c b/vp9/encoder/vp9_dct.c
index ecd3e2dd3..ebf40e4e6 100644
--- a/vp9/encoder/vp9_dct.c
+++ b/vp9/encoder/vp9_dct.c
@@ -1286,4 +1286,3 @@ void vp9_short_fdct32x32_c(int16_t *input, int16_t *out, int pitch) {
out[j + i * 32] = (temp_out[j] + 1 + (temp_out[j] < 0)) >> 2;
}
}
-
diff --git a/vp9/encoder/vp9_sad_c.c b/vp9/encoder/vp9_sad_c.c
index fa47f813c..b4cd19358 100644
--- a/vp9/encoder/vp9_sad_c.c
+++ b/vp9/encoder/vp9_sad_c.c
@@ -577,4 +577,3 @@ void vp9_sad4x4x4d_c(const uint8_t *src_ptr,
sad_array[3] = vp9_sad4x4(src_ptr, src_stride,
ref_ptr[3], ref_stride, 0x7fffffff);
}
-
diff --git a/vp9/encoder/x86/vp9_dct_sse2_intrinsics.c b/vp9/encoder/x86/vp9_dct_sse2.c
index 49cb837e0..49cb837e0 100644
--- a/vp9/encoder/x86/vp9_dct_sse2_intrinsics.c
+++ b/vp9/encoder/x86/vp9_dct_sse2.c
diff --git a/vp9/vp9_common.mk b/vp9/vp9_common.mk
index 8abd58399..aed6cc50b 100644
--- a/vp9/vp9_common.mk
+++ b/vp9/vp9_common.mk
@@ -83,7 +83,6 @@ VP9_COMMON_SRCS-$(CONFIG_POSTPROC_VISUALIZER) += common/vp9_textblit.c
VP9_COMMON_SRCS-yes += common/vp9_treecoder.c
VP9_COMMON_SRCS-$(CONFIG_IMPLICIT_SEGMENTATION) += common/vp9_implicit_segmentation.c
-VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_idct_x86.h
VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_loopfilter_x86.h
VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_postproc_x86.h
VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_asm_stubs.c
@@ -113,13 +112,13 @@ VP9_COMMON_SRCS-yes += common/vp9_maskingmv.c
VP9_COMMON_SRCS-$(HAVE_SSE3) += common/x86/vp9_mask_sse3.asm
endif
-VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_idct_x86.c
+VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_idct_intrin_sse2.c
VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_sadmxn_sse2.c
ifeq ($(HAVE_SSE2),yes)
-vp9/common/x86/vp9_idct_x86.c.o: CFLAGS += -msse2
+vp9/common/x86/vp9_idct_intrin_sse2.c.o: CFLAGS += -msse2
vp9/common/x86/vp9_loopfilter_intrin_sse2.c.o: CFLAGS += -msse2
vp9/common/x86/vp9_sadmxn_sse2.c.o: CFLAGS += -msse2
-vp9/common/x86/vp9_idct_x86.c.d: CFLAGS += -msse2
+vp9/common/x86/vp9_idct_intrin_sse2.c.d: CFLAGS += -msse2
vp9/common/x86/vp9_loopfilter_intrin_sse2.c.d: CFLAGS += -msse2
vp9/common/x86/vp9_sadmxn_sse2.c.d: CFLAGS += -msse2
endif
diff --git a/vp9/vp9_dx_iface.c b/vp9/vp9_dx_iface.c
index 2426f2175..85022c951 100644
--- a/vp9/vp9_dx_iface.c
+++ b/vp9/vp9_dx_iface.c
@@ -408,9 +408,9 @@ static void parse_superframe_index(const uint8_t *data,
*count = 0;
if ((marker & 0xe0) == 0xc0) {
- const int frames = (marker & 0x7) + 1;
- const int mag = ((marker >> 3) & 3) + 1;
- const int index_sz = 2 + mag * frames;
+ const uint32_t frames = (marker & 0x7) + 1;
+ const uint32_t mag = ((marker >> 3) & 0x3) + 1;
+ const size_t index_sz = 2 + mag * frames;
if (data_sz >= index_sz && data[data_sz - index_sz] == marker) {
// found a valid superframe index
@@ -418,7 +418,7 @@ static void parse_superframe_index(const uint8_t *data,
const uint8_t *x = data + data_sz - index_sz + 1;
for (i = 0; i < frames; i++) {
- int this_sz = 0;
+ uint32_t this_sz = 0;
for (j = 0; j < mag; j++)
this_sz |= (*x++) << (j * 8);
@@ -447,9 +447,9 @@ static vpx_codec_err_t vp9_decode(vpx_codec_alg_priv_t *ctx,
// Skip over the superframe index, if present
if (data_sz && (*data_start & 0xe0) == 0xc0) {
const uint8_t marker = *data_start;
- const int frames = (marker & 0x7) + 1;
- const int mag = ((marker >> 3) & 3) + 1;
- const int index_sz = 2 + mag * frames;
+ const uint32_t frames = (marker & 0x7) + 1;
+ const uint32_t mag = ((marker >> 3) & 0x3) + 1;
+ const uint32_t index_sz = 2 + mag * frames;
if (data_sz >= index_sz && data_start[index_sz - 1] == marker) {
data_start += index_sz;
diff --git a/vp9/vp9cx.mk b/vp9/vp9cx.mk
index 097211388..63c6ed8b1 100644
--- a/vp9/vp9cx.mk
+++ b/vp9/vp9cx.mk
@@ -108,10 +108,10 @@ VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/vp9_quantize_mmx.asm
VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/vp9_encodeopt.asm
VP9_CX_SRCS-$(ARCH_X86_64) += encoder/x86/vp9_ssim_opt.asm
-VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_dct_sse2_intrinsics.c
+VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_dct_sse2.c
ifeq ($(HAVE_SSE2),yes)
-vp9/encoder/x86/vp9_dct_sse2_intrinsics.c.d: CFLAGS += -msse2
-vp9/encoder/x86/vp9_dct_sse2_intrinsics.c.o: CFLAGS += -msse2
+vp9/encoder/x86/vp9_dct_sse2.c.d: CFLAGS += -msse2
+vp9/encoder/x86/vp9_dct_sse2.c.o: CFLAGS += -msse2
endif
diff --git a/vp9/vp9dx.mk b/vp9/vp9dx.mk
index 69b29976b..babdebb86 100644
--- a/vp9/vp9dx.mk
+++ b/vp9/vp9dx.mk
@@ -37,10 +37,10 @@ VP9_DX_SRCS-yes := $(filter-out $(VP9_DX_SRCS_REMOVE-yes),$(VP9_DX_SRCS-yes))
VP9_DX_SRCS-$(HAVE_SSE2) += decoder/x86/vp9_idct_blk_sse2.c
-VP9_DX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += decoder/x86/vp9_dequantize_x86.c
+VP9_DX_SRCS-$(HAVE_SSE2) += decoder/x86/vp9_dequantize_sse2.c
ifeq ($(HAVE_SSE2),yes)
-vp9/decoder/x86/vp9_dequantize_x86.c.o: CFLAGS += -msse2
-vp9/decoder/x86/vp9_dequantize_x86.c.d: CFLAGS += -msse2
+vp9/decoder/x86/vp9_dequantize_sse2.c.o: CFLAGS += -msse2
+vp9/decoder/x86/vp9_dequantize_sse2.c.d: CFLAGS += -msse2
endif
$(eval $(call asm_offsets_template,\