summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2011-07-13 15:59:08 -0700
committerVinson Lee <[email protected]>2011-07-13 15:59:08 -0700
commit49967950a56de276ffcbaea80acbc9f5bd3207bc (patch)
tree47e96a229da78ae4032330e12a2c8e3afafc892b /src
parent88d647d83b77a9e45f66bff67513f908e6a23c01 (diff)
g3dvl: s/inline/INLINE/
The inline keyword is not available in MSVC C.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/vl/vl_compositor.c9
-rw-r--r--src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c57
-rw-r--r--src/gallium/auxiliary/vl/vl_vlc.h10
3 files changed, 40 insertions, 36 deletions
diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c
index 78b8d0627ce..0bd1baef41e 100644
--- a/src/gallium/auxiliary/vl/vl_compositor.c
+++ b/src/gallium/auxiliary/vl/vl_compositor.c
@@ -27,6 +27,7 @@
#include <assert.h>
+#include <pipe/p_compiler.h>
#include <pipe/p_context.h>
#include <util/u_memory.h>
@@ -369,7 +370,7 @@ cleanup_buffers(struct vl_compositor *c)
pipe_resource_reference(&c->csc_matrix, NULL);
}
-static inline struct pipe_video_rect
+static INLINE struct pipe_video_rect
default_rect(struct vl_compositor_layer *layer)
{
struct pipe_resource *res = layer->sampler_views[0]->texture;
@@ -377,21 +378,21 @@ default_rect(struct vl_compositor_layer *layer)
return rect;
}
-static inline struct vertex2f
+static INLINE struct vertex2f
calc_topleft(struct vertex2f size, struct pipe_video_rect rect)
{
struct vertex2f res = { rect.x / size.x, rect.y / size.y };
return res;
}
-static inline struct vertex2f
+static INLINE struct vertex2f
calc_bottomright(struct vertex2f size, struct pipe_video_rect rect)
{
struct vertex2f res = { (rect.x + rect.w) / size.x, (rect.y + rect.h) / size.y };
return res;
}
-static inline void
+static INLINE void
calc_src_and_dst(struct vl_compositor_layer *layer, unsigned width, unsigned height,
struct pipe_video_rect src, struct pipe_video_rect dst)
{
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
index 7a14efb627e..9dd032e911d 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_bitstream.c
@@ -52,6 +52,7 @@
#include <stdint.h>
+#include <pipe/p_compiler.h>
#include <pipe/p_video_state.h>
#include "vl_vlc.h"
@@ -457,7 +458,7 @@ static const int non_linear_quantizer_scale[] = {
56, 64, 72, 80, 88, 96, 104, 112
};
-static inline int
+static INLINE int
get_macroblock_modes(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * picture)
{
int macroblock_modes;
@@ -525,7 +526,7 @@ get_macroblock_modes(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * p
}
}
-static inline enum pipe_mpeg12_dct_type
+static INLINE enum pipe_mpeg12_dct_type
get_dct_type(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * picture, int macroblock_modes)
{
enum pipe_mpeg12_dct_type dct_type = PIPE_MPEG12_DCT_TYPE_FRAME;
@@ -540,7 +541,7 @@ get_dct_type(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * picture,
return dct_type;
}
-static inline int
+static INLINE int
get_quantizer_scale(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * picture)
{
int quantizer_scale_code;
@@ -554,7 +555,7 @@ get_quantizer_scale(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * pi
return quantizer_scale_code << 1;
}
-static inline int
+static INLINE int
get_motion_delta(struct vl_mpg12_bs *bs, unsigned f_code)
{
int delta;
@@ -600,7 +601,7 @@ get_motion_delta(struct vl_mpg12_bs *bs, unsigned f_code)
}
}
-static inline int
+static INLINE int
bound_motion_vector(int vec, unsigned f_code)
{
#if 1
@@ -620,7 +621,7 @@ bound_motion_vector(int vec, unsigned f_code)
#endif
}
-static inline int
+static INLINE int
get_dmv(struct vl_mpg12_bs *bs)
{
const DMVtab * tab;
@@ -630,7 +631,7 @@ get_dmv(struct vl_mpg12_bs *bs)
return tab->dmv;
}
-static inline int
+static INLINE int
get_coded_block_pattern(struct vl_mpg12_bs *bs)
{
const CBPtab * tab;
@@ -651,7 +652,7 @@ get_coded_block_pattern(struct vl_mpg12_bs *bs)
}
}
-static inline int
+static INLINE int
get_luma_dc_dct_diff(struct vl_mpg12_bs *bs)
{
const DCtab * tab;
@@ -682,7 +683,7 @@ get_luma_dc_dct_diff(struct vl_mpg12_bs *bs)
}
}
-static inline int
+static INLINE int
get_chroma_dc_dct_diff(struct vl_mpg12_bs *bs)
{
const DCtab * tab;
@@ -713,7 +714,7 @@ get_chroma_dc_dct_diff(struct vl_mpg12_bs *bs)
}
}
-static inline void
+static INLINE void
get_intra_block_B14(struct vl_mpg12_bs *bs, int quantizer_scale, short *dest)
{
int i, val;
@@ -800,7 +801,7 @@ get_intra_block_B14(struct vl_mpg12_bs *bs, int quantizer_scale, short *dest)
vl_vlc_dumpbits(&bs->vlc, 2); /* dump end of block code */
}
-static inline void
+static INLINE void
get_intra_block_B15(struct vl_mpg12_bs *bs, int quantizer_scale, short *dest)
{
int i, val;
@@ -886,7 +887,7 @@ get_intra_block_B15(struct vl_mpg12_bs *bs, int quantizer_scale, short *dest)
vl_vlc_dumpbits(&bs->vlc, 4); /* dump end of block code */
}
-static inline void
+static INLINE void
get_non_intra_block(struct vl_mpg12_bs *bs, int quantizer_scale, short *dest)
{
int i, val;
@@ -982,7 +983,7 @@ get_non_intra_block(struct vl_mpg12_bs *bs, int quantizer_scale, short *dest)
vl_vlc_dumpbits(&bs->vlc, 2); /* dump end of block code */
}
-static inline void
+static INLINE void
get_mpeg1_intra_block(struct vl_mpg12_bs *bs, int quantizer_scale, short *dest)
{
int i, val;
@@ -1080,7 +1081,7 @@ get_mpeg1_intra_block(struct vl_mpg12_bs *bs, int quantizer_scale, short *dest)
vl_vlc_dumpbits(&bs->vlc, 2); /* dump end of block code */
}
-static inline void
+static INLINE void
get_mpeg1_non_intra_block(struct vl_mpg12_bs *bs, int quantizer_scale, short *dest)
{
int i, val;
@@ -1188,7 +1189,7 @@ get_mpeg1_non_intra_block(struct vl_mpg12_bs *bs, int quantizer_scale, short *de
vl_vlc_dumpbits(&bs->vlc, 2); /* dump end of block code */
}
-static inline void
+static INLINE void
slice_intra_DCT(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * picture, int cc,
unsigned x, unsigned y, enum pipe_mpeg12_dct_type coding, int quantizer_scale, int dc_dct_pred[3])
{
@@ -1224,7 +1225,7 @@ slice_intra_DCT(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * pictur
bs->ycbcr_buffer[cc] += 64;
}
-static inline void
+static INLINE void
slice_non_intra_DCT(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * picture, int cc,
unsigned x, unsigned y, enum pipe_mpeg12_dct_type coding, int quantizer_scale)
{
@@ -1248,7 +1249,7 @@ slice_non_intra_DCT(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * pi
bs->ycbcr_buffer[cc] += 64;
}
-static inline void
+static INLINE void
motion_mp1(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvector *mv)
{
int motion_x, motion_y;
@@ -1266,7 +1267,7 @@ motion_mp1(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvector
mv->top.y = mv->bottom.y = motion_y;
}
-static inline void
+static INLINE void
motion_fr_frame(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvector *mv)
{
int motion_x, motion_y;
@@ -1284,7 +1285,7 @@ motion_fr_frame(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionve
mv->top.y = mv->bottom.y = motion_y;
}
-static inline void
+static INLINE void
motion_fr_field(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvector *mv)
{
int motion_x, motion_y;
@@ -1318,7 +1319,7 @@ motion_fr_field(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionve
mv->bottom.y = motion_y << 1;
}
-static inline void
+static INLINE void
motion_fr_dmv(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvector *mv)
{
int motion_x, motion_y;
@@ -1338,7 +1339,7 @@ motion_fr_dmv(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvect
}
/* like motion_frame, but parsing without actual motion compensation */
-static inline void
+static INLINE void
motion_fr_conceal(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvector *mv)
{
int tmp;
@@ -1358,7 +1359,7 @@ motion_fr_conceal(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motion
vl_vlc_dumpbits(&bs->vlc, 1); /* remove marker_bit */
}
-static inline void
+static INLINE void
motion_fi_field(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvector *mv)
{
int motion_x, motion_y;
@@ -1382,7 +1383,7 @@ motion_fi_field(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionve
mv->top.y = mv->bottom.y = motion_y;
}
-static inline void
+static INLINE void
motion_fi_16x8(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvector *mv)
{
int motion_x, motion_y;
@@ -1423,7 +1424,7 @@ motion_fi_16x8(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvec
mv->bottom.y = motion_y;
}
-static inline void
+static INLINE void
motion_fi_dmv(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvector *mv)
{
int motion_x, motion_y;
@@ -1443,7 +1444,7 @@ motion_fi_dmv(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvect
}
-static inline void
+static INLINE void
motion_fi_conceal(struct vl_mpg12_bs *bs, unsigned f_code[2], struct pipe_motionvector *mv)
{
int tmp;
@@ -1471,7 +1472,7 @@ do { \
routine(bs, picture->f_code[1], &mv_bwd); \
} while (0)
-static inline void
+static INLINE void
store_motionvectors(struct vl_mpg12_bs *bs, unsigned *mv_pos,
struct pipe_motionvector *mv_fwd,
struct pipe_motionvector *mv_bwd)
@@ -1489,7 +1490,7 @@ store_motionvectors(struct vl_mpg12_bs *bs, unsigned *mv_pos,
(*mv_pos)++;
}
-static inline bool
+static INLINE bool
slice_init(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * picture,
int *quantizer_scale, unsigned *x, unsigned *y, unsigned *mv_pos)
{
@@ -1550,7 +1551,7 @@ slice_init(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc * picture,
return true;
}
-static inline bool
+static INLINE bool
decode_slice(struct vl_mpg12_bs *bs, struct pipe_mpeg12_picture_desc *picture)
{
enum pipe_video_field_select default_field_select;
diff --git a/src/gallium/auxiliary/vl/vl_vlc.h b/src/gallium/auxiliary/vl/vl_vlc.h
index 8c5b3aca47d..e81b1e9afd2 100644
--- a/src/gallium/auxiliary/vl/vl_vlc.h
+++ b/src/gallium/auxiliary/vl/vl_vlc.h
@@ -53,6 +53,8 @@
#ifndef vl_vlc_h
#define vl_vlc_h
+#include "pipe/p_compiler.h"
+
struct vl_vlc
{
uint32_t buf; /* current 32 bit working set of buffer */
@@ -61,7 +63,7 @@ struct vl_vlc
const uint8_t *max; /* ptr+len of buffer */
};
-static inline void
+static INLINE void
vl_vlc_restart(struct vl_vlc *vlc)
{
vlc->buf = (vlc->ptr[0] << 24) | (vlc->ptr[1] << 16) | (vlc->ptr[2] << 8) | vlc->ptr[3];
@@ -69,7 +71,7 @@ vl_vlc_restart(struct vl_vlc *vlc)
vlc->ptr += 4;
}
-static inline void
+static INLINE void
vl_vlc_init(struct vl_vlc *vlc, const uint8_t *data, unsigned len)
{
vlc->ptr = data;
@@ -77,7 +79,7 @@ vl_vlc_init(struct vl_vlc *vlc, const uint8_t *data, unsigned len)
vl_vlc_restart(vlc);
}
-static inline bool
+static INLINE bool
vl_vlc_getbyte(struct vl_vlc *vlc)
{
vlc->buf <<= 8;
@@ -102,7 +104,7 @@ do { \
} while (0)
/* make sure that the full 32 bit of the buffer are valid */
-static inline void
+static INLINE void
vl_vlc_need32bits(struct vl_vlc *vlc)
{
vl_vlc_needbits(vlc);