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

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

Issue 1029663003: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 9 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
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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 if (cpi->oxcf.aq_mode == COMPLEXITY_AQ) { 861 if (cpi->oxcf.aq_mode == COMPLEXITY_AQ) {
862 const uint8_t *const map = seg->update_map ? cpi->segmentation_map 862 const uint8_t *const map = seg->update_map ? cpi->segmentation_map
863 : cm->last_frame_seg_map; 863 : cm->last_frame_seg_map;
864 mi_addr->mbmi.segment_id = 864 mi_addr->mbmi.segment_id =
865 vp9_get_segment_id(cm, map, bsize, mi_row, mi_col); 865 vp9_get_segment_id(cm, map, bsize, mi_row, mi_col);
866 } 866 }
867 // Else for cyclic refresh mode update the segment map, set the segment id 867 // Else for cyclic refresh mode update the segment map, set the segment id
868 // and then update the quantizer. 868 // and then update the quantizer.
869 if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) { 869 if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) {
870 vp9_cyclic_refresh_update_segment(cpi, &xd->mi[0].src_mi->mbmi, mi_row, 870 vp9_cyclic_refresh_update_segment(cpi, &xd->mi[0].src_mi->mbmi, mi_row,
871 mi_col, bsize, ctx->rate, ctx->dist); 871 mi_col, bsize, ctx->rate, ctx->dist,
872 x->skip);
872 } 873 }
873 } 874 }
874 875
875 max_plane = is_inter_block(mbmi) ? MAX_MB_PLANE : 1; 876 max_plane = is_inter_block(mbmi) ? MAX_MB_PLANE : 1;
876 for (i = 0; i < max_plane; ++i) { 877 for (i = 0; i < max_plane; ++i) {
877 p[i].coeff = ctx->coeff_pbuf[i][1]; 878 p[i].coeff = ctx->coeff_pbuf[i][1];
878 p[i].qcoeff = ctx->qcoeff_pbuf[i][1]; 879 p[i].qcoeff = ctx->qcoeff_pbuf[i][1];
879 pd[i].dqcoeff = ctx->dqcoeff_pbuf[i][1]; 880 pd[i].dqcoeff = ctx->dqcoeff_pbuf[i][1];
880 p[i].eobs = ctx->eobs_pbuf[i][1]; 881 p[i].eobs = ctx->eobs_pbuf[i][1];
881 } 882 }
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 // For in frame complexity AQ or variance AQ, copy segment_id from 1551 // For in frame complexity AQ or variance AQ, copy segment_id from
1551 // segmentation_map. 1552 // segmentation_map.
1552 if (cpi->oxcf.aq_mode == COMPLEXITY_AQ || 1553 if (cpi->oxcf.aq_mode == COMPLEXITY_AQ ||
1553 cpi->oxcf.aq_mode == VARIANCE_AQ ) { 1554 cpi->oxcf.aq_mode == VARIANCE_AQ ) {
1554 const uint8_t *const map = seg->update_map ? cpi->segmentation_map 1555 const uint8_t *const map = seg->update_map ? cpi->segmentation_map
1555 : cm->last_frame_seg_map; 1556 : cm->last_frame_seg_map;
1556 mbmi->segment_id = vp9_get_segment_id(cm, map, bsize, mi_row, mi_col); 1557 mbmi->segment_id = vp9_get_segment_id(cm, map, bsize, mi_row, mi_col);
1557 } else { 1558 } else {
1558 // Setting segmentation map for cyclic_refresh. 1559 // Setting segmentation map for cyclic_refresh.
1559 vp9_cyclic_refresh_update_segment(cpi, mbmi, mi_row, mi_col, bsize, 1560 vp9_cyclic_refresh_update_segment(cpi, mbmi, mi_row, mi_col, bsize,
1560 ctx->rate, ctx->dist); 1561 ctx->rate, ctx->dist, x->skip);
1561 } 1562 }
1562 vp9_init_plane_quantizers(cpi, x); 1563 vp9_init_plane_quantizers(cpi, x);
1563 } 1564 }
1564 1565
1565 if (is_inter_block(mbmi)) { 1566 if (is_inter_block(mbmi)) {
1566 vp9_update_mv_count(td); 1567 vp9_update_mv_count(td);
1567 if (cm->interp_filter == SWITCHABLE) { 1568 if (cm->interp_filter == SWITCHABLE) {
1568 const int pred_ctx = vp9_get_pred_context_switchable_interp(xd); 1569 const int pred_ctx = vp9_get_pred_context_switchable_interp(xd);
1569 ++td->counts->switchable_interp[pred_ctx][mbmi->interp_filter]; 1570 ++td->counts->switchable_interp[pred_ctx][mbmi->interp_filter];
1570 } 1571 }
(...skipping 2551 matching lines...) Expand 10 before | Expand all | Expand 10 after
4122 4123
4123 for (y = 0; y < mi_height; y++) 4124 for (y = 0; y < mi_height; y++)
4124 for (x = 0; x < mi_width; x++) 4125 for (x = 0; x < mi_width; x++)
4125 if (mi_col + x < cm->mi_cols && mi_row + y < cm->mi_rows) 4126 if (mi_col + x < cm->mi_cols && mi_row + y < cm->mi_rows)
4126 mi_8x8[mis * y + x].src_mi->mbmi.tx_size = tx_size; 4127 mi_8x8[mis * y + x].src_mi->mbmi.tx_size = tx_size;
4127 } 4128 }
4128 ++td->counts->tx.tx_totals[mbmi->tx_size]; 4129 ++td->counts->tx.tx_totals[mbmi->tx_size];
4129 ++td->counts->tx.tx_totals[get_uv_tx_size(mbmi, &xd->plane[1])]; 4130 ++td->counts->tx.tx_totals[get_uv_tx_size(mbmi, &xd->plane[1])];
4130 } 4131 }
4131 } 4132 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_aq_cyclicrefresh.c ('k') | source/libvpx/vp9/encoder/vp9_pickmode.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698