diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-24 14:10:44 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-24 14:10:44 +0200 |
commit | 5cf794e0c1f7b651de4b1a61a6786fb71e9679b3 (patch) | |
tree | db09a4fe091885f7c4a86ffe71dab07b4a7f9c5d /libavutil/lzo.c | |
parent | 5555d2075a26fc778fb8145473100e94d80a00c8 (diff) | |
parent | d82f188504410fdfa446c5682c128c31bb5851a4 (diff) | |
download | ffmpeg-5cf794e0c1f7b651de4b1a61a6786fb71e9679b3.tar.gz |
Merge commit 'd82f188504410fdfa446c5682c128c31bb5851a4'
* commit 'd82f188504410fdfa446c5682c128c31bb5851a4':
Remove need for padding in av_memcpy_backptr()
Conflicts:
libavutil/lzo.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/lzo.c')
-rw-r--r-- | libavutil/lzo.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavutil/lzo.c b/libavutil/lzo.c index c76d9a86d3..47fc767a06 100644 --- a/libavutil/lzo.c +++ b/libavutil/lzo.c @@ -132,13 +132,14 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt) if (back <= 1) { memset(dst, *src, cnt); } else { -#ifdef OUTBUF_PADDED - AV_COPY16U(dst, src); - AV_COPY16U(dst + 2, src + 2); - src += 4; - dst += 4; - cnt -= 4; - if (cnt > 0) { + if (cnt >= 4) { + AV_COPY16U(dst, src); + AV_COPY16U(dst + 2, src + 2); + src += 4; + dst += 4; + cnt -= 4; + } + if (cnt >= 8) { AV_COPY16U(dst, src); AV_COPY16U(dst + 2, src + 2); AV_COPY16U(dst + 4, src + 4); @@ -147,7 +148,6 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt) dst += 8; cnt -= 8; } -#endif if (cnt > 0) { int blocklen = back; while (cnt > blocklen) { |