Commit Graph

600 Commits

Author SHA1 Message Date
Yunqing Wang
096eaba728 Remove VP8 save_reg_neon function
This patch did a cleanup following the commit "Save NEON registers
in VP8 NEON functions". The pushing/poping of callee-saved NEON
registers was moved into individual NEON functions. Therefore,
we don't need to save those registers at the beginning of codec.
The related code was removed.

Change-Id: I5648166514fc9beffb780aa138495597731f49ea
2014-04-29 16:13:24 -07:00
Yunqing Wang
33df6d1fc1 Save NEON registers in VP8 NEON functions
The recent compiler can generate optimized code that uses NEON registers
for various operations besides floating-point operations. Therefore,
only saving callee-saved registers d8 - d15 at the beginning of the
encoder/decoder is not enough anymore. This patch added register saving
code in VP8 NEON functions that use those registers.

Change-Id: Ie9e44f5188cf410990c8aaaac68faceee9dffd31
2014-04-28 14:51:53 -07:00
Joey Parrish
18c08607e0 Add VPXD_SET_DECRYPTOR support to the VP9 decoder.
Change-Id: I88f86c8ff9af34e0b6531028b691921b54c2fc48
2014-04-23 16:11:54 -07:00
Yunqing Wang
1893122e34 Fix dr memory VP8 encode/decode errors
This patch fixed errors reported in Issue 746: "dr memory VP8
encode errors" and Issue 745: "dr memory VP8 decode errors".
The "UNINITIALIZED READ" errors were fixed in x86 assembly
code. The list of files fixed is
vp8_intra_pred_uv_tm_sse2
vp8_intra_pred_uv_tm_ssse3

vp8_intra_pred_uv_ho_mmx2
vp8_intra_pred_uv_ho_ssse3

vp8_intra_pred_y_tm_sse2
vp8_intra_pred_y_tm_ssse3

vp8_intra_pred_y_ho_sse2

Change-Id: Ib6df7bf1d442077fe534edfd90e50ad16fadacdd
2014-04-21 17:04:05 -07:00
Jan Gerber
9848d67bb3 Remove an unused typedef
Change-Id: Ie0eb9ac4529db00a322511e5241a59b501c289b7
2014-04-04 08:47:52 -07:00
Yunqing Wang
c8773416fb Fix uninitialized read in postprocessing
This patch fixed WebRTC Issue 3020: "Uninit error at
vp8_mbpost_proc_down_xmm". The first 8 values in d were not initialized,
but was accessed. This patch fixed c code as well as mmx and sse2 code.

Change-Id: Iaa5b41a4ed3bea971b15fb826ce34b7ab4e36fb1
2014-03-24 14:54:25 -07:00
James Zern
805078a1bf build: convert rtcd.sh to perl
significantly speeds up file generation.

the goal of this change is to convert rtcd.sh to perl as directly as
possible to allow for simple comparison. future changes can make it more
perl-like.

---
Linux
    [CREATE] vpx_scale_rtcd.h
real    0m0.485s ->    0m0.022s
    [CREATE] vp8_rtcd.h
real    0m4.619s ->    0m0.060s
    [CREATE] vp9_rtcd.h
real    0m10.102s ->    0m0.087s

Windows
    [CREATE] vpx_scale_rtcd.h
real    0m8.360s ->    0m0.080s
    [CREATE] vp8_rtcd.h
real    1m8.083s ->    0m0.160s
    [CREATE] vp9_rtcd.h
real    2m6.489s ->    0m0.233s

Change-Id: Idfb71188206c91237d6a3c3a81dfe00d103f11ee
2014-03-03 14:47:11 -08:00
James Yu
fb5d281bb6 VP8 for ARMv8 by using NEON intrinsics 05
Add dequantizeb_neon.c
- vp8_dequantize_b_loop_neon

vpxdec  --summary --noblit ../videos/tears_of_steel_1080p.webm
Before => After, 13.25 => 13.23 (fps)

Change-Id: Iebe3b0c6ed2359c778b0570763c5681ae25fef0c
Signed-off-by: James Yu <james.yu@linaro.org>
2014-02-26 10:16:00 +08:00
James Yu
28b2f82f97 VP8 for ARMv8 by using NEON intrinsics 04
Add dequant_idct_neon.c
- vp8_dequant_idct_add_neon

vpxdec  --summary --noblit ../videos/tears_of_steel_1080p.webm
Before => After, 13.25 => 13.22 (fps)

Change-Id: Id48f39e1da58dd3d8d37658e94989411997f4f7c
Signed-off-by: James Yu <james.yu@linaro.org>
2014-02-26 09:59:23 +08:00
James Yu
d749ab6221 VP8 for ARMv8 by using NEON intrinsics 03
Add dc_only_idct_add_neon.c
- vp8_dc_only_idct_add_neon

vpxdec  --summary --noblit ../videos/tears_of_steel_1080p.webm
Before => After, 13.25 => 13.24 (fps)

Change-Id: I5e9e277ec3a3ca67e13c8cc4c324a6fbe8a897fc
Signed-off-by: James Yu <james.yu@linaro.org>
2014-02-26 09:28:29 +08:00
James Yu
300a3bfc73 VP8 for ARMv8 by using NEON intrinsics 02
Add copymem_neon.c
- vp8_copy_mem16x16_neon
- vp8_copy_mem8x8_neon
- vp8_copy_mem8x4_neon

vpxdec  --summary --noblit ../videos/tears_of_steel_1080p.webm
Before => After, 13.25 => 13.25 (fps)

Change-Id: Ib956b5a20522ff57dc8a580bf0aef7b252bddba6
Signed-off-by: James Yu <james.yu@linaro.org>
2014-02-23 22:56:53 +08:00
Andrew Russell
549c31f8ae minor spelling cleanup in comments
Change-Id: Ia91c6c406273345b08505097ffe1af3896980f06
2014-02-12 16:32:51 -08:00
James Zern
aceba82c41 vp8/common: add extern "C" to headers
Change-Id: I13b434b1e6621e31962b08831c3587c039368c83
2014-01-23 16:21:24 -08:00
Deb Mukherjee
67fb3bf639 Change the vp8 END_USAGE typedef
Makes the END_USAGE typedef compatible with the vpxenc input

Change-Id: If784586fdb90a1e6f7badcb522ea9e93d4ddc030
2014-01-17 15:39:49 -08:00
Johann
dadf350551 Apply neon flags to intrinsic files
Filter out files ending in _neon.c and append .neon so the Android build
system knows to apply -mfpu=neon

Change-Id: Ib67277e5920bfcaeda7c4aa16cd1001b11d59305
2014-01-10 12:16:59 -08:00
James Yu
79395e16cf VP8 for ARMv8 by using NEON intrinsics 01
Add bilinearpredict_neon_intrinsics.c
- vp8_bilinear_predict4x4_neon
- vp8_bilinear_predict8x4_neon
- vp8_bilinear_predict8x8_neon
- vp8_bilinear_predict16x16_neon

Change-Id: I33dfa502881219841b442dda32b73220e51b716b
Signed-off-by: James Yu <james.yu@linaro.org>
2014-01-09 09:56:22 -08:00
Christian Duvivier
b52db6b7e8 ARM NEON version of denoiser.
Change-Id: I951abd4ad0078f78949f3cb79453ac334fb82a7e
2014-01-02 10:51:05 -08:00
James Zern
e903cacf5b vp8/common: normalize include guards
Change-Id: Ia8789a8f864e0edc0bf94f00f6430846f86911c3
2013-12-16 19:40:54 -08:00
James Zern
3d7cc9d2d1 vp8: remove 2 unused tables
Change-Id: Ib5ba4e0b438107741efa28251848306322fd7f89
2013-12-10 21:13:21 -08:00
Ehsan Akhgari
45bac0c496 Add include guards to setupintrarecon.h and vpx_once.h
Change-Id: Ife17fc6369ce32f36d5c7f8a2ef5a3b7724d81b9
2013-12-09 10:59:28 -08:00
Johann
47613d071c idct_blk_mmx.c: use vpx_memset instead of cast
Fix warning with -Wstrict-aliasing=1

Change-Id: Ic37013e6477cf213925830d0bd8e6f17364ff7cc
2013-10-29 13:51:56 -07:00
Johann
1fb7a735dc idct_blk.c: use vpx_memset instead of cast
Fix warning with -Wstrict-aliasing=1

Change-Id: Ibf4af991f2c82b8ccbdc20362da64be669564333
2013-10-29 13:50:15 -07:00
Matthew Heaney
6b78f11a03 Merge "Fix linker warnings for bilinear filters" 2013-10-01 14:42:38 -07:00
Matthew Heaney
dcab9896e8 Fix linker warnings for bilinear filters
The declaration of the bilinear filters specified an alignment clause
in the implementation file but not in the header.  This turned out
to be harmless, but it did cause linker warnings to be emitted when
building on Windows.

The (extern) declaration in the header was changed, to match the
declaration in the implementation.

Change-Id: I44be89b1572fe9a50fa47a42e4db9128c4897b04
2013-10-01 14:40:05 -07:00
Yaowu Xu
da0ce28fe3 fixed integer overflow warnings
Jenkins warns on left shift of negative numbers and non-aligned read
of int. This commit fixed the two issues.

Change-Id: I389a7fb6a572c643902e40a4c10fefef94500d2c
2013-09-26 09:20:15 -07:00
Yaowu Xu
fbb62c6d2b fix integer overflow in vp8
Change-Id: I62550a7a883115f3ce878710cf3bb039bea54390
2013-09-23 17:15:55 -07:00
Deb Mukherjee
e378a89bd6 Support a constant quality mode in VP9
Adds a new end-usage option for constant quality encoding in vpx. This
first version implemented for VP9, encodes all regular inter frames
using the quality specified in the --cq-level= option, while encoding
all key frames and golden/altref frames at a quality better than that.

The current performance on derfraw300 is +0.910% up from bitrate control,
but achieved without multiple recode loops per frame.

The decision for qp for each altref/golden/key frame will be improved
in subsequent patches based on better use of stats from the first pass.
Further, the qp for regular inter frames may also be varied around the
provided cq-level.

Change-Id: I6c4a2a68563679d60e0616ebcb11698578615fb3
2013-09-06 10:30:53 -07:00
James Zern
5f30a0c687 VP[89]_COMMON: remove golden/altref frame counts
these are only used in the encoder.
frames_since_golden / frames_till_alt_ref_frame -> VP[89]_COMP

Change-Id: Ie14a6f46987bced685ddb449b85dc261caba6dfe
2013-07-18 14:09:21 -07:00
James Zern
9581eb6e8a use consistent framerate naming
s/frame_rate/framerate/g

Change-Id: I6fc3e088e419c5f46e3a9390dd8a2cad2677a2fc
2013-07-16 14:12:47 -07:00
James Zern
c0562d08f6 Merge "VP[89]_COMMON: remove unused near_boffset" 2013-07-16 12:17:04 -07:00
James Zern
63e914bde4 Merge "VP9_COMMON: remove unused framerate/bitrate" 2013-07-16 12:16:37 -07:00
James Zern
04092764f7 VP9_COMMON: remove unused framerate/bitrate
+ VP8_COMMON: place them under CONFIG_POSTPROC_VISUALIZER

Change-Id: I2702d5a3e1134b9c5f7ddc14b4173955a400f2cf
2013-07-12 21:43:23 -07:00
James Zern
ce0324d8dd VP[89]_COMMON: remove unused near_boffset
Change-Id: If9b9ca703b997312df85241a0758d414cfdc5228
2013-07-12 19:41:27 -07:00
James Zern
4fc6c88e9c yv12config: remove YUV_TYPE
this was never fleshed out in the context of VP8, for which it was
added. for VP9 it has no meaning.

Change-Id: Iba2ecc026d9e947067b96690245d337e51e26eff
2013-07-12 15:25:48 -07:00
James Zern
f89335f7ca remove unused VP8 com/dec asm offsets
Change-Id: Ib3b26ee27f04b2dcbbd32b3127afb45e9f50cfcf
2013-07-09 14:33:49 -07:00
Martin Storsjo
fba3110b09 arm: Move the definition of bilinear_taps_coeff to within the section
Previously, the microsoft arm assembler errored out, saying that
bilinear_taps_coeff was an undefined symbol.

Change-Id: Ib938f0b454c41ccbd801e70a7c9acc0fa04e3c55
2013-05-22 01:50:59 +03:00
Martin Storsjo
b9ed185659 arm: Explicitly write both target registers for ldrd
The microsoft assembler can't handle the second register being
implicit.

Change-Id: Ia831953a78a25fd6b2082474f05fdb78d96cdf78
2013-05-22 01:50:58 +03:00
Scott LaVarnway
f71e5246f2 Merge "Removed shadow warnings : postproc.c decodframe.c threading.c" 2013-04-19 07:19:14 -07:00
Scott LaVarnway
3299f88800 Bug fix: Issue 532: VPX codec executes emms instruction without
checking CPU capabilities

Reported by Krzysztof Kaspruk.
https://code.google.com/p/webm/issues/detail?id=532

Change-Id: I9efa693b0c33694c871189841b8ac59c1fc554e2
2013-03-15 14:27:15 -07:00
Scott LaVarnway
720d4eaaba Bug fix: Issue 531: MMX code tries to read from SSE2 register
Reported by Krzysztof Kaspruk.
https://code.google.com/p/webm/issues/detail?id=531

Change-Id: Ib5d5878ad07707bd42c2ca833eb021004f537012
2013-03-15 09:27:09 -07:00
Scott LaVarnway
ae64e7b408 Removed shadow warnings : postproc.c decodframe.c threading.c
and denoising.c
Adding -Wshadow to CFLAGS generated a bunch of warnings.  This patch
removes these warnings.

Change-Id: I434a9f4bfac9ad4ab7d2a67a35ef21e6636280da
2013-03-14 14:45:23 -07:00
Scott LaVarnway
f77140b7b4 Merge "Removed shadow warnings : loopfilter*.c" 2013-03-14 10:55:58 -07:00
Scott LaVarnway
fc6a190af4 Removed shadow warnings : reconintra.c
Adding -Wshadow to CFLAGS generated a bunch of warnings.  This patch
removes these warnings.

Change-Id: I9d52c4a44351607d7d20d52e2a1bffe2a067891a
2013-03-14 08:28:34 -07:00
Scott LaVarnway
60bbd43995 Removed shadow warnings : loopfilter*.c
Adding -Wshadow to CFLAGS generated a bunch of warnings.  This commit
is based on work already done by jzern.

Change-Id: Iefc08a7ab601c4d1b507f039577433bfb1c6cc9d
2013-03-14 08:23:26 -07:00
James Zern
08348d9cab prefix vp8 asm_{com,dec,enc}_offsets files
make them symmetrical with the generated output and their vp9
counterparts

Change-Id: I72cc97c4d33d713dff620a6d7cc25955266216fc
2013-03-02 14:45:40 -08:00
Johann
403145032d Merge "Use intrinsics for sse2 regular quantize" 2013-03-01 17:20:26 -08:00
Johann
eca59cad0b Use intrinsics for sse2 regular quantize
Remove dependency of this function on asm_offsets. ssse3/sse4 next.

Change quant_shift calculation so it be done using SIMD. Pre-calculate
as much as possible to simplify EOB selection.

Take advantage of qcoeff being zero'd by tying the if statements
together.

Speed parity with previous implementation with gcc x86_64 linux

Change-Id: Ife97556a1eca3a74b09def1a3d04084974dff1fb
2013-02-28 18:06:15 -08:00
Jan Kratochvil
82ed3f9a41 Fix --as=nasm compatibility for new asm code.
s/movd/movq/

Change-Id: Id1a56de91551f8dc796f14f1056c565dfc1ba626
2013-02-27 09:55:38 -08:00
James Zern
cc894a184f Fix variance (signed integer) overflow
based on change made in experimental:
  9847344 Fix variance (signed integer) overflow

Change-Id: I36f4ba5700f6f4615057daf7e70868f68a86669f
2013-02-22 12:40:08 -08:00
KO Myung-Hun
0ef72720d0 Use dq instead of ddq with NASM
Change-Id: Iffb7cd44b449dc10fa5c24405be909d051b7abb5
2013-02-17 17:30:34 +09:00
Frank Galligan
f67d740b34 Add support for x64 and win64 yasm flags.
Some projects must define only win64 for Windows 64bit builds using
yasm.

Change-Id: I1d09590d66a7bfc8b4412e1cc8685978ac60b748
2013-01-31 16:25:37 -08:00
Scott LaVarnway
75f647fe8a WIP: Multiple decoder instances support
Started adding support for multiple internal decoder instances.  Also added
code to limit the vp8 config options available when using frame-based
multithreading.

Change-Id: I0f1ee7abcfcff59204f50162e28254b8dd6972eb
2013-01-30 10:27:26 -08:00
Jim Bankoski
e893af1283 Merge "Bug fix: error-concealment enabled changed postproc output" 2013-01-25 19:23:55 -08:00
Scott LaVarnway
0c2919c3d5 Bug fix: error-concealment enabled changed postproc output
When error concealment is enabled, it swaps the mi and prev_mi ptrs after
each frame is decoded.  The postproc uses the mi ptr for the mode info context.
Now the postproc will use the correct mode info context.

Change-Id: I537ae5450f319c624999b44525bb52bb30047b7b
2013-01-25 17:06:32 -08:00
Marco Paniconi
c582617b13 Merge "Bug fix: Handle input data ptr = NULL and size = 0 correctly" 2013-01-25 12:05:13 -08:00
Scott LaVarnway
d6a4a5d98f Bug fix: Handle input data ptr = NULL and size = 0 correctly
Issue 517:	Issues decoding VPX_CODEC_USE_INPUT_FRAGMENTS
http://code.google.com/p/webm/issues/detail?id=517

Change-Id: I030c4cf15b1e1b993433571b6ee77c959a368ff2
2013-01-22 10:52:29 -08:00
John Koleszar
879cb7d962 Merge vp9-preview changes into experimental branch
Incorportate vp9-preview changes by merging master branch into experimental.

Conflicts:
	test/test.mk
	vp9/common/vp9_filter.c
	vp9/common/vp9_idctllm.c
	vp9/common/vp9_invtrans.h
	vp9/common/vp9_mbpitch.c
	vp9/common/vp9_rtcd_defs.sh
	vp9/common/vp9_systemdependent.h
	vp9/common/vp9_type_aliases.h
	vp9/common/x86/vp9_asm_stubs.c
	vp9/common/x86/vp9_subpixel_mmx.asm
	vp9/decoder/vp9_decodframe.c
	vp9/decoder/vp9_dequantize.c
	vp9/decoder/vp9_dequantize.h
	vp9/decoder/vp9_onyxd_int.h
	vp9/encoder/vp9_bitstream.c
	vp9/encoder/vp9_encodeframe.c
	vp9/encoder/vp9_rdopt.c

Change-Id: I17f51c3666d1b59cf1a699f87607cbc5d30a87c5
2013-01-08 10:19:59 -08:00
Marco Paniconi
bdca030caf Use seg/ref/mode offsets in loop_filter_partial.
Use the proper seg/mode/ref filter offsets when selecting the
frame loop filter level for fast mode (pick_filter_level_fast).

Change-Id: I2473e2131c800ad19755cb6211ad735fecfe2ac0
2013-01-03 16:01:48 -08:00
John Koleszar
16810c10c1 Merge branch 'vp9-preview' of review:webm/libvpx
Merge the vp9-preview branch into master.

Change-Id: If700b9054676f24bed9deb59050af546c1ca5296
2012-12-27 09:37:19 -08:00
Johann
1009f76566 Use 'vpx_scale' consistently
Change-Id: I178352813d2b8702d081caf405de9dbad9af2cc3
2012-12-05 16:05:44 -08:00
Johann
4a9b95470c Update ARM for vpx_scale changes
Refactor asm_offsets for vpx_scale.

Change-Id: I2db0eeb28c8e757bd033c6614a1e5319a1a204a5
2012-12-05 08:59:17 -08:00
Johann
0d793ccfb6 Update ARM for vpx_scale changes
Refactor asm_offsets for vpx_scale.

Change-Id: I2db0eeb28c8e757bd033c6614a1e5319a1a204a5
2012-12-03 12:50:09 -08:00
James Zern
6b1d95d6d8 Merge "vp8_intra_pred_y_tm_sse2: save/restore xmm registers" 2012-11-26 12:14:06 -08:00
Jim Bankoski
510557e2eb removed the idct rtcd idct calls
More cleanup to do after this,  but this is a good chunk of removing rtcd.

Change-Id: I551db75e341a0a85c3ad650df1e9a60dc305681a
2012-11-24 19:33:58 -08:00
John Koleszar
9cc6f078dc Merge "vp8_loop_filter_bh_y_sse2: save/restore xmm registers" 2012-11-20 20:23:41 -08:00
James Zern
17718fbbcd vp8_filter_block1d4_h6_ssse3: add missing xmm restore
Change-Id: Ia8f6b6c2a9ed60bee7949dd06fcc18b392e91d76
2012-11-20 17:52:03 -08:00
James Zern
0d80584327 vp8_loop_filter_bh_y_sse2: save/restore xmm registers
xmm[6-11] should be saved and restored for Windows x64; prevents an
encoder mismatch and some datarate issues.

Change-Id: I03c38eb18ec20c6c441cae19416393058baad1ee
2012-11-20 17:49:24 -08:00
James Zern
b52288aaff vp8_intra_pred_y_tm_sse2: save/restore xmm registers
xmm6/xmm7 should be saved and restored for Windows x64; prevents an
encoder mismatch and some datarate issues.

Change-Id: Ifa1a82ab25fbdc5112d66f5332e14b16e69ac164
2012-11-19 18:45:17 -08:00
John Koleszar
a9c7597adc support building vp8 and vp9 into a single lib
Change-Id: Ib8f8a66c9fd31e508cdc9caa662192f38433aa3d
2012-11-15 10:46:17 -08:00
Scott LaVarnway
8a6a7ae292 vp8dx_receive_compressed_data() cleanup
Change-Id: I6edf0626d00ae177c7c04eec64e1ec0dd861dfbe
2012-10-31 13:35:13 -07:00
Johann
96e5939faf Use vp8_clear_system_state helper function
Change-Id: I4dd192c3297e31b8eadd108ca8d0934e58f502f7
2012-10-25 17:04:03 -07:00
Johann
6106b72eb6 variance.h uses defines in vpx_config.h
Change-Id: Ibd3e4425a3bf8aae8aa33b70da2b84e1cda8c07f
2012-10-25 16:09:17 -07:00
John Koleszar
fd3078fd8f postproc_sse2: avoid reading off the end of the limits array
Rather than unconditionally reading in the next MB's limits, test
the loop exit condition first.

Change-Id: I105d1e92698fb5561aa87160816787604aed03a2
2012-10-23 10:59:05 -07:00
John Koleszar
861a6bbbfd postproc: allocate enough memory for limits buffer
The vp8_post_proc_down_and_across_mb_row_sse2() needs space for an
even number of macroblocks, as they are read two at a time for the
chroma planes. Round up the width during the allocation of
pp_limits_buffer to support this.

Change-Id: Ibfc10c7be290d961ab23ac3dde12a7bb96c12af0
2012-10-22 15:07:52 -07:00
Yunqing Wang
52bddd44c0 Clean up error return code in alloccommon.c
Clean up the duplicate code as Pascal suggested.

Change-Id: I685fcbb488502e969f6cb73a46db3ea79b90910d
2012-10-11 08:46:23 -07:00
Yunqing Wang
f6886c4b93 post-proc: fix 0 or negative threshold handling
If the threshold(limits) <= 0, skipped filtering and copied the
frame directly. Also, fixed memory allocation checking.

Change-Id: If3d79d5b2bcb71b9777e6eb5cba1384585131e22
2012-10-10 18:36:26 -07:00
Yunqing Wang
8b698e8cb1 Merge "post-proc: deblock filter optimization" 2012-10-09 09:26:36 -07:00
Yunqing Wang
4c53bacce4 post-proc: deblock filter optimization
1. Algorithm modification:
Instead of having same filter threshold for a whole frame, now we
allow the thresholds to be adjusted for each macroblock. In current
implementation, to avoid excessive blur on background as reported
in issue480(http://code.google.com/p/webm/issues/detail?id=480), we
reduce the thresholds for skipped macroblocks.

2. SSE2 optimization:
As started in issue479(http://code.google.com/p/webm/issues/detail?id=479),
the filter calculation was adjusted for better performance. The c
code was also modified accordingly. This made the deblock filter
2x faster, and the decoder was 1.2x faster overall.

Next, the demacroblock filter will be modified similarly.

Change-Id: I05e54c3f580ccd427487d085096b3174f2ab7e86
2012-10-08 12:06:44 -07:00
John Koleszar
9bbab8e457 rtcd/win32: use InitializeCriticalSection explicitly
Protect the call to {Initialize,Delete}CriticalSection() with an
Interlocked{Inc,Dec}rement() pair, rather than the previous static
initialization. This should play better with AppVerifier, and fix issue

  http://code.google.com/p/webm/issues/detail?id=467

Change-Id: I06eadbfac1b3b4414adb8eac862ef9bd14bbe4ad
2012-10-03 10:56:37 -07:00
John Koleszar
0211cd899a rtcd/win32: prefer win32 primatives to pthreads
Fixes some build issues for people building for win32 who have a
pthreads emulation layer installed.

Change-Id: I0e0003fa01f65020f6ced35d961dcb1130db37a8
2012-09-24 11:47:35 -07:00
Scott LaVarnway
154f1c2234 Merge "Changed setup intra recon to be row based" 2012-09-17 16:07:08 -07:00
Scott LaVarnway
260f5071ed Removed pre_mvc
Not used.

Change-Id: Ifbd97c9ad537d5184f7e305fa8acf6f027978b6b
2012-09-13 11:55:57 -07:00
Scott LaVarnway
648cfcb437 Changed setup intra recon to be row based
Initialize the top line at the beginning of each frame and
the left column at the beginning of each row.

Change-Id: I5412f7ea49ffc490215cf65a62715a6c5e3a5a29
2012-09-13 11:51:27 -07:00
Deb Mukherjee
c6fd0a5dd6 Adjusting thresholds in mfqe post-processing
Adjusts some of the qualification thresholds in mfqe to eliminate
artifacts due to wrong decisions. Besides, a new qualification
criteria is used to disable mfqe if the quality of the previous
frame is itself not too good.

Change-Id: I4097c20b7fd4fcc60cc3003c1e33e8faae2ff066
2012-09-04 12:30:09 -07:00
Scott LaVarnway
2a96d6b0d5 Merge "Removed last_kf_gf_q" 2012-08-21 15:19:58 -07:00
Jim Bankoski
6cb50ce527 Merge "Added row based loopfilter" 2012-08-21 06:02:31 -07:00
Johann
aa165c8c5d Update armv6 vp8_intra4x4_predict
Change-Id: I52a3b0a4a42e5af91b987e19523df07c8f467847
2012-08-08 10:57:33 -07:00
Johann
4b0b43632b Pass B_PREDICTION_MODE to intra4x4_predict
Use the correct type when calling and inside the function.

Change-Id: Idbaf1bf58b9574f0cba73d78780e9aedd8889dfd
2012-08-02 15:26:24 -07:00
Johann
0e17ee56e8 Match declaration to definition
Change-Id: Ic6a0c42b195d6aee0e981331c994b6007dfdc6be
2012-08-02 14:24:56 -07:00
Scott LaVarnway
6ce58e84d3 Removed last_kf_gf_q
Not used.

Change-Id: I7595cb21db73bd56ee4d9280ecb7ab9b1240f4e2
2012-08-02 12:02:36 -07:00
Scott LaVarnway
1746b2adc6 Added row based loopfilter
Interleaved loopfiltering with decode.  For 1080p clips, up to 1%
performance gain.  For 4k clips, up to 10% seen.  This patch is required
for better "frame-based" multithreading.

Change-Id: Ic834cf32297cc04f27e8205652fb9f70cbe290db
2012-08-02 11:58:09 -07:00
Johann
a497cb59cd Rename vp8_intra4x4_predict_d
predict_d has become canonical. Remove previous helper function.

Disable ARM assembly pending update.

Change-Id: Idd84ac8a28f9b0221ea97904a77de1e705d06a7d
2012-08-01 11:17:57 -07:00
Johann
a82c58c40f Change vp8_intra4x4_predict call sites
Use the _d variant from the decoder. It moves the pointer calculations
to the caller.

Change-Id: Iae2a793433ef082980a3ffa0a1cabf0264a6a24d
2012-08-01 10:48:46 -07:00
Johann
3c208a5a5e use RTCD pointer for intra4x4_predict
Change-Id: I4161389ff02aa37636540ac0fe0fe9763d52ebdc
2012-08-01 10:48:29 -07:00
Johann
1161055129 Be consistent with SAD values
SAD returns unsigned values. Make all the declarations the same.

Remove bestsad initialization and check. It is always set to the
result of a SAD call so it will never remain UINT_MAX

Use ja instead of jg to test unsigned comparison instead of signed.

Update test.

Change-Id: I46336ab45f4e60fc37caf20bd36bc5782079c7a5
2012-07-27 16:15:31 -07:00
Johann
aa4f9dd153 Merge "SAD cosmetic cleanup" 2012-07-27 16:05:12 -07:00
Johann
dd0100ddb1 SAD cosmetic cleanup
Change-Id: Iae915f2988081697cca6b65943afaca1d8de8df3
2012-07-26 12:48:31 -07:00
Yunqing Wang
e593014ebd Merge "multi-res: add drop_frame support" 2012-07-26 08:59:12 -07:00
Yunqing Wang
4066c8b205 multi-res: add drop_frame support
Added drop_frame support in multi-resolution encoder.

If one frame is dropped at a lower-resolution level, the next
upper-resolution level encoder needs to encode that frame
independently without any lower-resolution level motion
information.

Another issue is that if one frame is dropped at some but not all
resolution levels, a frame after that one may use different set
of reference frames at different resolution levels. This reference
frame asynchronization could degrade motion search precision in
upper-resolution level encoding, which uses lower-resolution level
motion result. This change compares the lower-resolution and upper-
resolution level's reference frames. If they are not the same, the
upper-resolution level encoder can not use lower-resolution level
motion result.

Change-Id: I61afa4f313630e75b7cbdd5742e230e8724a988a
2012-07-26 08:36:53 -07:00
Ronald S. Bultje
8967fcaf84 Add comment for use of shift/mul instead of div.
Change-Id: Ia6a0090da2097ca9337f8179a6d7b6a09e12f2e6
2012-07-24 15:46:49 -07:00
Ronald S. Bultje
980ca6324f Replace x*155/100 by x*101581>>16.
Idea stolen from webp - because it's cool.

Change-Id: Ic6e55e026e6533fbd2524ef090e3cbccf8af50dd
2012-07-24 15:22:39 -07:00
John Koleszar
827e22c732 unset executable bit on source code
Change-Id: I0ddc849495c34f44c0b315cd7d58ad3d563f45e5
2012-07-13 09:44:25 -07:00
Dragan Mrdjan
07ff7fa811 VP8 optimizations for MIPS dspr2
Signed-off-by: Raghu Gandham <raghu@mips.com>

Change-Id: I3a8bca425cd3dab746a6328c8fc8843c8e87aea6
2012-07-10 10:01:54 -07:00
Yunqing Wang
147e864629 Add 0 offsets handling in SSSE3 sixtap_predict functions
This patch fixed issue 458 by calling copy function when both
offsets are 0, which guarantees the SSSE3 functions output
same result as the c function for all possible offsets.

Change-Id: I209aec7a4c6b3362db2646a8887c1038493b6496
2012-07-02 16:50:48 -07:00
James Zern
31fd98d724 fix permissions on regular files
Change-Id: I731354b3cf3405eba2dfffcb47d174b5fa9df21a
2012-06-27 23:45:56 -07:00
Adrian Grange
5eaa9bcfe3 Corrected usage of image strides
The function vp8_post_proc_down_and_across_c takes the
stride of both the src and dst images as parameters, but
assumes that they are the same.

I modified the code to use the correct strides, as the
assembler versions of these functions do.

Change-Id: I222715b774cd071b21c15a4b0d2f4aef64a520de
2012-06-19 14:02:22 -07:00
John Koleszar
8df79e9d42 Remove threading dependencies with --disable-multithread
Avoid a pthreads dependency via pthread_once() when compiled with
--disable-multithread.

In addition, this synchronization is disabled for Win32 as well, even
though we can be sure that the required primatives exist, so that the
requirements on the application when built with --disable-multithread
are consistent across platforms.

Users using libvpx built with --disable-multithread in a multithreaded
context should provide their own synchronization. Updated the
documentation to vpx_codec_enc_init_ver() and vpx_codec_dec_init_ver()
to note this requirement. Moved the RTCD initialization call to match
this description, as previously it didn't happen until the first
frame.

Change-Id: Id576f6bce2758362188278d3085051c218a56d4a
2012-06-15 16:26:39 -07:00
John Koleszar
0164a1cc5b Fix pedantic compiler warnings
Allows building the library with the gcc -pedantic option, for improved
portabilty. In particular, this commit removes usage of C99/C++ style
single-line comments and dynamic struct initializers. This is a
continuation of the work done in commit 97b766a46, which removed most
of these warnings for decode only builds.

Change-Id: Id453d9c1d9f44cc0381b10c3869fabb0184d5966
2012-06-11 15:14:58 -07:00
Johann
965d8686bb Remove extra enum
VP8_REFFRAME is the same as vpx_ref_frame_type

Change-Id: I63c2ddfb39f6ec87d1e5eb6a8852846464552b1b
2012-06-04 16:56:55 -07:00
Johann
2b10528adc Remove redundant assignment
clang complains about self-assignment

Change-Id: Iead70eed0a960e84a4b167f67f05b05e2965b3b6
2012-06-04 15:51:38 -07:00
Stefan Holmer
d850034443 Added another denoising threshold for finding DC shifts.
Compares the sum of differences between the input block and the averaged
block. If they differ too much the block will not be filtered. Negligible
perfomance hit.

Change-Id: Ib1c31a265efd4d100b3abc4a1ea6675038c8ddde
2012-05-30 16:50:21 +02:00
Jim Bankoski
ffe79d61d4 Merge "fix denoiser for temporal patterns and rd" 2012-05-25 09:56:08 -07:00
John Koleszar
d708e7fbbe Merge "Fix another multithreaded encoder loopfilter race condition" 2012-05-24 09:40:48 -07:00
Jim Bankoski
57faddb7c5 fix denoiser for temporal patterns and rd
This extends the denoiser to work for temporally scalable
coding.

I believe this also fixes a very rare but really bad bug in the original
implementation.


Change-Id: I8b3593a8c54b86eb76f785af1970935f7d56262a
2012-05-24 07:44:03 -07:00
John Koleszar
5e39a8c16f Merge "Make libvpx Chromium build friendly" 2012-05-23 20:56:49 -07:00
Alpha Lam
0f7e4665ae Make libvpx Chromium build friendly
Add PRIVATE macro for adding private_extern directive for yasm
to hide global symbols. This is only enabled if -DCHROMIUM is used
with YASM.

Also fixed a small problem with	rtcd_defs.sh to guard TEMPORAL_DENOISING.

Change-Id: I9027fce3ebddcf20078293e4b86b396f21da7857
2012-05-23 18:15:05 -07:00
John Koleszar
a419f0f232 Merge changes I38e93fe2,I6d6a0fb6,I51155833,If4c3e5d4,Ia2f40ef2
* changes:
  Add initial keyframe tests
  Move all tests to test/ directory
  Enable unit tests by default
  Build unit tests monolithically
  configure: initial support for CXX, CXXFLAGS variables
2012-05-23 13:47:48 -07:00
Attila Nagy
ea392d4714 Fix another multithreaded encoder loopfilter race condition
After a key frame encoding, the frame type could change while
filtering is still going on. Pass the frame type as parameter to the
loopfilter function and don't read it from common storage.

vp8cx_set_alt_lf_level has to be done before packing the stream.
Currently alt_lf_level is not used so there hasn't been any visible
problem here.

Change-Id: Ia114162158cd833c2b16e3b89303cc9c91f19165
2012-05-23 15:19:48 +03:00
John Koleszar
2d225689d3 Move all tests to test/ directory
Consolodate the unit tests under vp8/ to the test/ directory

Change-Id: I6d6a0fb60f5e3874a4d6710e9e121dd3e81a93db
2012-05-22 15:00:10 -07:00
John Koleszar
e82d261d10 Build unit tests monolithically
Rework unit tests  to have a single executable rather than many, which
should avoid pollution of the visual studio project namespace, improve
build times, and make it easier to use the gtest test sharding system
when we get these going on the continuous build cluster.

Change-Id: If4c3e5d4b3515522869de6c89455c2a64697cca6
2012-05-22 14:37:30 -07:00
Yunqing Wang
eb5b965b44 Merge "multi-res: force Key frame sychronization" 2012-05-22 08:00:12 -07:00
Christian Duvivier
38ddb426d0 Inline Intrinsic optimized Denoiser
Faster version of denoiser, cut cost by 1.7x for C path, by 3.3x for
SSE2 path.

Change-Id: I154786308550763bc0e3497e5fa5bfd1ce651beb
2012-05-21 07:54:20 -07:00
Yunqing Wang
65dd157c3c multi-res: force Key frame sychronization
In multi-resolution encoding, frame_type decision for each frame
is made by the lowest-resolution encoder. For all other higher-
resolution encoders, kf_mode is always set to VPX_KF_DISABLED,
and they are forced to use the same frame_type picked by the
lowest-resolution encoder.

Change-Id: Ic4d52ec65bbc012ca9c2d236210e28a295591eaf
2012-05-16 15:06:42 -04:00
Scott Graham
92963df086 fix warnings for building on win32
Change-Id: If6e11ba3d681e831d7d98662c0abdd2ac16b3811
2012-05-11 12:36:50 -07:00
John Koleszar
44d35f7b25 Merge branch 'origin/eider' into master
Conflicts:
	vp8/common/entropymode.c
	vp8/common/entropymode.h
	vp8/encoder/encodeframe.c
	vp8/vp8_cx_iface.c

Change-Id: I708b0f30449b9502b382e47b745d56f5ed2ce265
2012-05-11 10:51:05 -07:00
John Koleszar
14d827f44e fix vp8_ namespace issues
Make functions only referenced from one translation unit static. Other
symbols with extern linkage get a vp8/vpx prefix.

Change-Id: I928c7e0d0d36e89ac78cb54ff8bb28748727834f
2012-05-04 12:24:04 -07:00
Attila Nagy
f039a85fd8 Make global data const
Removes all runtime initialization of global data. This commit is a
squashed version of the following series cherry-picked from master.
This is necessary because of a change that was merged to the tester
that depends on the scaler being moved to the RTCD framework, which
is a worthwhile thing to include in Eider anyway.

  - a91b42f02 Makes all global data in entropy.c const
  - b35a0db0e Makes all global data in tokenize.c const
  - 441cac8ea Makes all mode token tables const
  - 5948a0210 Ports vpx_xcaler to new RTCD method
  - 317d4244c Makes all mode token tables const part 2

Change-Id: Ifeaea24df2b731e7c509fa6c6ef6891a374afc26
2012-05-04 10:42:21 -07:00
John Koleszar
9f9cc8fe71 Merge "Add VPX_TS_ prefix to MAX_LAYERS, MAX_PERIODICITY" into eider 2012-05-03 09:40:50 -07:00
John Koleszar
d8216b19b6 Merge "Fix compiler warnings" into eider 2012-05-02 16:22:34 -07:00
John Koleszar
d46ddd0839 Add VPX_TS_ prefix to MAX_LAYERS, MAX_PERIODICITY
Preserved the prior names for compatibility, will remove in the future.

Change-Id: I8773f959ebce72f60168a2972f7a8ffe6642b9b2
2012-05-02 16:21:52 -07:00
Timothy B. Terriberry
e50c842755 Fix TEXTRELs in the ARM asm.
Besides imposing a performance penalty at startup in most
 configurations, these relocations break the dynamic linker for
 native Fennec, since it does not support them at all.

Change-Id: Id5dc768609354ebb4379966eb61a7313e6fd18de
2012-05-02 10:36:01 -07:00
Timothy B. Terriberry
22ae1403e9 Fix trailing commas in enums.
These are warnings in most builds, but show up as compile errors on
 some platforms when these headers are included from C++ code.

Change-Id: I6c523b4dbbc699075fe73830442b51922e5a61d5
2012-05-02 10:35:28 -07:00
Timothy B. Terriberry
28f5451572 Fix trailing commas in enums.
These are warnings in most builds, but show up as compile errors on
 some platforms when these headers are included from C++ code.

Change-Id: I6c523b4dbbc699075fe73830442b51922e5a61d5
2012-05-02 10:08:10 -07:00
Attila Nagy
14c9fce8e4 Fix compiler warnings
Fix code for following warnings:
-Wimplicit-function-declaration
-Wuninitialized
-Wunused-but-set-variable
-Wunused-variable

Change-Id: I2be434f22fdecb903198e8b0711255b4c1a2947a
2012-05-02 10:57:57 +03:00
Attila Nagy
24e7b1b90d Moves error concealment allocations from common parts to decoder
The backup MODE_INFO buffer used in the error concealment was
allocated in the codec common parts allocation even though this is a
decoder only resource. Moved the allocation to the decoder side.
No need to update_mode_info_border as mode_info buffers are zero
allocated.

This fixes also a potential memory leak as the EC overlaps buffer was not
properly released before reallocation after a frame size change.

Change-Id: I12803d3e012308d95669069980b1c95973fb775f
2012-04-26 11:49:15 +03:00
Scott LaVarnway
11876faa11 Removed mcomp_filter_type
and replaced with use_bilinear_mc_filter.

Change-Id: Ie9e9f0bccca4ab7d3e23ae045aefed33536103ff
2012-04-23 13:23:21 -04:00
Attila Nagy
f4126995b7 Removes duplication of key frame mode probabilities
Key frame macrobock and block mode probabilities are constant.
Remove the allocation of tables for each codec instance and use
instead the default const prob tables.

Change-Id: I8361798ac491f9b3889e86925a494c58647c753f
2012-04-23 12:58:39 +03:00
Scott LaVarnway
abf1784c31 Merge "Makes all mode token tables const part 2" 2012-04-20 08:22:57 -07:00
Scott LaVarnway
317d4244cb Makes all mode token tables const part 2
(see Change I9b2ccc88: Makes all mode token tables const)
Further remove runtime table initialization and use
precalculated const data.  Data footprint reduced
by 4112 bytes.

Change-Id: Ia3ae9fc19f77316b045cabff01f6e5f0876a86ab
2012-04-19 17:35:20 -04:00
John Koleszar
c311b3b3a9 rtcd: serialize function pointer initialization
Ensure that RTCD function pointers are set at most once, to silence
some data race warnings. Implementation provided for POSIX threads and
Win32, with the prior unsynchronized behavior left in place for other
platforms.

Change-Id: I65c5856df43ef67043b3d5f26ddafddd8fcb2f7e
2012-04-19 14:15:23 -07:00
Attila Nagy
5948a02106 Ports vpx_xcaler to new RTCD method
We can get rid of all remaining global initializers now:
 vp8_scale_machine_specific_config()
 vp8_initialize()
 vp8dx_initialize()

Change-Id: I2825cea5d1c01ad9f6c45df49a0f86d803bfeb69
2012-04-19 17:40:56 +03:00
Attila Nagy
441cac8ea6 Makes all mode token tables const
Mode token tabels precalculated in entropymode.c.
Removes vp8_initialize_common()as all common global data
is precalculated const now.

Change-Id: I9b2ccc883e4f618069e1bc180dad3a823394eb73
2012-04-19 15:46:02 +03:00
Attila Nagy
a91b42f022 Makes all global data in entropy.c const
Removes all runtime initialization of global data in entropy.c.
Precalculated values are used for initializing all entropy related
tabels.

First patch in a series to make sure code is reentrant.

Change-Id: I9aac91a2a26f96d73c6470d772a343df63bfe633
2012-04-17 12:12:58 +03:00
Scott LaVarnway
3c5ed6f52e Merge "MB_MODE_INFO size reduction" 2012-04-12 12:03:45 -07:00
Scott LaVarnway
6dc21bce63 Merge "loopfilter improvements" 2012-04-12 12:02:24 -07:00
Scott LaVarnway
e0a80519c7 loopfilter improvements
Local variable offsets are now consistent for the functions,
removed unused parameters, reworked the assembly to eliminate
stalls/instructions.

Change-Id: Iaa37668f8a9bb8754df435f6a51c3a08d547f879
2012-04-12 14:22:47 -04:00
Deb Mukherjee
6b33ca395f Fixes to disable MFQE when there is motion.
This patch includes:
1. fixes to disable block based termporal mixing when motion
is detected (because this version of mfqe only handles zero motion).
2. The criterion used for determining whether to mix or
not are changed to use squared differences rather than
absolute differences.
3. Additional checks on color mismatch and excessive block
flatness added. If the block as decoded has very low activity
it is unlikely to yield benefits for mixing.

Change-Id: I07331e5ab5ba64844c56e84b1a4b7de823eac6cb
2012-04-10 14:27:28 -07:00
John Koleszar
8106df8f5a MFQE: apply threshold to subblocks and chroma.
In cases where you have a flat background occluded by a moving object
of similar luminosity in the foreground, it was likely that the
foreground blocks would persist for a few frames after the background
is uncovered. This is particularly noticable when the object has a
different color than the background, so add the chroma planes in as an
additional check.

In addition, for block sizes of 8 and 16, the luma threshold is
applied on four subblocks independently, which helps when only part of
the background in the block has been uncovered.

This fixes issue #392, which includes a test clip to reproduce the
issue.

BUG=392

Change-Id: I2bd7b2b0e25e912dcac342e5ad6e8914f5afd302
2012-04-03 12:05:01 -07:00
Johann
21ac3c8f26 Move variance and SAD RTCD definitions
When the functions were moved from encoder/ to common/ the RTCD file was
not updated.

Change-Id: I1c98715ed51adf1a95aa2492949d8552aec88d1f
2012-04-02 11:06:35 -07:00
Scott LaVarnway
31322c5faa MB_MODE_INFO size reduction
Reduced the size of the struct by 8 bytes, which would be
a memory savings of 64800 bytes for 1080 resolutions.  Had
an extra byte, so created an is_4x4 for B_PRED or SPLITMV
modes.  This simplified the mode checks in
vp8_reset_mb_tokens_context and vp8_decode_mb_tokens.

Change-Id: Ibec27784139abdc34d4d01f73c09f43e9e10e0f5
2012-03-29 16:30:14 -04:00