[FFmpeg-cvslog] avcodec/huffyuvencdsp: try to fix misaligned access

Michael Niedermayer git at videolan.org
Sun Jun 29 16:31:51 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jun 29 16:26:03 2014 +0200| [3f42434600f277598556cda981dc0492ec151bdf] | committer: Michael Niedermayer

avcodec/huffyuvencdsp: try to fix misaligned access

Should fix fate on MIPS

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3f42434600f277598556cda981dc0492ec151bdf
---

 libavcodec/huffyuvencdsp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/huffyuvencdsp.c b/libavcodec/huffyuvencdsp.c
index 1f9256b..95fcc19 100644
--- a/libavcodec/huffyuvencdsp.c
+++ b/libavcodec/huffyuvencdsp.c
@@ -30,7 +30,7 @@ static void diff_bytes_c(uint8_t *dst, const uint8_t *src1, const uint8_t *src2,
     long i;
 
 #if !HAVE_FAST_UNALIGNED
-    if ((long) src2 & (sizeof(long) - 1)) {
+    if (((long)src1 | (long)src2) & (sizeof(long) - 1)) {
         for (i = 0; i + 7 < w; i += 8) {
             dst[i + 0] = src1[i + 0] - src2[i + 0];
             dst[i + 1] = src1[i + 1] - src2[i + 1];



More information about the ffmpeg-cvslog mailing list