1/* 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11#include "vpx_config.h" 12#include "vp8_rtcd.h" 13 14#if HAVE_DSPR2 15 16void vp8_dequant_idct_add_y_block_dspr2(short *q, short *dq, unsigned char *dst, 17 int stride, char *eobs) { 18 int i, j; 19 20 for (i = 0; i < 4; ++i) { 21 for (j = 0; j < 4; ++j) { 22 if (*eobs++ > 1) 23 vp8_dequant_idct_add_dspr2(q, dq, dst, stride); 24 else { 25 vp8_dc_only_idct_add_dspr2(q[0] * dq[0], dst, stride, dst, stride); 26 ((int *)q)[0] = 0; 27 } 28 29 q += 16; 30 dst += 4; 31 } 32 33 dst += 4 * stride - 16; 34 } 35} 36 37void vp8_dequant_idct_add_uv_block_dspr2(short *q, short *dq, 38 unsigned char *dstu, 39 unsigned char *dstv, int stride, 40 char *eobs) { 41 int i, j; 42 43 for (i = 0; i < 2; ++i) { 44 for (j = 0; j < 2; ++j) { 45 if (*eobs++ > 1) 46 vp8_dequant_idct_add_dspr2(q, dq, dstu, stride); 47 else { 48 vp8_dc_only_idct_add_dspr2(q[0] * dq[0], dstu, stride, dstu, stride); 49 ((int *)q)[0] = 0; 50 } 51 52 q += 16; 53 dstu += 4; 54 } 55 56 dstu += 4 * stride - 8; 57 } 58 59 for (i = 0; i < 2; ++i) { 60 for (j = 0; j < 2; ++j) { 61 if (*eobs++ > 1) 62 vp8_dequant_idct_add_dspr2(q, dq, dstv, stride); 63 else { 64 vp8_dc_only_idct_add_dspr2(q[0] * dq[0], dstv, stride, dstv, stride); 65 ((int *)q)[0] = 0; 66 } 67 68 q += 16; 69 dstv += 4; 70 } 71 72 dstv += 4 * stride - 8; 73 } 74} 75 76#endif 77