OLD | NEW |
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 oci->above_context = vpx_calloc(sizeof(ENTROPY_CONTEXT_PLANES) * oci->mb_col
s, 1); | 96 oci->above_context = vpx_calloc(sizeof(ENTROPY_CONTEXT_PLANES) * oci->mb_col
s, 1); |
97 | 97 |
98 if (!oci->above_context) | 98 if (!oci->above_context) |
99 goto allocation_fail; | 99 goto allocation_fail; |
100 | 100 |
101 #if CONFIG_POSTPROC | 101 #if CONFIG_POSTPROC |
102 if (vp8_yv12_alloc_frame_buffer(&oci->post_proc_buffer, width, height, VP8BO
RDERINPIXELS) < 0) | 102 if (vp8_yv12_alloc_frame_buffer(&oci->post_proc_buffer, width, height, VP8BO
RDERINPIXELS) < 0) |
103 goto allocation_fail; | 103 goto allocation_fail; |
104 | 104 |
105 oci->post_proc_buffer_int_used = 0; | 105 oci->post_proc_buffer_int_used = 0; |
106 vpx_memset(&oci->postproc_state, 0, sizeof(oci->postproc_state)); | 106 memset(&oci->postproc_state, 0, sizeof(oci->postproc_state)); |
107 vpx_memset(oci->post_proc_buffer.buffer_alloc, 128, | 107 memset(oci->post_proc_buffer.buffer_alloc, 128, |
108 oci->post_proc_buffer.frame_size); | 108 oci->post_proc_buffer.frame_size); |
109 | 109 |
110 /* Allocate buffer to store post-processing filter coefficients. | 110 /* Allocate buffer to store post-processing filter coefficients. |
111 * | 111 * |
112 * Note: Round up mb_cols to support SIMD reads | 112 * Note: Round up mb_cols to support SIMD reads |
113 */ | 113 */ |
114 oci->pp_limits_buffer = vpx_memalign(16, 24 * ((oci->mb_cols + 1) & ~1)); | 114 oci->pp_limits_buffer = vpx_memalign(16, 24 * ((oci->mb_cols + 1) & ~1)); |
115 if (!oci->pp_limits_buffer) | 115 if (!oci->pp_limits_buffer) |
116 goto allocation_fail; | 116 goto allocation_fail; |
117 #endif | 117 #endif |
118 | 118 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 oci->mb_no_coeff_skip = 1; | 170 oci->mb_no_coeff_skip = 1; |
171 oci->no_lpf = 0; | 171 oci->no_lpf = 0; |
172 oci->filter_type = NORMAL_LOOPFILTER; | 172 oci->filter_type = NORMAL_LOOPFILTER; |
173 oci->use_bilinear_mc_filter = 0; | 173 oci->use_bilinear_mc_filter = 0; |
174 oci->full_pixel = 0; | 174 oci->full_pixel = 0; |
175 oci->multi_token_partition = ONE_PARTITION; | 175 oci->multi_token_partition = ONE_PARTITION; |
176 oci->clamp_type = RECON_CLAMP_REQUIRED; | 176 oci->clamp_type = RECON_CLAMP_REQUIRED; |
177 | 177 |
178 /* Initialize reference frame sign bias structure to defaults */ | 178 /* Initialize reference frame sign bias structure to defaults */ |
179 vpx_memset(oci->ref_frame_sign_bias, 0, sizeof(oci->ref_frame_sign_bias)); | 179 memset(oci->ref_frame_sign_bias, 0, sizeof(oci->ref_frame_sign_bias)); |
180 | 180 |
181 /* Default disable buffer to buffer copying */ | 181 /* Default disable buffer to buffer copying */ |
182 oci->copy_buffer_to_gf = 0; | 182 oci->copy_buffer_to_gf = 0; |
183 oci->copy_buffer_to_arf = 0; | 183 oci->copy_buffer_to_arf = 0; |
184 } | 184 } |
185 | 185 |
186 void vp8_remove_common(VP8_COMMON *oci) | 186 void vp8_remove_common(VP8_COMMON *oci) |
187 { | 187 { |
188 vp8_de_alloc_frame_buffers(oci); | 188 vp8_de_alloc_frame_buffers(oci); |
189 } | 189 } |
OLD | NEW |