Commit Graph

3262 Commits

Author SHA1 Message Date
Kaustubh Raste
06a6b28d75 Optimize vp8 loopfilter msa functions
Updated code to process in 8bit as saturation/clipping takes care of overflow

Change-Id: I35fb2c0e702fd91309cc391c5a7745a3b619a64c
2016-10-07 15:48:31 +05:30
Linfeng Zhang
7aa27bd62f [vpx highbd lpf NEON 1/6] horizontal 4
BUG=webm:1300

Change-Id: Idf441806e6bf397ff5ecd8776146b3f781f50c40
2016-10-06 14:03:04 -07:00
Kaustubh Raste
f875267ad0 Merge "Modify vp8 idct msa functions store method" 2016-10-06 02:25:42 +00:00
Marco Paniconi
efb56ec3ff Revert "Revert "vp8/encoder/onyx_if.c: apply clang-format""
This reverts commit a7456144ce.

Change-Id: I400987fb26a09e9b9ea42c91f48ea12f7bc37356
2016-10-05 17:59:55 +00:00
Marco Paniconi
a7456144ce Revert "vp8/encoder/onyx_if.c: apply clang-format"
This reverts commit 891a87dccd.

Change-Id: I067b3b6a3cfb5bc760166999948b8087d4c5cb80
2016-10-05 15:45:48 +00:00
Kaustubh Raste
68f6f6c4cc Modify vp8 idct msa functions store method
vp8_short_inv_walsh4x4_msa - Optimized to process in short vector type
Updated below functions to store exact number of bytes in output rather than complete vector
idct4x4_addblk_msa
idct4x4_addconst_msa
dequant_idct4x4_addblk_msa
dequant_idct4x4_addblk_2x_msa
dequant_idct_addconst_2x_msa

Change-Id: Ic1b3752e2421dc7d70a082dcdaab9d140d7e5d9c
2016-10-05 10:12:12 +05:30
clang-format
891a87dccd vp8/encoder/onyx_if.c: apply clang-format
after:
955b3b6 vp8: Allow for cyclic refresh even if error_resilience it off.

Change-Id: Iba189b18c84be8f5140754280c6801cfc387cfcd
2016-10-04 21:12:06 -07:00
Marco
955b3b66bd vp8: Allow for cyclic refresh even if error_resilience it off.
cyclic_refresh was tied to error_resilience mode.
Allow it to be on also for 1 pass CBR mode even if
error_resilience is off.

Other option to use new control for this, but prefer to avoid
that for now.

Change-Id: I3625b292ee059a890e31338b514e211bf0ab5c3e
2016-10-04 14:19:49 -07:00
Sarah Parker
8978704970 Merge "Remove rate deviation metric from vp8" 2016-10-04 18:56:14 +00:00
Sarah Parker
d556d435f3 Remove rate deviation metric from vp8
BUG=b/31780679

Change-Id: I2b2a43b154eeacb4f51a11f6362cc535cfe318da
2016-10-04 11:20:55 -07:00
James Zern
3c00132181 Merge "vp8,frame_buffers: remove unused use_frame_threads" 2016-10-01 01:35:55 +00:00
James Zern
1396d12103 *idct*_neon.c: add missing rtcd include
+ correct declarations as necessary

BUG=webm:1294

Change-Id: I719602df9a56e79188a78e7f8b31257c6d3cc11d
2016-09-30 11:41:26 -07:00
James Zern
f38616e1a2 vp8,frame_buffers: remove unused use_frame_threads
this was never fully implemented

Change-Id: I4640cf84c40ea2cc9c6c12acf116d39df4b04578
2016-09-29 20:24:15 -07:00
Johann
721354fe7f vp8: remove mmx functions
When they have sse2 equivalents.

Change-Id: I158f631a3bcecba57b36093ac10114b1904767a7
2016-09-29 15:25:27 -07:00
Johann
2663b092ae Rename _xmm functions to _sse2
Avoid the extra level of indirection/confusion.

Change-Id: I0555f639d67835df9fb7dac0c75085e9954805f1
2016-09-29 15:23:11 -07:00
Johann
1364cb58b4 Remove vp8_clear_system_state
Use vpx_clear_system_state instead.

Change-Id: Ia3e9122f69a2c690ddd7c7bc54f92ccb9ec18b3e
2016-09-29 13:22:49 -07:00
Johann
c7f9d0719d vp8: clean up rtcd
Remove lines which specify the same name for a function.

Change-Id: I956bd8ce2b81a2a8feab5621d28bd2499c2b4c2d
2016-09-29 12:10:01 -07:00
Johann Koenig
bb27be0dfe Merge "Hook up vp8_diamond_search_sad_sse3" 2016-09-28 20:54:25 +00:00
Johann
e4ddf9db6a Hook up vp8_diamond_search_sad_sse3
The original commit never set any 'specialize' line:
61311e6103

It appears the sadx4 version of function uses sdx4df calls to speed up
the search. There are no sse3 versions of the sdx4df functions, but
there are sse2 and msa versions.

There is a neon version of vpx_sad16x16x4d but not any of the smaller
versions. Perhaps if they existed this function could be expanded to use
them.

Change-Id: I936d7d6b1a3ff6dcd5a4d2322272708c47cdec13
2016-09-27 15:31:49 -07:00
Johann
02fa245d15 mips: clean up wextra warnings
Remove unused zbin variable:
warning: unused parameter ‘zbin’

Use int for loop variables to avoid unsigned conversion:
warning: comparison between signed and unsigned integer expressions

Change-Id: Icea74b870c0ee68a8bf687e796a69392af25a8ad
2016-09-27 13:19:18 -07:00
Johann Koenig
b165451ad5 Merge "Un-Revert "Restore vp8_sixtap_predict4x4_neon"" 2016-09-26 19:11:00 +00:00
Johann
ab0e7a237a Use shifted value for sinpi8sqrt2
The value 35468 changes sign when stored in int16_t:
implicit conversion from 'int' to 'int16_t' (aka 'short')
changes value from 35468 to -30068

This negation requires adding back the original value to compensate.
Shifting the value keeps the value positive and saves a post-vqdmulh
shift.

This technique is used in webp and idct_dequant_full_2x_neon

BUG=b/28027557

Change-Id: I0c5ce09bea170fe08061856c2af6f841a557e0c3
2016-09-23 17:04:18 -07:00
Johann
1d14e42df7 Un-Revert "Restore vp8_sixtap_predict4x4_neon"
This restores d9dce2f48e

Switched to using signed shift-and-narrow. Instead of saturating
negative results to 0, it was saturating them to 255.

BUG=webm:817
BUG=webm:1273

Change-Id: I571095336aa4182e3288b17924fcaaece42b0a49
2016-09-23 14:58:57 -07:00
James Zern
fcf281b6a1 Merge "vp8: remove VP8_SET_DBG* control support" 2016-09-22 00:43:35 +00:00
Johann
2bed8b6acd Keep vp8 sixtap read within bounds
When filtering it needs 6 pixels: 2 prior to the source, the source, and
3 after the source.

When filtering 16 wide, that means 21. To accomplish this the SSE2 reads
[-2] to [5], [6] to [13], and [14] to [21], a total of 24 bytes (reading
in groups of 8 is easy)

The filter then shifts this last set to the top half of the register and
uses 'or' to combine it with the previous set.

Valgrind detected an issue reading pixels [19], [20] and [21]:
Address 0x7f581c2 is 434 bytes inside a block of size 441 alloc'd

Note: we only need pixels [16], [17], and [18] as context for [15].

To fix this, it now reads 8 bytes starting at [11], which re-loads [11]
through [13], but stops at [18] and does not over-read any values.

This is shifted by 5 and 'or'd with xmm1. Although the lower bits are
not cleared, they overlap directly with [11] through [13], so 'or'
produces the correct results.

Change-Id: I0c89c03afa660fc9b0108ac055d7bd403e493320
2016-09-21 16:17:07 -07:00
James Zern
3f72509587 vp8: remove VP8_SET_DBG* control support
the --enable-postproc-visualizer configure option remains as a no-op as
do the control names and values for compatibility
+ remove the corresponding debug flags from vpxdec: --pp-*

Change-Id: I4a001cd9962b59560d7d6bda6272d4ff32b8d37c
2016-09-20 20:19:36 -07:00
James Zern
b6e686b1ea Merge changes from topic 'Wshorten'
* changes:
  vp8: convert some uses of unsigned long to size_t
  vp8/encoder: quiet some -Wshorten-64-to-32 warnings
2016-09-20 23:17:20 +00:00
Johann Koenig
8478f97105 Merge "Enable ssse3 bilinear tests" 2016-09-20 21:46:50 +00:00
James Zern
8281da74b9 vp8: convert some uses of unsigned long to size_t
similar to changes that were done in vp9 for encoded frame size
reporting. has the side-effect of quieting a -Wshorten-64-to-32 warning.

Change-Id: I89f74cb617fc29334ee351dc8dfaa3b8cfd4e5af
2016-09-19 18:35:59 -07:00
James Zern
0ce98b423b vp8/encoder: quiet some -Wshorten-64-to-32 warnings
this code is similar to other existing uses and/or vp9

Change-Id: I56e646931379759d9f7332ea6d746060007c75ee
2016-09-19 18:35:59 -07:00
James Zern
7a9e476072 Merge changes from topic 'clang-format'
* changes:
  apply clang-format
  .clang-format: update to 3.8.1
2016-09-16 07:11:33 +00:00
Johann
e813c2b416 Enable ssse3 bilinear tests
The code only has issues when xoffset == 0 and yoffset == 0 which
represents a simple copy. Presumably this case does not need to be
handled because the issue has existed since 2010.

BUG=webm:1287

Change-Id: Ic47e2653f3b729e99b40e53d8d2d8d1501edaaa9
2016-09-15 23:16:26 -07:00
James Zern
6ae58fd55e Merge "Revert "Restore vp8_sixtap_predict4x4_neon"" 2016-09-16 06:13:42 +00:00
Johann Koenig
7795e99296 Revert "Restore vp8_sixtap_predict4x4_neon"
This reverts commit d9dce2f48e.

Appears to be failing the SixtapPredict tests in some configurations and possibly test vectors as well.

Change-Id: Ica6aa83ebac47d0a76e451846e7da67b1c17a7d7
2016-09-16 06:12:49 +00:00
Johann Koenig
fdbe249991 Merge "Restore vp8_bilinear_predict4x4_neon" 2016-09-16 05:33:50 +00:00
Johann
43743b1d3e Restore vp8_bilinear_predict4x4_neon
This function was removed when clang started introducing alignment hints
which caused the 32 bit vld1_lane_u32/vst1_lane_u32 to fail:
https://llvm.org/bugs/show_bug.cgi?id=24421

The load has been rendered safe with an implementation ~indiscernible
performance-wise that uses _u8 and over-reads just a touch.

It is still ~5x faster than C in the unaligned case and doing both
filters.

BUG=webm:892
BUG=webm:1273

Change-Id: Icf7167189391b46202f47233bb585c24c42bcc36
2016-09-15 21:16:11 -07:00
Johann Koenig
7bc0733c27 Merge "Restore vp8_sixtap_predict4x4_neon" 2016-09-16 04:12:08 +00:00
Johann
1d2aaf58dd vp8 postproc: expand CONFIG_POSTPROC guard
postproc.c is overloaded and used for both postproc and internal stats.
If only --enable-internal-stats is specified there are issues with
non-existent struct members and unused functions.

Change-Id: I82367f1ffce659c3918c9f964dbce94a716fbb89
2016-09-16 03:52:19 +00:00
clang-format
5f6d143b41 apply clang-format
Change-Id: I501597b7c1e0f0c7ae2aea3ee8073f0a641b3487
2016-09-15 15:07:53 -07:00
Johann
d9dce2f48e Restore vp8_sixtap_predict4x4_neon
This function was removed when clang started introducing alignment hints
which caused the 32 bit vld1_lane_u32/vst1_lane_u32 to fail:
https://llvm.org/bugs/show_bug.cgi?id=24421

The load has been rendered safe with an implementation ~indiscernible
performance-wise that uses _u8 and over-reads just a touch.

The store, when unaligned, has a version that is ~25% slower but safe
when xoffset = 0 (second pass filter only). When the first pass filter
(or both) are in play, the new version is almost identical in speed.

Worst case performance (both filters, unaligned stores) is roughly 3-4x
faster than C.

BUG=webm:817
BUG=webm:1273

Change-Id: I1e490e94453e0872151fe0dafb05557463f6247d
2016-09-15 14:56:47 -07:00
James Zern
4282d29355 Merge "cosmetics,vp8: join some lines, fix table format" 2016-09-14 00:41:51 +00:00
Johann
4c6819d0fc vp8 decoder: cast decoding_thread_count to int
For some reason allocated_decoding_thread_count is signed, but decoding_thread_count is not.

Cleans -Wextra/-Wsign-compare:
comparison between signed and unsigned integer expressions

Change-Id: Id0ada78100acff27c1c4ed7493c563d13c55cdcd
2016-09-13 14:51:14 -07:00
James Zern
a22a455899 cosmetics,vp8: join some lines, fix table format
Change-Id: Idcf3b68f0e59bd74c9d332bbd4a7c1484ddb691a
2016-09-09 16:39:34 -07:00
Marco
421f376568 vp8: Set the skin model to mode 1.
This change was reverted before due to a hangouts encode-time
regression investigation. But since then this change has been
cleared of causing any noticeable regression.

This mode reduces some false detection, and uses the
same model as in vp9.

Change-Id: I9c82a748c5f601d0aca9f61ee218abfbd58c62bd
2016-09-09 09:09:43 -07:00
Alexander Potapenko
948a1f51d0 vp8: Remove TSAN warning around end of encode.
Tsan warns when run in one pass and there is a recode
loop.

Change-Id: Ice2ecb2270f09ebd49efbd49c0e4f77d32e23c0f
2016-09-08 14:36:32 +02:00
James Zern
3d253b0c71 vp8_cx_iface: quiet -Wshorten-64-to-32 warning
set_reference_and_update(): use the correct type for flags,
vpx_enc_frame_flags_t

Change-Id: I257da784537ff18686f6db8665f99af6ea6a86ba
2016-09-01 19:54:00 -07:00
James Zern
d6d3d4ba31 get_cpu_count: quiet -Wshorten-64-to-32 warnings
sysconf returns a long; cast (unsigned) dwNumberOfProcessors to int for
good measure

Change-Id: I1f181d7bd9a060c0898db41f66a5065394afdc4e
2016-09-01 19:54:00 -07:00
Johann Koenig
4d1540f8ce Merge changes from topic 'Wundef'
* changes:
  Enable -Wundef by default
  Define VP8_TEMPORAL_ALT_REF to !CONFIG_REALTIME_ONLY
  Remove CONFIG_DEBUG guards from assert()
  Remove unused function vpx_de_mblock
  Fix -Wundef warning for OUTPUT_FPF
  Fix -Wundef warning for __SANITIZE_ADDRESS__
2016-09-02 01:39:18 +00:00
Yaowu Xu
594e53514b Merge "Fix formatting in internal stats for vp8 and vp9" 2016-09-01 23:55:23 +00:00
Johann
1139f0dbc2 Define VP8_TEMPORAL_ALT_REF to !CONFIG_REALTIME_ONLY
Previously VP8_TEMPORAL_ALT_REF was only defined for non-realtime-only
builds. However, its value was checked with #if, not #ifdef.

Fixes -Wundef warnings.

BUG=webm:1069

Change-Id: If78d8731298f3f0d3662ffa25f973e7adaf67152
2016-08-31 23:01:57 -07:00
Johann
18b6691105 Remove CONFIG_DEBUG guards from assert()
When 'NDEBUG' is set, assert() generates no code.

Change-Id: Icf61cfc1a8f6e5f0770b3626d8c73ae968df1108
2016-08-31 23:01:57 -07:00
Johann
7b3c2e3269 Fix -Wundef warning for OUTPUT_FPF
BUG=webm:1069

Change-Id: I3d13d07cf0934e6e262c8033bd77d7197d03ce21
2016-08-31 22:59:59 -07:00
Marco Paniconi
e66cd132f0 Merge "vp8: Move loopfilter synchronization to end of encode_frame call." 2016-08-29 05:52:40 +00:00
James Zern
ed11abbc36 Merge changes I353da4a2,I423f2153
* changes:
  vp8_decoder_create_threads: check sem/pthread returns
  vp8_create_decoder_instances: add missing setjmp
2016-08-26 23:48:08 +00:00
Johann Koenig
a70861c435 Merge "Remove halfpix specialization" 2016-08-26 21:28:01 +00:00
Sarah Parker
37e83789f1 Fix formatting in internal stats for vp8 and vp9
This corrects a formatting error introduced in:
I1e9d548ce445d29002f0c59ebfd3957a6f15e702
where spaces were used as delimiters instead of tabs.

The corresponding fix for vp10 is in
Ica3d625d6672b3c47e0e208b45eede29b9004030.

Change-Id: Ibc4eb8fd82e6b926ba259a679dc98557cadba9b1
2016-08-25 17:46:18 -07:00
Marco
b6a5f6f740 vp8: Move loopfilter synchronization to end of encode_frame call.
Allow loopfilter to continue until encode_frame is completed.

Change-Id: I7bbccc3d409e263aab6a6ff24588d8b2a964a96e
2016-08-25 12:37:30 -07:00
James Zern
a6efe6d437 vp8_decoder_create_threads: check sem/pthread returns
Change-Id: I353da4a2f988ca51d48d0ca91236e8cc0bb48ff5
2016-08-23 19:19:57 -07:00
James Zern
13338a481f vp8_create_decoder_instances: add missing setjmp
vp8_decoder_create_threads() has allocations that expect one is set.

Change-Id: I423f2153a2969c88d48ba45cc9ead4a01443ce65
2016-08-23 18:29:42 -07:00
Johann
d393885af1 Remove halfpix specialization
This function only exists as a shortcut to subpixel variance with
predefined offsets. xoffset = 4 for horizontal, yoffset = 4 for vertical
and both for "hv"

Removing this allows the existing optimizations for the variance
functions to be called. Instead of having only sse2 optimizations, this
gives sse2, ssse3, msa and neon.

BUG=webm:1273

Change-Id: Ieb407b423b91b87d33c4263c6a1ad5e673b0efd6
2016-08-23 17:05:39 -07:00
James Zern
0f42d1fa85 vp8: fix decoder crash with invalid leading keyframes
decoding the same invalid keyframe twice would result in a crash as the
second time through the decoder would be assumed to have been
initialized as there was no resolution change. in this case the
resolution was itself invalid (0x6), but vp8_peek_si() was only failing
in the case of 0x0.
invalid-vp80-00-comprehensive-018.ivf.2kf_0x6.ivf tests this case by
duplicating the first keyframe and additionally adds a valid one to
ensure decoding can resume without error.

BUG=b/30593765

Change-Id: If0859035908b7870d67a7f3f646b5a080252eb6d
2016-08-23 16:27:52 -07:00
Marco Paniconi
de075a95e0 Revert "vp8: Move loopfilter synchronization to end of encode_frame call."
This reverts commit c2fe9acced.

This change break linux browser test in chromium:
https://build.chromium.org/p/chromium.webrtc/builders/Linux%20Tester

Change-Id: I226782fad480c17a99ec6c785ad93cf4ab88f0ae
2016-08-22 15:46:20 +00:00
Marco
c2fe9acced vp8: Move loopfilter synchronization to end of encode_frame call.
Change-Id: I5bdfea7f51df1f1fa5d9c1597e96988acce6c2f2
2016-08-16 11:22:23 -07:00
Aleksey Vasenev
343b6b09a1 Align thread entry point stack
_beginthreadex does not align the stack on 16-byte boundary as expected
by gcc.

On x86 targets, the force_align_arg_pointer attribute may be applied to
individual function definitions, generating an alternate prologue and
epilogue that realigns the run-time stack if necessary. This supports
mixing legacy codes that run with a 4-byte aligned stack with modern
codes that keep a 16-byte stack for SSE compatibility.
https://gcc.gnu.org/onlinedocs/gcc/x86-Function-Attributes.html

Change-Id: Ie4e4ab32948c238fa87054d5664189972ca6708e
Signed-off-by: Aleksey Vasenev <margtu-fivt@ya.ru>
2016-08-10 11:57:34 -07:00
Johann
d55724fae9 Remove armv6 target
Change-Id: I1fa81cc9cabf362a185fc3a53f1e58de533a41e5
2016-08-04 12:55:06 -07:00
Johann
a7a8e07a44 Pad 'Left' when building under ASan
The neon intrinsics are not able to load just the 4 values that are
used. In vpx_dsp/arm/intrapred_neon.c:dc_4x4 it loads 8 values for both
the 'above' and 'left' computations, but only uses the sum of the first
4 values.

BUG=webm:1268

Change-Id: I937113d7e3a21e25bebde3593de0446bf6b0115a
2016-08-03 16:38:51 -07:00
JackyChen
6fbb4c3061 vp8: Switch skin model to mode 0 to save some cycle.
This change will speed up vp8 encoder by 1.5% ~ 2% on linux. No
much speed change on Mac.

Change-Id: Id957f19ddd89805baa2af84c5027d52d9a48553f
2016-07-28 13:32:50 -07:00
James Zern
54b2071bf4 vp8/decodeframe: fix signed/unsigned comparison
quiets a visual studio warning

Change-Id: Ic7725616bc2cb837e6f79294d4fcff36b67af834
2016-07-23 11:41:52 -07:00
clang-format
c42d54c3a3 vp8/postproc.c: disable clang-format for RGB_TO_YUV
Change-Id: Id2a936301ec1e3d5648b4f8adbf4e6625002589d
2016-07-23 10:55:44 -07:00
James Zern
5cf8eda308 Merge changes I0089e884,Icb0ecb9e
* changes:
  vp8/postproc: fix implicit float conversion
  blockiness_test: fix implicit float conversion
2016-07-23 01:18:32 +00:00
James Bankoski
7381e3330f Merge "vp8:fix threading issues" 2016-07-23 00:51:37 +00:00
Jim Bankoski
0fff2fb34c vp8:fix threading issues
1 - stops de allocating before threads are closed.
2 - limits threads to mb_rows when mb_rows < partitions

BUG=webm:851

Change-Id: I7ead53e80cc0f8c2e4c1c53506eff8431de2a37e
2016-07-23 00:50:55 +00:00
James Zern
b2542417cd vp8/postproc: fix implicit float conversion
float->int as reported by -Wfloat-conversion

Change-Id: I0089e8847b218c47526bcfbb0fffd9aad7c5adb3
2016-07-22 16:01:52 -07:00
Yunqing Wang
4b073bc39a Add back header in threading.h
Added back the header needed in threading.h

Change-Id: I2ce66ad4fe58004997623f6c3f3b8dd11640aa98
2016-07-21 17:26:05 -07:00
Yunqing Wang
87c6c5224d Revert "Amend and improve VP8 multithreading implementation"
Reverted the patch because of possible performance issue.

Change-Id: I49944f827ccd38ed194c9f8d9cb9036fa9bf79e1
2016-07-21 12:28:25 -07:00
James Zern
b19f8b1607 vp8/onyx_if.c: rework #if's to avoid dangling else's
Change-Id: Ieda8958a3da1000424fcff91a1315d0049612202
2016-07-20 12:36:09 -07:00
James Zern
77a31eb3c5 vp8/bitstream.c: rework #if to avoid dangling else
Change-Id: I9178ae75876f3df3fa3271314db39830552b9549
2016-07-20 12:36:09 -07:00
James Zern
fd85664ae6 vp8/{bitstream,rdopt},y4minput: correct break placement
these should be placed within {}s when present

Change-Id: If00e9766fa8cb039cc070467f353a468f99460fb
2016-07-19 20:51:25 -07:00
James Zern
b5164f55a0 vp8: simplify a few #if's
bitstream.c: asserts are disabled when CONFIG_DEBUG is unset
vp8_dx_iface.c: split |s into 2 statements across #if bounds

Change-Id: I307d1e969134db5c9c0edd7690589b6b29116cbd
2016-07-19 20:45:28 -07:00
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
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