Граф коммитов

334 Коммитов

Автор SHA1 Сообщение Дата
Fritz Koenig e50f5d4037 GCC inline restrictions were not adequate.
=r was not restrictive enough and the compiler was not returning
ebx correctly.

Change-Id: I7606e384067bd5fb69189802f1ff64ccc5aa02d6
2010-10-12 10:12:23 -07:00
John Koleszar 136857475e Centralize mb skip state calculation
This patch moves the scattered updates to the mb skip state
(mode_info_context->mbmi.mb_skip_coeff) to vp8_tokenize_mb. Recent
changes to the quantizer exposed a bug where if a macroblock
could be coded as a skip but isn't, the encoder would run the
loopfilter but the decoder wouldn't, causing a reference buffer
mismatch.

The loopfilter is controlled by a flag called dc_diff. The decoder
looks at the number of decoded coefficients when setting this flag.
The encoder sets this flag based on the skip state, since any
skippable macroblock should be transmitted as a skip. The coefficient
optimization pass (vp8_optimize_b()) could change the coefficients
such that a block that was not a skip becomes one. The encoder was
not updating the skip state in this situation for intra coded blocks.

The underlying issue predates it, but this bug was recently triggered
by enabling trellis quantization on the Y2 block in commit dcd29e3,
and by changing the quantizer range control in commit 305be4e.

Change-Id: I5cce5da0dbc2d22f7d79ee48149f01e868a64802
2010-10-12 09:03:19 -04:00
John Koleszar acff1627b8 Merge "Add const qualifiers to variance/SAD functions." 2010-10-12 05:44:20 -07:00
Timothy B. Terriberry f4a8594492 Add const qualifiers to variance/SAD functions.
These functions should never change their input, and there's no
 reason not to declare that.
This allows them to be passed static const data.

Change-Id: Ia49fe4b01e80e9afcb24b4844817694d4da5995c
2010-10-12 08:40:54 -04:00
John Koleszar 037345eb69 Merge "Move vp8_strict_quantize_b inside EXACT_QUANT #define." 2010-10-12 05:34:30 -07:00
John Koleszar fc018e0d92 Merge "Remove INTRARDOPT #define and intra_rd_opt option." 2010-10-12 05:33:22 -07:00
Timothy B. Terriberry 82c4339885 Move vp8_strict_quantize_b inside EXACT_QUANT #define.
There is currently no inexact version of this function, so do not
 even compile it without EXACT_QUANT.
This will prevent someone from inadvertently trying to use it without
 the proper EXACT_QUANT setup.

Change-Id: Ia13491e0128afb281c05c9222ee5987101e4010d
2010-10-11 13:51:35 -07:00
Timothy B. Terriberry dd08db9315 Remove INTRARDOPT #define and intra_rd_opt option.
This is just eliminating some cruft.
Although a number of variables are declared only when INTRARDOPT
 is defined, they are used elsewhere without that protection, and
 no longer just for intra RDO.
The intra_rd_opt flag was hard-coded to 1 and never checked.

Change-Id: I83a81554ecee8053e7b4ccd8aa04e18fa60f8e4f
2010-10-11 11:53:57 -07:00
Scott LaVarnway 6b1b28a83c Merge "Added vp8_fast_quantize_b_sse2" 2010-10-11 09:34:48 -07:00
John Koleszar 4d2b178a22 Merge "Remove ivfenc usage message leading underscores" 2010-10-11 07:43:35 -07:00
John Koleszar 78f2d3edb7 Remove ivfenc usage message leading underscores
An earlier automatic transform changed eg '\nOptions' to '\n_options'
which is incorrect in these printfs. Fix these.

Change-Id: I7e0f37931ef82b79fadddd7058ce0df5572e2ca1
2010-10-11 09:55:52 -04:00
Johann a31a58d19a configure is not in src
one comment in the README said the configure script was in src.
it's not. pointed out by Aaron Sherman

Change-Id: Ife0b53e096856d46669a99eefd71ac23d0351f65
2010-10-07 14:13:36 -04:00
Yunqing Wang 7e6f7b579a Remove unused file in encoder
Remove vp8/encoder/x86/csystemdependent.c

Change-Id: I7c590dcd07b68704d463a1452f62f29ffb1402f4
2010-10-07 12:08:08 -04:00
Scott LaVarnway d860f685b8 Added vp8_fast_quantize_b_sse2
Moved vp8_fast_quantize_b_sse from quantize_mmx.asm into
quantize_sse2.asm and renamed.  Updated the assembly code to
match the C version.

Change-Id: I1766d9e1ca60e173f65badc0ca0c160c2b51b200
2010-10-07 11:43:19 -04:00
Yaowu Xu d338d14c6b optimize fast_quantizer c version
As the zbin and rounding constants are normalized, rounding effectively
does the zbinning, therefore the zbin operation can be removed. In
addition, the memset on the two arrays are no longer necessary.

Change-Id: If39c353c42d7e052296cb65322e5218810b5cc4c
2010-10-06 13:28:36 -07:00
Jan Kratochvil 7be093ea4d nasm: add configure support
yasm has to be preferred as currently nasm produces marginally less
efficient code (longer opcodes). Filed for nasm as:
https://sourceforge.net/tracker/?func=detail&atid=106208&aid=3037462&group_id=6208

OTOH package should be built always the same, no matter which additional
packages are / are not present on the system. As the package should be
built with nasm (as yasm may not be available) we should not use yasm
even if it is possibly available.

nasm >= approx. 2.09 is required for the nasm compilation as the former
versions had a section alignment bug.

Provide nasm compatibility. No binary change by this patch with yasm on
{x86_64,i686}-fedora13-linux-gnu. Few longer opcodes with nasm on
{x86_64,i686}-fedora13-linux-gnu have been checked as safe.

Change-Id: Icb0fe39c64bbcc3bcd7972e392fd03f3273340df
2010-10-05 13:45:26 -04:00
Paul Wilkins 2931b05ac5 Merge "Tune effect of motion on KF/GF boost in two pass;" 2010-10-05 06:58:24 -07:00
Jan Kratochvil 1fc294116a nasm: movhps compatibility QWORD->MMWORD
Filed for nasm as:
https://sourceforge.net/tracker/?func=detail&atid=106208&aid=3081103&group_id=6208

nasm just does not accept any size parameter for movhps:
1.asm:2: error: mismatch in operand sizes

Some parts of libvpx already use MMWORD for movhps and MMWORD is
defined-out so it is compatible both with yasm and nasm.

Provide nasm compatibility. No binary change by this patch with yasm on
{x86_64,i686}-fedora13-linux-gnu.

Change-Id: I4008a317ca87ec07c9ada958fcdc10a0cb589bbc
2010-10-04 20:47:19 -04:00
Jan Kratochvil fc2b06c625 nasm: avoid relative include paths
nasm does not automatically assume the source's directory also for its
include files.

Provide nasm compatibility.  No binary change by this patch with yasm on
{x86_64,i686}-fedora13-linux-gnu.  Few longer opcodes with nasm on
{x86_64,i686}-fedora13-linux-gnu have been checked as safe.

Change-Id:	I386efa0cca5d401193416c11bd7363a283541645
2010-10-04 19:50:08 -04:00
Jan Kratochvil 5cdc3a4c29 nasm: address labels 'rel label' vice 'wrt rip'
nasm does not support `label wrt rip', it requires `rel label'. It is
still fully compatible with yasm.

Provide nasm compatibility. No binary change by this patch with yasm on
{x86_64,i686}-fedora13-linux-gnu. Few longer opcodes with nasm on
{x86_64,i686}-fedora13-linux-gnu have been checked as safe.

Change-Id: I488773a4e930a56e43b0cc72d867ee5291215f50
2010-10-04 19:47:54 -04:00
Jan Kratochvil e114f699f6 nasm: match instruction length (movd/movq) to parameters
nasm requires the instruction length (movd/movq) to match to its
parameters. I find it more clear to really use 64bit instructions when
we use 64bit registers in the assembly.

Provide nasm compatibility. No binary change by this patch with yasm on
{x86_64,i686}-fedora13-linux-gnu. Few longer opcodes with nasm on
{x86_64,i686}-fedora13-linux-gnu have been checked as safe.

Change-Id: Id9b1a5cdfb1bc05697e523c317a296df43d42a91
2010-10-04 23:36:29 +02:00
Yaowu Xu 2d4ef37507 Merge "enable trellis quantization for 2nd order blocks" 2010-10-04 10:41:20 -07:00
Paul Wilkins 788c0eb54e Tune effect of motion on KF/GF boost in two pass;
This code adjust the impact of the amount and speed of motion
on GF and KF boost.

Sections with lots of slow motion will tend to have a
somewhat bigger boost and sections with fast motion may
have less.

There is a knock on effect to the selection of the active
quantizer range.

This will likely require further tuning but helps with a couple
of particularly bad edge cases.

Change-Id: Ic2449cda7305672b69acf42fc0a845b77ac98d40
2010-10-02 17:31:46 +01:00
Yaowu Xu dcd29e369f enable trellis quantization for 2nd order blocks
Experimented with different value for Y2_RD_MULT ranging f[1, 32],
without adapting the value to MB coding mode/frame type/Q value,
4 works out best among all values, providing overall 0.1% coding
gain on the test set.

Change-Id: I6b2583a8aa5db5e7e5c65c646301909c0c58f876
2010-10-02 06:20:33 -07:00
Johann f143a81191 Merge "Fix valgrind errors in the NEON loop filters." 2010-10-01 06:18:53 -07:00
Adrian Grange 999bc00301 Made temporal filter default to use centered mode
If temporal filtering is enabled but a filter type is not specified
centered filter mode is used by default.

Change-Id: I87306f267c1390074c806c506a69b4ba914d92a2
2010-10-01 10:14:01 +01:00
Timothy B. Terriberry a465076e02 Fix valgrind errors in the NEON loop filters.
Like the ARMv6 code, these functions were accessing values below
 the stack pointer, which can be corrupted by signal delivery at
 any time.
2010-09-30 20:40:45 -07:00
John Koleszar 0faa8a0861 Merge "Rename mode_ref_lf_test_function" 2010-09-30 10:26:31 -07:00
John Koleszar a047fee606 Merge "Fix loopfilter delta zero transitions" 2010-09-30 10:26:10 -07:00
Adrian Grange 8ee7284d60 Changed defaults & range checking for AltRef params
Modified the range checking of parameters used in the
AltRef temporal filter (arnr-max-frames, arnr-strength,
arnr-type) and default values for each of them.

Change-Id: Ib261028d501b9523f6e44cb4790cc52167b6e92b
2010-09-30 10:06:09 +01:00
John Koleszar 7e5e31516c Rename mode_ref_lf_test_function
This function graduated from being a test func to something that's on
by default. Rename it and remove some spurious comments that confuse
its status.

Change-Id: I689695a3ad29c35e9a72a43ec93766733ac6c20b
2010-09-29 13:53:14 -04:00
Fritz Koenig 439b2ecd74 Merge "Optimizations on the loopfilters." 2010-09-29 10:47:01 -07:00
John Koleszar b9be7a464f Fix loopfilter delta zero transitions
Loopfilter deltas are initialized to zero on keyframes in the decoder.
The values then persist from the previous frame unless an update bit
is set in the bitstream. This data is not included in the entropy
data saved by the 'refresh entropy' bit in the bitstream, so it is
effectively an additional contextual element beyond the 3 ref-frames
and the entropy data.

The encoder was treating this delta update bit as update-if-nonzero,
meaning that the value would be refreshed even if it hadn't changed,
and more significantly, if the correct value for the delta changed
to zero, the update wouldn't be sent, and the decoder would preserve
the last (presumably non-zero) value.

This patch updates the encoder to send an update only if the value
has changed from the previously transmitted value. It also forces the
value to be transmitted in error resilient mode, to account for lost
context in the event of lost frames.

Change-Id: I56671d5b42965d0166ac226765dbfce3e5301868
2010-09-29 13:04:04 -04:00
Paul Wilkins 7288cdf79d Change to coefficient optimization rules.
Allow coefficient optimization for good quality speed 0.

Change-Id: Id0cb363df6823c6798671584fbba097916a7df2c
2010-09-29 13:22:05 +01:00
Adrian Grange 4f92b96bdb Merge "Moved row-specific computation of MV bounds out of col loop" 2010-09-29 05:13:41 -07:00
Adrian Grange 0e7c45b391 Moved row-specific computation of MV bounds out of col loop
Moved the bounds computation on vertical MV component out
of the loop that processes MBs within a MB row.
2010-09-29 13:03:07 +01:00
Paul Wilkins ff3068d6da Control of active min quantizer for two pass.
Create  look up tables for controlling the active quantizer range.
Some initial tuning to improve quality circa 0.5% on test set.
Clean up of some stats output code

Change-Id: Ia698a8525f8b8129a503cadace3ee73fe888f543
2010-09-29 12:03:19 +01:00
Fritz Koenig 0964ef0e71 Optimizations on the loopfilters.
- Scheduling for Atom processors
- Combining of macros to allow for better interleaving
- Change from multiplies to adds for main filter
- Use of movhps/movlps to fill xmm registers without
  shifting and orring

Change-Id: I0b3500a5f58abf7085253ec92d64c8a96723040b
2010-09-28 12:01:34 -07:00
Adrian Grange 47fc8f2683 Enabled AltRef motion map creation
Enabled the first-pass encode to output the
map of macroblock coding modes required by
the AltRef filter.
2010-09-28 16:52:19 +01:00
Adrian Grange 0090328164 Merge "Made AltRef filter adaptive & added motion compensation" 2010-09-28 08:34:44 -07:00
Adrian Grange 1b2f8308e4 Made AltRef filter adaptive & added motion compensation
Modified AltRef temporal filter to adapt filter length based
on macroblock coding modes selected during first-pass
encode.

Also added sub-pixel motion compensation to the AltRef
filter.
2010-09-28 15:23:41 +01:00
Johann e4d43c21c7 Merge "update gitignore" 2010-09-28 07:10:09 -07:00
Johann 6fa5c24a99 update gitignore
this was excluding all .asm files when it should have just been .asm
files in the top level directory and .asm.s files lower down. also be
more restrictive on some other items, and run the whole thing through
sort to keep it organized

Change-Id: Ia48525033226b13098a491ce89465d0377b990c2
2010-09-28 10:09:01 -04:00
Timothy B. Terriberry 18dc92fd66 Add 4-tap version of 2nd-pass ARMv6 MC filter.
The existing code applied a 6-tap filter with 0's on either end.
We're already paying the branch penalty to avoid computing the two
 extra columns needed as input to this filter.
We might as well save time computing the filter as well.
This reduces the inner loop from 21 instructions to 16, the number
 of loads per iteration from 4 to 1, and the number of multiplies
 from 7 to 4.
The gain in overall decoding performance, however, is small (less
 than 1%).

This change also means we now valgrind clean on ARMv6, which is
 its real purpose.
The errors reported here were valgrind's fault (it does not detect
 that 0 times an uninitialized value is initialized), but Julian
 Seward says it would slow down valgrind considerably to make such
 checks.
Speeding up libvpx rather, even by a small amount, seems a much
 better idea if only to enable proper valgrind checking of the
 rest of the codec.

Change-Id: Ifb376ea195e086b60f61daf1097d8910c4d8ff16
2010-09-27 18:25:45 -07:00
Paul Wilkins 305be4e417 Badly placed initialization of rolling rate monitors.
This affects control of the active quantizer range.

Change-Id: I30511fc81ac9f75ff20d9f1372382423d56739da
2010-09-27 12:50:55 -04:00
John Koleszar 2b521ab551 move reconintra_mt to decoder (fixup)
Missed the .h file in the move.

Change-Id: Ib408183fbb4d019fd46394b362f89ca6ea9d10bc
2010-09-27 12:48:31 -04:00
John Koleszar 9fdcdc511d Merge "disable compilation of debugging code" 2010-09-27 07:00:03 -07:00
Johann 063be9b82a Merge "combine max values and compare once" 2010-09-27 06:39:20 -07:00
Johann b955a69bbf Merge "Fix valgrind errors in vp8_sixtap_predict8x4_armv6()." 2010-09-27 06:36:22 -07:00
John Koleszar 02e8a7bb47 Merge "darwin-icc: build for specific SDKs" 2010-09-27 06:10:07 -07:00