comparison mpeg12.c @ 1692:c4a4c28cc556 libavcodec

mv vissualization & field picture fix
author michael
date Sun, 14 Dec 2003 20:48:12 +0000
parents 7d8af3b5699a
children f3287b5d8d9f
comparison
equal deleted inserted replaced
1691:7d8af3b5699a 1692:c4a4c28cc556
2159 2159
2160 dprintf("ret=%d\n", ret); 2160 dprintf("ret=%d\n", ret);
2161 if (ret < 0) 2161 if (ret < 0)
2162 return -1; 2162 return -1;
2163 2163
2164 if(s->current_picture.motion_val[0]){ //note motion_val is normally NULL unless we want to extract the MVs 2164 if(s->current_picture.motion_val[0] && !s->encoding){ //note motion_val is normally NULL unless we want to extract the MVs
2165 const int wrap = s->block_wrap[0]; 2165 const int wrap = field_pic ? 2*s->block_wrap[0] : s->block_wrap[0];
2166 const int xy = s->mb_x*2 + 1 + (s->mb_y*2 +1)*wrap; 2166 int xy = s->mb_x*2 + 1 + (s->mb_y*2 +1)*wrap;
2167 int motion_for_top_x, motion_for_top_y, motion_back_top_x, motion_back_top_y; 2167 int motion_for_top_x, motion_for_top_y, motion_back_top_x, motion_back_top_y;
2168 int motion_for_bottom_x, motion_for_bottom_y, motion_back_bottom_x, motion_back_bottom_y; 2168 int motion_for_bottom_x, motion_for_bottom_y, motion_back_bottom_x, motion_back_bottom_y;
2169 if(field_pic && !s->first_field)
2170 xy += wrap/2;
2171
2169 if (s->mb_intra) { 2172 if (s->mb_intra) {
2170 motion_for_top_x = motion_for_top_y = motion_back_top_x = motion_back_top_y = 2173 motion_for_top_x = motion_for_top_y = motion_back_top_x = motion_back_top_y =
2171 motion_for_bottom_x = motion_for_bottom_y = motion_back_bottom_x = motion_back_bottom_y = 0; 2174 motion_for_bottom_x = motion_for_bottom_y = motion_back_bottom_x = motion_back_bottom_y = 0;
2172 }else if (s->mv_type == MV_TYPE_16X16){ 2175 }else if (s->mv_type == MV_TYPE_16X16){
2173 motion_for_top_x = motion_for_bottom_x = s->mv[0][0][0]; 2176 motion_for_top_x = motion_for_bottom_x = s->mv[0][0][0];