dequantize.c revision ba164dffc5a6795bce97fae02b51ccf3330e15e4
11b362b15af34006e6a11974088a46d42b903418eJohann/* 21b362b15af34006e6a11974088a46d42b903418eJohann * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 31b362b15af34006e6a11974088a46d42b903418eJohann * 41b362b15af34006e6a11974088a46d42b903418eJohann * Use of this source code is governed by a BSD-style license 51b362b15af34006e6a11974088a46d42b903418eJohann * that can be found in the LICENSE file in the root of the source 61b362b15af34006e6a11974088a46d42b903418eJohann * tree. An additional intellectual property rights grant can be found 71b362b15af34006e6a11974088a46d42b903418eJohann * in the file PATENTS. All contributing project authors may 81b362b15af34006e6a11974088a46d42b903418eJohann * be found in the AUTHORS file in the root of the source tree. 91b362b15af34006e6a11974088a46d42b903418eJohann */ 101b362b15af34006e6a11974088a46d42b903418eJohann 111b362b15af34006e6a11974088a46d42b903418eJohann 121b362b15af34006e6a11974088a46d42b903418eJohann#include "vpx_config.h" 13ba164dffc5a6795bce97fae02b51ccf3330e15e4hkuang#include "vp8_rtcd.h" 141b362b15af34006e6a11974088a46d42b903418eJohann#include "vp8/common/blockd.h" 151b362b15af34006e6a11974088a46d42b903418eJohann#include "vpx_mem/vpx_mem.h" 161b362b15af34006e6a11974088a46d42b903418eJohann 171b362b15af34006e6a11974088a46d42b903418eJohannvoid vp8_dequantize_b_c(BLOCKD *d, short *DQC) 181b362b15af34006e6a11974088a46d42b903418eJohann{ 191b362b15af34006e6a11974088a46d42b903418eJohann int i; 201b362b15af34006e6a11974088a46d42b903418eJohann short *DQ = d->dqcoeff; 211b362b15af34006e6a11974088a46d42b903418eJohann short *Q = d->qcoeff; 221b362b15af34006e6a11974088a46d42b903418eJohann 231b362b15af34006e6a11974088a46d42b903418eJohann for (i = 0; i < 16; i++) 241b362b15af34006e6a11974088a46d42b903418eJohann { 251b362b15af34006e6a11974088a46d42b903418eJohann DQ[i] = Q[i] * DQC[i]; 261b362b15af34006e6a11974088a46d42b903418eJohann } 271b362b15af34006e6a11974088a46d42b903418eJohann} 281b362b15af34006e6a11974088a46d42b903418eJohann 291b362b15af34006e6a11974088a46d42b903418eJohannvoid vp8_dequant_idct_add_c(short *input, short *dq, 301b362b15af34006e6a11974088a46d42b903418eJohann unsigned char *dest, int stride) 311b362b15af34006e6a11974088a46d42b903418eJohann{ 321b362b15af34006e6a11974088a46d42b903418eJohann int i; 331b362b15af34006e6a11974088a46d42b903418eJohann 341b362b15af34006e6a11974088a46d42b903418eJohann for (i = 0; i < 16; i++) 351b362b15af34006e6a11974088a46d42b903418eJohann { 361b362b15af34006e6a11974088a46d42b903418eJohann input[i] = dq[i] * input[i]; 371b362b15af34006e6a11974088a46d42b903418eJohann } 381b362b15af34006e6a11974088a46d42b903418eJohann 391b362b15af34006e6a11974088a46d42b903418eJohann vp8_short_idct4x4llm_c(input, dest, stride, dest, stride); 401b362b15af34006e6a11974088a46d42b903418eJohann 411b362b15af34006e6a11974088a46d42b903418eJohann vpx_memset(input, 0, 32); 421b362b15af34006e6a11974088a46d42b903418eJohann 431b362b15af34006e6a11974088a46d42b903418eJohann} 44