├── opus └── version.h ├── toxcore ├── vs │ ├── unistd.h │ └── config.h ├── toxav │ ├── msi.c │ ├── msi.h │ ├── rtp.c │ ├── rtp.h │ ├── audio.c │ ├── audio.h │ ├── toxav.c │ ├── toxav.h │ ├── video.c │ ├── video.h │ ├── groupav.c │ ├── groupav.h │ ├── toxav_old.c │ ├── bwcontroller.c │ ├── bwcontroller.h │ ├── ring_buffer.c │ └── ring_buffer.h ├── other │ ├── tox.png │ ├── DHTnodes │ ├── bootstrap_daemon │ │ ├── tox-bootstrapd.service │ │ └── Makefile.inc │ └── Makefile.inc ├── toxcore │ ├── DHT.c │ ├── DHT.h │ ├── tox.c │ ├── list.c │ ├── list.h │ ├── logger.c │ ├── logger.h │ ├── onion.c │ ├── onion.h │ ├── ping.c │ ├── ping.h │ ├── util.c │ ├── util.h │ ├── network.c │ ├── network.h │ ├── Messenger.c │ ├── Messenger.h │ ├── TCP_client.c │ ├── TCP_client.h │ ├── TCP_server.c │ ├── TCP_server.h │ ├── crypto_core.c │ ├── crypto_core.h │ ├── net_crypto.c │ ├── net_crypto.h │ ├── ping_array.c │ ├── ping_array.h │ ├── LAN_discovery.c │ ├── LAN_discovery.h │ ├── onion_client.c │ ├── onion_client.h │ ├── TCP_connection.c │ ├── TCP_connection.h │ ├── friend_requests.c │ ├── friend_requests.h │ ├── onion_announce.c │ ├── onion_announce.h │ ├── friend_connection.c │ └── friend_connection.h └── toxencryptsave │ ├── defines.h │ └── crypto_pwhash_scryptsalsa208sha256 │ ├── runtime.h │ ├── note_to_maintainers.txt │ ├── export.h │ └── utils.h ├── libsodium └── src │ ├── Makefile.am │ └── libsodium │ ├── crypto_sign │ └── ed25519 │ │ ├── description │ │ └── sign_ed25519_api.c │ ├── crypto_verify │ ├── 16 │ │ ├── verify_16_api.c │ │ └── ref │ │ │ └── verify_16.c │ ├── 32 │ │ ├── verify_32_api.c │ │ └── ref │ │ │ └── verify_32.c │ └── 64 │ │ ├── verify_64_api.c │ │ └── ref │ │ └── verify_64.c │ ├── include │ └── sodium │ │ ├── crypto_int32.h │ │ ├── crypto_int64.h │ │ ├── crypto_uint8.h │ │ ├── crypto_uint16.h │ │ ├── crypto_uint32.h │ │ ├── crypto_uint64.h │ │ ├── core.h │ │ ├── randombytes_sysrandom.h │ │ ├── randombytes_salsa20_random.h │ │ ├── randombytes_nativeclient.h │ │ ├── crypto_verify_16.h │ │ ├── crypto_verify_32.h │ │ ├── crypto_verify_64.h │ │ ├── version.h │ │ ├── version.h.in │ │ ├── crypto_shorthash_siphash24.h │ │ ├── crypto_core_salsa20.h │ │ ├── crypto_core_hsalsa20.h │ │ ├── crypto_core_salsa208.h │ │ ├── crypto_core_hchacha20.h │ │ ├── crypto_core_salsa2012.h │ │ ├── runtime.h │ │ ├── crypto_shorthash.h │ │ ├── crypto_scalarmult.h │ │ ├── crypto_scalarmult_curve25519.h │ │ ├── crypto_hash.h │ │ ├── export.h │ │ ├── crypto_auth.h │ │ ├── crypto_stream_salsa208.h │ │ └── crypto_stream_salsa2012.h │ ├── crypto_pwhash │ └── argon2 │ │ ├── blake2b-long.h │ │ ├── argon2-encoding.h │ │ └── argon2-impl.h │ ├── crypto_stream │ ├── aes128ctr │ │ ├── portable │ │ │ ├── types.h │ │ │ ├── stream_aes128ctr.c │ │ │ ├── consts.h │ │ │ └── consts_aes128ctr.c │ │ └── stream_aes128ctr_api.c │ ├── salsa208 │ │ ├── stream_salsa208_api.c │ │ └── ref │ │ │ ├── stream_salsa208.c │ │ │ └── xor_salsa208.c │ ├── xsalsa20 │ │ ├── stream_xsalsa20_api.c │ │ └── ref │ │ │ ├── stream_xsalsa20.c │ │ │ └── xor_xsalsa20.c │ ├── salsa2012 │ │ ├── stream_salsa2012_api.c │ │ └── ref │ │ │ ├── stream_salsa2012.c │ │ │ └── xor_salsa2012.c │ ├── salsa20 │ │ ├── stream_salsa20_api.c │ │ └── ref │ │ │ └── stream_salsa20_ref.c │ ├── crypto_stream.c │ └── chacha20 │ │ ├── stream_chacha20.h │ │ ├── ref │ │ └── stream_chacha20_ref.h │ │ └── vec │ │ └── stream_chacha20_vec.h │ ├── crypto_hash │ ├── sha256 │ │ └── hash_sha256_api.c │ ├── sha512 │ │ └── hash_sha512_api.c │ └── crypto_hash.c │ ├── crypto_scalarmult │ ├── curve25519 │ │ ├── sandy2x │ │ │ ├── ladder_namespace.h │ │ │ ├── curve25519_sandy2x.h │ │ │ ├── ladder_base_namespace.h │ │ │ ├── ladder.h │ │ │ ├── ladder_base.h │ │ │ ├── sandy2x.S │ │ │ ├── consts.S │ │ │ ├── fe.h │ │ │ ├── fe51.h │ │ │ ├── fe51_namespace.h │ │ │ └── consts_namespace.h │ │ ├── ref10 │ │ │ └── x25519_ref10.h │ │ ├── donna_c64 │ │ │ └── curve25519_donna_c64.h │ │ └── scalarmult_curve25519.h │ └── crypto_scalarmult.c │ ├── crypto_shorthash │ ├── siphash24 │ │ └── shorthash_siphash24_api.c │ └── crypto_shorthash.c │ ├── sodium │ └── version.c │ ├── crypto_onetimeauth │ └── poly1305 │ │ ├── sse2 │ │ └── poly1305_sse2.h │ │ ├── donna │ │ └── poly1305_donna.h │ │ └── onetimeauth_poly1305.h │ ├── crypto_auth │ ├── hmacsha256 │ │ ├── auth_hmacsha256_api.c │ │ └── cp │ │ │ └── verify_hmacsha256.c │ ├── hmacsha512 │ │ ├── auth_hmacsha512_api.c │ │ └── cp │ │ │ └── verify_hmacsha512.c │ ├── hmacsha512256 │ │ ├── auth_hmacsha512256_api.c │ │ └── cp │ │ │ └── verify_hmacsha512256.c │ └── crypto_auth.c │ ├── crypto_core │ ├── salsa20 │ │ └── core_salsa20_api.c │ ├── hsalsa20 │ │ └── core_hsalsa20_api.c │ ├── salsa208 │ │ └── core_salsa208_api.c │ ├── salsa2012 │ │ └── core_salsa2012_api.c │ └── hchacha20 │ │ └── core_hchacha20.h │ ├── crypto_box │ └── curve25519xsalsa20poly1305 │ │ ├── ref │ │ ├── before_curve25519xsalsa20poly1305.c │ │ ├── after_curve25519xsalsa20poly1305.c │ │ ├── keypair_curve25519xsalsa20poly1305.c │ │ └── box_curve25519xsalsa20poly1305.c │ │ └── box_curve25519xsalsa20poly1305_api.c │ ├── crypto_secretbox │ ├── xsalsa20poly1305 │ │ ├── secretbox_xsalsa20poly1305_api.c │ │ └── ref │ │ │ └── box_xsalsa20poly1305.c │ └── crypto_secretbox.c │ └── crypto_generichash │ └── blake2 │ ├── generichash_blake2_api.c │ └── ref │ └── blake2b-compress-avx2.c └── libvpx ├── vp8 ├── exports_dec ├── exports_enc ├── common │ ├── rtcd.c │ ├── modecont.h │ ├── blockd.c │ ├── systemdependent.h │ ├── swapyv12buffer.h │ ├── mv.h │ ├── copy_c.c │ ├── filter.h │ ├── alloccommon.h │ ├── modecont.c │ ├── x86 │ │ └── filter_x86.h │ ├── quant_common.h │ ├── swapyv12buffer.c │ ├── dequantize.c │ ├── extend.h │ └── header.h ├── decoder │ ├── decodemv.h │ ├── detokenize.h │ ├── decoderthreading.h │ └── treereader.h ├── encoder │ ├── bitstream.h │ ├── modecosts.h │ ├── segmentation.h │ ├── mr_dissim.h │ ├── encodemv.h │ ├── encodeintra.h │ ├── firstpass.h │ ├── treewriter.c │ ├── x86 │ │ └── vp8_enc_stubs_sse2.c │ ├── encodeframe.h │ ├── quantize.h │ ├── pickinter.h │ └── ratectrl.h └── vp8cx_arm.mk ├── vp9 ├── exports_dec ├── exports_enc ├── common │ ├── vp9_rtcd.c │ ├── vp9_textblit.h │ ├── vp9_mfqe.h │ ├── vp9_reconintra.h │ ├── vp9_quant_common.h │ ├── vp9_ppflags.h │ ├── vp9_tile_common.h │ └── vp9_filter.h ├── decoder │ ├── vp9_dsubexp.h │ ├── vp9_decodemv.h │ ├── vp9_detokenize.h │ └── vp9_decodeframe.h └── encoder │ ├── vp9_temporal_filter.h │ ├── vp9_aq_360.h │ ├── vp9_ethread.h │ ├── vp9_picklpf.h │ ├── vp9_aq_variance.h │ ├── vp9_mbgraph.h │ ├── vp9_extend.h │ ├── vp9_aq_complexity.h │ ├── vp9_encodemv.h │ └── vp9_bitstream.h ├── yasm.exe ├── vp8_rtcd.h ├── vp9_rtcd.h ├── vpx_dsp_rtcd.h ├── vpx_config.asm ├── vpx_mem ├── vpx_mem.mk ├── include │ └── vpx_mem_intrnl.h └── vpx_mem.h ├── codereview.settings ├── vpx ├── exports_dec ├── exports_com ├── exports_enc ├── src │ └── vpx_psnr.c └── internal │ └── vpx_psnr.h ├── vpx_version.h ├── setup ├── usage_cx.dox ├── third_party └── libyuv │ ├── README.libvpx │ ├── include │ └── libyuv │ │ ├── version.h │ │ └── rotate_argb.h │ └── source │ └── compare_common.cc ├── vpx_util └── vpx_util.mk ├── vpx_ports ├── config.h ├── system_state.h ├── vpx_ports.mk ├── msvc.h ├── emms.asm └── arm.h ├── asms.cmd ├── vpx_dsp ├── vpx_dsp_rtcd.c ├── x86 │ ├── fwd_txfm_avx2.c │ └── txfm_common_sse2.h ├── vpx_filter.h ├── fwd_txfm.h ├── bitwriter.c └── bitwriter_buffer.h ├── vpx_scale ├── vpx_scale.mk ├── vpx_scale_rtcd.c └── vpx_scale.h ├── vpx_config.c ├── video_common.h ├── ivfdec.h ├── y4menc.h ├── ivfenc.h ├── warnings.h ├── solution.mk ├── vpxstats.h ├── config.mk ├── rate_hist.h ├── asms_part.txt └── asms.txt /opus/version.h: -------------------------------------------------------------------------------- 1 | #define PACKAGE_VERSION "unknown" 2 | -------------------------------------------------------------------------------- /toxcore/vs/unistd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include -------------------------------------------------------------------------------- /libsodium/src/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS = \ 3 | libsodium 4 | -------------------------------------------------------------------------------- /libvpx/vp8/exports_dec: -------------------------------------------------------------------------------- 1 | data vpx_codec_vp8_dx_algo 2 | text vpx_codec_vp8_dx 3 | -------------------------------------------------------------------------------- /libvpx/vp8/exports_enc: -------------------------------------------------------------------------------- 1 | data vpx_codec_vp8_cx_algo 2 | text vpx_codec_vp8_cx 3 | -------------------------------------------------------------------------------- /libvpx/vp9/exports_dec: -------------------------------------------------------------------------------- 1 | data vpx_codec_vp9_dx_algo 2 | text vpx_codec_vp9_dx 3 | -------------------------------------------------------------------------------- /libvpx/vp9/exports_enc: -------------------------------------------------------------------------------- 1 | data vpx_codec_vp9_cx_algo 2 | text vpx_codec_vp9_cx 3 | -------------------------------------------------------------------------------- /libvpx/yasm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/libvpx/yasm.exe -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_sign/ed25519/description: -------------------------------------------------------------------------------- 1 | EdDSA signatures using Curve25519 2 | -------------------------------------------------------------------------------- /toxcore/toxav/msi.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/msi.c -------------------------------------------------------------------------------- /toxcore/toxav/msi.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/msi.h -------------------------------------------------------------------------------- /toxcore/toxav/rtp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/rtp.c -------------------------------------------------------------------------------- /toxcore/toxav/rtp.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/rtp.h -------------------------------------------------------------------------------- /toxcore/other/tox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/other/tox.png -------------------------------------------------------------------------------- /toxcore/toxav/audio.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/audio.c -------------------------------------------------------------------------------- /toxcore/toxav/audio.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/audio.h -------------------------------------------------------------------------------- /toxcore/toxav/toxav.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/toxav.c -------------------------------------------------------------------------------- /toxcore/toxav/toxav.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/toxav.h -------------------------------------------------------------------------------- /toxcore/toxav/video.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/video.c -------------------------------------------------------------------------------- /toxcore/toxav/video.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/video.h -------------------------------------------------------------------------------- /toxcore/toxcore/DHT.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/DHT.c -------------------------------------------------------------------------------- /toxcore/toxcore/DHT.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/DHT.h -------------------------------------------------------------------------------- /toxcore/toxcore/tox.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/tox.c -------------------------------------------------------------------------------- /toxcore/toxav/groupav.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/groupav.c -------------------------------------------------------------------------------- /toxcore/toxav/groupav.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/groupav.h -------------------------------------------------------------------------------- /toxcore/toxcore/list.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/list.c -------------------------------------------------------------------------------- /toxcore/toxcore/list.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/list.h -------------------------------------------------------------------------------- /toxcore/toxcore/logger.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/logger.c -------------------------------------------------------------------------------- /toxcore/toxcore/logger.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/logger.h -------------------------------------------------------------------------------- /toxcore/toxcore/onion.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/onion.c -------------------------------------------------------------------------------- /toxcore/toxcore/onion.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/onion.h -------------------------------------------------------------------------------- /toxcore/toxcore/ping.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/ping.c -------------------------------------------------------------------------------- /toxcore/toxcore/ping.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/ping.h -------------------------------------------------------------------------------- /toxcore/toxcore/util.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/util.c -------------------------------------------------------------------------------- /toxcore/toxcore/util.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/util.h -------------------------------------------------------------------------------- /toxcore/toxav/toxav_old.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/toxav_old.c -------------------------------------------------------------------------------- /toxcore/toxcore/network.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/network.c -------------------------------------------------------------------------------- /toxcore/toxcore/network.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/network.h -------------------------------------------------------------------------------- /libvpx/vp8_rtcd.h: -------------------------------------------------------------------------------- 1 | #ifdef WIN64 2 | #include "vp8_rtcd_64.h" 3 | #else 4 | #include "vp8_rtcd_32.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /libvpx/vp9_rtcd.h: -------------------------------------------------------------------------------- 1 | #ifdef WIN64 2 | #include "vp9_rtcd_64.h" 3 | #else 4 | #include "vp9_rtcd_32.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /toxcore/toxav/bwcontroller.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/bwcontroller.c -------------------------------------------------------------------------------- /toxcore/toxav/bwcontroller.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/bwcontroller.h -------------------------------------------------------------------------------- /toxcore/toxav/ring_buffer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/ring_buffer.c -------------------------------------------------------------------------------- /toxcore/toxav/ring_buffer.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxav/ring_buffer.h -------------------------------------------------------------------------------- /toxcore/toxcore/Messenger.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/Messenger.c -------------------------------------------------------------------------------- /toxcore/toxcore/Messenger.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/Messenger.h -------------------------------------------------------------------------------- /toxcore/toxcore/TCP_client.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/TCP_client.c -------------------------------------------------------------------------------- /toxcore/toxcore/TCP_client.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/TCP_client.h -------------------------------------------------------------------------------- /toxcore/toxcore/TCP_server.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/TCP_server.c -------------------------------------------------------------------------------- /toxcore/toxcore/TCP_server.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/TCP_server.h -------------------------------------------------------------------------------- /toxcore/toxcore/crypto_core.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/crypto_core.c -------------------------------------------------------------------------------- /toxcore/toxcore/crypto_core.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/crypto_core.h -------------------------------------------------------------------------------- /toxcore/toxcore/net_crypto.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/net_crypto.c -------------------------------------------------------------------------------- /toxcore/toxcore/net_crypto.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/net_crypto.h -------------------------------------------------------------------------------- /toxcore/toxcore/ping_array.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/ping_array.c -------------------------------------------------------------------------------- /toxcore/toxcore/ping_array.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/ping_array.h -------------------------------------------------------------------------------- /toxcore/toxcore/LAN_discovery.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/LAN_discovery.c -------------------------------------------------------------------------------- /toxcore/toxcore/LAN_discovery.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/LAN_discovery.h -------------------------------------------------------------------------------- /toxcore/toxcore/onion_client.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/onion_client.c -------------------------------------------------------------------------------- /toxcore/toxcore/onion_client.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/onion_client.h -------------------------------------------------------------------------------- /toxcore/toxcore/TCP_connection.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/TCP_connection.c -------------------------------------------------------------------------------- /toxcore/toxcore/TCP_connection.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/TCP_connection.h -------------------------------------------------------------------------------- /toxcore/toxcore/friend_requests.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/friend_requests.c -------------------------------------------------------------------------------- /toxcore/toxcore/friend_requests.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/friend_requests.h -------------------------------------------------------------------------------- /toxcore/toxcore/onion_announce.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/onion_announce.c -------------------------------------------------------------------------------- /toxcore/toxcore/onion_announce.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/onion_announce.h -------------------------------------------------------------------------------- /toxcore/toxencryptsave/defines.h: -------------------------------------------------------------------------------- 1 | #define TOX_ENC_SAVE_MAGIC_NUMBER "toxEsave" 2 | #define TOX_ENC_SAVE_MAGIC_LENGTH 8 3 | -------------------------------------------------------------------------------- /libvpx/vpx_dsp_rtcd.h: -------------------------------------------------------------------------------- 1 | #ifdef WIN64 2 | #include "vpx_dsp_rtcd_64.h" 3 | #else 4 | #include "vpx_dsp_rtcd_32.h" 5 | #endif 6 | -------------------------------------------------------------------------------- /toxcore/toxcore/friend_connection.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/friend_connection.c -------------------------------------------------------------------------------- /toxcore/toxcore/friend_connection.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/isotoxin/toxcore-vs/HEAD/toxcore/toxcore/friend_connection.h -------------------------------------------------------------------------------- /libvpx/vpx_config.asm: -------------------------------------------------------------------------------- 1 | %ifdef WIN64 2 | %include "./vpx_config_64.asm" 3 | %else 4 | %include "./vpx_config_32.asm" 5 | %endif 6 | -------------------------------------------------------------------------------- /libvpx/vpx_mem/vpx_mem.mk: -------------------------------------------------------------------------------- 1 | MEM_SRCS-yes += vpx_mem.mk 2 | MEM_SRCS-yes += vpx_mem.c 3 | MEM_SRCS-yes += vpx_mem.h 4 | MEM_SRCS-yes += include/vpx_mem_intrnl.h 5 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_verify/16/verify_16_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_verify_16.h" 2 | 3 | size_t 4 | crypto_verify_16_bytes(void) { 5 | return crypto_verify_16_BYTES; 6 | } 7 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_verify/32/verify_32_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_verify_32.h" 2 | 3 | size_t 4 | crypto_verify_32_bytes(void) { 5 | return crypto_verify_32_BYTES; 6 | } 7 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_verify/64/verify_64_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_verify_64.h" 2 | 3 | size_t 4 | crypto_verify_64_bytes(void) { 5 | return crypto_verify_64_BYTES; 6 | } 7 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_int32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_int32_H 2 | #define crypto_int32_H 3 | 4 | #include 5 | 6 | typedef int32_t crypto_int32; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_int64.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_int64_H 2 | #define crypto_int64_H 3 | 4 | #include 5 | 6 | typedef int64_t crypto_int64; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_uint8.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_uint8_H 2 | #define crypto_uint8_H 3 | 4 | #include 5 | 6 | typedef uint8_t crypto_uint8; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_uint16.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_uint16_H 2 | #define crypto_uint16_H 3 | 4 | #include 5 | 6 | typedef uint16_t crypto_uint16; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_uint32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_uint32_H 2 | #define crypto_uint32_H 3 | 4 | #include 5 | 6 | typedef uint32_t crypto_uint32; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_uint64.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_uint64_H 2 | #define crypto_uint64_H 3 | 4 | #include 5 | 6 | typedef uint64_t crypto_uint64; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libvpx/codereview.settings: -------------------------------------------------------------------------------- 1 | # This file is used by gcl to get repository specific information. 2 | GERRIT_HOST: chromium-review.googlesource.com 3 | GERRIT_PORT: 29418 4 | CODE_REVIEW_SERVER: chromium-review.googlesource.com 5 | -------------------------------------------------------------------------------- /toxcore/other/DHTnodes: -------------------------------------------------------------------------------- 1 | As maintaining 2 separate lists of the same information seemed redundant, this list has been phased out. 2 | 3 | For a current DHT node list please visit https://wiki.tox.chat/doku.php?id=users:nodes 4 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.h: -------------------------------------------------------------------------------- 1 | #ifndef blake2b_long_H 2 | #define blake2b_long_H 3 | 4 | #include 5 | 6 | int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/aes128ctr/portable/types.h: -------------------------------------------------------------------------------- 1 | #ifndef TYPES_H 2 | #define TYPES_H 3 | 4 | #include 5 | #include 6 | 7 | typedef uint32_t uint32; 8 | typedef uint64_t uint64; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /libvpx/vpx/exports_dec: -------------------------------------------------------------------------------- 1 | text vpx_codec_dec_init_ver 2 | text vpx_codec_decode 3 | text vpx_codec_get_frame 4 | text vpx_codec_get_stream_info 5 | text vpx_codec_peek_stream_info 6 | text vpx_codec_register_put_frame_cb 7 | text vpx_codec_register_put_slice_cb 8 | text vpx_codec_set_frame_buffer_functions 9 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_hash/sha256/hash_sha256_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_hash_sha256.h" 2 | 3 | size_t 4 | crypto_hash_sha256_bytes(void) { 5 | return crypto_hash_sha256_BYTES; 6 | } 7 | 8 | size_t 9 | crypto_hash_sha256_statebytes(void) { 10 | return sizeof(crypto_hash_sha256_state); 11 | } 12 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_hash/sha512/hash_sha512_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_hash_sha512.h" 2 | 3 | size_t 4 | crypto_hash_sha512_bytes(void) { 5 | return crypto_hash_sha512_BYTES; 6 | } 7 | 8 | size_t 9 | crypto_hash_sha512_statebytes(void) { 10 | return sizeof(crypto_hash_sha512_state); 11 | } 12 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_namespace.h: -------------------------------------------------------------------------------- 1 | #ifndef ladder_namespace_H 2 | #define ladder_namespace_H 3 | 4 | #define ladder crypto_scalarmult_curve25519_sandy2x_ladder 5 | #define _ladder _crypto_scalarmult_curve25519_sandy2x_ladder 6 | 7 | #endif /* ifndef ladder_namespace_H */ 8 | 9 | -------------------------------------------------------------------------------- /libvpx/vpx_version.h: -------------------------------------------------------------------------------- 1 | #define VERSION_MAJOR 1 2 | #define VERSION_MINOR 5 3 | #define VERSION_PATCH 0 4 | #define VERSION_EXTRA "794-gb2ccb9c" 5 | #define VERSION_PACKED ((VERSION_MAJOR<<16)|(VERSION_MINOR<<8)|(VERSION_PATCH)) 6 | #define VERSION_STRING_NOSP "v1.5.0-794-gb2ccb9c" 7 | #define VERSION_STRING " v1.5.0-794-gb2ccb9c" 8 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.h: -------------------------------------------------------------------------------- 1 | #ifndef curve25519_sandy2x_H 2 | #define curve25519_sandy2x_H 3 | 4 | #include "crypto_scalarmult_curve25519.h" 5 | 6 | extern struct crypto_scalarmult_curve25519_implementation 7 | crypto_scalarmult_curve25519_sandy2x_implementation; 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/salsa208/stream_salsa208_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_stream_salsa208.h" 2 | 3 | size_t 4 | crypto_stream_salsa208_keybytes(void) { 5 | return crypto_stream_salsa208_KEYBYTES; 6 | } 7 | 8 | size_t 9 | crypto_stream_salsa208_noncebytes(void) { 10 | return crypto_stream_salsa208_NONCEBYTES; 11 | } 12 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_stream_xsalsa20.h" 2 | 3 | size_t 4 | crypto_stream_xsalsa20_keybytes(void) { 5 | return crypto_stream_xsalsa20_KEYBYTES; 6 | } 7 | 8 | size_t 9 | crypto_stream_xsalsa20_noncebytes(void) { 10 | return crypto_stream_xsalsa20_NONCEBYTES; 11 | } 12 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/salsa2012/stream_salsa2012_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_stream_salsa2012.h" 2 | 3 | size_t 4 | crypto_stream_salsa2012_keybytes(void) { 5 | return crypto_stream_salsa2012_KEYBYTES; 6 | } 7 | 8 | size_t 9 | crypto_stream_salsa2012_noncebytes(void) { 10 | return crypto_stream_salsa2012_NONCEBYTES; 11 | } 12 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base_namespace.h: -------------------------------------------------------------------------------- 1 | #ifndef ladder_base_namespace_H 2 | #define ladder_base_namespace_H 3 | 4 | #define ladder_base crypto_scalarmult_curve25519_sandy2x_ladder_base 5 | #define _ladder_base _crypto_scalarmult_curve25519_sandy2x_ladder_base 6 | 7 | #endif /* ifndef ladder_base_namespace_H */ 8 | 9 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_shorthash_siphash24.h" 2 | 3 | size_t 4 | crypto_shorthash_siphash24_bytes(void) { 5 | return crypto_shorthash_siphash24_BYTES; 6 | } 7 | 8 | size_t 9 | crypto_shorthash_siphash24_keybytes(void) { 10 | return crypto_shorthash_siphash24_KEYBYTES; 11 | } 12 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/core.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_core_H 3 | #define sodium_core_H 4 | 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | SODIUM_EXPORT 12 | int sodium_init(void) 13 | __attribute__ ((warn_unused_result)); 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.h: -------------------------------------------------------------------------------- 1 | #ifndef x25519_ref10_H 2 | #define x25519_ref10_H 3 | 4 | #include "crypto_scalarmult_curve25519.h" 5 | #include "../scalarmult_curve25519.h" 6 | 7 | extern struct crypto_scalarmult_curve25519_implementation 8 | crypto_scalarmult_curve25519_ref10_implementation; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder.h: -------------------------------------------------------------------------------- 1 | #ifndef ladder_H 2 | #define ladder_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "fe.h" 9 | #include "ladder_namespace.h" 10 | 11 | extern void ladder(fe *, const unsigned char *); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif /* ifndef ladder_H */ 18 | 19 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/donna_c64/curve25519_donna_c64.h: -------------------------------------------------------------------------------- 1 | #ifndef curve25519_donna_c64_H 2 | #define curve25519_donna_c64_H 3 | 4 | #include "crypto_scalarmult_curve25519.h" 5 | #include "../scalarmult_curve25519.h" 6 | 7 | extern struct crypto_scalarmult_curve25519_implementation 8 | crypto_scalarmult_curve25519_donna_c64_implementation; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/sodium/version.c: -------------------------------------------------------------------------------- 1 | 2 | #include "version.h" 3 | 4 | const char * 5 | sodium_version_string(void) 6 | { 7 | return SODIUM_VERSION_STRING; 8 | } 9 | 10 | int 11 | sodium_library_version_major(void) 12 | { 13 | return SODIUM_LIBRARY_VERSION_MAJOR; 14 | } 15 | 16 | int 17 | sodium_library_version_minor(void) 18 | { 19 | return SODIUM_LIBRARY_VERSION_MINOR; 20 | } 21 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.h: -------------------------------------------------------------------------------- 1 | #ifndef poly1305_sse2_H 2 | #define poly1305_sse2_H 3 | 4 | #include 5 | 6 | #include "crypto_onetimeauth_poly1305.h" 7 | #include "../onetimeauth_poly1305.h" 8 | 9 | extern struct crypto_onetimeauth_poly1305_implementation 10 | crypto_onetimeauth_poly1305_sse2_implementation; 11 | 12 | #endif /* poly1305_sse2_H */ 13 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/ladder_base.h: -------------------------------------------------------------------------------- 1 | #ifndef ladder_base_H 2 | #define ladder_base_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include "fe.h" 9 | #include "ladder_base_namespace.h" 10 | 11 | extern void ladder_base(fe *, const unsigned char *); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | #endif /* ifndef ladder_base_H */ 18 | 19 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.h: -------------------------------------------------------------------------------- 1 | #ifndef poly1305_donna_H 2 | #define poly1305_donna_H 3 | 4 | #include 5 | 6 | #include "crypto_onetimeauth_poly1305.h" 7 | #include "../onetimeauth_poly1305.h" 8 | 9 | extern struct crypto_onetimeauth_poly1305_implementation 10 | crypto_onetimeauth_poly1305_donna_implementation; 11 | 12 | #endif /* poly1305_donna_H */ 13 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/sandy2x.S: -------------------------------------------------------------------------------- 1 | 2 | #ifdef HAVE_AVX_ASM 3 | 4 | #define IN_SANDY2X 5 | 6 | #include "consts.S" 7 | #include "fe51_mul.S" 8 | #include "fe51_nsquare.S" 9 | #include "fe51_pack.S" 10 | #include "ladder.S" 11 | #include "ladder_base.S" 12 | 13 | #if defined(__linux__) && defined(__ELF__) 14 | .section .note.GNU-stack,"",%progbits 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /libvpx/setup: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd ./libvpx 4 | 5 | rm *.dox 6 | rm *.c 7 | rm *.cc 8 | rm *.h 9 | rm *.mk 10 | rm *.log 11 | 12 | git reset --hard HEAD 13 | git clean -f 14 | git pull 15 | 16 | 17 | ./configure --target="x86-win32-vs12" --enable-vp8 --enable-vp9 --enable-libyuv --enable-static-msvcrt --enable-vp9-temporal-denoising --enable-vp9-postproc --enable-realtime-only 18 | #x86_64-win64-vs12 19 | make 20 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_verify/16/ref/verify_16.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | #include "crypto_verify_16.h" 6 | 7 | int 8 | crypto_verify_16(const unsigned char *x, const unsigned char *y) 9 | { 10 | uint_fast16_t d = 0U; 11 | int i; 12 | 13 | for (i = 0; i < 16; i++) { 14 | d |= x[i] ^ y[i]; 15 | } 16 | return (1 & ((d - 1) >> 8)) - 1; 17 | } 18 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_verify/32/ref/verify_32.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | #include "crypto_verify_32.h" 6 | 7 | int 8 | crypto_verify_32(const unsigned char *x, const unsigned char *y) 9 | { 10 | uint_fast16_t d = 0U; 11 | int i; 12 | 13 | for (i = 0; i < 32; i++) { 14 | d |= x[i] ^ y[i]; 15 | } 16 | return (1 & ((d - 1) >> 8)) - 1; 17 | } 18 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_verify/64/ref/verify_64.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | 5 | #include "crypto_verify_64.h" 6 | 7 | int 8 | crypto_verify_64(const unsigned char *x, const unsigned char *y) 9 | { 10 | uint_fast16_t d = 0U; 11 | int i; 12 | 13 | for (i = 0; i < 64; i++) { 14 | d |= x[i] ^ y[i]; 15 | } 16 | return (1 & ((d - 1) >> 8)) - 1; 17 | } 18 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/randombytes_sysrandom.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_sysrandom_H 3 | #define randombytes_sysrandom_H 4 | 5 | #include "export.h" 6 | #include "randombytes.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | SODIUM_EXPORT 13 | extern struct randombytes_implementation randombytes_sysrandom_implementation; 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/randombytes_salsa20_random.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_salsa20_random_H 3 | #define randombytes_salsa20_random_H 4 | 5 | #include "export.h" 6 | #include "randombytes.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | SODIUM_EXPORT 13 | extern struct randombytes_implementation randombytes_salsa20_implementation; 14 | 15 | #ifdef __cplusplus 16 | } 17 | #endif 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_auth_hmacsha256.h" 2 | 3 | size_t 4 | crypto_auth_hmacsha256_bytes(void) { 5 | return crypto_auth_hmacsha256_BYTES; 6 | } 7 | 8 | size_t 9 | crypto_auth_hmacsha256_keybytes(void) { 10 | return crypto_auth_hmacsha256_KEYBYTES; 11 | } 12 | 13 | size_t 14 | crypto_auth_hmacsha256_statebytes(void) { 15 | return sizeof(crypto_auth_hmacsha256_state); 16 | } 17 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_auth_hmacsha512.h" 2 | 3 | size_t 4 | crypto_auth_hmacsha512_bytes(void) { 5 | return crypto_auth_hmacsha512_BYTES; 6 | } 7 | 8 | size_t 9 | crypto_auth_hmacsha512_keybytes(void) { 10 | return crypto_auth_hmacsha512_KEYBYTES; 11 | } 12 | 13 | size_t 14 | crypto_auth_hmacsha512_statebytes(void) { 15 | return sizeof(crypto_auth_hmacsha512_state); 16 | } 17 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_hash/crypto_hash.c: -------------------------------------------------------------------------------- 1 | 2 | #include "crypto_hash.h" 3 | 4 | size_t 5 | crypto_hash_bytes(void) 6 | { 7 | return crypto_hash_BYTES; 8 | } 9 | 10 | int 11 | crypto_hash(unsigned char *out, const unsigned char *in, 12 | unsigned long long inlen) 13 | { 14 | return crypto_hash_sha512(out, in, inlen); 15 | } 16 | 17 | const char * 18 | crypto_hash_primitive(void) { 19 | return crypto_hash_PRIMITIVE; 20 | } 21 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef scalarmult_poly1305_H 3 | #define scalarmult_poly1305_H 4 | 5 | typedef struct crypto_scalarmult_curve25519_implementation { 6 | int (*mult)(unsigned char *q, const unsigned char *n, 7 | const unsigned char *p); 8 | int (*mult_base)(unsigned char *q, const unsigned char *n); 9 | } crypto_scalarmult_curve25519_implementation; 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /libvpx/vpx/exports_com: -------------------------------------------------------------------------------- 1 | text vpx_codec_build_config 2 | text vpx_codec_control_ 3 | text vpx_codec_destroy 4 | text vpx_codec_err_to_string 5 | text vpx_codec_error 6 | text vpx_codec_error_detail 7 | text vpx_codec_get_caps 8 | text vpx_codec_iface_name 9 | text vpx_codec_version 10 | text vpx_codec_version_extra_str 11 | text vpx_codec_version_str 12 | text vpx_img_alloc 13 | text vpx_img_flip 14 | text vpx_img_free 15 | text vpx_img_set_rect 16 | text vpx_img_wrap 17 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/aes128ctr/stream_aes128ctr_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_stream_aes128ctr.h" 2 | 3 | size_t 4 | crypto_stream_aes128ctr_keybytes(void) { 5 | return crypto_stream_aes128ctr_KEYBYTES; 6 | } 7 | 8 | size_t 9 | crypto_stream_aes128ctr_noncebytes(void) { 10 | return crypto_stream_aes128ctr_NONCEBYTES; 11 | } 12 | 13 | size_t 14 | crypto_stream_aes128ctr_beforenmbytes(void) { 15 | return crypto_stream_aes128ctr_BEFORENMBYTES; 16 | } 17 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_auth_hmacsha512256.h" 2 | 3 | size_t 4 | crypto_auth_hmacsha512256_bytes(void) { 5 | return crypto_auth_hmacsha512256_BYTES; 6 | } 7 | 8 | size_t 9 | crypto_auth_hmacsha512256_keybytes(void) { 10 | return crypto_auth_hmacsha512256_KEYBYTES; 11 | } 12 | 13 | size_t 14 | crypto_auth_hmacsha512256_statebytes(void) { 15 | return sizeof(crypto_auth_hmacsha512256_state); 16 | } 17 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/randombytes_nativeclient.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef randombytes_nativeclient_H 3 | #define randombytes_nativeclient_H 4 | 5 | #ifdef __native_client__ 6 | 7 | # include "export.h" 8 | # include "randombytes.h" 9 | 10 | # ifdef __cplusplus 11 | extern "C" { 12 | # endif 13 | 14 | SODIUM_EXPORT 15 | extern struct randombytes_implementation randombytes_nativeclient_implementation; 16 | 17 | # ifdef __cplusplus 18 | } 19 | # endif 20 | 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /libvpx/vpx/exports_enc: -------------------------------------------------------------------------------- 1 | text vpx_codec_enc_config_default 2 | text vpx_codec_enc_config_set 3 | text vpx_codec_enc_init_multi_ver 4 | text vpx_codec_enc_init_ver 5 | text vpx_codec_encode 6 | text vpx_codec_get_cx_data 7 | text vpx_codec_get_global_headers 8 | text vpx_codec_get_preview_frame 9 | text vpx_codec_set_cx_data_buf 10 | text vpx_svc_dump_statistics 11 | text vpx_svc_encode 12 | text vpx_svc_get_message 13 | text vpx_svc_init 14 | text vpx_svc_release 15 | text vpx_svc_set_options 16 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_auth/hmacsha256/cp/verify_hmacsha256.c: -------------------------------------------------------------------------------- 1 | #include "crypto_auth_hmacsha256.h" 2 | #include "crypto_verify_32.h" 3 | #include "utils.h" 4 | 5 | int crypto_auth_hmacsha256_verify(const unsigned char *h,const unsigned char *in,unsigned long long inlen,const unsigned char *k) 6 | { 7 | unsigned char correct[32]; 8 | crypto_auth_hmacsha256(correct,in,inlen,k); 9 | return crypto_verify_32(h,correct) | (-(h == correct)) | 10 | sodium_memcmp(correct,h,32); 11 | } 12 | -------------------------------------------------------------------------------- /libvpx/usage_cx.dox: -------------------------------------------------------------------------------- 1 | /*! \page usage_encode Encoding 2 | 3 | The vpx_codec_encode() function is at the core of the encode loop. It 4 | processes raw images passed by the application, producing packets of 5 | compressed data. The deadline parameter controls the amount 6 | of time in microseconds the encoder should spend working on the frame. For 7 | more information on the deadline parameter, see 8 | \ref usage_deadline. 9 | 10 | 11 | \ref samples 12 | 13 | */ 14 | -------------------------------------------------------------------------------- /libvpx/third_party/libyuv/README.libvpx: -------------------------------------------------------------------------------- 1 | Name: libyuv 2 | URL: http://code.google.com/p/libyuv/ 3 | Version: 1456 4 | License: BSD 5 | License File: LICENSE 6 | 7 | Description: 8 | libyuv is an open source project that includes YUV conversion and scaling 9 | functionality. 10 | 11 | The optimized scaler in libyuv is used in multiple resolution encoder example, 12 | which down-samples the original input video (f.g. 1280x720) a number of times 13 | in order to encode multiple resolution bit streams. 14 | 15 | Local Modifications: 16 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_auth/hmacsha512/cp/verify_hmacsha512.c: -------------------------------------------------------------------------------- 1 | #include "crypto_auth_hmacsha512.h" 2 | #include "crypto_verify_64.h" 3 | #include "utils.h" 4 | 5 | int crypto_auth_hmacsha512_verify(const unsigned char *h, const unsigned char *in, 6 | unsigned long long inlen, const unsigned char *k) 7 | { 8 | unsigned char correct[64]; 9 | crypto_auth_hmacsha512(correct,in,inlen,k); 10 | return crypto_verify_64(h,correct) | (-(h == correct)) | 11 | sodium_memcmp(correct,h,64); 12 | } 13 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_core/salsa20/core_salsa20_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_core_salsa20.h" 2 | 3 | size_t 4 | crypto_core_salsa20_outputbytes(void) { 5 | return crypto_core_salsa20_OUTPUTBYTES; 6 | } 7 | 8 | size_t 9 | crypto_core_salsa20_inputbytes(void) { 10 | return crypto_core_salsa20_INPUTBYTES; 11 | } 12 | 13 | size_t 14 | crypto_core_salsa20_keybytes(void) { 15 | return crypto_core_salsa20_KEYBYTES; 16 | } 17 | 18 | size_t 19 | crypto_core_salsa20_constbytes(void) { 20 | return crypto_core_salsa20_CONSTBYTES; 21 | } 22 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_verify_16.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_16_H 2 | #define crypto_verify_16_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_16_BYTES 16U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_16_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_16(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_verify_32.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_32_H 2 | #define crypto_verify_32_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_32_BYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_32_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_32(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_verify_64.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_verify_64_H 2 | #define crypto_verify_64_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_verify_64_BYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_verify_64_bytes(void); 14 | 15 | SODIUM_EXPORT 16 | int crypto_verify_64(const unsigned char *x, const unsigned char *y) 17 | __attribute__ ((warn_unused_result)); 18 | 19 | #ifdef __cplusplus 20 | } 21 | #endif 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /toxcore/other/bootstrap_daemon/tox-bootstrapd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Tox DHT Bootstrap Daemon 3 | After=network.target 4 | 5 | [Service] 6 | Type=forking 7 | RuntimeDirectory=tox-bootstrapd 8 | RuntimeDirectoryMode=750 9 | PIDFile=/var/run/tox-bootstrapd/tox-bootstrapd.pid 10 | WorkingDirectory=/var/lib/tox-bootstrapd 11 | ExecStart=/usr/local/bin/tox-bootstrapd /etc/tox-bootstrapd.conf 12 | User=tox-bootstrapd 13 | Group=tox-bootstrapd 14 | #CapabilityBoundingSet=CAP_NET_BIND_SERVICE 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_core_hsalsa20.h" 2 | 3 | size_t 4 | crypto_core_hsalsa20_outputbytes(void) { 5 | return crypto_core_hsalsa20_OUTPUTBYTES; 6 | } 7 | 8 | size_t 9 | crypto_core_hsalsa20_inputbytes(void) { 10 | return crypto_core_hsalsa20_INPUTBYTES; 11 | } 12 | 13 | size_t 14 | crypto_core_hsalsa20_keybytes(void) { 15 | return crypto_core_hsalsa20_KEYBYTES; 16 | } 17 | 18 | size_t 19 | crypto_core_hsalsa20_constbytes(void) { 20 | return crypto_core_hsalsa20_CONSTBYTES; 21 | } 22 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_core/salsa208/core_salsa208_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_core_salsa208.h" 2 | 3 | size_t 4 | crypto_core_salsa208_outputbytes(void) { 5 | return crypto_core_salsa208_OUTPUTBYTES; 6 | } 7 | 8 | size_t 9 | crypto_core_salsa208_inputbytes(void) { 10 | return crypto_core_salsa208_INPUTBYTES; 11 | } 12 | 13 | size_t 14 | crypto_core_salsa208_keybytes(void) { 15 | return crypto_core_salsa208_KEYBYTES; 16 | } 17 | 18 | size_t 19 | crypto_core_salsa208_constbytes(void) { 20 | return crypto_core_salsa208_CONSTBYTES; 21 | } 22 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_core/salsa2012/core_salsa2012_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_core_salsa2012.h" 2 | 3 | size_t 4 | crypto_core_salsa2012_outputbytes(void) { 5 | return crypto_core_salsa2012_OUTPUTBYTES; 6 | } 7 | 8 | size_t 9 | crypto_core_salsa2012_inputbytes(void) { 10 | return crypto_core_salsa2012_INPUTBYTES; 11 | } 12 | 13 | size_t 14 | crypto_core_salsa2012_keybytes(void) { 15 | return crypto_core_salsa2012_KEYBYTES; 16 | } 17 | 18 | size_t 19 | crypto_core_salsa2012_constbytes(void) { 20 | return crypto_core_salsa2012_CONSTBYTES; 21 | } 22 | -------------------------------------------------------------------------------- /libvpx/vpx_util/vpx_util.mk: -------------------------------------------------------------------------------- 1 | ## 2 | ## Copyright (c) 2015 The WebM project authors. All Rights Reserved. 3 | ## 4 | ## Use of this source code is governed by a BSD-style license 5 | ## that can be found in the LICENSE file in the root of the source 6 | ## tree. An additional intellectual property rights grant can be found 7 | ## in the file PATENTS. All contributing project authors may 8 | ## be found in the AUTHORS file in the root of the source tree. 9 | ## 10 | 11 | UTIL_SRCS-yes += vpx_util.mk 12 | UTIL_SRCS-yes += vpx_thread.c 13 | UTIL_SRCS-yes += vpx_thread.h 14 | UTIL_SRCS-yes += endian_inl.h 15 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/before_curve25519xsalsa20poly1305.c: -------------------------------------------------------------------------------- 1 | #include "crypto_box_curve25519xsalsa20poly1305.h" 2 | #include "crypto_core_hsalsa20.h" 3 | #include "crypto_scalarmult_curve25519.h" 4 | 5 | static const unsigned char n[16] = {0}; 6 | 7 | int crypto_box_curve25519xsalsa20poly1305_beforenm( 8 | unsigned char *k, 9 | const unsigned char *pk, 10 | const unsigned char *sk 11 | ) 12 | { 13 | unsigned char s[32]; 14 | if (crypto_scalarmult_curve25519(s,sk,pk) != 0) { 15 | return -1; 16 | } 17 | return crypto_core_hsalsa20(k,n,s,NULL); 18 | } 19 | -------------------------------------------------------------------------------- /libvpx/vpx_ports/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VPX_PORTS_CONFIG_H_ 12 | #define VPX_PORTS_CONFIG_H_ 13 | 14 | #include "vpx_config.h" 15 | 16 | #endif // VPX_PORTS_CONFIG_H_ 17 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/version.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_version_H 3 | #define sodium_version_H 4 | 5 | #include "export.h" 6 | 7 | #define SODIUM_VERSION_STRING "1.0.10" 8 | 9 | #define SODIUM_LIBRARY_VERSION_MAJOR 9 10 | #define SODIUM_LIBRARY_VERSION_MINOR 2 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | SODIUM_EXPORT 17 | const char *sodium_version_string(void); 18 | 19 | SODIUM_EXPORT 20 | int sodium_library_version_major(void); 21 | 22 | SODIUM_EXPORT 23 | int sodium_library_version_minor(void); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_stream_salsa20.h" 2 | 3 | size_t 4 | crypto_stream_salsa20_keybytes(void) { 5 | return crypto_stream_salsa20_KEYBYTES; 6 | } 7 | 8 | size_t 9 | crypto_stream_salsa20_noncebytes(void) { 10 | return crypto_stream_salsa20_NONCEBYTES; 11 | } 12 | 13 | int 14 | crypto_stream_salsa20_xor(unsigned char *c, const unsigned char *m, 15 | unsigned long long mlen, const unsigned char *n, 16 | const unsigned char *k) 17 | { 18 | return crypto_stream_salsa20_xor_ic(c, m, mlen, n, 0U, k); 19 | } 20 | -------------------------------------------------------------------------------- /libvpx/asms.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION 3 | 4 | 5 | 6 | rem 7 | 8 | rem sh egrep -o " %TEMP%\$$$.$$$ 10 | 11 | echo. > asms.txt 12 | 13 | for /f %%i in ('"sh egrep -o "[a-z0-9_\\]+\.asm" %TEMP%\$$$.$$$"') do ( 14 | 15 | echo ^ >>asms.txt 16 | copy asms.txt+asms_part.txt asms.txt 17 | 18 | ) 19 | 20 | 21 | del %TEMP%\$$$.$$$ 22 | 23 | rem | gawk '{print $2 " equ " $3}' > vpx_config.asm 24 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_auth/hmacsha512256/cp/verify_hmacsha512256.c: -------------------------------------------------------------------------------- 1 | #include "crypto_auth_hmacsha512256.h" 2 | #include "crypto_verify_32.h" 3 | #include "utils.h" 4 | 5 | int crypto_auth_hmacsha512256_verify(const unsigned char *h, 6 | const unsigned char *in, 7 | unsigned long long inlen, 8 | const unsigned char *k) 9 | { 10 | unsigned char correct[32]; 11 | crypto_auth_hmacsha512256(correct,in,inlen,k); 12 | return crypto_verify_32(h,correct) | (-(h == correct)) | 13 | sodium_memcmp(correct,h,32); 14 | } 15 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts.S: -------------------------------------------------------------------------------- 1 | #ifdef IN_SANDY2X 2 | 3 | /* 4 | REDMASK51 is from amd64-51/consts.s. 5 | */ 6 | 7 | #include "consts_namespace.h" 8 | .data 9 | .p2align 4 10 | v0_0: .quad 0, 0 11 | v1_0: .quad 1, 0 12 | v2_1: .quad 2, 1 13 | v9_0: .quad 9, 0 14 | v9_9: .quad 9, 9 15 | v19_19: .quad 19, 19 16 | v38_1: .quad 38, 1 17 | v38_38: .quad 38, 38 18 | v121666_121666: .quad 121666, 121666 19 | m25: .quad 33554431, 33554431 20 | m26: .quad 67108863, 67108863 21 | subc0: .quad 0x07FFFFDA, 0x03FFFFFE 22 | subc2: .quad 0x07FFFFFE, 0x03FFFFFE 23 | REDMASK51: .quad 0x0007FFFFFFFFFFFF 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_shorthash/crypto_shorthash.c: -------------------------------------------------------------------------------- 1 | 2 | #include "crypto_shorthash.h" 3 | 4 | size_t 5 | crypto_shorthash_bytes(void) 6 | { 7 | return crypto_shorthash_BYTES; 8 | } 9 | 10 | size_t 11 | crypto_shorthash_keybytes(void) 12 | { 13 | return crypto_shorthash_KEYBYTES; 14 | } 15 | 16 | const char * 17 | crypto_shorthash_primitive(void) 18 | { 19 | return crypto_shorthash_PRIMITIVE; 20 | } 21 | 22 | int 23 | crypto_shorthash(unsigned char *out, const unsigned char *in, 24 | unsigned long long inlen, const unsigned char *k) 25 | { 26 | return crypto_shorthash_siphash24(out, in, inlen, k); 27 | } 28 | -------------------------------------------------------------------------------- /libvpx/vp8/common/rtcd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | #include "./vpx_config.h" 11 | #define RTCD_C 12 | #include "./vp8_rtcd.h" 13 | #include "vpx_ports/vpx_once.h" 14 | 15 | 16 | void vp8_rtcd() 17 | { 18 | once(setup_rtcd_internal); 19 | } 20 | -------------------------------------------------------------------------------- /libvpx/vpx_dsp/vpx_dsp_rtcd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | #include "./vpx_config.h" 11 | #define RTCD_C 12 | #include "./vpx_dsp_rtcd.h" 13 | #include "vpx_ports/vpx_once.h" 14 | 15 | void vpx_dsp_rtcd() { 16 | once(setup_rtcd_internal); 17 | } 18 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/xsalsa20/ref/stream_xsalsa20.c: -------------------------------------------------------------------------------- 1 | /* 2 | version 20080914 3 | D. J. Bernstein 4 | Public domain. 5 | */ 6 | 7 | #include "crypto_core_hsalsa20.h" 8 | #include "crypto_stream_salsa20.h" 9 | #include "crypto_stream_xsalsa20.h" 10 | #include "utils.h" 11 | 12 | int crypto_stream_xsalsa20( 13 | unsigned char *c,unsigned long long clen, 14 | const unsigned char *n, 15 | const unsigned char *k 16 | ) 17 | { 18 | unsigned char subkey[32]; 19 | int ret; 20 | crypto_core_hsalsa20(subkey,n,k,NULL); 21 | ret = crypto_stream_salsa20(c,clen,n + 16,subkey); 22 | sodium_memzero(subkey, sizeof subkey); 23 | return ret; 24 | } 25 | -------------------------------------------------------------------------------- /libvpx/third_party/libyuv/include/libyuv/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT 12 | #define INCLUDE_LIBYUV_VERSION_H_ 13 | 14 | #define LIBYUV_VERSION 1456 15 | 16 | #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT 17 | -------------------------------------------------------------------------------- /libvpx/vpx_scale/vpx_scale.mk: -------------------------------------------------------------------------------- 1 | SCALE_SRCS-yes += vpx_scale.mk 2 | SCALE_SRCS-yes += yv12config.h 3 | SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += vpx_scale.h 4 | SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/vpx_scale.c 5 | SCALE_SRCS-yes += generic/yv12config.c 6 | SCALE_SRCS-yes += generic/yv12extend.c 7 | SCALE_SRCS-$(CONFIG_SPATIAL_RESAMPLING) += generic/gen_scalers.c 8 | SCALE_SRCS-yes += vpx_scale_rtcd.c 9 | SCALE_SRCS-yes += vpx_scale_rtcd.pl 10 | 11 | #mips(dspr2) 12 | SCALE_SRCS-$(HAVE_DSPR2) += mips/dspr2/yv12extend_dspr2.c 13 | 14 | SCALE_SRCS-no += $(SCALE_SRCS_REMOVE-yes) 15 | 16 | $(eval $(call rtcd_h_template,vpx_scale_rtcd,vpx_scale/vpx_scale_rtcd.pl)) 17 | -------------------------------------------------------------------------------- /libvpx/vpx_scale/vpx_scale_rtcd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | #include "./vpx_config.h" 11 | #define RTCD_C 12 | #include "./vpx_scale_rtcd.h" 13 | #include "vpx_ports/vpx_once.h" 14 | 15 | void vpx_scale_rtcd() 16 | { 17 | once(setup_rtcd_internal); 18 | } 19 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/version.h.in: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_version_H 3 | #define sodium_version_H 4 | 5 | #include "export.h" 6 | 7 | #define SODIUM_VERSION_STRING "@VERSION@" 8 | 9 | #define SODIUM_LIBRARY_VERSION_MAJOR @SODIUM_LIBRARY_VERSION_MAJOR@ 10 | #define SODIUM_LIBRARY_VERSION_MINOR @SODIUM_LIBRARY_VERSION_MINOR@ 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | SODIUM_EXPORT 17 | const char *sodium_version_string(void); 18 | 19 | SODIUM_EXPORT 20 | int sodium_library_version_major(void); 21 | 22 | SODIUM_EXPORT 23 | int sodium_library_version_minor(void); 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /toxcore/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/runtime.h: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | #ifdef VANILLA_NACL /* toxcore only uses this when libsodium is unavailable */ 5 | 6 | #ifndef __SODIUM_RUNTIME_H__ 7 | #define __SODIUM_RUNTIME_H__ 1 8 | 9 | #include "export.h" 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | SODIUM_EXPORT 16 | int sodium_runtime_get_cpu_features(void); 17 | 18 | SODIUM_EXPORT 19 | int sodium_runtime_has_neon(void); 20 | 21 | SODIUM_EXPORT 22 | int sodium_runtime_has_sse2(void); 23 | 24 | SODIUM_EXPORT 25 | int sodium_runtime_has_sse3(void); 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is adapted from ref10/fe.h: 3 | All the redundant functions are removed. 4 | */ 5 | 6 | #ifndef fe_H 7 | #define fe_H 8 | 9 | #include 10 | #include 11 | 12 | typedef uint64_t fe[10]; 13 | 14 | /* 15 | fe means field element. 16 | Here the field is \Z/(2^255-19). 17 | An element t, entries t[0]...t[9], represents the integer 18 | t[0]+2^26 t[1]+2^51 t[2]+2^77 t[3]+2^102 t[4]+...+2^230 t[9]. 19 | Bounds on each t[i] vary depending on context. 20 | */ 21 | 22 | #define fe_frombytes crypto_scalarmult_curve25519_sandy2x_fe_frombytes 23 | 24 | extern void fe_frombytes(fe, const unsigned char *); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /libvpx/vpx_config.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */ 2 | /* */ 3 | /* Use of this source code is governed by a BSD-style license */ 4 | /* that can be found in the LICENSE file in the root of the source */ 5 | /* tree. An additional intellectual property rights grant can be found */ 6 | /* in the file PATENTS. All contributing project authors may */ 7 | /* be found in the AUTHORS file in the root of the source tree. */ 8 | #include "vpx/vpx_codec.h" 9 | static const char* const cfg = "--target=x86-win32-vs12 --enable-vp8 --enable-vp9 --enable-libyuv --enable-static-msvcrt --enable-vp9-temporal-denoising --enable-vp9-postproc --enable-realtime-only"; 10 | const char *vpx_codec_build_config(void) {return cfg;} 11 | -------------------------------------------------------------------------------- /toxcore/vs/config.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define DHT_HARDENING 1 4 | 5 | #ifdef _WIN32 6 | 7 | #include 8 | // support visual studio 2013 compile 9 | 10 | #define _INC_ERRNO 11 | 12 | typedef int ssize_t; 13 | 14 | #if _MSC_VER <= 1800 15 | #define snprintf _snprintf 16 | #define __func__ __FUNCTION__ 17 | #endif 18 | 19 | #define __attribute__(x) 20 | 21 | #define DYNAMIC( eltype, arrname, arrsize ) size_t sizeof_##arrname = sizeof(eltype) * (arrsize); eltype * arrname = _alloca( sizeof_##arrname ) 22 | #define sizeOf( dynarrname ) sizeof_##dynarrname 23 | 24 | #endif 25 | 26 | #ifdef _NIX 27 | 28 | #define DYNAMIC( eltype, arrname, arrsize ) eltype arrname[arrsize] 29 | #define sizeOf( dynarrname ) sizeof(dynarrname) 30 | 31 | #endif -------------------------------------------------------------------------------- /toxcore/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/note_to_maintainers.txt: -------------------------------------------------------------------------------- 1 | This folder is only meant for use with nacl, i.e. when sodium is unavailable. 2 | 3 | 4 | The files in this folder were mostly copied from 5 | https://github.com/jedisct1/libsodium/tree/0.7.0/src/libsodium/crypto_pwhash/scryptsalsa208sha256, 6 | with #ifdef VANILLA_NACL added around each of them as required for this module. 7 | 8 | export.h, utils.h, and runtime.h were copied from 9 | https://github.com/jedisct1/libsodium/tree/0.7.0/src/libsodium/include/sodium. 10 | utils.h was significantly truncated. 11 | 12 | utils.c and runtime.c were copied from 13 | https://github.com/jedisct1/libsodium/blob/0.7.0/src/libsodium/sodium. 14 | utils.c was also significantly truncated. 15 | -------------------------------------------------------------------------------- /libvpx/video_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VIDEO_COMMON_H_ 12 | #define VIDEO_COMMON_H_ 13 | 14 | #include "./tools_common.h" 15 | 16 | typedef struct { 17 | uint32_t codec_fourcc; 18 | int frame_width; 19 | int frame_height; 20 | struct VpxRational time_base; 21 | } VpxVideoInfo; 22 | 23 | #endif // VIDEO_COMMON_H_ 24 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/after_curve25519xsalsa20poly1305.c: -------------------------------------------------------------------------------- 1 | #include "crypto_box_curve25519xsalsa20poly1305.h" 2 | #include "crypto_secretbox_xsalsa20poly1305.h" 3 | 4 | int crypto_box_curve25519xsalsa20poly1305_afternm( 5 | unsigned char *c, 6 | const unsigned char *m,unsigned long long mlen, 7 | const unsigned char *n, 8 | const unsigned char *k 9 | ) 10 | { 11 | return crypto_secretbox_xsalsa20poly1305(c,m,mlen,n,k); 12 | } 13 | 14 | int crypto_box_curve25519xsalsa20poly1305_open_afternm( 15 | unsigned char *m, 16 | const unsigned char *c,unsigned long long clen, 17 | const unsigned char *n, 18 | const unsigned char *k 19 | ) 20 | { 21 | return crypto_secretbox_xsalsa20poly1305_open(m,c,clen,n,k); 22 | } 23 | -------------------------------------------------------------------------------- /libvpx/vp8/common/modecont.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_COMMON_MODECONT_H_ 13 | #define VP8_COMMON_MODECONT_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | extern const int vp8_mode_contexts[6][4]; 20 | 21 | #ifdef __cplusplus 22 | } // extern "C" 23 | #endif 24 | 25 | #endif // VP8_COMMON_MODECONT_H_ 26 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/crypto_scalarmult.c: -------------------------------------------------------------------------------- 1 | 2 | #include "crypto_scalarmult.h" 3 | 4 | const char * 5 | crypto_scalarmult_primitive(void) 6 | { 7 | return crypto_scalarmult_PRIMITIVE; 8 | } 9 | 10 | int 11 | crypto_scalarmult_base(unsigned char *q, const unsigned char *n) 12 | { 13 | return crypto_scalarmult_curve25519_base(q, n); 14 | } 15 | 16 | int 17 | crypto_scalarmult(unsigned char *q, const unsigned char *n, 18 | const unsigned char *p) 19 | { 20 | return crypto_scalarmult_curve25519(q, n, p); 21 | } 22 | 23 | size_t 24 | crypto_scalarmult_bytes(void) 25 | { 26 | return crypto_scalarmult_BYTES; 27 | } 28 | 29 | size_t 30 | crypto_scalarmult_scalarbytes(void) 31 | { 32 | return crypto_scalarmult_SCALARBYTES; 33 | } 34 | -------------------------------------------------------------------------------- /libvpx/vp9/common/vp9_rtcd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | #include "./vpx_config.h" 11 | #define RTCD_C 12 | #include "./vp9_rtcd.h" 13 | #include "vpx_ports/vpx_once.h" 14 | 15 | void vp9_rtcd() { 16 | // TODO(JBB): Remove this once, by insuring that both the encoder and 17 | // decoder setup functions are protected by once(); 18 | once(setup_rtcd_internal); 19 | } 20 | -------------------------------------------------------------------------------- /libvpx/vp8/decoder/decodemv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP8_DECODER_DECODEMV_H_ 12 | #define VP8_DECODER_DECODEMV_H_ 13 | 14 | #include "onyxd_int.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | void vp8_decode_mode_mvs(VP8D_COMP *); 21 | 22 | #ifdef __cplusplus 23 | } // extern "C" 24 | #endif 25 | 26 | #endif // VP8_DECODER_DECODEMV_H_ 27 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/bitstream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_ENCODER_BITSTREAM_H_ 13 | #define VP8_ENCODER_BITSTREAM_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | void vp8_pack_tokens(vp8_writer *w, const TOKENEXTRA *p, int xcount); 20 | 21 | #ifdef __cplusplus 22 | } // extern "C" 23 | #endif 24 | 25 | #endif // VP8_ENCODER_BITSTREAM_H_ 26 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/modecosts.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_ENCODER_MODECOSTS_H_ 13 | #define VP8_ENCODER_MODECOSTS_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | struct VP8_COMP; 20 | 21 | void vp8_init_mode_costs(struct VP8_COMP *x); 22 | 23 | #ifdef __cplusplus 24 | } // extern "C" 25 | #endif 26 | 27 | #endif // VP8_ENCODER_MODECOSTS_H_ 28 | -------------------------------------------------------------------------------- /toxcore/other/Makefile.inc: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS += DHT_bootstrap 2 | 3 | DHT_bootstrap_SOURCES = ../other/DHT_bootstrap.c \ 4 | ../toxcore/DHT.h \ 5 | ../toxcore/friend_requests.h 6 | 7 | DHT_bootstrap_CFLAGS = -I$(top_srcdir)/other \ 8 | $(LIBSODIUM_CFLAGS) \ 9 | $(NACL_CFLAGS) 10 | 11 | DHT_bootstrap_LDADD = $(LIBSODIUM_LDFLAGS) \ 12 | $(NACL_LDFLAGS) \ 13 | libtoxcore.la \ 14 | $(LIBSODIUM_LIBS) \ 15 | $(NACL_OBJECTS) \ 16 | $(NACL_LIBS) \ 17 | $(WINSOCK2_LIBS) 18 | 19 | EXTRA_DIST += $(top_srcdir)/other/DHTnodes \ 20 | $(top_srcdir)/other/tox.png 21 | -------------------------------------------------------------------------------- /libvpx/vp8/common/blockd.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #include "blockd.h" 13 | #include "vpx_mem/vpx_mem.h" 14 | 15 | const unsigned char vp8_block2left[25] = 16 | { 17 | 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8 18 | }; 19 | const unsigned char vp8_block2above[25] = 20 | { 21 | 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8 22 | }; 23 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_auth/crypto_auth.c: -------------------------------------------------------------------------------- 1 | 2 | #include "crypto_auth.h" 3 | 4 | size_t 5 | crypto_auth_bytes(void) 6 | { 7 | return crypto_auth_BYTES; 8 | } 9 | 10 | size_t 11 | crypto_auth_keybytes(void) 12 | { 13 | return crypto_auth_KEYBYTES; 14 | } 15 | 16 | const char * 17 | crypto_auth_primitive(void) 18 | { 19 | return crypto_auth_PRIMITIVE; 20 | } 21 | 22 | int 23 | crypto_auth(unsigned char *out, const unsigned char *in, 24 | unsigned long long inlen, const unsigned char *k) 25 | { 26 | return crypto_auth_hmacsha512256(out, in, inlen, k); 27 | } 28 | 29 | int 30 | crypto_auth_verify(const unsigned char *h, const unsigned char *in, 31 | unsigned long long inlen,const unsigned char *k) 32 | { 33 | return crypto_auth_hmacsha512256_verify(h, in, inlen, k); 34 | } 35 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51.h: -------------------------------------------------------------------------------- 1 | /* 2 | This file is adapted from amd64-51/fe25519.h: 3 | 'fe25519' is renamed as 'fe51'; 4 | All the redundant functions are removed; 5 | New function fe51_nsquare is introduced. 6 | */ 7 | 8 | #ifndef fe51_H 9 | #define fe51_H 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | #include 16 | #include 17 | 18 | #include "fe51_namespace.h" 19 | 20 | typedef struct 21 | { 22 | uint64_t v[5]; 23 | } 24 | fe51; 25 | 26 | extern void fe51_pack(unsigned char *, const fe51 *); 27 | extern void fe51_mul(fe51 *, const fe51 *, const fe51 *); 28 | extern void fe51_nsquare(fe51 *, const fe51 *, int); 29 | extern void fe51_invert(fe51 *, const fe51 *); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_secretbox_xsalsa20poly1305.h" 2 | 3 | size_t 4 | crypto_secretbox_xsalsa20poly1305_keybytes(void) { 5 | return crypto_secretbox_xsalsa20poly1305_KEYBYTES; 6 | } 7 | 8 | size_t 9 | crypto_secretbox_xsalsa20poly1305_noncebytes(void) { 10 | return crypto_secretbox_xsalsa20poly1305_NONCEBYTES; 11 | } 12 | 13 | size_t 14 | crypto_secretbox_xsalsa20poly1305_zerobytes(void) { 15 | return crypto_secretbox_xsalsa20poly1305_ZEROBYTES; 16 | } 17 | 18 | size_t 19 | crypto_secretbox_xsalsa20poly1305_boxzerobytes(void) { 20 | return crypto_secretbox_xsalsa20poly1305_BOXZEROBYTES; 21 | } 22 | 23 | size_t 24 | crypto_secretbox_xsalsa20poly1305_macbytes(void) { 25 | return crypto_secretbox_xsalsa20poly1305_MACBYTES; 26 | } 27 | -------------------------------------------------------------------------------- /libvpx/vp9/decoder/vp9_dsubexp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP9_DECODER_VP9_DSUBEXP_H_ 13 | #define VP9_DECODER_VP9_DSUBEXP_H_ 14 | 15 | #include "vpx_dsp/bitreader.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void vp9_diff_update_prob(vpx_reader *r, vpx_prob* p); 22 | 23 | #ifdef __cplusplus 24 | } // extern "C" 25 | #endif 26 | 27 | #endif // VP9_DECODER_VP9_DSUBEXP_H_ 28 | -------------------------------------------------------------------------------- /libvpx/vpx/src/vpx_psnr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #include 12 | 13 | #include "vpx/internal/vpx_psnr.h" 14 | 15 | #define MAX_PSNR 100.0 16 | 17 | double vpx_sse_to_psnr(double samples, double peak, double sse) { 18 | if (sse > 0.0) { 19 | const double psnr = 10.0 * log10(samples * peak * peak / sse); 20 | return psnr > MAX_PSNR ? MAX_PSNR : psnr; 21 | } else { 22 | return MAX_PSNR; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_shorthash_siphash24.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_shorthash_siphash24_H 2 | #define crypto_shorthash_siphash24_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | # ifdef __GNUC__ 9 | # pragma GCC diagnostic ignored "-Wlong-long" 10 | # endif 11 | extern "C" { 12 | #endif 13 | 14 | #define crypto_shorthash_siphash24_BYTES 8U 15 | SODIUM_EXPORT 16 | size_t crypto_shorthash_siphash24_bytes(void); 17 | 18 | #define crypto_shorthash_siphash24_KEYBYTES 16U 19 | SODIUM_EXPORT 20 | size_t crypto_shorthash_siphash24_keybytes(void); 21 | 22 | SODIUM_EXPORT 23 | int crypto_shorthash_siphash24(unsigned char *out, const unsigned char *in, 24 | unsigned long long inlen, const unsigned char *k); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /libvpx/vpx_ports/system_state.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VPX_PORTS_SYSTEM_STATE_H_ 12 | #define VPX_PORTS_SYSTEM_STATE_H_ 13 | 14 | #include "./vpx_config.h" 15 | 16 | #if ARCH_X86 || ARCH_X86_64 17 | void vpx_reset_mmx_state(void); 18 | #define vpx_clear_system_state() vpx_reset_mmx_state() 19 | #else 20 | #define vpx_clear_system_state() 21 | #endif // ARCH_X86 || ARCH_X86_64 22 | #endif // VPX_PORTS_SYSTEM_STATE_H_ 23 | -------------------------------------------------------------------------------- /libvpx/vp8/common/systemdependent.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP8_COMMON_SYSTEMDEPENDENT_H_ 12 | #define VP8_COMMON_SYSTEMDEPENDENT_H_ 13 | 14 | #include "vpx_config.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | struct VP8Common; 21 | void vp8_machine_specific_config(struct VP8Common *); 22 | 23 | #ifdef __cplusplus 24 | } // extern "C" 25 | #endif 26 | 27 | #endif // VP8_COMMON_SYSTEMDEPENDENT_H_ 28 | -------------------------------------------------------------------------------- /libvpx/vp9/encoder/vp9_temporal_filter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_ENCODER_VP9_TEMPORAL_FILTER_H_ 12 | #define VP9_ENCODER_VP9_TEMPORAL_FILTER_H_ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | void vp9_temporal_filter_init(void); 19 | void vp9_temporal_filter(VP9_COMP *cpi, int distance); 20 | 21 | #ifdef __cplusplus 22 | } // extern "C" 23 | #endif 24 | 25 | #endif // VP9_ENCODER_VP9_TEMPORAL_FILTER_H_ 26 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.h: -------------------------------------------------------------------------------- 1 | #ifndef core_hchacha20_H 2 | #define core_hchacha20_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #define U8C(v) (v##U) 9 | #define U32C(v) (v##U) 10 | 11 | #define U8V(v) ((uint8_t)(v) & U8C(0xFF)) 12 | #define U32V(v) ((uint32_t)(v) & U32C(0xFFFFFFFF)) 13 | 14 | #define ROTL32(v, n) (U32V((v) << (n)) | ((v) >> (32 - (n)))) 15 | 16 | #define ROTATE(v, c) (ROTL32(v, c)) 17 | #define XOR(v, w) ((v) ^ (w)) 18 | #define PLUS(v, w) (U32V((v) + (w))) 19 | 20 | #define QUARTERROUND(a, b, c, d) \ 21 | do { \ 22 | a = PLUS(a, b); d = ROTATE(XOR(d, a), 16); \ 23 | c = PLUS(c, d); b = ROTATE(XOR(b, c), 12); \ 24 | a = PLUS(a, b); d = ROTATE(XOR(d, a), 8); \ 25 | c = PLUS(c, d); b = ROTATE(XOR(b, c), 7); \ 26 | } while(0) 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /libvpx/vp8/decoder/detokenize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP8_DECODER_DETOKENIZE_H_ 12 | #define VP8_DECODER_DETOKENIZE_H_ 13 | 14 | #include "onyxd_int.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | void vp8_reset_mb_tokens_context(MACROBLOCKD *x); 21 | int vp8_decode_mb_tokens(VP8D_COMP *, MACROBLOCKD *); 22 | 23 | #ifdef __cplusplus 24 | } // extern "C" 25 | #endif 26 | 27 | #endif // VP8_DECODER_DETOKENIZE_H_ 28 | -------------------------------------------------------------------------------- /libvpx/ivfdec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | #ifndef IVFDEC_H_ 11 | #define IVFDEC_H_ 12 | 13 | #include "./tools_common.h" 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | int file_is_ivf(struct VpxInputContext *input); 20 | 21 | int ivf_read_frame(FILE *infile, uint8_t **buffer, 22 | size_t *bytes_read, size_t *buffer_size); 23 | 24 | #ifdef __cplusplus 25 | } /* extern "C" */ 26 | #endif 27 | 28 | #endif // IVFDEC_H_ 29 | -------------------------------------------------------------------------------- /libvpx/vp8/common/swapyv12buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_COMMON_SWAPYV12BUFFER_H_ 13 | #define VP8_COMMON_SWAPYV12BUFFER_H_ 14 | 15 | #include "vpx_scale/yv12config.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void vp8_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame, YV12_BUFFER_CONFIG *last_frame); 22 | 23 | #ifdef __cplusplus 24 | } // extern "C" 25 | #endif 26 | 27 | #endif // VP8_COMMON_SWAPYV12BUFFER_H_ 28 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_namespace.h: -------------------------------------------------------------------------------- 1 | #ifndef fe51_namespace_H 2 | #define fe51_namespace_H 3 | 4 | #define fe51 crypto_scalarmult_curve25519_sandy2x_fe51 5 | #define _fe51 _crypto_scalarmult_curve25519_sandy2x_fe51 6 | #define fe51_pack crypto_scalarmult_curve25519_sandy2x_fe51_pack 7 | #define _fe51_pack _crypto_scalarmult_curve25519_sandy2x_fe51_pack 8 | #define fe51_mul crypto_scalarmult_curve25519_sandy2x_fe51_mul 9 | #define _fe51_mul _crypto_scalarmult_curve25519_sandy2x_fe51_mul 10 | #define fe51_nsquare crypto_scalarmult_curve25519_sandy2x_fe51_nsquare 11 | #define _fe51_nsquare _crypto_scalarmult_curve25519_sandy2x_fe51_nsquare 12 | 13 | #define fe51_invert crypto_scalarmult_curve25519_sandy2x_fe51_invert 14 | 15 | #endif /* ifndef fe51_namespace_H */ 16 | 17 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/crypto_stream.c: -------------------------------------------------------------------------------- 1 | 2 | #include "crypto_stream.h" 3 | 4 | size_t 5 | crypto_stream_keybytes(void) 6 | { 7 | return crypto_stream_KEYBYTES; 8 | } 9 | 10 | size_t 11 | crypto_stream_noncebytes(void) 12 | { 13 | return crypto_stream_NONCEBYTES; 14 | } 15 | 16 | const char * 17 | crypto_stream_primitive(void) 18 | { 19 | return crypto_stream_PRIMITIVE; 20 | } 21 | 22 | int 23 | crypto_stream(unsigned char *c, unsigned long long clen, 24 | const unsigned char *n, const unsigned char *k) 25 | { 26 | return crypto_stream_xsalsa20(c, clen, n, k); 27 | } 28 | 29 | 30 | int 31 | crypto_stream_xor(unsigned char *c, const unsigned char *m, 32 | unsigned long long mlen, const unsigned char *n, 33 | const unsigned char *k) 34 | { 35 | return crypto_stream_xsalsa20_xor(c, m, mlen, n, k); 36 | } 37 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/keypair_curve25519xsalsa20poly1305.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "crypto_box_curve25519xsalsa20poly1305.h" 4 | #include "crypto_hash_sha512.h" 5 | #include "crypto_scalarmult_curve25519.h" 6 | #include "randombytes.h" 7 | #include "utils.h" 8 | 9 | int crypto_box_curve25519xsalsa20poly1305_seed_keypair( 10 | unsigned char *pk, 11 | unsigned char *sk, 12 | const unsigned char *seed 13 | ) 14 | { 15 | unsigned char hash[64]; 16 | crypto_hash_sha512(hash,seed,32); 17 | memmove(sk,hash,32); 18 | sodium_memzero(hash, sizeof hash); 19 | return crypto_scalarmult_curve25519_base(pk,sk); 20 | } 21 | 22 | int crypto_box_curve25519xsalsa20poly1305_keypair( 23 | unsigned char *pk, 24 | unsigned char *sk 25 | ) 26 | { 27 | randombytes_buf(sk,32); 28 | return crypto_scalarmult_curve25519_base(pk,sk); 29 | } 30 | -------------------------------------------------------------------------------- /libvpx/vp9/encoder/vp9_aq_360.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP9_ENCODER_VP9_AQ_360_H_ 13 | #define VP9_ENCODER_VP9_AQ_360_H_ 14 | 15 | #include "vp9/encoder/vp9_encoder.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | unsigned int vp9_360aq_segment_id(int mi_row, int mi_rows); 22 | void vp9_360aq_frame_setup(VP9_COMP *cpi); 23 | 24 | #ifdef __cplusplus 25 | } // extern "C" 26 | #endif 27 | 28 | #endif // VP9_ENCODER_VP9_AQ_VARIANCE_H_ 29 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/segmentation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP8_ENCODER_SEGMENTATION_H_ 12 | #define VP8_ENCODER_SEGMENTATION_H_ 13 | 14 | #include "string.h" 15 | #include "vp8/common/blockd.h" 16 | #include "onyx_int.h" 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | extern void vp8_update_gf_useage_maps(VP8_COMP *cpi, VP8_COMMON *cm, MACROBLOCK *x); 23 | 24 | #ifdef __cplusplus 25 | } // extern "C" 26 | #endif 27 | 28 | #endif // VP8_ENCODER_SEGMENTATION_H_ 29 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/mr_dissim.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_ENCODER_MR_DISSIM_H_ 13 | #define VP8_ENCODER_MR_DISSIM_H_ 14 | #include "vpx_config.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | extern void vp8_cal_low_res_mb_cols(VP8_COMP *cpi); 21 | extern void vp8_cal_dissimilarity(VP8_COMP *cpi); 22 | extern void vp8_store_drop_frame_info(VP8_COMP *cpi); 23 | 24 | #ifdef __cplusplus 25 | } // extern "C" 26 | #endif 27 | 28 | #endif // VP8_ENCODER_MR_DISSIM_H_ 29 | -------------------------------------------------------------------------------- /libvpx/vp9/common/vp9_textblit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_COMMON_VP9_TEXTBLIT_H_ 12 | #define VP9_COMMON_VP9_TEXTBLIT_H_ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | void vp9_blit_text(const char *msg, unsigned char *address, int pitch); 19 | 20 | void vp9_blit_line(int x0, int x1, int y0, int y1, unsigned char *image, 21 | int pitch); 22 | 23 | #ifdef __cplusplus 24 | } // extern "C" 25 | #endif 26 | 27 | #endif // VP9_COMMON_VP9_TEXTBLIT_H_ 28 | -------------------------------------------------------------------------------- /libvpx/vpx_ports/vpx_ports.mk: -------------------------------------------------------------------------------- 1 | ## 2 | ## Copyright (c) 2012 The WebM project authors. All Rights Reserved. 3 | ## 4 | ## Use of this source code is governed by a BSD-style license 5 | ## that can be found in the LICENSE file in the root of the source 6 | ## tree. An additional intellectual property rights grant can be found 7 | ## in the file PATENTS. All contributing project authors may 8 | ## be found in the AUTHORS file in the root of the source tree. 9 | ## 10 | 11 | 12 | PORTS_SRCS-yes += vpx_ports.mk 13 | 14 | PORTS_SRCS-yes += bitops.h 15 | PORTS_SRCS-yes += mem.h 16 | PORTS_SRCS-yes += msvc.h 17 | PORTS_SRCS-yes += system_state.h 18 | PORTS_SRCS-yes += vpx_timer.h 19 | 20 | ifeq ($(ARCH_X86)$(ARCH_X86_64),yes) 21 | PORTS_SRCS-yes += emms.asm 22 | PORTS_SRCS-yes += x86.h 23 | PORTS_SRCS-yes += x86_abi_support.asm 24 | endif 25 | 26 | PORTS_SRCS-$(ARCH_ARM) += arm_cpudetect.c 27 | PORTS_SRCS-$(ARCH_ARM) += arm.h 28 | -------------------------------------------------------------------------------- /libvpx/vpx_dsp/x86/fwd_txfm_avx2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #include "./vpx_config.h" 12 | 13 | #define FDCT32x32_2D_AVX2 vpx_fdct32x32_rd_avx2 14 | #define FDCT32x32_HIGH_PRECISION 0 15 | #include "vpx_dsp/x86/fwd_dct32x32_impl_avx2.h" 16 | #undef FDCT32x32_2D_AVX2 17 | #undef FDCT32x32_HIGH_PRECISION 18 | 19 | #define FDCT32x32_2D_AVX2 vpx_fdct32x32_avx2 20 | #define FDCT32x32_HIGH_PRECISION 1 21 | #include "vpx_dsp/x86/fwd_dct32x32_impl_avx2.h" // NOLINT 22 | #undef FDCT32x32_2D_AVX2 23 | #undef FDCT32x32_HIGH_PRECISION 24 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_core_salsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa20_H 2 | #define crypto_core_salsa20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa20_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa20_outputbytes(void); 14 | 15 | #define crypto_core_salsa20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_salsa20_inputbytes(void); 18 | 19 | #define crypto_core_salsa20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_salsa20_keybytes(void); 22 | 23 | #define crypto_core_salsa20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_salsa20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_salsa20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/aes128ctr/portable/stream_aes128ctr.c: -------------------------------------------------------------------------------- 1 | 2 | #include "crypto_stream_aes128ctr.h" 3 | 4 | int crypto_stream_aes128ctr( 5 | unsigned char *out, 6 | unsigned long long outlen, 7 | const unsigned char *n, 8 | const unsigned char *k 9 | ) 10 | { 11 | unsigned char d[crypto_stream_aes128ctr_BEFORENMBYTES]; 12 | crypto_stream_aes128ctr_beforenm(d, k); 13 | crypto_stream_aes128ctr_afternm(out, outlen, n, d); 14 | return 0; 15 | } 16 | 17 | int crypto_stream_aes128ctr_xor( 18 | unsigned char *out, 19 | const unsigned char *in, 20 | unsigned long long inlen, 21 | const unsigned char *n, 22 | const unsigned char *k 23 | ) 24 | { 25 | unsigned char d[crypto_stream_aes128ctr_BEFORENMBYTES]; 26 | crypto_stream_aes128ctr_beforenm(d, k); 27 | crypto_stream_aes128ctr_xor_afternm(out, in, inlen, n, d); 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /toxcore/other/bootstrap_daemon/Makefile.inc: -------------------------------------------------------------------------------- 1 | if BUILD_DHT_BOOTSTRAP_DAEMON 2 | 3 | bin_PROGRAMS += tox-bootstrapd 4 | 5 | tox_bootstrapd_SOURCES = \ 6 | ../other/bootstrap_daemon/tox-bootstrapd.c 7 | 8 | tox_bootstrapd_CFLAGS = \ 9 | -I$(top_srcdir)/other/bootstrap_daemon \ 10 | $(LIBSODIUM_CFLAGS) \ 11 | $(NACL_CFLAGS) \ 12 | $(LIBCONFIG_CFLAGS) 13 | 14 | tox_bootstrapd_LDADD = \ 15 | $(LIBSODIUM_LDFLAGS) \ 16 | $(NACL_LDFLAGS) \ 17 | libtoxcore.la \ 18 | $(LIBCONFIG_LIBS) \ 19 | $(LIBSODIUM_LIBS) \ 20 | $(NACL_LIBS) 21 | 22 | endif 23 | 24 | EXTRA_DIST += \ 25 | $(top_srcdir)/other/bootstrap_daemon/tox-bootstrapd.conf \ 26 | $(top_srcdir)/other/bootstrap_daemon/tox-bootstrapd.sh 27 | 28 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_core_hsalsa20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_hsalsa20_H 2 | #define crypto_core_hsalsa20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_hsalsa20_OUTPUTBYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_core_hsalsa20_outputbytes(void); 14 | 15 | #define crypto_core_hsalsa20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_hsalsa20_inputbytes(void); 18 | 19 | #define crypto_core_hsalsa20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_hsalsa20_keybytes(void); 22 | 23 | #define crypto_core_hsalsa20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_hsalsa20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_hsalsa20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_core_salsa208.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa208_H 2 | #define crypto_core_salsa208_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa208_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa208_outputbytes(void); 14 | 15 | #define crypto_core_salsa208_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_salsa208_inputbytes(void); 18 | 19 | #define crypto_core_salsa208_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_salsa208_keybytes(void); 22 | 23 | #define crypto_core_salsa208_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_salsa208_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_salsa208(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /libvpx/vp8/common/mv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_COMMON_MV_H_ 13 | #define VP8_COMMON_MV_H_ 14 | #include "vpx/vpx_integer.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | typedef struct 21 | { 22 | short row; 23 | short col; 24 | } MV; 25 | 26 | typedef union int_mv 27 | { 28 | uint32_t as_int; 29 | MV as_mv; 30 | } int_mv; /* facilitates faster equality tests and copies */ 31 | 32 | #ifdef __cplusplus 33 | } // extern "C" 34 | #endif 35 | 36 | #endif // VP8_COMMON_MV_H_ 37 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/encodemv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_ENCODER_ENCODEMV_H_ 13 | #define VP8_ENCODER_ENCODEMV_H_ 14 | 15 | #include "onyx_int.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void vp8_write_mvprobs(VP8_COMP *); 22 | void vp8_encode_motion_vector(vp8_writer *, const MV *, const MV_CONTEXT *); 23 | void vp8_build_component_cost_table(int *mvcost[2], const MV_CONTEXT *mvc, int mvc_flag[2]); 24 | 25 | #ifdef __cplusplus 26 | } // extern "C" 27 | #endif 28 | 29 | #endif // VP8_ENCODER_ENCODEMV_H_ 30 | -------------------------------------------------------------------------------- /libvpx/vp9/encoder/vp9_ethread.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_ENCODER_VP9_ETHREAD_H_ 12 | #define VP9_ENCODER_VP9_ETHREAD_H_ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | struct VP9_COMP; 19 | struct ThreadData; 20 | 21 | typedef struct EncWorkerData { 22 | struct VP9_COMP *cpi; 23 | struct ThreadData *td; 24 | int start; 25 | } EncWorkerData; 26 | 27 | void vp9_encode_tiles_mt(struct VP9_COMP *cpi); 28 | 29 | #ifdef __cplusplus 30 | } // extern "C" 31 | #endif 32 | 33 | #endif // VP9_ENCODER_VP9_ETHREAD_H_ 34 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_core_hchacha20.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_hchacha20_H 2 | #define crypto_core_hchacha20_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_hchacha20_OUTPUTBYTES 32U 12 | SODIUM_EXPORT 13 | size_t crypto_core_hchacha20_outputbytes(void); 14 | 15 | #define crypto_core_hchacha20_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_hchacha20_inputbytes(void); 18 | 19 | #define crypto_core_hchacha20_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_hchacha20_keybytes(void); 22 | 23 | #define crypto_core_hchacha20_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_hchacha20_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_hchacha20(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_core_salsa2012.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_core_salsa2012_H 2 | #define crypto_core_salsa2012_H 3 | 4 | #include 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #define crypto_core_salsa2012_OUTPUTBYTES 64U 12 | SODIUM_EXPORT 13 | size_t crypto_core_salsa2012_outputbytes(void); 14 | 15 | #define crypto_core_salsa2012_INPUTBYTES 16U 16 | SODIUM_EXPORT 17 | size_t crypto_core_salsa2012_inputbytes(void); 18 | 19 | #define crypto_core_salsa2012_KEYBYTES 32U 20 | SODIUM_EXPORT 21 | size_t crypto_core_salsa2012_keybytes(void); 22 | 23 | #define crypto_core_salsa2012_CONSTBYTES 16U 24 | SODIUM_EXPORT 25 | size_t crypto_core_salsa2012_constbytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_core_salsa2012(unsigned char *out, const unsigned char *in, 29 | const unsigned char *k, const unsigned char *c); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/runtime.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_runtime_H 3 | #define sodium_runtime_H 4 | 5 | #include "export.h" 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | SODIUM_EXPORT 12 | int sodium_runtime_has_neon(void); 13 | 14 | SODIUM_EXPORT 15 | int sodium_runtime_has_sse2(void); 16 | 17 | SODIUM_EXPORT 18 | int sodium_runtime_has_sse3(void); 19 | 20 | SODIUM_EXPORT 21 | int sodium_runtime_has_ssse3(void); 22 | 23 | SODIUM_EXPORT 24 | int sodium_runtime_has_sse41(void); 25 | 26 | SODIUM_EXPORT 27 | int sodium_runtime_has_avx(void); 28 | 29 | SODIUM_EXPORT 30 | int sodium_runtime_has_avx2(void); 31 | 32 | SODIUM_EXPORT 33 | int sodium_runtime_has_pclmul(void); 34 | 35 | SODIUM_EXPORT 36 | int sodium_runtime_has_aesni(void); 37 | 38 | /* ------------------------------------------------------------------------- */ 39 | 40 | int _sodium_runtime_get_cpu_features(void); 41 | 42 | #ifdef __cplusplus 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /libvpx/vp9/encoder/vp9_picklpf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP9_ENCODER_VP9_PICKLPF_H_ 13 | #define VP9_ENCODER_VP9_PICKLPF_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include "vp9/encoder/vp9_encoder.h" 20 | 21 | struct yv12_buffer_config; 22 | struct VP9_COMP; 23 | 24 | void vp9_pick_filter_level(const struct yv12_buffer_config *sd, 25 | struct VP9_COMP *cpi, LPF_PICK_METHOD method); 26 | #ifdef __cplusplus 27 | } // extern "C" 28 | #endif 29 | 30 | #endif // VP9_ENCODER_VP9_PICKLPF_H_ 31 | -------------------------------------------------------------------------------- /libvpx/vpx_dsp/vpx_filter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VPX_DSP_VPX_FILTER_H_ 12 | #define VPX_DSP_VPX_FILTER_H_ 13 | 14 | #include "vpx/vpx_integer.h" 15 | 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #define FILTER_BITS 7 22 | 23 | #define SUBPEL_BITS 4 24 | #define SUBPEL_MASK ((1 << SUBPEL_BITS) - 1) 25 | #define SUBPEL_SHIFTS (1 << SUBPEL_BITS) 26 | #define SUBPEL_TAPS 8 27 | 28 | typedef int16_t InterpKernel[SUBPEL_TAPS]; 29 | 30 | #ifdef __cplusplus 31 | } // extern "C" 32 | #endif 33 | 34 | #endif // VPX_DSP_VPX_FILTER_H_ 35 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_shorthash.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_shorthash_H 2 | #define crypto_shorthash_H 3 | 4 | #include 5 | 6 | #include "crypto_shorthash_siphash24.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | #define crypto_shorthash_BYTES crypto_shorthash_siphash24_BYTES 17 | SODIUM_EXPORT 18 | size_t crypto_shorthash_bytes(void); 19 | 20 | #define crypto_shorthash_KEYBYTES crypto_shorthash_siphash24_KEYBYTES 21 | SODIUM_EXPORT 22 | size_t crypto_shorthash_keybytes(void); 23 | 24 | #define crypto_shorthash_PRIMITIVE "siphash24" 25 | SODIUM_EXPORT 26 | const char *crypto_shorthash_primitive(void); 27 | 28 | SODIUM_EXPORT 29 | int crypto_shorthash(unsigned char *out, const unsigned char *in, 30 | unsigned long long inlen, const unsigned char *k); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /toxcore/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/export.h: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | #ifdef VANILLA_NACL /* toxcore only uses this when libsodium is unavailable */ 5 | 6 | #ifndef __SODIUM_EXPORT_H__ 7 | #define __SODIUM_EXPORT_H__ 8 | 9 | #ifndef __GNUC__ 10 | # ifdef __attribute__ 11 | # undef __attribute__ 12 | # endif 13 | # define __attribute__(a) 14 | #endif 15 | 16 | #ifdef SODIUM_STATIC 17 | # define SODIUM_EXPORT 18 | #else 19 | # if defined(_MSC_VER) 20 | # ifdef DLL_EXPORT 21 | # define SODIUM_EXPORT __declspec(dllexport) 22 | # else 23 | # define SODIUM_EXPORT __declspec(dllimport) 24 | # endif 25 | # else 26 | # if defined(__SUNPRO_C) 27 | # define SODIUM_EXPORT __attribute__ __global 28 | # elif defined(_MSG_VER) 29 | # define SODIUM_EXPORT extern __declspec(dllexport) 30 | # else 31 | # define SODIUM_EXPORT __attribute__ ((visibility ("default"))) 32 | # endif 33 | # endif 34 | #endif 35 | 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/xsalsa20/ref/xor_xsalsa20.c: -------------------------------------------------------------------------------- 1 | /* 2 | version 20080913 3 | D. J. Bernstein 4 | Public domain. 5 | */ 6 | 7 | #include "crypto_core_hsalsa20.h" 8 | #include "crypto_stream_salsa20.h" 9 | #include "crypto_stream_xsalsa20.h" 10 | #include "utils.h" 11 | 12 | int crypto_stream_xsalsa20_xor_ic( 13 | unsigned char *c, 14 | const unsigned char *m,unsigned long long mlen, 15 | const unsigned char *n,uint64_t ic, 16 | const unsigned char *k 17 | ) 18 | { 19 | unsigned char subkey[32]; 20 | int ret; 21 | crypto_core_hsalsa20(subkey,n,k,NULL); 22 | ret = crypto_stream_salsa20_xor_ic(c,m,mlen,n + 16,ic,subkey); 23 | sodium_memzero(subkey, sizeof subkey); 24 | return ret; 25 | } 26 | 27 | int crypto_stream_xsalsa20_xor( 28 | unsigned char *c, 29 | const unsigned char *m,unsigned long long mlen, 30 | const unsigned char *n, 31 | const unsigned char *k 32 | ) 33 | { 34 | return crypto_stream_xsalsa20_xor_ic(c, m, mlen, n, 0ULL, k); 35 | } 36 | -------------------------------------------------------------------------------- /libvpx/vp8/common/copy_c.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #include 13 | 14 | #include "./vp8_rtcd.h" 15 | #include "vpx/vpx_integer.h" 16 | 17 | /* Copy 2 macroblocks to a buffer */ 18 | void vp8_copy32xn_c(const unsigned char *src_ptr, int src_stride, 19 | unsigned char *dst_ptr, int dst_stride, 20 | int height) 21 | { 22 | int r; 23 | 24 | for (r = 0; r < height; r++) 25 | { 26 | memcpy(dst_ptr, src_ptr, 32); 27 | 28 | src_ptr += src_stride; 29 | dst_ptr += dst_stride; 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /libvpx/vp8/common/filter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_COMMON_FILTER_H_ 13 | #define VP8_COMMON_FILTER_H_ 14 | 15 | #include "vpx_ports/mem.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #define BLOCK_HEIGHT_WIDTH 4 22 | #define VP8_FILTER_WEIGHT 128 23 | #define VP8_FILTER_SHIFT 7 24 | 25 | extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters[8][2]); 26 | extern DECLARE_ALIGNED(16, const short, vp8_sub_pel_filters[8][6]); 27 | 28 | #ifdef __cplusplus 29 | } // extern "C" 30 | #endif 31 | 32 | #endif // VP8_COMMON_FILTER_H_ 33 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519_api.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | #include "crypto_sign_ed25519.h" 5 | 6 | size_t 7 | crypto_sign_ed25519_bytes(void) { 8 | return crypto_sign_ed25519_BYTES; 9 | } 10 | 11 | size_t 12 | crypto_sign_ed25519_seedbytes(void) { 13 | return crypto_sign_ed25519_SEEDBYTES; 14 | } 15 | 16 | size_t 17 | crypto_sign_ed25519_publickeybytes(void) { 18 | return crypto_sign_ed25519_PUBLICKEYBYTES; 19 | } 20 | 21 | size_t 22 | crypto_sign_ed25519_secretkeybytes(void) { 23 | return crypto_sign_ed25519_SECRETKEYBYTES; 24 | } 25 | 26 | int 27 | crypto_sign_ed25519_sk_to_seed(unsigned char *seed, const unsigned char *sk) 28 | { 29 | memmove(seed, sk, crypto_sign_ed25519_SEEDBYTES); 30 | return 0; 31 | } 32 | 33 | int 34 | crypto_sign_ed25519_sk_to_pk(unsigned char *pk, const unsigned char *sk) 35 | { 36 | memmove(pk, sk + crypto_sign_ed25519_SEEDBYTES, 37 | crypto_sign_ed25519_PUBLICKEYBYTES); 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /libvpx/vp9/decoder/vp9_decodemv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_DECODER_VP9_DECODEMV_H_ 12 | #define VP9_DECODER_VP9_DECODEMV_H_ 13 | 14 | #include "vpx_dsp/bitreader.h" 15 | 16 | #include "vp9/decoder/vp9_decoder.h" 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | void vp9_read_mode_info(VP9Decoder *const pbi, MACROBLOCKD *xd, 23 | int mi_row, int mi_col, vpx_reader *r, 24 | int x_mis, int y_mis); 25 | 26 | #ifdef __cplusplus 27 | } // extern "C" 28 | #endif 29 | 30 | #endif // VP9_DECODER_VP9_DECODEMV_H_ 31 | -------------------------------------------------------------------------------- /libvpx/vpx_dsp/fwd_txfm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VPX_DSP_FWD_TXFM_H_ 12 | #define VPX_DSP_FWD_TXFM_H_ 13 | 14 | #include "vpx_dsp/txfm_common.h" 15 | 16 | static INLINE tran_high_t fdct_round_shift(tran_high_t input) { 17 | tran_high_t rv = ROUND_POWER_OF_TWO(input, DCT_CONST_BITS); 18 | // TODO(debargha, peter.derivaz): Find new bounds for this assert 19 | // and make the bounds consts. 20 | // assert(INT16_MIN <= rv && rv <= INT16_MAX); 21 | return rv; 22 | } 23 | 24 | void vpx_fdct32(const tran_high_t *input, tran_high_t *output, int round); 25 | #endif // VPX_DSP_FWD_TXFM_H_ 26 | -------------------------------------------------------------------------------- /libvpx/vp8/common/alloccommon.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_COMMON_ALLOCCOMMON_H_ 13 | #define VP8_COMMON_ALLOCCOMMON_H_ 14 | 15 | #include "onyxc_int.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void vp8_create_common(VP8_COMMON *oci); 22 | void vp8_remove_common(VP8_COMMON *oci); 23 | void vp8_de_alloc_frame_buffers(VP8_COMMON *oci); 24 | int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height); 25 | void vp8_setup_version(VP8_COMMON *oci); 26 | 27 | #ifdef __cplusplus 28 | } // extern "C" 29 | #endif 30 | 31 | #endif // VP8_COMMON_ALLOCCOMMON_H_ 32 | -------------------------------------------------------------------------------- /libvpx/vpx_ports/msvc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VPX_PORTS_MSVC_H_ 12 | #define VPX_PORTS_MSVC_H_ 13 | #ifdef _MSC_VER 14 | 15 | #include "./vpx_config.h" 16 | 17 | # if _MSC_VER < 1900 // VS2015 provides snprintf 18 | # define snprintf _snprintf 19 | # endif // _MSC_VER < 1900 20 | 21 | #if _MSC_VER < 1800 // VS2013 provides round 22 | #include 23 | static INLINE double round(double x) { 24 | if (x < 0) 25 | return ceil(x - 0.5); 26 | else 27 | return floor(x + 0.5); 28 | } 29 | #endif // _MSC_VER < 1800 30 | 31 | #endif // _MSC_VER 32 | #endif // VPX_PORTS_MSVC_H_ 33 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/encodeintra.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_ENCODER_ENCODEINTRA_H_ 13 | #define VP8_ENCODER_ENCODEINTRA_H_ 14 | #include "onyx_int.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | int vp8_encode_intra(VP8_COMP *cpi, MACROBLOCK *x, int use_dc_pred); 21 | void vp8_encode_intra16x16mby(MACROBLOCK *x); 22 | void vp8_encode_intra16x16mbuv(MACROBLOCK *x); 23 | void vp8_encode_intra4x4mby(MACROBLOCK *mb); 24 | void vp8_encode_intra4x4block(MACROBLOCK *x, int ib); 25 | #ifdef __cplusplus 26 | } // extern "C" 27 | #endif 28 | 29 | #endif // VP8_ENCODER_ENCODEINTRA_H_ 30 | -------------------------------------------------------------------------------- /libvpx/vp9/encoder/vp9_aq_variance.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP9_ENCODER_VP9_AQ_VARIANCE_H_ 13 | #define VP9_ENCODER_VP9_AQ_VARIANCE_H_ 14 | 15 | #include "vp9/encoder/vp9_encoder.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | unsigned int vp9_vaq_segment_id(int energy); 22 | void vp9_vaq_frame_setup(VP9_COMP *cpi); 23 | 24 | int vp9_block_energy(VP9_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs); 25 | double vp9_log_block_var(VP9_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bs); 26 | 27 | #ifdef __cplusplus 28 | } // extern "C" 29 | #endif 30 | 31 | #endif // VP9_ENCODER_VP9_AQ_VARIANCE_H_ 32 | -------------------------------------------------------------------------------- /libvpx/vp8/common/modecont.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #include "entropy.h" 13 | 14 | const int vp8_mode_contexts[6][4] = 15 | { 16 | { 17 | /* 0 */ 18 | 7, 1, 1, 143, 19 | }, 20 | { 21 | /* 1 */ 22 | 14, 18, 14, 107, 23 | }, 24 | { 25 | /* 2 */ 26 | 135, 64, 57, 68, 27 | }, 28 | { 29 | /* 3 */ 30 | 60, 56, 128, 65, 31 | }, 32 | { 33 | /* 4 */ 34 | 159, 134, 128, 34, 35 | }, 36 | { 37 | /* 5 */ 38 | 234, 188, 128, 28, 39 | }, 40 | }; 41 | -------------------------------------------------------------------------------- /libvpx/y4menc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef Y4MENC_H_ 12 | #define Y4MENC_H_ 13 | 14 | #include "./tools_common.h" 15 | 16 | #include "vpx/vpx_decoder.h" 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | #define Y4M_BUFFER_SIZE 128 23 | 24 | int y4m_write_file_header(char *buf, size_t len, int width, int height, 25 | const struct VpxRational *framerate, 26 | vpx_img_fmt_t fmt, unsigned int bit_depth); 27 | int y4m_write_frame_header(char *buf, size_t len); 28 | 29 | #ifdef __cplusplus 30 | } // extern "C" 31 | #endif 32 | 33 | #endif // Y4MENC_H_ 34 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/consts_namespace.h: -------------------------------------------------------------------------------- 1 | #ifndef consts_namespace_H 2 | #define consts_namespace_H 3 | 4 | #define v0_0 crypto_scalarmult_curve25519_sandy2x_v0_0 5 | #define v1_0 crypto_scalarmult_curve25519_sandy2x_v1_0 6 | #define v2_1 crypto_scalarmult_curve25519_sandy2x_v2_1 7 | #define v9_0 crypto_scalarmult_curve25519_sandy2x_v9_0 8 | #define v9_9 crypto_scalarmult_curve25519_sandy2x_v9_9 9 | #define v19_19 crypto_scalarmult_curve25519_sandy2x_v19_19 10 | #define v38_1 crypto_scalarmult_curve25519_sandy2x_v38_1 11 | #define v38_38 crypto_scalarmult_curve25519_sandy2x_v38_38 12 | #define v121666_121666 crypto_scalarmult_curve25519_sandy2x_v121666_121666 13 | #define m25 crypto_scalarmult_curve25519_sandy2x_m25 14 | #define m26 crypto_scalarmult_curve25519_sandy2x_m26 15 | #define subc0 crypto_scalarmult_curve25519_sandy2x_subc0 16 | #define subc2 crypto_scalarmult_curve25519_sandy2x_subc2 17 | #define REDMASK51 crypto_scalarmult_curve25519_sandy2x_REDMASK51 18 | 19 | #endif /* ifndef consts_namespace_H */ 20 | 21 | -------------------------------------------------------------------------------- /libvpx/vpx_ports/emms.asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | ; 4 | ; Use of this source code is governed by a BSD-style license 5 | ; that can be found in the LICENSE file in the root of the source 6 | ; tree. An additional intellectual property rights grant can be found 7 | ; in the file PATENTS. All contributing project authors may 8 | ; be found in the AUTHORS file in the root of the source tree. 9 | ; 10 | 11 | 12 | %include "vpx_ports/x86_abi_support.asm" 13 | 14 | section .text 15 | global sym(vpx_reset_mmx_state) PRIVATE 16 | sym(vpx_reset_mmx_state): 17 | emms 18 | ret 19 | 20 | 21 | %if LIBVPX_YASM_WIN64 22 | global sym(vpx_winx64_fldcw) PRIVATE 23 | sym(vpx_winx64_fldcw): 24 | sub rsp, 8 25 | mov [rsp], rcx ; win x64 specific 26 | fldcw [rsp] 27 | add rsp, 8 28 | ret 29 | 30 | 31 | global sym(vpx_winx64_fstcw) PRIVATE 32 | sym(vpx_winx64_fstcw): 33 | sub rsp, 8 34 | fstcw [rsp] 35 | mov rax, [rsp] 36 | add rsp, 8 37 | ret 38 | %endif 39 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_scalarmult.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_scalarmult_H 2 | #define crypto_scalarmult_H 3 | 4 | #include 5 | 6 | #include "crypto_scalarmult_curve25519.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #define crypto_scalarmult_BYTES crypto_scalarmult_curve25519_BYTES 14 | SODIUM_EXPORT 15 | size_t crypto_scalarmult_bytes(void); 16 | 17 | #define crypto_scalarmult_SCALARBYTES crypto_scalarmult_curve25519_SCALARBYTES 18 | SODIUM_EXPORT 19 | size_t crypto_scalarmult_scalarbytes(void); 20 | 21 | #define crypto_scalarmult_PRIMITIVE "curve25519" 22 | SODIUM_EXPORT 23 | const char *crypto_scalarmult_primitive(void); 24 | 25 | SODIUM_EXPORT 26 | int crypto_scalarmult_base(unsigned char *q, const unsigned char *n); 27 | 28 | SODIUM_EXPORT 29 | int crypto_scalarmult(unsigned char *q, const unsigned char *n, 30 | const unsigned char *p) 31 | __attribute__ ((warn_unused_result)); 32 | 33 | #ifdef __cplusplus 34 | } 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef stream_chacha20_H 3 | #define stream_chacha20_H 4 | 5 | #include 6 | 7 | typedef struct crypto_stream_chacha20_implementation { 8 | int (*stream)(unsigned char *c, unsigned long long clen, 9 | const unsigned char *n, const unsigned char *k); 10 | int (*stream_ietf)(unsigned char *c, unsigned long long clen, 11 | const unsigned char *n, const unsigned char *k); 12 | int (*stream_xor_ic)(unsigned char *c, const unsigned char *m, 13 | unsigned long long mlen, 14 | const unsigned char *n, uint64_t ic, 15 | const unsigned char *k); 16 | int (*stream_ietf_xor_ic)(unsigned char *c, const unsigned char *m, 17 | unsigned long long mlen, 18 | const unsigned char *n, uint32_t ic, 19 | const unsigned char *k); 20 | } crypto_stream_chacha20_implementation; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /libvpx/vpx_dsp/bitwriter.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #include 12 | 13 | #include "./bitwriter.h" 14 | 15 | void vpx_start_encode(vpx_writer *br, uint8_t *source) { 16 | br->lowvalue = 0; 17 | br->range = 255; 18 | br->count = -24; 19 | br->buffer = source; 20 | br->pos = 0; 21 | vpx_write_bit(br, 0); 22 | } 23 | 24 | void vpx_stop_encode(vpx_writer *br) { 25 | int i; 26 | 27 | for (i = 0; i < 32; i++) 28 | vpx_write_bit(br, 0); 29 | 30 | // Ensure there's no ambigous collision with any index marker bytes 31 | if ((br->buffer[br->pos - 1] & 0xe0) == 0xc0) 32 | br->buffer[br->pos++] = 0; 33 | } 34 | 35 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts.h: -------------------------------------------------------------------------------- 1 | #ifndef CONSTS_H 2 | #define CONSTS_H 3 | 4 | #include "int128.h" 5 | 6 | #define ROTB crypto_stream_aes128ctr_portable_ROTB 7 | #define M0 crypto_stream_aes128ctr_portable_M0 8 | #define EXPB0 crypto_stream_aes128ctr_portable_EXPB0 9 | #define SWAP32 crypto_stream_aes128ctr_portable_SWAP32 10 | #define M0SWAP crypto_stream_aes128ctr_portable_M0SWAP 11 | #define SR crypto_stream_aes128ctr_portable_SR 12 | #define SRM0 crypto_stream_aes128ctr_portable_SRM0 13 | #define BS0 crypto_stream_aes128ctr_portable_BS0 14 | #define BS1 crypto_stream_aes128ctr_portable_BS1 15 | #define BS2 crypto_stream_aes128ctr_portable_BS2 16 | 17 | extern const unsigned char ROTB[16]; 18 | extern const unsigned char M0[16]; 19 | extern const unsigned char EXPB0[16]; 20 | extern const unsigned char SWAP32[16]; 21 | extern const unsigned char M0SWAP[16]; 22 | extern const unsigned char SR[16]; 23 | extern const unsigned char SRM0[16]; 24 | extern const int128 BS0; 25 | extern const int128 BS1; 26 | extern const int128 BS2; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_scalarmult_curve25519.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_scalarmult_curve25519_H 2 | #define crypto_scalarmult_curve25519_H 3 | 4 | #include 5 | 6 | #include "export.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | #define crypto_scalarmult_curve25519_BYTES 32U 13 | SODIUM_EXPORT 14 | size_t crypto_scalarmult_curve25519_bytes(void); 15 | 16 | #define crypto_scalarmult_curve25519_SCALARBYTES 32U 17 | SODIUM_EXPORT 18 | size_t crypto_scalarmult_curve25519_scalarbytes(void); 19 | 20 | SODIUM_EXPORT 21 | int crypto_scalarmult_curve25519(unsigned char *q, const unsigned char *n, 22 | const unsigned char *p) 23 | __attribute__ ((warn_unused_result)); 24 | 25 | SODIUM_EXPORT 26 | int crypto_scalarmult_curve25519_base(unsigned char *q, const unsigned char *n); 27 | 28 | /* ------------------------------------------------------------------------- */ 29 | 30 | int _crypto_scalarmult_curve25519_pick_best_implementation(void); 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_hash.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_hash_H 2 | #define crypto_hash_H 3 | 4 | /* 5 | * WARNING: Unless you absolutely need to use SHA512 for interoperatibility, 6 | * purposes, you might want to consider crypto_generichash() instead. 7 | * Unlike SHA512, crypto_generichash() is not vulnerable to length 8 | * extension attacks. 9 | */ 10 | 11 | #include 12 | 13 | #include "crypto_hash_sha512.h" 14 | #include "export.h" 15 | 16 | #ifdef __cplusplus 17 | # ifdef __GNUC__ 18 | # pragma GCC diagnostic ignored "-Wlong-long" 19 | # endif 20 | extern "C" { 21 | #endif 22 | 23 | #define crypto_hash_BYTES crypto_hash_sha512_BYTES 24 | SODIUM_EXPORT 25 | size_t crypto_hash_bytes(void); 26 | 27 | SODIUM_EXPORT 28 | int crypto_hash(unsigned char *out, const unsigned char *in, 29 | unsigned long long inlen); 30 | 31 | #define crypto_hash_PRIMITIVE "sha512" 32 | SODIUM_EXPORT 33 | const char *crypto_hash_primitive(void) 34 | __attribute__ ((warn_unused_result)); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /toxcore/toxencryptsave/crypto_pwhash_scryptsalsa208sha256/utils.h: -------------------------------------------------------------------------------- 1 | #ifdef HAVE_CONFIG_H 2 | #include "config.h" 3 | #endif 4 | #ifdef VANILLA_NACL /* toxcore only uses this when libsodium is unavailable */ 5 | 6 | #ifndef __SODIUM_UTILS_H__ 7 | #define __SODIUM_UTILS_H__ 8 | 9 | #include 10 | 11 | #include "export.h" 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | #if defined(__cplusplus) || !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L 18 | # define _SODIUM_C99(X) 19 | #else 20 | # define _SODIUM_C99(X) X 21 | #endif 22 | 23 | SODIUM_EXPORT 24 | void sodium_memzero(void * const pnt, const size_t len); 25 | 26 | /* WARNING: sodium_memcmp() must be used to verify if two secret keys 27 | * are equal, in constant time. 28 | * It returns 0 if the keys are equal, and -1 if they differ. 29 | * This function is not designed for lexicographical comparisons. 30 | */ 31 | SODIUM_EXPORT 32 | int sodium_memcmp(const void * const b1_, const void * const b2_, size_t len); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/firstpass.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_ENCODER_FIRSTPASS_H_ 13 | #define VP8_ENCODER_FIRSTPASS_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | extern void vp8_init_first_pass(VP8_COMP *cpi); 20 | extern void vp8_first_pass(VP8_COMP *cpi); 21 | extern void vp8_end_first_pass(VP8_COMP *cpi); 22 | 23 | extern void vp8_init_second_pass(VP8_COMP *cpi); 24 | extern void vp8_second_pass(VP8_COMP *cpi); 25 | extern void vp8_end_second_pass(VP8_COMP *cpi); 26 | 27 | extern size_t vp8_firstpass_stats_sz(unsigned int mb_count); 28 | #ifdef __cplusplus 29 | } // extern "C" 30 | #endif 31 | 32 | #endif // VP8_ENCODER_FIRSTPASS_H_ 33 | -------------------------------------------------------------------------------- /libvpx/vp8/common/x86/filter_x86.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP8_COMMON_X86_FILTER_X86_H_ 12 | #define VP8_COMMON_X86_FILTER_X86_H_ 13 | 14 | #include "vpx_ports/mem.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | /* x86 assembly specific copy of vp8/common/filter.c:vp8_bilinear_filters with 21 | * duplicated values */ 22 | 23 | /* duplicated 4x */ 24 | extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters_x86_4[8][8]); 25 | 26 | /* duplicated 8x */ 27 | extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters_x86_8[8][16]); 28 | 29 | #ifdef __cplusplus 30 | } // extern "C" 31 | #endif 32 | 33 | #endif // VP8_COMMON_X86_FILTER_X86_H_ 34 | -------------------------------------------------------------------------------- /libvpx/vp8/decoder/decoderthreading.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP8_DECODER_DECODERTHREADING_H_ 12 | #define VP8_DECODER_DECODERTHREADING_H_ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | #if CONFIG_MULTITHREAD 19 | void vp8mt_decode_mb_rows(VP8D_COMP *pbi, MACROBLOCKD *xd); 20 | void vp8_decoder_remove_threads(VP8D_COMP *pbi); 21 | void vp8_decoder_create_threads(VP8D_COMP *pbi); 22 | void vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows); 23 | void vp8mt_de_alloc_temp_buffers(VP8D_COMP *pbi, int mb_rows); 24 | #endif 25 | 26 | #ifdef __cplusplus 27 | } // extern "C" 28 | #endif 29 | 30 | #endif // VP8_DECODER_DECODERTHREADING_H_ 31 | -------------------------------------------------------------------------------- /libvpx/vp9/encoder/vp9_mbgraph.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_ENCODER_VP9_MBGRAPH_H_ 12 | #define VP9_ENCODER_VP9_MBGRAPH_H_ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | typedef struct { 19 | struct { 20 | int err; 21 | union { 22 | int_mv mv; 23 | PREDICTION_MODE mode; 24 | } m; 25 | } ref[MAX_REF_FRAMES]; 26 | } MBGRAPH_MB_STATS; 27 | 28 | typedef struct { 29 | MBGRAPH_MB_STATS *mb_stats; 30 | } MBGRAPH_FRAME_STATS; 31 | 32 | struct VP9_COMP; 33 | 34 | void vp9_update_mbgraph_stats(struct VP9_COMP *cpi); 35 | 36 | #ifdef __cplusplus 37 | } // extern "C" 38 | #endif 39 | 40 | #endif // VP9_ENCODER_VP9_MBGRAPH_H_ 41 | -------------------------------------------------------------------------------- /libvpx/vp8/common/quant_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP8_COMMON_QUANT_COMMON_H_ 12 | #define VP8_COMMON_QUANT_COMMON_H_ 13 | 14 | 15 | #include "string.h" 16 | #include "blockd.h" 17 | #include "onyxc_int.h" 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | extern int vp8_ac_yquant(int QIndex); 24 | extern int vp8_dc_quant(int QIndex, int Delta); 25 | extern int vp8_dc2quant(int QIndex, int Delta); 26 | extern int vp8_ac2quant(int QIndex, int Delta); 27 | extern int vp8_dc_uv_quant(int QIndex, int Delta); 28 | extern int vp8_ac_uv_quant(int QIndex, int Delta); 29 | 30 | #ifdef __cplusplus 31 | } // extern "C" 32 | #endif 33 | 34 | #endif // VP8_COMMON_QUANT_COMMON_H_ 35 | -------------------------------------------------------------------------------- /libvpx/ivfenc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | #ifndef IVFENC_H_ 11 | #define IVFENC_H_ 12 | 13 | #include "./tools_common.h" 14 | 15 | struct vpx_codec_enc_cfg; 16 | struct vpx_codec_cx_pkt; 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | void ivf_write_file_header(FILE *outfile, 23 | const struct vpx_codec_enc_cfg *cfg, 24 | uint32_t fourcc, 25 | int frame_cnt); 26 | 27 | void ivf_write_frame_header(FILE *outfile, int64_t pts, size_t frame_size); 28 | 29 | void ivf_write_frame_size(FILE *outfile, size_t frame_size); 30 | 31 | #ifdef __cplusplus 32 | } /* extern "C" */ 33 | #endif 34 | 35 | #endif // IVFENC_H_ 36 | -------------------------------------------------------------------------------- /libvpx/vp8/vp8cx_arm.mk: -------------------------------------------------------------------------------- 1 | ## 2 | ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | ## 4 | ## Use of this source code is governed by a BSD-style license 5 | ## that can be found in the LICENSE file in the root of the source 6 | ## tree. An additional intellectual property rights grant can be found 7 | ## in the file PATENTS. All contributing project authors may 8 | ## be found in the AUTHORS file in the root of the source tree. 9 | ## 10 | 11 | 12 | VP8_CX_SRCS-$(ARCH_ARM) += vp8cx_arm.mk 13 | 14 | #File list for arm 15 | # encoder 16 | VP8_CX_SRCS-$(ARCH_ARM) += encoder/arm/dct_arm.c 17 | 18 | #File list for media 19 | # encoder 20 | VP8_CX_SRCS-$(HAVE_MEDIA) += encoder/arm/armv6/vp8_short_fdct4x4_armv6$(ASM) 21 | VP8_CX_SRCS-$(HAVE_MEDIA) += encoder/arm/armv6/walsh_v6$(ASM) 22 | 23 | #File list for neon 24 | # encoder 25 | VP8_CX_SRCS-$(HAVE_NEON) += encoder/arm/neon/denoising_neon.c 26 | VP8_CX_SRCS-$(HAVE_NEON) += encoder/arm/neon/fastquantizeb_neon.c 27 | VP8_CX_SRCS-$(HAVE_NEON) += encoder/arm/neon/shortfdct_neon.c 28 | VP8_CX_SRCS-$(HAVE_NEON) += encoder/arm/neon/vp8_shortwalsh4x4_neon.c 29 | -------------------------------------------------------------------------------- /libvpx/vp9/decoder/vp9_detokenize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP9_DECODER_VP9_DETOKENIZE_H_ 13 | #define VP9_DECODER_VP9_DETOKENIZE_H_ 14 | 15 | #include "vpx_dsp/bitreader.h" 16 | #include "vp9/decoder/vp9_decoder.h" 17 | #include "vp9/common/vp9_scan.h" 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | int vp9_decode_block_tokens(MACROBLOCKD *xd, 24 | int plane, const scan_order *sc, 25 | int x, int y, 26 | TX_SIZE tx_size, vpx_reader *r, 27 | int seg_id); 28 | 29 | #ifdef __cplusplus 30 | } // extern "C" 31 | #endif 32 | 33 | #endif // VP9_DECODER_VP9_DETOKENIZE_H_ 34 | -------------------------------------------------------------------------------- /libvpx/vpx_scale/vpx_scale.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VPX_SCALE_VPX_SCALE_H_ 13 | #define VPX_SCALE_VPX_SCALE_H_ 14 | 15 | #include "vpx_scale/yv12config.h" 16 | 17 | extern void vpx_scale_frame(YV12_BUFFER_CONFIG *src, 18 | YV12_BUFFER_CONFIG *dst, 19 | unsigned char *temp_area, 20 | unsigned char temp_height, 21 | unsigned int hscale, 22 | unsigned int hratio, 23 | unsigned int vscale, 24 | unsigned int vratio, 25 | unsigned int interlaced); 26 | 27 | #endif // VPX_SCALE_VPX_SCALE_H_ 28 | -------------------------------------------------------------------------------- /libvpx/warnings.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | #ifndef WARNINGS_H_ 11 | #define WARNINGS_H_ 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | struct vpx_codec_enc_cfg; 18 | struct VpxEncoderConfig; 19 | 20 | /* 21 | * Checks config for improperly used settings. Warns user upon encountering 22 | * settings that will lead to poor output quality. Prompts user to continue 23 | * when warnings are issued. 24 | */ 25 | void check_encoder_config(int disable_prompt, 26 | const struct VpxEncoderConfig *global_config, 27 | const struct vpx_codec_enc_cfg *stream_config); 28 | 29 | #ifdef __cplusplus 30 | } // extern "C" 31 | #endif 32 | 33 | #endif // WARNINGS_H_ 34 | -------------------------------------------------------------------------------- /libvpx/third_party/libyuv/include/libyuv/rotate_argb.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef INCLUDE_LIBYUV_ROTATE_ARGB_H_ // NOLINT 12 | #define INCLUDE_LIBYUV_ROTATE_ARGB_H_ 13 | 14 | #include "libyuv/basic_types.h" 15 | #include "libyuv/rotate.h" // For RotationMode. 16 | 17 | #ifdef __cplusplus 18 | namespace libyuv { 19 | extern "C" { 20 | #endif 21 | 22 | // Rotate ARGB frame 23 | LIBYUV_API 24 | int ARGBRotate(const uint8* src_argb, int src_stride_argb, 25 | uint8* dst_argb, int dst_stride_argb, 26 | int src_width, int src_height, enum RotationMode mode); 27 | 28 | #ifdef __cplusplus 29 | } // extern "C" 30 | } // namespace libyuv 31 | #endif 32 | 33 | #endif // INCLUDE_LIBYUV_ROTATE_ARGB_H_ NOLINT 34 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/ref/box_xsalsa20poly1305.c: -------------------------------------------------------------------------------- 1 | #include "crypto_onetimeauth_poly1305.h" 2 | #include "crypto_secretbox_xsalsa20poly1305.h" 3 | #include "crypto_stream_xsalsa20.h" 4 | 5 | int crypto_secretbox_xsalsa20poly1305( 6 | unsigned char *c, 7 | const unsigned char *m,unsigned long long mlen, 8 | const unsigned char *n, 9 | const unsigned char *k 10 | ) 11 | { 12 | int i; 13 | if (mlen < 32) return -1; 14 | crypto_stream_xsalsa20_xor(c,m,mlen,n,k); 15 | crypto_onetimeauth_poly1305(c + 16,c + 32,mlen - 32,c); 16 | for (i = 0;i < 16;++i) c[i] = 0; 17 | return 0; 18 | } 19 | 20 | int crypto_secretbox_xsalsa20poly1305_open( 21 | unsigned char *m, 22 | const unsigned char *c,unsigned long long clen, 23 | const unsigned char *n, 24 | const unsigned char *k 25 | ) 26 | { 27 | int i; 28 | unsigned char subkey[32]; 29 | if (clen < 32) return -1; 30 | crypto_stream_xsalsa20(subkey,32,n,k); 31 | if (crypto_onetimeauth_poly1305_verify(c + 16,c + 32,clen - 32,subkey) != 0) return -1; 32 | crypto_stream_xsalsa20_xor(m,c,clen,n,k); 33 | for (i = 0;i < 32;++i) m[i] = 0; 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/export.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef sodium_export_H 3 | #define sodium_export_H 4 | 5 | #ifndef __GNUC__ 6 | # ifdef __attribute__ 7 | # undef __attribute__ 8 | # endif 9 | # define __attribute__(a) 10 | #endif 11 | 12 | #ifdef SODIUM_STATIC 13 | # define SODIUM_EXPORT 14 | #else 15 | # if defined(_MSC_VER) 16 | # ifdef SODIUM_DLL_EXPORT 17 | # define SODIUM_EXPORT __declspec(dllexport) 18 | # else 19 | # define SODIUM_EXPORT __declspec(dllimport) 20 | # endif 21 | # else 22 | # if defined(__SUNPRO_C) 23 | # ifndef __GNU_C__ 24 | # define SODIUM_EXPORT __attribute__ (visibility(__global)) 25 | # else 26 | # define SODIUM_EXPORT __attribute__ __global 27 | # endif 28 | # elif defined(_MSG_VER) 29 | # define SODIUM_EXPORT extern __declspec(dllexport) 30 | # else 31 | # define SODIUM_EXPORT __attribute__ ((visibility ("default"))) 32 | # endif 33 | # endif 34 | #endif 35 | 36 | #ifndef CRYPTO_ALIGN 37 | # if defined(__INTEL_COMPILER) || defined(_MSC_VER) 38 | # define CRYPTO_ALIGN(x) __declspec(align(x)) 39 | # else 40 | # define CRYPTO_ALIGN(x) __attribute__ ((aligned(x))) 41 | # endif 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef onetimeauth_poly1305_H 3 | #define onetimeauth_poly1305_H 4 | 5 | typedef struct crypto_onetimeauth_poly1305_implementation { 6 | int (*onetimeauth)(unsigned char *out, 7 | const unsigned char *in, 8 | unsigned long long inlen, 9 | const unsigned char *k); 10 | int (*onetimeauth_verify)(const unsigned char *h, 11 | const unsigned char *in, 12 | unsigned long long inlen, 13 | const unsigned char *k); 14 | int (*onetimeauth_init)(crypto_onetimeauth_poly1305_state *state, 15 | const unsigned char *key); 16 | int (*onetimeauth_update)(crypto_onetimeauth_poly1305_state *state, 17 | const unsigned char *in, 18 | unsigned long long inlen); 19 | int (*onetimeauth_final)(crypto_onetimeauth_poly1305_state *state, 20 | unsigned char *out); 21 | } crypto_onetimeauth_poly1305_implementation; 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_auth.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_auth_H 2 | #define crypto_auth_H 3 | 4 | #include 5 | 6 | #include "crypto_auth_hmacsha512256.h" 7 | #include "export.h" 8 | 9 | #ifdef __cplusplus 10 | # ifdef __GNUC__ 11 | # pragma GCC diagnostic ignored "-Wlong-long" 12 | # endif 13 | extern "C" { 14 | #endif 15 | 16 | #define crypto_auth_BYTES crypto_auth_hmacsha512256_BYTES 17 | SODIUM_EXPORT 18 | size_t crypto_auth_bytes(void); 19 | 20 | #define crypto_auth_KEYBYTES crypto_auth_hmacsha512256_KEYBYTES 21 | SODIUM_EXPORT 22 | size_t crypto_auth_keybytes(void); 23 | 24 | #define crypto_auth_PRIMITIVE "hmacsha512256" 25 | SODIUM_EXPORT 26 | const char *crypto_auth_primitive(void); 27 | 28 | SODIUM_EXPORT 29 | int crypto_auth(unsigned char *out, const unsigned char *in, 30 | unsigned long long inlen, const unsigned char *k); 31 | 32 | SODIUM_EXPORT 33 | int crypto_auth_verify(const unsigned char *h, const unsigned char *in, 34 | unsigned long long inlen, const unsigned char *k) 35 | __attribute__ ((warn_unused_result)); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /libvpx/vpx/internal/vpx_psnr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VPX_INTERNAL_VPX_PSNR_H_ 12 | #define VPX_INTERNAL_VPX_PSNR_H_ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | // TODO(dkovalev) change vpx_sse_to_psnr signature: double -> int64_t 19 | 20 | /*!\brief Converts SSE to PSNR 21 | * 22 | * Converts sum of squared errros (SSE) to peak signal-to-noise ratio (PNSR). 23 | * 24 | * \param[in] samples Number of samples 25 | * \param[in] peak Max sample value 26 | * \param[in] sse Sum of squared errors 27 | */ 28 | double vpx_sse_to_psnr(double samples, double peak, double sse); 29 | 30 | #ifdef __cplusplus 31 | } // extern "C" 32 | #endif 33 | 34 | #endif // VPX_INTERNAL_VPX_PSNR_H_ 35 | -------------------------------------------------------------------------------- /libvpx/vp9/common/vp9_mfqe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_COMMON_VP9_MFQE_H_ 12 | #define VP9_COMMON_VP9_MFQE_H_ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | // Multiframe Quality Enhancement. 19 | // The aim for MFQE is to replace pixel blocks in the current frame with 20 | // the correlated pixel blocks (with higher quality) in the last frame. 21 | // The replacement can only be taken in stationary blocks by checking 22 | // the motion of the blocks and other conditions such as the SAD of 23 | // the current block and correlated block, the variance of the block 24 | // difference, etc. 25 | void vp9_mfqe(struct VP9Common *cm); 26 | 27 | #ifdef __cplusplus 28 | } // extern "C" 29 | #endif 30 | 31 | #endif // VP9_COMMON_VP9_MFQE_H_ 32 | -------------------------------------------------------------------------------- /libvpx/vp9/common/vp9_reconintra.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_COMMON_VP9_RECONINTRA_H_ 12 | #define VP9_COMMON_VP9_RECONINTRA_H_ 13 | 14 | #include "vpx/vpx_integer.h" 15 | #include "vp9/common/vp9_blockd.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void vp9_init_intra_predictors(void); 22 | 23 | void vp9_predict_intra_block(const MACROBLOCKD *xd, int bwl_in, 24 | TX_SIZE tx_size, PREDICTION_MODE mode, 25 | const uint8_t *ref, int ref_stride, 26 | uint8_t *dst, int dst_stride, 27 | int aoff, int loff, int plane); 28 | #ifdef __cplusplus 29 | } // extern "C" 30 | #endif 31 | 32 | #endif // VP9_COMMON_VP9_RECONINTRA_H_ 33 | -------------------------------------------------------------------------------- /libvpx/vp8/common/swapyv12buffer.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #include "swapyv12buffer.h" 13 | 14 | void vp8_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame, YV12_BUFFER_CONFIG *last_frame) 15 | { 16 | unsigned char *temp; 17 | 18 | temp = last_frame->buffer_alloc; 19 | last_frame->buffer_alloc = new_frame->buffer_alloc; 20 | new_frame->buffer_alloc = temp; 21 | 22 | temp = last_frame->y_buffer; 23 | last_frame->y_buffer = new_frame->y_buffer; 24 | new_frame->y_buffer = temp; 25 | 26 | temp = last_frame->u_buffer; 27 | last_frame->u_buffer = new_frame->u_buffer; 28 | new_frame->u_buffer = temp; 29 | 30 | temp = last_frame->v_buffer; 31 | last_frame->v_buffer = new_frame->v_buffer; 32 | new_frame->v_buffer = temp; 33 | 34 | } 35 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/treewriter.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #include "treewriter.h" 13 | 14 | static void cost( 15 | int *const C, 16 | vp8_tree T, 17 | const vp8_prob *const P, 18 | int i, 19 | int c 20 | ) 21 | { 22 | const vp8_prob p = P [i>>1]; 23 | 24 | do 25 | { 26 | const vp8_tree_index j = T[i]; 27 | const int d = c + vp8_cost_bit(p, i & 1); 28 | 29 | if (j <= 0) 30 | C[-j] = d; 31 | else 32 | cost(C, T, P, j, d); 33 | } 34 | while (++i & 1); 35 | } 36 | void vp8_cost_tokens(int *c, const vp8_prob *p, vp8_tree t) 37 | { 38 | cost(c, t, p, 0, 0); 39 | } 40 | void vp8_cost_tokens2(int *c, const vp8_prob *p, vp8_tree t,int start) 41 | { 42 | cost(c, t, p, start, 0); 43 | } 44 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/x86/vp8_enc_stubs_sse2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #include "vpx_config.h" 13 | #include "vp8_rtcd.h" 14 | #include "vpx_ports/x86.h" 15 | #include "vp8/encoder/block.h" 16 | 17 | int vp8_mbblock_error_xmm_impl(short *coeff_ptr, short *dcoef_ptr, int dc); 18 | int vp8_mbblock_error_xmm(MACROBLOCK *mb, int dc) 19 | { 20 | short *coeff_ptr = mb->block[0].coeff; 21 | short *dcoef_ptr = mb->e_mbd.block[0].dqcoeff; 22 | return vp8_mbblock_error_xmm_impl(coeff_ptr, dcoef_ptr, dc); 23 | } 24 | 25 | int vp8_mbuverror_xmm_impl(short *s_ptr, short *d_ptr); 26 | int vp8_mbuverror_xmm(MACROBLOCK *mb) 27 | { 28 | short *s_ptr = &mb->coeff[256]; 29 | short *d_ptr = &mb->e_mbd.dqcoeff[256]; 30 | return vp8_mbuverror_xmm_impl(s_ptr, d_ptr); 31 | } 32 | 33 | -------------------------------------------------------------------------------- /libvpx/vp9/common/vp9_quant_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_COMMON_VP9_QUANT_COMMON_H_ 12 | #define VP9_COMMON_VP9_QUANT_COMMON_H_ 13 | 14 | #include "vpx/vpx_codec.h" 15 | #include "vp9/common/vp9_seg_common.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #define MINQ 0 22 | #define MAXQ 255 23 | #define QINDEX_RANGE (MAXQ - MINQ + 1) 24 | #define QINDEX_BITS 8 25 | 26 | int16_t vp9_dc_quant(int qindex, int delta, vpx_bit_depth_t bit_depth); 27 | int16_t vp9_ac_quant(int qindex, int delta, vpx_bit_depth_t bit_depth); 28 | 29 | int vp9_get_qindex(const struct segmentation *seg, int segment_id, 30 | int base_qindex); 31 | 32 | #ifdef __cplusplus 33 | } // extern "C" 34 | #endif 35 | 36 | #endif // VP9_COMMON_VP9_QUANT_COMMON_H_ 37 | -------------------------------------------------------------------------------- /libvpx/vp9/encoder/vp9_extend.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_ENCODER_VP9_EXTEND_H_ 12 | #define VP9_ENCODER_VP9_EXTEND_H_ 13 | 14 | #include "vpx_scale/yv12config.h" 15 | #include "vpx/vpx_integer.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | 22 | void vp9_copy_and_extend_frame(const YV12_BUFFER_CONFIG *src, 23 | YV12_BUFFER_CONFIG *dst); 24 | 25 | void vp9_copy_and_extend_frame_with_rect(const YV12_BUFFER_CONFIG *src, 26 | YV12_BUFFER_CONFIG *dst, 27 | int srcy, int srcx, 28 | int srch, int srcw); 29 | #ifdef __cplusplus 30 | } // extern "C" 31 | #endif 32 | 33 | #endif // VP9_ENCODER_VP9_EXTEND_H_ 34 | -------------------------------------------------------------------------------- /libvpx/vpx_mem/include/vpx_mem_intrnl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_ 13 | #define VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_ 14 | #include "./vpx_config.h" 15 | 16 | #define ADDRESS_STORAGE_SIZE sizeof(size_t) 17 | 18 | #ifndef DEFAULT_ALIGNMENT 19 | # if defined(VXWORKS) 20 | # define DEFAULT_ALIGNMENT 32 /*default addr alignment to use in 21 | calls to vpx_* functions other 22 | than vpx_memalign*/ 23 | # else 24 | # define DEFAULT_ALIGNMENT (2 * sizeof(void*)) /* NOLINT */ 25 | # endif 26 | #endif 27 | 28 | /*returns an addr aligned to the byte boundary specified by align*/ 29 | #define align_addr(addr,align) (void*)(((size_t)(addr) + ((align) - 1)) & (size_t)-(align)) 30 | 31 | #endif // VPX_MEM_INCLUDE_VPX_MEM_INTRNL_H_ 32 | -------------------------------------------------------------------------------- /libvpx/vp8/common/dequantize.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #include "vpx_config.h" 13 | #include "vp8_rtcd.h" 14 | #include "vp8/common/blockd.h" 15 | #include "vpx_mem/vpx_mem.h" 16 | 17 | void vp8_dequantize_b_c(BLOCKD *d, short *DQC) 18 | { 19 | int i; 20 | short *DQ = d->dqcoeff; 21 | short *Q = d->qcoeff; 22 | 23 | for (i = 0; i < 16; i++) 24 | { 25 | DQ[i] = Q[i] * DQC[i]; 26 | } 27 | } 28 | 29 | void vp8_dequant_idct_add_c(short *input, short *dq, 30 | unsigned char *dest, int stride) 31 | { 32 | int i; 33 | 34 | for (i = 0; i < 16; i++) 35 | { 36 | input[i] = dq[i] * input[i]; 37 | } 38 | 39 | vp8_short_idct4x4llm_c(input, dest, stride, dest, stride); 40 | 41 | memset(input, 0, 32); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /libvpx/vpx_ports/arm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VPX_PORTS_ARM_H_ 13 | #define VPX_PORTS_ARM_H_ 14 | #include 15 | #include "vpx_config.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | /*ARMv5TE "Enhanced DSP" instructions.*/ 22 | #define HAS_EDSP 0x01 23 | /*ARMv6 "Parallel" or "Media" instructions.*/ 24 | #define HAS_MEDIA 0x02 25 | /*ARMv7 optional NEON instructions.*/ 26 | #define HAS_NEON 0x04 27 | 28 | int arm_cpu_caps(void); 29 | 30 | // Earlier gcc compilers have issues with some neon intrinsics 31 | #if !defined(__clang__) && defined(__GNUC__) && \ 32 | __GNUC__ == 4 && __GNUC_MINOR__ <= 6 33 | #define VPX_INCOMPATIBLE_GCC 34 | #endif 35 | 36 | #ifdef __cplusplus 37 | } // extern "C" 38 | #endif 39 | 40 | #endif // VPX_PORTS_ARM_H_ 41 | 42 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/chacha20/ref/stream_chacha20_ref.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | #include "crypto_stream_chacha20.h" 5 | #include "../stream_chacha20.h" 6 | 7 | extern struct crypto_stream_chacha20_implementation 8 | crypto_stream_chacha20_ref_implementation; 9 | 10 | int 11 | crypto_stream_chacha20_ref(unsigned char *c, unsigned long long clen, 12 | const unsigned char *n, const unsigned char *k); 13 | 14 | int 15 | crypto_stream_chacha20_ref_xor_ic(unsigned char *c, const unsigned char *m, 16 | unsigned long long mlen, 17 | const unsigned char *n, uint64_t ic, 18 | const unsigned char *k); 19 | 20 | int 21 | crypto_stream_chacha20_ietf_ref(unsigned char *c, unsigned long long clen, 22 | const unsigned char *n, const unsigned char *k); 23 | 24 | int 25 | crypto_stream_chacha20_ietf_ref_xor_ic(unsigned char *c, const unsigned char *m, 26 | unsigned long long mlen, 27 | const unsigned char *n, uint32_t ic, 28 | const unsigned char *k); 29 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/chacha20/vec/stream_chacha20_vec.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | #include "crypto_stream_chacha20.h" 5 | #include "../stream_chacha20.h" 6 | 7 | extern struct crypto_stream_chacha20_implementation 8 | crypto_stream_chacha20_vec_implementation; 9 | 10 | int 11 | crypto_stream_chacha20_vec(unsigned char *c, unsigned long long clen, 12 | const unsigned char *n, const unsigned char *k); 13 | 14 | int 15 | crypto_stream_chacha20_vec_xor_ic(unsigned char *c, const unsigned char *m, 16 | unsigned long long mlen, 17 | const unsigned char *n, uint64_t ic, 18 | const unsigned char *k); 19 | 20 | int 21 | crypto_stream_chacha20_ietf_vec(unsigned char *c, unsigned long long clen, 22 | const unsigned char *n, const unsigned char *k); 23 | 24 | int 25 | crypto_stream_chacha20_ietf_vec_xor_ic(unsigned char *c, const unsigned char *m, 26 | unsigned long long mlen, 27 | const unsigned char *n, uint32_t ic, 28 | const unsigned char *k); 29 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/aes128ctr/portable/consts_aes128ctr.c: -------------------------------------------------------------------------------- 1 | #include "consts.h" 2 | 3 | const unsigned char ROTB[16] = {0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08}; 4 | const unsigned char M0[16] = {0x0f, 0x0b, 0x07, 0x03, 0x0e, 0x0a, 0x06, 0x02, 0x0d, 0x09, 0x05, 0x01, 0x0c, 0x08, 0x04, 0x00}; 5 | const unsigned char EXPB0[16] = {0x03, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x0b, 0x0b, 0x0b, 0x0b, 0x0f, 0x0f, 0x0f, 0x0f}; 6 | 7 | const unsigned char SWAP32[16] = {0x03, 0x02, 0x01, 0x00, 0x07, 0x06, 0x05, 0x04, 0x0b, 0x0a, 0x09, 0x08, 0x0f, 0x0e, 0x0d, 0x0c}; 8 | const unsigned char M0SWAP[16] = {0x0c, 0x08, 0x04, 0x00, 0x0d, 0x09, 0x05, 0x01, 0x0e, 0x0a, 0x06, 0x02, 0x0f, 0x0b, 0x07, 0x03}; 9 | const unsigned char SR[16] = {0x01, 0x02, 0x03, 0x00, 0x06, 0x07, 0x04, 0x05, 0x0b, 0x08, 0x09, 0x0a, 0x0c, 0x0d, 0x0e, 0x0f}; 10 | const unsigned char SRM0[16] = {0x0f, 0x0a, 0x05, 0x00, 0x0e, 0x09, 0x04, 0x03, 0x0d, 0x08, 0x07, 0x02, 0x0c, 0x0b, 0x06, 0x01}; 11 | 12 | const int128 BS0 = {{0x5555555555555555ULL, 0x5555555555555555ULL}}; 13 | const int128 BS1 = {{0x3333333333333333ULL, 0x3333333333333333ULL}}; 14 | const int128 BS2 = {{0x0f0f0f0f0f0f0f0fULL, 0x0f0f0f0f0f0f0f0fULL}}; 15 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.h: -------------------------------------------------------------------------------- 1 | #ifndef argon2_encoding_H 2 | #define argon2_encoding_H 3 | 4 | #include "argon2.h" 5 | 6 | /* 7 | * encode an Argon2 hash string into the provided buffer. 'dst_len' 8 | * contains the size, in characters, of the 'dst' buffer; if 'dst_len' 9 | * is less than the number of required characters (including the 10 | * terminating 0), then this function returns 0. 11 | * 12 | * if ctx->outlen is 0, then the hash string will be a salt string 13 | * (no output). if ctx->saltlen is also 0, then the string will be a 14 | * parameter-only string (no salt and no output). 15 | * 16 | * On success, ARGON2_OK is returned. 17 | * 18 | * No other parameters are checked 19 | */ 20 | int encode_string(char *dst, size_t dst_len, argon2_context *ctx, 21 | argon2_type type); 22 | 23 | /* 24 | * Decodes an Argon2 hash string into the provided structure 'ctx'. 25 | * The fields ctx.saltlen, ctx.adlen, ctx.outlen set the maximal salt, ad, out length values 26 | * that are allowed; invalid input string causes an error 27 | * 28 | * Returned value is ARGON2_OK on success. 29 | */ 30 | int decode_string(argon2_context *ctx, const char *str, argon2_type type); 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /libvpx/vpx_dsp/bitwriter_buffer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VPX_DSP_BITWRITER_BUFFER_H_ 12 | #define VPX_DSP_BITWRITER_BUFFER_H_ 13 | 14 | #include "vpx/vpx_integer.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | struct vpx_write_bit_buffer { 21 | uint8_t *bit_buffer; 22 | size_t bit_offset; 23 | }; 24 | 25 | size_t vpx_wb_bytes_written(const struct vpx_write_bit_buffer *wb); 26 | 27 | void vpx_wb_write_bit(struct vpx_write_bit_buffer *wb, int bit); 28 | 29 | void vpx_wb_write_literal(struct vpx_write_bit_buffer *wb, int data, int bits); 30 | 31 | void vpx_wb_write_inv_signed_literal(struct vpx_write_bit_buffer *wb, int data, 32 | int bits); 33 | 34 | #ifdef __cplusplus 35 | } // extern "C" 36 | #endif 37 | 38 | #endif // VPX_DSP_BITWRITER_BUFFER_H_ 39 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/salsa208/ref/stream_salsa208.c: -------------------------------------------------------------------------------- 1 | /* 2 | version 20140420 3 | D. J. Bernstein 4 | Public domain. 5 | */ 6 | 7 | #include "crypto_core_salsa208.h" 8 | #include "crypto_stream_salsa208.h" 9 | #include "utils.h" 10 | 11 | int crypto_stream_salsa208( 12 | unsigned char *c,unsigned long long clen, 13 | const unsigned char *n, 14 | const unsigned char *k 15 | ) 16 | { 17 | unsigned char in[16]; 18 | unsigned char block[64]; 19 | unsigned char kcopy[32]; 20 | unsigned int i; 21 | unsigned int u; 22 | 23 | if (!clen) return 0; 24 | 25 | for (i = 0;i < 32;++i) kcopy[i] = k[i]; 26 | for (i = 0;i < 8;++i) in[i] = n[i]; 27 | for (i = 8;i < 16;++i) in[i] = 0; 28 | 29 | while (clen >= 64) { 30 | crypto_core_salsa208(c,in,kcopy,NULL); 31 | 32 | u = 1; 33 | for (i = 8;i < 16;++i) { 34 | u += (unsigned int) in[i]; 35 | in[i] = u; 36 | u >>= 8; 37 | } 38 | 39 | clen -= 64; 40 | c += 64; 41 | } 42 | 43 | if (clen) { 44 | crypto_core_salsa208(block,in,kcopy,NULL); 45 | for (i = 0;i < (unsigned int) clen;++i) c[i] = block[i]; 46 | } 47 | sodium_memzero(block, sizeof block); 48 | sodium_memzero(kcopy, sizeof kcopy); 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/salsa2012/ref/stream_salsa2012.c: -------------------------------------------------------------------------------- 1 | /* 2 | version 20140420 3 | D. J. Bernstein 4 | Public domain. 5 | */ 6 | 7 | #include "crypto_core_salsa2012.h" 8 | #include "crypto_stream_salsa2012.h" 9 | #include "utils.h" 10 | 11 | int crypto_stream_salsa2012( 12 | unsigned char *c,unsigned long long clen, 13 | const unsigned char *n, 14 | const unsigned char *k 15 | ) 16 | { 17 | unsigned char in[16]; 18 | unsigned char block[64]; 19 | unsigned char kcopy[32]; 20 | unsigned int i; 21 | unsigned int u; 22 | 23 | if (!clen) return 0; 24 | 25 | for (i = 0;i < 32;++i) kcopy[i] = k[i]; 26 | for (i = 0;i < 8;++i) in[i] = n[i]; 27 | for (i = 8;i < 16;++i) in[i] = 0; 28 | 29 | while (clen >= 64) { 30 | crypto_core_salsa2012(c,in,kcopy,NULL); 31 | 32 | u = 1; 33 | for (i = 8;i < 16;++i) { 34 | u += (unsigned int) in[i]; 35 | in[i] = u; 36 | u >>= 8; 37 | } 38 | 39 | clen -= 64; 40 | c += 64; 41 | } 42 | 43 | if (clen) { 44 | crypto_core_salsa2012(block,in,kcopy,NULL); 45 | for (i = 0;i < (unsigned int) clen;++i) c[i] = block[i]; 46 | } 47 | sodium_memzero(block, sizeof block); 48 | sodium_memzero(kcopy, sizeof kcopy); 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /libvpx/vp8/common/extend.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_COMMON_EXTEND_H_ 13 | #define VP8_COMMON_EXTEND_H_ 14 | 15 | #include "vpx_scale/yv12config.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void vp8_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr, unsigned char *UPtr, unsigned char *VPtr); 22 | void vp8_copy_and_extend_frame(YV12_BUFFER_CONFIG *src, 23 | YV12_BUFFER_CONFIG *dst); 24 | void vp8_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src, 25 | YV12_BUFFER_CONFIG *dst, 26 | int srcy, int srcx, 27 | int srch, int srcw); 28 | 29 | #ifdef __cplusplus 30 | } // extern "C" 31 | #endif 32 | 33 | #endif // VP8_COMMON_EXTEND_H_ 34 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/encodeframe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | #ifndef VP8_ENCODER_ENCODEFRAME_H_ 11 | #define VP8_ENCODER_ENCODEFRAME_H_ 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | extern void vp8_activity_masking(VP8_COMP *cpi, MACROBLOCK *x); 17 | 18 | extern void vp8_build_block_offsets(MACROBLOCK *x); 19 | 20 | extern void vp8_setup_block_ptrs(MACROBLOCK *x); 21 | 22 | extern void vp8_encode_frame(VP8_COMP *cpi); 23 | 24 | extern int vp8cx_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x, 25 | TOKENEXTRA **t, 26 | int recon_yoffset, int recon_uvoffset, 27 | int mb_row, int mb_col); 28 | 29 | extern int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x, 30 | TOKENEXTRA **t); 31 | #ifdef __cplusplus 32 | } // extern "C" 33 | #endif 34 | 35 | #endif // VP8_ENCODER_ENCODEFRAME_H_ 36 | -------------------------------------------------------------------------------- /libvpx/vp9/encoder/vp9_aq_complexity.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP9_ENCODER_VP9_AQ_COMPLEXITY_H_ 13 | #define VP9_ENCODER_VP9_AQ_COMPLEXITY_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include "vp9/common/vp9_enums.h" 20 | 21 | struct VP9_COMP; 22 | struct macroblock; 23 | 24 | // Select a segment for the current Block. 25 | void vp9_caq_select_segment(struct VP9_COMP *cpi, struct macroblock *, 26 | BLOCK_SIZE bs, 27 | int mi_row, int mi_col, int projected_rate); 28 | 29 | // This function sets up a set of segments with delta Q values around 30 | // the baseline frame quantizer. 31 | void vp9_setup_in_frame_q_adj(struct VP9_COMP *cpi); 32 | 33 | #ifdef __cplusplus 34 | } // extern "C" 35 | #endif 36 | 37 | #endif // VP9_ENCODER_VP9_AQ_COMPLEXITY_H_ 38 | -------------------------------------------------------------------------------- /libvpx/solution.mk: -------------------------------------------------------------------------------- 1 | ## 2 | ## Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | ## 4 | ## Use of this source code is governed by a BSD-style license 5 | ## that can be found in the LICENSE file in the root of the source 6 | ## tree. An additional intellectual property rights grant can be found 7 | ## in the file PATENTS. All contributing project authors may 8 | ## be found in the AUTHORS file in the root of the source tree. 9 | ## 10 | 11 | # libvpx reverse dependencies (targets that depend on libvpx) 12 | VPX_NONDEPS=$(addsuffix .$(VCPROJ_SFX),vpx gtest) 13 | VPX_RDEPS=$(foreach vcp,\ 14 | $(filter-out $(VPX_NONDEPS),$^), --dep=$(vcp:.$(VCPROJ_SFX)=):vpx) 15 | 16 | vpx.sln: $(wildcard *.$(VCPROJ_SFX)) 17 | @echo " [CREATE] $@" 18 | $(SRC_PATH_BARE)/build/make/gen_msvs_sln.sh \ 19 | $(if $(filter vpx.$(VCPROJ_SFX),$^),$(VPX_RDEPS)) \ 20 | --dep=test_libvpx:gtest \ 21 | --ver=$(CONFIG_VS_VERSION)\ 22 | --out=$@ $^ 23 | vpx.sln.mk: vpx.sln 24 | @true 25 | 26 | PROJECTS-yes += vpx.sln vpx.sln.mk 27 | -include vpx.sln.mk 28 | 29 | # Always install this file, as it is an unconditional post-build rule. 30 | INSTALL_MAPS += src/% $(SRC_PATH_BARE)/% 31 | INSTALL-SRCS-yes += $(target).mk 32 | -------------------------------------------------------------------------------- /libvpx/vp9/decoder/vp9_decodeframe.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP9_DECODER_VP9_DECODEFRAME_H_ 13 | #define VP9_DECODER_VP9_DECODEFRAME_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include "vp9/common/vp9_enums.h" 20 | 21 | struct VP9Decoder; 22 | struct vpx_read_bit_buffer; 23 | 24 | int vp9_read_sync_code(struct vpx_read_bit_buffer *const rb); 25 | void vp9_read_frame_size(struct vpx_read_bit_buffer *rb, 26 | int *width, int *height); 27 | BITSTREAM_PROFILE vp9_read_profile(struct vpx_read_bit_buffer *rb); 28 | 29 | void vp9_decode_frame(struct VP9Decoder *pbi, 30 | const uint8_t *data, const uint8_t *data_end, 31 | const uint8_t **p_data_end); 32 | 33 | #ifdef __cplusplus 34 | } // extern "C" 35 | #endif 36 | 37 | #endif // VP9_DECODER_VP9_DECODEFRAME_H_ 38 | -------------------------------------------------------------------------------- /libvpx/vpx_dsp/x86/txfm_common_sse2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2015 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VPX_DSP_X86_TXFM_COMMON_SSE2_H_ 12 | #define VPX_DSP_X86_TXFM_COMMON_SSE2_H_ 13 | 14 | #include 15 | #include "vpx/vpx_integer.h" 16 | 17 | #define pair_set_epi16(a, b) \ 18 | _mm_set_epi16((int16_t)(b), (int16_t)(a), (int16_t)(b), (int16_t)(a), \ 19 | (int16_t)(b), (int16_t)(a), (int16_t)(b), (int16_t)(a)) 20 | 21 | #define dual_set_epi16(a, b) \ 22 | _mm_set_epi16((int16_t)(b), (int16_t)(b), (int16_t)(b), (int16_t)(b), \ 23 | (int16_t)(a), (int16_t)(a), (int16_t)(a), (int16_t)(a)) 24 | 25 | #define octa_set_epi16(a, b, c, d, e, f, g, h) \ 26 | _mm_setr_epi16((int16_t)(a), (int16_t)(b), (int16_t)(c), (int16_t)(d), \ 27 | (int16_t)(e), (int16_t)(f), (int16_t)(g), (int16_t)(h)) 28 | 29 | #endif // VPX_DSP_X86_TXFM_COMMON_SSE2_H_ 30 | -------------------------------------------------------------------------------- /libvpx/vpx_mem/vpx_mem.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VPX_MEM_VPX_MEM_H_ 13 | #define VPX_MEM_VPX_MEM_H_ 14 | 15 | #include "vpx_config.h" 16 | #if defined(__uClinux__) 17 | # include 18 | #endif 19 | 20 | #include 21 | #include 22 | 23 | #if defined(__cplusplus) 24 | extern "C" { 25 | #endif 26 | 27 | void *vpx_memalign(size_t align, size_t size); 28 | void *vpx_malloc(size_t size); 29 | void *vpx_calloc(size_t num, size_t size); 30 | void *vpx_realloc(void *memblk, size_t size); 31 | void vpx_free(void *memblk); 32 | 33 | #if CONFIG_VP9_HIGHBITDEPTH 34 | void *vpx_memset16(void *dest, int val, size_t length); 35 | #endif 36 | 37 | #include 38 | 39 | #ifdef VPX_MEM_PLTFRM 40 | # include VPX_MEM_PLTFRM 41 | #endif 42 | 43 | #if defined(__cplusplus) 44 | } 45 | #endif 46 | 47 | #endif // VPX_MEM_VPX_MEM_H_ 48 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_pwhash/argon2/argon2-impl.h: -------------------------------------------------------------------------------- 1 | /* 2 | BLAKE2 reference source code package - reference C implementations 3 | 4 | Written in 2012 by Samuel Neves 5 | 6 | To the extent possible under law, the author(s) have dedicated all copyright 7 | and related and neighboring rights to this software to the public domain 8 | worldwide. This software is distributed without any warranty. 9 | 10 | You should have received a copy of the CC0 Public Domain Dedication along with 11 | this software. If not, see . 12 | */ 13 | 14 | #ifndef argon2_impl_H 15 | #define argon2_impl_H 16 | 17 | #include 18 | #include 19 | 20 | static inline uint32_t rotl32( const uint32_t w, const unsigned c ) 21 | { 22 | return ( w << c ) | ( w >> ( 32 - c ) ); 23 | } 24 | 25 | static inline uint64_t rotl64( const uint64_t w, const unsigned c ) 26 | { 27 | return ( w << c ) | ( w >> ( 64 - c ) ); 28 | } 29 | 30 | static inline uint32_t rotr32( const uint32_t w, const unsigned c ) 31 | { 32 | return ( w >> c ) | ( w << ( 32 - c ) ); 33 | } 34 | 35 | static inline uint64_t rotr64( const uint64_t w, const unsigned c ) 36 | { 37 | return ( w >> c ) | ( w << ( 64 - c ) ); 38 | } 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/salsa20/ref/stream_salsa20_ref.c: -------------------------------------------------------------------------------- 1 | /* 2 | version 20140420 3 | D. J. Bernstein 4 | Public domain. 5 | */ 6 | 7 | #include "crypto_core_salsa20.h" 8 | #include "crypto_stream_salsa20.h" 9 | #include "utils.h" 10 | 11 | #ifndef HAVE_AMD64_ASM 12 | 13 | int crypto_stream_salsa20( 14 | unsigned char *c,unsigned long long clen, 15 | const unsigned char *n, 16 | const unsigned char *k 17 | ) 18 | { 19 | unsigned char in[16]; 20 | unsigned char block[64]; 21 | unsigned char kcopy[32]; 22 | unsigned int i; 23 | unsigned int u; 24 | 25 | if (!clen) return 0; 26 | 27 | for (i = 0;i < 32;++i) kcopy[i] = k[i]; 28 | for (i = 0;i < 8;++i) in[i] = n[i]; 29 | for (i = 8;i < 16;++i) in[i] = 0; 30 | 31 | while (clen >= 64) { 32 | crypto_core_salsa20(c,in,kcopy,NULL); 33 | 34 | u = 1; 35 | for (i = 8;i < 16;++i) { 36 | u += (unsigned int) in[i]; 37 | in[i] = u; 38 | u >>= 8; 39 | } 40 | 41 | clen -= 64; 42 | c += 64; 43 | } 44 | 45 | if (clen) { 46 | crypto_core_salsa20(block,in,kcopy,NULL); 47 | for (i = 0;i < (unsigned int) clen;++i) c[i] = block[i]; 48 | } 49 | sodium_memzero(block, sizeof block); 50 | sodium_memzero(kcopy, sizeof kcopy); 51 | 52 | return 0; 53 | } 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /libvpx/third_party/libyuv/source/compare_common.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012 The LibYuv Project Authors. All rights reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #include "libyuv/basic_types.h" 12 | 13 | #ifdef __cplusplus 14 | namespace libyuv { 15 | extern "C" { 16 | #endif 17 | 18 | uint32 SumSquareError_C(const uint8* src_a, const uint8* src_b, int count) { 19 | uint32 sse = 0u; 20 | int i; 21 | for (i = 0; i < count; ++i) { 22 | int diff = src_a[i] - src_b[i]; 23 | sse += (uint32)(diff * diff); 24 | } 25 | return sse; 26 | } 27 | 28 | // hash seed of 5381 recommended. 29 | // Internal C version of HashDjb2 with int sized count for efficiency. 30 | uint32 HashDjb2_C(const uint8* src, int count, uint32 seed) { 31 | uint32 hash = seed; 32 | int i; 33 | for (i = 0; i < count; ++i) { 34 | hash += (hash << 5) + src[i]; 35 | } 36 | return hash; 37 | } 38 | 39 | #ifdef __cplusplus 40 | } // extern "C" 41 | } // namespace libyuv 42 | #endif 43 | -------------------------------------------------------------------------------- /libvpx/vp9/encoder/vp9_encodemv.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP9_ENCODER_VP9_ENCODEMV_H_ 13 | #define VP9_ENCODER_VP9_ENCODEMV_H_ 14 | 15 | #include "vp9/encoder/vp9_encoder.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | void vp9_entropy_mv_init(void); 22 | 23 | void vp9_write_nmv_probs(VP9_COMMON *cm, int usehp, vpx_writer *w, 24 | nmv_context_counts *const counts); 25 | 26 | void vp9_encode_mv(VP9_COMP *cpi, vpx_writer* w, const MV* mv, const MV* ref, 27 | const nmv_context* mvctx, int usehp); 28 | 29 | void vp9_build_nmv_cost_table(int *mvjoint, int *mvcost[2], 30 | const nmv_context* mvctx, int usehp); 31 | 32 | void vp9_update_mv_count(ThreadData *td); 33 | 34 | #ifdef __cplusplus 35 | } // extern "C" 36 | #endif 37 | 38 | #endif // VP9_ENCODER_VP9_ENCODEMV_H_ 39 | -------------------------------------------------------------------------------- /libvpx/vpxstats.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2013 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VPXSTATS_H_ 12 | #define VPXSTATS_H_ 13 | 14 | #include 15 | 16 | #include "vpx/vpx_encoder.h" 17 | 18 | #ifdef __cplusplus 19 | extern "C" { 20 | #endif 21 | 22 | /* This structure is used to abstract the different ways of handling 23 | * first pass statistics 24 | */ 25 | typedef struct { 26 | vpx_fixed_buf_t buf; 27 | int pass; 28 | FILE *file; 29 | char *buf_ptr; 30 | size_t buf_alloc_sz; 31 | } stats_io_t; 32 | 33 | int stats_open_file(stats_io_t *stats, const char *fpf, int pass); 34 | int stats_open_mem(stats_io_t *stats, int pass); 35 | void stats_close(stats_io_t *stats, int last_pass); 36 | void stats_write(stats_io_t *stats, const void *pkt, size_t len); 37 | vpx_fixed_buf_t stats_get(stats_io_t *stats); 38 | 39 | #ifdef __cplusplus 40 | } // extern "C" 41 | #endif 42 | 43 | #endif // VPXSTATS_H_ 44 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_generichash/blake2/generichash_blake2_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_generichash_blake2b.h" 2 | 3 | size_t 4 | crypto_generichash_blake2b_bytes_min(void) { 5 | return crypto_generichash_blake2b_BYTES_MIN; 6 | } 7 | 8 | size_t 9 | crypto_generichash_blake2b_bytes_max(void) { 10 | return crypto_generichash_blake2b_BYTES_MAX; 11 | } 12 | 13 | size_t 14 | crypto_generichash_blake2b_bytes(void) { 15 | return crypto_generichash_blake2b_BYTES; 16 | } 17 | 18 | size_t 19 | crypto_generichash_blake2b_keybytes_min(void) { 20 | return crypto_generichash_blake2b_KEYBYTES_MIN; 21 | } 22 | 23 | size_t 24 | crypto_generichash_blake2b_keybytes_max(void) { 25 | return crypto_generichash_blake2b_KEYBYTES_MAX; 26 | } 27 | 28 | size_t 29 | crypto_generichash_blake2b_keybytes(void) { 30 | return crypto_generichash_blake2b_KEYBYTES; 31 | } 32 | 33 | size_t 34 | crypto_generichash_blake2b_saltbytes(void) { 35 | return crypto_generichash_blake2b_SALTBYTES; 36 | } 37 | 38 | size_t 39 | crypto_generichash_blake2b_personalbytes(void) { 40 | return crypto_generichash_blake2b_PERSONALBYTES; 41 | } 42 | 43 | size_t 44 | crypto_generichash_blake2b_statebytes(void) 45 | { 46 | return (sizeof(crypto_generichash_blake2b_state) + (size_t) 63U) 47 | & ~(size_t) 63U; 48 | } 49 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/quantize.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_ENCODER_QUANTIZE_H_ 13 | #define VP8_ENCODER_QUANTIZE_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | struct VP8_COMP; 20 | struct macroblock; 21 | extern void vp8_quantize_mb(struct macroblock *x); 22 | extern void vp8_quantize_mby(struct macroblock *x); 23 | extern void vp8_quantize_mbuv(struct macroblock *x); 24 | extern void vp8_set_quantizer(struct VP8_COMP *cpi, int Q); 25 | extern void vp8cx_frame_init_quantizer(struct VP8_COMP *cpi); 26 | extern void vp8_update_zbin_extra(struct VP8_COMP *cpi, struct macroblock *x); 27 | extern void vp8cx_mb_init_quantizer(struct VP8_COMP *cpi, struct macroblock *x, int ok_to_skip); 28 | extern void vp8cx_init_quantizer(struct VP8_COMP *cpi); 29 | 30 | #ifdef __cplusplus 31 | } // extern "C" 32 | #endif 33 | 34 | #endif // VP8_ENCODER_QUANTIZE_H_ 35 | -------------------------------------------------------------------------------- /libvpx/config.mk: -------------------------------------------------------------------------------- 1 | ## Copyright (c) 2011 The WebM project authors. All Rights Reserved. 2 | ## 3 | ## Use of this source code is governed by a BSD-style license 4 | ## that can be found in the LICENSE file in the root of the source 5 | ## tree. An additional intellectual property rights grant can be found 6 | ## in the file PATENTS. All contributing project authors may 7 | ## be found in the AUTHORS file in the root of the source tree. 8 | # This file automatically generated by configure. Do not edit! 9 | TOOLCHAIN := x86-win32-vs12 10 | ALL_TARGETS += libs 11 | ALL_TARGETS += examples 12 | ALL_TARGETS += docs 13 | ALL_TARGETS += solution 14 | 15 | PREFIX=/usr/local 16 | ifeq ($(MAKECMDGOALS),dist) 17 | DIST_DIR?=vpx-vp8-vp9-nodocs-x86-win32mt-vs12-v1.5.0-794-gb2ccb9c 18 | else 19 | DIST_DIR?=$(DESTDIR)/usr/local 20 | endif 21 | LIBSUBDIR=lib 22 | 23 | VERSION_STRING=v1.5.0-794-gb2ccb9c 24 | 25 | VERSION_MAJOR=1 26 | VERSION_MINOR=5 27 | VERSION_PATCH=0 28 | 29 | CONFIGURE_ARGS=--target=x86-win32-vs12 --enable-vp8 --enable-vp9 --enable-libyuv --enable-static-msvcrt --enable-vp9-temporal-denoising --enable-vp9-postproc --enable-realtime-only 30 | CONFIGURE_ARGS?=--target=x86-win32-vs12 --enable-vp8 --enable-vp9 --enable-libyuv --enable-static-msvcrt --enable-vp9-temporal-denoising --enable-vp9-postproc --enable-realtime-only 31 | -------------------------------------------------------------------------------- /libvpx/vp9/encoder/vp9_bitstream.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP9_ENCODER_VP9_BITSTREAM_H_ 13 | #define VP9_ENCODER_VP9_BITSTREAM_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | #include "vp9/encoder/vp9_encoder.h" 20 | 21 | void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, size_t *size); 22 | 23 | static INLINE int vp9_preserve_existing_gf(VP9_COMP *cpi) { 24 | return !cpi->multi_arf_allowed && cpi->refresh_golden_frame && 25 | cpi->rc.is_src_frame_alt_ref && 26 | (!cpi->use_svc || // Add spatial svc base layer case here 27 | (is_two_pass_svc(cpi) && 28 | cpi->svc.spatial_layer_id == 0 && 29 | cpi->svc.layer_context[0].gold_ref_idx >=0 && 30 | cpi->oxcf.ss_enable_auto_arf[0])); 31 | } 32 | 33 | #ifdef __cplusplus 34 | } // extern "C" 35 | #endif 36 | 37 | #endif // VP9_ENCODER_VP9_BITSTREAM_H_ 38 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c: -------------------------------------------------------------------------------- 1 | 2 | #include "crypto_secretbox.h" 3 | 4 | size_t 5 | crypto_secretbox_keybytes(void) 6 | { 7 | return crypto_secretbox_KEYBYTES; 8 | } 9 | 10 | size_t 11 | crypto_secretbox_noncebytes(void) 12 | { 13 | return crypto_secretbox_NONCEBYTES; 14 | } 15 | 16 | size_t 17 | crypto_secretbox_zerobytes(void) 18 | { 19 | return crypto_secretbox_ZEROBYTES; 20 | } 21 | 22 | size_t 23 | crypto_secretbox_boxzerobytes(void) 24 | { 25 | return crypto_secretbox_BOXZEROBYTES; 26 | } 27 | 28 | size_t 29 | crypto_secretbox_macbytes(void) 30 | { 31 | return crypto_secretbox_MACBYTES; 32 | } 33 | 34 | const char * 35 | crypto_secretbox_primitive(void) 36 | { 37 | return crypto_secretbox_PRIMITIVE; 38 | } 39 | 40 | int 41 | crypto_secretbox(unsigned char *c, const unsigned char *m, 42 | unsigned long long mlen, const unsigned char *n, 43 | const unsigned char *k) 44 | { 45 | return crypto_secretbox_xsalsa20poly1305(c, m, mlen, n, k); 46 | } 47 | 48 | int 49 | crypto_secretbox_open(unsigned char *m, const unsigned char *c, 50 | unsigned long long clen, const unsigned char *n, 51 | const unsigned char *k) 52 | { 53 | return crypto_secretbox_xsalsa20poly1305_open(m, c, clen, n, k); 54 | } 55 | -------------------------------------------------------------------------------- /libvpx/rate_hist.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2014 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef RATE_HIST_H_ 12 | #define RATE_HIST_H_ 13 | 14 | #include "vpx/vpx_encoder.h" 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | struct rate_hist; 21 | 22 | struct rate_hist *init_rate_histogram(const vpx_codec_enc_cfg_t *cfg, 23 | const vpx_rational_t *fps); 24 | 25 | void destroy_rate_histogram(struct rate_hist *hist); 26 | 27 | void update_rate_histogram(struct rate_hist *hist, 28 | const vpx_codec_enc_cfg_t *cfg, 29 | const vpx_codec_cx_pkt_t *pkt); 30 | 31 | void show_q_histogram(const int counts[64], int max_buckets); 32 | 33 | void show_rate_histogram(struct rate_hist *hist, const vpx_codec_enc_cfg_t *cfg, 34 | int max_buckets); 35 | 36 | #ifdef __cplusplus 37 | } // extern "C" 38 | #endif 39 | 40 | #endif // RATE_HIST_H_ 41 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/ref/box_curve25519xsalsa20poly1305.c: -------------------------------------------------------------------------------- 1 | #include "crypto_box_curve25519xsalsa20poly1305.h" 2 | #include "utils.h" 3 | 4 | int crypto_box_curve25519xsalsa20poly1305( 5 | unsigned char *c, 6 | const unsigned char *m,unsigned long long mlen, 7 | const unsigned char *n, 8 | const unsigned char *pk, 9 | const unsigned char *sk 10 | ) 11 | { 12 | unsigned char k[crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES]; 13 | int ret; 14 | 15 | if (crypto_box_curve25519xsalsa20poly1305_beforenm(k,pk,sk) != 0) { 16 | return -1; 17 | } 18 | ret = crypto_box_curve25519xsalsa20poly1305_afternm(c,m,mlen,n,k); 19 | sodium_memzero(k, sizeof k); 20 | 21 | return ret; 22 | } 23 | 24 | int crypto_box_curve25519xsalsa20poly1305_open( 25 | unsigned char *m, 26 | const unsigned char *c,unsigned long long clen, 27 | const unsigned char *n, 28 | const unsigned char *pk, 29 | const unsigned char *sk 30 | ) 31 | { 32 | unsigned char k[crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES]; 33 | int ret; 34 | 35 | if (crypto_box_curve25519xsalsa20poly1305_beforenm(k,pk,sk) != 0) { 36 | return -1; 37 | } 38 | ret = crypto_box_curve25519xsalsa20poly1305_open_afternm(m,c,clen,n,k); 39 | sodium_memzero(k, sizeof k); 40 | 41 | return ret; 42 | } 43 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305_api.c: -------------------------------------------------------------------------------- 1 | #include "crypto_box_curve25519xsalsa20poly1305.h" 2 | 3 | size_t 4 | crypto_box_curve25519xsalsa20poly1305_seedbytes(void) { 5 | return crypto_box_curve25519xsalsa20poly1305_SEEDBYTES; 6 | } 7 | 8 | size_t 9 | crypto_box_curve25519xsalsa20poly1305_publickeybytes(void) { 10 | return crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES; 11 | } 12 | 13 | size_t 14 | crypto_box_curve25519xsalsa20poly1305_secretkeybytes(void) { 15 | return crypto_box_curve25519xsalsa20poly1305_SECRETKEYBYTES; 16 | } 17 | 18 | size_t 19 | crypto_box_curve25519xsalsa20poly1305_beforenmbytes(void) { 20 | return crypto_box_curve25519xsalsa20poly1305_BEFORENMBYTES; 21 | } 22 | 23 | size_t 24 | crypto_box_curve25519xsalsa20poly1305_noncebytes(void) { 25 | return crypto_box_curve25519xsalsa20poly1305_NONCEBYTES; 26 | } 27 | 28 | size_t 29 | crypto_box_curve25519xsalsa20poly1305_zerobytes(void) { 30 | return crypto_box_curve25519xsalsa20poly1305_ZEROBYTES; 31 | } 32 | 33 | size_t 34 | crypto_box_curve25519xsalsa20poly1305_boxzerobytes(void) { 35 | return crypto_box_curve25519xsalsa20poly1305_BOXZEROBYTES; 36 | } 37 | 38 | size_t 39 | crypto_box_curve25519xsalsa20poly1305_macbytes(void) { 40 | return crypto_box_curve25519xsalsa20poly1305_MACBYTES; 41 | } 42 | -------------------------------------------------------------------------------- /libvpx/asms_part.txt: -------------------------------------------------------------------------------- 1 | false 2 | Document 3 | false 4 | $(ProjectDir)yasm64 -f win32 -m x86 -I $(ProjectDir) -o $(IntDir)%(Filename).obj %(FullPath) 5 | $(IntDir)%(Filename).obj;%(Outputs) 6 | $(ProjectDir)yasm64 -f win32 -m x86 -I $(ProjectDir) -o $(IntDir)%(Filename).obj %(FullPath) 7 | $(IntDir)%(Filename).obj;%(Outputs) 8 | 9 | 10 | 11 | 12 | Assembling %(Filename).asm 13 | Assembling %(Filename).asm 14 | 15 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/salsa208/ref/xor_salsa208.c: -------------------------------------------------------------------------------- 1 | /* 2 | version 20140420 3 | D. J. Bernstein 4 | Public domain. 5 | */ 6 | 7 | #include "crypto_core_salsa208.h" 8 | #include "crypto_stream_salsa208.h" 9 | #include "utils.h" 10 | 11 | int crypto_stream_salsa208_xor( 12 | unsigned char *c, 13 | const unsigned char *m,unsigned long long mlen, 14 | const unsigned char *n, 15 | const unsigned char *k 16 | ) 17 | { 18 | unsigned char in[16]; 19 | unsigned char block[64]; 20 | unsigned char kcopy[32]; 21 | unsigned int i; 22 | unsigned int u; 23 | 24 | if (!mlen) return 0; 25 | 26 | for (i = 0;i < 32;++i) kcopy[i] = k[i]; 27 | for (i = 0;i < 8;++i) in[i] = n[i]; 28 | for (i = 8;i < 16;++i) in[i] = 0; 29 | 30 | while (mlen >= 64) { 31 | crypto_core_salsa208(block,in,kcopy,NULL); 32 | for (i = 0;i < 64;++i) c[i] = m[i] ^ block[i]; 33 | 34 | u = 1; 35 | for (i = 8;i < 16;++i) { 36 | u += (unsigned int) in[i]; 37 | in[i] = u; 38 | u >>= 8; 39 | } 40 | 41 | mlen -= 64; 42 | c += 64; 43 | m += 64; 44 | } 45 | 46 | if (mlen) { 47 | crypto_core_salsa208(block,in,kcopy,NULL); 48 | for (i = 0;i < (unsigned int) mlen;++i) c[i] = m[i] ^ block[i]; 49 | } 50 | sodium_memzero(block, sizeof block); 51 | sodium_memzero(kcopy, sizeof kcopy); 52 | 53 | return 0; 54 | } 55 | -------------------------------------------------------------------------------- /libvpx/vp8/common/header.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_COMMON_HEADER_H_ 13 | #define VP8_COMMON_HEADER_H_ 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | /* 24 bits total */ 20 | typedef struct 21 | { 22 | unsigned int type: 1; 23 | unsigned int version: 3; 24 | unsigned int show_frame: 1; 25 | 26 | /* Allow 2^20 bytes = 8 megabits for first partition */ 27 | 28 | unsigned int first_partition_length_in_bytes: 19; 29 | 30 | #ifdef PACKET_TESTING 31 | unsigned int frame_number; 32 | unsigned int update_gold: 1; 33 | unsigned int uses_gold: 1; 34 | unsigned int update_last: 1; 35 | unsigned int uses_last: 1; 36 | #endif 37 | 38 | } VP8_HEADER; 39 | 40 | #ifdef PACKET_TESTING 41 | #define VP8_HEADER_SIZE 8 42 | #else 43 | #define VP8_HEADER_SIZE 3 44 | #endif 45 | 46 | 47 | #ifdef __cplusplus 48 | } // extern "C" 49 | #endif 50 | 51 | #endif // VP8_COMMON_HEADER_H_ 52 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_stream/salsa2012/ref/xor_salsa2012.c: -------------------------------------------------------------------------------- 1 | /* 2 | version 20140420 3 | D. J. Bernstein 4 | Public domain. 5 | */ 6 | 7 | #include "crypto_core_salsa2012.h" 8 | #include "crypto_stream_salsa2012.h" 9 | #include "utils.h" 10 | 11 | int crypto_stream_salsa2012_xor( 12 | unsigned char *c, 13 | const unsigned char *m,unsigned long long mlen, 14 | const unsigned char *n, 15 | const unsigned char *k 16 | ) 17 | { 18 | unsigned char in[16]; 19 | unsigned char block[64]; 20 | unsigned char kcopy[32]; 21 | unsigned int i; 22 | unsigned int u; 23 | 24 | if (!mlen) return 0; 25 | 26 | for (i = 0;i < 32;++i) kcopy[i] = k[i]; 27 | for (i = 0;i < 8;++i) in[i] = n[i]; 28 | for (i = 8;i < 16;++i) in[i] = 0; 29 | 30 | while (mlen >= 64) { 31 | crypto_core_salsa2012(block,in,kcopy,NULL); 32 | for (i = 0;i < 64;++i) c[i] = m[i] ^ block[i]; 33 | 34 | u = 1; 35 | for (i = 8;i < 16;++i) { 36 | u += (unsigned int) in[i]; 37 | in[i] = u; 38 | u >>= 8; 39 | } 40 | 41 | mlen -= 64; 42 | c += 64; 43 | m += 64; 44 | } 45 | 46 | if (mlen) { 47 | crypto_core_salsa2012(block,in,kcopy,NULL); 48 | for (i = 0;i < (unsigned int) mlen;++i) c[i] = m[i] ^ block[i]; 49 | } 50 | sodium_memzero(block, sizeof block); 51 | sodium_memzero(kcopy, sizeof kcopy); 52 | 53 | return 0; 54 | } 55 | -------------------------------------------------------------------------------- /libvpx/vp9/common/vp9_ppflags.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_COMMON_VP9_PPFLAGS_H_ 12 | #define VP9_COMMON_VP9_PPFLAGS_H_ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | enum { 19 | VP9D_NOFILTERING = 0, 20 | VP9D_DEBLOCK = 1 << 0, 21 | VP9D_DEMACROBLOCK = 1 << 1, 22 | VP9D_ADDNOISE = 1 << 2, 23 | VP9D_DEBUG_TXT_FRAME_INFO = 1 << 3, 24 | VP9D_DEBUG_TXT_MBLK_MODES = 1 << 4, 25 | VP9D_DEBUG_TXT_DC_DIFF = 1 << 5, 26 | VP9D_DEBUG_TXT_RATE_INFO = 1 << 6, 27 | VP9D_DEBUG_DRAW_MV = 1 << 7, 28 | VP9D_DEBUG_CLR_BLK_MODES = 1 << 8, 29 | VP9D_DEBUG_CLR_FRM_REF_BLKS = 1 << 9, 30 | VP9D_MFQE = 1 << 10 31 | }; 32 | 33 | typedef struct { 34 | int post_proc_flag; 35 | int deblocking_level; 36 | int noise_level; 37 | } vp9_ppflags_t; 38 | 39 | #ifdef __cplusplus 40 | } // extern "C" 41 | #endif 42 | 43 | #endif // VP9_COMMON_VP9_PPFLAGS_H_ 44 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/pickinter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_ENCODER_PICKINTER_H_ 13 | #define VP8_ENCODER_PICKINTER_H_ 14 | #include "vpx_config.h" 15 | #include "vp8/common/onyxc_int.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | extern void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, 22 | int recon_uvoffset, int *returnrate, 23 | int *returndistortion, int *returnintra, 24 | int mb_row, int mb_col); 25 | extern void vp8_pick_intra_mode(MACROBLOCK *x, int *rate); 26 | 27 | extern int vp8_get_inter_mbpred_error(MACROBLOCK *mb, 28 | const vp8_variance_fn_ptr_t *vfp, 29 | unsigned int *sse, 30 | int_mv this_mv); 31 | #ifdef __cplusplus 32 | } // extern "C" 33 | #endif 34 | 35 | #endif // VP8_ENCODER_PICKINTER_H_ 36 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_stream_salsa208.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_salsa208_H 2 | #define crypto_stream_salsa208_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include "export.h" 14 | 15 | #ifdef __cplusplus 16 | # ifdef __GNUC__ 17 | # pragma GCC diagnostic ignored "-Wlong-long" 18 | # endif 19 | extern "C" { 20 | #endif 21 | 22 | #define crypto_stream_salsa208_KEYBYTES 32U 23 | SODIUM_EXPORT 24 | size_t crypto_stream_salsa208_keybytes(void); 25 | 26 | #define crypto_stream_salsa208_NONCEBYTES 8U 27 | SODIUM_EXPORT 28 | size_t crypto_stream_salsa208_noncebytes(void); 29 | 30 | SODIUM_EXPORT 31 | int crypto_stream_salsa208(unsigned char *c, unsigned long long clen, 32 | const unsigned char *n, const unsigned char *k); 33 | 34 | SODIUM_EXPORT 35 | int crypto_stream_salsa208_xor(unsigned char *c, const unsigned char *m, 36 | unsigned long long mlen, const unsigned char *n, 37 | const unsigned char *k); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /libvpx/vp8/decoder/treereader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_DECODER_TREEREADER_H_ 13 | #define VP8_DECODER_TREEREADER_H_ 14 | 15 | #include "./vpx_config.h" 16 | #include "vp8/common/treecoder.h" 17 | #include "dboolhuff.h" 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | typedef BOOL_DECODER vp8_reader; 24 | 25 | #define vp8_read vp8dx_decode_bool 26 | #define vp8_read_literal vp8_decode_value 27 | #define vp8_read_bit(R) vp8_read(R, vp8_prob_half) 28 | 29 | 30 | /* Intent of tree data structure is to make decoding trivial. */ 31 | 32 | static INLINE int vp8_treed_read( 33 | vp8_reader *const r, /* !!! must return a 0 or 1 !!! */ 34 | vp8_tree t, 35 | const vp8_prob *const p 36 | ) 37 | { 38 | register vp8_tree_index i = 0; 39 | 40 | while ((i = t[ i + vp8_read(r, p[i>>1])]) > 0) ; 41 | 42 | return -i; 43 | } 44 | 45 | #ifdef __cplusplus 46 | } // extern "C" 47 | #endif 48 | 49 | #endif // VP8_DECODER_TREEREADER_H_ 50 | -------------------------------------------------------------------------------- /libvpx/asms.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | Document 5 | false 6 | $(ProjectDir)yasm64 -f win32 -m x86 -I $(ProjectDir) -o $(IntDir)%(Filename).obj %(FullPath) 7 | $(IntDir)%(Filename).obj;%(Outputs) 8 | $(ProjectDir)yasm64 -f win32 -m x86 -I $(ProjectDir) -o $(IntDir)%(Filename).obj %(FullPath) 9 | $(IntDir)%(Filename).obj;%(Outputs) 10 | 11 | 12 | 13 | 14 | Assembling %(Filename).asm 15 | Assembling %(Filename).asm 16 | 17 |  -------------------------------------------------------------------------------- /libsodium/src/libsodium/crypto_generichash/blake2/ref/blake2b-compress-avx2.c: -------------------------------------------------------------------------------- 1 | 2 | #define BLAKE2_USE_SSSE3 3 | #define BLAKE2_USE_SSE41 4 | #define BLAKE2_USE_AVX2 5 | 6 | #include 7 | #include 8 | 9 | #if (defined(HAVE_AVX2INTRIN_H) && defined(HAVE_EMMINTRIN_H) && defined(HAVE_TMMINTRIN_H) && defined(HAVE_SMMINTRIN_H)) || \ 10 | (defined(_MSC_VER) && (defined(_M_X64) || defined(_M_AMD64))) 11 | 12 | #pragma GCC target("sse2") 13 | #pragma GCC target("ssse3") 14 | #pragma GCC target("sse4.1") 15 | #pragma GCC target("avx2") 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #include "blake2.h" 23 | #include "blake2-impl.h" 24 | #include "blake2b-compress-avx2.h" 25 | 26 | CRYPTO_ALIGN(64) static const uint64_t blake2b_IV[8] = 27 | { 28 | 0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 29 | 0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL, 30 | 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, 31 | 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL 32 | }; 33 | 34 | int blake2b_compress_avx2( blake2b_state *S, const uint8_t block[BLAKE2B_BLOCKBYTES] ) 35 | { 36 | __m256i a = LOADU(&S->h[0]); 37 | __m256i b = LOADU(&S->h[4]); 38 | BLAKE2B_COMPRESS_V1(a, b, block, S->t[0], S->t[1], S->f[0], S->f[1]); 39 | STOREU(&S->h[0], a); 40 | STOREU(&S->h[4], b); 41 | 42 | return 0; 43 | } 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /libsodium/src/libsodium/include/sodium/crypto_stream_salsa2012.h: -------------------------------------------------------------------------------- 1 | #ifndef crypto_stream_salsa2012_H 2 | #define crypto_stream_salsa2012_H 3 | 4 | /* 5 | * WARNING: This is just a stream cipher. It is NOT authenticated encryption. 6 | * While it provides some protection against eavesdropping, it does NOT 7 | * provide any security against active attacks. 8 | * Unless you know what you're doing, what you are looking for is probably 9 | * the crypto_box functions. 10 | */ 11 | 12 | #include 13 | #include "export.h" 14 | 15 | #ifdef __cplusplus 16 | # ifdef __GNUC__ 17 | # pragma GCC diagnostic ignored "-Wlong-long" 18 | # endif 19 | extern "C" { 20 | #endif 21 | 22 | #define crypto_stream_salsa2012_KEYBYTES 32U 23 | SODIUM_EXPORT 24 | size_t crypto_stream_salsa2012_keybytes(void); 25 | 26 | #define crypto_stream_salsa2012_NONCEBYTES 8U 27 | SODIUM_EXPORT 28 | size_t crypto_stream_salsa2012_noncebytes(void); 29 | 30 | SODIUM_EXPORT 31 | int crypto_stream_salsa2012(unsigned char *c, unsigned long long clen, 32 | const unsigned char *n, const unsigned char *k); 33 | 34 | SODIUM_EXPORT 35 | int crypto_stream_salsa2012_xor(unsigned char *c, const unsigned char *m, 36 | unsigned long long mlen, const unsigned char *n, 37 | const unsigned char *k); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /libvpx/vp9/common/vp9_tile_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_COMMON_VP9_TILE_COMMON_H_ 12 | #define VP9_COMMON_VP9_TILE_COMMON_H_ 13 | 14 | #ifdef __cplusplus 15 | extern "C" { 16 | #endif 17 | 18 | struct VP9Common; 19 | 20 | typedef struct TileInfo { 21 | int mi_row_start, mi_row_end; 22 | int mi_col_start, mi_col_end; 23 | } TileInfo; 24 | 25 | // initializes 'tile->mi_(row|col)_(start|end)' for (row, col) based on 26 | // 'cm->log2_tile_(rows|cols)' & 'cm->mi_(rows|cols)' 27 | void vp9_tile_init(TileInfo *tile, const struct VP9Common *cm, 28 | int row, int col); 29 | 30 | void vp9_tile_set_row(TileInfo *tile, const struct VP9Common *cm, int row); 31 | void vp9_tile_set_col(TileInfo *tile, const struct VP9Common *cm, int col); 32 | 33 | void vp9_get_tile_n_bits(int mi_cols, 34 | int *min_log2_tile_cols, int *max_log2_tile_cols); 35 | 36 | #ifdef __cplusplus 37 | } // extern "C" 38 | #endif 39 | 40 | #endif // VP9_COMMON_VP9_TILE_COMMON_H_ 41 | -------------------------------------------------------------------------------- /libvpx/vp8/encoder/ratectrl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | 12 | #ifndef VP8_ENCODER_RATECTRL_H_ 13 | #define VP8_ENCODER_RATECTRL_H_ 14 | 15 | #include "onyx_int.h" 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | extern void vp8_save_coding_context(VP8_COMP *cpi); 22 | extern void vp8_restore_coding_context(VP8_COMP *cpi); 23 | 24 | extern void vp8_setup_key_frame(VP8_COMP *cpi); 25 | extern void vp8_update_rate_correction_factors(VP8_COMP *cpi, int damp_var); 26 | extern int vp8_regulate_q(VP8_COMP *cpi, int target_bits_per_frame); 27 | extern void vp8_adjust_key_frame_context(VP8_COMP *cpi); 28 | extern void vp8_compute_frame_size_bounds(VP8_COMP *cpi, int *frame_under_shoot_limit, int *frame_over_shoot_limit); 29 | 30 | /* return of 0 means drop frame */ 31 | extern int vp8_pick_frame_size(VP8_COMP *cpi); 32 | 33 | extern int vp8_drop_encodedframe_overshoot(VP8_COMP *cpi, int Q); 34 | 35 | #ifdef __cplusplus 36 | } // extern "C" 37 | #endif 38 | 39 | #endif // VP8_ENCODER_RATECTRL_H_ 40 | -------------------------------------------------------------------------------- /libvpx/vp9/common/vp9_filter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011 The WebM project authors. All Rights Reserved. 3 | * 4 | * Use of this source code is governed by a BSD-style license 5 | * that can be found in the LICENSE file in the root of the source 6 | * tree. An additional intellectual property rights grant can be found 7 | * in the file PATENTS. All contributing project authors may 8 | * be found in the AUTHORS file in the root of the source tree. 9 | */ 10 | 11 | #ifndef VP9_COMMON_VP9_FILTER_H_ 12 | #define VP9_COMMON_VP9_FILTER_H_ 13 | 14 | #include "./vpx_config.h" 15 | #include "vpx/vpx_integer.h" 16 | #include "vpx_dsp/vpx_filter.h" 17 | #include "vpx_ports/mem.h" 18 | 19 | 20 | #ifdef __cplusplus 21 | extern "C" { 22 | #endif 23 | 24 | #define EIGHTTAP 0 25 | #define EIGHTTAP_SMOOTH 1 26 | #define EIGHTTAP_SHARP 2 27 | #define SWITCHABLE_FILTERS 3 /* Number of switchable filters */ 28 | #define BILINEAR 3 29 | // The codec can operate in four possible inter prediction filter mode: 30 | // 8-tap, 8-tap-smooth, 8-tap-sharp, and switching between the three. 31 | #define SWITCHABLE_FILTER_CONTEXTS (SWITCHABLE_FILTERS + 1) 32 | #define SWITCHABLE 4 /* should be the last one */ 33 | 34 | typedef uint8_t INTERP_FILTER; 35 | 36 | extern const InterpKernel *vp9_filter_kernels[4]; 37 | 38 | #ifdef __cplusplus 39 | } // extern "C" 40 | #endif 41 | 42 | #endif // VP9_COMMON_VP9_FILTER_H_ 43 | --------------------------------------------------------------------------------