| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 if (!ctx->priv) | 204 if (!ctx->priv) |
| 205 { | 205 { |
| 206 vpx_codec_mmap_t mmap; | 206 vpx_codec_mmap_t mmap; |
| 207 | 207 |
| 208 mmap.id = vp8_mem_req_segs[0].id; | 208 mmap.id = vp8_mem_req_segs[0].id; |
| 209 mmap.sz = sizeof(vpx_codec_alg_priv_t); | 209 mmap.sz = sizeof(vpx_codec_alg_priv_t); |
| 210 mmap.align = vp8_mem_req_segs[0].align; | 210 mmap.align = vp8_mem_req_segs[0].align; |
| 211 mmap.flags = vp8_mem_req_segs[0].flags; | 211 mmap.flags = vp8_mem_req_segs[0].flags; |
| 212 | 212 |
| 213 res = vp8_mmap_alloc(&mmap); | 213 res = vp8_mmap_alloc(&mmap); |
| 214 if (res != VPX_CODEC_OK) return res; |
| 214 | 215 |
| 215 if (!res) | 216 vp8_init_ctx(ctx, &mmap); |
| 216 { | |
| 217 vp8_init_ctx(ctx, &mmap); | |
| 218 | 217 |
| 219 /* initialize number of fragments to zero */ | 218 /* initialize number of fragments to zero */ |
| 220 ctx->priv->alg_priv->fragments.count = 0; | 219 ctx->priv->alg_priv->fragments.count = 0; |
| 221 /* is input fragments enabled? */ | 220 /* is input fragments enabled? */ |
| 222 ctx->priv->alg_priv->fragments.enabled = | 221 ctx->priv->alg_priv->fragments.enabled = |
| 223 (ctx->priv->alg_priv->base.init_flags & | 222 (ctx->priv->alg_priv->base.init_flags & |
| 224 VPX_CODEC_USE_INPUT_FRAGMENTS); | 223 VPX_CODEC_USE_INPUT_FRAGMENTS); |
| 225 | 224 |
| 226 ctx->priv->alg_priv->defer_alloc = 1; | 225 ctx->priv->alg_priv->defer_alloc = 1; |
| 227 /*post processing level initialized to do nothing */ | 226 /*post processing level initialized to do nothing */ |
| 228 } | |
| 229 } | 227 } |
| 230 | 228 |
| 231 ctx->priv->alg_priv->yv12_frame_buffers.use_frame_threads = | 229 ctx->priv->alg_priv->yv12_frame_buffers.use_frame_threads = |
| 232 (ctx->priv->alg_priv->base.init_flags & | 230 (ctx->priv->alg_priv->base.init_flags & |
| 233 VPX_CODEC_USE_FRAME_THREADING); | 231 VPX_CODEC_USE_FRAME_THREADING); |
| 234 | 232 |
| 235 /* for now, disable frame threading */ | 233 /* for now, disable frame threading */ |
| 236 ctx->priv->alg_priv->yv12_frame_buffers.use_frame_threads = 0; | 234 ctx->priv->alg_priv->yv12_frame_buffers.use_frame_threads = 0; |
| 237 | 235 |
| 238 if(ctx->priv->alg_priv->yv12_frame_buffers.use_frame_threads && | 236 if(ctx->priv->alg_priv->yv12_frame_buffers.use_frame_threads && |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 }, | 965 }, |
| 968 { /* encoder functions */ | 966 { /* encoder functions */ |
| 969 NOT_IMPLEMENTED, | 967 NOT_IMPLEMENTED, |
| 970 NOT_IMPLEMENTED, | 968 NOT_IMPLEMENTED, |
| 971 NOT_IMPLEMENTED, | 969 NOT_IMPLEMENTED, |
| 972 NOT_IMPLEMENTED, | 970 NOT_IMPLEMENTED, |
| 973 NOT_IMPLEMENTED, | 971 NOT_IMPLEMENTED, |
| 974 NOT_IMPLEMENTED | 972 NOT_IMPLEMENTED |
| 975 } | 973 } |
| 976 }; | 974 }; |
| OLD | NEW |