]> granicus.if.org Git - libvpx/commitdiff
Adds function to return superblock entropy context
authorDebargha Mukherjee <debargha@google.com>
Tue, 15 Mar 2016 21:27:45 +0000 (14:27 -0700)
committerDebargha Mukherjee <debargha@google.com>
Tue, 15 Mar 2016 21:27:45 +0000 (14:27 -0700)
For use with switchable quant profiles.

Change-Id: I2a4aa93204f086094457860d1646707d71f33f5e

vp9/common/vp9_entropy.h

index ffe9aff7f2695be40f1259d6d999eb8274e01f2c..25b46a5649625c31f2d0ccdda2952d8c30543628 100644 (file)
@@ -264,6 +264,13 @@ static INLINE int get_entropy_context(TX_SIZE tx_size, const ENTROPY_CONTEXT *a,
   return combine_entropy_contexts(above_ec, left_ec);
 }
 
+static INLINE int get_entropy_context_sb(const MACROBLOCKD *xd,
+                                         BLOCK_SIZE bsize) {
+  const struct macroblockd_plane *pd = &xd->plane[0];
+  const TX_SIZE max_tx_size = max_txsize_lookup[bsize];
+  return get_entropy_context(max_tx_size, pd->above_context, pd->left_context);
+}
+
 static INLINE const scan_order *get_scan(const MACROBLOCKD *xd, TX_SIZE tx_size,
                                          PLANE_TYPE type, int block_idx) {
   const MODE_INFO *const mi = xd->mi[0].src_mi;