| 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 400 |
| 401 vp8_pack_tokens(w, p, tokens); | 401 vp8_pack_tokens(w, p, tokens); |
| 402 } | 402 } |
| 403 | 403 |
| 404 vp8_stop_encode(w); | 404 vp8_stop_encode(w); |
| 405 ptr += w->pos; | 405 ptr += w->pos; |
| 406 } | 406 } |
| 407 } | 407 } |
| 408 | 408 |
| 409 | 409 |
| 410 #if CONFIG_MULTITHREAD |
| 410 static void pack_mb_row_tokens(VP8_COMP *cpi, vp8_writer *w) | 411 static void pack_mb_row_tokens(VP8_COMP *cpi, vp8_writer *w) |
| 411 { | 412 { |
| 412 int mb_row; | 413 int mb_row; |
| 413 | 414 |
| 414 for (mb_row = 0; mb_row < cpi->common.mb_rows; mb_row++) | 415 for (mb_row = 0; mb_row < cpi->common.mb_rows; mb_row++) |
| 415 { | 416 { |
| 416 const TOKENEXTRA *p = cpi->tplist[mb_row].start; | 417 const TOKENEXTRA *p = cpi->tplist[mb_row].start; |
| 417 const TOKENEXTRA *stop = cpi->tplist[mb_row].stop; | 418 const TOKENEXTRA *stop = cpi->tplist[mb_row].stop; |
| 418 int tokens = (int)(stop - p); | 419 int tokens = (int)(stop - p); |
| 419 | 420 |
| 420 vp8_pack_tokens(w, p, tokens); | 421 vp8_pack_tokens(w, p, tokens); |
| 421 } | 422 } |
| 422 | 423 |
| 423 } | 424 } |
| 425 #endif // CONFIG_MULTITHREAD |
| 424 | 426 |
| 425 static void write_mv_ref | 427 static void write_mv_ref |
| 426 ( | 428 ( |
| 427 vp8_writer *w, MB_PREDICTION_MODE m, const vp8_prob *p | 429 vp8_writer *w, MB_PREDICTION_MODE m, const vp8_prob *p |
| 428 ) | 430 ) |
| 429 { | 431 { |
| 430 #if CONFIG_DEBUG | 432 #if CONFIG_DEBUG |
| 431 assert(NEARESTMV <= m && m <= SPLITMV); | 433 assert(NEARESTMV <= m && m <= SPLITMV); |
| 432 #endif | 434 #endif |
| 433 vp8_write_token(w, vp8_mv_ref_tree, p, | 435 vp8_write_token(w, vp8_mv_ref_tree, p, |
| (...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1668 else | 1670 else |
| 1669 { | 1671 { |
| 1670 bc[1].error = &pc->error; | 1672 bc[1].error = &pc->error; |
| 1671 | 1673 |
| 1672 vp8_start_encode(&cpi->bc[1], cx_data, cx_data_end); | 1674 vp8_start_encode(&cpi->bc[1], cx_data, cx_data_end); |
| 1673 | 1675 |
| 1674 #if CONFIG_MULTITHREAD | 1676 #if CONFIG_MULTITHREAD |
| 1675 if (cpi->b_multi_threaded) | 1677 if (cpi->b_multi_threaded) |
| 1676 pack_mb_row_tokens(cpi, &cpi->bc[1]); | 1678 pack_mb_row_tokens(cpi, &cpi->bc[1]); |
| 1677 else | 1679 else |
| 1678 #endif | 1680 #endif // CONFIG_MULTITHREAD |
| 1679 vp8_pack_tokens(&cpi->bc[1], cpi->tok, cpi->tok_count); | 1681 vp8_pack_tokens(&cpi->bc[1], cpi->tok, cpi->tok_count); |
| 1680 | 1682 |
| 1681 vp8_stop_encode(&cpi->bc[1]); | 1683 vp8_stop_encode(&cpi->bc[1]); |
| 1682 | 1684 |
| 1683 *size += cpi->bc[1].pos; | 1685 *size += cpi->bc[1].pos; |
| 1684 cpi->partition_sz[1] = cpi->bc[1].pos; | 1686 cpi->partition_sz[1] = cpi->bc[1].pos; |
| 1685 } | 1687 } |
| 1686 #endif | 1688 #endif |
| 1687 } | 1689 } |
| 1688 | 1690 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1728 fprintf(f, " },\n"); | 1730 fprintf(f, " },\n"); |
| 1729 } | 1731 } |
| 1730 | 1732 |
| 1731 fprintf(f, " },\n"); | 1733 fprintf(f, " },\n"); |
| 1732 } | 1734 } |
| 1733 | 1735 |
| 1734 fprintf(f, "};\n"); | 1736 fprintf(f, "};\n"); |
| 1735 fclose(f); | 1737 fclose(f); |
| 1736 } | 1738 } |
| 1737 #endif | 1739 #endif |
| OLD | NEW |