Skip to content

Commit 94a8442

Browse files
committed
fix inverse quant
1 parent 2dda564 commit 94a8442

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

inc/qdct.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// MAX QP for luma is 51, MAX QP for chroma is 39
88
const int LUMA_QP = 28;
9-
const int CHROMA_QP = 8;
9+
const int CHROMA_QP = 28;
1010
const int mat_MF[6][3] = {
1111
{13107, 5243, 8066},
1212
{11916, 4660, 7490},

src/qdct.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,13 +495,13 @@ inline void inverse_qdct(T& block, const int BLOCK_SIZE, const int QP) {
495495
if (BLOCK_SIZE == 16) {
496496
for (int i = 0; i < 4; i++) {
497497
for (int j = 0; j < 4; j++)
498-
block[i*4*BLOCK_SIZE + j*4] = int(mat16[i][j] / 8.0 + 0.5);
498+
block[i*4*BLOCK_SIZE + j*4] = mat16[i][j];
499499
}
500500
}
501501
else { // BLOCK_SIZE = 8
502502
for (int i = 0; i < 2; i++) {
503503
for (int j = 0; j < 2; j++)
504-
block[i*4*BLOCK_SIZE + j*4] = int(mat8[i][j] / 8.0 + 0.5);
504+
block[i*4*BLOCK_SIZE + j*4] = mat8[i][j];
505505
}
506506
}
507507

0 commit comments

Comments
 (0)