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#include "vpx_config.h" 12ba164dffc5a6795bce97fae02b51ccf3330e15e4hkuang#include "vp8_rtcd.h" 131b362b15af34006e6a11974088a46d42b903418eJohann#include "vp8/common/blockd.h" 141b362b15af34006e6a11974088a46d42b903418eJohann#include "vpx_mem/vpx_mem.h" 151b362b15af34006e6a11974088a46d42b903418eJohann 167bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp8_dequantize_b_c(BLOCKD *d, short *DQC) { 177bc9febe8749e98a3812a0dc4380ceae75c29450Johann int i; 187bc9febe8749e98a3812a0dc4380ceae75c29450Johann short *DQ = d->dqcoeff; 197bc9febe8749e98a3812a0dc4380ceae75c29450Johann short *Q = d->qcoeff; 201b362b15af34006e6a11974088a46d42b903418eJohann 217bc9febe8749e98a3812a0dc4380ceae75c29450Johann for (i = 0; i < 16; ++i) { 227bc9febe8749e98a3812a0dc4380ceae75c29450Johann DQ[i] = Q[i] * DQC[i]; 237bc9febe8749e98a3812a0dc4380ceae75c29450Johann } 241b362b15af34006e6a11974088a46d42b903418eJohann} 251b362b15af34006e6a11974088a46d42b903418eJohann 267bc9febe8749e98a3812a0dc4380ceae75c29450Johannvoid vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *dest, 277bc9febe8749e98a3812a0dc4380ceae75c29450Johann int stride) { 287bc9febe8749e98a3812a0dc4380ceae75c29450Johann int i; 291b362b15af34006e6a11974088a46d42b903418eJohann 307bc9febe8749e98a3812a0dc4380ceae75c29450Johann for (i = 0; i < 16; ++i) { 317bc9febe8749e98a3812a0dc4380ceae75c29450Johann input[i] = dq[i] * input[i]; 327bc9febe8749e98a3812a0dc4380ceae75c29450Johann } 331b362b15af34006e6a11974088a46d42b903418eJohann 347bc9febe8749e98a3812a0dc4380ceae75c29450Johann vp8_short_idct4x4llm_c(input, dest, stride, dest, stride); 351b362b15af34006e6a11974088a46d42b903418eJohann 367bc9febe8749e98a3812a0dc4380ceae75c29450Johann memset(input, 0, 32); 371b362b15af34006e6a11974088a46d42b903418eJohann} 38