Unified · Split
| @@ -1458,10 +1458,16 @@ static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, · 1457 unmodified lines | ||
| 1458 | 1458 | } |
| 1459 | 1459 | |
| 1460 | 1460 | if (v->field_mode) { |
| 1461 | − if (num_samefield <= num_oppfield) | |
| 1462 | − opposite = 1 - pred_flag; | |
| 1463 | − else | |
| 1464 | − opposite = pred_flag; | |
| 1461 | + if (!v->numref) | |
| 1462 | + // REFFIELD determines if the last field or the second-last field is | |
| 1463 | + // to be used as reference | |
| 1464 | + opposite = 1 - v->reffield; | |
| 1465 | + else { | |
| 1466 | + if (num_samefield <= num_oppfield) | |
| 1467 | + opposite = 1 - pred_flag; | |
| 1468 | + else | |
| 1469 | + opposite = pred_flag; | |
| 1470 | + } | |
| 1465 | 1471 | } else |
| 1466 | 1472 | opposite = 0; |
| 1467 | 1473 | if (opposite) { |