summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_rdopt.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@google.com>2013-01-14 12:43:12 -0800
committerRonald S. Bultje <rbultje@google.com>2013-01-14 12:44:32 -0800
commit290b83ab627365ac697b477a8d0cfa8cbf6b90db (patch)
tree05072b70c7e3433232ca6edae169ac38aec93a71 /vp9/encoder/vp9_rdopt.c
parent76ac5b39375203ebc0111a5907abea40678fedf0 (diff)
downloadlibvpx-290b83ab627365ac697b477a8d0cfa8cbf6b90db.tar
libvpx-290b83ab627365ac697b477a8d0cfa8cbf6b90db.tar.gz
libvpx-290b83ab627365ac697b477a8d0cfa8cbf6b90db.tar.bz2
libvpx-290b83ab627365ac697b477a8d0cfa8cbf6b90db.zip
Reset x->skip for each iteration in the RD loop.
This prevents ill-defined behaviour, such as setting x->skip for a mode that is excluded because of frame-level flags (e.g. filter selection, compound prediction selection), then not breaking out of the RD loop because the mode is not allowed, but keeping the flag on. Whatever mode is iterated through next in the RD loop will then carry this flag, and all sort of bad stuff happens, such as x->skip being set on intra pred modes. Change-Id: I5bec46b36e38292174acb1c564b3caf00a9b4b9a
Diffstat (limited to 'vp9/encoder/vp9_rdopt.c')
-rw-r--r--vp9/encoder/vp9_rdopt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index a82670b6e..b73095863 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -3765,8 +3765,6 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
*returnintra = LLONG_MAX;
- x->skip = 0;
-
mbmi->ref_frame = INTRA_FRAME;
/* Initialize zbin mode boost for uv costing */
@@ -3809,6 +3807,8 @@ static void rd_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
rate_y = 0;
rate_uv = 0;
+ x->skip = 0;
+
this_mode = vp9_mode_order[mode_index].mode;
mbmi->mode = this_mode;
mbmi->uv_mode = DC_PRED;