Merge "buf_ans: Misc cleanup." into nextgenv2
This commit is contained in:
@@ -28,7 +28,9 @@
|
|||||||
#include "vp10/common/seg_common.h"
|
#include "vp10/common/seg_common.h"
|
||||||
#include "vp10/common/tile_common.h"
|
#include "vp10/common/tile_common.h"
|
||||||
|
|
||||||
|
#if CONFIG_ANS
|
||||||
#include "vp10/encoder/buf_ans.h"
|
#include "vp10/encoder/buf_ans.h"
|
||||||
|
#endif // CONFIG_ANS
|
||||||
#include "vp10/encoder/cost.h"
|
#include "vp10/encoder/cost.h"
|
||||||
#include "vp10/encoder/bitstream.h"
|
#include "vp10/encoder/bitstream.h"
|
||||||
#include "vp10/encoder/encodemv.h"
|
#include "vp10/encoder/encodemv.h"
|
||||||
|
@@ -52,7 +52,7 @@ static INLINE void buf_ans_write_reset(struct BufAnsCoder *const c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static INLINE void buf_uabs_write(struct BufAnsCoder *const c,
|
static INLINE void buf_uabs_write(struct BufAnsCoder *const c,
|
||||||
uint8_t val, AnsP8 prob) {
|
uint8_t val, AnsP8 prob) {
|
||||||
assert(c->offset <= c->size);
|
assert(c->offset <= c->size);
|
||||||
if (c->offset == c->size) {
|
if (c->offset == c->size) {
|
||||||
vp10_buf_ans_grow(c);
|
vp10_buf_ans_grow(c);
|
||||||
@@ -85,7 +85,8 @@ static INLINE void buf_ans_flush(const struct BufAnsCoder *const c,
|
|||||||
sym.cum_prob = c->buf[offset].val_start;
|
sym.cum_prob = c->buf[offset].val_start;
|
||||||
rans_write(ans, &sym);
|
rans_write(ans, &sym);
|
||||||
} else {
|
} else {
|
||||||
uabs_write(ans, c->buf[offset].val_start, c->buf[offset].prob);
|
uabs_write(ans, (uint8_t)c->buf[offset].val_start,
|
||||||
|
(AnsP8)c->buf[offset].prob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user