Commit Graph

3083 Commits

Author SHA1 Message Date
James Zern
96797e43b4 vp8: remove extra semicolons
Change-Id: I84e1a293ee033865f82c244e8aaaadfb2fb27e63
2016-07-19 20:44:14 -07:00
clang-tidy
7f3e07f1c8 vp8: apply clang-tidy google-readability-braces-around-statements
applied against an x86_64 configure

clang-tidy-3.7.1 \
  -checks='-*,google-readability-braces-around-statements' \
  -header-filter='.*' -fix
+ clang-format afterward

Change-Id: I6694edeaee89b58b8b3082187e6756561136b459
2016-07-19 12:38:03 -07:00
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