Remove the aom_reader_has_error() function. aom_reader_has_error() returns the 'error' field of the od_ec_dec struct, which is always 0. Remove the 'error' field and the aom_reader_has_error() function. Remove the aom_reader_has_error() calls because they were no-op. Change-Id: Ibeb6f5e6c4901e37bf9de731823156953790fdf8
diff --git a/aom_dsp/bitreader.h b/aom_dsp/bitreader.h index 7c0efcc..38b17ea 100644 --- a/aom_dsp/bitreader.h +++ b/aom_dsp/bitreader.h
@@ -65,10 +65,6 @@ return aom_daala_reader_find_end(r); } -static INLINE int aom_reader_has_error(aom_reader *r) { - return aom_daala_reader_has_error(r); -} - // Returns true if the bit reader has tried to decode more data from the buffer // than was actually provided. static INLINE int aom_reader_has_overflowed(const aom_reader *r) {
diff --git a/aom_dsp/daalaboolreader.h b/aom_dsp/daalaboolreader.h index ba78f91..b1810fc 100644 --- a/aom_dsp/daalaboolreader.h +++ b/aom_dsp/daalaboolreader.h
@@ -101,10 +101,6 @@ return bit; } -static INLINE int aom_daala_reader_has_error(daala_reader *r) { - return r->ec.error; -} - static INLINE int daala_read_symbol(daala_reader *r, const aom_cdf_prob *cdf, int nsymbs) { int symb;
diff --git a/aom_dsp/entdec.c b/aom_dsp/entdec.c index c42582f..da43e8a 100644 --- a/aom_dsp/entdec.c +++ b/aom_dsp/entdec.c
@@ -139,7 +139,7 @@ /*Initializes the decoder. buf: The input buffer to use. - Return: 0 on success, or a negative value on error.*/ + storage: The size in bytes of the input buffer.*/ void od_ec_dec_init(od_ec_dec *dec, const unsigned char *buf, uint32_t storage) { dec->buf = buf; @@ -149,7 +149,6 @@ dec->dif = ((od_ec_window)1 << (OD_EC_WINDOW_SIZE - 1)) - 1; dec->rng = 0x8000; dec->cnt = -15; - dec->error = 0; od_ec_dec_refill(dec); }
diff --git a/aom_dsp/entdec.h b/aom_dsp/entdec.h index 1939f27..c746167 100644 --- a/aom_dsp/entdec.h +++ b/aom_dsp/entdec.h
@@ -53,8 +53,6 @@ uint16_t rng; /*The number of bits of data in the current value.*/ int16_t cnt; - /*Nonzero if an error occurred.*/ - int error; }; /*See entdec.c for further documentation.*/
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c index a00e6e8..2c13564 100644 --- a/av1/decoder/decodeframe.c +++ b/av1/decoder/decodeframe.c
@@ -397,9 +397,6 @@ aom_internal_error(xd->error_info, AOM_CODEC_CORRUPT_FRAME, "Invalid block size."); } - - int reader_corrupted_flag = aom_reader_has_error(r); - aom_merge_corrupted_flag(&xd->corrupted, reader_corrupted_flag); } typedef struct PadBlock { @@ -1657,9 +1654,6 @@ if (mbmi->skip) av1_reset_skip_context(xd, mi_row, mi_col, bsize, num_planes); decode_token_recon_block(pbi, td, mi_row, mi_col, r, bsize); - - int reader_corrupted_flag = aom_reader_has_error(r); - aom_merge_corrupted_flag(&xd->corrupted, reader_corrupted_flag); } static void set_offsets_for_pred_and_recon(AV1Decoder *const pbi,