dequantize.c 972 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2010 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. #include "vpx_config.h"
  11. #include "vp8_rtcd.h"
  12. #include "vp8/common/blockd.h"
  13. #include "vpx_mem/vpx_mem.h"
  14. void vp8_dequantize_b_c(BLOCKD *d, short *DQC) {
  15. int i;
  16. short *DQ = d->dqcoeff;
  17. short *Q = d->qcoeff;
  18. for (i = 0; i < 16; ++i) {
  19. DQ[i] = Q[i] * DQC[i];
  20. }
  21. }
  22. void vp8_dequant_idct_add_c(short *input, short *dq, unsigned char *dest,
  23. int stride) {
  24. int i;
  25. for (i = 0; i < 16; ++i) {
  26. input[i] = dq[i] * input[i];
  27. }
  28. vp8_short_idct4x4llm_c(input, dest, stride, dest, stride);
  29. memset(input, 0, 32);
  30. }