Commit 0940c9cf authored by James Zern's avatar James Zern
Browse files

vp9/common: add extern "C" to headers

Change-Id: Ic334da9aee968e33762c2b25d9fbad24c844b411
parent 513fae3e
......@@ -15,6 +15,10 @@
#include "vpx_ports/mem.h"
#include "vp9/common/vp9_ppflags.h"
#ifdef __cplusplus
extern "C" {
#endif
struct postproc_state {
int last_q;
int last_noise;
......@@ -33,4 +37,8 @@ void vp9_denoise(const YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst, int q);
void vp9_deblock(const YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst, int q);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_POSTPROC_H_
......@@ -11,6 +11,10 @@
#ifndef VP9_COMMON_VP9_PPFLAGS_H_
#define VP9_COMMON_VP9_PPFLAGS_H_
#ifdef __cplusplus
extern "C" {
#endif
enum {
VP9D_NOFILTERING = 0,
VP9D_DEBLOCK = 1 << 0,
......@@ -35,4 +39,8 @@ typedef struct {
int display_mv_flag;
} vp9_ppflags_t;
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_PPFLAGS_H_
......@@ -11,6 +11,10 @@
#ifndef VP9_COMMON_VP9_PRAGMAS_H_
#define VP9_COMMON_VP9_PRAGMAS_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __INTEL_COMPILER
#pragma warning(disable:997 1011 170)
#endif
......@@ -19,4 +23,8 @@
#pragma warning(disable:4799)
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_PRAGMAS_H_
......@@ -14,6 +14,10 @@
#include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_onyxc_int.h"
#ifdef __cplusplus
extern "C" {
#endif
static INLINE const MODE_INFO *get_above_mi(const MACROBLOCKD *const xd) {
return xd->up_available ? xd->mi_8x8[-xd->mode_info_stride] : NULL;
}
......@@ -129,4 +133,8 @@ static unsigned int *get_tx_counts(TX_SIZE max_tx_size, int ctx,
}
}
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_PRED_COMMON_H_
......@@ -18,6 +18,10 @@
#include "vp9/common/vp9_common.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef uint8_t vp9_prob;
#define MAX_PROB 255
......@@ -109,4 +113,8 @@ static void tree_merge_probs(const vp9_tree_index *tree,
DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_PROB_H_
......@@ -13,6 +13,10 @@
#include "vp9/common/vp9_blockd.h"
#ifdef __cplusplus
extern "C" {
#endif
#define MINQ 0
#define MAXQ 255
#define QINDEX_RANGE (MAXQ - MINQ + 1)
......@@ -25,4 +29,8 @@ int16_t vp9_ac_quant(int qindex, int delta);
int vp9_get_qindex(struct segmentation *seg, int segment_id, int base_qindex);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_QUANT_COMMON_H_
......@@ -14,6 +14,10 @@
#include "vpx/vpx_integer.h"
#include "vp9/common/vp9_onyxc_int.h"
#ifdef __cplusplus
extern "C" {
#endif
struct subpix_fn_table;
void vp9_build_inter_predictors_sby(MACROBLOCKD *xd, int mi_row, int mi_col,
BLOCK_SIZE bsize);
......@@ -96,4 +100,8 @@ static void set_scale_factors(VP9_COMMON *cm, MACROBLOCKD *xd,
xd->block_refs[1] = &cm->frame_refs[ref1 >= 0 ? ref1 : 0];
}
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_RECONINTER_H_
......@@ -14,9 +14,17 @@
#include "vpx/vpx_integer.h"
#include "vp9/common/vp9_blockd.h"
#ifdef __cplusplus
extern "C" {
#endif
void vp9_predict_intra_block(const MACROBLOCKD *xd, int block_idx, int bwl_in,
TX_SIZE tx_size, int mode,
const uint8_t *ref, int ref_stride,
uint8_t *dst, int dst_stride,
int aoff, int loff, int plane);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_RECONINTRA_H_
......@@ -14,6 +14,10 @@
#include "vp9/common/vp9_mv.h"
#include "vp9/common/vp9_convolve.h"
#ifdef __cplusplus
extern "C" {
#endif
#define REF_SCALE_SHIFT 14
#define REF_NO_SCALE (1 << REF_SCALE_SHIFT)
#define REF_INVALID_SCALE -1
......@@ -46,4 +50,8 @@ static int vp9_is_scaled(const struct scale_factors *sf) {
sf->y_scale_fp != REF_NO_SCALE;
}
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_SCALE_H_
......@@ -17,6 +17,10 @@
#include "vp9/common/vp9_enums.h"
#include "vp9/common/vp9_blockd.h"
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_NEIGHBORS 2
void vp9_init_neighbors();
......@@ -36,4 +40,8 @@ static INLINE int get_coef_context(const int16_t *neighbors,
token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >> 1;
}
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_SCAN_H_
......@@ -13,6 +13,10 @@
#include "vp9/common/vp9_prob.h"
#ifdef __cplusplus
extern "C" {
#endif
#define SEGMENT_DELTADATA 0
#define SEGMENT_ABSDATA 1
......@@ -70,5 +74,9 @@ int vp9_get_segdata(const struct segmentation *seg,
extern const vp9_tree_index vp9_segment_tree[TREE_SIZE(MAX_SEGMENTS)];
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_SEG_COMMON_H_
......@@ -11,6 +11,10 @@
#ifndef VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
#define VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _MSC_VER
#include <math.h>
#define snprintf _snprintf
......@@ -72,4 +76,8 @@ static INLINE int get_msb(unsigned int n) {
struct VP9Common;
void vp9_machine_specific_config(struct VP9Common *cm);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_SYSTEMDEPENDENT_H_
......@@ -11,9 +11,17 @@
#ifndef VP9_COMMON_VP9_TEXTBLIT_H_
#define VP9_COMMON_VP9_TEXTBLIT_H_
#ifdef __cplusplus
extern "C" {
#endif
void vp9_blit_text(const char *msg, unsigned char *address, int pitch);
void vp9_blit_line(int x0, int x1, int y0, int y1, unsigned char *image,
int pitch);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_TEXTBLIT_H_
......@@ -11,6 +11,10 @@
#ifndef VP9_COMMON_VP9_TILE_COMMON_H_
#define VP9_COMMON_VP9_TILE_COMMON_H_
#ifdef __cplusplus
extern "C" {
#endif
struct VP9Common;
typedef struct TileInfo {
......@@ -26,4 +30,8 @@ void vp9_tile_init(TileInfo *tile, const struct VP9Common *cm,
void vp9_get_tile_n_bits(int mi_cols,
int *min_log2_tile_cols, int *max_log2_tile_cols);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_VP9_TILE_COMMON_H_
......@@ -12,6 +12,10 @@
#ifndef VP9_COMMON_X86_VP9_POSTPROC_X86_H_
#define VP9_COMMON_X86_VP9_POSTPROC_X86_H_
#ifdef __cplusplus
extern "C" {
#endif
/* Note:
*
* This platform is commonly built for runtime CPU detection. If you modify
......@@ -61,4 +65,8 @@ extern prototype_postproc_addnoise(vp9_plane_add_noise_wmt);
#endif
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif // VP9_COMMON_X86_VP9_POSTPROC_X86_H_
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment