2010-05-18 17:58:33 +02:00
|
|
|
/*
|
2010-09-09 14:16:39 +02:00
|
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
2010-05-18 17:58:33 +02:00
|
|
|
*
|
2010-06-18 18:39:21 +02:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
2010-06-04 22:19:40 +02:00
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
2010-06-18 18:39:21 +02:00
|
|
|
* in the file PATENTS. All contributing project authors may
|
2010-06-04 22:19:40 +02:00
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2010-05-18 17:58:33 +02:00
|
|
|
*/
|
|
|
|
|
2013-12-16 03:20:21 +01:00
|
|
|
#ifndef VP8_COMMON_INVTRANS_H_
|
|
|
|
#define VP8_COMMON_INVTRANS_H_
|
2010-05-18 17:58:33 +02:00
|
|
|
|
2015-08-26 01:01:55 +02:00
|
|
|
#include "./vpx_config.h"
|
2012-11-09 02:09:30 +01:00
|
|
|
#include "vp8_rtcd.h"
|
2010-05-18 17:58:33 +02:00
|
|
|
#include "blockd.h"
|
2011-12-15 20:23:36 +01:00
|
|
|
#include "onyxc_int.h"
|
2010-05-18 17:58:33 +02:00
|
|
|
|
2011-12-21 21:39:39 +01:00
|
|
|
#if CONFIG_MULTITHREAD
|
|
|
|
#include "vpx_mem/vpx_mem.h"
|
|
|
|
#endif
|
|
|
|
|
2014-01-18 21:16:11 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-07-14 07:26:28 +02:00
|
|
|
static void eob_adjust(char *eobs, short *diff) {
|
|
|
|
/* eob adjust.... the idct can only skip if both the dc and eob are zero */
|
|
|
|
int js;
|
2016-07-18 15:54:50 +02:00
|
|
|
for (js = 0; js < 16; ++js) {
|
2016-07-14 07:26:28 +02:00
|
|
|
if ((eobs[js] == 0) && (diff[0] != 0)) eobs[js]++;
|
|
|
|
diff += 16;
|
|
|
|
}
|
2011-12-15 20:23:36 +01:00
|
|
|
}
|
|
|
|
|
2016-07-14 07:26:28 +02:00
|
|
|
static INLINE void vp8_inverse_transform_mby(MACROBLOCKD *xd) {
|
|
|
|
short *DQC = xd->dequant_y1;
|
2011-12-21 21:39:39 +01:00
|
|
|
|
2016-07-14 07:26:28 +02:00
|
|
|
if (xd->mode_info_context->mbmi.mode != SPLITMV) {
|
|
|
|
/* do 2nd order transform on the dc block */
|
|
|
|
if (xd->eobs[24] > 1) {
|
|
|
|
vp8_short_inv_walsh4x4(&xd->block[24].dqcoeff[0], xd->qcoeff);
|
|
|
|
} else {
|
|
|
|
vp8_short_inv_walsh4x4_1(&xd->block[24].dqcoeff[0], xd->qcoeff);
|
2011-12-15 20:23:36 +01:00
|
|
|
}
|
2016-07-14 07:26:28 +02:00
|
|
|
eob_adjust(xd->eobs, xd->qcoeff);
|
|
|
|
|
|
|
|
DQC = xd->dequant_y1_dc;
|
|
|
|
}
|
|
|
|
vp8_dequant_idct_add_y_block(xd->qcoeff, DQC, xd->dst.y_buffer,
|
|
|
|
xd->dst.y_stride, xd->eobs);
|
2011-12-15 20:23:36 +01:00
|
|
|
}
|
2014-01-18 21:16:11 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} // extern "C"
|
|
|
|
#endif
|
|
|
|
|
2013-12-16 03:20:21 +01:00
|
|
|
#endif // VP8_COMMON_INVTRANS_H_
|