vp9/decoder: add extern "C" to headers Change-Id: I0e6aa00f220280e22d30d098545265835d0c1079
diff --git a/vp9/decoder/vp9_decodeframe.h b/vp9/decoder/vp9_decodeframe.h index 7245a98..4537bc8 100644 --- a/vp9/decoder/vp9_decodeframe.h +++ b/vp9/decoder/vp9_decodeframe.h
@@ -12,10 +12,18 @@ #ifndef VP9_DECODER_VP9_DECODEFRAME_H_ #define VP9_DECODER_VP9_DECODEFRAME_H_ +#ifdef __cplusplus +extern "C" { +#endif + struct VP9Common; struct VP9Decompressor; void vp9_init_dequantizer(struct VP9Common *cm); int vp9_decode_frame(struct VP9Decompressor *cpi, const uint8_t **p_data_end); +#ifdef __cplusplus +} // extern "C" +#endif + #endif // VP9_DECODER_VP9_DECODEFRAME_H_
diff --git a/vp9/decoder/vp9_decodemv.h b/vp9/decoder/vp9_decodemv.h index 95272bf..539c984 100644 --- a/vp9/decoder/vp9_decodemv.h +++ b/vp9/decoder/vp9_decodemv.h
@@ -14,10 +14,18 @@ #include "vp9/decoder/vp9_onyxd_int.h" #include "vp9/decoder/vp9_reader.h" +#ifdef __cplusplus +extern "C" { +#endif + struct TileInfo; void vp9_read_mode_info(VP9_COMMON *cm, MACROBLOCKD *xd, const struct TileInfo *const tile, int mi_row, int mi_col, vp9_reader *r); +#ifdef __cplusplus +} // extern "C" +#endif + #endif // VP9_DECODER_VP9_DECODEMV_H_
diff --git a/vp9/decoder/vp9_detokenize.h b/vp9/decoder/vp9_detokenize.h index 1780a0f..ce3d765 100644 --- a/vp9/decoder/vp9_detokenize.h +++ b/vp9/decoder/vp9_detokenize.h
@@ -15,8 +15,16 @@ #include "vp9/decoder/vp9_onyxd_int.h" #include "vp9/decoder/vp9_reader.h" +#ifdef __cplusplus +extern "C" { +#endif + int vp9_decode_block_tokens(VP9_COMMON *cm, MACROBLOCKD *xd, int plane, int block, BLOCK_SIZE plane_bsize, int x, int y, TX_SIZE tx_size, vp9_reader *r); +#ifdef __cplusplus +} // extern "C" +#endif + #endif // VP9_DECODER_VP9_DETOKENIZE_H_
diff --git a/vp9/decoder/vp9_dsubexp.h b/vp9/decoder/vp9_dsubexp.h index 137f546..436f434 100644 --- a/vp9/decoder/vp9_dsubexp.h +++ b/vp9/decoder/vp9_dsubexp.h
@@ -14,6 +14,14 @@ #include "vp9/decoder/vp9_reader.h" +#ifdef __cplusplus +extern "C" { +#endif + void vp9_diff_update_prob(vp9_reader *r, vp9_prob* p); +#ifdef __cplusplus +} // extern "C" +#endif + #endif // VP9_DECODER_VP9_DSUBEXP_H_
diff --git a/vp9/decoder/vp9_onyxd.h b/vp9/decoder/vp9_onyxd.h index a4b9c24..0fc9d57 100644 --- a/vp9/decoder/vp9_onyxd.h +++ b/vp9/decoder/vp9_onyxd.h
@@ -11,14 +11,14 @@ #ifndef VP9_DECODER_VP9_ONYXD_H_ #define VP9_DECODER_VP9_ONYXD_H_ -#ifdef __cplusplus -extern "C" { -#endif - #include "vpx_scale/yv12config.h" #include "vp9/common/vp9_ppflags.h" #include "vpx/vpx_codec.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef void *VP9D_PTR; typedef struct { @@ -63,7 +63,7 @@ void vp9_remove_decompressor(VP9D_PTR comp); #ifdef __cplusplus -} +} // extern "C" #endif #endif // VP9_DECODER_VP9_ONYXD_H_
diff --git a/vp9/decoder/vp9_onyxd_int.h b/vp9/decoder/vp9_onyxd_int.h index e90f892..242c600 100644 --- a/vp9/decoder/vp9_onyxd_int.h +++ b/vp9/decoder/vp9_onyxd_int.h
@@ -17,6 +17,10 @@ #include "vp9/decoder/vp9_onyxd.h" #include "vp9/decoder/vp9_thread.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef struct VP9Decompressor { DECLARE_ALIGNED(16, MACROBLOCKD, mb); @@ -53,4 +57,8 @@ PARTITION_CONTEXT *above_seg_context; } VP9D_COMP; +#ifdef __cplusplus +} // extern "C" +#endif + #endif // VP9_DECODER_VP9_ONYXD_INT_H_
diff --git a/vp9/decoder/vp9_read_bit_buffer.h b/vp9/decoder/vp9_read_bit_buffer.h index 41a6868..619e39f 100644 --- a/vp9/decoder/vp9_read_bit_buffer.h +++ b/vp9/decoder/vp9_read_bit_buffer.h
@@ -15,6 +15,10 @@ #include "vpx/vpx_integer.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef void (*vp9_rb_error_handler)(void *data, size_t bit_offset); struct vp9_read_bit_buffer { @@ -57,4 +61,8 @@ return vp9_rb_read_bit(rb) ? -value : value; } +#ifdef __cplusplus +} // extern "C" +#endif + #endif // VP9_DECODER_VP9_READ_BIT_BUFFER_H_
diff --git a/vp9/decoder/vp9_reader.h b/vp9/decoder/vp9_reader.h index 38cf0f6..8fe6acb 100644 --- a/vp9/decoder/vp9_reader.h +++ b/vp9/decoder/vp9_reader.h
@@ -20,6 +20,10 @@ #include "vp9/common/vp9_prob.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef size_t BD_VALUE; #define BD_VALUE_SIZE ((int)sizeof(BD_VALUE) * CHAR_BIT) @@ -100,4 +104,8 @@ return -i; } +#ifdef __cplusplus +} // extern "C" +#endif + #endif // VP9_DECODER_VP9_READER_H_
diff --git a/vp9/decoder/vp9_thread.h b/vp9/decoder/vp9_thread.h index a624f3c..bc69cfa 100644 --- a/vp9/decoder/vp9_thread.h +++ b/vp9/decoder/vp9_thread.h
@@ -19,7 +19,7 @@ #include "./vpx_config.h" -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus extern "C" { #endif @@ -91,7 +91,7 @@ //------------------------------------------------------------------------------ -#if defined(__cplusplus) || defined(c_plusplus) +#ifdef __cplusplus } // extern "C" #endif