summaryrefslogtreecommitdiff
path: root/libavcodec/simple_idct.c
diff options
context:
space:
mode:
authorKieran Kunhya <kierank@obe.tv>2017-12-27 01:08:39 +0000
committerKieran Kunhya <kierank@obe.tv>2018-04-02 13:06:19 +0100
commit699fa8f382704acdbdf720042dd7b21df2eb7558 (patch)
tree3d5fab3f8c33163ab2db7470d983ee0aa9db4e8e /libavcodec/simple_idct.c
parent22a878ecd1c1d67ea985e998d9c0493795b86427 (diff)
simple_idct: Template functions to support an input bitdepth parameter
Diffstat (limited to 'libavcodec/simple_idct.c')
-rw-r--r--libavcodec/simple_idct.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/libavcodec/simple_idct.c b/libavcodec/simple_idct.c
index 1d05b2fe08..78b29c0fe3 100644
--- a/libavcodec/simple_idct.c
+++ b/libavcodec/simple_idct.c
@@ -30,6 +30,8 @@
#include "mathops.h"
#include "simple_idct.h"
+#define IN_IDCT_DEPTH 16
+
#define BIT_DEPTH 8
#include "simple_idct_template.c"
#undef BIT_DEPTH
@@ -46,6 +48,13 @@
#define BIT_DEPTH 12
#include "simple_idct_template.c"
#undef BIT_DEPTH
+#undef IN_IDCT_DEPTH
+
+#define IN_IDCT_DEPTH 32
+#define BIT_DEPTH 10
+#include "simple_idct_template.c"
+#undef BIT_DEPTH
+#undef IN_IDCT_DEPTH
/* 2x4x8 idct */
@@ -115,7 +124,7 @@ void ff_simple_idct248_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
/* IDCT8 on each line */
for(i=0; i<8; i++) {
- idctRowCondDC_8(block + i*8, 0);
+ idctRowCondDC_int16_8bit(block + i*8, 0);
}
/* IDCT4 and store */
@@ -188,7 +197,7 @@ void ff_simple_idct84_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
/* IDCT8 on each line */
for(i=0; i<4; i++) {
- idctRowCondDC_8(block + i*8, 0);
+ idctRowCondDC_int16_8bit(block + i*8, 0);
}
/* IDCT4 and store */
@@ -208,7 +217,7 @@ void ff_simple_idct48_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
/* IDCT8 and store */
for(i=0; i<4; i++){
- idctSparseColAdd_8(dest + i, line_size, block + i);
+ idctSparseColAdd_int16_8bit(dest + i, line_size, block + i);
}
}