Mercurial > libavcodec.hg
comparison mpeg12.c @ 11531:31033caa5344 libavcodec
Change ref_index structure so it matches how its organized in h264.
Also revert the related error concealment hotfix.
author | michael |
---|---|
date | Tue, 23 Mar 2010 02:17:04 +0000 |
parents | 2029a714b794 |
children | 8a4984c5cacc |
comparison
equal
deleted
inserted
replaced
11530:86e4be64519e | 11531:31033caa5344 |
---|---|
1758 return -1; | 1758 return -1; |
1759 | 1759 |
1760 if(s->current_picture.motion_val[0] && !s->encoding){ //note motion_val is normally NULL unless we want to extract the MVs | 1760 if(s->current_picture.motion_val[0] && !s->encoding){ //note motion_val is normally NULL unless we want to extract the MVs |
1761 const int wrap = s->b8_stride; | 1761 const int wrap = s->b8_stride; |
1762 int xy = s->mb_x*2 + s->mb_y*2*wrap; | 1762 int xy = s->mb_x*2 + s->mb_y*2*wrap; |
1763 int b8_xy= 4*(s->mb_x + s->mb_y*s->mb_stride); | |
1763 int motion_x, motion_y, dir, i; | 1764 int motion_x, motion_y, dir, i; |
1764 | 1765 |
1765 for(i=0; i<2; i++){ | 1766 for(i=0; i<2; i++){ |
1766 for(dir=0; dir<2; dir++){ | 1767 for(dir=0; dir<2; dir++){ |
1767 if (s->mb_intra || (dir==1 && s->pict_type != FF_B_TYPE)) { | 1768 if (s->mb_intra || (dir==1 && s->pict_type != FF_B_TYPE)) { |
1776 | 1777 |
1777 s->current_picture.motion_val[dir][xy ][0] = motion_x; | 1778 s->current_picture.motion_val[dir][xy ][0] = motion_x; |
1778 s->current_picture.motion_val[dir][xy ][1] = motion_y; | 1779 s->current_picture.motion_val[dir][xy ][1] = motion_y; |
1779 s->current_picture.motion_val[dir][xy + 1][0] = motion_x; | 1780 s->current_picture.motion_val[dir][xy + 1][0] = motion_x; |
1780 s->current_picture.motion_val[dir][xy + 1][1] = motion_y; | 1781 s->current_picture.motion_val[dir][xy + 1][1] = motion_y; |
1781 s->current_picture.ref_index [dir][xy ]= | 1782 s->current_picture.ref_index [dir][b8_xy ]= |
1782 s->current_picture.ref_index [dir][xy + 1]= s->field_select[dir][i]; | 1783 s->current_picture.ref_index [dir][b8_xy + 1]= s->field_select[dir][i]; |
1783 assert(s->field_select[dir][i]==0 || s->field_select[dir][i]==1); | 1784 assert(s->field_select[dir][i]==0 || s->field_select[dir][i]==1); |
1784 } | 1785 } |
1785 xy += wrap; | 1786 xy += wrap; |
1787 b8_xy +=2; | |
1786 } | 1788 } |
1787 } | 1789 } |
1788 | 1790 |
1789 s->dest[0] += 16 >> lowres; | 1791 s->dest[0] += 16 >> lowres; |
1790 s->dest[1] +=(16 >> lowres) >> s->chroma_x_shift; | 1792 s->dest[1] +=(16 >> lowres) >> s->chroma_x_shift; |