Mercurial > libavcodec.hg
changeset 7336:aaf3e396f094 libavcodec
Simplify spatial direct ref selection with FFMIN3()
author | michael |
---|---|
date | Mon, 21 Jul 2008 01:41:56 +0000 |
parents | d463d8ee7755 |
children | 1328ffc5e0fd |
files | h264.c |
diffstat | 1 files changed, 1 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/h264.c Sun Jul 20 20:56:40 2008 +0000 +++ b/h264.c Mon Jul 21 01:41:56 2008 +0000 @@ -1001,11 +1001,7 @@ int refc = h->ref_cache[list][scan8[0] - 8 + 4]; if(refc == -2) refc = h->ref_cache[list][scan8[0] - 8 - 1]; - ref[list] = refa; - if(ref[list] < 0 || (refb < ref[list] && refb >= 0)) - ref[list] = refb; - if(ref[list] < 0 || (refc < ref[list] && refc >= 0)) - ref[list] = refc; + ref[list] = FFMIN3((unsigned)refa, (unsigned)refb, (unsigned)refc); if(ref[list] < 0) ref[list] = -1; }