-
Notifications
You must be signed in to change notification settings - Fork 512
Expand file tree
/
Copy pathdequantize.cs
More file actions
62 lines (55 loc) · 1.78 KB
/
dequantize.cs
File metadata and controls
62 lines (55 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//-----------------------------------------------------------------------------
// Filename: dequantize.cs
//
// Description: Port of:
// - dequantize.c
//
// Author(s):
// Aaron Clauson (aaron@sipsorcery.com)
//
// History:
// 09 Nov 2020 Aaron Clauson Created, Dublin, Ireland.
//
// License:
// BSD 3-Clause "New" or "Revised" License, see included LICENSE.md file.
//-----------------------------------------------------------------------------
/*
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
namespace Vpx.Net
{
public unsafe static class dequantize
{
public static void vp8_dequantize_b_c(BLOCKD d, short* DQC)
{
int i;
//short* DQ = d->dqcoeff;
//short* Q = d->qcoeff;
var DQ = d.dqcoeff;
var Q = d.qcoeff;
for (i = 0; i < 16; ++i)
{
//DQ.src()[i] = (short)(Q.src()[i] * DQC[i]);
DQ.set(i, (short)(Q.get(i) * DQC[i]));
}
}
public static void vp8_dequant_idct_add_c(short* input, short* dq, byte* dest,
int stride)
{
int i;
for (i = 0; i < 16; ++i)
{
input[i] = (short)(dq[i] * input[i]);
}
idctllm.vp8_short_idct4x4llm_c(input, dest, stride, dest, stride);
//memset(input, 0, 32);
Mem.memset<short>(input, 0, 16);
}
}
}