diff options
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_pickmode.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index c3629ddd9..f8a5e6ae7 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -401,7 +401,11 @@ static void block_yrd(VP9_COMP *cpi, MACROBLOCK *x, int *rate, int64_t *dist, } *dist += vp9_block_error(coeff, dqcoeff, step << 4, &this_sse) >> shift; - *rate += (int)vp9_satd((const int16_t *)qcoeff, step << 4); + + if (*eob == 1) + *rate += (int)abs(qcoeff[0]); + else if (*eob > 1) + *rate += (int)vp9_satd((const int16_t *)qcoeff, step << 4); *sse += (this_sse >> shift); *skippable &= (*eob == 0); |