Commit 5b9dc7c6 authored by Jingning Han's avatar Jingning Han Committed by Gerrit Code Review
Browse files

Merge "Make SB Decoding units size-independent" into experimental

parents 0cef7234 e63099d1
...@@ -625,7 +625,7 @@ static void decode_sb64(VP9D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int mb_col, ...@@ -625,7 +625,7 @@ static void decode_sb64(VP9D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int mb_col,
} }
// dequantization and idct // dequantization and idct
eobtotal = vp9_decode_sb64_tokens(pbi, xd, bc); eobtotal = vp9_decode_tokens(pbi, xd, bc, BLOCK_SIZE_SB64X64);
if (eobtotal == 0) { // skip loopfilter if (eobtotal == 0) { // skip loopfilter
for (n = 0; n < 16; n++) { for (n = 0; n < 16; n++) {
const int x_idx = n & 3, y_idx = n >> 2; const int x_idx = n & 3, y_idx = n >> 2;
...@@ -704,7 +704,7 @@ static void decode_sb32(VP9D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int mb_col, ...@@ -704,7 +704,7 @@ static void decode_sb32(VP9D_COMP *pbi, MACROBLOCKD *xd, int mb_row, int mb_col,
} }
// dequantization and idct // dequantization and idct
eobtotal = vp9_decode_sb_tokens(pbi, xd, bc); eobtotal = vp9_decode_tokens(pbi, xd, bc, BLOCK_SIZE_SB32X32);
if (eobtotal == 0) { // skip loopfilter if (eobtotal == 0) { // skip loopfilter
mi->mbmi.mb_skip_coeff = 1; mi->mbmi.mb_skip_coeff = 1;
if (mb_col + 1 < pc->mb_cols) if (mb_col + 1 < pc->mb_cols)
...@@ -766,7 +766,7 @@ static void decode_mb(VP9D_COMP *pbi, MACROBLOCKD *xd, ...@@ -766,7 +766,7 @@ static void decode_mb(VP9D_COMP *pbi, MACROBLOCKD *xd,
#if CONFIG_NEWBINTRAMODES #if CONFIG_NEWBINTRAMODES
if (mode != B_PRED) if (mode != B_PRED)
#endif #endif
eobtotal = vp9_decode_mb_tokens(pbi, xd, bc); eobtotal = vp9_decode_tokens(pbi, xd, bc, BLOCK_SIZE_MB16X16);
} }
//mode = xd->mode_info_context->mbmi.mode; //mode = xd->mode_info_context->mbmi.mode;
......
...@@ -401,26 +401,26 @@ static INLINE int block_idx_4x4(MACROBLOCKD* const xd, int block_size_b, ...@@ -401,26 +401,26 @@ static INLINE int block_idx_4x4(MACROBLOCKD* const xd, int block_size_b,
static INLINE int decode_block_plane(VP9D_COMP* const pbi, static INLINE int decode_block_plane(VP9D_COMP* const pbi,
MACROBLOCKD* const xd, MACROBLOCKD* const xd,
BOOL_DECODER* const bc, BOOL_DECODER* const bc,
BLOCK_SIZE_LG2 block_size, int block_size,
int segment_id, int segment_id,
int plane, int plane,
int is_split) { int is_split) {
// block and transform sizes, in number of 4x4 blocks log 2 ("*_b") // block and transform sizes, in number of 4x4 blocks log 2 ("*_b")
// 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8 // 4x4=0, 8x8=2, 16x16=4, 32x32=6, 64x64=8
const TX_SIZE tx_size = xd->mode_info_context->mbmi.txfm_size; const TX_SIZE tx_size = xd->mode_info_context->mbmi.txfm_size;
const BLOCK_SIZE_LG2 block_size_b = block_size; const int block_size_b = block_size;
const BLOCK_SIZE_LG2 txfrm_size_b = tx_size * 2; const int txfrm_size_b = tx_size * 2;
// subsampled size of the block // subsampled size of the block
const int ss_sum = xd->plane[plane].subsampling_x + const int ss_sum = xd->plane[plane].subsampling_x +
xd->plane[plane].subsampling_y; xd->plane[plane].subsampling_y;
const BLOCK_SIZE_LG2 ss_block_size = block_size_b - ss_sum; const int ss_block_size = block_size_b - ss_sum;
// size of the transform to use. scale the transform down if it's larger // size of the transform to use. scale the transform down if it's larger
// than the size of the subsampled data, or forced externally by the mb mode. // than the size of the subsampled data, or forced externally by the mb mode.
const int ss_max = MAX(xd->plane[plane].subsampling_x, const int ss_max = MAX(xd->plane[plane].subsampling_x,
xd->plane[plane].subsampling_y); xd->plane[plane].subsampling_y);
const BLOCK_SIZE_LG2 ss_txfrm_size = txfrm_size_b > ss_block_size || is_split const int ss_txfrm_size = txfrm_size_b > ss_block_size || is_split
? txfrm_size_b - ss_max * 2 ? txfrm_size_b - ss_max * 2
: txfrm_size_b; : txfrm_size_b;
const TX_SIZE ss_tx_size = ss_txfrm_size / 2; const TX_SIZE ss_tx_size = ss_txfrm_size / 2;
...@@ -477,22 +477,12 @@ static INLINE int decode_blocks(VP9D_COMP* const pbi, ...@@ -477,22 +477,12 @@ static INLINE int decode_blocks(VP9D_COMP* const pbi,
tx_size == TX_8X8 && (mode == I8X8_PRED || mode == SPLITMV)); tx_size == TX_8X8 && (mode == I8X8_PRED || mode == SPLITMV));
} }
int vp9_decode_sb64_tokens(VP9D_COMP* const pbi, int vp9_decode_tokens(VP9D_COMP* const pbi,
MACROBLOCKD* const xd,
BOOL_DECODER* const bc) {
return decode_blocks(pbi, xd, bc, BLOCK_64X64_LG2);
}
int vp9_decode_sb_tokens(VP9D_COMP* const pbi,
MACROBLOCKD* const xd,
BOOL_DECODER* const bc) {
return decode_blocks(pbi, xd, bc, BLOCK_32X32_LG2);
}
int vp9_decode_mb_tokens(VP9D_COMP* const pbi,
MACROBLOCKD* const xd, MACROBLOCKD* const xd,
BOOL_DECODER* const bc) { BOOL_DECODER* const bc,
return decode_blocks(pbi, xd, bc, BLOCK_16X16_LG2); BLOCK_SIZE_TYPE bsize) {
const int bwl = mb_width_log2(bsize) + 2, bhl = mb_height_log2(bsize) + 2;
return decode_blocks(pbi, xd, bc, bwl + bhl);
} }
#if CONFIG_NEWBINTRAMODES #if CONFIG_NEWBINTRAMODES
......
...@@ -14,16 +14,10 @@ ...@@ -14,16 +14,10 @@
#include "vp9/decoder/vp9_onyxd_int.h" #include "vp9/decoder/vp9_onyxd_int.h"
int vp9_decode_mb_tokens(VP9D_COMP* const, MACROBLOCKD* const, int vp9_decode_tokens(VP9D_COMP* const pbi,
BOOL_DECODER* const); MACROBLOCKD* const xd,
BOOL_DECODER* const bc,
int vp9_decode_sb_tokens(VP9D_COMP* const pbi, BLOCK_SIZE_TYPE bsize);
MACROBLOCKD* const xd,
BOOL_DECODER* const bc);
int vp9_decode_sb64_tokens(VP9D_COMP* const pbi,
MACROBLOCKD* const xd,
BOOL_DECODER* const bc);
int vp9_decode_mb_tokens_4x4_uv(VP9D_COMP* const dx, MACROBLOCKD* const xd, int vp9_decode_mb_tokens_4x4_uv(VP9D_COMP* const dx, MACROBLOCKD* const xd,
BOOL_DECODER* const bc); BOOL_DECODER* const bc);
......
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