Commit 560b0253 authored by Mickaël Raulet's avatar Mickaël Raulet Committed by Michael Niedermayer

hevc/mvs: simplify derive_temporal_colocated_mvs

cherry picked from commit def7db60966765f4687250d766b40dbcf0f7e503
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 062b9f2c
...@@ -209,20 +209,21 @@ static int derive_temporal_colocated_mvs(HEVCContext *s, MvField temp_col, ...@@ -209,20 +209,21 @@ static int derive_temporal_colocated_mvs(HEVCContext *s, MvField temp_col,
return CHECK_MVSET(0); return CHECK_MVSET(0);
else if (temp_col.pred_flag == PF_BI) { else if (temp_col.pred_flag == PF_BI) {
int check_diffpicount = 0; int check_diffpicount = 0;
int i = 0; int i, j;
for (i = 0; i < refPicList[0].nb_refs; i++) { for (j = 0; j < 2; j++) {
if (refPicList[0].list[i] > s->poc) for (i = 0; i < refPicList[j].nb_refs; i++) {
check_diffpicount++; if (refPicList[j].list[i] > s->poc) {
} check_diffpicount++;
for (i = 0; i < refPicList[1].nb_refs; i++) { break;
if (refPicList[1].list[i] > s->poc) }
check_diffpicount++; }
} }
if (check_diffpicount == 0 && X == 0) if (!check_diffpicount) {
return CHECK_MVSET(0); if (X==0)
else if (check_diffpicount == 0 && X == 1) return CHECK_MVSET(0);
return CHECK_MVSET(1); else
else { return CHECK_MVSET(1);
} else {
if (s->sh.collocated_list == L1) if (s->sh.collocated_list == L1)
return CHECK_MVSET(0); return CHECK_MVSET(0);
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment