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

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

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 2 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/vp9/common/vp9_entropy.c ('k') | source/libvpx/vp9/common/vp9_idct.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) 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 if (i == int_fb_list->num_internal_frame_buffers) 55 if (i == int_fb_list->num_internal_frame_buffers)
56 return -1; 56 return -1;
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
65 // due to access uninitialized memory in frame border. It could be
66 // removed if border is totally removed.
67 vpx_memset(int_fb_list->int_fb[i].data, 0, min_size);
64 int_fb_list->int_fb[i].size = min_size; 68 int_fb_list->int_fb[i].size = min_size;
65 } 69 }
66 70
67 fb->data = int_fb_list->int_fb[i].data; 71 fb->data = int_fb_list->int_fb[i].data;
68 fb->size = int_fb_list->int_fb[i].size; 72 fb->size = int_fb_list->int_fb[i].size;
69 int_fb_list->int_fb[i].in_use = 1; 73 int_fb_list->int_fb[i].in_use = 1;
70 74
71 // 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.
72 fb->priv = &int_fb_list->int_fb[i]; 76 fb->priv = &int_fb_list->int_fb[i];
73 return 0; 77 return 0;
74 } 78 }
75 79
76 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) {
77 InternalFrameBuffer *const int_fb = (InternalFrameBuffer *)fb->priv; 81 InternalFrameBuffer *const int_fb = (InternalFrameBuffer *)fb->priv;
78 (void)cb_priv; 82 (void)cb_priv;
79 if (int_fb) 83 if (int_fb)
80 int_fb->in_use = 0; 84 int_fb->in_use = 0;
81 return 0; 85 return 0;
82 } 86 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/common/vp9_entropy.c ('k') | source/libvpx/vp9/common/vp9_idct.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698