diff --git a/examples/example_util.c b/examples/example_util.c index 8d31da66..d265f697 100644 --- a/examples/example_util.c +++ b/examples/example_util.c @@ -14,10 +14,6 @@ #include #include -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - // ----------------------------------------------------------------------------- // File I/O @@ -74,6 +70,3 @@ int ExUtilWriteFile(const char* const file_name, return ok; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dec/alpha.c b/src/dec/alpha.c index e2fc4527..93729a03 100644 --- a/src/dec/alpha.c +++ b/src/dec/alpha.c @@ -18,10 +18,6 @@ #include "../utils/quant_levels_dec.h" #include "../webp/format_constants.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // ALPHDecoder object. @@ -163,6 +159,3 @@ const uint8_t* VP8DecompressAlphaRows(VP8Decoder* const dec, return dec->alpha_plane_ + row * width; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dec/buffer.c b/src/dec/buffer.c index 38557152..1e852efe 100644 --- a/src/dec/buffer.c +++ b/src/dec/buffer.c @@ -17,10 +17,6 @@ #include "./webpi.h" #include "../utils/utils.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // WebPDecBuffer @@ -212,6 +208,3 @@ void WebPGrabDecBuffer(WebPDecBuffer* const src, WebPDecBuffer* const dst) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dec/frame.c b/src/dec/frame.c index 5a4f8149..acbf2abc 100644 --- a/src/dec/frame.c +++ b/src/dec/frame.c @@ -15,10 +15,6 @@ #include "./vp8i.h" #include "../utils/utils.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #define ALIGN_MASK (32 - 1) static void ReconstructRow(const VP8Decoder* const dec, @@ -820,6 +816,3 @@ static void ReconstructRow(const VP8Decoder* const dec, //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dec/idec.c b/src/dec/idec.c index bef7f373..40d5ff6e 100644 --- a/src/dec/idec.c +++ b/src/dec/idec.c @@ -20,10 +20,6 @@ #include "./vp8i.h" #include "../utils/utils.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - // In append mode, buffer allocations increase as multiples of this value. // Needs to be a power of 2. #define CHUNK_SIZE 4096 @@ -851,6 +847,3 @@ int WebPISetIOHooks(WebPIDecoder* const idec, return 1; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dec/io.c b/src/dec/io.c index 5f4bed76..1ba376ed 100644 --- a/src/dec/io.c +++ b/src/dec/io.c @@ -18,10 +18,6 @@ #include "../dsp/dsp.h" #include "../dsp/yuv.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // Main YUV<->RGB conversion functions @@ -630,6 +626,3 @@ void WebPInitCustomIo(WebPDecParams* const params, VP8Io* const io) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dec/layer.c b/src/dec/layer.c index 9a4b2d90..dacb9e23 100644 --- a/src/dec/layer.c +++ b/src/dec/layer.c @@ -16,10 +16,6 @@ #include "./vp8i.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ int VP8DecodeLayer(VP8Decoder* const dec) { @@ -32,6 +28,3 @@ int VP8DecodeLayer(VP8Decoder* const dec) { return 1; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dec/quant.c b/src/dec/quant.c index fea6c530..5b648f94 100644 --- a/src/dec/quant.c +++ b/src/dec/quant.c @@ -13,10 +13,6 @@ #include "./vp8i.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - static WEBP_INLINE int clip(int v, int M) { return v < 0 ? 0 : v > M ? M : v; } @@ -112,6 +108,3 @@ void VP8ParseQuant(VP8Decoder* const dec) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dec/tree.c b/src/dec/tree.c index abbd89dd..bf9b7c55 100644 --- a/src/dec/tree.c +++ b/src/dec/tree.c @@ -15,10 +15,6 @@ #define USE_GENERIC_TREE -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #ifdef USE_GENERIC_TREE static const int8_t kYModesIntra4[18] = { -B_DC_PRED, 1, @@ -496,6 +492,3 @@ void VP8ParseProba(VP8BitReader* const br, VP8Decoder* const dec) { } } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dec/vp8.c b/src/dec/vp8.c index d2f4cfb4..bfd0e8f9 100644 --- a/src/dec/vp8.c +++ b/src/dec/vp8.c @@ -19,10 +19,6 @@ #include "./webpi.h" #include "../utils/bit_reader.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ int WebPGetDecoderVersion(void) { @@ -715,6 +711,3 @@ void VP8Clear(VP8Decoder* const dec) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dec/vp8l.c b/src/dec/vp8l.c index e72db882..ea0254d7 100644 --- a/src/dec/vp8l.c +++ b/src/dec/vp8l.c @@ -22,10 +22,6 @@ #include "../utils/huffman.h" #include "../utils/utils.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #define NUM_ARGB_CACHE_ROWS 16 static const int kCodeLengthLiterals = 16; @@ -1382,6 +1378,3 @@ int VP8LDecodeImage(VP8LDecoder* const dec) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dec/webp.c b/src/dec/webp.c index 08f8bb77..302220fe 100644 --- a/src/dec/webp.c +++ b/src/dec/webp.c @@ -18,10 +18,6 @@ #include "./webpi.h" #include "../webp/mux_types.h" // ALPHA_FLAG -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // RIFF layout is: // Offset tag @@ -812,6 +808,3 @@ int WebPIoInitFromOptions(const WebPDecoderOptions* const options, //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/demux/demux.c b/src/demux/demux.c index b6639700..e9a81eaa 100644 --- a/src/demux/demux.c +++ b/src/demux/demux.c @@ -23,10 +23,6 @@ #include "../webp/demux.h" #include "../webp/format_constants.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #define DMUX_MAJ_VERSION 0 #define DMUX_MIN_VERSION 1 #define DMUX_REV_VERSION 1 @@ -1004,6 +1000,3 @@ void WebPDemuxReleaseChunkIterator(WebPChunkIterator* iter) { (void)iter; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/cpu.c b/src/dsp/cpu.c index 179901e1..7a1f417a 100644 --- a/src/dsp/cpu.c +++ b/src/dsp/cpu.c @@ -17,10 +17,6 @@ #include #endif -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // SSE2 detection. // @@ -82,6 +78,3 @@ VP8CPUInfo VP8GetCPUInfo = armCPUInfo; VP8CPUInfo VP8GetCPUInfo = NULL; #endif -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/dec.c b/src/dsp/dec.c index be4c8b53..8b246fad 100644 --- a/src/dsp/dec.c +++ b/src/dsp/dec.c @@ -14,10 +14,6 @@ #include "./dsp.h" #include "../dec/vp8i.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // run-time tables (~4k) @@ -758,6 +754,3 @@ void VP8DspInit(void) { } } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/dec_neon.c b/src/dsp/dec_neon.c index f9e27d55..3ea032e0 100644 --- a/src/dsp/dec_neon.c +++ b/src/dsp/dec_neon.c @@ -14,10 +14,6 @@ #include "./dsp.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #if defined(WEBP_USE_NEON) #include "../dec/vp8i.h" @@ -402,6 +398,3 @@ void VP8DspInitNEON(void) { #endif // WEBP_USE_NEON } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/dec_sse2.c b/src/dsp/dec_sse2.c index 45c10de1..150c559f 100644 --- a/src/dsp/dec_sse2.c +++ b/src/dsp/dec_sse2.c @@ -14,10 +14,6 @@ #include "./dsp.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #if defined(WEBP_USE_SSE2) // The 3-coeff sparse transform in SSE2 is not really faster than the plain-C @@ -958,6 +954,3 @@ void VP8DspInitSSE2(void) { #endif // WEBP_USE_SSE2 } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/enc.c b/src/dsp/enc.c index aa71068a..fcc6ec8e 100644 --- a/src/dsp/enc.c +++ b/src/dsp/enc.c @@ -17,10 +17,6 @@ #include "./dsp.h" #include "../enc/vp8enci.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - static WEBP_INLINE uint8_t clip_8b(int v) { return (!(v & ~0xff)) ? v : (v < 0) ? 0 : 255; } @@ -755,6 +751,3 @@ void VP8EncDspInit(void) { } } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/enc_neon.c b/src/dsp/enc_neon.c index 0a78837a..52cca186 100644 --- a/src/dsp/enc_neon.c +++ b/src/dsp/enc_neon.c @@ -13,10 +13,6 @@ #include "./dsp.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #if defined(WEBP_USE_NEON) #include "../enc/vp8enci.h" @@ -634,6 +630,3 @@ void VP8EncDspInitNEON(void) { #endif // WEBP_USE_NEON } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/enc_sse2.c b/src/dsp/enc_sse2.c index e47b1089..540a3cb2 100644 --- a/src/dsp/enc_sse2.c +++ b/src/dsp/enc_sse2.c @@ -13,10 +13,6 @@ #include "./dsp.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #if defined(WEBP_USE_SSE2) #include // for abs() #include @@ -959,6 +955,3 @@ void VP8EncDspInitSSE2(void) { #endif // WEBP_USE_SSE2 } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/lossless.c b/src/dsp/lossless.c index d304ae41..bab76d22 100644 --- a/src/dsp/lossless.c +++ b/src/dsp/lossless.c @@ -15,10 +15,6 @@ #include "./dsp.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #if defined(WEBP_USE_SSE2) #include #endif @@ -1534,6 +1530,3 @@ void VP8LDspInit(void) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/upsampling.c b/src/dsp/upsampling.c index 42625412..978e3ce2 100644 --- a/src/dsp/upsampling.c +++ b/src/dsp/upsampling.c @@ -14,10 +14,6 @@ #include "./dsp.h" #include "./yuv.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #include //------------------------------------------------------------------------------ @@ -368,6 +364,3 @@ void WebPInitPremultiply(void) { #endif // FANCY_UPSAMPLING } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/upsampling_neon.c b/src/dsp/upsampling_neon.c index 5a68dd25..791222f8 100644 --- a/src/dsp/upsampling_neon.c +++ b/src/dsp/upsampling_neon.c @@ -14,10 +14,6 @@ #include "./dsp.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #if defined(WEBP_USE_NEON) #include @@ -267,6 +263,3 @@ void WebPInitPremultiplyNEON(void) {} #endif // FANCY_UPSAMPLING -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/upsampling_sse2.c b/src/dsp/upsampling_sse2.c index a1072fb7..0db0798c 100644 --- a/src/dsp/upsampling_sse2.c +++ b/src/dsp/upsampling_sse2.c @@ -13,10 +13,6 @@ #include "./dsp.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #if defined(WEBP_USE_SSE2) #include @@ -220,6 +216,3 @@ void WebPInitPremultiplySSE2(void) {} #endif // FANCY_UPSAMPLING -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/dsp/yuv.c b/src/dsp/yuv.c index 3e99892f..4f9cafc1 100644 --- a/src/dsp/yuv.c +++ b/src/dsp/yuv.c @@ -13,10 +13,6 @@ #include "./yuv.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #if defined(WEBP_YUV_USE_TABLE) @@ -209,6 +205,3 @@ void VP8YUVInitSSE2(void) {} #endif // WEBP_USE_SSE2 -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/alpha.c b/src/enc/alpha.c index dd2ea5f0..21d4b5cb 100644 --- a/src/enc/alpha.c +++ b/src/enc/alpha.c @@ -19,10 +19,6 @@ #include "../utils/quant_levels.h" #include "../webp/format_constants.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - // ----------------------------------------------------------------------------- // Encodes the given alpha data via specified compression method 'method'. // The pre-processing (quantization) is performed if 'quality' is less than 100. @@ -412,6 +408,3 @@ int VP8EncDeleteAlpha(VP8Encoder* const enc) { return ok; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/analysis.c b/src/enc/analysis.c index 01d619f2..7d4cfdc1 100644 --- a/src/enc/analysis.c +++ b/src/enc/analysis.c @@ -19,10 +19,6 @@ #include "./cost.h" #include "../utils/utils.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #define MAX_ITERS_K_MEANS 6 //------------------------------------------------------------------------------ @@ -499,6 +495,3 @@ int VP8EncAnalyze(VP8Encoder* const enc) { return ok; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/config.c b/src/enc/config.c index 97620a21..af7f0b09 100644 --- a/src/enc/config.c +++ b/src/enc/config.c @@ -13,10 +13,6 @@ #include "../webp/encode.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // WebPConfig //------------------------------------------------------------------------------ @@ -142,6 +138,3 @@ int WebPValidateConfig(const WebPConfig* config) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/cost.c b/src/enc/cost.c index d6269b17..09699f80 100644 --- a/src/enc/cost.c +++ b/src/enc/cost.c @@ -13,10 +13,6 @@ #include "./cost.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // Boolean-cost cost table @@ -491,6 +487,3 @@ const uint16_t VP8FixedCostsI4[NUM_BMODES][NUM_BMODES][NUM_BMODES] = { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/filter.c b/src/enc/filter.c index 41467407..dd27804b 100644 --- a/src/enc/filter.c +++ b/src/enc/filter.c @@ -14,10 +14,6 @@ #include #include "./vp8enci.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - // This table gives, for a given sharpness, the filtering strength to be // used (at least) in order to filter a given edge step delta. // This is constructed by brute force inspection: for all delta, we iterate @@ -473,6 +469,3 @@ void VP8AdjustFilterStrength(VP8EncIterator* const it) { // ----------------------------------------------------------------------------- -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/frame.c b/src/enc/frame.c index 1b296d03..2582244c 100644 --- a/src/enc/frame.c +++ b/src/enc/frame.c @@ -20,10 +20,6 @@ #include "./cost.h" #include "../webp/format_constants.h" // RIFF constants -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #define SEGMENT_VISU 0 #define DEBUG_SEARCH 0 // useful to track search convergence @@ -1070,6 +1066,3 @@ int VP8EncTokenLoop(VP8Encoder* const enc) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/iterator.c b/src/enc/iterator.c index 0fb6ca5f..e42ad001 100644 --- a/src/enc/iterator.c +++ b/src/enc/iterator.c @@ -15,10 +15,6 @@ #include "./vp8enci.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // VP8Iterator //------------------------------------------------------------------------------ @@ -458,6 +454,3 @@ int VP8IteratorRotateI4(VP8EncIterator* const it, //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/layer.c b/src/enc/layer.c index fa896609..24023623 100644 --- a/src/enc/layer.c +++ b/src/enc/layer.c @@ -15,10 +15,6 @@ #include "./vp8enci.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ void VP8EncInitLayer(VP8Encoder* const enc) { @@ -46,6 +42,3 @@ void VP8EncDeleteLayer(VP8Encoder* enc) { free(enc->layer_data_); } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/picture.c b/src/enc/picture.c index c01c59b1..011690d0 100644 --- a/src/enc/picture.c +++ b/src/enc/picture.c @@ -23,10 +23,6 @@ #include "../dsp/dsp.h" #include "../dsp/yuv.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - // Uncomment to disable gamma-compression during RGB->U/V averaging #define USE_GAMMA_COMPRESSION @@ -1326,6 +1322,3 @@ LOSSLESS_ENCODE_FUNC(WebPEncodeLosslessBGRA, WebPPictureImportBGRA) //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/quant.c b/src/enc/quant.c index 75e097dd..869e0331 100644 --- a/src/enc/quant.c +++ b/src/enc/quant.c @@ -43,10 +43,6 @@ // #define DEBUG_BLOCK -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ #if defined(DEBUG_BLOCK) @@ -1159,6 +1155,3 @@ int VP8Decimate(VP8EncIterator* const it, VP8ModeScore* const rd, return is_skipped; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/syntax.c b/src/enc/syntax.c index b0f7676b..08cfe79e 100644 --- a/src/enc/syntax.c +++ b/src/enc/syntax.c @@ -18,10 +18,6 @@ #include "../webp/mux_types.h" // ALPHA_FLAG #include "./vp8enci.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // Helper functions @@ -425,6 +421,3 @@ int VP8EncWrite(VP8Encoder* const enc) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/token.c b/src/enc/token.c index 4c4333a4..e696642f 100644 --- a/src/enc/token.c +++ b/src/enc/token.c @@ -23,10 +23,6 @@ #include "./cost.h" #include "./vp8enci.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #if !defined(DISABLE_TOKEN_BUFFER) // we use pages to reduce the number of memcpy() @@ -275,6 +271,3 @@ void VP8TBufferClear(VP8TBuffer* const b) { #endif // !DISABLE_TOKEN_BUFFER -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/tree.c b/src/enc/tree.c index 27f0babe..e5d05e52 100644 --- a/src/enc/tree.c +++ b/src/enc/tree.c @@ -13,10 +13,6 @@ #include "./vp8enci.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // Default probabilities @@ -506,6 +502,3 @@ void VP8WriteProbas(VP8BitWriter* const bw, const VP8Proba* const probas) { } } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/vp8l.c b/src/enc/vp8l.c index 2ce29a2a..15726318 100644 --- a/src/enc/vp8l.c +++ b/src/enc/vp8l.c @@ -25,10 +25,6 @@ #include "../utils/utils.h" #include "../webp/format_constants.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #define PALETTE_KEY_RIGHT_SHIFT 22 // Key for 1K buffer. #define MAX_HUFF_IMAGE_SIZE (16 * 1024 * 1024) #define MAX_COLORS_FOR_GRAPH 64 @@ -1170,6 +1166,3 @@ int VP8LEncodeImage(const WebPConfig* const config, //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/enc/webpenc.c b/src/enc/webpenc.c index 83117d7b..207cce6b 100644 --- a/src/enc/webpenc.c +++ b/src/enc/webpenc.c @@ -22,10 +22,6 @@ // #define PRINT_MEMORY_INFO -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #ifdef PRINT_MEMORY_INFO #include #endif @@ -406,6 +402,3 @@ int WebPEncode(const WebPConfig* config, WebPPicture* pic) { return ok; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/mux/muxedit.c b/src/mux/muxedit.c index 4834c9f3..25770b35 100644 --- a/src/mux/muxedit.c +++ b/src/mux/muxedit.c @@ -16,10 +16,6 @@ #include "./muxi.h" #include "../utils/utils.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // Life of a mux object. @@ -654,6 +650,3 @@ WebPMuxError WebPMuxAssemble(WebPMux* mux, WebPData* assembled_data) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/mux/muxinternal.c b/src/mux/muxinternal.c index af44bdb9..3f992ce1 100644 --- a/src/mux/muxinternal.c +++ b/src/mux/muxinternal.c @@ -16,10 +16,6 @@ #include "./muxi.h" #include "../utils/utils.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #define UNDEFINED_CHUNK_SIZE (-1) const ChunkInfo kChunks[] = { @@ -553,6 +549,3 @@ WebPMuxError MuxValidate(const WebPMux* const mux) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/mux/muxread.c b/src/mux/muxread.c index 3b414667..6003a25b 100644 --- a/src/mux/muxread.c +++ b/src/mux/muxread.c @@ -16,10 +16,6 @@ #include "./muxi.h" #include "../utils/utils.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // Helper method(s). @@ -542,6 +538,3 @@ WebPMuxError WebPMuxNumChunks(const WebPMux* mux, //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/utils/alpha_processing.c b/src/utils/alpha_processing.c index 1ca899a3..7362ff94 100644 --- a/src/utils/alpha_processing.c +++ b/src/utils/alpha_processing.c @@ -14,10 +14,6 @@ #include #include "./alpha_processing.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - // Tables can be faster on some platform but incur some extra binary size (~2k). // #define USE_TABLES_FOR_ALPHA_MULT @@ -198,6 +194,3 @@ void WebPMultRows(uint8_t* ptr, int stride, #undef HALF #undef MFIX -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/utils/bit_reader.c b/src/utils/bit_reader.c index 677fa01b..bfa4d7d2 100644 --- a/src/utils/bit_reader.c +++ b/src/utils/bit_reader.c @@ -13,10 +13,6 @@ #include "./bit_reader.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #ifndef USE_RIGHT_JUSTIFY #define MK(X) (((range_t)(X) << (BITS)) | (MASK)) #else @@ -209,6 +205,3 @@ uint32_t VP8LReadBits(VP8LBitReader* const br, int n_bits) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/utils/bit_writer.c b/src/utils/bit_writer.c index c57cb45a..29810a17 100644 --- a/src/utils/bit_writer.c +++ b/src/utils/bit_writer.c @@ -17,10 +17,6 @@ #include #include "./bit_writer.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // VP8BitWriter @@ -284,6 +280,3 @@ void VP8LWriteBits(VP8LBitWriter* const bw, int n_bits, uint32_t bits) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/utils/color_cache.c b/src/utils/color_cache.c index 749db612..66a44647 100644 --- a/src/utils/color_cache.c +++ b/src/utils/color_cache.c @@ -16,10 +16,6 @@ #include "./color_cache.h" #include "../utils/utils.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // VP8LColorCache. @@ -41,6 +37,3 @@ void VP8LColorCacheClear(VP8LColorCache* const cc) { } } -#if defined(__cplusplus) || defined(c_plusplus) -} -#endif diff --git a/src/utils/filters.c b/src/utils/filters.c index be7da8c0..2d15bd0e 100644 --- a/src/utils/filters.c +++ b/src/utils/filters.c @@ -16,10 +16,6 @@ #include #include -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // Helpful macro. @@ -268,6 +264,3 @@ const WebPUnfilterFunc WebPUnfilters[WEBP_FILTER_LAST] = { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/utils/huffman.c b/src/utils/huffman.c index e1ca5f08..8c5739f6 100644 --- a/src/utils/huffman.c +++ b/src/utils/huffman.c @@ -18,10 +18,6 @@ #include "../utils/utils.h" #include "../webp/format_constants.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - // Uncomment the following to use look-up table for ReverseBits() // (might be faster on some platform) // #define USE_LUT_REVERSE_BITS @@ -290,6 +286,3 @@ int HuffmanTreeBuildExplicit(HuffmanTree* const tree, return ok; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/utils/quant_levels.c b/src/utils/quant_levels.c index 42c7245d..d7c8aab9 100644 --- a/src/utils/quant_levels.c +++ b/src/utils/quant_levels.c @@ -16,10 +16,6 @@ #include "./quant_levels.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #define NUM_SYMBOLS 256 #define MAX_ITER 6 // Maximum number of convergence steps. @@ -142,6 +138,3 @@ int QuantizeLevels(uint8_t* const data, int width, int height, return 1; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/utils/quant_levels_dec.c b/src/utils/quant_levels_dec.c index 2574e08e..8489705a 100644 --- a/src/utils/quant_levels_dec.c +++ b/src/utils/quant_levels_dec.c @@ -13,10 +13,6 @@ #include "./quant_levels_dec.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - int DequantizeLevels(uint8_t* const data, int width, int height, int row, int num_rows) { if (data == NULL || width <= 0 || height <= 0 || row < 0 || num_rows < 0 || @@ -26,6 +22,3 @@ int DequantizeLevels(uint8_t* const data, int width, int height, return 1; } -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/utils/random.c b/src/utils/random.c index 76a8fc3c..24e96ad6 100644 --- a/src/utils/random.c +++ b/src/utils/random.c @@ -14,10 +14,6 @@ #include #include "./random.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // 31b-range values @@ -45,6 +41,3 @@ void VP8InitRandom(VP8Random* const rg, float dithering) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/utils/rescaler.c b/src/utils/rescaler.c index cdaef710..70612460 100644 --- a/src/utils/rescaler.c +++ b/src/utils/rescaler.c @@ -17,10 +17,6 @@ //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #define RFIX 30 #define MULT_FIX(x, y) (((int64_t)(x) * (y) + (1 << (RFIX - 1))) >> RFIX) @@ -154,6 +150,3 @@ int WebPRescalerExport(WebPRescaler* const rescaler) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/utils/thread.c b/src/utils/thread.c index c0d318ae..a9e3fae8 100644 --- a/src/utils/thread.c +++ b/src/utils/thread.c @@ -15,10 +15,6 @@ #include // for memset() #include "./thread.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - #ifdef WEBP_USE_THREAD #if defined(_WIN32) @@ -243,6 +239,3 @@ void WebPWorkerEnd(WebPWorker* const worker) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif diff --git a/src/utils/utils.c b/src/utils/utils.c index 7eb06105..55925389 100644 --- a/src/utils/utils.c +++ b/src/utils/utils.c @@ -14,10 +14,6 @@ #include #include "./utils.h" -#if defined(__cplusplus) || defined(c_plusplus) -extern "C" { -#endif - //------------------------------------------------------------------------------ // Checked memory allocation @@ -44,6 +40,3 @@ void* WebPSafeCalloc(uint64_t nmemb, size_t size) { //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) -} // extern "C" -#endif