summaryrefslogtreecommitdiff
path: root/vp8/encoder/onyx_int.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@google.com>2012-08-20 14:43:34 -0700
committerRonald S. Bultje <rbultje@google.com>2012-08-20 14:43:34 -0700
commit5d4cffb35f4bc23462eedc95a4802c65e32d7d5a (patch)
tree6fce23691dfa0c01aeb422f6c6b68c75296e91f2 /vp8/encoder/onyx_int.h
parent319dd1c0f58d3db46713460ca10e920f2b18b605 (diff)
downloadlibvpx-5d4cffb35f4bc23462eedc95a4802c65e32d7d5a.tar
libvpx-5d4cffb35f4bc23462eedc95a4802c65e32d7d5a.tar.gz
libvpx-5d4cffb35f4bc23462eedc95a4802c65e32d7d5a.tar.bz2
libvpx-5d4cffb35f4bc23462eedc95a4802c65e32d7d5a.zip
Superblock coding.
This commit adds a pick_sb_mode() function which selects the best 32x32 superblock coding mode. Then it selects the best per-MB modes, compares the two and encodes that in the bitstream. The bitstream coding is rather simplistic right now. At the SB level, we code a bit to indicate whether this block uses SB-coding (32x32 prediction) or MB-coding (anything else), and then we follow with the actual modes. This could and should be modified in the future, but is omitted from this commit because it will likely involve reorganizing much more code rather than just adding SB coding, so it's better to let that be judged on its own merits. Gains on derf: about even, YT/HD: +0.75%, STD/HD: +1.5%. Change-Id: Iae313a7cbd8f75b3c66d04a68b991cb096eaaba6
Diffstat (limited to 'vp8/encoder/onyx_int.h')
-rw-r--r--vp8/encoder/onyx_int.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h
index ff3a21107..7fb7dd2ff 100644
--- a/vp8/encoder/onyx_int.h
+++ b/vp8/encoder/onyx_int.h
@@ -359,7 +359,9 @@ enum {
BLOCK_8X8,
BLOCK_4X4,
BLOCK_16X16,
- BLOCK_MAX_SEGMENTS
+ BLOCK_MAX_SEGMENTS,
+ BLOCK_32X32 = BLOCK_MAX_SEGMENTS,
+ BLOCK_MAX_SB_SEGMENTS,
};
typedef struct VP8_COMP {
@@ -528,6 +530,10 @@ typedef struct VP8_COMP {
int cq_target_quality;
+#if CONFIG_SUPERBLOCKS
+ int sb_count;
+ int sb_ymode_count [VP8_I32X32_MODES];
+#endif
int ymode_count [VP8_YMODES]; /* intra MB type cts this frame */
int bmode_count [VP8_BINTRAMODES];
int i8x8_mode_count [VP8_I8X8_MODES];
@@ -628,7 +634,7 @@ typedef struct VP8_COMP {
vp8_full_search_fn_t full_search_sad;
vp8_refining_search_fn_t refining_search_sad;
vp8_diamond_search_fn_t diamond_search_sad;
- vp8_variance_fn_ptr_t fn_ptr[BLOCK_MAX_SEGMENTS];
+ vp8_variance_fn_ptr_t fn_ptr[BLOCK_MAX_SB_SEGMENTS];
uint64_t time_receive_data;
uint64_t time_compress_data;
uint64_t time_pick_lpf;
@@ -732,9 +738,6 @@ typedef struct VP8_COMP {
int droppable;
- // Global store for SB left contexts, one for each MB row in the SB
- ENTROPY_CONTEXT_PLANES left_context[2];
-
// TODO Do we still need this??
int update_context;