diff --git a/src/dec/vp8.c b/src/dec/vp8.c index c17f575c..9f417ac8 100644 --- a/src/dec/vp8.c +++ b/src/dec/vp8.c @@ -12,6 +12,10 @@ #include #include "vp8i.h" +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + //----------------------------------------------------------------------------- // VP8Decoder @@ -658,3 +662,9 @@ void VP8Clear(VP8Decoder* const dec) { memset(&dec->br_, 0, sizeof(dec->br_)); dec->ready_ = 0; } + +//----------------------------------------------------------------------------- + +#if defined(__cplusplus) || defined(c_plusplus) +} // extern "C" +#endif diff --git a/src/enc/config.c b/src/enc/config.c index 6a4cd1f9..86ef5ce2 100644 --- a/src/enc/config.c +++ b/src/enc/config.c @@ -12,6 +12,10 @@ #include #include "webp/encode.h" +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + //----------------------------------------------------------------------------- // WebPConfig //----------------------------------------------------------------------------- @@ -105,3 +109,7 @@ int WebPValidateConfig(const WebPConfig* const config) { } //----------------------------------------------------------------------------- + +#if defined(__cplusplus) || defined(c_plusplus) +} // extern "C" +#endif diff --git a/src/enc/filter.c b/src/enc/filter.c index cf845e0d..5a243b17 100644 --- a/src/enc/filter.c +++ b/src/enc/filter.c @@ -12,6 +12,10 @@ #include #include "vp8enci.h" +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + // NOTE: clip1, tables and InitTables are repeated entries of dsp.c static uint8_t abs0[255 + 255 + 1]; // abs(i) static uint8_t abs1[255 + 255 + 1]; // abs(i)>>1 @@ -368,3 +372,7 @@ void VP8AdjustFilterStrength(VP8EncIterator* const it) { enc->dqm_[s].fstrength_ = best_level; } } + +#if defined(__cplusplus) || defined(c_plusplus) +} // extern "C" +#endif