| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 #include <assert.h> | 10 #include <assert.h> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 return ctx; | 82 return ctx; |
| 83 bail: | 83 bail: |
| 84 vp9_lookahead_destroy(ctx); | 84 vp9_lookahead_destroy(ctx); |
| 85 return NULL; | 85 return NULL; |
| 86 } | 86 } |
| 87 | 87 |
| 88 #define USE_PARTIAL_COPY 0 | 88 #define USE_PARTIAL_COPY 0 |
| 89 | 89 |
| 90 int vp9_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src, | 90 int vp9_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src, |
| 91 int64_t ts_start, int64_t ts_end, unsigned int flags, | 91 int64_t ts_start, int64_t ts_end, unsigned int flags) { |
| 92 unsigned char *active_map) { | |
| 93 struct lookahead_entry *buf; | 92 struct lookahead_entry *buf; |
| 94 #if USE_PARTIAL_COPY | 93 #if USE_PARTIAL_COPY |
| 95 int row, col, active_end; | 94 int row, col, active_end; |
| 96 int mb_rows = (src->y_height + 15) >> 4; | 95 int mb_rows = (src->y_height + 15) >> 4; |
| 97 int mb_cols = (src->y_width + 15) >> 4; | 96 int mb_cols = (src->y_width + 15) >> 4; |
| 98 #endif | 97 #endif |
| 99 | 98 |
| 100 if (ctx->sz + 1 > ctx->max_sz) | 99 if (ctx->sz + 1 > ctx->max_sz) |
| 101 return 1; | 100 return 1; |
| 102 ctx->sz++; | 101 ctx->sz++; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 if (index >= (int)ctx->max_sz) | 180 if (index >= (int)ctx->max_sz) |
| 182 index -= ctx->max_sz; | 181 index -= ctx->max_sz; |
| 183 buf = ctx->buf + index; | 182 buf = ctx->buf + index; |
| 184 } | 183 } |
| 185 return buf; | 184 return buf; |
| 186 } | 185 } |
| 187 | 186 |
| 188 unsigned int vp9_lookahead_depth(struct lookahead_ctx *ctx) { | 187 unsigned int vp9_lookahead_depth(struct lookahead_ctx *ctx) { |
| 189 return ctx->sz; | 188 return ctx->sz; |
| 190 } | 189 } |
| OLD | NEW |