[FFmpeg-cvslog] vp8: remove redundant "equals 1" test

Peter Ross git at videolan.org
Sun Jan 19 22:33:26 CET 2014


ffmpeg | branch: master | Peter Ross <pross at xvid.org> | Sun Jan 19 02:38:45 2014 +1100| [f29cdbe1b59a0d997733b507041e15ec68cef00c] | committer: Michael Niedermayer

vp8: remove redundant "equals 1" test

mb_layout is either zero or non-zero.

Signed-off-by: Peter Ross <pross at xvid.org>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/vp8.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 2ab3782..4c55194 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -664,7 +664,7 @@ void decode_intra4x4_modes(VP8Context *s, VP56RangeCoder *c, VP8Macroblock *mb,
 {
     uint8_t *intra4x4 = mb->intra4x4_pred_mode_mb;
 
-    if (layout == 1) {
+    if (layout) {
         VP8Macroblock *mb_top = mb - s->mb_width - 1;
         memcpy(mb->intra4x4_pred_mode_top, mb_top->intra4x4_pred_mode_top, 4);
     }
@@ -672,7 +672,7 @@ void decode_intra4x4_modes(VP8Context *s, VP56RangeCoder *c, VP8Macroblock *mb,
         int x, y;
         uint8_t* top;
         uint8_t* const left = s->intra4x4_pred_mode_left;
-        if (layout == 1)
+        if (layout)
             top = mb->intra4x4_pred_mode_top;
         else
             top = s->intra4x4_pred_mode_top + 4 * mb_x;
@@ -714,7 +714,7 @@ void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y,
             decode_intra4x4_modes(s, c, mb, mb_x, 1, layout);
         } else {
             const uint32_t modes = vp8_pred4x4_mode[mb->mode] * 0x01010101u;
-            if (s->mb_layout == 1)
+            if (s->mb_layout)
                 AV_WN32A(mb->intra4x4_pred_mode_top, modes);
             else
                 AV_WN32A(s->intra4x4_pred_mode_top + 4 * mb_x, modes);



More information about the ffmpeg-cvslog mailing list