Commit 3db08452 authored by Sebastien Alaiwan's avatar Sebastien Alaiwan Committed by Frédéric BARBIER

Remove RAWBITS experiment

This experiment has been abandonned for AV1.

Change-Id: I26d10463bdb592fa1fda022a0da19dd6c37159ca
parent 9b803916
......@@ -159,10 +159,6 @@ static INLINE int aom_read_bit_(aom_reader *r ACCT_STR_PARAM) {
int ret;
#if CONFIG_ANS
ret = rabs_read_bit(r); // Non trivial optimization at half probability
#elif CONFIG_RAWBITS
// Note this uses raw bits and is not the same as aom_daala_read(r, 128);
// Calls to this function are omitted from raw symbol accounting.
ret = aom_daala_read_bit(r);
#else
ret = aom_read(r, 128, NULL); // aom_prob_half
#endif
......
......@@ -95,9 +95,6 @@ static INLINE void aom_write_record(aom_writer *br, int bit, int probability,
static INLINE void aom_write_bit(aom_writer *w, int bit) {
#if CONFIG_ANS
buf_rabs_write_bit(w, bit);
#elif CONFIG_RAWBITS
// Note this uses raw bits and is not the same as aom_daala_write(r, 128);
aom_daala_write_bit(w, bit);
#else
aom_write(w, bit, 128); // aom_prob_half
#endif
......
......@@ -97,12 +97,6 @@ static INLINE int aom_daala_read(daala_reader *r, int prob) {
return bit;
}
#if CONFIG_RAWBITS
static INLINE int aom_daala_read_bit(daala_reader *r) {
return od_ec_dec_bits(&r->ec, 1, "aom_bits");
}
#endif
static INLINE int aom_daala_reader_has_error(daala_reader *r) {
return r->ec.error;
}
......
......@@ -54,12 +54,6 @@ static INLINE void aom_daala_write(daala_writer *w, int bit, int prob) {
od_ec_encode_bool_q15(&w->ec, bit, p);
}
#if CONFIG_RAWBITS
static INLINE void aom_daala_write_bit(daala_writer *w, int bit) {
od_ec_enc_bits(&w->ec, bit, 1);
}
#endif
static INLINE void daala_write_symbol(daala_writer *w, int symb,
const aom_cdf_prob *cdf, int nsymbs) {
#if CONFIG_BITSTREAM_DEBUG
......
......@@ -204,45 +204,6 @@ int od_ec_decode_cdf_q15(od_ec_dec *dec, const uint16_t *icdf, int nsyms) {
return od_ec_dec_normalize(dec, dif, r, ret);
}
#if CONFIG_RAWBITS
/*Extracts a sequence of raw bits from the stream.
The bits must have been encoded with od_ec_enc_bits().
ftb: The number of bits to extract.
This must be between 0 and 25, inclusive.
Return: The decoded bits.*/
uint32_t od_ec_dec_bits_(od_ec_dec *dec, unsigned ftb) {
od_ec_window window;
int available;
uint32_t ret;
OD_ASSERT(ftb <= 25);
window = dec->end_window;
available = dec->nend_bits;
if ((unsigned)available < ftb) {
const unsigned char *buf;
const unsigned char *eptr;
buf = dec->buf;
eptr = dec->eptr;
OD_ASSERT(available <= OD_EC_WINDOW_SIZE - 8);
do {
if (eptr <= buf) {
dec->tell_offs += OD_EC_LOTS_OF_BITS - available;
available = OD_EC_LOTS_OF_BITS;
break;
}
window |= (od_ec_window) * --eptr << available;
available += 8;
} while (available <= OD_EC_WINDOW_SIZE - 8);
dec->eptr = eptr;
}
ret = (uint32_t)window & (((uint32_t)1 << ftb) - 1);
window >>= ftb;
available -= ftb;
dec->end_window = window;
dec->nend_bits = available;
return ret;
}
#endif
/*Returns the number of bits "used" by the decoded symbols so far.
This same number can be computed in either the encoder or the decoder, and is
suitable for making coding decisions.
......
......@@ -212,61 +212,6 @@ void od_ec_encode_cdf_q15(od_ec_enc *enc, int s, const uint16_t *icdf,
od_ec_encode_q15(enc, s > 0 ? icdf[s - 1] : OD_ICDF(0), icdf[s]);
}
#if CONFIG_RAWBITS
/*Encodes a sequence of raw bits in the stream.
fl: The bits to encode.
ftb: The number of bits to encode.
This must be between 0 and 25, inclusive.*/
void od_ec_enc_bits(od_ec_enc *enc, uint32_t fl, unsigned ftb) {
od_ec_window end_window;
int nend_bits;
OD_ASSERT(ftb <= 25);
OD_ASSERT(fl < (uint32_t)1 << ftb);
#if OD_MEASURE_EC_OVERHEAD
enc->entropy += ftb;
#endif
end_window = enc->end_window;
nend_bits = enc->nend_bits;
if (nend_bits + ftb > OD_EC_WINDOW_SIZE) {
unsigned char *buf;
uint32_t storage;
uint32_t end_offs;
buf = enc->buf;
storage = enc->storage;
end_offs = enc->end_offs;
if (end_offs + (OD_EC_WINDOW_SIZE >> 3) >= storage) {
unsigned char *new_buf;
uint32_t new_storage;
new_storage = 2 * storage + (OD_EC_WINDOW_SIZE >> 3);
new_buf = (unsigned char *)malloc(sizeof(*new_buf) * new_storage);
if (new_buf == NULL) {
enc->error = -1;
enc->end_offs = 0;
return;
}
OD_COPY(new_buf + new_storage - end_offs, buf + storage - end_offs,
end_offs);
storage = new_storage;
free(buf);
enc->buf = buf = new_buf;
enc->storage = storage;
}
do {
OD_ASSERT(end_offs < storage);
buf[storage - ++end_offs] = (unsigned char)end_window;
end_window >>= 8;
nend_bits -= 8;
} while (nend_bits >= 8);
enc->end_offs = end_offs;
}
OD_ASSERT(nend_bits + ftb <= OD_EC_WINDOW_SIZE);
end_window |= (od_ec_window)fl << nend_bits;
nend_bits += ftb;
enc->end_window = end_window;
enc->nend_bits = nend_bits;
}
#endif
/*Overwrites a few bits at the very start of an existing stream, after they
have already been encoded.
This makes it possible to have a few flags up front, where it is easy for
......
......@@ -178,7 +178,6 @@ set(CONFIG_PALETTE_THROUGHPUT 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_PARALLEL_DEBLOCKING 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_Q_ADAPT_PROBS 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_Q_SEGMENTATION 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_RAWBITS 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_RD_DEBUG 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_RECT_TX_EXT 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_REFERENCE_BUFFER 1 CACHE NUMBER "AV1 experiment flag.")
......
......@@ -272,7 +272,6 @@ EXPERIMENT_LIST="
q_adapt_probs
inter_stats_only
palette_delta_encoding
rawbits
kf_ctx
cfl
xiphrc
......@@ -554,10 +553,6 @@ post_process_cmdline() {
enabled loopfilter_level && enable_feature ext_delta_q
enabled striped_loop_restoration && enable_feature loop_restoration
if enabled rawbits && enabled ans; then
log_echo "rawbits requires not ans, so disabling rawbits"
disable_feature rawbits
fi
if enabled daala_tx; then
enable_feature highbitdepth
enable_feature daala_tx4
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment