shithub: libvpx

Download patch

ref: a02f391cbe618c6d84b35d161269266c43bc84ca
parent: 15afee19385524c8ea3975f6fd11fd6282c0aa15
author: Linfeng Zhang <linfengz@google.com>
date: Wed Apr 5 13:40:12 EDT 2017

Create CAST_TO_BYTEPTR/SHORTPTR

They will replace CONVERT_TO_BYTEPTR/SHORTPTR module by module.

BUG=webm:1388

Change-Id: Ie47c8cd4897696481b9cbbf9e2d439dc22dc85ec

--- 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)