vpx/vp8
Jim Bankoski 318a1ff5ec vp8 : use threading mutex's for tsan only.
To avoid decode performance hit of 2% when running on hyperthreaded
cores.

This patch only uses the mutex's when we are running tsan.

This is safe because 32 bit operations like read and store are atomic
on all the platforms we care about. Tsan warns about race situations,
but in this case either situation ( read occurs before write or write
before read) the worst case is that we go around one extra time in the
loop.  So the ordering doesn't really matter.

That said a few other things have been tried :

for instance as per here:
webrtc/base/atomicops.h#52

In this patch they use:
__atomic_load_n(i, __ATOMIC_ACQUIRE);
__atomic_store_n(i, value, __ATOMIC_RELEASE);

This code works on gcc, clang ( replacing protected write and read), and
avoids tsan errors. Incurring no penalty in performance.  In C11 its
replaced by straight atomic operands.

However there is no equivalent in the visual studio's we support as
int32 on all windows platforms is already atomic.  To avoid tsan like
warnings on windows we'd need to use interlocked exchange and the
end result doesn't gain us any thing.

Change-Id: I2066e3c7f42641ebb23d53feb1f16f23f85bcf59
2016-12-16 08:50:55 -08:00
..
common vp8 : use threading mutex's for tsan only. 2016-12-16 08:50:55 -08:00
decoder Change order of operation to avoid ubsan warnings 2016-12-14 09:37:14 -08:00
encoder Reapply 'Amend and improve VP8 multithreading implementation' 2016-12-13 02:11:34 +00:00
exports_dec Rename vp8/ codec directory to vp9/. 2012-11-01 16:31:22 -07:00
exports_enc Rename vp8/ codec directory to vp9/. 2012-11-01 16:31:22 -07:00
vp8_common.mk vp8: remove mmx functions 2016-09-29 15:25:27 -07:00
vp8_cx_iface.c vp8: Add control for gf boost for 1 pass cbr. 2016-10-19 09:43:53 -07:00
vp8_dx_iface.c vp8,frame_buffers: remove unused use_frame_threads 2016-09-29 20:24:15 -07:00
vp8cx.mk vp8: remove mmx functions 2016-09-29 15:25:27 -07:00
vp8dx.mk Fix a spelling mistake in filename 2013-12-03 17:19:41 -08:00