Mercurial > libavcodec.hg
comparison mpeg12.c @ 1852:9ecbf5d23cdc libavcodec
10l (segfault fix)
author | michael |
---|---|
date | Tue, 02 Mar 2004 17:21:55 +0000 |
parents | dc8353e2cc5f |
children | 9de89f579086 |
comparison
equal
deleted
inserted
replaced
1851:07a4c1c4b929 | 1852:9ecbf5d23cdc |
---|---|
2203 int xy = s->mb_x*2 + 1 + (s->mb_y*2 +1)*wrap; | 2203 int xy = s->mb_x*2 + 1 + (s->mb_y*2 +1)*wrap; |
2204 int motion_x, motion_y, dir, i; | 2204 int motion_x, motion_y, dir, i; |
2205 if(field_pic && !s->first_field) | 2205 if(field_pic && !s->first_field) |
2206 xy += wrap/2; | 2206 xy += wrap/2; |
2207 | 2207 |
2208 for(dir=0; dir<2; dir++){ | 2208 for(i=0; i<2; i++){ |
2209 for(i=0; i<2; i++){ | 2209 for(dir=0; dir<2; dir++){ |
2210 if (s->mb_intra || (dir==1 && s->pict_type != B_TYPE)) { | 2210 if (s->mb_intra || (dir==1 && s->pict_type != B_TYPE)) { |
2211 motion_x = motion_y = 0; | 2211 motion_x = motion_y = 0; |
2212 }else if (s->mv_type == MV_TYPE_16X16){ | 2212 }else if (s->mv_type == MV_TYPE_16X16){ |
2213 motion_x = s->mv[dir][0][0]; | 2213 motion_x = s->mv[dir][0][0]; |
2214 motion_y = s->mv[dir][0][1]; | 2214 motion_y = s->mv[dir][0][1]; |
2219 | 2219 |
2220 s->current_picture.motion_val[dir][xy ][0] = motion_x; | 2220 s->current_picture.motion_val[dir][xy ][0] = motion_x; |
2221 s->current_picture.motion_val[dir][xy ][1] = motion_y; | 2221 s->current_picture.motion_val[dir][xy ][1] = motion_y; |
2222 s->current_picture.motion_val[dir][xy + 1][0] = motion_x; | 2222 s->current_picture.motion_val[dir][xy + 1][0] = motion_x; |
2223 s->current_picture.motion_val[dir][xy + 1][1] = motion_y; | 2223 s->current_picture.motion_val[dir][xy + 1][1] = motion_y; |
2224 xy += wrap; | 2224 } |
2225 } | 2225 xy += wrap; |
2226 } | 2226 } |
2227 } | 2227 } |
2228 | 2228 |
2229 s->dest[0] += 16; | 2229 s->dest[0] += 16; |
2230 s->dest[1] += 8; | 2230 s->dest[1] += 8; |