From f3739f905226bfaa8e0e1eb7ce16b1adc86f3895 Mon Sep 17 00:00:00 2001 From: Dmitry Kovalev Date: Mon, 14 Apr 2014 14:09:39 -0700 Subject: Consistent mode names. Change-Id: Icb4851d98c951506fe5d73d8d5a8ac7e53fecfd0 --- vp9/encoder/vp9_onyx_if.c | 16 ++++++++-------- vp9/encoder/vp9_onyx_int.h | 12 ++++++------ vp9/encoder/vp9_rdopt.c | 8 ++++---- vp9/encoder/vp9_speed_features.c | 14 +++++++------- 4 files changed, 25 insertions(+), 25 deletions(-) (limited to 'vp9/encoder') diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 1d70538c6..4c0b52f7f 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -376,7 +376,7 @@ static void update_reference_segmentation_map(VP9_COMP *cpi) { } } static int is_slowest_mode(int mode) { - return (mode == MODE_SECONDPASS_BEST || mode == MODE_BESTQUALITY); + return (mode == TWO_PASS_SECOND_BEST || mode == ONE_PASS_BEST); } static void set_rd_speed_thresholds(VP9_COMP *cpi) { @@ -670,7 +670,7 @@ static void init_config(struct VP9_COMP *cpi, VP9_CONFIG *oxcf) { if ((cpi->svc.number_temporal_layers > 1 && cpi->oxcf.end_usage == USAGE_STREAM_FROM_SERVER) || (cpi->svc.number_spatial_layers > 1 && - cpi->oxcf.mode == MODE_SECONDPASS_BEST)) { + cpi->oxcf.mode == TWO_PASS_SECOND_BEST)) { vp9_init_layer_context(cpi); } @@ -710,29 +710,29 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9_CONFIG *oxcf) { switch (cpi->oxcf.mode) { // Real time and one pass deprecated in test code base - case MODE_GOODQUALITY: + case ONE_PASS_GOOD: cpi->pass = 0; cpi->oxcf.cpu_used = clamp(cpi->oxcf.cpu_used, -5, 5); break; - case MODE_BESTQUALITY: + case ONE_PASS_BEST: cpi->pass = 0; break; - case MODE_FIRSTPASS: + case TWO_PASS_FIRST: cpi->pass = 1; break; - case MODE_SECONDPASS: + case TWO_PASS_SECOND_GOOD: cpi->pass = 2; cpi->oxcf.cpu_used = clamp(cpi->oxcf.cpu_used, -5, 5); break; - case MODE_SECONDPASS_BEST: + case TWO_PASS_SECOND_BEST: cpi->pass = 2; break; - case MODE_REALTIME: + case REALTIME: cpi->pass = 0; break; } diff --git a/vp9/encoder/vp9_onyx_int.h b/vp9/encoder/vp9_onyx_int.h index 9ad6ae49e..07cef03e1 100644 --- a/vp9/encoder/vp9_onyx_int.h +++ b/vp9/encoder/vp9_onyx_int.h @@ -142,33 +142,33 @@ typedef enum { // Good Quality Fast Encoding. The encoder balances quality with the // amount of time it takes to encode the output. (speed setting // controls how fast) - MODE_GOODQUALITY = 1, + ONE_PASS_GOOD = 1, // One Pass - Best Quality. The encoder places priority on the // quality of the output over encoding speed. The output is compressed // at the highest possible quality. This option takes the longest // amount of time to encode. (speed setting ignored) - MODE_BESTQUALITY = 2, + ONE_PASS_BEST = 2, // Two Pass - First Pass. The encoder generates a file of statistics // for use in the second encoding pass. (speed setting controls how fast) - MODE_FIRSTPASS = 3, + TWO_PASS_FIRST = 3, // Two Pass - Second Pass. The encoder uses the statistics that were // generated in the first encoding pass to create the compressed // output. (speed setting controls how fast) - MODE_SECONDPASS = 4, + TWO_PASS_SECOND_GOOD = 4, // Two Pass - Second Pass Best. The encoder uses the statistics that // were generated in the first encoding pass to create the compressed // output using the highest possible quality, and taking a // longer amount of time to encode. (speed setting ignored) - MODE_SECONDPASS_BEST = 5, + TWO_PASS_SECOND_BEST = 5, // Realtime/Live Encoding. This mode is optimized for realtime // encoding (for example, capturing a television signal or feed from // a live camera). (speed setting controls how fast) - MODE_REALTIME = 6, + REALTIME = 6, } MODE; typedef enum { diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 7ef21fa5d..caa8008ba 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -1806,8 +1806,8 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x, if (best_rd < label_mv_thresh) break; - if (cpi->oxcf.mode != MODE_SECONDPASS_BEST && - cpi->oxcf.mode != MODE_BESTQUALITY) { + if (cpi->oxcf.mode != TWO_PASS_SECOND_BEST && + cpi->oxcf.mode != ONE_PASS_BEST) { // use previous block's result as next block's MV predictor. if (i > 0) { bsi->mvp.as_int = mi->bmi[i - 1].as_mv[0].as_int; @@ -1883,8 +1883,8 @@ static void rd_check_segment_txsize(VP9_COMP *cpi, MACROBLOCK *x, } // Should we do a full search (best quality only) - if (cpi->oxcf.mode == MODE_BESTQUALITY || - cpi->oxcf.mode == MODE_SECONDPASS_BEST) { + if (cpi->oxcf.mode == ONE_PASS_BEST || + cpi->oxcf.mode == TWO_PASS_SECOND_BEST) { int_mv *const best_mv = &mi->bmi[i].as_mv[0]; /* Check if mvp_full is within the range. */ clamp_mv(&mvp_full, x->mv_col_min, x->mv_col_max, diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index adad800b6..bc1093070 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -346,16 +346,16 @@ void vp9_set_speed_features(VP9_COMP *cpi) { sf->recode_tolerance = 25; switch (oxcf->mode) { - case MODE_BESTQUALITY: - case MODE_SECONDPASS_BEST: // This is the best quality mode. + case ONE_PASS_BEST: + case TWO_PASS_SECOND_BEST: // This is the best quality mode. cpi->diamond_search_sad = vp9_full_range_search; break; - case MODE_FIRSTPASS: - case MODE_GOODQUALITY: - case MODE_SECONDPASS: + case TWO_PASS_FIRST: + case ONE_PASS_GOOD: + case TWO_PASS_SECOND_GOOD: set_good_speed_feature(cpi, cm, sf, speed); break; - case MODE_REALTIME: + case REALTIME: set_rt_speed_feature(cm, sf, speed); break; } @@ -378,7 +378,7 @@ void vp9_set_speed_features(VP9_COMP *cpi) { cpi->mb.optimize = sf->optimize_coefficients == 1 && cpi->pass != 1; - if (cpi->encode_breakout && oxcf->mode == MODE_REALTIME && + if (cpi->encode_breakout && oxcf->mode == REALTIME && sf->encode_breakout_thresh > cpi->encode_breakout) cpi->encode_breakout = sf->encode_breakout_thresh; -- cgit v1.2.3