From: Linfeng Zhang Date: Thu, 6 Apr 2017 00:40:12 +0000 (-0700) Subject: Create CAST_TO_BYTEPTR/SHORTPTR X-Git-Tag: v1.7.0~550^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a02f391cbe618c6d84b35d161269266c43bc84ca;p=libvpx Create CAST_TO_BYTEPTR/SHORTPTR They will replace CONVERT_TO_BYTEPTR/SHORTPTR module by module. BUG=webm:1388 Change-Id: Ie47c8cd4897696481b9cbbf9e2d439dc22dc85ec --- diff --git a/vpx_ports/mem.h b/vpx_ports/mem.h index 49954e904..bfef783b1 100644 --- a/vpx_ports/mem.h +++ b/vpx_ports/mem.h @@ -35,8 +35,10 @@ (((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)