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

Unified Diff: source/libvpx/vp9/common/vp9_alloccommon.c

Issue 996503002: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vp9/common/vp9_alloccommon.h ('k') | source/libvpx/vp9/common/vp9_mvref_common.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp9/common/vp9_alloccommon.c
diff --git a/source/libvpx/vp9/common/vp9_alloccommon.c b/source/libvpx/vp9/common/vp9_alloccommon.c
index 8b04d1b43cf9a5b5bd745b3668aada509f2fdec8..e209788c3d024fa05868d51266c054f6133407d7 100644
--- a/source/libvpx/vp9/common/vp9_alloccommon.c
+++ b/source/libvpx/vp9/common/vp9_alloccommon.c
@@ -141,68 +141,6 @@ int vp9_alloc_context_buffers(VP9_COMMON *cm, int width, int height) {
return 1;
}
-static void init_frame_bufs(VP9_COMMON *cm) {
- BufferPool *const pool = cm->buffer_pool;
- int i;
-
- cm->new_fb_idx = FRAME_BUFFERS - 1;
- pool->frame_bufs[cm->new_fb_idx].ref_count = 1;
-
- for (i = 0; i < REF_FRAMES; ++i) {
- cm->ref_frame_map[i] = i;
- pool->frame_bufs[i].ref_count = 1;
- }
-}
-
-int vp9_alloc_ref_frame_buffers(VP9_COMMON *cm, int width, int height) {
- int i;
- const int ss_x = cm->subsampling_x;
- const int ss_y = cm->subsampling_y;
-
- vp9_free_ref_frame_buffers(cm);
-
- for (i = 0; i < FRAME_BUFFERS; ++i) {
- BufferPool *const pool = cm->buffer_pool;
- pool->frame_bufs[i].ref_count = 0;
- if (vp9_alloc_frame_buffer(&pool->frame_bufs[i].buf, width, height,
- ss_x, ss_y,
-#if CONFIG_VP9_HIGHBITDEPTH
- cm->use_highbitdepth,
-#endif
- VP9_ENC_BORDER_IN_PIXELS,
- cm->byte_alignment) < 0)
- goto fail;
- if (pool->frame_bufs[i].mvs == NULL) {
- pool->frame_bufs[i].mvs =
- (MV_REF *)vpx_calloc(cm->mi_rows * cm->mi_cols,
- sizeof(*pool->frame_bufs[i].mvs));
- if (pool->frame_bufs[i].mvs == NULL)
- goto fail;
-
- pool->frame_bufs[i].mi_rows = cm->mi_rows;
- pool->frame_bufs[i].mi_cols = cm->mi_cols;
- }
- }
-
- init_frame_bufs(cm);
-
-#if CONFIG_VP9_POSTPROC
- if (vp9_alloc_frame_buffer(&cm->post_proc_buffer, width, height, ss_x, ss_y,
-#if CONFIG_VP9_HIGHBITDEPTH
- cm->use_highbitdepth,
-#endif
- VP9_ENC_BORDER_IN_PIXELS,
- cm->byte_alignment) < 0)
- goto fail;
-#endif
-
- return 0;
-
- fail:
- vp9_free_ref_frame_buffers(cm);
- return 1;
-}
-
void vp9_remove_common(VP9_COMMON *cm) {
vp9_free_ref_frame_buffers(cm);
vp9_free_context_buffers(cm);
« no previous file with comments | « source/libvpx/vp9/common/vp9_alloccommon.h ('k') | source/libvpx/vp9/common/vp9_mvref_common.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698