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

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

Issue 1124333011: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: only update to last nights LKGR Created 5 years, 7 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_entropymode.c ('k') | source/libvpx/vp9/common/vp9_idct.c » ('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) 2014 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 if (int_fb_list->int_fb[i].size < min_size) { 58 if (int_fb_list->int_fb[i].size < min_size) {
59 int_fb_list->int_fb[i].data = 59 int_fb_list->int_fb[i].data =
60 (uint8_t *)vpx_realloc(int_fb_list->int_fb[i].data, min_size); 60 (uint8_t *)vpx_realloc(int_fb_list->int_fb[i].data, min_size);
61 if (!int_fb_list->int_fb[i].data) 61 if (!int_fb_list->int_fb[i].data)
62 return -1; 62 return -1;
63 63
64 // This memset is needed for fixing valgrind error from C loop filter 64 // This memset is needed for fixing valgrind error from C loop filter
65 // due to access uninitialized memory in frame border. It could be 65 // due to access uninitialized memory in frame border. It could be
66 // removed if border is totally removed. 66 // removed if border is totally removed.
67 vpx_memset(int_fb_list->int_fb[i].data, 0, min_size); 67 memset(int_fb_list->int_fb[i].data, 0, min_size);
68 int_fb_list->int_fb[i].size = min_size; 68 int_fb_list->int_fb[i].size = min_size;
69 } 69 }
70 70
71 fb->data = int_fb_list->int_fb[i].data; 71 fb->data = int_fb_list->int_fb[i].data;
72 fb->size = int_fb_list->int_fb[i].size; 72 fb->size = int_fb_list->int_fb[i].size;
73 int_fb_list->int_fb[i].in_use = 1; 73 int_fb_list->int_fb[i].in_use = 1;
74 74
75 // Set the frame buffer's private data to point at the internal frame buffer. 75 // Set the frame buffer's private data to point at the internal frame buffer.
76 fb->priv = &int_fb_list->int_fb[i]; 76 fb->priv = &int_fb_list->int_fb[i];
77 return 0; 77 return 0;
78 } 78 }
79 79
80 int vp9_release_frame_buffer(void *cb_priv, vpx_codec_frame_buffer_t *fb) { 80 int vp9_release_frame_buffer(void *cb_priv, vpx_codec_frame_buffer_t *fb) {
81 InternalFrameBuffer *const int_fb = (InternalFrameBuffer *)fb->priv; 81 InternalFrameBuffer *const int_fb = (InternalFrameBuffer *)fb->priv;
82 (void)cb_priv; 82 (void)cb_priv;
83 if (int_fb) 83 if (int_fb)
84 int_fb->in_use = 0; 84 int_fb->in_use = 0;
85 return 0; 85 return 0;
86 } 86 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_entropymode.c ('k') | source/libvpx/vp9/common/vp9_idct.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698