Merge "Skip computation of distortion in vp8_pick_inter_mode if active_map is used"
[libvpx.git] / vpx_scale / yv12config.h
blob3cc4746f77472dbc90d9f29d899cc967be6701b6
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
12 #ifndef YV12_CONFIG_H
13 #define YV12_CONFIG_H
14 #ifdef __cplusplus
15 extern "C"
17 #endif
19 #define VP7BORDERINPIXELS 48
20 #define VP8BORDERINPIXELS 32
22 /*************************************
23 For INT_YUV:
25 Y = (R+G*2+B)/4;
26 U = (R-B)/2;
27 V = (G*2 - R - B)/4;
28 And
29 R = Y+U-V;
30 G = Y+V;
31 B = Y-U-V;
32 ************************************/
33 typedef enum
35 REG_YUV = 0, /* Regular yuv */
36 INT_YUV = 1 /* The type of yuv that can be tranfer to and from RGB through integer transform */
38 YUV_TYPE;
40 typedef struct
42 int y_width;
43 int y_height;
44 int y_stride;
45 /* int yinternal_width; */
47 int uv_width;
48 int uv_height;
49 int uv_stride;
50 /* int uvinternal_width; */
52 unsigned char *y_buffer;
53 unsigned char *u_buffer;
54 unsigned char *v_buffer;
56 unsigned char *buffer_alloc;
57 int border;
58 int frame_size;
59 YUV_TYPE clrtype;
61 int corrupted;
62 int flags;
63 } YV12_BUFFER_CONFIG;
65 int vp8_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height, int border);
66 int vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf);
68 #ifdef __cplusplus
70 #endif
73 #endif /*YV12_CONFIG_H*/