summaryrefslogtreecommitdiff
path: root/vp9/encoder
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2014-12-09 11:31:45 -0800
committerJingning Han <jingning@google.com>2014-12-09 11:34:58 -0800
commit225cdef665d14df1b1178f3e735bd5d939e8ab49 (patch)
tree8e39435c000f35b33c483ce2ac0b4a4482ea6493 /vp9/encoder
parent4bacaab46daa6e5c2aa90c7dab6eaf103d01efe3 (diff)
downloadlibvpx-225cdef665d14df1b1178f3e735bd5d939e8ab49.tar
libvpx-225cdef665d14df1b1178f3e735bd5d939e8ab49.tar.gz
libvpx-225cdef665d14df1b1178f3e735bd5d939e8ab49.tar.bz2
libvpx-225cdef665d14df1b1178f3e735bd5d939e8ab49.zip
Make RTC coding flow support sub8x8 in key frame coding
This commit enables the use of sub8x8 blocks in RTC key frame encoding. It requires the block size to be preset and will decide the coding mode and encode the bit-stream. Change-Id: I35aaf8ee2d4d6085432410c7963f339f85a2c19b
Diffstat (limited to 'vp9/encoder')
-rw-r--r--vp9/encoder/vp9_encodeframe.c34
1 files changed, 22 insertions, 12 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index c20f542f0..3d8cdb3b4 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -3247,18 +3247,25 @@ static void nonrd_use_partition(VP9_COMP *cpi,
break;
case PARTITION_SPLIT:
subsize = get_subsize(bsize, PARTITION_SPLIT);
- nonrd_use_partition(cpi, td, tile_data, mi, tp, mi_row, mi_col,
- subsize, output_enabled, dummy_cost,
- pc_tree->split[0]);
- nonrd_use_partition(cpi, td, tile_data, mi + hbs, tp,
- mi_row, mi_col + hbs, subsize, output_enabled,
- dummy_cost, pc_tree->split[1]);
- nonrd_use_partition(cpi, td, tile_data, mi + hbs * mis, tp,
- mi_row + hbs, mi_col, subsize, output_enabled,
- dummy_cost, pc_tree->split[2]);
- nonrd_use_partition(cpi, td, tile_data, mi + hbs * mis + hbs, tp,
- mi_row + hbs, mi_col + hbs, subsize, output_enabled,
- dummy_cost, pc_tree->split[3]);
+ if (bsize == BLOCK_8X8) {
+ nonrd_pick_sb_modes(cpi, tile_data, x, mi_row, mi_col, dummy_cost,
+ subsize, pc_tree->leaf_split[0]);
+ encode_b_rt(cpi, td, tile_info, tp, mi_row, mi_col,
+ output_enabled, subsize, pc_tree->leaf_split[0]);
+ } else {
+ nonrd_use_partition(cpi, td, tile_data, mi, tp, mi_row, mi_col,
+ subsize, output_enabled, dummy_cost,
+ pc_tree->split[0]);
+ nonrd_use_partition(cpi, td, tile_data, mi + hbs, tp,
+ mi_row, mi_col + hbs, subsize, output_enabled,
+ dummy_cost, pc_tree->split[1]);
+ nonrd_use_partition(cpi, td, tile_data, mi + hbs * mis, tp,
+ mi_row + hbs, mi_col, subsize, output_enabled,
+ dummy_cost, pc_tree->split[2]);
+ nonrd_use_partition(cpi, td, tile_data, mi + hbs * mis + hbs, tp,
+ mi_row + hbs, mi_col + hbs, subsize, output_enabled,
+ dummy_cost, pc_tree->split[3]);
+ }
break;
default:
assert(0 && "Invalid partition type.");
@@ -3299,6 +3306,9 @@ static void encode_nonrd_sb_row(VP9_COMP *cpi,
// Set the partition type of the 64X64 block
switch (sf->partition_search_type) {
case VAR_BASED_PARTITION:
+ // TODO(jingning) Only key frame coding supports sub8x8 block at this
+ // point. To be continued to enable sub8x8 block mode decision for
+ // P frames.
choose_partitioning(cpi, tile_info, x, mi_row, mi_col);
nonrd_use_partition(cpi, td, tile_data, mi, tp, mi_row, mi_col,
BLOCK_64X64, 1, &dummy_rdc, td->pc_root);