summaryrefslogtreecommitdiff
path: root/libavcodec/kmvc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-22 02:40:20 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-03-25 00:32:47 +0100
commit7439267eebed3a2616ccf448476d1c8c66caeaed (patch)
tree3eed2d0339446d694a799f732409e080ee6e1832 /libavcodec/kmvc.c
parentefbfee4c1a61705dc5a4067ac8e70d7db618a7e9 (diff)
downloadffmpeg-7439267eebed3a2616ccf448476d1c8c66caeaed.tar.gz
avcodec/kmvc: Avoid branch when swapping pointers
Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/kmvc.c')
-rw-r--r--libavcodec/kmvc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c
index dd1ae05f2d..56c1977254 100644
--- a/libavcodec/kmvc.c
+++ b/libavcodec/kmvc.c
@@ -345,13 +345,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame,
}
/* flip buffers */
- if (ctx->cur == ctx->frm0) {
- ctx->cur = ctx->frm1;
- ctx->prev = ctx->frm0;
- } else {
- ctx->cur = ctx->frm0;
- ctx->prev = ctx->frm1;
- }
+ FFSWAP(uint8_t *, ctx->cur, ctx->prev);
*got_frame = 1;