summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2016-04-25 14:34:41 -0700
committerMarco <marpan@google.com>2016-04-25 15:29:11 -0700
commit9f90473ef898d0ce41e053f1c529040795224ea1 (patch)
treec453b2a9a86167f8fbb6f8c14a4dd87bd5c5e9eb /vp9
parent97d8adef8203201e9247c1ca0e2e588ddcff9020 (diff)
downloadlibvpx-9f90473ef898d0ce41e053f1c529040795224ea1.tar
libvpx-9f90473ef898d0ce41e053f1c529040795224ea1.tar.gz
libvpx-9f90473ef898d0ce41e053f1c529040795224ea1.tar.bz2
libvpx-9f90473ef898d0ce41e053f1c529040795224ea1.zip
vp9: Fix condition to update consec_zero_mv.
Fix will reset the consec_zero_mv map on non-skipped blocks with non-zero mv. Adjust thresholds on consec_zero_mv in noise estimation and skin detection, as more possible reset on map means lower thresholds should be used. Change-Id: Ibe8520057472b3609585260b51b6f95a38fb777d
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_encodeframe.c3
-rw-r--r--vp9/encoder/vp9_noise_estimate.c2
-rw-r--r--vp9/encoder/vp9_skin_detection.c4
3 files changed, 4 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 5b679d25e..bedb4af6d 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -4295,8 +4295,7 @@ static void update_zeromv_cnt(VP9_COMP *const cpi,
for (y = 0; y < ymis; y++)
for (x = 0; x < xmis; x++) {
int map_offset = block_index + y * cm->mi_cols + x;
- if (is_inter_block(mi) && mi->skip &&
- mi->segment_id <= CR_SEGMENT_ID_BOOST2) {
+ if (is_inter_block(mi) && mi->segment_id <= CR_SEGMENT_ID_BOOST2) {
if (abs(mv.row) < 8 && abs(mv.col) < 8) {
if (cpi->consec_zero_mv[map_offset] < 255)
cpi->consec_zero_mv[map_offset]++;
diff --git a/vp9/encoder/vp9_noise_estimate.c b/vp9/encoder/vp9_noise_estimate.c
index d4fee6f9b..c3351afe0 100644
--- a/vp9/encoder/vp9_noise_estimate.c
+++ b/vp9/encoder/vp9_noise_estimate.c
@@ -102,7 +102,7 @@ void vp9_update_noise_estimate(VP9_COMP *const cpi) {
NOISE_ESTIMATE *const ne = &cpi->noise_estimate;
// Estimate of noise level every frame_period frames.
int frame_period = 10;
- int thresh_consec_zeromv = 8;
+ int thresh_consec_zeromv = 6;
unsigned int thresh_sum_diff = 100;
unsigned int thresh_sum_spatial = (200 * 200) << 8;
unsigned int thresh_spatial_var = (32 * 32) << 8;
diff --git a/vp9/encoder/vp9_skin_detection.c b/vp9/encoder/vp9_skin_detection.c
index ff0dfce67..a6d67cf6a 100644
--- a/vp9/encoder/vp9_skin_detection.c
+++ b/vp9/encoder/vp9_skin_detection.c
@@ -88,7 +88,7 @@ int vp9_compute_skin_block(const uint8_t *y, const uint8_t *u, const uint8_t *v,
int stride, int strideuv, int bsize,
int consec_zeromv, int curr_motion_magn) {
// No skin if block has been zero/small motion for long consecutive time.
- if (consec_zeromv > 80 && curr_motion_magn == 0) {
+ if (consec_zeromv > 60 && curr_motion_magn == 0) {
return 0;
} else {
int motion = 1;
@@ -100,7 +100,7 @@ int vp9_compute_skin_block(const uint8_t *y, const uint8_t *u, const uint8_t *v,
const uint8_t ysource = y[y_height_shift * stride + y_width_shift];
const uint8_t usource = u[uv_height_shift * strideuv + uv_width_shift];
const uint8_t vsource = v[uv_height_shift * strideuv + uv_width_shift];
- if (consec_zeromv > 30 && curr_motion_magn == 0)
+ if (consec_zeromv > 25 && curr_motion_magn == 0)
motion = 0;
return vp9_skin_pixel(ysource, usource, vsource, motion);
}