diff options
author | Jingning Han <jingning@google.com> | 2014-06-30 09:49:48 -0700 |
---|---|---|
committer | Jingning Han <jingning@google.com> | 2014-06-30 10:59:04 -0700 |
commit | 30ab37019c59b166c34199e1ce215d78a8c196b2 (patch) | |
tree | fb4a2bea83ff7f1d2fb947a9f56b106139817a5b /vp9 | |
parent | 9d41313e4bd28d3c504c26079cbe4a499e7eceb7 (diff) | |
download | libvpx-30ab37019c59b166c34199e1ce215d78a8c196b2.tar libvpx-30ab37019c59b166c34199e1ce215d78a8c196b2.tar.gz libvpx-30ab37019c59b166c34199e1ce215d78a8c196b2.tar.bz2 libvpx-30ab37019c59b166c34199e1ce215d78a8c196b2.zip |
Remove unused set_mode_info function
When the frame is intra coded only, the encoder takes the RD
coding flow. Hence the function set_mode_info is not practically
in use. This commit removes it and the associated conditional
branches.
Change-Id: I1e42659ceb55b771ba712d1cdecacb446aa6460d
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_encodeframe.c | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c index d41355136..e74d28cbb 100644 --- a/vp9/encoder/vp9_encodeframe.c +++ b/vp9/encoder/vp9_encodeframe.c @@ -2391,20 +2391,6 @@ static TX_MODE select_tx_mode(const VP9_COMP *cpi) { } } -static void set_mode_info(MB_MODE_INFO *mbmi, BLOCK_SIZE bsize, - PREDICTION_MODE mode) { - mbmi->mode = mode; - mbmi->uv_mode = mode; - mbmi->mv[0].as_int = 0; - mbmi->mv[1].as_int = 0; - mbmi->ref_frame[0] = INTRA_FRAME; - mbmi->ref_frame[1] = NONE; - mbmi->tx_size = max_txsize_lookup[bsize]; - mbmi->skip = 0; - mbmi->sb_type = bsize; - mbmi->segment_id = 0; -} - static void nonrd_pick_sb_modes(VP9_COMP *cpi, const TileInfo *const tile, int mi_row, int mi_col, int *rate, int64_t *dist, @@ -2417,19 +2403,15 @@ static void nonrd_pick_sb_modes(VP9_COMP *cpi, const TileInfo *const tile, mbmi = &xd->mi[0]->mbmi; mbmi->sb_type = bsize; - if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled) { + if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && cm->seg.enabled) if (mbmi->segment_id && x->in_static_area) x->rdmult = vp9_cyclic_refresh_get_rdmult(cpi->cyclic_refresh); - } - if (!frame_is_intra_only(cm)) { - if (vp9_segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) - set_mode_info_seg_skip(x, cm->tx_mode, rate, dist, bsize); - else - vp9_pick_inter_mode(cpi, x, tile, mi_row, mi_col, rate, dist, bsize); - } else { - set_mode_info(&xd->mi[0]->mbmi, bsize, DC_PRED); - } + if (vp9_segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) + set_mode_info_seg_skip(x, cm->tx_mode, rate, dist, bsize); + else + vp9_pick_inter_mode(cpi, x, tile, mi_row, mi_col, rate, dist, bsize); + duplicate_mode_info_in_sb(cm, xd, mi_row, mi_col, bsize); } @@ -3040,7 +3022,7 @@ static void encode_tiles(VP9_COMP *cpi) { vp9_tile_init(&tile, cm, tile_row, tile_col); for (mi_row = tile.mi_row_start; mi_row < tile.mi_row_end; mi_row += MI_BLOCK_SIZE) { - if (cpi->sf.use_nonrd_pick_mode && cm->frame_type != KEY_FRAME) + if (cpi->sf.use_nonrd_pick_mode && !frame_is_intra_only(cm)) encode_nonrd_sb_row(cpi, &tile, mi_row, &tok); else encode_rd_sb_row(cpi, &tile, mi_row, &tok); |