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

Side by Side Diff: source/libvpx/vp9/decoder/vp9_decoder.c

Issue 1155073005: Cherry pick buffer re-allocation fix (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@m44-2403
Patch Set: Created 5 years, 6 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
« no previous file with comments | « source/libvpx/vp9/common/vp9_onyxc_int.h ('k') | no next file » | 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 vp9_rtcd(); 43 vp9_rtcd();
44 vpx_dsp_rtcd(); 44 vpx_dsp_rtcd();
45 vpx_scale_rtcd(); 45 vpx_scale_rtcd();
46 vp9_init_intra_predictors(); 46 vp9_init_intra_predictors();
47 init_done = 1; 47 init_done = 1;
48 } 48 }
49 } 49 }
50 50
51 static void vp9_dec_setup_mi(VP9_COMMON *cm) { 51 static void vp9_dec_setup_mi(VP9_COMMON *cm) {
52 cm->mi = cm->mip + cm->mi_stride + 1; 52 cm->mi = cm->mip + cm->mi_stride + 1;
53 memset(cm->mip, 0, cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mip));
54 cm->mi_grid_visible = cm->mi_grid_base + cm->mi_stride + 1; 53 cm->mi_grid_visible = cm->mi_grid_base + cm->mi_stride + 1;
55 memset(cm->mi_grid_base, 0, 54 memset(cm->mi_grid_base, 0,
56 cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mi_grid_base)); 55 cm->mi_stride * (cm->mi_rows + 1) * sizeof(*cm->mi_grid_base));
57 } 56 }
58 57
59 static int vp9_dec_alloc_mi(VP9_COMMON *cm, int mi_size) { 58 static int vp9_dec_alloc_mi(VP9_COMMON *cm, int mi_size) {
60 cm->mip = vpx_calloc(mi_size, sizeof(*cm->mip)); 59 cm->mip = vpx_calloc(mi_size, sizeof(*cm->mip));
61 if (!cm->mip) 60 if (!cm->mip)
62 return 1; 61 return 1;
63 cm->mi_alloc_size = mi_size; 62 cm->mi_alloc_size = mi_size;
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 494
496 for (j = 0; j < mag; ++j) 495 for (j = 0; j < mag; ++j)
497 this_sz |= (*x++) << (j * 8); 496 this_sz |= (*x++) << (j * 8);
498 sizes[i] = this_sz; 497 sizes[i] = this_sz;
499 } 498 }
500 *count = frames; 499 *count = frames;
501 } 500 }
502 } 501 }
503 return VPX_CODEC_OK; 502 return VPX_CODEC_OK;
504 } 503 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_onyxc_int.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698