Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: source/libvpx/vpx_ports/mem.h

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vpx_dsp/x86/variance_sse2.c ('k') | source/libvpx/vpx_ports/msvc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vpx_ports/mem.h
diff --git a/source/libvpx/vpx_ports/mem.h b/source/libvpx/vpx_ports/mem.h
index 0106a45d6e4a5455c8874c481288f23d48a41dda..7502f9063259d4de8457d6d900d2eb118b8196f9 100644
--- a/source/libvpx/vpx_ports/mem.h
+++ b/source/libvpx/vpx_ports/mem.h
@@ -38,4 +38,16 @@
#define __builtin_prefetch(x)
#endif
+/* Shift down with rounding */
+#define ROUND_POWER_OF_TWO(value, n) \
+ (((value) + (1 << ((n) - 1))) >> (n))
+
+#define ALIGN_POWER_OF_TWO(value, n) \
+ (((value) + ((1 << (n)) - 1)) & ~((1 << (n)) - 1))
+
+#if CONFIG_VP9_HIGHBITDEPTH
+#define CONVERT_TO_SHORTPTR(x) ((uint16_t*)(((uintptr_t)x) << 1))
+#define CONVERT_TO_BYTEPTR(x) ((uint8_t*)(((uintptr_t)x) >> 1))
+#endif // CONFIG_VP9_HIGHBITDEPTH
+
#endif // VPX_PORTS_MEM_H_
« no previous file with comments | « source/libvpx/vpx_dsp/x86/variance_sse2.c ('k') | source/libvpx/vpx_ports/msvc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698