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 |
11 #include "onyx_int.h" | 11 #include "onyx_int.h" |
12 #include "vp8/common/threading.h" | 12 #include "vp8/common/threading.h" |
13 #include "vp8/common/common.h" | 13 #include "vp8/common/common.h" |
14 #include "vp8/common/extend.h" | 14 #include "vp8/common/extend.h" |
15 #include "bitstream.h" | 15 #include "bitstream.h" |
16 #include "encodeframe.h" | 16 #include "encodeframe.h" |
17 | 17 |
18 #if CONFIG_MULTITHREAD | 18 #if CONFIG_MULTITHREAD |
19 | 19 |
| 20 extern int vp8cx_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x, |
| 21 TOKENEXTRA **t, |
| 22 int recon_yoffset, int recon_uvoffset, |
| 23 int mb_row, int mb_col); |
| 24 extern int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x, |
| 25 TOKENEXTRA **t); |
20 extern void vp8cx_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x, int ok_to_skip
); | 26 extern void vp8cx_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x, int ok_to_skip
); |
21 | 27 |
22 extern void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm); | 28 extern void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm); |
23 | 29 |
24 static THREAD_FUNCTION thread_loopfilter(void *p_data) | 30 static THREAD_FUNCTION thread_loopfilter(void *p_data) |
25 { | 31 { |
26 VP8_COMP *cpi = (VP8_COMP *)(((LPFTHREAD_DATA *)p_data)->ptr1); | 32 VP8_COMP *cpi = (VP8_COMP *)(((LPFTHREAD_DATA *)p_data)->ptr1); |
27 VP8_COMMON *cm = &cpi->common; | 33 VP8_COMMON *cm = &cpi->common; |
28 | 34 |
29 while (1) | 35 while (1) |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 vp8_build_block_offsets(mb); | 470 vp8_build_block_offsets(mb); |
465 | 471 |
466 mbd->left_context = &cm->left_context; | 472 mbd->left_context = &cm->left_context; |
467 mb->mvc = cm->fc.mvc; | 473 mb->mvc = cm->fc.mvc; |
468 | 474 |
469 setup_mbby_copy(&mbr_ei[i].mb, x); | 475 setup_mbby_copy(&mbr_ei[i].mb, x); |
470 | 476 |
471 mbd->fullpixel_mask = 0xffffffff; | 477 mbd->fullpixel_mask = 0xffffffff; |
472 if(cm->full_pixel) | 478 if(cm->full_pixel) |
473 mbd->fullpixel_mask = 0xfffffff8; | 479 mbd->fullpixel_mask = 0xfffffff8; |
474 | |
475 vp8_zero(mb->coef_counts); | |
476 vp8_zero(x->ymode_count); | |
477 mb->skip_true_count = 0; | |
478 vp8_zero(mb->MVcount); | |
479 mb->prediction_error = 0; | |
480 mb->intra_error = 0; | |
481 } | 480 } |
482 } | 481 } |
483 | 482 |
484 int vp8cx_create_encoder_threads(VP8_COMP *cpi) | 483 int vp8cx_create_encoder_threads(VP8_COMP *cpi) |
485 { | 484 { |
486 const VP8_COMMON * cm = &cpi->common; | 485 const VP8_COMMON * cm = &cpi->common; |
487 | 486 |
488 cpi->b_multi_threaded = 0; | 487 cpi->b_multi_threaded = 0; |
489 cpi->encoding_thread_count = 0; | 488 cpi->encoding_thread_count = 0; |
490 cpi->b_lpf_running = 0; | 489 cpi->b_lpf_running = 0; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 sem_destroy(&cpi->h_event_start_lpf); | 632 sem_destroy(&cpi->h_event_start_lpf); |
634 | 633 |
635 /* free thread related resources */ | 634 /* free thread related resources */ |
636 vpx_free(cpi->h_event_start_encoding); | 635 vpx_free(cpi->h_event_start_encoding); |
637 vpx_free(cpi->h_encoding_thread); | 636 vpx_free(cpi->h_encoding_thread); |
638 vpx_free(cpi->mb_row_ei); | 637 vpx_free(cpi->mb_row_ei); |
639 vpx_free(cpi->en_thread_data); | 638 vpx_free(cpi->en_thread_data); |
640 } | 639 } |
641 } | 640 } |
642 #endif | 641 #endif |
OLD | NEW |