Commit Graph

3281 Commits

Author SHA1 Message Date
Jim Bankoski
3e04114f3d prepend ++ instead of post in for loops.
Applied the following regex  :
search for: (for.*\(.*;.*;) ([a-zA-Z_]*)\+\+\)
replace with: \1 ++\2)

This misses some for loops:
ie : for (mb_col = 0; mb_col < oci->mb_cols; mb_col++, mi++)

Change-Id: Icf5f6fb93cced0992e0bb71d2241780f7fb1f0a8
2016-07-18 06:54:50 -07:00
clang-format
81a6739533 vp8: apply clang-format
Change-Id: I7605b6678014a5426ceb45c27b54885e0c4e06ed
2016-07-15 19:28:44 -07:00
Jim Bankoski
cb957c302a addnoise : clear out static size for generated noise
Change-Id: I5d4343f2da9cd4b01dd37be7a048d159fec109d1
2016-07-15 15:52:45 -07:00
Jim Bankoski
0dc69c70f7 postproc : fix function parameters for noise functions.
Change-Id: I582b6307f28bfc987dcf8910379a52c6f679173c
2016-07-15 08:27:34 -07:00
Jim Bankoski
e736691a6d postproc: noise style fixes.
Change-Id: Ifdcb36b8e77b65faeeb10644256e175acb32275d
2016-07-13 12:39:01 -07:00
Jim Bankoski
2ca24b0075 postproc - move filling of noise buffer to vpx_dsp.
Change-Id: I63ba35dc0ae9286c9812367a531e01d79a4c1635
2016-07-13 07:35:25 -07:00
Jim Bankoski
88e6951465 deblock filter : moved from vp8 code branch
The deblocking filters used in vp8 have been moved to vpx_dsp for
use by both vp8 and vp9.

Change-Id: I5209d76edafc894b550f751fc76d3aa6799b392d
2016-07-12 05:53:00 -07:00
James Zern
d2b40894be remove *debugmodes.c from the default build
these are debug-only modules that can be added in manually when needed.
leave a reference in vp8_common.mk / vp9_common.mk for easy addition.

quiets -Wmissing-prototypes warning

BUG=b/29584271

Change-Id: Ifc8637d877edfbd562b34dc5c540428bba7951fc
2016-07-01 19:10:04 -07:00
James Zern
3ef9c0ba03 vp8/common/reconintra4x4.c: add missing include
quiets -Wmissing-prototypes warning

BUG=b/29584271

Change-Id: I806e3475ebee579dce0073dd1784a7c2899e7de0
2016-07-01 16:20:42 -07:00
Yaowu Xu
b458f42966 Merge "Remove effectless initialization" 2016-06-29 22:51:14 +00:00
Yaowu Xu
43ae6c1e22 Remove effectless initialization
Change-Id: Iec117841a7ecf6f99d2b718057d8646e221c5c64
2016-06-28 12:28:45 -07:00
James Zern
f51f67602e *.asm: normalize label format
add a trailing ':', though it's optional with the tools we support, it's
more common to use it to mark a label. this also quiets the
orphan-labels warning with nasm/yasm.

BUG=b/29583530

Change-Id: I46e95255e12026dd542d9838e2dd3fbddf7b56e2
2016-06-27 19:46:57 -07:00
Yaowu Xu
003a9d20ad Port metric computation changes from nextgenv2
Change-Id: I4aceffcdf7af59ffeb51984f0345c3a4c7e76a9f
2016-06-24 13:52:50 -07:00
Johann
6c6eb16bb9 vp8 machine setup: mark unused variable
When building without multithreading and for a non-arm, non-x86 system,
ctx is unused.

Cleans up -Wextra warning:
unused parameter ‘ctx’ [-Werror=unused-parameter]

Change-Id: Ifddff89d2ebd45f7d71e3d415a8f2415dd818957
2016-06-23 13:46:20 +00:00
Johann
3b2c3cb366 vp8 realtime encoder: mark unused variable
'duration' is not used in realtime-only mode:

Cleans up -Wextra warning:
unused parameter 'duration' [-Wunused-parameter]

Change-Id: I827dfe59ebcdc72c5a93fdf7e5aca063433914b1
2016-06-23 13:46:00 +00:00
Johann
55f3740d76 vp8 error concealment: remove unused variables
vp8_conceal_corrupt_mb is an empty function. Remove it entirely.

Cleans up -Wextra warnings:
unused parameter 'mi_stride' [-Wunused-parameter]
unused parameter 'xd' [-Wunused-parameter]

Change-Id: Idca7ef4508fae2b4b76a40d44507522a72ccc2c8
2016-06-22 18:29:03 -07:00
Tom Finegan
5a9f21db54 Output frames in first pass for VPX_DL_REALTIME.
Since combining VPX_DL_REALTIME with VPX_RC_FIRST_PASS is basically
nonsense, ignore the user's pass setting when this happens and
behave as if the requested encode is a single pass encode.

BUG=webm:1233

Change-Id: I5ee4c4e5838c4ca6d24988890aae490b10826db2
2016-06-17 11:25:55 -07:00
Johann Koenig
a724477d69 Merge "vp8: correct function return types" 2016-06-17 04:19:37 +00:00
Johann Koenig
e9b6172476 Merge "VP8_COMP: make frames_since_golden signed" 2016-06-17 04:19:17 +00:00
Johann Koenig
ee30cf1408 Merge "vp8_[cd]x_iface.c: Initialize structures to 0" 2016-06-16 23:12:06 +00:00
Johann Koenig
f5713fefa6 Merge "vp8 stats file: initialize to 0" 2016-06-16 22:29:04 +00:00
Johann
6f9982e3c2 vp8_[cd]x_iface.c: Initialize structures to 0
Use vp8_zero() or specify every element.

Cleans warning in Android build:
missing field 'deblocking_level' initializer
vp8_ppflags_t flags = {0};
                        ^
missing field 'sz' initializer
{0},                /* rc_twopass_stats_in */
  ^
missing field 'sz' initializer
{0},                /* rc_firstpass_mb_stats_in */
  ^
missing field 'layer_target_bitrate' initializer
}},
^
missing field 'deblocking_level' initializer
vp8_ppflags_t flags = {0};
                        ^
missing field 'mr_get_mem_loc' initializer
}
^

Change-Id: Iaedde9a77faac7a40316aee67d60d02ba7313500
2016-06-16 22:07:17 +00:00
Johann
f4b5330c50 VP8_COMP: make frames_since_golden signed
This value is signed in vp9/10

Cleans warning in Android build:
comparison of integers of different signs: 'unsigned int' and 'int'
if (cpi->frames_since_golden == (cpi->current_gf_interval >> 1))
    ~~~~~~~~~~~~~~~~~~~~~~~~ ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: Ie137724982f3a46c8c1820548c1960d62a4e96f2
2016-06-16 22:02:30 +00:00
Johann
bd0c981744 vp8: correct function return types
left_above_mv and above_block_mv return as_int

as_int is defined as uint32_t in vp8/common/mv.h

Cleans up -Wextra warnings:
signed and unsigned type in conditional expression
this_mv->as_int = col ? d[-1].bmi.mv.as_int : left_block_mv(mic, i);
                                            ^
this_mv->as_int = row ? d[-4].bmi.mv.as_int : above_block_mv(mic, i, mis);
                                            ^
left_mv.as_int = col ? d[-1].bmi.mv.as_int :
                                           ^

Change-Id: Ia043764e4ce93d2152d2269b1c7b28b5d5f814cf
2016-06-16 21:57:46 +00:00
Johann Koenig
73ae3cdeef Merge "vp8_change_config: fix unsigned/signed comparison" 2016-06-16 21:53:29 +00:00
Johann
3108fbd229 vp8 stats file: initialize to 0
Cleans up -Wextra warning:
missing initializer for field ‘intra_error’ of ‘FIRSTPASS_STATS’

Change-Id: I42c1413234aba207f8e89f2e040e14a81bca511e
2016-06-16 14:26:07 -07:00
Johann
db81c34336 vp8_change_config: fix unsigned/signed comparison
Use ~15 instead of 0x..F0

Cleans warning in Android build:
comparison of integers of different signs: 'unsigned int' and 'int'
if (((cm->Width + 15) & 0xfffffff0) !=
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
comparison of integers of different signs: 'unsigned int' and 'int'
((cm->Height + 15) & 0xfffffff0) !=
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^

Change-Id: Iac25839cde3425b7b9db7f33740dc46a551b7546
2016-06-16 20:58:37 +00:00
Yaowu Xu
159dd0cc39 Fix ubsan warning: vp8/encoder/denoising.c
BUG=webm:1219

Change-Id: Iebdedfb27c70909c0849e169473a2a3ec9f58cc7
2016-06-16 08:53:53 -07:00
Yaowu Xu
354e70dc78 Fix ubsan warning: vp8/encoder/onyx_ifc
BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1219

Change-Id: I4362a1cf79fdcb478b29ddbcdf8091c5f5d10645
2016-06-16 08:32:18 -07:00
Johann Koenig
8767999493 Merge "Match prev_ to number_of_layers" 2016-06-15 18:26:55 +00:00
Johann
a9936de384 Use data size directly instead of recomputing.
Cleans warning in Android build:
comparison of integers of different signs: 'unsigned int' and 'int'

int n = (int)VPXMIN(sizeof(clear_buffer), data_end - data);
             ^      ~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~

Change-Id: I964355ceae6b39e22c0196294b25e28387f84945
2016-06-14 22:57:26 +00:00
Johann
c93d30a47f Match prev_ to number_of_layers
Defined as unsigned in VP8_CONFIG

Cleans warning in Android build:
comparison of integers of different signs: 'unsigned int' and 'int'
if (cpi->oxcf.number_of_layers != prev_number_of_layers)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~
Change-Id: I969e64cd2bfda6e61c564476dbd35b892b177646
2016-06-14 22:57:14 +00:00
Johann
95d29675b2 Active map and ROI map use unsigned rows/cols
The vpx_roi_map_t and vpx_active_map_t structures use unsigned rows
and cols but VP8_COMMON uses signed values for mb_rows and mb_cols.

Cleans warning in Android build:
comparison of integers of different signs: 'int' and 'unsigned int'
if (cpi->common.mb_rows != rows || cpi->common.mb_cols != cols)
    ~~~~~~~~~~~~~~~~~~~ ^  ~~~~
comparison of integers of different signs: 'int' and 'unsigned int'
if (cpi->common.mb_rows != rows || cpi->common.mb_cols != cols)
                                   ~~~~~~~~~~~~~~~~~~~ ^  ~~~~
comparison of integers of different signs: 'unsigned int' and 'int'
if (rows == cpi->common.mb_rows && cols == cpi->common.mb_cols)
    ~~~~ ^  ~~~~~~~~~~~~~~~~~~~
comparison of integers of different signs: 'unsigned int' and 'int'
if (rows == cpi->common.mb_rows && cols == cpi->common.mb_cols)

Change-Id: If1f118c20ffefd2530fbd371e6787cc8a6c31f0a
2016-06-14 22:55:47 +00:00
Johann
4b8b31838b Make new_qc signed
Mode is signed

Cleans warning in Android build:
comparison of integers of different signs: 'int' and 'unsigned int'
if (ctx->oxcf.Mode != new_qc)
    ~~~~~~~~~~~~~~ ^  ~~~~~~

Change-Id: I5cf81c40b103e688a31e1339511f5c9eb27edd38
2016-06-14 22:54:58 +00:00
Johann Koenig
ef1fb6deb4 Merge changes I999ef597,Ic6dc9f53
* changes:
  configure: Add -mstackrealign flags to CFLAGS on OS/2
  vpx: Add OS/2-specific threading codes
2016-06-07 21:43:55 +00:00
Yaowu Xu
fd500f955f firstpass.c: fix an UBSAN/IOC error
Change-Id: I579286e6741b689ae4281a35beb7b8f95c3ffce5
2016-06-02 00:31:32 +00:00
Yaowu Xu
787b38ebb9 Fix VP8 encoder UBSAN/IOC errors
1. vp8/decoder/dboolhuff.c
2. vp8/decoder/dboolhuff.h
3. vp8/encoder/bitstream.c
4. vp8/encoder/boolhuff.h
5. vp8/encoder/rdopt.c

BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1218

Change-Id: I5d315d63fd7aeaee6f3bd79178e593f3db38a6b1
2016-06-01 16:00:56 +00:00
KO Myung-Hun
14e8adea3c vpx: Add OS/2-specific threading codes
With correction of a type of a thread function for new threading
codes.

Change-Id: Ic6dc9f530698800d1cfe2da327848e8f8b62e31f
2016-05-22 18:11:50 +09:00
James Zern
971c5a16a9 vp8/error_concealment: remove shift of negative value
fixes:
shifting a negative signed value is undefined [-Wshift-negative-value]

Change-Id: I3a55f2dac7c51c0e264d40081ffce98e2abacb89
2016-05-19 19:19:19 -07:00
Yaowu Xu
a45596cff7 Merge "Added a measure of rc drift." 2016-05-11 18:02:00 +00:00
paulwilkins
45df87ca57 Added a measure of rc drift.
Added actual and absolute rate miss values to the opsnr.stt
stats output line.

Changes to the borg graphing may be needed before merge.

Change-Id: I1e9d548ce445d29002f0c59ebfd3957a6f15e702
2016-05-11 15:15:07 +01:00
Johann Koenig
0741629c88 Merge "Alignment is required for sad_array8" 2016-05-09 21:01:45 +00:00
Johann
f68f9eefdf Alignment is required for sad_array8
For at least some of the implementations of sdx8f, such as
vpx_sad4x4x8_sse4_1, aligned moves are used to move the results into the
array.

Change-Id: I83df5a8e657b44e906d0d8b0bc154f1e5660f7f9
2016-05-09 18:39:24 +00:00
Johann
ce11055d57 Remove sixtap/bilinear 4x4 neon implementations
These implementations rely on casting the pointers to load the data.
Clang implemented optimizations which automatically add alignment hints
to such loads. The 4x4 filters do not guarantee the necessary alignment
so the resulting assembly is broken.
https://llvm.org/bugs/show_bug.cgi?id=24421

BUG=webm:817
BUG=webm:892

Change-Id: I608885299f1f86ff83653b65e0e40d0ae87fb3fe
2016-05-06 17:20:15 -07:00
James Bankoski
e755a283dd Merge "Move vpx_add_plane from codec to vpx_dsp and dedup." 2016-05-03 14:11:57 +00:00
Jim Bankoski
fce3cee8dd Move vpx_add_plane from codec to vpx_dsp and dedup.
Change-Id: I12218d8331c0558c0587a66321e3ca46da7e5cc7
2016-05-02 12:17:39 -07:00
Alex Converse
d3fe3b2abb Avoid an unsigned overflow in invert_quant
Change-Id: I16a570b2af66b6580d1cd6f8345a25f079009bf4
2016-04-27 15:07:22 -07:00
Marco
a136c1769d vp8: Adjust consec_zeromv thresholds for skin detection.
Change-Id: Iab5aed7bf86538352232e208bce58c3528cc9a4e
2016-04-26 16:03:44 -07:00
Marco
d33be6caa9 vp8: Update on sum_diff_threshold.
Reset to previous values.

Change-Id: Ia49bafc1d1ec5f657819ffba04d11fd701f315e8
2016-04-19 15:59:48 -07:00
Marco
6877acb67e vp8-denoiser: Avoid doing the mcomp if we don't denoise.
Avoid doing the mcomp in denoiser if we don't denoise the
block (because of motion/SSE/skin threshold, etc).
This can reduce encoding time (with denoiser enabled) by ~1.5-2%.

Change-Id: Ia699b68dfd37b89cdf3a82b8aa40e8c8f98a3d4f
2016-04-04 13:25:38 -07:00
Marco
bc6c199785 vp8 denoiser: Some adjustments to usage of skin and motion.
Switch to use new skin model.

And fix condition for denoising skin block.
Previous condition did not denoise skin blocks if the selected
mode was non-zero motion in current frame. Modify condition to
also force no denoising if that mode was not selected as zero motion
now and for at least "x" past frames in a row (x = 2).

Change-Id: I00753e3fe45b9a308a7ef43c58f11868e3bfc6b0
2016-04-01 11:36:45 -07:00
James Zern
8d8ee1f644 Merge "vp8_peek_si_internal: quiet static analysis warning" 2016-03-30 05:38:59 +00:00
James Zern
1bf7a0fb29 vp8_peek_si_internal: quiet static analysis warning
the vpx_decoder layer guarantees that when called directly this won't
receive NULL data and the reuse via decode() is protected by a NULL data
check and 0 size check (NULL data and non-zero data size is protected by
the vpx_decoder layer).

Change-Id: I7437fb5ca4e4aa431963d55b909d4d920f339be3
2016-03-25 10:00:30 -07:00
Marco
5f90713b2b vp8-denoiser: Use the same skin detection for model=1 as in vp9.
Keep setting for model = 0 for now in vp8.

Change-Id: I79c5fa24d5d16b14651f44db9526aa01dbd70ec9
2016-03-24 15:44:40 -07:00
Yaowu Xu
a624692776 Merge "Simplify the loopfilter synchronization logic in VP8 encoder" 2016-03-22 23:45:28 +00:00
Yunqing Wang
b198bcd528 Simplify the loopfilter synchronization logic in VP8 encoder
This patch was to fix a reported Hangouts deadlock/freezing issue
in VP8 encoder(issue 27232610). The original encoder loopfilter
synchronization happened in the following frame, which was prone
to causing problems in some complex use cases. This patch simplified
the synchronization logic.

More testing needs to be done.

Change-Id: I38fd3f35d11f98fae1e44546aa5e4c6d6e19c4be
2016-03-22 14:13:18 -07:00
Marco
a3562b60d5 vp8-denoiser: Update on the sum_diff threshold.
Change-Id: I0d459c7ba358da287aff1c706279603d6d4d3c48
2016-03-18 08:39:42 -07:00
Marco Paniconi
9ef41cf577 Merge "vp8-denoiser: Update some denoiser thresholds." 2016-02-27 00:20:53 +00:00
James Zern
02fe3ae907 vp8_dx_iface: add missing alloc checks
Change-Id: Id9f4022b0cb4b5d0b3dd8759fd491da4e2ba5cb1
2016-02-17 18:04:23 -08:00
James Zern
61b112b67b vp8/onyx_if: add missing alloc checks
Change-Id: I9b0aa340518f45e16fa9754afd87347aabf968d7
2016-02-17 18:04:14 -08:00
James Zern
a3d23877f6 vp8/denoising: add missing alloc check
Change-Id: I51ede902cd9d7bafa41f7caa3f9adf77f9df5903
2016-02-17 16:33:56 -08:00
Marco
3c0772977b vp8-denoiser: Update some denoiser thresholds.
Change-Id: I67090d72c0fefd3105ac380415249599e053d3bd
2016-02-17 10:38:35 -08:00
James Zern
ba7ebbb35c vp8: fix build with mingw+pthreads
Change-Id: Icc34a00759c95b7b8ac356cdcc4adae848b61431
2016-02-05 21:08:45 -08:00
James Zern
8faccb709a Merge changes If13946e4,I61a1814d,I2ca9aa3c,I44d91eaa
* changes:
  intrapred: protect functions w/CONFIG check
  vp9_noise_estimate: protect copy_frame w/CONFIG check
  vp8_cx_iface: delete 3 unused functions
  vp8: mark intra_prediction_down_copy inline
2016-01-30 00:17:16 +00:00
James Zern
4f780e94a1 vp9/10: fix encoder crash on flush
the lookahead buffer allocation is deferred to receipt of the first
frame to allow profile changes. if the encoder was flushed before
supplying any frames the encoder would crash trying to dereference the
NULL buffer. vp8 is unaffected.

fixes mozilla bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1237848

Change-Id: Icee4b64de760476eee0d33b568f0a1010335ff13
2016-01-28 12:53:41 -08:00
JackyChen
d1e3d0467c VPX skin map improvement.
Use multiple clusters instead of one and decrease
the distance thresholds.

Add a define to switch between models.
Default is set to existing (1 cluster) model.

Change-Id: I802cd9bb565437ae8983ef39453939f5d5073bb1
2016-01-28 10:38:14 -08:00
James Zern
42c2c6bf33 vp8_cx_iface: delete 3 unused functions
vp8e_update_entropy, vp8e_update_reference, vp8e_use_reference have been
unused since:
a046f56 vp8cx: remove deprecated reference/entropy controls

Change-Id: I2ca9aa3c3f1a209a534a1492432b16852e3d8629
2016-01-26 20:08:37 -08:00
James Zern
abd62063ee vp8: mark intra_prediction_down_copy inline
avoids -Wunused-function warnings when INLINE is set

Change-Id: I44d91eaa7efba7bc2427501fb9f63a93f32aaa7f
2016-01-26 20:07:42 -08:00
Yunqing Wang
e6f05e78fe Fix a clang/win build error
Made the definition of THREAD_FUNCTION consistent.

Change-Id: I1ac099484e201e359298ed16de0b81ec781075ce
2016-01-26 10:10:07 -08:00
Marco
4800e179fe vp8-denoiser: Fix threshold for skin map.
Make it consistent with the comment/intended behavior,
that is, only denoise if current block is zero_mv.

Change-Id: I3909761e802e80089752a493ab3646dc32698ded
2016-01-20 13:48:46 -08:00
Yaowu Xu
cfe9758c4e Remove duplicate definitions
This fixes the build errors with msvc.

Change-Id: Ie2716e4c15a1bacfb00a8d41ec3283d718af88fc
2016-01-20 08:56:41 -08:00
Yunqing Wang
ff0107f60d Amend and improve VP8 multithreading implementation
There are flaws in current implementation of VP8 multithreading encoder
and decoder as reported in the following issue:
https://code.google.com/p/chromium/issues/detail?id=158922

Although the data race warnings are harmless, and wouldn't cause real
problems while encoding and decoding videos, it is better to fix the
warnings so that VP8 code could pass the TSan test.

To synchronize the thread-shared data access and maintain the speed
(i.e. decoding speed), use multiple mutexes based on mb_rows to reduce
the number of synchronizations needed, make the reads and writes of
the shared data protected, and reduce the number of mb_col writes by
nsync times.

The decoder speed tests showed < 3% speed loss while using 2 ~ 4
threads.

Change-Id: Ie296defffcd86a693188b668270d811964227882
2016-01-08 11:59:49 -08:00
James Zern
44fe73ec37 Merge "vp8: fix loop filter level clamping" 2015-12-09 01:38:09 +00:00
James Zern
2e693eb80e vp8: fix loop filter level clamping
the loop filter level is transmitted as 6-bits + sign so needs to be clamped in
the delta + absolute case.

BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1224363

Change-Id: Icbdca4fdbf043466429bd5c9d59dbe913bf153bc
2015-12-03 16:18:48 -08:00
James Zern
ff3674a15e vp8: fix quantizer clamping
the quantizer is transmitted as 7-bits + sign so needs to be clamped in
the delta + absolute case.

BUG=https://bugzilla.mozilla.org/show_bug.cgi?id=1224361

Change-Id: I9115f5d1d5cf7e0a1d149d79486d9d17de9b9639
2015-12-03 16:16:28 -08:00
Ronald S. Bultje
92c4d8149a Merge "vp10: add extended-intra prediction edges experiment." 2015-10-20 15:57:05 +00:00
James Zern
a046f56491 vp8cx: remove deprecated reference/entropy controls
VP8E_UPD_ENTROPY, VP8E_UPD_REFERENCE and VP8E_USE_REFERENCE have been
deprecated since the initial public release

Change-Id: Ied16b441eec13434d85f1ab115d49ccaf5f2f7b0
2015-10-16 17:02:36 -07:00
Ronald S. Bultje
c7dc1d78bf vp10: add extended-intra prediction edges experiment.
This experiment allows using full above/right edges for all transform
sizes whenever available (for d45/d63), and adds bottom/left edges for
d207.

See issue 1043.

Change-Id: I5cf7f345e783e8539bb6b6d2c9972fb1d6d0a78b
2015-10-16 19:30:39 -04:00
Ronald S. Bultje
b1d85bf60f vp8: align left pixel array by 16 bytes.
The x86 simd expects this. Identical alignment can be found in vp9
and vp10 also. Fixes crashes on 32bit x86 systems.

Change-Id: I229c88d8f696acbef5337c8fa9503528df4e1c40
2015-10-01 10:11:54 -04:00
Ronald S. Bultje
c26a9ecaa2 vp8: change build_intra4x4_predictors() to use vpx_dsp.
I've added a few new functions (d45e, d63e, he, ve) to cover the
filtered h/v 4x4 predictors that are vp8-specific, the "correct"
d45 with the correctly filtered bottom-right pixel (as opposed to
the unfiltered version in vp9), and the "broken" d63 with weirdly
filtered bottom-right pixels (which is correctly filtered in vp9).

There may be a minor performance impact on all systems because we
have to do an extra copy of the Above pixel array to incorporate
the topleft pixel in the same array (thus fitting the vpx_dsp API).
In addition, armv6 will have a more serious performance impact b/c
I removed the armv6/vp8-specific assembly. I'm not sure anyone
cares...

Change-Id: I7f9e5ebee11d8e21aca2cd517a69eefc181b2e86
2015-09-30 18:45:49 -04:00
Ronald S. Bultje
7cdcfee82c vp8: change build_intra_predictors_mbuv_s to use vpx_dsp.
Change-Id: I936c2430c3c5b1e0ab5dec0a20110525e925b5e4
2015-09-30 18:45:46 -04:00
Ronald S. Bultje
54d48955f6 vp8: change build_intra_predictors_mby_s to use vpx_dsp.
Change-Id: I2000820e0c04de2c975d370a0cf7145330289bb2
2015-09-30 18:45:40 -04:00
Marco Paniconi
7d28d12ef3 Merge "VP8: Update rate correction factor for drop_overshoot feature." 2015-09-28 19:53:10 +00:00
Marco
bd3088fd56 VP8: Update rate correction factor for drop_overshoot feature.
Update rate correction factor when we drop the frame due to overshoot.
Only affects when the drop_overshoot feature is on: screen_content_mode = 2.

Change-Id: I67e24de979b4c74744151d2ceb3cd75fec2a1e7a
2015-09-28 12:11:33 -07:00
Ronald S. Bultje
812945a8f1 vp9/10: improve support for render_width/height.
In the decoder, map this to the output variable vpx_image_t.r_w/h.
This is intended as an improved version of VP9D_GET_DISPLAY_SIZE,
which doesn't work with parallel frame decoding. In the encoder,
map this to a codec control func (VP9E_SET_RENDER_SIZE) that takes
a w/h pair argument in a int[2] (identical to VP9D_GET_DISPLAY_SIZE).

Also add render_size to the encoder_param_get_to_decoder unit test.

See issue 1030.

Change-Id: I12124c13602d832bf4c44090db08c1009c94c7e8
2015-09-25 22:18:22 -04:00
Marco
ece841f03f VP8: Adjust rate correction factor for drop due to overshoot.
Change-Id: Id70ca2e18a46247720eb631ae13a8430bd8b0954
2015-09-24 16:40:29 -07:00
Marco
3140e90175 vp8: Small adjustment to cyclic_refresh max_mbs_perframe.
For 3 temporal layers, reduce somewhat the
cyclic_refresh_mode_max_mbs_perframe parameter, from 20% to ~14%.
Small increase in PSNR/SSIM metrics.

Change-Id: Ia216fa5474048f1ef7fe3db88cd60dfef2a1bf8a
2015-09-09 15:34:58 -07:00
Debargha Mukherjee
1c8567ff09 Remove some trailing whitespaces
Change-Id: Icf06d35ca347713253d1eba341a894b51efa81a9
2015-09-08 01:31:04 -07:00
Johann
c7f58bcc70 Only build multithreaded functions on mt builds.
Change-Id: I2e0cc72a0543bfea1d2d3499b9906519d5cb3f15
2015-09-01 17:05:05 -07:00
Johann
c5f11912ae Include vpx_dsp_common.h when using VPXMIN/MAX
Change-Id: I2e387a06484a06301f3cd6600c4ba2f4335b61ee
2015-08-31 14:36:35 -07:00
Marco Paniconi
4dcbf0a809 Merge "vp8: modifcatiion to skin map computation." 2015-08-28 21:49:56 +00:00
James Zern
820302a394 vp8: use VPX(MIN|MAX) from vpx_dsp_common.h
remove MIN/MAX defines in vp8/common/common.h

Change-Id: I41520f34af175e05b263ebd12198f4de29a967db
2015-08-27 15:31:24 -07:00
Johann Koenig
5c245a46d8 Merge changes I53b5bdc5,Ib81168a7,Ie0113945
* changes:
  Only build ssse3 filter functions on 64 bit
  Clean up unused function warnings in vp8 encoder
  Clean up unused function warnings in vp8 onyx_if.c
2015-08-27 20:58:53 +00:00
Johann Koenig
0ae1c83277 Merge "Clean up unused function warnings in vp8 common" 2015-08-27 20:57:23 +00:00
James Zern
205532f3a7 Merge changes I56fad85c,I7401a70a
* changes:
  vp8e_encode: check validate_config return
  vp9_update_layer_...config: delete dead assignment
2015-08-27 03:02:57 +00:00
Johann Koenig
c50f6739f8 Merge "Clean up unused function warnings in vp8 decoder" 2015-08-26 18:36:10 +00:00
Johann
06ba5254ee Clean up unused function warnings in vp8 encoder
Mark rdopt.h and treewriter.h functions with INLINE.

Change-Id: Ib81168a709d09dfba7de16c596133310e04c6656
2015-08-26 10:32:12 -07:00
Johann
821f02947e Clean up unused function warnings in vp8 onyx_if.c
Remove really unused segmentation_test_function

Hide decide_key_frame and recode_loop_test under non-realtime check.

Change-Id: Ie0113945ffbd096dbb89a553548f526b2a0ee0c6
2015-08-26 10:29:42 -07:00
Johann
5c055cc4cf Clean up unused function warnings in vp8 common
Mark functions in findnearmv.h, invtrans.h and setupintrarecon.h
with INLINE.

Hide function in postproc.h behind the same #if as it's callers.

Change-Id: Ic1e014a943d2aca280f137019218b9d4f1443d61
2015-08-26 10:15:24 -07:00
Johann
51b654e8f0 Remove vp8_priv_sz
This is a leftover of the XMA code which was removed a long time ago.

Found while looking for unused functions.

Change-Id: I07a3d542ae55440af59380dcdcf9a6c11cdfcb75
2015-08-26 17:10:41 +00:00
Johann
690971898b Clean up unused function warnings in vp8 decoder
Mark functions in dboolhuff.h and treereader.h with INLINE.

Change-Id: Ifc1008de0713c8d43f4fec83a8c2b836622be365
2015-08-26 17:10:30 +00:00
James Zern
c0523090be vp8e_encode: check validate_config return
Change-Id: I56fad85cae4537f9d68febf9b9264c3e1cf82ce1
2015-08-25 18:45:05 -07:00
Johann
467c66e842 Mark Scale2Ratio INLINE
WebRTC builds with -Wunused-function do not like all the uses of onyx.h

Change-Id: Ic57cb143b48df9c9895f94b5f8f395c260fa7025
2015-08-25 14:56:18 -07:00
Yaowu Xu
a1ec3eb326 Limit new motion vector size
This commit adds clamp of new vectors similar to the logic in RD loop.
Such clamp is not necessary from the perspective of VP8 bitstream, but
is added to improve ChromeCast mirroring's robustness.

Change-Id: I42f6adbc60ffce283b994869364230858632d6fa
2015-08-25 10:00:34 -07:00
Marco
ee380cc5c4 vp8: modifcatiion to skin map computation.
For each block in pickinter: use average of four middle
pixels (instead of single pixel) to set skin map.
This can help a little in reducing false skin detection in
some cases.

Change-Id: Ic247af75e9c2948b08ab977a39e061adacd8ec97
2015-08-24 15:35:03 -07:00
Johann Koenig
5942839d2d Merge "Rename vp8 loopfilter_filters_dspr2.c" 2015-08-18 23:09:03 +00:00
Johann
e7aa2d9b21 Rename vp8 loopfilter_filters_dspr2.c
Change-Id: I914b456558edbdee5eefdfba731bc70d3d5f5d53
2015-08-18 15:10:37 -07:00
Johann
4e5e5fc52b Rename vp8 loopfilter[_neon.c]
Avoid conflict with vpx_dsp version

Change-Id: I041b1532a9276400a5547de8dfed1de43ad4e83d
2015-08-18 11:47:00 -07:00
Johann
79a00d71bd Rename vp8 quantize.c
Move it to vp8_quantize.c and make sure to
use the full path for all vp8 includes of quantize.h

Change-Id: I284651ff681707385f4924ea7db1541905c1624a
2015-08-18 11:44:32 -07:00
Alex Converse
d816fa7bfd Replace VP8 SSIM with VP9 derived vpx_dsp SSIM.
Change-Id: Ic61f30af12d1b01c1d5adc4e08bc20e20ad38027
2015-08-07 11:20:05 -07:00
Ghislain MARY
3067c34c5a Support build with Visual Studio 14.
Change-Id: Id0d7c19857e29b66c652c8cc1ab56b64e4fc0fa3
2015-08-05 14:45:16 -07:00
Johann Koenig
ac29aa135c Merge "Rename vp8 loopfilter_mmx.asm" 2015-08-04 15:55:48 +00:00
Johann
749c393c8d Rename vp8 loopfilter_mmx.asm
Chromium puts all the yasm output in the same directory. Looking at ways
to improve this but in the meantime get rid of collisions.

Change-Id: I923c5231d14e895ab96521eb89807ede868a0753
2015-08-03 14:27:03 -07:00
Parag Salasakar
d35f992599 mips msa vp8 denoising filter optimization
average improvement ~2x-3x

Change-Id: I6c17012c731fa4d56e0343f8de0df47b2dde289b
2015-08-01 08:05:25 +05:30
Parag Salasakar
8fbc641540 mips msa vp8 temporal filter optimization
average improvement ~2x-3x

Change-Id: I05593bed583234dc7809aaec6cab82773a29505d
2015-07-31 12:03:19 +05:30
Parag Salasakar
0e3f494b21 mips msa vp8 block subtract optimization
average improvement ~2x-3x

Change-Id: I30abf4c92cddcc9e87b7a40d4106076e1ec701c2
2015-07-31 09:29:10 +05:30
Parag Salasakar
56aa0da405 mips msa vp8 quantize optimization
average improvement ~2x-3x

Change-Id: I6fc37191bf9cb5a67e1af9787d0d27659c17bdba
2015-07-30 12:56:57 -07:00
Parag Salasakar
0c2a14f9e2 mips msa vp8 fdct optimization
average improvement ~2x-4x

Change-Id: Id0bc600440f7ef53348f585ebadb1ac6869e9a00
2015-07-30 08:14:42 +05:30
Parag Salasakar
7c6ae373ac Merge "mips msa vp8 post proc optimization" 2015-07-30 02:34:06 +00:00
Yaowu Xu
f23241087a Add const to a variable declaration
Change-Id: Idf572c22a87098665f5179dc3212a06d9a85a342
2015-07-29 16:27:34 -07:00
Yaowu Xu
47c55acdad Fix a typo
Change-Id: Ief8eea8fe6bef139d1e94f8d6dfac5a44efe785d
2015-07-29 16:23:14 -07:00
Parag Salasakar
a5d9416fd7 mips msa vp8 post proc optimization
average improvement ~2x-4x

Change-Id: I93abc15389649c169bb8b69127c0b95407d34692
2015-07-29 09:40:26 +05:30
Parag Salasakar
5deb983744 mips msa vp8 filter by weight optimization
average improvement ~3x-5x

Change-Id: Ia808ae56b118e0e1b293901447aa5a0f597b405b
2015-07-28 08:16:34 +05:30
Parag Salasakar
af6733aec6 mips msa vp8 recon intra optimization
average improvement ~3x-5x

Change-Id: I73306863e9bf172d5adc06b8dd54e43985d1e063
2015-07-25 12:32:26 +05:30
Parag Salasakar
fb73ceae85 mips msa vp8 bilinear filter optimization
average improvement ~3x-4x

Change-Id: I8c0b3d5c86c9eb4f802b87c971864d2cfceeb7cc
2015-07-24 09:21:35 +05:30
Parag Salasakar
509fb0bc9d mips msa vp8 copy mem optimization
average improvement ~2x-4x

Change-Id: I3af3ecced96c5b8e0cb811256e5089e28fe013a2
2015-07-23 10:29:40 +05:30
Parag Salasakar
55c0df5ef1 mips msa vp8 sixtap filter optimization
average improvement ~3x-5x

Change-Id: I5fd88cb088814be443d04be384b9fca99b22adef
2015-07-13 09:23:52 +05:30
Parag Salasakar
e4fb53ea6e Merge "mips msa vp8 loop filter optimization" 2015-07-13 01:16:45 +00:00
Parag Salasakar
0ea2684c2c mips msa vp8 loop filter optimization
average improvement ~2x-4x

Change-Id: I20c4f900ef95d99b18f9cf4db592cd352c2212eb
2015-07-08 12:41:00 +05:30
Johann
0f96939ceb Use 'unsigned long' for _BitScanReverse parameter
New clang warnings in chromium reveal an incompatible pointer being
passed.

Change-Id: I0d893993726ecf899f467c16175bfb8c76329731
https://code.google.com/p/chromium/issues/detail?id=504696
2015-07-07 17:45:06 -07:00
Johann
6a82f0d7fb Move sub pixel variance to vpx_dsp
Change-Id: I66bf6720c396c89aa2d1fd26d5d52bf5d5e3dff1
2015-07-07 15:51:04 -07:00
Jingning Han
9d251f9510 Merge "Unify subtract function used in VP8/9" 2015-07-07 20:42:19 +00:00
Parag Salasakar
45b7e160d8 Merge "mips msa vp8 idct optimization" 2015-07-07 18:14:20 +00:00
Jingning Han
0ede9f52b7 Unify subtract function used in VP8/9
This commit replaces the vp8_ prefixed subtract function with the
common vpx_subtract_block function. It removes redundant SIMD
optimization codes and unit tests.

Change-Id: I42e086c32c93c6125e452dcaa6ed04337fe028d9
2015-07-07 09:57:44 -07:00
Parag Salasakar
3d938d71b0 mips msa vp8 idct optimization
average improvement ~2x-5x

Change-Id: I19e82f78772993bcd67fcf975fe180232172f86d
2015-07-07 12:41:54 +05:30
Jingning Han
432cd4bfb7 Move subtract functions from vp9 to vpx_dsp
Factor out the subtraction operator as common function.

Change-Id: I526e703477c6a290e0e3e3c8898f8bb1ca82779b
2015-07-06 12:22:47 -07:00
James Zern
dcf5b7cfdd loopfiltersimpleverticaledge_neon: quiet uninit var warnings
take 2. localize the function parameter to actually remove the warning

Change-Id: I23c02061b5e21b0b75bd33c26062d1e531df7b92
2015-06-30 23:23:59 -07:00
James Zern
69c153c4e6 loopfiltersimpleverticaledge_neon: quiet uninit var warnings
the vector used in vld*_lane_* should be initialized before use

Change-Id: Idce95354737915f6fb4e6b5e8980a050e953036d
2015-06-25 20:39:21 -07:00
James Zern
f4d746a3c1 idct_dequant_0_2x_neon: quiet uninit var warnings
the vector used in vld*_lane_* should be initialized before use

Change-Id: I6b791088479fec3bc021ca75cc2af5adcc39d954
2015-06-25 20:29:35 -07:00
James Zern
4bd87a9b9e vp8_subpixelvariance_neon: right size coeff table
only uint8 is required; each use only loads one value as a uint8
quiets a few type conversion warnings

Change-Id: I03dc0dc0eb01ac23a6e8673daa2b77c6c57bf1b0
2015-06-23 23:48:12 -07:00
Johann
907b33cdc4 Move vp8 variance files
There is a naming conflict in the chromium build system.

The rest of the variance functions will move to vpx_dsp soon.

Change-Id: Iff78da2aafb0d7380eda73e38d7dac72110a1e47
2015-06-18 16:42:28 -07:00
James Zern
47fe535422 disable vp8_sub_pixel_variance8x8_neon
fails unit tests:
[  FAILED  ] NEON/VP8SubpelVarianceTest.ExtremeRef/0, where GetParam() = (3, 3, 0x14e36d, 0)
[  FAILED  ] NEON/VP8SubpelVarianceTest.Ref/0, where GetParam() = (3, 3, 0x14e36d, 0)

the tests were recently enabled in:
eb88b17 Make vp9 subpixel match vp8

the functions likely haven't changed since being converted from assembly

Change-Id: I6141717b111b8f735f436c160d74270af53ef722
2015-06-05 20:18:51 -07:00
Johann
516c087c51 Remove unused sub pixel mse
Change-Id: I7a5e4e2632c3fa69d2a85a68fa9b418631caf09c
2015-06-03 08:00:51 -07:00
Johann
86d0cb8325 Disable neon bilinear 4x4
Clang adds alignment hints when casting up the loads/stores. Although
this should be safe for most paths, it's causing some crashes. Either
the source of the misalignment needs to be determined and adjusted or
the intrinsics need to be rewritten to avoid using the cast to load the
data.

BUG=817,892

Change-Id: Ia3aa824d6a4cd97e14325ff49dc730b6f85ec7e8
2015-06-02 00:02:55 +00:00
Johnny Klonaris
d02aa04422 Adds subsecond frame rates to webm
Numerator was being range checked against the
denominator - preventing any frame rate slower
than 1 fps.

I've tested this on a Mac using using ffmpeg and
results are comparable to mp4 and ogg files generated
at the same time.

Not yet tested on Windows.

Johnny Klonaris
google@jawknee.com

Change-Id: Idb358dbc2e7dc000037880ede4a1b0df248a42c8
2015-06-01 10:13:58 -07:00
Johann
dee70d355f Merge "Move variance functions to vpx_dsp" 2015-05-26 23:02:11 +00:00
Johann
c3bdffb0a5 Move variance functions to vpx_dsp
subpel functions will be moved in another patch.

Change-Id: Idb2e049bad0b9b32ac42cc7731cd6903de2826ce
2015-05-26 12:01:52 -07:00
Marco
7ca17435d5 Fix to visual studio build error.
Change-Id: Ide080141ebc064584574c861fb324fe64cc572cc
2015-05-21 14:08:32 -07:00
Marco
6f41e29064 vp8_drop_encodedframe_overshoot: fix to return setting.
Make sure force_maxqp is set to 0 for return 0.

Change-Id: Ie7c57842637226e932a390e7080e5ebb99996da3
2015-05-20 12:26:08 -07:00
Marco
976f7f42c1 VP8: For high overshoot, force drop frame and max-out QP.
This allows rate control to react to content of current frame being encoded.
Enabling this feature via the setting: screen_content_mode = 2.

Change-Id: Ib2c6670551d96f4907495d5b7b76bb8c49e673db
2015-05-19 08:19:21 -07:00
James Zern
60b9f685cb vp8/rdopt.h+onyx_int.h: add some missing prototypes
silences missing prototype warnings

Change-Id: Icd477e37b502205d0a60e7389e51b1ba17d8888e
2015-05-14 22:41:26 -07:00
James Zern
62ad8baa40 vp8: add some missing includes
silences missing prototype warnings

Change-Id: Ib62e4743532b871e63bc99732875fff20501b8ac
2015-05-14 22:41:25 -07:00
James Zern
632177fa7f vp8: make some functions static
silences missing prototype warnings

Change-Id: I9f24a3214c832c982ca0dc5a032316eba48472ff
2015-05-14 22:41:25 -07:00
James Zern
f80bbc0efb vp8/common/variance*: add vp8_rtcd include
silences missing prototype warnings

Change-Id: I5ca198b56a5ff0cf5b93c89957526f243c04e9c8
2015-05-14 22:41:25 -07:00
James Zern
6eb1016301 vp8_copy32xn: sync function signature
+ include vp8_rtcd.h in copy_c.c
silences missing prototype warnings

Change-Id: Iecc279c695b08a26b231dedb41e3b84c551703f3
2015-05-14 22:41:13 -07:00
Johann
11a4a3c065 Merge "Remove only remaining uses of 'fast_unaligned'" 2015-05-07 23:32:18 +00:00
Johann
802e1d84cc Remove only remaining uses of 'fast_unaligned'
Use memcpy instead of casting.

Change-Id: Ieca725cc628883985bde23c7d742af8781c5dbb5
2015-05-07 14:39:37 -07:00
James Zern
fd3658b0e4 replace DECLARE_ALIGNED_ARRAY w/DECLARE_ALIGNED
this macro was used inconsistently and only differs in behavior from
DECLARE_ALIGNED when an alignment attribute is unavailable. this macro
is used with calls to assembly, while generic c-code doesn't rely on it,
so in a c-only build without an alignment attribute the code will
function as expected.

Change-Id: Ie9d06d4028c0de17c63b3a27e6c1b0491cc4ea79
2015-05-07 11:55:08 -07:00
Johann
d5d9289800 Move shared SAD code to vpx_dsp
Create a new component, vpx_dsp, for code that can be shared
between codecs. Move the SAD code into the component.

This reduces the size of vpxenc/dec by 36k on x86_64 builds.

Change-Id: I73f837ddaecac6b350bf757af0cfe19c4ab9327a
2015-05-06 16:58:20 -07:00
James Zern
f58011ada5 vpx_mem: remove vpx_memset
vestigial. replace instances with memset() which they already were being
defined to.

Change-Id: Ie030cfaaa3e890dd92cf1a995fcb1927ba175201
2015-04-28 20:00:59 -07:00
James Zern
f274c2199b vpx_mem: remove vpx_memcpy
vestigial. replace instances with memcpy() which they already were being
defined to.

Change-Id: Icfd1b0bc5d95b70efab91b9ae777ace1e81d2d7c
2015-04-28 19:59:41 -07:00
James Zern
fbd3b89488 vpx_mem: remove vpx_memmove
vestigial. replace instances with memmove() which they already were
being defined to.

Change-Id: If396d3f9e3cf79c0ee5d7429615ef3d6b2a34afa
2015-04-28 19:59:40 -07:00
Johann
14ef4aeafb Reorganize *_rtcd() calling conventions
Change-Id: Ib1e17d8aae9b713b87f560ab5e49952ee2bfdcc2
2015-04-15 11:12:05 -04:00
James Zern
5afa7d1f87 vp8_regular_quantize_b_sse2: remove dead init
Change-Id: Ide5eefadbb3cab38743a69f744a003abb37a6506
2015-04-03 16:44:16 -07:00
James Zern
30205e14b7 vp8cx_pick_filter_level*: remove dead inits
Change-Id: I28026b86d03264b9f4e2fc8ac1d3c74aa3954208
2015-04-03 16:44:15 -07:00
James Zern
acb219be25 vp8_decode_frame: remove dead increment
Change-Id: Ie9a6fac02796d24e6f4a15416d0b4c19010547df
2015-04-03 16:44:15 -07:00
James Zern
0c5a140a02 rdopt: remove dead stores
Change-Id: Ia8a20c6751cc6d63c60bb00b99c78faca1e61051
2015-04-03 16:44:14 -07:00
James Zern
04c53d2393 find_next_key_frame: remove dead init & store
Change-Id: I8c7f5b9718ef14e4397a263aa9f52a9edcf7d1cd
2015-04-03 16:43:48 -07:00
James Zern
970acffa8f multiframe_quality_enhance_block: remove dead stores
Change-Id: I33ca9cddfdd54c3d8a23c1cb978986a537a20bf2
2015-04-03 16:15:51 -07:00
James Zern
7b4f727959 vp8_print_modes_and_motion_vectors: remove dead stores
Change-Id: I438cbf4970fa2220fb73b0b41a29e654836d4e3b
2015-04-03 16:08:37 -07:00
Johann
bc98e93b53 Remove PPC build support
There are no functional optimizations for AltiVec/PPC

Change-Id: I6877a7a9739017fe36fc769be22679c65ea99976
2015-04-02 09:13:59 -07:00
Johann
46ce6954cc Remove duplicate code from merge
Change-Id: I5e2a1270001b7e29f3f198d57ea40e1efccef367
2015-03-26 14:56:24 -07:00
James Zern
fef91c9040 vp[89]_cx_iface.c: remove obsolete ABI checks
Change-Id: I49a7017e8adc18ff03d748cb328814a8a3e1bcf6
2015-03-20 14:50:14 -07:00
Yunqing Wang
d6a2e29028 vp8: fix a bug in the internal PSNR calculation
While CONFIG_INTERNAL_STATS=1, PSNR is calculated while encoding.
The aligned width/height were used mistakenly in the calculation.
This patch fixed it, and used the orignal image width/height.

Change-Id: Iad5334f8693af761b71ebb78f2587db8a3404ecf
2015-03-19 12:56:25 -07:00
Johann
08acc349b3 Remove last remnants of obj_int_extract
Change-Id: Icc7da6027763b5ed7cbfe70ffe271103ead59fe1
2015-03-18 11:06:53 -07:00
Adrian Grange
f29961dbd7 Add missing initializer to VP8 codec interface
Change-Id: Ia164ba03fb732e9c9e520e4aa2d75b7eadff6165
2015-02-12 09:53:52 -08:00
Johann
eabb793f3b Use correct buffer size in vp8 subpixel variance
In vp8_sub_pixel_variance8x8_neon the temp2 buffer is only initialized
to kHeight8 * kWidth8. However, in the case that xoffset != 0 and
yoffset == 0, var_filter_block2d_bil_w8 is called with output_width
kHeight8PlusOne.

Thanks to cmugurel for diagnosing and yulius for the patch.

Change-Id: Ib71ffd96ffad963c92b8b7ca23f303942785b8e0
https://code.google.com/p/webrtc/issues/detail?id=4190
2015-02-03 09:11:05 -08:00
Johann
04168d41cb Explicitly include vp8_rtcd.h
When referencing RTCD functions make sure the relevant
header file is included.

Change-Id: Ia0d7112d4aff9b4d8fa94648f0702371b7484031
https://code.google.com/p/webm/issues/detail?id=937
2015-01-29 09:59:16 -08:00
Alex Converse
581731a95f vp8enc: Prevent out of bounds memory access.
Prevent out of bounds access when attempting to increase frame size

Change-Id: I710c40c692802a72963c9680c2125da17f9060a9
2015-01-27 16:44:31 -08:00
Marco
2c6d9c574f vp8: Fix to crash in pick_inter.
Added unittest that triggers the crash without this fix.

Issue: https://code.google.com/p/webm/issues/detail?id=911

Change-Id: If5208ceb210c821891675fdf3d9951ab83d52ae6
2015-01-12 11:53:26 -08:00
Yaowu Xu
4fcf726a0e Return error on wrong sync code
Not initialize codec stream info

This fixes vp8 fuzzing issue reported at build #56

Change-Id: I307ac839b4f4bda3a02a551019c0d688dba19c86
2015-01-05 17:19:32 -08:00
Jim Bankoski
f4eab151c5 Revert "remove vp8 unused uvstride parm in simple loop filter"
This reverts commit 392a2c43c7

Failing nexus build tests:
http://build.chromium.org/p/client.libvpx/builders/Nexus%207%20Builder/builds/224

Change-Id: I95ae2c894b70cef9c757334fcab7fdeca9003e9c
2014-12-21 21:35:07 -08:00
Jim Bankoski
2c5dc477bf Merge "remove vp8 unused uvstride parm in simple loop filter" 2014-12-21 16:49:45 -08:00
Johann
80b344dec5 Silence -Werror=unused-parameter
Cast away remaining issues so that new ones don't get lost in the noise.

Change-Id: Iacd6999b0686ce80f9835730d68db6382690fa92
2014-12-16 12:47:08 -08:00
hkuang
9353607ac8 Fix a bug that break the vp8 fragment decoder.
(issue #882).

Change-Id: I2ca7f96d390c4eaec0473c50cb01b903d0bd3ee6
2014-12-12 16:44:14 -08:00
Marco
af898b56bb Various updates to vp8.
Change-Id: Icc7a816491897107764e4c936288e9000e6319b8
2014-12-03 16:01:28 -08:00
Johann
08ad7e4db5 Correctly initialize "ones" value in neon quantize
By using 0xff for a short it was not setting the high bits. When
comparing the output with vtst to find non-zero elements it was skipping
vaules which had no low bits set such as -512 / 0xFE00.

Using -8191 as the first element of coeff will generate this condition.

BUG=883

Change-Id: Ia1e10fb809d1e7866f28c56769fe703e6231a657
2014-11-20 18:34:45 -08:00
Johann
6eec73a747 Remove asm offset dependencies
The obj_int_extract code is no longer worth maintaining. It creates
significant issues when adapting for different build systems and no
longer offers as significant of a performance benefit due to
improvements in intrinsics.

Source files will remain until the various third-party builds are updated.

The neon fast quantizer has been moved to intrinsics. The armv6 version
has been removed because so few remaining targets require it.

Compilers and processors have improved significantly since the
pack_tokens code was written. The assembly is no longer faster than the
C code.

pack_tokens were the only optimizations for the armv5te targets so the targets
will be removed after the test infrastructure has been updated.

BUG=710

Change-Id: Ic785b167cd9f95eeff31c7c76b7b736c07fb30eb
2014-11-06 16:00:01 -08:00
Johann
c4b3625393 Merge "Remove pair quantization" 2014-11-04 16:29:19 -08:00
Johann
412eaaf090 Merge "vp8 quantization -> intrinsics" 2014-11-04 16:28:46 -08:00
Johann
b4957234af Avoid divide-by-zero in vp8 initialization
Check that the numerator is not zero. If it is, guess 30fps.

Fixes a clang IOC error in the quantize test. It's very unlikely for
this to occur in the wild because the setup in the quantize test is very
nonstandard.

Change-Id: Icdab7b81d4e168d3423e14db20787f960052e0c3
2014-11-04 12:52:10 -08:00
Johann
2134eb2f05 Remove pair quantization
The intrinsics version of the pair quant is slower than running it
individually.

Change-Id: I7b4ea8599d4aab04be0a5a0c59b8b29a7fc283f4
2014-10-31 13:42:55 -07:00
Johann
7ae75c3d52 vp8 quantization -> intrinsics
Use intrinsics for neon quantization. Slight loss (<5%) of performance
compared to the assembly. Roughly 10x faster on arm64 because that was
running C code before.

Change-Id: I7cf5242d8f29b7eab5bca6a1c20c89c9fc9ca66d
2014-10-31 13:42:13 -07:00
Marco
fe2fd37bb2 vp8: Updates to noise level estimate.
-Use full bandwidth (when temporal layers is on) for checking switching.
-Normalize metric wrt num_blocks.
-Rounding fix to update of average noise level metric.
-Make default internal denoiser mode == kDenoiserOnYUV (in denoiser set_parameters()).
-Adjust some thresholds.

Change-Id: Ib827512b25a7bf1f66c76d3045f3a68ce56b1cd2
2014-10-24 09:36:18 -07:00
JackyChen
897500b9ba Merge "vp9_denoiser_sse2.c: improve code style." 2014-10-22 13:52:03 -07:00
JackyChen
5cba6516aa vp9_denoiser_sse2.c: improve code style.
denoiser_sse2.c: fix typos in comment.

Change-Id: Ic0fb102331b0e533c058da3cab1fbc30de9a0070
2014-10-22 10:55:54 -07:00
Marco
d166be653e vp8: Update to computation of noise level.
Avoid unneeded computation of mse in process_denoise.

Change-Id: I3a538178f2d138750d0c38ea4dd05dbbc2b7df41
2014-10-22 10:38:24 -07:00
Marco
6f77bff6aa Updates to aggressive denoising mode.
Fix to the noise level and bitrate threshold settings per resolution.

Change-Id: I25524b7f78afa1aeb76edef7be13c17bc8976508
2014-10-17 15:57:25 -07:00
Deb Mukherjee
a349ee3bf5 Resolves some lint errors
And also fixes some style consistency issues.

Change-Id: I3dc6d44e17d2d6075dc9b02c4255a7395046c5e0
2014-10-13 16:05:44 -07:00
Marco
3b789d3693 vp8: Suppress denoising with respect to old reference frames.
If the GOLDEN or ALTREF frame was last updated > x frames in the past,
don't use them for denoising (only consider LAST). Using an old reference
frame for denoising, e.g., if it is a long-term reference or the last key frame,
can cause some visible artifacts, in particular in the aggressive denoising mode.

Change-Id: I239c9fbb092c36cba7e95328f1fa67a58d6a7ed9
2014-10-08 12:54:39 -07:00
Johann
587ff646f6 Fix build failure with Android NDK
The version of gcc4.6 included with the Android NDK through r10b
fails to compile this function. Replace it with C code.

BUG=860

Change-Id: Ifcc0476664071aec46a171cdd5ad17305930986a
2014-09-25 12:15:21 -07:00
Johann
d174f2769e Merge "Clarify GCC version check" 2014-09-25 12:12:56 -07:00
Johann
f6be2f3c87 Clarify GCC version check
The version check was incorrectly matching some versions of clang
which reported as gcc 4.2

Change-Id: I686d3576e71883fe1463206b56ab5e2aa9bb68a8
2014-09-25 11:53:45 -07:00
Yaowu Xu
e616504107 Fix IOCs
A left shift of negative value causes IOC runtime warnings, this
commit converts two such left shifts to multiply to avoid IOCs.

Change-Id: I8811428768d7135e6e16af4b3094d0341589a995
2014-09-25 08:58:57 -07:00
Marco
06fce6b640 vp8: Update to the adaptive denoising mode.
Allow for option to apply spatial blur for temporal
denoising, under the aggressive denoising mode.

Change-Id: I41c5fdc0b6cf32d8f8d1d4236b25fa5aa406e89e
2014-09-19 09:06:16 -07:00
Johann
6d44dad4aa Merge "vp8: common: postproc: fix signed overflow of statement of (X +c) >= X when '-Werror=strict-overflow' is set." 2014-09-17 10:18:23 -07:00
Scott LaVarnway
1220b49c89 arm: Fix building vp8_mse16x16_neon.c with MSVC
Use the right return values - vadd_s64 returns int64x1_t, not
a normal int64_t.

Change-Id: Ife17213087c1dfb5faaa647f804d2fd140f3a0eb
2014-09-16 12:36:00 -07:00
Johann
8caba8565a Merge "vp8/vp9: neon: msvc: move the 'ifdef _MSC_VER' bit to vpx_ports/mem.h. fix compiling warning." 2014-09-15 15:53:12 -07:00
Scott LaVarnway
fe2cc873dc VP8 encoder for ARMv8 by using NEON intrinsics 1
Add vp8_mse16x16_neon.c
- vp8_mse16x16_neon
- vp8_get4x4sse_cs_neon

Change-Id: I108952f60a9ae50613f0ce3903c2c81df19d99d0
Signed-off-by: James Yu <james.yu@linaro.org>
2014-09-15 12:04:09 -07:00
Jia Jia
0ae866bd19 vp8/vp9: neon: msvc: move the 'ifdef _MSC_VER' bit to vpx_ports/mem.h.
fix compiling warning.

Change-Id: If8706a9046436f704c597e4275a6810c76ba7daa
2014-09-14 01:43:54 +08:00
Jia Jia
f265dde305 vp8: common: postproc: fix signed overflow of statement of (X +c) >= X when '-Werror=strict-overflow' is set.
Change-Id: I2f78417cc100973c732426f7b6bd10d7304a1a5f
2014-09-14 01:04:05 +08:00
Johann
4bfdc331ad Merge "Remove unused vp8_strict_quantize" 2014-09-12 16:17:18 -07:00
Johann
ad4edc0b4e Merge "Remove unused vp8 quantize functions" 2014-09-12 16:16:52 -07:00
Johann
f1f7bcd289 Remove unused vp8_strict_quantize
Change-Id: I4c35ed2de8b54751b69f4801454a1ccc35b500b0
2014-09-12 15:02:03 -07:00
JackyChen
47380c3350 Fix the bug which made VP8 denoiser not bit-exact between C code and SSE code.
This issue is found when the denoising mode is set to kDenoiserOnYUVAggressive.
Updated the C code to make it the same with SSE version.

I also changed several lines in VP9 denoiser for the code style.

Change-Id: I640d48cf946fe8c6a400e6e252107501d1e226d3
2014-09-10 16:18:43 -07:00
Marco
619951af97 Merge "vp8: Updates for adaptive denoiser mode." 2014-09-09 10:19:27 -07:00
Marco
0c7a9925d6 vp8: Updates for adaptive denoiser mode.
Add qp/bitrate condition, update some settings.

Change-Id: I1af0f102823a886393be063ad9d17d7564753cc7
2014-09-09 09:19:01 -07:00
Johann
23bed46ddd Move vp8_variance_halfpixvar16x16_*_neon definitions
These functions moved from 'neon_asm' to 'neon' in
9293d267d2

Change-Id: I9cb5626c3eec96876a73fb18f2bfc982a5858edb
2014-09-09 08:21:36 -07:00
Jia Jia
395f2e874b vp8 encoder: remove vp8_yv12_copy_partial_frame_neon
Use generic C implementation instead of neon-specific code

Change-Id: Ib322b4ece9cdbd4de76a9eed3d2e9fd1d8542406
2014-09-08 08:59:24 -07:00
Jia Jia
c97f5e8b86 vp8 common: change 'HAVE_NEON_ASM' to 'HAVE_NEON' for compiling functions of NEON intrinsics.
Change-Id: I975e5eac16f8b623ff589f0ec072cdaff2183b04
2014-09-05 12:24:05 +00:00
James Zern
35fadf1d25 bilinearpredict_neon: fix type conversion warnings
make bifilter4_coeff[][] uint8_t, no values exceed this range and
they're loaded with vdup_n_u8().

Change-Id: I921983e9edd828d29820e40ac30a7801dbe0fb4f
2014-09-04 20:50:42 -07:00
Dmitry Kovalev
91998e638e Removing sz member from vpx_codec_priv.
Change-Id: I811526a9ee9f237604f72abe7fc677e39e0f457f
2014-09-04 14:47:42 -07:00
James Zern
f61e00c79d Merge "arm: Fix building vp8_subpixelvariance_neon.c with MSVC" 2014-09-04 11:00:53 -07:00
Scott LaVarnway
ec94967ffe Revert "Revert "VP8 for ARMv8 by using NEON intrinsics 10""
This reverts commit 677fb5123e

Compiles with 4.6.

Change-Id: I7f87048911b6bc28a61741d95501fa45ee97b819
2014-09-04 08:51:20 -07:00
Jia Jia
a51704d9c7 vp8 common: change 'HAVE_NEON_ASM' to 'HAVE_NEON' for compiling idct_blk_neon.c.
Change-Id: Ib89107fb824b5fe58afef6841104d5a27b2e0f2d
2014-09-04 08:40:26 -07:00
Martin Storsjo
0002da32e6 arm: Fix building vp8_subpixelvariance_neon.c with MSVC
Use the right return values - vget_low_s64 returns int64x1_t, not
a normal int64_t.

Also make __builtin_prefetch a no-op on MSVC for this file.

Change-Id: I4d2fce01d0ba106b98d3d53b137803119c2c2c08
2014-09-04 09:49:30 +03:00
Dmitry Kovalev
3820f568da Merge "Consistent allocation of vpx_codec_alg_priv_t." 2014-09-03 19:41:28 -07:00
Marco
01d9023de0 Merge "Make process_denoise_mode_change function cond-compiled." 2014-09-03 13:58:16 -07:00
Scott LaVarnway
dcbfacbb98 Neon version of vp8_build_intra_predictors_mby_s() and
vp8_build_intra_predictors_mbuv_s().

This patch replaces the assembly version with an intrinsic
version.

On a Nexus 7, vpxenc (in realtime mode, speed -12)
reported a performance improvement of ~2.6%.

Change-Id: I9ef65bad929450c0215253fdae1c16c8b4a8f26f
2014-09-03 13:41:27 -07:00
Scott LaVarnway
9293d267d2 VP8 for ARMv8 by using NEON intrinsics 17
Add vp8_subpixelvariance_neon.c
- vp8_sub_pixel_variance16x16_neon_func
- vp8_variance_halfpixvar16x16_h_neon
- vp8_variance_halfpixvar16x16_v_neon
- vp8_variance_halfpixvar16x16_hv_neon
- vp8_sub_pixel_variance8x8_neon

Change-Id: I3e5d85b2eafc26be0eef6a777789b80e4579257b
Signed-off-by: James Yu <james.yu@linaro.org>
2014-09-03 13:33:44 -07:00
Johann
5b788c0cbe Merge "Revert "Revert "VP8 for ARMv8 by using NEON intrinsics 06" This reverts commit 81ad047ee5. Revert "VP8 for ARMv8 by using NEON intrinsics 15" This reverts commit 727af7cebe3698b8493ba6c1360b0a6606c310fb."" 2014-09-03 13:27:11 -07:00
Marco
842454d2aa Make process_denoise_mode_change function cond-compiled.
This function is called only when temporal denoising is enabled.

Change-Id: I25a036e3d628edd34410d6e6fe1f9e68a90a8e56
2014-09-03 11:39:34 -07:00
Dmitry Kovalev
b08fab8808 Consistent allocation of vpx_codec_alg_priv_t.
Change-Id: I5a03496de035fbcf31e4527cd25fcae4627a57a0
2014-09-03 11:01:21 -07:00
Deb Mukherjee
a4ef1a0819 Merge "Adds config opt for highbitdepth + misc. vpx" 2014-09-02 15:41:27 -07:00
Deb Mukherjee
5acfafb18e Adds config opt for highbitdepth + misc. vpx
Adds config parameter vp9_highbitdepth, to support highbitdepth profiles.
Also includes most vpx level high bit-depth functions. However
encode/decode in the highbitdepth profiles will not work until
the rest of the code is in place.

Change-Id: I34c53b253c38873611057a6cbc89a1361b8985a6
2014-09-02 14:37:10 -07:00
Marco
6b649a0db9 Merge "Updates to adaptive/aggressive denoiser mode." 2014-09-02 10:58:41 -07:00
Marco
54575d654c Updates to adaptive/aggressive denoiser mode.
Parameter changes and modification to zero_last bias.

Change-Id: I50a408d47fde049c562bbe95075194cb0f17c31b
2014-09-02 09:47:55 -07:00
Johann
4d10506d84 Merge "Revert "Revert "VP8 for ARMv8 by using NEON intrinsics 08""" 2014-09-02 09:28:14 -07:00
Scott LaVarnway
652ef29d09 Revert "Revert "VP8 for ARMv8 by using NEON intrinsics 08""
This reverts commit 928ff03889

Compiles with 4.6 now.

Change-Id: Ib455da1098bb0e0623248be07579882a425fcbd1
2014-08-29 13:29:36 -07:00
Dmitry Kovalev
73edeb03ea Removing alg_priv from vpx_codec_priv struct.
In order to understand memory layout consider the declaration of the
following structs. The first one is a part of our API:

struct vpx_codec_ctx {
  // ...
  struct vpx_codec_priv *priv;
};

The second one is defined in vpx_codec_internal.h:

struct vpx_codec_priv {
  // ...
};

The following struct is defined 4 times for encoder/decoder VP8/VP9:

struct vpx_codec_alg_priv {
  struct vpx_codec_priv base;
  // ... 
};

Private data allocation for the given ctx:

struct vpx_codec_ctx *ctx = <get>
struct vpx_codec_alg_priv *alg_priv = <allocate>
ctx->priv = (struct vpx_codec_priv *)alg_priv;

The cast works because vpx_codec_alg_priv has a
vpx_codec_priv instance as a first member 'base'.

Change-Id: I10d1afc8c9a7dfda50baade8c7b0296678bdb0d0
2014-08-28 13:51:37 -07:00
Marco
f010b7727a vp8 fix: deallocate denoiser->yv12_last_source
Change-Id: I7f3bc292b1b411e10586f0975143ae996ea78d1d
2014-08-26 10:15:35 -07:00
Dmitry Kovalev
7982b27353 Merge "Removing extraconfig_map from vp8_cx_iface.c." 2014-08-22 17:20:42 -07:00
Dmitry Kovalev
f9fb3b8e0e Replacing 'struct vpx_fixed_buf' with 'vpx_fixed_buf_t’.
Change-Id: Ibbbc5b39429d4b753f0a966b9d84d1d7bf823650
2014-08-22 11:56:31 -07:00
Dmitry Kovalev
48274c64a4 Removing extraconfig_map from vp8_cx_iface.c.
We have just one default set of extra config values, g_usage is
never used with VP8.

Change-Id: If05e2e87bf33c8db10c9d226dbc59381bae475eb
2014-08-21 11:21:18 -07:00
Dmitry Kovalev
eafa7126a0 Merge "Replacing NOT_IMPLMENTED with NULL." 2014-08-21 11:10:00 -07:00
Johann
da63d29921 Merge "VP8 encoder for ARMv8 by using NEON intrinsics 6" 2014-08-21 10:39:02 -07:00
Dmitry Kovalev
cd6d9846b0 Replacing NOT_IMPLMENTED with NULL.
We don’t need to introduce new macro for the null value.

Change-Id: I59dbae25feeebb4e8359095801aecc8bb17d7764
2014-08-20 17:16:28 -07:00
Dmitry Kovalev
f2e652396f Removing iface pointer from vpx_codec_priv.
The iface pointer is already in vpx_codec_ctx struct.

Change-Id: I9fffe27c613a7c94476f185a1e5a53ff6d99f1c6
2014-08-20 12:31:19 -07:00
Johann
a19035e8bb Merge "VP8 encoder for ARMv8 by using NEON intrinsics 3" 2014-08-20 11:54:32 -07:00
Johann
6642efaa17 Merge "VP8 encoder for ARMv8 by using NEON intrinsics 2" 2014-08-20 11:54:23 -07:00