aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-27 21:47:34 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-28 14:08:21 +0200
commit5eb4701b7d6428ceae7624051dce88e17723ac8a (patch)
tree4bf91928661df1bcd1e7d863904df725b66add82
parent676a589c936b7b475b8008ce51c968c376b173b8 (diff)
downloadffmpeg-5eb4701b7d6428ceae7624051dce88e17723ac8a.tar.gz
avcodec/utvideodec: bswap directly without memcpy
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/utvideodec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavcodec/utvideodec.c b/libavcodec/utvideodec.c
index 96a032bda5..22da8cda1c 100644
--- a/libavcodec/utvideodec.c
+++ b/libavcodec/utvideodec.c
@@ -187,11 +187,9 @@ static int decode_plane10(UtvideoContext *c, int plane_no,
goto fail;
}
- memcpy(c->slice_bits, src + slice_data_start + c->slices * 4,
- slice_size);
memset(c->slice_bits + slice_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
c->bdsp.bswap_buf((uint32_t *) c->slice_bits,
- (uint32_t *) c->slice_bits,
+ (uint32_t *)(src + slice_data_start + c->slices * 4),
(slice_data_end - slice_data_start + 3) >> 2);
init_get_bits(&gb, c->slice_bits, slice_size * 8);
@@ -293,11 +291,9 @@ static int decode_plane(UtvideoContext *c, int plane_no,
goto fail;
}
- memcpy(c->slice_bits, src + slice_data_start + c->slices * 4,
- slice_size);
memset(c->slice_bits + slice_size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
c->bdsp.bswap_buf((uint32_t *) c->slice_bits,
- (uint32_t *) c->slice_bits,
+ (uint32_t *)(src + slice_data_start + c->slices * 4),
(slice_data_end - slice_data_start + 3) >> 2);
init_get_bits(&gb, c->slice_bits, slice_size * 8);