platform/upstream/libvpx.git
10 years agoMerge "Fix the reading of too many input pixels"
Yaowu Xu [Mon, 26 Aug 2013 21:01:50 +0000 (14:01 -0700)]
Merge "Fix the reading of too many input pixels"

10 years agoMerge "Changes to adaptive inter rd thresholds."
Paul Wilkins [Mon, 26 Aug 2013 19:48:11 +0000 (12:48 -0700)]
Merge "Changes to adaptive inter rd thresholds."

10 years agoFix the reading of too many input pixels
Yaowu Xu [Mon, 26 Aug 2013 16:21:12 +0000 (09:21 -0700)]
Fix the reading of too many input pixels

in VP9_get4x4var_mmx

Change-Id: I4b4a8f45f25ebdfad281f169cc87aba5e2d6f227

10 years agoMerge "Limit Key frame Intra modes checks."
Paul Wilkins [Mon, 26 Aug 2013 19:34:56 +0000 (12:34 -0700)]
Merge "Limit Key frame Intra modes checks."

10 years agoMerge "Temporarily disable SSSE3 quant_32x32"
Jingning Han [Mon, 26 Aug 2013 18:19:53 +0000 (11:19 -0700)]
Merge "Temporarily disable SSSE3 quant_32x32"

10 years agoMerge "Removing redundant calls to clamp_mv2."
Dmitry Kovalev [Mon, 26 Aug 2013 17:48:37 +0000 (10:48 -0700)]
Merge "Removing redundant calls to clamp_mv2."

10 years agoTemporarily disable SSSE3 quant_32x32
Jingning Han [Mon, 26 Aug 2013 17:45:59 +0000 (10:45 -0700)]
Temporarily disable SSSE3 quant_32x32

Make the current head working properly, while working on fixing an
issue in the SSSE3 implementation of 32x32 quantization.

Change-Id: Ic029da3fd7f1f5e58bc641341cbd226ec49a16bc

10 years agoMerge "cosmetics: yv12extend add some const"
James Zern [Sun, 25 Aug 2013 01:13:41 +0000 (18:13 -0700)]
Merge "cosmetics: yv12extend add some const"

10 years agocosmetics: yv12extend add some const
James Zern [Sat, 24 Aug 2013 02:52:33 +0000 (19:52 -0700)]
cosmetics: yv12extend add some const

Change-Id: I87f1ce2ceca80d3869dd72ba862329a98eb3e0c2

10 years agoMerge "cosmetics: strip 'VP9_' from defines in vp9 only code"
James Zern [Sat, 24 Aug 2013 02:59:16 +0000 (19:59 -0700)]
Merge "cosmetics: strip 'VP9_' from defines in vp9 only code"

10 years agoMerge "yv12extend: name variables consistently"
James Zern [Sat, 24 Aug 2013 02:40:03 +0000 (19:40 -0700)]
Merge "yv12extend: name variables consistently"

10 years agocosmetics: strip 'VP9_' from defines in vp9 only code
James Zern [Fri, 23 Aug 2013 01:40:34 +0000 (18:40 -0700)]
cosmetics: strip 'VP9_' from defines in vp9 only code

Change-Id: I481d9bb2fa3ec72b6a83d5f04d545ad8013f295c

10 years agoMerge "vp9: remove unnecessary wait w/threaded loopfilter"
James Zern [Sat, 24 Aug 2013 01:52:10 +0000 (18:52 -0700)]
Merge "vp9: remove unnecessary wait w/threaded loopfilter"

10 years agoyv12extend: name variables consistently
James Zern [Fri, 23 Aug 2013 02:49:24 +0000 (19:49 -0700)]
yv12extend: name variables consistently

- s|source -> src
- dest -> dst
- use verbose names in extend_plane dropping the redundant comments

+ light cosmetics:
- join a few lines / assignments
- drop some unnecessary comments & includes

Change-Id: I6d979a85a0223a0a79a22f79a6d9c7512fd04532

10 years agoMerge "Cleanup in mvref_common.{h, c}."
Dmitry Kovalev [Sat, 24 Aug 2013 00:09:49 +0000 (17:09 -0700)]
Merge "Cleanup in mvref_common.{h, c}."

10 years agoMerge "Fixing display size setting problem."
Dmitry Kovalev [Sat, 24 Aug 2013 00:08:51 +0000 (17:08 -0700)]
Merge "Fixing display size setting problem."

10 years agoLimit mv range to be based on partition size
Yaowu Xu [Fri, 23 Aug 2013 20:29:32 +0000 (13:29 -0700)]
Limit mv range to be based on partition size

Previous change c4048dbd limits the mv search range assuming max block
size of 64x64, this commit change the search range using actual block
size instead.

Change-Id: Ibe07ab02b62bf64bd9f8675d2b997af20a2c7e11

10 years agoRemoving redundant calls to clamp_mv2.
Dmitry Kovalev [Fri, 23 Aug 2013 22:18:35 +0000 (15:18 -0700)]
Removing redundant calls to clamp_mv2.

We could avoid calling clamp_mv2 because it has been already called
inside vp9_find_best_ref_mvs function.

Change-Id: I08edeaf3e11e98c19e67b9711b2523ca5fb1416e

10 years agoMerge "Added border extension"
Yaowu Xu [Fri, 23 Aug 2013 21:43:58 +0000 (14:43 -0700)]
Merge "Added border extension"

10 years agoMerge "Fix bug in convolution functions (filter selection)"
Adrian Grange [Fri, 23 Aug 2013 20:41:47 +0000 (13:41 -0700)]
Merge "Fix bug in convolution functions (filter selection)"

10 years agoMerge "Removing useless calls to setup_{pre, dst}_planes."
Dmitry Kovalev [Fri, 23 Aug 2013 20:37:32 +0000 (13:37 -0700)]
Merge "Removing useless calls to setup_{pre, dst}_planes."

10 years agoFixing display size setting problem.
Dmitry Kovalev [Fri, 23 Aug 2013 20:12:46 +0000 (13:12 -0700)]
Fixing display size setting problem.

Fix of https://code.google.com/p/webm/issues/detail?id=608. We could have
used invalid display size equal to the previous frame size (not to the
current frame size).

Change-Id: I91b576be5032e47084214052a1990dc51213e2f0

10 years agoCleanup in mvref_common.{h, c}.
Dmitry Kovalev [Fri, 23 Aug 2013 19:00:14 +0000 (12:00 -0700)]
Cleanup in mvref_common.{h, c}.

Making code more compact, adding consts, removing redundant arguments,
adding do/while(0) for macros.

Change-Id: Ic9ec0bc58cee0910a5450b7fb8cfbf35fa9d0d16

10 years agoAdded border extension
Yaowu Xu [Thu, 22 Aug 2013 17:37:28 +0000 (10:37 -0700)]
Added border extension

To the source buffer to be encoded as an alt ref frame. This is to fix
the problem of using uninitialized memory in encoder.

See https://code.google.com/p/webm/issues/detail?id=605

Change-Id: I97618a2fc207e08abcf5301b734aa9e3ad695e2c

10 years agoFix bug in convolution functions (filter selection)
Adrian Grange [Thu, 22 Aug 2013 23:02:18 +0000 (16:02 -0700)]
Fix bug in convolution functions (filter selection)

(In response to Issue 604:
 https://code.google.com/p/webm/issues/detail?id=604)

There were bugs in the convolution code for two cases:

1. Where the filter table was assumed to be aligned to a
   256 byte boundary. The offset of the pixel in the
   source buffer was computed incorrectly.

2. Where no such alignment assumption was made. An
   incorrect address for the filter table base was used.

To fix both problems, I now assume that the filter table is
256-byte aligned and modify the pixel offset calculation to
match.

A later patch should remove the restriction that the filter
table is aligned to a 256-byte boundary.

There was also a bug in the ConvolveTest unit test
(convolve_test.cc).

(Bug & initial fix suggestion submitted by Tero Rintaluoma
and Sami Pietilä).

Change-Id: I71985551e62846e55e40de9e7e3959d4805baa82

10 years agoMerge "Checking scale factors on access."
Dmitry Kovalev [Fri, 23 Aug 2013 18:05:17 +0000 (11:05 -0700)]
Merge "Checking scale factors on access."

10 years agoMerge "vpx_scale: correct pixel spelling"
James Zern [Fri, 23 Aug 2013 18:01:27 +0000 (11:01 -0700)]
Merge "vpx_scale: correct pixel spelling"

10 years agoMerge "Optimise idct4x4: rearrange the instructions a bit to improve instruction...
hkuang [Fri, 23 Aug 2013 17:08:43 +0000 (10:08 -0700)]
Merge "Optimise idct4x4: rearrange the instructions a bit to improve instruction scheduling."

10 years agoChanges to adaptive inter rd thresholds.
Paul Wilkins [Fri, 23 Aug 2013 13:00:54 +0000 (14:00 +0100)]
Changes to adaptive inter rd thresholds.

Values now carried over frame to frame.
Change to algorithm for decreasing threshold after
a hit and to max threshold (now based on speed)

Removed some old commented out code relating to
VP8 adaptive thresholds.

The impact of these changes tested on Akiyo (50 frames)
and measured in terms of unit rd hits is as follows:

Speed 0 84.36 -> 84.67
Speed 1 29.48 -> 22.22
Speed 2 11.76 -> 8.21
Speed 3 12.32 -> 7.21

Encode speed impact is broadly in line with these.

Change-Id: I5b886efee3077a11553fa950d796fd6d00c8cb19

10 years agoLimit Key frame Intra modes checks.
Paul Wilkins [Thu, 22 Aug 2013 16:23:02 +0000 (17:23 +0100)]
Limit Key frame Intra modes checks.

Most of the focus so far has been on inter frames.

At high speed settings the key frame is now taking a high %
of the cycles.

This patch puts in some masking to reduce the number
of INTRA modes searched during key frame coding (as already
happens for inter frames) at higher speed settings

TODO: Develop this further with either adaptive rd thresholds
when choosing which intra modes to consider or some other
heuristic.

Impact.
At high speed settings on some clips the key frame was starting
to dominate. In a coding of the first 50 frames of AKIYO at speed
2 limiting the key frame intra modes to DC or TM_PRED resulted in
~30% overall speedup. For Bus the number was lower at ~4-5%.

Change-Id: I7bde68aee04995f9d9beb13a1902143112e341e2

10 years agovpx_scale: correct pixel spelling
James Zern [Fri, 23 Aug 2013 02:39:52 +0000 (19:39 -0700)]
vpx_scale: correct pixel spelling

Change-Id: Idcfab16da37134f943a4314674e2e2fcbff3a0f8

10 years agoMerge "Fix rectangular partition check flag"
Jingning Han [Fri, 23 Aug 2013 01:59:18 +0000 (18:59 -0700)]
Merge "Fix rectangular partition check flag"

10 years agoMerge "vp9_encodeframe.c cleanup."
Dmitry Kovalev [Fri, 23 Aug 2013 01:07:35 +0000 (18:07 -0700)]
Merge "vp9_encodeframe.c cleanup."

10 years agoMerge "vp9/encoder: fix last_frame_seg_map mem leak"
James Zern [Fri, 23 Aug 2013 01:04:03 +0000 (18:04 -0700)]
Merge "vp9/encoder: fix last_frame_seg_map mem leak"

10 years agoMerge "rename LOG2_* defines to *_LOG2"
James Zern [Fri, 23 Aug 2013 01:02:42 +0000 (18:02 -0700)]
Merge "rename LOG2_* defines to *_LOG2"

10 years agoFix rectangular partition check flag
Jingning Han [Fri, 23 Aug 2013 00:15:01 +0000 (17:15 -0700)]
Fix rectangular partition check flag

Put rectangular partition check flag change according to the rd
costs of NONE and SPLIT partition types under the speed feature.

Change-Id: If681e1e078a8d43d86961ea4b748da5cd1b6c331

10 years agoMerge "check_bsize_coverage cleanup."
Dmitry Kovalev [Thu, 22 Aug 2013 23:18:24 +0000 (16:18 -0700)]
Merge "check_bsize_coverage cleanup."

10 years agoMerge "Add neon optimize vp9_short_idct10_16x16_add."
hkuang [Thu, 22 Aug 2013 22:57:28 +0000 (15:57 -0700)]
Merge "Add neon optimize vp9_short_idct10_16x16_add."

10 years agoAdd neon optimize vp9_short_idct10_16x16_add.
hkuang [Wed, 21 Aug 2013 21:19:08 +0000 (14:19 -0700)]
Add neon optimize vp9_short_idct10_16x16_add.

vp9_short_idct10_16x16_add is used to handle the block that only have valid data
at top left 4x4 block. All the other datas are 0. So we could cut many
unnecessary calculations in order to save instructions.

Change-Id: I6e30a3fee1ece5af7f258532416d0bfddd1143f0

10 years agovp9_encodeframe.c cleanup.
Dmitry Kovalev [Thu, 22 Aug 2013 22:50:51 +0000 (15:50 -0700)]
vp9_encodeframe.c cleanup.

Removing unused get_sbuv_perpixel_variance function, using has_second_ref/
is_inter_block functions, organizing includes.

Change-Id: I016de4af12fbbb8b4ece26a70759b2392651b095

10 years agocheck_bsize_coverage cleanup.
Dmitry Kovalev [Thu, 22 Aug 2013 22:45:56 +0000 (15:45 -0700)]
check_bsize_coverage cleanup.

Change-Id: Ib7803857b35c00e317c9deb8630e777e25eb278f

10 years agoChecking scale factors on access.
Dmitry Kovalev [Thu, 22 Aug 2013 22:19:05 +0000 (15:19 -0700)]
Checking scale factors on access.

It is possible to have invalid scale factors and not access them
during decoding. Error is reported if we really try to use invalid scale
factors.

Change-Id: Ie532d3ea7325ee0c7a6ada08269f804350c80fdf

10 years agorename LOG2_* defines to *_LOG2
James Zern [Thu, 22 Aug 2013 21:45:24 +0000 (14:45 -0700)]
rename LOG2_* defines to *_LOG2

gets rid of a mix of styles

Change-Id: I3591d312157bc6f53a25438bf047765c671fd8a8

10 years agoMerge "Adding vp9_is_scaled function."
Dmitry Kovalev [Thu, 22 Aug 2013 21:39:55 +0000 (14:39 -0700)]
Merge "Adding vp9_is_scaled function."

10 years agoRemoving useless calls to setup_{pre, dst}_planes.
Dmitry Kovalev [Thu, 22 Aug 2013 21:39:05 +0000 (14:39 -0700)]
Removing useless calls to setup_{pre, dst}_planes.

Comment is wrong, we don't initialize any xd pointers. We only initialize
xd->planes[i]->dst and xd->planes[i]->pre[], which are actually initialized
for every block during the decoding.

Change-Id: If152ea872ebef1f83ca70712fa6f8df1b6855f56

10 years agovp9/encoder: fix last_frame_seg_map mem leak
James Zern [Thu, 22 Aug 2013 21:13:04 +0000 (14:13 -0700)]
vp9/encoder: fix last_frame_seg_map mem leak

remove duplicate allocation from vp9_create_compressor, it was added to
vp9_alloc_frame_buffers in:

d5bec52 Added resizing & initialization of last frame segment map

Change-Id: I996723226a16a62aff8f9a52ac74e0b73cc98fdf

10 years agoAdding vp9_is_scaled function.
Dmitry Kovalev [Thu, 22 Aug 2013 21:04:59 +0000 (14:04 -0700)]
Adding vp9_is_scaled function.

Change-Id: Ieb7077ca3586b9491912027eed450a4f6fd38d30

10 years agoMerge "Refactor rd_pick_partition for parameter control"
Jingning Han [Thu, 22 Aug 2013 20:54:48 +0000 (13:54 -0700)]
Merge "Refactor rd_pick_partition for parameter control"

10 years agoMerge "vp9_peek_si: add bitstream v1 support"
James Zern [Thu, 22 Aug 2013 20:28:00 +0000 (13:28 -0700)]
Merge "vp9_peek_si: add bitstream v1 support"

10 years agoRefactor rd_pick_partition for parameter control
Jingning Han [Tue, 20 Aug 2013 21:34:17 +0000 (14:34 -0700)]
Refactor rd_pick_partition for parameter control

This commit changes the partition search order of superblocks from
{SPLIT, NONE, HORZ, VERT} to {NONE, SPLIT, HORZ, VERT} for
consistency with that of sub8x8 partition search. It enable the use
of early termination in partition search for all block sizes.

For ped_area_1080p 50 frames coded at 4000 kbps, it makes the runtime
goes down from 844305ms -> 818003ms (3% speed-up) at speed 0.

This will further move towards making the in-search partition types
configurable, hence unifying various speed-up approaches.

Some speed 1 and 2 features are turned off during the refactoring
process, including:
disable_split_var_thresh
using_small_partition_info

Stricter constraints are applied to use_square_partition_only for
right/bottom boundary blocks. Will bring back/refine these features
subsequently. At this point, it makes derf set at speed 1 about
0.45% higher in compression performance, and 9% down in run-time.

Change-Id: I3db9f9d1d1a0d6cbe2e50e49bd9eda1cf705f37c

10 years agoOptimise idct4x4: rearrange the instructions a bit
hkuang [Thu, 22 Aug 2013 18:02:22 +0000 (11:02 -0700)]
Optimise idct4x4: rearrange the instructions a bit
to improve instruction scheduling.

Change-Id: I5ea881a6e419f9e8ed4b3b619406403b4de24134

10 years agoFixes on feature disabling split based on variance
Deb Mukherjee [Wed, 21 Aug 2013 23:19:35 +0000 (16:19 -0700)]
Fixes on feature disabling split based on variance

Adds a couple of minor fixes, which may be absorbed in Jingning's
patch. Thanks to Guillaume for pointing these out.
Also adjusts the thresholds for speed 1 and 2 to 16 and 32
respectively, to keep quality drops small.

Results:
--------
derfraw300:  threshold = 16, psnr -0.082%, speedup 2-3%
             threshold = 32, psnr -0.218%, speedup 5-6%
stdhdraw250: threshold = 16, psnr -0.031%, speedup 2-3%
             threshold = 32, psnr -0.273%, speedup 5-6%

Change-Id: I4b11ae8296cca6c2a9f644be7e40de7c423b8330

10 years agoMerge "Initialize mb_skip_coeff before picking modes"
Scott LaVarnway [Thu, 22 Aug 2013 13:26:04 +0000 (06:26 -0700)]
Merge "Initialize mb_skip_coeff before picking modes"

10 years agoInitialize mb_skip_coeff before picking modes
Scott LaVarnway [Thu, 22 Aug 2013 12:51:04 +0000 (08:51 -0400)]
Initialize mb_skip_coeff before picking modes

It appears that the above/left mb_skip_coeff used during
the pick modes, is left over from the previously
encode frame.  This patch initializes the flag to the default
value of zero.

Change-Id: Ida4684cc99611d6e3e82628db35ed717e28ce550

10 years agoMerge "Using has_second_ref function to simplify the code."
Dmitry Kovalev [Thu, 22 Aug 2013 08:39:14 +0000 (01:39 -0700)]
Merge "Using has_second_ref function to simplify the code."

10 years agoMerge "Cleaning up foreach_transformed_block_in_plane."
Dmitry Kovalev [Thu, 22 Aug 2013 08:37:21 +0000 (01:37 -0700)]
Merge "Cleaning up foreach_transformed_block_in_plane."

10 years agoMerge "Cleaning up reset_skip_context function."
Dmitry Kovalev [Thu, 22 Aug 2013 08:36:25 +0000 (01:36 -0700)]
Merge "Cleaning up reset_skip_context function."

10 years agoMerge "Removing unused foreach_predicted_block function."
Dmitry Kovalev [Thu, 22 Aug 2013 08:35:40 +0000 (01:35 -0700)]
Merge "Removing unused foreach_predicted_block function."

10 years agoMerge "Cleaning up optimize_init_b function."
Dmitry Kovalev [Thu, 22 Aug 2013 08:35:27 +0000 (01:35 -0700)]
Merge "Cleaning up optimize_init_b function."

10 years agoMerge "Cleaning up sum_intra_stats function."
Dmitry Kovalev [Thu, 22 Aug 2013 08:34:38 +0000 (01:34 -0700)]
Merge "Cleaning up sum_intra_stats function."

10 years agoMerge "Enable zero coeff check in sub8x8 UV rd loop"
Jingning Han [Thu, 22 Aug 2013 05:07:00 +0000 (22:07 -0700)]
Merge "Enable zero coeff check in sub8x8 UV rd loop"

10 years agoconfigure: fix action expansion
James Zern [Thu, 22 Aug 2013 02:00:08 +0000 (19:00 -0700)]
configure: fix action expansion

enable|disable -> (enable|disable)_feature

Change-Id: I7494913c78ebe8bb532fa6545e0ae53a79ccd388

10 years agoconfigure: rename enable() to enable_feature()
James Zern [Thu, 22 Aug 2013 01:11:45 +0000 (18:11 -0700)]
configure: rename enable() to enable_feature()

+ disable() -> disable_feature() for balance

this avoids shadowing the bash builtin 'enable' allowing the scripts to
be linted with checkbashisms

Change-Id: Ia11cf86c92ec25bd14e69427b0ac0a9a61a5f7a5

10 years agovp9: remove unnecessary wait w/threaded loopfilter
James Zern [Thu, 22 Aug 2013 00:43:44 +0000 (17:43 -0700)]
vp9: remove unnecessary wait w/threaded loopfilter

the final macroblock rows are scheduled in the main thread. prior to
this change one additional macroblock row would be scheduled in the
worker forcing the main thread to wait before finishing.

Change-Id: I05f3168e5c629b898fcebb0d77eb6d6a90d6105e

10 years agoCleaning up foreach_transformed_block_in_plane.
Dmitry Kovalev [Thu, 22 Aug 2013 00:16:02 +0000 (17:16 -0700)]
Cleaning up foreach_transformed_block_in_plane.

Change-Id: I9f45af3894c57f35cb266c255e2b904295d39c34

10 years agovp9_peek_si: add bitstream v1 support
James Zern [Wed, 21 Aug 2013 23:40:34 +0000 (16:40 -0700)]
vp9_peek_si: add bitstream v1 support

currently protected by CONFIG_NON420 as v1 is still not entirely stable

Change-Id: Id1c5081b04a2c47a842822048b8804be67d23a6d

10 years agoCleaning up optimize_init_b function.
Dmitry Kovalev [Wed, 21 Aug 2013 23:40:16 +0000 (16:40 -0700)]
Cleaning up optimize_init_b function.

Change-Id: Ib2c975e1d96deefb7ac4d6b600c8c5388035d111

10 years agoCleaning up reset_skip_context function.
Dmitry Kovalev [Wed, 21 Aug 2013 23:31:51 +0000 (16:31 -0700)]
Cleaning up reset_skip_context function.

Change-Id: Ib3e72671eb8da6f2e9767a6de292ec7c7cde6bc7

10 years agoCleaning up sum_intra_stats function.
Dmitry Kovalev [Wed, 21 Aug 2013 23:25:02 +0000 (16:25 -0700)]
Cleaning up sum_intra_stats function.

Using size_group_lookup table and better variable names.

Change-Id: I6e67f2ce091845db43ace7d21b7ae31c6f165aec

10 years agoMerge "Adding scale factor check."
Dmitry Kovalev [Wed, 21 Aug 2013 21:11:13 +0000 (14:11 -0700)]
Merge "Adding scale factor check."

10 years agoMerge "Removing PLANE_TYPE argument from cost_coeffs function."
Dmitry Kovalev [Wed, 21 Aug 2013 21:10:05 +0000 (14:10 -0700)]
Merge "Removing PLANE_TYPE argument from cost_coeffs function."

10 years agoMerge "Make "good" quality 2-pass vpxenc encoding default"
Deb Mukherjee [Wed, 21 Aug 2013 20:58:49 +0000 (13:58 -0700)]
Merge "Make "good" quality 2-pass vpxenc encoding default"

10 years agoMerge "vp9 rtcd: remove non-existent sad functions"
James Zern [Wed, 21 Aug 2013 20:55:59 +0000 (13:55 -0700)]
Merge "vp9 rtcd: remove non-existent sad functions"

10 years agoRemoving PLANE_TYPE argument from cost_coeffs function.
Dmitry Kovalev [Wed, 21 Aug 2013 20:02:28 +0000 (13:02 -0700)]
Removing PLANE_TYPE argument from cost_coeffs function.

We can determine plane_type for another function arguments.

Change-Id: I85331877aedb357632ae916a37b5b15f22c0bb1f

10 years agoMake "good" quality 2-pass vpxenc encoding default
Deb Mukherjee [Mon, 19 Aug 2013 21:16:26 +0000 (14:16 -0700)]
Make "good" quality 2-pass vpxenc encoding default

Currently, the best quality mode in VP9 is not very well developed,
and unnecessarily makes the encode too slow. Hence the command line
default is changed to "good" quality. Also, the number of passes
default is changed to 2 passes as well, since 1-pass encoding is
not very efficient in VP9.

Besides, a number of VP9 defaults are set to the currently
recommended settings. With these changes, vpxenc
run with --codec=vp9 --kf-max-dist=9999 --cpu-used=0 should
work about the same as our borg results.
Note when the --cpu-used=0 option is dropped there will be a slight
difference in the output, because of a difference in the cpu-used
value for the first pass. Specifically, the default when unspecified
is to use cpu_used=1 for the first pass and cpu_used=0 for the
second pass. But when specified, both passes will use the cpu-used
value specified.

Note that this also changes the default for VP8 as being "good"
but other options stay unchanged.

Change-Id: Ib23c1a05ae2f36ee076c0e34403efbda518c5066

10 years agoRemoving a lot of duplicated code.
Dmitry Kovalev [Wed, 21 Aug 2013 18:55:04 +0000 (11:55 -0700)]
Removing a lot of duplicated code.

Adding set_contexts contexts function and call it instead of
set_contexts_on_border. Calling txfrm_block_to_raster_xy to get aoff and
loff.

Change-Id: I41897e344afd2cae1f923f4fdbe63daccf6fe80e

10 years agoAdding scale factor check.
Dmitry Kovalev [Wed, 21 Aug 2013 18:24:47 +0000 (11:24 -0700)]
Adding scale factor check.

We support only [1/16, 2] scale factors, enforcing this now.

Change-Id: I0822eb7cea51720df6814e42d3f35ff340963061

10 years agoFix typos and minor stylistic cleanup
Adrian Grange [Tue, 20 Aug 2013 19:55:41 +0000 (12:55 -0700)]
Fix typos and minor stylistic cleanup

Change-Id: I32e43474e8651ef2eb181d24860a8f118cfea7bf

10 years agoMerge "Further correct bug in loopfilter initialization"
Adrian Grange [Wed, 21 Aug 2013 14:17:43 +0000 (07:17 -0700)]
Merge "Further correct bug in loopfilter initialization"

10 years agovp9 rtcd: remove non-existent sad functions
James Zern [Wed, 21 Aug 2013 01:06:58 +0000 (18:06 -0700)]
vp9 rtcd: remove non-existent sad functions

vp9_sad32x3, vp9_sad3x32

+ remove unnecessary sad include from vp9_findnearmv.c

Change-Id: Idef2a89cadc3fec64eff82ba9be60ffff50b3468

10 years agoRemoving unused foreach_predicted_block function.
Dmitry Kovalev [Wed, 21 Aug 2013 00:20:47 +0000 (17:20 -0700)]
Removing unused foreach_predicted_block function.

Moving foreach_predicted_block_in_plane function to vp9_reconinter.c
because there is only one usage.

Change-Id: I9852feae43fc3cf809b817fc541d043bc5496209

10 years agoMerge "Passing plane_bsize to foreach_transformed_block_visitor."
Dmitry Kovalev [Tue, 20 Aug 2013 21:25:01 +0000 (14:25 -0700)]
Merge "Passing plane_bsize to foreach_transformed_block_visitor."

10 years agoUsing has_second_ref function to simplify the code.
Dmitry Kovalev [Tue, 20 Aug 2013 21:09:56 +0000 (14:09 -0700)]
Using has_second_ref function to simplify the code.

Updating implementation of vp9_get_pred_context_single_ref_p2 using
has_second_ref function to make code easier to read.

Change-Id: I5ba642712f59861a48aab974e73aa01640d086fe

10 years agoMerge "Add neon optimize vp9_short_idct10_8x8_add."
hkuang [Tue, 20 Aug 2013 21:06:57 +0000 (14:06 -0700)]
Merge "Add neon optimize vp9_short_idct10_8x8_add."

10 years agoMerge "vp9_filter.{h, c} cleanup + adding SUBPEL_TAPS constant."
Dmitry Kovalev [Tue, 20 Aug 2013 20:46:53 +0000 (13:46 -0700)]
Merge "vp9_filter.{h, c} cleanup + adding SUBPEL_TAPS constant."

10 years agovp9_filter.{h, c} cleanup + adding SUBPEL_TAPS constant.
Dmitry Kovalev [Tue, 20 Aug 2013 19:29:57 +0000 (12:29 -0700)]
vp9_filter.{h, c} cleanup + adding SUBPEL_TAPS constant.

Change-Id: Ib394ea23f464591dad50b5c65c316701378d06d7

10 years agoAdd neon optimize vp9_short_idct10_8x8_add.
hkuang [Fri, 16 Aug 2013 23:36:07 +0000 (16:36 -0700)]
Add neon optimize vp9_short_idct10_8x8_add.

vp9_short_idct10_8x8_add is used to handle the block that only have valid data
at top left 4x4 block. All the other datas are 0. So we could cut several
unnecessary calculations in order to save instructions.

Change-Id: I34fda95e29082b789aded97c2df193991c2d9195

10 years agoEnable zero coeff check in sub8x8 UV rd loop
Jingning Han [Tue, 20 Aug 2013 17:33:42 +0000 (10:33 -0700)]
Enable zero coeff check in sub8x8 UV rd loop

Check the minimum rate-distortion cost of regular quantization and
all zero coeffs cases in the sub8x8 inter prediction rd loop for
luma components. Use this as the cumulative rdcost sent to UV rd
estimation.

Change-Id: Ia4bc7700437d5e13d7cdad4cf9ae57ab036d3e97

10 years agoMerge "Cleanup/enhancements of switchable filter search"
Deb Mukherjee [Tue, 20 Aug 2013 17:16:51 +0000 (10:16 -0700)]
Merge "Cleanup/enhancements of switchable filter search"

10 years agoMerge "Moving plane_block_idx from vp9_blockd.h to vp9_quantize.c."
Dmitry Kovalev [Tue, 20 Aug 2013 17:06:22 +0000 (10:06 -0700)]
Merge "Moving plane_block_idx from vp9_blockd.h to vp9_quantize.c."

10 years agoMerge "Adding has_second_ref function."
Dmitry Kovalev [Tue, 20 Aug 2013 17:06:14 +0000 (10:06 -0700)]
Merge "Adding has_second_ref function."

10 years agoMerge "Adding VP9_FILTER_BITS constant."
Dmitry Kovalev [Tue, 20 Aug 2013 17:05:09 +0000 (10:05 -0700)]
Merge "Adding VP9_FILTER_BITS constant."

10 years agoCleanup/enhancements of switchable filter search
Deb Mukherjee [Fri, 16 Aug 2013 20:51:00 +0000 (13:51 -0700)]
Cleanup/enhancements of switchable filter search

Cleans up the switchable filter search logic. Also adds a
speed feature - a variance threshold - to disable filter search
if source variance is lower than this value.

Results: derfraw300
threshold = 16, psnr -0.238%, 4-5% speedup (tested on football)
threshold = 32, psnr -0.381%, 8-9% speedup (tested on football)
threshold = 64, psnr -0.611%, 12-13% speedup (tested on football)
threshold = 96, psnr -0.804%, 16-17% speedup (tested on football)

Based on these results, the threshold is chosen as 16 for speed 1,
32 for speed 2, 64 for speed 3 and 96 for speed 4.

Change-Id: Ib630d39192773b1983d3d349b97973768e170c04

10 years agoMerge "Enable early termination in uv rd loop"
Jingning Han [Tue, 20 Aug 2013 16:07:26 +0000 (09:07 -0700)]
Merge "Enable early termination in uv rd loop"

10 years agoMerge "fix the mv_ref_idx issue"
Jim Bankoski [Tue, 20 Aug 2013 16:00:57 +0000 (09:00 -0700)]
Merge "fix the mv_ref_idx issue"

10 years agofix the mv_ref_idx issue
Jim Bankoski [Tue, 20 Aug 2013 15:14:52 +0000 (08:14 -0700)]
fix the mv_ref_idx issue

The following issue was reported :
https://code.google.com/p/webm/issues/detail?id=601&q=jimbankoski&sort=-id&colspec=ID%20Pri%20mstone%20ReleaseBlock%20Type%20Component%20Status%20Owner%20Summary

This code makes the choice and code cleaner and removes any question
about whether the border needs to be checked.

Change-Id: Ia7aecfb3168e340618805bd318499176c2989597

10 years agoChanges to auto partition size selection.
Paul Wilkins [Fri, 16 Aug 2013 15:54:12 +0000 (16:54 +0100)]
Changes to auto partition size selection.

Changes to code to auto select a partition size range
based on data from spatial neighbors.

Now looks at the sb_type in each 8x8 block of above
and left SB64.

The effect on speed 1 is now weaker giving better
quality but less speed gain. Now also used in speed 2.

Change-Id: Iace33a97d5c3498dd2a9a8a4067351941abcbabc

10 years agoAdding VP9_FILTER_BITS constant.
Dmitry Kovalev [Tue, 20 Aug 2013 07:42:25 +0000 (00:42 -0700)]
Adding VP9_FILTER_BITS constant.

Removing VP9_FILTER_WEIGHT, VP9_FILTER_SHIFT, BLOCK_WIDTH_HEIGHT
constants. Using ROUND_POWER_OF_TWO for rounding.

Change-Id: I2e8d6858dcd600a87096138209731137d7decc24

10 years agoAdding has_second_ref function.
Dmitry Kovalev [Tue, 20 Aug 2013 01:39:34 +0000 (18:39 -0700)]
Adding has_second_ref function.

Updating implementation of vp9_get_pred_context_single_ref_p1 using
has_second_ref function to make code easier to read.

Change-Id: Ie8f60403a7195117ceb2c6c43176ca9a9e70b909

10 years agoChange to limit the mv search range
Yaowu Xu [Sat, 10 Aug 2013 22:04:02 +0000 (15:04 -0700)]
Change to limit the mv search range

As the pixel values beyond image border are duplicates of pixels
on edge, the change limits the mv search range, any mv beyond
the limits no longer produce new/different prediction values
as entire block with pixels used for subpel interpolation are
outside image border.

Change-Id: I4c6fdf06e33c1cef1489f5470ce0fb4e5e01fb79