2010-05-18 11:58:33 -04:00
|
|
|
/*
|
2010-09-09 08:16:39 -04:00
|
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
2010-05-18 11:58:33 -04:00
|
|
|
*
|
2010-06-18 12:39:21 -04:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
2010-06-04 16:19:40 -04: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 12:39:21 -04:00
|
|
|
* in the file PATENTS. All contributing project authors may
|
2010-06-04 16:19:40 -04:00
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2010-05-18 11:58:33 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "invtrans.h"
|
|
|
|
|
|
|
|
|
2011-10-18 12:06:50 -04:00
|
|
|
void vp8_inverse_transform_b(const vp8_idct_rtcd_vtable_t *rtcd, BLOCKD *b,
|
|
|
|
int pitch)
|
|
|
|
{
|
2011-10-25 14:25:11 +03:00
|
|
|
if (*b->eob > 1)
|
2011-10-18 12:06:50 -04:00
|
|
|
{
|
|
|
|
IDCT_INVOKE(rtcd, idct16)(b->dqcoeff, b->predictor, pitch,
|
|
|
|
*(b->base_dst) + b->dst, b->dst_stride);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
IDCT_INVOKE(rtcd, idct1_scalar_add)(b->dqcoeff[0], b->predictor, pitch,
|
|
|
|
*(b->base_dst) + b->dst, b->dst_stride);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2010-05-18 11:58:33 -04:00
|
|
|
|
|
|
|
void vp8_inverse_transform_mby(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
2011-11-09 10:41:05 -05:00
|
|
|
if(x->mode_info_context->mbmi.mode != SPLITMV)
|
|
|
|
{
|
|
|
|
/* do 2nd order transform on the dc block */
|
2011-11-17 12:54:42 -05:00
|
|
|
IDCT_INVOKE(rtcd, iwalsh16)(x->block[24].dqcoeff, x->dqcoeff);
|
2011-11-09 10:41:05 -05:00
|
|
|
}
|
2010-05-18 11:58:33 -04:00
|
|
|
|
|
|
|
for (i = 0; i < 16; i++)
|
|
|
|
{
|
2011-10-18 12:06:50 -04:00
|
|
|
vp8_inverse_transform_b(rtcd, &x->block[i], 16);
|
2010-05-18 11:58:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
void vp8_inverse_transform_mbuv(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 16; i < 24; i++)
|
|
|
|
{
|
2011-10-18 12:06:50 -04:00
|
|
|
vp8_inverse_transform_b(rtcd, &x->block[i], 8);
|
2010-05-18 11:58:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|