comparison motion_est.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 421c9441c11e
children a734f92c94b4
comparison
equal deleted inserted replaced
11530:86e4be64519e 11531:31033caa5344
848 av_log(c->avctx, AV_LOG_ERROR, "Interlaced macroblock selected but interlaced motion estimation disabled\n"); 848 av_log(c->avctx, AV_LOG_ERROR, "Interlaced macroblock selected but interlaced motion estimation disabled\n");
849 return INT_MAX/2; 849 return INT_MAX/2;
850 } 850 }
851 851
852 if(USES_LIST(mb_type, 0)){ 852 if(USES_LIST(mb_type, 0)){
853 int field_select0= p->ref_index[0][xy ]; 853 int field_select0= p->ref_index[0][4*mb_xy ];
854 int field_select1= p->ref_index[0][xy2]; 854 int field_select1= p->ref_index[0][4*mb_xy+2];
855 assert(field_select0==0 ||field_select0==1); 855 assert(field_select0==0 ||field_select0==1);
856 assert(field_select1==0 ||field_select1==1); 856 assert(field_select1==0 ||field_select1==1);
857 init_interlaced_ref(s, 0); 857 init_interlaced_ref(s, 0);
858 858
859 if(p_type){ 859 if(p_type){
876 x= p->motion_val[0][xy2][0]; 876 x= p->motion_val[0][xy2][0];
877 y= p->motion_val[0][xy2][1]; 877 y= p->motion_val[0][xy2][1];
878 d+= cmp(s, x>>shift, y>>shift, x&mask, y&mask, 0, 8, field_select1, 1, cmpf, chroma_cmpf, flags); 878 d+= cmp(s, x>>shift, y>>shift, x&mask, y&mask, 0, 8, field_select1, 1, cmpf, chroma_cmpf, flags);
879 } 879 }
880 if(USES_LIST(mb_type, 1)){ 880 if(USES_LIST(mb_type, 1)){
881 int field_select0= p->ref_index[1][xy ]; 881 int field_select0= p->ref_index[1][4*mb_xy ];
882 int field_select1= p->ref_index[1][xy2]; 882 int field_select1= p->ref_index[1][4*mb_xy+2];
883 assert(field_select0==0 ||field_select0==1); 883 assert(field_select0==0 ||field_select0==1);
884 assert(field_select1==0 ||field_select1==1); 884 assert(field_select1==0 ||field_select1==1);
885 init_interlaced_ref(s, 2); 885 init_interlaced_ref(s, 2);
886 886
887 s->b_field_select_table[1][0][mb_xy]= field_select0; 887 s->b_field_select_table[1][0][mb_xy]= field_select0;