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

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

Issue 668403002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/common/vp9_scale.c ('k') | source/libvpx/vp9/common/vp9_scan.c » ('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) 2013 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2013 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
11 #ifndef VP9_COMMON_VP9_SCAN_H_ 11 #ifndef VP9_COMMON_VP9_SCAN_H_
12 #define VP9_COMMON_VP9_SCAN_H_ 12 #define VP9_COMMON_VP9_SCAN_H_
13 13
14 #include "vpx/vpx_integer.h" 14 #include "vpx/vpx_integer.h"
15 #include "vpx_ports/mem.h" 15 #include "vpx_ports/mem.h"
16 16
17 #include "vp9/common/vp9_enums.h" 17 #include "vp9/common/vp9_enums.h"
18 #include "vp9/common/vp9_blockd.h" 18 #include "vp9/common/vp9_blockd.h"
19 19
20 #ifdef __cplusplus 20 #ifdef __cplusplus
21 extern "C" { 21 extern "C" {
22 #endif 22 #endif
23 23
24 #define MAX_NEIGHBORS 2 24 #define MAX_NEIGHBORS 2
25 25
26 void vp9_init_neighbors();
27
28 typedef struct { 26 typedef struct {
29 const int16_t *scan; 27 const int16_t *scan;
30 const int16_t *iscan; 28 const int16_t *iscan;
31 const int16_t *neighbors; 29 const int16_t *neighbors;
32 } scan_order; 30 } scan_order;
33 31
34 extern const scan_order vp9_default_scan_orders[TX_SIZES]; 32 extern const scan_order vp9_default_scan_orders[TX_SIZES];
35 extern const scan_order vp9_scan_orders[TX_SIZES][TX_TYPES]; 33 extern const scan_order vp9_scan_orders[TX_SIZES][TX_TYPES];
36 34
37 static INLINE int get_coef_context(const int16_t *neighbors, 35 static INLINE int get_coef_context(const int16_t *neighbors,
38 const uint8_t *token_cache, int c) { 36 const uint8_t *token_cache, int c) {
39 return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] + 37 return (1 + token_cache[neighbors[MAX_NEIGHBORS * c + 0]] +
40 token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >> 1; 38 token_cache[neighbors[MAX_NEIGHBORS * c + 1]]) >> 1;
41 } 39 }
42 40
43 #ifdef __cplusplus 41 #ifdef __cplusplus
44 } // extern "C" 42 } // extern "C"
45 #endif 43 #endif
46 44
47 #endif // VP9_COMMON_VP9_SCAN_H_ 45 #endif // VP9_COMMON_VP9_SCAN_H_
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_scale.c ('k') | source/libvpx/vp9/common/vp9_scan.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698