VP8: use a goto to break out of two loops
authorJason Garrett-Glaser <jason@x264.com>
Wed, 9 Mar 2011 21:46:23 +0000 (13:46 -0800)
committerJason Garrett-Glaser <jason@x264.com>
Sat, 12 Mar 2011 11:41:33 +0000 (03:41 -0800)
A break statement was supposed to break out of two loops, but only broke out of one.
Didn't affect output, just could have been marginally slower.

libavcodec/vp8.c

index f71a7b77832c33011c849079c5efbf0730377376..14d3df528b17d109da1d8baf92efa13025512228 100644 (file)
@@ -1282,7 +1282,7 @@ static av_always_inline void idct_mb(VP8Context *s, uint8_t *dst[3], VP8Macroblo
                             s->vp8dsp.vp8_idct_add(ch_dst+4*x, s->block[4+ch][(y<<1)+x], s->uvlinesize);
                         nnz4 >>= 8;
                         if (!nnz4)
-                            break;
+                            goto chroma_idct_end;
                     }
                     ch_dst += 4*s->uvlinesize;
                 }
@@ -1290,6 +1290,7 @@ static av_always_inline void idct_mb(VP8Context *s, uint8_t *dst[3], VP8Macroblo
                 s->vp8dsp.vp8_idct_dc_add4uv(ch_dst, s->block[4+ch], s->uvlinesize);
             }
         }
+chroma_idct_end: ;
     }
 }