History

vc1dec: Set opposite to the correct value for 1REF field pictures

Mashiat Sarker Shakkhar committed 14 years ago

Commit eb657ec1 parent 7cc3c4e1 file · +10 −4Browse files

Unified · Split

libavcodec/vc1dec.c+10−4
@@ -1458,10 +1458,16 @@ static inline void vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y, · 1457 unmodified lines
14581458 }
14591459
14601460 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+ }
14651471 } else
14661472 opposite = 0;
14671473 if (opposite) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t