]> granicus.if.org Git - libvpx/commitdiff
Create CAST_TO_BYTEPTR/SHORTPTR
authorLinfeng Zhang <linfengz@google.com>
Thu, 6 Apr 2017 00:40:12 +0000 (17:40 -0700)
committerLinfeng Zhang <linfengz@google.com>
Tue, 18 Apr 2017 21:48:11 +0000 (14:48 -0700)
They will replace CONVERT_TO_BYTEPTR/SHORTPTR module by module.

BUG=webm:1388

Change-Id: Ie47c8cd4897696481b9cbbf9e2d439dc22dc85ec

vpx_ports/mem.h

index 49954e90477a8b29cf95c62ae9034d5c454ee145..bfef783b133219d1f2ab401b63f20dcb75100d7e 100644 (file)
   (((value) + ((1 << (n)) - 1)) & ~((1 << (n)) - 1))
 
 #define CONVERT_TO_SHORTPTR(x) ((uint16_t *)(((uintptr_t)(x)) << 1))
+#define CAST_TO_SHORTPTR(x) ((uint16_t *)((uintptr_t)(x)))
 #if CONFIG_VP9_HIGHBITDEPTH
 #define CONVERT_TO_BYTEPTR(x) ((uint8_t *)(((uintptr_t)(x)) >> 1))
+#define CAST_TO_BYTEPTR(x) ((uint8_t *)((uintptr_t)(x)))
 #endif  // CONFIG_VP9_HIGHBITDEPTH
 
 #if !defined(__has_feature)