diff options
author | Emeric Grange <emeric.grange@gmail.com> | 2011-11-14 18:20:52 +0100 |
---|---|---|
committer | Emeric Grange <emeric.grange@gmail.com> | 2012-06-24 16:57:31 +0200 |
commit | c5ced1b56f6a0521c229d17b7706fadbb8a3d520 (patch) | |
tree | 41d2d5420b0e9b8f4f4f091588ef586836086d69 | |
parent | 3406b5035f29d53d4871293f2b513e613855a23b (diff) |
g3dvl: Move some macros
Signed-off-by: Emeric Grange <emeric.grange@gmail.com>
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/decoder/onyxd_int.h | 17 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vp8/vp8_mem.h | 27 |
2 files changed, 22 insertions, 22 deletions
diff --git a/src/gallium/auxiliary/vl/vp8/decoder/onyxd_int.h b/src/gallium/auxiliary/vl/vp8/decoder/onyxd_int.h index 4d4457e4cc..91db75f58c 100644 --- a/src/gallium/auxiliary/vl/vp8/decoder/onyxd_int.h +++ b/src/gallium/auxiliary/vl/vp8/decoder/onyxd_int.h @@ -55,21 +55,4 @@ typedef struct int vp8_frame_decode(VP8D_COMP *cpi, struct pipe_vp8_picture_desc *frame_header); -#if CONFIG_DEBUG -#define CHECK_MEM_ERROR(lval,expr) do { \ - lval = (expr); \ - if (!lval) \ - vpx_internal_error(&pbi->common.error, VPX_CODEC_MEM_ERROR, \ - "Failed to allocate "#lval" at %s:%d", \ - __FILE__,__LINE__); \ - } while(0) -#else -#define CHECK_MEM_ERROR(lval,expr) do { \ - lval = (expr); \ - if (!lval) \ - vpx_internal_error(&pbi->common.error, VPX_CODEC_MEM_ERROR, \ - "Failed to allocate "#lval); \ - } while(0) -#endif /* CONFIG_DEBUG */ - #endif /* VP8D_INT_H */ diff --git a/src/gallium/auxiliary/vl/vp8/vp8_mem.h b/src/gallium/auxiliary/vl/vp8/vp8_mem.h index d7361ca57c..55145197e2 100644 --- a/src/gallium/auxiliary/vl/vp8/vp8_mem.h +++ b/src/gallium/auxiliary/vl/vp8/vp8_mem.h @@ -22,19 +22,36 @@ extern "C" { #endif -#define ADDRESS_STORAGE_SIZE sizeof(size_t) -#define DEFAULT_ALIGNMENT 32 // must be >= 1 ! - /* returns an addr aligned to the byte boundary specified by align */ #define align_addr(addr,align) (void*)(((size_t)(addr) + ((align) - 1)) & (size_t)-(align)) +#define ADDRESS_STORAGE_SIZE sizeof(size_t) +#define DEFAULT_ALIGNMENT 32 // must be >= 1 ! + #if defined(__GNUC__) && __GNUC__ -#define DECLARE_ALIGNED(n,typ,val) typ val __attribute__ ((aligned (n))) +#define DECLARE_ALIGNED(n,typ,val) typ val __attribute__ ((aligned (n))) #else #warning No alignment directives known for this compiler. -#define DECLARE_ALIGNED(n,typ,val) typ val +#define DECLARE_ALIGNED(n,typ,val) typ val #endif +#if CONFIG_DEBUG +#define CHECK_MEM_ERROR(lval,expr) do { \ + lval = (expr); \ + if (!lval) \ + vpx_internal_error(&pbi->common.error, VPX_CODEC_MEM_ERROR, \ + "Failed to allocate "#lval" at %s:%d", \ + __FILE__,__LINE__); \ + } while(0) +#else +#define CHECK_MEM_ERROR(lval,expr) do { \ + lval = (expr); \ + if (!lval) \ + vpx_internal_error(&pbi->common.error, VPX_CODEC_MEM_ERROR, \ + "Failed to allocate "#lval); \ + } while(0) +#endif /* CONFIG_DEBUG */ + void *vpx_memalign(size_t align, size_t size); void *vpx_malloc(size_t size); void *vpx_calloc(size_t num, size_t size); |