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 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 VPX_IMG_FMT_VPXYV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 3, /** < pl
anar 4:2:0 format with vpx color space */ | 57 VPX_IMG_FMT_VPXYV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 3, /** < pl
anar 4:2:0 format with vpx color space */ |
58 VPX_IMG_FMT_VPXI420 = VPX_IMG_FMT_PLANAR | 4, | 58 VPX_IMG_FMT_VPXI420 = VPX_IMG_FMT_PLANAR | 4, |
59 VPX_IMG_FMT_I422 = VPX_IMG_FMT_PLANAR | 5, | 59 VPX_IMG_FMT_I422 = VPX_IMG_FMT_PLANAR | 5, |
60 VPX_IMG_FMT_I444 = VPX_IMG_FMT_PLANAR | 6, | 60 VPX_IMG_FMT_I444 = VPX_IMG_FMT_PLANAR | 6, |
61 VPX_IMG_FMT_444A = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_HAS_ALPHA | 7, | 61 VPX_IMG_FMT_444A = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_HAS_ALPHA | 7, |
62 VPX_IMG_FMT_I42016 = VPX_IMG_FMT_I420 | VPX_IMG_FMT_HIGHBITDEPTH, | 62 VPX_IMG_FMT_I42016 = VPX_IMG_FMT_I420 | VPX_IMG_FMT_HIGHBITDEPTH, |
63 VPX_IMG_FMT_I42216 = VPX_IMG_FMT_I422 | VPX_IMG_FMT_HIGHBITDEPTH, | 63 VPX_IMG_FMT_I42216 = VPX_IMG_FMT_I422 | VPX_IMG_FMT_HIGHBITDEPTH, |
64 VPX_IMG_FMT_I44416 = VPX_IMG_FMT_I444 | VPX_IMG_FMT_HIGHBITDEPTH | 64 VPX_IMG_FMT_I44416 = VPX_IMG_FMT_I444 | VPX_IMG_FMT_HIGHBITDEPTH |
65 } vpx_img_fmt_t; /**< alias for enum vpx_img_fmt */ | 65 } vpx_img_fmt_t; /**< alias for enum vpx_img_fmt */ |
66 | 66 |
| 67 #if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT |
| 68 #define IMG_FMT_PLANAR VPX_IMG_FMT_PLANAR /**< \deprecated Use #VPX_
IMG_FMT_PLANAR */ |
| 69 #define IMG_FMT_UV_FLIP VPX_IMG_FMT_UV_FLIP /**< \deprecated Use #VPX_
IMG_FMT_UV_FLIP */ |
| 70 #define IMG_FMT_HAS_ALPHA VPX_IMG_FMT_HAS_ALPHA /**< \deprecated Use #VPX_
IMG_FMT_HAS_ALPHA */ |
| 71 |
| 72 /*!\brief Deprecated list of supported image formats |
| 73 * \deprecated New code should use #vpx_img_fmt |
| 74 */ |
| 75 #define img_fmt vpx_img_fmt |
| 76 /*!\brief alias for enum img_fmt. |
| 77 * \deprecated New code should use #vpx_img_fmt_t |
| 78 */ |
| 79 #define img_fmt_t vpx_img_fmt_t |
| 80 |
| 81 #define IMG_FMT_NONE VPX_IMG_FMT_NONE /**< \deprecated Use #VPX_IMG_
FMT_NONE */ |
| 82 #define IMG_FMT_RGB24 VPX_IMG_FMT_RGB24 /**< \deprecated Use #VPX_IMG_
FMT_RGB24 */ |
| 83 #define IMG_FMT_RGB32 VPX_IMG_FMT_RGB32 /**< \deprecated Use #VPX_IMG_
FMT_RGB32 */ |
| 84 #define IMG_FMT_RGB565 VPX_IMG_FMT_RGB565 /**< \deprecated Use #VPX_IMG_
FMT_RGB565 */ |
| 85 #define IMG_FMT_RGB555 VPX_IMG_FMT_RGB555 /**< \deprecated Use #VPX_IMG_
FMT_RGB555 */ |
| 86 #define IMG_FMT_UYVY VPX_IMG_FMT_UYVY /**< \deprecated Use #VPX_IMG_
FMT_UYVY */ |
| 87 #define IMG_FMT_YUY2 VPX_IMG_FMT_YUY2 /**< \deprecated Use #VPX_IMG_
FMT_YUY2 */ |
| 88 #define IMG_FMT_YVYU VPX_IMG_FMT_YVYU /**< \deprecated Use #VPX_IMG_
FMT_YVYU */ |
| 89 #define IMG_FMT_BGR24 VPX_IMG_FMT_BGR24 /**< \deprecated Use #VPX_IMG_
FMT_BGR24 */ |
| 90 #define IMG_FMT_RGB32_LE VPX_IMG_FMT_RGB32_LE /**< \deprecated Use #VPX_IMG_
FMT_RGB32_LE */ |
| 91 #define IMG_FMT_ARGB VPX_IMG_FMT_ARGB /**< \deprecated Use #VPX_IMG_
FMT_ARGB */ |
| 92 #define IMG_FMT_ARGB_LE VPX_IMG_FMT_ARGB_LE /**< \deprecated Use #VPX_IMG_
FMT_ARGB_LE */ |
| 93 #define IMG_FMT_RGB565_LE VPX_IMG_FMT_RGB565_LE /**< \deprecated Use #VPX_IMG_
FMT_RGB565_LE */ |
| 94 #define IMG_FMT_RGB555_LE VPX_IMG_FMT_RGB555_LE /**< \deprecated Use #VPX_IMG_
FMT_RGB555_LE */ |
| 95 #define IMG_FMT_YV12 VPX_IMG_FMT_YV12 /**< \deprecated Use #VPX_IMG_
FMT_YV12 */ |
| 96 #define IMG_FMT_I420 VPX_IMG_FMT_I420 /**< \deprecated Use #VPX_IMG_
FMT_I420 */ |
| 97 #define IMG_FMT_VPXYV12 VPX_IMG_FMT_VPXYV12 /**< \deprecated Use #VPX_IMG_
FMT_VPXYV12 */ |
| 98 #define IMG_FMT_VPXI420 VPX_IMG_FMT_VPXI420 /**< \deprecated Use #VPX_IMG_
FMT_VPXI420 */ |
| 99 #endif /* VPX_CODEC_DISABLE_COMPAT */ |
| 100 |
67 /**\brief Image Descriptor */ | 101 /**\brief Image Descriptor */ |
68 typedef struct vpx_image { | 102 typedef struct vpx_image { |
69 vpx_img_fmt_t fmt; /**< Image Format */ | 103 vpx_img_fmt_t fmt; /**< Image Format */ |
70 | 104 |
71 /* Image storage dimensions */ | 105 /* Image storage dimensions */ |
72 unsigned int w; /**< Stored image width */ | 106 unsigned int w; /**< Stored image width */ |
73 unsigned int h; /**< Stored image height */ | 107 unsigned int h; /**< Stored image height */ |
74 unsigned int bit_depth; /**< Stored image bit-depth */ | 108 unsigned int bit_depth; /**< Stored image bit-depth */ |
75 | 109 |
76 /* Image display dimensions */ | 110 /* Image display dimensions */ |
77 unsigned int d_w; /**< Displayed image width */ | 111 unsigned int d_w; /**< Displayed image width */ |
78 unsigned int d_h; /**< Displayed image height */ | 112 unsigned int d_h; /**< Displayed image height */ |
79 | 113 |
80 /* Chroma subsampling info */ | 114 /* Chroma subsampling info */ |
81 unsigned int x_chroma_shift; /**< subsampling order, X */ | 115 unsigned int x_chroma_shift; /**< subsampling order, X */ |
82 unsigned int y_chroma_shift; /**< subsampling order, Y */ | 116 unsigned int y_chroma_shift; /**< subsampling order, Y */ |
83 | 117 |
84 /* Image data pointers. */ | 118 /* Image data pointers. */ |
85 #define VPX_PLANE_PACKED 0 /**< To be used for all packed formats */ | 119 #define VPX_PLANE_PACKED 0 /**< To be used for all packed formats */ |
86 #define VPX_PLANE_Y 0 /**< Y (Luminance) plane */ | 120 #define VPX_PLANE_Y 0 /**< Y (Luminance) plane */ |
87 #define VPX_PLANE_U 1 /**< U (Chroma) plane */ | 121 #define VPX_PLANE_U 1 /**< U (Chroma) plane */ |
88 #define VPX_PLANE_V 2 /**< V (Chroma) plane */ | 122 #define VPX_PLANE_V 2 /**< V (Chroma) plane */ |
89 #define VPX_PLANE_ALPHA 3 /**< A (Transparency) plane */ | 123 #define VPX_PLANE_ALPHA 3 /**< A (Transparency) plane */ |
| 124 #if !defined(VPX_CODEC_DISABLE_COMPAT) || !VPX_CODEC_DISABLE_COMPAT |
| 125 #define PLANE_PACKED VPX_PLANE_PACKED |
| 126 #define PLANE_Y VPX_PLANE_Y |
| 127 #define PLANE_U VPX_PLANE_U |
| 128 #define PLANE_V VPX_PLANE_V |
| 129 #define PLANE_ALPHA VPX_PLANE_ALPHA |
| 130 #endif |
90 unsigned char *planes[4]; /**< pointer to the top left pixel for each plane
*/ | 131 unsigned char *planes[4]; /**< pointer to the top left pixel for each plane
*/ |
91 int stride[4]; /**< stride between rows for each plane */ | 132 int stride[4]; /**< stride between rows for each plane */ |
92 | 133 |
93 int bps; /**< bits per sample (for packed formats) */ | 134 int bps; /**< bits per sample (for packed formats) */ |
94 | 135 |
95 /* The following member may be set by the application to associate data | 136 /* The following member may be set by the application to associate data |
96 * with this image. | 137 * with this image. |
97 */ | 138 */ |
98 void *user_priv; /**< may be set by the application to associate data | 139 void *user_priv; /**< may be set by the application to associate data |
99 * with this image. */ | 140 * with this image. */ |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 * | 241 * |
201 * \param[in] img Image descriptor | 242 * \param[in] img Image descriptor |
202 */ | 243 */ |
203 void vpx_img_free(vpx_image_t *img); | 244 void vpx_img_free(vpx_image_t *img); |
204 | 245 |
205 #ifdef __cplusplus | 246 #ifdef __cplusplus |
206 } // extern "C" | 247 } // extern "C" |
207 #endif | 248 #endif |
208 | 249 |
209 #endif // VPX_VPX_IMAGE_H_ | 250 #endif // VPX_VPX_IMAGE_H_ |
OLD | NEW |