diff options
author | Måns Rullgård <mans@mansr.com> | 2010-07-20 17:54:25 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-07-20 17:54:25 +0000 |
commit | 070ce7efade489a1ba0b5ba4433116e3133fae46 (patch) | |
tree | 4cc04dacb6e411fe5dfba645ae36e04c929febea | |
parent | 153da88dfb791b4c3afa3f32d50864515481565b (diff) | |
download | ffmpeg-070ce7efade489a1ba0b5ba4433116e3133fae46.tar.gz |
vp8: add do { } while(0) around XCHG() macro to avoid confusing if/else
This is the correct solution to the warning "fixed" in the previous
commit.
Originally committed as revision 24367 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/vp8.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index a14e73160a..44cac7dc88 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -882,16 +882,17 @@ void xchg_mb_border(uint8_t *top_border, uint8_t *src_y, uint8_t *src_cb, uint8_ src_cb -= uvlinesize; src_cr -= uvlinesize; -#define XCHG(a,b,xchg)\ +#define XCHG(a,b,xchg) do {\ if (xchg) AV_SWAP64(b,a);\ -else AV_COPY64(b,a); +else AV_COPY64(b,a);\ +} while (0) XCHG(top_border_m1+8, src_y-8, xchg); XCHG(top_border, src_y, xchg); XCHG(top_border+8, src_y+8, 1); - if (mb_x < mb_width-1) { + if (mb_x < mb_width-1) XCHG(top_border+32, src_y+16, 1); - } + // only copy chroma for normal loop filter // or to initialize the top row to 127 if (!simple || !mb_y) { |