[FFmpeg-cvslog] VP8: use a goto to break out of two loops

Jason Garrett-Glaser git
Sat Mar 12 23:02:21 CET 2011


ffmpeg | branch: master | Jason Garrett-Glaser <jason at x264.com> | Wed Mar  9 13:46:23 2011 -0800| [628b48db85dae7ad212a63dafcd6a3bf8d8e93f3] | committer: Jason Garrett-Glaser

VP8: use a goto to break out of two loops

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.

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

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

diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index f71a7b7..14d3df5 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -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: ;
     }
 }
 




More information about the ffmpeg-cvslog mailing list