ref: 1e8fc24af8ded08c3ce0e1d3d60008c808bcf0cd
parent: 9a1250e3e03ab9e79b0f357139d47d9dc2371240
parent: c983c966cbed4919d008c7fc168292af75593bcd
author: Dmitry Kovalev <[email protected]>
date: Thu Oct 10 06:49:27 EDT 2013
Merge "Removing inv_txm4x4_1_add and inv_txm4x4_add function pointers."
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -221,8 +221,6 @@
int lossless;
/* Inverse transform function pointers. */
- void (*inv_txm4x4_1_add)(int16_t *input, uint8_t *dest, int stride);
- void (*inv_txm4x4_add)(int16_t *input, uint8_t *dest, int stride);
void (*itxm_add)(int16_t *input, uint8_t *dest, int stride, int eob);
struct subpix_fn_table subpix;
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -22,6 +22,7 @@
#include "vp9/common/vp9_entropymode.h"
#include "vp9/common/vp9_extend.h"
#include "vp9/common/vp9_findnearmv.h"
+#include "vp9/common/vp9_idct.h"
#include "vp9/common/vp9_mvref_common.h"
#include "vp9/common/vp9_pred_common.h"
#include "vp9/common/vp9_quant_common.h"
@@ -1862,8 +1863,7 @@
// printf("Switching to lossless\n");
cpi->mb.fwd_txm8x4 = vp9_short_walsh8x4;
cpi->mb.fwd_txm4x4 = vp9_short_walsh4x4;
- cpi->mb.e_mbd.inv_txm4x4_1_add = vp9_iwht4x4_1_add;
- cpi->mb.e_mbd.inv_txm4x4_add = vp9_iwht4x4_16_add;
+ cpi->mb.e_mbd.itxm_add = vp9_iwht4x4_add;
cpi->mb.optimize = 0;
cpi->common.lf.filter_level = 0;
cpi->zbin_mode_boost_enabled = 0;
@@ -1872,8 +1872,7 @@
// printf("Not lossless\n");
cpi->mb.fwd_txm8x4 = vp9_short_fdct8x4;
cpi->mb.fwd_txm4x4 = vp9_short_fdct4x4;
- cpi->mb.e_mbd.inv_txm4x4_1_add = vp9_idct4x4_1_add;
- cpi->mb.e_mbd.inv_txm4x4_add = vp9_idct4x4_16_add;
+ cpi->mb.e_mbd.itxm_add = vp9_idct4x4_add;
}
}
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -40,15 +40,6 @@
}
}
-static void inverse_transform_b_4x4_add(MACROBLOCKD *xd, int eob,
- int16_t *dqcoeff, uint8_t *dest,
- int stride) {
- if (eob <= 1)
- xd->inv_txm4x4_1_add(dqcoeff, dest, stride);
- else
- xd->inv_txm4x4_add(dqcoeff, dest, stride);
-}
-
static void subtract_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
struct macroblock_plane *const p = &x->plane[plane];
const MACROBLOCKD *const xd = &x->e_mbd;
@@ -463,8 +454,7 @@
// this is like vp9_short_idct4x4 but has a special case around eob<=1
// which is significant (not just an optimization) for the lossless
// case.
- inverse_transform_b_4x4_add(xd, pd->eobs[block], dqcoeff,
- dst, pd->dst.stride);
+ xd->itxm_add(dqcoeff, dst, pd->dst.stride, pd->eobs[block]);
break;
default:
assert(!"Invalid transform size");
@@ -631,7 +621,7 @@
// this is like vp9_short_idct4x4 but has a special case around eob<=1
// which is significant (not just an optimization) for the lossless
// case.
- inverse_transform_b_4x4_add(xd, *eob, dqcoeff, dst, pd->dst.stride);
+ xd->itxm_add(dqcoeff, dst, pd->dst.stride, *eob);
else
vp9_short_iht4x4_add(dqcoeff, dst, pd->dst.stride, tx_type);
}
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -17,6 +17,7 @@
#include "vp9/common/vp9_alloccommon.h"
#include "vp9/common/vp9_filter.h"
+#include "vp9/common/vp9_idct.h"
#if CONFIG_VP9_POSTPROC
#include "vp9/common/vp9_postproc.h"
#endif
@@ -1227,14 +1228,8 @@
cpi->oxcf.cq_level = q_trans[cpi->oxcf.cq_level];
cpi->oxcf.lossless = oxcf->lossless;
- if (cpi->oxcf.lossless) {
- cpi->mb.e_mbd.inv_txm4x4_1_add = vp9_iwht4x4_1_add;
- cpi->mb.e_mbd.inv_txm4x4_add = vp9_iwht4x4_16_add;
- } else {
- cpi->mb.e_mbd.inv_txm4x4_1_add = vp9_idct4x4_1_add;
- cpi->mb.e_mbd.inv_txm4x4_add = vp9_idct4x4_16_add;
- }
-
+ cpi->mb.e_mbd.itxm_add = cpi->oxcf.lossless ? vp9_iwht4x4_add
+ : vp9_idct4x4_add;
cpi->baseline_gf_interval = DEFAULT_GF_INTERVAL;
cpi->ref_frame_flags = VP9_ALT_FLAG | VP9_GOLD_FLAG | VP9_LAST_FLAG;
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -1108,8 +1108,8 @@
vp9_short_iht4x4_add(BLOCK_OFFSET(pd->dqcoeff, block),
dst, pd->dst.stride, tx_type);
else
- xd->inv_txm4x4_add(BLOCK_OFFSET(pd->dqcoeff, block),
- dst, pd->dst.stride);
+ xd->itxm_add(BLOCK_OFFSET(pd->dqcoeff, block), dst, pd->dst.stride,
+ 16);
}
}