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