diff --git a/vp8/encoder/bitstream.h b/vp8/encoder/bitstream.h index 01aa808d092906fae1bf8cf308d857c93bc03fa3..eef2d79e087118f4f8fcf570e13285adc8eba4cf 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 0dc0d86008134a881fb00dbfefad9adcd44fb328..dd733e55a9d14a4de6666042106459a719ccbad9 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 8f451b7f0fc1fb05c7db3b0a1f38e777f6089556..61142157593e3aa0ee5171d5ac4212ac8af00d5c 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 f754e974ea06b2682922cde5765c2644c61e68f4..1cd3eec84ac37bf8dedc193a016073f7ee21f473 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 e4132c62b7430dcd451e961b7017dff0681bfd1b..c2aadefca79c957344e29b6c3debeb0d2036b68d 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 3015a585ed744cd2da7084d5ede9d1481e64eed7..1e8e80484ae25c80f407a0d7ba6a9a4bd555256d 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 83fb93a143904ca15039f0202b20b9a53e6bf5e4..cc9913afa2b456e2433ee3e9b61dc3c3c7cdc3cd 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 180596bf17179f04b123ecc35ba117cacff8cd0f..e185c1035c09a7579ad317e849aac2839502d419 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 c6da43b8f8d1b84bc9a3673ca048cbce35ae6c8a..a8d0284d29b56350a135ffc9a931db83faccf2e9 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 cbe62e9e5ec2fbe9e9353a8c9571c156166862cb..0b3ec875e7a4b1e94b589eb03e8617d3484df19c 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 65e7ac21a907861755f7335e5a0ec67b66183c57..722162ba212e3931c55e6a06b88aa12c3b6410ad 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 cf686793c37626e4ff8f8817a72b5ccc05112e02..c409ebca8f1bf1d357ed120b7b80e160a285881a 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 d1904fa904cb6421f5aca9d00388de47fb749916..cad68e639fbfb36aaab28cee7e92045c0de8c921 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 85bc7add80b125c55c28510bf79caab400f05225..f284f7c38075fa7713514ab0bc65dedefbd4b220 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 2df944643ea13f5d6ec71f3b35679fc605ab69ca..9281551c8d5f6a4fb55e368de97b37a4562b75cf 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 8b22566bbaa4fb730293982d3e5559f7c54a343c..5a59ce62a61a2adb0133163af4d389cb73cbd24f 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 2fa6a93370a38f90ce06438adfea1841b4727994..6b371671d4c22733b26cce63fcc48600bfa47e34 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 f74cf3df1d0d4e1050f679a41d37b61cd372f465..cf3b1f8d49cd58f0fd954ed62c18206a046d32f2 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 b2106151b8ba7b1bcbe292ff537c3aeb5b3e0e94..0c6c088c4f8a45e6f661fcc6956b494d757be592 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 bbad8c7c3dba661237745546cf9c55eba6f84038..c739b2627b61d7c878af334d76f7f9aa88289743 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 88fe67899d0ab64a98e8a44d33044d24d3ae11ef..829697f391f606042a419ffe6953a11b8af4a93f 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 c28c37369b9eb47a5ef34e8b22845936a93d221f..fe21b8e283e5cf269676a7947e701873c1573e49 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 8811a8b628775ae36ada589948d6eae463409bfe..6b5500594e6ec47af973e253c49ca810e5cc9af8 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 f85f3c9b1f3cb808f1915909b3c1fcecb589c642..b73a9ee1c896892f5e2947c9446f9691caeb7101 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 ba03f07e365ca28fa7e4b731abbd8f05b3e43c76..cfb2730ab3b20e5baed681b3443ef8a2114e79cb 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_