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 17(short *q, short *dq, 18 unsigned char *dst, int stride, char *eobs) 19{ 20 int i, j; 21 22 for (i = 0; i < 4; i++) 23 { 24 for (j = 0; j < 4; j++) 25 { 26 if (*eobs++ > 1) 27 vp8_dequant_idct_add_dspr2(q, dq, dst, stride); 28 else 29 { 30 vp8_dc_only_idct_add_dspr2(q[0]*dq[0], dst, stride, dst, stride); 31 ((int *)q)[0] = 0; 32 } 33 34 q += 16; 35 dst += 4; 36 } 37 38 dst += 4 * stride - 16; 39 } 40} 41 42void vp8_dequant_idct_add_uv_block_dspr2 43(short *q, short *dq, 44 unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) 45{ 46 int i, j; 47 48 for (i = 0; i < 2; i++) 49 { 50 for (j = 0; j < 2; j++) 51 { 52 if (*eobs++ > 1) 53 vp8_dequant_idct_add_dspr2(q, dq, dstu, stride); 54 else 55 { 56 vp8_dc_only_idct_add_dspr2(q[0]*dq[0], dstu, stride, dstu, stride); 57 ((int *)q)[0] = 0; 58 } 59 60 q += 16; 61 dstu += 4; 62 } 63 64 dstu += 4 * stride - 8; 65 } 66 67 for (i = 0; i < 2; i++) 68 { 69 for (j = 0; j < 2; j++) 70 { 71 if (*eobs++ > 1) 72 vp8_dequant_idct_add_dspr2(q, dq, dstv, stride); 73 else 74 { 75 vp8_dc_only_idct_add_dspr2(q[0]*dq[0], dstv, stride, dstv, stride); 76 ((int *)q)[0] = 0; 77 } 78 79 q += 16; 80 dstv += 4; 81 } 82 83 dstv += 4 * stride - 8; 84 } 85} 86 87#endif 88 89