aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-08-08 18:21:04 +0000
committerAnton Khirnov <anton@khirnov.net>2014-08-12 10:13:43 +0000
commit3187fa14a326908f9471a038e3b5b24c0eaf655e (patch)
tree1813c1f5301ccbb14dacdb066de48503aa703927 /libavcodec
parent14ca0aa69b5d954ce56d0826ab9f1f70e535c92a (diff)
downloadffmpeg-3187fa14a326908f9471a038e3b5b24c0eaf655e.tar.gz
hevc_mvs: avoid deriving tmvp in amvp
Reduces the number of calls to tmvp derivation from 933685 to 586271 on a sequence. Reviewed-by: Mickaƫl Raulet <mraulet@insa-rennes.fr> Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/hevc_mvs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c
index 4d0f3026da..cc5a16ce72 100644
--- a/libavcodec/hevc_mvs.c
+++ b/libavcodec/hevc_mvs.c
@@ -828,7 +828,8 @@ void ff_hevc_luma_mv_mvp_mode(HEVCContext *s, int x0, int y0, int nPbW,
mvpcand_list[numMVPCandLX++] = mxB;
//temporal motion vector prediction candidate
- if (numMVPCandLX < 2 && s->sh.slice_temporal_mvp_enabled_flag) {
+ if (numMVPCandLX < 2 && s->sh.slice_temporal_mvp_enabled_flag &&
+ mvp_lx_flag == numMVPCandLX) {
Mv mv_col;
int available_col = temporal_luma_motion_vector(s, x0, y0, nPbW,
nPbH, ref_idx,