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

Side by Side Diff: source/libvpx/vp9/common/vp9_common.h

Issue 54923004: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/common/vp9_blockd.h ('k') | source/libvpx/vp9/common/vp9_common_data.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 22 matching lines...) Expand all
33 assert(sizeof(dest) == sizeof(src)); \ 33 assert(sizeof(dest) == sizeof(src)); \
34 vpx_memcpy(dest, src, sizeof(src)); \ 34 vpx_memcpy(dest, src, sizeof(src)); \
35 } 35 }
36 36
37 // Use this for variably-sized arrays. 37 // Use this for variably-sized arrays.
38 #define vp9_copy_array(dest, src, n) { \ 38 #define vp9_copy_array(dest, src, n) { \
39 assert(sizeof(*dest) == sizeof(*src)); \ 39 assert(sizeof(*dest) == sizeof(*src)); \
40 vpx_memcpy(dest, src, n * sizeof(*src)); \ 40 vpx_memcpy(dest, src, n * sizeof(*src)); \
41 } 41 }
42 42
43 #define vp9_zero(dest) vpx_memset(&dest, 0, sizeof(dest)); 43 #define vp9_zero(dest) vpx_memset(&dest, 0, sizeof(dest))
44 #define vp9_zero_array(dest, n) vpx_memset(dest, 0, n * sizeof(*dest)); 44 #define vp9_zero_array(dest, n) vpx_memset(dest, 0, n * sizeof(*dest))
45 45
46 static INLINE uint8_t clip_pixel(int val) { 46 static INLINE uint8_t clip_pixel(int val) {
47 return (val > 255) ? 255u : (val < 0) ? 0u : val; 47 return (val > 255) ? 255u : (val < 0) ? 0u : val;
48 } 48 }
49 49
50 static INLINE int clamp(int value, int low, int high) { 50 static INLINE int clamp(int value, int low, int high) {
51 return value < low ? low : (value > high ? high : value); 51 return value < low ? low : (value > high ? high : value);
52 } 52 }
53 53
54 static INLINE double fclamp(double value, double low, double high) { 54 static INLINE double fclamp(double value, double low, double high) {
(...skipping 22 matching lines...) Expand all
77 } while (0) 77 } while (0)
78 #else 78 #else
79 #define CHECK_MEM_ERROR(cm, lval, expr) do { \ 79 #define CHECK_MEM_ERROR(cm, lval, expr) do { \
80 lval = (expr); \ 80 lval = (expr); \
81 if (!lval) \ 81 if (!lval) \
82 vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \ 82 vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, \
83 "Failed to allocate "#lval); \ 83 "Failed to allocate "#lval); \
84 } while (0) 84 } while (0)
85 #endif 85 #endif
86 86
87 #define SYNC_CODE_0 0x49 87 #define VP9_SYNC_CODE_0 0x49
88 #define SYNC_CODE_1 0x83 88 #define VP9_SYNC_CODE_1 0x83
89 #define SYNC_CODE_2 0x42 89 #define VP9_SYNC_CODE_2 0x42
90
91 #define VP9_FRAME_MARKER 0x2
90 92
91 93
92 #endif // VP9_COMMON_VP9_COMMON_H_ 94 #endif // VP9_COMMON_VP9_COMMON_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_blockd.h ('k') | source/libvpx/vp9/common/vp9_common_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698