aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-03-24 22:49:59 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-03-31 23:23:52 +0200
commitc163e62db53dd80ee0f056def1720b3aca8bfe69 (patch)
tree12f809b8729ce7c6ca5456b5b2cec05e7bbc9a38 /libavcodec
parent468ae6a734b2db5fcfc9596770516d76ca8b2818 (diff)
downloadffmpeg-c163e62db53dd80ee0f056def1720b3aca8bfe69.tar.gz
avcodec/ivi: Factor ref_mb check out
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ivi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/ivi.c b/libavcodec/ivi.c
index 71bf0e6e1c..1a496d9b2d 100644
--- a/libavcodec/ivi.c
+++ b/libavcodec/ivi.c
@@ -806,10 +806,11 @@ static int ivi_process_empty_tile(AVCodecContext *avctx, IVIBandDesc *band,
mb->mv_y = 0;
}
- if (band->inherit_qdelta && ref_mb)
+ if (ref_mb) {
+ if (band->inherit_qdelta)
mb->q_delta = ref_mb->q_delta;
- if (band->inherit_mv && ref_mb) {
+ if (band->inherit_mv) {
/* motion vector inheritance */
if (mv_scale) {
mb->mv_x = ivi_scale_mv(ref_mb->mv_x, mv_scale);
@@ -836,10 +837,10 @@ static int ivi_process_empty_tile(AVCodecContext *avctx, IVIBandDesc *band,
}
}
}
+ ref_mb++;
+ }
mb++;
- if (ref_mb)
- ref_mb++;
mb_offset += band->mb_size;
} // for x
offs += row_offset;