[FFmpeg-cvslog] twinvq: Cope with gcc-4.8.2 miscompilation

Luca Barbato git at videolan.org
Mon Mar 10 18:12:01 CET 2014


ffmpeg | branch: release/0.10 | Luca Barbato <lu_zero at gentoo.org> | Tue Jan  7 14:21:53 2014 +0100| [8b24e17d0920e070e0353dee6901fbaf8666f94f] | committer: Luca Barbato

twinvq: Cope with gcc-4.8.2 miscompilation

Apparently gcc-4.8.2 miscompiles enums resulting in a lucky fpe soon
after it.

Passing the enum value as integer makes the ftype == FT_PPC condition
evaluates correctly.

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

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

diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index 3006e9f..6d0a0ec 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -996,7 +996,7 @@ static void linear_perm(int16_t *out, int16_t *in, int n_blocks, int size)
         out[i] = block_size * (in[i] % n_blocks) + in[i] / n_blocks;
 }
 
-static av_cold void construct_perm_table(TwinContext *tctx,enum FrameType ftype)
+static av_cold void construct_perm_table(TwinContext *tctx, int ftype)
 {
     int block_size;
     const ModeTab *mtab = tctx->mtab;



More information about the ffmpeg-cvslog mailing list