Mercurial > libavcodec.hg
changeset 7911:a7b88e5846f6 libavcodec
Cosmetics: reindent after last commit
author | kostya |
---|---|
date | Tue, 23 Sep 2008 08:45:46 +0000 |
parents | 87bbd8322244 |
children | 9fbae87668db |
files | bmp.c |
diffstat | 1 files changed, 64 insertions(+), 64 deletions(-) [+] |
line wrap: on
line diff
--- a/bmp.c Tue Sep 23 08:45:12 2008 +0000 +++ b/bmp.c Tue Sep 23 08:45:46 2008 +0000 @@ -232,72 +232,72 @@ if(comp == BMP_RLE4 || comp == BMP_RLE8){ ff_msrle_decode(avctx, p, depth, buf, dsize); }else{ - switch(depth){ - case 1: - for(i = 0; i < avctx->height; i++){ - memcpy(ptr, buf, n); - buf += n; - ptr += linesize; - } - break; - case 4: - for(i = 0; i < avctx->height; i++){ - int j; - for(j = 0; j < n; j++){ - ptr[j*2+0] = (buf[j] >> 4) & 0xF; - ptr[j*2+1] = buf[j] & 0xF; + switch(depth){ + case 1: + for(i = 0; i < avctx->height; i++){ + memcpy(ptr, buf, n); + buf += n; + ptr += linesize; + } + break; + case 4: + for(i = 0; i < avctx->height; i++){ + int j; + for(j = 0; j < n; j++){ + ptr[j*2+0] = (buf[j] >> 4) & 0xF; + ptr[j*2+1] = buf[j] & 0xF; + } + buf += n; + ptr += linesize; + } + break; + case 8: + for(i = 0; i < avctx->height; i++){ + memcpy(ptr, buf, avctx->width); + buf += n; + ptr += linesize; + } + break; + case 24: + for(i = 0; i < avctx->height; i++){ + memcpy(ptr, buf, avctx->width*(depth>>3)); + buf += n; + ptr += linesize; } - buf += n; - ptr += linesize; - } - break; - case 8: - for(i = 0; i < avctx->height; i++){ - memcpy(ptr, buf, avctx->width); - buf += n; - ptr += linesize; - } - break; - case 24: - for(i = 0; i < avctx->height; i++){ - memcpy(ptr, buf, avctx->width*(depth>>3)); - buf += n; - ptr += linesize; + break; + case 16: + for(i = 0; i < avctx->height; i++){ + const uint16_t *src = (const uint16_t *) buf; + uint16_t *dst = (uint16_t *) ptr; + + for(j = 0; j < avctx->width; j++) + *dst++ = le2me_16(*src++); + + buf += n; + ptr += linesize; + } + break; + case 32: + for(i = 0; i < avctx->height; i++){ + const uint8_t *src = buf; + uint8_t *dst = ptr; + + for(j = 0; j < avctx->width; j++){ + dst[0] = src[rgb[2]]; + dst[1] = src[rgb[1]]; + dst[2] = src[rgb[0]]; + dst += 3; + src += 4; + } + + buf += n; + ptr += linesize; + } + break; + default: + av_log(avctx, AV_LOG_ERROR, "BMP decoder is broken\n"); + return -1; } - break; - case 16: - for(i = 0; i < avctx->height; i++){ - const uint16_t *src = (const uint16_t *) buf; - uint16_t *dst = (uint16_t *) ptr; - - for(j = 0; j < avctx->width; j++) - *dst++ = le2me_16(*src++); - - buf += n; - ptr += linesize; - } - break; - case 32: - for(i = 0; i < avctx->height; i++){ - const uint8_t *src = buf; - uint8_t *dst = ptr; - - for(j = 0; j < avctx->width; j++){ - dst[0] = src[rgb[2]]; - dst[1] = src[rgb[1]]; - dst[2] = src[rgb[0]]; - dst += 3; - src += 4; - } - - buf += n; - ptr += linesize; - } - break; - default: - av_log(avctx, AV_LOG_ERROR, "BMP decoder is broken\n"); - return -1; - } } *picture = s->picture;