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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_bitstream.c

Issue 17451020: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp9/decoder/vp9_decodframe.c ('k') | source/libvpx/vp9/encoder/vp9_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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 int bh = 1 << b_height_log2(mi->sb_type); 701 int bh = 1 << b_height_log2(mi->sb_type);
702 for (idy = 0; idy < 2; idy += bh) 702 for (idy = 0; idy < 2; idy += bh)
703 for (idx = 0; idx < 2; idx += bw) { 703 for (idx = 0; idx < 2; idx += bw) {
704 MB_PREDICTION_MODE bm = m->bmi[idy * 2 + idx].as_mode.first; 704 MB_PREDICTION_MODE bm = m->bmi[idy * 2 + idx].as_mode.first;
705 write_intra_mode(bc, bm, pc->fc.y_mode_prob[0]); 705 write_intra_mode(bc, bm, pc->fc.y_mode_prob[0]);
706 } 706 }
707 } 707 }
708 write_intra_mode(bc, mi->uv_mode, 708 write_intra_mode(bc, mi->uv_mode,
709 pc->fc.uv_mode_prob[mode]); 709 pc->fc.uv_mode_prob[mode]);
710 } else { 710 } else {
711 vp9_prob mv_ref_p[VP9_INTER_MODES - 1]; 711 vp9_prob *mv_ref_p;
712 712
713 encode_ref_frame(cpi, bc); 713 encode_ref_frame(cpi, bc);
714 714
715 vp9_mv_ref_probs(&cpi->common, mv_ref_p, mi->mb_mode_context[rf]); 715 mv_ref_p = cpi->common.fc.inter_mode_probs[mi->mb_mode_context[rf]];
716 716
717 #ifdef ENTROPY_STATS 717 #ifdef ENTROPY_STATS
718 active_section = 3; 718 active_section = 3;
719 #endif 719 #endif
720 720
721 // If segment skip is not enabled code the mode. 721 // If segment skip is not enabled code the mode.
722 if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) { 722 if (!vp9_segfeature_active(xd, segment_id, SEG_LVL_SKIP)) {
723 if (mi->sb_type >= BLOCK_SIZE_SB8X8) { 723 if (mi->sb_type >= BLOCK_SIZE_SB8X8) {
724 write_sb_mv_ref(bc, mode, mv_ref_p); 724 write_sb_mv_ref(bc, mode, mv_ref_p);
725 vp9_accum_mv_refs(&cpi->common, mode, mi->mb_mode_context[rf]); 725 vp9_accum_mv_refs(&cpi->common, mode, mi->mb_mode_context[rf]);
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1812 "vp9_coef_update_probs_16x16[BLOCK_TYPES]"); 1812 "vp9_coef_update_probs_16x16[BLOCK_TYPES]");
1813 print_tree_update_for_type(f, tree_update_hist[TX_32X32], BLOCK_TYPES, 1813 print_tree_update_for_type(f, tree_update_hist[TX_32X32], BLOCK_TYPES,
1814 "vp9_coef_update_probs_32x32[BLOCK_TYPES]"); 1814 "vp9_coef_update_probs_32x32[BLOCK_TYPES]");
1815 1815
1816 fclose(f); 1816 fclose(f);
1817 f = fopen("treeupdate.bin", "wb"); 1817 f = fopen("treeupdate.bin", "wb");
1818 fwrite(tree_update_hist, sizeof(tree_update_hist), 1, f); 1818 fwrite(tree_update_hist, sizeof(tree_update_hist), 1, f);
1819 fclose(f); 1819 fclose(f);
1820 } 1820 }
1821 #endif 1821 #endif
OLDNEW
« no previous file with comments | « source/libvpx/vp9/decoder/vp9_decodframe.c ('k') | source/libvpx/vp9/encoder/vp9_encodeframe.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698