aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-03-23 02:17:04 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-03-23 02:17:04 +0000
commitfc4a2d1e8cc06766677d33f4ba4777e256a709fc (patch)
tree8f9367153e7bae75ded7c2ba79bc088167507feb /libavcodec/mpeg12.c
parent19de452a630f0906ef3ebda4f27ca7b2a4b59f07 (diff)
downloadffmpeg-fc4a2d1e8cc06766677d33f4ba4777e256a709fc.tar.gz
Change ref_index structure so it matches how its organized in h264.
Also revert the related error concealment hotfix. Originally committed as revision 22640 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r--libavcodec/mpeg12.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 4ae5b6430a..1cd9acc771 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1760,6 +1760,7 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
if(s->current_picture.motion_val[0] && !s->encoding){ //note motion_val is normally NULL unless we want to extract the MVs
const int wrap = s->b8_stride;
int xy = s->mb_x*2 + s->mb_y*2*wrap;
+ int b8_xy= 4*(s->mb_x + s->mb_y*s->mb_stride);
int motion_x, motion_y, dir, i;
for(i=0; i<2; i++){
@@ -1778,11 +1779,12 @@ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y,
s->current_picture.motion_val[dir][xy ][1] = motion_y;
s->current_picture.motion_val[dir][xy + 1][0] = motion_x;
s->current_picture.motion_val[dir][xy + 1][1] = motion_y;
- s->current_picture.ref_index [dir][xy ]=
- s->current_picture.ref_index [dir][xy + 1]= s->field_select[dir][i];
+ s->current_picture.ref_index [dir][b8_xy ]=
+ s->current_picture.ref_index [dir][b8_xy + 1]= s->field_select[dir][i];
assert(s->field_select[dir][i]==0 || s->field_select[dir][i]==1);
}
xy += wrap;
+ b8_xy +=2;
}
}