| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   271  |   271  | 
|   272 static void init_buffer_callbacks(vpx_codec_alg_priv_t *ctx) { |   272 static void init_buffer_callbacks(vpx_codec_alg_priv_t *ctx) { | 
|   273   int i; |   273   int i; | 
|   274  |   274  | 
|   275   for (i = 0; i < ctx->num_frame_workers; ++i) { |   275   for (i = 0; i < ctx->num_frame_workers; ++i) { | 
|   276     VP9Worker *const worker = &ctx->frame_workers[i]; |   276     VP9Worker *const worker = &ctx->frame_workers[i]; | 
|   277     FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; |   277     FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; | 
|   278     VP9_COMMON *const cm = &frame_worker_data->pbi->common; |   278     VP9_COMMON *const cm = &frame_worker_data->pbi->common; | 
|   279     BufferPool *const pool = cm->buffer_pool; |   279     BufferPool *const pool = cm->buffer_pool; | 
|   280  |   280  | 
|   281     cm->new_fb_idx = -1; |   281     cm->new_fb_idx = INVALID_IDX; | 
|   282     cm->byte_alignment = ctx->byte_alignment; |   282     cm->byte_alignment = ctx->byte_alignment; | 
|   283  |   283  | 
|   284     if (ctx->get_ext_fb_cb != NULL && ctx->release_ext_fb_cb != NULL) { |   284     if (ctx->get_ext_fb_cb != NULL && ctx->release_ext_fb_cb != NULL) { | 
|   285       pool->get_fb_cb = ctx->get_ext_fb_cb; |   285       pool->get_fb_cb = ctx->get_ext_fb_cb; | 
|   286       pool->release_fb_cb = ctx->release_ext_fb_cb; |   286       pool->release_fb_cb = ctx->release_ext_fb_cb; | 
|   287       pool->cb_priv = ctx->ext_priv; |   287       pool->cb_priv = ctx->ext_priv; | 
|   288     } else { |   288     } else { | 
|   289       pool->get_fb_cb = vp9_get_frame_buffer; |   289       pool->get_fb_cb = vp9_get_frame_buffer; | 
|   290       pool->release_fb_cb = vp9_release_frame_buffer; |   290       pool->release_fb_cb = vp9_release_frame_buffer; | 
|   291  |   291  | 
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   493     winterface->execute(worker); |   493     winterface->execute(worker); | 
|   494  |   494  | 
|   495     // Update data pointer after decode. |   495     // Update data pointer after decode. | 
|   496     *data = frame_worker_data->data_end; |   496     *data = frame_worker_data->data_end; | 
|   497  |   497  | 
|   498     if (worker->had_error) |   498     if (worker->had_error) | 
|   499       return update_error_state(ctx, &frame_worker_data->pbi->common.error); |   499       return update_error_state(ctx, &frame_worker_data->pbi->common.error); | 
|   500  |   500  | 
|   501     check_resync(ctx, frame_worker_data->pbi); |   501     check_resync(ctx, frame_worker_data->pbi); | 
|   502   } else { |   502   } else { | 
|   503     const VP9WorkerInterface *const winterface = vp9_get_worker_interface(); |  | 
|   504     VP9Worker *const worker = &ctx->frame_workers[ctx->next_submit_worker_id]; |   503     VP9Worker *const worker = &ctx->frame_workers[ctx->next_submit_worker_id]; | 
|   505     FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; |   504     FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; | 
|   506     // Copy context from last worker thread to next worker thread. |   505     // Copy context from last worker thread to next worker thread. | 
|   507     if (ctx->next_submit_worker_id != ctx->last_submit_worker_id) |   506     if (ctx->next_submit_worker_id != ctx->last_submit_worker_id) | 
|   508       vp9_frameworker_copy_context( |   507       vp9_frameworker_copy_context( | 
|   509           &ctx->frame_workers[ctx->next_submit_worker_id], |   508           &ctx->frame_workers[ctx->next_submit_worker_id], | 
|   510           &ctx->frame_workers[ctx->last_submit_worker_id]); |   509           &ctx->frame_workers[ctx->last_submit_worker_id]); | 
|   511  |   510  | 
|   512     frame_worker_data->pbi->ready_for_new_data = 0; |   511     frame_worker_data->pbi->ready_for_new_data = 0; | 
|   513     // Copy the compressed data into worker's internal buffer. |   512     // Copy the compressed data into worker's internal buffer. | 
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1103     0, |  1102     0, | 
|  1104     NULL,  // vpx_codec_enc_cfg_map_t |  1103     NULL,  // vpx_codec_enc_cfg_map_t | 
|  1105     NULL,  // vpx_codec_encode_fn_t |  1104     NULL,  // vpx_codec_encode_fn_t | 
|  1106     NULL,  // vpx_codec_get_cx_data_fn_t |  1105     NULL,  // vpx_codec_get_cx_data_fn_t | 
|  1107     NULL,  // vpx_codec_enc_config_set_fn_t |  1106     NULL,  // vpx_codec_enc_config_set_fn_t | 
|  1108     NULL,  // vpx_codec_get_global_headers_fn_t |  1107     NULL,  // vpx_codec_get_global_headers_fn_t | 
|  1109     NULL,  // vpx_codec_get_preview_frame_fn_t |  1108     NULL,  // vpx_codec_get_preview_frame_fn_t | 
|  1110     NULL   // vpx_codec_enc_mr_get_mem_loc_fn_t |  1109     NULL   // vpx_codec_enc_mr_get_mem_loc_fn_t | 
|  1111   } |  1110   } | 
|  1112 }; |  1111 }; | 
| OLD | NEW |