michael@0: /* michael@0: * Copyright (c) 2010 The WebM project authors. All Rights Reserved. michael@0: * michael@0: * Use of this source code is governed by a BSD-style license michael@0: * that can be found in the LICENSE file in the root of the source michael@0: * tree. An additional intellectual property rights grant can be found michael@0: * in the file PATENTS. All contributing project authors may michael@0: * be found in the AUTHORS file in the root of the source tree. michael@0: */ michael@0: michael@0: #include "vpx_config.h" michael@0: #include "vp8_rtcd.h" michael@0: #include "vpx_mem/vpx_mem.h" michael@0: michael@0: void vp8_dequant_idct_add_c(short *input, short *dq, michael@0: unsigned char *dest, int stride); michael@0: void vp8_dc_only_idct_add_c(short input_dc, unsigned char * pred, michael@0: int pred_stride, unsigned char *dst_ptr, michael@0: int dst_stride); michael@0: michael@0: void vp8_dequant_idct_add_y_block_c michael@0: (short *q, short *dq, michael@0: unsigned char *dst, int stride, char *eobs) michael@0: { michael@0: int i, j; michael@0: michael@0: for (i = 0; i < 4; i++) michael@0: { michael@0: for (j = 0; j < 4; j++) michael@0: { michael@0: if (*eobs++ > 1) michael@0: vp8_dequant_idct_add_c (q, dq, dst, stride); michael@0: else michael@0: { michael@0: vp8_dc_only_idct_add_c (q[0]*dq[0], dst, stride, dst, stride); michael@0: vpx_memset(q, 0, 2 * sizeof(q[0])); michael@0: } michael@0: michael@0: q += 16; michael@0: dst += 4; michael@0: } michael@0: michael@0: dst += 4*stride - 16; michael@0: } michael@0: } michael@0: michael@0: void vp8_dequant_idct_add_uv_block_c michael@0: (short *q, short *dq, michael@0: unsigned char *dstu, unsigned char *dstv, int stride, char *eobs) michael@0: { michael@0: int i, j; michael@0: michael@0: for (i = 0; i < 2; i++) michael@0: { michael@0: for (j = 0; j < 2; j++) michael@0: { michael@0: if (*eobs++ > 1) michael@0: vp8_dequant_idct_add_c (q, dq, dstu, stride); michael@0: else michael@0: { michael@0: vp8_dc_only_idct_add_c (q[0]*dq[0], dstu, stride, dstu, stride); michael@0: vpx_memset(q, 0, 2 * sizeof(q[0])); michael@0: } michael@0: michael@0: q += 16; michael@0: dstu += 4; michael@0: } michael@0: michael@0: dstu += 4*stride - 8; michael@0: } michael@0: michael@0: for (i = 0; i < 2; i++) michael@0: { michael@0: for (j = 0; j < 2; j++) michael@0: { michael@0: if (*eobs++ > 1) michael@0: vp8_dequant_idct_add_c (q, dq, dstv, stride); michael@0: else michael@0: { michael@0: vp8_dc_only_idct_add_c (q[0]*dq[0], dstv, stride, dstv, stride); michael@0: vpx_memset(q, 0, 2 * sizeof(q[0])); michael@0: } michael@0: michael@0: q += 16; michael@0: dstv += 4; michael@0: } michael@0: michael@0: dstv += 4*stride - 8; michael@0: } michael@0: }