Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: source/libvpx/vp9/common/vp9_alloccommon.c

Issue 554673004: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp8/vp8cx_arm.mk ('k') | source/libvpx/vp9/common/vp9_common.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 int vp9_alloc_ref_frame_buffers(VP9_COMMON *cm, int width, int height) { 170 int vp9_alloc_ref_frame_buffers(VP9_COMMON *cm, int width, int height) {
171 int i; 171 int i;
172 const int ss_x = cm->subsampling_x; 172 const int ss_x = cm->subsampling_x;
173 const int ss_y = cm->subsampling_y; 173 const int ss_y = cm->subsampling_y;
174 174
175 vp9_free_ref_frame_buffers(cm); 175 vp9_free_ref_frame_buffers(cm);
176 176
177 for (i = 0; i < FRAME_BUFFERS; ++i) { 177 for (i = 0; i < FRAME_BUFFERS; ++i) {
178 cm->frame_bufs[i].ref_count = 0; 178 cm->frame_bufs[i].ref_count = 0;
179 if (vp9_alloc_frame_buffer(&cm->frame_bufs[i].buf, width, height, 179 if (vp9_alloc_frame_buffer(&cm->frame_bufs[i].buf, width, height,
180 ss_x, ss_y, VP9_ENC_BORDER_IN_PIXELS) < 0) 180 ss_x, ss_y,
181 #if CONFIG_VP9_HIGHBITDEPTH
182 cm->use_highbitdepth,
183 #endif
184 VP9_ENC_BORDER_IN_PIXELS) < 0)
181 goto fail; 185 goto fail;
182 } 186 }
183 187
184 init_frame_bufs(cm); 188 init_frame_bufs(cm);
185 189
186 #if CONFIG_INTERNAL_STATS || CONFIG_VP9_POSTPROC 190 #if CONFIG_INTERNAL_STATS || CONFIG_VP9_POSTPROC
187 if (vp9_alloc_frame_buffer(&cm->post_proc_buffer, width, height, ss_x, ss_y, 191 if (vp9_alloc_frame_buffer(&cm->post_proc_buffer, width, height, ss_x, ss_y,
192 #if CONFIG_VP9_HIGHBITDEPTH
193 cm->use_highbitdepth,
194 #endif
188 VP9_ENC_BORDER_IN_PIXELS) < 0) 195 VP9_ENC_BORDER_IN_PIXELS) < 0)
189 goto fail; 196 goto fail;
190 #endif 197 #endif
191 198
192 return 0; 199 return 0;
193 200
194 fail: 201 fail:
195 vp9_free_ref_frame_buffers(cm); 202 vp9_free_ref_frame_buffers(cm);
196 return 1; 203 return 1;
197 } 204 }
(...skipping 21 matching lines...) Expand all
219 cm->prev_mip = cm->mip_array[cm->prev_mi_idx]; 226 cm->prev_mip = cm->mip_array[cm->prev_mi_idx];
220 cm->mi_grid_base = cm->mi_grid_base_array[cm->mi_idx]; 227 cm->mi_grid_base = cm->mi_grid_base_array[cm->mi_idx];
221 cm->prev_mi_grid_base = cm->mi_grid_base_array[cm->prev_mi_idx]; 228 cm->prev_mi_grid_base = cm->mi_grid_base_array[cm->prev_mi_idx];
222 229
223 // Update the upper left visible macroblock ptrs. 230 // Update the upper left visible macroblock ptrs.
224 cm->mi = cm->mip + cm->mi_stride + 1; 231 cm->mi = cm->mip + cm->mi_stride + 1;
225 cm->prev_mi = cm->prev_mip + cm->mi_stride + 1; 232 cm->prev_mi = cm->prev_mip + cm->mi_stride + 1;
226 cm->mi_grid_visible = cm->mi_grid_base + cm->mi_stride + 1; 233 cm->mi_grid_visible = cm->mi_grid_base + cm->mi_stride + 1;
227 cm->prev_mi_grid_visible = cm->prev_mi_grid_base + cm->mi_stride + 1; 234 cm->prev_mi_grid_visible = cm->prev_mi_grid_base + cm->mi_stride + 1;
228 } 235 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/vp8cx_arm.mk ('k') | source/libvpx/vp9/common/vp9_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698