Commit 0444deb8 authored by Dmitry Kovalev's avatar Dmitry Kovalev

Removing vp9_optimize_b() function.

Change-Id: If859c9d58a8fe3f478d409b9e9ca59bcee8fd35d
parent 4632a96d
...@@ -105,10 +105,9 @@ static int trellis_get_coeff_context(const int16_t *scan, ...@@ -105,10 +105,9 @@ static int trellis_get_coeff_context(const int16_t *scan,
return pt; return pt;
} }
static void optimize_b(MACROBLOCK *mb, static void optimize_b(int plane, int block, BLOCK_SIZE plane_bsize,
int plane, int block, BLOCK_SIZE plane_bsize, TX_SIZE tx_size, MACROBLOCK *mb,
ENTROPY_CONTEXT *a, ENTROPY_CONTEXT *l, struct optimize_ctx *ctx) {
TX_SIZE tx_size) {
MACROBLOCKD *const xd = &mb->e_mbd; MACROBLOCKD *const xd = &mb->e_mbd;
struct macroblock_plane *p = &mb->plane[plane]; struct macroblock_plane *p = &mb->plane[plane];
struct macroblockd_plane *pd = &xd->plane[plane]; struct macroblockd_plane *pd = &xd->plane[plane];
...@@ -134,6 +133,11 @@ static void optimize_b(MACROBLOCK *mb, ...@@ -134,6 +133,11 @@ static void optimize_b(MACROBLOCK *mb,
const scan_order *so = get_scan(xd, tx_size, type, block); const scan_order *so = get_scan(xd, tx_size, type, block);
const int16_t *scan = so->scan; const int16_t *scan = so->scan;
const int16_t *nb = so->neighbors; const int16_t *nb = so->neighbors;
ENTROPY_CONTEXT *a, *l;
int tx_x, tx_y;
txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &tx_x, &tx_y);
a = &ctx->ta[plane][tx_x];
l = &ctx->tl[plane][tx_y];
assert((!type && !plane) || (type && plane)); assert((!type && !plane) || (type && plane));
assert(eob <= default_eob); assert(eob <= default_eob);
...@@ -307,14 +311,6 @@ static void optimize_b(MACROBLOCK *mb, ...@@ -307,14 +311,6 @@ static void optimize_b(MACROBLOCK *mb,
*a = *l = (final_eob > 0); *a = *l = (final_eob > 0);
} }
void vp9_optimize_b(int plane, int block, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, MACROBLOCK *mb, struct optimize_ctx *ctx) {
int x, y;
txfrm_block_to_raster_xy(plane_bsize, tx_size, block, &x, &y);
optimize_b(mb, plane, block, plane_bsize,
&ctx->ta[plane][x], &ctx->tl[plane][y], tx_size);
}
static void optimize_init_b(int plane, BLOCK_SIZE bsize, static void optimize_init_b(int plane, BLOCK_SIZE bsize,
struct encode_b_args *args) { struct encode_b_args *args) {
const MACROBLOCKD *xd = &args->x->e_mbd; const MACROBLOCKD *xd = &args->x->e_mbd;
...@@ -419,7 +415,7 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize, ...@@ -419,7 +415,7 @@ static void encode_block(int plane, int block, BLOCK_SIZE plane_bsize,
vp9_xform_quant(x, plane, block, plane_bsize, tx_size); vp9_xform_quant(x, plane, block, plane_bsize, tx_size);
if (x->optimize && (!x->skip_recode || !x->skip_optimize)) { if (x->optimize && (!x->skip_recode || !x->skip_optimize)) {
vp9_optimize_b(plane, block, plane_bsize, tx_size, x, ctx); optimize_b(plane, block, plane_bsize, tx_size, x, ctx);
} else { } else {
ctx->ta[plane][i] = p->eobs[block] > 0; ctx->ta[plane][i] = p->eobs[block] > 0;
ctx->tl[plane][j] = p->eobs[block] > 0; ctx->tl[plane][j] = p->eobs[block] > 0;
...@@ -533,7 +529,7 @@ static void encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize, ...@@ -533,7 +529,7 @@ static void encode_block_intra(int plane, int block, BLOCK_SIZE plane_bsize,
src_diff = &p->src_diff[4 * (j * diff_stride + i)]; src_diff = &p->src_diff[4 * (j * diff_stride + i)];
// if (x->optimize) // if (x->optimize)
// vp9_optimize_b(plane, block, plane_bsize, tx_size, x, args->ctx); // optimize_b(plane, block, plane_bsize, tx_size, x, args->ctx);
switch (tx_size) { switch (tx_size) {
case TX_32X32: case TX_32X32:
......
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