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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 16); | 68 16); |
69 const int er_y = MAX(ALIGN_POWER_OF_TWO(src->y_height, 6) - src->y_height, | 69 const int er_y = MAX(ALIGN_POWER_OF_TWO(src->y_height, 6) - src->y_height, |
70 16); | 70 16); |
71 const int uv_width_subsampling = (src->uv_width != src->y_width); | 71 const int uv_width_subsampling = (src->uv_width != src->y_width); |
72 const int uv_height_subsampling = (src->uv_height != src->y_height); | 72 const int uv_height_subsampling = (src->uv_height != src->y_height); |
73 const int et_uv = et_y >> uv_height_subsampling; | 73 const int et_uv = et_y >> uv_height_subsampling; |
74 const int el_uv = el_y >> uv_width_subsampling; | 74 const int el_uv = el_y >> uv_width_subsampling; |
75 const int eb_uv = eb_y >> uv_height_subsampling; | 75 const int eb_uv = eb_y >> uv_height_subsampling; |
76 const int er_uv = er_y >> uv_width_subsampling; | 76 const int er_uv = er_y >> uv_width_subsampling; |
77 | 77 |
78 #if CONFIG_ALPHA | |
79 const int et_a = dst->border >> (dst->alpha_height != dst->y_height); | |
80 const int el_a = dst->border >> (dst->alpha_width != dst->y_width); | |
81 const int eb_a = et_a + dst->alpha_height - src->alpha_height; | |
82 const int er_a = el_a + dst->alpha_width - src->alpha_width; | |
83 | |
84 copy_and_extend_plane(src->alpha_buffer, src->alpha_stride, | |
85 dst->alpha_buffer, dst->alpha_stride, | |
86 src->alpha_width, src->alpha_height, | |
87 et_a, el_a, eb_a, er_a); | |
88 #endif | |
89 | |
90 copy_and_extend_plane(src->y_buffer, src->y_stride, | 78 copy_and_extend_plane(src->y_buffer, src->y_stride, |
91 dst->y_buffer, dst->y_stride, | 79 dst->y_buffer, dst->y_stride, |
92 src->y_width, src->y_height, | 80 src->y_width, src->y_height, |
93 et_y, el_y, eb_y, er_y); | 81 et_y, el_y, eb_y, er_y); |
94 | 82 |
95 copy_and_extend_plane(src->u_buffer, src->uv_stride, | 83 copy_and_extend_plane(src->u_buffer, src->uv_stride, |
96 dst->u_buffer, dst->uv_stride, | 84 dst->u_buffer, dst->uv_stride, |
97 src->uv_width, src->uv_height, | 85 src->uv_width, src->uv_height, |
98 et_uv, el_uv, eb_uv, er_uv); | 86 et_uv, el_uv, eb_uv, er_uv); |
99 | 87 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 copy_and_extend_plane(src->u_buffer + src_uv_offset, src->uv_stride, | 122 copy_and_extend_plane(src->u_buffer + src_uv_offset, src->uv_stride, |
135 dst->u_buffer + dst_uv_offset, dst->uv_stride, | 123 dst->u_buffer + dst_uv_offset, dst->uv_stride, |
136 srcw_uv, srch_uv, | 124 srcw_uv, srch_uv, |
137 et_uv, el_uv, eb_uv, er_uv); | 125 et_uv, el_uv, eb_uv, er_uv); |
138 | 126 |
139 copy_and_extend_plane(src->v_buffer + src_uv_offset, src->uv_stride, | 127 copy_and_extend_plane(src->v_buffer + src_uv_offset, src->uv_stride, |
140 dst->v_buffer + dst_uv_offset, dst->uv_stride, | 128 dst->v_buffer + dst_uv_offset, dst->uv_stride, |
141 srcw_uv, srch_uv, | 129 srcw_uv, srch_uv, |
142 et_uv, el_uv, eb_uv, er_uv); | 130 et_uv, el_uv, eb_uv, er_uv); |
143 } | 131 } |
OLD | NEW |