summaryrefslogtreecommitdiff
path: root/vp8
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2014-01-24 10:47:00 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-01-24 10:47:00 -0800
commit26c88ec14ed21dff9dcafd91e9caaeee51887be4 (patch)
treea17df0fe09e29a13b9d093462946b1b9a079a7ed /vp8
parent8b0537f631754c9b06a97ebc3ccc1e3f1dc05eea (diff)
parent002ad40897cc3308ef3cfb579d3942615230ac0f (diff)
downloadlibvpx-26c88ec14ed21dff9dcafd91e9caaeee51887be4.tar
libvpx-26c88ec14ed21dff9dcafd91e9caaeee51887be4.tar.gz
libvpx-26c88ec14ed21dff9dcafd91e9caaeee51887be4.tar.bz2
libvpx-26c88ec14ed21dff9dcafd91e9caaeee51887be4.zip
Merge changes I826655a7,I5164df72,Iba9b198c,Ide9a6846,I4f51ce85,I0e6aa00f,Ic334da9a,I252f5f8a,I7865db2d,I13b434b1
* changes: test/: remove unnecessary extern "C"s top-level: add extern "C" to headers vpx_ports: add extern "C" to headers vpx: add extern "C" to headers vp9/encoder: add extern "C" to headers vp9/decoder: add extern "C" to headers vp9/common: add extern "C" to headers vp8/encoder: add extern "C" to headers vp8/decoder: add extern "C" to headers vp8/common: add extern "C" to headers
Diffstat (limited to 'vp8')
-rw-r--r--vp8/common/alloccommon.h8
-rw-r--r--vp8/common/arm/bilinearfilter_arm.h8
-rw-r--r--vp8/common/blockd.h8
-rw-r--r--vp8/common/coefupdateprobs.h8
-rw-r--r--vp8/common/common.h8
-rw-r--r--vp8/common/default_coef_probs.h8
-rw-r--r--vp8/common/entropy.h8
-rw-r--r--vp8/common/entropymode.h8
-rw-r--r--vp8/common/entropymv.h8
-rw-r--r--vp8/common/extend.h8
-rw-r--r--vp8/common/filter.h8
-rw-r--r--vp8/common/findnearmv.h8
-rw-r--r--vp8/common/header.h8
-rw-r--r--vp8/common/invtrans.h8
-rw-r--r--vp8/common/loopfilter.h8
-rw-r--r--vp8/common/modecont.h8
-rw-r--r--vp8/common/mv.h8
-rw-r--r--vp8/common/onyxc_int.h8
-rw-r--r--vp8/common/postproc.h8
-rw-r--r--vp8/common/ppflags.h8
-rw-r--r--vp8/common/pragmas.h8
-rw-r--r--vp8/common/quant_common.h8
-rw-r--r--vp8/common/reconinter.h8
-rw-r--r--vp8/common/reconintra4x4.h8
-rw-r--r--vp8/common/setupintrarecon.h8
-rw-r--r--vp8/common/swapyv12buffer.h8
-rw-r--r--vp8/common/systemdependent.h8
-rw-r--r--vp8/common/threading.h8
-rw-r--r--vp8/common/treecoder.h8
-rw-r--r--vp8/common/variance.h8
-rw-r--r--vp8/common/vp8_entropymodedata.h8
-rw-r--r--vp8/common/x86/filter_x86.h8
-rw-r--r--vp8/decoder/dboolhuff.h8
-rw-r--r--vp8/decoder/decodemv.h8
-rw-r--r--vp8/decoder/decoderthreading.h8
-rw-r--r--vp8/decoder/detokenize.h8
-rw-r--r--vp8/decoder/ec_types.h8
-rw-r--r--vp8/decoder/error_concealment.h8
-rw-r--r--vp8/decoder/onyxd_int.h8
-rw-r--r--vp8/decoder/treereader.h8
-rw-r--r--vp8/encoder/bitstream.h8
-rw-r--r--vp8/encoder/block.h8
-rw-r--r--vp8/encoder/boolhuff.h8
-rw-r--r--vp8/encoder/dct_value_cost.h8
-rw-r--r--vp8/encoder/dct_value_tokens.h8
-rw-r--r--vp8/encoder/defaultcoefcounts.h8
-rw-r--r--vp8/encoder/denoising.h8
-rw-r--r--vp8/encoder/encodeframe.h8
-rw-r--r--vp8/encoder/encodeintra.h8
-rw-r--r--vp8/encoder/encodemb.h8
-rw-r--r--vp8/encoder/encodemv.h8
-rw-r--r--vp8/encoder/firstpass.h8
-rw-r--r--vp8/encoder/lookahead.h8
-rw-r--r--vp8/encoder/mcomp.h8
-rw-r--r--vp8/encoder/modecosts.h8
-rw-r--r--vp8/encoder/mr_dissim.h8
-rw-r--r--vp8/encoder/onyx_int.h8
-rw-r--r--vp8/encoder/pickinter.h8
-rw-r--r--vp8/encoder/psnr.h8
-rw-r--r--vp8/encoder/quantize.h8
-rw-r--r--vp8/encoder/ratectrl.h8
-rw-r--r--vp8/encoder/rdopt.h8
-rw-r--r--vp8/encoder/segmentation.h8
-rw-r--r--vp8/encoder/tokenize.h8
-rw-r--r--vp8/encoder/treewriter.h8
65 files changed, 520 insertions, 0 deletions
diff --git a/vp8/common/alloccommon.h b/vp8/common/alloccommon.h
index 38f89a0f1..93e99d76b 100644
--- a/vp8/common/alloccommon.h
+++ b/vp8/common/alloccommon.h
@@ -14,10 +14,18 @@
#include "onyxc_int.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void vp8_create_common(VP8_COMMON *oci);
void vp8_remove_common(VP8_COMMON *oci);
void vp8_de_alloc_frame_buffers(VP8_COMMON *oci);
int vp8_alloc_frame_buffers(VP8_COMMON *oci, int width, int height);
void vp8_setup_version(VP8_COMMON *oci);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_ALLOCCOMMON_H_
diff --git a/vp8/common/arm/bilinearfilter_arm.h b/vp8/common/arm/bilinearfilter_arm.h
index dd3ff14fb..6b84e6f3b 100644
--- a/vp8/common/arm/bilinearfilter_arm.h
+++ b/vp8/common/arm/bilinearfilter_arm.h
@@ -12,6 +12,10 @@
#ifndef VP8_COMMON_ARM_BILINEARFILTER_ARM_H_
#define VP8_COMMON_ARM_BILINEARFILTER_ARM_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void vp8_filter_block2d_bil_first_pass_armv6
(
const unsigned char *src_ptr,
@@ -32,4 +36,8 @@ extern void vp8_filter_block2d_bil_second_pass_armv6
const short *vp8_filter
);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_ARM_BILINEARFILTER_ARM_H_
diff --git a/vp8/common/blockd.h b/vp8/common/blockd.h
index c3caee10e..ea1a6a4ad 100644
--- a/vp8/common/blockd.h
+++ b/vp8/common/blockd.h
@@ -20,6 +20,10 @@ void vpx_log(const char *format, ...);
#include "treecoder.h"
#include "vpx_ports/mem.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*#define DCPRED 1*/
#define DCPREDSIMTHRESH 0
#define DCPREDCNTTHRESH 3
@@ -297,4 +301,8 @@ typedef struct macroblockd
extern void vp8_build_block_doffsets(MACROBLOCKD *x);
extern void vp8_setup_block_dptrs(MACROBLOCKD *x);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_BLOCKD_H_
diff --git a/vp8/common/coefupdateprobs.h b/vp8/common/coefupdateprobs.h
index 90d290d6e..d96a19e74 100644
--- a/vp8/common/coefupdateprobs.h
+++ b/vp8/common/coefupdateprobs.h
@@ -11,6 +11,10 @@
#ifndef VP8_COMMON_COEFUPDATEPROBS_H_
#define VP8_COMMON_COEFUPDATEPROBS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Update probabilities for the nodes in the token entropy tree.
Generated file included by entropy.c */
@@ -186,4 +190,8 @@ const vp8_prob vp8_coef_update_probs [BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTE
},
};
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_COEFUPDATEPROBS_H_
diff --git a/vp8/common/common.h b/vp8/common/common.h
index 9671da00f..ee5b58c75 100644
--- a/vp8/common/common.h
+++ b/vp8/common/common.h
@@ -18,6 +18,10 @@
#include "vpx_mem/vpx_mem.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Only need this for fixed-size arrays, for structs just assign. */
#define vp8_copy( Dest, Src) { \
@@ -37,4 +41,8 @@
#define vp8_zero_array( Dest, N) vpx_memset( Dest, 0, N * sizeof( *Dest));
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_COMMON_H_
diff --git a/vp8/common/default_coef_probs.h b/vp8/common/default_coef_probs.h
index 836854594..4d69e4be6 100644
--- a/vp8/common/default_coef_probs.h
+++ b/vp8/common/default_coef_probs.h
@@ -11,6 +11,10 @@
#ifndef VP8_COMMON_DEFAULT_COEF_PROBS_H_
#define VP8_COMMON_DEFAULT_COEF_PROBS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*Generated file, included by entropy.c*/
@@ -189,4 +193,8 @@ static const vp8_prob default_coef_probs [BLOCK_TYPES]
}
};
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_DEFAULT_COEF_PROBS_H_
diff --git a/vp8/common/entropy.h b/vp8/common/entropy.h
index 175fa9f61..a90bab4ba 100644
--- a/vp8/common/entropy.h
+++ b/vp8/common/entropy.h
@@ -15,6 +15,10 @@
#include "treecoder.h"
#include "blockd.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Coefficient token alphabet */
#define ZERO_TOKEN 0 /* 0 Extra Bits 0+0 */
@@ -98,4 +102,8 @@ extern DECLARE_ALIGNED(16, const short, vp8_default_zig_zag_mask[16]);
extern const int vp8_mb_feature_data_bits[MB_LVL_MAX];
void vp8_coef_tree_initialize(void);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_ENTROPY_H_
diff --git a/vp8/common/entropymode.h b/vp8/common/entropymode.h
index 18af8c0b8..81bdfc4b8 100644
--- a/vp8/common/entropymode.h
+++ b/vp8/common/entropymode.h
@@ -15,6 +15,10 @@
#include "onyxc_int.h"
#include "treecoder.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef enum
{
SUBMVREF_NORMAL,
@@ -77,4 +81,8 @@ void vp8_init_mbmode_probs(VP8_COMMON *x);
void vp8_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES-1]);
void vp8_kf_default_bmode_probs(vp8_prob dest [VP8_BINTRAMODES] [VP8_BINTRAMODES] [VP8_BINTRAMODES-1]);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_ENTROPYMODE_H_
diff --git a/vp8/common/entropymv.h b/vp8/common/entropymv.h
index 7d16b988f..42840d58a 100644
--- a/vp8/common/entropymv.h
+++ b/vp8/common/entropymv.h
@@ -14,6 +14,10 @@
#include "treecoder.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum
{
mv_max = 1023, /* max absolute value of a MV component */
@@ -41,4 +45,8 @@ typedef struct mv_context
extern const MV_CONTEXT vp8_mv_update_probs[2], vp8_default_mv_context[2];
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_ENTROPYMV_H_
diff --git a/vp8/common/extend.h b/vp8/common/extend.h
index b7e704079..068f4ac52 100644
--- a/vp8/common/extend.h
+++ b/vp8/common/extend.h
@@ -14,6 +14,10 @@
#include "vpx_scale/yv12config.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void vp8_extend_mb_row(YV12_BUFFER_CONFIG *ybf, unsigned char *YPtr, unsigned char *UPtr, unsigned char *VPtr);
void vp8_copy_and_extend_frame(YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst);
@@ -22,4 +26,8 @@ void vp8_copy_and_extend_frame_with_rect(YV12_BUFFER_CONFIG *src,
int srcy, int srcx,
int srch, int srcw);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_EXTEND_H_
diff --git a/vp8/common/filter.h b/vp8/common/filter.h
index c2048ee13..cfba775fc 100644
--- a/vp8/common/filter.h
+++ b/vp8/common/filter.h
@@ -14,6 +14,10 @@
#include "vpx_ports/mem.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define BLOCK_HEIGHT_WIDTH 4
#define VP8_FILTER_WEIGHT 128
#define VP8_FILTER_SHIFT 7
@@ -21,4 +25,8 @@
extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters[8][2]);
extern DECLARE_ALIGNED(16, const short, vp8_sub_pel_filters[8][6]);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_FILTER_H_
diff --git a/vp8/common/findnearmv.h b/vp8/common/findnearmv.h
index 1525db24f..3c8c0506f 100644
--- a/vp8/common/findnearmv.h
+++ b/vp8/common/findnearmv.h
@@ -17,6 +17,10 @@
#include "modecont.h"
#include "treecoder.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
static void mv_bias(int refmb_ref_frame_sign_bias, int refframe, int_mv *mvp,
const int *ref_frame_sign_bias)
@@ -179,4 +183,8 @@ static B_PREDICTION_MODE above_block_mode(const MODE_INFO *cur_mb, int b, int mi
return (cur_mb->bmi + b - 4)->as_mode;
}
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_FINDNEARMV_H_
diff --git a/vp8/common/header.h b/vp8/common/header.h
index 61a8f49bc..e27bca16b 100644
--- a/vp8/common/header.h
+++ b/vp8/common/header.h
@@ -12,6 +12,10 @@
#ifndef VP8_COMMON_HEADER_H_
#define VP8_COMMON_HEADER_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* 24 bits total */
typedef struct
{
@@ -40,4 +44,8 @@ typedef struct
#endif
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_HEADER_H_
diff --git a/vp8/common/invtrans.h b/vp8/common/invtrans.h
index 0186e6b3b..affe57e3d 100644
--- a/vp8/common/invtrans.h
+++ b/vp8/common/invtrans.h
@@ -21,6 +21,10 @@
#include "vpx_mem/vpx_mem.h"
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
static void eob_adjust(char *eobs, short *diff)
{
/* eob adjust.... the idct can only skip if both the dc and eob are zero */
@@ -59,4 +63,8 @@ static void vp8_inverse_transform_mby(MACROBLOCKD *xd)
xd->dst.y_buffer,
xd->dst.y_stride, xd->eobs);
}
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_INVTRANS_H_
diff --git a/vp8/common/loopfilter.h b/vp8/common/loopfilter.h
index 51825efc1..20a6bd375 100644
--- a/vp8/common/loopfilter.h
+++ b/vp8/common/loopfilter.h
@@ -16,6 +16,10 @@
#include "vpx_config.h"
#include "vp8_rtcd.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define MAX_LOOP_FILTER 63
/* fraction of total macroblock rows to be used in fast filter level picking */
/* has to be > 2 */
@@ -102,4 +106,8 @@ void vp8_loop_filter_row_simple(struct VP8Common *cm,
int mb_row, int post_ystride, int post_uvstride,
unsigned char *y_ptr, unsigned char *u_ptr,
unsigned char *v_ptr);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_LOOPFILTER_H_
diff --git a/vp8/common/modecont.h b/vp8/common/modecont.h
index 875bc2754..ff34c33c5 100644
--- a/vp8/common/modecont.h
+++ b/vp8/common/modecont.h
@@ -12,6 +12,14 @@
#ifndef VP8_COMMON_MODECONT_H_
#define VP8_COMMON_MODECONT_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern const int vp8_mode_contexts[6][4];
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_MODECONT_H_
diff --git a/vp8/common/mv.h b/vp8/common/mv.h
index 1e4b206a2..111ccd63c 100644
--- a/vp8/common/mv.h
+++ b/vp8/common/mv.h
@@ -13,6 +13,10 @@
#define VP8_COMMON_MV_H_
#include "vpx/vpx_integer.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct
{
short row;
@@ -25,4 +29,8 @@ typedef union int_mv
MV as_mv;
} int_mv; /* facilitates faster equality tests and copies */
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_MV_H_
diff --git a/vp8/common/onyxc_int.h b/vp8/common/onyxc_int.h
index 92eb7f99a..6d89865c6 100644
--- a/vp8/common/onyxc_int.h
+++ b/vp8/common/onyxc_int.h
@@ -26,6 +26,10 @@
#include "header.h"
/*#endif*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define MINQ 0
#define MAXQ 127
#define QINDEX_RANGE (MAXQ + 1)
@@ -174,4 +178,8 @@ typedef struct VP8Common
int cpu_caps;
} VP8_COMMON;
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_ONYXC_INT_H_
diff --git a/vp8/common/postproc.h b/vp8/common/postproc.h
index 10baf6ccf..33d0a7f02 100644
--- a/vp8/common/postproc.h
+++ b/vp8/common/postproc.h
@@ -26,6 +26,10 @@ struct postproc_state
};
#include "onyxc_int.h"
#include "ppflags.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
int vp8_post_proc_frame(struct VP8Common *oci, YV12_BUFFER_CONFIG *dest,
vp8_ppflags_t *flags);
@@ -47,4 +51,8 @@ void vp8_deblock(struct VP8Common *oci,
#define MFQE_PRECISION 4
void vp8_multiframe_quality_enhance(struct VP8Common *cm);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_POSTPROC_H_
diff --git a/vp8/common/ppflags.h b/vp8/common/ppflags.h
index 1fb37e17a..768224aad 100644
--- a/vp8/common/ppflags.h
+++ b/vp8/common/ppflags.h
@@ -11,6 +11,10 @@
#ifndef VP8_COMMON_PPFLAGS_H_
#define VP8_COMMON_PPFLAGS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
enum
{
VP8D_NOFILTERING = 0,
@@ -38,4 +42,8 @@ typedef struct
int display_mv_flag;
} vp8_ppflags_t;
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_PPFLAGS_H_
diff --git a/vp8/common/pragmas.h b/vp8/common/pragmas.h
index be10452d2..329cc8275 100644
--- a/vp8/common/pragmas.h
+++ b/vp8/common/pragmas.h
@@ -11,6 +11,10 @@
#ifndef VP8_COMMON_PRAGMAS_H_
#define VP8_COMMON_PRAGMAS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef __INTEL_COMPILER
#pragma warning(disable:997 1011 170)
#endif
@@ -18,4 +22,8 @@
#pragma warning(disable:4799)
#endif
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_PRAGMAS_H_
diff --git a/vp8/common/quant_common.h b/vp8/common/quant_common.h
index 4c7457f8d..700b5e6d7 100644
--- a/vp8/common/quant_common.h
+++ b/vp8/common/quant_common.h
@@ -16,6 +16,10 @@
#include "blockd.h"
#include "onyxc_int.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern int vp8_ac_yquant(int QIndex);
extern int vp8_dc_quant(int QIndex, int Delta);
extern int vp8_dc2quant(int QIndex, int Delta);
@@ -23,4 +27,8 @@ extern int vp8_ac2quant(int QIndex, int Delta);
extern int vp8_dc_uv_quant(int QIndex, int Delta);
extern int vp8_ac_uv_quant(int QIndex, int Delta);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_QUANT_COMMON_H_
diff --git a/vp8/common/reconinter.h b/vp8/common/reconinter.h
index 50ebedc00..ba979b966 100644
--- a/vp8/common/reconinter.h
+++ b/vp8/common/reconinter.h
@@ -12,6 +12,10 @@
#ifndef VP8_COMMON_RECONINTER_H_
#define VP8_COMMON_RECONINTER_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void vp8_build_inter_predictors_mb(MACROBLOCKD *x);
extern void vp8_build_inter16x16_predictors_mb(MACROBLOCKD *x,
unsigned char *dst_y,
@@ -32,4 +36,8 @@ extern void vp8_build_inter_predictors_b(BLOCKD *d, int pitch,
extern void vp8_build_inter16x16_predictors_mbuv(MACROBLOCKD *x);
extern void vp8_build_inter4x4_predictors_mbuv(MACROBLOCKD *x);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_RECONINTER_H_
diff --git a/vp8/common/reconintra4x4.h b/vp8/common/reconintra4x4.h
index cbb06ce78..ed59c9edd 100644
--- a/vp8/common/reconintra4x4.h
+++ b/vp8/common/reconintra4x4.h
@@ -13,6 +13,10 @@
#define VP8_COMMON_RECONINTRA4X4_H_
#include "vp8/common/blockd.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
static void intra_prediction_down_copy(MACROBLOCKD *xd,
unsigned char *above_right_src)
{
@@ -29,4 +33,8 @@ static void intra_prediction_down_copy(MACROBLOCKD *xd,
*dst_ptr2 = *src_ptr;
}
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_RECONINTRA4X4_H_
diff --git a/vp8/common/setupintrarecon.h b/vp8/common/setupintrarecon.h
index 3db507b88..608f4a9ac 100644
--- a/vp8/common/setupintrarecon.h
+++ b/vp8/common/setupintrarecon.h
@@ -12,6 +12,10 @@
#define VP8_COMMON_SETUPINTRARECON_H_
#include "vpx_scale/yv12config.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
extern void vp8_setup_intra_recon(YV12_BUFFER_CONFIG *ybf);
extern void vp8_setup_intra_recon_top_line(YV12_BUFFER_CONFIG *ybf);
@@ -34,4 +38,8 @@ void setup_intra_recon_left(unsigned char *y_buffer,
v_buffer[uv_stride *i] = (unsigned char) 129;
}
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_SETUPINTRARECON_H_
diff --git a/vp8/common/swapyv12buffer.h b/vp8/common/swapyv12buffer.h
index ea8977b10..1d66cd3d6 100644
--- a/vp8/common/swapyv12buffer.h
+++ b/vp8/common/swapyv12buffer.h
@@ -14,6 +14,14 @@
#include "vpx_scale/yv12config.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void vp8_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame, YV12_BUFFER_CONFIG *last_frame);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_SWAPYV12BUFFER_H_
diff --git a/vp8/common/systemdependent.h b/vp8/common/systemdependent.h
index 966cc5d8b..3d44e37cf 100644
--- a/vp8/common/systemdependent.h
+++ b/vp8/common/systemdependent.h
@@ -13,7 +13,15 @@
#include "vpx_config.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct VP8Common;
void vp8_machine_specific_config(struct VP8Common *);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_SYSTEMDEPENDENT_H_
diff --git a/vp8/common/threading.h b/vp8/common/threading.h
index 8cf6d26bc..01c82dbb8 100644
--- a/vp8/common/threading.h
+++ b/vp8/common/threading.h
@@ -12,6 +12,10 @@
#ifndef VP8_COMMON_THREADING_H_
#define VP8_COMMON_THREADING_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#if CONFIG_OS_SUPPORT && CONFIG_MULTITHREAD
/* Thread management macros */
@@ -183,4 +187,8 @@ static inline int sem_destroy(sem_t * sem)
#endif /* CONFIG_OS_SUPPORT && CONFIG_MULTITHREAD */
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_THREADING_H_
diff --git a/vp8/common/treecoder.h b/vp8/common/treecoder.h
index edb4b5775..d22b7c570 100644
--- a/vp8/common/treecoder.h
+++ b/vp8/common/treecoder.h
@@ -12,6 +12,10 @@
#ifndef VP8_COMMON_TREECODER_H_
#define VP8_COMMON_TREECODER_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef unsigned char vp8bc_index_t; /* probability index */
@@ -87,4 +91,8 @@ void vp8bc_tree_probs_from_distribution(
);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_TREECODER_H_
diff --git a/vp8/common/variance.h b/vp8/common/variance.h
index 12a03d0fb..89a32a722 100644
--- a/vp8/common/variance.h
+++ b/vp8/common/variance.h
@@ -14,6 +14,10 @@
#include "vpx_config.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef unsigned int(*vp8_sad_fn_t)(
const unsigned char *src_ptr,
int source_stride,
@@ -112,4 +116,8 @@ typedef struct variance_vtable
#endif
} vp8_variance_fn_ptr_t;
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_VARIANCE_H_
diff --git a/vp8/common/vp8_entropymodedata.h b/vp8/common/vp8_entropymodedata.h
index 988114804..c4aed4989 100644
--- a/vp8/common/vp8_entropymodedata.h
+++ b/vp8/common/vp8_entropymodedata.h
@@ -11,6 +11,10 @@
#ifndef VP8_COMMON_VP8_ENTROPYMODEDATA_H_
#define VP8_COMMON_VP8_ENTROPYMODEDATA_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*Generated file, included by entropymode.c*/
@@ -243,4 +247,8 @@ const vp8_prob vp8_kf_bmode_prob
}
};
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_VP8_ENTROPYMODEDATA_H_
diff --git a/vp8/common/x86/filter_x86.h b/vp8/common/x86/filter_x86.h
index 0d537d9df..d282841be 100644
--- a/vp8/common/x86/filter_x86.h
+++ b/vp8/common/x86/filter_x86.h
@@ -13,6 +13,10 @@
#include "vpx_ports/mem.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* x86 assembly specific copy of vp8/common/filter.c:vp8_bilinear_filters with
* duplicated values */
@@ -22,4 +26,8 @@ extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters_x86_4[8][8]);
/* duplicated 8x */
extern DECLARE_ALIGNED(16, const short, vp8_bilinear_filters_x86_8[8][16]);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_COMMON_X86_FILTER_X86_H_
diff --git a/vp8/decoder/dboolhuff.h b/vp8/decoder/dboolhuff.h
index 82de6b8c8..36af7eed5 100644
--- a/vp8/decoder/dboolhuff.h
+++ b/vp8/decoder/dboolhuff.h
@@ -19,6 +19,10 @@
#include "vpx_ports/mem.h"
#include "vpx/vpx_integer.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef size_t VP8_BD_VALUE;
#define VP8_BD_VALUE_SIZE ((int)sizeof(VP8_BD_VALUE)*CHAR_BIT)
@@ -135,4 +139,8 @@ static int vp8dx_bool_error(BOOL_DECODER *br)
return 0;
}
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_DECODER_DBOOLHUFF_H_
diff --git a/vp8/decoder/decodemv.h b/vp8/decoder/decodemv.h
index b5d750ce4..f33b07351 100644
--- a/vp8/decoder/decodemv.h
+++ b/vp8/decoder/decodemv.h
@@ -13,6 +13,14 @@
#include "onyxd_int.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void vp8_decode_mode_mvs(VP8D_COMP *);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_DECODER_DECODEMV_H_
diff --git a/vp8/decoder/decoderthreading.h b/vp8/decoder/decoderthreading.h
index 3a8277f4e..c563cf6e9 100644
--- a/vp8/decoder/decoderthreading.h
+++ b/vp8/decoder/decoderthreading.h
@@ -11,6 +11,10 @@
#ifndef VP8_DECODER_DECODERTHREADING_H_
#define VP8_DECODER_DECODERTHREADING_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#if CONFIG_MULTITHREAD
void vp8mt_decode_mb_rows(VP8D_COMP *pbi, MACROBLOCKD *xd);
void vp8_decoder_remove_threads(VP8D_COMP *pbi);
@@ -19,4 +23,8 @@ void vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows);
void vp8mt_de_alloc_temp_buffers(VP8D_COMP *pbi, int mb_rows);
#endif
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_DECODER_DECODERTHREADING_H_
diff --git a/vp8/decoder/detokenize.h b/vp8/decoder/detokenize.h
index f134df869..f0b125444 100644
--- a/vp8/decoder/detokenize.h
+++ b/vp8/decoder/detokenize.h
@@ -13,7 +13,15 @@
#include "onyxd_int.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void vp8_reset_mb_tokens_context(MACROBLOCKD *x);
int vp8_decode_mb_tokens(VP8D_COMP *, MACROBLOCKD *);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_DECODER_DETOKENIZE_H_
diff --git a/vp8/decoder/ec_types.h b/vp8/decoder/ec_types.h
index 0a3123a65..3af5ca86b 100644
--- a/vp8/decoder/ec_types.h
+++ b/vp8/decoder/ec_types.h
@@ -11,6 +11,10 @@
#ifndef VP8_DECODER_EC_TYPES_H_
#define VP8_DECODER_EC_TYPES_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define MAX_OVERLAPS 16
@@ -47,4 +51,8 @@ typedef struct
MV_REFERENCE_FRAME ref_frame;
} EC_BLOCK;
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_DECODER_EC_TYPES_H_
diff --git a/vp8/decoder/error_concealment.h b/vp8/decoder/error_concealment.h
index 10bf870b7..9a1e02486 100644
--- a/vp8/decoder/error_concealment.h
+++ b/vp8/decoder/error_concealment.h
@@ -15,6 +15,10 @@
#include "onyxd_int.h"
#include "ec_types.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Allocate memory for the overlap lists */
int vp8_alloc_overlap_lists(VP8D_COMP *pbi);
@@ -38,4 +42,8 @@ void vp8_interpolate_motion(MACROBLOCKD *mb,
*/
void vp8_conceal_corrupt_mb(MACROBLOCKD *xd);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_DECODER_ERROR_CONCEALMENT_H_
diff --git a/vp8/decoder/onyxd_int.h b/vp8/decoder/onyxd_int.h
index 3728152b0..8ef489403 100644
--- a/vp8/decoder/onyxd_int.h
+++ b/vp8/decoder/onyxd_int.h
@@ -22,6 +22,10 @@
#include "ec_types.h"
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct
{
int ithread;
@@ -148,4 +152,8 @@ int vp8_remove_decoder_instances(struct frame_buffers *fb);
} while(0)
#endif
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_DECODER_ONYXD_INT_H_
diff --git a/vp8/decoder/treereader.h b/vp8/decoder/treereader.h
index 1d3f67207..35ee69600 100644
--- a/vp8/decoder/treereader.h
+++ b/vp8/decoder/treereader.h
@@ -15,6 +15,10 @@
#include "vp8/common/treecoder.h"
#include "dboolhuff.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef BOOL_DECODER vp8_reader;
#define vp8_read vp8dx_decode_bool
@@ -37,4 +41,8 @@ static int vp8_treed_read(
return -i;
}
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_DECODER_TREEREADER_H_
diff --git a/vp8/encoder/bitstream.h b/vp8/encoder/bitstream.h
index 01aa808d0..eef2d79e0 100644
--- a/vp8/encoder/bitstream.h
+++ b/vp8/encoder/bitstream.h
@@ -12,6 +12,10 @@
#ifndef VP8_ENCODER_BITSTREAM_H_
#define VP8_ENCODER_BITSTREAM_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#if HAVE_EDSP
void vp8cx_pack_tokens_armv5(vp8_writer *w, const TOKENEXTRA *p, int xcount,
const vp8_token *,
@@ -43,4 +47,8 @@ void vp8_pack_tokens_c(vp8_writer *w, const TOKENEXTRA *p, int xcount);
# define pack_mb_row_tokens(a,b) pack_mb_row_tokens_c(a,b)
#endif
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_BITSTREAM_H_
diff --git a/vp8/encoder/block.h b/vp8/encoder/block.h
index 0dc0d8600..dd733e55a 100644
--- a/vp8/encoder/block.h
+++ b/vp8/encoder/block.h
@@ -18,6 +18,10 @@
#include "vp8/common/entropy.h"
#include "vpx_ports/mem.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define MAX_MODES 20
#define MAX_ERROR_BINS 1024
@@ -160,4 +164,8 @@ typedef struct macroblock
} MACROBLOCK;
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_BLOCK_H_
diff --git a/vp8/encoder/boolhuff.h b/vp8/encoder/boolhuff.h
index 8f451b7f0..611421575 100644
--- a/vp8/encoder/boolhuff.h
+++ b/vp8/encoder/boolhuff.h
@@ -22,6 +22,10 @@
#include "vpx_ports/mem.h"
#include "vpx/internal/vpx_codec_internal.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct
{
unsigned int lowvalue;
@@ -125,4 +129,8 @@ static void vp8_encode_bool(BOOL_CODER *br, int bit, int probability)
br->range = range;
}
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_BOOLHUFF_H_
diff --git a/vp8/encoder/dct_value_cost.h b/vp8/encoder/dct_value_cost.h
index f754e974e..1cd3eec84 100644
--- a/vp8/encoder/dct_value_cost.h
+++ b/vp8/encoder/dct_value_cost.h
@@ -11,6 +11,10 @@
#ifndef VP8_ENCODER_DCT_VALUE_COST_H_
#define VP8_ENCODER_DCT_VALUE_COST_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Generated file, included by tokenize.c */
/* Values generated by fill_value_tokens() */
@@ -360,4 +364,8 @@ static const short dct_value_cost[2048*2] =
8251, 8257, 8265, 8275
};
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_DCT_VALUE_COST_H_
diff --git a/vp8/encoder/dct_value_tokens.h b/vp8/encoder/dct_value_tokens.h
index e4132c62b..c2aadefca 100644
--- a/vp8/encoder/dct_value_tokens.h
+++ b/vp8/encoder/dct_value_tokens.h
@@ -11,6 +11,10 @@
#ifndef VP8_ENCODER_DCT_VALUE_TOKENS_H_
#define VP8_ENCODER_DCT_VALUE_TOKENS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Generated file, included by tokenize.c */
/* Values generated by fill_value_tokens() */
@@ -701,4 +705,8 @@ static const TOKENVALUE dct_value_tokens[2048*2] =
{10, 3954}, {10, 3956}, {10, 3958}, {10, 3960}
};
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_DCT_VALUE_TOKENS_H_
diff --git a/vp8/encoder/defaultcoefcounts.h b/vp8/encoder/defaultcoefcounts.h
index 3015a585e..1e8e80484 100644
--- a/vp8/encoder/defaultcoefcounts.h
+++ b/vp8/encoder/defaultcoefcounts.h
@@ -11,6 +11,10 @@
#ifndef VP8_ENCODER_DEFAULTCOEFCOUNTS_H_
#define VP8_ENCODER_DEFAULTCOEFCOUNTS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Generated file, included by entropy.c */
static const unsigned int default_coef_counts[BLOCK_TYPES]
@@ -225,4 +229,8 @@ static const unsigned int default_coef_counts[BLOCK_TYPES]
},
};
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_DEFAULTCOEFCOUNTS_H_
diff --git a/vp8/encoder/denoising.h b/vp8/encoder/denoising.h
index 83fb93a14..cc9913afa 100644
--- a/vp8/encoder/denoising.h
+++ b/vp8/encoder/denoising.h
@@ -13,6 +13,10 @@
#include "block.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define SUM_DIFF_THRESHOLD (16 * 16 * 2)
#define MOTION_MAGNITUDE_THRESHOLD (8*3)
@@ -39,4 +43,8 @@ void vp8_denoiser_denoise_mb(VP8_DENOISER *denoiser,
int recon_yoffset,
int recon_uvoffset);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_DENOISING_H_
diff --git a/vp8/encoder/encodeframe.h b/vp8/encoder/encodeframe.h
index 180596bf1..e185c1035 100644
--- a/vp8/encoder/encodeframe.h
+++ b/vp8/encoder/encodeframe.h
@@ -9,6 +9,10 @@
*/
#ifndef VP8_ENCODER_ENCODEFRAME_H_
#define VP8_ENCODER_ENCODEFRAME_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
extern void vp8_activity_masking(VP8_COMP *cpi, MACROBLOCK *x);
extern void vp8_build_block_offsets(MACROBLOCK *x);
@@ -24,4 +28,8 @@ extern int vp8cx_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
extern int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
TOKENEXTRA **t);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_ENCODEFRAME_H_
diff --git a/vp8/encoder/encodeintra.h b/vp8/encoder/encodeintra.h
index c6da43b8f..a8d0284d2 100644
--- a/vp8/encoder/encodeintra.h
+++ b/vp8/encoder/encodeintra.h
@@ -13,9 +13,17 @@
#define VP8_ENCODER_ENCODEINTRA_H_
#include "onyx_int.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
int vp8_encode_intra(VP8_COMP *cpi, MACROBLOCK *x, int use_dc_pred);
void vp8_encode_intra16x16mby(MACROBLOCK *x);
void vp8_encode_intra16x16mbuv(MACROBLOCK *x);
void vp8_encode_intra4x4mby(MACROBLOCK *mb);
void vp8_encode_intra4x4block(MACROBLOCK *x, int ib);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_ENCODEINTRA_H_
diff --git a/vp8/encoder/encodemb.h b/vp8/encoder/encodemb.h
index cbe62e9e5..0b3ec875e 100644
--- a/vp8/encoder/encodemb.h
+++ b/vp8/encoder/encodemb.h
@@ -13,6 +13,10 @@
#define VP8_ENCODER_ENCODEMB_H_
#include "onyx_int.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
void vp8_encode_inter16x16(MACROBLOCK *x);
void vp8_build_dcblock(MACROBLOCK *b);
@@ -23,4 +27,8 @@ void vp8_transform_intra_mby(MACROBLOCK *x);
void vp8_optimize_mby(MACROBLOCK *x);
void vp8_optimize_mbuv(MACROBLOCK *x);
void vp8_encode_inter16x16y(MACROBLOCK *x);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_ENCODEMB_H_
diff --git a/vp8/encoder/encodemv.h b/vp8/encoder/encodemv.h
index 65e7ac21a..722162ba2 100644
--- a/vp8/encoder/encodemv.h
+++ b/vp8/encoder/encodemv.h
@@ -14,8 +14,16 @@
#include "onyx_int.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void vp8_write_mvprobs(VP8_COMP *);
void vp8_encode_motion_vector(vp8_writer *, const MV *, const MV_CONTEXT *);
void vp8_build_component_cost_table(int *mvcost[2], const MV_CONTEXT *mvc, int mvc_flag[2]);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_ENCODEMV_H_
diff --git a/vp8/encoder/firstpass.h b/vp8/encoder/firstpass.h
index cf686793c..c409ebca8 100644
--- a/vp8/encoder/firstpass.h
+++ b/vp8/encoder/firstpass.h
@@ -12,6 +12,10 @@
#ifndef VP8_ENCODER_FIRSTPASS_H_
#define VP8_ENCODER_FIRSTPASS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void vp8_init_first_pass(VP8_COMP *cpi);
extern void vp8_first_pass(VP8_COMP *cpi);
extern void vp8_end_first_pass(VP8_COMP *cpi);
@@ -21,4 +25,8 @@ extern void vp8_second_pass(VP8_COMP *cpi);
extern void vp8_end_second_pass(VP8_COMP *cpi);
extern size_t vp8_firstpass_stats_sz(unsigned int mb_count);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_FIRSTPASS_H_
diff --git a/vp8/encoder/lookahead.h b/vp8/encoder/lookahead.h
index d1904fa90..cad68e639 100644
--- a/vp8/encoder/lookahead.h
+++ b/vp8/encoder/lookahead.h
@@ -12,6 +12,10 @@
#include "vpx_scale/yv12config.h"
#include "vpx/vpx_integer.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct lookahead_entry
{
YV12_BUFFER_CONFIG img;
@@ -106,4 +110,8 @@ unsigned int
vp8_lookahead_depth(struct lookahead_ctx *ctx);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_LOOKAHEAD_H_
diff --git a/vp8/encoder/mcomp.h b/vp8/encoder/mcomp.h
index 85bc7add8..f284f7c38 100644
--- a/vp8/encoder/mcomp.h
+++ b/vp8/encoder/mcomp.h
@@ -15,6 +15,10 @@
#include "block.h"
#include "vp8/common/variance.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef VP8_ENTROPY_STATS
extern void init_mv_ref_counts();
extern void accum_mv_refs(MB_PREDICTION_MODE, const int near_mv_ref_cts[4]);
@@ -104,4 +108,8 @@ typedef int (*vp8_diamond_search_fn_t)
int_mv *center_mv
);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_MCOMP_H_
diff --git a/vp8/encoder/modecosts.h b/vp8/encoder/modecosts.h
index 2df944643..9281551c8 100644
--- a/vp8/encoder/modecosts.h
+++ b/vp8/encoder/modecosts.h
@@ -12,6 +12,14 @@
#ifndef VP8_ENCODER_MODECOSTS_H_
#define VP8_ENCODER_MODECOSTS_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void vp8_init_mode_costs(VP8_COMP *x);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_MODECOSTS_H_
diff --git a/vp8/encoder/mr_dissim.h b/vp8/encoder/mr_dissim.h
index 8b22566bb..5a59ce62a 100644
--- a/vp8/encoder/mr_dissim.h
+++ b/vp8/encoder/mr_dissim.h
@@ -13,8 +13,16 @@
#define VP8_ENCODER_MR_DISSIM_H_
#include "vpx_config.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void vp8_cal_low_res_mb_cols(VP8_COMP *cpi);
extern void vp8_cal_dissimilarity(VP8_COMP *cpi);
extern void vp8_store_drop_frame_info(VP8_COMP *cpi);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_MR_DISSIM_H_
diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h
index 2fa6a9337..6b371671d 100644
--- a/vp8/encoder/onyx_int.h
+++ b/vp8/encoder/onyx_int.h
@@ -33,6 +33,10 @@
#include "vp8/encoder/denoising.h"
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define MIN_GF_INTERVAL 4
#define DEFAULT_GF_INTERVAL 7
@@ -721,4 +725,8 @@ void vp8_set_speed_features(VP8_COMP *cpi);
"Failed to allocate "#lval);\
} while(0)
#endif
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_ONYX_INT_H_
diff --git a/vp8/encoder/pickinter.h b/vp8/encoder/pickinter.h
index f74cf3df1..cf3b1f8d4 100644
--- a/vp8/encoder/pickinter.h
+++ b/vp8/encoder/pickinter.h
@@ -14,6 +14,10 @@
#include "vpx_config.h"
#include "vp8/common/onyxc_int.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
int recon_uvoffset, int *returnrate,
int *returndistortion, int *returnintra,
@@ -24,4 +28,8 @@ extern int vp8_get_inter_mbpred_error(MACROBLOCK *mb,
const vp8_variance_fn_ptr_t *vfp,
unsigned int *sse,
int_mv this_mv);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_PICKINTER_H_
diff --git a/vp8/encoder/psnr.h b/vp8/encoder/psnr.h
index b2106151b..0c6c088c4 100644
--- a/vp8/encoder/psnr.h
+++ b/vp8/encoder/psnr.h
@@ -12,6 +12,14 @@
#ifndef VP8_ENCODER_PSNR_H_
#define VP8_ENCODER_PSNR_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern double vp8_mse2psnr(double Samples, double Peak, double Mse);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_PSNR_H_
diff --git a/vp8/encoder/quantize.h b/vp8/encoder/quantize.h
index bbad8c7c3..c739b2627 100644
--- a/vp8/encoder/quantize.h
+++ b/vp8/encoder/quantize.h
@@ -12,6 +12,10 @@
#ifndef VP8_ENCODER_QUANTIZE_H_
#define VP8_ENCODER_QUANTIZE_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct VP8_COMP;
struct macroblock;
extern void vp8_set_quantizer(struct VP8_COMP *cpi, int Q);
@@ -20,4 +24,8 @@ extern void vp8_update_zbin_extra(struct VP8_COMP *cpi, struct macroblock *x);
extern void vp8cx_mb_init_quantizer(struct VP8_COMP *cpi, struct macroblock *x, int ok_to_skip);
extern void vp8cx_init_quantizer(struct VP8_COMP *cpi);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_QUANTIZE_H_
diff --git a/vp8/encoder/ratectrl.h b/vp8/encoder/ratectrl.h
index 88fe67899..829697f39 100644
--- a/vp8/encoder/ratectrl.h
+++ b/vp8/encoder/ratectrl.h
@@ -14,6 +14,10 @@
#include "onyx_int.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void vp8_save_coding_context(VP8_COMP *cpi);
extern void vp8_restore_coding_context(VP8_COMP *cpi);
@@ -26,4 +30,8 @@ extern void vp8_compute_frame_size_bounds(VP8_COMP *cpi, int *frame_under_shoot_
/* return of 0 means drop frame */
extern int vp8_pick_frame_size(VP8_COMP *cpi);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_RATECTRL_H_
diff --git a/vp8/encoder/rdopt.h b/vp8/encoder/rdopt.h
index c28c37369..fe21b8e28 100644
--- a/vp8/encoder/rdopt.h
+++ b/vp8/encoder/rdopt.h
@@ -12,6 +12,10 @@
#ifndef VP8_ENCODER_RDOPT_H_
#define VP8_ENCODER_RDOPT_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define RDCOST(RM,DM,R,D) ( ((128+(R)*(RM)) >> 8) + (DM)*(D) )
static void insertsortmv(int arr[], int len)
@@ -130,4 +134,8 @@ extern void vp8_mv_pred
);
void vp8_cal_sad(VP8_COMP *cpi, MACROBLOCKD *xd, MACROBLOCK *x, int recon_yoffset, int near_sadidx[]);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_RDOPT_H_
diff --git a/vp8/encoder/segmentation.h b/vp8/encoder/segmentation.h
index 8811a8b62..6b5500594 100644
--- a/vp8/encoder/segmentation.h
+++ b/vp8/encoder/segmentation.h
@@ -15,6 +15,14 @@
#include "vp8/common/blockd.h"
#include "onyx_int.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void vp8_update_gf_useage_maps(VP8_COMP *cpi, VP8_COMMON *cm, MACROBLOCK *x);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_SEGMENTATION_H_
diff --git a/vp8/encoder/tokenize.h b/vp8/encoder/tokenize.h
index f85f3c9b1..b73a9ee1c 100644
--- a/vp8/encoder/tokenize.h
+++ b/vp8/encoder/tokenize.h
@@ -15,6 +15,10 @@
#include "vp8/common/entropy.h"
#include "block.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void vp8_tokenize_initialize();
typedef struct
@@ -47,4 +51,8 @@ extern const short *const vp8_dct_value_cost_ptr;
*/
extern const TOKENVALUE *const vp8_dct_value_tokens_ptr;
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_TOKENIZE_H_
diff --git a/vp8/encoder/treewriter.h b/vp8/encoder/treewriter.h
index ba03f07e3..cfb2730ab 100644
--- a/vp8/encoder/treewriter.h
+++ b/vp8/encoder/treewriter.h
@@ -19,6 +19,10 @@
#include "boolhuff.h" /* for now */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef BOOL_CODER vp8_writer;
#define vp8_write vp8_encode_bool
@@ -123,4 +127,8 @@ void vp8_cost_tokens2(
int *Costs, const vp8_prob *, vp8_tree, int
);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // VP8_ENCODER_TREEWRITER_H_