diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-07-31 14:25:30 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-08-01 13:07:53 +0100 |
commit | 92a36a6b3338df5f5cff573a486e182005367c24 (patch) | |
tree | 1d0c6124f137beb7f219cf4e899c08e23732e774 /libavcodec/pngdec.c | |
parent | 52269f48e835a52023656f8330262ae70e6061c4 (diff) | |
download | ffmpeg-92a36a6b3338df5f5cff573a486e182005367c24.tar.gz |
pngdec: correctly indent macros
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r-- | libavcodec/pngdec.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index fe5590deee..bbe42230db 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -159,7 +159,8 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, } } -#define UNROLL1(bpp, op) { \ +#define UNROLL1(bpp, op) \ + { \ r = dst[0]; \ if (bpp >= 2) \ g = dst[1]; \ @@ -179,25 +180,24 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, continue; \ dst[i + 3] = a = op(a, src[i + 3], last[i + 3]); \ } \ -} + } #define UNROLL_FILTER(op) \ - if (bpp == 1) \ + if (bpp == 1) { \ UNROLL1(1, op) \ - else if (bpp == 2) \ - UNROLL1(2, op) \ - else if (bpp == 3) \ - UNROLL1(3, op) \ - else if (bpp == 4) \ - UNROLL1(4, op) \ - else { \ - for (; i < size; i += bpp) { \ - int j; \ - for (j = 0; j < bpp; j++) \ - dst[i + j] = op(dst[i + j - bpp], \ - src[i + j], last[i + j]); \ - } \ - } + } else if (bpp == 2) { \ + UNROLL1(2, op) \ + } else if (bpp == 3) { \ + UNROLL1(3, op) \ + } else if (bpp == 4) { \ + UNROLL1(4, op) \ + } else { \ + for (; i < size; i += bpp) { \ + int j; \ + for (j = 0; j < bpp; j++) \ + dst[i + j] = op(dst[i + j - bpp], src[i + j], last[i + j]); \ + } \ + } /* NOTE: 'dst' can be equal to 'last' */ static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type, |