OLD | NEW |
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 #ifndef VP9_VP9_IFACE_COMMON_H_ | 10 #ifndef VP9_VP9_IFACE_COMMON_H_ |
(...skipping 13 matching lines...) Expand all Loading... |
24 img->fmt = VPX_IMG_FMT_I444; | 24 img->fmt = VPX_IMG_FMT_I444; |
25 bps = 24; | 25 bps = 24; |
26 } else { | 26 } else { |
27 img->fmt = VPX_IMG_FMT_I422; | 27 img->fmt = VPX_IMG_FMT_I422; |
28 bps = 16; | 28 bps = 16; |
29 } | 29 } |
30 } else { | 30 } else { |
31 img->fmt = VPX_IMG_FMT_I420; | 31 img->fmt = VPX_IMG_FMT_I420; |
32 bps = 12; | 32 bps = 12; |
33 } | 33 } |
| 34 img->bit_depth = 8; |
34 img->w = yv12->y_stride; | 35 img->w = yv12->y_stride; |
35 img->h = ALIGN_POWER_OF_TWO(yv12->y_height + 2 * VP9_ENC_BORDER_IN_PIXELS, 3); | 36 img->h = ALIGN_POWER_OF_TWO(yv12->y_height + 2 * VP9_ENC_BORDER_IN_PIXELS, 3); |
36 img->d_w = yv12->y_crop_width; | 37 img->d_w = yv12->y_crop_width; |
37 img->d_h = yv12->y_crop_height; | 38 img->d_h = yv12->y_crop_height; |
38 img->x_chroma_shift = ss_x; | 39 img->x_chroma_shift = ss_x; |
39 img->y_chroma_shift = ss_y; | 40 img->y_chroma_shift = ss_y; |
40 img->planes[VPX_PLANE_Y] = yv12->y_buffer; | 41 img->planes[VPX_PLANE_Y] = yv12->y_buffer; |
41 img->planes[VPX_PLANE_U] = yv12->u_buffer; | 42 img->planes[VPX_PLANE_U] = yv12->u_buffer; |
42 img->planes[VPX_PLANE_V] = yv12->v_buffer; | 43 img->planes[VPX_PLANE_V] = yv12->v_buffer; |
43 img->planes[VPX_PLANE_ALPHA] = yv12->alpha_buffer; | 44 img->planes[VPX_PLANE_ALPHA] = yv12->alpha_buffer; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // For development purposes, force alpha to hold the same data as Y for now. | 82 // For development purposes, force alpha to hold the same data as Y for now. |
82 yv12->alpha_buffer = yv12->y_buffer; | 83 yv12->alpha_buffer = yv12->y_buffer; |
83 yv12->alpha_width = yv12->y_width; | 84 yv12->alpha_width = yv12->y_width; |
84 yv12->alpha_height = yv12->y_height; | 85 yv12->alpha_height = yv12->y_height; |
85 yv12->alpha_stride = yv12->y_stride; | 86 yv12->alpha_stride = yv12->y_stride; |
86 #endif | 87 #endif |
87 return VPX_CODEC_OK; | 88 return VPX_CODEC_OK; |
88 } | 89 } |
89 | 90 |
90 #endif // VP9_VP9_IFACE_COMMON_H_ | 91 #endif // VP9_VP9_IFACE_COMMON_H_ |
OLD | NEW |