Commit 665cd70a authored by Thomas Davies's avatar Thomas Davies

DELTA_Q: use correct probability description.

Delta Q is coded with a single tree context.

Change-Id: Ie1e56c70285e948232049bfb4a51ad0e9ee25f75
parent 00c54330
...@@ -626,8 +626,7 @@ static const aom_prob default_obmc_prob[BLOCK_SIZES] = { ...@@ -626,8 +626,7 @@ static const aom_prob default_obmc_prob[BLOCK_SIZES] = {
#endif #endif
#if CONFIG_DELTA_Q #if CONFIG_DELTA_Q
static const aom_prob default_delta_q_probs[DELTA_Q_CONTEXTS] = { 220, 220, static const aom_prob default_delta_q_probs[DELTA_Q_PROBS] = { 220, 220, 220 };
220 };
#endif #endif
#if CONFIG_EC_MULTISYMBOL #if CONFIG_EC_MULTISYMBOL
int av1_intra_mode_ind[INTRA_MODES]; int av1_intra_mode_ind[INTRA_MODES];
...@@ -2015,7 +2014,7 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) { ...@@ -2015,7 +2014,7 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) {
} }
#if CONFIG_DELTA_Q #if CONFIG_DELTA_Q
for (i = 0; i < DELTA_Q_CONTEXTS; ++i) for (i = 0; i < DELTA_Q_PROBS; ++i)
fc->delta_q_prob[i] = fc->delta_q_prob[i] =
mode_mv_merge_probs(pre_fc->delta_q_prob[i], counts->delta_q[i]); mode_mv_merge_probs(pre_fc->delta_q_prob[i], counts->delta_q[i]);
#endif #endif
...@@ -2133,7 +2132,7 @@ void av1_adapt_intra_frame_probs(AV1_COMMON *cm) { ...@@ -2133,7 +2132,7 @@ void av1_adapt_intra_frame_probs(AV1_COMMON *cm) {
} }
#endif #endif
#if CONFIG_DELTA_Q #if CONFIG_DELTA_Q
for (i = 0; i < DELTA_Q_CONTEXTS; ++i) for (i = 0; i < DELTA_Q_PROBS; ++i)
fc->delta_q_prob[i] = fc->delta_q_prob[i] =
mode_mv_merge_probs(pre_fc->delta_q_prob[i], counts->delta_q[i]); mode_mv_merge_probs(pre_fc->delta_q_prob[i], counts->delta_q[i]);
#endif #endif
......
...@@ -260,7 +260,7 @@ typedef struct frame_contexts { ...@@ -260,7 +260,7 @@ typedef struct frame_contexts {
#endif #endif
#endif #endif
#if CONFIG_DELTA_Q #if CONFIG_DELTA_Q
aom_prob delta_q_prob[DELTA_Q_CONTEXTS]; aom_prob delta_q_prob[DELTA_Q_PROBS];
#endif #endif
} FRAME_CONTEXT; } FRAME_CONTEXT;
...@@ -361,7 +361,7 @@ typedef struct FRAME_COUNTS { ...@@ -361,7 +361,7 @@ typedef struct FRAME_COUNTS {
nmv_context_counts mv; nmv_context_counts mv;
#endif #endif
#if CONFIG_DELTA_Q #if CONFIG_DELTA_Q
unsigned int delta_q[DELTA_Q_CONTEXTS][2]; unsigned int delta_q[DELTA_Q_PROBS][2];
#endif #endif
#if CONFIG_EXT_TX #if CONFIG_EXT_TX
#if CONFIG_RECT_TX #if CONFIG_RECT_TX
......
...@@ -435,7 +435,7 @@ typedef enum { ...@@ -435,7 +435,7 @@ typedef enum {
#define INTER_MODE_CONTEXTS 7 #define INTER_MODE_CONTEXTS 7
#if CONFIG_DELTA_Q #if CONFIG_DELTA_Q
#define DELTA_Q_SMALL 3 #define DELTA_Q_SMALL 3
#define DELTA_Q_CONTEXTS (DELTA_Q_SMALL) #define DELTA_Q_PROBS (DELTA_Q_SMALL)
#define DEFAULT_DELTA_Q_RES 4 #define DEFAULT_DELTA_Q_RES 4
#endif #endif
......
...@@ -4588,7 +4588,7 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data, ...@@ -4588,7 +4588,7 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
av1_diff_update_prob(&r, &fc->skip_probs[k], ACCT_STR); av1_diff_update_prob(&r, &fc->skip_probs[k], ACCT_STR);
#if CONFIG_DELTA_Q #if CONFIG_DELTA_Q
for (k = 0; k < DELTA_Q_CONTEXTS; ++k) for (k = 0; k < DELTA_Q_PROBS; ++k)
av1_diff_update_prob(&r, &fc->delta_q_prob[k], ACCT_STR); av1_diff_update_prob(&r, &fc->delta_q_prob[k], ACCT_STR);
#endif #endif
......
...@@ -588,7 +588,7 @@ static void update_delta_q_probs(AV1_COMMON *cm, aom_writer *w, ...@@ -588,7 +588,7 @@ static void update_delta_q_probs(AV1_COMMON *cm, aom_writer *w,
#else #else
const int probwt = 1; const int probwt = 1;
#endif #endif
for (k = 0; k < DELTA_Q_CONTEXTS; ++k) { for (k = 0; k < DELTA_Q_PROBS; ++k) {
av1_cond_prob_diff_update(w, &cm->fc->delta_q_prob[k], counts->delta_q[k], av1_cond_prob_diff_update(w, &cm->fc->delta_q_prob[k], counts->delta_q[k],
probwt); probwt);
} }
......
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