summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2008-12-29 10:20:03 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2008-12-29 10:20:03 +0000
commit592beefe9917501a7ff9080028f8867762d146dd (patch)
treef0c25aca774e8e6345f3467674ea6ccf5e7082c2
parente4f1ec3a4c16544c067e3391dabfa9ae676dcb9a (diff)
downloadffmpeg-streaming-592beefe9917501a7ff9080028f8867762d146dd.zip
ffmpeg-streaming-592beefe9917501a7ff9080028f8867762d146dd.tar.gz
It turned out that RV30 uses motion vectors for forward motion B-frame
macroblocks to predict motion vectors for backward motion B-frame macroblocks and vice versa. Originally committed as revision 16381 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/rv34.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 294824e..450327e 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -564,7 +564,7 @@ static void rv34_pred_mv_rv3(RV34DecContext *r, int block_type, int dir)
MpegEncContext *s = &r->s;
int mv_pos = s->mb_x * 2 + s->mb_y * 2 * s->b8_stride;
int A[2] = {0}, B[2], C[2];
- int i, j;
+ int i, j, k;
int mx, my;
int avail_index = avail_indexes[0];
@@ -597,12 +597,12 @@ static void rv34_pred_mv_rv3(RV34DecContext *r, int block_type, int dir)
my += r->dmv[0][1];
for(j = 0; j < 2; j++){
for(i = 0; i < 2; i++){
- s->current_picture_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][0] = mx;
- s->current_picture_ptr->motion_val[0][mv_pos + i + j*s->b8_stride][1] = my;
+ for(k = 0; k < 2; k++){
+ s->current_picture_ptr->motion_val[k][mv_pos + i + j*s->b8_stride][0] = mx;
+ s->current_picture_ptr->motion_val[k][mv_pos + i + j*s->b8_stride][1] = my;
+ }
}
}
- if(block_type == RV34_MB_B_BACKWARD || block_type == RV34_MB_B_FORWARD)
- fill_rectangle(s->current_picture_ptr->motion_val[!dir][mv_pos], 2, 2, s->b8_stride, 0, 4);
}
static const int chroma_coeffs[3] = { 0, 3, 5 };
OpenPOWER on IntegriCloud