exchange if() and for() in the MT_FIELD case
18 cpu cycles faster for matrixbench Originally committed as revision 9863 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		@@ -418,11 +418,11 @@ static int mpeg_decode_mb(MpegEncContext *s,
 | 
				
			|||||||
                break;
 | 
					                break;
 | 
				
			||||||
            case MT_FIELD:
 | 
					            case MT_FIELD:
 | 
				
			||||||
                s->mv_type = MV_TYPE_FIELD;
 | 
					                s->mv_type = MV_TYPE_FIELD;
 | 
				
			||||||
 | 
					                if (s->picture_structure == PICT_FRAME) {
 | 
				
			||||||
 | 
					                    mb_type |= MB_TYPE_16x8 | MB_TYPE_INTERLACED;
 | 
				
			||||||
                    for(i=0;i<2;i++) {
 | 
					                    for(i=0;i<2;i++) {
 | 
				
			||||||
                        if (USES_LIST(mb_type, i)) {
 | 
					                        if (USES_LIST(mb_type, i)) {
 | 
				
			||||||
                            s->mv_dir |= (MV_DIR_FORWARD >> i);
 | 
					                            s->mv_dir |= (MV_DIR_FORWARD >> i);
 | 
				
			||||||
                        if (s->picture_structure == PICT_FRAME) {
 | 
					 | 
				
			||||||
                            mb_type |= MB_TYPE_16x8 | MB_TYPE_INTERLACED;
 | 
					 | 
				
			||||||
                            for(j=0;j<2;j++) {
 | 
					                            for(j=0;j<2;j++) {
 | 
				
			||||||
                                s->field_select[i][j] = get_bits1(&s->gb);
 | 
					                                s->field_select[i][j] = get_bits1(&s->gb);
 | 
				
			||||||
                                val = mpeg_decode_motion(s, s->mpeg_f_code[i][0],
 | 
					                                val = mpeg_decode_motion(s, s->mpeg_f_code[i][0],
 | 
				
			||||||
@@ -436,8 +436,13 @@ static int mpeg_decode_mb(MpegEncContext *s,
 | 
				
			|||||||
                                s->mv[i][j][1] = val;
 | 
					                                s->mv[i][j][1] = val;
 | 
				
			||||||
                                dprintf(s->avctx, "fmy=%d\n", val);
 | 
					                                dprintf(s->avctx, "fmy=%d\n", val);
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    mb_type |= MB_TYPE_16x16 | MB_TYPE_INTERLACED;
 | 
					                    mb_type |= MB_TYPE_16x16 | MB_TYPE_INTERLACED;
 | 
				
			||||||
 | 
					                    for(i=0;i<2;i++) {
 | 
				
			||||||
 | 
					                        if (USES_LIST(mb_type, i)) {
 | 
				
			||||||
 | 
					                            s->mv_dir |= (MV_DIR_FORWARD >> i);
 | 
				
			||||||
                            s->field_select[i][0] = get_bits1(&s->gb);
 | 
					                            s->field_select[i][0] = get_bits1(&s->gb);
 | 
				
			||||||
                            for(k=0;k<2;k++) {
 | 
					                            for(k=0;k<2;k++) {
 | 
				
			||||||
                                val = mpeg_decode_motion(s, s->mpeg_f_code[i][k],
 | 
					                                val = mpeg_decode_motion(s, s->mpeg_f_code[i][k],
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user