| OLD | NEW |
| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 worker->data1 = &cpi->tile_thr_data[i]; | 117 worker->data1 = &cpi->tile_thr_data[i]; |
| 118 worker->data2 = NULL; | 118 worker->data2 = NULL; |
| 119 thread_data = (EncWorkerData*)worker->data1; | 119 thread_data = (EncWorkerData*)worker->data1; |
| 120 | 120 |
| 121 // Before encoding a frame, copy the thread data from cpi. | 121 // Before encoding a frame, copy the thread data from cpi. |
| 122 if (thread_data->td != &cpi->td) { | 122 if (thread_data->td != &cpi->td) { |
| 123 thread_data->td->mb = cpi->td.mb; | 123 thread_data->td->mb = cpi->td.mb; |
| 124 thread_data->td->rd_counts = cpi->td.rd_counts; | 124 thread_data->td->rd_counts = cpi->td.rd_counts; |
| 125 } | 125 } |
| 126 if (thread_data->td->counts != &cpi->common.counts) { | 126 if (thread_data->td->counts != &cpi->common.counts) { |
| 127 vpx_memcpy(thread_data->td->counts, &cpi->common.counts, | 127 memcpy(thread_data->td->counts, &cpi->common.counts, |
| 128 sizeof(cpi->common.counts)); | 128 sizeof(cpi->common.counts)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 // Handle use_nonrd_pick_mode case. | 131 // Handle use_nonrd_pick_mode case. |
| 132 if (cpi->sf.use_nonrd_pick_mode) { | 132 if (cpi->sf.use_nonrd_pick_mode) { |
| 133 MACROBLOCK *const x = &thread_data->td->mb; | 133 MACROBLOCK *const x = &thread_data->td->mb; |
| 134 MACROBLOCKD *const xd = &x->e_mbd; | 134 MACROBLOCKD *const xd = &x->e_mbd; |
| 135 struct macroblock_plane *const p = x->plane; | 135 struct macroblock_plane *const p = x->plane; |
| 136 struct macroblockd_plane *const pd = xd->plane; | 136 struct macroblockd_plane *const pd = xd->plane; |
| 137 PICK_MODE_CONTEXT *ctx = &thread_data->td->pc_root->none; | 137 PICK_MODE_CONTEXT *ctx = &thread_data->td->pc_root->none; |
| 138 int j; | 138 int j; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 VP9Worker *const worker = &cpi->workers[i]; | 170 VP9Worker *const worker = &cpi->workers[i]; |
| 171 EncWorkerData *const thread_data = (EncWorkerData*)worker->data1; | 171 EncWorkerData *const thread_data = (EncWorkerData*)worker->data1; |
| 172 | 172 |
| 173 // Accumulate counters. | 173 // Accumulate counters. |
| 174 if (i < num_workers - 1) { | 174 if (i < num_workers - 1) { |
| 175 vp9_accumulate_frame_counts(cm, thread_data->td->counts, 0); | 175 vp9_accumulate_frame_counts(cm, thread_data->td->counts, 0); |
| 176 accumulate_rd_opt(&cpi->td, thread_data->td); | 176 accumulate_rd_opt(&cpi->td, thread_data->td); |
| 177 } | 177 } |
| 178 } | 178 } |
| 179 } | 179 } |
| OLD | NEW |