diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-08 16:32:49 -0800 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2012-03-10 11:57:56 -0800 |
commit | 71af42bd964313b3869cdd8a8c0fb97a9ee90d49 (patch) | |
tree | c42406646a6fd17694bf09196f115b4aaa8fa697 /libavcodec | |
parent | f77bfa837636a99a4034d31916a76f7d1688cf5a (diff) | |
download | ffmpeg-71af42bd964313b3869cdd8a8c0fb97a9ee90d49.tar.gz |
xxan: reindent xan_unpack_luma().
It used 3-space indent instead of 4-space indent.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/xxan.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c index dd5447940b..4561714124 100644 --- a/libavcodec/xxan.c +++ b/libavcodec/xxan.c @@ -62,42 +62,42 @@ static av_cold int xan_decode_init(AVCodecContext *avctx) static int xan_unpack_luma(XanContext *s, uint8_t *dst, const int dst_size) { - int tree_size, eof; - int bits, mask; - int tree_root, node; - const uint8_t *dst_end = dst + dst_size; - GetByteContext tree = s->gb; - int start_off = bytestream2_tell(&tree); - - tree_size = bytestream2_get_byte(&s->gb); - eof = bytestream2_get_byte(&s->gb); - tree_root = eof + tree_size; - bytestream2_skip(&s->gb, tree_size * 2); - - node = tree_root; - bits = bytestream2_get_byte(&s->gb); - mask = 0x80; - for (;;) { - int bit = !!(bits & mask); - mask >>= 1; - bytestream2_seek(&tree, start_off + node*2 + bit - eof * 2, SEEK_SET); - node = bytestream2_get_byte(&tree); - if (node == eof) - break; - if (node < eof) { - *dst++ = node; - if (dst > dst_end) - break; - node = tree_root; - } - if (!mask) { - if (bytestream2_get_bytes_left(&s->gb) <= 0) - break; - bits = bytestream2_get_byteu(&s->gb); - mask = 0x80; - } - } - return dst != dst_end ? AVERROR_INVALIDDATA : 0; + int tree_size, eof; + int bits, mask; + int tree_root, node; + const uint8_t *dst_end = dst + dst_size; + GetByteContext tree = s->gb; + int start_off = bytestream2_tell(&tree); + + tree_size = bytestream2_get_byte(&s->gb); + eof = bytestream2_get_byte(&s->gb); + tree_root = eof + tree_size; + bytestream2_skip(&s->gb, tree_size * 2); + + node = tree_root; + bits = bytestream2_get_byte(&s->gb); + mask = 0x80; + for (;;) { + int bit = !!(bits & mask); + mask >>= 1; + bytestream2_seek(&tree, start_off + node*2 + bit - eof * 2, SEEK_SET); + node = bytestream2_get_byte(&tree); + if (node == eof) + break; + if (node < eof) { + *dst++ = node; + if (dst > dst_end) + break; + node = tree_root; + } + if (!mask) { + if (bytestream2_get_bytes_left(&s->gb) <= 0) + break; + bits = bytestream2_get_byteu(&s->gb); + mask = 0x80; + } + } + return dst != dst_end ? AVERROR_INVALIDDATA : 0; } /* almost the same as in xan_wc3 decoder */ |