summaryrefslogtreecommitdiffstats
path: root/third_party/aom/av1/encoder/encodetxb.h
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-17 05:59:08 -0500
committertrav90 <travawine@palemoon.org>2018-10-17 05:59:08 -0500
commitdf9477dfa60ebb5d31bc142e58ce46535c17abce (patch)
treec4fdd5d1b09d08c0514f208246260fc87372cb56 /third_party/aom/av1/encoder/encodetxb.h
parent0cc51bc106250988cc3b89cb5d743a5af52cd35a (diff)
downloadUXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.gz
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.lz
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.tar.xz
UXP-df9477dfa60ebb5d31bc142e58ce46535c17abce.zip
Update aom to slightly newer commit ID
Diffstat (limited to 'third_party/aom/av1/encoder/encodetxb.h')
-rw-r--r--third_party/aom/av1/encoder/encodetxb.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/third_party/aom/av1/encoder/encodetxb.h b/third_party/aom/av1/encoder/encodetxb.h
index 552d47b54..836033a54 100644
--- a/third_party/aom/av1/encoder/encodetxb.h
+++ b/third_party/aom/av1/encoder/encodetxb.h
@@ -22,6 +22,47 @@
#ifdef __cplusplus
extern "C" {
#endif
+
+typedef struct TxbInfo {
+ tran_low_t *qcoeff;
+ tran_low_t *dqcoeff;
+ const tran_low_t *tcoeff;
+ const int16_t *dequant;
+ int shift;
+ TX_SIZE tx_size;
+ int bwl;
+ int stride;
+ int eob;
+ int seg_eob;
+ const SCAN_ORDER *scan_order;
+ TXB_CTX *txb_ctx;
+ int64_t rdmult;
+ int64_t rddiv;
+} TxbInfo;
+
+typedef struct TxbCache {
+ int nz_count_arr[MAX_TX_SQUARE];
+ int nz_ctx_arr[MAX_TX_SQUARE][2];
+ int base_count_arr[NUM_BASE_LEVELS][MAX_TX_SQUARE];
+ int base_mag_arr[MAX_TX_SQUARE]
+ [2]; // [0]: max magnitude [1]: num of max magnitude
+ int base_ctx_arr[NUM_BASE_LEVELS][MAX_TX_SQUARE][2]; // [1]: not used
+
+ int br_count_arr[MAX_TX_SQUARE];
+ int br_mag_arr[MAX_TX_SQUARE]
+ [2]; // [0]: max magnitude [1]: num of max magnitude
+ int br_ctx_arr[MAX_TX_SQUARE][2]; // [1]: not used
+} TxbCache;
+
+typedef struct TxbProbs {
+ const aom_prob *dc_sign_prob;
+ const aom_prob *nz_map;
+ aom_prob (*coeff_base)[COEFF_BASE_CONTEXTS];
+ const aom_prob *coeff_lps;
+ const aom_prob *eob_flag;
+ const aom_prob *txb_skip;
+} TxbProbs;
+
void av1_alloc_txb_buf(AV1_COMP *cpi);
void av1_free_txb_buf(AV1_COMP *cpi);
int av1_cost_coeffs_txb(const AV1_COMP *const cpi, MACROBLOCK *x, int plane,
@@ -39,6 +80,14 @@ void av1_update_txb_context(const AV1_COMP *cpi, ThreadData *td,
const int mi_row, const int mi_col);
void av1_write_txb_probs(AV1_COMP *cpi, aom_writer *w);
+void av1_update_txb_context_b(int plane, int block, int blk_row, int blk_col,
+ BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
+ void *arg);
+
+void av1_update_and_record_txb_context(int plane, int block, int blk_row,
+ int blk_col, BLOCK_SIZE plane_bsize,
+ TX_SIZE tx_size, void *arg);
+
#if CONFIG_TXK_SEL
int64_t av1_search_txk_type(const AV1_COMP *cpi, MACROBLOCK *x, int plane,
int block, int blk_row, int blk_col,
@@ -46,6 +95,8 @@ int64_t av1_search_txk_type(const AV1_COMP *cpi, MACROBLOCK *x, int plane,
const ENTROPY_CONTEXT *a, const ENTROPY_CONTEXT *l,
int use_fast_coef_costing, RD_STATS *rd_stats);
#endif
+int av1_optimize_txb(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
+ TX_SIZE tx_size, TXB_CTX *txb_ctx);
#ifdef __cplusplus
}
#endif