Commit Graph

18 Commits

Author SHA1 Message Date
James Zern
d6f7529d15 vpx_thread.h: remove unused sched_yield()
usage was removed with:
c1b024b48 Modify map read/write to sync logic in row_mt case

Change-Id: I515fe397083079a4f11702e67c322fd04bdcf410
2019-02-19 21:01:17 -08:00
Ritu Baldwa
5818014b69 Revert "Revert "Add Tile-SB-Row based Multi-threading in Decoder""
This reverts commit 06983668cf.
Fixes Visual Studio build errors introduced by earlier row mt commit

BUG=webm:1587

Change-Id: I792df86e8254cd6b2a511955b691af619a569cd0
2019-01-19 10:20:32 +05:30
KO Myung-Hun
191d3ada08 Fix compilation on OS/2
_beginthread() is not declared on __STRICT_ANSI__ mode.

-----
    [CXX] test/quantize_test.cc.o
In file included from ./vp8/common/threading.h:194:0,
                 from ./vp8/encoder/onyx_int.h:24,
                 from test/quantize_test.cc:24:
./vpx_util/vpx_thread.h: In function 'int pthread_create(TID*, const void*, void* (*)(void*), void*)':
./vpx_util/vpx_thread.h:259:20: error: '_beginthread' was not declared in this scope
   tid = (pthread_t)_beginthread(thread_start, NULL, 1024 * 1024, targ);
                    ^~~~~~~~~~~~
./vpx_util/vpx_thread.h:259:20: note: suggested alternative: 'thread'
   tid = (pthread_t)_beginthread(thread_start, NULL, 1024 * 1024, targ);
                    ^~~~~~~~~~~~
                    thread
-----

Change-Id: I774a071162b3876a7f3253ce7c5749f1b0b45818
2018-10-16 17:00:15 +09:00
Supradeep T R
4da98b0cc3 Loopfilter Multi-Thread Optimization
Take the original loopfilter multi-thread optimization
(dafe064289) along with the fixes for bugs
1558 and 1562.

BUG=webm:1558
BUG=webm:1562

Change-Id: Ibbf6bd13f4ffff0e79184ccfd6b85a49e067a6d8
2018-10-08 14:59:09 -07:00
James Zern
3448987ab2 Revert "Revert "Revert "Loopfilter MultiThread Optimization"""
This reverts commit bf6299010e.

segfaults, causes an assertion failure with corrupt input:
get_uv_tx_size: Assertion `mi->sb_type < BLOCK_8X8 ||
ss_size_lookup[mi->sb_type][pd->subsampling_x][pd->subsampling_y] !=
BLOCK_INVALID

BUG=webm:1562

Change-Id: I05a711cad3d8e7f1a8e64422b4356bdf4edb3d12
2018-09-22 22:25:46 +00:00
James Zern
2a5805e2cb cosmetics: normalize include guards
use the recommended format [1] of:
<PROJECT>_<PATH>_<FILE>_H_

[1] https://google.github.io/styleguide/cppguide.html#The__define_Guard
"All header files should have #define guards to prevent multiple
inclusion. The format of the symbol name should be
<PROJECT>_<PATH>_<FILE>_H_."

Change-Id: I2e8ab0b32fb23c30fa43cff5fec12d043c0d2037
2018-09-15 12:25:43 -07:00
Venkatarama NG. Avadhani
bf6299010e Revert "Revert "Loopfilter MultiThread Optimization""
This reverts commit 753fd86e86.

This also has the fix for the DoS reported in bug 1558.

BUG=webm:1558

Change-Id: I65ea84e0c11d6bd40d8cb0587dfe934b3ac11dce
2018-09-12 12:04:55 +05:30
James Zern
753fd86e86 Revert "Loopfilter MultiThread Optimization"
This reverts commit dafe064289.

Corrupted files may cause the decoder to hang as row progress in the
loopfilter is used to progress each thread.

BUG=webm:1558

Change-Id: I0674ce9af14d3fb7b2da8124e7b600616c8e734a
2018-08-30 09:59:10 -07:00
Supradeep T R
dafe064289 Loopfilter MultiThread Optimization
Adding LPF within the tileworker hook. This means that LPF will be done
immediately after decode, without waiting for all threads to sync.

Performance Improvement -

Platform        Resolution      2 Threads       4 Threads
X86             720p            7.24%           22.04%
                1080p           5.29%           17.02%
ARM             720p            4.61%           8.75%
                1080p           5.55%           12.03%

x86 Improvement measured on Intel Core i7-6700 CPU @ 2.10GHz set
in performance with turbo mode off
ARM Improvement measured on Nexus 6 Snapdragon 805 Quad-core  @ 2.65 GHz

Change-Id: Ifa73c71b40db3fa7fa16f54f4e3aa06d1258caae
2018-08-20 12:07:37 +05:30
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
clang-format
6565c17f24 vpx_util: apply clang-format
Change-Id: Ie7eab608e2906b9a2b3533db95292ebc430ad377
2016-07-25 22:33:21 -07:00
James Zern
3007081a87 vpx_thread: use CreateThread for windows phone
BUG=b/29583578

original webp change:

commit d2afe974f9d751de144ef09d31255aea13b442c0
Author: James Zern <jzern@google.com>
Date:   Mon Nov 23 20:41:26 2015 -0800

    thread: use CreateThread for windows phone

    _beginthreadex is unavailable for winrt/uwp

    Change-Id: Ie7412a568278ac67f0047f1764e2521193d74d4d

100644 blob 93f7622797f05f6acc1126e8296c481d276e4047 src/utils/thread.c
100644 blob 840831185502d42a3246e4b7ff870121c8064791 src/utils/thread.h

Change-Id: Iade8fff6367b45534986c77ebe61abeb45bce0f8
2016-07-01 19:36:58 -07:00
James Zern
7954e67bb8 vpx_thread: use WaitForSingleObjectEx if available
BUG=b/29583578

original webp change:

commit 0fd0e12bfe83f16ce4f1c038b251ccbc13c62ac2
Author: James Zern <jzern@google.com>
Date:   Mon Nov 23 20:40:26 2015 -0800

    thread: use WaitForSingleObjectEx if available

    Windows XP and up

    Change-Id: Ie1a46a82722b8624437c8aba0aa4566a4b0b3f57

100644 blob d58f74e5523dbc985fc531cf5f0833f1e9157cf0 src/utils/thread.c
100644 blob 840831185502d42a3246e4b7ff870121c8064791 src/utils/thread.h

Change-Id: If165c38b378c6e0c55e17a1b071efd3ec3e7dcdd
2016-07-01 19:36:58 -07:00
James Zern
a48d42a804 vpx_thread: use InitializeCriticalSectionEx if available
BUG=b/29583578

original webp change:

commit 63fadc9ffacc77d4617526a50c696d21d558a70b
Author: James Zern <jzern@google.com>
Date:   Mon Nov 23 20:38:46 2015 -0800

    thread: use InitializeCriticalSectionEx if available

    Windows Vista / Server 2008 and up

    Change-Id: I32c5b4e5384d614c5a821ef511293ff014c67966

100644 blob f84207d89b3a6bb98bfe8f3fa55cad72dfd061ff src/utils/thread.c
100644 blob 840831185502d42a3246e4b7ff870121c8064791 src/utils/thread.h

Change-Id: I9ce49b3a86857267e504cd8ceab503b7b441d614
2016-07-01 19:36:58 -07:00
James Zern
8cc525e82b vpx_thread: use native windows cond var if available
BUG=b/29583578

original webp change:

commit 110ad5835ecd66995d0e7f66dca1b90dea595f5a
Author: James Zern <jzern@google.com>
Date:   Mon Nov 23 19:49:58 2015 -0800

    thread: use native windows cond var if available

    Vista / Server 2008 and up. no speed difference observed.

    Change-Id: Ice19704777cb679b290dc107a751a0f36dd0c0a9

100644 blob 4fc372b7bc6980a9ed3618c8cce5b67ed7b0f412 src/utils/thread.c
100644 blob 840831185502d42a3246e4b7ff870121c8064791 src/utils/thread.h

Change-Id: Iede7ae8a7184e4b17a4050b33956918fc84e15b5
2016-07-01 19:36:58 -07:00
James Zern
d4d6c58e37 vpx_thread.[hc]: update webp source reference
+ drop the blob hash, the updated reference will be updated in the
commit message

BUG=b/29583578

Change-Id: Ifabbe52a2f07ac29e1881f5c8a62d7f3eb3c2c04
2016-07-01 19:36:58 -07: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
Jingning Han
d1b30ceaa3 Rename vpx_thread to vpx_util
Change the dir name to include more util tools.

Change-Id: Id5b16062803ce5eed872fe2edb36d7e56b32eed8
2015-07-02 10:02:37 -07:00