Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2008-09-03 04:10:30 +0400
committerAurelien Jacobs <aurel@gnuage.org>2008-09-03 04:10:30 +0400
commite32e2d56d4abd7793dcc2b3116e4bee937e88f20 (patch)
tree1dcf61f9fa3bc55336b7bef023f3dba9983c870b /libavcodec/vp3.c
parent15995030431fe498293442e709becf6e1ba1f5b4 (diff)
theoradec: small 4MV code reorganization to ease future improvements
no functional changes Originally committed as revision 15165 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r--libavcodec/vp3.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 3c06fe4d09..6740f0c3e5 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1039,6 +1039,10 @@ static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb)
break;
case MODE_INTER_FOURMV:
+ /* vector maintenance */
+ prior_last_motion_x = last_motion_x;
+ prior_last_motion_y = last_motion_y;
+
/* fetch 4 vectors from the bitstream, one for each
* Y fragment, then average for the C fragment vectors */
motion_x[4] = motion_y[4] = 0;
@@ -1050,6 +1054,8 @@ static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb)
motion_x[k] = fixed_motion_vector_table[get_bits(gb, 6)];
motion_y[k] = fixed_motion_vector_table[get_bits(gb, 6)];
}
+ last_motion_x = motion_x[k];
+ last_motion_y = motion_y[k];
motion_x[4] += motion_x[k];
motion_y[4] += motion_y[k];
}
@@ -1058,13 +1064,6 @@ static int unpack_vectors(Vp3DecodeContext *s, GetBitContext *gb)
motion_x[4]= RSHIFT(motion_x[4], 2);
motion_y[5]=
motion_y[4]= RSHIFT(motion_y[4], 2);
-
- /* vector maintenance; vector[3] is treated as the
- * last vector in this case */
- prior_last_motion_x = last_motion_x;
- prior_last_motion_y = last_motion_y;
- last_motion_x = motion_x[3];
- last_motion_y = motion_y[3];
break;
case MODE_INTER_LAST_MV: