Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Side by Side Diff: source/libvpx/vp8/encoder/bitstream.c

Issue 1339513003: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/libvpx/third_party/x86inc/x86inc.asm ('k') | source/libvpx/vp8/encoder/encodeframe.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « source/libvpx/third_party/x86inc/x86inc.asm ('k') | source/libvpx/vp8/encoder/encodeframe.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698