Commit 1dbda1b9 authored by Thomas Daede's avatar Thomas Daede

Convert PVQ coefficient handling functions to tran_low_t.

Change-Id: Iad2b526d65865cbcb2119aca21686563ca8e97fd
parent b13ce13c
......@@ -109,8 +109,8 @@ const int *const OD_BAND_OFFSETS[OD_TXSIZES + 1] = {
* @param [in] src source coefficient block
* @param [int] int source vector row stride
*/
static void od_band_from_raster(const band_layout *layout, int16_t *dst,
const int16_t *src, int stride, TX_TYPE tx_type) {
static void od_band_from_raster(const band_layout *layout, tran_low_t *dst,
const tran_low_t *src, int stride, TX_TYPE tx_type) {
int i;
int len;
len = layout->band_offsets[layout->nb_bands];
......@@ -127,8 +127,8 @@ static void od_band_from_raster(const band_layout *layout, int16_t *dst,
* @param [in] src source vector
* @param [int] stride destination vector row stride
*/
static void od_raster_from_band(const band_layout *layout, int16_t *dst,
int stride, TX_TYPE tx_type, const int16_t *src) {
static void od_raster_from_band(const band_layout *layout, tran_low_t *dst,
int stride, TX_TYPE tx_type, const tran_low_t *src) {
int i;
int len;
len = layout->band_offsets[layout->nb_bands];
......@@ -153,8 +153,8 @@ static const band_layout *const OD_LAYOUTS[] = {&OD_LAYOUT4, &OD_LAYOUT8,
* @param [in] src source coefficient block
* @param [in] stride source vector row stride
*/
void od_raster_to_coding_order(int16_t *dst, int n, TX_TYPE ty_type,
const int16_t *src, int stride) {
void od_raster_to_coding_order(tran_low_t *dst, int n, TX_TYPE ty_type,
const tran_low_t *src, int stride) {
int bs;
/* dst + 1 because DC is not included for 4x4 blocks. */
od_band_from_raster(OD_LAYOUTS[0], dst + 1, src, stride, ty_type);
......@@ -185,8 +185,8 @@ void od_raster_to_coding_order(int16_t *dst, int n, TX_TYPE ty_type,
* @param [in] src source vector
* @param [in] n block size (along one side)
*/
void od_coding_order_to_raster(int16_t *dst, int stride, TX_TYPE ty_type,
const int16_t *src, int n) {
void od_coding_order_to_raster(tran_low_t *dst, int stride, TX_TYPE ty_type,
const tran_low_t *src, int n) {
int bs;
/* src + 1 because DC is not included for 4x4 blocks. */
od_raster_from_band(OD_LAYOUTS[0], dst, stride, ty_type, src + 1);
......
......@@ -28,11 +28,11 @@ typedef struct {
extern const int *const OD_BAND_OFFSETS[OD_TXSIZES + 1];
void od_raster_to_coding_order(int16_t *dst, int n, TX_TYPE ty_type,
const int16_t *src, int stride);
void od_raster_to_coding_order(tran_low_t *dst, int n, TX_TYPE ty_type,
const tran_low_t *src, int stride);
void od_coding_order_to_raster(int16_t *dst, int stride, TX_TYPE ty_type,
const int16_t *src, int n);
void od_coding_order_to_raster(tran_low_t *dst, int stride, TX_TYPE ty_type,
const tran_low_t *src, int n);
void od_raster_to_coding_order_16(int16_t *dst, int n, const int16_t *src,
int stride);
......
......@@ -338,8 +338,8 @@ static void inverse_transform_block(MACROBLOCKD *xd, int plane,
}
#if CONFIG_PVQ
static int av1_pvq_decode_helper(od_dec_ctx *dec, int16_t *ref_coeff,
int16_t *dqcoeff, int16_t *quant, int pli,
static int av1_pvq_decode_helper(od_dec_ctx *dec, tran_low_t *ref_coeff,
tran_low_t *dqcoeff, int16_t *quant, int pli,
int bs, TX_TYPE tx_type, int xdec,
PVQ_SKIP_TYPE ac_dc_coded) {
unsigned int flags; // used for daala's stream analyzer.
......@@ -356,8 +356,8 @@ static int av1_pvq_decode_helper(od_dec_ctx *dec, int16_t *ref_coeff,
int eob = 0;
int i;
int use_activity_masking = dec->use_activity_masking;
DECLARE_ALIGNED(16, int16_t, dqcoeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, int16_t, ref_coeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, tran_low_t, dqcoeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, tran_low_t, ref_coeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
od_coeff ref_int32[OD_TXSIZE_MAX * OD_TXSIZE_MAX];
od_coeff out_int32[OD_TXSIZE_MAX * OD_TXSIZE_MAX];
......
......@@ -1142,9 +1142,9 @@ PVQ_SKIP_TYPE av1_pvq_encode_helper(
double save_pvq_lambda;
#endif
DECLARE_ALIGNED(16, int16_t, coeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, int16_t, ref_coeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, int16_t, dqcoeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, tran_low_t, coeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, tran_low_t, ref_coeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, tran_low_t, dqcoeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, int32_t, in_int32[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, int32_t, ref_int32[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
......
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