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 | 10 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 /* Now copy the top and bottom lines into each line of the respective | 87 /* Now copy the top and bottom lines into each line of the respective |
88 * borders | 88 * borders |
89 */ | 89 */ |
90 top_src = src - extend_left; | 90 top_src = src - extend_left; |
91 bot_src = src + src_stride * (height - 1) - extend_left; | 91 bot_src = src + src_stride * (height - 1) - extend_left; |
92 top_dst = src + src_stride * (-extend_top) - extend_left; | 92 top_dst = src + src_stride * (-extend_top) - extend_left; |
93 bot_dst = src + src_stride * (height) - extend_left; | 93 bot_dst = src + src_stride * (height) - extend_left; |
94 linesize = extend_left + extend_right + width; | 94 linesize = extend_left + extend_right + width; |
95 | 95 |
96 for (i = 0; i < extend_top; i++) { | 96 for (i = 0; i < extend_top; i++) { |
97 vpx_memcpy(top_dst, top_src, linesize); | 97 memcpy(top_dst, top_src, linesize); |
98 top_dst += src_stride; | 98 top_dst += src_stride; |
99 } | 99 } |
100 | 100 |
101 for (i = 0; i < extend_bottom; i++) { | 101 for (i = 0; i < extend_bottom; i++) { |
102 vpx_memcpy(bot_dst, bot_src, linesize); | 102 memcpy(bot_dst, bot_src, linesize); |
103 bot_dst += src_stride; | 103 bot_dst += src_stride; |
104 } | 104 } |
105 } | 105 } |
106 | 106 |
107 static void extend_frame(YV12_BUFFER_CONFIG *const ybf, int ext_size) { | 107 static void extend_frame(YV12_BUFFER_CONFIG *const ybf, int ext_size) { |
108 const int c_w = ybf->uv_crop_width; | 108 const int c_w = ybf->uv_crop_width; |
109 const int c_h = ybf->uv_crop_height; | 109 const int c_h = ybf->uv_crop_height; |
110 const int ss_x = ybf->uv_width < ybf->y_width; | 110 const int ss_x = ybf->uv_width < ybf->y_width; |
111 const int ss_y = ybf->uv_height < ybf->y_height; | 111 const int ss_y = ybf->uv_height < ybf->y_height; |
112 const int c_et = ext_size >> ss_y; | 112 const int c_et = ext_size >> ss_y; |
(...skipping 22 matching lines...) Expand all Loading... |
135 void vp9_extend_frame_borders_dspr2(YV12_BUFFER_CONFIG *ybf) { | 135 void vp9_extend_frame_borders_dspr2(YV12_BUFFER_CONFIG *ybf) { |
136 extend_frame(ybf, ybf->border); | 136 extend_frame(ybf, ybf->border); |
137 } | 137 } |
138 | 138 |
139 void vp9_extend_frame_inner_borders_dspr2(YV12_BUFFER_CONFIG *ybf) { | 139 void vp9_extend_frame_inner_borders_dspr2(YV12_BUFFER_CONFIG *ybf) { |
140 const int inner_bw = (ybf->border > VP9INNERBORDERINPIXELS) ? | 140 const int inner_bw = (ybf->border > VP9INNERBORDERINPIXELS) ? |
141 VP9INNERBORDERINPIXELS : ybf->border; | 141 VP9INNERBORDERINPIXELS : ybf->border; |
142 extend_frame(ybf, inner_bw); | 142 extend_frame(ybf, inner_bw); |
143 } | 143 } |
144 #endif | 144 #endif |
OLD | NEW |