*
* Copyright (c) 2012 Konstantin Shishkov
*
+ * This encoder appears to be based on Anatoliy Wassermans considering
+ * similarities in the bugs.
+ *
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
exponent = av_log2(val);
put_bits(pb, exponent - exp_order + switch_bits, 0);
- put_bits(pb, 1, 1);
- put_bits(pb, exponent, val);
+ put_bits(pb, exponent + 1, val);
} else {
exponent = val >> rice_order;
pkt_size = ctx->frame_size + FF_MIN_BUFFER_SIZE;
- if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size)) < 0) {
+ if ((ret = ff_alloc_packet2(avctx, pkt, pkt_size)) < 0)
return ret;
- }
orig_buf = pkt->data;