summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.c
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2013-04-11 12:16:35 -0700
committerYaowu Xu <yaowu@google.com>2013-04-12 09:23:58 -0700
commit7de5edd14adebee3b931e9b132ab22fd8e2f2aa7 (patch)
tree93165fb4558ee9aaa2b86be46d704237f79fa2bf /vp9/encoder/vp9_rdopt.c
parentaa25f6a3dff04e3453601bd041fbe3b011f92deb (diff)
downloadlibvpx-7de5edd14adebee3b931e9b132ab22fd8e2f2aa7.tar
libvpx-7de5edd14adebee3b931e9b132ab22fd8e2f2aa7.tar.gz
libvpx-7de5edd14adebee3b931e9b132ab22fd8e2f2aa7.tar.bz2
libvpx-7de5edd14adebee3b931e9b132ab22fd8e2f2aa7.zip
Rename B_PRED to I4X4_PRED
So it is consistent with I8x8_PRED. Change-Id: Iefa65124b2419690d83e526c611129c0ede29d11
Diffstat (limited to 'vp9/encoder/vp9_rdopt.c')
-rw-r--r--vp9/encoder/vp9_rdopt.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 21adf3f39..467773bbb 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -104,7 +104,7 @@ const MODE_DEFINITION vp9_mode_order[MAX_MODES] = {
{SPLITMV, GOLDEN_FRAME, NONE},
{SPLITMV, ALTREF_FRAME, NONE},
- {B_PRED, INTRA_FRAME, NONE},
+ {I4X4_PRED, INTRA_FRAME, NONE},
{I8X8_PRED, INTRA_FRAME, NONE},
/* compound prediction modes */
@@ -1026,7 +1026,7 @@ static int64_t rd_pick_intra4x4mby_modes(VP9_COMP *cpi, MACROBLOCK *mb,
int *Distortion, int64_t best_rd) {
int i;
MACROBLOCKD *const xd = &mb->e_mbd;
- int cost = mb->mbmode_cost [xd->frame_type] [B_PRED];
+ int cost = mb->mbmode_cost[xd->frame_type][I4X4_PRED];
int distortion = 0;
int tot_rate_y = 0;
int64_t total_rd = 0;
@@ -1042,7 +1042,7 @@ static int64_t rd_pick_intra4x4mby_modes(VP9_COMP *cpi, MACROBLOCK *mb,
ta = (ENTROPY_CONTEXT *)&t_above;
tl = (ENTROPY_CONTEXT *)&t_left;
- xd->mode_info_context->mbmi.mode = B_PRED;
+ xd->mode_info_context->mbmi.mode = I4X4_PRED;
bmode_costs = mb->inter_bmode_costs;
for (i = 0; i < 16; i++) {
@@ -3726,11 +3726,11 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
skippable = skippable &&
uv_intra_skippable[mbmi->txfm_size != TX_4X4];
break;
- case B_PRED: {
+ case I4X4_PRED: {
int64_t tmp_rd;
// Note the rate value returned here includes the cost of coding
- // the BPRED mode : x->mbmode_cost[xd->frame_type][BPRED];
+ // the I4X4_PRED mode : x->mbmode_cost[xd->frame_type][I4X4_PRED];
mbmi->txfm_size = TX_4X4;
tmp_rd = rd_pick_intra4x4mby_modes(cpi, x, &rate, &rate_y,
&distortion, best_yrd);
@@ -4042,9 +4042,9 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
// Note index of best mode so far
best_mode_index = mode_index;
- if (this_mode <= B_PRED) {
+ if (this_mode <= I4X4_PRED) {
if (mbmi->txfm_size != TX_4X4
- && this_mode != B_PRED
+ && this_mode != I4X4_PRED
&& this_mode != I8X8_PRED)
mbmi->uv_mode = uv_intra_mode[TX_8X8];
else
@@ -4065,7 +4065,7 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
vpx_memcpy(&best_mbmode, mbmi, sizeof(MB_MODE_INFO));
vpx_memcpy(&best_partition, x->partition_info, sizeof(PARTITION_INFO));
- if ((this_mode == B_PRED)
+ if ((this_mode == I4X4_PRED)
|| (this_mode == I8X8_PRED)
|| (this_mode == SPLITMV))
for (i = 0; i < 16; i++) {
@@ -4124,7 +4124,7 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
if (!mode_excluded && this_rd != INT64_MAX) {
for (i = 0; i < NB_TXFM_MODES; i++) {
int64_t adj_rd;
- if (this_mode != B_PRED) {
+ if (this_mode != I4X4_PRED) {
const int64_t txfm_mode_diff =
txfm_cache[i] - txfm_cache[cm->txfm_mode];
adj_rd = this_rd + txfm_mode_diff;
@@ -4142,7 +4142,7 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
assert((cm->mcomp_filter_type == SWITCHABLE) ||
(cm->mcomp_filter_type == best_mbmode.interp_filter) ||
- (best_mbmode.mode <= B_PRED));
+ (best_mbmode.mode <= I4X4_PRED));
#if CONFIG_COMP_INTERINTRA_PRED
++cpi->interintra_select_count[is_best_interintra];
@@ -4196,7 +4196,7 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
// macroblock modes
vpx_memcpy(mbmi, &best_mbmode, sizeof(MB_MODE_INFO));
- if (best_mbmode.mode == B_PRED) {
+ if (best_mbmode.mode == I4X4_PRED) {
for (i = 0; i < 16; i++) {
xd->mode_info_context->bmi[i].as_mode = best_bmodes[i].as_mode;
xd->block[i].bmi.as_mode = xd->mode_info_context->bmi[i].as_mode;
@@ -4376,7 +4376,7 @@ void vp9_rd_pick_intra_mode(VP9_COMP *cpi, MACROBLOCK *x,
} else if (error8x8 > error16x16) {
if (error4x4 < error16x16) {
rate = rateuv[TX_4X4] + rate4x4;
- mbmi->mode = B_PRED;
+ mbmi->mode = I4X4_PRED;
mbmi->txfm_size = TX_4X4;
dist = dist4x4 + (distuv[TX_4X4] >> 2);
mbmi->uv_mode = modeuv[TX_4X4];
@@ -4392,7 +4392,7 @@ void vp9_rd_pick_intra_mode(VP9_COMP *cpi, MACROBLOCK *x,
} else {
if (error4x4 < error8x8) {
rate = rateuv[TX_4X4] + rate4x4;
- mbmi->mode = B_PRED;
+ mbmi->mode = I4X4_PRED;
mbmi->txfm_size = TX_4X4;
dist = dist4x4 + (distuv[TX_4X4] >> 2);
mbmi->uv_mode = modeuv[TX_4X4];
@@ -4543,7 +4543,9 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
// if (!(cpi->ref_frame_flags & flag_list[ref_frame]))
// continue;
- if (this_mode == I8X8_PRED || this_mode == B_PRED || this_mode == SPLITMV)
+ if (this_mode == I8X8_PRED ||
+ this_mode == I4X4_PRED ||
+ this_mode == SPLITMV)
continue;
// if (vp9_mode_order[mode_index].second_ref_frame == INTRA_FRAME)
// continue;
@@ -4765,7 +4767,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
// Note index of best mode so far
best_mode_index = mode_index;
- if (this_mode <= B_PRED) {
+ if (this_mode <= I4X4_PRED) {
/* required for left and above block mv */
mbmi->mv[0].as_int = 0;
}
@@ -4831,7 +4833,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
if (!mode_excluded && this_rd != INT64_MAX) {
for (i = 0; i < NB_TXFM_MODES; i++) {
int64_t adj_rd;
- if (this_mode != B_PRED) {
+ if (this_mode != I4X4_PRED) {
adj_rd = this_rd + txfm_cache[i] - txfm_cache[cm->txfm_mode];
} else {
adj_rd = this_rd;
@@ -4847,7 +4849,7 @@ int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
assert((cm->mcomp_filter_type == SWITCHABLE) ||
(cm->mcomp_filter_type == best_mbmode.interp_filter) ||
- (best_mbmode.mode <= B_PRED));
+ (best_mbmode.mode <= I4X4_PRED));
#if CONFIG_COMP_INTERINTRA_PRED
++cpi->interintra_select_count[is_best_interintra];