summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-01-18 08:26:18 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-01-18 08:26:18 +0000
commitd3e9d47103620d4525320d97cbe67a4be17f71bf (patch)
tree1a09f495a2f42331aa18ba79af71031fbe5e83be
parent7f6baa3d001fabd48b9fb77c14caeb33e47fa1be (diff)
parent1e2266b6609fbc825bd81fd5cba4025a6f255cee (diff)
downloadandroid_external_libavc-d3e9d47103620d4525320d97cbe67a4be17f71bf.tar.gz
android_external_libavc-d3e9d47103620d4525320d97cbe67a4be17f71bf.tar.bz2
android_external_libavc-d3e9d47103620d4525320d97cbe67a4be17f71bf.zip
Snap for 4551672 from 1e2266b6609fbc825bd81fd5cba4025a6f255cee to pi-release
Change-Id: I51af65aad8d22b34799bf6854a69a08559618294
-rw-r--r--encoder/ih264e_intra_modes_eval.c9
-rw-r--r--encoder/ih264e_process.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/encoder/ih264e_intra_modes_eval.c b/encoder/ih264e_intra_modes_eval.c
index 871bdd4..3edf98f 100644
--- a/encoder/ih264e_intra_modes_eval.c
+++ b/encoder/ih264e_intra_modes_eval.c
@@ -428,7 +428,8 @@ void ih264e_evaluate_intra16x16_modes_for_least_cost_rdoptoff(process_ctxt_t *ps
/* set valid intra modes for evaluation */
u4_valid_intra_modes = u1_valid_intra_modes[i4_ngbr_avbl];
- if (ps_codec->s_cfg.u4_enc_speed_preset == IVE_FAST)
+ if (ps_codec->s_cfg.u4_enc_speed_preset == IVE_FAST ||
+ ps_codec->s_cfg.u4_enc_speed_preset == IVE_FASTEST)
u4_valid_intra_modes &= ~(1 << PLANE_I16x16);
/* evaluate b/w HORZ_I16x16, VERT_I16x16 & DC_I16x16 */
@@ -440,8 +441,7 @@ void ih264e_evaluate_intra16x16_modes_for_least_cost_rdoptoff(process_ctxt_t *ps
/* cost = distortion + lambda*rate */
i4_mb_cost_least = i4_mb_distortion_least;
- if ((( (u4_valid_intra_modes >> 3) & 1) != 0) && (ps_codec->s_cfg.u4_enc_speed_preset != IVE_FASTEST ||
- ps_proc->i4_slice_type == ISLICE))
+ if (((u4_valid_intra_modes >> 3) & 1) != 0)
{
/* intra prediction for PLANE mode*/
(ps_codec->apf_intra_pred_16_l)[PLANE_I16x16](pu1_ngbr_pels_i16, pu1_pred_mb_intra_16x16_plane, 0, i4_pred_strd, i4_ngbr_avbl);
@@ -1450,7 +1450,8 @@ void ih264e_evaluate_chroma_intra8x8_modes_for_least_cost_rdoptoff(process_ctxt_
u4_valid_intra_modes = u1_valid_intra_modes[i4_ngbr_avbl];
- if (ps_codec->s_cfg.u4_enc_speed_preset == IVE_FAST)
+ if (ps_codec->s_cfg.u4_enc_speed_preset == IVE_FAST ||
+ ps_codec->s_cfg.u4_enc_speed_preset == IVE_FASTEST)
u4_valid_intra_modes &= ~(1 << PLANE_CH_I8x8);
i4_chroma_mb_distortion = INT_MAX;
diff --git a/encoder/ih264e_process.c b/encoder/ih264e_process.c
index 5fb0b88..644a5a2 100644
--- a/encoder/ih264e_process.c
+++ b/encoder/ih264e_process.c
@@ -2098,7 +2098,7 @@ WORD32 ih264e_process(process_ctxt_t *ps_proc)
}
/* If we already have the minimum sad, there is no point in searching for sad again */
- if (ps_proc->u4_min_sad_reached == 0)
+ if (ps_proc->u4_min_sad_reached == 0 || ps_codec->s_cfg.u4_enc_speed_preset != IVE_FASTEST)
{
/* intra gating in inter slices */
/* No need of gating if we want to force intra, we need to find the threshold only if inter is enabled by AIR*/