OLD | NEW |
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 |
11 | |
12 #ifndef YV12_CONFIG_H | 11 #ifndef YV12_CONFIG_H |
13 #define YV12_CONFIG_H | 12 #define YV12_CONFIG_H |
| 13 |
14 #ifdef __cplusplus | 14 #ifdef __cplusplus |
15 extern "C" | 15 extern "C" { |
16 { | |
17 #endif | 16 #endif |
18 | 17 |
| 18 #include "vpx/vpx_integer.h" |
| 19 |
19 #define VP8BORDERINPIXELS 32 | 20 #define VP8BORDERINPIXELS 32 |
20 #define VP9BORDERINPIXELS 64 | 21 #define VP9BORDERINPIXELS 64 |
21 #define VP9_INTERP_EXTEND 4 | 22 #define VP9_INTERP_EXTEND 4 |
22 | 23 |
23 /************************************* | 24 /************************************* |
24 For INT_YUV: | 25 For INT_YUV: |
25 | 26 |
26 Y = (R+G*2+B)/4; | 27 Y = (R+G*2+B)/4; |
27 U = (R-B)/2; | 28 U = (R-B)/2; |
28 V = (G*2 - R - B)/4; | 29 V = (G*2 - R - B)/4; |
(...skipping 13 matching lines...) Expand all Loading... |
42 int y_width; | 43 int y_width; |
43 int y_height; | 44 int y_height; |
44 int y_stride; | 45 int y_stride; |
45 /* int yinternal_width; */ | 46 /* int yinternal_width; */ |
46 | 47 |
47 int uv_width; | 48 int uv_width; |
48 int uv_height; | 49 int uv_height; |
49 int uv_stride; | 50 int uv_stride; |
50 /* int uvinternal_width; */ | 51 /* int uvinternal_width; */ |
51 | 52 |
52 unsigned char *y_buffer; | 53 uint8_t *y_buffer; |
53 unsigned char *u_buffer; | 54 uint8_t *u_buffer; |
54 unsigned char *v_buffer; | 55 uint8_t *v_buffer; |
55 | 56 |
56 unsigned char *buffer_alloc; | 57 uint8_t *buffer_alloc; |
57 int border; | 58 int border; |
58 int frame_size; | 59 int frame_size; |
59 YUV_TYPE clrtype; | 60 YUV_TYPE clrtype; |
60 | 61 |
61 int corrupted; | 62 int corrupted; |
62 int flags; | 63 int flags; |
63 } YV12_BUFFER_CONFIG; | 64 } YV12_BUFFER_CONFIG; |
64 | 65 |
65 int vp8_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height
, int border); | 66 int vp8_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, |
| 67 int width, int height, int border); |
66 int vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf); | 68 int vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf); |
67 | 69 |
68 #ifdef __cplusplus | 70 #ifdef __cplusplus |
69 } | 71 } |
70 #endif | 72 #endif |
71 | 73 |
72 | 74 #endif // YV12_CONFIG_H |
73 #endif /*YV12_CONFIG_H*/ | |
OLD | NEW |