summaryrefslogtreecommitdiffstats
path: root/third_party/aom/av1/decoder/decoder.c
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-18 06:04:57 -0500
committertrav90 <travawine@palemoon.org>2018-10-18 06:04:57 -0500
commit7369c7d7a5eed32963d8af37658286617919f91c (patch)
tree5397ce7ee9bca1641118fdc3187bd9e2b24fdc9c /third_party/aom/av1/decoder/decoder.c
parent77887af9c4ad1420bbdb33984af4f74b55ca59db (diff)
downloadUXP-7369c7d7a5eed32963d8af37658286617919f91c.tar
UXP-7369c7d7a5eed32963d8af37658286617919f91c.tar.gz
UXP-7369c7d7a5eed32963d8af37658286617919f91c.tar.lz
UXP-7369c7d7a5eed32963d8af37658286617919f91c.tar.xz
UXP-7369c7d7a5eed32963d8af37658286617919f91c.zip
Update aom to commit id f5bdeac22930ff4c6b219be49c843db35970b918
Diffstat (limited to 'third_party/aom/av1/decoder/decoder.c')
-rw-r--r--third_party/aom/av1/decoder/decoder.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/third_party/aom/av1/decoder/decoder.c b/third_party/aom/av1/decoder/decoder.c
index b4f37d4e7..3998c20ee 100644
--- a/third_party/aom/av1/decoder/decoder.c
+++ b/third_party/aom/av1/decoder/decoder.c
@@ -50,8 +50,6 @@ static void initialize_dec(void) {
av1_init_wedge_masks();
#endif // CONFIG_EXT_INTER
init_done = 1;
- av1_indices_from_tree(av1_intra_mode_ind, av1_intra_mode_inv,
- av1_intra_mode_tree);
av1_indices_from_tree(av1_switchable_interp_ind, av1_switchable_interp_inv,
av1_switchable_interp_tree);
#if CONFIG_EXT_TX
@@ -65,8 +63,6 @@ static void initialize_dec(void) {
#else
av1_indices_from_tree(av1_ext_tx_ind, av1_ext_tx_inv, av1_ext_tx_tree);
#endif
- av1_indices_from_tree(av1_inter_mode_ind, av1_inter_mode_inv,
- av1_inter_mode_tree);
}
}
@@ -236,7 +232,12 @@ aom_codec_err_t av1_set_reference_dec(AV1_COMMON *cm,
// cpi->lst3_fb_idx = 2;
// cpi->gld_fb_idx = 3;
// cpi->bwd_fb_idx = 4;
+ // #if CONFIG_ALTREF2
+ // cpi->alt2_fb_idx = 5;
+ // cpi->alt_fb_idx = 6;
+ // #else // !CONFIG_ALTREF2
// cpi->alt_fb_idx = 5;
+ // #endif // CONFIG_ALTREF2
// #else // CONFIG_EXT_REFS
// cpi->gld_fb_idx = 1;
// cpi->alt_fb_idx = 2;
@@ -255,9 +256,16 @@ aom_codec_err_t av1_set_reference_dec(AV1_COMMON *cm,
idx = cm->ref_frame_map[3];
} else if (ref_frame_flag == AOM_BWD_FLAG) {
idx = cm->ref_frame_map[4];
+#if CONFIG_ALTREF2
+ } else if (ref_frame_flag == AOM_ALT2_FLAG) {
+ idx = cm->ref_frame_map[5];
+ } else if (ref_frame_flag == AOM_ALT_FLAG) {
+ idx = cm->ref_frame_map[6];
+#else // !CONFIG_ALTREF2
} else if (ref_frame_flag == AOM_ALT_FLAG) {
idx = cm->ref_frame_map[5];
-#else
+#endif // CONFIG_ALTREF2
+#else // !CONFIG_EXT_REFS
} else if (ref_frame_flag == AOM_GOLD_FLAG) {
idx = cm->ref_frame_map[1];
} else if (ref_frame_flag == AOM_ALT_FLAG) {
@@ -446,7 +454,10 @@ int av1_receive_compressed_data(AV1Decoder *pbi, size_t size,
// border.
if (pbi->dec_tile_row == -1 && pbi->dec_tile_col == -1)
#endif // CONFIG_EXT_TILE
- aom_extend_frame_inner_borders(cm->frame_to_show);
+ // TODO(debargha): Fix encoder side mv range, so that we can use the
+ // inner border extension. As of now use the larger extension.
+ // aom_extend_frame_inner_borders(cm->frame_to_show);
+ aom_extend_frame_borders(cm->frame_to_show);
aom_clear_system_state();
@@ -500,7 +511,6 @@ int av1_get_raw_frame(AV1Decoder *pbi, YV12_BUFFER_CONFIG *sd) {
/* no raw frame to show!!! */
if (!cm->show_frame) return ret;
- pbi->ready_for_new_data = 1;
*sd = *cm->frame_to_show;
ret = 0;
aom_clear_system_state();
@@ -518,6 +528,7 @@ int av1_get_frame_to_show(AV1Decoder *pbi, YV12_BUFFER_CONFIG *frame) {
aom_codec_err_t av1_parse_superframe_index(const uint8_t *data, size_t data_sz,
uint32_t sizes[8], int *count,
+ int *index_size,
aom_decrypt_cb decrypt_cb,
void *decrypt_state) {
// A chunk ending with a byte matching 0xc0 is an invalid chunk unless
@@ -530,13 +541,14 @@ aom_codec_err_t av1_parse_superframe_index(const uint8_t *data, size_t data_sz,
size_t frame_sz_sum = 0;
assert(data_sz);
- marker = read_marker(decrypt_cb, decrypt_state, data + data_sz - 1);
+ marker = read_marker(decrypt_cb, decrypt_state, data);
*count = 0;
if ((marker & 0xe0) == 0xc0) {
const uint32_t frames = (marker & 0x7) + 1;
const uint32_t mag = ((marker >> 3) & 0x3) + 1;
const size_t index_sz = 2 + mag * (frames - 1);
+ *index_size = (int)index_sz;
// This chunk is marked as having a superframe index but doesn't have
// enough data for it, thus it's an invalid superframe index.
@@ -544,7 +556,7 @@ aom_codec_err_t av1_parse_superframe_index(const uint8_t *data, size_t data_sz,
{
const uint8_t marker2 =
- read_marker(decrypt_cb, decrypt_state, data + data_sz - index_sz);
+ read_marker(decrypt_cb, decrypt_state, data + index_sz - 1);
// This chunk is marked as having a superframe index but doesn't have
// the matching marker byte at the front of the index therefore it's an
@@ -555,7 +567,7 @@ aom_codec_err_t av1_parse_superframe_index(const uint8_t *data, size_t data_sz,
{
// Found a valid superframe index.
uint32_t i, j;
- const uint8_t *x = &data[data_sz - index_sz + 1];
+ const uint8_t *x = &data[1];
// Frames has a maximum of 8 and mag has a maximum of 4.
uint8_t clear_buffer[28];