summaryrefslogtreecommitdiff
path: root/vp8/decoder/decodemv.c
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2011-08-12 11:30:54 -0400
committerJohn Koleszar <jkoleszar@google.com>2011-08-12 14:49:35 -0400
commita4c2211ea3256847ac21d9e806df6aac7ea7413a (patch)
tree978c10a40d3345b1f32d2bcc8acc582974fec277 /vp8/decoder/decodemv.c
parenta609be5633144e2538752c698da34c1bde90820f (diff)
downloadlibvpx-a4c2211ea3256847ac21d9e806df6aac7ea7413a.tar
libvpx-a4c2211ea3256847ac21d9e806df6aac7ea7413a.tar.gz
libvpx-a4c2211ea3256847ac21d9e806df6aac7ea7413a.tar.bz2
libvpx-a4c2211ea3256847ac21d9e806df6aac7ea7413a.zip
Propagate macroblock MV to subblocks for error concealment
EC expects the subblock MVs to be populated, but f1d6cc79e43f0066632f19c1854ca365086b712b removed this code. This commit restores it, protected by CONFIG_ERROR_CONCEALMENT. May move this to the EC code more directly in the future. Change-Id: I44f8f985720cb9a1bf222e59143f9e69abf56ad2
Diffstat (limited to 'vp8/decoder/decodemv.c')
-rw-r--r--vp8/decoder/decodemv.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c
index 0a7942d89..54547d95c 100644
--- a/vp8/decoder/decodemv.c
+++ b/vp8/decoder/decodemv.c
@@ -400,18 +400,18 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
/* Clip "next_nearest" so that it does not extend to far out of image */
vp8_clamp_mv(mv, mb_to_left_edge, mb_to_right_edge,
mb_to_top_edge, mb_to_bottom_edge);
- break;
+ goto propagate_mv;
case NEARESTMV:
mv->as_int = nearest.as_int;
/* Clip "next_nearest" so that it does not extend to far out of image */
vp8_clamp_mv(mv, mb_to_left_edge, mb_to_right_edge,
mb_to_top_edge, mb_to_bottom_edge);
- break;
+ goto propagate_mv;
case ZEROMV:
mv->as_int = 0;
- break;
+ goto propagate_mv;
case NEWMV:
read_mv(bc, &mv->as_mv, (const MV_CONTEXT *) mvc);
@@ -428,8 +428,30 @@ static void read_mb_modes_mv(VP8D_COMP *pbi, MODE_INFO *mi, MB_MODE_INFO *mbmi,
mb_to_right_edge,
mb_to_top_edge,
mb_to_bottom_edge);
- break;
+ propagate_mv: /* same MV throughout */
+#if CONFIG_ERROR_CONCEALMENT
+ if(pbi->ec_enabled)
+ {
+ mi->bmi[ 0].mv.as_int =
+ mi->bmi[ 1].mv.as_int =
+ mi->bmi[ 2].mv.as_int =
+ mi->bmi[ 3].mv.as_int =
+ mi->bmi[ 4].mv.as_int =
+ mi->bmi[ 5].mv.as_int =
+ mi->bmi[ 6].mv.as_int =
+ mi->bmi[ 7].mv.as_int =
+ mi->bmi[ 8].mv.as_int =
+ mi->bmi[ 9].mv.as_int =
+ mi->bmi[10].mv.as_int =
+ mi->bmi[11].mv.as_int =
+ mi->bmi[12].mv.as_int =
+ mi->bmi[13].mv.as_int =
+ mi->bmi[14].mv.as_int =
+ mi->bmi[15].mv.as_int = mv->as_int;
+ }
+#endif
+ break;
default:;
#if CONFIG_DEBUG
assert(0);