[FFmpeg-cvslog] imc: fix order of operations in coefficients read

Vittorio Giovara git at videolan.org
Sat Nov 1 13:27:58 CET 2014


ffmpeg | branch: release/2.4 | Vittorio Giovara <vittorio.giovara at gmail.com> | Mon Oct 13 15:42:28 2014 +0100| [e443165c323406d01da7e7930f042d265d01fb35] | committer: Vittorio Giovara

imc: fix order of operations in coefficients read

Reported-by: Ruoyu <liangry at ucweb.com>

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

 libavcodec/imc.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 41ca8c8..500f564 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -873,14 +873,14 @@ static int imc_decode_block(AVCodecContext *avctx, IMCContext *q, int ch)
 
     flag = get_bits1(&q->gb);
     if (stream_format_code & 0x1)
-        imc_decode_level_coefficients_raw(q, chctx->levlCoeffBuf,
-                                          chctx->flcoeffs1, chctx->flcoeffs2);
-    else if (stream_format_code & 0x1)
         imc_read_level_coeffs_raw(q, stream_format_code, chctx->levlCoeffBuf);
     else
         imc_read_level_coeffs(q, stream_format_code, chctx->levlCoeffBuf);
 
-    if (stream_format_code & 0x4)
+    if (stream_format_code & 0x1)
+        imc_decode_level_coefficients_raw(q, chctx->levlCoeffBuf,
+                                          chctx->flcoeffs1, chctx->flcoeffs2);
+    else if (stream_format_code & 0x4)
         imc_decode_level_coefficients(q, chctx->levlCoeffBuf,
                                       chctx->flcoeffs1, chctx->flcoeffs2);
     else



More information about the ffmpeg-cvslog mailing list